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

1185 lines
2.3 MiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

!(function(){var sx=Object.defineProperty,ax=Object.defineProperties;var lx=Object.getOwnPropertyDescriptors;var bm=Object.getOwnPropertySymbols;var ww=Object.prototype.hasOwnProperty,xw=Object.prototype.propertyIsEnumerable;var yw=(mn,je,Ut)=>je in mn?sx(mn,je,{enumerable:!0,configurable:!0,writable:!0,value:Ut}):mn[je]=Ut,Pd=(mn,je)=>{for(var Ut in je||(je={}))ww.call(je,Ut)&&yw(mn,Ut,je[Ut]);if(bm)for(var Ut of bm(je))xw.call(je,Ut)&&yw(mn,Ut,je[Ut]);return mn},Ay=(mn,je)=>ax(mn,lx(je));var Sw=(mn,je)=>{var Ut={};for(var St in mn)ww.call(mn,St)&&je.indexOf(St)<0&&(Ut[St]=mn[St]);if(mn!=null&&bm)for(var St of bm(mn))je.indexOf(St)<0&&xw.call(mn,St)&&(Ut[St]=mn[St]);return Ut};(self.webpackChunk=self.webpackChunk||[]).push([[342],{95869:function(mn,je,Ut){"use strict";Ut.d(je,{Z:function(){return ae}});var St=Ut(14809),Xt=Ut(59301),Ae={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M688 264c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48zm-8 136H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM480 544H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 308H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm356.8-74.4c29-26.3 47.2-64.3 47.2-106.6 0-79.5-64.5-144-144-144s-144 64.5-144 144c0 42.3 18.2 80.3 47.2 106.6-57 32.5-96.2 92.7-99.2 162.1-.2 4.5 3.5 8.3 8 8.3h48.1c4.2 0 7.7-3.3 8-7.6C564 871.2 621.7 816 692 816s128 55.2 131.9 124.4c.2 4.2 3.7 7.6 8 7.6H880c4.6 0 8.2-3.8 8-8.3-2.9-69.5-42.2-129.6-99.2-162.1zM692 591c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z"}}]},name:"solution",theme:"outlined"},xe=Ae,fe=Ut(7657),Rt=function(zt,Ie){return Xt.createElement(fe.Z,(0,St.Z)({},zt,{ref:Ie,icon:xe}))},ie=Xt.forwardRef(Rt),ae=ie},8336:function(){"use strict"},12469:function(){"use strict"},99587:function(mn,je){"use strict";je.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},63720:function(){"use strict";function mn(It,nt,et,At){et===void 0&&(et=0),At===void 0&&(At=1/0),this._name=It,this._defaultValue=nt,this._minimum=et,this._maximum=At}Object.defineProperty(mn.prototype,"name",{get:function(){return this._name},set:function(It){if(typeof It!="string"||It==="")throw new Error("Shape name must be a valid string.");this._name=It}}),Object.defineProperty(mn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(It){if(typeof It!="number"||isNaN(It))throw new Error("The default value must be a real number, not: "+It);this._defaultValue=It}}),Object.defineProperty(mn.prototype,"minimum",{get:function(){return this._minimum},set:function(It){if(typeof It!="number"||isNaN(It))throw new Error("Minimum must be a real number, not: "+It);this._minimum=It}}),Object.defineProperty(mn.prototype,"maximum",{get:function(){return this._maximum},set:function(It){if(typeof It!="number"||isNaN(It))throw new Error("Maximum must be a real number, not: "+It);this._maximum=It}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(It,nt){var et=go.Shape._FigureParameters[It];return et?et[nt]:null},go.Shape.setFigureParameter=function(It,nt,et){if(!(et instanceof mn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+et);if(et.defaultValue<et.minimum||et.defaultValue>et.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+et.defaultValue);var At=go.Shape._FigureParameters[It];At||(At=[],go.Shape._FigureParameters[It]=At),At[nt]=et};var je=[];function Ut(It,nt){var et=je.pop();return et===void 0?new go.Point(It,nt):(et.x=It,et.y=nt,et)}function St(){var It=je.pop();return It===void 0?new go.Point:It}function Xt(It){je.push(It)}function Ae(It,nt,et,At,at,dt,gt,xt,kt){kt||(kt=new go.Point);var Ht=It-et,Ot=at-gt,Zt=NaN,Wt=NaN;if(Ht===0)if(Ot===0)It===et&&(Zt=It,Wt=nt);else{var te=(dt-xt)/Ot,we=dt-te*at;Zt=It,Wt=te*Zt+we}else if(Ot===0){var pe=(nt-At)/Ht,Ke=nt-pe*It;Zt=at,Wt=pe*Zt+Ke}else{var pe=(nt-At)/Ht,te=(dt-xt)/Ot,Ke=nt-pe*It,we=dt-te*at;Zt=(we-Ke)/(pe-te),Wt=pe*Zt+Ke}return kt.x=Zt,kt.y=Wt,kt}function xe(It,nt,et,At,at,dt,gt,xt,kt,Ht,Ot,Zt,Wt,te){var we=1-kt,pe=kt,Ke=It*we+et*pe,_e=nt*we+At*pe,en=et*we+at*pe,dn=At*we+dt*pe,yn=at*we+gt*pe,Nn=dt*we+xt*pe,Kn=Ke*we+en*pe,me=_e*we+dn*pe,ee=en*we+yn*pe,gn=dn*we+Nn*pe,$n=Kn*we+ee*pe,Yn=me*we+gn*pe;Ht.x=Ke,Ht.y=_e,Ot.x=Kn,Ot.y=me,Zt.x=$n,Zt.y=Yn,Wt.x=ee,Wt.y=gn,te.x=yn,te.y=Nn}var fe=new go.Spot(.156,.156),Rt=new go.Spot(.844,.844),ie=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new mn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(It,nt,et){var At=It?It.parameter1:NaN;(isNaN(At)||At<0)&&(At=5),At=Math.min(At,nt/3),At=Math.min(At,et/3);var at=At*ie,dt=new go.Geometry().add(new go.PathFigure(At,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt-At,0)).add(new go.PathSegment(go.PathSegment.Bezier,nt,At,nt-at,0,nt,at)).add(new go.PathSegment(go.PathSegment.Line,nt,et-At)).add(new go.PathSegment(go.PathSegment.Bezier,nt-At,et,nt,et-at,nt-at,et)).add(new go.PathSegment(go.PathSegment.Line,At,et)).add(new go.PathSegment(go.PathSegment.Bezier,0,et-At,at,et,0,et-at)).add(new go.PathSegment(go.PathSegment.Line,0,At)).add(new go.PathSegment(go.PathSegment.Bezier,At,0,0,at,at,0).close()));return at>1&&(dt.spot1=new go.Spot(0,0,at,at),dt.spot2=new go.Spot(1,1,-at,-at)),dt}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(nt,et).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(nt,et).add(new go.PathSegment(go.PathSegment.Line,0,et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(It,nt,et){var At=new go.Geometry(go.Geometry.Line);return At.startX=0,At.startY=et/2,At.endX=nt,At.endY=et/2,At}),go.Shape.defineFigureGenerator("LineV",function(It,nt,et){var At=new go.Geometry(go.Geometry.Line);return At.startX=nt/2,At.startY=0,At.endX=nt/2,At.endY=et,At}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,et/2,!1).add(new go.PathSegment(go.PathSegment.Line,nt,et/2)).add(new go.PathSegment(go.PathSegment.Move,nt/2,0)).add(new go.PathSegment(go.PathSegment.Line,nt/2,et)))}),go.Shape.defineFigureGenerator("XLine",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)))}),go.Shape.defineFigureGenerator("LineRight",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(.25*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)))}),go.Shape.defineFigureGenerator("LineDown",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,.25*et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.75*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)))}),go.Shape.defineFigureGenerator("LineLeft",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(.75*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.75*nt,et)))}),go.Shape.defineFigureGenerator("LineUp",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,.75*et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(It,nt,et){var At=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(At*nt,(1-At)*et,!1).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,At*et)).add(new go.PathSegment(go.PathSegment.Move,At*nt,At*et)).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,(1-At)*et)).add(new go.PathSegment(go.PathSegment.Move,0,et/2)).add(new go.PathSegment(go.PathSegment.Line,nt,et/2)).add(new go.PathSegment(go.PathSegment.Move,nt/2,0)).add(new go.PathSegment(go.PathSegment.Line,nt/2,et)))}),go.Shape.defineFigureGenerator("CircleLine",function(It,nt,et){var At=nt/2,at=new go.Geometry().add(new go.PathFigure(nt,nt/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,At,At,At,At).close()));return at.spot1=fe,at.spot2=Rt,at.defaultStretch=go.GraphObject.Uniform,at}),go.Shape.defineFigureGenerator("Line1",function(It,nt,et){var At=new go.Geometry(go.Geometry.Line);return At.startX=0,At.startY=0,At.endX=nt,At.endY=et,At}),go.Shape.defineFigureGenerator("Line2",function(It,nt,et){var At=new go.Geometry(go.Geometry.Line);return At.startX=nt,At.startY=0,At.endX=0,At.endY=et,At}),go.Shape.defineFigureGenerator("Curve1",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,nt,et,ie*nt,0,nt,(1-ie)*et)))}),go.Shape.defineFigureGenerator("Curve2",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,nt,et,0,ie*et,(1-ie)*nt,et)))}),go.Shape.defineFigureGenerator("Curve3",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,ie*et,ie*nt,et)))}),go.Shape.defineFigureGenerator("Curve4",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,et,(1-ie)*nt,0,0,(1-ie)*et)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new mn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)?At=.1:At<-1?At=-1:At>1&&(At=1);var at=Math.abs(At)*nt;if(At===0){var dt=new go.Geometry(go.Geometry.Rectangle);return dt.startX=0,dt.startY=0,dt.endX=nt,dt.endY=et,dt}else{var dt=new go.Geometry;return At>0?dt.add(new go.PathFigure(at,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-at,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):dt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt-at,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,at,et).close())),at<nt/2&&dt.setSpots(at/nt,0,(nt-at)/nt,1),dt}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new mn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)?At=10:At<-nt?At=-nt:At>nt&&(At=nt);var at=Math.abs(At);if(At===0){var dt=new go.Geometry(go.Geometry.Rectangle);return dt.startX=0,dt.startY=0,dt.endX=nt,dt.endY=et,dt}else{var dt=new go.Geometry;return At>0?dt.add(new go.PathFigure(at,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-at,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):dt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt-at,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,at,et).close())),at<nt/2&&dt.setSpots(at/nt,0,(nt-at)/nt,1),dt}}),go.Shape.setFigureParameter("Trapezoid1",0,new mn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)?At=.2:At<.5?At=-.5:At>.5&&(At=.5);var at=Math.abs(At)*nt;if(At===0){var dt=new go.Geometry(go.Geometry.Rectangle);return dt.startX=0,dt.startY=0,dt.endX=nt,dt.endY=et,dt}else{var dt=new go.Geometry;return At>0?dt.add(new go.PathFigure(at,0).add(new go.PathSegment(go.PathSegment.Line,nt-at,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):dt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-at,et)).add(new go.PathSegment(go.PathSegment.Line,at,et).close())),at<nt/2&&dt.setSpots(at/nt,0,(nt-at)/nt,1),dt}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new mn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)?At=20:At<-nt?At=-nt/2:At>nt&&(At=nt/2);var at=Math.abs(At);if(At===0){var dt=new go.Geometry(go.Geometry.Rectangle);return dt.startX=0,dt.startY=0,dt.endX=nt,dt.endY=et,dt}else{var dt=new go.Geometry;return At>0?dt.add(new go.PathFigure(at,0).add(new go.PathSegment(go.PathSegment.Line,nt-at,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):dt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-at,et)).add(new go.PathSegment(go.PathSegment.Line,at,et).close())),at<nt/2&&dt.setSpots(at/nt,0,(nt-at)/nt,1),dt}}),go.Shape.setFigureParameter("ManualOperation",0,new mn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)?At=10:At<-nt?At=-nt/2:At>nt&&(At=nt/2);var at=Math.abs(At);if(At===0){var dt=new go.Geometry(go.Geometry.Rectangle);return dt.startX=0,dt.startY=0,dt.endX=nt,dt.endY=et,dt}else{var dt=new go.Geometry;return At>0?dt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-at,et)).add(new go.PathSegment(go.PathSegment.Line,at,et).close())):dt.add(new go.PathFigure(at,0).add(new go.PathSegment(go.PathSegment.Line,nt-at,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())),at<nt/2&&dt.setSpots(at/nt,0,(nt-at)/nt,1),dt}});var ae=[];function de(){var It=ae.pop();return It===void 0?[]:It}function zt(It){It.length=0,ae.push(It)}function Ie(It){for(var nt=de(),et=.5,At=.5,at=Math.PI*1.5,dt=0,gt=0;gt<It;gt++)dt=2*Math.PI/It*gt+at,nt[gt]=new go.Point(At+et*Math.cos(dt),At+et*Math.sin(dt));return nt.push(nt[0]),nt}function Yt(It){var nt=Me(It),et=de();et[0]=nt[0];for(var At=1,at=1;At<nt.length;At+=2,at+=3)et[at]=nt[At],et[at+1]=nt[At],et[at+2]=nt[At+1];return zt(nt),et}function Me(It){for(var nt=Ie(It),et=de(),At=Math.floor(nt.length/2),at=nt.length-1,dt=It%2===0?2:1,gt=0;gt<at;gt++){var xt=nt[gt],kt=nt[gt+1],Ht=nt[(At+gt-1)%at],Ot=nt[(At+gt+dt)%at];et[gt*2]=xt,et[gt*2+1]=Ae(xt.x,xt.y,Ht.x,Ht.y,kt.x,kt.y,Ot.x,Ot.y,new go.Point)}return et[et.length]=et[0],zt(nt),et}go.Shape.defineFigureGenerator("Pentagon",function(It,nt,et){var At=Ie(5),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<5;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),zt(At),at.spot1=new go.Spot(.2,.22),at.spot2=new go.Spot(.8,.9),at}),go.Shape.defineFigureGenerator("Hexagon",function(It,nt,et){var At=Ie(6),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<6;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),zt(At),at.spot1=new go.Spot(.07,.25),at.spot2=new go.Spot(.93,.75),at}),go.Shape.defineFigureGenerator("Heptagon",function(It,nt,et){var At=Ie(7),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<7;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),zt(At),at.spot1=new go.Spot(.2,.15),at.spot2=new go.Spot(.8,.85),at}),go.Shape.defineFigureGenerator("Octagon",function(It,nt,et){var At=Ie(8),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<8;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),zt(At),at.spot1=new go.Spot(.15,.15),at.spot2=new go.Spot(.85,.85),at}),go.Shape.defineFigureGenerator("Nonagon",function(It,nt,et){var At=Ie(9),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<9;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),zt(At),at.spot1=new go.Spot(.17,.13),at.spot2=new go.Spot(.82,.82),at}),go.Shape.defineFigureGenerator("Decagon",function(It,nt,et){var At=Ie(10),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<10;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),zt(At),at.spot1=new go.Spot(.16,.16),at.spot2=new go.Spot(.84,.84),at}),go.Shape.defineFigureGenerator("Dodecagon",function(It,nt,et){var At=Ie(12),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<12;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),zt(At),at.spot1=new go.Spot(.16,.16),at.spot2=new go.Spot(.84,.84),at}),go.Shape.defineFigureGenerator("FivePointedStar",function(It,nt,et){var At=Me(5),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<10;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),zt(At),at.spot1=new go.Spot(.266,.333),at.spot2=new go.Spot(.733,.733),at}),go.Shape.defineFigureGenerator("SixPointedStar",function(It,nt,et){var At=Me(6),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<12;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),zt(At),at.spot1=new go.Spot(.17,.25),at.spot2=new go.Spot(.83,.75),at}),go.Shape.defineFigureGenerator("SevenPointedStar",function(It,nt,et){var At=Me(7),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<14;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),zt(At),at.spot1=new go.Spot(.222,.277),at.spot2=new go.Spot(.777,.666),at}),go.Shape.defineFigureGenerator("EightPointedStar",function(It,nt,et){var At=Me(8),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<16;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),zt(At),at.spot1=new go.Spot(.25,.25),at.spot2=new go.Spot(.75,.75),at}),go.Shape.defineFigureGenerator("NinePointedStar",function(It,nt,et){var At=Me(9),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<18;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),zt(At),at.spot1=new go.Spot(.222,.277),at.spot2=new go.Spot(.777,.666),at}),go.Shape.defineFigureGenerator("TenPointedStar",function(It,nt,et){var At=Me(10),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<20;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),zt(At),at.spot1=new go.Spot(.281,.261),at.spot2=new go.Spot(.723,.748),at}),go.Shape.defineFigureGenerator("FivePointedBurst",function(It,nt,et){var At=Yt(5),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<At.length;gt+=3)dt.add(new go.PathSegment(go.PathSegment.Bezier,At[gt+2].x*nt,At[gt+2].y*et,At[gt].x*nt,At[gt].y*et,At[gt+1].x*nt,At[gt+1].y*et));return dt.segments.last().close(),zt(At),at.spot1=new go.Spot(.222,.277),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("SixPointedBurst",function(It,nt,et){var At=Yt(6),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<At.length;gt+=3)dt.add(new go.PathSegment(go.PathSegment.Bezier,At[gt+2].x*nt,At[gt+2].y*et,At[gt].x*nt,At[gt].y*et,At[gt+1].x*nt,At[gt+1].y*et));return dt.segments.last().close(),zt(At),at.spot1=new go.Spot(.17,.222),at.spot2=new go.Spot(.833,.777),at}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(It,nt,et){var At=Yt(7),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<At.length;gt+=3)dt.add(new go.PathSegment(go.PathSegment.Bezier,At[gt+2].x*nt,At[gt+2].y*et,At[gt].x*nt,At[gt].y*et,At[gt+1].x*nt,At[gt+1].y*et));return dt.segments.last().close(),zt(At),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("EightPointedBurst",function(It,nt,et){var At=Yt(8),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<At.length;gt+=3)dt.add(new go.PathSegment(go.PathSegment.Bezier,At[gt+2].x*nt,At[gt+2].y*et,At[gt].x*nt,At[gt].y*et,At[gt+1].x*nt,At[gt+1].y*et));return dt.segments.last().close(),zt(At),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("NinePointedBurst",function(It,nt,et){var At=Yt(9),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<At.length;gt+=3)dt.add(new go.PathSegment(go.PathSegment.Bezier,At[gt+2].x*nt,At[gt+2].y*et,At[gt].x*nt,At[gt].y*et,At[gt+1].x*nt,At[gt+1].y*et));return dt.segments.last().close(),zt(At),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("TenPointedBurst",function(It,nt,et){var At=Yt(10),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<At.length;gt+=3)dt.add(new go.PathSegment(go.PathSegment.Bezier,At[gt+2].x*nt,At[gt+2].y*et,At[gt].x*nt,At[gt].y*et,At[gt+1].x*nt,At[gt+1].y*et));return dt.segments.last().close(),zt(At),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.setFigureParameter("FramedRectangle",0,new mn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new mn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(It,nt,et){var At=It?It.parameter1:NaN,at=It?It.parameter2:NaN;isNaN(At)&&(At=8),isNaN(at)&&(at=8);var dt=new go.Geometry,gt=new go.PathFigure(0,0,!0);return dt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At<nt/2&&at<et/2&&(gt.add(new go.PathSegment(go.PathSegment.Move,At,at)),gt.add(new go.PathSegment(go.PathSegment.Line,At,et-at)),gt.add(new go.PathSegment(go.PathSegment.Line,nt-At,et-at)),gt.add(new go.PathSegment(go.PathSegment.Line,nt-At,at).close())),dt.setSpots(0,0,1,1,At,at,-At,-at),dt}),go.Shape.setFigureParameter("Ring",0,new mn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(It,nt,et){var At=It?It.parameter1:NaN;(isNaN(At)||At<0)&&(At=8);var at=nt/2,dt=new go.Geometry,gt=new go.PathFigure(nt,nt/2,!0);dt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Arc,0,360,at,at,at,at).close());var xt=Math.max(at-At,0);return xt>0&&(gt.add(new go.PathSegment(go.PathSegment.Move,nt/2+xt,nt/2)),gt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,at,at,xt,xt).close())),dt.spot1=fe,dt.spot2=Rt,dt.defaultStretch=go.GraphObject.Uniform,dt}),go.Shape.defineFigureGenerator("Cloud",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(.08034461*nt,.1944299*et,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*nt,.05349299*et,-.09239631*nt,.07836421*et,.1406031*nt,-.0542823*et)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*nt,.074219*et,.2450511*nt,-.00697547*et,.3776197*nt,-.01112067*et)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*nt,.07004196*et,.4539471*nt,0,.6066018*nt,-.02526587*et)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*nt,.08370865*et,.6914277*nt,-.01904177*et,.8921095*nt,-.01220843*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*nt,.3194596*et,1.036446*nt,.04105738*et,1.020377*nt,.3022052*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*nt,.562044*et,1.04448*nt,.360238*et,.992256*nt,.5219009*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*nt,.8217117*et,1.032337*nt,.5771781*et,1.018411*nt,.8120651*et)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*nt,.9156953*et,1.028411*nt,.9571472*et,.8556702*nt,1.052487*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*nt,.9310455*et,.7431877*nt,1.009325*et,.5624123*nt,1.021761*et)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*nt,.9344623*et,.4820677*nt,1.031761*et,.3030112*nt,1.002796*et)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*nt,.870098*et,.2329994*nt,1.01518*et,.03213784*nt,1.01518*et)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*nt,.6545475*et,-.02812061*nt,.9032597*et,-.01205169*nt,.6835638*et)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*nt,.4265613*et,-.01812061*nt,.6089503*et,-.00606892*nt,.4555777*et)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*nt,.1944299*et,-.01606892*nt,.3892545*et,-.01205169*nt,.1944299*et))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(It,nt,et){var At=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(At*nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,At*et)).add(new go.PathSegment(go.PathSegment.Line,nt,(1-At)*et)).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,et)).add(new go.PathSegment(go.PathSegment.Line,At*nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,(1-At)*et)).add(new go.PathSegment(go.PathSegment.Line,0,At*et).close())).setSpots(At/2,At/2,1-At/2,1-At/2)}),go.Shape.setFigureParameter("Pie",0,new mn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new mn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(It,nt,et){var At=It?It.parameter1:NaN,at=It?It.parameter2:NaN;isNaN(At)&&(At=0),isNaN(at)&&(at=315);var dt=At%360;dt<0&&(dt+=360);var gt=at%360,xt=Math.min(nt,et)/2;return new go.Geometry().add(new go.PathFigure(xt,xt).add(new go.PathSegment(go.PathSegment.Arc,dt,gt,xt,xt,xt,xt).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(It,nt,et){var At=ie/Math.SQRT2*.5,at=Math.SQRT2/2,dt=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(nt,et,!0).add(new go.PathSegment(go.PathSegment.Bezier,at*nt,dt*et,nt,(1-At)*et,(at+At)*nt,(dt+At)*et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close()))}),go.Shape.setFigureParameter("ThickCross",0,new mn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(It,nt,et){var At=It?It.parameter1:NaN;(isNaN(At)||At<0)&&(At=30);var at=Math.min(At,nt)/2,dt=nt/2,gt=et/2;return new go.Geometry().add(new go.PathFigure(dt-at,0,!0).add(new go.PathSegment(go.PathSegment.Line,dt+at,0)).add(new go.PathSegment(go.PathSegment.Line,dt+at,gt-at)).add(new go.PathSegment(go.PathSegment.Line,nt,gt-at)).add(new go.PathSegment(go.PathSegment.Line,nt,gt+at)).add(new go.PathSegment(go.PathSegment.Line,dt+at,gt+at)).add(new go.PathSegment(go.PathSegment.Line,dt+at,et)).add(new go.PathSegment(go.PathSegment.Line,dt-at,et)).add(new go.PathSegment(go.PathSegment.Line,dt-at,gt+at)).add(new go.PathSegment(go.PathSegment.Line,0,gt+at)).add(new go.PathSegment(go.PathSegment.Line,0,gt-at)).add(new go.PathSegment(go.PathSegment.Line,dt-at,gt-at).close()))}),go.Shape.setFigureParameter("ThinCross",0,new mn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(It,nt,et){var At=It?It.parameter1:NaN;(isNaN(At)||At<0)&&(At=10);var at=Math.min(At,nt)/2,dt=nt/2,gt=et/2;return new go.Geometry().add(new go.PathFigure(dt-at,0,!0).add(new go.PathSegment(go.PathSegment.Line,dt+at,0)).add(new go.PathSegment(go.PathSegment.Line,dt+at,gt-at)).add(new go.PathSegment(go.PathSegment.Line,nt,gt-at)).add(new go.PathSegment(go.PathSegment.Line,nt,gt+at)).add(new go.PathSegment(go.PathSegment.Line,dt+at,gt+at)).add(new go.PathSegment(go.PathSegment.Line,dt+at,et)).add(new go.PathSegment(go.PathSegment.Line,dt-at,et)).add(new go.PathSegment(go.PathSegment.Line,dt-at,gt+at)).add(new go.PathSegment(go.PathSegment.Line,0,gt+at)).add(new go.PathSegment(go.PathSegment.Line,0,gt-at)).add(new go.PathSegment(go.PathSegment.Line,dt-at,gt-at).close()))}),go.Shape.setFigureParameter("ThickX",0,new mn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(It,nt,et){var At=It?It.parameter1:NaN;if((isNaN(At)||At<0)&&(At=30),nt===0||et===0){var at=new go.Geometry(go.Geometry.Rectangle);return at.startX=0,at.startY=0,at.endX=nt,at.endY=et,at}else{var dt=nt/2,gt=et/2,xt=Math.atan2(et,nt),kt=At-Math.min(Math.cos(xt)*At/2,dt),Ht=At-Math.min(Math.sin(xt)*At/2,gt),at=new go.Geometry,Ot=new go.PathFigure(kt,0,!0);return at.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Line,dt,.2*et)),Ot.add(new go.PathSegment(go.PathSegment.Line,nt-kt,0)),Ot.add(new go.PathSegment(go.PathSegment.Line,nt,Ht)),Ot.add(new go.PathSegment(go.PathSegment.Line,.8*nt,gt)),Ot.add(new go.PathSegment(go.PathSegment.Line,nt,et-Ht)),Ot.add(new go.PathSegment(go.PathSegment.Line,nt-kt,et)),Ot.add(new go.PathSegment(go.PathSegment.Line,dt,.8*et)),Ot.add(new go.PathSegment(go.PathSegment.Line,kt,et)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,et-Ht)),Ot.add(new go.PathSegment(go.PathSegment.Line,.2*nt,gt)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,Ht).close()),at}}),go.Shape.setFigureParameter("ThinX",0,new mn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(It,nt,et){var At=It?It.parameter1:NaN;(isNaN(At)||At<0)&&(At=10);var at=new go.Geometry,dt=new go.PathFigure(.1*nt,0,!0);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.1*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.5*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,.9*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.5*et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et).close()),at}),go.Shape.setFigureParameter("SquareIBeam",0,new mn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.2);var at=new go.Geometry,dt=new go.PathFigure(0,0,!0);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,At*et)),dt.add(new go.PathSegment(go.PathSegment.Line,(.5+At/2)*nt,At*et)),dt.add(new go.PathSegment(go.PathSegment.Line,(.5+At/2)*nt,(1-At)*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,(1-At)*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,(1-At)*et)),dt.add(new go.PathSegment(go.PathSegment.Line,(.5-At/2)*nt,(1-At)*et)),dt.add(new go.PathSegment(go.PathSegment.Line,(.5-At/2)*nt,At*et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,At*et).close()),at}),go.Shape.setFigureParameter("RoundedIBeam",0,new mn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.5);var at=new go.Geometry,dt=new go.PathFigure(0,0,!0);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),dt.add(new go.PathSegment(go.PathSegment.Bezier,nt,et,Math.abs(1-At)*nt,.25*et,Math.abs(1-At)*nt,.75*et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et)),dt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,At*nt,.75*et,At*nt,.25*et).close()),at}),go.Shape.defineFigureGenerator("HalfEllipse",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,ie*nt,0,nt,(.5-ie/2)*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,(.5+ie/2)*et,ie*nt,et).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,0,nt,et)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*nt,.75*et,.5*nt,.25*et).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,et,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*et,.1*nt,.8*et,0,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,0,0,.45*nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,nt,.3*et,.55*nt,0,nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,.5*et,.9*nt,.8*et).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*nt,.01*et)).add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.6*nt,.2*et,nt,.25*et)).add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.7*et,nt,.8*et,.6*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,.5*nt,.75*et,.55*nt,.95*et)).add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)).add(new go.PathSegment(go.PathSegment.Bezier,.45*nt,.7*et,.45*nt,.95*et,.5*nt,.75*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.4*nt,.8*et,0,.8*et)).add(new go.PathSegment(go.PathSegment.Bezier,.49*nt,.01*et,0,.25*et,.4*nt,.2*et).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.4*nt,.6*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.15*nt,et,.5*nt,.75*et,.45*nt,.95*et)),at.add(new go.PathSegment(go.PathSegment.Line,.85*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.6*nt,.6*et,.55*nt,.95*et,.5*nt,.75*et));var dt=.2,gt=.3,xt=0,kt=dt*ie;return at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*nt,(.5+dt+xt)*et,(.5-dt+gt)*nt,(.5+kt+xt)*et,(.5-kt+gt)*nt,(.5+dt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+dt+gt)*nt,(.5+xt)*et,(.5+kt+gt)*nt,(.5+dt+xt)*et,(.5+dt+gt)*nt,(.5+kt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*nt,(.5-dt+xt)*et,(1-.5+dt+gt)*nt,(.5-kt+xt)*et,(.5+kt+gt)*nt,(.5-dt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.65*nt,.36771243*et,(.5-kt+gt)*nt,(.5-dt+xt)*et,(.5-dt+gt+.05)*nt,(.5-kt+xt-.02)*et)),dt=.2,gt=0,xt=-.3,kt=dt*ie,at.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+dt+gt)*nt,(.5+xt)*et,(.5+kt+gt)*nt,(.5+dt+xt)*et,(.5+dt+gt)*nt,(.5+kt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*nt,(.5-dt+xt)*et,(1-.5+dt+gt)*nt,(.5-kt+xt)*et,(.5+kt+gt)*nt,(.5-dt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5-dt+gt)*nt,(.5+xt)*et,(.5-kt+gt)*nt,(.5-dt+xt)*et,(.5-dt+gt)*nt,(.5-kt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5-kt+gt)*nt,(.5+dt+xt)*et,(.5-dt+gt)*nt,(.5+kt+xt)*et,(.5-kt+gt)*nt,(.5+dt+xt)*et)),dt=.2,gt=-.3,xt=0,kt=dt*ie,at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*nt,(.5-dt+xt)*et,(1-.5+dt+gt-.05)*nt,(.5-kt+xt-.02)*et,(.5+kt+gt)*nt,(.5-dt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5-dt+gt)*nt,(.5+xt)*et,(.5-kt+gt)*nt,(.5-dt+xt)*et,(.5-dt+gt)*nt,(.5-kt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*nt,(.5+dt+xt)*et,(.5-dt+gt)*nt,(.5+kt+xt)*et,(.5-kt+gt)*nt,(.5+dt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,.6*et,(.5+kt+gt)*nt,(.5+dt+xt)*et,(.5+dt+gt)*nt,(.5+kt+xt)*et).close()),At.setSpots(.06,.33,.93,.68),At}),go.Shape.defineFigureGenerator("YinYang",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*.5,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,270,180,nt*.5,nt*.5,nt*.5,nt*.5)),at.add(new go.PathSegment(go.PathSegment.Arc,90,-180,nt*.5,nt*.75,nt*.25,nt*.25)),at.add(new go.PathSegment(go.PathSegment.Arc,90,180,nt*.5,nt*.25,nt*.25,nt*.25));var dt=.1,gt=.5,xt=.25;return at.add(new go.PathSegment(go.PathSegment.Move,(gt+dt)*nt,xt*et)),at.add(new go.PathSegment(go.PathSegment.Arc,0,-360,nt*gt,et*xt,dt*nt,dt*nt).close()),at=new go.PathFigure(nt*.5,0,!1),At.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,270,-180,nt*.5,nt*.5,nt*.5,nt*.5)),xt=.75,at=new go.PathFigure((gt+dt)*nt,xt*et,!0),At.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,0,360,nt*gt,et*xt,dt*nt,dt*nt).close()),At.defaultStretch=go.GraphObject.Uniform,At}),go.Shape.defineFigureGenerator("Peace",function(It,nt,et){var At=.8535533905932737,at=.5*nt,dt=.5*et;return new go.Geometry().add(new go.PathFigure(at,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,at,dt,at,dt)).add(new go.PathSegment(go.PathSegment.Line,at,et)).add(new go.PathSegment(go.PathSegment.Move,at,dt)).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,At*et)).add(new go.PathSegment(go.PathSegment.Move,at,dt)).add(new go.PathSegment(go.PathSegment.Line,At*nt,At*et)))}),go.Shape.defineFigureGenerator("NotAllowed",function(It,nt,et){var At=new go.Geometry,at=ie*.5,dt=.5,gt=.5,xt=.5,kt=new go.PathFigure(gt*nt,(xt-dt)*et);At.add(kt),kt.add(new go.PathSegment(go.PathSegment.Bezier,(gt-dt)*nt,xt*et,(gt-at)*nt,(xt-dt)*et,(gt-dt)*nt,(xt-at)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+dt)*et,(gt-dt)*nt,(xt+at)*et,(gt-at)*nt,(xt+dt)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt)*nt,xt*et,(gt+at)*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt-dt)*et,(gt+dt)*nt,(xt-at)*et,(gt+at)*nt,(xt-dt)*et)),dt=.4,at=ie*.4;var Ht=St(),Ot=St(),Zt=St(),Wt=St();xe(gt,xt-dt,gt+at,xt-dt,gt+dt,xt-at,gt+dt,xt,.42,Ht,Ot,Zt,Wt,Wt);var te=St(),we=St(),pe=St();xe(gt,xt-dt,gt+at,xt-dt,gt+dt,xt-at,gt+dt,xt,.58,Wt,Wt,pe,te,we);var Ke=St(),_e=St(),en=St();xe(gt,xt+dt,gt-at,xt+dt,gt-dt,xt+at,gt-dt,xt,.42,Ke,_e,en,Wt,Wt);var dn=St(),yn=St(),Nn=St();return xe(gt,xt+dt,gt-at,xt+dt,gt-dt,xt+at,gt-dt,xt,.58,Wt,Wt,Nn,dn,yn),kt.add(new go.PathSegment(go.PathSegment.Move,Nn.x*nt,Nn.y*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,(gt-dt)*nt,xt*et,dn.x*nt,dn.y*et,yn.x*nt,yn.y*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt-dt)*et,(gt-dt)*nt,(xt-at)*et,(gt-at)*nt,(xt-dt)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,Zt.x*nt,Zt.y*et,Ht.x*nt,Ht.y*et,Ot.x*nt,Ot.y*et)),kt.add(new go.PathSegment(go.PathSegment.Line,Nn.x*nt,Nn.y*et).close()),kt.add(new go.PathSegment(go.PathSegment.Move,en.x*nt,en.y*et)),kt.add(new go.PathSegment(go.PathSegment.Line,pe.x*nt,pe.y*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt)*nt,xt*et,te.x*nt,te.y*et,we.x*nt,we.y*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et,(gt+at)*nt,(xt+dt)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,en.x*nt,en.y*et,Ke.x*nt,Ke.y*et,_e.x*nt,_e.y*et).close()),Xt(Ht),Xt(Ot),Xt(Zt),Xt(Wt),Xt(te),Xt(we),Xt(pe),Xt(Ke),Xt(_e),Xt(en),Xt(dn),Xt(yn),Xt(Nn),At.defaultStretch=go.GraphObject.Uniform,At}),go.Shape.defineFigureGenerator("Fragile",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.15*et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,.29*nt,.33*et)).add(new go.PathSegment(go.PathSegment.Line,.35*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.15*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.5*et,nt,.25*et,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.55*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.45*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.45*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.5*et,0,.25*et).close()))}),go.Shape.setFigureParameter("HourGlass",0,new mn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(It,nt,et){var At=It?It.parameter1:NaN;(isNaN(At)||At<0)&&(At=30),At>nt&&(At=nt);var at=(nt-At)/2,dt=at+At;return new go.Geometry().add(new go.PathFigure(dt,.5*et).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et)).add(new go.PathSegment(go.PathSegment.Line,at,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,nt,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,.55*et).add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.45*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.45*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.55*et).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(It,nt,et){var At=new go.Geometry,at=ie*.4,dt=.4,gt=.5,xt=.5,kt=St(),Ht=St(),Ot=St(),Zt=St(),Wt=new go.PathFigure((gt-dt)*nt,xt*et,!1);At.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt-dt)*et,(gt-dt)*nt,(xt-at)*et,(gt-at)*nt,(xt-dt)*et)),xe(gt,xt-dt,gt+at,xt-dt,gt+dt,xt-at,gt+dt,xt,.44,Ot,Zt,Ht,kt,kt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,Ht.x*nt,Ht.y*et,Ot.x*nt,Ot.y*et,Zt.x*nt,Zt.y*et));var te=Ut(Ht.x,Ht.y);xe(gt,xt-dt,gt+at,xt-dt,gt+dt,xt-at,gt+dt,xt,.56,kt,kt,Ht,Ot,Zt);var we=Ut(Ht.x,Ht.y);Wt.add(new go.PathSegment(go.PathSegment.Line,(te.x*.1+.95*.9)*nt,te.y*.1*et)),Wt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,te.y*.1*et)),Wt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,0)),Wt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),Wt.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),Wt.add(new go.PathSegment(go.PathSegment.Line,(we.x*.1+.9)*nt,.15*et)),Wt.add(new go.PathSegment(go.PathSegment.Line,(we.x*.1+.9)*nt,(we.y*.1+.05*.9)*et)),Wt.add(new go.PathSegment(go.PathSegment.Line,we.x*nt,we.y*et)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt)*nt,xt*et,Ot.x*nt,Ot.y*et,Zt.x*nt,Zt.y*et)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et,(gt+at)*nt,(xt+dt)*et)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(gt-dt)*nt,xt*et,(gt-at)*nt,(xt+dt)*et,(gt-dt)*nt,(xt+at)*et)),dt=.35,at=ie*.35;var pe=new go.PathFigure(gt*nt,(xt-dt)*et,!1);At.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,(gt-dt)*nt,xt*et,(gt-at)*nt,(xt-dt)*et,(gt-dt)*nt,(xt-at)*et)),pe.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+dt)*et,(gt-dt)*nt,(xt+at)*et,(gt-at)*nt,(xt+dt)*et)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt)*nt,xt*et,(gt+at)*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et)),pe.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt-dt)*et,(gt+dt)*nt,(xt-at)*et,(gt+at)*nt,(xt-dt)*et));var Ke=new go.PathFigure((gt-dt)*nt,xt*et,!1);return At.add(Ke),Xt(kt),Xt(Ht),Xt(Ot),Xt(Zt),Xt(te),Xt(we),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(It,nt,et){var At=new go.Geometry,at=.375,dt=0,gt=-.125,xt=at*ie,kt=new go.PathFigure((.525+dt)*nt,(.5+at+gt)*et,!1);At.add(kt),kt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+at+dt)*nt,(.5+gt)*et,(.5+xt+dt)*nt,(.5+at+gt)*et,(.5+at+dt)*nt,(.5+xt+gt)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+dt)*nt,(.5-at+gt)*et,(1-.5+at+dt)*nt,(.5-xt+gt)*et,(.5+xt+dt)*nt,(.5-at+gt)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-at+dt)*nt,(.5+gt)*et,(.5-xt+dt)*nt,(.5-at+gt)*et,(.5-at+dt)*nt,(.5-xt+gt)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,(.475+dt)*nt,(.5+at+gt)*et,(.5-at+dt)*nt,(.5+xt+gt)*et,(.5-xt+dt)*nt,(.5+at+gt)*et)),kt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,.85*et)),kt.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.85*et)),kt.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.9*et)),kt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,.9*et)),kt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,et)),kt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,et)),kt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.9*et)),kt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.9*et)),kt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.85*et)),kt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.85*et).close()),at=.325,dt=0,gt=-.125,xt=at*ie;var kt=new go.PathFigure((1-.5+at+dt)*nt,(.5+gt)*et,!1);At.add(kt),kt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+dt)*nt,(.5+at+gt)*et,(.5+at+dt)*nt,(.5+xt+gt)*et,(.5+xt+dt)*nt,(.5+at+gt)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-at+dt)*nt,(.5+gt)*et,(.5-xt+dt)*nt,(.5+at+gt)*et,(.5-at+dt)*nt,(.5+xt+gt)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+dt)*nt,(.5-at+gt)*et,(.5-at+dt)*nt,(.5-xt+gt)*et,(.5-xt+dt)*nt,(.5-at+gt)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+at+dt)*nt,(.5+gt)*et,(.5+xt+dt)*nt,(.5-at+gt)*et,(1-.5+at+dt)*nt,(.5-xt+gt)*et));var kt=new go.PathFigure((.525+dt)*nt,(.5+at+gt)*et,!1);return At.add(kt),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(It,nt,et){var At=It?It.parameter1:NaN;return isNaN(At)&&(At=.2),new go.Geometry().add(new go.PathFigure((1-At)*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(It,nt,et){var At=It?It.parameter1:NaN;return isNaN(At)&&(At=.2),new go.Geometry().add(new go.PathFigure((1-At)*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Move,At*nt,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,At*nt,et))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)))}),go.Shape.defineFigureGenerator("LogicAnd",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(It,nt,et){var At=new go.Geometry().add(new go.PathFigure(.5*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*nt,.5*et,.5*nt,.5*et)));return At.defaultStretch=go.GraphObject.Uniform,At}),go.Shape.defineFigureGenerator("LogicTruth",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Move,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et)))}),go.Shape.defineFigureGenerator("LogicForAll",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,.25*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Move,0,et)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(It,nt,et){var At=.5;return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,0,At*et)).add(new go.PathSegment(go.PathSegment.Arc,180,180,At*nt,At*et,At*nt,At*et)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(It,nt,et){var At=.5;return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,At*et)).add(new go.PathSegment(go.PathSegment.Arc,0,180,At*nt,At*et,At*nt,At*et)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new mn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new mn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.3);var at=It?It.parameter2:NaN;isNaN(at)&&(at=.3);var dt=(1-At)*nt,gt=(.5-at/2)*et,xt=(.5+at/2)*et,kt=new go.Geometry,Ht=new go.PathFigure(0,gt,!0);kt.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Line,dt,gt)),Ht.add(new go.PathSegment(go.PathSegment.Line,dt,0)),Ht.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),Ht.add(new go.PathSegment(go.PathSegment.Line,dt,et)),Ht.add(new go.PathSegment(go.PathSegment.Line,dt,xt)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,xt).close()),kt.spot1=new go.Spot(0,gt/et);var Ot=Ae(0,xt/et,1,xt/et,dt/nt,1,1,.5,St());return kt.spot2=new go.Spot(Ot.x,Ot.y),Xt(Ot),kt}),go.Shape.setFigureParameter("Arrow2",0,new mn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new mn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=30),At>nt&&(At=nt);var at=It?It.parameter2:NaN;isNaN(at)&&(at=30),at=Math.min(at,et/2);var dt=nt-At,gt=(et-at)/2,xt=gt+at,kt=new go.Geometry,Ht=new go.PathFigure(0,gt,!0);kt.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Line,dt,gt)),Ht.add(new go.PathSegment(go.PathSegment.Line,dt,0)),Ht.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),Ht.add(new go.PathSegment(go.PathSegment.Line,dt,et)),Ht.add(new go.PathSegment(go.PathSegment.Line,dt,xt)),Ht.add(new go.PathSegment(go.PathSegment.Line,0,xt).close()),kt.spot1=new go.Spot(0,gt/et);var Ot=Ae(0,xt/et,1,xt/et,dt/nt,1,1,.5,St());return kt.spot2=new go.Spot(Ot.x,Ot.y),Xt(Ot),kt}),go.Shape.defineFigureGenerator("Chevron",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et).close()),At}),go.Shape.defineFigureGenerator("DoubleArrow",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.214*et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,1*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,1*et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.786*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,1*et).close()),At}),go.Shape.setFigureParameter("DoubleEndArrow",0,new mn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.3);var at=(.5-At/2)*et,dt=(.5+At/2)*et,gt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);gt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,dt)),xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,dt)),xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,at)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,at)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close());var kt=Ae(0,.5,.3,0,0,at/et,.1,at/et,St());return gt.spot1=new go.Spot(kt.x,kt.y),kt=Ae(.7,1,1,.5,0,dt/et,1,dt/et,kt),gt.spot2=new go.Spot(kt.x,kt.y),Xt(kt),gt}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new mn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new mn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=40);var at=It?It.parameter2:NaN;isNaN(at)&&(at=100);var dt=(et-At)/2,gt=dt+At,xt=(et-at)/2,kt=xt+at;(At>et||at>et)&&(at>At?(At=At*et/at,dt=(et-At)/2,gt=dt+At,xt=0,kt=et):(dt=0,gt=et,xt=0,kt=et));var Ht=new go.Geometry,Ot=new go.PathFigure(nt,.5*et,!0);Ht.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,kt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.3*nt,gt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.3*nt,kt)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),Ot.add(new go.PathSegment(go.PathSegment.Line,.3*nt,xt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.3*nt,dt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,dt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,xt).close());var Zt=Ae(0,.5,.3,xt/et,0,dt/et,1,dt/et,St());return Ht.spot1=new go.Spot(Zt.x,Zt.y),Zt=Ae(.7,kt/et,1,.5,0,gt/et,1,gt/et,Zt),Ht.spot2=new go.Spot(Zt.x,Zt.y),Xt(Zt),Ht}),go.Shape.setFigureParameter("IBeamArrow",0,new mn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.3);var at=(.5-At/2)*et,dt=(.5+At/2)*et,gt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);gt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,dt)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,dt)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,0)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,at)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,at)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),gt.spot1=new go.Spot(0,at/et);var kt=Ae(.7,1,1,.5,0,dt/et,1,dt/et,St());return gt.spot2=new go.Spot(kt.x,kt.y),Xt(kt),gt}),go.Shape.setFigureParameter("IBeamArrow2",0,new mn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new mn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=40);var at=It?It.parameter2:NaN;isNaN(at)&&(at=100);var dt=(et-At)/2,gt=dt+At,xt=(et-at)/2,kt=xt+at;(At>et||at>et)&&(at>At?(At=At*et/at,dt=(et-At)/2,gt=dt+At,xt=0,kt=et):(dt=0,gt=et,xt=0,kt=et));var Ht=new go.Geometry,Ot=new go.PathFigure(nt,.5*et,!0);Ht.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,kt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.2*nt,gt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.2*nt,kt)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,kt)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,xt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.2*nt,xt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.2*nt,dt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,dt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,xt).close()),Ht.spot1=new go.Spot(0,dt/et);var Zt=Ae(.7,kt/et,1,.5,0,gt/et,1,gt/et,St());return Ht.spot2=new go.Spot(Zt.x,Zt.y),Xt(Zt),Ht}),go.Shape.setFigureParameter("Pointer",0,new mn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.1);var at=new go.Geometry,dt=new go.PathFigure(nt,.5*et,!0);at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,0,et)),dt.add(new go.PathSegment(go.PathSegment.Line,At*nt,.5*et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),at.spot1=new go.Spot(At,.35);var gt=Ae(.2,.65,1,.65,0,1,1,.5,St());return at.spot2=new go.Spot(gt.x,gt.y),Xt(gt),at}),go.Shape.setFigureParameter("RoundedPointer",0,new mn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.3);var at=new go.Geometry,dt=new go.PathFigure(nt,.5*et,!0);at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,0,et)),dt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,At*nt,.75*et,At*nt,.25*et).close()),at.spot1=new go.Spot(At,.35);var gt=Ae(0,.65,1,.65,0,1,1,.5,St());return at.spot2=new go.Spot(gt.x,gt.y),Xt(gt),at}),go.Shape.setFigureParameter("SplitEndArrow",0,new mn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.4);var at=(.5-At/2)*et,dt=(.5+At/2)*et,gt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);gt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,dt)),xt.add(new go.PathSegment(go.PathSegment.Line,0,dt)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,at)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,at)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),gt.spot1=new go.Spot(.2,.3);var kt=Ae(.7,1,1,.5,0,dt/et,1,dt/et,St());return gt.spot2=new go.Spot(kt.x,kt.y),Xt(kt),gt}),go.Shape.setFigureParameter("SplitEndArrow2",0,new mn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=50);var at=(et-At)/2,dt=at+At;At>et&&(at=0,dt=et);var gt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);gt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,dt)),xt.add(new go.PathSegment(go.PathSegment.Line,0,dt)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,at)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,at)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),gt.spot1=new go.Spot(.2,at/et);var kt=Ae(.7,1,1,.5,0,dt/et,1,dt/et,St());return gt.spot2=new go.Spot(kt.x,kt.y),Xt(kt),gt}),go.Shape.setFigureParameter("SquareArrow",0,new mn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.7);var at=new go.Geometry,dt=new go.PathFigure(nt,.5*et,!0);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,At*nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,0)),dt.add(new go.PathSegment(go.PathSegment.Line,At*nt,0).close()),at.spot1=go.Spot.TopLeft,at.spot2=new go.Spot(At,1),at}),go.Shape.defineFigureGenerator("Cone1",function(It,nt,et){var At=new go.Geometry,at=ie*.5,dt=ie*.1,gt=new go.PathFigure(0,.9*et,!0);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+dt)*et,(.5+at)*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-at)*nt,et,0,(.9+dt)*et).close()),At.spot1=new go.Spot(.25,.5),At.spot2=new go.Spot(.75,.97),At}),go.Shape.defineFigureGenerator("Cone2",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.9*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.9*et,(1-.85/.9)*nt,et,.85/.9*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,.9*et).close());var dt=new go.PathFigure(0,.9*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.9*et,(1-.85/.9)*nt,.8*et,.85/.9*nt,.8*et)),At.spot1=new go.Spot(.25,.5),At.spot2=new go.Spot(.75,.82),At}),go.Shape.defineFigureGenerator("Cube1",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,.15*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.85*et).close());var dt=new go.PathFigure(.5*nt,et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.3*et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,.15*et)),dt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.3*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),At.spot1=new go.Spot(0,.3),At.spot2=new go.Spot(.5,.85),At}),go.Shape.defineFigureGenerator("Cube2",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.3*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0).close());var dt=new go.PathFigure(0,.3*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.3*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),dt.add(new go.PathSegment(go.PathSegment.Move,.7*nt,.3*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),At.spot1=new go.Spot(0,.3),At.spot2=new go.Spot(.7,1),At}),go.Shape.defineFigureGenerator("Cylinder1",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=5),At=Math.min(At,et/3);var at=new go.Geometry,dt=ie*.5,gt=new go.PathFigure(0,At,!0);at.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,ie*At,(.5-dt)*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,1*nt,At,(.5+dt)*nt,0,1*nt,ie*At)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et-At)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,1*et,1*nt,et-ie*At,(.5+dt)*nt,1*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-At,(.5-dt)*nt,1*et,0,et-ie*At)),gt.add(new go.PathSegment(go.PathSegment.Line,0,At));var xt=new go.PathFigure(nt,At,!1);return at.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,2*At,1*nt,2*At-ie*At,(.5+dt)*nt,2*At)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,At,(.5-dt)*nt,2*At,0,2*At-ie*At)),at.spot1=new go.Spot(0,0,0,2*At),at.spot2=new go.Spot(1,1),at}),go.Shape.defineFigureGenerator("Cylinder2",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=5),At=Math.min(At,et/3);var at=new go.Geometry,dt=ie*.5,gt=new go.PathFigure(0,et-At,!0);at.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,At)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,ie*At,(.5-dt)*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,At,(.5+dt)*nt,0,nt,ie*At)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et-At)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,et-ie*At,(.5+dt)*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-At,(.5-dt)*nt,et,0,et-ie*At));var xt=new go.PathFigure(0,et-At,!1);return at.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et-2*At,0,et-At-ie*At,(.5-dt)*nt,et-2*At)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt,et-At,(.5+dt)*nt,et-2*At,nt,et-At-ie*At)),at.spot1=new go.Spot(0,0),at.spot2=new go.Spot(1,1,0,-2*At),at}),go.Shape.defineFigureGenerator("Cylinder3",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=5),At=Math.min(At,nt/3);var at=new go.Geometry,dt=ie*.5,gt=new go.PathFigure(At,0,!0);at.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt-At,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,nt-ie*At,0,nt,(.5-dt)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt-At,et,nt,(.5+dt)*et,nt-ie*At,et)),gt.add(new go.PathSegment(go.PathSegment.Line,At,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,ie*At,et,0,(.5+dt)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,At,0,0,(.5-dt)*et,ie*At,0));var xt=new go.PathFigure(At,0,!1);return at.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,2*At,.5*et,At+ie*At,0,2*At,(.5-dt)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,At,et,2*At,(.5+dt)*et,At+ie*At,et)),at.spot1=new go.Spot(0,0,2*At,0),at.spot2=new go.Spot(1,1),at}),go.Shape.defineFigureGenerator("Cylinder4",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=5),At=Math.min(At,nt/3);var at=new go.Geometry,dt=ie*.5,gt=new go.PathFigure(nt-At,0,!0);at.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,nt-ie*At,0,nt,(.5-dt)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt-At,et,nt,(.5+dt)*et,nt-ie*At,et)),gt.add(new go.PathSegment(go.PathSegment.Line,At,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,ie*At,et,0,(.5+dt)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,At,0,0,(.5-dt)*et,ie*At,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt-At,0));var xt=new go.PathFigure(nt-At,0,!1);return at.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt-2*At,.5*et,nt-At-ie*At,0,nt-2*At,(.5-dt)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt-At,et,nt-2*At,(.5+dt)*et,nt-At-ie*At,et)),at.spot1=new go.Spot(0,0),at.spot2=new go.Spot(1,1,-2*At,0),at}),go.Shape.defineFigureGenerator("Prism1",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.25*nt,.25*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var dt=new go.PathFigure(.25*nt,.25*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),At.spot1=new go.Spot(.408,.172),At.spot2=new go.Spot(.833,.662),At}),go.Shape.defineFigureGenerator("Prism2",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.25*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var dt=new go.PathFigure(0,et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),dt.add(new go.PathSegment(go.PathSegment.Move,0,.25*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)),At.spot1=new go.Spot(.25,.5),At.spot2=new go.Spot(.75,.75),At}),go.Shape.defineFigureGenerator("Pyramid1",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.75*et).close());var dt=new go.PathFigure(.5*nt,0,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),At.spot1=new go.Spot(.25,.367),At.spot2=new go.Spot(.75,.875),At}),go.Shape.defineFigureGenerator("Pyramid2",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.85*et).close());var dt=new go.PathFigure(.5*nt,0,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.7*et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,.85*et)),dt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.7*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),At.spot1=new go.Spot(.25,.367),At.spot2=new go.Spot(.75,.875),At}),go.Shape.defineFigureGenerator("Actor",function(It,nt,et){var At=new go.Geometry,at=.2,dt=.1,gt=ie*at,xt=ie*dt,kt=.5,Ht=.1,Ot=new go.PathFigure(kt*nt,(Ht+dt)*et,!0);At.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(kt-at)*nt,Ht*et,(kt-gt)*nt,(Ht+dt)*et,(kt-at)*nt,(Ht+xt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,kt*nt,(Ht-dt)*et,(kt-at)*nt,(Ht-xt)*et,(kt-gt)*nt,(Ht-dt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(kt+at)*nt,Ht*et,(kt+gt)*nt,(Ht-dt)*et,(kt+at)*nt,(Ht-xt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,kt*nt,(Ht+dt)*et,(kt+at)*nt,(Ht+xt)*et,(kt+gt)*nt,(Ht+dt)*et));var Zt=.05,Wt=ie*Zt;kt=.05,Ht=.25;var te=new go.PathFigure(.5*nt,.2*et,!0);return At.add(te),te.add(new go.PathSegment(go.PathSegment.Line,.95*nt,.2*et)),kt=.95,Ht=.25,te.add(new go.PathSegment(go.PathSegment.Bezier,(kt+Zt)*nt,Ht*et,(kt+Wt)*nt,(Ht-Zt)*et,(kt+Zt)*nt,(Ht-Wt)*et)),te.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),te.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),te.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.35*et)),Zt=.025,Wt=ie*Zt,kt=.825,Ht=.35,te.add(new go.PathSegment(go.PathSegment.Bezier,kt*nt,(Ht-Zt)*et,(kt+Zt)*nt,(Ht-Wt)*et,(kt+Wt)*nt,(Ht-Zt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(kt-Zt)*nt,Ht*et,(kt-Wt)*nt,(Ht-Zt)*et,(kt-Zt)*nt,(Ht-Wt)*et)),te.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),te.add(new go.PathSegment(go.PathSegment.Line,.55*nt,et)),te.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.7*et)),Zt=.05,Wt=ie*Zt,kt=.5,Ht=.7,te.add(new go.PathSegment(go.PathSegment.Bezier,kt*nt,(Ht-Zt)*et,(kt+Zt)*nt,(Ht-Wt)*et,(kt+Wt)*nt,(Ht-Zt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(kt-Zt)*nt,Ht*et,(kt-Wt)*nt,(Ht-Zt)*et,(kt-Zt)*nt,(Ht-Wt)*et)),te.add(new go.PathSegment(go.PathSegment.Line,.45*nt,et)),te.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),te.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.35*et)),Zt=.025,Wt=ie*Zt,kt=.175,Ht=.35,te.add(new go.PathSegment(go.PathSegment.Bezier,kt*nt,(Ht-Zt)*et,(kt+Zt)*nt,(Ht-Wt)*et,(kt+Wt)*nt,(Ht-Zt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(kt-Zt)*nt,Ht*et,(kt-Wt)*nt,(Ht-Zt)*et,(kt-Zt)*nt,(Ht-Wt)*et)),te.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et)),te.add(new go.PathSegment(go.PathSegment.Line,0,.6*et)),te.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),Zt=.05,Wt=ie*Zt,kt=.05,Ht=.25,te.add(new go.PathSegment(go.PathSegment.Bezier,kt*nt,(Ht-Zt)*et,(kt-Zt)*nt,(Ht-Wt)*et,(kt-Wt)*nt,(Ht-Zt)*et)),te.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.2*et)),At.spot1=new go.Spot(.2,.2),At.spot2=new go.Spot(.8,.65),At}),go.Shape.setFigureParameter("Card",0,new mn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.2);var at=new go.Geometry,dt=new go.PathFigure(nt,0,!0);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,At*et)),dt.add(new go.PathSegment(go.PathSegment.Line,At*nt,0).close()),at.spot1=new go.Spot(0,At),at.spot2=go.Spot.BottomRight,at}),go.Shape.defineFigureGenerator("Collate",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,.5*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et));var dt=new go.PathFigure(.5*nt,.5*et,!0);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et)),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),At.spot1=new go.Spot(.25,0),At.spot2=new go.Spot(.75,.25),At}),go.Shape.defineFigureGenerator("CreateRequest",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;isNaN(at)&&(at=.1);var dt=new go.PathFigure(0,0,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var gt=new go.PathFigure(0,at*et,!1);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,at*et)),gt.add(new go.PathSegment(go.PathSegment.Move,0,(1-at)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,(1-at)*et)),At}),go.Shape.defineFigureGenerator("Database",function(It,nt,et){var At=new go.Geometry,at=ie*.5,dt=ie*.1,gt=new go.PathFigure(nt,.1*et,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+dt)*et,(.5+at)*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-at)*nt,et,0,(.9+dt)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,(.1-dt)*et,(.5-at)*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,(.5+at)*nt,0,nt,(.1-dt)*et));var xt=new go.PathFigure(nt,.1*et,!1);return At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,nt,(.1+dt)*et,(.5+at)*nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*et,(.5-at)*nt,.2*et,0,(.1+dt)*et)),xt.add(new go.PathSegment(go.PathSegment.Move,nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,nt,(.2+dt)*et,(.5+at)*nt,.3*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*et,(.5-at)*nt,.3*et,0,(.2+dt)*et)),xt.add(new go.PathSegment(go.PathSegment.Move,nt,.3*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.4*et,nt,(.3+dt)*et,(.5+at)*nt,.4*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*et,(.5-at)*nt,.4*et,0,(.3+dt)*et)),At.spot1=new go.Spot(0,.4),At.spot2=new go.Spot(1,.9),At}),go.Shape.defineFigureGenerator("DataStorage",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,nt,0,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.9*et,.25*nt,.1*et).close()),At.spot1=new go.Spot(.226,0),At.spot2=new go.Spot(.81,1),At}),go.Shape.defineFigureGenerator("DiskStorage",function(It,nt,et){var At=new go.Geometry,at=ie*.5,dt=ie*.1,gt=new go.PathFigure(nt,.1*et,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+dt)*et,(.5+at)*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-at)*nt,et,0,(.9+dt)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,(.1-dt)*et,(.5-at)*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,(.5+at)*nt,0,nt,(.1-dt)*et));var xt=new go.PathFigure(nt,.1*et,!1);return At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,nt,(.1+dt)*et,(.5+at)*nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*et,(.5-at)*nt,.2*et,0,(.1+dt)*et)),xt.add(new go.PathSegment(go.PathSegment.Move,nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,nt,(.2+dt)*et,(.5+at)*nt,.3*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*et,(.5-at)*nt,.3*et,0,(.2+dt)*et)),At.spot1=new go.Spot(0,.3),At.spot2=new go.Spot(1,.9),At}),go.Shape.defineFigureGenerator("Display",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.25*nt,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,nt,0,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close()),At.spot1=new go.Spot(.25,0),At.spot2=new go.Spot(.75,1),At}),go.Shape.defineFigureGenerator("DividedEvent",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;isNaN(at)?at=.2:at<.15&&(at=.15);var dt=ie*.2,gt=new go.PathFigure(0,.2*et,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,0,(.2-dt)*et,(.2-dt)*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.2*et,(.8+dt)*nt,0,nt,(.2-dt)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,et,nt,(.8+dt)*et,(.8+dt)*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*et,(.2-dt)*nt,et,0,(.8+dt)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et));var xt=new go.PathFigure(0,at*et,!1);return At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt,at*et)),At}),go.Shape.defineFigureGenerator("DividedProcess",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;(isNaN(at)||at<.1)&&(at=.1);var dt=new go.PathFigure(0,0,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var gt=new go.PathFigure(0,at*et,!1);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,at*et)),At}),go.Shape.defineFigureGenerator("Document",function(It,nt,et){var At=new go.Geometry;et=et/.8;var at=new go.PathFigure(0,.7*et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close()),At.spot1=go.Spot.TopLeft,At.spot2=new go.Spot(1,.6),At}),go.Shape.defineFigureGenerator("ExternalOrganization",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;(isNaN(at)||at<.2)&&(at=.2);var dt=new go.PathFigure(0,0,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var gt=new go.PathFigure(at*nt,0,!1);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,at*et)),gt.add(new go.PathSegment(go.PathSegment.Move,nt,at*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-at)*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Move,0,(1-at)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Move,(1-at)*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,(1-at)*et)),At}),go.Shape.defineFigureGenerator("ExternalProcess",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close());var dt=new go.PathFigure(.1*nt,.4*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.6*et)),dt.add(new go.PathSegment(go.PathSegment.Move,.9*nt,.6*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),dt.add(new go.PathSegment(go.PathSegment.Move,.6*nt,.1*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.1*et)),dt.add(new go.PathSegment(go.PathSegment.Move,.4*nt,.9*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.9*et)),At.spot1=new go.Spot(.25,.25),At.spot2=new go.Spot(.75,.75),At}),go.Shape.defineFigureGenerator("File",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var dt=new go.PathFigure(.75*nt,0,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.25*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),At.spot1=new go.Spot(0,.25),At.spot2=go.Spot.BottomRight,At}),go.Shape.defineFigureGenerator("Interrupt",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt,.5*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et));var dt=new go.PathFigure(nt,.5*et,!1);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et));var gt=new go.PathFigure(nt,.5*et,!1);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),At.spot1=new go.Spot(0,.25),At.spot2=new go.Spot(.5,.75),At}),go.Shape.defineFigureGenerator("InternalStorage",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN,dt=It?It.parameter2:NaN;isNaN(at)&&(at=.1),isNaN(dt)&&(dt=.1);var gt=new go.PathFigure(0,0,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var xt=new go.PathFigure(at*nt,0,!1);return At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Move,0,dt*et)),xt.add(new go.PathSegment(go.PathSegment.Line,nt,dt*et)),At}),go.Shape.defineFigureGenerator("Junction",function(It,nt,et){var At=new go.Geometry,at=1/Math.SQRT2,dt=(1-1/Math.SQRT2)/2,gt=ie*.5,xt=.5,kt=new go.PathFigure(nt,xt*et,!0);At.add(kt),kt.add(new go.PathSegment(go.PathSegment.Bezier,xt*nt,et,nt,(xt+gt)*et,(xt+gt)*nt,et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,0,xt*et,(xt-gt)*nt,et,0,(xt+gt)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,xt*nt,0,0,(xt-gt)*et,(xt-gt)*nt,0)),kt.add(new go.PathSegment(go.PathSegment.Bezier,nt,xt*et,(xt+gt)*nt,0,nt,(xt-gt)*et));var Ht=new go.PathFigure((dt+at)*nt,(dt+at)*et,!1);return At.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Line,dt*nt,dt*et)),Ht.add(new go.PathSegment(go.PathSegment.Move,dt*nt,(dt+at)*et)),Ht.add(new go.PathSegment(go.PathSegment.Line,(dt+at)*nt,dt*et)),At}),go.Shape.defineFigureGenerator("LinedDocument",function(It,nt,et){var At=new go.Geometry;et=et/.8;var at=new go.PathFigure(0,.7*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close());var dt=new go.PathFigure(.1*nt,0,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.75*et)),At.spot1=new go.Spot(.1,0),At.spot2=new go.Spot(1,.6),At}),go.Shape.defineFigureGenerator("LoopLimit",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),At.spot1=new go.Spot(0,.25),At.spot2=go.Spot.BottomRight,At}),go.Shape.defineFigureGenerator("MagneticTape",function(It,nt,et){var At=new go.Geometry,at=ie*.5,dt=.5,gt=new go.PathFigure(.5*nt,et,!0);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,dt*et,(dt-at)*nt,et,0,(dt+at)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,dt*nt,0,0,(dt-at)*et,(dt-at)*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,dt*et,(dt+at)*nt,0,nt,(dt-at)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(dt+.1)*nt,.9*et,nt,(dt+at)*et,(dt+at)*nt,.9*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),At.spot1=new go.Spot(.15,.15),At.spot2=new go.Spot(.85,.8),At}),go.Shape.defineFigureGenerator("ManualInput",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.25*et).close()),At.spot1=new go.Spot(0,.25),At.spot2=go.Spot.BottomRight,At}),go.Shape.defineFigureGenerator("MessageFromUser",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;isNaN(at)&&(at=.7);var dt=new go.PathFigure(0,0,!0);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,at*nt,.5*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At.spot1=go.Spot.TopLeft,At}),go.Shape.defineFigureGenerator("MicroformProcessing",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;isNaN(at)&&(at=.25);var dt=new go.PathFigure(0,0,!0);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,at*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,(1-at)*et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At}),go.Shape.defineFigureGenerator("MicroformRecording",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At.spot1=new go.Spot(0,.25),At.spot2=new go.Spot(1,.75),At}),go.Shape.defineFigureGenerator("MultiDocument",function(It,nt,et){var At=new go.Geometry;et=et/.8;var at=new go.PathFigure(nt,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.44*et,.96*nt,.47*et,.93*nt,.45*et)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.54*et,.86*nt,.57*et,.83*nt,.55*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.4*nt,.4*et,.4*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0).close());var dt=new go.PathFigure(.1*nt,.2*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.54*et)),dt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.1*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.1*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.44*et)),At.spot1=new go.Spot(0,.25),At.spot2=new go.Spot(.8,.77),At}),go.Shape.defineFigureGenerator("MultiProcess",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.1*nt,.1*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et).close());var dt=new go.PathFigure(.2*nt,.1*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.1*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),dt.add(new go.PathSegment(go.PathSegment.Move,.1*nt,.2*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.9*et)),At.spot1=new go.Spot(0,.2),At.spot2=new go.Spot(.8,1),At}),go.Shape.defineFigureGenerator("OfflineStorage",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;isNaN(at)&&(at=.1);var dt=1-at,gt=new go.PathFigure(0,0,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close());var xt=new go.PathFigure(.5*at*nt,at*et,!1);return At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,(1-.5*at)*nt,at*et)),At}),go.Shape.defineFigureGenerator("OffPageConnector",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At.spot1=go.Spot.TopLeft,At.spot2=new go.Spot(.75,1),At}),go.Shape.defineFigureGenerator("Or",function(It,nt,et){var At=new go.Geometry,at=ie*.5,dt=.5,gt=new go.PathFigure(nt,dt*et,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,dt*nt,et,nt,(dt+at)*et,(dt+at)*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,dt*et,(dt-at)*nt,et,0,(dt+at)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,dt*nt,0,0,(dt-at)*et,(dt-at)*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,dt*et,(dt+at)*nt,0,nt,(dt-at)*et));var xt=new go.PathFigure(nt,.5*et,!1);return At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),At}),go.Shape.defineFigureGenerator("PaperTape",function(It,nt,et){var At=new go.Geometry;et=et/.8;var at=new go.PathFigure(0,.7*et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.3*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.3*et,.5*nt,.6*et,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close()),At.spot1=new go.Spot(0,.49),At.spot2=new go.Spot(1,.75),At}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN,dt=It?It.parameter2:NaN;isNaN(at)&&(at=.1),isNaN(dt)&&(dt=.3);var gt=new go.PathFigure(0,0,!0);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-dt)*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN,dt=It?It.parameter2:NaN;isNaN(at)&&(at=.1),isNaN(dt)&&(dt=.3);var gt=new go.PathFigure(0,0,!0);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,(1-dt)*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-dt)*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At}),go.Shape.defineFigureGenerator("Procedure",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;isNaN(at)&&(at=.1);var dt=new go.PathFigure(0,0,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var gt=new go.PathFigure((1-at)*nt,0,!1);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,(1-at)*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Move,at*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),At}),go.Shape.defineFigureGenerator("Process",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;isNaN(at)&&(at=.1);var dt=new go.PathFigure(0,0,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var gt=new go.PathFigure(at*nt,0,!1);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),At.spot2=go.Spot.BottomRight,At}),go.Shape.defineFigureGenerator("Sort",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close());var dt=new go.PathFigure(0,.5*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),At.spot1=new go.Spot(.25,.25),At.spot2=new go.Spot(.75,.5),At}),go.Shape.defineFigureGenerator("Start",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;isNaN(at)&&(at=.25);var dt=new go.PathFigure(at*nt,0,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*nt,.5*et,.25*nt,.5*et)),dt.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*nt,.5*et,.25*nt,.5*et));var gt=new go.PathFigure(at*nt,0,!1);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Move,(1-at)*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-at)*nt,et)),At.spot1=new go.Spot(at,0),At.spot2=new go.Spot(1-at,1),At}),go.Shape.defineFigureGenerator("Terminator",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.25*nt,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*nt,.5*et,.25*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*nt,.5*et,.25*nt,.5*et)),At.spot1=new go.Spot(.23,0),At.spot2=new go.Spot(.77,1),At}),go.Shape.defineFigureGenerator("TransmittalTape",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;isNaN(at)&&(at=.1);var dt=new go.PathFigure(0,0,!0);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,(1-at)*et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,(1-at)*et).close()),At.spot1=go.Spot.TopLeft,At}),go.Shape.defineFigureGenerator("AndGate",function(It,nt,et){var At=new go.Geometry,at=ie*.5,dt=new go.PathFigure(0,0,!0);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),dt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(.5+at)*nt,0,nt,(.5-at)*et)),dt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.5+at)*et,(.5+at)*nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At.spot1=go.Spot.TopLeft,At.spot2=new go.Spot(.55,1),At}),go.Shape.defineFigureGenerator("Buffer",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At.spot1=new go.Spot(0,.25),At.spot2=new go.Spot(.5,.75),At}),go.Shape.defineFigureGenerator("Clock",function(It,nt,et){var At=new go.Geometry,at=ie*.5,dt=.5,gt=new go.PathFigure(nt,dt*et,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,dt*nt,et,nt,(dt+at)*et,(dt+at)*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,dt*et,(dt-at)*nt,et,0,(dt+at)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,dt*nt,0,0,(dt-at)*et,(dt-at)*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,dt*et,(dt+at)*nt,0,nt,(dt-at)*et));var xt=new go.PathFigure(nt,dt*et,!1);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt,dt*et));var kt=new go.PathFigure(.8*nt,.75*et,!1);return At.add(kt),kt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.25*et)),kt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.25*et)),kt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.75*et)),kt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.75*et)),kt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.25*et)),kt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.25*et)),kt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.75*et)),At}),go.Shape.defineFigureGenerator("Ground",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Move,.3*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Move,.4*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et)),At}),go.Shape.defineFigureGenerator("Inverter",function(It,nt,et){var At=new go.Geometry,at=ie*.1,dt=.1,gt=.9,xt=.5,kt=new go.PathFigure(.8*nt,.5*et,!0);At.add(kt),kt.add(new go.PathSegment(go.PathSegment.Line,0,et)),kt.add(new go.PathSegment(go.PathSegment.Line,0,0)),kt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et));var Ht=new go.PathFigure((gt+dt)*nt,xt*et,!0);return At.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et,(gt+at)*nt,(xt+dt)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(gt-dt)*nt,xt*et,(gt-at)*nt,(xt+dt)*et,(gt-dt)*nt,(xt+at)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt-dt)*et,(gt-dt)*nt,(xt-at)*et,(gt-at)*nt,(xt-dt)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt)*nt,xt*et,(gt+at)*nt,(xt-dt)*et,(gt+dt)*nt,(xt-at)*et)),At.spot1=new go.Spot(0,.25),At.spot2=new go.Spot(.4,.75),At}),go.Shape.defineFigureGenerator("NandGate",function(It,nt,et){var At=new go.Geometry,at=ie*.5,dt=ie*.4,gt=ie*.1,xt=.1,kt=.9,Ht=.5,Ot=new go.PathFigure(.8*nt,.5*et,!0);At.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,et,.8*nt,(.5+dt)*et,(.4+at)*nt,et)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,et)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ot.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(.4+at)*nt,0,.8*nt,(.5-dt)*et));var Zt=new go.PathFigure((kt+xt)*nt,Ht*et,!0);return At.add(Zt),Zt.add(new go.PathSegment(go.PathSegment.Bezier,kt*nt,(Ht+xt)*et,(kt+xt)*nt,(Ht+gt)*et,(kt+gt)*nt,(Ht+xt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(kt-xt)*nt,Ht*et,(kt-gt)*nt,(Ht+xt)*et,(kt-xt)*nt,(Ht+gt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,kt*nt,(Ht-xt)*et,(kt-xt)*nt,(Ht-gt)*et,(kt-gt)*nt,(Ht-xt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(kt+xt)*nt,Ht*et,(kt+gt)*nt,(Ht-xt)*et,(kt+xt)*nt,(Ht-gt)*et)),At.spot1=new go.Spot(0,.05),At.spot2=new go.Spot(.55,.95),At}),go.Shape.defineFigureGenerator("NorGate",function(It,nt,et){var At=new go.Geometry,at=.5,dt=ie*at,gt=0,xt=.5,kt=new go.PathFigure(.8*nt,.5*et,!0);At.add(kt),kt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.7*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.75*et,.25*nt,.25*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(gt+dt)*nt,(xt-at)*et,.7*nt,(xt-dt)*et)),at=.1,dt=ie*.1,gt=.9,xt=.5;var Ht=new go.PathFigure((gt-at)*nt,xt*et,!0);return At.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt-at)*et,(gt-at)*nt,(xt-dt)*et,(gt-dt)*nt,(xt-at)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(gt+at)*nt,xt*et,(gt+dt)*nt,(xt-at)*et,(gt+at)*nt,(xt-dt)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+at)*et,(gt+at)*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(gt-at)*nt,xt*et,(gt-dt)*nt,(xt+at)*et,(gt-at)*nt,(xt+dt)*et)),At.spot1=new go.Spot(.2,.25),At.spot2=new go.Spot(.6,.75),At}),go.Shape.defineFigureGenerator("OrGate",function(It,nt,et){var At=new go.Geometry,at=.5,dt=ie*at,gt=0,xt=.5,kt=new go.PathFigure(0,0,!0);return At.add(kt),kt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(gt+dt+dt)*nt,(xt-at)*et,.8*nt,(xt-dt)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.8*nt,(xt+dt)*et,(gt+dt+dt)*nt,(xt+at)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.75*et,.25*nt,.25*et).close()),At.spot1=new go.Spot(.2,.25),At.spot2=new go.Spot(.75,.75),At}),go.Shape.defineFigureGenerator("XnorGate",function(It,nt,et){var At=new go.Geometry,at=.5,dt=ie*at,gt=.2,xt=.5,kt=new go.PathFigure(.1*nt,0,!1);At.add(kt),kt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,et,.35*nt,.25*et,.35*nt,.75*et));var Ht=new go.PathFigure(.8*nt,.5*et,!0);At.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,et,.7*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,.45*nt,.75*et,.45*nt,.25*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(gt+dt)*nt,(xt-at)*et,.7*nt,(xt-dt)*et)),at=.1,dt=ie*.1,gt=.9,xt=.5;var Ot=new go.PathFigure((gt-at)*nt,xt*et,!0);return At.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt-at)*et,(gt-at)*nt,(xt-dt)*et,(gt-dt)*nt,(xt-at)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(gt+at)*nt,xt*et,(gt+dt)*nt,(xt-at)*et,(gt+at)*nt,(xt-dt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+at)*et,(gt+at)*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(gt-at)*nt,xt*et,(gt-dt)*nt,(xt+at)*et,(gt-at)*nt,(xt+dt)*et)),At.spot1=new go.Spot(.4,.25),At.spot2=new go.Spot(.65,.75),At}),go.Shape.defineFigureGenerator("XorGate",function(It,nt,et){var At=new go.Geometry,at=.5,dt=ie*at,gt=.2,xt=.5,kt=new go.PathFigure(.1*nt,0,!1);At.add(kt),kt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,et,.35*nt,.25*et,.35*nt,.75*et));var Ht=new go.PathFigure(.2*nt,0,!0);return At.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(gt+dt)*nt,(xt-at)*et,.9*nt,(xt-dt)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,et,.9*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,.45*nt,.75*et,.45*nt,.25*et).close()),At.spot1=new go.Spot(.4,.25),At.spot2=new go.Spot(.8,.75),At}),go.Shape.defineFigureGenerator("Capacitor",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Move,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),At}),go.Shape.defineFigureGenerator("Resistor",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.5*et,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.5*et)),At}),go.Shape.defineFigureGenerator("Inductor",function(It,nt,et){var At=new go.Geometry,at=ie*.1,dt=.1,gt=.1,xt=.5,kt=new go.PathFigure((gt-at*.5)*nt,et,!1);return At.add(kt),kt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt)*nt,0,(gt-at)*nt,et,(gt-dt)*nt,0)),gt=.3,kt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,et,(gt+dt)*nt,0,(gt+at)*nt,et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt)*nt,0,(gt-at)*nt,et,(gt-dt)*nt,0)),gt=.5,kt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,et,(gt+dt)*nt,0,(gt+at)*nt,et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt)*nt,0,(gt-at)*nt,et,(gt-dt)*nt,0)),gt=.7,kt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,et,(gt+dt)*nt,0,(gt+at)*nt,et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt)*nt,0,(gt-at)*nt,et,(gt-dt)*nt,0)),gt=.9,kt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+at*.5)*nt,et,(gt+dt)*nt,0,(gt+at)*nt,et)),At}),go.Shape.defineFigureGenerator("ACvoltageSource",function(It,nt,et){var At=new go.Geometry,at=ie*.5,dt=.5,gt=.5,xt=.5,kt=new go.PathFigure((gt-dt)*nt,xt*et,!1);return At.add(kt),kt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt-dt)*et,(gt-dt)*nt,(xt-at)*et,(gt-at)*nt,(xt-dt)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt)*nt,xt*et,(gt+at)*nt,(xt-dt)*et,(gt+dt)*nt,(xt-at)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et,(gt+at)*nt,(xt+dt)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,(gt-dt)*nt,xt*et,(gt-at)*nt,(xt+dt)*et,(gt-dt)*nt,(xt+at)*et)),kt.add(new go.PathSegment(go.PathSegment.Move,(gt-dt+.1)*nt,xt*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt-.1)*nt,xt*et,gt*nt,(xt-dt)*et,gt*nt,(xt+dt)*et)),At}),go.Shape.defineFigureGenerator("DCvoltageSource",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.75*et,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),at.add(new go.PathSegment(go.PathSegment.Move,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),At}),go.Shape.defineFigureGenerator("Diode",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt,0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),At.spot1=new go.Spot(0,.25),At.spot2=new go.Spot(.5,.75),At}),go.Shape.defineFigureGenerator("Wifi",function(It,nt,et){var At=new go.Geometry,at=nt,dt=et;nt=nt*.38,et=et*.6;var gt=ie*.8,xt=.8,kt=0,Ht=.5,Ot=(at-nt)/2,Zt=(dt-et)/2,Wt=new go.PathFigure(kt*nt+Ot,(Ht+xt)*et+Zt,!0);At.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(kt-xt)*nt+Ot,Ht*et+Zt,(kt-gt)*nt+Ot,(Ht+xt)*et+Zt,(kt-xt)*nt+Ot,(Ht+gt)*et+Zt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,kt*nt+Ot,(Ht-xt)*et+Zt,(kt-xt)*nt+Ot,(Ht-gt)*et+Zt,(kt-gt)*nt+Ot,(Ht-xt)*et+Zt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(kt-xt+gt*.5)*nt+Ot,Ht*et+Zt,kt*nt+Ot,(Ht-xt)*et+Zt,(kt-xt+gt*.5)*nt+Ot,(Ht-gt)*et+Zt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,kt*nt+Ot,(Ht+xt)*et+Zt,(kt-xt+gt*.5)*nt+Ot,(Ht+gt)*et+Zt,kt*nt+Ot,(Ht+xt)*et+Zt).close()),gt=ie*.4,xt=.4,kt=.2,Ht=.5;var te=new go.PathFigure(kt*nt+Ot,(Ht+xt)*et+Zt,!0);At.add(te),te.add(new go.PathSegment(go.PathSegment.Bezier,(kt-xt)*nt+Ot,Ht*et+Zt,(kt-gt)*nt+Ot,(Ht+xt)*et+Zt,(kt-xt)*nt+Ot,(Ht+gt)*et+Zt)),te.add(new go.PathSegment(go.PathSegment.Bezier,kt*nt+Ot,(Ht-xt)*et+Zt,(kt-xt)*nt+Ot,(Ht-gt)*et+Zt,(kt-gt)*nt+Ot,(Ht-xt)*et+Zt)),te.add(new go.PathSegment(go.PathSegment.Bezier,(kt-xt+gt*.5)*nt+Ot,Ht*et+Zt,kt*nt+Ot,(Ht-xt)*et+Zt,(kt-xt+gt*.5)*nt+Ot,(Ht-gt)*et+Zt)),te.add(new go.PathSegment(go.PathSegment.Bezier,kt*nt+Ot,(Ht+xt)*et+Zt,(kt-xt+gt*.5)*nt+Ot,(Ht+gt)*et+Zt,kt*nt+Ot,(Ht+xt)*et+Zt).close()),gt=ie*.2,xt=.2,kt=.5,Ht=.5;var we=new go.PathFigure((kt-xt)*nt+Ot,Ht*et+Zt,!0);At.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,kt*nt+Ot,(Ht-xt)*et+Zt,(kt-xt)*nt+Ot,(Ht-gt)*et+Zt,(kt-gt)*nt+Ot,(Ht-xt)*et+Zt)),we.add(new go.PathSegment(go.PathSegment.Bezier,(kt+xt)*nt+Ot,Ht*et+Zt,(kt+gt)*nt+Ot,(Ht-xt)*et+Zt,(kt+xt)*nt+Ot,(Ht-gt)*et+Zt)),we.add(new go.PathSegment(go.PathSegment.Bezier,kt*nt+Ot,(Ht+xt)*et+Zt,(kt+xt)*nt+Ot,(Ht+gt)*et+Zt,(kt+gt)*nt+Ot,(Ht+xt)*et+Zt)),we.add(new go.PathSegment(go.PathSegment.Bezier,(kt-xt)*nt+Ot,Ht*et+Zt,(kt-gt)*nt+Ot,(Ht+xt)*et+Zt,(kt-xt)*nt+Ot,(Ht+gt)*et+Zt)),gt=ie*.4,xt=.4,kt=.8,Ht=.5;var pe=new go.PathFigure(kt*nt+Ot,(Ht-xt)*et+Zt,!0);At.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,(kt+xt)*nt+Ot,Ht*et+Zt,(kt+gt)*nt+Ot,(Ht-xt)*et+Zt,(kt+xt)*nt+Ot,(Ht-gt)*et+Zt)),pe.add(new go.PathSegment(go.PathSegment.Bezier,kt*nt+Ot,(Ht+xt)*et+Zt,(kt+xt)*nt+Ot,(Ht+gt)*et+Zt,(kt+gt)*nt+Ot,(Ht+xt)*et+Zt)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(kt+xt-gt*.5)*nt+Ot,Ht*et+Zt,kt*nt+Ot,(Ht+xt)*et+Zt,(kt+xt-gt*.5)*nt+Ot,(Ht+gt)*et+Zt)),pe.add(new go.PathSegment(go.PathSegment.Bezier,kt*nt+Ot,(Ht-xt)*et+Zt,(kt+xt-gt*.5)*nt+Ot,(Ht-gt)*et+Zt,kt*nt+Ot,(Ht-xt)*et+Zt).close()),gt=ie*.8,xt=.8,kt=1,Ht=.5;var Ke=new go.PathFigure(kt*nt+Ot,(Ht-xt)*et+Zt,!0);return At.add(Ke),Ke.add(new go.PathSegment(go.PathSegment.Bezier,(kt+xt)*nt+Ot,Ht*et+Zt,(kt+gt)*nt+Ot,(Ht-xt)*et+Zt,(kt+xt)*nt+Ot,(Ht-gt)*et+Zt)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,kt*nt+Ot,(Ht+xt)*et+Zt,(kt+xt)*nt+Ot,(Ht+gt)*et+Zt,(kt+gt)*nt+Ot,(Ht+xt)*et+Zt)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,(kt+xt-gt*.5)*nt+Ot,Ht*et+Zt,kt*nt+Ot,(Ht+xt)*et+Zt,(kt+xt-gt*.5)*nt+Ot,(Ht+gt)*et+Zt)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,kt*nt+Ot,(Ht-xt)*et+Zt,(kt+xt-gt*.5)*nt+Ot,(Ht-gt)*et+Zt,kt*nt+Ot,(Ht-xt)*et+Zt).close()),At}),go.Shape.defineFigureGenerator("Email",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var dt=new go.PathFigure(0,0,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),dt.add(new go.PathSegment(go.PathSegment.Move,0,et)),dt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.54*et)),dt.add(new go.PathSegment(go.PathSegment.Move,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.54*et)),At}),go.Shape.defineFigureGenerator("Ethernet",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.35*nt,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.65*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.35*nt,0).close());var dt=new go.PathFigure(.1*nt,et,!0,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.6*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.6*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et).close());var gt=new go.PathFigure(.6*nt,et,!0,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et).close());var xt=new go.PathFigure(0,.5*et,!1);return At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),xt.add(new go.PathSegment(go.PathSegment.Move,.75*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.6*et)),xt.add(new go.PathSegment(go.PathSegment.Move,.25*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.6*et)),At}),go.Shape.defineFigureGenerator("Power",function(It,nt,et){var At=new go.Geometry,at=ie*.4,dt=.4,gt=.5,xt=.5,kt=St(),Ht=St(),Ot=St(),Zt=St();xe(gt,xt-dt,gt+at,xt-dt,gt+dt,xt-at,gt+dt,xt,.5,kt,kt,Ht,Ot,Zt);var Wt=Ut(Ht.x,Ht.y),te=new go.PathFigure(Ht.x*nt,Ht.y*et,!0);At.add(te),te.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt)*nt,xt*et,Ot.x*nt,Ot.y*et,Zt.x*nt,Zt.y*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et,(gt+at)*nt,(xt+dt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(gt-dt)*nt,xt*et,(gt-at)*nt,(xt+dt)*et,(gt-dt)*nt,(xt+at)*et)),xe(gt-dt,xt,gt-dt,xt-at,gt-at,xt-dt,gt,xt-dt,.5,Ot,Zt,Ht,kt,kt),te.add(new go.PathSegment(go.PathSegment.Bezier,Ht.x*nt,Ht.y*et,Ot.x*nt,Ot.y*et,Zt.x*nt,Zt.y*et)),at=ie*.3,dt=.3,xe(gt-dt,xt,gt-dt,xt-at,gt-at,xt-dt,gt,xt-dt,.5,Ot,Zt,Ht,kt,kt),te.add(new go.PathSegment(go.PathSegment.Line,Ht.x*nt,Ht.y*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(gt-dt)*nt,xt*et,Zt.x*nt,Zt.y*et,Ot.x*nt,Ot.y*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+dt)*et,(gt-dt)*nt,(xt+at)*et,(gt-at)*nt,(xt+dt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt)*nt,xt*et,(gt+at)*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et)),xe(gt,xt-dt,gt+at,xt-dt,gt+dt,xt-at,gt+dt,xt,.5,kt,kt,Ht,Ot,Zt),te.add(new go.PathSegment(go.PathSegment.Bezier,Ht.x*nt,Ht.y*et,Zt.x*nt,Zt.y*et,Ot.x*nt,Ot.y*et).close());var te=new go.PathFigure(.45*nt,0,!0);return At.add(te),te.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.5*et)),te.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.5*et)),te.add(new go.PathSegment(go.PathSegment.Line,.55*nt,0).close()),Xt(kt),Xt(Ht),Xt(Ot),Xt(Zt),Xt(Wt),At.spot1=new go.Spot(.25,.45),At.spot2=new go.Spot(.75,.8),At}),go.Shape.defineFigureGenerator("Fallout",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et/2,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,180,360,nt/2,et/2,nt/2,et/2));function dt(gt,xt,kt){gt.add(new go.PathSegment(go.PathSegment.Move,(.3+xt)*nt,(.8+kt)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5+xt)*nt,(.5+kt)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(.1+xt)*nt,(.5+kt)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(.3+xt)*nt,(.8+kt)*et).close())}return dt(at,0,0),dt(at,.4,0),dt(at,.2,-.3),At}),go.Shape.defineFigureGenerator("IrritationHazard",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.2*nt,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.3*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.2*et).close()),At.spot1=new go.Spot(.3,.3),At.spot2=new go.Spot(.7,.7),At}),go.Shape.defineFigureGenerator("ElectricalHazard",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.37*nt,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.11*et)),at.add(new go.PathSegment(go.PathSegment.Line,.77*nt,.04*et)),at.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.49*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.37*et)),at.add(new go.PathSegment(go.PathSegment.Line,.63*nt,.86*et)),at.add(new go.PathSegment(go.PathSegment.Line,.77*nt,.91*et)),at.add(new go.PathSegment(go.PathSegment.Line,.34*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.34*nt,.78*et)),at.add(new go.PathSegment(go.PathSegment.Line,.44*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.56*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.68*et).close()),At}),go.Shape.defineFigureGenerator("FireHazard",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.1*nt,et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.29*nt,0,-.25*nt,.63*et,.45*nt,.44*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.51*nt,.42*et,.48*nt,.17*et,.54*nt,.35*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.59*nt,.18*et,.59*nt,.29*et,.58*nt,.28*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,.6*et,.8*nt,.34*et,.88*nt,.43*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.88*nt,.31*et,.87*nt,.48*et,.88*nt,.43*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,et,1.17*nt,.76*et,.82*nt,.8*et).close()),At.spot1=new go.Spot(.07,.445),At.spot2=new go.Spot(.884,.958),At}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(It,nt,et){var At=new go.Geometry,at=.5,dt=0,gt=0,xt=at*ie,kt=.4*Math.SQRT2/2+.5,Ht=.5-.5*Math.SQRT2/2,Ot=1,Zt=.5,Wt=.5,te=0,we=new go.PathFigure(kt*nt,(1-Ht)*et,!1);return At.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,Ot*nt,Zt*et,Ot*nt,.7*et,Ot*nt,Zt*et)),we.add(new go.PathSegment(go.PathSegment.Bezier,(Wt+dt)*nt,(te+dt)*et,(.5+at+dt)*nt,(.5-xt+dt)*et,(.5+xt+dt)*nt,(.5-at+dt)*et)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5-at+dt)*nt,(.5+gt)*et,(.5-xt+dt)*nt,(.5-at+gt)*et,(.5-at+dt)*nt,(.5-xt+gt)*et)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.35+dt)*nt,.9*et,(.5-at+dt)*nt,(.5+xt+gt)*et,(.5-xt+dt)*nt,.9*et)),we.add(new go.PathSegment(go.PathSegment.Move,(.25+dt)*nt,.8*et)),we.add(new go.PathSegment(go.PathSegment.Line,(.35+dt)*nt,.9*et)),we.add(new go.PathSegment(go.PathSegment.Line,(.2+dt)*nt,.95*et)),At}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Move,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),At}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Move,0,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Move,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),At}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);At.add(at);var dt=new go.PathFigure(nt,et,!1);At.add(dt);var gt=new go.PathFigure(0,.5*et,!1);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.5*et,.2*nt,.35*et,.3*nt,.35*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.7*nt,.65*et,.8*nt,.65*et)),At}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.5*et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close()),At}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.2*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*et).close());var at=new go.PathFigure(0,.2*et,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),At}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.7*nt,et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,0,.6*nt,.5*et,0,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,et,.4*nt,.5*et,nt,.5*et).close());var dt=new go.PathFigure(.45*nt,.73*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.73*et)),dt.add(new go.PathSegment(go.PathSegment.Move,.38*nt,.5*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.63*nt,.5*et)),dt.add(new go.PathSegment(go.PathSegment.Move,.31*nt,.27*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.56*nt,.27*et)),At}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);At.add(at);var dt=new go.PathFigure(.335*nt,(1-.555)*et,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.335*nt,(1-.405)*et)),dt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.405)*et)),dt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.555)*et)),dt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.68*et,(1-.12)*nt,.46*et,(1-.02)*nt,.54*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,.68*et)),dt.add(new go.PathSegment(go.PathSegment.Bezier,.335*nt,(1-.555)*et,.02*nt,.54*et,.12*nt,.46*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.365*nt,(1-.595)*et));var gt=.5-.285,xt=.5,kt=gt,Ht=Math.PI/4,Ot=4*(1-Math.cos(Ht))/(3*Math.sin(Ht)),Zt=Ot*.5,Wt=gt,te=gt,we=Ot*Wt,pe=Ot*te;dt.add(new go.PathSegment(go.PathSegment.Bezier,(xt-Wt)*nt,kt*et,(xt-(we+Wt)/2)*nt,(kt+(te+pe)/2)*et,(xt-Wt)*nt,(kt+pe)*et)),dt.add(new go.PathSegment(go.PathSegment.Bezier,xt*nt,(kt-te)*et,(xt-Wt)*nt,(kt-pe)*et,(xt-we)*nt,(kt-te)*et)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(xt+Wt)*nt,kt*et,(xt+we)*nt,(kt-te)*et,(xt+Wt)*nt,(kt-pe)*et)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*nt,(1-.595)*et,(xt+Wt)*nt,(kt+pe)*et,(xt+(we+Wt)/2)*nt,(kt+(te+pe)/2)*et)),dt.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*nt,(1-.595)*et)),dt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.555)*et)),dt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.405)*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.335*nt,(1-.405)*et));var Ke=new go.PathFigure(.2*nt,et,!1);At.add(Ke),Ke.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.8*et));var _e=new go.PathFigure(.8*nt,et,!1);return At.add(_e),_e.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.8*et)),At}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.1*nt,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et).close());var dt=new go.PathFigure(.2*nt,.2*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),dt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),dt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.6*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.6*et)),dt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.8*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.8*et)),At}),go.Shape.defineFigureGenerator("BpmnEventError",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.33*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.66*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.66*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.5*et).close()),At}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);At.add(at);var dt=new go.PathFigure(nt,et,!1);At.add(dt);var gt=new go.PathFigure(.1*nt,et,!0);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et).close()),At}),go.Shape.defineFigureGenerator("Caution",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.05*nt,et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,.8*et,0,et,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.1*et,.5*nt,0,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.95*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,et,nt,et,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.05*nt,et));var dt=.05;return at.add(new go.PathSegment(go.PathSegment.Move,(.5-dt)*nt,.875*et)),at.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*nt,.875*et,dt*nt,dt*et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.325*et,.575*nt,.725*et,.625*nt,.375*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.75*et,.375*nt,.375*et,.425*nt,.725*et)),At}),go.Shape.defineFigureGenerator("Recycle",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.45*nt,.95*et,!1);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.95*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.185*nt,.85*et,.17*nt,.95*et,.15*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Line,.235*nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.625*et)),at.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.65*et)),at.add(new go.PathSegment(go.PathSegment.Line,.275*nt,.45*et)),at.add(new go.PathSegment(go.PathSegment.Line,.05*nt,.45*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.05*nt,.575*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.1875*nt,.95*et,0,.675*et,0,.7*et)),at.add(new go.PathSegment(go.PathSegment.Move,.45*nt,.95*et)),at.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.775*et)),at.add(new go.PathSegment(go.PathSegment.Line,.22*nt,.775*et));var dt=new go.PathFigure(.475*nt,.2*et,!1);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.4*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.225*nt,.3*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.275*nt,.175*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.325*nt,.05*et)),dt.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,.05*et,.35*nt,0,.375*nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.375*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.4*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.475*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.315*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.32*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.05*et)),dt.add(new go.PathSegment(go.PathSegment.Bezier,.575*nt,0,.65*nt,.05*et,.625*nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,.38*nt,.0105*et));var gt=new go.PathFigure(.675*nt,.575*et,!1);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.875*nt,.525*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.775*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.85*nt,.95*et,nt,.8*et,nt,.85*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.95*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.85*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.725*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.775*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.775*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.775*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.675*nt,.575*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.775*nt,.775*et)),At}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(It,nt,et){var At=new go.Geometry,at=.5,dt=ie*.5,gt=new go.PathFigure(nt,at*et,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,at*nt,et,nt,(at+dt)*et,(at+dt)*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,at*et,(at-dt)*nt,et,0,(at+dt)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,at*nt,0,0,(at-dt)*et,(at-dt)*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,at*et,(at+dt)*nt,0,nt,(at-dt)*et));var xt=new go.PathFigure(at*nt,0,!1);return At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,at*nt,.15*et)),xt.add(new go.PathSegment(go.PathSegment.Move,at*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,at*nt,.85*et)),xt.add(new go.PathSegment(go.PathSegment.Move,0,at*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,at*et)),xt.add(new go.PathSegment(go.PathSegment.Move,nt,at*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,at*et)),xt.add(new go.PathSegment(go.PathSegment.Move,at*nt,at*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.58*nt,.1*et)),xt.add(new go.PathSegment(go.PathSegment.Move,at*nt,at*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.78*nt,.54*et)),At}),go.Shape.defineFigureGenerator("Package",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.15*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var dt=new go.PathFigure(0,.15*et,!0);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,0,0)),dt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.15*et).close()),At.spot1=new go.Spot(0,.1),At.spot2=new go.Spot(1,1),At}),go.Shape.defineFigureGenerator("Class",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var dt=new go.PathFigure(0,.2*et,!1);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et).close());var gt=new go.PathFigure(0,.5*et,!1);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et).close()),At}),go.Shape.defineFigureGenerator("Component",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt,et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et).close());var dt=new go.PathFigure(0,.2*et,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.2*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.4*et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,.4*et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et).close());var gt=new go.PathFigure(0,.6*et,!0);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.8*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.6*et).close()),At}),go.Shape.defineFigureGenerator("Boat Shipment",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.15*nt,.6*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.85*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et));var dt=new go.PathFigure(.15*nt,.6*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),At}),go.Shape.defineFigureGenerator("Customer/Supplier",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt,et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.66*nt,.33*et)),at.add(new go.PathSegment(go.PathSegment.Line,.66*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.33*et)),at.add(new go.PathSegment(go.PathSegment.Line,.33*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,.33*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),At}),go.Shape.defineFigureGenerator("Workcell",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.65*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.35*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At}),go.Shape.defineFigureGenerator("Supermarket",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.33*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.33*et)),at.add(new go.PathSegment(go.PathSegment.Move,nt,.33*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.66*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.66*et)),at.add(new go.PathSegment(go.PathSegment.Move,nt,.66*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),At}),go.Shape.defineFigureGenerator("TruckShipment",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var dt=new go.PathFigure(nt,.8*et,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.4*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.8*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et).close());var gt=.1,xt=ie*.1,kt=.2,Ht=.9,Ot=new go.PathFigure((kt-gt)*nt,Ht*et,!0);At.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,kt*nt,(Ht-gt)*et,(kt-gt)*nt,(Ht-xt)*et,(kt-xt)*nt,(Ht-gt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(kt+gt)*nt,Ht*et,(kt+xt)*nt,(Ht-gt)*et,(kt+gt)*nt,(Ht-xt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,kt*nt,(Ht+gt)*et,(kt+gt)*nt,(Ht+xt)*et,(kt+xt)*nt,(Ht+gt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(kt-gt)*nt,Ht*et,(kt-xt)*nt,(Ht+gt)*et,(kt-gt)*nt,(Ht+xt)*et).close()),gt=.1,xt=ie*.1,kt=.8,Ht=.9;var Zt=new go.PathFigure((kt-gt)*nt,Ht*et,!0);return At.add(Zt),Zt.add(new go.PathSegment(go.PathSegment.Bezier,kt*nt,(Ht-gt)*et,(kt-gt)*nt,(Ht-xt)*et,(kt-xt)*nt,(Ht-gt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(kt+gt)*nt,Ht*et,(kt+xt)*nt,(Ht-gt)*et,(kt+gt)*nt,(Ht-xt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,kt*nt,(Ht+gt)*et,(kt+gt)*nt,(Ht+xt)*et,(kt+xt)*nt,(Ht+gt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(kt-gt)*nt,Ht*et,(kt-xt)*nt,(Ht+gt)*et,(kt-gt)*nt,(Ht+xt)*et).close()),At}),go.Shape.defineFigureGenerator("KanbanPost",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.2*nt,0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),At}),go.Shape.defineFigureGenerator("Forklift",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,0));var dt=new go.PathFigure(0,.5*et,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.8*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var gt=new go.PathFigure(.5*nt,.8*et,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.8*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.8*et));var xt=new go.PathFigure(.5*nt,.7*et,!1);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et));var kt=.1,Ht=ie*.1,Ot=.1,Zt=.9,Wt=new go.PathFigure((Ot-kt)*nt,Zt*et,!0);At.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,Ot*nt,(Zt-kt)*et,(Ot-kt)*nt,(Zt-Ht)*et,(Ot-Ht)*nt,(Zt-kt)*et)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Ot+kt)*nt,Zt*et,(Ot+Ht)*nt,(Zt-kt)*et,(Ot+kt)*nt,(Zt-Ht)*et)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,Ot*nt,(Zt+kt)*et,(Ot+kt)*nt,(Zt+Ht)*et,(Ot+Ht)*nt,(Zt+kt)*et)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Ot-kt)*nt,Zt*et,(Ot-Ht)*nt,(Zt+kt)*et,(Ot-kt)*nt,(Zt+Ht)*et)),kt=.1,Ht=ie*.1,Ot=.4,Zt=.9;var te=new go.PathFigure((Ot-kt)*nt,Zt*et,!0);return At.add(te),te.add(new go.PathSegment(go.PathSegment.Bezier,Ot*nt,(Zt-kt)*et,(Ot-kt)*nt,(Zt-Ht)*et,(Ot-Ht)*nt,(Zt-kt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(Ot+kt)*nt,Zt*et,(Ot+Ht)*nt,(Zt-kt)*et,(Ot+kt)*nt,(Zt-Ht)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,Ot*nt,(Zt+kt)*et,(Ot+kt)*nt,(Zt+Ht)*et,(Ot+Ht)*nt,(Zt+kt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(Ot-kt)*nt,Zt*et,(Ot-Ht)*nt,(Zt+kt)*et,(Ot-kt)*nt,(Zt+Ht)*et)),At}),go.Shape.defineFigureGenerator("RailShipment",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.1*nt,.4*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.4*et).close());var dt=new go.PathFigure(.45*nt,.7*et,!1);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.7*et));var gt=new go.PathFigure(.55*nt,.4*et,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.9*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.9*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.4*et).close());var Ot=.05,Zt=ie*.05,Wt=.175,te=.95,xt=new go.PathFigure((Wt-Ot)*nt,te*et,!0);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,Wt*nt,(te-Ot)*et,(Wt-Ot)*nt,(te-Zt)*et,(Wt-Zt)*nt,(te-Ot)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,(Wt+Ot)*nt,te*et,(Wt+Zt)*nt,(te-Ot)*et,(Wt+Ot)*nt,(te-Zt)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,Wt*nt,(te+Ot)*et,(Wt+Ot)*nt,(te+Zt)*et,(Wt+Zt)*nt,(te+Ot)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,(Wt-Ot)*nt,te*et,(Wt-Zt)*nt,(te+Ot)*et,(Wt-Ot)*nt,(te+Zt)*et));var Ot=.05,Zt=ie*.05,Wt=.375,te=.95,kt=new go.PathFigure((Wt-Ot)*nt,te*et,!0);At.add(kt),kt.add(new go.PathSegment(go.PathSegment.Bezier,Wt*nt,(te-Ot)*et,(Wt-Ot)*nt,(te-Zt)*et,(Wt-Zt)*nt,(te-Ot)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,(Wt+Ot)*nt,te*et,(Wt+Zt)*nt,(te-Ot)*et,(Wt+Ot)*nt,(te-Zt)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,Wt*nt,(te+Ot)*et,(Wt+Ot)*nt,(te+Zt)*et,(Wt+Zt)*nt,(te+Ot)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,(Wt-Ot)*nt,te*et,(Wt-Zt)*nt,(te+Ot)*et,(Wt-Ot)*nt,(te+Zt)*et));var Ot=.05,Zt=ie*.05,Wt=.625,te=.95,Ht=new go.PathFigure((Wt-Ot)*nt,te*et,!0);At.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Bezier,Wt*nt,(te-Ot)*et,(Wt-Ot)*nt,(te-Zt)*et,(Wt-Zt)*nt,(te-Ot)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(Wt+Ot)*nt,te*et,(Wt+Zt)*nt,(te-Ot)*et,(Wt+Ot)*nt,(te-Zt)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,Wt*nt,(te+Ot)*et,(Wt+Ot)*nt,(te+Zt)*et,(Wt+Zt)*nt,(te+Ot)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(Wt-Ot)*nt,te*et,(Wt-Zt)*nt,(te+Ot)*et,(Wt-Ot)*nt,(te+Zt)*et));var Ot=.05,Zt=ie*.05,Wt=.825,te=.95,we=new go.PathFigure((Wt-Ot)*nt,te*et,!0);At.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,Wt*nt,(te-Ot)*et,(Wt-Ot)*nt,(te-Zt)*et,(Wt-Zt)*nt,(te-Ot)*et)),we.add(new go.PathSegment(go.PathSegment.Bezier,(Wt+Ot)*nt,te*et,(Wt+Zt)*nt,(te-Ot)*et,(Wt+Ot)*nt,(te-Zt)*et)),we.add(new go.PathSegment(go.PathSegment.Bezier,Wt*nt,(te+Ot)*et,(Wt+Ot)*nt,(te+Zt)*et,(Wt+Zt)*nt,(te+Ot)*et)),we.add(new go.PathSegment(go.PathSegment.Bezier,(Wt-Ot)*nt,te*et,(Wt-Zt)*nt,(te+Ot)*et,(Wt-Ot)*nt,(te+Zt)*et).close());var pe=new go.PathFigure(0,et,!1);return At.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),At}),go.Shape.defineFigureGenerator("Warehouse",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var dt=new go.PathFigure(0,.2*et,!1);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et).close());var gt=new go.PathFigure(.15*nt,et,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et).close());var xt=.05,kt=ie*.05,Ht=.35,Ot=.775,Zt=new go.PathFigure((Ht-xt)*nt,Ot*et,!0);return At.add(Zt),Zt.add(new go.PathSegment(go.PathSegment.Bezier,Ht*nt,(Ot-xt)*et,(Ht-xt)*nt,(Ot-kt)*et,(Ht-kt)*nt,(Ot-xt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(Ht+xt)*nt,Ot*et,(Ht+kt)*nt,(Ot-xt)*et,(Ht+xt)*nt,(Ot-kt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,Ht*nt,(Ot+xt)*et,(Ht+xt)*nt,(Ot+kt)*et,(Ht+kt)*nt,(Ot+xt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(Ht-xt)*nt,Ot*et,(Ht-kt)*nt,(Ot+xt)*et,(Ht-xt)*nt,(Ot+kt)*et).close()),At}),go.Shape.defineFigureGenerator("ControlCenter",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Move,.1*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et).close()),At}),go.Shape.defineFigureGenerator("Bluetooth",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.75*et,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),At}),go.Shape.defineFigureGenerator("Bookmark",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),At}),go.Shape.defineFigureGenerator("Bookmark",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),At}),go.Shape.defineFigureGenerator("Globe",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Move,0,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.75*nt,0,nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,.75*et,.75*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.25*nt,et,0,.75*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,.25*et,.25*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,.15*nt,.25*et,.15*nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.85*nt,.75*et,.85*nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Move,.1675*nt,.15*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.8325*nt,.15*et,.35*nt,.3*et,.65*nt,.3*et)),at.add(new go.PathSegment(go.PathSegment.Move,.1675*nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.8325*nt,.85*et,.35*nt,.7*et,.65*nt,.7*et)),At}),go.Shape.defineFigureGenerator("Wave",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.25*et,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.25*et,.1*nt,0,.2*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,.25*et,.425*nt,.5*et,.575*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.25*et,.8*nt,0,.9*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Move,0,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.75*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.75*et,.1*nt,.5*et,.2*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,.75*et,.425*nt,et,.575*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.75*et,.8*nt,.5*et,.9*nt,.5*et)),At}),go.Shape.defineFigureGenerator("Operator",function(It,nt,et){var At=new go.Geometry,at=.3,dt=ie*.3,gt=.5,xt=.7,kt=new go.PathFigure((gt-at)*nt,xt*et,!0);At.add(kt),kt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt-at)*et,(gt-at)*nt,(xt-dt)*et,(gt-dt)*nt,(xt-at)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+at)*nt,xt*et,(gt+dt)*nt,(xt-at)*et,(gt+at)*nt,(xt-dt)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+at)*et,(gt+at)*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,(gt-at)*nt,xt*et,(gt-dt)*nt,(xt+at)*et,(gt-at)*nt,(xt+dt)*et));var Ht=new go.PathFigure(0,.7*et,!1);return At.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Bezier,nt,.7*et,0,0,nt,0)),At}),go.Shape.defineFigureGenerator("TripleFanBlades",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.65*nt,.3*et,.65*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.35*nt,.5*et,.35*nt,.3*et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.65*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.3*nt,.6*et,.1*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.2*nt,et,.35*nt,.95*et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.65*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,et,.7*nt,.6*et,.9*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.8*nt,et,.65*nt,.95*et)),At}),go.Shape.defineFigureGenerator("CentrifugalPump",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,0,.075*et,0,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,et,0,et,.4*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.4*et,.8*nt,et,.85*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),At}),go.Shape.defineFigureGenerator("Battery",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Move,.4*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.1*et));var dt=new go.PathFigure(0,.6*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Move,0,.4*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),At}),go.Shape.defineFigureGenerator("Delete",function(It,nt,et){var At=new go.Geometry,at=.5,dt=ie*.5,gt=.5,xt=.5,kt=new go.PathFigure((gt-at)*nt,xt*et,!0);At.add(kt),kt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt-at)*et,(gt-at)*nt,(xt-dt)*et,(gt-dt)*nt,(xt-at)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+at)*nt,xt*et,(gt+dt)*nt,(xt-at)*et,(gt+at)*nt,(xt-dt)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+at)*et,(gt+at)*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,(gt-at)*nt,xt*et,(gt-dt)*nt,(xt+at)*et,(gt-at)*nt,(xt+dt)*et));var Ht=new go.PathFigure(.15*nt,.5*et,!1);return At.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.5*et)),At}),go.Shape.defineFigureGenerator("Flag",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.1*et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Move,0,.1*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.1*et,.15*nt,0,.35*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,.65*nt,.2*et,.85*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.5*et,.85*nt,.6*et,.65*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.35*nt,.4*et,.15*nt,.4*et).close()),At}),go.Shape.defineFigureGenerator("Help",function(It,nt,et){var At=new go.Geometry,at=.5,dt=ie*.5,gt=.5,xt=.5,kt=new go.PathFigure((gt-at)*nt,xt*et,!1);At.add(kt),kt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt-at)*et,(gt-at)*nt,(xt-dt)*et,(gt-dt)*nt,(xt-at)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+at)*nt,xt*et,(gt+dt)*nt,(xt-at)*et,(gt+at)*nt,(xt-dt)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+at)*et,(gt+at)*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et)),kt.add(new go.PathSegment(go.PathSegment.Bezier,(gt-at)*nt,xt*et,(gt-dt)*nt,(xt+at)*et,(gt-at)*nt,(xt+dt)*et).close()),at=.05,dt=ie*.05,gt=.5,xt=.8;var Ht=new go.PathFigure((gt-at)*nt,xt*et,!1);return At.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt-at)*et,(gt-at)*nt,(xt-dt)*et,(gt-dt)*nt,(xt-at)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(gt+at)*nt,xt*et,(gt+dt)*nt,(xt-at)*et,(gt+at)*nt,(xt-dt)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+at)*et,(gt+at)*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,(gt-at)*nt,xt*et,(gt-dt)*nt,(xt+at)*et,(gt-at)*nt,(xt+dt)*et).close()),Ht.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.7*et)),Ht.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,.75*nt,.475*et,.75*nt,.225*et)),Ht.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.35*et,.4*nt,.2*et,.3*nt,.25*et)),At}),go.Shape.defineFigureGenerator("Location",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,et,!0).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.975*nt,.025*et,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*nt,.5*et,.5*nt,0,.025*nt,.025*et).close()).add(new go.PathSegment(go.PathSegment.Move,.5*nt,.2*et)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*nt,.3*et,.1*nt,.1*et).close()))}),go.Shape.defineFigureGenerator("Lock",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.5*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var dt=new go.PathFigure(.2*nt,.5*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.5*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.3*et)),dt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.3*et,.25*nt,0,.75*nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.3*et)),At}),go.Shape.defineFigureGenerator("Unlocked",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.5*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var dt=new go.PathFigure(.2*nt,.5*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.5*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.3*et)),dt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.3*et,.25*nt,0,.75*nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.35*et)),At}),go.Shape.defineFigureGenerator("Gear",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(.9375*nt,.56246875*et,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Line,.80621875*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Bezier,.763*nt,.3316875*et,.79840625*nt,.39915625*et,.7834375*nt,.3635*et)).add(new go.PathSegment(go.PathSegment.Line,.8566875*nt,.23796875*et)).add(new go.PathSegment(go.PathSegment.Line,.76825*nt,.14959375*et)).add(new go.PathSegment(go.PathSegment.Line,.67596875*nt,.24184375*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*nt,.19378125*et,.64228125*nt,.2188125*et,.603875*nt,.2021875*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.0625*et)).add(new go.PathSegment(go.PathSegment.Line,.4375*nt,.0625*et)).add(new go.PathSegment(go.PathSegment.Line,.4375*nt,.19378125*et)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*nt,.239375*et,.39759375*nt,.20190625*et,.36053125*nt,.2176875*et)).add(new go.PathSegment(go.PathSegment.Line,.2379375*nt,.14959375*et)).add(new go.PathSegment(go.PathSegment.Line,.14953125*nt,.2379375*et)).add(new go.PathSegment(go.PathSegment.Line,.23934375*nt,.3278125*et)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*nt,.4375*et,.21765625*nt,.36059375*et,.201875*nt,.397625*et)).add(new go.PathSegment(go.PathSegment.Line,.0625*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Line,.0625*nt,.5625*et)).add(new go.PathSegment(go.PathSegment.Line,.1938125*nt,.5625*et)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*nt,.67596875*et,.20221875*nt,.603875*et,.21884375*nt,.64228125*et)).add(new go.PathSegment(go.PathSegment.Line,.1495625*nt,.76825*et)).add(new go.PathSegment(go.PathSegment.Line,.238*nt,.8566875*et)).add(new go.PathSegment(go.PathSegment.Line,.3316875*nt,.76296875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*nt,.80621875*et,.36353125*nt,.78340625*et,.3991875*nt,.79840625*et)).add(new go.PathSegment(go.PathSegment.Line,.43753125*nt,.9375*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.9375*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.80621875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*nt,.760625*et,.602375*nt,.79809375*et,.63946875*nt,.78234375*et)).add(new go.PathSegment(go.PathSegment.Line,.76828125*nt,.8566875*et)).add(new go.PathSegment(go.PathSegment.Line,.85671875*nt,.76825*et)).add(new go.PathSegment(go.PathSegment.Line,.76065625*nt,.67221875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*nt,.56246875*et,.78234375*nt,.63940625*et,.798125*nt,.602375*et)).add(new go.PathSegment(go.PathSegment.Line,.9375*nt,.56246875*et).close()).add(new go.PathSegment(go.PathSegment.Move,.5*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*nt,.5*et,.1*nt,.1*et).close()))}),go.Shape.defineFigureGenerator("Hand",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.5*et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,.3*et,0,.375*et,.05*nt,.325*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.45*nt,.075*et,.3*nt,.225*et,.4*nt,.175*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.525*nt,.075*et,.46*nt,.05*et,.525*nt,.05*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.4*et,.525*nt,.275*et,.475*nt,.325*et)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.55*et,nt,.4*et,nt,.55*et)),at.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.55*et)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.55*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.6*nt,.7*et,.675*nt,.55*et,.675*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.575*nt,.85*et,.65*nt,.7*et,.65*nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.535*nt,et,.61*nt,.85*et,.61*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,.435*nt,et,0,et).close()),At}),go.Shape.defineFigureGenerator("Map",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.2*et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),at.add(new go.PathSegment(go.PathSegment.Move,.25*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Move,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.8*et)),At}),go.Shape.defineFigureGenerator("Eject",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et*.7)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*.7).close());var dt=new go.PathFigure(0,et*.6,!0);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0).close()),At}),go.Shape.defineFigureGenerator("Pencil",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et).close()))}),go.Shape.defineFigureGenerator("Building",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*1,et*1,!1);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*.85)),at.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.85)),at.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*.3)),at.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.3)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.3)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et*.3)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.85)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et*.85).close());var dt=new go.PathFigure(.126*nt,.85*et,!1);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.126*nt,.45*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.322*nt,.45*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.322*nt,.85*et).close());var gt=new go.PathFigure(.402*nt,.85*et,!1);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.402*nt,.45*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.598*nt,.45*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.598*nt,.85*et).close());var xt=new go.PathFigure(.678*nt,.85*et,!1);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.678*nt,.45*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.874*nt,.45*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.874*nt,.85*et).close());var kt=new go.PathFigure(.5*nt,.1*et,!1);return At.add(kt),kt.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*nt,.3*et)),kt.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*nt,.3*et).close()),At}),go.Shape.defineFigureGenerator("Staircase",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et*1,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*.8)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.8)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.6)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.6)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.4)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.4)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.2)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.2)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.15)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.15)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.35)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.35)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.15,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.15,et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*.95).close()),At}),go.Shape.defineFigureGenerator("5Bars",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et*1,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.184,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.184,et*(1-.184)).close());var dt=new go.PathFigure(nt*.204,et,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.204,et*(1-.184))),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.388,et*(1-.184*2))),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.388,et*1).close());var gt=new go.PathFigure(nt*.408,et,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.408,et*(1-.184*2))),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.592,et*(1-.184*3))),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.592,et*1).close());var xt=new go.PathFigure(nt*.612,et,!0);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.612,et*(1-.184*3))),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.796,et*(1-.184*4))),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.796,et*1).close());var kt=new go.PathFigure(nt*.816,et,!0);return At.add(kt),kt.add(new go.PathSegment(go.PathSegment.Line,nt*.816,et*(1-.184*4))),kt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-.184*5))),kt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1).close()),At}),go.Shape.defineFigureGenerator("PC",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,0).close());var dt=new go.PathFigure(nt*.055,.07*et,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.07)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.1)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.1).close());var gt=new go.PathFigure(nt*.055,.13*et,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.13)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.16)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.16).close());var xt=new go.PathFigure(nt*.055,.18*et,!0);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.18)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.21)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.21).close());var kt=new go.PathFigure(nt*1,0,!0);return At.add(kt),kt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,0)),kt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.65)),kt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.65).close()),At}),go.Shape.defineFigureGenerator("Plane",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.55*nt,et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.475*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.35*nt,.525*et,0,.4*et,.225*nt,.45*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.475*et)),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.35*et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.325*et)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.325*et)),at.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.2*et,.975*nt,0,nt,.08*et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.45*et)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.95*et)),at.add(new go.PathSegment(go.PathSegment.Line,.55*nt,et).close()),At}),go.Shape.defineFigureGenerator("Key",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*1,et*.5,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.9,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.35*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,.35*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.15,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.35*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.65*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.15,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,.65*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.65*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.6,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.65,.55*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.7,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,.55*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.85,.575*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.9,.6*et).close()),at.add(new go.PathSegment(go.PathSegment.Move,.17*nt,.425*et)),at.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*nt,.5*et,.075*nt,.075*et).close()),At}),go.Shape.defineFigureGenerator("FilmTape",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);At.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,270,180,nt*0,nt*.3,nt*.055)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.08,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.08,et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*1),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*1),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*2),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*2),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*3),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*3),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*4),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*4),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*5),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*5),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*6),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*6),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*7),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*7),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*8),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*8),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*9),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*9),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*10),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*10),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*11),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*11),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*12),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*12),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*13),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*13),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*14),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*14),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*15),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*15),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1));var dt=new go.PathFigure(0,0,!1);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*0)),dt.add(new go.PathSegment(go.PathSegment.Arc,270,-180,nt*1,nt*.3,nt*.055)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1));var gt=new go.PathFigure(nt*.11,et*.1,!1);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*0),et*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*0),et*.8)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.11,et*.8).close());var xt=new go.PathFigure(nt*(.11+.24133333*1+.028*1),et*.1,!1);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*1),et*.1)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*1),et*.8)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*1),et*.8).close());var kt=new go.PathFigure(nt*(.11+.24133333*2+.028*2),et*.1,!1);return At.add(kt),kt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*3+.028*2),et*.1)),kt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*3+.028*2),et*.8)),kt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*2),et*.8).close()),At}),go.Shape.defineFigureGenerator("FloppyDisk",function(It,nt,et){var At=new go.Geometry,at=8,dt=at*ie,gt=new go.PathFigure(at,0,!1);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.86,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.14)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et-at)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt-at,et,nt,et-dt,nt-dt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,at,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-at,dt,et,0,et-dt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,at)),gt.add(new go.PathSegment(go.PathSegment.Bezier,at,0,0,dt,dt,0).close());var xt=new go.PathFigure(nt*.83,0,!1);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.83,et*.3)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*.3)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*0).close());var kt=new go.PathFigure(nt*.83,et*1,!1);At.add(kt),kt.add(new go.PathSegment(go.PathSegment.Line,nt*.83,et*.5)),kt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*.5)),kt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*1).close());var Ht=new go.PathFigure(nt*.78,et*.05,!1);return At.add(Ht),Ht.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.05)),Ht.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.25)),Ht.add(new go.PathSegment(go.PathSegment.Line,nt*.78,et*.25).close()),At}),go.Shape.defineFigureGenerator("SpeechBubble",function(It,nt,et){var At=It?It.parameter1:NaN;(isNaN(At)||At<0)&&(At=15),At=Math.min(At,nt/3),At=Math.min(At,et/3);var at=At*ie,dt=et*.8,gt=new go.Geometry,xt=new go.PathFigure(At,0,!0);return gt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt-At,0)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt,At,nt-at,0,nt,at)),xt.add(new go.PathSegment(go.PathSegment.Line,nt,dt-At)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt-At,dt,nt,dt-at,nt-at,dt)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,dt)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,dt)),xt.add(new go.PathSegment(go.PathSegment.Line,At,dt)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,dt-At,at,dt,0,dt-at)),xt.add(new go.PathSegment(go.PathSegment.Line,0,At)),xt.add(new go.PathSegment(go.PathSegment.Bezier,At,0,0,at,at,0).close()),at>1?(gt.spot1=new go.Spot(0,0,at,at),gt.spot2=new go.Spot(1,.8,-at,-at)):(gt.spot1=go.Spot.TopLeft,gt.spot2=new go.Spot(1,.8)),gt}),go.Shape.defineFigureGenerator("Repeat",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*0,et*.45,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*.9)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.9)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*.45).close());var dt=new go.PathFigure(nt*1,et*.55,!0);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*1)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.55)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*.55)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*.1)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.1)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*0)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.55).close()),At}),go.Shape.defineFigureGenerator("Windows",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close()).add(new go.PathSegment(go.PathSegment.Move,.4*nt,.4*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et).close()).add(new go.PathSegment(go.PathSegment.Move,.2*nt,.1*et)).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.1*et).close()).add(new go.PathSegment(go.PathSegment.Move,.1*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.1*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et).close()))}),go.Shape.defineFigureGenerator("Terminal",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*0,et*.1,!1);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.9)),at.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*.9).close());var dt=new go.PathFigure(nt*.1,et*.2,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.25)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.22,et*.285)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.32)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.37)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.275,et*.32)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.275,et*.25).close());var gt=new go.PathFigure(nt*.28,et*.37,!0);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.37)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.41)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.28,et*.41).close()),At}),go.Shape.defineFigureGenerator("Beaker",function(It,nt,et){var At=new go.Geometry,at=15,dt=at*ie,gt=new go.PathFigure(nt*.62,et*.475,!0);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et-at)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt-at,et,nt,et-dt,nt-dt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,at,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-at,dt,et,0,et-dt)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.38,et*.475)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.38,et*.03)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.62,et*.03).close()),dt>1?(At.spot1=new go.Spot(0,0,dt,dt),At.spot2=new go.Spot(1,1,-dt,-dt)):(At.spot1=go.Spot.TopLeft,At.spot2=go.Spot.BottomRight),At}),go.Shape.defineFigureGenerator("Download",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*0,et*1,!0);At.add(at);var dt=.1/.3;at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.755,et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.93,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.61,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.39,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.755),et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.8),et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*(1-dt)).close());var gt=new go.PathFigure(nt*.4,et*0,!0);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.44)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.26,et*.44)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.66)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.26),et*.44)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.44)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*0).close()),At}),go.Shape.defineFigureGenerator("Bin",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*0,et*1,!0);At.add(at);var dt=.1/.3;return at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.755,et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.93,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.61,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.39,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.755),et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.8),et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*(1-dt)).close()),At}),go.Shape.defineFigureGenerator("Upload",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*0,et*1,!0);At.add(at);var dt=.1/.3;at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.755,et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.93,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.61,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.39,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.755),et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.8),et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*(1-dt)).close());var gt=new go.PathFigure(nt*.5,et*0,!0);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.26,et*.25)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.25)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.63)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.63)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.25)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.74,et*.25).close()),At}),go.Shape.defineFigureGenerator("EmptyDrink",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*.15,et*0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.85,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1).close()),At}),go.Shape.defineFigureGenerator("Drink",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*.15,et*0,!1);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.85,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1).close());var dt=new go.PathFigure(nt*.235,et*.28,!0);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.765,et*.28)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.655,et*.97)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.345,et*.97).close()),At}),go.Shape.defineFigureGenerator("4Arrows",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*.5,et*0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*.25)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.25)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.35)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.5)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.65)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.65)),at.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*.5)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.35)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.25)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.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 mn={},je="5.0",Ut={},St=null,Xt=!1,Ae=!1,xe=null,fe=!1,Rt=null,ie=null,ae=0;ae<arguments.length;ae++){var de=arguments[ae];if(de!==null)switch(typeof de){case"number":je=de.toFixed(1);break;case"string":de.match(new RegExp("^[0-9]\\.[0-9]+$"))?je=de:xe=de;break;case"object":typeof de.is3D!="undefined"?St=de:Ut=de;break;case"boolean":Xt=de,Ae=!0;break}}St===null&&(St={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},Ut.material_id!==void 0&&!Ae&&(Xt=!0)),xe!==null&&Ut.id===void 0&&(Ut.id=xe);var zt="",Ie="",Yt=!1,Me=null,It=null,nt=null,et=!1,At=null,at=null,dt=null,gt=null,xt=null;Ut.height!==void 0&&(Ut.height=Math.round(Ut.height)),Ut.width!==void 0&&(Ut.width=Math.round(Ut.width));var kt=function(nn){return parseFloat(nn)>4?parseFloat(nn):5};mn.setHTML5Codebase=function(nn,Tn){ie=nn,gn(nn,Tn)},mn.setJavaCodebase=mn.setJavaCodebaseVersion=mn.isCompiledInstalled=mn.setPreCompiledScriptPath=mn.setPreCompiledResourcePath=function(){},mn.setHTML5CodebaseVersion=function(nn,Tn){var Gn=parseFloat(nn);if(Gn!==NaN&&Gn<5){console.log("The GeoGebra HTML5 codebase version "+Gn+" is deprecated. Using version latest instead.");return}Rt=nn,ee(nn,Tn)},mn.getHTML5CodebaseVersion=function(){return It},mn.getParameters=function(){return Ut},mn.setFontsCSSURL=function(nn){gt=nn},mn.setGiacJSURL=function(nn){},mn.setJNLPFile=function(nn){zt=nn},mn.setJNLPBaseDir=function(nn){},mn.inject=function(){function nn(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Tn="auto",Gn=Ut.id,yi,Je=!1,Le=0;Le<arguments.length;Le++){var tn=arguments[Le];typeof tn=="string"?(tn=tn.toLowerCase(),tn.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Tn=tn:Gn=arguments[Le]):typeof tn=="boolean"?Je=tn:tn instanceof HTMLElement&&(yi=tn)}ti();function ti(){if(!fe){setTimeout(ti,200);return}Tn=Kn(Tn);var jn=yi||document.getElementById(Gn);if(!jn){console.log("possibly bug on ajax loading? ");return}if(mn.removeExistingApplet(jn,!1),Ut.width===void 0&&jn.clientWidth&&(Ut.width=jn.clientWidth),Ut.height===void 0&&jn.clientHeight&&(Ut.height=jn.clientHeight),!(Ut.width&&Ut.height)&&Tn==="html5"&&(delete Ut.width,delete Ut.height),Me=Tn,Tn==="screenshot")_e(jn,Ut);else{var Gt=!1;Ut.hasOwnProperty("playButton")&&Ut.playButton||Ut.hasOwnProperty("clickToLoad")&&Ut.clickToLoad?Gt=!0:Ut.hasOwnProperty("playButtonAutoDecide")&&Ut.playButtonAutoDecide&&(Gt=(!Ht()||nn())&&Ot()),Gt?(Me="screenshot",dn(jn,Ut,Je,Tn)):Ke(jn,Ut,Je)}}};function Ht(){try{return window.self!==window.top}catch(nn){return!0}}function Ot(){return Ut.hasOwnProperty("screenshotGenerator")&&Ut.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}mn.getViews=function(){return St},mn.isJavaInstalled=function(){return!1};var Zt=function(nn){var Tn=function(Le){var tn=JSON.parse(Le),ti=function(Ft){return Ft.type=="G"||Ft.type=="E"},jn=tn.elements?tn.elements.filter(ti)[0]:tn;if(!jn||!jn.url){Gn();return}Ut.fileName=jn.url,Wt(jn.settings||{}),St.is3D=!0;var Gt="https://www.geogebra.org/images/";mn.setPreviewImage(At||jn.previewUrl,Gt+"GeoGebra_loading.png",Gt+"applet_play.png"),nn()},Gn=function(){Ut.onError&&Ut.onError(),$n("Error: Fetching material (id "+Ut.material_id+") failed.",Ut)},yi=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Je="/materials/"+Ut.material_id+"?scope=basic";te("https://"+yi+"/api/proxy.php?path="+encodeURIComponent(Je),Tn,Gn)};function Wt(nn){var Tn=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Gn){nn[Gn]=!!nn[Gn]}),Tn.forEach(function(Gn){Ut[Gn]===void 0&&nn[Gn]!==void 0&&(Ut[Gn]=nn[Gn])}),Ut.showToolBarHelp===void 0&&(Ut.showToolBarHelp=Ut.showToolBar)}function te(nn,Tn,Gn){var yi=new XMLHttpRequest;yi.open("GET",nn),yi.onload=function(){Tn(yi.responseText)},yi.onerror=Gn,yi.send()}mn.isHTML5Installed=function(){return!0},mn.getLoadedAppletType=function(){return Me},mn.setPreviewImage=function(nn,Tn,Gn){At=nn,at=Tn,dt=Gn},mn.removeExistingApplet=function(nn,Tn){var Gn;typeof nn=="string"&&(nn=document.getElementById(nn)),Me=null;var yi=null;for(Gn=0;Gn<nn.childNodes.length;Gn++){var Je=nn.childNodes[Gn],Le=Je.className;Le==="applet_screenshot"?Tn?(Je.style.display="block",Me="screenshot"):Je.style.display="none":Le!=="applet_scaler prerender"&&(nn.removeChild(Je),yi=Le&&Le.indexOf("appletParameters")!=-1?Je.id:null,Gn--)}var tn=Ut.id!==void 0?Ut.id:yi,ti=window[tn];ti&&typeof ti.getBase64=="function"&&(ti.remove(),window[tn]=null)},mn.refreshHitPoints=function(){if(kt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var nn=mn.getAppletObject();return nn&&typeof nn.recalculateEnvironments=="function"?(nn.recalculateEnvironments(),!0):!1},mn.startAnimation=function(){var nn=mn.getAppletObject();return nn&&typeof nn.startAnimation=="function"?(nn.startAnimation(),!0):!1},mn.stopAnimation=function(){var nn=mn.getAppletObject();return nn&&typeof nn.stopAnimation=="function"?(nn.stopAnimation(),!0):!1},mn.getAppletObject=function(){var nn=Ut.id!==void 0?Ut.id:"ggbApplet";return window[nn]},mn.resize=function(){};var we=function(nn,Tn,Gn){var yi=document.createElement("param");yi.setAttribute("name",Tn),yi.setAttribute("value",Gn),nn.appendChild(yi)},pe=function(nn){return nn&&nn!=="false"},Ke=function(nn,Tn,Gn){kt(It)<=4.2&&(Gn=!0);var yi=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==It||ggbHTML5LoadedCodebaseIsWebSimple&&!et)&&(yi=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Je=document.createElement("div");Je.classList.add("appletParameters","notranslate");var Le=Tn.width,tn=Tn.height;if(Tn.disableAutoScale=Tn.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Tn.disableAutoScale,Tn.width!==void 0)if(kt(It)<=4.4)pe(Tn.showToolBar)&&(Tn.height-=7),pe(Tn.showAlgebraInput)&&(Tn.height-=37),Tn.width<605&&pe(Tn.showToolBar)&&(Tn.width=605,Le=605);else{var ti=100;(pe(Tn.showToolBar)||pe(Tn.showMenuBar))&&(Tn.hasOwnProperty("customToolBar")&&(Tn.customToolbar=Tn.customToolBar),ti=pe(Tn.showMenuBar)?245:155),Le<ti&&(Tn.width=ti,Le=ti)}Je.style.border="none",Je.style.display="inline-block";for(var jn in Tn)Tn.hasOwnProperty(jn)&&jn!=="appletOnLoad"&&Je.setAttribute("data-param-"+jn,Tn[jn]);gt&&Je.setAttribute("data-param-fontscssurl",gt),mn.resize=function(){GGBAppletUtils.responsiveResize(nn,Tn)},window.addEventListener("resize",function(Ze){mn.resize()});var Gt=typeof Tn.appletOnLoad=="function"?Tn.appletOnLoad:function(){};if(!Gn&&Tn.width!==void 0){Tn.hasOwnProperty("showSplash")||Je.setAttribute("data-param-showSplash","false");var Ft=nn.querySelector(".applet_scaler.prerender"),mt=Ft!==null;if(mt)var vt=Ft.querySelector(".ggb_preview");else{var vt=Nn(Le,tn,Tn.borderColor,!1);Ft=document.createElement("div"),Ft.className="applet_scaler",Ft.style.position="relative",Ft.style.display="block",Ft.style.width=Le+"px",Ft.style.height=tn+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ft,"66%"),kt(It)>=5?(Tn.appletOnLoad=function(Ze){var hn=nn.querySelector(".ggb_preview");hn&&hn.parentNode.removeChild(hn),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Ft),window.GGBT_wsf_view&&$(window).trigger("resize"),Gt(Ze)},mt||Ft.appendChild(vt)):Je.appendChild(vt),Ft.appendChild(Je),mt||nn.appendChild(Ft),setTimeout(function(){mn.resize()},1)}else{var Lt=document.createElement("div");Lt.className="applet_scaler",Lt.style.position="relative",Lt.style.display="block",Lt.appendChild(Je),nn.appendChild(Lt),Tn.appletOnLoad=function(Ze){mn.resize(),Gt(Ze)}}function Ct(Ze,hn){hn&&typeof hn.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Ze,hn.appletOnLoad):renderGGBElement(Ze),$n("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",hn)}function _t(Ze,hn){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Ze,params:hn}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(In){Ct(In.article,In.params)}),html5AppletsToProcess=null)},kt(It)<5&&(Ze.className+=" geogebraweb")):Ct(Ze,hn)}if(yi){scriptLoadStarted=!0;for(var Pe=0;Pe<Je.childNodes.length;Pe++){var ze=Je.childNodes[Pe].tagName;ze==="TABLE"&&(Je.removeChild(Je.childNodes[Pe]),Pe--)}if(ggbHTML5LoadedScript!==null){var wn=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');wn!=null&&wn.parentNode.removeChild(wn)}var Ge=document.createElement("script"),Te=function(){_t(Je,Tn)};Ge.src=Ie+nt,ggbHTML5LoadedCodebaseIsWebSimple=et,ggbHTML5LoadedCodebaseVersion=It,ggbHTML5LoadedScript=Ge.src,$n("GeoGebra HTML5 codebase loaded: '"+Ie+"'.",Tn),!ie&&(!Rt||Rt=="5.0")?(et?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Te()):Ie.requirejs?__webpack_require__.e(7963).then(function(){var Ze=[__webpack_require__(87963)];Te.apply(null,Ze)}.bind(this)).catch(__webpack_require__.oe):(Ge.onload=Te,nn.appendChild(Ge))}else _t(Je,Tn);Tn.height=tn,Tn.width=Le},_e=function(nn,Tn,Gn){var yi=Nn(Tn.width,Tn.height,Tn.borderColor,Gn),Je=document.createElement("div");Je.style.position="relative",Je.style.display="block",Je.style.width=Tn.width+"px",Je.style.height=Tn.height+"px",Je.className="applet_screenshot applet_scaler"+(Gn?" applet_screenshot_play":""),Je.appendChild(yi);var Le=GGBAppletUtils.getScale(Tn,nn,Gn);Gn?(nn.appendChild(yn()),window.GGBT_wsf_view||(nn.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Je,"66%"),nn.appendChild(Je),Le!==1&&!isNaN(Le)&&(GGBAppletUtils.scaleElement(Je,Le),Je.style.width=Tn.width+"px",Je.style.height=Tn.height+"px",Je.parentNode.style.width=Tn.width*Le+"px",Je.parentNode.style.height=Tn.height*Le+"px"),mn.resize=function(){en(nn,yi,Je,Gn)},window.addEventListener("resize",function(tn){mn.resize()}),mn.resize()};function en(nn,Tn,Gn,yi){if(nn.contains(Tn)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(nn.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(nn)}var Je=GGBAppletUtils.getScale(Ut,nn,yi);Gn.parentNode!==null&&(!isNaN(Je)&&Je!==1?(GGBAppletUtils.scaleElement(Gn,Je),Gn.parentNode.style.width=Ut.width*Je+"px",Gn.parentNode.style.height=Ut.height*Je+"px"):(GGBAppletUtils.scaleElement(Gn,1),Gn.parentNode.style.width=Ut.width+"px",Gn.parentNode.style.height=Ut.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(nn),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}mn.onExitFullscreen=function(nn,Tn){Tn.appendChild(nn)};var dn=function(nn,Tn,Gn,yi){_e(nn,Tn,!0);for(var Je=function(){var ti=[];for(tn=0;tn<nn.childNodes.length;tn++)ti.push(nn.childNodes[tn]);if(window.GGBT_wsf_view){var jn=window.GGBT_wsf_view.renderFullScreen(nn,Tn.id),Gt=document.getElementById("fullscreencontainer"),Ft=jQuery(nn).find(".fullscreencontent");Ft.length>0?(jn.remove(),Ft.attr("id","fullscreencontent").show(),jQuery(Gt).append(Ft),window.dispatchEvent(new Event("resize"))):Ke(jn,Tn,!1),window.GGBT_wsf_view.launchFullScreen(Gt)}else Me=yi,Ke(nn,Tn,!1);if(!window.GGBT_wsf_view)for(tn=0;tn<ti.length;tn++)nn.removeChild(ti[tn])},Le=nn.getElementsByClassName("ggb_preview_play"),tn=0;tn<Le.length;tn++)Le[tn].addEventListener("click",Je,!1),Le[tn].addEventListener("ontouchstart",Je,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(nn),Ot()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},yn=function(){var nn=document.createElement("div");if(nn.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Tn='.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");}',Gn=document.createElement("style");Gn.styleSheet?Gn.styleSheet.cssText=Tn:Gn.appendChild(document.createTextNode(Tn)),document.getElementsByTagName("head")[0].appendChild(Gn)}return nn},Nn=function(nn,Tn,Gn,yi){var Je=document.createElement("div");Je.className="ggb_preview",Je.style.position="absolute",Je.style.zIndex="90",Je.style.width=nn-2+"px",Je.style.height=Tn-2+"px",Je.style.top="0px",Je.style.left="0px",Je.style.overflow="hidden",Je.style.backgroundColor="white";var Le="lightgrey";Gn!==void 0&&(Gn==="none"?Le="transparent":Le=Gn),Je.style.border="1px solid "+Le;var tn=document.createElement("img");if(tn.style.position="relative",tn.style.zIndex="1000",tn.style.top="-1px",tn.style.left="-1px",At!==null&&tn.setAttribute("src",At),tn.style.opacity=.7,at!==null){var ti,jn,Gt;if(!yi){ti=document.createElement("img"),ti.style.position="absolute",ti.style.zIndex="1001",ti.style.opacity=1,tn.style.opacity=.3,jn=360,jn>nn/4*3&&(jn=nn/4*3),Gt=jn/5.8,ti.setAttribute("src",at),ti.setAttribute("width",jn),ti.setAttribute("height",Gt);var Ft=(nn-jn)/2,mt=(Tn-Gt)/2;ti.style.left=Ft+"px",ti.style.top=mt+"px",Je.appendChild(ti)}}return Je.appendChild(tn),Je},Kn=function(nn){return nn=nn.toLowerCase(),nn==="html5"||nn==="screenshot"?nn:"html5"},me=["web","webSimple","web3d","tablet","tablet3d","phone"],ee=function(nn,Tn){if(It=nn,Tn){gn(It,!0);return}var Gn=!Xt;if(Gn){var yi=kt(It);!isNaN(yi)&&yi<4.4&&(Gn=!1)}var Je,Le;window.location.protocol.substr(0,4)==="http"?Je=window.location.protocol:Je="http:";var tn=It.indexOf("//");tn>0?Le=It:tn===0?Le=Je+It:Le="https://www.geogebra.org/apps/5.2.814.0/";for(var ti in me)if(It.slice(me[ti].length*-1)===me[ti]||It.slice((me[ti].length+1)*-1)===me[ti]+"/"){gn(Le,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Gn&&!St.is3D&&!St.AV&&!St.SV&&!St.CV&&!St.EV2&&!St.CP&&!St.PC&&!St.DA&&!St.FI&&!St.PV&&!pe(Ut.showToolBar)&&!pe(Ut.showMenuBar)&&!pe(Ut.showAlgebraInput)&&!pe(Ut.enableRightClick)&&(!Ut.appName||Ut.appName=="classic")?Le+="webSimple/":Le+="web3d/",gn(Le,!1)},gn=function(nn,Tn){if(nn.requirejs){Ie=nn;return}nn.slice(-1)!=="/"&&(nn+="/"),Ie=nn,Tn===null&&(Tn=nn.indexOf("http")===-1),Yt=Tn,nt="web.nocache.js",et=!1;var Gn=Ie.split("/");Gn.length>1&&(!Tn&&Gn[Gn.length-2]==="webSimple"?(nt="webSimple.nocache.js",et=!0):me.indexOf(Gn[Gn.length-2])>=0&&(nt=Gn[Gn.length-2]+".nocache.js")),Gn=nn.split("/"),It=Gn[Gn.length-3],It.substr(0,4)==="test"?It=It.substr(4,1)+"."+It.substr(5,1):(It.substr(0,3)==="war"||It.substr(0,4)==="beta")&&(It="5.0");var yi=parseFloat(It);yi!==NaN&&yi<5&&nn.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+yi+" is deprecated. Using version latest instead."),ee("5.0",Tn))},$n=function(nn,Tn){window.console&&window.console.log&&(!Tn||typeof Tn.showLogging=="undefined"||Tn.showLogging&&Tn.showLogging!=="false")&&console.log(nn)};Ut.material_id!==void 0?Zt(Yn):Yn();function Yn(){var nn=je;Rt!==null?nn=Rt:parseFloat(nn)<5&&(nn="5.0"),ee(nn,!1),ie!==null&&gn(ie,Yt),fe=!0}return mn},GGBAppletUtils=function(){"use strict";function mn(){return window.GGBT_wsf_edit!==void 0}function je(fe,Rt){Rt!=1?(fe.style.transformOrigin="0% 0% 0px",fe.style.webkitTransformOrigin="0% 0% 0px",fe.style.transform="scale("+Rt+","+Rt+")",fe.style.webkitTransform="scale("+Rt+","+Rt+")",fe.style.maxWidth="initial",fe.querySelector(".ggb_preview")!==null&&(fe.querySelector(".ggb_preview").style.maxWidth="initial"),fe.querySelectorAll(".ggb_preview img")[0]!==void 0&&(fe.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),fe.querySelectorAll(".ggb_preview img")[1]!==void 0&&(fe.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(fe.style.transform="none",fe.style.webkitTransform="none")}function Ut(fe,Rt,ie,ae,de,zt){var Ie=null;if(zt!=null&&zt!="")for(var Yt=fe.parentNode;Yt!=null;)if((" "+Yt.className+" ").indexOf(" "+zt+" ")>-1){Ie=Yt;break}else Yt=Yt.parentNode;var Me=0,It=0,nt=0,et=0,At=0,at=0,dt=0;if(Ie)Me=Ie.offsetWidth,It=Math.max(ae?Ie.offsetWidth:0,Ie.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(Me=Math.min(window.innerWidth,document.documentElement.clientWidth),It=Math.min(window.innerHeight,document.documentElement.clientHeight),nt=Me):(Me=window.innerWidth,It=window.innerHeight,nt=window.innerWidth),fe){var gt=fe.getBoundingClientRect();gt.left>0&&gt.left<=Me&&(de===void 0||!de)&&(document.dir==="rtl"?(At=Me-gt.width-gt.left,at=nt<=480?10:30):(at=gt.left,At=nt<=480?10:30),et=at+At)}if(fe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var xt=fe.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(et=40,dt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(et=0,dt=40)}}return fe&&((ie===void 0||!ie)&&Rt>0&&Rt+et<Me?Me=Rt:Me-=et,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ie===void 0||!ie)&&(It-=dt)),{width:Me,height:It}}function St(fe,Rt,ie,ae,de){if(fe.isScreenshoGenerator)return 1;var zt=ae!==void 0&&ae,Ie=fe.noScaleMargin!=null&&fe.noScaleMargin,Yt=function(xt){return xt&&xt!=="false"},Me=Yt(fe.autoHeight),It=Ut(Rt,fe.width,ie,Me,zt&&window.GGBT_wsf_view||Ie,de),nt=parseInt(It.width),et=fe.width,At=fe.height;if(et===void 0){var at=Rt.querySelector(".appletParameters");at&&(et=at.offsetWidth,At=at.offsetHeight)}var dt=nt/et,gt=zt?1:It.height/At;return ie!==void 0&&!ie&&(dt=Math.min(1,dt),gt=Math.min(1,gt)),Math.min(dt,gt)}function Xt(fe,Rt,ie){var ae=1,de,zt=!1;if(fe.hasOwnProperty("allowUpscale")&&(zt=fe.allowUpscale),fe.hasOwnProperty("scale")&&(ae=parseFloat(fe.scale),(isNaN(ae)||ae===null||ae===0)&&(ae=1),ae>1&&(zt=!0)),Rt&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(zt=!0),!(fe.hasOwnProperty("disableAutoScale")&&fe.disableAutoScale))de=St(fe,Rt,zt,ie,fe.scaleContainerClass);else return ae;return zt&&(!fe.hasOwnProperty("scale")||ae===1)?de:Math.min(ae,de)}function Ae(fe){var Rt=Math.min(window.innerWidth,document.documentElement.clientWidth),ie=Math.min(window.innerHeight,document.documentElement.clientHeight),ae=fe.getBoundingClientRect(),de=(Rt-ae.width)/2,zt=(ie-ae.height)/2;zt<0&&(zt=0),fe.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(de<40?fe.style.left="40px":fe.style.left=de+"px",fe.style.top=zt+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(zt<40?fe.style.top="40px":fe.style.top=zt+"px",fe.style.left=de+"px")}function xe(fe,Rt){var ie=fe.querySelector(".appletParameters");if(ie){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Rt.id!==ie.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(fe)}if(ie.parentElement&&/fullscreen/.test(ie.parentElement.className))return;var ae=Xt(Rt,fe);mn()&&ie.setAttribute("data-param-scale",ae);for(var de=null,zt=0;zt<fe.childNodes.length;zt++)if(fe.childNodes[zt].className!==void 0&&fe.childNodes[zt].className.match(/^applet_scaler/)){de=fe.childNodes[zt];break}if(de!==null&&de.querySelector(".noscale")!==null)return;var Ie=Rt.id!==void 0?Rt.id:"ggbApplet",Yt=window[Ie];(Yt==null||!Yt.recalculateEnvironments)&&de!==null&&!de.className.match(/fullscreen/)&&(de.parentNode.style.transform="",!isNaN(ae)&&ae!==1?(de.parentNode.style.width=Rt.width*ae+"px",de.parentNode.style.height=Rt.height*ae+"px",je(de,ae)):(je(de,1),de.parentNode.style.width=Rt.width+"px",de.parentNode.style.height=Rt.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Ae(fe),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(ie).parents(".content-added-content"))}}return{responsiveResize:xe,isFlexibleWorksheetEditor:mn,positionCenter:Ae,getScale:Xt,scaleElement:je}}();__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 mn=n.location.search;return mn.indexOf(J)!=-1||mn.indexOf(K)!=-1}function q(mn,je){}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(mn){var je=s[L].bindings;s[L].bindings=function(){for(var Ut=je?je():{},St=mn[webModule.__softPermutationId],Xt=O;Xt<St.length;Xt++){var Ae=St[Xt];Ut[Ae[O]]=Ae[P]}return Ut}};var t;function u(){return v(),t}function v(){if(!t){var mn=o.createElement(Q);if(mn.id=L,mn.style.cssText=R+S,mn.tabIndex=-1,o.body.appendChild(mn),t=mn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var je=document.compatMode==U?V:W;t.write(je+X),t.close()}}}function w(mn){function je(St){function Xt(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Ae=Xt();if(Ae){St();return}function xe(){if(!Ae){if(!Xt())return;Ae=!0,St(),o.removeEventListener&&o.removeEventListener(Z,xe,!1),fe&&clearInterval(fe)}}o.addEventListener&&o.addEventListener(Z,xe,!1);var fe=setInterval(function(){xe()},$)}function Ut(St){var Xt=u(),Ae=Xt.body,xe=Xt.createElement(_);xe.language=ab,xe.crossOrigin=W,xe.src=St,webModule.__errFn&&(xe.onerror=function(){webModule.__errFn(L,new Error(bb+St))}),Ae.appendChild(xe)}je(function(){Ut(mn)})}webModule.__startLoadingFragment=function(mn){return C(mn)},webModule.__installRunAsyncCode=function(mn){var je=u(),Ut=je.body,St=je.createElement(_);St.language=ab,St.text=mn,Ut.appendChild(St),Ut.removeChild(St)};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(mn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(mn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(mn){var je=c[mn];return je==null?null:je},r=d,webModule.__errFn=e}function B(){function mn(fe){var Rt=fe.lastIndexOf(rb);Rt==-1&&(Rt=fe.length);var ie=fe.indexOf(sb);ie==-1&&(ie=fe.length);var ae=fe.lastIndexOf(tb,Math.min(ie,Rt));return ae>=O?fe.substring(O,ae+P):W}function je(fe){if(!fe.match(/^\w+:\/\//)){var Rt=o.createElement(ub);Rt.src=fe+vb,fe=mn(Rt.src)}return fe}function Ut(){var fe=__gwt_getMetaProperty(wb);return fe!=null?fe:W}function St(){for(var fe=o.getElementsByTagName(_),Rt=O;Rt<fe.length;++Rt)if(fe[Rt].src.indexOf(xb)!=-1)return mn(fe[Rt].src);return W}function Xt(){var fe=o.getElementsByTagName(yb);return fe.length>O?fe[fe.length-P].href:W}function Ae(){var fe=o.location;return fe.href==fe.protocol+zb+fe.host+fe.pathname+fe.search+fe.hash}var xe=Ut();return xe==W&&(xe=St()),xe==W&&(xe=Xt()),xe==W&&Ae()&&(xe=mn(o.location.href)),xe=je(xe),xe}function C(mn){return mn.match(/^\//)||mn.match(/^[a-zA-Z]+:\/\//)?mn:webModule.__moduleBase+mn}function D(){var mn=[],je=O,Ut=[],St=[];function Xt(fe){var Rt=St[fe](),ie=Ut[fe];if(Rt in ie)return Rt;var ae=[];for(var de in ie)ae[ie[de]]=de;throw r&&r(fe,ae,Rt),null}if(__gwt_isKnownPropertyValue=function(fe,Rt){return Rt in Ut[fe]},webModule.__getPropMap=function(){var fe={};for(var Rt in Ut)Ut.hasOwnProperty(Rt)&&(fe[Rt]=Xt(Rt));return fe},webModule.__computePropValue=Xt,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Ae;try{Ae=Cb;var xe=Ae.indexOf(Db);xe!=-1&&(je=parseInt(Ae.substring(xe+P),$),Ae=Ae.substring(O,xe))}catch(fe){}return webModule.__softPermutationId=je,C(Ae+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(mn,je,Ut){"use strict";Ut.d(je,{Ax:function(){return xe},Ds:function(){return fe},KI:function(){return ie},SI:function(){return Ae},f1:function(){return Xt}});var St=Ut(346);function Xt(ae){let de=!0;if(ae.length>0){for(let zt=0;zt<ae.length;zt++)if(ae[zt].compile_success==0||!ae[zt].compile_success){de=!1;break}}else de=!1;return de}function Ae(ae,de=""){let zt=[];for(let Ie=0;Ie<ae.length;Ie++){let Yt=ae[Ie],Me=de?`${de}/${Yt.name}`:`${Yt.name}`;zt.push({title:Yt.name,type:Yt.type,isLeaf:Yt.type!=="tree",key:Me})}return zt}function xe(ae,de,zt){for(let Ie=0;Ie<ae.length;Ie++){let Yt=ae[Ie];if(Yt.key===de){Yt.children=zt;break}Yt.children&&xe(Yt.children,de,zt)}return ae}function fe(ae,de,zt){let Ie;return function(){let Yt=this,Me=arguments,It=function(){Ie=null,zt||ae.apply(Yt,Me)},nt=zt&&!Ie;clearTimeout(Ie),Ie=setTimeout(It,de),nt&&ae.apply(Yt,Me)}}const Rt=!0,ie=St.Z.API_SERVER},1546:function(mn,je,Ut){"use strict";Ut.d(je,{ij:function(){return dt},_s:function(){return at},Uf:function(){return At},ZP:function(){return xt}});var St=Ut(59301),Xt={flex_box_center:"flex_box_center___swvFl",flex_space_between:"flex_space_between___AqPFV",flex_box_vertical_center:"flex_box_vertical_center___XWInJ",flex_box_center_end:"flex_box_center_end___GB61t",flex_box_column:"flex_box_column___dJnz1",analysis:"analysis___xyV_c",title:"title___DQ3VK",itemWrap:"itemWrap___vFE5r",item:"item___NjeOt",list:"list___BbMrm",wrap:"wrap___UQTTb",img:"img___tNvUo",tips:"tips___Eu4wH",footer:"footer___ZbR9W",noData:"noData___mLlw0"},Ae=Ut(92310),xe=Ut.n(Ae),fe=Ut(42441),Rt=Ut(25399),ie=Ut(458),ae=Ut(29787),de=Ut(28426),zt=Ut(346),Ie=Object.defineProperty,Yt=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,nt=(kt,Ht,Ot)=>Ht in kt?Ie(kt,Ht,{enumerable:!0,configurable:!0,writable:!0,value:Ot}):kt[Ht]=Ot,et=(kt,Ht)=>{for(var Ot in Ht||(Ht={}))Me.call(Ht,Ot)&&nt(kt,Ot,Ht[Ot]);if(Yt)for(var Ot of Yt(Ht))It.call(Ht,Ot)&&nt(kt,Ot,Ht[Ot]);return kt};const At=(kt={})=>{var Ht,Ot,Zt,Wt;let te=(Ht=kt==null?void 0:kt.emotion)==null?void 0:Ht.map(_e=>et({value:_e==null?void 0:_e.rate},_e)),we=(Ot=kt==null?void 0:kt.focus)==null?void 0:Ot.map(_e=>et({value:_e==null?void 0:_e.rate},_e)),pe=(Zt=kt==null?void 0:kt.action)==null?void 0:Zt.map(_e=>et({value:_e==null?void 0:_e.rate},_e)),Ke=(Wt=kt==null?void 0:kt.intention)==null?void 0:Wt.map(_e=>et({value:_e==null?void 0:_e.rate},_e));return[{title:"\u8868\u60C5\u5360\u6BD4",color:["#f7ca2e","#4ccf71","#3791ee","#f9ac95","#4f74ee","#f0e999"],data:te||[]},{title:"\u4E13\u6CE8\u5EA6\u5360\u6BD4",color:["#4f74ee","#f9ac95","#9cb5fe","#eaa170","#3791ee","#a39bed"],data:we||[]},{title:"\u884C\u4E3A\u5360\u6BD4\u60C5\u51B5",color:["#5eca9c","#a39bed","#f68238","#f0e999","#eaa170","#f9ac95"],data:pe||[]},{title:"\u610F\u56FE\u5360\u6BD4\u60C5\u51B5",color:["#eaa170","#739fcb","#f0e999","#f9ac95","#4f74ee","#5eca9c"],data:Ke||[]}]},at=({className:kt,dataSource:Ht=[],col:Ot=4,right:Zt,bottom:Wt=23,precision:te=0,wrapWidth:we=1200})=>{const pe=(_e="",en,dn="--")=>_e?(_e==null?void 0:_e.length)>en?(_e==null?void 0:_e.slice(0,en-1))+"...":_e:dn,Ke=Math.floor((we-(Ot-1)*Zt)/Ot);return St.createElement("div",{className:xe()(Xt.list,kt)},!!(Ht!=null&&Ht.length)&&(Ht==null?void 0:Ht.map((_e,en)=>{const{cover_pic:dn,created_at:yn,emotion:Nn,action:Kn,intention:me,focus:ee}=_e;return St.createElement("div",{key:en,className:Xt.wrap,style:{width:Ke,marginRight:(1+en)%Ot===0?0:Zt+te,marginBottom:Wt}},St.createElement("div",{className:Xt.img},St.createElement("img",{src:`${zt.Z.API_SERVER}${dn}`}),St.createElement("div",{className:Xt.tips},St.createElement("div",null,St.createElement("i",{className:"iconfont icon-paisheshijian mr5 font14"})," \u62CD\u6444\u65F6\u95F4"),St.createElement("span",null,yn))),St.createElement("div",{className:Xt.footer},St.createElement("ul",null,St.createElement("li",null,St.createElement("i",{className:"iconfont icon-biaoqing"}),St.createElement("span",null,"\u8868\u60C5\uFF1A",St.createElement(Rt.Z,{title:Nn},St.createElement("span",{className:"c-grey-333"},pe(Nn,4))))),St.createElement("li",null,St.createElement("i",{className:"iconfont icon-hangwei"}),St.createElement("span",null,"\u884C\u4E3A\uFF1A",St.createElement(Rt.Z,{title:Kn},St.createElement("span",{className:"c-grey-333"},pe(Kn,4)))))),St.createElement("ul",null,St.createElement("li",null,St.createElement("i",{className:"iconfont icon-yitu"}),St.createElement("span",null,"\u610F\u56FE\uFF1A",St.createElement(Rt.Z,{title:me},St.createElement("span",{className:"c-grey-333"},pe(me,4))))),St.createElement("li",null,St.createElement("i",{className:"iconfont icon-zhuangtai"}),St.createElement("span",null,"\u4E13\u6CE8\u5EA6\uFF1A",St.createElement(Rt.Z,{title:ee},St.createElement("span",{className:"c-grey-333"},pe(ee,3))))))))})))},dt=({className:kt,style:Ht,title:Ot,hideBar:Zt=!1,children:Wt,customText:te="",noDataText:we="",emptyData:pe=[],loading:Ke,actionAnalysis:_e})=>{var en,dn;const yn=((en=pe==null?void 0:pe[0])==null?void 0:en.every(Kn=>{var me;return!((me=Kn==null?void 0:Kn.data)!=null&&me.length)}))&&!((dn=pe==null?void 0:pe[1])!=null&&dn.length)||!_e,Nn=_e?we:te;return St.createElement(ie.Z,{loading:Ke,active:!0},yn&&St.createElement("div",{className:xe()(Xt.noData,kt),style:Ht},!!Ot&&St.createElement("div",{className:Xt.title},!Zt&&St.createElement("b",null),St.createElement("span",null,Ot)),St.createElement("div",{className:Xt.itemWrap},St.createElement(de.Z,{customText:Nn}))),!yn&&Wt)};var xt=({className:kt,style:Ht,data:Ot=[],title:Zt,hideBar:Wt=!1,loading:te=!1})=>St.createElement("div",{className:xe()(Xt.analysis,kt),style:Ht},!!Zt&&St.createElement("div",{className:Xt.title},!Wt&&St.createElement("b",null),St.createElement("span",null,Zt)),St.createElement(ae.Z,{spinning:te},St.createElement("div",{className:Xt.itemWrap},Ot==null?void 0:Ot.map((we,pe)=>St.createElement("div",{className:Xt.item,key:pe},St.createElement(fe.Z,{option:{tooltip:{trigger:"item",formatter:"{a} <br/>{b}: {c}%"},title:{left:"center",bottom:15,text:we==null?void 0:we.title},legend:{top:10,right:10,orient:"vertical",show:!0,align:"left",icon:"circle",itemWidth:10,itemHeight:10,formatter:function(Ke){for(let _e in we==null?void 0:we.data)if(Ke==(we==null?void 0:we.data[_e].name))return Ke+" "+(we==null?void 0:we.data[_e].value)+"%"},textStyle:{color:"#767676",fontSize:12}},color:we==null?void 0:we.color,series:[{type:"pie",radius:["20%","35%"],center:["20%","40%"],avoidLabelOverlap:!1,label:{show:!1},labelLine:{show:!1},data:we==null?void 0:we.data}]},style:{height:145}}))))))},85788:function(mn,je,Ut){"use strict";var St=Ut(86204),Xt=Ut.n(St),Ae=Object.defineProperty,xe=(ae,de,zt)=>de in ae?Ae(ae,de,{enumerable:!0,configurable:!0,writable:!0,value:zt}):ae[de]=zt,fe=(ae,de,zt)=>xe(ae,typeof de!="symbol"?de+"":de,zt),Rt=(ae,de,zt)=>new Promise((Ie,Yt)=>{var Me=et=>{try{nt(zt.next(et))}catch(At){Yt(At)}},It=et=>{try{nt(zt.throw(et))}catch(At){Yt(At)}},nt=et=>et.done?Ie(et.value):Promise.resolve(et.value).then(Me,It);nt((zt=zt.apply(ae,de)).next())});class ie extends St.EventEmitter{constructor(de,zt){super(),fe(this,"url"),fe(this,"body"),fe(this,"fullContent",""),fe(this,"controller",null),fe(this,"buffer",""),this.url=de,this.body=zt}startStream(){return Rt(this,null,function*(){this.controller=new AbortController;const{signal:de}=this.controller;try{const zt=yield fetch(this.url,{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},credentials:"include",body:JSON.stringify(this.body),signal:de});if(!zt.ok)throw new Error(`\u8BF7\u6C42\u5931\u8D25: ${zt.status}`);const Ie=zt.headers.get("content-type");if(!Ie)throw new Error("\u54CD\u5E94\u5934\u7F3A\u5C11 content-type");if(Ie.includes("application/json")){const It=yield zt.json();this.emit("error",It);return}if(!Ie.includes("text/event-stream"))throw new Error("\u54CD\u5E94\u6570\u636E\u683C\u5F0F\u9519\u8BEF");const Yt=zt.body.getReader(),Me=new TextDecoder("utf-8");for(;;){const{done:It,value:nt}=yield Yt.read();if(It)break;const et=Me.decode(nt,{stream:!0});this.buffer+=et;const At=this.buffer.split(`
`);this.buffer=At.pop()||"";for(const at of At)if(at.startsWith("data:")){const dt=at.slice(5).trim();if(dt==="[DONE]")break;try{const gt=JSON.parse(dt);gt.data&&this.handleData(gt.data)}catch(gt){this.buffer=at+`
`+this.buffer,console.error("\u89E3\u6790 JSON \u5931\u8D25:",gt)}}}this.emit("done",this.fullContent)}catch(zt){zt.name==="AbortError"?this.emit("cancelled",this.fullContent):this.emit("error",zt.message)}})}handleData(de){de.content&&(this.fullContent+=de.content,this.emit("data",{chunk:de,full:this.fullContent}))}cancelRequest(){var de;(de=this.controller)==null||de.abort()}}je.Z=ie},23344:function(mn,je,Ut){"use strict";Ut.d(je,{Z:function(){return nt}});var St=Ut(59301),Xt={flex_box_center:"flex_box_center___A3pzf",flex_space_between:"flex_space_between___JBoa5",flex_box_vertical_center:"flex_box_vertical_center___MJuIO",flex_box_center_end:"flex_box_center_end___OcjUA",flex_box_column:"flex_box_column___zSH4A",list:"list___KhJas",middle:"middle___IjlYi",row:"row___GGtIx",title:"title___o_xqf",size:"size___OVRoL",download:"download___ZLcIH",preview:"preview___gi0kI",annotation:"annotation___KVSwj"},Ae=Ut(92310),xe=Ut.n(Ae),fe=Ut(45677),Rt=Ut(9507),ie=Ut(51257),ae=Ut(346),de=Ut(38986),zt=Ut(48790),Ie=Ut(25690),Yt=Ut(6767),Me=(et,At,at)=>new Promise((dt,gt)=>{var xt=Ot=>{try{Ht(at.next(Ot))}catch(Zt){gt(Zt)}},kt=Ot=>{try{Ht(at.throw(Ot))}catch(Zt){gt(Zt)}},Ht=Ot=>Ot.done?dt(Ot.value):Promise.resolve(Ot.value).then(xt,kt);Ht((at=at.apply(et,At)).next())});const It=({className:et,style:At,dataSource:at=[],authority:dt=!1,callback:gt,showDimensions:xt=!0,classroomList:kt})=>{var Ht;const[Ot,Zt]=(0,St.useState)({content:"",type:""}),[Wt,te]=(0,St.useState)({}),[we,pe]=(0,St.useState)(!1),[Ke,_e]=(0,St.useState)({title:"",visible:!1,src:"",snapshotData:{}}),en=(0,St.useRef)(),dn=me=>Me(void 0,null,function*(){if(te(me),me.file_type==="txt"){const ee=yield(0,de.ZP)(me.url,{method:"get",headers:{"Content-Type":"application/xml"}});en.current=ee}Zt({type:me.file_type,content:ae.Z.API_SERVER+me.url})}),yn=me=>{var ee;_e({visible:!0,src:ae.Z.API_SERVER+me.url,id:me.id,title:me.title,snapshotData:(ee=me==null?void 0:me.subitem)==null?void 0:ee.settings})},Nn=me=>Me(void 0,null,function*(){var ee;Zt({type:me.file_type,content:ae.Z.API_SERVER+((ee=me==null?void 0:me.subitem)==null?void 0:ee.url)})}),Kn=()=>{gt(),_e({visible:!1})};return at!=null&&at.length?St.createElement(St.Fragment,null,St.createElement("div",{className:xe()(Xt.list,et),style:At},at.map((me,ee)=>{var gn,$n,Yn;return St.createElement("div",{key:ee,className:Xt.row},St.createElement("div",{className:Xt.title,onClick:()=>dn(me)},St.createElement("i",{className:"iconfont icon-fujian1"}),St.createElement("span",{title:me.title},me.title)),St.createElement("div",{className:Xt.size},me.filesize),St.createElement("div",{className:Xt.download,onClick:()=>{var nn,Tn;if((0,zt.Rm)()&&!((nn=kt.AssistantObject.normal)!=null&&nn.can_download)){Yt.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}(0,ie.Nd)("",`${ae.Z.API_SERVER}${(Tn=me.url)==null?void 0:Tn.replace("disposition=inline","")}`)}},St.createElement("i",{className:"iconfont icon-xiazai4"}),"\u4E0B\u8F7D"),!["other","download"].includes(me==null?void 0:me.file_type)&&St.createElement("div",{className:Xt.preview,onClick:()=>dn(me)},St.createElement("i",{className:"iconfont icon-yulan"}),"\u9884\u89C8"),["image"].includes(me==null?void 0:me.file_type)&&xt&&(dt?St.createElement("div",{className:Xt.annotation,onClick:()=>yn(me)},St.createElement("i",{className:"iconfont icon-pizhu"}),(gn=me.subitem)!=null&&gn.id?"\u4FEE\u6539\u6279\u6CE8":"\u6279\u6CE8"):(($n=me.subitem)==null?void 0:$n.id)&&St.createElement("div",{className:Xt.annotation,onClick:()=>Nn(me)},St.createElement("i",{className:"iconfont icon-chakanlaoshipizhu1"}),"\u67E5\u770B\u8001\u5E08\u6279\u6CE8")),["image"].includes(me==null?void 0:me.file_type)&&((Yn=me.subitem)==null?void 0:Yn.id)&&St.createElement("div",{className:Xt.download,style:{marginLeft:20},onClick:()=>{var nn,Tn;(0,ie.Nd)("",`${ae.Z.API_SERVER}${(Tn=(nn=me==null?void 0:me.subitem)==null?void 0:nn.url)==null?void 0:Tn.replace("disposition=inline","")}`)}},St.createElement("i",{className:"iconfont icon-xiazai4"}),"\u4E0B\u8F7D\u6279\u6CE8\u6587\u4EF6"),["office"].includes(me==null?void 0:me.file_type)&&(0,zt.eB)()&&["xlsx","docx","pptx"].includes(me==null?void 0:me.file_sub)&&xt&&St.createElement("div",{className:Xt.annotation,onClick:()=>{pe(!0),dn(me)}},St.createElement("i",{className:"iconfont icon-pizhu"}),me.is_edit?"\u4FEE\u6539\u6279\u6CE8":"\u6279\u6CE8"),me.is_edit&&(0,zt.dE)()&&xt&&St.createElement("div",{className:Xt.annotation,onClick:()=>{dn(me)}},St.createElement("i",{className:"iconfont icon-sousuo7"}),"\u67E5\u770B\u8001\u5E08\u6279\u6CE8"))})),St.createElement(fe.Z,{close:!0,data:Ot==null?void 0:Ot.content,type:Ot==null?void 0:Ot.type,hasMask:!0,disabledDownload:(0,zt.Rm)()&&!((Ht=kt.AssistantObject.normal)!=null&&Ht.can_download),editOffice:we?"edit":"view",monacoEditor:{value:en.current,language:"txt",onChange:()=>{},options:{readOnly:!0,fontSize:14,minimap:{enabled:!1}}},onImgDimensions:dt&&xt&&Ot.type==="image"?()=>yn(Wt):null,onClose:()=>{gt(),pe(!1),Zt({content:"",type:""})}}),St.createElement(Rt.Z,{onOk:Kn,onClose:()=>_e({visible:!1}),data:Ke,showFullTools:!0})):null};var nt=(0,Ie.connect)(({classroomList:et})=>({classroomList:et}))(It)},9507:function(mn,je,Ut){"use strict";Ut.d(je,{Z:function(){return Ie}});var St=Ut(59301),Xt={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Ae=Ut(92310),xe=Ut.n(Ae),fe=Ut(29787),Rt=Ut(2859),ie=Ut(38986),ae=Ut(51257),de=(Yt,Me,It)=>new Promise((nt,et)=>{var At=gt=>{try{dt(It.next(gt))}catch(xt){et(xt)}},at=gt=>{try{dt(It.throw(gt))}catch(xt){et(xt)}},dt=gt=>gt.done?nt(gt.value):Promise.resolve(gt.value).then(At,at);dt((It=It.apply(Yt,Me)).next())}),Ie=({data:Yt,className:Me,fullWidth:It,style:nt={},onClose:et,onOk:At,showFullTools:at,noAssociationId:dt})=>{const gt=(0,St.useRef)(null),xt=(0,St.useRef)(null),kt=(0,St.useRef)(null),Ht=(0,St.useRef)(null),[Ot,Zt]=(0,St.useState)(!1),[Wt,te]=(0,St.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,St.useEffect)(()=>(kt.current||(kt.current=document.createElement("style"),document.head.appendChild(kt.current)),Yt!=null&&Yt.visible?(document.body.setAttribute("data-custom","y-hidden"),kt.current.innerHTML=" html { overflow-y: hidden; }",Yt!=null&&Yt.src&&we()):(document.body.removeAttribute("data-custom"),kt.current&&(document.head.removeChild(kt.current),kt.current=null)),()=>{document.body.removeAttribute("data-custom"),kt.current&&(document.head.removeChild(kt.current),kt.current=null)}),[Yt==null?void 0:Yt.visible]);const we=()=>de(void 0,null,function*(){Zt(!0),te("\u6B63\u5728\u52A0\u8F7D\u4E2D");const en=yield(0,ae.ZJ)(Yt==null?void 0:Yt.src);gt.current.src="",gt.current.src=en,gt.current.onload=function(){_e()},Zt(!1),te("")}),pe=en=>de(void 0,null,function*(){Zt(!0),te("\u6B63\u5728\u4FDD\u5B58\u4E2D");const dn=yield(0,ie.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Yt.title,file:en.dataUrl}});dn!=null&&dn.id&&!dt?(yield(0,ie.ZP)(`/api/attachments/${Yt.id}/add_subitem.json`,{method:"post",body:{subitem_id:dn==null?void 0:dn.id,settings:JSON.stringify(en.state)}})).status===0&&At():dn!=null&&dn.id&&At(dn),Zt(!1),te("")}),Ke=()=>{const en=document.querySelector('a[href="https://markerjs.com/"]');en&&en.parentNode&&(en.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(yn=>{const Nn=document.querySelector(yn.name);Nn&&Nn.setAttribute("title",yn.title)})},_e=()=>{xt.current=new Rt.hP(gt.current),xt.current.targetRoot=Ht.current,xt.current.addEventListener("render",pe),xt.current.addEventListener("beforeclose",et),at&&(xt.current.availableMarkerTypes=xt.current.ALL_MARKER_TYPES,xt.current.uiStyleSettings.redoButtonVisible=!0,xt.current.uiStyleSettings.notesButtonVisible=!0,xt.current.uiStyleSettings.zoomButtonVisible=!0,xt.current.uiStyleSettings.zoomOutButtonVisible=!0,xt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=xt.current.uiStyleSettings,xt.current.show(),Yt!=null&&Yt.snapshotData&&xt.current.restoreState(Yt.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Ke()},300)};return St.createElement(St.Fragment,null,(Yt==null?void 0:Yt.visible)&&St.createElement(fe.Z,{spinning:Ot,tip:Wt,style:{position:"absolute",width:"100vw"}},St.createElement("div",{ref:Ht,className:xe()(Xt.imageDimensions,Me,It?Xt.fullWidth:""),style:nt},St.createElement("img",{className:Xt.img,ref:gt}))))}},76562:function(mn,je,Ut){"use strict";var St=Ut(59301),Xt=Ut(77019),Ae=Ut(5269),xe=Ut(20554),fe=Ut(99571),Rt=Ut(76902),ie=Ut(99587),ae=Ut(48136),de=Ut(59301);const zt=(0,St.forwardRef)(({callback:Ie,showSaveButton:Yt,value:Me=""},It)=>{const nt=(0,St.useRef)(),et=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],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}`}]}]}],at=xt=>{nt.current.setValue(nt.current.getValue()+" "+xt.value+" ")},dt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:de.createElement(Xt.Z,{className:ie.Z.lists,gutter:[10,10]},et.map((xt,kt)=>de.createElement(Ae.Z,{flex:"110px",className:ie.Z.item},de.createElement("div",null,de.createElement(Rt.Z,{value:`$$${xt.value}$$`}),xt.name),de.createElement("div",{className:ie.Z.children},xt.children.map((Ht,Ot)=>de.createElement("div",{key:Ot},de.createElement("h1",null,Ht.name),de.createElement(Xt.Z,{gutter:[10,10]},Ht.data.map((Zt,Wt)=>de.createElement(Ae.Z,{key:Wt,onClick:()=>at(Zt),className:ie.Z.diamond},de.createElement(Rt.Z,{value:"`$$"+Zt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:de.createElement(Xt.Z,{className:ie.Z.lists,gutter:[10,10]},At.map((xt,kt)=>de.createElement(Ae.Z,{flex:"110px",className:ie.Z.item},de.createElement("div",null,de.createElement(Rt.Z,{value:"`$$"+xt.value+"$$`"}),xt.name),de.createElement("div",{className:ie.Z.children},xt.children.map((Ht,Ot)=>de.createElement("div",{key:Ot},Ht.name&&de.createElement("h1",null,Ht.name),de.createElement(Xt.Z,{gutter:[10,10]},Ht.data.map((Zt,Wt)=>de.createElement(Ae.Z,{key:Wt,onClick:()=>at(Zt),className:ie.Z.diamond},de.createElement(Rt.Z,{value:"`$$"+Zt.value+"$$`"}))))))))))}],gt=()=>{var xt=document.createElement("div");xt.innerHTML=nt.current.getValue();var kt=xt.innerText;return Ie&&Ie(kt),kt};return(0,St.useImperativeHandle)(It,()=>({getData:gt})),de.createElement("div",{className:ie.Z.mathWrap},de.createElement(xe.default,{defaultActiveKey:"1",items:dt}),de.createElement("math-field",{locale:"zh_cn",className:ie.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:nt,style:{width:800,marginTop:30,fontSize:18}},Me||""),Yt&&de.createElement("div",{className:ie.Z.button},de.createElement(fe.ZP,{size:"large",onClick:gt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});je.Z=zt},28426:function(mn,je,Ut){"use strict";var St=Ut(59301),Xt=Ut(93314),Ae=Ut(99571),xe=Object.defineProperty,fe=Object.defineProperties,Rt=Object.getOwnPropertyDescriptors,ie=Object.getOwnPropertySymbols,ae=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,zt=(It,nt,et)=>nt in It?xe(It,nt,{enumerable:!0,configurable:!0,writable:!0,value:et}):It[nt]=et,Ie=(It,nt)=>{for(var et in nt||(nt={}))ae.call(nt,et)&&zt(It,et,nt[et]);if(ie)for(var et of ie(nt))de.call(nt,et)&&zt(It,et,nt[et]);return It},Yt=(It,nt)=>fe(It,Rt(nt));const Me=({img:It,buttonProps:nt={},styles:et={},customText:At,ButtonText:at,ButtonClick:dt,Buttonclass:gt,ButtonTwo:xt,imgStyles:kt,loading:Ht=!1,className:Ot=""})=>St.createElement("section",{className:`tc animated fadeIn ${Ot}`,style:Ie({color:"#999",margin:"100px auto",visibility:Ht?"hidden":"visible"},et)},St.createElement("img",{src:It||Xt,style:Yt(Ie({},kt),{pointerEvents:"none",userSelect:"none"})}),St.createElement("p",{className:"mt20 font14"},At||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),at&&St.createElement(Ae.ZP,Ie({className:gt,onClick:dt},nt),at),xt&&xt);je.Z=Me},45677:function(mn,je,Ut){"use strict";Ut.d(je,{Z:function(){return gt}});var St=Ut(59301),Xt={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Ae=Ut(99571),xe=Ut(70557),fe=Ut(75975),Rt=Ut(25399),ie=Ut(51257),ae=Ut(81722),de=Ut(28426),zt=Ut(346),Ie=Ut(44203),Yt=Ut(59301),Me=Object.defineProperty,It=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,At=(xt,kt,Ht)=>kt in xt?Me(xt,kt,{enumerable:!0,configurable:!0,writable:!0,value:Ht}):xt[kt]=Ht,at=(xt,kt)=>{for(var Ht in kt||(kt={}))nt.call(kt,Ht)&&At(xt,Ht,kt[Ht]);if(It)for(var Ht of It(kt))et.call(kt,Ht)&&At(xt,Ht,kt[Ht]);return xt},dt=(xt,kt,Ht)=>new Promise((Ot,Zt)=>{var Wt=pe=>{try{we(Ht.next(pe))}catch(Ke){Zt(Ke)}},te=pe=>{try{we(Ht.throw(pe))}catch(Ke){Zt(Ke)}},we=pe=>pe.done?Ot(pe.value):Promise.resolve(pe.value).then(Wt,te);we((Ht=Ht.apply(xt,kt)).next())}),gt=({editOffice:xt="view",data:kt,issaver:Ht,onSaver:Ot,theme:Zt,type:Wt,filename:te,monacoEditor:we,className:pe,style:Ke,close:_e,onClose:en,hasMask:dn,disabledDownload:yn,onImgDimensions:Nn,showNodata:Kn,recordInfo:me})=>{const[ee,gn]=(0,St.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[$n,Yn]=(0,St.useState)(""),[nn,Tn]=(0,St.useState)(),Gn=window.ENV==="build"?"/react/build":"",yi=location.host.startsWith("localhost")?zt.Z.PROXY_SERVER:zt.Z.API_SERVER,Le=10*(1024*1024),tn=(0,St.useRef)();kt!=null&&kt.startsWith("/api")&&Wt!=="txt"&&(kt=zt.Z.API_SERVER+kt);const ti=vt=>vt.substring(vt.lastIndexOf("/")+1).split(".").pop();te&&we&&(we.filename=te),(0,St.useEffect)(()=>{var vt,Lt;const Ct=(Lt=(vt=document.cookie)==null?void 0:vt.replace(/\s/g,""))==null?void 0:Lt.split(";");Ct==null||Ct.map(_t=>{let Pe=_t.split("=");Pe[0]==="_educoder_session"&&Yn(Pe[1])})},[]),(0,St.useEffect)(()=>{Wt==="office"&&(kt.indexOf("bigfilescdn.")>-1||kt.indexOf("bigfiles1")>-1?Tn({url:kt,fileType:ti(kt),model:kt.indexOf("model=edit")?"edit":"view"}):Gt())},[Wt,kt]);function jn(vt){return dt(this,null,function*(){vt.data.type==="pdfdata"&&(Ot(vt.data.data),window.removeEventListener("message",jn,!1)),console.log("mess---:",vt.data)})}const Gt=()=>dt(void 0,null,function*(){console.log("data:",kt);let vt=kt;kt.startsWith("http")||(vt=location.origin+vt);let Lt=new URL(vt).pathname.split("/").pop();const Ct=yield(0,ae.gJ)({attachment_id:Lt});Ct.url=yi+Ct.url,Tn(Ct)}),Ft=()=>{if(kt.startsWith("http")||kt.startsWith("blob:")){mt();return}(0,ie.Sv)(te||"educoder",kt,te)},mt=()=>{me&&(0,Ie.fc)({id:me==null?void 0:me.id,watch_type:1,course_id:me==null?void 0:me.course_id}),(0,ie.Nd)(te||"educoder",decodeURIComponent(kt))};return Yt.createElement("div",{style:at({},Ke||{}),className:`${dn&&Xt.bgBlack} ${Wt?Xt.wrp:"hide"}`},_e&&Yt.createElement("div",{className:Xt.close,ref:tn},!!Nn&&Yt.createElement(Rt.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>tn.current},Yt.createElement("span",{onClick:()=>{en(),Nn()}},Yt.createElement("i",{className:"icon-yulanpizhu"}))),!yn&&Yt.createElement(Rt.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>tn.current},Yt.createElement("span",{onClick:mt},Yt.createElement("i",{className:"icon-quxiaozhiding"}))),Ht&&Yt.createElement(Rt.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>tn.current},Yt.createElement("span",{className:"",onClick:()=>{const vt=document.getElementById("pdfiframe");window.addEventListener("message",jn,!1),setTimeout(()=>{vt.contentWindow.postMessage("getData","*")},300)}},Yt.createElement("i",{className:"icon-baocun"}))),Yt.createElement(Rt.Z,{title:"\u5173\u95ED",getPopupContainer:()=>tn.current},Yt.createElement("span",{className:"",onClick:()=>{en()}},Yt.createElement("i",{className:"icon-guanbi1"})))),Yt.createElement("div",{className:`${Xt[pe]} ${pe} ${Xt.monaco} ${Wt==="txt"?"show":"hide"}`},Wt==="txt"&&Yt.createElement(Yt.Fragment,null,Yt.createElement(fe.ZP,at({},we)))),Wt==="audio"&&Yt.createElement("audio",{src:`${(kt==null?void 0:kt.indexOf("http://"))>-1||(kt==null?void 0:kt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${kt}`,autoPlay:!0}),Wt==="video"&&Yt.createElement(Yt.Fragment,null,(kt==null?void 0:kt.indexOf("http"))>-1?Yt.createElement("video",{controls:!0,src:`${kt}`,autoPlay:!0}):Yt.createElement("video",{controls:!0,src:`data:video/mp4;base64,${kt}`,autoPlay:!0})),Wt==="office"&&nn&&Yt.createElement("iframe",{src:`${Gn}/office.html?key=${nn.key}&url=${btoa(nn.url)}&callbackUrl=${yi+(nn.callbackUrl||"")}&fileType=${nn.fileType}&title=${nn.title||""}&model=${xt}&officeServer=${zt.Z.ONLYOFFICE}&disabledDownload=${!!yn}`}),Wt==="html"&&Yt.createElement("iframe",{src:kt+"&disposition=inline"}),Wt==="pdf"&&Yt.createElement("iframe",{id:"pdfiframe",src:`${Gn}/js/pdfview/index.html?filename=${te||"educoder.pdf"}&url=${encodeURIComponent(kt)}&disabledDownload=${!!yn}&model=${xt}`}),Wt==="image"&&Yt.createElement("img",{src:`${(kt==null?void 0:kt.indexOf("http://"))>-1||(kt==null?void 0:kt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${kt}`}),(Wt==="other"||Wt==="download")&&Yt.createElement(Yt.Fragment,null,Kn?Yt.createElement(de.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:Yt.createElement(Ae.ZP,{icon:Yt.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Ft,disabled:yn},"\u4E0B\u8F7D")}):Yt.createElement(Ae.ZP,{type:"primary",size:"middle",onClick:Ft,disabled:yn},Yt.createElement(xe.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},76902:function(mn,je,Ut){"use strict";Ut.d(je,{z:function(){return Zt},Z:function(){return Wt}});var St=Ut(59301),Xt=Ut(8944),Ae=Ut(81428),xe=Ut(64018),fe=Ut(81168),Rt=Ut(346),ie=Ut(51257),ae=Ut(15342),de=Ut(1012),zt=Ut(45677),Ie=Ut(59301),Me=({html:te})=>{const we=(0,St.useRef)(null),pe=(0,St.useRef)(null),Ke=`.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,St.useEffect)(()=>{const _e=we.current.attachShadow({mode:"open"});pe.current=document.createElement("div"),pe.current.className="markdown-body",pe.current.innerHTML=te,_e.appendChild(pe.current);const en=document.createElement("style");return en.textContent=Ke,_e.appendChild(en),()=>{_e.innerHTML=""}},[]),(0,St.useEffect)(()=>{pe.current&&(pe.current.innerHTML=te)},[te]),Ie.createElement("div",{ref:we})};function It(te){const we=["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"],pe=new RegExp(`\\b(${we.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return te.replace(pe,"").trim()}var nt=Object.defineProperty,et=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable,dt=(te,we,pe)=>we in te?nt(te,we,{enumerable:!0,configurable:!0,writable:!0,value:pe}):te[we]=pe,gt=(te,we)=>{for(var pe in we||(we={}))At.call(we,pe)&&dt(te,pe,we[pe]);if(et)for(var pe of et(we))at.call(we,pe)&&dt(te,pe,we[pe]);return te};const xt="@\u2581\u2581@",kt="@\u2581@",Ht=/<pre[^>]*>/g;function Ot(te){let we=document.createElement("div");return we.innerHTML=te,we.childNodes.length===0?"":we.childNodes[0].nodeValue}const Zt=(te,we)=>{te=te||"";const pe=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ke=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,_e=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,en=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return we?te.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(pe,(dn,yn,Nn,Kn,me,ee,gn)=>{const $n=yn||Kn||ee,Yn=Nn||me||gn||"?";return Rt.Z.API_SERVER+"/api/attachments/"+$n+Yn+"&t="+(0,ie.Jn)($n,Date.now())+(dn.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(te=te.replace(en,(dn,yn,Nn,Kn,me,ee,gn)=>{const $n=yn||Kn||ee,Yn=Nn||me||gn||"?";return Rt.Z.API_SERVER+"/attachments/download/"+$n+Yn+"&t="+(0,ie.Jn)($n,Date.now())+(dn.indexOf(")")>-1?")":"&")}).replace(pe,(dn,yn,Nn,Kn,me,ee,gn)=>{const $n=yn||Kn||ee,Yn=Nn||me||gn||"?";return Rt.Z.API_SERVER+"/api/attachments/"+$n+Yn+"&t="+(0,ie.Jn)($n,Date.now())+(dn.indexOf(")")>-1?")":"&")}).replace(Ke,(dn,yn,Nn,Kn,me)=>{const ee=yn||Kn,gn=Nn||me||"";return'"'+Rt.Z.API_SERVER+"/api/attachments/"+ee+gn+ee+gn+"&t="+(0,ie.Jn)(ee,Date.now())}).replace(_e,(dn,yn,Nn,Kn,me)=>{const ee=yn||Kn,gn=Nn||me||"";return"("+Rt.Z.API_SERVER+"/files/uploads/"+ee+gn+ee+gn+"&t="+(0,ie.Jn)(ee,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`),te)};var Wt=({value:te="",className:we,showTextOnly:pe,showLines:Ke,style:_e={},stylesPrev:en={},highlightKeywords:dn,showProgramFill:yn,isProgramFill:Nn,disabledFill:Kn=!1,programFillValue:me,onFillChange:ee=Yn=>{},onFillBlur:gn=()=>{},onFillFocus:$n=()=>{}})=>{let Yn=It(String(te||""));const[nn,Tn]=(0,St.useState)(""),[Gn,yi]=(0,St.useState)("office"),[Je,Le]=(0,St.useState)([]),tn=(0,St.useRef)("a"+(0,de.Z)()),ti={},jn=Te=>/<style[\s\S]*?>/i.test(Te||""),Gt=(Te,Ze,hn)=>{const In=document.createElement(Te===kt?"input":"textarea");In.style.width="100%",In.style.height=Te===kt?"40px":"151px",In.rows=5,In.spellcheck=!1,In.name="edu-program-fill",In.placeholder="\u8BF7\u8F93\u5165",In.dataset.id=Ze;const si=Object.keys(ti).length;return ti[si]=In,`<span class="edu-program-fill-wrap ${Te===kt?"":"show"}" style="width:${Te===kt?"600px":"100%"}" title=${hn||""}><span>${In.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Ft(Te){return Te=Te.replace(/!\[.*?\]\(.*?\)/g,""),Te=Te.replace(/\[.*?\]\(.*?\)/g,""),Te=Te.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Te=Te.replace(/<embed.*?>/g,""),Te=Te.replace(/<img.*?>/g,""),Te=Te.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Te=Te.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Te=Te.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Te=Te.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Te}const mt=Te=>!pe&&jn(Yn)?Te:Te.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Ze,hn){let In=hn.replace(/(\n|\r)/g,"").split("}"),si=[];return In.map(Dn=>{Dn!=""&&si.push(`.${tn.current} ${Dn}`)}),`<style>${si.join("}")}</style>`}),vt=(0,St.useMemo)(()=>{try{const In=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,si=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Dn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Oi=/\(\/attachments\/download\//g;Yn=Yn.replace(Oi,"("+Rt.Z.API_SERVER+"/attachments/download/").replace(In,"("+Rt.Z.API_SERVER+"/api/attachments/").replace(si,'"'+Rt.Z.API_SERVER+"/api/attachments/").replace(Dn,'"'+Rt.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(In){}if(yn){let In=-1;return Yn=Yn.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(si,Dn,Oi){var ai;return++In,Gt(si,In,(ai=me==null?void 0:me[In])==null?void 0:ai.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${mt(Yn||"")}</pre>`}let Te=mt(Yn);Te=(0,Ae.ZP)(Te);const Ze=(0,Ae.ez)();Yn.match(/\[TOC\]/)&&(Te=Te.replace("<p>[TOC]</p>",(0,Ae.Qv)()),(0,Ae.Iy)()),Te=Te.replace(/(__special_katext_id_\d+__)/g,(In,si)=>{const{type:Dn,expression:Oi}=Ze[si];return(0,ae.renderToString)(Ot(Oi)||"",{displayMode:Dn==="block",throwOnError:!1,output:"html"})}),Te=Te.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ae.AL)();const hn=document.createElement("div");if(hn.innerHTML=Te,pe)return hn.innerText;if(dn){const In=dn.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Pe(hn,In),hn.innerHTML}return setTimeout(()=>Ge(),500),hn.innerHTML},[Yn,dn]);(0,St.useEffect)(()=>{ze.current&&ze.current.querySelectorAll(["input","textarea"]).forEach(Ze=>{Ze.oninput=Lt,Ze.onblur=Ct,Ze.onfocus=_t})},[Je]),(0,St.useEffect)(()=>{var Te,Ze,hn,In,si;if(me!=null&&me.length)try{const Dn=ze.current.querySelectorAll(".edu-program-fill-score"),Oi=ze.current.querySelectorAll('[name="edu-program-fill"]');for(const[ai,Ai]of Oi.entries())Ai.value=((Te=me==null?void 0:me[ai])==null?void 0:Te.value)||"",((Ze=me==null?void 0:me[ai])==null?void 0:Ze.type)==="warning"?Ai.className="program-fill-warning":((hn=me==null?void 0:me[ai])==null?void 0:hn.type)==="success"?Ai.className="program-fill-success":Ai.className="";for(const[ai,Ai]of Dn.entries())Ai.innerHTML=(In=me==null?void 0:me[ai])!=null&&In.score?`${(si=me==null?void 0:me[ai])==null?void 0:si.score}\u5206`:"";Le(me)}catch(Dn){console.log(Dn,"error")}},[me]);const Lt=Te=>{Je[Te.target.dataset.id]=Je[Te.target.dataset.id]||{},Je[Te.target.dataset.id].value=Te.target.value,Le([...Je]),ee(Je,Te.target.dataset.id)},Ct=Te=>{Je[Te.target.dataset.id]=Je[Te.target.dataset.id]||{},Je[Te.target.dataset.id].value=Te.target.value,Le([...Je]),gn(Je,Te.target.dataset.id)},_t=Te=>{Je[Te.target.dataset.id]=Je[Te.target.dataset.id]||{},Je[Te.target.dataset.id].value=Te.target.value,Le([...Je]),$n(Je,Te.target.dataset.id)};function Pe(Te,Ze){return Te.childNodes.forEach(hn=>{var In;if(hn.childNodes.length>0)Pe(hn,Ze);else if(hn.nodeName!=="IMG")if(hn.innerHTML)hn.innerHTML=(In=hn.innerHTML)==null?void 0:In.replace(new RegExp(Ze,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const si=document.createElement("span");si.innerHTML=hn.textContent.replace(new RegExp(Ze,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),hn.replaceWith(si)}})}const ze=(0,St.useRef)();Ae.jb.WebkitLineClamp=Ke,Ke&&(_e=gt(gt({},_e),Ae.jb));function wn(Te){let Ze=Te.target;if(Ze.tagName.toUpperCase()==="A"){let hn=Ze.getAttribute("href");if(hn.indexOf("office")>-1)Te.preventDefault(),Tn(hn),yi("office");else if(hn.indexOf("application/pdf")>-1)Te.preventDefault(),Tn(hn),yi("pdf");else if(hn.indexOf("text/html")>-1)Te.preventDefault(),Tn(hn),yi("html");else if(hn.startsWith("#")){Te.preventDefault();let In=document.getElementById(hn.replace("#",""));In&&In.scrollIntoView(!0)}}}const Ge=()=>{var Te;const Ze=(Te=ze.current)==null?void 0:Te.querySelectorAll("video");Ze==null||Ze.forEach(hn=>{if(hn.oncontextmenu=()=>!1,hn.src.indexOf(".m3u8")>-1&&!hn.canPlayType("application/vnd.apple.mpegurl")){if(fe.ZP.isSupported()){var In=new fe.ZP;In.loadSource(hn.src),In.attachMedia(hn)}}})};return(0,St.useEffect)(()=>{if(ze.current&&vt&&vt.match(Ht)&&window.PR.prettyPrint(),ze.current)return ze.current.addEventListener("click",wn),()=>{var Te;(Te=ze.current)==null||Te.removeEventListener("click",wn),(0,Ae.AL)(),(0,Ae.Iy)()}},[vt,ze.current,wn]),(0,St.useEffect)(()=>{var Te;const Ze=hn=>{hn.preventDefault(),hn.clipboardData.setData("text",window.getSelection().toString())};return(Te=ze.current)==null||Te.addEventListener("copy",Ze),()=>{var hn;(hn=ze.current)==null||hn.removeEventListener("copy",Ze)}},[ze.current]),St.createElement(St.Fragment,null,pe&&St.createElement("div",{ref:ze},vt),!pe&&!jn(vt)&&St.createElement("div",{ref:ze,style:gt({},_e),className:`${we||""} ${Kn?"disabled-fill":""} markdown-body ${tn.current}`,dangerouslySetInnerHTML:{__html:vt}}),!pe&&jn(vt)&&St.createElement(Me,{html:vt}),St.createElement(zt.Z,{close:!0,data:nn,type:nn!=null&&nn.length?Gn:"",style:gt({},en),onClose:()=>Tn("")}))}},6701:function(mn,je,Ut){"use strict";Ut.d(je,{Z:function(){return Ke}});var St=Ut(59301),Xt=Ut(25690),Ae=Ut(62957),xe=Ut(28284),fe=Ut(6767),Rt=Ut(29787),ie=Ut(18287),ae=Ut(77019),de=Ut(5269),zt=Ut(25399),Ie=Ut(37568),Yt={currentPrimary:"currentPrimary___NPWiR",currentDelete:"currentDelete___UEfhf",DirectoryTree:"DirectoryTree___xPxCY",EditDom:"EditDom___seNxC"},Me=Ut(45937),It=Ut(86245),nt=Ut(28426),et=Ut(9148),At=Object.defineProperty,at=Object.defineProperties,dt=Object.getOwnPropertyDescriptors,gt=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,Ht=(_e,en,dn)=>en in _e?At(_e,en,{enumerable:!0,configurable:!0,writable:!0,value:dn}):_e[en]=dn,Ot=(_e,en)=>{for(var dn in en||(en={}))xt.call(en,dn)&&Ht(_e,dn,en[dn]);if(gt)for(var dn of gt(en))kt.call(en,dn)&&Ht(_e,dn,en[dn]);return _e},Zt=(_e,en)=>at(_e,dt(en)),Wt=(_e,en)=>{var dn={};for(var yn in _e)xt.call(_e,yn)&&en.indexOf(yn)<0&&(dn[yn]=_e[yn]);if(_e!=null&&gt)for(var yn of gt(_e))en.indexOf(yn)<0&&kt.call(_e,yn)&&(dn[yn]=_e[yn]);return dn},te=(_e,en,dn)=>new Promise((yn,Nn)=>{var Kn=gn=>{try{ee(dn.next(gn))}catch($n){Nn($n)}},me=gn=>{try{ee(dn.throw(gn))}catch($n){Nn($n)}},ee=gn=>gn.done?yn(gn.value):Promise.resolve(gn.value).then(Kn,me);ee((dn=dn.apply(_e,en)).next())});const we=(_e=[])=>_e==null?void 0:_e.map(en=>Zt(Ot({},en),{title:(en==null?void 0:en.value)||"",key:en==null?void 0:en.id,isLeaf:!0})),pe=_e=>{var en=_e,{user:dn,children:yn,isShowComponent:Nn=!0,ModalProps:Kn={},onDataSelect:me}=en,ee=Wt(en,["user","children","isShowComponent","ModalProps","onDataSelect"]);const[gn,$n]=Ae.default.useModal(),[Yn]=xe.default.useForm(),[nn,Tn]=(0,St.useState)([]),[Gn,yi]=(0,St.useState)(!1),[Je,Le]=(0,St.useState)(!1),[,tn,ti,jn]=(0,Me.U)(It.qE,{page:1,limit:9999}),[,,Gt]=(0,Me.U)(It.V8,{}),[,,Ft]=(0,Me.U)(It.B$,{}),[,,mt]=(0,Me.U)(It.DH,{}),[,,vt]=(0,Me.U)(It.bJ,{}),Lt=()=>{yi(!1),Yn.resetFields(),Le(!1)},Ct=Pe=>te(void 0,null,function*(){const{node:ze,dragNode:wn,event:Ge}=Pe,Te=Pe.node.pos.split("-"),Ze=Pe.dropPosition-Number(Te[Te.length-1]);if(Ze==0){fe.ZP.warning("\u65E0\u6CD5\u79FB\u52A8\u5230\u5185\u90E8\u4F4D\u7F6E");return}if(Ze==1&&(wn==null?void 0:wn.item_index)==(ze==null?void 0:ze.item_index)+1){fe.ZP.warning("\u672A\u79FB\u52A8\u4F4D\u7F6E");return}const hn=yield vt({id:wn==null?void 0:wn.key,position:Ze==-1?1:(wn==null?void 0:wn.item_index)>(ze==null?void 0:ze.item_index)?(ze==null?void 0:ze.item_index)+1:ze==null?void 0:ze.item_index});(hn==null?void 0:hn.status)===0&&(fe.ZP.success("\u79FB\u52A8\u6210\u529F"),ti({},!0))}),_t=Pe=>te(void 0,null,function*(){let ze={};Je?ze=yield Ft(Ot({},Pe)):ze=yield mt(Ot({},Pe)),(ze==null?void 0:ze.status)==0&&(fe.ZP.success((ze==null?void 0:ze.message)||(Je?"\u6DFB\u52A0\u6210\u529F":"\u66F4\u65B0\u6210\u529F")),ti({},!0),Lt())});return(0,St.useEffect)(()=>{Kn!=null&&Kn.open&&ti({},!0)},[Kn==null?void 0:Kn.open]),(0,St.useEffect)(()=>{var Pe;Tn(we((Pe=jn==null?void 0:jn.data)==null?void 0:Pe.list))},[jn]),Nn?St.createElement(St.Fragment,null,$n,yn,St.createElement(Ae.default,Ot({},Ot({title:"\u5E38\u7528\u8BC4\u8BED",width:640,centered:!0,footer:null,bodyStyle:{padding:"10px 5px 25px"}},Kn)),St.createElement(Rt.Z,{spinning:tn},(nn==null?void 0:nn.length)>0?St.createElement(St.Fragment,null,St.createElement(ie.default.DirectoryTree,{height:500,className:Yt.DirectoryTree,multiple:!0,draggable:{icon:!1},defaultExpandAll:!0,switcherIcon:!1,showIcon:!1,onSelect:me,treeData:nn,onDrop:Ct,titleRender:Pe=>St.createElement(St.Fragment,null,St.createElement("span",{className:"multi_ellipsis1",style:{flex:1,marginRight:"32px"}},Pe==null?void 0:Pe.title),St.createElement("div",{className:`${Yt.EditDom}`},St.createElement(ae.Z,{wrap:!1,align:"middle",gutter:16},St.createElement(de.Z,null,St.createElement(zt.Z,{title:"\u957F\u6309\u53EF\u8FDB\u884C\u62D6\u62FD\u6392\u5E8F"},St.createElement("i",{className:`iconfont icon-tuodong1 font12 ${Yt.currentPrimary}`}))),St.createElement(de.Z,null,St.createElement(zt.Z,{title:"\u7F16\u8F91"},St.createElement("i",{className:`iconfont icon-bianji11 font12 ${Yt.currentPrimary}`,onClick:ze=>{ze.stopPropagation(),Yn.setFieldsValue(Ot({},Pe)),yi(!0)}}))),St.createElement(de.Z,null,St.createElement(zt.Z,{title:"\u5220\u9664"},St.createElement("i",{className:`iconfont icon-shanchu14 font12 ${Yt.currentDelete}`,onClick:ze=>{ze.stopPropagation(),gn.confirm({icon:null,title:"\u5220\u9664\u5E38\u7528\u8BC4\u8BED",centered:!0,content:"\u4F60\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u5E38\u7528\u8BC4\u8BED\u5417\uFF1F",onOk:()=>te(void 0,null,function*(){const wn=yield Gt({id:Pe==null?void 0:Pe.key});(wn==null?void 0:wn.status)==0&&(fe.ZP.success((wn==null?void 0:wn.message)||"\u5220\u9664\u6210\u529F"),ti({},!0))})})}}))))))}),St.createElement(et.op,{className:"ml20 mt20",icon:St.createElement("i",{className:"iconfont icon-xiaojiahao"}),style:{borderRadius:"4px"},onClick:()=>{Le(!0),yi(!0)}},"\u6DFB\u52A0\u5E38\u7528\u8BC4\u8BED")):St.createElement(nt.Z,{styles:{margin:"30px auto"},customText:St.createElement("span",null,"\u6682\u65E0\u5E38\u7528\u8BC4\u8BED\uFF0C\u4F60\u53EF\u4EE5",St.createElement("a",{onClick:()=>{Le(!0),yi(!0)}},"\u6DFB\u52A0\u5E38\u7528\u8BC4\u8BED"))}))),St.createElement(Ae.default,{title:Je?"\u6DFB\u52A0\u5E38\u7528\u8BC4\u8BED":"\u7F16\u8F91\u5E38\u7528\u8BC4\u8BED",open:Gn,okText:Je?"\u6DFB\u52A0":"\u786E\u5B9A",onCancel:()=>{Lt()},onOk:()=>{Yn.submit()}},St.createElement(xe.default,{form:Yn,onFinish:_t},Je&&St.createElement("span",{className:"font14",style:{color:"#191919"}},"\u6DFB\u52A0\u5E38\u7528\u8BC4\u8BED\uFF0C\u53EF\u4EE5\u5E2E\u52A9\u4F60\u63D0\u9AD8\u8BC4\u9605\u4F5C\u4E1A\u7684\u6548\u7387"),St.createElement(xe.default.Item,{hidden:!0,name:"id"}),St.createElement(xe.default.Item,{className:"mt10",name:"value"},St.createElement(Ie.default.TextArea,{placeholder:"\u8F93\u5165\u5E38\u7528\u8BC4\u8BED\u3002\u4F8B\u5982\uFF1A\u4F60\u7684\u7F16\u7A0B\u4F5C\u4E1A\u6574\u4F53\u8868\u73B0\u826F\u597D\uFF0C\u4F46\u4ECD\u6709\u4E00\u4E9B\u5C0F\u7684\u6539\u8FDB\u7A7A\u95F4\u3002",autoSize:{minRows:8,maxRows:9},maxLength:100,showCount:!0}))))):null};var Ke=(0,Xt.connect)(({loading:_e,user:en})=>({user:en,loading:_e.effects}))(pe)},69720:function(mn,je,Ut){"use strict";Ut.d(je,{h:function(){return xt}});var St=Ut(59301),Xt=Ut(82326),Ae=Ut(28284),xe=Ut(99571),fe=Ut(89780),Rt=Ut.n(fe),ie=Ut(8336),ae=Ut(12469),de=Object.defineProperty,zt=Object.defineProperties,Ie=Object.getOwnPropertyDescriptors,Yt=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,nt=(kt,Ht,Ot)=>Ht in kt?de(kt,Ht,{enumerable:!0,configurable:!0,writable:!0,value:Ot}):kt[Ht]=Ot,et=(kt,Ht)=>{for(var Ot in Ht||(Ht={}))Me.call(Ht,Ot)&&nt(kt,Ot,Ht[Ot]);if(Yt)for(var Ot of Yt(Ht))It.call(Ht,Ot)&&nt(kt,Ot,Ht[Ot]);return kt},At=(kt,Ht)=>zt(kt,Ie(Ht));const at=Xt.default.Option,dt={labelCol:{span:4},wrapperCol:{span:20}},gt={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"]};je.Z=({callback:kt,onCancel:Ht})=>{const[Ot,Zt]=(0,St.useState)("python");function Wt(we){Zt(gt[we][1])}function te(we){kt(we)}return St.createElement(Ae.default,At(et({},dt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:te,style:{width:500}}),St.createElement(Ae.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},St.createElement(Xt.default,{getPopupContainer:we=>we.parentNode,onChange:Wt},Object.keys(gt).map(we=>St.createElement(at,{key:we,value:we},gt[we][0])))),St.createElement(Ae.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},St.createElement(xt,{mode:Ot})),St.createElement("div",{className:"flex-container flex-end"},St.createElement(xe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),St.createElement(xe.ZP,{type:"ghost",onClick:Ht},"\u53D6\u6D88")))};function xt({value:kt,onChange:Ht,mode:Ot,options:Zt={}}){const Wt=(0,St.useRef)(),[te,we]=(0,St.useState)();return(0,St.useEffect)(()=>{if(te){let pe=function(Ke){const _e=Ke.getValue();Ht&&Ht(_e)};return te.on("change",pe),()=>{te.off("change",pe)}}},[te,Ht]),(0,St.useEffect)(()=>{te&&te.setOption("mode",Ot)},[te,Ot]),(0,St.useEffect)(()=>{te&&(kt!==te.getValue()||kt==="")&&setTimeout(()=>{te.setValue(kt||"")},300)},[te,kt]),(0,St.useEffect)(()=>{if(Wt.current&&!te){const pe=Rt().fromTextArea(Wt.current,et({mode:Ot,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Zt));we(pe)}},[Wt.current,te]),St.createElement("div",{className:"my-codemirror-container"},St.createElement("textarea",{ref:Wt}))}},39793:function(mn,je,Ut){"use strict";Ut.d(je,{Z:function(){return qr}});var St=Ut(59301),Xt=Ut(89780),Ae=Ut.n(Xt),xe=Ut(76374),fe=Ut(8336),Rt=Ut(6313),ie=Ut(25717),ae=Ut(99498),de=Ut(25419),zt=Ut(67549),Ie=Ut(76902),Yt=({value:un="",className:ln,showTextOnly:We,showLines:Sn,style:Ki={}})=>{const Li=(0,St.useMemo)(()=>"",[un]);return St.createElement(St.Fragment,null,St.createElement("div",{dangerouslySetInnerHTML:{__html:Li}}))},Me=Object.defineProperty,It=Object.defineProperties,nt=Object.getOwnPropertyDescriptors,et=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable,dt=(un,ln,We)=>ln in un?Me(un,ln,{enumerable:!0,configurable:!0,writable:!0,value:We}):un[ln]=We,gt=(un,ln)=>{for(var We in ln||(ln={}))At.call(ln,We)&&dt(un,We,ln[We]);if(et)for(var We of et(ln))at.call(ln,We)&&dt(un,We,ln[We]);return un},xt=(un,ln)=>It(un,nt(ln));let kt=[{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 Ht({onActionCallback:un,title:ln,icon:We,actionName:Sn,className:Ki="",children:Li}){function dr(){un(Sn)}return St.createElement("a",{title:ln,className:Ki,onClick:dr},St.createElement("i",{className:`${We}`}),Li)}var Ot=({watch:un,showNullButton:ln,showNullProgramButton:We,onActionCallback:Sn,fullScreen:Ki,insertTemp:Li,hidetoolBar:dr,extraUse:se})=>{const Mn=[...kt,{title:`${un?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${un?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return St.createElement("ul",{className:"markdown-toolbar-container"},!dr&&Mn.map((Di,pr)=>St.createElement("li",{key:pr},Di.actionName?St.createElement(Ht,xt(gt({},Di),{onActionCallback:Sn})):St.createElement("span",{className:"v-line"}))),ln?St.createElement("li",null,St.createElement(Ht,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Sn},St.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,We?St.createElement(St.Fragment,null,St.createElement("li",null,St.createElement(Ht,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Sn},St.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),St.createElement("li",null,St.createElement(Ht,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Sn},St.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,Li&&St.createElement("li",null,St.createElement(Ht,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Li}`,onActionCallback:Sn},St.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),se&&St.createElement("li",null,se),St.createElement("li",{className:"btn-full-screen"},St.createElement(Ht,{icon:`${Ki?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Ki?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Sn})))},Zt=Ut(91558),Wt=Ut(28284),te=Ut(37568),we=Ut(99571),pe=Object.defineProperty,Ke=Object.defineProperties,_e=Object.getOwnPropertyDescriptors,en=Object.getOwnPropertySymbols,dn=Object.prototype.hasOwnProperty,yn=Object.prototype.propertyIsEnumerable,Nn=(un,ln,We)=>ln in un?pe(un,ln,{enumerable:!0,configurable:!0,writable:!0,value:We}):un[ln]=We,Kn=(un,ln)=>{for(var We in ln||(ln={}))dn.call(ln,We)&&Nn(un,We,ln[We]);if(en)for(var We of en(ln))yn.call(ln,We)&&Nn(un,We,ln[We]);return un},me=(un,ln)=>Ke(un,_e(ln));const ee={labelCol:{span:4},wrapperCol:{span:20}};var gn=({callback:un,onCancel:ln})=>{function We(Sn){un(Sn)}return St.createElement(Wt.default,me(Kn({},ee),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:We,style:{width:500}}),St.createElement(Wt.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},St.createElement(te.default,null)),St.createElement(Wt.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},St.createElement(te.default,null)),St.createElement("div",{className:"flex-container flex-end"},St.createElement(we.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),St.createElement(we.ZP,{type:"ghost",onClick:ln},"\u53D6\u6D88")))},$n=Ut(69720),Yn=Ut(17077),nn=Ut(62957),Tn=Ut(77019),Gn=Ut(9507),yi=Ut(59301),Je=({callback:un,onCancel:ln})=>{const We=document.createElement("canvas"),Sn=We.getContext("2d");We.width=1e3,We.height=800,Sn.fillStyle="#ffffff",Sn.fillRect(0,0,We.width,We.height);const Ki=We.toDataURL("image/png");return yi.createElement(nn.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},yi.createElement(Tn.Z,{style:{height:"100vh"}},yi.createElement(Gn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Ki,visible:!0,title:String(Date.now())},onOk:Li=>{un({src:Li.url})},onClose:ln})))},Le=Ut(12378);function tn(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(tn,go.CommandHandler),tn.prototype.canAlignSelection=function(){var un=this.diagram;return!(un===null||un.isReadOnly||un.isModelReadOnly||un.selection.count<2)},tn.prototype.alignLeft=function(){var un=this.diagram;un.startTransaction("aligning left");var ln=1/0;un.selection.each(function(We){We instanceof go.Link||(ln=Math.min(We.position.x,ln))}),un.selection.each(function(We){We instanceof go.Link||We.move(new go.Point(ln,We.position.y))}),un.commitTransaction("aligning left")},tn.prototype.alignRight=function(){var un=this.diagram;un.startTransaction("aligning right");var ln=-1/0;un.selection.each(function(We){if(!(We instanceof go.Link)){var Sn=We.actualBounds.x+We.actualBounds.width;ln=Math.max(Sn,ln)}}),un.selection.each(function(We){We instanceof go.Link||We.move(new go.Point(ln-We.actualBounds.width,We.position.y))}),un.commitTransaction("aligning right")},tn.prototype.alignTop=function(){var un=this.diagram;un.startTransaction("alignTop");var ln=1/0;un.selection.each(function(We){We instanceof go.Link||(ln=Math.min(We.position.y,ln))}),un.selection.each(function(We){We instanceof go.Link||We.move(new go.Point(We.position.x,ln))}),un.commitTransaction("alignTop")},tn.prototype.alignBottom=function(){var un=this.diagram;un.startTransaction("aligning bottom");var ln=-1/0;un.selection.each(function(We){if(!(We instanceof go.Link)){var Sn=We.actualBounds.y+We.actualBounds.height;ln=Math.max(Sn,ln)}}),un.selection.each(function(We){We instanceof go.Link||We.move(new go.Point(We.actualBounds.x,ln-We.actualBounds.height))}),un.commitTransaction("aligning bottom")},tn.prototype.alignCenterX=function(){var un=this.diagram,ln=un.selection.first();if(ln){un.startTransaction("aligning Center X");var We=ln.actualBounds.x+ln.actualBounds.width/2;un.selection.each(function(Sn){Sn instanceof go.Link||Sn.move(new go.Point(We-Sn.actualBounds.width/2,Sn.actualBounds.y))}),un.commitTransaction("aligning Center X")}},tn.prototype.alignCenterY=function(){var un=this.diagram,ln=un.selection.first();if(ln){un.startTransaction("aligning Center Y");var We=ln.actualBounds.y+ln.actualBounds.height/2;un.selection.each(function(Sn){Sn instanceof go.Link||Sn.move(new go.Point(Sn.actualBounds.x,We-Sn.actualBounds.height/2))}),un.commitTransaction("aligning Center Y")}},tn.prototype.alignColumn=function(un){var ln=this.diagram;ln.startTransaction("align Column"),un===void 0&&(un=0),un=parseFloat(un);var We=new Array;ln.selection.each(function(se){se instanceof go.Link||We.push(se)});for(var Sn=0;Sn<We.length-1;Sn++){var Ki=We[Sn],Li=Ki.actualBounds.y+Ki.actualBounds.height+un,dr=We[Sn+1];dr.move(new go.Point(Ki.actualBounds.x,Li))}ln.commitTransaction("align Column")},tn.prototype.alignRow=function(un){un===void 0&&(un=0),un=parseFloat(un);var ln=this.diagram;ln.startTransaction("align Row");var We=new Array;ln.selection.each(function(se){se instanceof go.Link||We.push(se)});for(var Sn=0;Sn<We.length-1;Sn++){var Ki=We[Sn],Li=Ki.actualBounds.x+Ki.actualBounds.width+un,dr=We[Sn+1];dr.move(new go.Point(Li,Ki.actualBounds.y))}ln.commitTransaction("align Row")},tn.prototype.canRotate=function(un){var ln=this.diagram;return!(ln===null||ln.isReadOnly||ln.isModelReadOnly||ln.selection.count<1)},tn.prototype.rotate=function(un){un===void 0&&(un=90);var ln=this.diagram;ln.startTransaction("rotate "+un.toString());var ln=this.diagram;ln.selection.each(function(We){We instanceof go.Link||We instanceof go.Group||(We.angle+=un)}),ln.commitTransaction("rotate "+un.toString())},tn.prototype.pullToFront=function(){var un=this.diagram;un.startTransaction("pullToFront");var ln=new go.Map;un.selection.each(function(We){ln.set(We.layer,0)}),ln.iteratorKeys.each(function(We){var Sn=0;We.parts.each(function(Ki){if(!Ki.isSelected){var Li=Ki.zOrder;isNaN(Li)?Ki.zOrder=0:Sn=Math.max(Sn,Li)}}),ln.set(We,Sn)}),un.selection.each(function(We){tn._assignZOrder(We,ln.get(We.layer)+1)}),un.commitTransaction("pullToFront")},tn.prototype.pushToBack=function(){var un=this.diagram;un.startTransaction("pushToBack");var ln=new go.Map;un.selection.each(function(We){ln.set(We.layer,0)}),ln.iteratorKeys.each(function(We){var Sn=0;We.parts.each(function(Ki){if(!Ki.isSelected){var Li=Ki.zOrder;isNaN(Li)?Ki.zOrder=0:Sn=Math.min(Sn,Li)}}),ln.set(We,Sn)}),un.selection.each(function(We){tn._assignZOrder(We,ln.get(We.layer)-1-tn._findGroupDepth(We))}),un.commitTransaction("pushToBack")},tn._assignZOrder=function(un,ln,We){We===void 0&&(We=un),un.layer===We.layer&&(un.zOrder=ln),un instanceof go.Group&&un.memberParts.each(function(Sn){tn._assignZOrder(Sn,ln+1,We)})},tn._findGroupDepth=function(un){if(un instanceof go.Group){var ln=0;return un.memberParts.each(function(We){ln=Math.max(ln,tn._findGroupDepth(We))}),ln+1}else return 0},tn.prototype.doKeyDown=function(){var un=this.diagram;if(un!==null){var ln=un.lastInput;if(ln.key==="Up"||ln.key==="Down"||ln.key==="Left"||ln.key==="Right"){var We=this.arrowKeyBehavior;if(We==="none")return;if(We==="select"){this._arrowKeySelect();return}else if(We==="move"){this._arrowKeyMove();return}else if(We==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},tn.prototype._getAllParts=function(){var un=new Array;return this.diagram.nodes.each(function(ln){un.push(ln)}),this.diagram.parts.each(function(ln){un.push(ln)}),un},tn.prototype._arrowKeyMove=function(){var un=this.diagram,ln=un.lastInput,We=0,Sn=0;if(ln.control||ln.meta)We=1,Sn=1;else if(un.grid!==null){var Ki=un.grid.gridCellSize;Sn=Ki.width,We=Ki.height}un.startTransaction("arrowKeyMove"),un.selection.each(function(Li){ln.key==="Up"?Li.move(new go.Point(Li.actualBounds.x,Li.actualBounds.y-We)):ln.key==="Down"?Li.move(new go.Point(Li.actualBounds.x,Li.actualBounds.y+We)):ln.key==="Left"?Li.move(new go.Point(Li.actualBounds.x-Sn,Li.actualBounds.y)):ln.key==="Right"&&Li.move(new go.Point(Li.actualBounds.x+Sn,Li.actualBounds.y))}),un.commitTransaction("arrowKeyMove")},tn.prototype._arrowKeySelect=function(){var un=this.diagram,ln=un.lastInput,We=null;ln.key==="Up"?We=this._findNearestPartTowards(270):ln.key==="Down"?We=this._findNearestPartTowards(90):ln.key==="Left"?We=this._findNearestPartTowards(180):ln.key==="Right"&&(We=this._findNearestPartTowards(0)),We!==null&&(ln.shift?We.isSelected=!0:ln.control||ln.meta?We.isSelected=!We.isSelected:un.select(We))},tn.prototype._findNearestPartTowards=function(un){var ln=this.diagram.selection.first();if(ln===null)return null;for(var We=ln.actualBounds.center,Sn=this._getAllParts(),Ki=1/0,Li=ln,dr=0;dr<Sn.length;dr++){var se=Sn[dr];if(se!==ln&&se.canSelect()){var Mn=se.actualBounds.center,Di=We.directionPoint(Mn),pr=this._angleCloseness(Di,un);if(pr<=45){var Vn=We.distanceSquaredPoint(Mn);Vn*=1+Math.sin(pr*Math.PI/180),Vn<Ki&&(Ki=Vn,Li=se)}}}return Li},tn.prototype._angleCloseness=function(un,ln){return Math.min(Math.abs(ln-un),Math.min(Math.abs(ln+360-un),Math.abs(ln-360-un)))},tn.prototype._arrowKeyTree=function(){var un=this.diagram,ln=un.selection.first();if(ln instanceof go.Node){var We=un.lastInput;if(We.key==="Right"){if(!ln.isTreeLeaf)if(!ln.isTreeExpanded)un.commandHandler.canExpandTree(ln)&&un.commandHandler.expandTree(ln);else{var Sn=this._sortTreeChildrenByY(ln).first();Sn!==null&&un.select(Sn)}}else if(We.key==="Left")if(!ln.isTreeLeaf&&ln.isTreeExpanded)un.commandHandler.canCollapseTree(ln)&&un.commandHandler.collapseTree(ln);else{var Ki=ln.findTreeParentNode();Ki!==null&&un.select(Ki)}else if(We.key==="Up"){var Ki=ln.findTreeParentNode();if(Ki!==null){var Li=this._sortTreeChildrenByY(Ki),dr=Li.indexOf(ln);if(dr>0){for(var se=Li.elt(dr-1);se!==null&&se.isTreeExpanded&&!se.isTreeLeaf;){var Mn=this._sortTreeChildrenByY(se);se=Mn.last()}se!==null&&un.select(se)}else un.select(Ki)}}else if(We.key==="Down")if(ln.isTreeExpanded&&!ln.isTreeLeaf){var Sn=this._sortTreeChildrenByY(ln).first();Sn!==null&&un.select(Sn)}else for(;ln!==null;){var Ki=ln.findTreeParentNode();if(Ki===null)break;var Li=this._sortTreeChildrenByY(Ki),dr=Li.indexOf(ln);if(dr<Li.length-1){un.select(Li.elt(dr+1));break}else ln=Ki}var Di=un.selection.first();Di!==null&&un.scrollToRect(Di.actualBounds)}},tn.prototype._sortTreeChildrenByY=function(un){var ln=new go.List().addAll(un.findTreeChildrenNodes());return ln.sort(function(We,Sn){var Ki=We.location,Li=Sn.location;return Ki.y<Li.y?-1:Ki.y>Li.y?1:Ki.x<Li.x?-1:Ki.x>Li.x?1:0}),ln},tn.prototype.copyToClipboard=function(un){go.CommandHandler.prototype.copyToClipboard.call(this,un),this._lastPasteOffset.set(this.pasteOffset)},tn.prototype.pasteFromClipboard=function(){var un=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(un,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),un},Object.defineProperty(tn.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(un){if(un!=="move"&&un!=="select"&&un!=="scroll"&&un!=="tree"&&un!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+un);this._arrowKeyBehavior=un}}),Object.defineProperty(tn.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(un){if(!(un instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+un);this._pasteOffset.set(un)}});var ti=tn,jn=Ut(63720),Gt=Ut(5269),Ft=Ut(38986),mt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},vt=Ut(48790),Lt=Ut(59301),Ct=(un,ln,We)=>new Promise((Sn,Ki)=>{var Li=Mn=>{try{se(We.next(Mn))}catch(Di){Ki(Di)}},dr=Mn=>{try{se(We.throw(Mn))}catch(Di){Ki(Di)}},se=Mn=>Mn.done?Sn(Mn.value):Promise.resolve(Mn.value).then(Li,dr);se((We=We.apply(un,ln)).next())});function _t({onCancel:un,callback:ln}){let We=(0,St.useRef)(),Sn=(0,St.useRef)(),Ki=(0,St.useRef)(),Li=(0,St.useRef)(!1);const dr=(0,St.useRef)(!1),[se,Mn]=(0,St.useState)(0);function Di(){const Vn=Le.bx.make,le={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"};We.current=new Le.S0(Sn.current,{padding:20,grid:Vn(Le.s_,"Grid",Vn(Le.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Vn(Le.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Oe=>{var Ui=Oe.diagram.commandHandler.addTopLevelParts(Oe.diagram.selection,!0);Ui||Oe.diagram.currentTool.doCancel()},commandHandler:Vn(ti),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Oe=>{var Ui=Oe.subject;Ui.location=Ui.location.copy().snapToGridPoint(Oe.diagram.grid.gridOrigin,Oe.diagram.grid.gridCellSize),setTimeout(()=>{Oe.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Oe=>{var Ui=Oe.subject;setTimeout(()=>{Oe.diagram.commandHandler.editTextBlock()})},LinkRelinked:Oe=>{var Ui=Oe.parameter.part;Ui.invalidateConnectedLinks();var hr=Oe.subject;Oe.diagram.toolManager.linkingTool.isForwards?hr.toNode.invalidateConnectedLinks():hr.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),We.current.nodeTemplate=Vn(Le.NB,"Auto",{locationSpot:Le.z6.Center,locationObjectName:"SHAPE",desiredSize:new Le.$u(120,60),minSize:new Le.$u(40,40),resizable:!0,resizeCellSize:new Le.$u(10,10),rotatable:!0},new Le.KX("location","loc",Le.E9.parse).makeTwoWay(Le.E9.stringify),new Le.KX("desiredSize","size",Le.$u.parse).makeTwoWay(Le.$u.stringify),Vn(Le.bn,{name:"SHAPE",fill:le.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Le.z6.AllSides,toSpot:Le.z6.AllSides},new Le.KX("figure"),new Le.KX("fill"),new Le.KX("stroke","borderColor"),new Le.KX("strokeWidth","thickness"),new Le.KX("strokeDashArray","dash")),Vn(Le.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Vn(Le.al,{margin:1,textAlign:"center",overflow:Le.al.OverflowEllipsis,editable:!0},new Le.KX("text").makeTwoWay(),new Le.KX("stroke","color"))),We.current.nodeTemplate.toolTip=Vn("ToolTip",Vn(Le.s_,"Vertical",{maxSize:new Le.$u(200,NaN)},Vn(Le.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Le.KX("text")),Vn(Le.al,{font:"10pt sans-serif",textAlign:"center"},new Le.KX("text","details"))));function De(Oe,Ui){var hr=(Si,Qr)=>{Si.handled=!0,Si.diagram.model.commit(xr=>{var Ri=Qr.part.adornedPart,qi=new Le.E9().setRectSpot(Ri.actualBounds,Oe);qi.subtract(Ri.location),qi.scale(2,2),qi.x+=Math.sign(qi.x)*130,qi.y+=Math.sign(qi.y)*130,qi.add(Ri.location),qi.snapToGridPoint(Si.diagram.grid.gridOrigin,Si.diagram.grid.gridCellSize);var re=xr.copyNodeData(Ri.data);xr.setGroupKeyForNodeData(re,xr.getGroupKeyForNodeData(Ri.data)),xr.addNodeData(re);var he={from:Ri.key,to:xr.getKeyForNodeData(re)};xr.addLinkData(he);var ne=Si.diagram.findNodeForData(re);ne.location=qi,Si.diagram.select(ne),setTimeout(()=>{Si.diagram.commandHandler.editTextBlock()},20)})};return Vn(Le.bn,{figure:Ui,alignment:Oe,alignmentFocus:Oe.opposite(),width:Oe.equals(Le.z6.Top)||Oe.equals(Le.z6.Bottom)?25:18,height:Oe.equals(Le.z6.Top)||Oe.equals(Le.z6.Bottom)?18:25,fill:"orange",stroke:le.white,strokeWidth:4,mouseEnter:(Si,Qr)=>Qr.fill="dodgerblue",mouseLeave:(Si,Qr)=>Qr.fill="orange",isActionable:!0,click:hr,contextClick:hr})}function Xn(Oe){return Vn(Le.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:(Ui,hr)=>hr.fill="dodgerblue",mouseLeave:(Ui,hr)=>hr.fill="orange",click:(Ui,hr)=>{Ui.diagram.commandHandler.showContextMenu(hr.part.adornedPart)}},Oe||{})}We.current.nodeTemplate.selectionAdornmentTemplate=Vn(Le.uz,"Spot",Vn(Le.Vm,{padding:10}),De(Le.z6.Top,"TriangleUp"),De(Le.z6.Left,"TriangleLeft"),De(Le.z6.Right,"TriangleRight"),De(Le.z6.Bottom,"TriangleDown"),Xn({alignment:new Le.z6(.75,0)}));function On(Oe,Ui){return(hr,Si)=>{hr.handled=!0,hr.diagram.model.commit(Qr=>{Qr.set(Si.part.adornedPart.data,Oe,Ui)})}}function qe(Oe,Ui){return Ui||(Ui="color"),Vn(Le.bn,{width:16,height:16,stroke:"lightgray",fill:Oe,margin:1,background:"transparent",mouseEnter:(hr,Si)=>Si.stroke="dodgerblue",mouseLeave:(hr,Si)=>Si.stroke="lightgray",click:On(Ui,Oe),contextClick:On(Ui,Oe)})}function ei(){return[Vn("ContextMenuButton",Vn(Le.s_,"Horizontal",qe(le.white,"fill"),qe(le.beige,"fill"),qe(le.extralightblue,"fill"),qe(le.extralightred,"fill"))),Vn("ContextMenuButton",Vn(Le.s_,"Horizontal",qe(le.lightgray,"fill"),qe(le.lightgreen,"fill"),qe(le.lightblue,"fill"),qe(le.lightred,"fill")))]}function fi(){return[Vn("ContextMenuButton",Vn(Le.s_,"Horizontal",qe(le.black),qe(le.green),qe(le.blue),qe(le.red))),Vn("ContextMenuButton",Vn(Le.s_,"Horizontal",qe(le.white),qe(le.magenta),qe(le.purple),qe(le.orange)))]}function ki(Oe,Ui){return Ui||(Ui="thickness"),Vn(Le.bn,"LineH",{width:16,height:16,strokeWidth:Oe,margin:1,background:"transparent",mouseEnter:(hr,Si)=>Si.background="dodgerblue",mouseLeave:(hr,Si)=>Si.background="transparent",click:On(Ui,Oe),contextClick:On(Ui,Oe)})}function Vi(Oe,Ui){return Ui||(Ui="dash"),Vn(Le.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Oe,margin:1,background:"transparent",mouseEnter:(hr,Si)=>Si.background="dodgerblue",mouseLeave:(hr,Si)=>Si.background="transparent",click:On(Ui,Oe),contextClick:On(Ui,Oe)})}function rn(){return[Vn("ContextMenuButton",Vn(Le.s_,"Horizontal",ki(1),ki(2),ki(3),ki(4))),Vn("ContextMenuButton",Vn(Le.s_,"Horizontal",Vi(null),Vi([2,4]),Vi([4,4])))]}function Ve(Oe,Ui){return Ui||(Ui="figure"),Vn(Le.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Oe,margin:1,background:"transparent",mouseEnter:(hr,Si)=>Si.fill="dodgerblue",mouseLeave:(hr,Si)=>Si.fill="lightgray",click:On(Ui,Oe),contextClick:On(Ui,Oe)})}We.current.nodeTemplate.contextMenu=Vn("ContextMenu",Vn("ContextMenuButton",Vn(Le.s_,"Horizontal",Ve("Rectangle"),Ve("RoundedRectangle"),Ve("Ellipse"),Ve("Diamond"))),Vn("ContextMenuButton",Vn(Le.s_,"Horizontal",Ve("Parallelogram2"),Ve("ManualOperation"),Ve("Procedure"),Ve("Cylinder1"))),Vn("ContextMenuButton",Vn(Le.s_,"Horizontal",Ve("Terminator"),Ve("CreateRequest"),Ve("Document"),Ve("TriangleDown"))),ei(),fi(),rn()),We.current.groupTemplate=Vn(Le.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Le.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Oe,Ui)=>{var hr=Ui.addMembers(Ui.diagram.selection,!0);hr||Ui.diagram.currentTool.doCancel()},avoidable:!1},new Le.KX("location","loc",Le.E9.parse).makeTwoWay(Le.E9.stringify),Vn(Le.s_,"Auto",{name:"BODY"},Vn(Le.bn,{parameter1:10,fill:le.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Le.z6.AllSides,toSpot:Le.z6.AllSides},new Le.KX("fill"),new Le.KX("stroke","color"),new Le.KX("strokeWidth","thickness"),new Le.KX("strokeDashArray","dash")),Vn(Le.Vm,{background:"transparent",margin:20})),Vn(Le.al,{alignment:Le.z6.Top,alignmentFocus:Le.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new Le.KX("text"),new Le.KX("stroke","color"))),We.current.groupTemplate.selectionAdornmentTemplate=Vn(Le.uz,"Spot",Vn(Le.s_,"Auto",Vn(Le.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Vn(Le.Vm,{margin:1.5})),Xn({alignment:Le.z6.TopRight,alignmentFocus:Le.z6.BottomRight})),We.current.groupTemplate.contextMenu=Vn("ContextMenu",ei(),fi(),rn()),We.current.linkTemplate=Vn(Le.rU,{layerName:"Foreground",routing:Le.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new Le.KX("fromSpot","fromSpot",Le.z6.parse),new Le.KX("toSpot","toSpot",Le.z6.parse),new Le.KX("fromShortLength","dir",Oe=>Oe>=1?10:0),new Le.KX("toShortLength","dir",Oe=>Oe>=1?10:0),new Le.KX("points").makeTwoWay(),Vn(Le.bn,{strokeWidth:2},new Le.KX("stroke","color"),new Le.KX("strokeWidth","thickness"),new Le.KX("strokeDashArray","dash")),Vn(Le.bn,{segmentIndex:0,segmentOffset:new Le.E9(15,0),segmentOrientation:Le.rU.OrientAlong,alignmentFocus:Le.z6.Right,figure:"circle",width:10,strokeWidth:0},new Le.KX("fill","color"),new Le.KX("visible","dir",Oe=>Oe===1)),Vn(Le.bn,{segmentIndex:-1,segmentOffset:new Le.E9(-10,6),segmentOrientation:Le.rU.OrientPlus90,alignmentFocus:Le.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Le.KX("fill","color"),new Le.KX("visible","dir",Oe=>Oe>=1),new Le.KX("width","thickness",Oe=>7+3*Oe),new Le.KX("height","thickness",Oe=>7+3*Oe),new Le.KX("segmentOffset","thickness",Oe=>new Le.E9(-15,4+1.5*Oe))),Vn(Le.bn,{segmentIndex:0,segmentOffset:new Le.E9(15,-6),segmentOrientation:Le.rU.OrientMinus90,alignmentFocus:Le.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Le.KX("fill","color"),new Le.KX("visible","dir",Oe=>Oe===2),new Le.KX("width","thickness",Oe=>7+3*Oe),new Le.KX("height","thickness",Oe=>7+3*Oe),new Le.KX("segmentOffset","thickness",Oe=>new Le.E9(-15,4+1.5*Oe))),Vn(Le.al,{alignmentFocus:new Le.z6(0,1,-4,0),editable:!0},new Le.KX("text").makeTwoWay(),new Le.KX("stroke","color"))),We.current.linkTemplate.selectionAdornmentTemplate=Vn(Le.uz,Vn(Le.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:fn(2)},new Le.KX("pathPattern","thickness",fn)),Xn({alignmentFocus:new Le.z6(0,0,-6,-4)}));function fn(Oe){return Vn(Le.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Oe+4).toString()+" H3"})}function mi(Oe){var Ui="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Oe===0?Ui="M0 0 M16 16 M0 8 L16 8":Oe===2&&(Ui="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Vn(Le.bn,{geometryString:Ui,margin:2,background:"transparent",mouseEnter:(hr,Si)=>Si.background="dodgerblue",mouseLeave:(hr,Si)=>Si.background="transparent",click:On("dir",Oe),contextClick:On("dir",Oe)})}function Pi(Oe){var Ui=(hr,Si)=>{hr.handled=!0,hr.diagram.model.commit(Qr=>{var xr=Si.part.adornedPart;Qr.set(xr.data,Oe?"toSpot":"fromSpot",Le.z6.stringify(Le.z6.AllSides)),(Oe?xr.toNode:xr.fromNode).invalidateConnectedLinks()})};return Vn(Le.bn,{width:12,height:12,fill:"transparent",mouseEnter:(hr,Si)=>Si.background="dodgerblue",mouseLeave:(hr,Si)=>Si.background="transparent",click:Ui,contextClick:Ui})}function Pn(Oe,Ui){var hr=0,Si=Le.z6.RightSide;Oe.equals(Le.z6.Top)?(hr=270,Si=Le.z6.TopSide):Oe.equals(Le.z6.Left)?(hr=180,Si=Le.z6.LeftSide):Oe.equals(Le.z6.Bottom)&&(hr=90,Si=Le.z6.BottomSide),Ui||(hr-=180);var Qr=(xr,Ri)=>{xr.handled=!0,xr.diagram.model.commit(qi=>{var re=Ri.part.adornedPart;qi.set(re.data,Ui?"toSpot":"fromSpot",Le.z6.stringify(Si)),(Ui?re.toNode:re.fromNode).invalidateConnectedLinks()})};return Vn(Le.bn,{alignment:Oe,alignmentFocus:Oe.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:hr,background:"transparent",mouseEnter:(xr,Ri)=>Ri.background="dodgerblue",mouseLeave:(xr,Ri)=>Ri.background="transparent",click:Qr,contextClick:Qr})}We.current.linkTemplate.contextMenu=Vn("ContextMenu",fi(),rn(),Vn("ContextMenuButton",Vn(Le.s_,"Horizontal",mi(0),mi(1),mi(2))),Vn("ContextMenuButton",Vn(Le.s_,"Horizontal",Vn(Le.s_,"Spot",Pi(!1),Pn(Le.z6.Top,!1),Pn(Le.z6.Left,!1),Pn(Le.z6.Right,!1),Pn(Le.z6.Bottom,!1)),Vn(Le.s_,"Spot",{margin:new Le.Zt(0,0,0,2)},Pi(!0),Pn(Le.z6.Top,!0),Pn(Le.z6.Left,!0),Pn(Le.z6.Right,!0),Pn(Le.z6.Bottom,!0)))));const ni=`{ "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 Gi=["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 er(Oe){return console.log("shapeName:",Oe),Gi.indexOf(Oe)>=0}var Or=new Le.YI(Ki.current,{maxSelectionCount:1,linkTemplate:Vn(Le.rU,{locationSpot:Le.z6.Center,selectionAdornmentTemplate:Vn(Le.uz,"Link",{locationSpot:Le.z6.Center},Vn(Le.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Vn(Le.bn,{toArrow:"Standard",stroke:null}))},{routing:Le.rU.AvoidsNodes,curve:Le.rU.JumpOver,corner:5,toShortLength:4},new Le.KX("points"),Vn(Le.bn,{isPanelMain:!0,strokeWidth:2}),Vn(Le.bn,{toArrow:"Standard",stroke:null})),model:new Le.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...Le.bn.getFigureGenerators().toArray().map(Oe=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Oe.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return We.current.addDiagramListener("TextEdited",function(Oe){var Ui;const hr=Oe.subject.part;var Si=(Ui=document.activeElement)==null?void 0:Ui.value;typeof Si=="string"&&Si.trim()===""&&We.current.model.commit(function(Qr){Qr.set(hr.data,"text","\u672A\u547D\u540D"),We.current.commandHandler.stopCommand()},"increment")}),Or.nodeTemplate=Vn(Le.NB,"Auto",{locationSpot:Le.z6.Center},new Le.KX("location","location",Le.E9.parse).makeTwoWay(Le.E9.stringify),Vn(Le.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 Le.KX("stroke").makeTwoWay(),new Le.KX("fill").makeTwoWay(),new Le.KX("figure")),Vn(Le.al,{margin:new Le.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new Le.$u(16,16),maxSize:new Le.$u(10,NaN),textAlign:"center",editable:!0},new Le.KX("key").makeTwoWay())),setTimeout(()=>{We.current.grid=Vn(Le.s_,"Grid",Vn(Le.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Vn(Le.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),We.current.grid.visible=!0,We.current.grid.gridCellStroke="darkgray",We.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=We.current,We.current}const pr=()=>Ct(this,null,function*(){var Vn,le=We.current.makeImage();const De=yield(0,Ft.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:le.src,file_data:JSON.stringify({login:(Vn=(0,vt.eY)())==null?void 0:Vn.login,data:JSON.parse(We.current.model.toJson())})}});ln({src:De.url})});return(0,St.useEffect)(()=>(setTimeout(()=>{Di()},500),Mn(se+1),()=>{We.current=null}),[]),Lt.createElement("div",{ref:dr,className:"body-overflow-initial"},Lt.createElement(nn.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!se,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Lt.createElement(Tn.Z,null,Lt.createElement(Gt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Lt.createElement(Gt.Z,{onClick:()=>{var Vn,le,De=We.current.selection.first();if(Li.current=!Li.current,document.activeElement&&De){let Xn=(le=(Vn=document.activeElement)==null?void 0:Vn.value)==null?void 0:le.trim();typeof Xn=="string"&&We.current.model.commit(function(On){On.set(De.data,"text",Xn||"\u672A\u547D\u540D"),We.current.commandHandler.stopCommand()},"increment")}Mn(se+1)}},Lt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:un},Lt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:Li.current?"none":"block"},className:mt.flowChartWrp},Lt.createElement("div",{style:{display:"flex",height:"100%"}},Lt.createElement("div",{style:{width:"300px",height:"100%"}},Lt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Lt.createElement("div",{style:{height:"calc(100% - 50px)"},className:mt.myPaletteDiv,ref:Ki})),Lt.createElement("div",{style:{flex:1,position:"relative"}},Lt.createElement("div",{ref:Sn,style:{height:"80vh"}}))),Lt.createElement("div",{className:"tr"},Lt.createElement(we.ZP,{size:"large",onClick:pr,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Pe=_t,ze=Ut(47889),wn=Ut(71051);const Ge=ze.ZP.Group,Te={margin:"0 8px"};var Ze=({callback:un,onCancel:ln})=>{function We(Sn){un(Sn)}return St.createElement(Wt.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:We},St.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},St.createElement("span",{style:Te},"\u5355\u5143\u683C\u6570\uFF1A"),St.createElement("span",{style:Te},"\u884C\u6570"),St.createElement(Wt.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},St.createElement(wn.Z,null)),St.createElement("span",{style:Te},"\u5217\u6570"),St.createElement(Wt.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},St.createElement(wn.Z,null))),St.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},St.createElement("span",{style:Te},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),St.createElement(Wt.default.Item,{name:"align"},St.createElement(Ge,null,St.createElement(ze.ZP,{value:"default"},St.createElement("i",{className:"fa fa-align-justify"})),St.createElement(ze.ZP,{value:"left"},St.createElement("i",{className:"fa fa-align-left"})),St.createElement(ze.ZP,{value:"center"},St.createElement("i",{className:"fa fa-align-center"})),St.createElement(ze.ZP,{value:"right"},St.createElement("i",{className:"fa fa-align-right"}))))),St.createElement("div",{className:"flex-container flex-end"},St.createElement(we.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),St.createElement(we.ZP,{type:"ghost",onClick:ln},"\u53D6\u6D88")))},hn=Ut(71411),In=Ut(43001),si=Ut.n(In),Oi=(0,St.forwardRef)(({use3d:un,width:ln,height:We,callback:Sn,showSaveButton:Ki},Li)=>{const dr=(0,St.useRef)(),se=(0,St.useRef)(),[Mn,Di]=(0,St.useState)(!1),pr=(0,St.useRef)({id:dr,appName:"graphing",width:ln||1e3,height:We||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,St.useEffect)(()=>{se.current=new(si())(pr.current,!0),window.onload=function(){se.current.inject("applet_container")}},[]);const Vn=()=>{var le=window.ggbApplet.getPNGBase64(1,!0,72);return Sn&&Sn(le),le};return(0,St.useEffect)(()=>{pr.current.appName=Mn?"3D":"graphing",se.current.inject("applet_container")},[Mn]),(0,St.useEffect)(()=>{Di(un)},[un]),(0,St.useImperativeHandle)(Li,()=>({getImgData:Vn})),St.createElement(St.Fragment,null,St.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:dr}),St.createElement(Tn.Z,{align:"middle"},St.createElement(Gt.Z,{flex:1},St.createElement(hn.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Mn,onChange:le=>Di(le)})),St.createElement(Gt.Z,null,St.createElement(we.ZP,{size:"large",onClick:Vn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),ai=Ut(76562),Ai=Ut(6767);const pi="link",ur="upload-image",Fi="add-flowchart",zi="draw-image",Xi="add-flowchart",Lr="code-block",wi="add-table",Nr="------------",Br={default:Nr,left:`:${Nr}`,center:`:${Nr}:`,right:`${Nr}:`};var jr=Ut(37808);function Wi(){}let po=0;const mo=1e4,no="\u2581",ir="@\u2581\u2581@",so="@\u2581@",Tt=`
**\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`,Pr=["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 Zi(un){return/^\d+$/.test(un)?`${un}px`:un}const Hi=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",ji={[Hi+"-B"]:"bold",[Hi+"-I"]:"italic"},tr={[pi]:"\u6DFB\u52A0\u94FE\u63A5",[Lr]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[ur]:"\u6DFB\u52A0\u56FE\u7247",[zi]:"\u6DFB\u52A0\u753B\u56FE",[Fi]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[wi]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var qr=({defaultValue:un="",onChange:ln,width:We="100%",height:Sn=400,miniToolbar:Ki=!1,isFocus:Li=!1,watch:dr,insertTemp:se,mode:Mn="markdown",id:Di="markdown-editor-id",showResizeBar:pr=!1,noStorage:Vn=!1,showNullButton:le=!1,showNullProgramButton:De=!1,hidetoolBar:Xn=!1,fullScreen:On=!1,onBlur:qe,onCMBeforeChange:ei,onFullScreen:fi,className:ki="",disablePaste:Vi=!1,disabled:rn=!1,disabledFill:Ve=!1,placeholder:fn="",values:mi="",extraUse:Pi})=>{const[Pn,ni]=(0,St.useState)(null),[Gi,er]=(0,St.useState)(un),[Or,Oe]=(0,St.useState)(dr),[Ui,hr]=(0,St.useState)(On),[Si,Qr]=(0,St.useState)(""),[xr,Ri]=(0,St.useState)(0),[qi,re]=(0,St.useState)(Sn),[he,ne]=(0,St.useState)(!1),[Xe,Fe]=(0,St.useState)(0),[an,Jn]=(0,St.useState)(0),ii=(0,St.useRef)(),Mi=(0,St.useRef)(),hi=(0,St.useRef)(),Zn=(0,St.useRef)();(0,St.useEffect)(()=>{const vn=window.scrollY||window.pageYOffset;er(mi),Pn==null||Pn.setValue(mi),window.scrollTo(0,vn)},[mi]),(0,St.useEffect)(()=>{fi==null||fi(Ui)},[Ui]),(0,St.useEffect)(()=>{if(ii.current){let vn=function(zn,on){var Ei;if(Vi){on.preventDefault();return}const Ii=on.clipboardData;if(Ii){const nr=Ii.types.toString(),Ni=Ii.items;if(nr==="Files"||Ii.types.indexOf("Files")>-1){if(on.preventDefault(),Mn=="stex")return;try{let Mr=Ni[1];((Ei=Ni[0])==null?void 0:Ei.kind)==="file"&&(Mr=Ni[0]);const yr=Mr.getAsFile(),Zr=yr.name.split(".").pop();(0,Yn.I)(yr,Dr=>{var Gr,$r,Ue;Dr.id?((Gr=yr==null?void 0:yr.type)==null?void 0:Gr.indexOf("image"))>-1?Cn.replaceSelection(`<img width="100%" src="/api/attachments/${Dr.id}?type=${Dr.content_type})" alt="" />`):(($r=yr==null?void 0:yr.type)==null?void 0:$r.indexOf("video"))>-1?Cn.replaceSelection(`<video width="100%" controls src="/api/attachments/${Dr.id}"></video>`):((Ue=yr==null?void 0:yr.type)==null?void 0:Ue.indexOf("pdf"))>-1?Cn.replaceSelection(`<a href="/api/attachments/${Dr.id}?type=${yr.type}&disposition=inline" target="_blank">${yr.name}</a>`):Pr.includes(Zr)?Cn.replaceSelection(`<a href="/api/attachments/${Dr.id}?type=office&disposition=inline" target="_blank">${yr.name}</a>`):Cn.replaceSelection(`[${yr.name}](/api/attachments/${Dr.id}?type=${Dr.content_type})`):(Dr==null?void 0:Dr.status)===401&&(document.location.href="/user/login")})}catch(Mr){Ai.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Cn=Ae().fromTextArea(ii.current,{mode:Mn,lineNumbers:!Ki,lineWrapping:!0,value:un,autoCloseTags:!0,autoCloseBrackets:!0});return Cn.on("keyup",function(zn,on){on.keyCode===8&&(zn.getValue()==""?Cn.setOption("placeholder",fn):Cn.setOption("placeholder",null))}),Cn.on("keydown",function(zn,on){if(on.keyCode===8){var Ei=ke(zn);Ei&&on.preventDefault()}}),Li&&Cn.focus(),Cn.on("paste",vn),rn&&Cn.on("beforeChange",function(zn,on){(on.origin==="paste"||on.origin==="+input")&&on.cancel()}),ni(Cn),()=>{Cn.off("paste",vn)}}},[]);const ci=(0,St.useCallback)(()=>{if(Mi.current)try{}catch(vn){console.log(vn,"---- to set md editor body height")}},[qi,Mi,Ui]);(0,St.useEffect)(()=>{function vn(){let Cn=new xe.Z(zn=>{for(let on of zn)(on.target.offsetHeight>0||on.target.offsetWidth>0)&&(ci(),Pn.setSize("100%","100%"),Pn.refresh())});return Cn.observe(ii.current.parentElement),Cn}if(Pn){const Cn=vn();return()=>{var zn,on;(zn=ii.current)!=null&&zn.parentElement&&Cn.unobserve((on=ii.current)==null?void 0:on.parentElement)}}},[Pn,ci]),(0,St.useEffect)(()=>{if(Pn){let vn=[];for(const[Cn,zn]of Object.entries(ji)){let on={[Cn]:()=>{An(zn)}};vn.push(on),Pn.addKeyMap(on)}return()=>{for(let Cn of vn)Pn.removeKeyMap(Cn)}}},[Pn]),(0,St.useEffect)(()=>{On!==Ui&&hr(On)},[On]),(0,jr.Z)(()=>{if(!Vn&&xr>0){let vn=new Date().getTime(),Cn=window.sessionStorage.getItem(Di);vn>=xr+mo&&(!Cn||Cn!==Gi)&&(window.sessionStorage.setItem(Di,Gi),ne(!0))}},mo),(0,St.useEffect)(()=>{Oe(dr)},[Pn,dr]),(0,St.useEffect)(()=>{Pn&&Li&&Pn.focus()},[Pn,Li]),(0,St.useEffect)(()=>{if(Or&&Pn){let vn=function(zn){let on=zn.target;if(Zn.current){let Ei=on.scrollTop/on.scrollHeight;Zn.current.scrollTop=Zn.current.scrollHeight*Ei}};const Cn=Pn.getScrollerElement();return Cn.addEventListener("scroll",vn),()=>{Cn.removeEventListener("scroll",vn)}}},[Pn,Or]),(0,St.useEffect)(()=>{if(Pn&&ei){let vn=function(Cn,zn){ei(Cn,zn)};return Pn.on("beforeChange",vn),()=>{Pn.off("beforeChange",vn)}}},[Pn,ei]),(0,St.useEffect)(()=>{if(Pn&&qe){let vn=function(){qe(Pn.getValue())};return Pn.on("blur",vn),()=>{Pn.off("blur",vn)}}},[Pn,qe]);function ke(vn,Cn){var zn=vn.getDoc(),on=zn.getCursor(),Ei=zn.getLine(on.line),Ii=Ei.charAt(on.ch-1),nr=Ei.lastIndexOf("@\u2581@",on.ch),Ni=Ei.lastIndexOf("@\u2581\u2581@",on.ch),Mr=nr>Ni?nr:Ni,yr=nr>Ni?3:4;if(ir.indexOf(Ii)===-1)return null;if(console.log("change1:",Cn,vn,Ei,on,Mr,nr,Ni,Ii),Mr>=0&&on.ch-Mr<5){var Zr=Mr+yr;return zn.replaceRange("",{line:on.line,ch:Mr},{line:on.line,ch:Zr}),{line:on.line,ch:Zr}}return null}(0,St.useEffect)(()=>{if(Pn){let vn=function(Cn,zn){const on=Cn.getValue();er(on),Ri(new Date().getTime()),Cn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),ln&&(De?ln(on,cn(on)):ln(on))};return Pn.on("change",vn),()=>{Pn.off("change",vn)}}},[Pn,ln]),(0,St.useEffect)(()=>{if(Pn)if(un==null)Pn.setValue(""),er("");else{const vn=window.scrollY||window.pageYOffset;un!==Pn.getValue()&&(Pn.setValue(un),er(un),Pn.setCursor(rn?1:Pn.lineCount(),0),window.scrollTo(0,vn))}},[Pn,un]);const An=(0,St.useCallback)(vn=>{const Cn=Pn.getCursor(),zn=Pn.getSelection();let on=zn.split(`
`);switch(vn){case"bold":return Pn.replaceSelection("**"+zn+"**"),zn===""&&Pn.setCursor(Cn.line,Cn.ch+2),Pn.focus();case"italic":return Pn.replaceSelection("*"+zn+"*"),zn===""&&Pn.setCursor(Cn.line,Cn.ch+1),Pn.focus();case"code":return Pn.replaceSelection("`"+zn+"`"),zn===""&&Pn.setCursor(Cn.line,Cn.ch+1),Pn.focus();case"inline-latex":return Qr("inline-latex"),Pn.focus();case"latex":return Pn.replaceSelection("```latex\n"+zn+"\n```"),Pn.setCursor(Cn.line+1,zn.length+1),Pn.focus();case"line-break":return Pn.replaceSelection(`<br/>
`),Pn.focus();case"list-ul":return zn===""?Pn.replaceSelection("- "+zn):Pn.replaceSelection(on.map(Ei=>Ei===""?"":`- ${Ei}`).join(`
`)),Pn.focus();case"list-ol":return zn===""?Pn.replaceSelection("1. "+zn):Pn.replaceSelection(on.map((Ei,Ii)=>Ei===""?"":`${Ii+1}. ${Ei}`).join(`
`)),Pn.focus();case"add-null-ch":return zn===""&&Pn.setCursor(Cn.line,Cn.ch),Pn.replaceSelection(no),Pn.focus();case"add-signal":return zn===""&&Pn.setCursor(Cn.line,Cn.ch),Pn.replaceSelection(so),Pn.focus();case"add-multiple":return zn===""&&Pn.setCursor(Cn.line,Cn.ch),Pn.replaceSelection(ir),Pn.focus();case"inster-template-1":return zn===""&&Pn.setCursor(Cn.line,Cn.ch),Pn.replaceSelection(Tt),Pn.focus();case"eraser":return Pn.setValue(""),Pn.focus();case"trigger-watch":return Oe(!Or),Pn.focus();case"trigger-full-screen":return hr(!Ui),Pn.focus();case pi:Qr(pi);return;case Lr:Qr(Lr);return;case ur:Qr(ur);return;case zi:Qr(zi);return;case"maths-latex":Qr("maths-latex");return;case Fi:Qr(Fi);return;case wi:Qr(wi);return;default:throw new Error}},[Pn,Or,Ui]),be=(0,St.useCallback)((vn,Cn)=>{var zn,on,Ei,Ii,nr,Ni;switch(Qr(""),Si){case pi:const{title:Gr,link:$r}=vn;return Pn.replaceSelection(`[${Gr}](${$r})`),Pn.focus();case Lr:const{language:Ue,content:Fr}=vn;return Pn.replaceSelection(["```"+Ue,Fr,"```"].join(`
`)),Pn.focus();case"maths-latex":for(var Mr=atob(vn),yr=new Uint8Array(Mr.length),Zr=0;Zr<Mr.length;Zr++)yr[Zr]=Mr.charCodeAt(Zr);var Dr=new Blob([yr],{type:"image/png"});(0,Yn.I)(Dr,$o=>{$o.id?Pn.replaceSelection(`![,](/api/attachments/${$o.id}?type=${$o.content_type})`):($o==null?void 0:$o.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Pn.replaceSelection("`$$"+vn+"$$`");break;case ur:case zi:case Xi:const{src:Er,alt:fr}=vn,$i=Cn,Rr=(Ei=(on=(zn=$i==null?void 0:$i.name)==null?void 0:zn.split("."))==null?void 0:on.pop)==null?void 0:Ei.call(on);return((Ii=$i==null?void 0:$i.type)==null?void 0:Ii.indexOf("image"))>-1||!($i!=null&&$i.type)?$i!=null&&$i.align||$i!=null&&$i.width?Pn.replaceSelection(`<p style="text-align:${$i.align||"initial"}"><img width="${$i.width?$i.width+"%":"initial"}" src="${Er}" alt="${fr||""}" /></p>`):Pn.replaceSelection(`<img width="100%" src="${Er}" alt="${fr||""}" />`):((nr=$i==null?void 0:$i.type)==null?void 0:nr.indexOf("video"))>-1?Pn.replaceSelection(`<video width="100%" controls src="${Er}"></video>`):((Ni=$i==null?void 0:$i.type)==null?void 0:Ni.indexOf("pdf"))>-1?Pn.replaceSelection(`<a href="${Er}?type=${$i.type}&disposition=inline" target="_blank">${$i.name}</a>`):Pr.includes(Rr)?Pn.replaceSelection(`<a href="${Er}?type=office&disposition=inline" target="_blank">${$i.name}</a>`):Pn.replaceSelection(`[${$i.name}](${Er})`),Pn.focus();case wi:const{row:ro,col:eo,align:kr}=vn;let Ao=`
`;for(let $o=0;$o<ro;$o++){let Zs=[],ka=[];for(let zs=0;zs<eo;zs++)$o===1&&ka.push(Br[kr]),Zs.push(" ");$o===1&&(Ao+=`| ${ka.join(" | ")} |
`),Ao+=`| ${Zs.join(eo===1?"":" | ")} |
`}return Pn.replaceSelection(Ao+`
`),Pn.focus();default:throw new Error}},[Pn,Si]),Qt=(0,St.useMemo)(()=>{switch(Si){case pi:return St.createElement(gn,{callback:be,onCancel:ye});case Lr:return St.createElement($n.Z,{callback:be,onCancel:ye});case ur:return St.createElement(Yn.Z,{callback:be,onCancel:ye});case Fi:return St.createElement(Pe,{callback:be,onCancel:ye});case wi:return St.createElement(Ze,{callback:be,onCancel:ye});case"maths-latex":return St.createElement(Oi,{showSaveButton:!0,callback:be});case"inline-latex":return St.createElement(ai.Z,{showSaveButton:!0,callback:be});default:return null}},[Si]);function ye(){Qr("")}(0,St.useEffect)(()=>{if(hi.current){let vn=function(nr){Ei=!0,Ii=nr.pageY},Cn=function(){Ei=!1},zn=function(nr){if(Ei){let Ni=nr.pageY-Ii;Ni<0&&(Ni=0),Ni>300&&(Ni=300);let Mr=Sn+Ni+"px";re(Mr)}},on=hi.current,Ei=!1,Ii=0;return on.addEventListener("mousedown",vn),document.addEventListener("mousemove",zn),document.addEventListener("mouseup",Cn),()=>{on.removeEventListener("mousedown",vn),document.removeEventListener("mousemove",zn),document.removeEventListener("mouseup",Cn)}}},[Pn,hi]),(0,St.useEffect)(()=>{re(Sn)},[Sn]);const _n=Zi(We),li=Zi(qi),Wn={width:_n,height:li},Hn=(0,St.useMemo)(()=>{if(xr){let vn=new Date(xr),Cn=vn.getHours(),zn=vn.getMinutes(),on=vn.getSeconds();return Cn=Cn<10?"0"+Cn:Cn,zn=zn<10?"0"+zn:zn,on=on<10?"0"+on:on,`${Cn}:${zn}:${on}`}return 0},[xr]),cn=vn=>{const Cn=[];if(De){let zn=-1;vn=vn.replace(/(@▁▁@|@▁@)/g,function(on,Ei,Ii){Cn.push({multiLine:on!==so})})}return Cn};function kn(){window.sessionStorage.removeItem(Di),ne(!1),Ri(0)}function Ln(){ne(!1),Ri(0),Pn.setValue(window.sessionStorage.getItem(Di))}(0,St.useEffect)(()=>{tr[Si]&&Si!==zi&&Si!==Fi&&setTimeout(()=>{const vn=document.getElementsByClassName("markdown-popup-form")[0],Cn=window.innerWidth/2-vn.offsetWidth/2,zn=window.innerHeight/2-vn.offsetHeight/2;Fe(Cn),Jn(zn)},0)},[Si]);const Qe=vn=>{vn.preventDefault();const Cn=vn.clientX-Xe,zn=vn.clientY-an;document.body.onmousemove=on=>{let Ei=on.clientX-Cn,Ii=on.clientY-zn;const nr=document.getElementsByClassName("markdown-popup-form")[0],Ni=window.innerWidth-nr.offsetWidth,Mr=window.innerHeight-nr.offsetHeight;Ei=Math.max(0,Math.min(Ei,Ni)),Ii=Math.max(0,Math.min(Ii,Mr)),sn(on.clientX,on.clientY,Cn,zn)&&(Fe(Ei),Jn(Ii))},document.body.onmouseup=function(){document.body.onmousemove=null}},sn=(vn,Cn,zn,on)=>{const Ei=document.body.clientHeight,Ii=document.body.clientWidth;return vn<20&&zn>vn||vn>Ii-20&&zn<vn||Cn<20&&on>Cn||Cn>Ei-20&&on<Cn?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return St.createElement(St.Fragment,null,St.createElement("div",{className:"markdown-editor-wrapper",ref:Mi},St.createElement("div",{className:`markdown-editor-container ${ki} ${Or?"on-preview":""} ${Ki?"mini":""} ${Ui?"full-screen":""}`,style:Wn},St.createElement(Ot,{insertTemp:se,watch:Or,fullScreen:Ui,showNullButton:le,showNullProgramButton:De,onActionCallback:An,hidetoolBar:Xn,extraUse:Pi}),St.createElement("div",{className:"markdown-editor-body"},St.createElement("div",{className:"codemirror-container"},St.createElement("textarea",{ref:ii,placeholder:fn})),Or?St.createElement("div",{ref:Zn,className:"preview-container"},Mn==="stex"&&St.createElement(Yt,{value:Gi}),Mn!=="stex"&&St.createElement(Ie.Z,{disabledFill:Ve,showProgramFill:De,value:Gi})):null))),pr?St.createElement("a",{ref:hi,className:"editor-resize"}):null,Si===zi&&St.createElement(Je,{callback:be,onCancel:ye}),Si===Fi&&St.createElement(Pe,{callback:be,onCancel:ye}),St.createElement(Zt.Z,null,tr[Si]&&Si!==zi&&Si!==Fi?St.createElement(nn.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Xe,top:an},title:St.createElement("div",{style:{cursor:"move"},onMouseDown:Qe},tr[Si]),open:!0,onCancel:ye,footer:null,destroyOnClose:!0,width:Si===Fi?"1200px":null,height:Si===Fi?"80vh":null,className:"markdown-popup-form"},Qt):null))}},17077:function(mn,je,Ut){"use strict";Ut.d(je,{Z:function(){return Ht},I:function(){return Zt}});var St=Ut(28284),Xt=Ut(6767),Ae=Ut(37568),xe=Ut(77736),fe=Ut(71051),Rt=Ut(47889),ie=Ut(99571),ae=Ut(46699),de=Ut(59301),zt=Ut(59301),Ie=Object.defineProperty,Yt=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,It=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,At=(Wt,te,we)=>te in Wt?Ie(Wt,te,{enumerable:!0,configurable:!0,writable:!0,value:we}):Wt[te]=we,at=(Wt,te)=>{for(var we in te||(te={}))nt.call(te,we)&&At(Wt,we,te[we]);if(It)for(var we of It(te))et.call(te,we)&&At(Wt,we,te[we]);return Wt},dt=(Wt,te)=>Yt(Wt,Me(te));const{useForm:gt}=St.default,xt={width:280,marginRight:10},kt={labelCol:{span:5},wrapperCol:{span:19}};var Ht=({callback:Wt,onCancel:te})=>{const[we]=gt();let pe=(0,de.useRef)();function Ke(dn){pe.current.width=we.getFieldValue("width"),pe.current.align=we.getFieldValue("align"),Wt(dn,pe.current)}function _e(dn,yn){if(dn.status===-1){Xt.ZP.error(dn.message);return}we.setFieldsValue({src:`/api/attachments/${dn.id}`,type:yn.type})}function en(dn){let yn=dn.target.files[0];pe.current=yn,Zt(yn,_e)}return zt.createElement(St.default,dt(at({form:we},kt),{className:"upload-image-panel",onFinish:Ke,style:{width:470,overflow:"hidden"}}),zt.createElement(St.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},zt.createElement("div",{className:"flex-container"},zt.createElement(St.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},zt.createElement(Ae.default,{style:xt})),zt.createElement(Ot,{onFileChange:en}))),zt.createElement(St.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},zt.createElement(Ae.default,{style:{width:264}})),zt.createElement(St.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},zt.createElement(xe.Z,null,zt.createElement(St.default.Item,{name:"width",style:{margin:0}},zt.createElement(fe.Z,{style:{width:264}})),zt.createElement("span",{className:"ml8"},"%"))),zt.createElement(St.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},zt.createElement(Rt.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"}]})),zt.createElement("aside",null,zt.createElement(St.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},zt.createElement(ie.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),zt.createElement(ie.ZP,{type:"default",onClick:te},"\u53D6\u6D88"))))};function Ot({onFileChange:Wt}){return zt.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",zt.createElement("input",{type:"file",onChange:Wt}))}function Zt(Wt,te){if(!Wt)throw new String("\u6CA1\u6709\u6587\u4EF6");let we=new FormData;we.append("editormd-image-file",Wt),we.append("file_param_name","editormd-image-file"),we.append("byxhr","true");var pe=new window.XMLHttpRequest;pe.withCredentials=!0,pe.addEventListener("load",function(Ke){te(JSON.parse(Ke.target.responseText),Wt)},!1),pe.addEventListener("error",function(Ke){console.error(Ke)},!1),pe.open("POST",`${ae.KI}/api/attachments.json`),pe.send(we)}},91558:function(mn,je,Ut){"use strict";Ut.d(je,{Z:function(){return Ae}});var St=Ut(59301),Xt=Ut(4676);class Ae extends St.Component{constructor(fe){super(fe);const Rt=window.document;this.node=Rt.createElement("div"),Rt.body.appendChild(this.node)}render(){const{children:fe}=this.props;return(0,Xt.createPortal)(fe,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},75975:function(mn,je,Ut){"use strict";Ut.d(je,{SV:function(){return Le},ZP:function(){return Je}});var St=Ut(59301),Xt=Ut(76374);const Ae={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},xe={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},fe={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(`
`)}]},Rt={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(`
`)}]},ie={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 ae=Ut(53184),de=Ut.n(ae),zt=(tn,ti,jn)=>new Promise((Gt,Ft)=>{var mt=Ct=>{try{Lt(jn.next(Ct))}catch(_t){Ft(_t)}},vt=Ct=>{try{Lt(jn.throw(Ct))}catch(_t){Ft(_t)}},Lt=Ct=>Ct.done?Gt(Ct.value):Promise.resolve(Ct.value).then(mt,vt);Lt((jn=jn.apply(tn,ti)).next())});const Ie={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"]}},Yt=(tn,ti,jn,Gt)=>{const Ft=ti.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:jn.lineNumber,endColumn:jn.column});return Array.from(new Set(Ft.match(/\b\w{2,}\b/g)||[])).map(vt=>({label:vt,kind:tn.languages.CompletionItemKind.Text,insertText:vt,range:Gt}))},Me=(tn,ti,jn,Gt)=>{tn.languages.registerCompletionItemProvider(ti,{provideCompletionItems(Ft,mt){const vt=Ft.getWordUntilPosition(mt),Lt={startLineNumber:mt.lineNumber,endLineNumber:mt.lineNumber,startColumn:vt.startColumn,endColumn:vt.endColumn},Ct=Ft.getLineContent(mt.lineNumber).substring(vt.startColumn-2,vt.endColumn);return{suggestions:[...Yt(tn,Ft,mt,Lt),...jn.map(Pe=>({label:Pe,kind:tn.languages.CompletionItemKind.Keyword,documentation:Pe,insertText:Pe,insertTextRules:tn.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Lt})),...Gt.map(Pe=>({label:Pe.label,kind:tn.languages.CompletionItemKind.Snippet,documentation:Pe.content,insertText:Ct.startsWith("#")?Pe.content.replace(/#/,""):Pe.content,insertTextRules:tn.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Lt}))]}}})};var It=tn=>{Ie.languages.forEach(ti=>{tn.languages.registerDocumentFormattingEditProvider(ti,{provideDocumentFormattingEdits(jn){return zt(this,null,function*(){const Gt=de()(jn.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:jn.getFullModelRange(),text:Gt}]})}})}),Me(tn,"java",xe.keywords,xe.quickKey),Me(tn,"cpp",fe.keywords,fe.quickKey),Me(tn,"c",Ae.keywords,[]),Me(tn,"python",Rt.keywords,Rt.quickKey),Me(tn,"scala",ie.keywords,ie.quickKey)};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 et=Object.defineProperty,At=(tn,ti,jn)=>ti in tn?et(tn,ti,{enumerable:!0,configurable:!0,writable:!0,value:jn}):tn[ti]=jn,at=(tn,ti,jn)=>At(tn,typeof ti!="symbol"?ti+"":ti,jn);const dt=class Bw{constructor(ti,jn,Gt){this.placeholder=ti,this.editor=jn,this.monaco=Gt,jn.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return Bw.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)}};at(dt,"ID","editor.widget.placeholderHint");var xt=dt,kt=Ut(96236),Ht=Ut(6767),Ot=Ut(25399),Zt=Ut(89392),Wt=Ut(49535),te=Ut(56102),we=Object.defineProperty,pe=Object.defineProperties,Ke=Object.getOwnPropertyDescriptors,_e=Object.getOwnPropertySymbols,en=Object.prototype.hasOwnProperty,dn=Object.prototype.propertyIsEnumerable,yn=(tn,ti,jn)=>ti in tn?we(tn,ti,{enumerable:!0,configurable:!0,writable:!0,value:jn}):tn[ti]=jn,Nn=(tn,ti)=>{for(var jn in ti||(ti={}))en.call(ti,jn)&&yn(tn,jn,ti[jn]);if(_e)for(var jn of _e(ti))dn.call(ti,jn)&&yn(tn,jn,ti[jn]);return tn},Kn=(tn,ti)=>pe(tn,Ke(ti)),me=(tn,ti)=>{var jn={};for(var Gt in tn)en.call(tn,Gt)&&ti.indexOf(Gt)<0&&(jn[Gt]=tn[Gt]);if(tn!=null&&_e)for(var Gt of _e(tn))ti.indexOf(Gt)<0&&dn.call(tn,Gt)&&(jn[Gt]=tn[Gt]);return jn},ee=(tn,ti,jn)=>new Promise((Gt,Ft)=>{var mt=Ct=>{try{Lt(jn.next(Ct))}catch(_t){Ft(_t)}},vt=Ct=>{try{Lt(jn.throw(Ct))}catch(_t){Ft(_t)}},Lt=Ct=>Ct.done?Gt(Ct.value):Promise.resolve(Ct.value).then(mt,vt);Lt((jn=jn.apply(tn,ti)).next())});function gn(tn){return/^\d+$/.test(tn)?`${tn}px`:tn}function $n(){}let Yn=!1;const nn={"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 Tn(tn=[]){let ti=tn;if(Array.isArray(tn)){for(let jn=0;jn<tn.length;jn++){let Gt=nn[tn[jn]];if(Gt)return Gt}return ti[0]}return nn[ti]||ti}let Gn=null;const yi=()=>ee(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(tn){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",tn)}});var Je=tn=>{var ti=tn,{width:jn="100%",height:Gt="100%",value:Ft,language:mt="javascript",style:vt={},options:Lt={},overrideServices:Ct={},theme:_t="vs-dark",onEditBlur:Pe,isCopy:ze=!1,onSave:wn,autoHeight:Ge=!1,forbidCopy:Te=!1,onChange:Ze=$n,editorDidMount:hn=$n,onFocus:In=$n,onBreakPoint:si=$n,breakPointValue:Dn=[],filename:Oi="educoder.txt",errorLine:ai,errorContent:Ai="",highlightLine:pi,openBreakPoint:ur=!1,placeholder:Fi="",showMiniMap:zi=!0}=ti,Xi=me(ti,["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 Lr=(0,St.useRef)(),wi=(0,St.useRef)({}),Nr=(0,St.useRef)(),Br=(0,St.useRef)(),jr=(0,St.useRef)([]),Wi=(0,St.useRef)(!1),po=(0,St.useRef)(),mo=(0,St.useRef)(),no=(0,St.useRef)(!1),[ir,so]=(0,St.useState)(!1);function Tt(){let se;return Lr.current&&(se=new Xt.Z(Mn=>{for(let Di of Mn)(Di.target.offsetHeight>0||Di.target.offsetWidth>0)&&wi.current.instance.layout()}),se.observe(Lr.current)),se}function Pr(){Ht.ZP.warning({content:decodeURIComponent(nt),key:"monaco-editor-tip"})}const Zi=()=>{let se=wi.current.instance;if(Ft!=null&&se&&ir){const Mn=se.getModel();Mn&&Ft!==Mn.getValue()&&(Yn=!0,Mn.setValue(Ft),se.layout(),Yn=!1)}};(0,St.useEffect)(()=>{const se=Wt.Z.subscribe("formatDocument",Mn=>{var Di;let pr=wi.current.instance;(Di=pr==null?void 0:pr.getAction)==null||Di.call(pr,"editor.action.formatDocument").run()});return window.updateMonacoValue=Mn=>{Ze(Mn)},se},[]),(0,St.useEffect)(()=>{var se;let Mn=wi.current.instance;Br.current&&clearTimeout(Br.current),Br.current=setTimeout(()=>{Zi()},500),Ft&&(Ft!=null&&Ft.length)&&((se=Mn==null?void 0:Mn.updateOptions)==null||se.call(Mn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ft.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ft,ir,wi.current]),(0,St.useEffect)(()=>{if(ai&&wi.current&&wi.current.instance){let Mn=wi.current.instance;Mn.changeViewZones(function(Di){var pr=document.createElement("div");pr.style.padding="10px 20px",pr.style.width="calc(100% - 20px)",pr.className="my-error-line-wrp",pr.innerHTML=Ai,Di.addZone({afterLineNumber:ai||11,heightInLines:3,domNode:pr})});var se={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}};Mn.addOverlayWidget(se),Mn.revealPositionInCenter({lineNumber:20,column:1})}},[ai,wi.current,ir]);const xi=(se="",Mn)=>{if(!se||se.trim()==="")return!0;const pr=wi.current.instance.getModel().getLineTokens(Mn);let Vn=!1;for(let le=0;le<2;le++)pr.getStandardTokenType(le)===1&&(Vn=!0);return Vn};(0,St.useEffect)(()=>{var se;const Mn=(se=wi.current)==null?void 0:se.instance;if(Mn&&ir&&Te){const Di=Mn.onDidBlurEditorWidget(()=>{no.current=!1}),pr=Mn.onDidFocusEditorText(()=>{no.current=!0});return()=>{Di.dispose(),pr.dispose()}}},[wi.current,ir,Te]),(0,St.useEffect)(()=>{var se;if((se=wi.current)!=null&&se.instance&&ir&&ur){let Mn=wi.current.instance,Di=Mn.getModel();if(!Di)return;(()=>{var rn;let Ve=[],fn=[];const mi=Di.getAllDecorations();for(let Pn of mi)Pn.options.className==="highlighted-line"&&(Ve.push((rn=Pn==null?void 0:Pn.range)==null?void 0:rn.startLineNumber),fn.push(Pn==null?void 0:Pn.id));if(pi===Ve[0])return;Di.deltaDecorations(fn,[]);const Pi=Di.getLineCount();pi&&pi<=Pi&&(Mn.deltaDecorations([],[{range:new Gn.Range(pi,1,pi,Di.getLineMaxColumn(pi)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Mn.revealLineInCenter(pi))})();const Vn=(rn=!1)=>{var Ve;let fn=[],mi=[];const Pi=Di.getAllDecorations();for(let Pn of Pi)Pn.options.linesDecorationsClassName==="breakpoints-select"&&(fn.push((Ve=Pn==null?void 0:Pn.range)==null?void 0:Ve.startLineNumber),mi.push(Pn==null?void 0:Pn.id));if(rn)return{lines:fn,ids:mi};si(fn)},le=rn=>ee(void 0,null,function*(){let Ve={range:new Gn.Range(rn,1,rn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Di.deltaDecorations([],[Ve]),Vn()}),De=rn=>ee(void 0,null,function*(){let Ve=[];const fn=Mn.getLineDecorations(rn);for(let mi of fn)mi.options.linesDecorationsClassName==="breakpoints-select"&&Ve.push(mi.id);yield Di.deltaDecorations(Ve,[]),Vn()}),Xn=rn=>{let Ve=Mn.getLineDecorations(rn);for(let fn of Ve)if(fn.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Zt.isEqual)(Dn,Vn(!0).lines)){Di.deltaDecorations(Vn(!0).ids,[]);const rn=Dn.map(Ve=>({range:new Gn.Range(Ve,1,Ve,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Di.deltaDecorations([],rn)}const On=Mn.onDidChangeModelContent(rn=>{let Ve=Mn.getPosition();if(Ve){let fn=Ve.lineNumber;clearTimeout(mo.current),mo.current=setTimeout(()=>{xi(Di.getLineContent(fn),fn)?De(fn):Xn(fn)?(De(fn),le(fn)):Vn()},100)}}),qe=Mn.onMouseDown(rn=>{var Ve,fn,mi;if(rn.target.detail&&((mi=(fn=(Ve=rn.target)==null?void 0:Ve.element)==null?void 0:fn.className)!=null&&mi.includes("line-numbers"))){let Pi=rn.target.position.lineNumber;if(xi(Di.getLineContent(Pi),Pi))return;Xn(Pi)?De(Pi):le(Pi)}}),ei=rn=>{let Ve={range:new Gn.Range(rn,1,rn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};jr.current=Mn.deltaDecorations(jr.current,[Ve])},fi=()=>{jr.current=Mn.deltaDecorations(jr.current,[])},ki=Mn.onMouseMove(rn=>{var Ve,fn,mi;if(fi(),rn.target.detail&&((mi=(fn=(Ve=rn.target)==null?void 0:Ve.element)==null?void 0:fn.className)!=null&&mi.includes("line-numbers"))){let Pi=rn.target.position.lineNumber;if(xi(Di.getLineContent(Pi),Pi))return;ei(Pi)}}),Vi=Mn.onMouseLeave(()=>{fi()});return()=>{On.dispose(),qe.dispose(),ki.dispose(),Vi.dispose()}}},[wi.current,ir,Dn,pi,ur,mt]),(0,St.useEffect)(()=>{var se;(se=wi.current)!=null&&se.instance&&ur&&wi.current.instance.setPosition({lineNumber:0,column:0})},[pi]);function Hi(){let se=wi.current.instance;if(se){const Mn=se.getSelection(),Di=wi.current.pastePos||{},pr=new Gn.Range(Di.startLineNumber||Mn.endLineNumber,Di.startColumn||Mn.endColumn,Di.endLineNumber||Mn.endLineNumber,Di.endColumn||Mn.endColumn);setTimeout(()=>{se.executeEdits("",[{range:pr,text:""}])},300)}}function ji(se){(window.navigator.platform.match("Mac")?se.metaKey:se.ctrlKey)&&se.keyCode==83&&(se.preventDefault(),wn())}const tr=()=>{if(Ge&&wi.current.instance){const se=wi.current.instance.getContentHeight();Li(se<Gt?Gt:se)}else Li(Gt)};function qr(se){var Mn=document.createEvent("MouseEvents");Mn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),se.dispatchEvent(Mn)}const un=se=>{if(!no.current)return;const{keyCode:Mn,ctrlKey:Di,metaKey:pr,target:Vn,type:le}=se;return(le==="paste"||(Mn===67||Mn===86)&&(pr||Di))&&Vn.nodeName==="TEXTAREA"&&(Pr(),se.preventDefault()),!1};function ln(se,Mn){var Di=window.URL||window.webkitURL||window,pr=new Blob([Mn]),Vn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Vn.href=Di.createObjectURL(pr),Vn.download=se,qr(Vn)}(0,St.useEffect)(()=>{tr()},[tr]),(0,St.useEffect)(()=>{Lr.current&&!ir&&Promise.all([Ut.e(8909),Ut.e(6656)]).then(Ut.bind(Ut,71448)).then(se=>{try{Gn=se,wi.current.instance=Gn.editor.create(Lr.current,{value:Ft,language:Tn(mt),theme:_t,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:zi||!1}},Ct);const Mn=wi.current.instance;let Vn=[...kt.BH._menuItems].find(On=>On[0]._debugName=="EditorContext")[1],le=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],De=(On,qe)=>{var ei,fi;let ki=On._first;do qe.includes((fi=(ei=ki.element)==null?void 0:ei.command)==null?void 0:fi.id)&&On._remove(ki);while(ki=ki.next)};if(hn(Mn,Gn),setTimeout(()=>{tr(),wi.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{ln(Oi||"educoder.txt",Mn.getValue())}})},500),wi.current.subscription=Mn.onDidChangeModelContent(On=>{Wi.current?clearTimeout(po.current):(tr(),Ze(Mn.getValue(),On)),po.current=setTimeout(()=>{Wi.current=!1},500)}),window.Monaco||It(Gn,Tn(mt)),Te&&(De(Vn,le),Lr.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",un),window.removeEventListener("paste",un),window.addEventListener("keydown",un),window.addEventListener("paste",un)),window.Monaco=Gn,Pe&&Mn.onDidBlurEditorWidget(()=>{Pe(Mn.getValue())}),In&&Mn.onDidFocusEditorText(()=>{Te&&yi(),In(Mn.getValue())}),Te){yi();try{Mn.onDidPaste(On=>{const qe=Mn.getSelection(),ei=wi.current.pastePos||{},fi=new Gn.Range(ei.startLineNumber||qe.endLineNumber,ei.startColumn||qe.endColumn,ei.endLineNumber||qe.endLineNumber,ei.endColumn||qe.endColumn);Mn.executeEdits("",[{range:On.range,text:""}])})}catch(On){}}let Xn=Tt();return Fi&&typeof Fi=="string"&&new xt(Fi,Mn,Gn),so(!0),()=>{const On=wi.current.instance;On.dispose();const qe=On.getModel();qe&&qe.dispose(),wi.current.subscription&&wi.current.subscription.dispose(),Xn.unobserve(Lr.current)}}catch(Mn){}})},[]),(0,St.useEffect)(()=>{if(wi.current.instance&&ir)return document.addEventListener("keydown",ji,!1),()=>{document.removeEventListener("keydown",ji)}},[wn,ir]),(0,St.useEffect)(()=>{let se=wi.current.instance;if(se&&ir){let Mn=Tn(mt);Gn.editor.setModelLanguage(se.getModel(),Mn)}},[mt,ir]),(0,St.useEffect)(()=>{wi.current.instance&&ir&&Gn.editor.setTheme(_t)},[_t,ir]),(0,St.useEffect)(()=>{let se=wi.current.instance;Nr.current=Lt,se&&ir&&(se.updateOptions(Nn({},Lt)),setTimeout(()=>{se.getModel().updateOptions(Nn({},Lt))},200))},[JSON.stringify(Lt),ir]),(0,St.useEffect)(()=>{let se=wi.current.instance;se&&ir&&se.layout()},[jn,Gt,ir]);const[We,Sn]=(0,St.useState)(gn(jn)),[Ki,Li]=(0,St.useState)(gn(Gt)),dr=Kn(Nn({},vt),{width:We,height:Ki,position:"relative"});return St.createElement("div",{className:"my-monaco-editor",ref:Lr,style:dr},ze&&St.createElement(te.CopyToClipboard,{text:Ft,onCopy:()=>Ht.ZP.success("\u590D\u5236\u6210\u529F")},St.createElement(Ot.Z,{title:"\u590D\u5236\u4EE3\u7801"},St.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},St.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Le({width:tn="100%",height:ti="100%",original:jn,modified:Gt,language:Ft,options:mt={}}){const vt=(0,St.useRef)(),[Lt,Ct]=(0,St.useState)(null);function _t(Ge){let Te;return vt.current&&(Te=new Xt.Z(Ze=>{for(let hn of Ze)(hn.target.offsetHeight>0||hn.target.offsetWidth>0)&&Ge.layout()}),Te.observe(vt.current)),Te}(0,St.useEffect)(()=>(vt.current&&Promise.all([Ut.e(8909),Ut.e(9404)]).then(Ut.bind(Ut,2550)).then(Ge=>{Gn=Ge;const Te=Gn.editor.createDiffEditor(vt.current,Kn(Nn({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},mt),{wordWrap:!0}));Ct(Te);let Ze=_t(Te);return()=>{Te.dispose();const hn=Te.getModel();hn&&hn.dispose(),Ze.unobserve(vt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,St.useEffect)(()=>{Lt&&Lt.setModel({original:Gn.editor.createModel(jn,Ft),modified:Gn.editor.createModel(Gt,Ft)})},[jn,Gt,Ft,Lt]);const Pe=gn(tn),ze=gn(ti),wn={width:Pe,height:ze};return St.createElement("div",{className:"my-diff-editor",ref:vt,style:wn})}},10661:function(mn,je,Ut){"use strict";Ut.d(je,{Z:function(){return Yt}});var St={flex_box_center:"flex_box_center___AQ53o",flex_space_between:"flex_space_between___i2aIa",flex_box_vertical_center:"flex_box_vertical_center___sPEKB",flex_box_center_end:"flex_box_center_end___GhSSH",flex_box_column:"flex_box_column___R9_Hb",list:"list___jb2Ay",wrap:"wrap___VsQDr",lockWrap:"lockWrap___g1k1T",li:"li___IxCLC",cover:"cover___Mu8wr",img:"img___IpFLA",movebq:"movebq___mF7wt",bq:"bq___Bil0T",sign:"sign___DXJ4d",name:"name___l7FoJ",e:"e___pXQUG",unit:"unit___wCIFR",tags:"tags___w_Mil",tag1:"tag1___dxm7r",tag2:"tag2___llZkf",wrapisCurrent:"wrapisCurrent___qIfQT"},Xt=Ut(29787),Ae=Ut(25399),xe=Ut(60242),fe=Ut(92310),Rt=Ut.n(fe),ie=Ut(51257),ae=Ut(28426),de=Ut(48790),zt=Ut(59301),Yt=({className:Me,dataSource:It=[],col:nt=4,right:et,bottom:At=23,precision:at=0,wrapWidth:dt=1200,trackEventItems:gt,loading:xt,onRemove:kt=()=>{},isCurrent:Ht=!0,showProgress:Ot=!1,showAlias:Zt=!1})=>{const Wt=Math.floor((dt-(nt-1)*et)/nt),te=[{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 zt.createElement(Xt.Z,{spinning:xt},zt.createElement("div",{className:Rt()(St.list,Me)},!!(It!=null&&It.length)&&(It==null?void 0:It.map((we,pe)=>{var Ke,_e,en,dn,yn,Nn;const{name:Kn,id:me,identifier:ee,featured:gn,school_name:$n,image_url:Yn,excellent:nn,is_plan:Tn}=we;return zt.createElement("div",{key:me,className:Ht&&Ot?St.wrapisCurrent:St.wrap,style:{width:Wt,marginRight:(1+pe)%nt===0?0:et+at,marginBottom:At}},zt.createElement("a",{className:St.li,onClick:Gn=>{Gn.preventDefault(),Gn.stopPropagation(),gt&&(0,ie.L9)([gt]),(0,ie.xg)(`/paths/${ee}`)}},zt.createElement("div",{className:St.img},zt.createElement("img",{className:St.cover,src:`${Yn}`}),Ht&&(0,de.bg)()&&(we==null?void 0:we.studying)&&zt.createElement("div",{className:`${St.movebq} user-path-items`,onClick:Gn=>{Gn.stopPropagation(),kt(we)}},zt.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),zt.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Ke=we==null?void 0:we.subject_tags)==null?void 0:Ke.map((Gn,yi)=>{var Je,Le;if(yi===0){const ti=(Je=te.find(jn=>jn.name==Gn))==null?void 0:Je.swimg;return zt.createElement("img",{className:St.sign,src:ti,style:{left:"-4px"}})}const tn=(Le=te.find(ti=>ti.name==Gn))==null?void 0:Le.ptimg;return zt.createElement("img",{className:St.sign,src:tn,style:{left:`${48+52*(yi-1)+2*yi}px`}})}),zt.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(we==null?void 0:we.excellent)&&zt.createElement("div",{className:St.bq},"\u5F00\u653E\u8BFE\u7A0B"))),zt.createElement("div",{className:St.name},zt.createElement(Ae.Z,{title:Zt&&(we!=null&&we.excellent_alias_name)?zt.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${Kn}`,zt.createElement("br",null),zt.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${we==null?void 0:we.excellent_alias_name}`)):Kn},zt.createElement("span",{className:St.e},Zt&&(we==null?void 0:we.excellent_alias_name)||Kn))),Ht&&Ot&&((_e=we==null?void 0:we.progress)==null?void 0:_e.all_score)!=0&&zt.createElement("div",{style:{padding:"0px 10px",color:"#333",marginTop:10}},zt.createElement(xe.Z,{strokeColor:"#44d7b6",gap:"small",percent:(((en=we==null?void 0:we.progress)==null?void 0:en.my_score)/((dn=we==null?void 0:we.progress)==null?void 0:dn.all_score)*100).toFixed(),showInfo:!1}),"\u5DF2\u5B8C\u6210 ",(yn=we==null?void 0:we.progress)==null?void 0:yn.my_score,"/",(Nn=we==null?void 0:we.progress)==null?void 0:Nn.all_score),(!Ht||!Ot)&&zt.createElement(Ae.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${$n}`},zt.createElement("div",{className:St.unit},zt.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),$n)),(!Ht||!Ot)&&zt.createElement("div",{className:St.tags},zt.createElement("div",null,zt.createElement(Ae.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},zt.createElement("span",null,zt.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),zt.createElement("span",null,we.stages_count))),zt.createElement(Ae.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},zt.createElement("span",null,zt.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),zt.createElement("span",null,we.members_count)))))))})),!It.length&&zt.createElement(ae.Z,null)))}},9148:function(mn,je,Ut){"use strict";Ut.d(je,{jL:function(){return fe},w9:function(){return gn},QD:function(){return ai},cQ:function(){return yn.Z},op:function(){return Ze},O5:function(){return Zi},_b:function(){return Xi},t7:function(){return at},Gi:function(){return yi},YG:function(){return Tn},qp:function(){return Ie},vr:function(){return ur},qE:function(){return si},Je:function(){return xt},wb:function(){return dn},cq:function(){return Gt},tp:function(){return It}});var St=Ut(59301),Xt={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"},Ae="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==",fe=({dataSource:xi=[],img:Hi,imgWidth:ji=346,title:tr,sunTitle:qr,bannerExtraContent:un})=>St.createElement("div",{className:Xt.banner},St.createElement("div",{className:Xt.content},St.createElement("aside",null,St.createElement("p",null,St.createElement("b",null,tr),St.createElement("span",null,qr)),xi.length>0&&St.createElement("div",{className:Xt.btns},xi.map((ln,We)=>St.createElement("div",{key:We,onClick:ln.click},ln.name,ln.sign?St.createElement("img",{src:Ae,width:39}):null))),un),Hi&&St.createElement("img",{style:{marginTop:33,marginRight:38},src:Hi,width:ji}))),Rt={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"},ie=Ut(92310),ae=Ut.n(ie),de=Ut(89392),Ie=({dataSource:xi=[],value:Hi,onChange:ji,onTitleChange:tr,className:qr,title:un,titleWidth:ln=41,style:We={},fontColor:Sn="#6A7283",showCount:Ki})=>{const[Li,dr]=(0,St.useState)(0),[se,Mn]=(0,St.useState)(!1),Di=(0,St.useRef)(null),pr=(0,St.useRef)(null);return(0,St.useEffect)(()=>{var Vn;xi.length!==0&&(((Vn=Di==null?void 0:Di.current)==null?void 0:Vn.clientHeight)>97?dr(1):dr(0)),xi.length===0&&dr(0),Mn(!1)},[xi]),St.createElement("div",{className:ae()(Rt.row,qr),style:We},St.createElement("div",{onClick:(0,de.throttle)(()=>tr==null?void 0:tr(),2e3),style:{width:ln,marginTop:se?12:4},className:`${Rt.title} ${tr?"current":""}`},un),St.createElement("div",{className:se?`${Rt.tagsWrap} ${Rt.tagsBorderWrap}`:Rt.tagsWrap},St.createElement("div",{className:Rt.bar,ref:pr,style:Li>0?{height:Li===1?97:"auto",overflow:Li===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},St.createElement("div",{className:Rt.tag,ref:Di},xi==null?void 0:xi.map(Vn=>St.createElement("span",{onClick:()=>ji(Vn.id),key:Vn.id,style:{color:Sn},className:Hi===Vn.id?Rt.active:""},St.createElement("span",{title:Vn.name,className:Rt.name},Vn.name),!!Ki&&St.createElement("span",{className:Rt.num},Vn.count))))),!!Li&&St.createElement(St.Fragment,null,Li===1?St.createElement("div",{onClick:()=>{var Vn;dr(2),((Vn=Di==null?void 0:Di.current)==null?void 0:Vn.clientHeight)>245?Mn(!0):Mn(!1)},className:Rt.action},"\u5C55\u5F00",St.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):St.createElement("div",{onClick:()=>{pr.current.scrollTop=0,dr(1),Mn(!1)},className:Rt.action},"\u6536\u8D77",St.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},Yt={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"},It=({dataSource:xi=[],value:Hi,onChange:ji,className:tr,style:qr={}})=>St.createElement("div",{style:qr,className:ae()(Yt.tabs,tr)},xi.map(un=>St.createElement("span",{onClick:()=>ji(un.id),className:Hi===un.id?Yt.active:"",key:un.id},un.name))),nt={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"},et=Ut(37568),at=({dataSource:xi=[],value:Hi="",onChange:ji,onInputChange:tr=()=>{},className:qr,style:un={},placeholder:ln,allowClear:We=!1})=>{var Sn;const[Ki,Li]=(0,St.useState)(""),[dr,se]=(0,St.useState)("");(0,St.useEffect)(()=>{var pr;let Vn=Hi;(pr=JSON.stringify(Hi))!=null&&pr.includes("{")&&(Li(Hi.id),Vn=Hi.value||"");try{se(decodeURIComponent(Vn||""))}catch(le){se(decodeURIComponent(Vn||""))}},[Hi]);const Mn=()=>{ji(encodeURIComponent(dr),Ki||null)},Di=pr=>{pr!==Ki&&(Li(pr),ji(encodeURIComponent(dr),pr))};return St.createElement("div",{className:ae()(nt.input,qr),style:un},!!xi.length&&St.createElement("div",{className:nt.dropdown},St.createElement("div",{className:nt.text},(Sn=xi.find(pr=>pr.id===Ki))==null?void 0:Sn.name,St.createElement("i",{className:"iconfont icon-zhankai4"}),St.createElement("b",{className:nt.b1}),St.createElement("b",{className:nt.b2})),St.createElement("div",{className:nt.menu},xi.map((pr,Vn)=>St.createElement("div",{key:Vn,onClick:()=>Di(pr.id)},pr.name)))),St.createElement(et.default,{onPressEnter:Mn,value:dr,onChange:pr=>{se(pr.target.value),tr(encodeURIComponent(pr.target.value),Ki||null)},bordered:!1,placeholder:ln}),St.createElement("i",{onClick:Mn,className:"iconfont icon-sousuo9 font14 pl10 current"}))},dt={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"},xt=({value:xi,onChange:Hi,className:ji,total:tr,pageSize:qr,style:un={}})=>{const ln=xi<2,We=xi>=Math.ceil(tr/qr);return tr<=qr?St.createElement(St.Fragment,null):St.createElement("div",{className:ae()(dt.quickPager,ji),style:un},St.createElement("div",{onClick:()=>{ln||Hi(xi-1,"prev")},className:ln?dt.disabled:""},"\u4E0A\u4E00\u9875"),St.createElement("div",{onClick:()=>{We||Hi(xi+1,"next")},className:We?dt.disabled:""},"\u4E0B\u4E00\u9875"))},kt={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"},Ht=Ut(29787),Ot=Ut(25399),Zt=Ut(58018),Wt=Ut(346),te=Ut(51257),we=Ut(96908),pe=Ut(57177),Ke=Ut(81378),_e=Ut(28426),dn=({className:xi,dataSource:Hi=[],col:ji=4,right:tr,bottom:qr=23,precision:un=0,wrapWidth:ln=1200,trackEventItems:We,loading:Sn})=>{const Ki=Math.floor((ln-(ji-1)*tr)/ji);return St.createElement(Ht.Z,{spinning:Sn},St.createElement("div",{className:ae()(kt.list,xi)},!!Hi.length&&Hi.map((Li,dr)=>{const{name:se,id:Mn,identifier:Di,power:pr,cover_image_id:Vn,pic:le}=Li;return St.createElement("div",{className:kt.wrap,key:Mn,style:{width:Ki,marginRight:(1+dr)%ji===0?0:tr+un,marginBottom:qr}},St.createElement("a",{target:"_blank",href:`/shixuns/${Di}/challenges`,className:kt.li,onClick:De=>{De.preventDefault(),We&&(0,te.L9)([We]),pr&&(0,te.xg)(`/shixuns/${Di}/challenges`)}},St.createElement("div",{className:kt.img},St.createElement("img",{className:kt.cover,src:`${le}`}),Li.is_jupyter&&St.createElement("img",{className:kt.sign,src:we}),Li.is_jupyter_lab&&St.createElement("img",{className:kt.sign,src:pe}),Li.is_unity_3d&&St.createElement("img",{className:kt.sign,src:Ke})),St.createElement("div",{className:kt.name},St.createElement(Ot.Z,{title:se||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},St.createElement("span",{className:kt.e},se||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),St.createElement("div",{className:kt.tags},St.createElement(Ot.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},St.createElement("span",null,St.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),St.createElement("span",null,Li.challenges_count))),!!Li.myshixuns_count&&St.createElement(Ot.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},St.createElement("span",null,St.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),St.createElement("span",null,Li.myshixuns_count))),St.createElement(Ot.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},St.createElement("span",null,St.createElement("span",null,Li.level))),St.createElement("div",{className:kt.rate},St.createElement(Zt.Z,{allowHalf:!0,disabled:!0,defaultValue:Li.score_info}),St.createElement("span",null,"\xA0",Li.score_info?`${Li.score_info}\u5206`:"5\u5206")))),!pr&&St.createElement("div",{className:kt.lockWrap},St.createElement("img",{src:`${Wt.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),St.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!Hi.length&&St.createElement(_e.Z,null)))},yn=Ut(10661),Nn={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"},Kn="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",me=Ut(59301),gn=({className:xi,dataSource:Hi=[],col:ji=4,right:tr,bottom:qr=23,precision:un=0,wrapWidth:ln=1200,trackEventItems:We,loading:Sn,handleVery:Ki=()=>!0})=>{const Li=Math.floor((ln-(ji-1)*tr)/ji);return me.createElement(Ht.Z,{spinning:Sn},me.createElement("div",{className:ae()(Nn.list,xi)},!!Hi.length&&Hi.map((dr,se)=>{const{subject_identifier:Mn,id:Di,identifier:pr,power:Vn}=dr,le=dr.is_public!=0&&dr.is_public;return me.createElement("div",{className:Nn.wrap,key:Di,style:{width:Li,marginRight:(1+se)%ji===0?0:tr+un,marginBottom:qr}},me.createElement("a",{className:Nn.li,onClick:De=>{De.preventDefault(),Ki(dr==null?void 0:dr.first_category_url)&&(We&&(0,te.L9)([We]),(0,te.xg)(dr.first_category_url))}},me.createElement("div",{className:Nn.top},me.createElement(Ot.Z,{title:dr.name},me.createElement("div",{className:Nn.name},dr.name)),me.createElement("img",{className:Nn.img,src:Wt.Z.IMG_SERVER+"/images/"+dr.avatar_url}),me.createElement("div",{className:Nn.text,title:dr.creator},dr.creator),Mn&&me.createElement("div",{className:Nn.btns},me.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),me.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),le&&me.createElement("div",{className:Nn.sign},"\u516C\u5F00")),me.createElement("div",{className:Nn.bottom},dr.visits>0&&me.createElement(Ot.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},me.createElement("span",null,me.createElement("i",{className:"iconfont icon-liulanyan"}),me.createElement("span",null,dr.visits))),dr.course_members_count>0&&me.createElement(Ot.Z,{title:"\u6210\u5458",placement:"bottom"},me.createElement("span",null,me.createElement("i",{className:"iconfont icon-chengyuan"}),dr.course_members_count)),dr.tasks_count>0&&me.createElement(Ot.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},me.createElement("span",null,me.createElement("i",{className:"iconfont icon-zuoye"}),dr.tasks_count)),dr.is_end?me.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):me.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!dr.is_accessible&&me.createElement("div",{className:Nn.lockWrap},me.createElement("img",{src:`${Wt.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),me.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!Hi.length&&me.createElement(_e.Z,null)))},$n={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"},Yn=Ut(25690),Tn=({dataSource:xi=[],value:Hi,onChange:ji,className:tr,style:qr={},tabBarExtraContent:un})=>St.createElement("div",{className:ae()($n.tabs,tr),style:qr},St.createElement("div",{className:$n.tabsWrap},xi.map((ln,We)=>!(ln!=null&&ln.hide)&&St.createElement("aside",{className:$n.tab,onClick:()=>{ji(ln.id),ln.link&&Yn.history.push(ln.link)},key:We},St.createElement("div",{className:Hi===ln.id?$n.active:""},ln.name),(ln==null?void 0:ln.resetCount)==null&&(ln==null?void 0:ln.total)!==void 0&&St.createElement("span",null,"\uFF08",ln==null?void 0:ln.total,"\uFF09"),(ln==null?void 0:ln.resetCount)!==void 0&&(ln==null?void 0:ln.total)!==void 0&&St.createElement(Ot.Z,{title:(ln==null?void 0:ln.tip)!=null?ln==null?void 0:ln.tip:""},St.createElement("span",{style:{color:"#9096A3"}},"\uFF08",St.createElement("span",{style:{color:"#000"}},ln==null?void 0:ln.resetCount),"/",St.createElement("span",null,ln==null?void 0:ln.total),"\uFF09"))))),St.createElement("div",{className:$n.tabBar},un)),yi=({className:xi,style:Hi={},children:ji})=>St.createElement("div",{className:ae()(xi),style:Hi},ji),Je={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"},Le=Ut(75727),tn=Ut(93041);const ti=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var Gt=({sortValue:xi,dropValue:Hi,className:ji,onSort:tr,onDrop:qr,dataSource:un=ti})=>{var ln;return St.createElement("div",{className:ae()(Je.orderWrap,ji)},St.createElement(Le.Z,{dropdownRender:()=>St.createElement(tn.default,null,un.map((We,Sn)=>St.createElement(tn.default.Item,{key:Sn,onClick:()=>qr(We.id)},We.name)))},St.createElement("span",{className:Je.orderTextWrap},(ln=un.find(We=>Hi===We.id))==null?void 0:ln.name)),St.createElement("span",{className:Je.orderIconWrap},St.createElement("span",{className:Je.orderAsc},St.createElement("i",{className:xi==="asc"?`iconfont icon-sanjiaoxing-up font12 ${Je.cursorPointer} ${Je.active}`:`iconfont icon-sanjiaoxing-up font12 ${Je.cursorPointer}`,onClick:()=>tr(xi==="asc"?"desc":"asc")})),St.createElement("span",{className:Je.orderDesc},St.createElement("i",{className:xi==="desc"?`iconfont icon-sanjiaoxing-down font12 ${Je.cursorPointer} ${Je.active}`:`iconfont icon-sanjiaoxing-down font12 ${Je.cursorPointer}`,onClick:()=>tr(xi==="asc"?"desc":"asc")}))))},Ft={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"},mt=Ut(99571),vt=Object.defineProperty,Lt=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,_t=Object.prototype.propertyIsEnumerable,Pe=(xi,Hi,ji)=>Hi in xi?vt(xi,Hi,{enumerable:!0,configurable:!0,writable:!0,value:ji}):xi[Hi]=ji,ze=(xi,Hi)=>{for(var ji in Hi||(Hi={}))Ct.call(Hi,ji)&&Pe(xi,ji,Hi[ji]);if(Lt)for(var ji of Lt(Hi))_t.call(Hi,ji)&&Pe(xi,ji,Hi[ji]);return xi},wn=(xi,Hi)=>{var ji={};for(var tr in xi)Ct.call(xi,tr)&&Hi.indexOf(tr)<0&&(ji[tr]=xi[tr]);if(xi!=null&&Lt)for(var tr of Lt(xi))Hi.indexOf(tr)<0&&_t.call(xi,tr)&&(ji[tr]=xi[tr]);return ji},Ge=(xi,Hi,ji)=>new Promise((tr,qr)=>{var un=Sn=>{try{We(ji.next(Sn))}catch(Ki){qr(Ki)}},ln=Sn=>{try{We(ji.throw(Sn))}catch(Ki){qr(Ki)}},We=Sn=>Sn.done?tr(Sn.value):Promise.resolve(Sn.value).then(un,ln);We((ji=ji.apply(xi,Hi)).next())}),Ze=xi=>{var Hi=xi,{className:ji,style:tr,children:qr,loading:un=!1,openLoading:ln,onClick:We=()=>{},size:Sn="middle",shape:Ki="round"}=Hi,Li=wn(Hi,["className","style","children","loading","openLoading","onClick","size","shape"]);const[dr,se]=(0,St.useState)(!1);return St.createElement(mt.ZP,ze({onClick:(0,de.throttle)(Mn=>Ge(void 0,null,function*(){ln&&se(!0);try{yield We(Mn)}catch(Di){console.log("error",Di)}ln&&se(!1)}),2e3,{leading:!0,trailing:!1}),className:ae()(Ft.btn,Ft[`${Sn}-${Ki}`],ji),style:tr,size:Sn,shape:Ki,loading:dr||un},Li),qr)},hn={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"},si=({className:xi,style:Hi,children:ji=null,onClick:tr,title:qr})=>St.createElement("div",{className:ae()(hn.head,xi),style:Hi},St.createElement("span",{className:"primary-hover",onClick:tr},St.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),St.createElement("b",{title:qr},qr),St.createElement("div",{className:hn.node},ji)),Dn={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"},ai=({confirmShow:xi=!0,confirmTitle:Hi,confirmClick:ji,cancelShow:tr=!0,cancelTitle:qr,cancelClick:un,className:ln,style:We,confirmLoading:Sn=!1})=>St.createElement("div",{className:ae()(Dn.btns,ln),style:We},xi&&St.createElement(mt.ZP,{loading:Sn,onClick:ji,type:"primary",className:Dn.confirm},Hi),tr&&St.createElement(mt.ZP,{onClick:un,className:Dn.cancel},qr)),Ai={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"},ur=({className:xi,style:Hi={},LeftContent:ji,children:tr,RightContent:qr})=>St.createElement("div",{className:ae()(Ai.fixedBottom,xi),style:Hi},St.createElement("div",{className:Ai.wrap},St.createElement("div",{className:Ai.left},ji),St.createElement("div",{className:Ai.center},tr),St.createElement("div",{className:Ai.right},qr))),Fi={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"},Xi=({className:xi,style:Hi={},dataSource:ji=[]})=>St.createElement("div",{className:ae()(Fi.crumbs,xi),style:Hi},ji.map((tr,qr)=>qr<ji.length-1?St.createElement(St.Fragment,{key:qr},tr.path||tr.onClick?St.createElement("span",{className:Fi.hover,onClick:tr!=null&&tr.onClick?tr.onClick:()=>Yn.history.push(tr.path)},tr.name):St.createElement("span",null,tr.name),St.createElement("span",null,"\xA0",">","\xA0")):St.createElement("span",{key:qr,style:{color:"#5F6368"}},tr.name))),Lr=Ut(11938),wi=Object.defineProperty,Nr=Object.defineProperties,Br=Object.getOwnPropertyDescriptors,jr=Object.getOwnPropertySymbols,Wi=Object.prototype.hasOwnProperty,po=Object.prototype.propertyIsEnumerable,mo=(xi,Hi,ji)=>Hi in xi?wi(xi,Hi,{enumerable:!0,configurable:!0,writable:!0,value:ji}):xi[Hi]=ji,no=(xi,Hi)=>{for(var ji in Hi||(Hi={}))Wi.call(Hi,ji)&&mo(xi,ji,Hi[ji]);if(jr)for(var ji of jr(Hi))po.call(Hi,ji)&&mo(xi,ji,Hi[ji]);return xi},ir=(xi,Hi)=>Nr(xi,Br(Hi)),so=(xi,Hi)=>{var ji={};for(var tr in xi)Wi.call(xi,tr)&&Hi.indexOf(tr)<0&&(ji[tr]=xi[tr]);if(xi!=null&&jr)for(var tr of jr(xi))Hi.indexOf(tr)<0&&po.call(xi,tr)&&(ji[tr]=xi[tr]);return ji};const{Countdown:Tt}=Lr.default;var Zi=xi=>{var Hi=xi,{onChange:ji}=Hi,tr=so(Hi,["onChange"]);const[qr,un]=(0,St.useState)(null);(0,St.useEffect)(()=>{typeof qr=="number"&&qr>=0&&ji(qr)},[qr]);const ln=We=>{const Sn=Math.floor(We/1e3);un(Sn)};return St.createElement(Tt,ir(no({},tr),{onChange:ln}))}},37808:function(mn,je,Ut){"use strict";Ut.d(je,{Z:function(){return Xt}});var St=Ut(59301);function Xt(Ae,xe){const fe=(0,St.useRef)();(0,St.useEffect)(()=>{fe.current=Ae}),(0,St.useEffect)(()=>{function Rt(){fe.current()}if(xe!==null){let ie=setInterval(Rt,xe);return()=>clearInterval(ie)}},[xe])}},96954:function(mn,je,Ut){"use strict";Ut.r(je),Ut.d(je,{default:function(){return Vi}});var St=Ut(59301),Xt=Ut(61186),Ae=Ut.n(Xt),xe=Ut(86129),fe=Ut.n(xe),Rt=Ut(38986),ie=Ut(25690),ae=Ut(62957),de=Ut(6767),zt=Ut(458),Ie=Ut(91882),Yt=Ut(77019),Me=Ut(5269),It=Ut(99571),nt=Ut(25399),et=Ut(37285),At=Ut(37568),at=Ut(54172),dt=Ut(82326),gt=Ut(13747),xt=Ut(27812),kt=Ut(95869),Ht=Ut(87169),Ot=Ut(26227),Zt=Ut(346),Wt=Ut(48790),te=Ut(51257),we=Ut(42441),pe={flex_box_center:"flex_box_center___KJUhi",flex_space_between:"flex_space_between____N4uH",flex_box_vertical_center:"flex_box_vertical_center___yOdsz",flex_box_center_end:"flex_box_center_end___seJB9",flex_box_column:"flex_box_column___ihHC5",title:"title___JSmnB",score:"score___ERcuI",export:"export___pgR1H",title1_right:"title1_right___MdWJo",userPic:"userPic___UeG3e",userInfo:"userInfo___TNu6l",listItem:"listItem___wdbM_",rightInfo:"rightInfo___Swqk5",shixunTitle:"shixunTitle___L2Tc4",shixunWrp:"shixunWrp___ZoaTc",footerBar:"footerBar___QW5rq",footerBarStatic:"footerBarStatic___CRq8b",exitComment:"exitComment___u4Rqt",nextComment:"nextComment___lvaID",modal:"modal___g3B3L",footer:"footer___eJCnt",pingjia:"pingjia___X_ooM",pj_close:"pj_close___PHP4h",pj_save:"pj_save___COfQy"},Ke={normal:{opacity:.8,shadowBlur:10,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",color:"#2e65ad"}};const _e=({shixunHomeworks:rn,data:Ve,globalSetting:fn,loading:mi,dispatch:Pi})=>{var Pn;const{shixunWorkReport:ni}=rn;let Gi=((Pn=Ve==null?void 0:Ve.efficiency_list)==null?void 0:Pn.length)-parseInt(Ve==null?void 0:Ve.myself_eff[0]);const er=()=>({title:{text:"\u5B66\u4E60\u6548\u7387",subtext:"\u5B66\u4E60\u6548\u7387=log(\u5B9E\u8BAD\u603B\u5F97\u5206/\u5B9E\u8BAD\u603B\u8017\u65F6)"},backgroundColor:"#fff",color:["#dd4444","#fec42c","#80F1BE"],grid:{left:"3%",right:"9%",bottom:"3%",containLabel:!0},tooltip:{showDelay:0,formatter:function(Oe){return Oe.name===ni.username?"\u59D3\u540D\uFF1A"+ni.username+"<br/>\u5B66\u53F7\uFF1A "+ni.user_id+"<br/>\u6548\u7387\uFF1A"+(Ve==null?void 0:Ve.myself_eff[1]):Oe.name+":"+Oe.value+" "},axisPointer:{show:!0,type:"cross",lineStyle:{type:"dashed",width:1}}},xAxis:[{type:"value",name:"\u5B66\u751F\u4F4D\u7F6E",nameTextStyle:{color:"#000",fontSize:12},scale:!0,axisLabel:{formatter:""},axisTick:{show:!1},splitLine:{show:!1}}],yAxis:[{type:"value",name:" ",nameGap:20,nameTextStyle:{color:"#000",fontSize:12},scale:!0,axisLabel:{formatter:"{value}"},splitLine:{show:!1}}],series:[{name:"",type:"scatter",data:Ve==null?void 0:Ve.efficiency_list,itemStyle:{normal:{color:"#2e65ad"}},markArea:{silent:!0,itemStyle:{normal:{color:"transparent",borderWidth:1,borderType:"dashed"}},data:[[{name:"\u5B66\u4E60\u6548\u7387\u5206\u5E03\u533A\u95F4",xAxis:"min",yAxis:"min"},{xAxis:"max",yAxis:"max"}]]},markPoint:{data:[{name:ni.username,xAxis:Gi,yAxis:Ve==null?void 0:Ve.myself_eff[1],value:Ve==null?void 0:Ve.myself_eff[1]}],itemStyle:{normal:{color:"#c23531"}}},markLine:{lineStyle:{normal:{type:"solid",color:"#ff6800"}},data:[{type:"average",name:"\u4E2D\u4F4D\u503C"}]}}]}),Or=()=>({title:{text:"\u80FD\u529B\u503C",subtext:"\u80FD\u529B\u503C\uFF08\u5B9E\u8BAD\u83B7\u5F97\u7ECF\u9A8C\u503C/\u5B9E\u8BAD\u8BC4\u6D4B\u6B21\u6570\uFF09"},backgroundColor:"#fff",color:["#dd4444","#fec42c","#80F1BE"],grid:{x:"10%",x2:150,y:"18%",y2:"10%"},tooltip:{padding:10,backgroundColor:"#222",borderColor:"#777",borderWidth:1,formatter:function(Oe){var Ui=Oe.value;if(Oe.name===ni.username)return"\u59D3\u540D\uFF1A"+ni.username+"<br/>\u5B66\u53F7\uFF1A "+ni.user_id+"<br/>\u5F97\u5206\uFF1A"+(Ve==null?void 0:Ve.myself_object[1])}},xAxis:{type:"value",name:"log(\u5B9E\u8BAD\u7684\u603B\u65F6\u95F4)",nameGap:16,nameTextStyle:{color:"#000",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#000"}}},yAxis:{type:"value",name:" ",nameLocation:"end",nameGap:20,nameTextStyle:{color:"#000",fontSize:12},axisLine:{lineStyle:{color:"#000"}},splitLine:{show:!1}},series:[{name:"\u80FD\u529B",type:"scatter",itemStyle:Ke,data:Ve==null?void 0:Ve.consume_list,symbolSize:function(Oe){return Math.round(Oe[2])},markPoint:{data:[{name:ni.username,xAxis:Ve==null?void 0:Ve.myself_object[0],yAxis:Ve==null?void 0:Ve.myself_object[1],value:Ve==null?void 0:Ve.myself_object[1]}],itemStyle:{normal:{color:"#c23531"}}}}]});return St.createElement(St.Fragment,null,St.createElement("aside",{className:"ml60 pr30"},St.createElement(Yt.Z,null,St.createElement(Me.Z,{flex:"800px"},St.createElement(we.Z,{style:{width:750,height:580},option:er()})),St.createElement(Me.Z,{flex:"1"},St.createElement("aside",{className:pe.rightInfo},St.createElement("ul",null,St.createElement("li",null,St.createElement("span",null,"\u59D3\u540D")," ",St.createElement("span",{className:"ml30"},ni.username)),St.createElement("li",null,St.createElement("span",null,"\u5B66\u53F7")," ",St.createElement("span",{className:"ml30"},ni.student_id||"--")),St.createElement("li",null,St.createElement("span",null,"\u5B66\u4E60\u6548\u7387")," ",St.createElement("span",{className:"ml30 c-orange"},Ve==null?void 0:Ve.myself_eff[1])),St.createElement("li",null,St.createElement("span",null,"\u5F53\u524D\u6392\u540D")," ",St.createElement("span",{className:"ml30 c-orange"},Ve==null?void 0:Ve.myself_eff[0]))),St.createElement("p",null,"1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387",St.createElement("br",null),"\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387\u503C",St.createElement("br",null),"\u5C0F\u5706\u70B9\u8D8A\u9AD8\uFF0C\u5B66\u4E60\u6548\u7387\u8D8A\u9AD8",St.createElement("br",null),"\u6A59\u8272\u6A2A\u5411\u7BAD\u5934\uFF1A\u4E2D\u4F4D\u503C\uFF0C\u8868\u793A\u6574\u4E2A\u8BFE\u5802\u5B66\u751F\u8868\u73B0\u7684\u5E73\u5747\u503C"))))),St.createElement("aside",{className:"ml60 pr30"},St.createElement(Yt.Z,null,St.createElement(Me.Z,{flex:"800px"},St.createElement(we.Z,{style:{width:750,height:580},option:Or()})),St.createElement(Me.Z,{flex:"1"},St.createElement("aside",{className:pe.rightInfo},St.createElement("ul",null,St.createElement("li",null,St.createElement("span",null,"\u59D3\u540D")," ",St.createElement("span",{className:"ml30"},ni.username)),St.createElement("li",null,St.createElement("span",null,"\u5B66\u53F7")," ",St.createElement("span",{className:"ml30"},ni.student_id||"--")),St.createElement("li",null,St.createElement("span",null,"\u80FD\u529B")," ",St.createElement("span",{className:"ml30 c-orange"},Ve==null?void 0:Ve.myself_object[1]))),St.createElement("p",null,"1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u80FD\u529B\u503C",St.createElement("br",null),"\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u80FD\u529B\u503C",St.createElement("br",null),"\u5C0F\u5706\u5708\u8D8A\u5927\uFF0C\u8BC4\u6D4B\u6B21\u6570\u8D8A\u5C11",St.createElement("br",null)))))))};var en=(0,ie.connect)(({shixunHomeworks:rn,loading:Ve,globalSetting:fn})=>({shixunHomeworks:rn,globalSetting:fn,loading:Ve.effects}))(_e),dn=Ut(75975),yn=Ut(71051),Nn=({defaultValue:rn,onBlur:Ve,max:fn,className:mi="game-score"})=>{const[Pi,Pn]=(0,St.useState)(rn);(0,St.useEffect)(()=>{Pn(rn)},[rn]);function ni(er){Pn(er)}function Gi(){Pi!==rn&&Ve(Pi>fn?fn:Pi)}return St.createElement(yn.Z,{max:fn,min:0,className:mi,value:Pi,onChange:ni,onBlur:Gi})},Kn=Ut(39793),me={md:"md___TEmcT"},ee=Ut(59301),gn=Object.defineProperty,$n=Object.defineProperties,Yn=Object.getOwnPropertyDescriptors,nn=Object.getOwnPropertySymbols,Tn=Object.prototype.hasOwnProperty,Gn=Object.prototype.propertyIsEnumerable,yi=(rn,Ve,fn)=>Ve in rn?gn(rn,Ve,{enumerable:!0,configurable:!0,writable:!0,value:fn}):rn[Ve]=fn,Je=(rn,Ve)=>{for(var fn in Ve||(Ve={}))Tn.call(Ve,fn)&&yi(rn,fn,Ve[fn]);if(nn)for(var fn of nn(Ve))Gn.call(Ve,fn)&&yi(rn,fn,Ve[fn]);return rn},Le=(rn,Ve)=>$n(rn,Yn(Ve));const tn=dt.default.Option,ti={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,enableSplitViewResizing:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1};var jn=(rn=>(rn[rn.SET_PATH=0]="SET_PATH",rn[rn.GET_PASSED_CONTENT=1]="GET_PASSED_CONTENT",rn))(jn||{});function Gt(rn,Ve){switch(Ve.type){case 0:return Le(Je({},rn),{selectedPath:Ve.payload});case 1:return Le(Je({},rn),{passedContent:Ve.payload});default:throw new Error}}var Ft=({path:rn,game_id:Ve,onPathChange:fn,autoHeight:mi,diff_code_count:Pi,data:Pn,game_codes_cn:ni})=>{var Gi,er,Or,Oe;const Ui=rn.split("\uFF1B").filter(re=>!!re),[hr,Si]=(0,St.useReducer)(Gt,{selectedPath:Ui[0],passedContent:{language:"python",content:""}}),{selectedPath:Qr,passedContent:xr}=hr;function Ri(re){Si({type:0,payload:re})}const qi={\u6700\u540E\u901A\u5173\u4EE3\u7801:"\u901A\u8FC7\u4E86\u672C\u9898\uFF0C\u5728\u4F5C\u4E1A\u65F6\u95F4\u5185\u6700\u540E\u4E00\u6B21\u63D0\u4EA4\u7684\u901A\u5173\u4EE3\u7801",\u6700\u65B0\u4EE3\u7801:"\u672A\u901A\u8FC7\u672C\u9898\uFF0C\u5C55\u793A\u6700\u65B0\u7F16\u5199\u7684\u4EE3\u7801\u8BE6\u60C5",\u622A\u6B62\u540E\u901A\u5173\u4EE3\u7801:"\u5728\u4F5C\u4E1A\u65F6\u95F4\u7ED3\u675F\u540E\u901A\u5173\u8BE5\u9898\u7684\u4EE3\u7801\u8BE6\u60C5"};return ee.createElement(ee.Fragment,null,ee.createElement("h2",null," ",ee.createElement("span",null,ni,ee.createElement(nt.Z,{title:ee.createElement("div",null,ee.createElement("div",null,"\u4EE3\u7801\u5C55\u793A\u89C4\u5219\uFF1A"),ee.createElement("div",null,"1.\u5C55\u793A\u5B66\u5458\u5728\u4F5C\u4E1A\u622A\u6B62\u524D\u5F97\u5206\u6700\u9AD8\u7684\u4EE3\u7801\u7248\u672C\u3002"),ee.createElement("div",null," 2.\u82E5\u6709\u591A\u4E2A\u6700\u9AD8\u5206\u7248\u672C\uFF0C\u5C55\u793A\u63D0\u4EA4\u65F6\u95F4\u6700\u665A\u7684\u7248\u672C\u3002"),ee.createElement("div",null," 3.\u4F5C\u4E1A\u622A\u6B62\u540E\u63D0\u4EA4\u7684\u4EE3\u7801\u5C06\u4E0D\u4E88\u5C55\u793A\u3002"))},ee.createElement("i",{style:{marginLeft:10,color:"#3061D0",fontSize:16},className:"iconfont icon-tishixiaowenhao"}))),Pi&&ee.createElement("span",{style:{marginLeft:"50px"}},"\u4EE3\u7801\u4FEE\u6539\u884C\u6570 ",Pi),ee.createElement("span",null,ee.createElement(dt.default,{style:{width:200},value:Qr,onChange:Ri}," ",Ui.map(re=>ee.createElement(tn,{key:re,value:re},re))," "))," "),(Qr==null?void 0:Qr.split(".")[1])==="md"&&ee.createElement(Kn.Z,{height:300,autoHeight:mi,defaultValue:((er=(Gi=Pn==null?void 0:Pn.filter(re=>re.path===Qr))==null?void 0:Gi[0])==null?void 0:er.content)||"",className:me.md}),(Qr==null?void 0:Qr.split(".")[1])!=="md"&&ee.createElement(dn.ZP,{height:300,language:xr.language,value:((Oe=(Or=Pn==null?void 0:Pn.filter(re=>re.path===Qr))==null?void 0:Or[0])==null?void 0:Oe.content)||"",autoHeight:mi,theme:"default",isCopy:!0,options:ti}))},mt=Ut(82264),vt=Ut(96249),Lt=Ut.n(vt),Ct=Object.defineProperty,_t=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable,wn=(rn,Ve,fn)=>Ve in rn?Ct(rn,Ve,{enumerable:!0,configurable:!0,writable:!0,value:fn}):rn[Ve]=fn,Ge=(rn,Ve)=>{for(var fn in Ve||(Ve={}))Pe.call(Ve,fn)&&wn(rn,fn,Ve[fn]);if(_t)for(var fn of _t(Ve))ze.call(Ve,fn)&&wn(rn,fn,Ve[fn]);return rn};const Te=rn=>React.createElement("svg",Ge({className:"scai_svg__icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:16,height:16},rn),React.createElement("path",{d:"M512 327.68c245.76 0 445.44 153.6 445.44 348.16C957.44 870.4 757.76 1024 512 1024c-245.76-5.12-445.44-153.6-445.44-348.16 0-194.56 199.68-348.16 445.44-348.16z",fill:"#DBDCFF"}),React.createElement("path",{d:"M645.12 947.2c117.76-10.24 158.72-143.36 163.84-266.24 0-128-128-174.08-291.84-174.08-163.84 0-291.84 46.08-291.84 174.08 0 112.64 35.84 240.64 143.36 261.12 30.72 5.12 261.12 10.24 276.48 5.12z",fill:"#111ACC"}),React.createElement("path",{d:"M404.48 686.08c15.36 0 25.6 10.24 25.6 25.6v61.44c0 15.36-10.24 25.6-25.6 25.6-15.36 0-25.6-10.24-25.6-25.6v-61.44c-5.12-10.24 10.24-25.6 25.6-25.6zm220.16 0c15.36 0 25.6 10.24 25.6 25.6v61.44c0 15.36-10.24 25.6-25.6 25.6-15.36 0-25.6-10.24-25.6-25.6v-61.44c0-10.24 10.24-25.6 25.6-25.6z",fill:"#FFF"}),React.createElement("path",{d:"M916.48 527.36c56.32 0 107.52 71.68 107.52 153.6 0 87.04-61.44 153.6-117.76 153.6 0 0 51.2-76.8 51.2-158.72s-40.96-148.48-40.96-148.48zm-808.96 5.12-5.12 5.12c-10.24 20.48-35.84 76.8-35.84 138.24 0 76.8 35.84 138.24 51.2 158.72C61.44 834.56 0 768 0 680.96c0-81.92 51.2-148.48 107.52-148.48z",fill:"#8187FF"}),React.createElement("path",{d:"M512 0c20.48 0 30.72 15.36 30.72 30.72v220.16c0 20.48-15.36 30.72-30.72 30.72s-30.72-10.24-30.72-30.72V30.72C481.28 15.36 496.64 0 512 0z",fill:"#701CDC"}),React.createElement("path",{d:"M384 46.08c20.48 0 30.72 15.36 30.72 30.72v133.12c0 20.48-15.36 30.72-30.72 30.72s-35.84-15.36-35.84-30.72V76.8c0-20.48 15.36-30.72 35.84-30.72z",fill:"#371CDC"}),React.createElement("path",{d:"M645.12 46.08c20.48 0 30.72 15.36 30.72 30.72v133.12c0 20.48-15.36 30.72-30.72 30.72s-30.72-15.36-30.72-30.72V76.8c0-20.48 15.36-30.72 30.72-30.72z",fill:"#AB2FF0"}),React.createElement("path",{d:"M250.88 87.04c20.48 0 30.72 15.36 30.72 30.72v46.08c0 20.48-15.36 30.72-30.72 30.72s-35.84-10.24-35.84-30.72v-40.96c0-20.48 15.36-35.84 35.84-35.84z",fill:"#6D57F2"}),React.createElement("path",{d:"M778.24 87.04c20.48 0 30.72 15.36 30.72 30.72v46.08c0 20.48-15.36 30.72-30.72 30.72s-30.72-15.36-30.72-30.72v-40.96c0-20.48 15.36-35.84 30.72-35.84z",fill:"#C86FFA"}));var Ze="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxwYXRoIGQ9Ik01MTIgMzI3LjY4YzI0NS43NiAwIDQ0NS40NCAxNTMuNiA0NDUuNDQgMzQ4LjE2Qzk1Ny40NCA4NzAuNCA3NTcuNzYgMTAyNCA1MTIgMTAyNGMtMjQ1Ljc2LTUuMTItNDQ1LjQ0LTE1My42LTQ0NS40NC0zNDguMTYgMC0xOTQuNTYgMTk5LjY4LTM0OC4xNiA0NDUuNDQtMzQ4LjE2eiIgZmlsbD0iI0RCRENGRiIvPjxwYXRoIGQ9Ik02NDUuMTIgOTQ3LjJjMTE3Ljc2LTEwLjI0IDE1OC43Mi0xNDMuMzYgMTYzLjg0LTI2Ni4yNCAwLTEyOC0xMjgtMTc0LjA4LTI5MS44NC0xNzQuMDgtMTYzLjg0IDAtMjkxLjg0IDQ2LjA4LTI5MS44NCAxNzQuMDggMCAxMTIuNjQgMzUuODQgMjQwLjY0IDE0My4zNiAyNjEuMTIgMzAuNzIgNS4xMiAyNjEuMTIgMTAuMjQgMjc2LjQ4IDUuMTJ6IiBmaWxsPSIjMTExQUNDIi8+PHBhdGggZD0iTTQwNC40OCA2ODYuMDhjMTUuMzYgMCAyNS42IDEwLjI0IDI1LjYgMjUuNnY2MS40NGMwIDE1LjM2LTEwLjI0IDI1LjYtMjUuNiAyNS42LTE1LjM2IDAtMjUuNi0xMC4yNC0yNS42LTI1LjZ2LTYxLjQ0Yy01LjEyLTEwLjI0IDEwLjI0LTI1LjYgMjUuNi0yNS42em0yMjAuMTYgMGMxNS4zNiAwIDI1LjYgMTAuMjQgMjUuNiAyNS42djYxLjQ0YzAgMTUuMzYtMTAuMjQgMjUuNi0yNS42IDI1LjYtMTUuMzYgMC0yNS42LTEwLjI0LTI1LjYtMjUuNnYtNjEuNDRjMC0xMC4yNCAxMC4yNC0yNS42IDI1LjYtMjUuNnoiIGZpbGw9IiNGRkYiLz48cGF0aCBkPSJNOTE2LjQ4IDUyNy4zNmM1Ni4zMiAwIDEwNy41MiA3MS42OCAxMDcuNTIgMTUzLjYgMCA4Ny4wNC02MS40NCAxNTMuNi0xMTcuNzYgMTUzLjYgMCAwIDUxLjItNzYuOCA1MS4yLTE1OC43MnMtNDAuOTYtMTQ4LjQ4LTQwLjk2LTE0OC40OHptLTgwOC45NiA1LjEyLTUuMTIgNS4xMmMtMTAuMjQgMjAuNDgtMzUuODQgNzYuOC0zNS44NCAxMzguMjQgMCA3Ni44IDM1Ljg0IDEzOC4yNCA1MS4yIDE1OC43MkM2MS40NCA4MzQuNTYgMCA3NjggMCA2ODAuOTZjMC04MS45MiA1MS4yLTE0OC40OCAxMDcuNTItMTQ4LjQ4eiIgZmlsbD0iIzgxODdGRiIvPjxwYXRoIGQ9Ik01MTIgMGMyMC40OCAwIDMwLjcyIDE1LjM2IDMwLjcyIDMwLjcydjIyMC4xNmMwIDIwLjQ4LTE1LjM2IDMwLjcyLTMwLjcyIDMwLjcycy0zMC43Mi0xMC4yNC0zMC43Mi0zMC43MlYzMC43MkM0ODEuMjggMTUuMzYgNDk2LjY0IDAgNTEyIDB6IiBmaWxsPSIjNzAxQ0RDIi8+PHBhdGggZD0iTTM4NCA0Ni4wOGMyMC40OCAwIDMwLjcyIDE1LjM2IDMwLjcyIDMwLjcydjEzMy4xMmMwIDIwLjQ4LTE1LjM2IDMwLjcyLTMwLjcyIDMwLjcycy0zNS44NC0xNS4zNi0zNS44NC0zMC43MlY3Ni44YzAtMjAuNDggMTUuMzYtMzAuNzIgMzUuODQtMzAuNzJ6IiBmaWxsPSIjMzcxQ0RDIi8+PHBhdGggZD0iTTY0NS4xMiA0Ni4wOGMyMC40OCAwIDMwLjcyIDE1LjM2IDMwLjcyIDMwLjcydjEzMy4xMmMwIDIwLjQ4LTE1LjM2IDMwLjcyLTMwLjcyIDMwLjcycy0zMC43Mi0xNS4zNi0zMC43Mi0zMC43MlY3Ni44YzAtMjAuNDggMTUuMzYtMzAuNzIgMzAuNzItMzAuNzJ6IiBmaWxsPSIjQUIyRkYwIi8+PHBhdGggZD0iTTI1MC44OCA4Ny4wNGMyMC40OCAwIDMwLjcyIDE1LjM2IDMwLjcyIDMwLjcydjQ2LjA4YzAgMjAuNDgtMTUuMzYgMzAuNzItMzAuNzIgMzAuNzJzLTM1Ljg0LTEwLjI0LTM1Ljg0LTMwLjcydi00MC45NmMwLTIwLjQ4IDE1LjM2LTM1Ljg0IDM1Ljg0LTM1Ljg0eiIgZmlsbD0iIzZENTdGMiIvPjxwYXRoIGQ9Ik03NzguMjQgODcuMDRjMjAuNDggMCAzMC43MiAxNS4zNiAzMC43MiAzMC43MnY0Ni4wOGMwIDIwLjQ4LTE1LjM2IDMwLjcyLTMwLjcyIDMwLjcycy0zMC43Mi0xNS4zNi0zMC43Mi0zMC43MnYtNDAuOTZjMC0yMC40OCAxNS4zNi0zNS44NCAzMC43Mi0zNS44NHoiIGZpbGw9IiNDODZGRkEiLz48L3N2Zz4=",hn=Ut(85788),In=Ut(76902),si=Object.defineProperty,Dn=Object.defineProperties,Oi=Object.getOwnPropertyDescriptors,ai=Object.getOwnPropertySymbols,Ai=Object.prototype.hasOwnProperty,pi=Object.prototype.propertyIsEnumerable,ur=(rn,Ve,fn)=>Ve in rn?si(rn,Ve,{enumerable:!0,configurable:!0,writable:!0,value:fn}):rn[Ve]=fn,Fi=(rn,Ve)=>{for(var fn in Ve||(Ve={}))Ai.call(Ve,fn)&&ur(rn,fn,Ve[fn]);if(ai)for(var fn of ai(Ve))pi.call(Ve,fn)&&ur(rn,fn,Ve[fn]);return rn},zi=(rn,Ve)=>Dn(rn,Oi(Ve)),Xi=(rn,Ve,fn)=>new Promise((mi,Pi)=>{var Pn=er=>{try{Gi(fn.next(er))}catch(Or){Pi(Or)}},ni=er=>{try{Gi(fn.throw(er))}catch(Or){Pi(Or)}},Gi=er=>er.done?mi(er.value):Promise.resolve(er.value).then(Pn,ni);Gi((fn=fn.apply(rn,Ve)).next())});const Lr=({shixunHomeworks:rn,autoHeight:Ve,classroomList:fn,dispatch:mi})=>{var Pi,Pn,ni,Gi,er,Or,Oe,Ui;const{shixunWorkReport:hr}=rn,{stage_list:Si,work_id:Qr,ai_code_evaluation_promote:xr}=hr,[Ri,qi]=(0,St.useState)(!1),[re,he]=(0,St.useState)(!0),[ne,Xe]=(0,St.useState)({left:0,top:0,bottom:0,right:0}),Fe=(0,St.useRef)(null),[an,Jn]=(0,St.useState)(!1),[ii,Mi]=(0,St.useState)(""),hi=(0,St.useRef)(null),Zn=(Qe,sn)=>{var vn;const{clientWidth:Cn,clientHeight:zn}=window.document.documentElement,on=(vn=Fe.current)==null?void 0:vn.getBoundingClientRect();on&&Xe({left:-on.left+sn.x,right:Cn-(on.right-sn.x),top:-on.top+sn.y,bottom:zn-(on.bottom-sn.y)})},ci=(0,ie.useParams)(),ke=(0,Wt.GJ)(),An={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1};(0,St.useEffect)(()=>{console.log(ci)},[]);const be=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"position",width:"100px"},{title:"\u8BE6\u7EC6\u4FE1\u606F",dataIndex:"output_detail",render:(Qe,sn,vn)=>St.createElement("div",null,Qe,sn.is_work_end_evaluate&&St.createElement(te.vA,{status:5}))},{title:"\u8BC4\u6D4B\u8017\u65F6(S)",dataIndex:"ts_time",width:"130px"},{title:"\u5185\u5B58\u6D88\u8017(MB)",width:"150px",dataIndex:"ts_mem"},{title:"\u8BC4\u6D4B\u65F6\u95F4",width:"170px",dataIndex:"created_at",render:Qe=>Ae()(Qe).format("YYYY-MM-DD HH:mm")},{title:"\u64CD\u4F5C",width:"80px",dataIndex:"query_index",render:(Qe,sn)=>St.createElement("span",{className:"c-blue current",onClick:()=>Xi(void 0,null,function*(){var vn,Cn;const zn=yield(0,mt.Lk)(sn.game_identifier,{path:(Cn=(vn=sn.path)==null?void 0:vn.replace(/\/g,";"))==null?void 0:Cn.split(";")[0],query_index:sn.query_index,homework_common_id:ci.categoryId});(zn==null?void 0:zn.status)===0&&(Jn(zn),qi(!0))})},sn.query_index?"\u67E5\u770B\u4EE3\u7801":"")}],Qt=[{title:"\u8C03\u5206\u7528\u6237",dataIndex:["user","name"],width:350,render:(Qe,sn)=>{var vn;return St.createElement("span",null,St.createElement("img",{width:30,height:30,style:{borderRadius:"50%",marginRight:"10px"},src:Zt.Z.IMG_SERVER+"/images/"+((vn=sn==null?void 0:sn.user)==null?void 0:vn.image_url)}),Qe)}},{title:"\u8C03\u5206\u524D",dataIndex:"old_score",width:270,render:Qe=>St.createElement("span",null,"\u4FEE\u6B63\u524D\u5206\u6570\uFF1A",Qe,"\u5206")},{title:"\u8C03\u5206\u540E",dataIndex:"score",width:270,render:Qe=>St.createElement("span",null,"\u4FEE\u6B63\u540E\u5206\u6570\uFF1A",Qe,"\u5206")},{title:"\u8C03\u5206\u65F6\u95F4",dataIndex:"created_at",align:"right",render:Qe=>St.createElement("span",null,"\u4FEE\u6B63\u65F6\u95F4\uFF1A",Qe?Ae()(Qe).format("YYYY-MM-DD HH:mm"):"--")}];function ye(Qe,sn){return Xi(this,null,function*(){const{challenge_id:vn}=Si[Qe],Cn=yield mi({type:"shixunHomeworks/changeScore",payload:{categoryId:ci.homeworkId,type:"report",score:sn,challenge_id:vn}});yield mi({type:"shixunHomeworks/getShixunWorkReport",payload:Fi({},ci)}),Cn.status===0&&de.ZP.success("\u64CD\u4F5C\u6210\u529F")})}function _n(Qe,sn){return(0,Rt.U2)(`student_works/${Qr}/rep_passed_content.json`,{path:sn,game_id:Qe})}const[li,Wn]=(0,St.useState)((Pi=hr==null?void 0:hr.shixun_detail)==null?void 0:Pi.map(Qe=>zi(Fi({},Qe),{commentEdit:!1}))),Hn=Qe=>Qe.replace(/\\\(([\s\S]*?)\\\)/g,"<mathx data-text='$1'>$$$$$1$$$$</mathx>").replace(/\\\[([\s\S]*?)\\\]/g,"<mathx data-text='$1'>$$$$$1$$$$</mathx>").replace(/`(\$\$.*?\$\$)`/g,"<mathx data-text='$1'>$$$$$1$$$$</mathx>").replace(/_{2,}/g,"`$&`"),[cn,kn]=(0,St.useState)(!1),Ln=(Qe,sn)=>Xi(void 0,null,function*(){var vn,Cn;kn(!0),hi.current=new hn.Z(Zt.Z.API_SERVER+"/api/stream/intelligent_imports/chat_messages.json",{response_mode:"streaming",model:"qwen-max",scene_awareness:!1,thinking_enabled:!1,image_generator:!1,file_ids:[],history:[],prompt:xr,shixun_id:hr==null?void 0:hr.myshixun_identifier,game_id:Qe==null?void 0:Qe.id,source:"shixun",is_chat:!1,type:9,description:Qe==null?void 0:Qe.challenge_description,query:(Cn=(vn=Qe==null?void 0:Qe.game_codes)==null?void 0:vn[0])==null?void 0:Cn.content,homework_common_id:ci.categoryId}),yield new Promise((zn,on)=>{hi.current.on("data",Ei=>{const Ii=[...li];Ii[sn].comment=Hn(Ei==null?void 0:Ei.full),Wn(Ii)}),hi.current.on("done",()=>Xi(void 0,null,function*(){var Ei;kn(!1);const Ii=[...li],nr=yield(0,Rt.ZP)(`/api/student_works/${ci==null?void 0:ci.homeworkId}/challenge_comment`,{method:"put",body:{challenge_id:Qe==null?void 0:Qe.challenge_id,comment:Ii[sn].comment}});if((nr==null?void 0:nr.status)==0){de.ZP.success("\u8BC4\u4EF7\u6210\u529F");const Ni=[...li];Ni[sn].comment_updated_at=(Ei=nr==null?void 0:nr.data)==null?void 0:Ei.comment_updated_at,Wn(Ni)}})),hi.current.startStream()})});return St.createElement(St.Fragment,null,li==null?void 0:li.map(function(Qe,sn){var vn,Cn;return St.createElement("div",{key:sn},St.createElement("aside",{className:"pl30 pr30",key:sn},St.createElement("div",{className:`${pe.shixunTitle} mt10`},St.createElement("div",null,St.createElement("span",{className:"fa fa-code "}),St.createElement("strong",{className:"c-black"},"\u7B2C",sn+1,"\u5173 ",St.createElement(ie.Link,{className:"c-black",target:"_blank",to:`/tasks/${ci.coursesId}/${ci.categoryId}/${Qe.game_identifier}`},Qe.subject))),ke?St.createElement("span",null,"\u8C03\u5206\uFF1A",St.createElement(Nn,{className:"game-score",max:Si[sn].game_score_full,defaultValue:Si[sn].game_score,onBlur:zn=>{var on;if((0,Wt.Rm)()&&!((on=fn.AssistantObject.practice)!=null&&on.can_appraise)){de.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}ye(sn,zn)}})):null),St.createElement("div",{className:"font16 mt10"},Qe.st===0&&(Qe.path?typeof(Qe==null?void 0:Qe.game_codes_cn)=="string"?St.createElement("aside",{className:pe.shixunWrp},St.createElement(Ft,{game_codes_cn:Qe==null?void 0:Qe.game_codes_cn,autoHeight:Ve,path:Qe.path,game_id:Qe.id,data:Qe.game_codes,diff_code_count:Qe.diff_code_count,onPathChange:_n})):St.createElement("div",{className:"font14",style:{border:"1px solid #d9d9d9",padding:"6px 10px"}}," \u63D0\u793A\uFF1A\u7EAF\u56FE\u5F62\u5316\u3001\u547D\u4EE4\u884C\u7684\u5B9E\u8BAD\u4E0D\u5C55\u793A\u901A\u5173\u4EE3\u7801\uFF0C\u5982\u9700\u67E5\u770B\u5B66\u751F\u4EE3\u7801\u8BF7\u524D\u5F80\u4F5C\u4E1A\u5217\u8868\u5BFC\u51FA\u5B9E\u9A8C\u6587\u4EF6\u3002"):"\u76EE\u524D\u56FE\u5F62\u5316\u3001\u547D\u4EE4\u884C\u3001Vscode\u7F16\u8F91\u5668\u3001\u7406\u8BBA\u9898\u6A21\u5F0F\u7684\u5B9E\u9A8C\uFF0C\u6682\u65F6\u65E0\u6CD5\u4F7F\u7528\u6B64\u529F\u80FD"),Qe.st===1&&(Qe.complete_status===0?"\u672C\u5173\u6682\u672A\u901A\u8FC7\uFF0C\u65E0\u901A\u5173\u4EE3\u7801":"\u76EE\u524D\u56FE\u5F62\u5316\u3001\u547D\u4EE4\u884C\u3001Vscode\u7F16\u8F91\u5668\u3001\u7406\u8BBA\u9898\u6A21\u5F0F\u7684\u5B9E\u9A8C\uFF0C\u6682\u65F6\u65E0\u6CD5\u4F7F\u7528\u6B64\u529F\u80FD")),St.createElement("aside",{className:"mt10 font16"},(vn=Qe.outputs)!=null&&vn.length?St.createElement(at.default,{columns:be,pagination:{hideOnSinglePage:!0},dataSource:Qe.outputs.map(zn=>Fi(Fi({},Qe),zn))}):"\u672C\u5173\u65E0\u8BC4\u6D4B\u8BB0\u5F55"),St.createElement("aside",{className:"mt10"},St.createElement("div",null,St.createElement("div",{style:{display:"flex",alignItems:"center"}},St.createElement("strong",{className:"c-black font14"},"\u4EE3\u7801\u8BC4\u4EF7"),!(Qe!=null&&Qe.commentEdit)&&!(0,Wt.dE)()&&(Qe!=null&&Qe.comment?St.createElement(St.Fragment,null,St.createElement("div",{style:{color:"#666666",fontSize:"12px",marginLeft:"auto"}},"\u6700\u65B0\u8BC4\u4EF7\u65F6\u95F4\uFF1A",Qe!=null&&Qe.comment_updated_at?Ae()(Qe==null?void 0:Qe.comment_updated_at).format("YYYY-MM-DD HH:mm:ss"):"--"),St.createElement("div",{style:{color:"#3061D0",fontSize:"14px",marginLeft:"40px",cursor:"pointer"},onClick:()=>Xi(this,null,function*(){cn?de.ZP.warning("\u6B63\u5728\u751F\u6210\u8BC4\u8BBA\u4E2D\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):ae.default.confirm({title:"\u63D0\u793A",content:"\u786E\u8BA4\u662F\u5426\u91CD\u65B0\u751F\u6210\u8BC4\u8BBA\uFF1F",okText:"\u786E\u8BA4",icon:null,cancelText:"\u53D6\u6D88",onOk:()=>Xi(this,null,function*(){Ln(Qe,sn)})})})},St.createElement("i",{className:"iconfont icon-zhongxinshengcheng1 mr8 font14"}),"\u91CD\u65B0\u751F\u6210")):St.createElement("div",{style:{color:"#3061D0",fontSize:"14px",marginLeft:"auto",cursor:"pointer"},onClick:()=>Xi(this,null,function*(){cn?de.ZP.warning("\u6B63\u5728\u751F\u6210\u8BC4\u8BBA\u4E2D\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):Ln(Qe,sn)})},St.createElement("img",{src:Ze,className:"mr8"}),"\u4E00\u952EAI\u751F\u6210")),!(Qe!=null&&Qe.commentEdit)&&!(0,Wt.dE)()&&St.createElement("div",{style:{color:"#3061D0",fontSize:"14px",marginLeft:"20px",cursor:"pointer"},onClick:()=>{const zn=[...li];zn[sn].commentEdit=!0,Wn(zn),Mi(Qe==null?void 0:Qe.comment)}},St.createElement("i",{className:"iconfont icon-bianji-moren mr8 font14"}),"\u7F16\u8F91"),(Qe==null?void 0:Qe.commentEdit)&&St.createElement(St.Fragment,null,St.createElement("div",{className:pe.pj_close,onClick:()=>{const zn=[...li];zn[sn].commentEdit=!1,Wn(zn)}},"\u53D6\u6D88"),St.createElement("div",{className:pe.pj_save,onClick:()=>Xi(this,null,function*(){var zn;const on=yield(0,Rt.ZP)(`/api/student_works/${ci==null?void 0:ci.homeworkId}/challenge_comment`,{method:"put",body:{challenge_id:Qe==null?void 0:Qe.challenge_id,comment:ii}});if((on==null?void 0:on.status)==0){de.ZP.success("\u8BC4\u4EF7\u6210\u529F");const Ei=[...li];Ei[sn].commentEdit=!1,Ei[sn].comment=ii,Ei[sn].comment_updated_at=(zn=on==null?void 0:on.data)==null?void 0:zn.comment_updated_at,Wn(Ei)}})},"\u4FDD\u5B58"))),!(Qe!=null&&Qe.commentEdit)&&St.createElement("div",{className:pe.pingjia},Qe!=null&&Qe.comment?St.createElement(In.Z,{value:Qe==null?void 0:Qe.comment,style:{fontSize:"14px"}}):"\u6682\u65E0\u8BC4\u4EF7~"),(Qe==null?void 0:Qe.commentEdit)&&St.createElement(At.default.TextArea,{defaultValue:ii,style:{borderRadius:"5px",marginTop:"10px"},rows:5,onChange:zn=>Mi(zn.target.value)}))),St.createElement("aside",{className:"mt10 font16"},((Cn=Qe==null?void 0:Qe.adjust_review_score_list)==null?void 0:Cn.length)>0&&(0,Wt.GJ)()&&St.createElement("div",null,St.createElement("strong",{className:"c-black font14"},"\u8C03\u5206\u8BB0\u5F55"),St.createElement(at.default,{columns:Qt,pagination:{hideOnSinglePage:!0},dataSource:Qe.adjust_review_score_list,showHeader:!1})))))}),St.createElement(ae.default,{open:Ri,width:900,okText:"\u5173\u95ED",cancelButtonProps:{style:{display:"none"}},onOk:()=>{Jn({}),qi(!1)},onCancel:()=>{Jn({}),qi(!1)},title:St.createElement("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>{re&&he(!1)},onMouseOut:()=>{he(!0)},onFocus:()=>{},onBlur:()=>{}},"\u4EE3\u7801\u5185\u5BB9"),modalRender:Qe=>St.createElement(Lt(),{disabled:re,bounds:ne,nodeRef:Fe,onStart:(sn,vn)=>Zn(sn,vn)},St.createElement("div",{ref:Fe},Qe))},St.createElement("div",{style:{background:"#F6F7F9",padding:"30px 20px",marginBottom:20}},St.createElement("div",{style:{display:"flex",alignItems:"center"}},((Pn=an==null?void 0:an.data)==null?void 0:Pn.output_detail)==="\u8BC4\u6D4B\u901A\u8FC7"?St.createElement("i",{style:{color:"#0B9953",fontSize:18,marginRight:10},className:"iconfont icon-duigou1"}):St.createElement("i",{style:{color:"#E21010",fontSize:18,marginRight:10},className:"iconfont icon-jinggao1"}),St.createElement("div",{style:{color:((ni=an==null?void 0:an.data)==null?void 0:ni.output_detail)==="\u8BC4\u6D4B\u901A\u8FC7"?"#0B9953":"#E21010",fontSize:16,fontWeight:600}},(Gi=an==null?void 0:an.data)==null?void 0:Gi.output_detail)),St.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginTop:20}},St.createElement("div",null,St.createElement("span",{style:{color:"#6A7283"}},"\u8BC4\u6D4B\u65F6\u95F4"),St.createElement("span",{style:{marginLeft:8,color:"#232B40"}},Ae()((er=an==null?void 0:an.data)==null?void 0:er.created_at).format("YYYY-MM-DD HH:mm:ss"))),St.createElement("div",null,St.createElement("span",{style:{color:"#6A7283"}},"\u7528\u65F6"),St.createElement("span",{style:{marginLeft:8,color:"#232B40"}},(Or=an==null?void 0:an.data)==null?void 0:Or.ts_time,"s")),St.createElement("div",null,St.createElement("span",{style:{color:"#6A7283"}},"\u5185\u5B58"),St.createElement("span",{style:{marginLeft:8,color:"#232B40"}},(Oe=an==null?void 0:an.data)==null?void 0:Oe.ts_mem,"mb")),St.createElement("div",null,St.createElement("span",{style:{color:"#6A7283"}},"\u7528\u4F8B\u901A\u8FC7\u7387"),St.createElement("span",{style:{marginLeft:8,color:"#232B40"}},((Ui=an==null?void 0:an.data)==null?void 0:Ui.test_set_passed_rate)*100,"%")))),St.createElement(dn.ZP,{height:500,autoHeight:Ve,language:"python",theme:"default",isCopy:!0,value:decodeURIComponent(escape(window.atob((an==null?void 0:an.content)||""))),options:An})))};var wi=(0,ie.connect)(({shixunHomeworks:rn,loading:Ve,globalSetting:fn,classroomList:mi})=>({shixunHomeworks:rn,globalSetting:fn,loading:Ve.effects,classroomList:mi}))(Lr),Nr=Ut(28284),Br={greyText:"greyText___nOpNq",info:"info___nBB3c",label:"label___P6my8",blackContent:"blackContent___O4HnS",orangeContent:"orangeContent___JBF44",inputLabel:"inputLabel___B2GAs",tableTitle:"tableTitle___IqAxM",scoreTable:"scoreTable___RJvpU"},jr=Ut(6701),Wi=Ut(59301),po=Object.defineProperty,mo=Object.getOwnPropertySymbols,no=Object.prototype.hasOwnProperty,ir=Object.prototype.propertyIsEnumerable,so=(rn,Ve,fn)=>Ve in rn?po(rn,Ve,{enumerable:!0,configurable:!0,writable:!0,value:fn}):rn[Ve]=fn,Tt=(rn,Ve)=>{for(var fn in Ve||(Ve={}))no.call(Ve,fn)&&so(rn,fn,Ve[fn]);if(mo)for(var fn of mo(Ve))ir.call(Ve,fn)&&so(rn,fn,Ve[fn]);return rn},Pr=(rn,Ve,fn)=>new Promise((mi,Pi)=>{var Pn=er=>{try{Gi(fn.next(er))}catch(Or){Pi(Or)}},ni=er=>{try{Gi(fn.throw(er))}catch(Or){Pi(Or)}},Gi=er=>er.done?mi(er.value):Promise.resolve(er.value).then(Pn,ni);Gi((fn=fn.apply(rn,Ve)).next())});const Zi=({shixunHomeworks:rn,dispatch:Ve,classroomList:fn})=>{const{shixunWorkReport:mi}=rn,Pi=(0,ie.useParams)(),[Pn,ni]=(0,St.useState)(!1),[Gi]=Nr.default.useForm(),[er,Or]=ae.default.useModal(),[Oe,Ui]=(0,St.useState)(!1),[hr,Si]=(0,St.useState)(!1);(0,St.useEffect)(()=>{var Ri,qi,re,he;rn.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4"&&Gi.setFieldsValue({comment:(qi=(Ri=rn.actionTabs.selectArrs)==null?void 0:Ri.data)==null?void 0:qi.work_comment,hidden_comment:(he=(re=rn.actionTabs.selectArrs)==null?void 0:re.data)==null?void 0:he.work_comment_hidden})},[rn.actionTabs.key]);const Qr=()=>Pr(void 0,null,function*(){const Ri=Gi.getFieldsValue();(yield(0,Rt.ZP)(`/api/student_works/${Pi.homeworkId}/shixun_work_comment.json`,{method:"post",body:{hidden_comment:Ri.hidden_comment,comment:Ri.comment}})).status===0&&(de.ZP.success("\u8BC4\u9605\u6210\u529F"),Gi.resetFields(),Ve({type:"shixunHomeworks/setActionTabs",payload:{}}),Ve({type:"shixunHomeworks/getShixunWorkReport",payload:Tt({},Pi)}))}),xr=[{title:"\u5173\u5361",dataIndex:"name",render:(Ri,qi,re)=>re+1},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",render:(Ri,qi,re)=>Wi.createElement("div",null,Ri,qi.complete_status===4&&Wi.createElement(te.vA,{status:qi.complete_status}))},{title:"\u5F00\u59CB\u65F6\u95F4",dataIndex:"open_time"},{title:"\u5B8C\u6210\u65F6\u95F4",dataIndex:"finished_time"},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"evaluate_count",align:"center"},{title:"\u5B9E\u8BAD\u8017\u65F6",dataIndex:"time_consuming"},{title:"\u662F\u5426\u67E5\u770B\u7B54\u6848",dataIndex:"view_answer",align:"center",render:Ri=>Ri?"\u662F":"\u5426"},{title:"\u5173\u5361\u5F97\u5206",dataIndex:"game_score",align:"center",render:(Ri,qi)=>Wi.createElement("div",null,Wi.createElement("span",{style:{color:parseFloat(qi.game_score_full)!==parseFloat(Ri)?"#E30000":"#53C41B"}},Ri),"/",qi.game_score_full)},{title:"\u8C03\u5206",dataIndex:"game_score",align:"center",fixed:"right",render:(Ri,qi)=>(0,Wt.GJ)()?Wi.createElement(Nn,{max:qi.game_score_full,defaultValue:parseFloat(Ri),onBlur:re=>Pr(void 0,null,function*(){var he,ne;if((0,Wt.Rm)()&&!((he=fn.AssistantObject.practice)!=null&&he.can_appraise)){de.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}const Xe=yield Ve({type:"shixunHomeworks/changeScore",payload:{categoryId:Pi.homeworkId,type:"report",score:re,challenge_id:qi.challenge_id}});(ne=rn==null?void 0:rn.actionTabs)==null||ne.fn(),yield Ve({type:"shixunHomeworks/getShixunWorkReport",payload:Tt({},Pi)}),Xe.status===0&&de.ZP.success("\u64CD\u4F5C\u6210\u529F")})}):Ri}];return Wi.createElement(Wi.Fragment,null,Or,Wi.createElement(ae.default,{centered:!0,width:1080,title:"\u70B9\u8BC4\u4F5C\u4E1A",open:rn.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>Pr(void 0,null,function*(){var Ri;if((0,Wt.Rm)()&&!((Ri=fn.AssistantObject.practice)!=null&&Ri.can_appraise)){de.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}const qi=Gi.getFieldsValue();JSON.stringify(qi)==="{}"||qi.hidden_comment===""&&qi.comment===""?ni(!0):Qr()}),onCancel:()=>{Ve({type:"shixunHomeworks/setActionTabs",payload:{}})}},Wi.createElement(Yt.Z,{justify:"space-between",className:Br.info},Wi.createElement(Me.Z,null,Wi.createElement("span",{className:`${Br.label} ${Br.greyText}`},"\u59D3\u540D"),Wi.createElement("span",{className:Br.blackContent},mi==null?void 0:mi.username)),Wi.createElement(Me.Z,null,Wi.createElement("span",{className:`${Br.label} ${Br.greyText}`},"\u5B66\u53F7"),Wi.createElement("span",{className:Br.blackContent},(mi==null?void 0:mi.student_id)||"--")),Wi.createElement(Me.Z,null,Wi.createElement("span",{className:`${Br.label} ${Br.greyText}`},"\u73ED\u7EA7"),Wi.createElement("span",{className:Br.blackContent},(mi==null?void 0:mi.group_name)||"--")),Wi.createElement(Me.Z,null,Wi.createElement("span",{className:`${Br.label} ${Br.greyText}`},"\u5173\u5361\u5F97\u5206"),Wi.createElement("span",{className:Br.orangeContent},(mi==null?void 0:mi.challenge_score)||"--")),Wi.createElement(Me.Z,null,Wi.createElement("span",{className:`${Br.label} ${Br.greyText}`},"\u6548\u7387\u5206"),Wi.createElement("span",{className:Br.orangeContent},(mi==null?void 0:mi.eff_score)||"--")),Wi.createElement(Me.Z,null,Wi.createElement("span",{className:`${Br.label} ${Br.greyText}`},"\u8865\u4EA4\u6263\u5206"),Wi.createElement("span",{className:Br.orangeContent},(mi==null?void 0:mi.late_penalty)||"--")),Wi.createElement(Me.Z,null,Wi.createElement("span",{className:`${Br.label} ${Br.greyText}`},"\u6700\u7EC8\u6210\u7EE9"),Wi.createElement("span",{className:Br.orangeContent},(mi==null?void 0:mi.work_score)||"--"))),Wi.createElement(Nr.default,{form:Gi,onChange:()=>{Pn&&ni(!1)}},Wi.createElement(Yt.Z,{wrap:!1,align:"middle",justify:"space-between"},Wi.createElement(Me.Z,null,Wi.createElement("div",{className:`${Br.inputLabel} ${Br.greyText}`},"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1")),Wi.createElement(Me.Z,null,Wi.createElement(jr.Z,{isShowComponent:(0,Wt.G5)(),ModalProps:{open:Oe,onCancel:()=>{Ui(!1)}},onDataSelect:(Ri,qi)=>Pr(void 0,[Ri,qi],function*(re,{node:he}){const ne=()=>{Gi.setFieldsValue({comment:he==null?void 0:he.value}),Ui(!1)};if(Gi.getFieldValue("comment")){er.confirm({icon:null,title:"\u63D0\u793A",centered:!0,content:"\u7CFB\u7EDF\u68C0\u6D4B\u5230\u8BC4\u8BED\u8F93\u5165\u6846\u4E2D\u5DF2\u6709\u5185\u5BB9\uFF0C\u4F7F\u7528\u5E38\u7528\u8BC4\u8BED\u5C06\u4F1A\u8986\u76D6\u539F\u6709\u5185\u5BB9\u3002\u662F\u5426\u4F7F\u7528\uFF1F",okText:"\u4F7F\u7528",onOk:ne});return}ne()})},Wi.createElement(It.ZP,{style:{padding:0,height:"auto"},icon:Wi.createElement("i",{className:"iconfont icon-changyongpingyu"}),type:"link",onClick:Ri=>{Ui(!0)}},"\u5E38\u7528\u8BC4\u8BED")))),Wi.createElement(Nr.default.Item,{name:"comment"},Wi.createElement(At.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:3})),Wi.createElement(Yt.Z,{wrap:!1,align:"middle",justify:"space-between"},Wi.createElement(Me.Z,null,Wi.createElement("div",{className:`${Br.inputLabel} ${Br.greyText}`},"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1")),Wi.createElement(Me.Z,null,Wi.createElement(jr.Z,{isShowComponent:(0,Wt.G5)(),ModalProps:{open:hr,onCancel:()=>{Si(!1)}},onDataSelect:(Ri,qi)=>Pr(void 0,[Ri,qi],function*(re,{node:he}){const ne=()=>{Gi.setFieldsValue({hidden_comment:he==null?void 0:he.value}),Si(!1)};if(Gi.getFieldValue("hidden_comment")){er.confirm({icon:null,title:"\u63D0\u793A",centered:!0,content:"\u7CFB\u7EDF\u68C0\u6D4B\u5230\u8BC4\u8BED\u8F93\u5165\u6846\u4E2D\u5DF2\u6709\u5185\u5BB9\uFF0C\u4F7F\u7528\u5E38\u7528\u8BC4\u8BED\u5C06\u4F1A\u8986\u76D6\u539F\u6709\u5185\u5BB9\u3002\u662F\u5426\u4F7F\u7528\uFF1F",okText:"\u4F7F\u7528",onOk:ne});return}ne()})},Wi.createElement(It.ZP,{style:{padding:0,height:"auto"},icon:Wi.createElement("i",{className:"iconfont icon-changyongpingyu"}),type:"link",onClick:Ri=>{Si(!0)}},"\u5E38\u7528\u8BC4\u8BED")))),Wi.createElement(Nr.default.Item,{name:"hidden_comment"},Wi.createElement(At.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:3}))),Pn&&Wi.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A"),Wi.createElement("div",{className:Br.tableTitle},"\u5173\u5361\u6210\u7EE9"),Wi.createElement(at.default,{className:Br.scoreTable,dataSource:mi.stage_list,rowKey:"challenge_id",pagination:!1,columns:xr,scroll:{x:"max-content"}})))};var xi=(0,ie.connect)(({shixunHomeworks:rn,classroomList:Ve})=>({shixunHomeworks:rn,classroomList:Ve}))(Zi),Hi=Ut(97610),ji=Ut(1247),tr=Ut(44164),qr=Ut.n(tr),un={wrap:"wrap___LZOi9",line:"line___oju0L"},ln=Ut(1546),Sn=({detailData:rn})=>{var Ve;return St.createElement("div",{className:un.wrap},St.createElement(ln.ij,{hideBar:!0,actionAnalysis:!0,loading:!1,emptyData:[(0,ln.Uf)(rn),(rn==null?void 0:rn.photos)||[]],title:"\u5B9E\u8BAD\u5B66\u4E60\u5206\u6790",noDataText:"\u8BE5\u5B66\u751F\u65E0\u5B66\u4E60\u884C\u4E3A\u5206\u6790\u6570\u636E"},St.createElement(ln.ZP,{hideBar:!0,title:"\u5B9E\u8BAD\u5B66\u4E60\u5206\u6790",data:(0,ln.Uf)(rn)}),!!((Ve=rn==null?void 0:rn.photos)!=null&&Ve.length)&&St.createElement(St.Fragment,null,St.createElement("div",{className:un.line}),St.createElement(ln._s,{dataSource:rn==null?void 0:rn.photos,right:21,col:4,wrapWidth:1140}))))},Ki=Ut(40133),Li=Ut(23344),dr=Ut(28426),se=Ut(59301),Mn=Object.defineProperty,Di=Object.defineProperties,pr=Object.getOwnPropertyDescriptors,Vn=Object.getOwnPropertySymbols,le=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,Xn=(rn,Ve,fn)=>Ve in rn?Mn(rn,Ve,{enumerable:!0,configurable:!0,writable:!0,value:fn}):rn[Ve]=fn,On=(rn,Ve)=>{for(var fn in Ve||(Ve={}))le.call(Ve,fn)&&Xn(rn,fn,Ve[fn]);if(Vn)for(var fn of Vn(Ve))De.call(Ve,fn)&&Xn(rn,fn,Ve[fn]);return rn},qe=(rn,Ve)=>Di(rn,pr(Ve)),ei=(rn,Ve)=>{var fn={};for(var mi in rn)le.call(rn,mi)&&Ve.indexOf(mi)<0&&(fn[mi]=rn[mi]);if(rn!=null&&Vn)for(var mi of Vn(rn))Ve.indexOf(mi)<0&&De.call(rn,mi)&&(fn[mi]=rn[mi]);return fn},fi=(rn,Ve,fn)=>new Promise((mi,Pi)=>{var Pn=er=>{try{Gi(fn.next(er))}catch(Or){Pi(Or)}},ni=er=>{try{Gi(fn.throw(er))}catch(Or){Pi(Or)}},Gi=er=>er.done?mi(er.value):Promise.resolve(er.value).then(Pn,ni);Gi((fn=fn.apply(rn,Ve)).next())});const ki=rn=>{var Ve=rn,{shixunHomeworks:fn,classroomList:mi,globalSetting:Pi,loading:Pn,user:ni,dispatch:Gi}=Ve,er=ei(Ve,["shixunHomeworks","classroomList","globalSetting","loading","user","dispatch"]),Or,Oe,Ui,hr,Si,Qr,xr;const[Ri,qi]=(0,St.useState)(On({},(0,ie.useParams)())),re=(0,ie.useParams)(),[he,ne]=(0,St.useState)({page:1,page_size:10}),Xe=(0,ie.useLocation)(),[]=(0,St.useState)([]),[Fe,an]=(0,St.useState)(),Jn=(0,St.useRef)(),ii=(0,St.useRef)(),[Mi,hi]=(0,St.useState)(!1),[Zn,ci]=(0,St.useState)(!0),[ke,An]=(0,St.useState)(!1),[be,Qt]=(0,St.useState)(!1),{shixunWorkReport:ye}=fn,[_n,li]=(0,St.useState)(),[Wn,Hn]=(0,St.useState)([]),[cn,kn]=(0,St.useState)(),[Ln,Qe]=(0,St.useState)("all"),sn=(0,Wt.GJ)(),[vn,Cn]=(0,St.useState)(new(fe())),[zn,on]=(0,St.useState)(0),[Ei,Ii]=(0,St.useState)(!1),[nr,Ni]=(0,St.useState)(!1),[Mr,yr]=(0,St.useState)(!1),[Zr,Dr]=(0,St.useState)(""),[Gr,$r]=(0,St.useState)(!1),[Ue,Fr]=(0,St.useState)(!0),[Er,fr]=(0,St.useState)(0),$i=(0,St.useRef)(JSON.parse(sessionStorage.all_student_works_params||"{}")),Rr=(0,St.useRef)(),[ro,eo]=(0,St.useState)(!1),[kr,Ao]=(0,St.useState)(!1),$o=(0,St.useRef)(null),Zs=()=>fi(void 0,null,function*(){(ni.userInfo.is_teacher||ni.userInfo.admin)&&($r(!0),Fr(!1))});(0,St.useEffect)(()=>{var Qi;(0,Wt.Rm)()&&mi.AssistantObject.practice&&!((Qi=mi.AssistantObject.practice)!=null&&Qi.can_view)&&ie.history.replace("/403")},[(Or=mi.AssistantObject.practice)==null?void 0:Or.can_view]),(0,St.useEffect)(()=>{Zs(),console.log("\u6253\u5370\u7684------",ye),Rr.current=ye==null?void 0:ye.next_student_work_id,Dr(ye.repeat_minus_score)},[ye,ni]),(0,St.useEffect)(()=>{console.log("\u89E6\u53D1\u8FD9",ye.work_score),fr(ye.work_score)},[ye.work_score,Zr]),(0,St.useEffect)(()=>(Gi({type:"globalSetting/footerToggle",payload:!1}),()=>{Gi({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,St.useEffect)(()=>{setTimeout(()=>{$o.current&&$o.current.clientHeight>=500&&Ao(!0)},500)},[(Oe=ye==null?void 0:ye.student_work_test_result_info)==null?void 0:Oe.content,$o.current]),(0,St.useEffect)(()=>{var Qi;if(ye){let Tr=[];(Qi=ye==null?void 0:ye.target_test_sets)==null||Qi.map((gr,Wo)=>{var is;(is=gr==null?void 0:gr.targets)==null||is.map((Lo,Ss)=>{var jo;Lo.name=gr==null?void 0:gr.name,Lo.total_target_score=gr==null?void 0:gr.total_target_score,Lo.actual_target_score=gr==null?void 0:gr.actual_target_score,Lo.rowSpan=Ss===0?(jo=gr==null?void 0:gr.targets)==null?void 0:jo.length:0,Lo.order=Wo+1,Tr.push(Lo)})}),li(Tr),(0,Wt.Rm)()&&Gi({type:"classroomList/getAssistantPermissions",payload:{course_id:Ri.coursesId}})}},[ye]),(0,St.useEffect)(()=>{fn.actionTabs.key==="\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"&&(ye==null?void 0:ye.students_count)>0&&!Zn&&setTimeout(()=>{ys("all")},800)},[ye==null?void 0:ye.homework_common_id,Zn]),(0,St.useEffect)(()=>{qi(On({},re))},[Xe.pathname]);const ka=()=>{document.body.scrollIntoView()},zs=Qi=>{he.page=Qi,ne(On({},he)),sr(he,Ln)},sr=(Qi,Tr)=>fi(void 0,null,function*(){An(!0);const gr=yield(0,Rt.ZP)(`/api/student_works/${Ri==null?void 0:Ri.homeworkId}/adjust_review_score_histories.json`,{method:"get",params:qe(On({},Qi),{challenge_id:Tr=="all"?null:Tr})});(gr==null?void 0:gr.status)===0&&(Hn(gr==null?void 0:gr.list),kn(gr==null?void 0:gr.count)),An(!1)});function os(){return fi(this,null,function*(){$i.current=JSON.parse(sessionStorage.all_student_works_params||"{}")})}const ns=()=>{document.querySelectorAll("canvas").forEach(Qi=>{(!Qi.clientWidth||!Qi.clientHeight)&&Qi.remove()})},js=()=>{Jn.current.offsetHeight>62e3?Qt(!1):Qt(!0)},us=Qi=>fi(void 0,null,function*(){const Tr=yield(0,ji.t1)({homeworkId:Qi||Ri.homeworkId});an(Tr==null?void 0:Tr.data)}),ys=Qi=>fi(void 0,null,function*(){var Tr,gr,Wo,is;eo(!0);let Lo=0,Ss;Ss=ae.default.info({width:460,title:se.createElement("div",null,"\u6B63\u5728\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A,",se.createElement("span",{className:"c-red"},"\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3")),content:se.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",se.createElement("span",{className:"c-blue"},Lo+1),"/",Qi!=="all"?1:ye==null?void 0:ye.students_count,se.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"),maskClosable:!1,className:pe.modal,onOk:()=>{}});const jo={margin:[0,0],filename:`${ye!=null&&ye.student_id&&(ye==null?void 0:ye.student_id)!="--"?ye==null?void 0:ye.student_id:""}${ye.username}.pdf`,html2canvas:{useCORS:!0,letterRendering:!0},jsPDF:{unit:"mm",format:"a4",orientation:"landscape"}},Pa=vn.folder(ye==null?void 0:ye.shixun_name);function Io(rl){return fi(this,null,function*(){yield us(rl||Rr.current);const bo=yield Gi({type:"shixunHomeworks/getShixunWorkReport",payload:On({homeworkId:rl||Rr.current},$i.current||{})});Rr.current=bo==null?void 0:bo.next_student_work_id,ka(),Lo++,setTimeout(()=>fi(this,null,function*(){var ma,_o,Ns,Ws;ns();const Ll=Pa.folder(`${bo==null?void 0:bo.group_name}`).folder(`${bo!=null&&bo.student_id&&(bo==null?void 0:bo.student_id)!="--"?bo.student_id+"+":""}${bo==null?void 0:bo.username}`),es=document.querySelector("#export-all").children;let Ml=qr()();for(let ca=0;ca<es.length;ca++)yield Ml.set(jo).from(es[ca]).toContainer().toCanvas().toPdf().get("pdf").then(ds=>fi(this,null,function*(){ca<es.length-1&&(yield ds.addPage())}));if(Ll.file(`${bo!=null&&bo.student_id&&(bo==null?void 0:bo.student_id)!="--"?bo.student_id+"+":""}${bo==null?void 0:bo.username}.pdf`,Ml.output("blob")),((ma=bo==null?void 0:bo.shixun_detail)==null?void 0:ma.length)>0&&((Ns=(_o=bo==null?void 0:bo.shixun_detail)==null?void 0:_o.filter(ca=>{var ds;return((ds=ca==null?void 0:ca.game_codes)==null?void 0:ds.length)>0}))==null?void 0:Ns.length)>0){const ca=Ll.folder("\u4EE3\u7801\u6587\u4EF6");(Ws=bo==null?void 0:bo.shixun_detail)==null||Ws.map((ds,Oa)=>{var Bs,Yo;if(((Bs=ds==null?void 0:ds.game_codes)==null?void 0:Bs.length)>0){const As=ca.folder(`\u7B2C${Oa+1}\u5173-${ds.subject}-${ds.id}`);(Yo=ds==null?void 0:ds.game_codes)==null||Yo.map(Us=>{As.file(`${Us.filename}.txt`,Us==null?void 0:Us.content)})}})}Ss.update({content:se.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",se.createElement("span",{className:"c-blue"},Lo),"/",bo==null?void 0:bo.students_count,se.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3")}),Lo==(bo==null?void 0:bo.students_count)?(Ss.destroy(),di()):Io()}),2200)})}if(Qi!=="all"||(ye==null?void 0:ye.students_count)<2){ns(),ka();const rl=ii.current.children;let bo=qr()();const _o=Pa.folder(`${ye==null?void 0:ye.group_name}`).folder(`${ye!=null&&ye.student_id&&(ye==null?void 0:ye.student_id)!="--"?(ye==null?void 0:ye.student_id)+"+":""}${ye==null?void 0:ye.username}`);for(let Ns=0;Ns<rl.length;Ns++)yield bo.set(jo).from(rl[Ns]).toContainer().toCanvas().toPdf().get("pdf").then(Ws=>fi(void 0,null,function*(){Ns<rl.length-1&&(yield Ws.addPage())}));if(hi(!1),_o.file(`${ye!=null&&ye.student_id&&(ye==null?void 0:ye.student_id)!="--"?(ye==null?void 0:ye.student_id)+"+":""}${ye.username}.pdf`,bo.output("blob"),{base64:!1}),((Tr=ye==null?void 0:ye.shixun_detail)==null?void 0:Tr.length)>0&&((Wo=(gr=ye==null?void 0:ye.shixun_detail)==null?void 0:gr.filter(Ns=>{var Ws;return((Ws=Ns==null?void 0:Ns.game_codes)==null?void 0:Ws.length)>0}))==null?void 0:Wo.length)>0){const Ns=_o.folder("\u4EE3\u7801\u6587\u4EF6");(is=ye==null?void 0:ye.shixun_detail)==null||is.map((Ws,hu)=>{var Ll,es;if(((Ll=Ws==null?void 0:Ws.game_codes)==null?void 0:Ll.length)>0){const Ml=Ns.folder(`\u7B2C${hu+1}\u5173-${Ws.subject}-${Ws.id}`);(es=Ws==null?void 0:Ws.game_codes)==null||es.map(ca=>{Ml.file(`${ca.filename}.txt`,ca==null?void 0:ca.content)})}})}Ss.destroy(),di();return}else Io(ye==null?void 0:ye.first_student_work_id)}),di=()=>{vn.generateAsync({type:"blob"}).then(function(Qi){console.log(ye,"shixunWorkReport");const Tr=document.createElement("a");Tr.href=window.URL.createObjectURL(Qi),Tr.download=(ye==null?void 0:ye.shixun_name)+".zip",document.body.appendChild(Tr);const gr=document.createEvent("MouseEvents");gr.initEvent("click",!1,!1),Tr.dispatchEvent(gr),document.body.removeChild(Tr),Cn(new(fe()))}),Qt(!1)};(0,St.useEffect)(()=>{Ar()},[Ri.homeworkId]);const Ar=()=>fi(void 0,null,function*(){ci(!0),yield Gi({type:"shixunHomeworks/getShixunWorkReport",payload:On(On({},Ri),$i.current||{})}),us(),(0,Wt.GJ)()&&os(),ci(!1)}),br=[{title:"\u5173\u5361",dataIndex:"name",render:(Qi,Tr,gr)=>gr+1},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",render:(Qi,Tr,gr)=>se.createElement("div",null,Qi,Tr.complete_status===4&&se.createElement(te.vA,{status:Tr.complete_status}))},{title:"\u5F00\u542F\u65F6\u95F4",dataIndex:"open_time"},{title:"\u4EE3\u7801\u4FEE\u6539\u884C\u6570",dataIndex:"diff_code_count",render:(Qi,Tr,gr)=>Qi||"- -"},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"evaluate_count"},{title:"\u5B8C\u6210\u65F6\u95F4",dataIndex:"finished_time"},{title:"\u5B9E\u8BAD\u8017\u65F6",dataIndex:"time_consuming"},{title:"\u662F\u5426\u67E5\u770B\u7B54\u6848",dataIndex:"view_answer",render:Qi=>Qi?"\u662F":"\u5426"},{title:"\u7ECF\u9A8C\u503C",dataIndex:"experience",render:(Qi,Tr)=>se.createElement("div",null,se.createElement("span",{style:{color:parseFloat(Tr.myself_experience)!==parseFloat(Qi)?"red":"green"}},Tr.myself_experience),"/",Qi)},{title:"\u5173\u5361\u5F97\u5206",dataIndex:"game_score",render:(Qi,Tr)=>se.createElement("div",null,se.createElement("span",{style:{color:parseFloat(Tr.game_score_full)!==parseFloat(Qi)?"red":"green"}},Qi),"/",Tr.game_score_full)},{title:"\u8C03\u5206",dataIndex:"game_score",render:(Qi,Tr)=>sn?se.createElement(Nn,{max:Tr.game_score_full,defaultValue:parseFloat(Qi),onBlur:gr=>fi(void 0,null,function*(){var Wo;if((0,Wt.Rm)()&&!((Wo=mi.AssistantObject.practice)!=null&&Wo.can_appraise)){de.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}const is=yield Gi({type:"shixunHomeworks/changeScore",payload:{categoryId:Ri.homeworkId,type:"report",score:gr,challenge_id:Tr.challenge_id}});sr({page:1,page_size:10},"all"),yield Gi({type:"shixunHomeworks/getShixunWorkReport",payload:On(On({},Ri),$i.current||{})}),is.status===0&&de.ZP.success("\u64CD\u4F5C\u6210\u529F")})}):Qi}];let Xr=[{title:"\u5173\u5361",dataIndex:"order",key:"order",render:(Qi,Tr,gr)=>({children:Qi,props:{rowSpan:Tr.rowSpan}})},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",key:"name",render:(Qi,Tr,gr)=>({children:Qi,props:{rowSpan:Tr.rowSpan}})},{title:"\u6307\u6807\u540D\u79F0",dataIndex:"target_name",key:"target_name"},{title:"\u6307\u6807\u9884\u671F\u7ED3\u679C",dataIndex:"output",key:"output"},{title:"\u6307\u6807\u5B9E\u9645\u7ED3\u679C",dataIndex:"actual_output",key:"actual_output"},{title:"\u6307\u6807\u5F97\u5206",dataIndex:"test_score",key:"test_score",render:(Qi,Tr,gr)=>se.createElement("div",null,se.createElement("span",{style:{color:parseFloat(Tr.actual_test_score)!==parseFloat(Qi)?"red":"green"}},Tr.actual_test_score),"/",Qi)},{title:"\u6307\u6807\u603B\u5206",render:(Qi,Tr,gr)=>({children:se.createElement("div",null,se.createElement("span",{style:{color:parseFloat(Tr.actual_target_score)!==parseFloat(Qi)?"red":"green"}},Tr.actual_target_score),"/",Qi),props:{rowSpan:Tr.rowSpan}}),dataIndex:"total_target_score",key:"total_target_score"}];const io=[{title:"\u5173\u5361",dataIndex:"challenge_num",width:220},{title:"\u8C03\u5206\u7528\u6237",dataIndex:["user","name"]},{title:"\u8C03\u5206\u524D",dataIndex:"old_score"},{title:"\u8C03\u5206\u540E",dataIndex:"score"},{title:"\u8C03\u5206\u65F6\u95F4",dataIndex:"created_at",render:Qi=>se.createElement("span",null,Qi?Ae()(Qi).format("YYYY-MM-DD HH:mm"):"--")}],yo=Qi=>{Gi({type:"shixunHomeworks/setActionTabs",payload:{key:"",type:2}}),setTimeout(()=>{Qi==="next"?ie.history.push(`/classrooms/${Ri.coursesId}/shixun_homework/${Ri.categoryId}/${ye==null?void 0:ye.next_student_work_id}/comment`):ie.history.push(`/classrooms/${Ri.coursesId}/shixun_homework/${Ri.categoryId}/${ye==null?void 0:ye.pre_student_work_id}/comment`)},200)},rr=Qi=>{Dr(""),Qi.target.value&&(console.log("\u8FDB\u6765",ye),Qi.target.value=Qi.target.value>ye.repeat_setting_score?ye.repeat_setting_score:Qi.target.value,Dr(Qi.target.value))},Bo=()=>fi(void 0,null,function*(){const Qi=yield(0,Rt.ZP)(`/api/student_works/${ye==null?void 0:ye.work_id}/update_repeat_score`,{method:"put",body:{score:Zr}});yield Gi({type:"shixunHomeworks/getShixunWorkReport",payload:On(On({},Ri),$i.current||{})}),Qi.status===0&&de.ZP.info("\u64CD\u4F5C\u6210\u529F")});return se.createElement("section",{className:"bg-fafafa",style:{position:"sticky",top:0}},se.createElement("div",{className:"edu-container mt10",style:{paddingBottom:100}},se.createElement(zt.Z,{loading:Pn["shixunHomeworks/getShixunWorkReport"],active:!0,avatar:{size:40},paragraph:{rows:5}},se.createElement("div",{className:"edu-container"},ye.course_id&&se.createElement("section",{className:"animated fadeIn"},se.createElement("aside",{className:""},ye.category&&se.createElement(Ie.Z,{separator:">"},se.createElement(Ie.Z.Item,null,se.createElement(ie.Link,{to:`/classrooms/${ye.course_id}/shixun_homework`},ye.course_name)),se.createElement(Ie.Z.Item,null,se.createElement(ie.Link,{to:`/classrooms/${ye.course_id}/shixun_homework/${ye.category.main?"":ye.category.category_id}`},ye.category.category_name)),se.createElement(Ie.Z.Item,null,se.createElement(ie.Link,{to:`/classrooms/${ye.course_id}/shixun_homework/${ye.homework_common_id}/detail${(0,Wt.dE)()?"?tabs=1":""}`},"\u4F5C\u4E1A\u8BE6\u60C5")),se.createElement(Ie.Z.Item,null,ye.username))),se.createElement("aside",{className:[pe.title1,"mt20"].join(" ")},se.createElement(Yt.Z,{align:"middle"},se.createElement(Me.Z,{flex:1},se.createElement(ie.Link,{to:`/classrooms/${ye.course_id}/shixun_homework/${ye.homework_common_id}/detail`},se.createElement(xt.Z,{className:"font16 c-black"})),se.createElement("strong",{className:"font20 ml5"},ye==null?void 0:ye.homework_name),se.createElement(te.VV,{temporary:!0,status:ye.homework_status})),se.createElement(Me.Z,{className:pe.title1_right},ye.view_tpi&&se.createElement(It.ZP,{onClick:()=>{var Qi,Tr;(0,te.xg)(`/tasks/${ye==null?void 0:ye.course_id}/${ye==null?void 0:ye.homework_common_id}/${(Tr=(Qi=ye==null?void 0:ye.shixun_detail)==null?void 0:Qi[0])==null?void 0:Tr.game_identifier}`)}},se.createElement("span",{className:"iconfont icon-yijiandianping mr5"}),"\u67E5\u770B\u5B66\u5458\u5B9E\u8BAD"),(0,Wt.GJ)()&&ye.homework_end===!1&&!!ye.myshixun_id&&se.createElement(It.ZP,{className:"ml10",onClick:()=>fi(void 0,null,function*(){yield Gi({type:"shixunHomeworks/setActionTabs",payload:{key:"\u6253\u56DE\u91CD\u505A",selectArrs:{myshixun_identifier:ye.myshixun_identifier},homework_common_id:re.categoryId}})})},se.createElement("span",{className:"iconfont icon-dahuizhongzuo3x mr5"}),"\u6253\u56DE\u91CD\u505A"),se.createElement(It.ZP,{className:"ml10",onClick:()=>{var Qi;if((0,Wt.Rm)()&&!((Qi=mi.AssistantObject.practice)!=null&&Qi.can_download)){de.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}ys("")},loading:Mi},se.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"),(0,Wt.GJ)()&&(ye==null?void 0:ye.students_count)>1&&se.createElement(It.ZP,{className:"ml10",onClick:()=>{var Qi;if((0,Wt.Rm)()&&!((Qi=mi.AssistantObject.practice)!=null&&Qi.can_download)){de.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}ae.default.confirm({title:"\u9009\u62E9\u5BFC\u51FA\u65B9\u5F0F",closable:!0,icon:null,centered:!0,okText:se.createElement(nt.Z,{title:"\u5BFC\u51FA\u65F6\u4E0D\u80FD\u9000\u51FA\u6216\u5173\u95ED\u5BFC\u51FA\u9875\u9762\uFF0C\u53EF\u80FD\u4F1A\u5F71\u54CD\u5176\u4ED6\u64CD\u4F5C"},"\u524D\u7AEF\u5BFC\u51FA"),cancelText:se.createElement(nt.Z,{title:"\u751F\u6210\u5BFC\u51FA\u4EFB\u52A1\u540E\u53EF\u5173\u95ED\u9875\u9762\uFF0C\u540E\u53F0\u5BFC\u51FA\u6210\u529F\u540E\u5728\u5386\u53F2\u5BFC\u51FA\u9875\u9762\u81EA\u884C\u4E0B\u8F7D\uFF0C\u4E0D\u5F71\u54CD\u5176\u4ED6\u64CD\u4F5C"},"\u540E\u53F0\u5BFC\u51FA"),onOk:()=>{ys("all")},onCancel:()=>{},cancelButtonProps:{onClick:()=>{(0,Ki.jj)({categoryId:Ri.categoryId,coursesId:Ri.coursesId},"shixun_report")}}})}},se.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5168\u90E8\u5B66\u751F\u5B9E\u8BAD\u62A5\u544A"))))),se.createElement("aside",{className:"mt30 relative"})),se.createElement("aside",{className:"edu-container bg-white",ref:Jn},se.createElement("div",{id:"export-all",ref:ii},se.createElement("div",{id:"export-all-1"},se.createElement("div",{className:pe.title},se.createElement("h1",null,"\u603B\u4F53\u8BC4\u4EF7"),se.createElement("div",null,(0,Wt.GJ)()&&se.createElement(It.ZP,{className:"mr20",type:"primary",onClick:()=>{Gi({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:ye.user_id,data:On({},ye)},fn:()=>sr({page:1,page_size:10},"all")}})}},se.createElement(kt.Z,null),ye.has_shixun_work_comment?"\u66F4\u6539\u70B9\u8BC4":"\u70B9\u8BC4\u4F5C\u4E1A"))),se.createElement(et.Z,{style:{marginTop:0}}),se.createElement(Yt.Z,{className:"pl30 pr30"},se.createElement(Me.Z,null,se.createElement("img",{className:pe.userPic,src:`${Zt.Z.IMG_SERVER}/images/${ye.image_url}`,alt:ye.username})),se.createElement(Me.Z,null,se.createElement("span",{className:"font16 ml40"},ye.username),se.createElement(te.vA,{status:ye.compelete_status}),se.createElement("ul",{className:pe.userInfo},se.createElement("li",null,"\u5B66\u53F7\uFF1A",ye.student_id||"--"),se.createElement("li",null,"\u5206\u73ED\uFF1A",ye.group_name||"--"),se.createElement("br",null),se.createElement("li",null,"\u622A\u6B62\u524D\u5B8C\u6210\u5173\u5361\uFF1A",se.createElement("span",{className:"c-red"},ye.complete_count),"/",se.createElement("span",{className:"c-red"},ye.challenges_count)),se.createElement("li",null,"\u6700\u65B0\u5B8C\u6210\u5173\u5361\uFF1A",se.createElement("span",{className:"c-red"},ye.current_complete_count||"-"),"/",se.createElement("span",{className:"c-red"},ye.challenges_count)),se.createElement("li",null,"\u5B8C\u6210\u6548\u7387\uFF1A",ye&&ye.efficiency===null?"--":ye&&ye.efficiency),se.createElement("li",null,"\u8BFE\u5802\u6700\u9AD8\u5B8C\u6210\u6548\u7387\uFF1A",ye&&ye.max_efficiency===null?"--":ye&&ye.max_efficiency))),se.createElement("ul",{className:[pe.listItem,"mt10"].join(" ")},se.createElement("li",null,se.createElement("strong",null,"\u901A\u5173\u65F6\u95F4"),se.createElement("div",{className:"c-light-black mt20"},ye&&ye.passed_time===null||ye&&ye.passed_time==="--"?"--":Ae()(ye&&ye.passed_time).format("YYYY-MM-DD HH:mm"))),se.createElement("li",null,se.createElement("strong",null,"\u8BA1\u65F6\u89C4\u5219",se.createElement("i",{onClick:Qi=>{Qi.stopPropagation(),Qi.preventDefault(),Ii(!0)},style:{marginLeft:4,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),se.createElement("div",{className:"c-light-black mt20"},ye==null?void 0:ye.human_training_time_rules)),se.createElement("li",null,se.createElement("strong",null,"\u5B9E\u8BAD\u603B\u8017\u65F6",se.createElement("i",{onClick:Qi=>{Qi.stopPropagation(),Qi.preventDefault(),Ni(!0)},style:{marginLeft:4,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),se.createElement("div",{className:"c-light-black mt20"},ye.time_consuming)),se.createElement("li",null,se.createElement("strong",null,"\u8BC4\u6D4B\u6B21\u6570"),se.createElement("div",{className:"mt20"},ye.evaluate_count)),(ye==null?void 0:ye.eff_score_full)&&se.createElement(se.Fragment,null,se.createElement("li",null,se.createElement("strong",null,"\u5173\u5361\u5F97\u5206"),se.createElement("div",{className:"mt20"},se.createElement("span",{className:"c-orange"},ye.challenge_score),"/",se.createElement("span",{className:"c-light-black"},ye.challenge_score_full))),se.createElement("li",null,se.createElement("strong",null,"\u6548\u7387\u5206"),se.createElement("div",{className:"mt20"},se.createElement("span",{className:"c-orange"},ye.eff_score),"/",se.createElement("span",{className:"c-light-black"},ye.eff_score_full)))),(ye==null?void 0:ye.have_repeat)&&(ye==null?void 0:ye.repeat_minus_score)!==0&&se.createElement("li",{style:{position:"relative"}},se.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},se.createElement("strong",null,"\u67E5\u91CD\u6263\u5206"),se.createElement("div",{style:{position:"absolute",fontSize:"10px",color:"white",left:"57px",width:"46px",bottom:"72px"}},ye!=null&&ye.review_rate?se.createElement("span",{style:{background:"#0152d9",borderRadius:"6px 6px 6px 0",cursor:"pointer"},onClick:()=>{if(ye!=null&&ye.review_id&&Gr)localStorage.setItem("studentDetial",window.location.pathname),ie.history.push({pathname:`/classrooms/:coursesId/shixun_homework/${Ri.categoryId}/review_detail/${ye==null?void 0:ye.review_id}`});else return}},ye.review_rate.toFixed(1),"%"):se.createElement("span",{style:{background:"#0152d9",borderRadius:"6px 6px 6px 0"}},"- -"))),Gr?se.createElement("div",{className:"mt20"},se.createElement(At.default,{style:{width:"45px",height:"22px"},value:Zr,onChange:Qi=>{rr(Qi)},onBlur:Bo,disabled:Ue})," / ",ye==null?void 0:ye.repeat_setting_score):se.createElement("div",{className:"mt20"},ye==null?void 0:ye.repeat_minus_score," / ",ye==null?void 0:ye.repeat_setting_score)),console.log("sssssssssssssssssssssss",ye==null?void 0:ye.have_repeat,ye==null?void 0:ye.repeat_minus_score),(ye==null?void 0:ye.have_repeat)&&(ye==null?void 0:ye.repeat_minus_score)===0&&se.createElement("li",null,se.createElement("strong",null,"\u67E5\u91CD\u6263\u5206"),se.createElement("div",{className:"mt20"}," - -")),!(ye!=null&&ye.have_repeat)&&se.createElement("li",null,se.createElement("strong",null,"\u67E5\u91CD\u6263\u5206"),se.createElement("div",{className:"mt20"}," - -")),se.createElement("li",null,se.createElement("strong",null,"\u8865\u4EA4\u6263\u5206"),se.createElement("div",{className:"mt20"},se.createElement("span",null,ye.late_penalty||"- -"))),se.createElement("li",null,se.createElement("strong",null,"\u6700\u7EC8\u6210\u7EE9"),se.createElement("div",{className:"mt20"},se.createElement("span",{className:"c-orange"},Er),"/",se.createElement("span",{className:"c-light-black"},ye.all_work_score))),se.createElement("li",null,se.createElement("strong",null,"\u603B\u8BC4"),se.createElement("div",{className:"mt20"},se.createElement("span",{className:"c-orange"},ye.overall_appraisal))))),se.createElement(et.Z,{style:{margin:0}}),(ye.work_comment_hidden||ye.work_comment)&&se.createElement("div",null,se.createElement(Yt.Z,{align:"middle"},se.createElement(Me.Z,{flex:1},se.createElement("h1",{className:pe.title},"\u70B9\u8BC4\u5185\u5BB9")),se.createElement(Me.Z,{className:"pr30"},(0,Wt.GJ)()&&se.createElement(It.ZP,{onClick:()=>fi(void 0,null,function*(){ae.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:se.createElement(Ht.Z,null),content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",onOk(){return fi(this,null,function*(){(yield(0,ji.gZ)({comment_id:ye.comment_id,homeworkId:Ri.homeworkId})).status===0&&(de.ZP.success("\u5220\u9664\u6210\u529F"),Gi({type:"shixunHomeworks/getShixunWorkReport",payload:On(On({},Ri),$i.current||{})}))})}})})},se.createElement(Ot.Z,null),"\u5220\u9664"))),se.createElement(et.Z,{style:{margin:0}}),ye.work_comment&&se.createElement("aside",{className:"pl30 pr30 mt20"},se.createElement("span",{className:"c-light-black font12"},"# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),se.createElement("br",null),se.createElement(In.Z,{value:ye.work_comment})),ye.work_comment_hidden&&se.createElement("aside",{className:"pl30 pr30 mt20"},se.createElement("span",{className:"c-light-black font12"},"# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),se.createElement("br",null),se.createElement(In.Z,{value:ye.work_comment_hidden}))),(ye==null?void 0:ye.action_analysis)&&se.createElement(Sn,{detailData:ye}),se.createElement("div",{className:pe.score},se.createElement("h1",{className:pe.title},"\u9636\u6BB5\u6210\u7EE9"),(ye==null?void 0:ye.adjust_review_score_count)>0&&(0,Wt.GJ)()&&se.createElement("div",{style:{color:"#0152d9",cursor:"pointer"},onClick:()=>{yr(!0),sr({page:1,page_size:10},"all")}},"\u6210\u7EE9\u8C03\u5206\u8BB0\u5F55\uFF08",ye==null?void 0:ye.adjust_review_score_count,"\u6B21\uFF09")),se.createElement("aside",{className:"pl30 pr30"},se.createElement(at.default,{dataSource:ye.stage_list,rowKey:Qi=>Qi==null?void 0:Qi.challenge_id,pagination:!1,columns:br})),((Ui=ye==null?void 0:ye.target_test_sets)==null?void 0:Ui.length)>0&&se.createElement("div",null,se.createElement("h1",{className:pe.title},"\u6307\u6807\u6210\u7EE9"),se.createElement("aside",{className:"pl30 pr30"},se.createElement(at.default,{dataSource:_n,rowKey:Qi=>Qi==null?void 0:Qi.challenge_id,pagination:!1,bordered:!0,columns:Xr}))),(ye==null?void 0:ye.work_description)&&se.createElement(se.Fragment,null,se.createElement("h1",{className:pe.title},"\u4E2A\u4EBA\u603B\u7ED3"),se.createElement("aside",{className:"pl30 pr30"},se.createElement(In.Z,{value:ye==null?void 0:ye.work_description}))),se.createElement("h1",{className:pe.title},"\u56FE\u5F62\u7EDF\u8BA1"),se.createElement(en,{data:Fe}),(ye==null?void 0:ye.is_open_submit_test_result)&&se.createElement(se.Fragment,null,se.createElement("h1",{className:pe.title},"\u5B9E\u9A8C\u7ED3\u679C"),(hr=ye==null?void 0:ye.student_work_test_result_info)!=null&&hr.is_submit_test_result?se.createElement("div",{className:"px-30px"},se.createElement("div",{className:"py-20px px-36px",style:{background:"#F6F7F9"}},se.createElement("div",{ref:$o,style:{maxHeight:!ro&&"500px",overflow:"hidden"}},se.createElement(In.Z,{value:(Si=ye==null?void 0:ye.student_work_test_result_info)==null?void 0:Si.content})),kr&&se.createElement("div",{className:"w-full current",onClick:()=>{eo(!ro)}},se.createElement(et.Z,{variant:"dashed",style:{borderColor:"#3061D0",marginBottom:"0px"},dashed:!0},se.createElement("span",{style:{color:"#3061D0"}},ro?"\u6536\u8D77":"\u5C55\u5F00")))),se.createElement(Li.Z,{className:"px-36px",showDimensions:!1,dataSource:(Qr=ye==null?void 0:ye.student_work_test_result_info)==null?void 0:Qr.test_result_files,callback:()=>{}})):se.createElement(dr.Z,{customText:"\u5B66\u751F\u672A\u63D0\u4EA4\u5B9E\u9A8C\u7ED3\u679C"})),se.createElement("h1",{className:pe.title},"\u5B9E\u8BAD\u8BE6\u60C5")),se.createElement(wi,{autoHeight:be}))),(0,Wt.GJ)()&&se.createElement("aside",{className:`${pe.footerBar} ${Mi?pe.footerBarStatic:""}`},se.createElement("aside",{className:"edu-container"},se.createElement(Yt.Z,{align:"middle"},se.createElement(Me.Z,{flex:"1"},se.createElement(ie.Link,{className:pe.exitComment,to:`/classrooms/${Ri.coursesId}/shixun_homework/${Ri.categoryId}/detail`},"\u8FD4\u56DE\u5217\u8868")),se.createElement(Me.Z,{flex:"1",className:"tr"},se.createElement(It.ZP,{type:"default",disabled:!(ye!=null&&ye.pre_student_work_id),onClick:()=>yo()},"\u4E0A\u4E00\u4E2A"),se.createElement(It.ZP,{type:"default",style:{marginLeft:"20px",marginRight:"20px"},disabled:!(ye!=null&&ye.next_student_work_id),onClick:()=>yo("next")},"\u4E0B\u4E00\u4E2A"),(0,Wt.GJ)()&&se.createElement(It.ZP,{type:"primary",onClick:()=>fi(void 0,null,function*(){Gi({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:ye.user_id,data:On({},ye)},fn:()=>sr({page:1,page_size:10},"all")}})})},"\u70B9\u8BC4\u4F5C\u4E1A"))))))),se.createElement(xi,null),se.createElement(Hi.Z,null),se.createElement(ae.default,{open:Ei,width:860,centered:!0,onCancel:()=>{Ii(!1)},title:"\u8BA1\u65F6\u89C4\u5219\u8BF4\u660E",footer:null},se.createElement("div",{style:{color:"#333333",fontWeight:400}},se.createElement("span",{style:{fontWeight:500}},"1\u3001\u9875\u9762\u505C\u7559\u65F6\u957F"),se.createElement("br",null),se.createElement("span",null,"\u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),se.createElement("br",null),se.createElement("span",null," \u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u82E5\u5B66\u751F\u5173\u95ED/\u9000\u51FA\u7B54\u9898\u9875\u9762\uFF0C\u5219\u8BA1\u65F6\u6682\u505C\uFF0C\u518D\u6B21\u8FDB\u5165\u7B54\u9898\u9875\u9762\u65F6\u5F00\u59CB\u7D2F\u8BA1\u8BA1\u65F6\u76F4\u81F3\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),se.createElement("span",{style:{color:"#FA6400",display:"flex",height:34,alignItems:"center"}}," \u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5 "),se.createElement("span",null,"a\u3001\u5B66\u751F\u8FDB\u5165\u5173\u5361\u770B\u5B8C\u9898\u540E\uFF0C\u9000\u51FA\u7B54\u9898\u9875\u9762\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u590D\u5236\u8FDB\u5E73\u53F0\u7B54\u9898\u9875\u9762\u8FDB\u884C\u8BC4\u6D4B\uFF0C\u65E0\u6CD5\u8BC4\u4F30\u5B66\u751F\u7684\u5B66\u4E60\u548C\u601D\u8003\u65F6\u95F4\u3002")),se.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},se.createElement("span",{style:{fontWeight:500}},"2\u3001\u5173\u5361\u603B\u8017\u65F6"),se.createElement("br",null),se.createElement("span",{style:{}},"\u5B66\u751F\u7B2C\u4E00\u6B21\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\u3002 "),se.createElement("br",null),se.createElement("span",null," \u53E6\uFF0C\u5373\u4F7F\u5173\u5361\u95EF\u5173\u8FC7\u7A0B\u4E2D\uFF0C\u5B66\u751F\u9000\u51FA/\u5173\u95ED\u7B54\u9898\u9875\u9762\uFF0C\u4E5F\u5C06\u6301\u7EED\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u901A\u8FC7\u3002"),se.createElement("span",{style:{color:"#FA6400",display:"flex",height:44,paddingTop:10}}," \u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5 "),se.createElement("span",null,"a\u3001\u5B66\u751F\u4ECE\u5176\u4ED6\u540C\u5B66\u5904\u770B\u5230\u9898\u76EE\u540E\uFF0C\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\uFF0C\u5C06\u5DF2\u5B8C\u6210\u7684\u4EE3\u7801\u590D\u5236\u81F3\u5E73\u53F0\u8FDB\u884C\u8BC4\u6D4B\uFF1B"),se.createElement("br",null),se.createElement("span",null,"b\u3001\u5B66\u751F\u7B2C\u4E00\u6B21\u6253\u5F00\u5173\u5361\u540E\uFF0C\u56E0\u4E3A\u67D0\u79CD\u539F\u56E0\u79BB\u5F00\u9875\u9762\uFF0C\u65F6\u9694\u591A\u65E5\u624D\u518D\u6B21\u8FDB\u5165\u5E73\u53F0\u95EF\u5173\uFF0C\u5C31\u4F1A\u5BFC\u81F4\u5B66\u751F\u5173\u5361\u603B\u8017\u65F6\u8FC7\u957F\uFF1B")),se.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},se.createElement("span",{style:{fontWeight:500}},"3\u3001\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),se.createElement("br",null),se.createElement("span",{style:{}},"\u4ECE\u8001\u5E08\u53D1\u5E03\u7684\u5B9E\u8BAD\u4F5C\u4E1A\u5F00\u59CB\u65F6\u95F4\uFF0C\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5B9E\u8BAD\u901A\u5173\uFF08\u5305\u62EC\u8FDF\u4EA4\u901A\u5173\uFF09\uFF0C\u7ED3\u675F\u8BA1\u65F6\u3002\u5982\u679C\u5B66\u751F\u672A\u901A\u5173\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u8001\u5E08\u8BBE\u7F6E\u7684\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\uFF0C\u5982\u679C\u8001\u5E08\u5F00\u542F\u4E86\u8865\u4EA4\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u8865\u4EA4\u622A\u6B62\u65F6\u95F4\u3002")),se.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},se.createElement("span",{style:{fontWeight:500}},"\u89C4\u5219\u76EE\u7684"),se.createElement("br",null),se.createElement("span",{style:{}},"\u9F13\u52B1\u5B66\u751F\u5728\u5B9E\u8BAD\u4F5C\u4E1A\u53D1\u5E03\u7684\u7B2C\u4E00\u65F6\u95F4\uFF0C\u7ACB\u5373\u767B\u5F55\u5E73\u53F0\u5B8C\u6210\u5B9E\u8BAD\u4F5C\u4E1A\u7684\u901A\u5173\u3002"))),se.createElement(ae.default,{open:nr,title:"\u5B9E\u8BAD\u603B\u8017\u65F6\u8BF4\u660E",centered:!0,footer:null,onCancel:()=>{Ni(!1)},width:600},se.createElement("div",{style:{fontWeight:400,color:"#333333"}},se.createElement("div",null,"1\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",se.createElement("span",{style:{color:"#145DFF"}},"\u9875\u9762\u505C\u7559\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),se.createElement("div",{style:{margin:"20px 0px"}},"2\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",se.createElement("span",{style:{color:"#145DFF"}},"\u5173\u5361\u603B\u8017\u65F6"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),se.createElement("div",null,"3\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",se.createElement("span",{style:{color:"#145DFF"}},"\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u901A\u5173\u65F6\u95F4\uFF0C\u5F53\u5B66\u751F\u672A\u901A\u5173\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\u3002"))),se.createElement(ae.default,{open:Mr,title:"\u6210\u7EE9\u8C03\u5206\u8BB0\u5F55",centered:!0,footer:null,onCancel:()=>{Qe("all"),yr(!1)},destroyOnClose:!0,width:900},se.createElement("div",{style:{fontWeight:400,color:"#333333"}},se.createElement("div",null,se.createElement("span",null,"\u5173\u5361\uFF1A"),se.createElement(dt.default,{style:{width:300},value:Ln,placeholder:"\u8BF7\u9009\u62E9\u5173\u5361",defaultValue:"all",onChange:Qi=>fi(void 0,null,function*(){Qe(Qi),sr({page:1,page_size:10},Qi)})},se.createElement(dt.default.Option,{value:"all"}," \u5168\u90E8 "),(xr=ye==null?void 0:ye.stage_list)==null?void 0:xr.map((Qi,Tr)=>se.createElement(dt.default.Option,{key:Tr,value:Qi==null?void 0:Qi.challenge_id},"\u7B2C",(0,te.EM)(Tr+1),"\u5173")))),se.createElement("div",{className:"mt20"},se.createElement(at.default,{dataSource:Wn,rowKey:Qi=>Qi==null?void 0:Qi.id,pagination:!1,columns:io,loading:ke})),se.createElement("div",{className:pe.footer},se.createElement("div",null,se.createElement("span",{style:{color:"#656F87"}},"\u5171",se.createElement("span",{className:"c-light-primary"},cn),"\u6761\u6570\u636E")),se.createElement(gt.Z,{defaultCurrent:1,defaultPageSize:10,current:(he==null?void 0:he.page)||1,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,total:cn,onChange:zs})))))};var Vi=(0,ie.connect)(({shixunHomeworks:rn,classroomList:Ve,loading:fn,globalSetting:mi,user:Pi})=>({shixunHomeworks:rn,classroomList:Ve,globalSetting:mi,loading:fn.effects,user:Pi}))(ki)},97610:function(mn,je,Ut){"use strict";var St=Ut(62957),Xt=Ut(6767),Ae=Ut(38986),xe=Ut(25690),fe=Ut(48790),Rt=Ut(59301),ie=(de,zt,Ie)=>new Promise((Yt,Me)=>{var It=At=>{try{et(Ie.next(At))}catch(at){Me(at)}},nt=At=>{try{et(Ie.throw(At))}catch(at){Me(at)}},et=At=>At.done?Yt(At.value):Promise.resolve(At.value).then(It,nt);et((Ie=Ie.apply(de,zt)).next())});const ae=({shixunHomeworks:de,classroomList:zt,dispatch:Ie})=>{const Yt=(0,xe.useParams)();return Rt.createElement(St.default,{centered:!0,title:"\u63D0\u793A",open:de.actionTabs.key==="\u6253\u56DE\u91CD\u505A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>ie(void 0,null,function*(){var Me,It,nt,et;if((0,fe.Rm)()&&!((Me=zt.AssistantObject.practice)!=null&&Me.can_redo)){Xt.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}const At=yield(0,Ae.ZP)(`/api/myshixuns/${de.actionTabs.selectArrs.myshixun_identifier}/reset_my_game.json`,{method:"GET",params:{course_id:Yt.coursesId,homework_common_id:de.actionTabs.homework_common_id}});if(At.shixun_identifier){Xt.ZP.success("\u64CD\u4F5C\u6210\u529F"),Ie({type:"shixunHomeworks/setActionTabs",payload:{}});const at=(nt=(It=At==null?void 0:At.new_works)==null?void 0:It.find(dt=>`${dt.homework_common_id}`===Yt.categoryId))==null?void 0:nt.id;if((0,fe.Rm)()&&!((et=zt.AssistantObject.practice)!=null&&et.can_view))return;xe.history.replace(`/classrooms/${Yt.coursesId}/shixun_homework/${Yt.categoryId}/${at}/comment`)}}),onCancel:()=>{Ie({type:"shixunHomeworks/setActionTabs",payload:{}})}},Rt.createElement("p",null,"\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C\u5B66\u751F\u5B9E\u8BAD\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"),Rt.createElement("p",null,"\u786E\u5B9A\u6253\u56DE?"))};je.Z=(0,xe.connect)(({shixunHomeworks:de,classroomList:zt})=>({shixunHomeworks:de,classroomList:zt}))(ae)},40133:function(mn,je,Ut){"use strict";Ut.d(je,{AD:function(){return en},D9:function(){return gn},Hp:function(){return Ht},IM:function(){return Yn},Iy:function(){return Zt},KM:function(){return Gt},MJ:function(){return Ot},Ne:function(){return $n},ON:function(){return Je},Uj:function(){return ti},VY:function(){return Gn},YO:function(){return tn},YX:function(){return Le},Zn:function(){return nt},_g:function(){return gt},_k:function(){return me},c6:function(){return Ke},cr:function(){return et},eV:function(){return _e},fi:function(){return At},gh:function(){return we},hS:function(){return nn},iA:function(){return at},j6:function(){return xt},je:function(){return Nn},jj:function(){return kt},kS:function(){return yi},lS:function(){return Kn},o6:function(){return pe},pO:function(){return jn},rQ:function(){return dn},sA:function(){return te},xm:function(){return ee},xo:function(){return Tn},y8:function(){return yn},yd:function(){return dt}});var St=Ut(82264),Xt=Ut(25690),Ae=Ut(51257),xe=Ut(6767),fe=Ut(346),Rt=Object.defineProperty,ie=Object.getOwnPropertySymbols,ae=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,zt=(Ft,mt,vt)=>mt in Ft?Rt(Ft,mt,{enumerable:!0,configurable:!0,writable:!0,value:vt}):Ft[mt]=vt,Ie=(Ft,mt)=>{for(var vt in mt||(mt={}))ae.call(mt,vt)&&zt(Ft,vt,mt[vt]);if(ie)for(var vt of ie(mt))de.call(mt,vt)&&zt(Ft,vt,mt[vt]);return Ft},Yt=(Ft,mt,vt)=>new Promise((Lt,Ct)=>{var _t=wn=>{try{ze(vt.next(wn))}catch(Ge){Ct(Ge)}},Pe=wn=>{try{ze(vt.throw(wn))}catch(Ge){Ct(Ge)}},ze=wn=>wn.done?Lt(wn.value):Promise.resolve(wn.value).then(_t,Pe);ze((vt=vt.apply(Ft,mt)).next())});const Me=()=>{(0,Xt.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u751F\u6210\u6587\u4EF6\uFF0C\u8BF7\u7A0D\u540E..."}})},It=()=>{(0,Xt.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}})},nt=Ft=>Yt(void 0,null,function*(){Me(),(yield(0,St.YR)(Ie({},Ft))).status===0&&(yield(0,Ae.QH)("",(0,Ae.NY)({url:fe.Z.API_SERVER+`/api/courses/${Ft.coursesId}/export_couser_info.json`,query:Ft}))),It()}),et=Ft=>Yt(void 0,null,function*(){const mt=yield(0,St.yS)(Ie({},Ft));if(mt.status===0)xe.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Xt.history.push(`/classrooms/${Ft.coursesId}/exportlist/course_member_act_score`);else{if(mt.status===-2)return mt;mt.status===-3&&((0,Xt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Xt.history.push(`/classrooms/${Ft.coursesId}/exportlist/course_member_act_score`))}}),At=Ft=>Yt(void 0,null,function*(){const mt=yield(0,St.W0)(Ie({},Ft));if(mt.status===0)xe.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Xt.history.push(`/classrooms/${Ft.coursesId}/exportlist/course_total_score`);else{if(mt.status===-4)return mt;mt.status===-3&&((0,Xt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Xt.history.push(`/classrooms/${Ft.coursesId}/exportlist/course_total_score`))}}),at=Ft=>Yt(void 0,null,function*(){const mt=yield(0,St.Nl)(Ie({},Ft));if(mt.status===0)xe.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Xt.history.push(`/classrooms/${Ft.coursesId}/exportlist/course_total_exercise_and_other`);else{if(mt.status===-4)return mt;mt.status===-3&&((0,Xt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Xt.history.push(`/classrooms/${Ft.coursesId}/exportlist/course_total_exercise_and_other`))}}),dt=Ft=>Yt(void 0,null,function*(){const mt=yield(0,St.IU)(Ie({},Ft));if(mt.status===0)xe.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Xt.history.push(`/classrooms/${Ft.coursesId}/exportlist/export_star_user`);else{if(mt.status===-4)return mt;mt.status===-3&&((0,Xt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Xt.history.push(`/classrooms/${Ft.coursesId}/exportlist/export_star_user`))}}),gt=Ft=>Yt(void 0,null,function*(){const mt=yield(0,St.td)(Ie({},Ft));if(mt.status===0)xe.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Xt.history.push(`/classrooms/${Ft.coursesId}/exportlist/course_total_exercise_and_other`);else{if(mt.status===-2)return mt;if(mt.status===-3)(0,Xt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Xt.history.push(`/classrooms/${Ft.coursesId}/exportlist/course_total_exercise_and_other`);else if(mt.status===-4)return mt}}),xt=Ft=>Yt(void 0,null,function*(){const mt=yield(0,St.QX)(Ie({},Ft));if(mt.status===0)xe.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Xt.history.push(`/classrooms/${Ft.coursesId}/exportlist/course_total_homework`);else{if(mt.status===-4)return mt;mt.status===-3&&((0,Xt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Xt.history.push(`/classrooms/${Ft.coursesId}/exportlist/course_total_homework`))}}),kt=(Ft,mt)=>Yt(void 0,null,function*(){const vt=yield(0,St.o_)(Ie({},Ft));vt.status===0?(xe.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F\uFF01\u5BFC\u51FA\u540E\u6587\u4EF6\u4FDD\u5B58\u65F6\u95F4\u4E3A7\u5929\uFF0C\u8BF7\u53CA\u65F6\u4E0B\u8F7D"),Xt.history.push(`/classrooms/${Ft.coursesId}/exportlist/${mt}`)):vt.status===-3&&((0,Xt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Xt.history.push(`/classrooms/${Ft.coursesId}/exportlist/${mt}`))}),Ht=(Ft,mt)=>Yt(void 0,null,function*(){const vt=yield(0,St.ZL)(Ie({},Ft));vt.status===0?(xe.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F\uFF01\u5BFC\u51FA\u540E\u6587\u4EF6\u4FDD\u5B58\u65F6\u95F4\u4E3A7\u5929\uFF0C\u8BF7\u53CA\u65F6\u4E0B\u8F7D"),Xt.history.push(`/classrooms/${Ft.coursesId}/exportlist/${mt}`)):vt.status===-3&&((0,Xt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Xt.history.push(`/classrooms/${Ft.coursesId}/exportlist/${mt}`))}),Ot=(Ft,mt)=>Yt(void 0,null,function*(){const vt=yield(0,St.vV)(Ie({},Ft));vt.status===0?(xe.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F\uFF01\u5BFC\u51FA\u540E\u6587\u4EF6\u4FDD\u5B58\u65F6\u95F4\u4E3A7\u5929\uFF0C\u8BF7\u53CA\u65F6\u4E0B\u8F7D"),Xt.history.push(`/classrooms/${Ft.coursesId}/exportlist/${mt}`)):vt.status===-3&&((0,Xt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Xt.history.push(`/classrooms/${Ft.coursesId}/exportlist/${mt}`))}),Zt=(Ft,mt)=>Yt(void 0,null,function*(){const vt=yield(0,St.aP)(Ie({},Ft));vt.status===0?(xe.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Xt.history.push(`/classrooms/${Ft.coursesId}/exportlist/${mt}`)):vt.status===-3&&((0,Xt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Xt.history.push(`/classrooms/${Ft.coursesId}/exportlist/${mt}`))}),Wt=Ft=>Yt(void 0,null,function*(){Me(),(yield exportCourseWorkListAppendix(Ie({},Ft))).status===0&&(yield downLoadFileIframe("",setUrlQuery({url:ENV.API_SERVER+`/api/homework_commons/${Ft.categoryId}/works_list.zip`,query:Ft}))),It()}),te=Ft=>Yt(void 0,null,function*(){Me(),yield(0,Ae.QH)("",fe.Z.API_SERVER+`/api/polls/${Ft.categoryId}/commit_result.xlsx`),It()}),we=Ft=>Yt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:fe.Z.API_SERVER+`/api/courses/${Ft.coursesId}/attendances/export_xlsx_data.xlsx`,query:Ft}))}),pe=Ft=>Yt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:fe.Z.API_SERVER+`/api/courses/${Ft.coursesId}/video_study_statics.xlsx`,query:Ft}))}),Ke=Ft=>Yt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:fe.Z.API_SERVER+`/api/courses/${Ft.coursesId}/export_video_study.xlsx`,query:Ft}))}),_e=Ft=>Yt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:fe.Z.API_SERVER+`/api/courses/${Ft.coursesId}/export_course_students_info.xlsx`,query:Ft}))}),en=Ft=>Yt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:fe.Z.API_SERVER+"/api/school_manages/students.xlsx",query:Ft}))}),dn=Ft=>Yt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:fe.Z.API_SERVER+"/api/item_banks/export.xlsx",query:Ft}))}),yn=Ft=>Yt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:fe.Z.API_SERVER+"/api/competitions/region_reports.xlsx",query:Ft}))}),Nn=Ft=>Yt(void 0,null,function*(){const mt=yield(0,St.Uy)(Ie({},Ft));mt.status===0?(xe.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Xt.history.push(`/classrooms/${Ft.coursesId}/exportlist/exercise_score,export_exercise_users`)):mt.status===-3&&((0,Xt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Xt.history.push(`/classrooms/${Ft.coursesId}/exportlist/exercise_score,export_exercise_users`))}),Kn=Ft=>Yt(void 0,null,function*(){const mt=yield(0,St.tg)(Ie({},Ft));mt.status===0?(xe.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Xt.history.push(`/classrooms/${Ft.coursesId}/exportlist/exercise_score,export_exercise_report`)):mt.status===-3&&((0,Xt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Xt.history.push(`/classrooms/${Ft.coursesId}/exportlist/exercise_score,export_exercise_report`))}),me=Ft=>Yt(void 0,null,function*(){console.log("----------","\u8C03\u7528\u4E0B\u8F7D"),yield(0,Ae.FH)("",(0,Ae.NY)({url:fe.Z.API_SERVER+`/api/export_records/${Ft.id}.xlsx`,query:Ft}))}),ee=Ft=>Yt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:fe.Z.API_SERVER+"/api/ec_major_schools/0/ec_years.xlsx",query:Ft}))}),gn=Ft=>Yt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:fe.Z.API_SERVER+`/api/courses/${Ft==null?void 0:Ft.coursesId}/${Ft.menuKey}_statistic.xlsx?${Ft.checkedList.map(mt=>`course_group_id[]=${mt}`).join("&")}`,query:Ft}))}),$n=Ft=>Yt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:fe.Z.API_SERVER+`/api/ec_years/${Ft==null?void 0:Ft.ec_year_id}/ec_training_objectives.xlsx`,query:Ft}))}),Yn=Ft=>Yt(void 0,null,function*(){yield(0,Ae.FH)(Ft==null?void 0:Ft.name,(0,Ae.NY)({url:fe.Z.API_SERVER+"/api/attachments/get_ecs_attachment.docx",query:Ft}))}),nn=Ft=>Yt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:fe.Z.API_SERVER+`/api/ec_years/${Ft==null?void 0:Ft.ec_year_id}/ec_courses.xlsx`,query:Ft}))}),Tn=Ft=>Yt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:fe.Z.API_SERVER+`/api/ec_years/${Ft==null?void 0:Ft.ec_year_id}/ec_graduation_requirements.xlsx`,query:Ft}))}),Gn=Ft=>Yt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:fe.Z.API_SERVER+"/api/courses/rank_list.xlsx",query:Ft}))}),yi=Ft=>Yt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:fe.Z.API_SERVER+"/api/courses/question_rank_list.xlsx",query:Ft}))}),Je=Ft=>Yt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:fe.Z.API_SERVER+`/api/examination_banks/${Ft.id}.json`,query:Ft}))}),Le=Ft=>Yt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:fe.Z.API_SERVER+`/api/exercises/${Ft.categoryId}.json`,query:Ft}))}),tn=Ft=>Yt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:fe.Z.API_SERVER+`/api/polls/${Ft==null?void 0:Ft.id}/commit_result.json`,query:Ft}))}),ti=Ft=>Yt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:fe.Z.API_SERVER+"/api/paths/get_task_pass.json",query:Ft}))}),jn=(Ft,mt)=>Yt(void 0,null,function*(){yield(0,Ae.FH)(mt||"",(0,Ae.NY)({url:fe.Z.API_SERVER+`/api/exercises/${Ft==null?void 0:Ft.exercise_id}/consult_exercise.json`,query:Ft}))}),Gt=Ft=>Yt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:fe.Z.API_SERVER+`/api/competitions/${Ft==null?void 0:Ft.identifier}/competition_commit_records/member_works.xlsx`,query:Ft}))})},45937:function(mn,je,Ut){"use strict";Ut.d(je,{U:function(){return de}});var St=Ut(59301),Xt=Object.defineProperty,Ae=Object.getOwnPropertySymbols,xe=Object.prototype.hasOwnProperty,fe=Object.prototype.propertyIsEnumerable,Rt=(zt,Ie,Yt)=>Ie in zt?Xt(zt,Ie,{enumerable:!0,configurable:!0,writable:!0,value:Yt}):zt[Ie]=Yt,ie=(zt,Ie)=>{for(var Yt in Ie||(Ie={}))xe.call(Ie,Yt)&&Rt(zt,Yt,Ie[Yt]);if(Ae)for(var Yt of Ae(Ie))fe.call(Ie,Yt)&&Rt(zt,Yt,Ie[Yt]);return zt},ae=(zt,Ie,Yt)=>new Promise((Me,It)=>{var nt=at=>{try{At(Yt.next(at))}catch(dt){It(dt)}},et=at=>{try{At(Yt.throw(at))}catch(dt){It(dt)}},At=at=>at.done?Me(at.value):Promise.resolve(at.value).then(nt,et);At((Yt=Yt.apply(zt,Ie)).next())});function de(zt,Ie){const[Yt,Me]=(0,St.useState)(Ie),[It,nt]=(0,St.useState)(!1),[et,At]=(0,St.useState)();return[Yt,It,(dt,gt=!1)=>ae(this,null,function*(){const xt=gt?Ie:ie(ie({},Yt),dt);nt(!0),Me(xt);const kt=yield zt(xt);return nt(!1),At(kt),kt}),et,At]}},81428:function(mn,je,Ut){"use strict";Ut.d(je,{AL:function(){return xt},Iy:function(){return Ie},Qv:function(){return It},ez:function(){return gt},jb:function(){return Yt}});var St=Ut(32834),Xt=Ut.n(St),Ae=Ut(11690),xe=Ut.n(Ae);let fe=1;function Rt(Wt,te){const we=Wt.match(/^(\s+)(?:```)/);if(we===null)return te;const pe=we[1];return te.split(`
`).map(Ke=>{const _e=Ke.match(/^\s+/);if(_e===null)return Ke;const[en]=_e;return en.length>=pe.length?Ke.slice(pe.length):Ke}).join(`
`)}let ie=[],ae=["<ul>"];const de=new(Xt()).Renderer,zt=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Ie(){ie.length=0,ae=["<ul>"]}const Yt={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function Me(Wt,te,we,pe){if(te>=Wt.length||Wt[te].level<=we)return te;var Ke=Wt[te];pe.push("<li><a href='#"+fe+Ke.anchor+"'>"+Ke.text+"</a>"),te++;var _e=[];return te=Me(Wt,te,Ke.level,_e),_e.length>0&&(pe.push("<ul>"),_e.forEach(function(en){pe.push(en)}),pe.push("</ul>")),pe.push("</li>"),te=Me(Wt,te,we,pe),te}function It(){return Me(ie,0,0,ae),ae.push("</ul>"),ae.join("")}const nt={heading(Wt){const te=zt.exec(Wt);if(fe+=1,te)return{type:"heading",raw:te[0],depth:te[1].length,text:te[2]}},fences(Wt){const te=this.rules.block.fences.exec(Wt);if(te){const we=te[0];let pe=Rt(we,te[3]||"");const Ke=te[2]?te[2].trim():te[2];if(["latex","katex","math"].indexOf(Ke)>=0){const _e=at(),en=pe;pe=_e,dt[_e]={type:"block",expression:en}}return{type:"code",raw:we,lang:Ke,text:pe}}}},et=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let At=0;const at=()=>`__special_katext_id_${At++}__`;let dt={};function gt(){return dt}function xt(){At=0,dt={}}function kt(Wt){return Wt=Wt.replace(et,(te,we)=>{const pe=at();return dt[pe]={type:"inline",expression:we},pe}),Wt}const Ht=de.listitem;de.listitem=function(Wt){return Ht(kt(Wt))};const Ot=de.paragraph;de.paragraph=function(Wt){return Ot(kt(Wt))};const Zt=de.tablecell;de.tablecell=function(Wt,te){return Zt(kt(Wt),te)},de.code=function(Wt,te,we){const pe=(te||"").match(/\S*/)[0];return pe?["latex","katex","math"].indexOf(pe)>=0?`<p class='editormd-tex'>${Wt}</p>`:`<pre class="prettyprint linenums"><code class="language-${te}">${we?Wt:(0,Ae.escape)(Wt,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(we?Wt:(0,Ae.escape)(Wt,!0))+"</code></pre>"},de.heading=function(Wt,te,we){let pe=this.options.headerPrefix+we.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ie.push({anchor:pe,level:te,text:Wt}),"<h"+te+' id="'+fe+pe+'">'+Wt+"</h"+te+">"},Xt().setOptions({silent:!0,gfm:!0,pedantic:!1}),Xt().use({tokenizer:nt,renderer:de}),je.ZP=Xt()},86251:function(mn,je){"use strict";je.byteLength=ie,je.toByteArray=de,je.fromByteArray=Yt;for(var Ut=[],St=[],Xt=typeof Uint8Array!="undefined"?Uint8Array:Array,Ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xe=0,fe=Ae.length;xe<fe;++xe)Ut[xe]=Ae[xe],St[Ae.charCodeAt(xe)]=xe;St[45]=62,St[95]=63;function Rt(Me){var It=Me.length;if(It%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var nt=Me.indexOf("=");nt===-1&&(nt=It);var et=nt===It?0:4-nt%4;return[nt,et]}function ie(Me){var It=Rt(Me),nt=It[0],et=It[1];return(nt+et)*3/4-et}function ae(Me,It,nt){return(It+nt)*3/4-nt}function de(Me){var It,nt=Rt(Me),et=nt[0],At=nt[1],at=new Xt(ae(Me,et,At)),dt=0,gt=At>0?et-4:et,xt;for(xt=0;xt<gt;xt+=4)It=St[Me.charCodeAt(xt)]<<18|St[Me.charCodeAt(xt+1)]<<12|St[Me.charCodeAt(xt+2)]<<6|St[Me.charCodeAt(xt+3)],at[dt++]=It>>16&255,at[dt++]=It>>8&255,at[dt++]=It&255;return At===2&&(It=St[Me.charCodeAt(xt)]<<2|St[Me.charCodeAt(xt+1)]>>4,at[dt++]=It&255),At===1&&(It=St[Me.charCodeAt(xt)]<<10|St[Me.charCodeAt(xt+1)]<<4|St[Me.charCodeAt(xt+2)]>>2,at[dt++]=It>>8&255,at[dt++]=It&255),at}function zt(Me){return Ut[Me>>18&63]+Ut[Me>>12&63]+Ut[Me>>6&63]+Ut[Me&63]}function Ie(Me,It,nt){for(var et,At=[],at=It;at<nt;at+=3)et=(Me[at]<<16&16711680)+(Me[at+1]<<8&65280)+(Me[at+2]&255),At.push(zt(et));return At.join("")}function Yt(Me){for(var It,nt=Me.length,et=nt%3,At=[],at=16383,dt=0,gt=nt-et;dt<gt;dt+=at)At.push(Ie(Me,dt,dt+at>gt?gt:dt+at));return et===1?(It=Me[nt-1],At.push(Ut[It>>2]+Ut[It<<4&63]+"==")):et===2&&(It=(Me[nt-2]<<8)+Me[nt-1],At.push(Ut[It>>10]+Ut[It>>4&63]+Ut[It<<2&63]+"=")),At.join("")}},19208:function(mn,je,Ut){"use strict";var St;var Xt=Ut(86251),Ae=Ut(67467),xe=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;je.lW=ae,St=dt,je.h2=50;var fe=2147483647;St=fe,ae.TYPED_ARRAY_SUPPORT=Rt(),!ae.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 Rt(){try{var mt=new Uint8Array(1),vt={foo:function(){return 42}};return Object.setPrototypeOf(vt,Uint8Array.prototype),Object.setPrototypeOf(mt,vt),mt.foo()===42}catch(Lt){return!1}}Object.defineProperty(ae.prototype,"parent",{enumerable:!0,get:function(){if(ae.isBuffer(this))return this.buffer}}),Object.defineProperty(ae.prototype,"offset",{enumerable:!0,get:function(){if(ae.isBuffer(this))return this.byteOffset}});function ie(mt){if(mt>fe)throw new RangeError('The value "'+mt+'" is invalid for option "size"');var vt=new Uint8Array(mt);return Object.setPrototypeOf(vt,ae.prototype),vt}function ae(mt,vt,Lt){if(typeof mt=="number"){if(typeof vt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Yt(mt)}return de(mt,vt,Lt)}ae.poolSize=8192;function de(mt,vt,Lt){if(typeof mt=="string")return Me(mt,vt);if(ArrayBuffer.isView(mt))return nt(mt);if(mt==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof mt);if(jn(mt,ArrayBuffer)||mt&&jn(mt.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(jn(mt,SharedArrayBuffer)||mt&&jn(mt.buffer,SharedArrayBuffer)))return et(mt,vt,Lt);if(typeof mt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Ct=mt.valueOf&&mt.valueOf();if(Ct!=null&&Ct!==mt)return ae.from(Ct,vt,Lt);var _t=At(mt);if(_t)return _t;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof mt[Symbol.toPrimitive]=="function")return ae.from(mt[Symbol.toPrimitive]("string"),vt,Lt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof mt)}ae.from=function(mt,vt,Lt){return de(mt,vt,Lt)},Object.setPrototypeOf(ae.prototype,Uint8Array.prototype),Object.setPrototypeOf(ae,Uint8Array);function zt(mt){if(typeof mt!="number")throw new TypeError('"size" argument must be of type number');if(mt<0)throw new RangeError('The value "'+mt+'" is invalid for option "size"')}function Ie(mt,vt,Lt){return zt(mt),mt<=0?ie(mt):vt!==void 0?typeof Lt=="string"?ie(mt).fill(vt,Lt):ie(mt).fill(vt):ie(mt)}ae.alloc=function(mt,vt,Lt){return Ie(mt,vt,Lt)};function Yt(mt){return zt(mt),ie(mt<0?0:at(mt)|0)}ae.allocUnsafe=function(mt){return Yt(mt)},ae.allocUnsafeSlow=function(mt){return Yt(mt)};function Me(mt,vt){if((typeof vt!="string"||vt==="")&&(vt="utf8"),!ae.isEncoding(vt))throw new TypeError("Unknown encoding: "+vt);var Lt=gt(mt,vt)|0,Ct=ie(Lt),_t=Ct.write(mt,vt);return _t!==Lt&&(Ct=Ct.slice(0,_t)),Ct}function It(mt){for(var vt=mt.length<0?0:at(mt.length)|0,Lt=ie(vt),Ct=0;Ct<vt;Ct+=1)Lt[Ct]=mt[Ct]&255;return Lt}function nt(mt){if(jn(mt,Uint8Array)){var vt=new Uint8Array(mt);return et(vt.buffer,vt.byteOffset,vt.byteLength)}return It(mt)}function et(mt,vt,Lt){if(vt<0||mt.byteLength<vt)throw new RangeError('"offset" is outside of buffer bounds');if(mt.byteLength<vt+(Lt||0))throw new RangeError('"length" is outside of buffer bounds');var Ct;return vt===void 0&&Lt===void 0?Ct=new Uint8Array(mt):Lt===void 0?Ct=new Uint8Array(mt,vt):Ct=new Uint8Array(mt,vt,Lt),Object.setPrototypeOf(Ct,ae.prototype),Ct}function At(mt){if(ae.isBuffer(mt)){var vt=at(mt.length)|0,Lt=ie(vt);return Lt.length===0||mt.copy(Lt,0,0,vt),Lt}if(mt.length!==void 0)return typeof mt.length!="number"||Gt(mt.length)?ie(0):It(mt);if(mt.type==="Buffer"&&Array.isArray(mt.data))return It(mt.data)}function at(mt){if(mt>=fe)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+fe.toString(16)+" bytes");return mt|0}function dt(mt){return+mt!=mt&&(mt=0),ae.alloc(+mt)}ae.isBuffer=function(vt){return vt!=null&&vt._isBuffer===!0&&vt!==ae.prototype},ae.compare=function(vt,Lt){if(jn(vt,Uint8Array)&&(vt=ae.from(vt,vt.offset,vt.byteLength)),jn(Lt,Uint8Array)&&(Lt=ae.from(Lt,Lt.offset,Lt.byteLength)),!ae.isBuffer(vt)||!ae.isBuffer(Lt))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(vt===Lt)return 0;for(var Ct=vt.length,_t=Lt.length,Pe=0,ze=Math.min(Ct,_t);Pe<ze;++Pe)if(vt[Pe]!==Lt[Pe]){Ct=vt[Pe],_t=Lt[Pe];break}return Ct<_t?-1:_t<Ct?1:0},ae.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}},ae.concat=function(vt,Lt){if(!Array.isArray(vt))throw new TypeError('"list" argument must be an Array of Buffers');if(vt.length===0)return ae.alloc(0);var Ct;if(Lt===void 0)for(Lt=0,Ct=0;Ct<vt.length;++Ct)Lt+=vt[Ct].length;var _t=ae.allocUnsafe(Lt),Pe=0;for(Ct=0;Ct<vt.length;++Ct){var ze=vt[Ct];if(jn(ze,Uint8Array))Pe+ze.length>_t.length?ae.from(ze).copy(_t,Pe):Uint8Array.prototype.set.call(_t,ze,Pe);else if(ae.isBuffer(ze))ze.copy(_t,Pe);else throw new TypeError('"list" argument must be an Array of Buffers');Pe+=ze.length}return _t};function gt(mt,vt){if(ae.isBuffer(mt))return mt.length;if(ArrayBuffer.isView(mt)||jn(mt,ArrayBuffer))return mt.byteLength;if(typeof mt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof mt);var Lt=mt.length,Ct=arguments.length>2&&arguments[2]===!0;if(!Ct&&Lt===0)return 0;for(var _t=!1;;)switch(vt){case"ascii":case"latin1":case"binary":return Lt;case"utf8":case"utf-8":return yi(mt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Lt*2;case"hex":return Lt>>>1;case"base64":return tn(mt).length;default:if(_t)return Ct?-1:yi(mt).length;vt=(""+vt).toLowerCase(),_t=!0}}ae.byteLength=gt;function xt(mt,vt,Lt){var Ct=!1;if((vt===void 0||vt<0)&&(vt=0),vt>this.length||((Lt===void 0||Lt>this.length)&&(Lt=this.length),Lt<=0)||(Lt>>>=0,vt>>>=0,Lt<=vt))return"";for(mt||(mt="utf8");;)switch(mt){case"hex":return Kn(this,vt,Lt);case"utf8":case"utf-8":return _e(this,vt,Lt);case"ascii":return yn(this,vt,Lt);case"latin1":case"binary":return Nn(this,vt,Lt);case"base64":return Ke(this,vt,Lt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return me(this,vt,Lt);default:if(Ct)throw new TypeError("Unknown encoding: "+mt);mt=(mt+"").toLowerCase(),Ct=!0}}ae.prototype._isBuffer=!0;function kt(mt,vt,Lt){var Ct=mt[vt];mt[vt]=mt[Lt],mt[Lt]=Ct}ae.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 Lt=0;Lt<vt;Lt+=2)kt(this,Lt,Lt+1);return this},ae.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 Lt=0;Lt<vt;Lt+=4)kt(this,Lt,Lt+3),kt(this,Lt+1,Lt+2);return this},ae.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 Lt=0;Lt<vt;Lt+=8)kt(this,Lt,Lt+7),kt(this,Lt+1,Lt+6),kt(this,Lt+2,Lt+5),kt(this,Lt+3,Lt+4);return this},ae.prototype.toString=function(){var vt=this.length;return vt===0?"":arguments.length===0?_e(this,0,vt):xt.apply(this,arguments)},ae.prototype.toLocaleString=ae.prototype.toString,ae.prototype.equals=function(vt){if(!ae.isBuffer(vt))throw new TypeError("Argument must be a Buffer");return this===vt?!0:ae.compare(this,vt)===0},ae.prototype.inspect=function(){var vt="",Lt=je.h2;return vt=this.toString("hex",0,Lt).replace(/(.{2})/g,"$1 ").trim(),this.length>Lt&&(vt+=" ... "),"<Buffer "+vt+">"},xe&&(ae.prototype[xe]=ae.prototype.inspect),ae.prototype.compare=function(vt,Lt,Ct,_t,Pe){if(jn(vt,Uint8Array)&&(vt=ae.from(vt,vt.offset,vt.byteLength)),!ae.isBuffer(vt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof vt);if(Lt===void 0&&(Lt=0),Ct===void 0&&(Ct=vt?vt.length:0),_t===void 0&&(_t=0),Pe===void 0&&(Pe=this.length),Lt<0||Ct>vt.length||_t<0||Pe>this.length)throw new RangeError("out of range index");if(_t>=Pe&&Lt>=Ct)return 0;if(_t>=Pe)return-1;if(Lt>=Ct)return 1;if(Lt>>>=0,Ct>>>=0,_t>>>=0,Pe>>>=0,this===vt)return 0;for(var ze=Pe-_t,wn=Ct-Lt,Ge=Math.min(ze,wn),Te=this.slice(_t,Pe),Ze=vt.slice(Lt,Ct),hn=0;hn<Ge;++hn)if(Te[hn]!==Ze[hn]){ze=Te[hn],wn=Ze[hn];break}return ze<wn?-1:wn<ze?1:0};function Ht(mt,vt,Lt,Ct,_t){if(mt.length===0)return-1;if(typeof Lt=="string"?(Ct=Lt,Lt=0):Lt>2147483647?Lt=2147483647:Lt<-2147483648&&(Lt=-2147483648),Lt=+Lt,Gt(Lt)&&(Lt=_t?0:mt.length-1),Lt<0&&(Lt=mt.length+Lt),Lt>=mt.length){if(_t)return-1;Lt=mt.length-1}else if(Lt<0)if(_t)Lt=0;else return-1;if(typeof vt=="string"&&(vt=ae.from(vt,Ct)),ae.isBuffer(vt))return vt.length===0?-1:Ot(mt,vt,Lt,Ct,_t);if(typeof vt=="number")return vt=vt&255,typeof Uint8Array.prototype.indexOf=="function"?_t?Uint8Array.prototype.indexOf.call(mt,vt,Lt):Uint8Array.prototype.lastIndexOf.call(mt,vt,Lt):Ot(mt,[vt],Lt,Ct,_t);throw new TypeError("val must be string, number or Buffer")}function Ot(mt,vt,Lt,Ct,_t){var Pe=1,ze=mt.length,wn=vt.length;if(Ct!==void 0&&(Ct=String(Ct).toLowerCase(),Ct==="ucs2"||Ct==="ucs-2"||Ct==="utf16le"||Ct==="utf-16le")){if(mt.length<2||vt.length<2)return-1;Pe=2,ze/=2,wn/=2,Lt/=2}function Ge(si,Dn){return Pe===1?si[Dn]:si.readUInt16BE(Dn*Pe)}var Te;if(_t){var Ze=-1;for(Te=Lt;Te<ze;Te++)if(Ge(mt,Te)===Ge(vt,Ze===-1?0:Te-Ze)){if(Ze===-1&&(Ze=Te),Te-Ze+1===wn)return Ze*Pe}else Ze!==-1&&(Te-=Te-Ze),Ze=-1}else for(Lt+wn>ze&&(Lt=ze-wn),Te=Lt;Te>=0;Te--){for(var hn=!0,In=0;In<wn;In++)if(Ge(mt,Te+In)!==Ge(vt,In)){hn=!1;break}if(hn)return Te}return-1}ae.prototype.includes=function(vt,Lt,Ct){return this.indexOf(vt,Lt,Ct)!==-1},ae.prototype.indexOf=function(vt,Lt,Ct){return Ht(this,vt,Lt,Ct,!0)},ae.prototype.lastIndexOf=function(vt,Lt,Ct){return Ht(this,vt,Lt,Ct,!1)};function Zt(mt,vt,Lt,Ct){Lt=Number(Lt)||0;var _t=mt.length-Lt;Ct?(Ct=Number(Ct),Ct>_t&&(Ct=_t)):Ct=_t;var Pe=vt.length;Ct>Pe/2&&(Ct=Pe/2);for(var ze=0;ze<Ct;++ze){var wn=parseInt(vt.substr(ze*2,2),16);if(Gt(wn))return ze;mt[Lt+ze]=wn}return ze}function Wt(mt,vt,Lt,Ct){return ti(yi(vt,mt.length-Lt),mt,Lt,Ct)}function te(mt,vt,Lt,Ct){return ti(Je(vt),mt,Lt,Ct)}function we(mt,vt,Lt,Ct){return ti(tn(vt),mt,Lt,Ct)}function pe(mt,vt,Lt,Ct){return ti(Le(vt,mt.length-Lt),mt,Lt,Ct)}ae.prototype.write=function(vt,Lt,Ct,_t){if(Lt===void 0)_t="utf8",Ct=this.length,Lt=0;else if(Ct===void 0&&typeof Lt=="string")_t=Lt,Ct=this.length,Lt=0;else if(isFinite(Lt))Lt=Lt>>>0,isFinite(Ct)?(Ct=Ct>>>0,_t===void 0&&(_t="utf8")):(_t=Ct,Ct=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Pe=this.length-Lt;if((Ct===void 0||Ct>Pe)&&(Ct=Pe),vt.length>0&&(Ct<0||Lt<0)||Lt>this.length)throw new RangeError("Attempt to write outside buffer bounds");_t||(_t="utf8");for(var ze=!1;;)switch(_t){case"hex":return Zt(this,vt,Lt,Ct);case"utf8":case"utf-8":return Wt(this,vt,Lt,Ct);case"ascii":case"latin1":case"binary":return te(this,vt,Lt,Ct);case"base64":return we(this,vt,Lt,Ct);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pe(this,vt,Lt,Ct);default:if(ze)throw new TypeError("Unknown encoding: "+_t);_t=(""+_t).toLowerCase(),ze=!0}},ae.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ke(mt,vt,Lt){return vt===0&&Lt===mt.length?Xt.fromByteArray(mt):Xt.fromByteArray(mt.slice(vt,Lt))}function _e(mt,vt,Lt){Lt=Math.min(mt.length,Lt);for(var Ct=[],_t=vt;_t<Lt;){var Pe=mt[_t],ze=null,wn=Pe>239?4:Pe>223?3:Pe>191?2:1;if(_t+wn<=Lt){var Ge,Te,Ze,hn;switch(wn){case 1:Pe<128&&(ze=Pe);break;case 2:Ge=mt[_t+1],(Ge&192)===128&&(hn=(Pe&31)<<6|Ge&63,hn>127&&(ze=hn));break;case 3:Ge=mt[_t+1],Te=mt[_t+2],(Ge&192)===128&&(Te&192)===128&&(hn=(Pe&15)<<12|(Ge&63)<<6|Te&63,hn>2047&&(hn<55296||hn>57343)&&(ze=hn));break;case 4:Ge=mt[_t+1],Te=mt[_t+2],Ze=mt[_t+3],(Ge&192)===128&&(Te&192)===128&&(Ze&192)===128&&(hn=(Pe&15)<<18|(Ge&63)<<12|(Te&63)<<6|Ze&63,hn>65535&&hn<1114112&&(ze=hn))}}ze===null?(ze=65533,wn=1):ze>65535&&(ze-=65536,Ct.push(ze>>>10&1023|55296),ze=56320|ze&1023),Ct.push(ze),_t+=wn}return dn(Ct)}var en=4096;function dn(mt){var vt=mt.length;if(vt<=en)return String.fromCharCode.apply(String,mt);for(var Lt="",Ct=0;Ct<vt;)Lt+=String.fromCharCode.apply(String,mt.slice(Ct,Ct+=en));return Lt}function yn(mt,vt,Lt){var Ct="";Lt=Math.min(mt.length,Lt);for(var _t=vt;_t<Lt;++_t)Ct+=String.fromCharCode(mt[_t]&127);return Ct}function Nn(mt,vt,Lt){var Ct="";Lt=Math.min(mt.length,Lt);for(var _t=vt;_t<Lt;++_t)Ct+=String.fromCharCode(mt[_t]);return Ct}function Kn(mt,vt,Lt){var Ct=mt.length;(!vt||vt<0)&&(vt=0),(!Lt||Lt<0||Lt>Ct)&&(Lt=Ct);for(var _t="",Pe=vt;Pe<Lt;++Pe)_t+=Ft[mt[Pe]];return _t}function me(mt,vt,Lt){for(var Ct=mt.slice(vt,Lt),_t="",Pe=0;Pe<Ct.length-1;Pe+=2)_t+=String.fromCharCode(Ct[Pe]+Ct[Pe+1]*256);return _t}ae.prototype.slice=function(vt,Lt){var Ct=this.length;vt=~~vt,Lt=Lt===void 0?Ct:~~Lt,vt<0?(vt+=Ct,vt<0&&(vt=0)):vt>Ct&&(vt=Ct),Lt<0?(Lt+=Ct,Lt<0&&(Lt=0)):Lt>Ct&&(Lt=Ct),Lt<vt&&(Lt=vt);var _t=this.subarray(vt,Lt);return Object.setPrototypeOf(_t,ae.prototype),_t};function ee(mt,vt,Lt){if(mt%1!==0||mt<0)throw new RangeError("offset is not uint");if(mt+vt>Lt)throw new RangeError("Trying to access beyond buffer length")}ae.prototype.readUintLE=ae.prototype.readUIntLE=function(vt,Lt,Ct){vt=vt>>>0,Lt=Lt>>>0,Ct||ee(vt,Lt,this.length);for(var _t=this[vt],Pe=1,ze=0;++ze<Lt&&(Pe*=256);)_t+=this[vt+ze]*Pe;return _t},ae.prototype.readUintBE=ae.prototype.readUIntBE=function(vt,Lt,Ct){vt=vt>>>0,Lt=Lt>>>0,Ct||ee(vt,Lt,this.length);for(var _t=this[vt+--Lt],Pe=1;Lt>0&&(Pe*=256);)_t+=this[vt+--Lt]*Pe;return _t},ae.prototype.readUint8=ae.prototype.readUInt8=function(vt,Lt){return vt=vt>>>0,Lt||ee(vt,1,this.length),this[vt]},ae.prototype.readUint16LE=ae.prototype.readUInt16LE=function(vt,Lt){return vt=vt>>>0,Lt||ee(vt,2,this.length),this[vt]|this[vt+1]<<8},ae.prototype.readUint16BE=ae.prototype.readUInt16BE=function(vt,Lt){return vt=vt>>>0,Lt||ee(vt,2,this.length),this[vt]<<8|this[vt+1]},ae.prototype.readUint32LE=ae.prototype.readUInt32LE=function(vt,Lt){return vt=vt>>>0,Lt||ee(vt,4,this.length),(this[vt]|this[vt+1]<<8|this[vt+2]<<16)+this[vt+3]*16777216},ae.prototype.readUint32BE=ae.prototype.readUInt32BE=function(vt,Lt){return vt=vt>>>0,Lt||ee(vt,4,this.length),this[vt]*16777216+(this[vt+1]<<16|this[vt+2]<<8|this[vt+3])},ae.prototype.readIntLE=function(vt,Lt,Ct){vt=vt>>>0,Lt=Lt>>>0,Ct||ee(vt,Lt,this.length);for(var _t=this[vt],Pe=1,ze=0;++ze<Lt&&(Pe*=256);)_t+=this[vt+ze]*Pe;return Pe*=128,_t>=Pe&&(_t-=Math.pow(2,8*Lt)),_t},ae.prototype.readIntBE=function(vt,Lt,Ct){vt=vt>>>0,Lt=Lt>>>0,Ct||ee(vt,Lt,this.length);for(var _t=Lt,Pe=1,ze=this[vt+--_t];_t>0&&(Pe*=256);)ze+=this[vt+--_t]*Pe;return Pe*=128,ze>=Pe&&(ze-=Math.pow(2,8*Lt)),ze},ae.prototype.readInt8=function(vt,Lt){return vt=vt>>>0,Lt||ee(vt,1,this.length),this[vt]&128?(255-this[vt]+1)*-1:this[vt]},ae.prototype.readInt16LE=function(vt,Lt){vt=vt>>>0,Lt||ee(vt,2,this.length);var Ct=this[vt]|this[vt+1]<<8;return Ct&32768?Ct|4294901760:Ct},ae.prototype.readInt16BE=function(vt,Lt){vt=vt>>>0,Lt||ee(vt,2,this.length);var Ct=this[vt+1]|this[vt]<<8;return Ct&32768?Ct|4294901760:Ct},ae.prototype.readInt32LE=function(vt,Lt){return vt=vt>>>0,Lt||ee(vt,4,this.length),this[vt]|this[vt+1]<<8|this[vt+2]<<16|this[vt+3]<<24},ae.prototype.readInt32BE=function(vt,Lt){return vt=vt>>>0,Lt||ee(vt,4,this.length),this[vt]<<24|this[vt+1]<<16|this[vt+2]<<8|this[vt+3]},ae.prototype.readFloatLE=function(vt,Lt){return vt=vt>>>0,Lt||ee(vt,4,this.length),Ae.read(this,vt,!0,23,4)},ae.prototype.readFloatBE=function(vt,Lt){return vt=vt>>>0,Lt||ee(vt,4,this.length),Ae.read(this,vt,!1,23,4)},ae.prototype.readDoubleLE=function(vt,Lt){return vt=vt>>>0,Lt||ee(vt,8,this.length),Ae.read(this,vt,!0,52,8)},ae.prototype.readDoubleBE=function(vt,Lt){return vt=vt>>>0,Lt||ee(vt,8,this.length),Ae.read(this,vt,!1,52,8)};function gn(mt,vt,Lt,Ct,_t,Pe){if(!ae.isBuffer(mt))throw new TypeError('"buffer" argument must be a Buffer instance');if(vt>_t||vt<Pe)throw new RangeError('"value" argument is out of bounds');if(Lt+Ct>mt.length)throw new RangeError("Index out of range")}ae.prototype.writeUintLE=ae.prototype.writeUIntLE=function(vt,Lt,Ct,_t){if(vt=+vt,Lt=Lt>>>0,Ct=Ct>>>0,!_t){var Pe=Math.pow(2,8*Ct)-1;gn(this,vt,Lt,Ct,Pe,0)}var ze=1,wn=0;for(this[Lt]=vt&255;++wn<Ct&&(ze*=256);)this[Lt+wn]=vt/ze&255;return Lt+Ct},ae.prototype.writeUintBE=ae.prototype.writeUIntBE=function(vt,Lt,Ct,_t){if(vt=+vt,Lt=Lt>>>0,Ct=Ct>>>0,!_t){var Pe=Math.pow(2,8*Ct)-1;gn(this,vt,Lt,Ct,Pe,0)}var ze=Ct-1,wn=1;for(this[Lt+ze]=vt&255;--ze>=0&&(wn*=256);)this[Lt+ze]=vt/wn&255;return Lt+Ct},ae.prototype.writeUint8=ae.prototype.writeUInt8=function(vt,Lt,Ct){return vt=+vt,Lt=Lt>>>0,Ct||gn(this,vt,Lt,1,255,0),this[Lt]=vt&255,Lt+1},ae.prototype.writeUint16LE=ae.prototype.writeUInt16LE=function(vt,Lt,Ct){return vt=+vt,Lt=Lt>>>0,Ct||gn(this,vt,Lt,2,65535,0),this[Lt]=vt&255,this[Lt+1]=vt>>>8,Lt+2},ae.prototype.writeUint16BE=ae.prototype.writeUInt16BE=function(vt,Lt,Ct){return vt=+vt,Lt=Lt>>>0,Ct||gn(this,vt,Lt,2,65535,0),this[Lt]=vt>>>8,this[Lt+1]=vt&255,Lt+2},ae.prototype.writeUint32LE=ae.prototype.writeUInt32LE=function(vt,Lt,Ct){return vt=+vt,Lt=Lt>>>0,Ct||gn(this,vt,Lt,4,4294967295,0),this[Lt+3]=vt>>>24,this[Lt+2]=vt>>>16,this[Lt+1]=vt>>>8,this[Lt]=vt&255,Lt+4},ae.prototype.writeUint32BE=ae.prototype.writeUInt32BE=function(vt,Lt,Ct){return vt=+vt,Lt=Lt>>>0,Ct||gn(this,vt,Lt,4,4294967295,0),this[Lt]=vt>>>24,this[Lt+1]=vt>>>16,this[Lt+2]=vt>>>8,this[Lt+3]=vt&255,Lt+4},ae.prototype.writeIntLE=function(vt,Lt,Ct,_t){if(vt=+vt,Lt=Lt>>>0,!_t){var Pe=Math.pow(2,8*Ct-1);gn(this,vt,Lt,Ct,Pe-1,-Pe)}var ze=0,wn=1,Ge=0;for(this[Lt]=vt&255;++ze<Ct&&(wn*=256);)vt<0&&Ge===0&&this[Lt+ze-1]!==0&&(Ge=1),this[Lt+ze]=(vt/wn>>0)-Ge&255;return Lt+Ct},ae.prototype.writeIntBE=function(vt,Lt,Ct,_t){if(vt=+vt,Lt=Lt>>>0,!_t){var Pe=Math.pow(2,8*Ct-1);gn(this,vt,Lt,Ct,Pe-1,-Pe)}var ze=Ct-1,wn=1,Ge=0;for(this[Lt+ze]=vt&255;--ze>=0&&(wn*=256);)vt<0&&Ge===0&&this[Lt+ze+1]!==0&&(Ge=1),this[Lt+ze]=(vt/wn>>0)-Ge&255;return Lt+Ct},ae.prototype.writeInt8=function(vt,Lt,Ct){return vt=+vt,Lt=Lt>>>0,Ct||gn(this,vt,Lt,1,127,-128),vt<0&&(vt=255+vt+1),this[Lt]=vt&255,Lt+1},ae.prototype.writeInt16LE=function(vt,Lt,Ct){return vt=+vt,Lt=Lt>>>0,Ct||gn(this,vt,Lt,2,32767,-32768),this[Lt]=vt&255,this[Lt+1]=vt>>>8,Lt+2},ae.prototype.writeInt16BE=function(vt,Lt,Ct){return vt=+vt,Lt=Lt>>>0,Ct||gn(this,vt,Lt,2,32767,-32768),this[Lt]=vt>>>8,this[Lt+1]=vt&255,Lt+2},ae.prototype.writeInt32LE=function(vt,Lt,Ct){return vt=+vt,Lt=Lt>>>0,Ct||gn(this,vt,Lt,4,2147483647,-2147483648),this[Lt]=vt&255,this[Lt+1]=vt>>>8,this[Lt+2]=vt>>>16,this[Lt+3]=vt>>>24,Lt+4},ae.prototype.writeInt32BE=function(vt,Lt,Ct){return vt=+vt,Lt=Lt>>>0,Ct||gn(this,vt,Lt,4,2147483647,-2147483648),vt<0&&(vt=4294967295+vt+1),this[Lt]=vt>>>24,this[Lt+1]=vt>>>16,this[Lt+2]=vt>>>8,this[Lt+3]=vt&255,Lt+4};function $n(mt,vt,Lt,Ct,_t,Pe){if(Lt+Ct>mt.length)throw new RangeError("Index out of range");if(Lt<0)throw new RangeError("Index out of range")}function Yn(mt,vt,Lt,Ct,_t){return vt=+vt,Lt=Lt>>>0,_t||$n(mt,vt,Lt,4,34028234663852886e22,-34028234663852886e22),Ae.write(mt,vt,Lt,Ct,23,4),Lt+4}ae.prototype.writeFloatLE=function(vt,Lt,Ct){return Yn(this,vt,Lt,!0,Ct)},ae.prototype.writeFloatBE=function(vt,Lt,Ct){return Yn(this,vt,Lt,!1,Ct)};function nn(mt,vt,Lt,Ct,_t){return vt=+vt,Lt=Lt>>>0,_t||$n(mt,vt,Lt,8,17976931348623157e292,-17976931348623157e292),Ae.write(mt,vt,Lt,Ct,52,8),Lt+8}ae.prototype.writeDoubleLE=function(vt,Lt,Ct){return nn(this,vt,Lt,!0,Ct)},ae.prototype.writeDoubleBE=function(vt,Lt,Ct){return nn(this,vt,Lt,!1,Ct)},ae.prototype.copy=function(vt,Lt,Ct,_t){if(!ae.isBuffer(vt))throw new TypeError("argument should be a Buffer");if(Ct||(Ct=0),!_t&&_t!==0&&(_t=this.length),Lt>=vt.length&&(Lt=vt.length),Lt||(Lt=0),_t>0&&_t<Ct&&(_t=Ct),_t===Ct||vt.length===0||this.length===0)return 0;if(Lt<0)throw new RangeError("targetStart out of bounds");if(Ct<0||Ct>=this.length)throw new RangeError("Index out of range");if(_t<0)throw new RangeError("sourceEnd out of bounds");_t>this.length&&(_t=this.length),vt.length-Lt<_t-Ct&&(_t=vt.length-Lt+Ct);var Pe=_t-Ct;return this===vt&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(Lt,Ct,_t):Uint8Array.prototype.set.call(vt,this.subarray(Ct,_t),Lt),Pe},ae.prototype.fill=function(vt,Lt,Ct,_t){if(typeof vt=="string"){if(typeof Lt=="string"?(_t=Lt,Lt=0,Ct=this.length):typeof Ct=="string"&&(_t=Ct,Ct=this.length),_t!==void 0&&typeof _t!="string")throw new TypeError("encoding must be a string");if(typeof _t=="string"&&!ae.isEncoding(_t))throw new TypeError("Unknown encoding: "+_t);if(vt.length===1){var Pe=vt.charCodeAt(0);(_t==="utf8"&&Pe<128||_t==="latin1")&&(vt=Pe)}}else typeof vt=="number"?vt=vt&255:typeof vt=="boolean"&&(vt=Number(vt));if(Lt<0||this.length<Lt||this.length<Ct)throw new RangeError("Out of range index");if(Ct<=Lt)return this;Lt=Lt>>>0,Ct=Ct===void 0?this.length:Ct>>>0,vt||(vt=0);var ze;if(typeof vt=="number")for(ze=Lt;ze<Ct;++ze)this[ze]=vt;else{var wn=ae.isBuffer(vt)?vt:ae.from(vt,_t),Ge=wn.length;if(Ge===0)throw new TypeError('The value "'+vt+'" is invalid for argument "value"');for(ze=0;ze<Ct-Lt;++ze)this[ze+Lt]=wn[ze%Ge]}return this};var Tn=/[^+/0-9A-Za-z-_]/g;function Gn(mt){if(mt=mt.split("=")[0],mt=mt.trim().replace(Tn,""),mt.length<2)return"";for(;mt.length%4!==0;)mt=mt+"=";return mt}function yi(mt,vt){vt=vt||1/0;for(var Lt,Ct=mt.length,_t=null,Pe=[],ze=0;ze<Ct;++ze){if(Lt=mt.charCodeAt(ze),Lt>55295&&Lt<57344){if(!_t){if(Lt>56319){(vt-=3)>-1&&Pe.push(239,191,189);continue}else if(ze+1===Ct){(vt-=3)>-1&&Pe.push(239,191,189);continue}_t=Lt;continue}if(Lt<56320){(vt-=3)>-1&&Pe.push(239,191,189),_t=Lt;continue}Lt=(_t-55296<<10|Lt-56320)+65536}else _t&&(vt-=3)>-1&&Pe.push(239,191,189);if(_t=null,Lt<128){if((vt-=1)<0)break;Pe.push(Lt)}else if(Lt<2048){if((vt-=2)<0)break;Pe.push(Lt>>6|192,Lt&63|128)}else if(Lt<65536){if((vt-=3)<0)break;Pe.push(Lt>>12|224,Lt>>6&63|128,Lt&63|128)}else if(Lt<1114112){if((vt-=4)<0)break;Pe.push(Lt>>18|240,Lt>>12&63|128,Lt>>6&63|128,Lt&63|128)}else throw new Error("Invalid code point")}return Pe}function Je(mt){for(var vt=[],Lt=0;Lt<mt.length;++Lt)vt.push(mt.charCodeAt(Lt)&255);return vt}function Le(mt,vt){for(var Lt,Ct,_t,Pe=[],ze=0;ze<mt.length&&!((vt-=2)<0);++ze)Lt=mt.charCodeAt(ze),Ct=Lt>>8,_t=Lt%256,Pe.push(_t),Pe.push(Ct);return Pe}function tn(mt){return Xt.toByteArray(Gn(mt))}function ti(mt,vt,Lt,Ct){for(var _t=0;_t<Ct&&!(_t+Lt>=vt.length||_t>=mt.length);++_t)vt[_t+Lt]=mt[_t];return _t}function jn(mt,vt){return mt instanceof vt||mt!=null&&mt.constructor!=null&&mt.constructor.name!=null&&mt.constructor.name===vt.name}function Gt(mt){return mt!==mt}var Ft=function(){for(var mt="0123456789abcdef",vt=new Array(256),Lt=0;Lt<16;++Lt)for(var Ct=Lt*16,_t=0;_t<16;++_t)vt[Ct+_t]=mt[Lt]+mt[_t];return vt}()},14625:function(mn){function je(St){var Xt,Ae,xe="";if(typeof St=="string"||typeof St=="number")xe+=St;else if(typeof St=="object")if(Array.isArray(St)){var fe=St.length;for(Xt=0;Xt<fe;Xt++)St[Xt]&&(Ae=je(St[Xt]))&&(xe&&(xe+=" "),xe+=Ae)}else for(Ae in St)St[Ae]&&(xe&&(xe+=" "),xe+=Ae);return xe}function Ut(){for(var St,Xt,Ae=0,xe="",fe=arguments.length;Ae<fe;Ae++)(St=arguments[Ae])&&(Xt=je(St))&&(xe&&(xe+=" "),xe+=Xt);return xe}mn.exports=Ut,mn.exports.clsx=Ut},99498:function(mn,je,Ut){(function(St){St(Ut(89780))})(function(St){St.defineOption("placeholder","",function(ae,de,zt){var Ie=zt&&zt!=St.Init;if(de&&!Ie)ae.on("blur",fe),ae.on("change",Rt),ae.on("swapDoc",Rt),St.on(ae.getInputField(),"compositionupdate",ae.state.placeholderCompose=function(){xe(ae)}),Rt(ae);else if(!de&&Ie){ae.off("blur",fe),ae.off("change",Rt),ae.off("swapDoc",Rt),St.off(ae.getInputField(),"compositionupdate",ae.state.placeholderCompose),Xt(ae);var Yt=ae.getWrapperElement();Yt.className=Yt.className.replace(" CodeMirror-empty","")}de&&!ae.hasFocus()&&fe(ae)});function Xt(ae){ae.state.placeholder&&(ae.state.placeholder.parentNode.removeChild(ae.state.placeholder),ae.state.placeholder=null)}function Ae(ae){Xt(ae);var de=ae.state.placeholder=document.createElement("pre");de.style.cssText="height: 0; overflow: visible",de.style.direction=ae.getOption("direction"),de.className="CodeMirror-placeholder CodeMirror-line-like";var zt=ae.getOption("placeholder");typeof zt=="string"&&(zt=document.createTextNode(zt)),de.appendChild(zt),ae.display.lineSpace.insertBefore(de,ae.display.lineSpace.firstChild)}function xe(ae){setTimeout(function(){var de=!1,zt=ae.getInputField();zt.nodeName=="TEXTAREA"?de=!zt.value:ae.lineCount()==1&&(de=!/[^\u200b]/.test(zt.querySelector(".CodeMirror-line").textContent)),de?Ae(ae):Xt(ae)},20)}function fe(ae){ie(ae)&&Ae(ae)}function Rt(ae){var de=ae.getWrapperElement(),zt=ie(ae);de.className=de.className.replace(" CodeMirror-empty","")+(zt?" CodeMirror-empty":""),zt?Ae(ae):Xt(ae)}function ie(ae){return ae.lineCount()===1&&ae.getLine(0)===""}})},25717:function(mn,je,Ut){(function(St){St(Ut(89780))})(function(St){var Xt={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Ae=St.Pos;St.defineOption("autoCloseBrackets",!1,function(nt,et,At){At&&At!=St.Init&&(nt.removeKeyMap(fe),nt.state.closeBrackets=null),et&&(Rt(xe(et,"pairs")),nt.state.closeBrackets=et,nt.addKeyMap(fe))});function xe(nt,et){return et=="pairs"&&typeof nt=="string"?nt:typeof nt=="object"&&nt[et]!=null?nt[et]:Xt[et]}var fe={Backspace:de,Enter:zt};function Rt(nt){for(var et=0;et<nt.length;et++){var At=nt.charAt(et),at="'"+At+"'";fe[at]||(fe[at]=ie(At))}}Rt(Xt.pairs+"`");function ie(nt){return function(et){return Yt(et,nt)}}function ae(nt){var et=nt.state.closeBrackets;if(!et||et.override)return et;var At=nt.getModeAt(nt.getCursor());return At.closeBrackets||et}function de(nt){var et=ae(nt);if(!et||nt.getOption("disableInput"))return St.Pass;for(var At=xe(et,"pairs"),at=nt.listSelections(),dt=0;dt<at.length;dt++){if(!at[dt].empty())return St.Pass;var gt=Me(nt,at[dt].head);if(!gt||At.indexOf(gt)%2!=0)return St.Pass}for(var dt=at.length-1;dt>=0;dt--){var xt=at[dt].head;nt.replaceRange("",Ae(xt.line,xt.ch-1),Ae(xt.line,xt.ch+1),"+delete")}}function zt(nt){var et=ae(nt),At=et&&xe(et,"explode");if(!At||nt.getOption("disableInput"))return St.Pass;for(var at=nt.listSelections(),dt=0;dt<at.length;dt++){if(!at[dt].empty())return St.Pass;var gt=Me(nt,at[dt].head);if(!gt||At.indexOf(gt)%2!=0)return St.Pass}nt.operation(function(){var xt=nt.lineSeparator()||`
`;nt.replaceSelection(xt+xt,null),nt.execCommand("goCharLeft"),at=nt.listSelections();for(var kt=0;kt<at.length;kt++){var Ht=at[kt].head.line;nt.indentLine(Ht,null,!0),nt.indentLine(Ht+1,null,!0)}})}function Ie(nt){var et=St.cmpPos(nt.anchor,nt.head)>0;return{anchor:new Ae(nt.anchor.line,nt.anchor.ch+(et?-1:1)),head:new Ae(nt.head.line,nt.head.ch+(et?1:-1))}}function Yt(nt,et){var At=ae(nt);if(!At||nt.getOption("disableInput"))return St.Pass;var at=xe(At,"pairs"),dt=at.indexOf(et);if(dt==-1)return St.Pass;for(var gt=xe(At,"closeBefore"),xt=xe(At,"triples"),kt=at.charAt(dt+1)==et,Ht=nt.listSelections(),Ot=dt%2==0,Zt,Wt=0;Wt<Ht.length;Wt++){var te=Ht[Wt],we=te.head,pe,Ke=nt.getRange(we,Ae(we.line,we.ch+1));if(Ot&&!te.empty())pe="surround";else if((kt||!Ot)&&Ke==et)kt&&It(nt,we)?pe="both":xt.indexOf(et)>=0&&nt.getRange(we,Ae(we.line,we.ch+3))==et+et+et?pe="skipThree":pe="skip";else if(kt&&we.ch>1&&xt.indexOf(et)>=0&&nt.getRange(Ae(we.line,we.ch-2),we)==et+et){if(we.ch>2&&/\bstring/.test(nt.getTokenTypeAt(Ae(we.line,we.ch-2))))return St.Pass;pe="addFour"}else if(kt){var _e=we.ch==0?" ":nt.getRange(Ae(we.line,we.ch-1),we);if(!St.isWordChar(Ke)&&_e!=et&&!St.isWordChar(_e))pe="both";else return St.Pass}else if(Ot&&(Ke.length===0||/\s/.test(Ke)||gt.indexOf(Ke)>-1))pe="both";else return St.Pass;if(!Zt)Zt=pe;else if(Zt!=pe)return St.Pass}var en=dt%2?at.charAt(dt-1):et,dn=dt%2?et:at.charAt(dt+1);nt.operation(function(){if(Zt=="skip")nt.execCommand("goCharRight");else if(Zt=="skipThree")for(var yn=0;yn<3;yn++)nt.execCommand("goCharRight");else if(Zt=="surround"){for(var Nn=nt.getSelections(),yn=0;yn<Nn.length;yn++)Nn[yn]=en+Nn[yn]+dn;nt.replaceSelections(Nn,"around"),Nn=nt.listSelections().slice();for(var yn=0;yn<Nn.length;yn++)Nn[yn]=Ie(Nn[yn]);nt.setSelections(Nn)}else Zt=="both"?(nt.replaceSelection(en+dn,null),nt.triggerElectric(en+dn),nt.execCommand("goCharLeft")):Zt=="addFour"&&(nt.replaceSelection(en+en+en+en,"before"),nt.execCommand("goCharRight"))})}function Me(nt,et){var At=nt.getRange(Ae(et.line,et.ch-1),Ae(et.line,et.ch+1));return At.length==2?At:null}function It(nt,et){var At=nt.getTokenAt(Ae(et.line,et.ch+1));return/\bstring/.test(At.type)&&At.start==et.ch&&(et.ch==0||!/\bstring/.test(nt.getTokenTypeAt(et)))}})},6313:function(mn,je,Ut){(function(St){St(Ut(89780),Ut(32855))})(function(St){St.defineOption("autoCloseTags",!1,function(de,zt,Ie){if(Ie!=St.Init&&Ie&&de.removeKeyMap("autoCloseTags"),!!zt){var Yt={name:"autoCloseTags"};(typeof zt!="object"||zt.whenClosing!==!1)&&(Yt["'/'"]=function(Me){return Rt(Me)}),(typeof zt!="object"||zt.whenOpening!==!1)&&(Yt["'>'"]=function(Me){return xe(Me)}),de.addKeyMap(Yt)}});var Xt=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Ae=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function xe(de){if(de.getOption("disableInput"))return St.Pass;for(var zt=de.listSelections(),Ie=[],Yt=de.getOption("autoCloseTags"),Me=0;Me<zt.length;Me++){if(!zt[Me].empty())return St.Pass;var It=zt[Me].head,nt=de.getTokenAt(It),et=St.innerMode(de.getMode(),nt.state),At=et.state,at=et.mode.xmlCurrentTag&&et.mode.xmlCurrentTag(At),dt=at&&at.name;if(!dt)return St.Pass;var gt=et.mode.configuration=="html",xt=typeof Yt=="object"&&Yt.dontCloseTags||gt&&Xt,kt=typeof Yt=="object"&&Yt.indentTags||gt&&Ae;nt.end>It.ch&&(dt=dt.slice(0,dt.length-nt.end+It.ch));var Ht=dt.toLowerCase();if(!dt||nt.type=="string"&&(nt.end!=It.ch||!/[\"\']/.test(nt.string.charAt(nt.string.length-1))||nt.string.length==1)||nt.type=="tag"&&at.close||nt.string.indexOf("/")==It.ch-nt.start-1||xt&&ie(xt,Ht)>-1||ae(de,et.mode.xmlCurrentContext&&et.mode.xmlCurrentContext(At)||[],dt,It,!0))return St.Pass;var Ot=typeof Yt=="object"&&Yt.emptyTags;if(Ot&&ie(Ot,dt)>-1){Ie[Me]={text:"/>",newPos:St.Pos(It.line,It.ch+2)};continue}var Zt=kt&&ie(kt,Ht)>-1;Ie[Me]={indent:Zt,text:">"+(Zt?`
`:"")+"</"+dt+">",newPos:Zt?St.Pos(It.line+1,0):St.Pos(It.line,It.ch+1)}}for(var Wt=typeof Yt=="object"&&Yt.dontIndentOnAutoClose,Me=zt.length-1;Me>=0;Me--){var te=Ie[Me];de.replaceRange(te.text,zt[Me].head,zt[Me].anchor,"+insert");var we=de.listSelections().slice(0);we[Me]={head:te.newPos,anchor:te.newPos},de.setSelections(we),!Wt&&te.indent&&(de.indentLine(te.newPos.line,null,!0),de.indentLine(te.newPos.line+1,null,!0))}}function fe(de,zt){for(var Ie=de.listSelections(),Yt=[],Me=zt?"/":"</",It=de.getOption("autoCloseTags"),nt=typeof It=="object"&&It.dontIndentOnSlash,et=0;et<Ie.length;et++){if(!Ie[et].empty())return St.Pass;var At=Ie[et].head,at=de.getTokenAt(At),dt=St.innerMode(de.getMode(),at.state),gt=dt.state;if(zt&&(at.type=="string"||at.string.charAt(0)!="<"||at.start!=At.ch-1))return St.Pass;var xt,kt=dt.mode.name!="xml"&&de.getMode().name=="htmlmixed";if(kt&&dt.mode.name=="javascript")xt=Me+"script";else if(kt&&dt.mode.name=="css")xt=Me+"style";else{var Ht=dt.mode.xmlCurrentContext&&dt.mode.xmlCurrentContext(gt);if(!Ht||Ht.length&&ae(de,Ht,Ht[Ht.length-1],At))return St.Pass;xt=Me+Ht[Ht.length-1]}de.getLine(At.line).charAt(at.end)!=">"&&(xt+=">"),Yt[et]=xt}if(de.replaceSelections(Yt),Ie=de.listSelections(),!nt)for(var et=0;et<Ie.length;et++)(et==Ie.length-1||Ie[et].head.line<Ie[et+1].head.line)&&de.indentLine(Ie[et].head.line)}function Rt(de){return de.getOption("disableInput")?St.Pass:fe(de,!0)}St.commands.closeTag=function(de){return fe(de)};function ie(de,zt){if(de.indexOf)return de.indexOf(zt);for(var Ie=0,Yt=de.length;Ie<Yt;++Ie)if(de[Ie]==zt)return Ie;return-1}function ae(de,zt,Ie,Yt,Me){if(!St.scanForClosingTag)return!1;var It=Math.min(de.lastLine()+1,Yt.line+500),nt=St.scanForClosingTag(de,Yt,null,It);if(!nt||nt.tag!=Ie)return!1;for(var et=Me?1:0,At=zt.length-1;At>=0&&zt[At]==Ie;At--)++et;Yt=nt.to;for(var At=1;At<et;At++){var at=St.scanForClosingTag(de,Yt,null,It);if(!at||at.tag!=Ie)return!1;Yt=at.to}return!0}})},32855:function(mn,je,Ut){(function(St){St(Ut(89780))})(function(St){"use strict";var Xt=St.Pos;function Ae(At,at){return At.line-at.line||At.ch-at.ch}var xe="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",fe=xe+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Rt=new RegExp("<(/?)(["+xe+"]["+fe+"]*)","g");function ie(At,at,dt,gt){this.line=at,this.ch=dt,this.cm=At,this.text=At.getLine(at),this.min=gt?Math.max(gt.from,At.firstLine()):At.firstLine(),this.max=gt?Math.min(gt.to-1,At.lastLine()):At.lastLine()}function ae(At,at){var dt=At.cm.getTokenTypeAt(Xt(At.line,at));return dt&&/\btag\b/.test(dt)}function de(At){if(!(At.line>=At.max))return At.ch=0,At.text=At.cm.getLine(++At.line),!0}function zt(At){if(!(At.line<=At.min))return At.text=At.cm.getLine(--At.line),At.ch=At.text.length,!0}function Ie(At){for(;;){var at=At.text.indexOf(">",At.ch);if(at==-1){if(de(At))continue;return}if(!ae(At,at+1)){At.ch=at+1;continue}var dt=At.text.lastIndexOf("/",at),gt=dt>-1&&!/\S/.test(At.text.slice(dt+1,at));return At.ch=at+1,gt?"selfClose":"regular"}}function Yt(At){for(;;){var at=At.ch?At.text.lastIndexOf("<",At.ch-1):-1;if(at==-1){if(zt(At))continue;return}if(!ae(At,at+1)){At.ch=at;continue}Rt.lastIndex=at,At.ch=at;var dt=Rt.exec(At.text);if(dt&&dt.index==at)return dt}}function Me(At){for(;;){Rt.lastIndex=At.ch;var at=Rt.exec(At.text);if(!at){if(de(At))continue;return}if(!ae(At,at.index+1)){At.ch=at.index+1;continue}return At.ch=at.index+at[0].length,at}}function It(At){for(;;){var at=At.ch?At.text.lastIndexOf(">",At.ch-1):-1;if(at==-1){if(zt(At))continue;return}if(!ae(At,at+1)){At.ch=at;continue}var dt=At.text.lastIndexOf("/",at),gt=dt>-1&&!/\S/.test(At.text.slice(dt+1,at));return At.ch=at+1,gt?"selfClose":"regular"}}function nt(At,at){for(var dt=[];;){var gt=Me(At),xt,kt=At.line,Ht=At.ch-(gt?gt[0].length:0);if(!gt||!(xt=Ie(At)))return;if(xt!="selfClose")if(gt[1]){for(var Ot=dt.length-1;Ot>=0;--Ot)if(dt[Ot]==gt[2]){dt.length=Ot;break}if(Ot<0&&(!at||at==gt[2]))return{tag:gt[2],from:Xt(kt,Ht),to:Xt(At.line,At.ch)}}else dt.push(gt[2])}}function et(At,at){for(var dt=[];;){var gt=It(At);if(!gt)return;if(gt=="selfClose"){Yt(At);continue}var xt=At.line,kt=At.ch,Ht=Yt(At);if(!Ht)return;if(Ht[1])dt.push(Ht[2]);else{for(var Ot=dt.length-1;Ot>=0;--Ot)if(dt[Ot]==Ht[2]){dt.length=Ot;break}if(Ot<0&&(!at||at==Ht[2]))return{tag:Ht[2],from:Xt(At.line,At.ch),to:Xt(xt,kt)}}}}St.registerHelper("fold","xml",function(At,at){for(var dt=new ie(At,at.line,0);;){var gt=Me(dt);if(!gt||dt.line!=at.line)return;var xt=Ie(dt);if(!xt)return;if(!gt[1]&&xt!="selfClose"){var kt=Xt(dt.line,dt.ch),Ht=nt(dt,gt[2]);return Ht&&Ae(Ht.from,kt)>0?{from:kt,to:Ht.from}:null}}}),St.findMatchingTag=function(At,at,dt){var gt=new ie(At,at.line,at.ch,dt);if(!(gt.text.indexOf(">")==-1&&gt.text.indexOf("<")==-1)){var xt=Ie(gt),kt=xt&&Xt(gt.line,gt.ch),Ht=xt&&Yt(gt);if(!(!xt||!Ht||Ae(gt,at)>0)){var Ot={from:Xt(gt.line,gt.ch),to:kt,tag:Ht[2]};return xt=="selfClose"?{open:Ot,close:null,at:"open"}:Ht[1]?{open:et(gt,Ht[2]),close:Ot,at:"close"}:(gt=new ie(At,kt.line,kt.ch,dt),{open:Ot,close:nt(gt,Ht[2]),at:"open"})}}},St.findEnclosingTag=function(At,at,dt,gt){for(var xt=new ie(At,at.line,at.ch,dt);;){var kt=et(xt,gt);if(!kt)break;var Ht=new ie(At,at.line,at.ch,dt),Ot=nt(Ht,kt.tag);if(Ot)return{open:kt,close:Ot}}},St.scanForClosingTag=function(At,at,dt,gt){var xt=new ie(At,at.line,at.ch,gt?{from:0,to:gt}:null);return nt(xt,dt)}})},89780:function(mn){(function(je,Ut){mn.exports=Ut()})(this,function(){"use strict";var je=navigator.userAgent,Ut=navigator.platform,St=/gecko\/\d/i.test(je),Xt=/MSIE \d/.test(je),Ae=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(je),xe=/Edge\/(\d+)/.exec(je),fe=Xt||Ae||xe,Rt=fe&&(Xt?document.documentMode||6:+(xe||Ae)[1]),ie=!xe&&/WebKit\//.test(je),ae=ie&&/Qt\/\d+\.\d+/.test(je),de=!xe&&/Chrome\//.test(je),zt=/Opera\//.test(je),Ie=/Apple Computer/.test(navigator.vendor),Yt=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(je),Me=/PhantomJS/.test(je),It=!xe&&/AppleWebKit/.test(je)&&/Mobile\/\w+/.test(je),nt=/Android/.test(je),et=It||nt||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(je),At=It||/Mac/.test(Ut),at=/\bCrOS\b/.test(je),dt=/win/i.test(Ut),gt=zt&&je.match(/Version\/(\d*\.\d*)/);gt&&(gt=Number(gt[1])),gt&&gt>=15&&(zt=!1,ie=!0);var xt=At&&(ae||zt&&(gt==null||gt<12.11)),kt=St||fe&&Rt>=9;function Ht(it){return new RegExp("(^|\\s)"+it+"(?:$|\\s)\\s*")}var Ot=function(it,st){var ct=it.className,ht=Ht(st).exec(ct);if(ht){var pt=ct.slice(ht.index+ht[0].length);it.className=ct.slice(0,ht.index)+(pt?ht[1]+pt:"")}};function Zt(it){for(var st=it.childNodes.length;st>0;--st)it.removeChild(it.firstChild);return it}function Wt(it,st){return Zt(it).appendChild(st)}function te(it,st,ct,ht){var pt=document.createElement(it);if(ct&&(pt.className=ct),ht&&(pt.style.cssText=ht),typeof st=="string")pt.appendChild(document.createTextNode(st));else if(st)for(var Nt=0;Nt<st.length;++Nt)pt.appendChild(st[Nt]);return pt}function we(it,st,ct,ht){var pt=te(it,st,ct,ht);return pt.setAttribute("role","presentation"),pt}var pe;document.createRange?pe=function(it,st,ct,ht){var pt=document.createRange();return pt.setEnd(ht||it,ct),pt.setStart(it,st),pt}:pe=function(it,st,ct){var ht=document.body.createTextRange();try{ht.moveToElementText(it.parentNode)}catch(pt){return ht}return ht.collapse(!0),ht.moveEnd("character",ct),ht.moveStart("character",st),ht};function Ke(it,st){if(st.nodeType==3&&(st=st.parentNode),it.contains)return it.contains(st);do if(st.nodeType==11&&(st=st.host),st==it)return!0;while(st=st.parentNode)}function _e(){var it;try{it=document.activeElement}catch(st){it=document.body||null}for(;it&&it.shadowRoot&&it.shadowRoot.activeElement;)it=it.shadowRoot.activeElement;return it}function en(it,st){var ct=it.className;Ht(st).test(ct)||(it.className+=(ct?" ":"")+st)}function dn(it,st){for(var ct=it.split(" "),ht=0;ht<ct.length;ht++)ct[ht]&&!Ht(ct[ht]).test(st)&&(st+=" "+ct[ht]);return st}var yn=function(it){it.select()};It?yn=function(it){it.selectionStart=0,it.selectionEnd=it.value.length}:fe&&(yn=function(it){try{it.select()}catch(st){}});function Nn(it){var st=Array.prototype.slice.call(arguments,1);return function(){return it.apply(null,st)}}function Kn(it,st,ct){st||(st={});for(var ht in it)it.hasOwnProperty(ht)&&(ct!==!1||!st.hasOwnProperty(ht))&&(st[ht]=it[ht]);return st}function me(it,st,ct,ht,pt){st==null&&(st=it.search(/[^\s\u00a0]/),st==-1&&(st=it.length));for(var Nt=ht||0,Kt=pt||0;;){var $t=it.indexOf(" ",Nt);if($t<0||$t>=st)return Kt+(st-Nt);Kt+=$t-Nt,Kt+=ct-Kt%ct,Nt=$t+1}}var ee=function(){this.id=null,this.f=null,this.time=0,this.handler=Nn(this.onTimeout,this)};ee.prototype.onTimeout=function(it){it.id=0,it.time<=+new Date?it.f():setTimeout(it.handler,it.time-+new Date)},ee.prototype.set=function(it,st){this.f=st;var ct=+new Date+it;(!this.id||ct<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,it),this.time=ct)};function gn(it,st){for(var ct=0;ct<it.length;++ct)if(it[ct]==st)return ct;return-1}var $n=50,Yn={toString:function(){return"CodeMirror.Pass"}},nn={scroll:!1},Tn={origin:"*mouse"},Gn={origin:"+move"};function yi(it,st,ct){for(var ht=0,pt=0;;){var Nt=it.indexOf(" ",ht);Nt==-1&&(Nt=it.length);var Kt=Nt-ht;if(Nt==it.length||pt+Kt>=st)return ht+Math.min(Kt,st-pt);if(pt+=Nt-ht,pt+=ct-pt%ct,ht=Nt+1,pt>=st)return ht}}var Je=[""];function Le(it){for(;Je.length<=it;)Je.push(tn(Je)+" ");return Je[it]}function tn(it){return it[it.length-1]}function ti(it,st){for(var ct=[],ht=0;ht<it.length;ht++)ct[ht]=st(it[ht],ht);return ct}function jn(it,st,ct){for(var ht=0,pt=ct(st);ht<it.length&&ct(it[ht])<=pt;)ht++;it.splice(ht,0,st)}function Gt(){}function Ft(it,st){var ct;return Object.create?ct=Object.create(it):(Gt.prototype=it,ct=new Gt),st&&Kn(st,ct),ct}var mt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function vt(it){return/\w/.test(it)||it>"\x80"&&(it.toUpperCase()!=it.toLowerCase()||mt.test(it))}function Lt(it,st){return st?st.source.indexOf("\\w")>-1&&vt(it)?!0:st.test(it):vt(it)}function Ct(it){for(var st in it)if(it.hasOwnProperty(st)&&it[st])return!1;return!0}var _t=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Pe(it){return it.charCodeAt(0)>=768&&_t.test(it)}function ze(it,st,ct){for(;(ct<0?st>0:st<it.length)&&Pe(it.charAt(st));)st+=ct;return st}function wn(it,st,ct){for(var ht=st>ct?-1:1;;){if(st==ct)return st;var pt=(st+ct)/2,Nt=ht<0?Math.ceil(pt):Math.floor(pt);if(Nt==st)return it(Nt)?st:ct;it(Nt)?ct=Nt:st=Nt+ht}}function Ge(it,st,ct,ht){if(!it)return ht(st,ct,"ltr",0);for(var pt=!1,Nt=0;Nt<it.length;++Nt){var Kt=it[Nt];(Kt.from<ct&&Kt.to>st||st==ct&&Kt.to==st)&&(ht(Math.max(Kt.from,st),Math.min(Kt.to,ct),Kt.level==1?"rtl":"ltr",Nt),pt=!0)}pt||ht(st,ct,"ltr")}var Te=null;function Ze(it,st,ct){var ht;Te=null;for(var pt=0;pt<it.length;++pt){var Nt=it[pt];if(Nt.from<st&&Nt.to>st)return pt;Nt.to==st&&(Nt.from!=Nt.to&&ct=="before"?ht=pt:Te=pt),Nt.from==st&&(Nt.from!=Nt.to&&ct!="before"?ht=pt:Te=pt)}return ht!=null?ht:Te}var hn=function(){var it="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",st="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ct(ve){return ve<=247?it.charAt(ve):1424<=ve&&ve<=1524?"R":1536<=ve&&ve<=1785?st.charAt(ve-1536):1774<=ve&&ve<=2220?"r":8192<=ve&&ve<=8203?"w":ve==8204?"b":"L"}var ht=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,pt=/[stwN]/,Nt=/[LRr]/,Kt=/[Lb1n]/,$t=/[1n]/;function Jt(ve,$e,Be){this.level=ve,this.from=$e,this.to=Be}return function(ve,$e){var Be=$e=="ltr"?"L":"R";if(ve.length==0||$e=="ltr"&&!ht.test(ve))return!1;for(var Fn=ve.length,xn=[],vi=0;vi<Fn;++vi)xn.push(ct(ve.charCodeAt(vi)));for(var Ci=0,_i=Be;Ci<Fn;++Ci){var or=xn[Ci];or=="m"?xn[Ci]=_i:_i=or}for(var Ir=0,Sr=Be;Ir<Fn;++Ir){var _r=xn[Ir];_r=="1"&&Sr=="r"?xn[Ir]="n":Nt.test(_r)&&(Sr=_r,_r=="r"&&(xn[Ir]="R"))}for(var ho=1,wr=xn[0];ho<Fn-1;++ho){var ko=xn[ho];ko=="+"&&wr=="1"&&xn[ho+1]=="1"?xn[ho]="1":ko==","&&wr==xn[ho+1]&&(wr=="1"||wr=="n")&&(xn[ho]=wr),wr=ko}for(var Rs=0;Rs<Fn;++Rs){var Ea=xn[Rs];if(Ea==",")xn[Rs]="N";else if(Ea=="%"){var Xs=void 0;for(Xs=Rs+1;Xs<Fn&&xn[Xs]=="%";++Xs);for(var yl=Rs&&xn[Rs-1]=="!"||Xs<Fn&&xn[Xs]=="1"?"1":"N",Ua=Rs;Ua<Xs;++Ua)xn[Ua]=yl;Rs=Xs-1}}for(var Sa=0,ul=Be;Sa<Fn;++Sa){var _a=xn[Sa];ul=="L"&&_a=="1"?xn[Sa]="L":Nt.test(_a)&&(ul=_a)}for(var mr=0;mr<Fn;++mr)if(pt.test(xn[mr])){var Zo=void 0;for(Zo=mr+1;Zo<Fn&&pt.test(xn[Zo]);++Zo);for(var _s=(mr?xn[mr-1]:Be)=="L",Ts=(Zo<Fn?xn[Zo]:Be)=="L",Ka=_s==Ts?_s?"L":"R":Be,Jo=mr;Jo<Zo;++Jo)xn[Jo]=Ka;mr=Zo-1}for(var Po=[],wl,ia=0;ia<Fn;)if(Kt.test(xn[ia])){var XA=ia;for(++ia;ia<Fn&&Kt.test(xn[ia]);++ia);Po.push(new Jt(0,XA,ia))}else{var Yl=ia,Wa=Po.length,xl=$e=="rtl"?1:0;for(++ia;ia<Fn&&xn[ia]!="L";++ia);for(var Es=Yl;Es<ia;)if($t.test(xn[Es])){Yl<Es&&(Po.splice(Wa,0,new Jt(1,Yl,Es)),Wa+=xl);var La=Es;for(++Es;Es<ia&&$t.test(xn[Es]);++Es);Po.splice(Wa,0,new Jt(2,La,Es)),Wa+=xl,Yl=Es}else++Es;Yl<ia&&Po.splice(Wa,0,new Jt(1,Yl,ia))}return $e=="ltr"&&(Po[0].level==1&&(wl=ve.match(/^\s+/))&&(Po[0].from=wl[0].length,Po.unshift(new Jt(0,0,wl[0].length))),tn(Po).level==1&&(wl=ve.match(/\s+$/))&&(tn(Po).to-=wl[0].length,Po.push(new Jt(0,Fn-wl[0].length,Fn)))),$e=="rtl"?Po.reverse():Po}}();function In(it,st){var ct=it.order;return ct==null&&(ct=it.order=hn(it.text,st)),ct}var si=[],Dn=function(it,st,ct){if(it.addEventListener)it.addEventListener(st,ct,!1);else if(it.attachEvent)it.attachEvent("on"+st,ct);else{var ht=it._handlers||(it._handlers={});ht[st]=(ht[st]||si).concat(ct)}};function Oi(it,st){return it._handlers&&it._handlers[st]||si}function ai(it,st,ct){if(it.removeEventListener)it.removeEventListener(st,ct,!1);else if(it.detachEvent)it.detachEvent("on"+st,ct);else{var ht=it._handlers,pt=ht&&ht[st];if(pt){var Nt=gn(pt,ct);Nt>-1&&(ht[st]=pt.slice(0,Nt).concat(pt.slice(Nt+1)))}}}function Ai(it,st){var ct=Oi(it,st);if(ct.length)for(var ht=Array.prototype.slice.call(arguments,2),pt=0;pt<ct.length;++pt)ct[pt].apply(null,ht)}function pi(it,st,ct){return typeof st=="string"&&(st={type:st,preventDefault:function(){this.defaultPrevented=!0}}),Ai(it,ct||st.type,it,st),wi(st)||st.codemirrorIgnore}function ur(it){var st=it._handlers&&it._handlers.cursorActivity;if(st)for(var ct=it.curOp.cursorActivityHandlers||(it.curOp.cursorActivityHandlers=[]),ht=0;ht<st.length;++ht)gn(ct,st[ht])==-1&&ct.push(st[ht])}function Fi(it,st){return Oi(it,st).length>0}function zi(it){it.prototype.on=function(st,ct){Dn(this,st,ct)},it.prototype.off=function(st,ct){ai(this,st,ct)}}function Xi(it){it.preventDefault?it.preventDefault():it.returnValue=!1}function Lr(it){it.stopPropagation?it.stopPropagation():it.cancelBubble=!0}function wi(it){return it.defaultPrevented!=null?it.defaultPrevented:it.returnValue==!1}function Nr(it){Xi(it),Lr(it)}function Br(it){return it.target||it.srcElement}function jr(it){var st=it.which;return st==null&&(it.button&1?st=1:it.button&2?st=3:it.button&4&&(st=2)),At&&it.ctrlKey&&st==1&&(st=3),st}var Wi=function(){if(fe&&Rt<9)return!1;var it=te("div");return"draggable"in it||"dragDrop"in it}(),po;function mo(it){if(po==null){var st=te("span","\u200B");Wt(it,te("span",[st,document.createTextNode("x")])),it.firstChild.offsetHeight!=0&&(po=st.offsetWidth<=1&&st.offsetHeight>2&&!(fe&&Rt<8))}var ct=po?te("span","\u200B"):te("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ct.setAttribute("cm-text",""),ct}var no;function ir(it){if(no!=null)return no;var st=Wt(it,document.createTextNode("A\u062EA")),ct=pe(st,0,1).getBoundingClientRect(),ht=pe(st,1,2).getBoundingClientRect();return Zt(it),!ct||ct.left==ct.right?!1:no=ht.right-ct.right<3}var so=`
b`.split(/\n/).length!=3?function(it){for(var st=0,ct=[],ht=it.length;st<=ht;){var pt=it.indexOf(`
`,st);pt==-1&&(pt=it.length);var Nt=it.slice(st,it.charAt(pt-1)=="\r"?pt-1:pt),Kt=Nt.indexOf("\r");Kt!=-1?(ct.push(Nt.slice(0,Kt)),st+=Kt+1):(ct.push(Nt),st=pt+1)}return ct}:function(it){return it.split(/\r\n?|\n/)},Tt=window.getSelection?function(it){try{return it.selectionStart!=it.selectionEnd}catch(st){return!1}}:function(it){var st;try{st=it.ownerDocument.selection.createRange()}catch(ct){}return!st||st.parentElement()!=it?!1:st.compareEndPoints("StartToEnd",st)!=0},Pr=function(){var it=te("div");return"oncopy"in it?!0:(it.setAttribute("oncopy","return;"),typeof it.oncopy=="function")}(),Zi=null;function xi(it){if(Zi!=null)return Zi;var st=Wt(it,te("span","x")),ct=st.getBoundingClientRect(),ht=pe(st,0,1).getBoundingClientRect();return Zi=Math.abs(ct.left-ht.left)>1}var Hi={},ji={};function tr(it,st){arguments.length>2&&(st.dependencies=Array.prototype.slice.call(arguments,2)),Hi[it]=st}function qr(it,st){ji[it]=st}function un(it){if(typeof it=="string"&&ji.hasOwnProperty(it))it=ji[it];else if(it&&typeof it.name=="string"&&ji.hasOwnProperty(it.name)){var st=ji[it.name];typeof st=="string"&&(st={name:st}),it=Ft(st,it),it.name=st.name}else{if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(it))return un("application/xml");if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(it))return un("application/json")}return typeof it=="string"?{name:it}:it||{name:"null"}}function ln(it,st){st=un(st);var ct=Hi[st.name];if(!ct)return ln(it,"text/plain");var ht=ct(it,st);if(We.hasOwnProperty(st.name)){var pt=We[st.name];for(var Nt in pt)pt.hasOwnProperty(Nt)&&(ht.hasOwnProperty(Nt)&&(ht["_"+Nt]=ht[Nt]),ht[Nt]=pt[Nt])}if(ht.name=st.name,st.helperType&&(ht.helperType=st.helperType),st.modeProps)for(var Kt in st.modeProps)ht[Kt]=st.modeProps[Kt];return ht}var We={};function Sn(it,st){var ct=We.hasOwnProperty(it)?We[it]:We[it]={};Kn(st,ct)}function Ki(it,st){if(st===!0)return st;if(it.copyState)return it.copyState(st);var ct={};for(var ht in st){var pt=st[ht];pt instanceof Array&&(pt=pt.concat([])),ct[ht]=pt}return ct}function Li(it,st){for(var ct;it.innerMode&&(ct=it.innerMode(st),!(!ct||ct.mode==it));)st=ct.state,it=ct.mode;return ct||{mode:it,state:st}}function dr(it,st,ct){return it.startState?it.startState(st,ct):!0}var se=function(it,st,ct){this.pos=this.start=0,this.string=it,this.tabSize=st||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=ct};se.prototype.eol=function(){return this.pos>=this.string.length},se.prototype.sol=function(){return this.pos==this.lineStart},se.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},se.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},se.prototype.eat=function(it){var st=this.string.charAt(this.pos),ct;if(typeof it=="string"?ct=st==it:ct=st&&(it.test?it.test(st):it(st)),ct)return++this.pos,st},se.prototype.eatWhile=function(it){for(var st=this.pos;this.eat(it););return this.pos>st},se.prototype.eatSpace=function(){for(var it=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>it},se.prototype.skipToEnd=function(){this.pos=this.string.length},se.prototype.skipTo=function(it){var st=this.string.indexOf(it,this.pos);if(st>-1)return this.pos=st,!0},se.prototype.backUp=function(it){this.pos-=it},se.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=me(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?me(this.string,this.lineStart,this.tabSize):0)},se.prototype.indentation=function(){return me(this.string,null,this.tabSize)-(this.lineStart?me(this.string,this.lineStart,this.tabSize):0)},se.prototype.match=function(it,st,ct){if(typeof it=="string"){var ht=function(Kt){return ct?Kt.toLowerCase():Kt},pt=this.string.substr(this.pos,it.length);if(ht(pt)==ht(it))return st!==!1&&(this.pos+=it.length),!0}else{var Nt=this.string.slice(this.pos).match(it);return Nt&&Nt.index>0?null:(Nt&&st!==!1&&(this.pos+=Nt[0].length),Nt)}},se.prototype.current=function(){return this.string.slice(this.start,this.pos)},se.prototype.hideFirstChars=function(it,st){this.lineStart+=it;try{return st()}finally{this.lineStart-=it}},se.prototype.lookAhead=function(it){var st=this.lineOracle;return st&&st.lookAhead(it)},se.prototype.baseToken=function(){var it=this.lineOracle;return it&&it.baseToken(this.pos)};function Mn(it,st){if(st-=it.first,st<0||st>=it.size)throw new Error("There is no line "+(st+it.first)+" in the document.");for(var ct=it;!ct.lines;)for(var ht=0;;++ht){var pt=ct.children[ht],Nt=pt.chunkSize();if(st<Nt){ct=pt;break}st-=Nt}return ct.lines[st]}function Di(it,st,ct){var ht=[],pt=st.line;return it.iter(st.line,ct.line+1,function(Nt){var Kt=Nt.text;pt==ct.line&&(Kt=Kt.slice(0,ct.ch)),pt==st.line&&(Kt=Kt.slice(st.ch)),ht.push(Kt),++pt}),ht}function pr(it,st,ct){var ht=[];return it.iter(st,ct,function(pt){ht.push(pt.text)}),ht}function Vn(it,st){var ct=st-it.height;if(ct)for(var ht=it;ht;ht=ht.parent)ht.height+=ct}function le(it){if(it.parent==null)return null;for(var st=it.parent,ct=gn(st.lines,it),ht=st.parent;ht;st=ht,ht=ht.parent)for(var pt=0;ht.children[pt]!=st;++pt)ct+=ht.children[pt].chunkSize();return ct+st.first}function De(it,st){var ct=it.first;t:do{for(var ht=0;ht<it.children.length;++ht){var pt=it.children[ht],Nt=pt.height;if(st<Nt){it=pt;continue t}st-=Nt,ct+=pt.chunkSize()}return ct}while(!it.lines);for(var Kt=0;Kt<it.lines.length;++Kt){var $t=it.lines[Kt],Jt=$t.height;if(st<Jt)break;st-=Jt}return ct+Kt}function Xn(it,st){return st>=it.first&&st<it.first+it.size}function On(it,st){return String(it.lineNumberFormatter(st+it.firstLineNumber))}function qe(it,st,ct){if(ct===void 0&&(ct=null),!(this instanceof qe))return new qe(it,st,ct);this.line=it,this.ch=st,this.sticky=ct}function ei(it,st){return it.line-st.line||it.ch-st.ch}function fi(it,st){return it.sticky==st.sticky&&ei(it,st)==0}function ki(it){return qe(it.line,it.ch)}function Vi(it,st){return ei(it,st)<0?st:it}function rn(it,st){return ei(it,st)<0?it:st}function Ve(it,st){return Math.max(it.first,Math.min(st,it.first+it.size-1))}function fn(it,st){if(st.line<it.first)return qe(it.first,0);var ct=it.first+it.size-1;return st.line>ct?qe(ct,Mn(it,ct).text.length):mi(st,Mn(it,st.line).text.length)}function mi(it,st){var ct=it.ch;return ct==null||ct>st?qe(it.line,st):ct<0?qe(it.line,0):it}function Pi(it,st){for(var ct=[],ht=0;ht<st.length;ht++)ct[ht]=fn(it,st[ht]);return ct}var Pn=function(it,st){this.state=it,this.lookAhead=st},ni=function(it,st,ct,ht){this.state=st,this.doc=it,this.line=ct,this.maxLookAhead=ht||0,this.baseTokens=null,this.baseTokenPos=1};ni.prototype.lookAhead=function(it){var st=this.doc.getLine(this.line+it);return st!=null&&it>this.maxLookAhead&&(this.maxLookAhead=it),st},ni.prototype.baseToken=function(it){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=it;)this.baseTokenPos+=2;var st=this.baseTokens[this.baseTokenPos+1];return{type:st&&st.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-it}},ni.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ni.fromSaved=function(it,st,ct){return st instanceof Pn?new ni(it,Ki(it.mode,st.state),ct,st.lookAhead):new ni(it,Ki(it.mode,st),ct)},ni.prototype.save=function(it){var st=it!==!1?Ki(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Pn(st,this.maxLookAhead):st};function Gi(it,st,ct,ht){var pt=[it.state.modeGen],Nt={};Ri(it,st.text,it.doc.mode,ct,function(ve,$e){return pt.push(ve,$e)},Nt,ht);for(var Kt=ct.state,$t=function(ve){ct.baseTokens=pt;var $e=it.state.overlays[ve],Be=1,Fn=0;ct.state=!0,Ri(it,st.text,$e.mode,ct,function(xn,vi){for(var Ci=Be;Fn<xn;){var _i=pt[Be];_i>xn&&pt.splice(Be,1,xn,pt[Be+1],_i),Be+=2,Fn=Math.min(xn,_i)}if(vi)if($e.opaque)pt.splice(Ci,Be-Ci,xn,"overlay "+vi),Be=Ci+2;else for(;Ci<Be;Ci+=2){var or=pt[Ci+1];pt[Ci+1]=(or?or+" ":"")+"overlay "+vi}},Nt),ct.state=Kt,ct.baseTokens=null,ct.baseTokenPos=1},Jt=0;Jt<it.state.overlays.length;++Jt)$t(Jt);return{styles:pt,classes:Nt.bgClass||Nt.textClass?Nt:null}}function er(it,st,ct){if(!st.styles||st.styles[0]!=it.state.modeGen){var ht=Or(it,le(st)),pt=st.text.length>it.options.maxHighlightLength&&Ki(it.doc.mode,ht.state),Nt=Gi(it,st,ht);pt&&(ht.state=pt),st.stateAfter=ht.save(!pt),st.styles=Nt.styles,Nt.classes?st.styleClasses=Nt.classes:st.styleClasses&&(st.styleClasses=null),ct===it.doc.highlightFrontier&&(it.doc.modeFrontier=Math.max(it.doc.modeFrontier,++it.doc.highlightFrontier))}return st.styles}function Or(it,st,ct){var ht=it.doc,pt=it.display;if(!ht.mode.startState)return new ni(ht,!0,st);var Nt=qi(it,st,ct),Kt=Nt>ht.first&&Mn(ht,Nt-1).stateAfter,$t=Kt?ni.fromSaved(ht,Kt,Nt):new ni(ht,dr(ht.mode),Nt);return ht.iter(Nt,st,function(Jt){Oe(it,Jt.text,$t);var ve=$t.line;Jt.stateAfter=ve==st-1||ve%5==0||ve>=pt.viewFrom&&ve<pt.viewTo?$t.save():null,$t.nextLine()}),ct&&(ht.modeFrontier=$t.line),$t}function Oe(it,st,ct,ht){var pt=it.doc.mode,Nt=new se(st,it.options.tabSize,ct);for(Nt.start=Nt.pos=ht||0,st==""&&Ui(pt,ct.state);!Nt.eol();)hr(pt,Nt,ct.state),Nt.start=Nt.pos}function Ui(it,st){if(it.blankLine)return it.blankLine(st);if(it.innerMode){var ct=Li(it,st);if(ct.mode.blankLine)return ct.mode.blankLine(ct.state)}}function hr(it,st,ct,ht){for(var pt=0;pt<10;pt++){ht&&(ht[0]=Li(it,ct).mode);var Nt=it.token(st,ct);if(st.pos>st.start)return Nt}throw new Error("Mode "+it.name+" failed to advance stream.")}var Si=function(it,st,ct){this.start=it.start,this.end=it.pos,this.string=it.current(),this.type=st||null,this.state=ct};function Qr(it,st,ct,ht){var pt=it.doc,Nt=pt.mode,Kt;st=fn(pt,st);var $t=Mn(pt,st.line),Jt=Or(it,st.line,ct),ve=new se($t.text,it.options.tabSize,Jt),$e;for(ht&&($e=[]);(ht||ve.pos<st.ch)&&!ve.eol();)ve.start=ve.pos,Kt=hr(Nt,ve,Jt.state),ht&&$e.push(new Si(ve,Kt,Ki(pt.mode,Jt.state)));return ht?$e:new Si(ve,Kt,Jt.state)}function xr(it,st){if(it)for(;;){var ct=it.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!ct)break;it=it.slice(0,ct.index)+it.slice(ct.index+ct[0].length);var ht=ct[1]?"bgClass":"textClass";st[ht]==null?st[ht]=ct[2]:new RegExp("(?:^|\\s)"+ct[2]+"(?:$|\\s)").test(st[ht])||(st[ht]+=" "+ct[2])}return it}function Ri(it,st,ct,ht,pt,Nt,Kt){var $t=ct.flattenSpans;$t==null&&($t=it.options.flattenSpans);var Jt=0,ve=null,$e=new se(st,it.options.tabSize,ht),Be,Fn=it.options.addModeClass&&[null];for(st==""&&xr(Ui(ct,ht.state),Nt);!$e.eol();){if($e.pos>it.options.maxHighlightLength?($t=!1,Kt&&Oe(it,st,ht,$e.pos),$e.pos=st.length,Be=null):Be=xr(hr(ct,$e,ht.state,Fn),Nt),Fn){var xn=Fn[0].name;xn&&(Be="m-"+(Be?xn+" "+Be:xn))}if(!$t||ve!=Be){for(;Jt<$e.start;)Jt=Math.min($e.start,Jt+5e3),pt(Jt,ve);ve=Be}$e.start=$e.pos}for(;Jt<$e.pos;){var vi=Math.min($e.pos,Jt+5e3);pt(vi,ve),Jt=vi}}function qi(it,st,ct){for(var ht,pt,Nt=it.doc,Kt=ct?-1:st-(it.doc.mode.innerMode?1e3:100),$t=st;$t>Kt;--$t){if($t<=Nt.first)return Nt.first;var Jt=Mn(Nt,$t-1),ve=Jt.stateAfter;if(ve&&(!ct||$t+(ve instanceof Pn?ve.lookAhead:0)<=Nt.modeFrontier))return $t;var $e=me(Jt.text,null,it.options.tabSize);(pt==null||ht>$e)&&(pt=$t-1,ht=$e)}return pt}function re(it,st){if(it.modeFrontier=Math.min(it.modeFrontier,st),!(it.highlightFrontier<st-10)){for(var ct=it.first,ht=st-1;ht>ct;ht--){var pt=Mn(it,ht).stateAfter;if(pt&&(!(pt instanceof Pn)||ht+pt.lookAhead<st)){ct=ht+1;break}}it.highlightFrontier=Math.min(it.highlightFrontier,ct)}}var he=!1,ne=!1;function Xe(){he=!0}function Fe(){ne=!0}function an(it,st,ct){this.marker=it,this.from=st,this.to=ct}function Jn(it,st){if(it)for(var ct=0;ct<it.length;++ct){var ht=it[ct];if(ht.marker==st)return ht}}function ii(it,st){for(var ct,ht=0;ht<it.length;++ht)it[ht]!=st&&(ct||(ct=[])).push(it[ht]);return ct}function Mi(it,st){it.markedSpans=it.markedSpans?it.markedSpans.concat([st]):[st],st.marker.attachLine(it)}function hi(it,st,ct){var ht;if(it)for(var pt=0;pt<it.length;++pt){var Nt=it[pt],Kt=Nt.marker,$t=Nt.from==null||(Kt.inclusiveLeft?Nt.from<=st:Nt.from<st);if($t||Nt.from==st&&Kt.type=="bookmark"&&(!ct||!Nt.marker.insertLeft)){var Jt=Nt.to==null||(Kt.inclusiveRight?Nt.to>=st:Nt.to>st);(ht||(ht=[])).push(new an(Kt,Nt.from,Jt?null:Nt.to))}}return ht}function Zn(it,st,ct){var ht;if(it)for(var pt=0;pt<it.length;++pt){var Nt=it[pt],Kt=Nt.marker,$t=Nt.to==null||(Kt.inclusiveRight?Nt.to>=st:Nt.to>st);if($t||Nt.from==st&&Kt.type=="bookmark"&&(!ct||Nt.marker.insertLeft)){var Jt=Nt.from==null||(Kt.inclusiveLeft?Nt.from<=st:Nt.from<st);(ht||(ht=[])).push(new an(Kt,Jt?null:Nt.from-st,Nt.to==null?null:Nt.to-st))}}return ht}function ci(it,st){if(st.full)return null;var ct=Xn(it,st.from.line)&&Mn(it,st.from.line).markedSpans,ht=Xn(it,st.to.line)&&Mn(it,st.to.line).markedSpans;if(!ct&&!ht)return null;var pt=st.from.ch,Nt=st.to.ch,Kt=ei(st.from,st.to)==0,$t=hi(ct,pt,Kt),Jt=Zn(ht,Nt,Kt),ve=st.text.length==1,$e=tn(st.text).length+(ve?pt:0);if($t)for(var Be=0;Be<$t.length;++Be){var Fn=$t[Be];if(Fn.to==null){var xn=Jn(Jt,Fn.marker);xn?ve&&(Fn.to=xn.to==null?null:xn.to+$e):Fn.to=pt}}if(Jt)for(var vi=0;vi<Jt.length;++vi){var Ci=Jt[vi];if(Ci.to!=null&&(Ci.to+=$e),Ci.from==null){var _i=Jn($t,Ci.marker);_i||(Ci.from=$e,ve&&($t||($t=[])).push(Ci))}else Ci.from+=$e,ve&&($t||($t=[])).push(Ci)}$t&&($t=ke($t)),Jt&&Jt!=$t&&(Jt=ke(Jt));var or=[$t];if(!ve){var Ir=st.text.length-2,Sr;if(Ir>0&&$t)for(var _r=0;_r<$t.length;++_r)$t[_r].to==null&&(Sr||(Sr=[])).push(new an($t[_r].marker,null,null));for(var ho=0;ho<Ir;++ho)or.push(Sr);or.push(Jt)}return or}function ke(it){for(var st=0;st<it.length;++st){var ct=it[st];ct.from!=null&&ct.from==ct.to&&ct.marker.clearWhenEmpty!==!1&&it.splice(st--,1)}return it.length?it:null}function An(it,st,ct){var ht=null;if(it.iter(st.line,ct.line+1,function(xn){if(xn.markedSpans)for(var vi=0;vi<xn.markedSpans.length;++vi){var Ci=xn.markedSpans[vi].marker;Ci.readOnly&&(!ht||gn(ht,Ci)==-1)&&(ht||(ht=[])).push(Ci)}}),!ht)return null;for(var pt=[{from:st,to:ct}],Nt=0;Nt<ht.length;++Nt)for(var Kt=ht[Nt],$t=Kt.find(0),Jt=0;Jt<pt.length;++Jt){var ve=pt[Jt];if(!(ei(ve.to,$t.from)<0||ei(ve.from,$t.to)>0)){var $e=[Jt,1],Be=ei(ve.from,$t.from),Fn=ei(ve.to,$t.to);(Be<0||!Kt.inclusiveLeft&&!Be)&&$e.push({from:ve.from,to:$t.from}),(Fn>0||!Kt.inclusiveRight&&!Fn)&&$e.push({from:$t.to,to:ve.to}),pt.splice.apply(pt,$e),Jt+=$e.length-3}}return pt}function be(it){var st=it.markedSpans;if(st){for(var ct=0;ct<st.length;++ct)st[ct].marker.detachLine(it);it.markedSpans=null}}function Qt(it,st){if(st){for(var ct=0;ct<st.length;++ct)st[ct].marker.attachLine(it);it.markedSpans=st}}function ye(it){return it.inclusiveLeft?-1:0}function _n(it){return it.inclusiveRight?1:0}function li(it,st){var ct=it.lines.length-st.lines.length;if(ct!=0)return ct;var ht=it.find(),pt=st.find(),Nt=ei(ht.from,pt.from)||ye(it)-ye(st);if(Nt)return-Nt;var Kt=ei(ht.to,pt.to)||_n(it)-_n(st);return Kt||st.id-it.id}function Wn(it,st){var ct=ne&&it.markedSpans,ht;if(ct)for(var pt=void 0,Nt=0;Nt<ct.length;++Nt)pt=ct[Nt],pt.marker.collapsed&&(st?pt.from:pt.to)==null&&(!ht||li(ht,pt.marker)<0)&&(ht=pt.marker);return ht}function Hn(it){return Wn(it,!0)}function cn(it){return Wn(it,!1)}function kn(it,st){var ct=ne&&it.markedSpans,ht;if(ct)for(var pt=0;pt<ct.length;++pt){var Nt=ct[pt];Nt.marker.collapsed&&(Nt.from==null||Nt.from<st)&&(Nt.to==null||Nt.to>st)&&(!ht||li(ht,Nt.marker)<0)&&(ht=Nt.marker)}return ht}function Ln(it,st,ct,ht,pt){var Nt=Mn(it,st),Kt=ne&&Nt.markedSpans;if(Kt)for(var $t=0;$t<Kt.length;++$t){var Jt=Kt[$t];if(Jt.marker.collapsed){var ve=Jt.marker.find(0),$e=ei(ve.from,ct)||ye(Jt.marker)-ye(pt),Be=ei(ve.to,ht)||_n(Jt.marker)-_n(pt);if(!($e>=0&&Be<=0||$e<=0&&Be>=0)&&($e<=0&&(Jt.marker.inclusiveRight&&pt.inclusiveLeft?ei(ve.to,ct)>=0:ei(ve.to,ct)>0)||$e>=0&&(Jt.marker.inclusiveRight&&pt.inclusiveLeft?ei(ve.from,ht)<=0:ei(ve.from,ht)<0)))return!0}}}function Qe(it){for(var st;st=Hn(it);)it=st.find(-1,!0).line;return it}function sn(it){for(var st;st=cn(it);)it=st.find(1,!0).line;return it}function vn(it){for(var st,ct;st=cn(it);)it=st.find(1,!0).line,(ct||(ct=[])).push(it);return ct}function Cn(it,st){var ct=Mn(it,st),ht=Qe(ct);return ct==ht?st:le(ht)}function zn(it,st){if(st>it.lastLine())return st;var ct=Mn(it,st),ht;if(!on(it,ct))return st;for(;ht=cn(ct);)ct=ht.find(1,!0).line;return le(ct)+1}function on(it,st){var ct=ne&&st.markedSpans;if(ct){for(var ht=void 0,pt=0;pt<ct.length;++pt)if(ht=ct[pt],!!ht.marker.collapsed){if(ht.from==null)return!0;if(!ht.marker.widgetNode&&ht.from==0&&ht.marker.inclusiveLeft&&Ei(it,st,ht))return!0}}}function Ei(it,st,ct){if(ct.to==null){var ht=ct.marker.find(1,!0);return Ei(it,ht.line,Jn(ht.line.markedSpans,ct.marker))}if(ct.marker.inclusiveRight&&ct.to==st.text.length)return!0;for(var pt=void 0,Nt=0;Nt<st.markedSpans.length;++Nt)if(pt=st.markedSpans[Nt],pt.marker.collapsed&&!pt.marker.widgetNode&&pt.from==ct.to&&(pt.to==null||pt.to!=ct.from)&&(pt.marker.inclusiveLeft||ct.marker.inclusiveRight)&&Ei(it,st,pt))return!0}function Ii(it){it=Qe(it);for(var st=0,ct=it.parent,ht=0;ht<ct.lines.length;++ht){var pt=ct.lines[ht];if(pt==it)break;st+=pt.height}for(var Nt=ct.parent;Nt;ct=Nt,Nt=ct.parent)for(var Kt=0;Kt<Nt.children.length;++Kt){var $t=Nt.children[Kt];if($t==ct)break;st+=$t.height}return st}function nr(it){if(it.height==0)return 0;for(var st=it.text.length,ct,ht=it;ct=Hn(ht);){var pt=ct.find(0,!0);ht=pt.from.line,st+=pt.from.ch-pt.to.ch}for(ht=it;ct=cn(ht);){var Nt=ct.find(0,!0);st-=ht.text.length-Nt.from.ch,ht=Nt.to.line,st+=ht.text.length-Nt.to.ch}return st}function Ni(it){var st=it.display,ct=it.doc;st.maxLine=Mn(ct,ct.first),st.maxLineLength=nr(st.maxLine),st.maxLineChanged=!0,ct.iter(function(ht){var pt=nr(ht);pt>st.maxLineLength&&(st.maxLineLength=pt,st.maxLine=ht)})}var Mr=function(it,st,ct){this.text=it,Qt(this,st),this.height=ct?ct(this):1};Mr.prototype.lineNo=function(){return le(this)},zi(Mr);function yr(it,st,ct,ht){it.text=st,it.stateAfter&&(it.stateAfter=null),it.styles&&(it.styles=null),it.order!=null&&(it.order=null),be(it),Qt(it,ct);var pt=ht?ht(it):1;pt!=it.height&&Vn(it,pt)}function Zr(it){it.parent=null,be(it)}var Dr={},Gr={};function $r(it,st){if(!it||/^\s*$/.test(it))return null;var ct=st.addModeClass?Gr:Dr;return ct[it]||(ct[it]=it.replace(/\S+/g,"cm-$&"))}function Ue(it,st){var ct=we("span",null,null,ie?"padding-right: .1px":null),ht={pre:we("pre",[ct],"CodeMirror-line"),content:ct,col:0,pos:0,cm:it,trailingSpace:!1,splitSpaces:it.getOption("lineWrapping")};st.measure={};for(var pt=0;pt<=(st.rest?st.rest.length:0);pt++){var Nt=pt?st.rest[pt-1]:st.line,Kt=void 0;ht.pos=0,ht.addToken=Er,ir(it.display.measure)&&(Kt=In(Nt,it.doc.direction))&&(ht.addToken=$i(ht.addToken,Kt)),ht.map=[];var $t=st!=it.display.externalMeasured&&le(Nt);ro(Nt,ht,er(it,Nt,$t)),Nt.styleClasses&&(Nt.styleClasses.bgClass&&(ht.bgClass=dn(Nt.styleClasses.bgClass,ht.bgClass||"")),Nt.styleClasses.textClass&&(ht.textClass=dn(Nt.styleClasses.textClass,ht.textClass||""))),ht.map.length==0&&ht.map.push(0,0,ht.content.appendChild(mo(it.display.measure))),pt==0?(st.measure.map=ht.map,st.measure.cache={}):((st.measure.maps||(st.measure.maps=[])).push(ht.map),(st.measure.caches||(st.measure.caches=[])).push({}))}if(ie){var Jt=ht.content.lastChild;(/\bcm-tab\b/.test(Jt.className)||Jt.querySelector&&Jt.querySelector(".cm-tab"))&&(ht.content.className="cm-tab-wrap-hack")}return Ai(it,"renderLine",it,st.line,ht.pre),ht.pre.className&&(ht.textClass=dn(ht.pre.className,ht.textClass||"")),ht}function Fr(it){var st=te("span","\u2022","cm-invalidchar");return st.title="\\u"+it.charCodeAt(0).toString(16),st.setAttribute("aria-label",st.title),st}function Er(it,st,ct,ht,pt,Nt,Kt){if(st){var $t=it.splitSpaces?fr(st,it.trailingSpace):st,Jt=it.cm.state.specialChars,ve=!1,$e;if(!Jt.test(st))it.col+=st.length,$e=document.createTextNode($t),it.map.push(it.pos,it.pos+st.length,$e),fe&&Rt<9&&(ve=!0),it.pos+=st.length;else{$e=document.createDocumentFragment();for(var Be=0;;){Jt.lastIndex=Be;var Fn=Jt.exec(st),xn=Fn?Fn.index-Be:st.length-Be;if(xn){var vi=document.createTextNode($t.slice(Be,Be+xn));fe&&Rt<9?$e.appendChild(te("span",[vi])):$e.appendChild(vi),it.map.push(it.pos,it.pos+xn,vi),it.col+=xn,it.pos+=xn}if(!Fn)break;Be+=xn+1;var Ci=void 0;if(Fn[0]==" "){var _i=it.cm.options.tabSize,or=_i-it.col%_i;Ci=$e.appendChild(te("span",Le(or),"cm-tab")),Ci.setAttribute("role","presentation"),Ci.setAttribute("cm-text"," "),it.col+=or}else Fn[0]=="\r"||Fn[0]==`
`?(Ci=$e.appendChild(te("span",Fn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ci.setAttribute("cm-text",Fn[0]),it.col+=1):(Ci=it.cm.options.specialCharPlaceholder(Fn[0]),Ci.setAttribute("cm-text",Fn[0]),fe&&Rt<9?$e.appendChild(te("span",[Ci])):$e.appendChild(Ci),it.col+=1);it.map.push(it.pos,it.pos+1,Ci),it.pos++}}if(it.trailingSpace=$t.charCodeAt(st.length-1)==32,ct||ht||pt||ve||Nt||Kt){var Ir=ct||"";ht&&(Ir+=ht),pt&&(Ir+=pt);var Sr=te("span",[$e],Ir,Nt);if(Kt)for(var _r in Kt)Kt.hasOwnProperty(_r)&&_r!="style"&&_r!="class"&&Sr.setAttribute(_r,Kt[_r]);return it.content.appendChild(Sr)}it.content.appendChild($e)}}function fr(it,st){if(it.length>1&&!/ /.test(it))return it;for(var ct=st,ht="",pt=0;pt<it.length;pt++){var Nt=it.charAt(pt);Nt==" "&&ct&&(pt==it.length-1||it.charCodeAt(pt+1)==32)&&(Nt="\xA0"),ht+=Nt,ct=Nt==" "}return ht}function $i(it,st){return function(ct,ht,pt,Nt,Kt,$t,Jt){pt=pt?pt+" cm-force-border":"cm-force-border";for(var ve=ct.pos,$e=ve+ht.length;;){for(var Be=void 0,Fn=0;Fn<st.length&&(Be=st[Fn],!(Be.to>ve&&Be.from<=ve));Fn++);if(Be.to>=$e)return it(ct,ht,pt,Nt,Kt,$t,Jt);it(ct,ht.slice(0,Be.to-ve),pt,Nt,null,$t,Jt),Nt=null,ht=ht.slice(Be.to-ve),ve=Be.to}}}function Rr(it,st,ct,ht){var pt=!ht&&ct.widgetNode;pt&&it.map.push(it.pos,it.pos+st,pt),!ht&&it.cm.display.input.needsContentAttribute&&(pt||(pt=it.content.appendChild(document.createElement("span"))),pt.setAttribute("cm-marker",ct.id)),pt&&(it.cm.display.input.setUneditable(pt),it.content.appendChild(pt)),it.pos+=st,it.trailingSpace=!1}function ro(it,st,ct){var ht=it.markedSpans,pt=it.text,Nt=0;if(!ht){for(var Kt=1;Kt<ct.length;Kt+=2)st.addToken(st,pt.slice(Nt,Nt=ct[Kt]),$r(ct[Kt+1],st.cm.options));return}for(var $t=pt.length,Jt=0,ve=1,$e="",Be,Fn,xn=0,vi,Ci,_i,or,Ir;;){if(xn==Jt){vi=Ci=_i=Fn="",Ir=null,or=null,xn=1/0;for(var Sr=[],_r=void 0,ho=0;ho<ht.length;++ho){var wr=ht[ho],ko=wr.marker;if(ko.type=="bookmark"&&wr.from==Jt&&ko.widgetNode)Sr.push(ko);else if(wr.from<=Jt&&(wr.to==null||wr.to>Jt||ko.collapsed&&wr.to==Jt&&wr.from==Jt)){if(wr.to!=null&&wr.to!=Jt&&xn>wr.to&&(xn=wr.to,Ci=""),ko.className&&(vi+=" "+ko.className),ko.css&&(Fn=(Fn?Fn+";":"")+ko.css),ko.startStyle&&wr.from==Jt&&(_i+=" "+ko.startStyle),ko.endStyle&&wr.to==xn&&(_r||(_r=[])).push(ko.endStyle,wr.to),ko.title&&((Ir||(Ir={})).title=ko.title),ko.attributes)for(var Rs in ko.attributes)(Ir||(Ir={}))[Rs]=ko.attributes[Rs];ko.collapsed&&(!or||li(or.marker,ko)<0)&&(or=wr)}else wr.from>Jt&&xn>wr.from&&(xn=wr.from)}if(_r)for(var Ea=0;Ea<_r.length;Ea+=2)_r[Ea+1]==xn&&(Ci+=" "+_r[Ea]);if(!or||or.from==Jt)for(var Xs=0;Xs<Sr.length;++Xs)Rr(st,0,Sr[Xs]);if(or&&(or.from||0)==Jt){if(Rr(st,(or.to==null?$t+1:or.to)-Jt,or.marker,or.from==null),or.to==null)return;or.to==Jt&&(or=!1)}}if(Jt>=$t)break;for(var yl=Math.min($t,xn);;){if($e){var Ua=Jt+$e.length;if(!or){var Sa=Ua>yl?$e.slice(0,yl-Jt):$e;st.addToken(st,Sa,Be?Be+vi:vi,_i,Jt+Sa.length==xn?Ci:"",Fn,Ir)}if(Ua>=yl){$e=$e.slice(yl-Jt),Jt=yl;break}Jt=Ua,_i=""}$e=pt.slice(Nt,Nt=ct[ve++]),Be=$r(ct[ve++],st.cm.options)}}}function eo(it,st,ct){this.line=st,this.rest=vn(st),this.size=this.rest?le(tn(this.rest))-ct+1:1,this.node=this.text=null,this.hidden=on(it,st)}function kr(it,st,ct){for(var ht=[],pt,Nt=st;Nt<ct;Nt=pt){var Kt=new eo(it.doc,Mn(it.doc,Nt),Nt);pt=Nt+Kt.size,ht.push(Kt)}return ht}var Ao=null;function $o(it){Ao?Ao.ops.push(it):it.ownsGroup=Ao={ops:[it],delayedCallbacks:[]}}function Zs(it){var st=it.delayedCallbacks,ct=0;do{for(;ct<st.length;ct++)st[ct].call(null);for(var ht=0;ht<it.ops.length;ht++){var pt=it.ops[ht];if(pt.cursorActivityHandlers)for(;pt.cursorActivityCalled<pt.cursorActivityHandlers.length;)pt.cursorActivityHandlers[pt.cursorActivityCalled++].call(null,pt.cm)}}while(ct<st.length)}function ka(it,st){var ct=it.ownsGroup;if(ct)try{Zs(ct)}finally{Ao=null,st(ct)}}var zs=null;function sr(it,st){var ct=Oi(it,st);if(ct.length){var ht=Array.prototype.slice.call(arguments,2),pt;Ao?pt=Ao.delayedCallbacks:zs?pt=zs:(pt=zs=[],setTimeout(os,0));for(var Nt=function($t){pt.push(function(){return ct[$t].apply(null,ht)})},Kt=0;Kt<ct.length;++Kt)Nt(Kt)}}function os(){var it=zs;zs=null;for(var st=0;st<it.length;++st)it[st]()}function ns(it,st,ct,ht){for(var pt=0;pt<st.changes.length;pt++){var Nt=st.changes[pt];Nt=="text"?di(it,st):Nt=="gutter"?br(it,st,ct,ht):Nt=="class"?Ar(it,st):Nt=="widget"&&Xr(it,st,ht)}st.changes=null}function js(it){return it.node==it.text&&(it.node=te("div",null,null,"position: relative"),it.text.parentNode&&it.text.parentNode.replaceChild(it.node,it.text),it.node.appendChild(it.text),fe&&Rt<8&&(it.node.style.zIndex=2)),it.node}function us(it,st){var ct=st.bgClass?st.bgClass+" "+(st.line.bgClass||""):st.line.bgClass;if(ct&&(ct+=" CodeMirror-linebackground"),st.background)ct?st.background.className=ct:(st.background.parentNode.removeChild(st.background),st.background=null);else if(ct){var ht=js(st);st.background=ht.insertBefore(te("div",null,ct),ht.firstChild),it.display.input.setUneditable(st.background)}}function ys(it,st){var ct=it.display.externalMeasured;return ct&&ct.line==st.line?(it.display.externalMeasured=null,st.measure=ct.measure,ct.built):Ue(it,st)}function di(it,st){var ct=st.text.className,ht=ys(it,st);st.text==st.node&&(st.node=ht.pre),st.text.parentNode.replaceChild(ht.pre,st.text),st.text=ht.pre,ht.bgClass!=st.bgClass||ht.textClass!=st.textClass?(st.bgClass=ht.bgClass,st.textClass=ht.textClass,Ar(it,st)):ct&&(st.text.className=ct)}function Ar(it,st){us(it,st),st.line.wrapClass?js(st).className=st.line.wrapClass:st.node!=st.text&&(st.node.className="");var ct=st.textClass?st.textClass+" "+(st.line.textClass||""):st.line.textClass;st.text.className=ct||""}function br(it,st,ct,ht){if(st.gutter&&(st.node.removeChild(st.gutter),st.gutter=null),st.gutterBackground&&(st.node.removeChild(st.gutterBackground),st.gutterBackground=null),st.line.gutterClass){var pt=js(st);st.gutterBackground=te("div",null,"CodeMirror-gutter-background "+st.line.gutterClass,"left: "+(it.options.fixedGutter?ht.fixedPos:-ht.gutterTotalWidth)+"px; width: "+ht.gutterTotalWidth+"px"),it.display.input.setUneditable(st.gutterBackground),pt.insertBefore(st.gutterBackground,st.text)}var Nt=st.line.gutterMarkers;if(it.options.lineNumbers||Nt){var Kt=js(st),$t=st.gutter=te("div",null,"CodeMirror-gutter-wrapper","left: "+(it.options.fixedGutter?ht.fixedPos:-ht.gutterTotalWidth)+"px");if(it.display.input.setUneditable($t),Kt.insertBefore($t,st.text),st.line.gutterClass&&($t.className+=" "+st.line.gutterClass),it.options.lineNumbers&&(!Nt||!Nt["CodeMirror-linenumbers"])&&(st.lineNumber=$t.appendChild(te("div",On(it.options,ct),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+ht.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+it.display.lineNumInnerWidth+"px"))),Nt)for(var Jt=0;Jt<it.display.gutterSpecs.length;++Jt){var ve=it.display.gutterSpecs[Jt].className,$e=Nt.hasOwnProperty(ve)&&Nt[ve];$e&&$t.appendChild(te("div",[$e],"CodeMirror-gutter-elt","left: "+ht.gutterLeft[ve]+"px; width: "+ht.gutterWidth[ve]+"px"))}}}function Xr(it,st,ct){st.alignable&&(st.alignable=null);for(var ht=Ht("CodeMirror-linewidget"),pt=st.node.firstChild,Nt=void 0;pt;pt=Nt)Nt=pt.nextSibling,ht.test(pt.className)&&st.node.removeChild(pt);yo(it,st,ct)}function io(it,st,ct,ht){var pt=ys(it,st);return st.text=st.node=pt.pre,pt.bgClass&&(st.bgClass=pt.bgClass),pt.textClass&&(st.textClass=pt.textClass),Ar(it,st),br(it,st,ct,ht),yo(it,st,ht),st.node}function yo(it,st,ct){if(rr(it,st.line,st,ct,!0),st.rest)for(var ht=0;ht<st.rest.length;ht++)rr(it,st.rest[ht],st,ct,!1)}function rr(it,st,ct,ht,pt){if(st.widgets)for(var Nt=js(ct),Kt=0,$t=st.widgets;Kt<$t.length;++Kt){var Jt=$t[Kt],ve=te("div",[Jt.node],"CodeMirror-linewidget"+(Jt.className?" "+Jt.className:""));Jt.handleMouseEvents||ve.setAttribute("cm-ignore-events","true"),Bo(Jt,ve,ct,ht),it.display.input.setUneditable(ve),pt&&Jt.above?Nt.insertBefore(ve,ct.gutter||ct.text):Nt.appendChild(ve),sr(Jt,"redraw")}}function Bo(it,st,ct,ht){if(it.noHScroll){(ct.alignable||(ct.alignable=[])).push(st);var pt=ht.wrapperWidth;st.style.left=ht.fixedPos+"px",it.coverGutter||(pt-=ht.gutterTotalWidth,st.style.paddingLeft=ht.gutterTotalWidth+"px"),st.style.width=pt+"px"}it.coverGutter&&(st.style.zIndex=5,st.style.position="relative",it.noHScroll||(st.style.marginLeft=-ht.gutterTotalWidth+"px"))}function Qi(it){if(it.height!=null)return it.height;var st=it.doc.cm;if(!st)return 0;if(!Ke(document.body,it.node)){var ct="position: relative;";it.coverGutter&&(ct+="margin-left: -"+st.display.gutters.offsetWidth+"px;"),it.noHScroll&&(ct+="width: "+st.display.wrapper.clientWidth+"px;"),Wt(st.display.measure,te("div",[it.node],null,ct))}return it.height=it.node.parentNode.offsetHeight}function Tr(it,st){for(var ct=Br(st);ct!=it.wrapper;ct=ct.parentNode)if(!ct||ct.nodeType==1&&ct.getAttribute("cm-ignore-events")=="true"||ct.parentNode==it.sizer&&ct!=it.mover)return!0}function gr(it){return it.lineSpace.offsetTop}function Wo(it){return it.mover.offsetHeight-it.lineSpace.offsetHeight}function is(it){if(it.cachedPaddingH)return it.cachedPaddingH;var st=Wt(it.measure,te("pre","x","CodeMirror-line-like")),ct=window.getComputedStyle?window.getComputedStyle(st):st.currentStyle,ht={left:parseInt(ct.paddingLeft),right:parseInt(ct.paddingRight)};return!isNaN(ht.left)&&!isNaN(ht.right)&&(it.cachedPaddingH=ht),ht}function Lo(it){return $n-it.display.nativeBarWidth}function Ss(it){return it.display.scroller.clientWidth-Lo(it)-it.display.barWidth}function jo(it){return it.display.scroller.clientHeight-Lo(it)-it.display.barHeight}function Pa(it,st,ct){var ht=it.options.lineWrapping,pt=ht&&Ss(it);if(!st.measure.heights||ht&&st.measure.width!=pt){var Nt=st.measure.heights=[];if(ht){st.measure.width=pt;for(var Kt=st.text.firstChild.getClientRects(),$t=0;$t<Kt.length-1;$t++){var Jt=Kt[$t],ve=Kt[$t+1];Math.abs(Jt.bottom-ve.bottom)>2&&Nt.push((Jt.bottom+ve.top)/2-ct.top)}}Nt.push(ct.bottom-ct.top)}}function Io(it,st,ct){if(it.line==st)return{map:it.measure.map,cache:it.measure.cache};for(var ht=0;ht<it.rest.length;ht++)if(it.rest[ht]==st)return{map:it.measure.maps[ht],cache:it.measure.caches[ht]};for(var pt=0;pt<it.rest.length;pt++)if(le(it.rest[pt])>ct)return{map:it.measure.maps[pt],cache:it.measure.caches[pt],before:!0}}function rl(it,st){st=Qe(st);var ct=le(st),ht=it.display.externalMeasured=new eo(it.doc,st,ct);ht.lineN=ct;var pt=ht.built=Ue(it,ht);return ht.text=pt.pre,Wt(it.display.lineMeasure,pt.pre),ht}function bo(it,st,ct,ht){return Ns(it,_o(it,st),ct,ht)}function ma(it,st){if(st>=it.display.viewFrom&&st<it.display.viewTo)return it.display.view[ol(it,st)];var ct=it.display.externalMeasured;if(ct&&st>=ct.lineN&&st<ct.lineN+ct.size)return ct}function _o(it,st){var ct=le(st),ht=ma(it,ct);ht&&!ht.text?ht=null:ht&&ht.changes&&(ns(it,ht,ct,Kl(it)),it.curOp.forceUpdate=!0),ht||(ht=rl(it,st));var pt=Io(ht,st,ct);return{line:st,view:ht,rect:null,map:pt.map,cache:pt.cache,before:pt.before,hasHeights:!1}}function Ns(it,st,ct,ht,pt){st.before&&(ct=-1);var Nt=ct+(ht||""),Kt;return st.cache.hasOwnProperty(Nt)?Kt=st.cache[Nt]:(st.rect||(st.rect=st.view.text.getBoundingClientRect()),st.hasHeights||(Pa(it,st.view,st.rect),st.hasHeights=!0),Kt=es(it,st,ct,ht),Kt.bogus||(st.cache[Nt]=Kt)),{left:Kt.left,right:Kt.right,top:pt?Kt.rtop:Kt.top,bottom:pt?Kt.rbottom:Kt.bottom}}var Ws={left:0,right:0,top:0,bottom:0};function hu(it,st,ct){for(var ht,pt,Nt,Kt,$t,Jt,ve=0;ve<it.length;ve+=3)if($t=it[ve],Jt=it[ve+1],st<$t?(pt=0,Nt=1,Kt="left"):st<Jt?(pt=st-$t,Nt=pt+1):(ve==it.length-3||st==Jt&&it[ve+3]>st)&&(Nt=Jt-$t,pt=Nt-1,st>=Jt&&(Kt="right")),pt!=null){if(ht=it[ve+2],$t==Jt&&ct==(ht.insertLeft?"left":"right")&&(Kt=ct),ct=="left"&&pt==0)for(;ve&&it[ve-2]==it[ve-3]&&it[ve-1].insertLeft;)ht=it[(ve-=3)+2],Kt="left";if(ct=="right"&&pt==Jt-$t)for(;ve<it.length-3&&it[ve+3]==it[ve+4]&&!it[ve+5].insertLeft;)ht=it[(ve+=3)+2],Kt="right";break}return{node:ht,start:pt,end:Nt,collapse:Kt,coverStart:$t,coverEnd:Jt}}function Ll(it,st){var ct=Ws;if(st=="left")for(var ht=0;ht<it.length&&(ct=it[ht]).left==ct.right;ht++);else for(var pt=it.length-1;pt>=0&&(ct=it[pt]).left==ct.right;pt--);return ct}function es(it,st,ct,ht){var pt=hu(st.map,ct,ht),Nt=pt.node,Kt=pt.start,$t=pt.end,Jt=pt.collapse,ve;if(Nt.nodeType==3){for(var $e=0;$e<4;$e++){for(;Kt&&Pe(st.line.text.charAt(pt.coverStart+Kt));)--Kt;for(;pt.coverStart+$t<pt.coverEnd&&Pe(st.line.text.charAt(pt.coverStart+$t));)++$t;if(fe&&Rt<9&&Kt==0&&$t==pt.coverEnd-pt.coverStart?ve=Nt.parentNode.getBoundingClientRect():ve=Ll(pe(Nt,Kt,$t).getClientRects(),ht),ve.left||ve.right||Kt==0)break;$t=Kt,Kt=Kt-1,Jt="right"}fe&&Rt<11&&(ve=Ml(it.display.measure,ve))}else{Kt>0&&(Jt=ht="right");var Be;it.options.lineWrapping&&(Be=Nt.getClientRects()).length>1?ve=Be[ht=="right"?Be.length-1:0]:ve=Nt.getBoundingClientRect()}if(fe&&Rt<9&&!Kt&&(!ve||!ve.left&&!ve.right)){var Fn=Nt.parentNode.getClientRects()[0];Fn?ve={left:Fn.left,right:Fn.left+gl(it.display),top:Fn.top,bottom:Fn.bottom}:ve=Ws}for(var xn=ve.top-st.rect.top,vi=ve.bottom-st.rect.top,Ci=(xn+vi)/2,_i=st.view.measure.heights,or=0;or<_i.length-1&&!(Ci<_i[or]);or++);var Ir=or?_i[or-1]:0,Sr=_i[or],_r={left:(Jt=="right"?ve.right:ve.left)-st.rect.left,right:(Jt=="left"?ve.left:ve.right)-st.rect.left,top:Ir,bottom:Sr};return!ve.left&&!ve.right&&(_r.bogus=!0),it.options.singleCursorHeightPerLine||(_r.rtop=xn,_r.rbottom=vi),_r}function Ml(it,st){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!xi(it))return st;var ct=screen.logicalXDPI/screen.deviceXDPI,ht=screen.logicalYDPI/screen.deviceYDPI;return{left:st.left*ct,right:st.right*ct,top:st.top*ht,bottom:st.bottom*ht}}function ca(it){if(it.measure&&(it.measure.cache={},it.measure.heights=null,it.rest))for(var st=0;st<it.rest.length;st++)it.measure.caches[st]={}}function ds(it){it.display.externalMeasure=null,Zt(it.display.lineMeasure);for(var st=0;st<it.display.view.length;st++)ca(it.display.view[st])}function Oa(it){ds(it),it.display.cachedCharWidth=it.display.cachedTextHeight=it.display.cachedPaddingH=null,it.options.lineWrapping||(it.display.maxLineChanged=!0),it.display.lineNumChars=null}function Bs(){return de&&nt?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Yo(){return de&&nt?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function As(it){var st=0;if(it.widgets)for(var ct=0;ct<it.widgets.length;++ct)it.widgets[ct].above&&(st+=Qi(it.widgets[ct]));return st}function Us(it,st,ct,ht,pt){if(!pt){var Nt=As(st);ct.top+=Nt,ct.bottom+=Nt}if(ht=="line")return ct;ht||(ht="local");var Kt=Ii(st);if(ht=="local"?Kt+=gr(it.display):Kt-=it.display.viewOffset,ht=="page"||ht=="window"){var $t=it.display.lineSpace.getBoundingClientRect();Kt+=$t.top+(ht=="window"?0:Yo());var Jt=$t.left+(ht=="window"?0:Bs());ct.left+=Jt,ct.right+=Jt}return ct.top+=Kt,ct.bottom+=Kt,ct}function cu(it,st,ct){if(ct=="div")return st;var ht=st.left,pt=st.top;if(ct=="page")ht-=Bs(),pt-=Yo();else if(ct=="local"||!ct){var Nt=it.display.sizer.getBoundingClientRect();ht+=Nt.left,pt+=Nt.top}var Kt=it.display.lineSpace.getBoundingClientRect();return{left:ht-Kt.left,top:pt-Kt.top}}function va(it,st,ct,ht,pt){return ht||(ht=Mn(it.doc,st.line)),Us(it,ht,bo(it,ht,st.ch,pt),ct)}function Vo(it,st,ct,ht,pt,Nt){ht=ht||Mn(it.doc,st.line),pt||(pt=_o(it,ht));function Kt(vi,Ci){var _i=Ns(it,pt,vi,Ci?"right":"left",Nt);return Ci?_i.left=_i.right:_i.right=_i.left,Us(it,ht,_i,ct)}var $t=In(ht,it.doc.direction),Jt=st.ch,ve=st.sticky;if(Jt>=ht.text.length?(Jt=ht.text.length,ve="before"):Jt<=0&&(Jt=0,ve="after"),!$t)return Kt(ve=="before"?Jt-1:Jt,ve=="before");function $e(vi,Ci,_i){var or=$t[Ci],Ir=or.level==1;return Kt(_i?vi-1:vi,Ir!=_i)}var Be=Ze($t,Jt,ve),Fn=Te,xn=$e(Jt,Be,ve=="before");return Fn!=null&&(xn.other=$e(Jt,Fn,ve!="before")),xn}function Uo(it,st){var ct=0;st=fn(it.doc,st),it.options.lineWrapping||(ct=gl(it.display)*st.ch);var ht=Mn(it.doc,st.line),pt=Ii(ht)+gr(it.display);return{left:ct,right:ct,top:pt,bottom:pt+ht.height}}function wo(it,st,ct,ht,pt){var Nt=qe(it,st,ct);return Nt.xRel=pt,ht&&(Nt.outside=ht),Nt}function fs(it,st,ct){var ht=it.doc;if(ct+=it.display.viewOffset,ct<0)return wo(ht.first,0,null,-1,-1);var pt=De(ht,ct),Nt=ht.first+ht.size-1;if(pt>Nt)return wo(ht.first+ht.size-1,Mn(ht,Nt).text.length,null,1,1);st<0&&(st=0);for(var Kt=Mn(ht,pt);;){var $t=bn(it,Kt,pt,st,ct),Jt=kn(Kt,$t.ch+($t.xRel>0||$t.outside>0?1:0));if(!Jt)return $t;var ve=Jt.find(1);if(ve.line==pt)return ve;Kt=Mn(ht,pt=ve.line)}}function Yi(it,st,ct,ht){ht-=As(st);var pt=st.text.length,Nt=wn(function(Kt){return Ns(it,ct,Kt-1).bottom<=ht},pt,0);return pt=wn(function(Kt){return Ns(it,ct,Kt).top>ht},Nt,pt),{begin:Nt,end:pt}}function na(it,st,ct,ht){ct||(ct=_o(it,st));var pt=Us(it,st,Ns(it,ct,ht),"line").top;return Yi(it,st,ct,pt)}function Ce(it,st,ct,ht){return it.bottom<=ct?!1:it.top>ct?!0:(ht?it.left:it.right)>st}function bn(it,st,ct,ht,pt){pt-=Ii(st);var Nt=_o(it,st),Kt=As(st),$t=0,Jt=st.text.length,ve=!0,$e=In(st,it.doc.direction);if($e){var Be=(it.options.lineWrapping?du:kl)(it,st,ct,Nt,$e,ht,pt);ve=Be.level!=1,$t=ve?Be.from:Be.to-1,Jt=ve?Be.to:Be.from-1}var Fn=null,xn=null,vi=wn(function(ho){var wr=Ns(it,Nt,ho);return wr.top+=Kt,wr.bottom+=Kt,Ce(wr,ht,pt,!1)?(wr.top<=pt&&wr.left<=ht&&(Fn=ho,xn=wr),!0):!1},$t,Jt),Ci,_i,or=!1;if(xn){var Ir=ht-xn.left<xn.right-ht,Sr=Ir==ve;vi=Fn+(Sr?0:1),_i=Sr?"after":"before",Ci=Ir?xn.left:xn.right}else{!ve&&(vi==Jt||vi==$t)&&vi++,_i=vi==0?"after":vi==st.text.length?"before":Ns(it,Nt,vi-(ve?1:0)).bottom+Kt<=pt==ve?"after":"before";var _r=Vo(it,qe(ct,vi,_i),"line",st,Nt);Ci=_r.left,or=pt<_r.top?-1:pt>=_r.bottom?1:0}return vi=ze(st.text,vi,1),wo(ct,vi,_i,or,ht-Ci)}function kl(it,st,ct,ht,pt,Nt,Kt){var $t=wn(function(Be){var Fn=pt[Be],xn=Fn.level!=1;return Ce(Vo(it,qe(ct,xn?Fn.to:Fn.from,xn?"before":"after"),"line",st,ht),Nt,Kt,!0)},0,pt.length-1),Jt=pt[$t];if($t>0){var ve=Jt.level!=1,$e=Vo(it,qe(ct,ve?Jt.from:Jt.to,ve?"after":"before"),"line",st,ht);Ce($e,Nt,Kt,!0)&&$e.top>Kt&&(Jt=pt[$t-1])}return Jt}function du(it,st,ct,ht,pt,Nt,Kt){var $t=Yi(it,st,ht,Kt),Jt=$t.begin,ve=$t.end;/\s/.test(st.text.charAt(ve-1))&&ve--;for(var $e=null,Be=null,Fn=0;Fn<pt.length;Fn++){var xn=pt[Fn];if(!(xn.from>=ve||xn.to<=Jt)){var vi=xn.level!=1,Ci=Ns(it,ht,vi?Math.min(ve,xn.to)-1:Math.max(Jt,xn.from)).right,_i=Ci<Nt?Nt-Ci+1e9:Ci-Nt;(!$e||Be>_i)&&($e=xn,Be=_i)}}return $e||($e=pt[pt.length-1]),$e.from<Jt&&($e={from:Jt,to:$e.to,level:$e.level}),$e.to>ve&&($e={from:$e.from,to:ve,level:$e.level}),$e}var rs;function ra(it){if(it.cachedTextHeight!=null)return it.cachedTextHeight;if(rs==null){rs=te("pre",null,"CodeMirror-line-like");for(var st=0;st<49;++st)rs.appendChild(document.createTextNode("x")),rs.appendChild(te("br"));rs.appendChild(document.createTextNode("x"))}Wt(it.measure,rs);var ct=rs.offsetHeight/50;return ct>3&&(it.cachedTextHeight=ct),Zt(it.measure),ct||1}function gl(it){if(it.cachedCharWidth!=null)return it.cachedCharWidth;var st=te("span","xxxxxxxxxx"),ct=te("pre",[st],"CodeMirror-line-like");Wt(it.measure,ct);var ht=st.getBoundingClientRect(),pt=(ht.right-ht.left)/10;return pt>2&&(it.cachedCharWidth=pt),pt||10}function Kl(it){for(var st=it.display,ct={},ht={},pt=st.gutters.clientLeft,Nt=st.gutters.firstChild,Kt=0;Nt;Nt=Nt.nextSibling,++Kt){var $t=it.display.gutterSpecs[Kt].className;ct[$t]=Nt.offsetLeft+Nt.clientLeft+pt,ht[$t]=Nt.clientWidth}return{fixedPos:fu(st),gutterTotalWidth:st.gutters.offsetWidth,gutterLeft:ct,gutterWidth:ht,wrapperWidth:st.wrapper.clientWidth}}function fu(it){return it.scroller.getBoundingClientRect().left-it.sizer.getBoundingClientRect().left}function Cs(it){var st=ra(it.display),ct=it.options.lineWrapping,ht=ct&&Math.max(5,it.display.scroller.clientWidth/gl(it.display)-3);return function(pt){if(on(it.doc,pt))return 0;var Nt=0;if(pt.widgets)for(var Kt=0;Kt<pt.widgets.length;Kt++)pt.widgets[Kt].height&&(Nt+=pt.widgets[Kt].height);return ct?Nt+(Math.ceil(pt.text.length/ht)||1)*st:Nt+st}}function Vr(it){var st=it.doc,ct=Cs(it);st.iter(function(ht){var pt=ct(ht);pt!=ht.height&&Vn(ht,pt)})}function Fa(it,st,ct,ht){var pt=it.display;if(!ct&&Br(st).getAttribute("cm-not-content")=="true")return null;var Nt,Kt,$t=pt.lineSpace.getBoundingClientRect();try{Nt=st.clientX-$t.left,Kt=st.clientY-$t.top}catch(Be){return null}var Jt=fs(it,Nt,Kt),ve;if(ht&&Jt.xRel>0&&(ve=Mn(it.doc,Jt.line).text).length==Jt.ch){var $e=me(ve,ve.length,it.options.tabSize)-ve.length;Jt=qe(Jt.line,Math.max(0,Math.round((Nt-is(it.display).left)/gl(it.display))-$e))}return Jt}function ol(it,st){if(st>=it.display.viewTo||(st-=it.display.viewFrom,st<0))return null;for(var ct=it.display.view,ht=0;ht<ct.length;ht++)if(st-=ct[ht].size,st<0)return ht}function ws(it,st,ct,ht){st==null&&(st=it.doc.first),ct==null&&(ct=it.doc.first+it.doc.size),ht||(ht=0);var pt=it.display;if(ht&&ct<pt.viewTo&&(pt.updateLineNumbers==null||pt.updateLineNumbers>st)&&(pt.updateLineNumbers=st),it.curOp.viewChanged=!0,st>=pt.viewTo)ne&&Cn(it.doc,st)<pt.viewTo&&Ps(it);else if(ct<=pt.viewFrom)ne&&zn(it.doc,ct+ht)>pt.viewFrom?Ps(it):(pt.viewFrom+=ht,pt.viewTo+=ht);else if(st<=pt.viewFrom&&ct>=pt.viewTo)Ps(it);else if(st<=pt.viewFrom){var Nt=Ha(it,ct,ct+ht,1);Nt?(pt.view=pt.view.slice(Nt.index),pt.viewFrom=Nt.lineN,pt.viewTo+=ht):Ps(it)}else if(ct>=pt.viewTo){var Kt=Ha(it,st,st,-1);Kt?(pt.view=pt.view.slice(0,Kt.index),pt.viewTo=Kt.lineN):Ps(it)}else{var $t=Ha(it,st,st,-1),Jt=Ha(it,ct,ct+ht,1);$t&&Jt?(pt.view=pt.view.slice(0,$t.index).concat(kr(it,$t.lineN,Jt.lineN)).concat(pt.view.slice(Jt.index)),pt.viewTo+=ht):Ps(it)}var ve=pt.externalMeasured;ve&&(ct<ve.lineN?ve.lineN+=ht:st<ve.lineN+ve.size&&(pt.externalMeasured=null))}function vo(it,st,ct){it.curOp.viewChanged=!0;var ht=it.display,pt=it.display.externalMeasured;if(pt&&st>=pt.lineN&&st<pt.lineN+pt.size&&(ht.externalMeasured=null),!(st<ht.viewFrom||st>=ht.viewTo)){var Nt=ht.view[ol(it,st)];if(Nt.node!=null){var Kt=Nt.changes||(Nt.changes=[]);gn(Kt,ct)==-1&&Kt.push(ct)}}}function Ps(it){it.display.viewFrom=it.display.viewTo=it.doc.first,it.display.view=[],it.display.viewOffset=0}function Ha(it,st,ct,ht){var pt=ol(it,st),Nt,Kt=it.display.view;if(!ne||ct==it.doc.first+it.doc.size)return{index:pt,lineN:ct};for(var $t=it.display.viewFrom,Jt=0;Jt<pt;Jt++)$t+=Kt[Jt].size;if($t!=st){if(ht>0){if(pt==Kt.length-1)return null;Nt=$t+Kt[pt].size-st,pt++}else Nt=$t-st;st+=Nt,ct+=Nt}for(;Cn(it.doc,ct)!=ct;){if(pt==(ht<0?0:Kt.length-1))return null;ct+=ht*Kt[pt-(ht<0?1:0)].size,pt+=ht}return{index:pt,lineN:ct}}function ss(it,st,ct){var ht=it.display,pt=ht.view;pt.length==0||st>=ht.viewTo||ct<=ht.viewFrom?(ht.view=kr(it,st,ct),ht.viewFrom=st):(ht.viewFrom>st?ht.view=kr(it,st,ht.viewFrom).concat(ht.view):ht.viewFrom<st&&(ht.view=ht.view.slice(ol(it,st))),ht.viewFrom=st,ht.viewTo<ct?ht.view=ht.view.concat(kr(it,ht.viewTo,ct)):ht.viewTo>ct&&(ht.view=ht.view.slice(0,ol(it,ct)))),ht.viewTo=ct}function sl(it){for(var st=it.display.view,ct=0,ht=0;ht<st.length;ht++){var pt=st[ht];!pt.hidden&&(!pt.node||pt.changes)&&++ct}return ct}function Ys(it){it.display.input.showSelection(it.display.input.prepareSelection())}function Wu(it,st){st===void 0&&(st=!0);for(var ct=it.doc,ht={},pt=ht.cursors=document.createDocumentFragment(),Nt=ht.selection=document.createDocumentFragment(),Kt=0;Kt<ct.sel.ranges.length;Kt++)if(!(!st&&Kt==ct.sel.primIndex)){var $t=ct.sel.ranges[Kt];if(!($t.from().line>=it.display.viewTo||$t.to().line<it.display.viewFrom)){var Jt=$t.empty();(Jt||it.options.showCursorWhenSelecting)&&Qo(it,$t.head,pt),Jt||No(it,$t,Nt)}}return ht}function Qo(it,st,ct){var ht=Vo(it,st,"div",null,null,!it.options.singleCursorHeightPerLine),pt=ct.appendChild(te("div","\xA0","CodeMirror-cursor"));if(pt.style.left=ht.left+"px",pt.style.top=ht.top+"px",pt.style.height=Math.max(0,ht.bottom-ht.top)*it.options.cursorHeight+"px",ht.other){var Nt=ct.appendChild(te("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Nt.style.display="",Nt.style.left=ht.other.left+"px",Nt.style.top=ht.other.top+"px",Nt.style.height=(ht.other.bottom-ht.other.top)*.85+"px"}}function oa(it,st){return it.top-st.top||it.left-st.left}function No(it,st,ct){var ht=it.display,pt=it.doc,Nt=document.createDocumentFragment(),Kt=is(it.display),$t=Kt.left,Jt=Math.max(ht.sizerWidth,Ss(it)-ht.sizer.offsetLeft)-Kt.right,ve=pt.direction=="ltr";function $e(Sr,_r,ho,wr){_r<0&&(_r=0),_r=Math.round(_r),wr=Math.round(wr),Nt.appendChild(te("div",null,"CodeMirror-selected","position: absolute; left: "+Sr+`px;
top: `+_r+"px; width: "+(ho==null?Jt-Sr:ho)+`px;
height: `+(wr-_r)+"px"))}function Be(Sr,_r,ho){var wr=Mn(pt,Sr),ko=wr.text.length,Rs,Ea;function Xs(Sa,ul){return va(it,qe(Sr,Sa),"div",wr,ul)}function yl(Sa,ul,_a){var mr=na(it,wr,null,Sa),Zo=ul=="ltr"==(_a=="after")?"left":"right",_s=_a=="after"?mr.begin:mr.end-(/\s/.test(wr.text.charAt(mr.end-1))?2:1);return Xs(_s,Zo)[Zo]}var Ua=In(wr,pt.direction);return Ge(Ua,_r||0,ho==null?ko:ho,function(Sa,ul,_a,mr){var Zo=_a=="ltr",_s=Xs(Sa,Zo?"left":"right"),Ts=Xs(ul-1,Zo?"right":"left"),Ka=_r==null&&Sa==0,Jo=ho==null&&ul==ko,Po=mr==0,wl=!Ua||mr==Ua.length-1;if(Ts.top-_s.top<=3){var ia=(ve?Ka:Jo)&&Po,XA=(ve?Jo:Ka)&&wl,Yl=ia?$t:(Zo?_s:Ts).left,Wa=XA?Jt:(Zo?Ts:_s).right;$e(Yl,_s.top,Wa-Yl,_s.bottom)}else{var xl,Es,La,nA;Zo?(xl=ve&&Ka&&Po?$t:_s.left,Es=ve?Jt:yl(Sa,_a,"before"),La=ve?$t:yl(ul,_a,"after"),nA=ve&&Jo&&wl?Jt:Ts.right):(xl=ve?yl(Sa,_a,"before"):$t,Es=!ve&&Ka&&Po?Jt:_s.right,La=!ve&&Jo&&wl?$t:Ts.left,nA=ve?yl(ul,_a,"after"):Jt),$e(xl,_s.top,Es-xl,_s.bottom),_s.bottom<Ts.top&&$e($t,_s.bottom,null,Ts.top),$e(La,Ts.top,nA-La,Ts.bottom)}(!Rs||oa(_s,Rs)<0)&&(Rs=_s),oa(Ts,Rs)<0&&(Rs=Ts),(!Ea||oa(_s,Ea)<0)&&(Ea=_s),oa(Ts,Ea)<0&&(Ea=Ts)}),{start:Rs,end:Ea}}var Fn=st.from(),xn=st.to();if(Fn.line==xn.line)Be(Fn.line,Fn.ch,xn.ch);else{var vi=Mn(pt,Fn.line),Ci=Mn(pt,xn.line),_i=Qe(vi)==Qe(Ci),or=Be(Fn.line,Fn.ch,_i?vi.text.length+1:null).end,Ir=Be(xn.line,_i?0:null,xn.ch).start;_i&&(or.top<Ir.top-2?($e(or.right,or.top,null,or.bottom),$e($t,Ir.top,Ir.left,Ir.bottom)):$e(or.right,or.top,Ir.left-or.right,or.bottom)),or.bottom<Ir.top&&$e($t,or.bottom,null,Ir.top)}ct.appendChild(Nt)}function as(it){if(it.state.focused){var st=it.display;clearInterval(st.blinker);var ct=!0;st.cursorDiv.style.visibility="",it.options.cursorBlinkRate>0?st.blinker=setInterval(function(){it.hasFocus()||dA(it),st.cursorDiv.style.visibility=(ct=!ct)?"":"hidden"},it.options.cursorBlinkRate):it.options.cursorBlinkRate<0&&(st.cursorDiv.style.visibility="hidden")}}function gs(it){it.state.focused||(it.display.input.focus(),Ko(it))}function bs(it){it.state.delayingBlurEvent=!0,setTimeout(function(){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1,dA(it))},100)}function Ko(it,st){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1),it.options.readOnly!="nocursor"&&(it.state.focused||(Ai(it,"focus",it,st),it.state.focused=!0,en(it.display.wrapper,"CodeMirror-focused"),!it.curOp&&it.display.selForContextMenu!=it.doc.sel&&(it.display.input.reset(),ie&&setTimeout(function(){return it.display.input.reset(!0)},20)),it.display.input.receivedFocus()),as(it))}function dA(it,st){it.state.delayingBlurEvent||(it.state.focused&&(Ai(it,"blur",it,st),it.state.focused=!1,Ot(it.display.wrapper,"CodeMirror-focused")),clearInterval(it.display.blinker),setTimeout(function(){it.state.focused||(it.display.shift=!1)},150))}function zr(it){for(var st=it.display,ct=st.lineDiv.offsetTop,ht=0;ht<st.view.length;ht++){var pt=st.view[ht],Nt=it.options.lineWrapping,Kt=void 0,$t=0;if(!pt.hidden){if(fe&&Rt<8){var Jt=pt.node.offsetTop+pt.node.offsetHeight;Kt=Jt-ct,ct=Jt}else{var ve=pt.node.getBoundingClientRect();Kt=ve.bottom-ve.top,!Nt&&pt.text.firstChild&&($t=pt.text.firstChild.getBoundingClientRect().right-ve.left-1)}var $e=pt.line.height-Kt;if(($e>.005||$e<-.005)&&(Vn(pt.line,Kt),Yu(pt.line),pt.rest))for(var Be=0;Be<pt.rest.length;Be++)Yu(pt.rest[Be]);if($t>it.display.sizerWidth){var Fn=Math.ceil($t/gl(it.display));Fn>it.display.maxLineLength&&(it.display.maxLineLength=Fn,it.display.maxLine=pt.line,it.display.maxLineChanged=!0)}}}}function Yu(it){if(it.widgets)for(var st=0;st<it.widgets.length;++st){var ct=it.widgets[st],ht=ct.node.parentNode;ht&&(ct.height=ht.offsetHeight)}}function Co(it,st,ct){var ht=ct&&ct.top!=null?Math.max(0,ct.top):it.scroller.scrollTop;ht=Math.floor(ht-gr(it));var pt=ct&&ct.bottom!=null?ct.bottom:ht+it.wrapper.clientHeight,Nt=De(st,ht),Kt=De(st,pt);if(ct&&ct.ensure){var $t=ct.ensure.from.line,Jt=ct.ensure.to.line;$t<Nt?(Nt=$t,Kt=De(st,Ii(Mn(st,$t))+it.wrapper.clientHeight)):Math.min(Jt,st.lastLine())>=Kt&&(Nt=De(st,Ii(Mn(st,Jt))-it.wrapper.clientHeight),Kt=Jt)}return{from:Nt,to:Math.max(Kt,Nt+1)}}function Oh(it,st){if(!pi(it,"scrollCursorIntoView")){var ct=it.display,ht=ct.sizer.getBoundingClientRect(),pt=null;if(st.top+ht.top<0?pt=!0:st.bottom+ht.top>(window.innerHeight||document.documentElement.clientHeight)&&(pt=!1),pt!=null&&!Me){var Nt=te("div","\u200B",null,`position: absolute;
top: `+(st.top-ct.viewOffset-gr(it.display))+`px;
height: `+(st.bottom-st.top+Lo(it)+ct.barHeight)+`px;
left: `+st.left+"px; width: "+Math.max(2,st.right-st.left)+"px;");it.display.lineSpace.appendChild(Nt),Nt.scrollIntoView(pt),it.display.lineSpace.removeChild(Nt)}}}function eu(it,st,ct,ht){ht==null&&(ht=0);var pt;!it.options.lineWrapping&&st==ct&&(st=st.ch?qe(st.line,st.sticky=="before"?st.ch-1:st.ch,"after"):st,ct=st.sticky=="before"?qe(st.line,st.ch+1,"before"):st);for(var Nt=0;Nt<5;Nt++){var Kt=!1,$t=Vo(it,st),Jt=!ct||ct==st?$t:Vo(it,ct);pt={left:Math.min($t.left,Jt.left),top:Math.min($t.top,Jt.top)-ht,right:Math.max($t.left,Jt.left),bottom:Math.max($t.bottom,Jt.bottom)+ht};var ve=Hh(it,pt),$e=it.doc.scrollTop,Be=it.doc.scrollLeft;if(ve.scrollTop!=null&&(Pu(it,ve.scrollTop),Math.abs(it.doc.scrollTop-$e)>1&&(Kt=!0)),ve.scrollLeft!=null&&(Fu(it,ve.scrollLeft),Math.abs(it.doc.scrollLeft-Be)>1&&(Kt=!0)),!Kt)break}return pt}function TA(it,st){var ct=Hh(it,st);ct.scrollTop!=null&&Pu(it,ct.scrollTop),ct.scrollLeft!=null&&Fu(it,ct.scrollLeft)}function Hh(it,st){var ct=it.display,ht=ra(it.display);st.top<0&&(st.top=0);var pt=it.curOp&&it.curOp.scrollTop!=null?it.curOp.scrollTop:ct.scroller.scrollTop,Nt=jo(it),Kt={};st.bottom-st.top>Nt&&(st.bottom=st.top+Nt);var $t=it.doc.height+Wo(ct),Jt=st.top<ht,ve=st.bottom>$t-ht;if(st.top<pt)Kt.scrollTop=Jt?0:st.top;else if(st.bottom>pt+Nt){var $e=Math.min(st.top,(ve?$t:st.bottom)-Nt);$e!=pt&&(Kt.scrollTop=$e)}var Be=it.options.fixedGutter?0:ct.gutters.offsetWidth,Fn=it.curOp&&it.curOp.scrollLeft!=null?it.curOp.scrollLeft:ct.scroller.scrollLeft-Be,xn=Ss(it)-ct.gutters.offsetWidth,vi=st.right-st.left>xn;return vi&&(st.right=st.left+xn),st.left<10?Kt.scrollLeft=0:st.left<Fn?Kt.scrollLeft=Math.max(0,st.left+Be-(vi?0:10)):st.right>xn+Fn-3&&(Kt.scrollLeft=st.right+(vi?0:10)-xn),Kt}function ch(it,st){st!=null&&(Gl(it),it.curOp.scrollTop=(it.curOp.scrollTop==null?it.doc.scrollTop:it.curOp.scrollTop)+st)}function gu(it){Gl(it);var st=it.getCursor();it.curOp.scrollToPos={from:st,to:st,margin:it.options.cursorScrollMargin}}function pu(it,st,ct){(st!=null||ct!=null)&&Gl(it),st!=null&&(it.curOp.scrollLeft=st),ct!=null&&(it.curOp.scrollTop=ct)}function Ho(it,st){Gl(it),it.curOp.scrollToPos=st}function Gl(it){var st=it.curOp.scrollToPos;if(st){it.curOp.scrollToPos=null;var ct=Uo(it,st.from),ht=Uo(it,st.to);dh(it,ct,ht,st.margin)}}function dh(it,st,ct,ht){var pt=Hh(it,{left:Math.min(st.left,ct.left),top:Math.min(st.top,ct.top)-ht,right:Math.max(st.right,ct.right),bottom:Math.max(st.bottom,ct.bottom)+ht});pu(it,pt.scrollLeft,pt.scrollTop)}function Pu(it,st){Math.abs(it.doc.scrollTop-st)<2||(St||Lu(it,{top:st}),fA(it,st,!0),St&&Lu(it),DA(it,100))}function fA(it,st,ct){st=Math.max(0,Math.min(it.display.scroller.scrollHeight-it.display.scroller.clientHeight,st)),!(it.display.scroller.scrollTop==st&&!ct)&&(it.doc.scrollTop=st,it.display.scrollbars.setScrollTop(st),it.display.scroller.scrollTop!=st&&(it.display.scroller.scrollTop=st))}function Fu(it,st,ct,ht){st=Math.max(0,Math.min(st,it.display.scroller.scrollWidth-it.display.scroller.clientWidth)),!((ct?st==it.doc.scrollLeft:Math.abs(it.doc.scrollLeft-st)<2)&&!ht)&&(it.doc.scrollLeft=st,Ed(it),it.display.scroller.scrollLeft!=st&&(it.display.scroller.scrollLeft=st),it.display.scrollbars.setScrollLeft(st))}function xo(it){var st=it.display,ct=st.gutters.offsetWidth,ht=Math.round(it.doc.height+Wo(it.display));return{clientHeight:st.scroller.clientHeight,viewHeight:st.wrapper.clientHeight,scrollWidth:st.scroller.scrollWidth,clientWidth:st.scroller.clientWidth,viewWidth:st.wrapper.clientWidth,barLeft:it.options.fixedGutter?ct:0,docHeight:ht,scrollHeight:ht+Lo(it)+st.barHeight,nativeBarWidth:st.nativeBarWidth,gutterWidth:ct}}var Oo=function(it,st,ct){this.cm=ct;var ht=this.vert=te("div",[te("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),pt=this.horiz=te("div",[te("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");ht.tabIndex=pt.tabIndex=-1,it(ht),it(pt),Dn(ht,"scroll",function(){ht.clientHeight&&st(ht.scrollTop,"vertical")}),Dn(pt,"scroll",function(){pt.clientWidth&&st(pt.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,fe&&Rt<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Oo.prototype.update=function(it){var st=it.scrollWidth>it.clientWidth+1,ct=it.scrollHeight>it.clientHeight+1,ht=it.nativeBarWidth;if(ct){this.vert.style.display="block",this.vert.style.bottom=st?ht+"px":"0";var pt=it.viewHeight-(st?ht:0);this.vert.firstChild.style.height=Math.max(0,it.scrollHeight-it.clientHeight+pt)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(st){this.horiz.style.display="block",this.horiz.style.right=ct?ht+"px":"0",this.horiz.style.left=it.barLeft+"px";var Nt=it.viewWidth-it.barLeft-(ct?ht:0);this.horiz.firstChild.style.width=Math.max(0,it.scrollWidth-it.clientWidth+Nt)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&it.clientHeight>0&&(ht==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ct?ht:0,bottom:st?ht:0}},Oo.prototype.setScrollLeft=function(it){this.horiz.scrollLeft!=it&&(this.horiz.scrollLeft=it),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Oo.prototype.setScrollTop=function(it){this.vert.scrollTop!=it&&(this.vert.scrollTop=it),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Oo.prototype.zeroWidthHack=function(){var it=At&&!Yt?"12px":"18px";this.horiz.style.height=this.vert.style.width=it,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ee,this.disableVert=new ee},Oo.prototype.enableZeroWidthBar=function(it,st,ct){it.style.pointerEvents="auto";function ht(){var pt=it.getBoundingClientRect(),Nt=ct=="vert"?document.elementFromPoint(pt.right-1,(pt.top+pt.bottom)/2):document.elementFromPoint((pt.right+pt.left)/2,pt.bottom-1);Nt!=it?it.style.pointerEvents="none":st.set(1e3,ht)}st.set(1e3,ht)},Oo.prototype.clear=function(){var it=this.horiz.parentNode;it.removeChild(this.horiz),it.removeChild(this.vert)};var Qs=function(){};Qs.prototype.update=function(){return{bottom:0,right:0}},Qs.prototype.setScrollLeft=function(){},Qs.prototype.setScrollTop=function(){},Qs.prototype.clear=function(){};function sa(it,st){st||(st=xo(it));var ct=it.display.barWidth,ht=it.display.barHeight;ya(it,st);for(var pt=0;pt<4&&ct!=it.display.barWidth||ht!=it.display.barHeight;pt++)ct!=it.display.barWidth&&it.options.lineWrapping&&zr(it),ya(it,xo(it)),ct=it.display.barWidth,ht=it.display.barHeight}function ya(it,st){var ct=it.display,ht=ct.scrollbars.update(st);ct.sizer.style.paddingRight=(ct.barWidth=ht.right)+"px",ct.sizer.style.paddingBottom=(ct.barHeight=ht.bottom)+"px",ct.heightForcer.style.borderBottom=ht.bottom+"px solid transparent",ht.right&&ht.bottom?(ct.scrollbarFiller.style.display="block",ct.scrollbarFiller.style.height=ht.bottom+"px",ct.scrollbarFiller.style.width=ht.right+"px"):ct.scrollbarFiller.style.display="",ht.bottom&&it.options.coverGutterNextToScrollbar&&it.options.fixedGutter?(ct.gutterFiller.style.display="block",ct.gutterFiller.style.height=ht.bottom+"px",ct.gutterFiller.style.width=st.gutterWidth+"px"):ct.gutterFiller.style.display=""}var Xu={native:Oo,null:Qs};function Eu(it){it.display.scrollbars&&(it.display.scrollbars.clear(),it.display.scrollbars.addClass&&Ot(it.display.wrapper,it.display.scrollbars.addClass)),it.display.scrollbars=new Xu[it.options.scrollbarStyle](function(st){it.display.wrapper.insertBefore(st,it.display.scrollbarFiller),Dn(st,"mousedown",function(){it.state.focused&&setTimeout(function(){return it.display.input.focus()},0)}),st.setAttribute("cm-not-content","true")},function(st,ct){ct=="horizontal"?Fu(it,st):Pu(it,st)},it),it.display.scrollbars.addClass&&en(it.display.wrapper,it.display.scrollbars.addClass)}var Ju=0;function zl(it){it.curOp={cm:it,viewChanged:!1,startHeight:it.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ju},$o(it.curOp)}function mu(it){var st=it.curOp;st&&ka(st,function(ct){for(var ht=0;ht<ct.ops.length;ht++)ct.ops[ht].cm.curOp=null;qg(ct)})}function qg(it){for(var st=it.ops,ct=0;ct<st.length;ct++)$g(st[ct]);for(var ht=0;ht<st.length;ht++)tp(st[ht]);for(var pt=0;pt<st.length;pt++)sg(st[pt]);for(var Nt=0;Nt<st.length;Nt++)Os(st[Nt]);for(var Kt=0;Kt<st.length;Kt++)NA(st[Kt])}function $g(it){var st=it.cm,ct=st.display;ag(st),it.updateMaxLine&&Ni(st),it.mustUpdate=it.viewChanged||it.forceUpdate||it.scrollTop!=null||it.scrollToPos&&(it.scrollToPos.from.line<ct.viewFrom||it.scrollToPos.to.line>=ct.viewTo)||ct.maxLineChanged&&st.options.lineWrapping,it.update=it.mustUpdate&&new fh(st,it.mustUpdate&&{top:it.scrollTop,ensure:it.scrollToPos},it.forceUpdate)}function tp(it){it.updatedDisplay=it.mustUpdate&&Fd(it.cm,it.update)}function sg(it){var st=it.cm,ct=st.display;it.updatedDisplay&&zr(st),it.barMeasure=xo(st),ct.maxLineChanged&&!st.options.lineWrapping&&(it.adjustWidthTo=bo(st,ct.maxLine,ct.maxLine.text.length).left+3,st.display.sizerWidth=it.adjustWidthTo,it.barMeasure.scrollWidth=Math.max(ct.scroller.clientWidth,ct.sizer.offsetLeft+it.adjustWidthTo+Lo(st)+st.display.barWidth),it.maxScrollLeft=Math.max(0,ct.sizer.offsetLeft+it.adjustWidthTo-Ss(st))),(it.updatedDisplay||it.selectionChanged)&&(it.preparedSelection=ct.input.prepareSelection())}function Os(it){var st=it.cm;it.adjustWidthTo!=null&&(st.display.sizer.style.minWidth=it.adjustWidthTo+"px",it.maxScrollLeft<st.doc.scrollLeft&&Fu(st,Math.min(st.display.scroller.scrollLeft,it.maxScrollLeft),!0),st.display.maxLineChanged=!1);var ct=it.focus&&it.focus==_e();it.preparedSelection&&st.display.input.showSelection(it.preparedSelection,ct),(it.updatedDisplay||it.startHeight!=st.doc.height)&&sa(st,it.barMeasure),it.updatedDisplay&&UA(st,it.barMeasure),it.selectionChanged&&as(st),st.state.focused&&it.updateInput&&st.display.input.reset(it.typing),ct&&gs(it.cm)}function NA(it){var st=it.cm,ct=st.display,ht=st.doc;if(it.updatedDisplay&&ps(st,it.update),ct.wheelStartX!=null&&(it.scrollTop!=null||it.scrollLeft!=null||it.scrollToPos)&&(ct.wheelStartX=ct.wheelStartY=null),it.scrollTop!=null&&fA(st,it.scrollTop,it.forceScroll),it.scrollLeft!=null&&Fu(st,it.scrollLeft,!0,!0),it.scrollToPos){var pt=eu(st,fn(ht,it.scrollToPos.from),fn(ht,it.scrollToPos.to),it.scrollToPos.margin);Oh(st,pt)}var Nt=it.maybeHiddenMarkers,Kt=it.maybeUnhiddenMarkers;if(Nt)for(var $t=0;$t<Nt.length;++$t)Nt[$t].lines.length||Ai(Nt[$t],"hide");if(Kt)for(var Jt=0;Jt<Kt.length;++Jt)Kt[Jt].lines.length&&Ai(Kt[Jt],"unhide");ct.wrapper.offsetHeight&&(ht.scrollTop=st.display.scroller.scrollTop),it.changeObjs&&Ai(st,"changes",st,it.changeObjs),it.update&&it.update.finish()}function ls(it,st){if(it.curOp)return st();zl(it);try{return st()}finally{mu(it)}}function wa(it,st){return function(){if(it.curOp)return st.apply(it,arguments);zl(it);try{return st.apply(it,arguments)}finally{mu(it)}}}function ba(it){return function(){if(this.curOp)return it.apply(this,arguments);zl(this);try{return it.apply(this,arguments)}finally{mu(this)}}}function Ta(it){return function(){var st=this.cm;if(!st||st.curOp)return it.apply(this,arguments);zl(st);try{return it.apply(this,arguments)}finally{mu(st)}}}function DA(it,st){it.doc.highlightFrontier<it.display.viewTo&&it.state.highlight.set(st,Nn(da,it))}function da(it){var st=it.doc;if(!(st.highlightFrontier>=it.display.viewTo)){var ct=+new Date+it.options.workTime,ht=Or(it,st.highlightFrontier),pt=[];st.iter(ht.line,Math.min(st.first+st.size,it.display.viewTo+500),function(Nt){if(ht.line>=it.display.viewFrom){var Kt=Nt.styles,$t=Nt.text.length>it.options.maxHighlightLength?Ki(st.mode,ht.state):null,Jt=Gi(it,Nt,ht,!0);$t&&(ht.state=$t),Nt.styles=Jt.styles;var ve=Nt.styleClasses,$e=Jt.classes;$e?Nt.styleClasses=$e:ve&&(Nt.styleClasses=null);for(var Be=!Kt||Kt.length!=Nt.styles.length||ve!=$e&&(!ve||!$e||ve.bgClass!=$e.bgClass||ve.textClass!=$e.textClass),Fn=0;!Be&&Fn<Kt.length;++Fn)Be=Kt[Fn]!=Nt.styles[Fn];Be&&pt.push(ht.line),Nt.stateAfter=ht.save(),ht.nextLine()}else Nt.text.length<=it.options.maxHighlightLength&&Oe(it,Nt.text,ht),Nt.stateAfter=ht.line%5==0?ht.save():null,ht.nextLine();if(+new Date>ct)return DA(it,it.options.workDelay),!0}),st.highlightFrontier=ht.line,st.modeFrontier=Math.max(st.modeFrontier,ht.line),pt.length&&ls(it,function(){for(var Nt=0;Nt<pt.length;Nt++)vo(it,pt[Nt],"text")})}}var fh=function(it,st,ct){var ht=it.display;this.viewport=st,this.visible=Co(ht,it.doc,st),this.editorIsHidden=!ht.wrapper.offsetWidth,this.wrapperHeight=ht.wrapper.clientHeight,this.wrapperWidth=ht.wrapper.clientWidth,this.oldDisplayWidth=Ss(it),this.force=ct,this.dims=Kl(it),this.events=[]};fh.prototype.signal=function(it,st){Fi(it,st)&&this.events.push(arguments)},fh.prototype.finish=function(){for(var it=0;it<this.events.length;it++)Ai.apply(null,this.events[it])};function ag(it){var st=it.display;!st.scrollbarsClipped&&st.scroller.offsetWidth&&(st.nativeBarWidth=st.scroller.offsetWidth-st.scroller.clientWidth,st.heightForcer.style.height=Lo(it)+"px",st.sizer.style.marginBottom=-st.nativeBarWidth+"px",st.sizer.style.borderRightWidth=Lo(it)+"px",st.scrollbarsClipped=!0)}function lg(it){if(it.hasFocus())return null;var st=_e();if(!st||!Ke(it.display.lineDiv,st))return null;var ct={activeElt:st};if(window.getSelection){var ht=window.getSelection();ht.anchorNode&&ht.extend&&Ke(it.display.lineDiv,ht.anchorNode)&&(ct.anchorNode=ht.anchorNode,ct.anchorOffset=ht.anchorOffset,ct.focusNode=ht.focusNode,ct.focusOffset=ht.focusOffset)}return ct}function pl(it){if(!(!it||!it.activeElt||it.activeElt==_e())&&(it.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(it.activeElt.nodeName)&&it.anchorNode&&Ke(document.body,it.anchorNode)&&Ke(document.body,it.focusNode))){var st=window.getSelection(),ct=document.createRange();ct.setEnd(it.anchorNode,it.anchorOffset),ct.collapse(!1),st.removeAllRanges(),st.addRange(ct),st.extend(it.focusNode,it.focusOffset)}}function Fd(it,st){var ct=it.display,ht=it.doc;if(st.editorIsHidden)return Ps(it),!1;if(!st.force&&st.visible.from>=ct.viewFrom&&st.visible.to<=ct.viewTo&&(ct.updateLineNumbers==null||ct.updateLineNumbers>=ct.viewTo)&&ct.renderedView==ct.view&&sl(it)==0)return!1;fa(it)&&(Ps(it),st.dims=Kl(it));var pt=ht.first+ht.size,Nt=Math.max(st.visible.from-it.options.viewportMargin,ht.first),Kt=Math.min(pt,st.visible.to+it.options.viewportMargin);ct.viewFrom<Nt&&Nt-ct.viewFrom<20&&(Nt=Math.max(ht.first,ct.viewFrom)),ct.viewTo>Kt&&ct.viewTo-Kt<20&&(Kt=Math.min(pt,ct.viewTo)),ne&&(Nt=Cn(it.doc,Nt),Kt=zn(it.doc,Kt));var $t=Nt!=ct.viewFrom||Kt!=ct.viewTo||ct.lastWrapHeight!=st.wrapperHeight||ct.lastWrapWidth!=st.wrapperWidth;ss(it,Nt,Kt),ct.viewOffset=Ii(Mn(it.doc,ct.viewFrom)),it.display.mover.style.top=ct.viewOffset+"px";var Jt=sl(it);if(!$t&&Jt==0&&!st.force&&ct.renderedView==ct.view&&(ct.updateLineNumbers==null||ct.updateLineNumbers>=ct.viewTo))return!1;var ve=lg(it);return Jt>4&&(ct.lineDiv.style.display="none"),cf(it,ct.updateLineNumbers,st.dims),Jt>4&&(ct.lineDiv.style.display=""),ct.renderedView=ct.view,pl(ve),Zt(ct.cursorDiv),Zt(ct.selectionDiv),ct.gutters.style.height=ct.sizer.style.minHeight=0,$t&&(ct.lastWrapHeight=st.wrapperHeight,ct.lastWrapWidth=st.wrapperWidth,DA(it,400)),ct.updateLineNumbers=null,!0}function ps(it,st){for(var ct=st.viewport,ht=!0;;ht=!1){if(!ht||!it.options.lineWrapping||st.oldDisplayWidth==Ss(it)){if(ct&&ct.top!=null&&(ct={top:Math.min(it.doc.height+Wo(it.display)-jo(it),ct.top)}),st.visible=Co(it.display,it.doc,ct),st.visible.from>=it.display.viewFrom&&st.visible.to<=it.display.viewTo)break}else ht&&(st.visible=Co(it.display,it.doc,ct));if(!Fd(it,st))break;zr(it);var pt=xo(it);Ys(it),sa(it,pt),UA(it,pt),st.force=!1}st.signal(it,"update",it),(it.display.viewFrom!=it.display.reportedViewFrom||it.display.viewTo!=it.display.reportedViewTo)&&(st.signal(it,"viewportChange",it,it.display.viewFrom,it.display.viewTo),it.display.reportedViewFrom=it.display.viewFrom,it.display.reportedViewTo=it.display.viewTo)}function Lu(it,st){var ct=new fh(it,st);if(Fd(it,ct)){zr(it),ps(it,ct);var ht=xo(it);Ys(it),sa(it,ht),UA(it,ht),ct.finish()}}function cf(it,st,ct){var ht=it.display,pt=it.options.lineNumbers,Nt=ht.lineDiv,Kt=Nt.firstChild;function $t(vi){var Ci=vi.nextSibling;return ie&&At&&it.display.currentWheelTarget==vi?vi.style.display="none":vi.parentNode.removeChild(vi),Ci}for(var Jt=ht.view,ve=ht.viewFrom,$e=0;$e<Jt.length;$e++){var Be=Jt[$e];if(!Be.hidden)if(!Be.node||Be.node.parentNode!=Nt){var Fn=io(it,Be,ve,ct);Nt.insertBefore(Fn,Kt)}else{for(;Kt!=Be.node;)Kt=$t(Kt);var xn=pt&&st!=null&&st<=ve&&Be.lineNumber;Be.changes&&(gn(Be.changes,"gutter")>-1&&(xn=!1),ns(it,Be,ve,ct)),xn&&(Zt(Be.lineNumber),Be.lineNumber.appendChild(document.createTextNode(On(it.options,ve)))),Kt=Be.node.nextSibling}ve+=Be.size}for(;Kt;)Kt=$t(Kt)}function IA(it){var st=it.gutters.offsetWidth;it.sizer.style.marginLeft=st+"px"}function UA(it,st){it.display.sizer.style.minHeight=st.docHeight+"px",it.display.heightForcer.style.top=st.docHeight+"px",it.display.gutters.style.height=st.docHeight+it.display.barHeight+Lo(it)+"px"}function Ed(it){var st=it.display,ct=st.view;if(!(!st.alignWidgets&&(!st.gutters.firstChild||!it.options.fixedGutter))){for(var ht=fu(st)-st.scroller.scrollLeft+it.doc.scrollLeft,pt=st.gutters.offsetWidth,Nt=ht+"px",Kt=0;Kt<ct.length;Kt++)if(!ct[Kt].hidden){it.options.fixedGutter&&(ct[Kt].gutter&&(ct[Kt].gutter.style.left=Nt),ct[Kt].gutterBackground&&(ct[Kt].gutterBackground.style.left=Nt));var $t=ct[Kt].alignable;if($t)for(var Jt=0;Jt<$t.length;Jt++)$t[Jt].style.left=Nt}it.options.fixedGutter&&(st.gutters.style.left=ht+pt+"px")}}function fa(it){if(!it.options.lineNumbers)return!1;var st=it.doc,ct=On(it.options,st.first+st.size-1),ht=it.display;if(ct.length!=ht.lineNumChars){var pt=ht.measure.appendChild(te("div",[te("div",ct)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Nt=pt.firstChild.offsetWidth,Kt=pt.offsetWidth-Nt;return ht.lineGutter.style.width="",ht.lineNumInnerWidth=Math.max(Nt,ht.lineGutter.offsetWidth-Kt)+1,ht.lineNumWidth=ht.lineNumInnerWidth+Kt,ht.lineNumChars=ht.lineNumInnerWidth?ct.length:-1,ht.lineGutter.style.width=ht.lineNumWidth+"px",IA(it.display),!0}return!1}function Na(it,st){for(var ct=[],ht=!1,pt=0;pt<it.length;pt++){var Nt=it[pt],Kt=null;if(typeof Nt!="string"&&(Kt=Nt.style,Nt=Nt.className),Nt=="CodeMirror-linenumbers")if(st)ht=!0;else continue;ct.push({className:Nt,style:Kt})}return st&&!ht&&ct.push({className:"CodeMirror-linenumbers",style:null}),ct}function gh(it){var st=it.gutters,ct=it.gutterSpecs;Zt(st),it.lineGutter=null;for(var ht=0;ht<ct.length;++ht){var pt=ct[ht],Nt=pt.className,Kt=pt.style,$t=st.appendChild(te("div",null,"CodeMirror-gutter "+Nt));Kt&&($t.style.cssText=Kt),Nt=="CodeMirror-linenumbers"&&(it.lineGutter=$t,$t.style.width=(it.lineNumWidth||1)+"px")}st.style.display=ct.length?"":"none",IA(it)}function jl(it){gh(it.display),ws(it),Ed(it)}function QA(it,st,ct,ht){var pt=this;this.input=ct,pt.scrollbarFiller=te("div",null,"CodeMirror-scrollbar-filler"),pt.scrollbarFiller.setAttribute("cm-not-content","true"),pt.gutterFiller=te("div",null,"CodeMirror-gutter-filler"),pt.gutterFiller.setAttribute("cm-not-content","true"),pt.lineDiv=we("div",null,"CodeMirror-code"),pt.selectionDiv=te("div",null,null,"position: relative; z-index: 1"),pt.cursorDiv=te("div",null,"CodeMirror-cursors"),pt.measure=te("div",null,"CodeMirror-measure"),pt.lineMeasure=te("div",null,"CodeMirror-measure"),pt.lineSpace=we("div",[pt.measure,pt.lineMeasure,pt.selectionDiv,pt.cursorDiv,pt.lineDiv],null,"position: relative; outline: none");var Nt=we("div",[pt.lineSpace],"CodeMirror-lines");pt.mover=te("div",[Nt],null,"position: relative"),pt.sizer=te("div",[pt.mover],"CodeMirror-sizer"),pt.sizerWidth=null,pt.heightForcer=te("div",null,null,"position: absolute; height: "+$n+"px; width: 1px;"),pt.gutters=te("div",null,"CodeMirror-gutters"),pt.lineGutter=null,pt.scroller=te("div",[pt.sizer,pt.heightForcer,pt.gutters],"CodeMirror-scroll"),pt.scroller.setAttribute("tabIndex","-1"),pt.wrapper=te("div",[pt.scrollbarFiller,pt.gutterFiller,pt.scroller],"CodeMirror"),fe&&Rt<8&&(pt.gutters.style.zIndex=-1,pt.scroller.style.paddingRight=0),!ie&&!(St&&et)&&(pt.scroller.draggable=!0),it&&(it.appendChild?it.appendChild(pt.wrapper):it(pt.wrapper)),pt.viewFrom=pt.viewTo=st.first,pt.reportedViewFrom=pt.reportedViewTo=st.first,pt.view=[],pt.renderedView=null,pt.externalMeasured=null,pt.viewOffset=0,pt.lastWrapHeight=pt.lastWrapWidth=0,pt.updateLineNumbers=null,pt.nativeBarWidth=pt.barHeight=pt.barWidth=0,pt.scrollbarsClipped=!1,pt.lineNumWidth=pt.lineNumInnerWidth=pt.lineNumChars=null,pt.alignWidgets=!1,pt.cachedCharWidth=pt.cachedTextHeight=pt.cachedPaddingH=null,pt.maxLine=null,pt.maxLineLength=0,pt.maxLineChanged=!1,pt.wheelDX=pt.wheelDY=pt.wheelStartX=pt.wheelStartY=null,pt.shift=!1,pt.selForContextMenu=null,pt.activeTouch=null,pt.gutterSpecs=Na(ht.gutters,ht.lineNumbers),gh(pt),ct.init(pt)}var bl=0,aa=null;fe?aa=-.53:St?aa=15:de?aa=-.7:Ie&&(aa=-1/3);function Mu(it){var st=it.wheelDeltaX,ct=it.wheelDeltaY;return st==null&&it.detail&&it.axis==it.HORIZONTAL_AXIS&&(st=it.detail),ct==null&&it.detail&&it.axis==it.VERTICAL_AXIS?ct=it.detail:ct==null&&(ct=it.wheelDelta),{x:st,y:ct}}function Tl(it){var st=Mu(it);return st.x*=aa,st.y*=aa,st}function Da(it,st){var ct=Mu(st),ht=ct.x,pt=ct.y,Nt=it.display,Kt=Nt.scroller,$t=Kt.scrollWidth>Kt.clientWidth,Jt=Kt.scrollHeight>Kt.clientHeight;if(ht&&$t||pt&&Jt){if(pt&&At&&ie){t:for(var ve=st.target,$e=Nt.view;ve!=Kt;ve=ve.parentNode)for(var Be=0;Be<$e.length;Be++)if($e[Be].node==ve){it.display.currentWheelTarget=ve;break t}}if(ht&&!St&&!zt&&aa!=null){pt&&Jt&&Pu(it,Math.max(0,Kt.scrollTop+pt*aa)),Fu(it,Math.max(0,Kt.scrollLeft+ht*aa)),(!pt||pt&&Jt)&&Xi(st),Nt.wheelStartX=null;return}if(pt&&aa!=null){var Fn=pt*aa,xn=it.doc.scrollTop,vi=xn+Nt.wrapper.clientHeight;Fn<0?xn=Math.max(0,xn+Fn-50):vi=Math.min(it.doc.height,vi+Fn+50),Lu(it,{top:xn,bottom:vi})}bl<20&&(Nt.wheelStartX==null?(Nt.wheelStartX=Kt.scrollLeft,Nt.wheelStartY=Kt.scrollTop,Nt.wheelDX=ht,Nt.wheelDY=pt,setTimeout(function(){if(Nt.wheelStartX!=null){var Ci=Kt.scrollLeft-Nt.wheelStartX,_i=Kt.scrollTop-Nt.wheelStartY,or=_i&&Nt.wheelDY&&_i/Nt.wheelDY||Ci&&Nt.wheelDX&&Ci/Nt.wheelDX;Nt.wheelStartX=Nt.wheelStartY=null,or&&(aa=(aa*bl+or)/(bl+1),++bl)}},200)):(Nt.wheelDX+=ht,Nt.wheelDY+=pt))}}var nu=function(it,st){this.ranges=it,this.primIndex=st};nu.prototype.primary=function(){return this.ranges[this.primIndex]},nu.prototype.equals=function(it){if(it==this)return!0;if(it.primIndex!=this.primIndex||it.ranges.length!=this.ranges.length)return!1;for(var st=0;st<this.ranges.length;st++){var ct=this.ranges[st],ht=it.ranges[st];if(!fi(ct.anchor,ht.anchor)||!fi(ct.head,ht.head))return!1}return!0},nu.prototype.deepCopy=function(){for(var it=[],st=0;st<this.ranges.length;st++)it[st]=new ms(ki(this.ranges[st].anchor),ki(this.ranges[st].head));return new nu(it,this.primIndex)},nu.prototype.somethingSelected=function(){for(var it=0;it<this.ranges.length;it++)if(!this.ranges[it].empty())return!0;return!1},nu.prototype.contains=function(it,st){st||(st=it);for(var ct=0;ct<this.ranges.length;ct++){var ht=this.ranges[ct];if(ei(st,ht.from())>=0&&ei(it,ht.to())<=0)return ct}return-1};var ms=function(it,st){this.anchor=it,this.head=st};ms.prototype.from=function(){return rn(this.anchor,this.head)},ms.prototype.to=function(){return Vi(this.anchor,this.head)},ms.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function ml(it,st,ct){var ht=it&&it.options.selectionsMayTouch,pt=st[ct];st.sort(function(Fn,xn){return ei(Fn.from(),xn.from())}),ct=gn(st,pt);for(var Nt=1;Nt<st.length;Nt++){var Kt=st[Nt],$t=st[Nt-1],Jt=ei($t.to(),Kt.from());if(ht&&!Kt.empty()?Jt>0:Jt>=0){var ve=rn($t.from(),Kt.from()),$e=Vi($t.to(),Kt.to()),Be=$t.empty()?Kt.from()==Kt.head:$t.from()==$t.head;Nt<=ct&&--ct,st.splice(--Nt,2,new ms(Be?$e:ve,Be?ve:$e))}}return new nu(st,ct)}function gA(it,st){return new nu([new ms(it,st||it)],0)}function OA(it){return it.text?qe(it.from.line+it.text.length-1,tn(it.text).length+(it.text.length==1?it.from.ch:0)):it.to}function HA(it,st){if(ei(it,st.from)<0)return it;if(ei(it,st.to)<=0)return OA(st);var ct=it.line+st.text.length-(st.to.line-st.from.line)-1,ht=it.ch;return it.line==st.to.line&&(ht+=OA(st).ch-st.to.ch),qe(ct,ht)}function Qc(it,st){for(var ct=[],ht=0;ht<it.sel.ranges.length;ht++){var pt=it.sel.ranges[ht];ct.push(new ms(HA(pt.anchor,st),HA(pt.head,st)))}return ml(it.cm,ct,it.sel.primIndex)}function Rh(it,st,ct){return it.line==st.line?qe(ct.line,it.ch-st.ch+ct.ch):qe(ct.line+(it.line-st.line),it.ch)}function Oc(it,st,ct){for(var ht=[],pt=qe(it.first,0),Nt=pt,Kt=0;Kt<st.length;Kt++){var $t=st[Kt],Jt=Rh($t.from,pt,Nt),ve=Rh(OA($t),pt,Nt);if(pt=$t.to,Nt=ve,ct=="around"){var $e=it.sel.ranges[Kt],Be=ei($e.head,$e.anchor)<0;ht[Kt]=new ms(Be?ve:Jt,Be?Jt:ve)}else ht[Kt]=new ms(Jt,Jt)}return new nu(ht,it.sel.primIndex)}function Mo(it){it.doc.mode=ln(it.options,it.doc.modeOption),Hc(it)}function Hc(it){it.doc.iter(function(st){st.stateAfter&&(st.stateAfter=null),st.styles&&(st.styles=null)}),it.doc.modeFrontier=it.doc.highlightFrontier=it.doc.first,DA(it,100),it.state.modeGen++,it.curOp&&ws(it)}function df(it,st){return st.from.ch==0&&st.to.ch==0&&tn(st.text)==""&&(!it.cm||it.cm.options.wholeLineUpdateBefore)}function Ld(it,st,ct,ht){function pt(Ir){return ct?ct[Ir]:null}function Nt(Ir,Sr,_r){yr(Ir,Sr,_r,ht),sr(Ir,"change",Ir,st)}function Kt(Ir,Sr){for(var _r=[],ho=Ir;ho<Sr;++ho)_r.push(new Mr(ve[ho],pt(ho),ht));return _r}var $t=st.from,Jt=st.to,ve=st.text,$e=Mn(it,$t.line),Be=Mn(it,Jt.line),Fn=tn(ve),xn=pt(ve.length-1),vi=Jt.line-$t.line;if(st.full)it.insert(0,Kt(0,ve.length)),it.remove(ve.length,it.size-ve.length);else if(df(it,st)){var Ci=Kt(0,ve.length-1);Nt(Be,Be.text,xn),vi&&it.remove($t.line,vi),Ci.length&&it.insert($t.line,Ci)}else if($e==Be)if(ve.length==1)Nt($e,$e.text.slice(0,$t.ch)+Fn+$e.text.slice(Jt.ch),xn);else{var _i=Kt(1,ve.length-1);_i.push(new Mr(Fn+$e.text.slice(Jt.ch),xn,ht)),Nt($e,$e.text.slice(0,$t.ch)+ve[0],pt(0)),it.insert($t.line+1,_i)}else if(ve.length==1)Nt($e,$e.text.slice(0,$t.ch)+ve[0]+Be.text.slice(Jt.ch),pt(0)),it.remove($t.line+1,vi);else{Nt($e,$e.text.slice(0,$t.ch)+ve[0],pt(0)),Nt(Be,Fn+Be.text.slice(Jt.ch),xn);var or=Kt(1,ve.length-1);vi>1&&it.remove($t.line+1,vi-1),it.insert($t.line+1,or)}sr(it,"change",it,st)}function ku(it,st,ct){function ht(pt,Nt,Kt){if(pt.linked)for(var $t=0;$t<pt.linked.length;++$t){var Jt=pt.linked[$t];if(Jt.doc!=Nt){var ve=Kt&&Jt.sharedHist;ct&&!ve||(st(Jt.doc,ve),ht(Jt.doc,pt,ve))}}}ht(it,null,!0)}function xa(it,st){if(st.cm)throw new Error("This document is already in use.");it.doc=st,st.cm=it,Vr(it),Mo(it),Rc(it),it.options.lineWrapping||Ni(it),it.options.mode=st.modeOption,ws(it)}function Rc(it){(it.doc.direction=="rtl"?en:Ot)(it.display.lineDiv,"CodeMirror-rtl")}function ep(it){ls(it,function(){Rc(it),ws(it)})}function _h(it){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=it||1}function Md(it,st){var ct={from:ki(st.from),to:OA(st),text:Di(it,st.from,st.to)};return RA(it,ct,st.from.line,st.to.line+1),ku(it,function(ht){return RA(ht,ct,st.from.line,st.to.line+1)},!0),ct}function Kh(it){for(;it.length;){var st=tn(it);if(st.ranges)it.pop();else break}}function Gh(it,st){if(st)return Kh(it.done),tn(it.done);if(it.done.length&&!tn(it.done).ranges)return tn(it.done);if(it.done.length>1&&!it.done[it.done.length-2].ranges)return it.done.pop(),tn(it.done)}function _c(it,st,ct,ht){var pt=it.history;pt.undone.length=0;var Nt=+new Date,Kt,$t;if((pt.lastOp==ht||pt.lastOrigin==st.origin&&st.origin&&(st.origin.charAt(0)=="+"&&pt.lastModTime>Nt-(it.cm?it.cm.options.historyEventDelay:500)||st.origin.charAt(0)=="*"))&&(Kt=Gh(pt,pt.lastOp==ht)))$t=tn(Kt.changes),ei(st.from,st.to)==0&&ei(st.from,$t.to)==0?$t.to=OA(st):Kt.changes.push(Md(it,st));else{var Jt=tn(pt.done);for((!Jt||!Jt.ranges)&&zh(it.sel,pt.done),Kt={changes:[Md(it,st)],generation:pt.generation},pt.done.push(Kt);pt.done.length>pt.undoDepth;)pt.done.shift(),pt.done[0].ranges||pt.done.shift()}pt.done.push(ct),pt.generation=++pt.maxGeneration,pt.lastModTime=pt.lastSelTime=Nt,pt.lastOp=pt.lastSelOp=ht,pt.lastOrigin=pt.lastSelOrigin=st.origin,$t||Ai(it,"historyAdded")}function ff(it,st,ct,ht){var pt=st.charAt(0);return pt=="*"||pt=="+"&&ct.ranges.length==ht.ranges.length&&ct.somethingSelected()==ht.somethingSelected()&&new Date-it.history.lastSelTime<=(it.cm?it.cm.options.historyEventDelay:500)}function Kc(it,st,ct,ht){var pt=it.history,Nt=ht&&ht.origin;ct==pt.lastSelOp||Nt&&pt.lastSelOrigin==Nt&&(pt.lastModTime==pt.lastSelTime&&pt.lastOrigin==Nt||ff(it,Nt,tn(pt.done),st))?pt.done[pt.done.length-1]=st:zh(st,pt.done),pt.lastSelTime=+new Date,pt.lastSelOrigin=Nt,pt.lastSelOp=ct,ht&&ht.clearRedo!==!1&&Kh(pt.undone)}function zh(it,st){var ct=tn(st);ct&&ct.ranges&&ct.equals(it)||st.push(it)}function RA(it,st,ct,ht){var pt=st["spans_"+it.id],Nt=0;it.iter(Math.max(it.first,ct),Math.min(it.first+it.size,ht),function(Kt){Kt.markedSpans&&((pt||(pt=st["spans_"+it.id]={}))[Nt]=Kt.markedSpans),++Nt})}function al(it){if(!it)return null;for(var st,ct=0;ct<it.length;++ct)it[ct].marker.explicitlyCleared?st||(st=it.slice(0,ct)):st&&st.push(it[ct]);return st?st.length?st:null:it}function bu(it,st){var ct=st["spans_"+it.id];if(!ct)return null;for(var ht=[],pt=0;pt<st.text.length;++pt)ht.push(al(ct[pt]));return ht}function Wr(it,st){var ct=bu(it,st),ht=ci(it,st);if(!ct)return ht;if(!ht)return ct;for(var pt=0;pt<ct.length;++pt){var Nt=ct[pt],Kt=ht[pt];if(Nt&&Kt)t:for(var $t=0;$t<Kt.length;++$t){for(var Jt=Kt[$t],ve=0;ve<Nt.length;++ve)if(Nt[ve].marker==Jt.marker)continue t;Nt.push(Jt)}else Kt&&(ct[pt]=Kt)}return ct}function pA(it,st,ct){for(var ht=[],pt=0;pt<it.length;++pt){var Nt=it[pt];if(Nt.ranges){ht.push(ct?nu.prototype.deepCopy.call(Nt):Nt);continue}var Kt=Nt.changes,$t=[];ht.push({changes:$t});for(var Jt=0;Jt<Kt.length;++Jt){var ve=Kt[Jt],$e=void 0;if($t.push({from:ve.from,to:ve.to,text:ve.text}),st)for(var Be in ve)($e=Be.match(/^spans_(\d+)$/))&&gn(st,Number($e[1]))>-1&&(tn($t)[Be]=ve[Be],delete ve[Be])}}return ht}function kd(it,st,ct,ht){if(ht){var pt=it.anchor;if(ct){var Nt=ei(st,pt)<0;Nt!=ei(ct,pt)<0?(pt=st,st=ct):Nt!=ei(st,ct)<0&&(st=ct)}return new ms(pt,st)}else return new ms(ct||st,st)}function jh(it,st,ct,ht,pt){pt==null&&(pt=it.cm&&(it.cm.display.shift||it.extend)),Za(it,new nu([kd(it.sel.primary(),st,ct,pt)],0),ht)}function Tu(it,st,ct){for(var ht=[],pt=it.cm&&(it.cm.display.shift||it.extend),Nt=0;Nt<it.sel.ranges.length;Nt++)ht[Nt]=kd(it.sel.ranges[Nt],st[Nt],null,pt);var Kt=ml(it.cm,ht,it.sel.primIndex);Za(it,Kt,ct)}function _A(it,st,ct,ht){var pt=it.sel.ranges.slice(0);pt[st]=ct,Za(it,ml(it.cm,pt,it.sel.primIndex),ht)}function KA(it,st,ct,ht){Za(it,gA(st,ct),ht)}function Vh(it,st,ct){var ht={ranges:st.ranges,update:function(pt){this.ranges=[];for(var Nt=0;Nt<pt.length;Nt++)this.ranges[Nt]=new ms(fn(it,pt[Nt].anchor),fn(it,pt[Nt].head))},origin:ct&&ct.origin};return Ai(it,"beforeSelectionChange",it,ht),it.cm&&Ai(it.cm,"beforeSelectionChange",it.cm,ht),ht.ranges!=st.ranges?ml(it.cm,ht.ranges,ht.ranges.length-1):st}function ph(it,st,ct){var ht=it.history.done,pt=tn(ht);pt&&pt.ranges?(ht[ht.length-1]=st,mh(it,st,ct)):Za(it,st,ct)}function Za(it,st,ct){mh(it,st,ct),Kc(it,it.sel,it.cm?it.cm.curOp.id:NaN,ct)}function mh(it,st,ct){(Fi(it,"beforeSelectionChange")||it.cm&&Fi(it.cm,"beforeSelectionChange"))&&(st=Vh(it,st,ct));var ht=ct&&ct.bias||(ei(st.primary().head,it.sel.primary().head)<0?-1:1);gf(it,vh(it,st,ht,!0)),!(ct&&ct.scroll===!1)&&it.cm&&gu(it.cm)}function gf(it,st){st.equals(it.sel)||(it.sel=st,it.cm&&(it.cm.curOp.updateInput=1,it.cm.curOp.selectionChanged=!0,ur(it.cm)),sr(it,"cursorActivity",it))}function Nu(it){gf(it,vh(it,it.sel,null,!1))}function vh(it,st,ct,ht){for(var pt,Nt=0;Nt<st.ranges.length;Nt++){var Kt=st.ranges[Nt],$t=st.ranges.length==it.sel.ranges.length&&it.sel.ranges[Nt],Jt=Gc(it,Kt.anchor,$t&&$t.anchor,ct,ht),ve=Gc(it,Kt.head,$t&&$t.head,ct,ht);(pt||Jt!=Kt.anchor||ve!=Kt.head)&&(pt||(pt=st.ranges.slice(0,Nt)),pt[Nt]=new ms(Jt,ve))}return pt?ml(it.cm,pt,st.primIndex):st}function Du(it,st,ct,ht,pt){var Nt=Mn(it,st.line);if(Nt.markedSpans)for(var Kt=0;Kt<Nt.markedSpans.length;++Kt){var $t=Nt.markedSpans[Kt],Jt=$t.marker,ve="selectLeft"in Jt?!Jt.selectLeft:Jt.inclusiveLeft,$e="selectRight"in Jt?!Jt.selectRight:Jt.inclusiveRight;if(($t.from==null||(ve?$t.from<=st.ch:$t.from<st.ch))&&($t.to==null||($e?$t.to>=st.ch:$t.to>st.ch))){if(pt&&(Ai(Jt,"beforeCursorEnter"),Jt.explicitlyCleared))if(Nt.markedSpans){--Kt;continue}else break;if(!Jt.atomic)continue;if(ct){var Be=Jt.find(ht<0?1:-1),Fn=void 0;if((ht<0?$e:ve)&&(Be=bd(it,Be,-ht,Be&&Be.line==st.line?Nt:null)),Be&&Be.line==st.line&&(Fn=ei(Be,ct))&&(ht<0?Fn<0:Fn>0))return Du(it,Be,st,ht,pt)}var xn=Jt.find(ht<0?-1:1);return(ht<0?ve:$e)&&(xn=bd(it,xn,ht,xn.line==st.line?Nt:null)),xn?Du(it,xn,st,ht,pt):null}}return st}function Gc(it,st,ct,ht,pt){var Nt=ht||1,Kt=Du(it,st,ct,Nt,pt)||!pt&&Du(it,st,ct,Nt,!0)||Du(it,st,ct,-Nt,pt)||!pt&&Du(it,st,ct,-Nt,!0);return Kt||(it.cantEdit=!0,qe(it.first,0))}function bd(it,st,ct,ht){return ct<0&&st.ch==0?st.line>it.first?fn(it,qe(st.line-1)):null:ct>0&&st.ch==(ht||Mn(it,st.line)).text.length?st.line<it.first+it.size-1?qe(st.line+1,0):null:new qe(st.line,st.ch+ct)}function la(it){it.setSelection(qe(it.firstLine(),0),qe(it.lastLine()),nn)}function yh(it,st,ct){var ht={canceled:!1,from:st.from,to:st.to,text:st.text,origin:st.origin,cancel:function(){return ht.canceled=!0}};return ct&&(ht.update=function(pt,Nt,Kt,$t){pt&&(ht.from=fn(it,pt)),Nt&&(ht.to=fn(it,Nt)),Kt&&(ht.text=Kt),$t!==void 0&&(ht.origin=$t)}),Ai(it,"beforeChange",it,ht),it.cm&&Ai(it.cm,"beforeChange",it.cm,ht),ht.canceled?(it.cm&&(it.cm.curOp.updateInput=2),null):{from:ht.from,to:ht.to,text:ht.text,origin:ht.origin}}function GA(it,st,ct){if(it.cm){if(!it.cm.curOp)return wa(it.cm,GA)(it,st,ct);if(it.cm.state.suppressEdits)return}if(!((Fi(it,"beforeChange")||it.cm&&Fi(it.cm,"beforeChange"))&&(st=yh(it,st,!0),!st))){var ht=he&&!ct&&An(it,st.from,st.to);if(ht)for(var pt=ht.length-1;pt>=0;--pt)wh(it,{from:ht[pt].from,to:ht[pt].to,text:pt?[""]:st.text,origin:st.origin});else wh(it,st)}}function wh(it,st){if(!(st.text.length==1&&st.text[0]==""&&ei(st.from,st.to)==0)){var ct=Qc(it,st);_c(it,st,ct,it.cm?it.cm.curOp.id:NaN),Zh(it,st,ct,ci(it,st));var ht=[];ku(it,function(pt,Nt){!Nt&&gn(ht,pt.history)==-1&&(vf(pt.history,st),ht.push(pt.history)),Zh(pt,st,null,ci(pt,st))})}}function zc(it,st,ct){var ht=it.cm&&it.cm.state.suppressEdits;if(!(ht&&!ct)){for(var pt=it.history,Nt,Kt=it.sel,$t=st=="undo"?pt.done:pt.undone,Jt=st=="undo"?pt.undone:pt.done,ve=0;ve<$t.length&&(Nt=$t[ve],!(ct?Nt.ranges&&!Nt.equals(it.sel):!Nt.ranges));ve++);if(ve!=$t.length){for(pt.lastOrigin=pt.lastSelOrigin=null;;)if(Nt=$t.pop(),Nt.ranges){if(zh(Nt,Jt),ct&&!Nt.equals(it.sel)){Za(it,Nt,{clearRedo:!1});return}Kt=Nt}else if(ht){$t.push(Nt);return}else break;var $e=[];zh(Kt,Jt),Jt.push({changes:$e,generation:pt.generation}),pt.generation=Nt.generation||++pt.maxGeneration;for(var Be=Fi(it,"beforeChange")||it.cm&&Fi(it.cm,"beforeChange"),Fn=function(Ci){var _i=Nt.changes[Ci];if(_i.origin=st,Be&&!yh(it,_i,!1))return $t.length=0,{};$e.push(Md(it,_i));var or=Ci?Qc(it,_i):tn($t);Zh(it,_i,or,Wr(it,_i)),!Ci&&it.cm&&it.cm.scrollIntoView({from:_i.from,to:OA(_i)});var Ir=[];ku(it,function(Sr,_r){!_r&&gn(Ir,Sr.history)==-1&&(vf(Sr.history,_i),Ir.push(Sr.history)),Zh(Sr,_i,null,Wr(Sr,_i))})},xn=Nt.changes.length-1;xn>=0;--xn){var vi=Fn(xn);if(vi)return vi.v}}}}function pf(it,st){if(st!=0&&(it.first+=st,it.sel=new nu(ti(it.sel.ranges,function(pt){return new ms(qe(pt.anchor.line+st,pt.anchor.ch),qe(pt.head.line+st,pt.head.ch))}),it.sel.primIndex),it.cm)){ws(it.cm,it.first,it.first-st,st);for(var ct=it.cm.display,ht=ct.viewFrom;ht<ct.viewTo;ht++)vo(it.cm,ht,"gutter")}}function Zh(it,st,ct,ht){if(it.cm&&!it.cm.curOp)return wa(it.cm,Zh)(it,st,ct,ht);if(st.to.line<it.first){pf(it,st.text.length-1-(st.to.line-st.from.line));return}if(!(st.from.line>it.lastLine())){if(st.from.line<it.first){var pt=st.text.length-1-(it.first-st.from.line);pf(it,pt),st={from:qe(it.first,0),to:qe(st.to.line+pt,st.to.ch),text:[tn(st.text)],origin:st.origin}}var Nt=it.lastLine();st.to.line>Nt&&(st={from:st.from,to:qe(Nt,Mn(it,Nt).text.length),text:[st.text[0]],origin:st.origin}),st.removed=Di(it,st.from,st.to),ct||(ct=Qc(it,st)),it.cm?ug(it.cm,st,ht):Ld(it,st,ht),mh(it,ct,nn),it.cantEdit&&Gc(it,qe(it.firstLine(),0))&&(it.cantEdit=!1)}}function ug(it,st,ct){var ht=it.doc,pt=it.display,Nt=st.from,Kt=st.to,$t=!1,Jt=Nt.line;it.options.lineWrapping||(Jt=le(Qe(Mn(ht,Nt.line))),ht.iter(Jt,Kt.line+1,function(xn){if(xn==pt.maxLine)return $t=!0,!0})),ht.sel.contains(st.from,st.to)>-1&&ur(it),Ld(ht,st,ct,Cs(it)),it.options.lineWrapping||(ht.iter(Jt,Nt.line+st.text.length,function(xn){var vi=nr(xn);vi>pt.maxLineLength&&(pt.maxLine=xn,pt.maxLineLength=vi,pt.maxLineChanged=!0,$t=!1)}),$t&&(it.curOp.updateMaxLine=!0)),re(ht,Nt.line),DA(it,400);var ve=st.text.length-(Kt.line-Nt.line)-1;st.full?ws(it):Nt.line==Kt.line&&st.text.length==1&&!df(it.doc,st)?vo(it,Nt.line,"text"):ws(it,Nt.line,Kt.line+1,ve);var $e=Fi(it,"changes"),Be=Fi(it,"change");if(Be||$e){var Fn={from:Nt,to:Kt,text:st.text,removed:st.removed,origin:st.origin};Be&&sr(it,"change",it,Fn),$e&&(it.curOp.changeObjs||(it.curOp.changeObjs=[])).push(Fn)}it.display.selForContextMenu=null}function xh(it,st,ct,ht,pt){var Nt;ht||(ht=ct),ei(ht,ct)<0&&(Nt=[ht,ct],ct=Nt[0],ht=Nt[1]),typeof st=="string"&&(st=it.splitLines(st)),GA(it,{from:ct,to:ht,text:st,origin:pt})}function iu(it,st,ct,ht){ct<it.line?it.line+=ht:st<it.line&&(it.line=st,it.ch=0)}function mf(it,st,ct,ht){for(var pt=0;pt<it.length;++pt){var Nt=it[pt],Kt=!0;if(Nt.ranges){Nt.copied||(Nt=it[pt]=Nt.deepCopy(),Nt.copied=!0);for(var $t=0;$t<Nt.ranges.length;$t++)iu(Nt.ranges[$t].anchor,st,ct,ht),iu(Nt.ranges[$t].head,st,ct,ht);continue}for(var Jt=0;Jt<Nt.changes.length;++Jt){var ve=Nt.changes[Jt];if(ct<ve.from.line)ve.from=qe(ve.from.line+ht,ve.from.ch),ve.to=qe(ve.to.line+ht,ve.to.ch);else if(st<=ve.to.line){Kt=!1;break}}Kt||(it.splice(0,pt+1),pt=0)}}function vf(it,st){var ct=st.from.line,ht=st.to.line,pt=st.text.length-(ht-ct)-1;mf(it.done,ct,ht,pt),mf(it.undone,ct,ht,pt)}function Sh(it,st,ct,ht){var pt=st,Nt=st;return typeof st=="number"?Nt=Mn(it,Ve(it,st)):pt=le(st),pt==null?null:(ht(Nt,pt)&&it.cm&&vo(it.cm,pt,ct),Nt)}function Wh(it){this.lines=it,this.parent=null;for(var st=0,ct=0;ct<it.length;++ct)it[ct].parent=this,st+=it[ct].height;this.height=st}Wh.prototype={chunkSize:function(){return this.lines.length},removeInner:function(it,st){for(var ct=it,ht=it+st;ct<ht;++ct){var pt=this.lines[ct];this.height-=pt.height,Zr(pt),sr(pt,"delete")}this.lines.splice(it,st)},collapse:function(it){it.push.apply(it,this.lines)},insertInner:function(it,st,ct){this.height+=ct,this.lines=this.lines.slice(0,it).concat(st).concat(this.lines.slice(it));for(var ht=0;ht<st.length;++ht)st[ht].parent=this},iterN:function(it,st,ct){for(var ht=it+st;it<ht;++it)if(ct(this.lines[it]))return!0}};function Vs(it){this.children=it;for(var st=0,ct=0,ht=0;ht<it.length;++ht){var pt=it[ht];st+=pt.chunkSize(),ct+=pt.height,pt.parent=this}this.size=st,this.height=ct,this.parent=null}Vs.prototype={chunkSize:function(){return this.size},removeInner:function(it,st){this.size-=st;for(var ct=0;ct<this.children.length;++ct){var ht=this.children[ct],pt=ht.chunkSize();if(it<pt){var Nt=Math.min(st,pt-it),Kt=ht.height;if(ht.removeInner(it,Nt),this.height-=Kt-ht.height,pt==Nt&&(this.children.splice(ct--,1),ht.parent=null),(st-=Nt)==0)break;it=0}else it-=pt}if(this.size-st<25&&(this.children.length>1||!(this.children[0]instanceof Wh))){var $t=[];this.collapse($t),this.children=[new Wh($t)],this.children[0].parent=this}},collapse:function(it){for(var st=0;st<this.children.length;++st)this.children[st].collapse(it)},insertInner:function(it,st,ct){this.size+=st.length,this.height+=ct;for(var ht=0;ht<this.children.length;++ht){var pt=this.children[ht],Nt=pt.chunkSize();if(it<=Nt){if(pt.insertInner(it,st,ct),pt.lines&&pt.lines.length>50){for(var Kt=pt.lines.length%25+25,$t=Kt;$t<pt.lines.length;){var Jt=new Wh(pt.lines.slice($t,$t+=25));pt.height-=Jt.height,this.children.splice(++ht,0,Jt),Jt.parent=this}pt.lines=pt.lines.slice(0,Kt),this.maybeSpill()}break}it-=Nt}},maybeSpill:function(){if(!(this.children.length<=10)){var it=this;do{var st=it.children.splice(it.children.length-5,5),ct=new Vs(st);if(it.parent){it.size-=ct.size,it.height-=ct.height;var pt=gn(it.parent.children,it);it.parent.children.splice(pt+1,0,ct)}else{var ht=new Vs(it.children);ht.parent=it,it.children=[ht,ct],it=ht}ct.parent=it.parent}while(it.children.length>10);it.parent.maybeSpill()}},iterN:function(it,st,ct){for(var ht=0;ht<this.children.length;++ht){var pt=this.children[ht],Nt=pt.chunkSize();if(it<Nt){var Kt=Math.min(st,Nt-it);if(pt.iterN(it,Kt,ct))return!0;if((st-=Kt)==0)break;it=0}else it-=Nt}}};var mA=function(it,st,ct){if(ct)for(var ht in ct)ct.hasOwnProperty(ht)&&(this[ht]=ct[ht]);this.doc=it,this.node=st};mA.prototype.clear=function(){var it=this.doc.cm,st=this.line.widgets,ct=this.line,ht=le(ct);if(!(ht==null||!st)){for(var pt=0;pt<st.length;++pt)st[pt]==this&&st.splice(pt--,1);st.length||(ct.widgets=null);var Nt=Qi(this);Vn(ct,Math.max(0,ct.height-Nt)),it&&(ls(it,function(){jc(it,ct,-Nt),vo(it,ht,"widget")}),sr(it,"lineWidgetCleared",it,this,ht))}},mA.prototype.changed=function(){var it=this,st=this.height,ct=this.doc.cm,ht=this.line;this.height=null;var pt=Qi(this)-st;pt&&(on(this.doc,ht)||Vn(ht,ht.height+pt),ct&&ls(ct,function(){ct.curOp.forceUpdate=!0,jc(ct,ht,pt),sr(ct,"lineWidgetChanged",ct,it,le(ht))}))},zi(mA);function jc(it,st,ct){Ii(st)<(it.curOp&&it.curOp.scrollTop||it.doc.scrollTop)&&ch(it,ct)}function Td(it,st,ct,ht){var pt=new mA(it,ct,ht),Nt=it.cm;return Nt&&pt.noHScroll&&(Nt.display.alignWidgets=!0),Sh(it,st,"widget",function(Kt){var $t=Kt.widgets||(Kt.widgets=[]);if(pt.insertAt==null?$t.push(pt):$t.splice(Math.min($t.length-1,Math.max(0,pt.insertAt)),0,pt),pt.line=Kt,Nt&&!on(it,Kt)){var Jt=Ii(Kt)<it.scrollTop;Vn(Kt,Kt.height+Qi(pt)),Jt&&ch(Nt,pt.height),Nt.curOp.forceUpdate=!0}return!0}),Nt&&sr(Nt,"lineWidgetAdded",Nt,pt,typeof st=="number"?st:le(st)),pt}var Nd=0,He=function(it,st){this.lines=[],this.type=st,this.doc=it,this.id=++Nd};He.prototype.clear=function(){if(!this.explicitlyCleared){var it=this.doc.cm,st=it&&!it.curOp;if(st&&zl(it),Fi(this,"clear")){var ct=this.find();ct&&sr(this,"clear",ct.from,ct.to)}for(var ht=null,pt=null,Nt=0;Nt<this.lines.length;++Nt){var Kt=this.lines[Nt],$t=Jn(Kt.markedSpans,this);it&&!this.collapsed?vo(it,le(Kt),"text"):it&&($t.to!=null&&(pt=le(Kt)),$t.from!=null&&(ht=le(Kt))),Kt.markedSpans=ii(Kt.markedSpans,$t),$t.from==null&&this.collapsed&&!on(this.doc,Kt)&&it&&Vn(Kt,ra(it.display))}if(it&&this.collapsed&&!it.options.lineWrapping)for(var Jt=0;Jt<this.lines.length;++Jt){var ve=Qe(this.lines[Jt]),$e=nr(ve);$e>it.display.maxLineLength&&(it.display.maxLine=ve,it.display.maxLineLength=$e,it.display.maxLineChanged=!0)}ht!=null&&it&&this.collapsed&&ws(it,ht,pt+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,it&&Nu(it.doc)),it&&sr(it,"markerCleared",it,this,ht,pt),st&&mu(it),this.parent&&this.parent.clear()}},He.prototype.find=function(it,st){it==null&&this.type=="bookmark"&&(it=1);for(var ct,ht,pt=0;pt<this.lines.length;++pt){var Nt=this.lines[pt],Kt=Jn(Nt.markedSpans,this);if(Kt.from!=null&&(ct=qe(st?Nt:le(Nt),Kt.from),it==-1))return ct;if(Kt.to!=null&&(ht=qe(st?Nt:le(Nt),Kt.to),it==1))return ht}return ct&&{from:ct,to:ht}},He.prototype.changed=function(){var it=this,st=this.find(-1,!0),ct=this,ht=this.doc.cm;!st||!ht||ls(ht,function(){var pt=st.line,Nt=le(st.line),Kt=ma(ht,Nt);if(Kt&&(ca(Kt),ht.curOp.selectionChanged=ht.curOp.forceUpdate=!0),ht.curOp.updateMaxLine=!0,!on(ct.doc,pt)&&ct.height!=null){var $t=ct.height;ct.height=null;var Jt=Qi(ct)-$t;Jt&&Vn(pt,pt.height+Jt)}sr(ht,"markerChanged",ht,it)})},He.prototype.attachLine=function(it){if(!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(!st.maybeHiddenMarkers||gn(st.maybeHiddenMarkers,this)==-1)&&(st.maybeUnhiddenMarkers||(st.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(it)},He.prototype.detachLine=function(it){if(this.lines.splice(gn(this.lines,it),1),!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(st.maybeHiddenMarkers||(st.maybeHiddenMarkers=[])).push(this)}},zi(He);function zA(it,st,ct,ht,pt){if(ht&&ht.shared)return Ag(it,st,ct,ht,pt);if(it.cm&&!it.cm.curOp)return wa(it.cm,zA)(it,st,ct,ht,pt);var Nt=new He(it,pt),Kt=ei(st,ct);if(ht&&Kn(ht,Nt,!1),Kt>0||Kt==0&&Nt.clearWhenEmpty!==!1)return Nt;if(Nt.replacedWith&&(Nt.collapsed=!0,Nt.widgetNode=we("span",[Nt.replacedWith],"CodeMirror-widget"),ht.handleMouseEvents||Nt.widgetNode.setAttribute("cm-ignore-events","true"),ht.insertLeft&&(Nt.widgetNode.insertLeft=!0)),Nt.collapsed){if(Ln(it,st.line,st,ct,Nt)||st.line!=ct.line&&Ln(it,ct.line,st,ct,Nt))throw new Error("Inserting collapsed marker partially overlapping an existing one");Fe()}Nt.addToHistory&&_c(it,{from:st,to:ct,origin:"markText"},it.sel,NaN);var $t=st.line,Jt=it.cm,ve;if(it.iter($t,ct.line+1,function(Be){Jt&&Nt.collapsed&&!Jt.options.lineWrapping&&Qe(Be)==Jt.display.maxLine&&(ve=!0),Nt.collapsed&&$t!=st.line&&Vn(Be,0),Mi(Be,new an(Nt,$t==st.line?st.ch:null,$t==ct.line?ct.ch:null)),++$t}),Nt.collapsed&&it.iter(st.line,ct.line+1,function(Be){on(it,Be)&&Vn(Be,0)}),Nt.clearOnEnter&&Dn(Nt,"beforeCursorEnter",function(){return Nt.clear()}),Nt.readOnly&&(Xe(),(it.history.done.length||it.history.undone.length)&&it.clearHistory()),Nt.collapsed&&(Nt.id=++Nd,Nt.atomic=!0),Jt){if(ve&&(Jt.curOp.updateMaxLine=!0),Nt.collapsed)ws(Jt,st.line,ct.line+1);else if(Nt.className||Nt.startStyle||Nt.endStyle||Nt.css||Nt.attributes||Nt.title)for(var $e=st.line;$e<=ct.line;$e++)vo(Jt,$e,"text");Nt.atomic&&Nu(Jt.doc),sr(Jt,"markerAdded",Jt,Nt)}return Nt}var Iu=function(it,st){this.markers=it,this.primary=st;for(var ct=0;ct<it.length;++ct)it[ct].parent=this};Iu.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var it=0;it<this.markers.length;++it)this.markers[it].clear();sr(this,"clear")}},Iu.prototype.find=function(it,st){return this.primary.find(it,st)},zi(Iu);function Ag(it,st,ct,ht,pt){ht=Kn(ht),ht.shared=!1;var Nt=[zA(it,st,ct,ht,pt)],Kt=Nt[0],$t=ht.widgetNode;return ku(it,function(Jt){$t&&(ht.widgetNode=$t.cloneNode(!0)),Nt.push(zA(Jt,fn(Jt,st),fn(Jt,ct),ht,pt));for(var ve=0;ve<Jt.linked.length;++ve)if(Jt.linked[ve].isParent)return;Kt=tn(Nt)}),new Iu(Nt,Kt)}function Dd(it){return it.findMarks(qe(it.first,0),it.clipPos(qe(it.lastLine())),function(st){return st.parent})}function Id(it,st){for(var ct=0;ct<st.length;ct++){var ht=st[ct],pt=ht.find(),Nt=it.clipPos(pt.from),Kt=it.clipPos(pt.to);if(ei(Nt,Kt)){var $t=zA(it,Nt,Kt,ht.primary,ht.primary.type);ht.markers.push($t),$t.parent=ht}}}function Vc(it){for(var st=function(ht){var pt=it[ht],Nt=[pt.primary.doc];ku(pt.primary.doc,function(Jt){return Nt.push(Jt)});for(var Kt=0;Kt<pt.markers.length;Kt++){var $t=pt.markers[Kt];gn(Nt,$t.doc)==-1&&($t.parent=null,pt.markers.splice(Kt--,1))}},ct=0;ct<it.length;ct++)st(ct)}var hg=0,Ia=function(it,st,ct,ht,pt){if(!(this instanceof Ia))return new Ia(it,st,ct,ht,pt);ct==null&&(ct=0),Vs.call(this,[new Wh([new Mr("",null)])]),this.first=ct,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ct;var Nt=qe(ct,0);this.sel=gA(Nt),this.history=new _h(null),this.id=++hg,this.modeOption=st,this.lineSep=ht,this.direction=pt=="rtl"?"rtl":"ltr",this.extend=!1,typeof it=="string"&&(it=this.splitLines(it)),Ld(this,{from:Nt,to:Nt,text:it}),Za(this,gA(Nt),nn)};Ia.prototype=Ft(Vs.prototype,{constructor:Ia,iter:function(it,st,ct){ct?this.iterN(it-this.first,st-it,ct):this.iterN(this.first,this.first+this.size,it)},insert:function(it,st){for(var ct=0,ht=0;ht<st.length;++ht)ct+=st[ht].height;this.insertInner(it-this.first,st,ct)},remove:function(it,st){this.removeInner(it-this.first,st)},getValue:function(it){var st=pr(this,this.first,this.first+this.size);return it===!1?st:st.join(it||this.lineSeparator())},setValue:Ta(function(it){var st=qe(this.first,0),ct=this.first+this.size-1;GA(this,{from:st,to:qe(ct,Mn(this,ct).text.length),text:this.splitLines(it),origin:"setValue",full:!0},!0),this.cm&&pu(this.cm,0,0),Za(this,gA(st),nn)}),replaceRange:function(it,st,ct,ht){st=fn(this,st),ct=ct?fn(this,ct):st,xh(this,it,st,ct,ht)},getRange:function(it,st,ct){var ht=Di(this,fn(this,it),fn(this,st));return ct===!1?ht:ht.join(ct||this.lineSeparator())},getLine:function(it){var st=this.getLineHandle(it);return st&&st.text},getLineHandle:function(it){if(Xn(this,it))return Mn(this,it)},getLineNumber:function(it){return le(it)},getLineHandleVisualStart:function(it){return typeof it=="number"&&(it=Mn(this,it)),Qe(it)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(it){return fn(this,it)},getCursor:function(it){var st=this.sel.primary(),ct;return it==null||it=="head"?ct=st.head:it=="anchor"?ct=st.anchor:it=="end"||it=="to"||it===!1?ct=st.to():ct=st.from(),ct},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Ta(function(it,st,ct){KA(this,fn(this,typeof it=="number"?qe(it,st||0):it),null,ct)}),setSelection:Ta(function(it,st,ct){KA(this,fn(this,it),fn(this,st||it),ct)}),extendSelection:Ta(function(it,st,ct){jh(this,fn(this,it),st&&fn(this,st),ct)}),extendSelections:Ta(function(it,st){Tu(this,Pi(this,it),st)}),extendSelectionsBy:Ta(function(it,st){var ct=ti(this.sel.ranges,it);Tu(this,Pi(this,ct),st)}),setSelections:Ta(function(it,st,ct){if(it.length){for(var ht=[],pt=0;pt<it.length;pt++)ht[pt]=new ms(fn(this,it[pt].anchor),fn(this,it[pt].head));st==null&&(st=Math.min(it.length-1,this.sel.primIndex)),Za(this,ml(this.cm,ht,st),ct)}}),addSelection:Ta(function(it,st,ct){var ht=this.sel.ranges.slice(0);ht.push(new ms(fn(this,it),fn(this,st||it))),Za(this,ml(this.cm,ht,ht.length-1),ct)}),getSelection:function(it){for(var st=this.sel.ranges,ct,ht=0;ht<st.length;ht++){var pt=Di(this,st[ht].from(),st[ht].to());ct=ct?ct.concat(pt):pt}return it===!1?ct:ct.join(it||this.lineSeparator())},getSelections:function(it){for(var st=[],ct=this.sel.ranges,ht=0;ht<ct.length;ht++){var pt=Di(this,ct[ht].from(),ct[ht].to());it!==!1&&(pt=pt.join(it||this.lineSeparator())),st[ht]=pt}return st},replaceSelection:function(it,st,ct){for(var ht=[],pt=0;pt<this.sel.ranges.length;pt++)ht[pt]=it;this.replaceSelections(ht,st,ct||"+input")},replaceSelections:Ta(function(it,st,ct){for(var ht=[],pt=this.sel,Nt=0;Nt<pt.ranges.length;Nt++){var Kt=pt.ranges[Nt];ht[Nt]={from:Kt.from(),to:Kt.to(),text:this.splitLines(it[Nt]),origin:ct}}for(var $t=st&&st!="end"&&Oc(this,ht,st),Jt=ht.length-1;Jt>=0;Jt--)GA(this,ht[Jt]);$t?ph(this,$t):this.cm&&gu(this.cm)}),undo:Ta(function(){zc(this,"undo")}),redo:Ta(function(){zc(this,"redo")}),undoSelection:Ta(function(){zc(this,"undo",!0)}),redoSelection:Ta(function(){zc(this,"redo",!0)}),setExtending:function(it){this.extend=it},getExtending:function(){return this.extend},historySize:function(){for(var it=this.history,st=0,ct=0,ht=0;ht<it.done.length;ht++)it.done[ht].ranges||++st;for(var pt=0;pt<it.undone.length;pt++)it.undone[pt].ranges||++ct;return{undo:st,redo:ct}},clearHistory:function(){var it=this;this.history=new _h(this.history.maxGeneration),ku(this,function(st){return st.history=it.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(it){return it&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(it){return this.history.generation==(it||this.cleanGeneration)},getHistory:function(){return{done:pA(this.history.done),undone:pA(this.history.undone)}},setHistory:function(it){var st=this.history=new _h(this.history.maxGeneration);st.done=pA(it.done.slice(0),null,!0),st.undone=pA(it.undone.slice(0),null,!0)},setGutterMarker:Ta(function(it,st,ct){return Sh(this,it,"gutter",function(ht){var pt=ht.gutterMarkers||(ht.gutterMarkers={});return pt[st]=ct,!ct&&Ct(pt)&&(ht.gutterMarkers=null),!0})}),clearGutter:Ta(function(it){var st=this;this.iter(function(ct){ct.gutterMarkers&&ct.gutterMarkers[it]&&Sh(st,ct,"gutter",function(){return ct.gutterMarkers[it]=null,Ct(ct.gutterMarkers)&&(ct.gutterMarkers=null),!0})})}),lineInfo:function(it){var st;if(typeof it=="number"){if(!Xn(this,it)||(st=it,it=Mn(this,it),!it))return null}else if(st=le(it),st==null)return null;return{line:st,handle:it,text:it.text,gutterMarkers:it.gutterMarkers,textClass:it.textClass,bgClass:it.bgClass,wrapClass:it.wrapClass,widgets:it.widgets}},addLineClass:Ta(function(it,st,ct){return Sh(this,it,st=="gutter"?"gutter":"class",function(ht){var pt=st=="text"?"textClass":st=="background"?"bgClass":st=="gutter"?"gutterClass":"wrapClass";if(!ht[pt])ht[pt]=ct;else{if(Ht(ct).test(ht[pt]))return!1;ht[pt]+=" "+ct}return!0})}),removeLineClass:Ta(function(it,st,ct){return Sh(this,it,st=="gutter"?"gutter":"class",function(ht){var pt=st=="text"?"textClass":st=="background"?"bgClass":st=="gutter"?"gutterClass":"wrapClass",Nt=ht[pt];if(Nt)if(ct==null)ht[pt]=null;else{var Kt=Nt.match(Ht(ct));if(!Kt)return!1;var $t=Kt.index+Kt[0].length;ht[pt]=Nt.slice(0,Kt.index)+(!Kt.index||$t==Nt.length?"":" ")+Nt.slice($t)||null}else return!1;return!0})}),addLineWidget:Ta(function(it,st,ct){return Td(this,it,st,ct)}),removeLineWidget:function(it){it.clear()},markText:function(it,st,ct){return zA(this,fn(this,it),fn(this,st),ct,ct&&ct.type||"range")},setBookmark:function(it,st){var ct={replacedWith:st&&(st.nodeType==null?st.widget:st),insertLeft:st&&st.insertLeft,clearWhenEmpty:!1,shared:st&&st.shared,handleMouseEvents:st&&st.handleMouseEvents};return it=fn(this,it),zA(this,it,it,ct,"bookmark")},findMarksAt:function(it){it=fn(this,it);var st=[],ct=Mn(this,it.line).markedSpans;if(ct)for(var ht=0;ht<ct.length;++ht){var pt=ct[ht];(pt.from==null||pt.from<=it.ch)&&(pt.to==null||pt.to>=it.ch)&&st.push(pt.marker.parent||pt.marker)}return st},findMarks:function(it,st,ct){it=fn(this,it),st=fn(this,st);var ht=[],pt=it.line;return this.iter(it.line,st.line+1,function(Nt){var Kt=Nt.markedSpans;if(Kt)for(var $t=0;$t<Kt.length;$t++){var Jt=Kt[$t];!(Jt.to!=null&&pt==it.line&&it.ch>=Jt.to||Jt.from==null&&pt!=it.line||Jt.from!=null&&pt==st.line&&Jt.from>=st.ch)&&(!ct||ct(Jt.marker))&&ht.push(Jt.marker.parent||Jt.marker)}++pt}),ht},getAllMarks:function(){var it=[];return this.iter(function(st){var ct=st.markedSpans;if(ct)for(var ht=0;ht<ct.length;++ht)ct[ht].from!=null&&it.push(ct[ht].marker)}),it},posFromIndex:function(it){var st,ct=this.first,ht=this.lineSeparator().length;return this.iter(function(pt){var Nt=pt.text.length+ht;if(Nt>it)return st=it,!0;it-=Nt,++ct}),fn(this,qe(ct,st))},indexFromPos:function(it){it=fn(this,it);var st=it.ch;if(it.line<this.first||it.ch<0)return 0;var ct=this.lineSeparator().length;return this.iter(this.first,it.line,function(ht){st+=ht.text.length+ct}),st},copy:function(it){var st=new Ia(pr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return st.scrollTop=this.scrollTop,st.scrollLeft=this.scrollLeft,st.sel=this.sel,st.extend=!1,it&&(st.history.undoDepth=this.history.undoDepth,st.setHistory(this.getHistory())),st},linkedDoc:function(it){it||(it={});var st=this.first,ct=this.first+this.size;it.from!=null&&it.from>st&&(st=it.from),it.to!=null&&it.to<ct&&(ct=it.to);var ht=new Ia(pr(this,st,ct),it.mode||this.modeOption,st,this.lineSep,this.direction);return it.sharedHist&&(ht.history=this.history),(this.linked||(this.linked=[])).push({doc:ht,sharedHist:it.sharedHist}),ht.linked=[{doc:this,isParent:!0,sharedHist:it.sharedHist}],Id(ht,Dd(this)),ht},unlinkDoc:function(it){if(it instanceof Xo&&(it=it.doc),this.linked)for(var st=0;st<this.linked.length;++st){var ct=this.linked[st];if(ct.doc==it){this.linked.splice(st,1),it.unlinkDoc(this),Vc(Dd(this));break}}if(it.history==this.history){var ht=[it.id];ku(it,function(pt){return ht.push(pt.id)},!0),it.history=new _h(null),it.history.done=pA(this.history.done,ht),it.history.undone=pA(this.history.undone,ht)}},iterLinkedDocs:function(it){ku(this,it)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(it){return this.lineSep?it.split(this.lineSep):so(it)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Ta(function(it){it!="rtl"&&(it="ltr"),it!=this.direction&&(this.direction=it,this.iter(function(st){return st.order=null}),this.cm&&ep(this.cm))})}),Ia.prototype.eachLine=Ia.prototype.iter;var Yh=0;function Ud(it){var st=this;if(dg(st),!(pi(st,it)||Tr(st.display,it))){Xi(it),fe&&(Yh=+new Date);var ct=Fa(st,it,!0),ht=it.dataTransfer.files;if(!(!ct||st.isReadOnly()))if(ht&&ht.length&&window.FileReader&&window.File)for(var pt=ht.length,Nt=Array(pt),Kt=0,$t=function(){++Kt==pt&&wa(st,function(){ct=fn(st.doc,ct);var xn={from:ct,to:ct,text:st.doc.splitLines(Nt.filter(function(vi){return vi!=null}).join(st.doc.lineSeparator())),origin:"paste"};GA(st.doc,xn),ph(st.doc,gA(fn(st.doc,ct),fn(st.doc,OA(xn))))})()},Jt=function(xn,vi){if(st.options.allowDropFileTypes&&gn(st.options.allowDropFileTypes,xn.type)==-1){$t();return}var Ci=new FileReader;Ci.onerror=function(){return $t()},Ci.onload=function(){var _i=Ci.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(_i)){$t();return}Nt[vi]=_i,$t()},Ci.readAsText(xn)},ve=0;ve<ht.length;ve++)Jt(ht[ve],ve);else{if(st.state.draggingText&&st.doc.sel.contains(ct)>-1){st.state.draggingText(it),setTimeout(function(){return st.display.input.focus()},20);return}try{var $e=it.dataTransfer.getData("Text");if($e){var Be;if(st.state.draggingText&&!st.state.draggingText.copy&&(Be=st.listSelections()),mh(st.doc,gA(ct,ct)),Be)for(var Fn=0;Fn<Be.length;++Fn)xh(st.doc,"",Be[Fn].anchor,Be[Fn].head,"drag");st.replaceSelection($e,"around","paste"),st.display.input.focus()}}catch(xn){}}}}function Qd(it,st){if(fe&&(!it.state.draggingText||+new Date-Yh<100)){Nr(st);return}if(!(pi(it,st)||Tr(it.display,st))&&(st.dataTransfer.setData("Text",it.getSelection()),st.dataTransfer.effectAllowed="copyMove",st.dataTransfer.setDragImage&&!Ie)){var ct=te("img",null,null,"position: fixed; left: 0; top: 0;");ct.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",zt&&(ct.width=ct.height=1,it.display.wrapper.appendChild(ct),ct._top=ct.offsetTop),st.dataTransfer.setDragImage(ct,0,0),zt&&ct.parentNode.removeChild(ct)}}function cg(it,st){var ct=Fa(it,st);if(ct){var ht=document.createDocumentFragment();Qo(it,ct,ht),it.display.dragCursor||(it.display.dragCursor=te("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),it.display.lineSpace.insertBefore(it.display.dragCursor,it.display.cursorDiv)),Wt(it.display.dragCursor,ht)}}function dg(it){it.display.dragCursor&&(it.display.lineSpace.removeChild(it.display.dragCursor),it.display.dragCursor=null)}function fg(it){if(document.getElementsByClassName){for(var st=document.getElementsByClassName("CodeMirror"),ct=[],ht=0;ht<st.length;ht++){var pt=st[ht].CodeMirror;pt&&ct.push(pt)}ct.length&&ct[0].operation(function(){for(var Nt=0;Nt<ct.length;Nt++)it(ct[Nt])})}}var Vl=!1;function vl(){Vl||(Xh(),Vl=!0)}function Xh(){var it;Dn(window,"resize",function(){it==null&&(it=setTimeout(function(){it=null,fg(yf)},100))}),Dn(window,"blur",function(){return fg(dA)})}function yf(it){var st=it.display;st.cachedCharWidth=st.cachedTextHeight=st.cachedPaddingH=null,st.scrollbarsClipped=!1,it.setSize()}for(var qu={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"},Zc=0;Zc<10;Zc++)qu[Zc+48]=qu[Zc+96]=String(Zc);for(var Od=65;Od<=90;Od++)qu[Od]=String.fromCharCode(Od);for(var Wc=1;Wc<=12;Wc++)qu[Wc+111]=qu[Wc+63235]="F"+Wc;var Nl={};Nl.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"},Nl.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"},Nl.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"},Nl.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"]},Nl.default=At?Nl.macDefault:Nl.pcDefault;function wf(it){var st=it.split(/-(?!$)/);it=st[st.length-1];for(var ct,ht,pt,Nt,Kt=0;Kt<st.length-1;Kt++){var $t=st[Kt];if(/^(cmd|meta|m)$/i.test($t))Nt=!0;else if(/^a(lt)?$/i.test($t))ct=!0;else if(/^(c|ctrl|control)$/i.test($t))ht=!0;else if(/^s(hift)?$/i.test($t))pt=!0;else throw new Error("Unrecognized modifier name: "+$t)}return ct&&(it="Alt-"+it),ht&&(it="Ctrl-"+it),Nt&&(it="Cmd-"+it),pt&&(it="Shift-"+it),it}function xf(it){var st={};for(var ct in it)if(it.hasOwnProperty(ct)){var ht=it[ct];if(/^(name|fallthrough|(de|at)tach)$/.test(ct))continue;if(ht=="..."){delete it[ct];continue}for(var pt=ti(ct.split(" "),wf),Nt=0;Nt<pt.length;Nt++){var Kt=void 0,$t=void 0;Nt==pt.length-1?($t=pt.join(" "),Kt=ht):($t=pt.slice(0,Nt+1).join(" "),Kt="...");var Jt=st[$t];if(!Jt)st[$t]=Kt;else if(Jt!=Kt)throw new Error("Inconsistent bindings for "+$t)}delete it[ct]}for(var ve in st)it[ve]=st[ve];return it}function Zl(it,st,ct,ht){st=ga(st);var pt=st.call?st.call(it,ht):st[it];if(pt===!1)return"nothing";if(pt==="...")return"multi";if(pt!=null&&ct(pt))return"handled";if(st.fallthrough){if(Object.prototype.toString.call(st.fallthrough)!="[object Array]")return Zl(it,st.fallthrough,ct,ht);for(var Nt=0;Nt<st.fallthrough.length;Nt++){var Kt=Zl(it,st.fallthrough[Nt],ct,ht);if(Kt)return Kt}}}function Jh(it){var st=typeof it=="string"?it:qu[it.keyCode];return st=="Ctrl"||st=="Alt"||st=="Shift"||st=="Mod"}function Yc(it,st,ct){var ht=it;return st.altKey&&ht!="Alt"&&(it="Alt-"+it),(xt?st.metaKey:st.ctrlKey)&&ht!="Ctrl"&&(it="Ctrl-"+it),(xt?st.ctrlKey:st.metaKey)&&ht!="Mod"&&(it="Cmd-"+it),!ct&&st.shiftKey&&ht!="Shift"&&(it="Shift-"+it),it}function Sf(it,st){if(zt&&it.keyCode==34&&it.char)return!1;var ct=qu[it.keyCode];return ct==null||it.altGraphKey?!1:(it.keyCode==3&&it.code&&(ct=it.code),Yc(ct,it,st))}function ga(it){return typeof it=="string"?Nl[it]:it}function Ra(it,st){for(var ct=it.doc.sel.ranges,ht=[],pt=0;pt<ct.length;pt++){for(var Nt=st(ct[pt]);ht.length&&ei(Nt.from,tn(ht).to)<=0;){var Kt=ht.pop();if(ei(Kt.from,Nt.from)<0){Nt.from=Kt.from;break}}ht.push(Nt)}ls(it,function(){for(var $t=ht.length-1;$t>=0;$t--)xh(it.doc,"",ht[$t].from,ht[$t].to,"+delete");gu(it)})}function Bf(it,st,ct){var ht=ze(it.text,st+ct,ct);return ht<0||ht>it.text.length?null:ht}function ua(it,st,ct){var ht=Bf(it,st.ch,ct);return ht==null?null:new qe(st.line,ht,ct<0?"after":"before")}function qh(it,st,ct,ht,pt){if(it){st.doc.direction=="rtl"&&(pt=-pt);var Nt=In(ct,st.doc.direction);if(Nt){var Kt=pt<0?tn(Nt):Nt[0],$t=pt<0==(Kt.level==1),Jt=$t?"after":"before",ve;if(Kt.level>0||st.doc.direction=="rtl"){var $e=_o(st,ct);ve=pt<0?ct.text.length-1:0;var Be=Ns(st,$e,ve).top;ve=wn(function(Fn){return Ns(st,$e,Fn).top==Be},pt<0==(Kt.level==1)?Kt.from:Kt.to-1,ve),Jt=="before"&&(ve=Bf(ct,ve,1))}else ve=pt<0?Kt.to:Kt.from;return new qe(ht,ve,Jt)}}return new qe(ht,pt<0?ct.text.length:0,pt<0?"before":"after")}function $h(it,st,ct,ht){var pt=In(st,it.doc.direction);if(!pt)return ua(st,ct,ht);ct.ch>=st.text.length?(ct.ch=st.text.length,ct.sticky="before"):ct.ch<=0&&(ct.ch=0,ct.sticky="after");var Nt=Ze(pt,ct.ch,ct.sticky),Kt=pt[Nt];if(it.doc.direction=="ltr"&&Kt.level%2==0&&(ht>0?Kt.to>ct.ch:Kt.from<ct.ch))return ua(st,ct,ht);var $t=function(or,Ir){return Bf(st,or instanceof qe?or.ch:or,Ir)},Jt,ve=function(or){return it.options.lineWrapping?(Jt=Jt||_o(it,st),na(it,st,Jt,or)):{begin:0,end:st.text.length}},$e=ve(ct.sticky=="before"?$t(ct,-1):ct.ch);if(it.doc.direction=="rtl"||Kt.level==1){var Be=Kt.level==1==ht<0,Fn=$t(ct,Be?1:-1);if(Fn!=null&&(Be?Fn<=Kt.to&&Fn<=$e.end:Fn>=Kt.from&&Fn>=$e.begin)){var xn=Be?"before":"after";return new qe(ct.line,Fn,xn)}}var vi=function(or,Ir,Sr){for(var _r=function(Rs,Ea){return Ea?new qe(ct.line,$t(Rs,1),"before"):new qe(ct.line,Rs,"after")};or>=0&&or<pt.length;or+=Ir){var ho=pt[or],wr=Ir>0==(ho.level!=1),ko=wr?Sr.begin:$t(Sr.end,-1);if(ho.from<=ko&&ko<ho.to||(ko=wr?ho.from:$t(ho.to,-1),Sr.begin<=ko&&ko<Sr.end))return _r(ko,wr)}},Ci=vi(Nt+ht,ht,$e);if(Ci)return Ci;var _i=ht>0?$e.end:$t($e.begin,-1);return _i!=null&&!(ht>0&&_i==st.text.length)&&(Ci=vi(ht>0?0:pt.length-1,ht,ve(_i)),Ci)?Ci:null}var jA={selectAll:la,singleSelection:function(it){return it.setSelection(it.getCursor("anchor"),it.getCursor("head"),nn)},killLine:function(it){return Ra(it,function(st){if(st.empty()){var ct=Mn(it.doc,st.head.line).text.length;return st.head.ch==ct&&st.head.line<it.lastLine()?{from:st.head,to:qe(st.head.line+1,0)}:{from:st.head,to:qe(st.head.line,ct)}}else return{from:st.from(),to:st.to()}})},deleteLine:function(it){return Ra(it,function(st){return{from:qe(st.from().line,0),to:fn(it.doc,qe(st.to().line+1,0))}})},delLineLeft:function(it){return Ra(it,function(st){return{from:qe(st.from().line,0),to:st.from()}})},delWrappedLineLeft:function(it){return Ra(it,function(st){var ct=it.charCoords(st.head,"div").top+5,ht=it.coordsChar({left:0,top:ct},"div");return{from:ht,to:st.from()}})},delWrappedLineRight:function(it){return Ra(it,function(st){var ct=it.charCoords(st.head,"div").top+5,ht=it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:ct},"div");return{from:st.from(),to:ht}})},undo:function(it){return it.undo()},redo:function(it){return it.redo()},undoSelection:function(it){return it.undoSelection()},redoSelection:function(it){return it.redoSelection()},goDocStart:function(it){return it.extendSelection(qe(it.firstLine(),0))},goDocEnd:function(it){return it.extendSelection(qe(it.lastLine()))},goLineStart:function(it){return it.extendSelectionsBy(function(st){return tc(it,st.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(it){return it.extendSelectionsBy(function(st){return Cf(it,st.head)},{origin:"+move",bias:1})},goLineEnd:function(it){return it.extendSelectionsBy(function(st){return ec(it,st.head.line)},{origin:"+move",bias:-1})},goLineRight:function(it){return it.extendSelectionsBy(function(st){var ct=it.cursorCoords(st.head,"div").top+5;return it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:ct},"div")},Gn)},goLineLeft:function(it){return it.extendSelectionsBy(function(st){var ct=it.cursorCoords(st.head,"div").top+5;return it.coordsChar({left:0,top:ct},"div")},Gn)},goLineLeftSmart:function(it){return it.extendSelectionsBy(function(st){var ct=it.cursorCoords(st.head,"div").top+5,ht=it.coordsChar({left:0,top:ct},"div");return ht.ch<it.getLine(ht.line).search(/\S/)?Cf(it,st.head):ht},Gn)},goLineUp:function(it){return it.moveV(-1,"line")},goLineDown:function(it){return it.moveV(1,"line")},goPageUp:function(it){return it.moveV(-1,"page")},goPageDown:function(it){return it.moveV(1,"page")},goCharLeft:function(it){return it.moveH(-1,"char")},goCharRight:function(it){return it.moveH(1,"char")},goColumnLeft:function(it){return it.moveH(-1,"column")},goColumnRight:function(it){return it.moveH(1,"column")},goWordLeft:function(it){return it.moveH(-1,"word")},goGroupRight:function(it){return it.moveH(1,"group")},goGroupLeft:function(it){return it.moveH(-1,"group")},goWordRight:function(it){return it.moveH(1,"word")},delCharBefore:function(it){return it.deleteH(-1,"codepoint")},delCharAfter:function(it){return it.deleteH(1,"char")},delWordBefore:function(it){return it.deleteH(-1,"word")},delWordAfter:function(it){return it.deleteH(1,"word")},delGroupBefore:function(it){return it.deleteH(-1,"group")},delGroupAfter:function(it){return it.deleteH(1,"group")},indentAuto:function(it){return it.indentSelection("smart")},indentMore:function(it){return it.indentSelection("add")},indentLess:function(it){return it.indentSelection("subtract")},insertTab:function(it){return it.replaceSelection(" ")},insertSoftTab:function(it){for(var st=[],ct=it.listSelections(),ht=it.options.tabSize,pt=0;pt<ct.length;pt++){var Nt=ct[pt].from(),Kt=me(it.getLine(Nt.line),Nt.ch,ht);st.push(Le(ht-Kt%ht))}it.replaceSelections(st)},defaultTab:function(it){it.somethingSelected()?it.indentSelection("add"):it.execCommand("insertTab")},transposeChars:function(it){return ls(it,function(){for(var st=it.listSelections(),ct=[],ht=0;ht<st.length;ht++)if(st[ht].empty()){var pt=st[ht].head,Nt=Mn(it.doc,pt.line).text;if(Nt){if(pt.ch==Nt.length&&(pt=new qe(pt.line,pt.ch-1)),pt.ch>0)pt=new qe(pt.line,pt.ch+1),it.replaceRange(Nt.charAt(pt.ch-1)+Nt.charAt(pt.ch-2),qe(pt.line,pt.ch-2),pt,"+transpose");else if(pt.line>it.doc.first){var Kt=Mn(it.doc,pt.line-1).text;Kt&&(pt=new qe(pt.line,1),it.replaceRange(Nt.charAt(0)+it.doc.lineSeparator()+Kt.charAt(Kt.length-1),qe(pt.line-1,Kt.length-1),pt,"+transpose"))}}ct.push(new ms(pt,pt))}it.setSelections(ct)})},newlineAndIndent:function(it){return ls(it,function(){for(var st=it.listSelections(),ct=st.length-1;ct>=0;ct--)it.replaceRange(it.doc.lineSeparator(),st[ct].anchor,st[ct].head,"+input");st=it.listSelections();for(var ht=0;ht<st.length;ht++)it.indentLine(st[ht].from().line,null,!0);gu(it)})},openLine:function(it){return it.replaceSelection(`
`,"start")},toggleOverwrite:function(it){return it.toggleOverwrite()}};function tc(it,st){var ct=Mn(it.doc,st),ht=Qe(ct);return ht!=ct&&(st=le(ht)),qh(!0,it,ht,st,1)}function ec(it,st){var ct=Mn(it.doc,st),ht=sn(ct);return ht!=ct&&(st=le(ht)),qh(!0,it,ct,st,-1)}function Cf(it,st){var ct=tc(it,st.line),ht=Mn(it.doc,ct.line),pt=In(ht,it.doc.direction);if(!pt||pt[0].level==0){var Nt=Math.max(ct.ch,ht.text.search(/\S/)),Kt=st.line==ct.line&&st.ch<=Nt&&st.ch;return qe(ct.line,Kt?0:Nt,ct.sticky)}return ct}function nc(it,st,ct){if(typeof st=="string"&&(st=jA[st],!st))return!1;it.display.input.ensurePolled();var ht=it.display.shift,pt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),ct&&(it.display.shift=!1),pt=st(it)!=Yn}finally{it.display.shift=ht,it.state.suppressEdits=!1}return pt}function Pf(it,st,ct){for(var ht=0;ht<it.state.keyMaps.length;ht++){var pt=Zl(st,it.state.keyMaps[ht],ct,it);if(pt)return pt}return it.options.extraKeys&&Zl(st,it.options.extraKeys,ct,it)||Zl(st,it.options.keyMap,ct,it)}var $u=new ee;function Bh(it,st,ct,ht){var pt=it.state.keySeq;if(pt){if(Jh(st))return"handled";if(/\'$/.test(st)?it.state.keySeq=null:$u.set(50,function(){it.state.keySeq==pt&&(it.state.keySeq=null,it.display.input.reset())}),Xc(it,pt+" "+st,ct,ht))return!0}return Xc(it,st,ct,ht)}function Xc(it,st,ct,ht){var pt=Pf(it,st,ht);return pt=="multi"&&(it.state.keySeq=st),pt=="handled"&&sr(it,"keyHandled",it,st,ct),(pt=="handled"||pt=="multi")&&(Xi(ct),as(it)),!!pt}function Jc(it,st){var ct=Sf(st,!0);return ct?st.shiftKey&&!it.state.keySeq?Bh(it,"Shift-"+ct,st,function(ht){return nc(it,ht,!0)})||Bh(it,ct,st,function(ht){if(typeof ht=="string"?/^go[A-Z]/.test(ht):ht.motion)return nc(it,ht)}):Bh(it,ct,st,function(ht){return nc(it,ht)}):!1}function qc(it,st,ct){return Bh(it,"'"+ct+"'",st,function(ht){return nc(it,ht,!0)})}var VA=null;function $c(it){var st=this;if(!(it.target&&it.target!=st.display.input.getField())&&(st.curOp.focus=_e(),!pi(st,it))){fe&&Rt<11&&it.keyCode==27&&(it.returnValue=!1);var ct=it.keyCode;st.display.shift=ct==16||it.shiftKey;var ht=Jc(st,it);zt&&(VA=ht?ct:null,!ht&&ct==88&&!Pr&&(At?it.metaKey:it.ctrlKey)&&st.replaceSelection("",null,"cut")),St&&!At&&!ht&&ct==46&&it.shiftKey&&!it.ctrlKey&&document.execCommand&&document.execCommand("cut"),ct==18&&!/\bCodeMirror-crosshair\b/.test(st.display.lineDiv.className)&&Ff(st)}}function Ff(it){var st=it.display.lineDiv;en(st,"CodeMirror-crosshair");function ct(ht){(ht.keyCode==18||!ht.altKey)&&(Ot(st,"CodeMirror-crosshair"),ai(document,"keyup",ct),ai(document,"mouseover",ct))}Dn(document,"keyup",ct),Dn(document,"mouseover",ct)}function Ef(it){it.keyCode==16&&(this.doc.sel.shift=!1),pi(this,it)}function Uu(it){var st=this;if(!(it.target&&it.target!=st.display.input.getField())&&!(Tr(st.display,it)||pi(st,it)||it.ctrlKey&&!it.altKey||At&&it.metaKey)){var ct=it.keyCode,ht=it.charCode;if(zt&&ct==VA){VA=null,Xi(it);return}if(!(zt&&(!it.which||it.which<10)&&Jc(st,it))){var pt=String.fromCharCode(ht==null?ct:ht);pt!="\b"&&(qc(st,it,pt)||st.display.input.onKeyPress(it))}}}var gg=400,ic=function(it,st,ct){this.time=it,this.pos=st,this.button=ct};ic.prototype.compare=function(it,st,ct){return this.time+gg>it&&ei(st,this.pos)==0&&ct==this.button};var vA,Ch;function Hd(it,st){var ct=+new Date;return Ch&&Ch.compare(ct,it,st)?(vA=Ch=null,"triple"):vA&&vA.compare(ct,it,st)?(Ch=new ic(ct,it,st),vA=null,"double"):(vA=new ic(ct,it,st),Ch=null,"single")}function ru(it){var st=this,ct=st.display;if(!(pi(st,it)||ct.activeTouch&&ct.input.supportsTouch())){if(ct.input.ensurePolled(),ct.shift=it.shiftKey,Tr(ct,it)){ie||(ct.scroller.draggable=!1,setTimeout(function(){return ct.scroller.draggable=!0},100));return}if(!Kd(st,it)){var ht=Fa(st,it),pt=jr(it),Nt=ht?Hd(ht,pt):"single";window.focus(),pt==1&&st.state.selectingText&&st.state.selectingText(it),!(ht&&Rd(st,pt,ht,Nt,it))&&(pt==1?ht?Lf(st,ht,Nt,it):Br(it)==ct.scroller&&Xi(it):pt==2?(ht&&jh(st.doc,ht),setTimeout(function(){return ct.input.focus()},20)):pt==3&&(kt?st.display.input.onContextMenu(it):bs(st)))}}}function Rd(it,st,ct,ht,pt){var Nt="Click";return ht=="double"?Nt="Double"+Nt:ht=="triple"&&(Nt="Triple"+Nt),Nt=(st==1?"Left":st==2?"Middle":"Right")+Nt,Bh(it,Yc(Nt,pt),pt,function(Kt){if(typeof Kt=="string"&&(Kt=jA[Kt]),!Kt)return!1;var $t=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),$t=Kt(it,ct)!=Yn}finally{it.state.suppressEdits=!1}return $t})}function td(it,st,ct){var ht=it.getOption("configureMouse"),pt=ht?ht(it,st,ct):{};if(pt.unit==null){var Nt=at?ct.shiftKey&&ct.metaKey:ct.altKey;pt.unit=Nt?"rectangle":st=="single"?"char":st=="double"?"word":"line"}return(pt.extend==null||it.doc.extend)&&(pt.extend=it.doc.extend||ct.shiftKey),pt.addNew==null&&(pt.addNew=At?ct.metaKey:ct.ctrlKey),pt.moveOnDrag==null&&(pt.moveOnDrag=!(At?ct.altKey:ct.ctrlKey)),pt}function Lf(it,st,ct,ht){fe?setTimeout(Nn(gs,it),0):it.curOp.focus=_e();var pt=td(it,ct,ht),Nt=it.doc.sel,Kt;it.options.dragDrop&&Wi&&!it.isReadOnly()&&ct=="single"&&(Kt=Nt.contains(st))>-1&&(ei((Kt=Nt.ranges[Kt]).from(),st)<0||st.xRel>0)&&(ei(Kt.to(),st)>0||st.xRel<0)?Mf(it,ht,st,pt):pg(it,ht,st,pt)}function Mf(it,st,ct,ht){var pt=it.display,Nt=!1,Kt=wa(it,function(ve){ie&&(pt.scroller.draggable=!1),it.state.draggingText=!1,ai(pt.wrapper.ownerDocument,"mouseup",Kt),ai(pt.wrapper.ownerDocument,"mousemove",$t),ai(pt.scroller,"dragstart",Jt),ai(pt.scroller,"drop",Kt),Nt||(Xi(ve),ht.addNew||jh(it.doc,ct,null,null,ht.extend),ie&&!Ie||fe&&Rt==9?setTimeout(function(){pt.wrapper.ownerDocument.body.focus({preventScroll:!0}),pt.input.focus()},20):pt.input.focus())}),$t=function(ve){Nt=Nt||Math.abs(st.clientX-ve.clientX)+Math.abs(st.clientY-ve.clientY)>=10},Jt=function(){return Nt=!0};ie&&(pt.scroller.draggable=!0),it.state.draggingText=Kt,Kt.copy=!ht.moveOnDrag,pt.scroller.dragDrop&&pt.scroller.dragDrop(),Dn(pt.wrapper.ownerDocument,"mouseup",Kt),Dn(pt.wrapper.ownerDocument,"mousemove",$t),Dn(pt.scroller,"dragstart",Jt),Dn(pt.scroller,"drop",Kt),bs(it),setTimeout(function(){return pt.input.focus()},20)}function rc(it,st,ct){if(ct=="char")return new ms(st,st);if(ct=="word")return it.findWordAt(st);if(ct=="line")return new ms(qe(st.line,0),fn(it.doc,qe(st.line+1,0)));var ht=ct(it,st);return new ms(ht.from,ht.to)}function pg(it,st,ct,ht){var pt=it.display,Nt=it.doc;Xi(st);var Kt,$t,Jt=Nt.sel,ve=Jt.ranges;if(ht.addNew&&!ht.extend?($t=Nt.sel.contains(ct),$t>-1?Kt=ve[$t]:Kt=new ms(ct,ct)):(Kt=Nt.sel.primary(),$t=Nt.sel.primIndex),ht.unit=="rectangle")ht.addNew||(Kt=new ms(ct,ct)),ct=Fa(it,st,!0,!0),$t=-1;else{var $e=rc(it,ct,ht.unit);ht.extend?Kt=kd(Kt,$e.anchor,$e.head,ht.extend):Kt=$e}ht.addNew?$t==-1?($t=ve.length,Za(Nt,ml(it,ve.concat([Kt]),$t),{scroll:!1,origin:"*mouse"})):ve.length>1&&ve[$t].empty()&&ht.unit=="char"&&!ht.extend?(Za(Nt,ml(it,ve.slice(0,$t).concat(ve.slice($t+1)),0),{scroll:!1,origin:"*mouse"}),Jt=Nt.sel):_A(Nt,$t,Kt,Tn):($t=0,Za(Nt,new nu([Kt],0),Tn),Jt=Nt.sel);var Be=ct;function Fn(Sr){if(ei(Be,Sr)!=0)if(Be=Sr,ht.unit=="rectangle"){for(var _r=[],ho=it.options.tabSize,wr=me(Mn(Nt,ct.line).text,ct.ch,ho),ko=me(Mn(Nt,Sr.line).text,Sr.ch,ho),Rs=Math.min(wr,ko),Ea=Math.max(wr,ko),Xs=Math.min(ct.line,Sr.line),yl=Math.min(it.lastLine(),Math.max(ct.line,Sr.line));Xs<=yl;Xs++){var Ua=Mn(Nt,Xs).text,Sa=yi(Ua,Rs,ho);Rs==Ea?_r.push(new ms(qe(Xs,Sa),qe(Xs,Sa))):Ua.length>Sa&&_r.push(new ms(qe(Xs,Sa),qe(Xs,yi(Ua,Ea,ho))))}_r.length||_r.push(new ms(ct,ct)),Za(Nt,ml(it,Jt.ranges.slice(0,$t).concat(_r),$t),{origin:"*mouse",scroll:!1}),it.scrollIntoView(Sr)}else{var ul=Kt,_a=rc(it,Sr,ht.unit),mr=ul.anchor,Zo;ei(_a.anchor,mr)>0?(Zo=_a.head,mr=rn(ul.from(),_a.anchor)):(Zo=_a.anchor,mr=Vi(ul.to(),_a.head));var _s=Jt.ranges.slice(0);_s[$t]=kf(it,new ms(fn(Nt,mr),Zo)),Za(Nt,ml(it,_s,$t),Tn)}}var xn=pt.wrapper.getBoundingClientRect(),vi=0;function Ci(Sr){var _r=++vi,ho=Fa(it,Sr,!0,ht.unit=="rectangle");if(ho)if(ei(ho,Be)!=0){it.curOp.focus=_e(),Fn(ho);var wr=Co(pt,Nt);(ho.line>=wr.to||ho.line<wr.from)&&setTimeout(wa(it,function(){vi==_r&&Ci(Sr)}),150)}else{var ko=Sr.clientY<xn.top?-20:Sr.clientY>xn.bottom?20:0;ko&&setTimeout(wa(it,function(){vi==_r&&(pt.scroller.scrollTop+=ko,Ci(Sr))}),50)}}function _i(Sr){it.state.selectingText=!1,vi=1/0,Sr&&(Xi(Sr),pt.input.focus()),ai(pt.wrapper.ownerDocument,"mousemove",or),ai(pt.wrapper.ownerDocument,"mouseup",Ir),Nt.history.lastSelOrigin=null}var or=wa(it,function(Sr){Sr.buttons===0||!jr(Sr)?_i(Sr):Ci(Sr)}),Ir=wa(it,_i);it.state.selectingText=Ir,Dn(pt.wrapper.ownerDocument,"mousemove",or),Dn(pt.wrapper.ownerDocument,"mouseup",Ir)}function kf(it,st){var ct=st.anchor,ht=st.head,pt=Mn(it.doc,ct.line);if(ei(ct,ht)==0&&ct.sticky==ht.sticky)return st;var Nt=In(pt);if(!Nt)return st;var Kt=Ze(Nt,ct.ch,ct.sticky),$t=Nt[Kt];if($t.from!=ct.ch&&$t.to!=ct.ch)return st;var Jt=Kt+($t.from==ct.ch==($t.level!=1)?0:1);if(Jt==0||Jt==Nt.length)return st;var ve;if(ht.line!=ct.line)ve=(ht.line-ct.line)*(it.doc.direction=="ltr"?1:-1)>0;else{var $e=Ze(Nt,ht.ch,ht.sticky),Be=$e-Kt||(ht.ch-ct.ch)*($t.level==1?-1:1);$e==Jt-1||$e==Jt?ve=Be<0:ve=Be>0}var Fn=Nt[Jt+(ve?-1:0)],xn=ve==(Fn.level==1),vi=xn?Fn.from:Fn.to,Ci=xn?"after":"before";return ct.ch==vi&&ct.sticky==Ci?st:new ms(new qe(ct.line,vi,Ci),ht)}function _d(it,st,ct,ht){var pt,Nt;if(st.touches)pt=st.touches[0].clientX,Nt=st.touches[0].clientY;else try{pt=st.clientX,Nt=st.clientY}catch(Fn){return!1}if(pt>=Math.floor(it.display.gutters.getBoundingClientRect().right))return!1;ht&&Xi(st);var Kt=it.display,$t=Kt.lineDiv.getBoundingClientRect();if(Nt>$t.bottom||!Fi(it,ct))return wi(st);Nt-=$t.top-Kt.viewOffset;for(var Jt=0;Jt<it.display.gutterSpecs.length;++Jt){var ve=Kt.gutters.childNodes[Jt];if(ve&&ve.getBoundingClientRect().right>=pt){var $e=De(it.doc,Nt),Be=it.display.gutterSpecs[Jt];return Ai(it,ct,it,$e,Be.className,st),wi(st)}}}function Kd(it,st){return _d(it,st,"gutterClick",!0)}function ed(it,st){Tr(it.display,st)||Ph(it,st)||pi(it,st,"contextmenu")||kt||it.display.input.onContextMenu(st)}function Ph(it,st){return Fi(it,"gutterContextMenu")?_d(it,st,"gutterContextMenu",!1):!1}function oc(it){it.display.wrapper.className=it.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+it.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Oa(it)}var Qu={toString:function(){return"CodeMirror.Init"}},bf={},nd={};function mg(it){var st=it.optionHandlers;function ct(ht,pt,Nt,Kt){it.defaults[ht]=pt,Nt&&(st[ht]=Kt?function($t,Jt,ve){ve!=Qu&&Nt($t,Jt,ve)}:Nt)}it.defineOption=ct,it.Init=Qu,ct("value","",function(ht,pt){return ht.setValue(pt)},!0),ct("mode",null,function(ht,pt){ht.doc.modeOption=pt,Mo(ht)},!0),ct("indentUnit",2,Mo,!0),ct("indentWithTabs",!1),ct("smartIndent",!0),ct("tabSize",4,function(ht){Hc(ht),Oa(ht),ws(ht)},!0),ct("lineSeparator",null,function(ht,pt){if(ht.doc.lineSep=pt,!!pt){var Nt=[],Kt=ht.doc.first;ht.doc.iter(function(Jt){for(var ve=0;;){var $e=Jt.text.indexOf(pt,ve);if($e==-1)break;ve=$e+pt.length,Nt.push(qe(Kt,$e))}Kt++});for(var $t=Nt.length-1;$t>=0;$t--)xh(ht.doc,pt,Nt[$t],qe(Nt[$t].line,Nt[$t].ch+pt.length))}}),ct("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(ht,pt,Nt){ht.state.specialChars=new RegExp(pt.source+(pt.test(" ")?"":"| "),"g"),Nt!=Qu&&ht.refresh()}),ct("specialCharPlaceholder",Fr,function(ht){return ht.refresh()},!0),ct("electricChars",!0),ct("inputStyle",et?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ct("spellcheck",!1,function(ht,pt){return ht.getInputField().spellcheck=pt},!0),ct("autocorrect",!1,function(ht,pt){return ht.getInputField().autocorrect=pt},!0),ct("autocapitalize",!1,function(ht,pt){return ht.getInputField().autocapitalize=pt},!0),ct("rtlMoveVisually",!dt),ct("wholeLineUpdateBefore",!0),ct("theme","default",function(ht){oc(ht),jl(ht)},!0),ct("keyMap","default",function(ht,pt,Nt){var Kt=ga(pt),$t=Nt!=Qu&&ga(Nt);$t&&$t.detach&&$t.detach(ht,Kt),Kt.attach&&Kt.attach(ht,$t||null)}),ct("extraKeys",null),ct("configureMouse",null),ct("lineWrapping",!1,Tf,!0),ct("gutters",[],function(ht,pt){ht.display.gutterSpecs=Na(pt,ht.options.lineNumbers),jl(ht)},!0),ct("fixedGutter",!0,function(ht,pt){ht.display.gutters.style.left=pt?fu(ht.display)+"px":"0",ht.refresh()},!0),ct("coverGutterNextToScrollbar",!1,function(ht){return sa(ht)},!0),ct("scrollbarStyle","native",function(ht){Eu(ht),sa(ht),ht.display.scrollbars.setScrollTop(ht.doc.scrollTop),ht.display.scrollbars.setScrollLeft(ht.doc.scrollLeft)},!0),ct("lineNumbers",!1,function(ht,pt){ht.display.gutterSpecs=Na(ht.options.gutters,pt),jl(ht)},!0),ct("firstLineNumber",1,jl,!0),ct("lineNumberFormatter",function(ht){return ht},jl,!0),ct("showCursorWhenSelecting",!1,Ys,!0),ct("resetSelectionOnContextMenu",!0),ct("lineWiseCopyCut",!0),ct("pasteLinesPerSelection",!0),ct("selectionsMayTouch",!1),ct("readOnly",!1,function(ht,pt){pt=="nocursor"&&(dA(ht),ht.display.input.blur()),ht.display.input.readOnlyChanged(pt)}),ct("screenReaderLabel",null,function(ht,pt){pt=pt===""?null:pt,ht.display.input.screenReaderLabelChanged(pt)}),ct("disableInput",!1,function(ht,pt){pt||ht.display.input.reset()},!0),ct("dragDrop",!0,Gd),ct("allowDropFileTypes",null),ct("cursorBlinkRate",530),ct("cursorScrollMargin",0),ct("cursorHeight",1,Ys,!0),ct("singleCursorHeightPerLine",!0,Ys,!0),ct("workTime",100),ct("workDelay",100),ct("flattenSpans",!0,Hc,!0),ct("addModeClass",!1,Hc,!0),ct("pollInterval",100),ct("undoDepth",200,function(ht,pt){return ht.doc.history.undoDepth=pt}),ct("historyEventDelay",1250),ct("viewportMargin",10,function(ht){return ht.refresh()},!0),ct("maxHighlightLength",1e4,Hc,!0),ct("moveInputWithCursor",!0,function(ht,pt){pt||ht.display.input.resetPosition()}),ct("tabindex",null,function(ht,pt){return ht.display.input.getField().tabIndex=pt||""}),ct("autofocus",null),ct("direction","ltr",function(ht,pt){return ht.doc.setDirection(pt)},!0),ct("phrases",null)}function Gd(it,st,ct){var ht=ct&&ct!=Qu;if(!st!=!ht){var pt=it.display.dragFunctions,Nt=st?Dn:ai;Nt(it.display.scroller,"dragstart",pt.start),Nt(it.display.scroller,"dragenter",pt.enter),Nt(it.display.scroller,"dragover",pt.over),Nt(it.display.scroller,"dragleave",pt.leave),Nt(it.display.scroller,"drop",pt.drop)}}function Tf(it){it.options.lineWrapping?(en(it.display.wrapper,"CodeMirror-wrap"),it.display.sizer.style.minWidth="",it.display.sizerWidth=null):(Ot(it.display.wrapper,"CodeMirror-wrap"),Ni(it)),Vr(it),ws(it),Oa(it),setTimeout(function(){return sa(it)},100)}function Xo(it,st){var ct=this;if(!(this instanceof Xo))return new Xo(it,st);this.options=st=st?Kn(st):{},Kn(bf,st,!1);var ht=st.value;typeof ht=="string"?ht=new Ia(ht,st.mode,null,st.lineSeparator,st.direction):st.mode&&(ht.modeOption=st.mode),this.doc=ht;var pt=new Xo.inputStyles[st.inputStyle](this),Nt=this.display=new QA(it,ht,pt,st);Nt.wrapper.CodeMirror=this,oc(this),st.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Eu(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 ee,keySeq:null,specialChars:null},st.autofocus&&!et&&Nt.input.focus(),fe&&Rt<11&&setTimeout(function(){return ct.display.input.reset(!0)},20),Fh(this),vl(),zl(this),this.curOp.forceUpdate=!0,xa(this,ht),st.autofocus&&!et||this.hasFocus()?setTimeout(function(){ct.hasFocus()&&!ct.state.focused&&Ko(ct)},20):dA(this);for(var Kt in nd)nd.hasOwnProperty(Kt)&&nd[Kt](this,st[Kt],Qu);fa(this),st.finishInit&&st.finishInit(this);for(var $t=0;$t<ZA.length;++$t)ZA[$t](this);mu(this),ie&&st.lineWrapping&&getComputedStyle(Nt.lineDiv).textRendering=="optimizelegibility"&&(Nt.lineDiv.style.textRendering="auto")}Xo.defaults=bf,Xo.optionHandlers=nd;function Fh(it){var st=it.display;Dn(st.scroller,"mousedown",wa(it,ru)),fe&&Rt<11?Dn(st.scroller,"dblclick",wa(it,function(Jt){if(!pi(it,Jt)){var ve=Fa(it,Jt);if(!(!ve||Kd(it,Jt)||Tr(it.display,Jt))){Xi(Jt);var $e=it.findWordAt(ve);jh(it.doc,$e.anchor,$e.head)}}})):Dn(st.scroller,"dblclick",function(Jt){return pi(it,Jt)||Xi(Jt)}),Dn(st.scroller,"contextmenu",function(Jt){return ed(it,Jt)}),Dn(st.input.getField(),"contextmenu",function(Jt){st.scroller.contains(Jt.target)||ed(it,Jt)});var ct,ht={end:0};function pt(){st.activeTouch&&(ct=setTimeout(function(){return st.activeTouch=null},1e3),ht=st.activeTouch,ht.end=+new Date)}function Nt(Jt){if(Jt.touches.length!=1)return!1;var ve=Jt.touches[0];return ve.radiusX<=1&&ve.radiusY<=1}function Kt(Jt,ve){if(ve.left==null)return!0;var $e=ve.left-Jt.left,Be=ve.top-Jt.top;return $e*$e+Be*Be>20*20}Dn(st.scroller,"touchstart",function(Jt){if(!pi(it,Jt)&&!Nt(Jt)&&!Kd(it,Jt)){st.input.ensurePolled(),clearTimeout(ct);var ve=+new Date;st.activeTouch={start:ve,moved:!1,prev:ve-ht.end<=300?ht:null},Jt.touches.length==1&&(st.activeTouch.left=Jt.touches[0].pageX,st.activeTouch.top=Jt.touches[0].pageY)}}),Dn(st.scroller,"touchmove",function(){st.activeTouch&&(st.activeTouch.moved=!0)}),Dn(st.scroller,"touchend",function(Jt){var ve=st.activeTouch;if(ve&&!Tr(st,Jt)&&ve.left!=null&&!ve.moved&&new Date-ve.start<300){var $e=it.coordsChar(st.activeTouch,"page"),Be;!ve.prev||Kt(ve,ve.prev)?Be=new ms($e,$e):!ve.prev.prev||Kt(ve,ve.prev.prev)?Be=it.findWordAt($e):Be=new ms(qe($e.line,0),fn(it.doc,qe($e.line+1,0))),it.setSelection(Be.anchor,Be.head),it.focus(),Xi(Jt)}pt()}),Dn(st.scroller,"touchcancel",pt),Dn(st.scroller,"scroll",function(){st.scroller.clientHeight&&(Pu(it,st.scroller.scrollTop),Fu(it,st.scroller.scrollLeft,!0),Ai(it,"scroll",it))}),Dn(st.scroller,"mousewheel",function(Jt){return Da(it,Jt)}),Dn(st.scroller,"DOMMouseScroll",function(Jt){return Da(it,Jt)}),Dn(st.wrapper,"scroll",function(){return st.wrapper.scrollTop=st.wrapper.scrollLeft=0}),st.dragFunctions={enter:function(Jt){pi(it,Jt)||Nr(Jt)},over:function(Jt){pi(it,Jt)||(cg(it,Jt),Nr(Jt))},start:function(Jt){return Qd(it,Jt)},drop:wa(it,Ud),leave:function(Jt){pi(it,Jt)||dg(it)}};var $t=st.input.getField();Dn($t,"keyup",function(Jt){return Ef.call(it,Jt)}),Dn($t,"keydown",wa(it,$c)),Dn($t,"keypress",wa(it,Uu)),Dn($t,"focus",function(Jt){return Ko(it,Jt)}),Dn($t,"blur",function(Jt){return dA(it,Jt)})}var ZA=[];Xo.defineInitHook=function(it){return ZA.push(it)};function pa(it,st,ct,ht){var pt=it.doc,Nt;ct==null&&(ct="add"),ct=="smart"&&(pt.mode.indent?Nt=Or(it,st).state:ct="prev");var Kt=it.options.tabSize,$t=Mn(pt,st),Jt=me($t.text,null,Kt);$t.stateAfter&&($t.stateAfter=null);var ve=$t.text.match(/^\s*/)[0],$e;if(!ht&&!/\S/.test($t.text))$e=0,ct="not";else if(ct=="smart"&&($e=pt.mode.indent(Nt,$t.text.slice(ve.length),$t.text),$e==Yn||$e>150)){if(!ht)return;ct="prev"}ct=="prev"?st>pt.first?$e=me(Mn(pt,st-1).text,null,Kt):$e=0:ct=="add"?$e=Jt+it.options.indentUnit:ct=="subtract"?$e=Jt-it.options.indentUnit:typeof ct=="number"&&($e=Jt+ct),$e=Math.max(0,$e);var Be="",Fn=0;if(it.options.indentWithTabs)for(var xn=Math.floor($e/Kt);xn;--xn)Fn+=Kt,Be+=" ";if(Fn<$e&&(Be+=Le($e-Fn)),Be!=ve)return xh(pt,Be,qe(st,0),qe(st,ve.length),"+input"),$t.stateAfter=null,!0;for(var vi=0;vi<pt.sel.ranges.length;vi++){var Ci=pt.sel.ranges[vi];if(Ci.head.line==st&&Ci.head.ch<ve.length){var _i=qe(st,ve.length);_A(pt,vi,new ms(_i,_i));break}}}var ll=null;function WA(it){ll=it}function id(it,st,ct,ht,pt){var Nt=it.doc;it.display.shift=!1,ht||(ht=Nt.sel);var Kt=+new Date-200,$t=pt=="paste"||it.state.pasteIncoming>Kt,Jt=so(st),ve=null;if($t&&ht.ranges.length>1)if(ll&&ll.text.join(`
`)==st){if(ht.ranges.length%ll.text.length==0){ve=[];for(var $e=0;$e<ll.text.length;$e++)ve.push(Nt.splitLines(ll.text[$e]))}}else Jt.length==ht.ranges.length&&it.options.pasteLinesPerSelection&&(ve=ti(Jt,function(or){return[or]}));for(var Be=it.curOp.updateInput,Fn=ht.ranges.length-1;Fn>=0;Fn--){var xn=ht.ranges[Fn],vi=xn.from(),Ci=xn.to();xn.empty()&&(ct&&ct>0?vi=qe(vi.line,vi.ch-ct):it.state.overwrite&&!$t?Ci=qe(Ci.line,Math.min(Mn(Nt,Ci.line).text.length,Ci.ch+tn(Jt).length)):$t&&ll&&ll.lineWise&&ll.text.join(`
`)==Jt.join(`
`)&&(vi=Ci=qe(vi.line,0)));var _i={from:vi,to:Ci,text:ve?ve[Fn%ve.length]:Jt,origin:pt||($t?"paste":it.state.cutIncoming>Kt?"cut":"+input")};GA(it.doc,_i),sr(it,"inputRead",it,_i)}st&&!$t&&ac(it,st),gu(it),it.curOp.updateInput<2&&(it.curOp.updateInput=Be),it.curOp.typing=!0,it.state.pasteIncoming=it.state.cutIncoming=-1}function sc(it,st){var ct=it.clipboardData&&it.clipboardData.getData("Text");if(ct)return it.preventDefault(),!st.isReadOnly()&&!st.options.disableInput&&ls(st,function(){return id(st,ct,0,null,"paste")}),!0}function ac(it,st){if(!(!it.options.electricChars||!it.options.smartIndent))for(var ct=it.doc.sel,ht=ct.ranges.length-1;ht>=0;ht--){var pt=ct.ranges[ht];if(!(pt.head.ch>100||ht&&ct.ranges[ht-1].head.line==pt.head.line)){var Nt=it.getModeAt(pt.head),Kt=!1;if(Nt.electricChars){for(var $t=0;$t<Nt.electricChars.length;$t++)if(st.indexOf(Nt.electricChars.charAt($t))>-1){Kt=pa(it,pt.head.line,"smart");break}}else Nt.electricInput&&Nt.electricInput.test(Mn(it.doc,pt.head.line).text.slice(0,pt.head.ch))&&(Kt=pa(it,pt.head.line,"smart"));Kt&&sr(it,"electricInput",it,pt.head.line)}}}function zd(it){for(var st=[],ct=[],ht=0;ht<it.doc.sel.ranges.length;ht++){var pt=it.doc.sel.ranges[ht].head.line,Nt={anchor:qe(pt,0),head:qe(pt+1,0)};ct.push(Nt),st.push(it.getRange(Nt.anchor,Nt.head))}return{text:st,ranges:ct}}function jd(it,st,ct,ht){it.setAttribute("autocorrect",ct?"":"off"),it.setAttribute("autocapitalize",ht?"":"off"),it.setAttribute("spellcheck",!!st)}function Nf(){var it=te("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),st=te("div",[it],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return ie?it.style.width="1000px":it.setAttribute("wrap","off"),It&&(it.style.border="1px solid black"),jd(it),st}function yA(it){var st=it.optionHandlers,ct=it.helpers={};it.prototype={constructor:it,focus:function(){window.focus(),this.display.input.focus()},setOption:function(ht,pt){var Nt=this.options,Kt=Nt[ht];Nt[ht]==pt&&ht!="mode"||(Nt[ht]=pt,st.hasOwnProperty(ht)&&wa(this,st[ht])(this,pt,Kt),Ai(this,"optionChange",this,ht))},getOption:function(ht){return this.options[ht]},getDoc:function(){return this.doc},addKeyMap:function(ht,pt){this.state.keyMaps[pt?"push":"unshift"](ga(ht))},removeKeyMap:function(ht){for(var pt=this.state.keyMaps,Nt=0;Nt<pt.length;++Nt)if(pt[Nt]==ht||pt[Nt].name==ht)return pt.splice(Nt,1),!0},addOverlay:ba(function(ht,pt){var Nt=ht.token?ht:it.getMode(this.options,ht);if(Nt.startState)throw new Error("Overlays may not be stateful.");jn(this.state.overlays,{mode:Nt,modeSpec:ht,opaque:pt&&pt.opaque,priority:pt&&pt.priority||0},function(Kt){return Kt.priority}),this.state.modeGen++,ws(this)}),removeOverlay:ba(function(ht){for(var pt=this.state.overlays,Nt=0;Nt<pt.length;++Nt){var Kt=pt[Nt].modeSpec;if(Kt==ht||typeof ht=="string"&&Kt.name==ht){pt.splice(Nt,1),this.state.modeGen++,ws(this);return}}}),indentLine:ba(function(ht,pt,Nt){typeof pt!="string"&&typeof pt!="number"&&(pt==null?pt=this.options.smartIndent?"smart":"prev":pt=pt?"add":"subtract"),Xn(this.doc,ht)&&pa(this,ht,pt,Nt)}),indentSelection:ba(function(ht){for(var pt=this.doc.sel.ranges,Nt=-1,Kt=0;Kt<pt.length;Kt++){var $t=pt[Kt];if($t.empty())$t.head.line>Nt&&(pa(this,$t.head.line,ht,!0),Nt=$t.head.line,Kt==this.doc.sel.primIndex&&gu(this));else{var Jt=$t.from(),ve=$t.to(),$e=Math.max(Nt,Jt.line);Nt=Math.min(this.lastLine(),ve.line-(ve.ch?0:1))+1;for(var Be=$e;Be<Nt;++Be)pa(this,Be,ht);var Fn=this.doc.sel.ranges;Jt.ch==0&&pt.length==Fn.length&&Fn[Kt].from().ch>0&&_A(this.doc,Kt,new ms(Jt,Fn[Kt].to()),nn)}}}),getTokenAt:function(ht,pt){return Qr(this,ht,pt)},getLineTokens:function(ht,pt){return Qr(this,qe(ht),pt,!0)},getTokenTypeAt:function(ht){ht=fn(this.doc,ht);var pt=er(this,Mn(this.doc,ht.line)),Nt=0,Kt=(pt.length-1)/2,$t=ht.ch,Jt;if($t==0)Jt=pt[2];else for(;;){var ve=Nt+Kt>>1;if((ve?pt[ve*2-1]:0)>=$t)Kt=ve;else if(pt[ve*2+1]<$t)Nt=ve+1;else{Jt=pt[ve*2+2];break}}var $e=Jt?Jt.indexOf("overlay "):-1;return $e<0?Jt:$e==0?null:Jt.slice(0,$e-1)},getModeAt:function(ht){var pt=this.doc.mode;return pt.innerMode?it.innerMode(pt,this.getTokenAt(ht).state).mode:pt},getHelper:function(ht,pt){return this.getHelpers(ht,pt)[0]},getHelpers:function(ht,pt){var Nt=[];if(!ct.hasOwnProperty(pt))return Nt;var Kt=ct[pt],$t=this.getModeAt(ht);if(typeof $t[pt]=="string")Kt[$t[pt]]&&Nt.push(Kt[$t[pt]]);else if($t[pt])for(var Jt=0;Jt<$t[pt].length;Jt++){var ve=Kt[$t[pt][Jt]];ve&&Nt.push(ve)}else $t.helperType&&Kt[$t.helperType]?Nt.push(Kt[$t.helperType]):Kt[$t.name]&&Nt.push(Kt[$t.name]);for(var $e=0;$e<Kt._global.length;$e++){var Be=Kt._global[$e];Be.pred($t,this)&&gn(Nt,Be.val)==-1&&Nt.push(Be.val)}return Nt},getStateAfter:function(ht,pt){var Nt=this.doc;return ht=Ve(Nt,ht==null?Nt.first+Nt.size-1:ht),Or(this,ht+1,pt).state},cursorCoords:function(ht,pt){var Nt,Kt=this.doc.sel.primary();return ht==null?Nt=Kt.head:typeof ht=="object"?Nt=fn(this.doc,ht):Nt=ht?Kt.from():Kt.to(),Vo(this,Nt,pt||"page")},charCoords:function(ht,pt){return va(this,fn(this.doc,ht),pt||"page")},coordsChar:function(ht,pt){return ht=cu(this,ht,pt||"page"),fs(this,ht.left,ht.top)},lineAtHeight:function(ht,pt){return ht=cu(this,{top:ht,left:0},pt||"page").top,De(this.doc,ht+this.display.viewOffset)},heightAtLine:function(ht,pt,Nt){var Kt=!1,$t;if(typeof ht=="number"){var Jt=this.doc.first+this.doc.size-1;ht<this.doc.first?ht=this.doc.first:ht>Jt&&(ht=Jt,Kt=!0),$t=Mn(this.doc,ht)}else $t=ht;return Us(this,$t,{top:0,left:0},pt||"page",Nt||Kt).top+(Kt?this.doc.height-Ii($t):0)},defaultTextHeight:function(){return ra(this.display)},defaultCharWidth:function(){return gl(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(ht,pt,Nt,Kt,$t){var Jt=this.display;ht=Vo(this,fn(this.doc,ht));var ve=ht.bottom,$e=ht.left;if(pt.style.position="absolute",pt.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(pt),Jt.sizer.appendChild(pt),Kt=="over")ve=ht.top;else if(Kt=="above"||Kt=="near"){var Be=Math.max(Jt.wrapper.clientHeight,this.doc.height),Fn=Math.max(Jt.sizer.clientWidth,Jt.lineSpace.clientWidth);(Kt=="above"||ht.bottom+pt.offsetHeight>Be)&&ht.top>pt.offsetHeight?ve=ht.top-pt.offsetHeight:ht.bottom+pt.offsetHeight<=Be&&(ve=ht.bottom),$e+pt.offsetWidth>Fn&&($e=Fn-pt.offsetWidth)}pt.style.top=ve+"px",pt.style.left=pt.style.right="",$t=="right"?($e=Jt.sizer.clientWidth-pt.offsetWidth,pt.style.right="0px"):($t=="left"?$e=0:$t=="middle"&&($e=(Jt.sizer.clientWidth-pt.offsetWidth)/2),pt.style.left=$e+"px"),Nt&&TA(this,{left:$e,top:ve,right:$e+pt.offsetWidth,bottom:ve+pt.offsetHeight})},triggerOnKeyDown:ba($c),triggerOnKeyPress:ba(Uu),triggerOnKeyUp:Ef,triggerOnMouseDown:ba(ru),execCommand:function(ht){if(jA.hasOwnProperty(ht))return jA[ht].call(null,this)},triggerElectric:ba(function(ht){ac(this,ht)}),findPosH:function(ht,pt,Nt,Kt){var $t=1;pt<0&&($t=-1,pt=-pt);for(var Jt=fn(this.doc,ht),ve=0;ve<pt&&(Jt=lc(this.doc,Jt,$t,Nt,Kt),!Jt.hitSide);++ve);return Jt},moveH:ba(function(ht,pt){var Nt=this;this.extendSelectionsBy(function(Kt){return Nt.display.shift||Nt.doc.extend||Kt.empty()?lc(Nt.doc,Kt.head,ht,pt,Nt.options.rtlMoveVisually):ht<0?Kt.from():Kt.to()},Gn)}),deleteH:ba(function(ht,pt){var Nt=this.doc.sel,Kt=this.doc;Nt.somethingSelected()?Kt.replaceSelection("",null,"+delete"):Ra(this,function($t){var Jt=lc(Kt,$t.head,ht,pt,!1);return ht<0?{from:Jt,to:$t.head}:{from:$t.head,to:Jt}})}),findPosV:function(ht,pt,Nt,Kt){var $t=1,Jt=Kt;pt<0&&($t=-1,pt=-pt);for(var ve=fn(this.doc,ht),$e=0;$e<pt;++$e){var Be=Vo(this,ve,"div");if(Jt==null?Jt=Be.left:Be.left=Jt,ve=YA(this,Be,$t,Nt),ve.hitSide)break}return ve},moveV:ba(function(ht,pt){var Nt=this,Kt=this.doc,$t=[],Jt=!this.display.shift&&!Kt.extend&&Kt.sel.somethingSelected();if(Kt.extendSelectionsBy(function($e){if(Jt)return ht<0?$e.from():$e.to();var Be=Vo(Nt,$e.head,"div");$e.goalColumn!=null&&(Be.left=$e.goalColumn),$t.push(Be.left);var Fn=YA(Nt,Be,ht,pt);return pt=="page"&&$e==Kt.sel.primary()&&ch(Nt,va(Nt,Fn,"div").top-Be.top),Fn},Gn),$t.length)for(var ve=0;ve<Kt.sel.ranges.length;ve++)Kt.sel.ranges[ve].goalColumn=$t[ve]}),findWordAt:function(ht){var pt=this.doc,Nt=Mn(pt,ht.line).text,Kt=ht.ch,$t=ht.ch;if(Nt){var Jt=this.getHelper(ht,"wordChars");(ht.sticky=="before"||$t==Nt.length)&&Kt?--Kt:++$t;for(var ve=Nt.charAt(Kt),$e=Lt(ve,Jt)?function(Be){return Lt(Be,Jt)}:/\s/.test(ve)?function(Be){return/\s/.test(Be)}:function(Be){return!/\s/.test(Be)&&!Lt(Be)};Kt>0&&$e(Nt.charAt(Kt-1));)--Kt;for(;$t<Nt.length&&$e(Nt.charAt($t));)++$t}return new ms(qe(ht.line,Kt),qe(ht.line,$t))},toggleOverwrite:function(ht){ht!=null&&ht==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?en(this.display.cursorDiv,"CodeMirror-overwrite"):Ot(this.display.cursorDiv,"CodeMirror-overwrite"),Ai(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==_e()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ba(function(ht,pt){pu(this,ht,pt)}),getScrollInfo:function(){var ht=this.display.scroller;return{left:ht.scrollLeft,top:ht.scrollTop,height:ht.scrollHeight-Lo(this)-this.display.barHeight,width:ht.scrollWidth-Lo(this)-this.display.barWidth,clientHeight:jo(this),clientWidth:Ss(this)}},scrollIntoView:ba(function(ht,pt){ht==null?(ht={from:this.doc.sel.primary().head,to:null},pt==null&&(pt=this.options.cursorScrollMargin)):typeof ht=="number"?ht={from:qe(ht,0),to:null}:ht.from==null&&(ht={from:ht,to:null}),ht.to||(ht.to=ht.from),ht.margin=pt||0,ht.from.line!=null?Ho(this,ht):dh(this,ht.from,ht.to,ht.margin)}),setSize:ba(function(ht,pt){var Nt=this,Kt=function(Jt){return typeof Jt=="number"||/^\d+$/.test(String(Jt))?Jt+"px":Jt};ht!=null&&(this.display.wrapper.style.width=Kt(ht)),pt!=null&&(this.display.wrapper.style.height=Kt(pt)),this.options.lineWrapping&&ds(this);var $t=this.display.viewFrom;this.doc.iter($t,this.display.viewTo,function(Jt){if(Jt.widgets){for(var ve=0;ve<Jt.widgets.length;ve++)if(Jt.widgets[ve].noHScroll){vo(Nt,$t,"widget");break}}++$t}),this.curOp.forceUpdate=!0,Ai(this,"refresh",this)}),operation:function(ht){return ls(this,ht)},startOperation:function(){return zl(this)},endOperation:function(){return mu(this)},refresh:ba(function(){var ht=this.display.cachedTextHeight;ws(this),this.curOp.forceUpdate=!0,Oa(this),pu(this,this.doc.scrollLeft,this.doc.scrollTop),IA(this.display),(ht==null||Math.abs(ht-ra(this.display))>.5||this.options.lineWrapping)&&Vr(this),Ai(this,"refresh",this)}),swapDoc:ba(function(ht){var pt=this.doc;return pt.cm=null,this.state.selectingText&&this.state.selectingText(),xa(this,ht),Oa(this),this.display.input.reset(),pu(this,ht.scrollLeft,ht.scrollTop),this.curOp.forceScroll=!0,sr(this,"swapDoc",this,pt),pt}),phrase:function(ht){var pt=this.options.phrases;return pt&&Object.prototype.hasOwnProperty.call(pt,ht)?pt[ht]:ht},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},zi(it),it.registerHelper=function(ht,pt,Nt){ct.hasOwnProperty(ht)||(ct[ht]=it[ht]={_global:[]}),ct[ht][pt]=Nt},it.registerGlobalHelper=function(ht,pt,Nt,Kt){it.registerHelper(ht,pt,Kt),ct[ht]._global.push({pred:Nt,val:Kt})}}function lc(it,st,ct,ht,pt){var Nt=st,Kt=ct,$t=Mn(it,st.line),Jt=pt&&it.direction=="rtl"?-ct:ct;function ve(){var Ir=st.line+Jt;return Ir<it.first||Ir>=it.first+it.size?!1:(st=new qe(Ir,st.ch,st.sticky),$t=Mn(it,Ir))}function $e(Ir){var Sr;if(ht=="codepoint"){var _r=$t.text.charCodeAt(st.ch+(ht>0?0:-1));isNaN(_r)?Sr=null:Sr=new qe(st.line,Math.max(0,Math.min($t.text.length,st.ch+ct*(_r>=55296&&_r<56320?2:1))),-ct)}else pt?Sr=$h(it.cm,$t,st,ct):Sr=ua($t,st,ct);if(Sr==null)if(!Ir&&ve())st=qh(pt,it.cm,$t,st.line,Jt);else return!1;else st=Sr;return!0}if(ht=="char"||ht=="codepoint")$e();else if(ht=="column")$e(!0);else if(ht=="word"||ht=="group")for(var Be=null,Fn=ht=="group",xn=it.cm&&it.cm.getHelper(st,"wordChars"),vi=!0;!(ct<0&&!$e(!vi));vi=!1){var Ci=$t.text.charAt(st.ch)||`
`,_i=Lt(Ci,xn)?"w":Fn&&Ci==`
`?"n":!Fn||/\s/.test(Ci)?null:"p";if(Fn&&!vi&&!_i&&(_i="s"),Be&&Be!=_i){ct<0&&(ct=1,$e(),st.sticky="after");break}if(_i&&(Be=_i),ct>0&&!$e(!vi))break}var or=Gc(it,st,Nt,Kt,!0);return fi(Nt,or)&&(or.hitSide=!0),or}function YA(it,st,ct,ht){var pt=it.doc,Nt=st.left,Kt;if(ht=="page"){var $t=Math.min(it.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Jt=Math.max($t-.5*ra(it.display),3);Kt=(ct>0?st.bottom:st.top)+ct*Jt}else ht=="line"&&(Kt=ct>0?st.bottom+3:st.top-3);for(var ve;ve=fs(it,Nt,Kt),!!ve.outside;){if(ct<0?Kt<=0:Kt>=pt.height){ve.hitSide=!0;break}Kt+=ct*5}return ve}var Fs=function(it){this.cm=it,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ee,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Fs.prototype.init=function(it){var st=this,ct=this,ht=ct.cm,pt=ct.div=it.lineDiv;jd(pt,ht.options.spellcheck,ht.options.autocorrect,ht.options.autocapitalize);function Nt($t){for(var Jt=$t.target;Jt;Jt=Jt.parentNode){if(Jt==pt)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Jt.className))break}return!1}Dn(pt,"paste",function($t){!Nt($t)||pi(ht,$t)||sc($t,ht)||Rt<=11&&setTimeout(wa(ht,function(){return st.updateFromDOM()}),20)}),Dn(pt,"compositionstart",function($t){st.composing={data:$t.data,done:!1}}),Dn(pt,"compositionupdate",function($t){st.composing||(st.composing={data:$t.data,done:!1})}),Dn(pt,"compositionend",function($t){st.composing&&($t.data!=st.composing.data&&st.readFromDOMSoon(),st.composing.done=!0)}),Dn(pt,"touchstart",function(){return ct.forceCompositionEnd()}),Dn(pt,"input",function(){st.composing||st.readFromDOMSoon()});function Kt($t){if(!(!Nt($t)||pi(ht,$t))){if(ht.somethingSelected())WA({lineWise:!1,text:ht.getSelections()}),$t.type=="cut"&&ht.replaceSelection("",null,"cut");else if(ht.options.lineWiseCopyCut){var Jt=zd(ht);WA({lineWise:!0,text:Jt.text}),$t.type=="cut"&&ht.operation(function(){ht.setSelections(Jt.ranges,0,nn),ht.replaceSelection("",null,"cut")})}else return;if($t.clipboardData){$t.clipboardData.clearData();var ve=ll.text.join(`
`);if($t.clipboardData.setData("Text",ve),$t.clipboardData.getData("Text")==ve){$t.preventDefault();return}}var $e=Nf(),Be=$e.firstChild;ht.display.lineSpace.insertBefore($e,ht.display.lineSpace.firstChild),Be.value=ll.text.join(`
`);var Fn=document.activeElement;yn(Be),setTimeout(function(){ht.display.lineSpace.removeChild($e),Fn.focus(),Fn==pt&&ct.showPrimarySelection()},50)}}Dn(pt,"copy",Kt),Dn(pt,"cut",Kt)},Fs.prototype.screenReaderLabelChanged=function(it){it?this.div.setAttribute("aria-label",it):this.div.removeAttribute("aria-label")},Fs.prototype.prepareSelection=function(){var it=Wu(this.cm,!1);return it.focus=document.activeElement==this.div,it},Fs.prototype.showSelection=function(it,st){!it||!this.cm.display.view.length||((it.focus||st)&&this.showPrimarySelection(),this.showMultipleSelections(it))},Fs.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Fs.prototype.showPrimarySelection=function(){var it=this.getSelection(),st=this.cm,ct=st.doc.sel.primary(),ht=ct.from(),pt=ct.to();if(st.display.viewTo==st.display.viewFrom||ht.line>=st.display.viewTo||pt.line<st.display.viewFrom){it.removeAllRanges();return}var Nt=tA(st,it.anchorNode,it.anchorOffset),Kt=tA(st,it.focusNode,it.focusOffset);if(!(Nt&&!Nt.bad&&Kt&&!Kt.bad&&ei(rn(Nt,Kt),ht)==0&&ei(Vi(Nt,Kt),pt)==0)){var $t=st.display.view,Jt=ht.line>=st.display.viewFrom&&wA(st,ht)||{node:$t[0].measure.map[2],offset:0},ve=pt.line<st.display.viewTo&&wA(st,pt);if(!ve){var $e=$t[$t.length-1].measure,Be=$e.maps?$e.maps[$e.maps.length-1]:$e.map;ve={node:Be[Be.length-1],offset:Be[Be.length-2]-Be[Be.length-3]}}if(!Jt||!ve){it.removeAllRanges();return}var Fn=it.rangeCount&&it.getRangeAt(0),xn;try{xn=pe(Jt.node,Jt.offset,ve.offset,ve.node)}catch(vi){}xn&&(!St&&st.state.focused?(it.collapse(Jt.node,Jt.offset),xn.collapsed||(it.removeAllRanges(),it.addRange(xn))):(it.removeAllRanges(),it.addRange(xn)),Fn&&it.anchorNode==null?it.addRange(Fn):St&&this.startGracePeriod()),this.rememberSelection()}},Fs.prototype.startGracePeriod=function(){var it=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){it.gracePeriod=!1,it.selectionChanged()&&it.cm.operation(function(){return it.cm.curOp.selectionChanged=!0})},20)},Fs.prototype.showMultipleSelections=function(it){Wt(this.cm.display.cursorDiv,it.cursors),Wt(this.cm.display.selectionDiv,it.selection)},Fs.prototype.rememberSelection=function(){var it=this.getSelection();this.lastAnchorNode=it.anchorNode,this.lastAnchorOffset=it.anchorOffset,this.lastFocusNode=it.focusNode,this.lastFocusOffset=it.focusOffset},Fs.prototype.selectionInEditor=function(){var it=this.getSelection();if(!it.rangeCount)return!1;var st=it.getRangeAt(0).commonAncestorContainer;return Ke(this.div,st)},Fs.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Fs.prototype.blur=function(){this.div.blur()},Fs.prototype.getField=function(){return this.div},Fs.prototype.supportsTouch=function(){return!0},Fs.prototype.receivedFocus=function(){var it=this;this.selectionInEditor()?this.pollSelection():ls(this.cm,function(){return it.cm.curOp.selectionChanged=!0});function st(){it.cm.state.focused&&(it.pollSelection(),it.polling.set(it.cm.options.pollInterval,st))}this.polling.set(this.cm.options.pollInterval,st)},Fs.prototype.selectionChanged=function(){var it=this.getSelection();return it.anchorNode!=this.lastAnchorNode||it.anchorOffset!=this.lastAnchorOffset||it.focusNode!=this.lastFocusNode||it.focusOffset!=this.lastFocusOffset},Fs.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var it=this.getSelection(),st=this.cm;if(nt&&de&&this.cm.display.gutterSpecs.length&&Vd(it.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ct=tA(st,it.anchorNode,it.anchorOffset),ht=tA(st,it.focusNode,it.focusOffset);ct&&ht&&ls(st,function(){Za(st.doc,gA(ct,ht),nn),(ct.bad||ht.bad)&&(st.curOp.selectionChanged=!0)})}}},Fs.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var it=this.cm,st=it.display,ct=it.doc.sel.primary(),ht=ct.from(),pt=ct.to();if(ht.ch==0&&ht.line>it.firstLine()&&(ht=qe(ht.line-1,Mn(it.doc,ht.line-1).length)),pt.ch==Mn(it.doc,pt.line).text.length&&pt.line<it.lastLine()&&(pt=qe(pt.line+1,0)),ht.line<st.viewFrom||pt.line>st.viewTo-1)return!1;var Nt,Kt,$t;ht.line==st.viewFrom||(Nt=ol(it,ht.line))==0?(Kt=le(st.view[0].line),$t=st.view[0].node):(Kt=le(st.view[Nt].line),$t=st.view[Nt-1].node.nextSibling);var Jt=ol(it,pt.line),ve,$e;if(Jt==st.view.length-1?(ve=st.viewTo-1,$e=st.lineDiv.lastChild):(ve=le(st.view[Jt+1].line)-1,$e=st.view[Jt+1].node.previousSibling),!$t)return!1;for(var Be=it.doc.splitLines(vu(it,$t,$e,Kt,ve)),Fn=Di(it.doc,qe(Kt,0),qe(ve,Mn(it.doc,ve).text.length));Be.length>1&&Fn.length>1;)if(tn(Be)==tn(Fn))Be.pop(),Fn.pop(),ve--;else if(Be[0]==Fn[0])Be.shift(),Fn.shift(),Kt++;else break;for(var xn=0,vi=0,Ci=Be[0],_i=Fn[0],or=Math.min(Ci.length,_i.length);xn<or&&Ci.charCodeAt(xn)==_i.charCodeAt(xn);)++xn;for(var Ir=tn(Be),Sr=tn(Fn),_r=Math.min(Ir.length-(Be.length==1?xn:0),Sr.length-(Fn.length==1?xn:0));vi<_r&&Ir.charCodeAt(Ir.length-vi-1)==Sr.charCodeAt(Sr.length-vi-1);)++vi;if(Be.length==1&&Fn.length==1&&Kt==ht.line)for(;xn&&xn>ht.ch&&Ir.charCodeAt(Ir.length-vi-1)==Sr.charCodeAt(Sr.length-vi-1);)xn--,vi++;Be[Be.length-1]=Ir.slice(0,Ir.length-vi).replace(/^\u200b+/,""),Be[0]=Be[0].slice(xn).replace(/\u200b+$/,"");var ho=qe(Kt,xn),wr=qe(ve,Fn.length?tn(Fn).length-vi:0);if(Be.length>1||Be[0]||ei(ho,wr))return xh(it.doc,Be,ho,wr,"+input"),!0},Fs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Fs.prototype.reset=function(){this.forceCompositionEnd()},Fs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Fs.prototype.readFromDOMSoon=function(){var it=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(it.readDOMTimeout=null,it.composing)if(it.composing.done)it.composing=null;else return;it.updateFromDOM()},80))},Fs.prototype.updateFromDOM=function(){var it=this;(this.cm.isReadOnly()||!this.pollContent())&&ls(this.cm,function(){return ws(it.cm)})},Fs.prototype.setUneditable=function(it){it.contentEditable="false"},Fs.prototype.onKeyPress=function(it){it.charCode==0||this.composing||(it.preventDefault(),this.cm.isReadOnly()||wa(this.cm,id)(this.cm,String.fromCharCode(it.charCode==null?it.keyCode:it.charCode),0))},Fs.prototype.readOnlyChanged=function(it){this.div.contentEditable=String(it!="nocursor")},Fs.prototype.onContextMenu=function(){},Fs.prototype.resetPosition=function(){},Fs.prototype.needsContentAttribute=!0;function wA(it,st){var ct=ma(it,st.line);if(!ct||ct.hidden)return null;var ht=Mn(it.doc,st.line),pt=Io(ct,ht,st.line),Nt=In(ht,it.doc.direction),Kt="left";if(Nt){var $t=Ze(Nt,st.ch);Kt=$t%2?"right":"left"}var Jt=hu(pt.map,st.ch,Kt);return Jt.offset=Jt.collapse=="right"?Jt.end:Jt.start,Jt}function Vd(it){for(var st=it;st;st=st.parentNode)if(/CodeMirror-gutter-wrapper/.test(st.className))return!0;return!1}function $s(it,st){return st&&(it.bad=!0),it}function vu(it,st,ct,ht,pt){var Nt="",Kt=!1,$t=it.doc.lineSeparator(),Jt=!1;function ve(xn){return function(vi){return vi.id==xn}}function $e(){Kt&&(Nt+=$t,Jt&&(Nt+=$t),Kt=Jt=!1)}function Be(xn){xn&&($e(),Nt+=xn)}function Fn(xn){if(xn.nodeType==1){var vi=xn.getAttribute("cm-text");if(vi){Be(vi);return}var Ci=xn.getAttribute("cm-marker"),_i;if(Ci){var or=it.findMarks(qe(ht,0),qe(pt+1,0),ve(+Ci));or.length&&(_i=or[0].find(0))&&Be(Di(it.doc,_i.from,_i.to).join($t));return}if(xn.getAttribute("contenteditable")=="false")return;var Ir=/^(pre|div|p|li|table|br)$/i.test(xn.nodeName);if(!/^br$/i.test(xn.nodeName)&&xn.textContent.length==0)return;Ir&&$e();for(var Sr=0;Sr<xn.childNodes.length;Sr++)Fn(xn.childNodes[Sr]);/^(pre|p)$/i.test(xn.nodeName)&&(Jt=!0),Ir&&(Kt=!0)}else xn.nodeType==3&&Be(xn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Fn(st),st!=ct;)st=st.nextSibling,Jt=!1;return Nt}function tA(it,st,ct){var ht;if(st==it.display.lineDiv){if(ht=it.display.lineDiv.childNodes[ct],!ht)return $s(it.clipPos(qe(it.display.viewTo-1)),!0);st=null,ct=0}else for(ht=st;;ht=ht.parentNode){if(!ht||ht==it.display.lineDiv)return null;if(ht.parentNode&&ht.parentNode==it.display.lineDiv)break}for(var pt=0;pt<it.display.view.length;pt++){var Nt=it.display.view[pt];if(Nt.node==ht)return xA(Nt,st,ct)}}function xA(it,st,ct){var ht=it.text.firstChild,pt=!1;if(!st||!Ke(ht,st))return $s(qe(le(it.line),0),!0);if(st==ht&&(pt=!0,st=ht.childNodes[ct],ct=0,!st)){var Nt=it.rest?tn(it.rest):it.line;return $s(qe(le(Nt),Nt.text.length),pt)}var Kt=st.nodeType==3?st:null,$t=st;for(!Kt&&st.childNodes.length==1&&st.firstChild.nodeType==3&&(Kt=st.firstChild,ct&&(ct=Kt.nodeValue.length));$t.parentNode!=ht;)$t=$t.parentNode;var Jt=it.measure,ve=Jt.maps;function $e(_i,or,Ir){for(var Sr=-1;Sr<(ve?ve.length:0);Sr++)for(var _r=Sr<0?Jt.map:ve[Sr],ho=0;ho<_r.length;ho+=3){var wr=_r[ho+2];if(wr==_i||wr==or){var ko=le(Sr<0?it.line:it.rest[Sr]),Rs=_r[ho]+Ir;return(Ir<0||wr!=_i)&&(Rs=_r[ho+(Ir?1:0)]),qe(ko,Rs)}}}var Be=$e(Kt,$t,ct);if(Be)return $s(Be,pt);for(var Fn=$t.nextSibling,xn=Kt?Kt.nodeValue.length-ct:0;Fn;Fn=Fn.nextSibling){if(Be=$e(Fn,Fn.firstChild,0),Be)return $s(qe(Be.line,Be.ch-xn),pt);xn+=Fn.textContent.length}for(var vi=$t.previousSibling,Ci=ct;vi;vi=vi.previousSibling){if(Be=$e(vi,vi.firstChild,-1),Be)return $s(qe(Be.line,Be.ch+Ci),pt);Ci+=vi.textContent.length}}var Hs=function(it){this.cm=it,this.prevInput="",this.pollingFast=!1,this.polling=new ee,this.hasSelection=!1,this.composing=null};Hs.prototype.init=function(it){var st=this,ct=this,ht=this.cm;this.createField(it);var pt=this.textarea;it.wrapper.insertBefore(this.wrapper,it.wrapper.firstChild),It&&(pt.style.width="0px"),Dn(pt,"input",function(){fe&&Rt>=9&&st.hasSelection&&(st.hasSelection=null),ct.poll()}),Dn(pt,"paste",function(Kt){pi(ht,Kt)||sc(Kt,ht)||(ht.state.pasteIncoming=+new Date,ct.fastPoll())});function Nt(Kt){if(!pi(ht,Kt)){if(ht.somethingSelected())WA({lineWise:!1,text:ht.getSelections()});else if(ht.options.lineWiseCopyCut){var $t=zd(ht);WA({lineWise:!0,text:$t.text}),Kt.type=="cut"?ht.setSelections($t.ranges,null,nn):(ct.prevInput="",pt.value=$t.text.join(`
`),yn(pt))}else return;Kt.type=="cut"&&(ht.state.cutIncoming=+new Date)}}Dn(pt,"cut",Nt),Dn(pt,"copy",Nt),Dn(it.scroller,"paste",function(Kt){if(!(Tr(it,Kt)||pi(ht,Kt))){if(!pt.dispatchEvent){ht.state.pasteIncoming=+new Date,ct.focus();return}var $t=new Event("paste");$t.clipboardData=Kt.clipboardData,pt.dispatchEvent($t)}}),Dn(it.lineSpace,"selectstart",function(Kt){Tr(it,Kt)||Xi(Kt)}),Dn(pt,"compositionstart",function(){var Kt=ht.getCursor("from");ct.composing&&ct.composing.range.clear(),ct.composing={start:Kt,range:ht.markText(Kt,ht.getCursor("to"),{className:"CodeMirror-composing"})}}),Dn(pt,"compositionend",function(){ct.composing&&(ct.poll(),ct.composing.range.clear(),ct.composing=null)})},Hs.prototype.createField=function(it){this.wrapper=Nf(),this.textarea=this.wrapper.firstChild},Hs.prototype.screenReaderLabelChanged=function(it){it?this.textarea.setAttribute("aria-label",it):this.textarea.removeAttribute("aria-label")},Hs.prototype.prepareSelection=function(){var it=this.cm,st=it.display,ct=it.doc,ht=Wu(it);if(it.options.moveInputWithCursor){var pt=Vo(it,ct.sel.primary().head,"div"),Nt=st.wrapper.getBoundingClientRect(),Kt=st.lineDiv.getBoundingClientRect();ht.teTop=Math.max(0,Math.min(st.wrapper.clientHeight-10,pt.top+Kt.top-Nt.top)),ht.teLeft=Math.max(0,Math.min(st.wrapper.clientWidth-10,pt.left+Kt.left-Nt.left))}return ht},Hs.prototype.showSelection=function(it){var st=this.cm,ct=st.display;Wt(ct.cursorDiv,it.cursors),Wt(ct.selectionDiv,it.selection),it.teTop!=null&&(this.wrapper.style.top=it.teTop+"px",this.wrapper.style.left=it.teLeft+"px")},Hs.prototype.reset=function(it){if(!(this.contextMenuPending||this.composing)){var st=this.cm;if(st.somethingSelected()){this.prevInput="";var ct=st.getSelection();this.textarea.value=ct,st.state.focused&&yn(this.textarea),fe&&Rt>=9&&(this.hasSelection=ct)}else it||(this.prevInput=this.textarea.value="",fe&&Rt>=9&&(this.hasSelection=null))}},Hs.prototype.getField=function(){return this.textarea},Hs.prototype.supportsTouch=function(){return!1},Hs.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!et||_e()!=this.textarea))try{this.textarea.focus()}catch(it){}},Hs.prototype.blur=function(){this.textarea.blur()},Hs.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Hs.prototype.receivedFocus=function(){this.slowPoll()},Hs.prototype.slowPoll=function(){var it=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){it.poll(),it.cm.state.focused&&it.slowPoll()})},Hs.prototype.fastPoll=function(){var it=!1,st=this;st.pollingFast=!0;function ct(){var ht=st.poll();!ht&&!it?(it=!0,st.polling.set(60,ct)):(st.pollingFast=!1,st.slowPoll())}st.polling.set(20,ct)},Hs.prototype.poll=function(){var it=this,st=this.cm,ct=this.textarea,ht=this.prevInput;if(this.contextMenuPending||!st.state.focused||Tt(ct)&&!ht&&!this.composing||st.isReadOnly()||st.options.disableInput||st.state.keySeq)return!1;var pt=ct.value;if(pt==ht&&!st.somethingSelected())return!1;if(fe&&Rt>=9&&this.hasSelection===pt||At&&/[\uf700-\uf7ff]/.test(pt))return st.display.input.reset(),!1;if(st.doc.sel==st.display.selForContextMenu){var Nt=pt.charCodeAt(0);if(Nt==8203&&!ht&&(ht="\u200B"),Nt==8666)return this.reset(),this.cm.execCommand("undo")}for(var Kt=0,$t=Math.min(ht.length,pt.length);Kt<$t&&ht.charCodeAt(Kt)==pt.charCodeAt(Kt);)++Kt;return ls(st,function(){id(st,pt.slice(Kt),ht.length-Kt,null,it.composing?"*compose":null),pt.length>1e3||pt.indexOf(`
`)>-1?ct.value=it.prevInput="":it.prevInput=pt,it.composing&&(it.composing.range.clear(),it.composing.range=st.markText(it.composing.start,st.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Hs.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Hs.prototype.onKeyPress=function(){fe&&Rt>=9&&(this.hasSelection=null),this.fastPoll()},Hs.prototype.onContextMenu=function(it){var st=this,ct=st.cm,ht=ct.display,pt=st.textarea;st.contextMenuPending&&st.contextMenuPending();var Nt=Fa(ct,it),Kt=ht.scroller.scrollTop;if(!Nt||zt)return;var $t=ct.options.resetSelectionOnContextMenu;$t&&ct.doc.sel.contains(Nt)==-1&&wa(ct,Za)(ct.doc,gA(Nt),nn);var Jt=pt.style.cssText,ve=st.wrapper.style.cssText,$e=st.wrapper.offsetParent.getBoundingClientRect();st.wrapper.style.cssText="position: static",pt.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(it.clientY-$e.top-5)+"px; left: "+(it.clientX-$e.left-5)+`px;
z-index: 1000; background: `+(fe?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Be;ie&&(Be=window.scrollY),ht.input.focus(),ie&&window.scrollTo(null,Be),ht.input.reset(),ct.somethingSelected()||(pt.value=st.prevInput=" "),st.contextMenuPending=xn,ht.selForContextMenu=ct.doc.sel,clearTimeout(ht.detectingSelectAll);function Fn(){if(pt.selectionStart!=null){var Ci=ct.somethingSelected(),_i="\u200B"+(Ci?pt.value:"");pt.value="\u21DA",pt.value=_i,st.prevInput=Ci?"":"\u200B",pt.selectionStart=1,pt.selectionEnd=_i.length,ht.selForContextMenu=ct.doc.sel}}function xn(){if(st.contextMenuPending==xn&&(st.contextMenuPending=!1,st.wrapper.style.cssText=ve,pt.style.cssText=Jt,fe&&Rt<9&&ht.scrollbars.setScrollTop(ht.scroller.scrollTop=Kt),pt.selectionStart!=null)){(!fe||fe&&Rt<9)&&Fn();var Ci=0,_i=function(){ht.selForContextMenu==ct.doc.sel&&pt.selectionStart==0&&pt.selectionEnd>0&&st.prevInput=="\u200B"?wa(ct,la)(ct):Ci++<10?ht.detectingSelectAll=setTimeout(_i,500):(ht.selForContextMenu=null,ht.input.reset())};ht.detectingSelectAll=setTimeout(_i,200)}}if(fe&&Rt>=9&&Fn(),kt){Nr(it);var vi=function(){ai(window,"mouseup",vi),setTimeout(xn,20)};Dn(window,"mouseup",vi)}else setTimeout(xn,50)},Hs.prototype.readOnlyChanged=function(it){it||this.reset(),this.textarea.disabled=it=="nocursor",this.textarea.readOnly=!!it},Hs.prototype.setUneditable=function(){},Hs.prototype.needsContentAttribute=!1;function uc(it,st){if(st=st?Kn(st):{},st.value=it.value,!st.tabindex&&it.tabIndex&&(st.tabindex=it.tabIndex),!st.placeholder&&it.placeholder&&(st.placeholder=it.placeholder),st.autofocus==null){var ct=_e();st.autofocus=ct==it||it.getAttribute("autofocus")!=null&&ct==document.body}function ht(){it.value=$t.getValue()}var pt;if(it.form&&(Dn(it.form,"submit",ht),!st.leaveSubmitMethodAlone)){var Nt=it.form;pt=Nt.submit;try{var Kt=Nt.submit=function(){ht(),Nt.submit=pt,Nt.submit(),Nt.submit=Kt}}catch(Jt){}}st.finishInit=function(Jt){Jt.save=ht,Jt.getTextArea=function(){return it},Jt.toTextArea=function(){Jt.toTextArea=isNaN,ht(),it.parentNode.removeChild(Jt.getWrapperElement()),it.style.display="",it.form&&(ai(it.form,"submit",ht),!st.leaveSubmitMethodAlone&&typeof it.form.submit=="function"&&(it.form.submit=pt))}},it.style.display="none";var $t=Xo(function(Jt){return it.parentNode.insertBefore(Jt,it.nextSibling)},st);return $t}function Wl(it){it.off=ai,it.on=Dn,it.wheelEventPixels=Tl,it.Doc=Ia,it.splitLines=so,it.countColumn=me,it.findColumn=yi,it.isWordChar=vt,it.Pass=Yn,it.signal=Ai,it.Line=Mr,it.changeEnd=OA,it.scrollbarModel=Xu,it.Pos=qe,it.cmpPos=ei,it.modes=Hi,it.mimeModes=ji,it.resolveMode=un,it.getMode=ln,it.modeExtensions=We,it.extendMode=Sn,it.copyState=Ki,it.startState=dr,it.innerMode=Li,it.commands=jA,it.keyMap=Nl,it.keyName=Sf,it.isModifierKey=Jh,it.lookupKey=Zl,it.normalizeKeyMap=xf,it.StringStream=se,it.SharedTextMarker=Iu,it.TextMarker=He,it.LineWidget=mA,it.e_preventDefault=Xi,it.e_stopPropagation=Lr,it.e_stop=Nr,it.addClass=en,it.contains=Ke,it.rmClass=Ot,it.keyNames=qu}mg(Xo),yA(Xo);var eA="iter insert remove copy getEditor constructor".split(" ");for(var Ac in Ia.prototype)Ia.prototype.hasOwnProperty(Ac)&&gn(eA,Ac)<0&&(Xo.prototype[Ac]=function(it){return function(){return it.apply(this.doc,arguments)}}(Ia.prototype[Ac]));return zi(Ia),Xo.inputStyles={textarea:Hs,contenteditable:Fs},Xo.defineMode=function(it){!Xo.defaults.mode&&it!="null"&&(Xo.defaults.mode=it),tr.apply(this,arguments)},Xo.defineMIME=qr,Xo.defineMode("null",function(){return{token:function(it){return it.skipToEnd()}}}),Xo.defineMIME("text/plain","null"),Xo.defineExtension=function(it,st){Xo.prototype[it]=st},Xo.defineDocExtension=function(it,st){Ia.prototype[it]=st},Xo.fromTextArea=uc,Wl(Xo),Xo.version="5.58.2",Xo})},25419:function(mn,je,Ut){(function(St){St(Ut(89780),Ut(15525),Ut(98101))})(function(St){"use strict";St.defineMode("markdown",function(Xt,Ae){var xe=St.getMode(Xt,"text/html"),fe=xe.name=="null";function Rt(me){if(St.findModeByName){var ee=St.findModeByName(me);ee&&(me=ee.mime||ee.mimes[0])}var gn=St.getMode(Xt,me);return gn.name=="null"?null:gn}Ae.highlightFormatting===void 0&&(Ae.highlightFormatting=!1),Ae.maxBlockquoteDepth===void 0&&(Ae.maxBlockquoteDepth=0),Ae.taskLists===void 0&&(Ae.taskLists=!1),Ae.strikethrough===void 0&&(Ae.strikethrough=!1),Ae.emoji===void 0&&(Ae.emoji=!1),Ae.fencedCodeBlockHighlighting===void 0&&(Ae.fencedCodeBlockHighlighting=!0),Ae.fencedCodeBlockDefaultMode===void 0&&(Ae.fencedCodeBlockDefaultMode="text/plain"),Ae.xml===void 0&&(Ae.xml=!0),Ae.tokenTypeOverrides===void 0&&(Ae.tokenTypeOverrides={});var ie={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 ae in ie)ie.hasOwnProperty(ae)&&Ae.tokenTypeOverrides[ae]&&(ie[ae]=Ae.tokenTypeOverrides[ae]);var de=/^([*\-_])(?:\s*\1){2,}\s*$/,zt=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Ie=/^\[(x| )\](?=\s)/i,Yt=Ae.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,Me=/^ {0,3}(?:\={1,}|-{2,})\s*$/,It=/^[^#!\[\]*_\\<>` "'(~:]+/,nt=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,et=/^\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]/,at=" ";function dt(me,ee,gn){return ee.f=ee.inline=gn,gn(me,ee)}function gt(me,ee,gn){return ee.f=ee.block=gn,gn(me,ee)}function xt(me){return!me||!/\S/.test(me.string)}function kt(me){if(me.linkTitle=!1,me.linkHref=!1,me.linkText=!1,me.em=!1,me.strong=!1,me.strikethrough=!1,me.quote=0,me.indentedCode=!1,me.f==Ot){var ee=fe;if(!ee){var gn=St.innerMode(xe,me.htmlState);ee=gn.mode.name=="xml"&&gn.state.tagStart===null&&!gn.state.context&&gn.state.tokenize.isInText}ee&&(me.f=we,me.block=Ht,me.htmlState=null)}return me.trailingSpace=0,me.trailingSpaceNewLine=!1,me.prevLine=me.thisLine,me.thisLine={stream:null},null}function Ht(me,ee){var gn=me.column()===ee.indentation,$n=xt(ee.prevLine.stream),Yn=ee.indentedCode,nn=ee.prevLine.hr,Tn=ee.list!==!1,Gn=(ee.listStack[ee.listStack.length-1]||0)+3;ee.indentedCode=!1;var yi=ee.indentation;if(ee.indentationDiff===null&&(ee.indentationDiff=ee.indentation,Tn)){for(ee.list=null;yi<ee.listStack[ee.listStack.length-1];)ee.listStack.pop(),ee.listStack.length?ee.indentation=ee.listStack[ee.listStack.length-1]:ee.list=!1;ee.list!==!1&&(ee.indentationDiff=yi-ee.listStack[ee.listStack.length-1])}var Je=!$n&&!nn&&!ee.prevLine.header&&(!Tn||!Yn)&&!ee.prevLine.fencedCodeEnd,Le=(ee.list===!1||nn||$n)&&ee.indentation<=Gn&&me.match(de),tn=null;if(ee.indentationDiff>=4&&(Yn||ee.prevLine.fencedCodeEnd||ee.prevLine.header||$n))return me.skipToEnd(),ee.indentedCode=!0,ie.code;if(me.eatSpace())return null;if(gn&&ee.indentation<=Gn&&(tn=me.match(Yt))&&tn[1].length<=6)return ee.quote=0,ee.header=tn[1].length,ee.thisLine.header=!0,Ae.highlightFormatting&&(ee.formatting="header"),ee.f=ee.inline,Wt(ee);if(ee.indentation<=Gn&&me.eat(">"))return ee.quote=gn?1:ee.quote+1,Ae.highlightFormatting&&(ee.formatting="quote"),me.eatSpace(),Wt(ee);if(!Le&&!ee.setext&&gn&&ee.indentation<=Gn&&(tn=me.match(zt))){var ti=tn[1]?"ol":"ul";return ee.indentation=yi+me.current().length,ee.list=!0,ee.quote=0,ee.listStack.push(ee.indentation),ee.em=!1,ee.strong=!1,ee.code=!1,ee.strikethrough=!1,Ae.taskLists&&me.match(Ie,!1)&&(ee.taskList=!0),ee.f=ee.inline,Ae.highlightFormatting&&(ee.formatting=["list","list-"+ti]),Wt(ee)}else{if(gn&&ee.indentation<=Gn&&(tn=me.match(nt,!0)))return ee.quote=0,ee.fencedEndRE=new RegExp(tn[1]+"+ *$"),ee.localMode=Ae.fencedCodeBlockHighlighting&&Rt(tn[2]||Ae.fencedCodeBlockDefaultMode),ee.localMode&&(ee.localState=St.startState(ee.localMode)),ee.f=ee.block=Zt,Ae.highlightFormatting&&(ee.formatting="code-block"),ee.code=-1,Wt(ee);if(ee.setext||(!Je||!Tn)&&!ee.quote&&ee.list===!1&&!ee.code&&!Le&&!et.test(me.string)&&(tn=me.lookAhead(1))&&(tn=tn.match(Me)))return ee.setext?(ee.header=ee.setext,ee.setext=0,me.skipToEnd(),Ae.highlightFormatting&&(ee.formatting="header")):(ee.header=tn[0].charAt(0)=="="?1:2,ee.setext=ee.header),ee.thisLine.header=!0,ee.f=ee.inline,Wt(ee);if(Le)return me.skipToEnd(),ee.hr=!0,ee.thisLine.hr=!0,ie.hr;if(me.peek()==="[")return dt(me,ee,dn)}return dt(me,ee,ee.inline)}function Ot(me,ee){var gn=xe.token(me,ee.htmlState);if(!fe){var $n=St.innerMode(xe,ee.htmlState);($n.mode.name=="xml"&&$n.state.tagStart===null&&!$n.state.context&&$n.state.tokenize.isInText||ee.md_inside&&me.current().indexOf(">")>-1)&&(ee.f=we,ee.block=Ht,ee.htmlState=null)}return gn}function Zt(me,ee){var gn=ee.listStack[ee.listStack.length-1]||0,$n=ee.indentation<gn,Yn=gn+3;if(ee.fencedEndRE&&ee.indentation<=Yn&&($n||me.match(ee.fencedEndRE))){Ae.highlightFormatting&&(ee.formatting="code-block");var nn;return $n||(nn=Wt(ee)),ee.localMode=ee.localState=null,ee.block=Ht,ee.f=we,ee.fencedEndRE=null,ee.code=0,ee.thisLine.fencedCodeEnd=!0,$n?gt(me,ee,ee.block):nn}else return ee.localMode?ee.localMode.token(me,ee.localState):(me.skipToEnd(),ie.code)}function Wt(me){var ee=[];if(me.formatting){ee.push(ie.formatting),typeof me.formatting=="string"&&(me.formatting=[me.formatting]);for(var gn=0;gn<me.formatting.length;gn++)ee.push(ie.formatting+"-"+me.formatting[gn]),me.formatting[gn]==="header"&&ee.push(ie.formatting+"-"+me.formatting[gn]+"-"+me.header),me.formatting[gn]==="quote"&&(!Ae.maxBlockquoteDepth||Ae.maxBlockquoteDepth>=me.quote?ee.push(ie.formatting+"-"+me.formatting[gn]+"-"+me.quote):ee.push("error"))}if(me.taskOpen)return ee.push("meta"),ee.length?ee.join(" "):null;if(me.taskClosed)return ee.push("property"),ee.length?ee.join(" "):null;if(me.linkHref?ee.push(ie.linkHref,"url"):(me.strong&&ee.push(ie.strong),me.em&&ee.push(ie.em),me.strikethrough&&ee.push(ie.strikethrough),me.emoji&&ee.push(ie.emoji),me.linkText&&ee.push(ie.linkText),me.code&&ee.push(ie.code),me.image&&ee.push(ie.image),me.imageAltText&&ee.push(ie.imageAltText,"link"),me.imageMarker&&ee.push(ie.imageMarker)),me.header&&ee.push(ie.header,ie.header+"-"+me.header),me.quote&&(ee.push(ie.quote),!Ae.maxBlockquoteDepth||Ae.maxBlockquoteDepth>=me.quote?ee.push(ie.quote+"-"+me.quote):ee.push(ie.quote+"-"+Ae.maxBlockquoteDepth)),me.list!==!1){var $n=(me.listStack.length-1)%3;$n?$n===1?ee.push(ie.list2):ee.push(ie.list3):ee.push(ie.list1)}return me.trailingSpaceNewLine?ee.push("trailing-space-new-line"):me.trailingSpace&&ee.push("trailing-space-"+(me.trailingSpace%2?"a":"b")),ee.length?ee.join(" "):null}function te(me,ee){if(me.match(It,!0))return Wt(ee)}function we(me,ee){var gn=ee.text(me,ee);if(typeof gn!="undefined")return gn;if(ee.list)return ee.list=null,Wt(ee);if(ee.taskList){var $n=me.match(Ie,!0)[1]===" ";return $n?ee.taskOpen=!0:ee.taskClosed=!0,Ae.highlightFormatting&&(ee.formatting="task"),ee.taskList=!1,Wt(ee)}if(ee.taskOpen=!1,ee.taskClosed=!1,ee.header&&me.match(/^#+$/,!0))return Ae.highlightFormatting&&(ee.formatting="header"),Wt(ee);var Yn=me.next();if(ee.linkTitle){ee.linkTitle=!1;var nn=Yn;Yn==="("&&(nn=")"),nn=(nn+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Tn="^\\s*(?:[^"+nn+"\\\\]+|\\\\\\\\|\\\\.)"+nn;if(me.match(new RegExp(Tn),!0))return ie.linkHref}if(Yn==="`"){var Gn=ee.formatting;Ae.highlightFormatting&&(ee.formatting="code"),me.eatWhile("`");var yi=me.current().length;if(ee.code==0&&(!ee.quote||yi==1))return ee.code=yi,Wt(ee);if(yi==ee.code){var Je=Wt(ee);return ee.code=0,Je}else return ee.formatting=Gn,Wt(ee)}else if(ee.code)return Wt(ee);if(Yn==="\\"&&(me.next(),Ae.highlightFormatting)){var Le=Wt(ee),tn=ie.formatting+"-escape";return Le?Le+" "+tn:tn}if(Yn==="!"&&me.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return ee.imageMarker=!0,ee.image=!0,Ae.highlightFormatting&&(ee.formatting="image"),Wt(ee);if(Yn==="["&&ee.imageMarker&&me.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return ee.imageMarker=!1,ee.imageAltText=!0,Ae.highlightFormatting&&(ee.formatting="image"),Wt(ee);if(Yn==="]"&&ee.imageAltText){Ae.highlightFormatting&&(ee.formatting="image");var Le=Wt(ee);return ee.imageAltText=!1,ee.image=!1,ee.inline=ee.f=Ke,Le}if(Yn==="["&&!ee.image)return ee.linkText&&me.match(/^.*?\]/)||(ee.linkText=!0,Ae.highlightFormatting&&(ee.formatting="link")),Wt(ee);if(Yn==="]"&&ee.linkText){Ae.highlightFormatting&&(ee.formatting="link");var Le=Wt(ee);return ee.linkText=!1,ee.inline=ee.f=me.match(/\(.*?\)| ?\[.*?\]/,!1)?Ke:we,Le}if(Yn==="<"&&me.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){ee.f=ee.inline=pe,Ae.highlightFormatting&&(ee.formatting="link");var Le=Wt(ee);return Le?Le+=" ":Le="",Le+ie.linkInline}if(Yn==="<"&&me.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){ee.f=ee.inline=pe,Ae.highlightFormatting&&(ee.formatting="link");var Le=Wt(ee);return Le?Le+=" ":Le="",Le+ie.linkEmail}if(Ae.xml&&Yn==="<"&&me.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ti=me.string.indexOf(">",me.pos);if(ti!=-1){var jn=me.string.substring(me.start,ti);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(jn)&&(ee.md_inside=!0)}return me.backUp(1),ee.htmlState=St.startState(xe),gt(me,ee,Ot)}if(Ae.xml&&Yn==="<"&&me.match(/^\/\w*?>/))return ee.md_inside=!1,"tag";if(Yn==="*"||Yn==="_"){for(var Gt=1,Ft=me.pos==1?" ":me.string.charAt(me.pos-2);Gt<3&&me.eat(Yn);)Gt++;var mt=me.peek()||" ",vt=!/\s/.test(mt)&&(!At.test(mt)||/\s/.test(Ft)||At.test(Ft)),Lt=!/\s/.test(Ft)&&(!At.test(Ft)||/\s/.test(mt)||At.test(mt)),Ct=null,_t=null;if(Gt%2&&(!ee.em&&vt&&(Yn==="*"||!Lt||At.test(Ft))?Ct=!0:ee.em==Yn&&Lt&&(Yn==="*"||!vt||At.test(mt))&&(Ct=!1)),Gt>1&&(!ee.strong&&vt&&(Yn==="*"||!Lt||At.test(Ft))?_t=!0:ee.strong==Yn&&Lt&&(Yn==="*"||!vt||At.test(mt))&&(_t=!1)),_t!=null||Ct!=null){Ae.highlightFormatting&&(ee.formatting=Ct==null?"strong":_t==null?"em":"strong em"),Ct===!0&&(ee.em=Yn),_t===!0&&(ee.strong=Yn);var Je=Wt(ee);return Ct===!1&&(ee.em=!1),_t===!1&&(ee.strong=!1),Je}}else if(Yn===" "&&(me.eat("*")||me.eat("_"))){if(me.peek()===" ")return Wt(ee);me.backUp(1)}if(Ae.strikethrough){if(Yn==="~"&&me.eatWhile(Yn)){if(ee.strikethrough){Ae.highlightFormatting&&(ee.formatting="strikethrough");var Je=Wt(ee);return ee.strikethrough=!1,Je}else if(me.match(/^[^\s]/,!1))return ee.strikethrough=!0,Ae.highlightFormatting&&(ee.formatting="strikethrough"),Wt(ee)}else if(Yn===" "&&me.match(/^~~/,!0)){if(me.peek()===" ")return Wt(ee);me.backUp(2)}}if(Ae.emoji&&Yn===":"&&me.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){ee.emoji=!0,Ae.highlightFormatting&&(ee.formatting="emoji");var Pe=Wt(ee);return ee.emoji=!1,Pe}return Yn===" "&&(me.match(/^ +$/,!1)?ee.trailingSpace++:ee.trailingSpace&&(ee.trailingSpaceNewLine=!0)),Wt(ee)}function pe(me,ee){var gn=me.next();if(gn===">"){ee.f=ee.inline=we,Ae.highlightFormatting&&(ee.formatting="link");var $n=Wt(ee);return $n?$n+=" ":$n="",$n+ie.linkInline}return me.match(/^[^>]+/,!0),ie.linkInline}function Ke(me,ee){if(me.eatSpace())return null;var gn=me.next();return gn==="("||gn==="["?(ee.f=ee.inline=en(gn==="("?")":"]"),Ae.highlightFormatting&&(ee.formatting="link-string"),ee.linkHref=!0,Wt(ee)):"error"}var _e={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function en(me){return function(ee,gn){var $n=ee.next();if($n===me){gn.f=gn.inline=we,Ae.highlightFormatting&&(gn.formatting="link-string");var Yn=Wt(gn);return gn.linkHref=!1,Yn}return ee.match(_e[me]),gn.linkHref=!0,Wt(gn)}}function dn(me,ee){return me.match(/^([^\]\\]|\\.)*\]:/,!1)?(ee.f=yn,me.next(),Ae.highlightFormatting&&(ee.formatting="link"),ee.linkText=!0,Wt(ee)):dt(me,ee,we)}function yn(me,ee){if(me.match(/^\]:/,!0)){ee.f=ee.inline=Nn,Ae.highlightFormatting&&(ee.formatting="link");var gn=Wt(ee);return ee.linkText=!1,gn}return me.match(/^([^\]\\]|\\.)+/,!0),ie.linkText}function Nn(me,ee){return me.eatSpace()?null:(me.match(/^[^\s]+/,!0),me.peek()===void 0?ee.linkTitle=!0:me.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),ee.f=ee.inline=we,ie.linkHref+" url")}var Kn={startState:function(){return{f:Ht,prevLine:{stream:null},thisLine:{stream:null},block:Ht,htmlState:null,indentation:0,inline:we,text:te,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(me){return{f:me.f,prevLine:me.prevLine,thisLine:me.thisLine,block:me.block,htmlState:me.htmlState&&St.copyState(xe,me.htmlState),indentation:me.indentation,localMode:me.localMode,localState:me.localMode?St.copyState(me.localMode,me.localState):null,inline:me.inline,text:me.text,formatting:!1,linkText:me.linkText,linkTitle:me.linkTitle,linkHref:me.linkHref,code:me.code,em:me.em,strong:me.strong,strikethrough:me.strikethrough,emoji:me.emoji,header:me.header,setext:me.setext,hr:me.hr,taskList:me.taskList,list:me.list,listStack:me.listStack.slice(0),quote:me.quote,indentedCode:me.indentedCode,trailingSpace:me.trailingSpace,trailingSpaceNewLine:me.trailingSpaceNewLine,md_inside:me.md_inside,fencedEndRE:me.fencedEndRE}},token:function(me,ee){if(ee.formatting=!1,me!=ee.thisLine.stream){if(ee.header=0,ee.hr=!1,me.match(/^\s*$/,!0))return kt(ee),null;if(ee.prevLine=ee.thisLine,ee.thisLine={stream:me},ee.taskList=!1,ee.trailingSpace=0,ee.trailingSpaceNewLine=!1,!ee.localState&&(ee.f=ee.block,ee.f!=Ot)){var gn=me.match(/^\s*/,!0)[0].replace(/\t/g,at).length;if(ee.indentation=gn,ee.indentationDiff=null,gn>0)return null}}return ee.f(me,ee)},innerMode:function(me){return me.block==Ot?{state:me.htmlState,mode:xe}:me.localState?{state:me.localState,mode:me.localMode}:{state:me,mode:Kn}},indent:function(me,ee,gn){return me.block==Ot&&xe.indent?xe.indent(me.htmlState,ee,gn):me.localState&&me.localMode.indent?me.localMode.indent(me.localState,ee,gn):St.Pass},blankLine:kt,getType:Wt,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Kn},"xml"),St.defineMIME("text/markdown","markdown"),St.defineMIME("text/x-markdown","markdown")})},98101:function(mn,je,Ut){(function(St){St(Ut(89780))})(function(St){"use strict";St.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 Xt=0;Xt<St.modeInfo.length;Xt++){var Ae=St.modeInfo[Xt];Ae.mimes&&(Ae.mime=Ae.mimes[0])}St.findModeByMIME=function(xe){xe=xe.toLowerCase();for(var fe=0;fe<St.modeInfo.length;fe++){var Rt=St.modeInfo[fe];if(Rt.mime==xe)return Rt;if(Rt.mimes){for(var ie=0;ie<Rt.mimes.length;ie++)if(Rt.mimes[ie]==xe)return Rt}}if(/\+xml$/.test(xe))return St.findModeByMIME("application/xml");if(/\+json$/.test(xe))return St.findModeByMIME("application/json")},St.findModeByExtension=function(xe){xe=xe.toLowerCase();for(var fe=0;fe<St.modeInfo.length;fe++){var Rt=St.modeInfo[fe];if(Rt.ext){for(var ie=0;ie<Rt.ext.length;ie++)if(Rt.ext[ie]==xe)return Rt}}},St.findModeByFileName=function(xe){for(var fe=0;fe<St.modeInfo.length;fe++){var Rt=St.modeInfo[fe];if(Rt.file&&Rt.file.test(xe))return Rt}var ie=xe.lastIndexOf("."),ae=ie>-1&&xe.substring(ie+1,xe.length);if(ae)return St.findModeByExtension(ae)},St.findModeByName=function(xe){xe=xe.toLowerCase();for(var fe=0;fe<St.modeInfo.length;fe++){var Rt=St.modeInfo[fe];if(Rt.name.toLowerCase()==xe)return Rt;if(Rt.alias){for(var ie=0;ie<Rt.alias.length;ie++)if(Rt.alias[ie].toLowerCase()==xe)return Rt}}}})},67549:function(mn,je,Ut){(function(St){St(Ut(89780))})(function(St){"use strict";St.defineMode("stex",function(Xt,Ae){"use strict";function xe(It,nt){It.cmdState.push(nt)}function fe(It){return It.cmdState.length>0?It.cmdState[It.cmdState.length-1]:null}function Rt(It){var nt=It.cmdState.pop();nt&&nt.closeBracket()}function ie(It){for(var nt=It.cmdState,et=nt.length-1;et>=0;et--){var At=nt[et];if(At.name!="DEFAULT")return At}return{styleIdentifier:function(){return null}}}function ae(It,nt,et){return function(){this.name=It,this.bracketNo=0,this.style=nt,this.styles=et,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var de={};de.importmodule=ae("importmodule","tag",["string","builtin"]),de.documentclass=ae("documentclass","tag",["","atom"]),de.usepackage=ae("usepackage","tag",["atom"]),de.begin=ae("begin","tag",["atom"]),de.end=ae("end","tag",["atom"]),de.label=ae("label","tag",["atom"]),de.ref=ae("ref","tag",["atom"]),de.eqref=ae("eqref","tag",["atom"]),de.cite=ae("cite","tag",["atom"]),de.bibitem=ae("bibitem","tag",["atom"]),de.Bibitem=ae("Bibitem","tag",["atom"]),de.RBibitem=ae("RBibitem","tag",["atom"]),de.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function zt(It,nt){It.f=nt}function Ie(It,nt){var et;if(It.match(/^\\[a-zA-Z@]+/)){var At=It.current().slice(1);return et=de.hasOwnProperty(At)?de[At]:de.DEFAULT,et=new et,xe(nt,et),zt(nt,Me),et.style}if(It.match(/^\\[$&%#{}_]/)||It.match(/^\\[,;!\/\\]/))return"tag";if(It.match("\\["))return zt(nt,function(dt,gt){return Yt(dt,gt,"\\]")}),"keyword";if(It.match("\\("))return zt(nt,function(dt,gt){return Yt(dt,gt,"\\)")}),"keyword";if(It.match("$$"))return zt(nt,function(dt,gt){return Yt(dt,gt,"$$")}),"keyword";if(It.match("$"))return zt(nt,function(dt,gt){return Yt(dt,gt,"$")}),"keyword";var at=It.next();if(at=="%")return It.skipToEnd(),"comment";if(at=="}"||at=="]"){if(et=fe(nt),et)et.closeBracket(at),zt(nt,Me);else return"error";return"bracket"}else return at=="{"||at=="["?(et=de.DEFAULT,et=new et,xe(nt,et),"bracket"):/\d/.test(at)?(It.eatWhile(/[\w.%]/),"atom"):(It.eatWhile(/[\w\-_]/),et=ie(nt),et.name=="begin"&&(et.argument=It.current()),et.styleIdentifier())}function Yt(It,nt,et){if(It.eatSpace())return null;if(et&&It.match(et))return zt(nt,Ie),"keyword";if(It.match(/^\\[a-zA-Z@]+/))return"tag";if(It.match(/^[a-zA-Z]+/))return"variable-2";if(It.match(/^\\[$&%#{}_]/)||It.match(/^\\[,;!\/]/)||It.match(/^[\^_&]/))return"tag";if(It.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(It.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var At=It.next();return At=="{"||At=="}"||At=="["||At=="]"||At=="("||At==")"?"bracket":At=="%"?(It.skipToEnd(),"comment"):"error"}function Me(It,nt){var et=It.peek(),At;return et=="{"||et=="["?(At=fe(nt),At.openBracket(et),It.eat(et),zt(nt,Ie),"bracket"):/[ \t\r]/.test(et)?(It.eat(et),null):(zt(nt,Ie),Rt(nt),Ie(It,nt))}return{startState:function(){var It=Ae.inMathMode?function(nt,et){return Yt(nt,et)}:Ie;return{cmdState:[],f:It}},copyState:function(It){return{cmdState:It.cmdState.slice(),f:It.f}},token:function(It,nt){return nt.f(It,nt)},blankLine:function(It){It.f=Ie,It.cmdState.length=0},lineComment:"%"}}),St.defineMIME("text/x-stex","stex"),St.defineMIME("text/x-latex","stex")})},15525:function(mn,je,Ut){(function(St){St(Ut(89780))})(function(St){"use strict";var Xt={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},Ae={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};St.defineMode("xml",function(xe,fe){var Rt=xe.indentUnit,ie={},ae=fe.htmlMode?Xt:Ae;for(var de in ae)ie[de]=ae[de];for(var de in fe)ie[de]=fe[de];var zt,Ie;function Yt(pe,Ke){function _e(yn){return Ke.tokenize=yn,yn(pe,Ke)}var en=pe.next();if(en=="<")return pe.eat("!")?pe.eat("[")?pe.match("CDATA[")?_e(nt("atom","]]>")):null:pe.match("--")?_e(nt("comment","-->")):pe.match("DOCTYPE",!0,!0)?(pe.eatWhile(/[\w\._\-]/),_e(et(1))):null:pe.eat("?")?(pe.eatWhile(/[\w\._\-]/),Ke.tokenize=nt("meta","?>"),"meta"):(zt=pe.eat("/")?"closeTag":"openTag",Ke.tokenize=Me,"tag bracket");if(en=="&"){var dn;return pe.eat("#")?pe.eat("x")?dn=pe.eatWhile(/[a-fA-F\d]/)&&pe.eat(";"):dn=pe.eatWhile(/[\d]/)&&pe.eat(";"):dn=pe.eatWhile(/[\w\.\-:]/)&&pe.eat(";"),dn?"atom":"error"}else return pe.eatWhile(/[^&<]/),null}Yt.isInText=!0;function Me(pe,Ke){var _e=pe.next();if(_e==">"||_e=="/"&&pe.eat(">"))return Ke.tokenize=Yt,zt=_e==">"?"endTag":"selfcloseTag","tag bracket";if(_e=="=")return zt="equals",null;if(_e=="<"){Ke.tokenize=Yt,Ke.state=gt,Ke.tagName=Ke.tagStart=null;var en=Ke.tokenize(pe,Ke);return en?en+" tag error":"tag error"}else return/[\'\"]/.test(_e)?(Ke.tokenize=It(_e),Ke.stringStartCol=pe.column(),Ke.tokenize(pe,Ke)):(pe.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function It(pe){var Ke=function(_e,en){for(;!_e.eol();)if(_e.next()==pe){en.tokenize=Me;break}return"string"};return Ke.isInAttribute=!0,Ke}function nt(pe,Ke){return function(_e,en){for(;!_e.eol();){if(_e.match(Ke)){en.tokenize=Yt;break}_e.next()}return pe}}function et(pe){return function(Ke,_e){for(var en;(en=Ke.next())!=null;){if(en=="<")return _e.tokenize=et(pe+1),_e.tokenize(Ke,_e);if(en==">")if(pe==1){_e.tokenize=Yt;break}else return _e.tokenize=et(pe-1),_e.tokenize(Ke,_e)}return"meta"}}function At(pe,Ke,_e){this.prev=pe.context,this.tagName=Ke,this.indent=pe.indented,this.startOfLine=_e,(ie.doNotIndent.hasOwnProperty(Ke)||pe.context&&pe.context.noIndent)&&(this.noIndent=!0)}function at(pe){pe.context&&(pe.context=pe.context.prev)}function dt(pe,Ke){for(var _e;;){if(!pe.context||(_e=pe.context.tagName,!ie.contextGrabbers.hasOwnProperty(_e)||!ie.contextGrabbers[_e].hasOwnProperty(Ke)))return;at(pe)}}function gt(pe,Ke,_e){return pe=="openTag"?(_e.tagStart=Ke.column(),xt):pe=="closeTag"?kt:gt}function xt(pe,Ke,_e){return pe=="word"?(_e.tagName=Ke.current(),Ie="tag",Zt):ie.allowMissingTagName&&pe=="endTag"?(Ie="tag bracket",Zt(pe,Ke,_e)):(Ie="error",xt)}function kt(pe,Ke,_e){if(pe=="word"){var en=Ke.current();return _e.context&&_e.context.tagName!=en&&ie.implicitlyClosed.hasOwnProperty(_e.context.tagName)&&at(_e),_e.context&&_e.context.tagName==en||ie.matchClosing===!1?(Ie="tag",Ht):(Ie="tag error",Ot)}else return ie.allowMissingTagName&&pe=="endTag"?(Ie="tag bracket",Ht(pe,Ke,_e)):(Ie="error",Ot)}function Ht(pe,Ke,_e){return pe!="endTag"?(Ie="error",Ht):(at(_e),gt)}function Ot(pe,Ke,_e){return Ie="error",Ht(pe,Ke,_e)}function Zt(pe,Ke,_e){if(pe=="word")return Ie="attribute",Wt;if(pe=="endTag"||pe=="selfcloseTag"){var en=_e.tagName,dn=_e.tagStart;return _e.tagName=_e.tagStart=null,pe=="selfcloseTag"||ie.autoSelfClosers.hasOwnProperty(en)?dt(_e,en):(dt(_e,en),_e.context=new At(_e,en,dn==_e.indented)),gt}return Ie="error",Zt}function Wt(pe,Ke,_e){return pe=="equals"?te:(ie.allowMissing||(Ie="error"),Zt(pe,Ke,_e))}function te(pe,Ke,_e){return pe=="string"?we:pe=="word"&&ie.allowUnquoted?(Ie="string",Zt):(Ie="error",Zt(pe,Ke,_e))}function we(pe,Ke,_e){return pe=="string"?we:Zt(pe,Ke,_e)}return{startState:function(pe){var Ke={tokenize:Yt,state:gt,indented:pe||0,tagName:null,tagStart:null,context:null};return pe!=null&&(Ke.baseIndent=pe),Ke},token:function(pe,Ke){if(!Ke.tagName&&pe.sol()&&(Ke.indented=pe.indentation()),pe.eatSpace())return null;zt=null;var _e=Ke.tokenize(pe,Ke);return(_e||zt)&&_e!="comment"&&(Ie=null,Ke.state=Ke.state(zt||_e,pe,Ke),Ie&&(_e=Ie=="error"?_e+" error":Ie)),_e},indent:function(pe,Ke,_e){var en=pe.context;if(pe.tokenize.isInAttribute)return pe.tagStart==pe.indented?pe.stringStartCol+1:pe.indented+Rt;if(en&&en.noIndent)return St.Pass;if(pe.tokenize!=Me&&pe.tokenize!=Yt)return _e?_e.match(/^(\s*)/)[0].length:0;if(pe.tagName)return ie.multilineTagIndentPastTag!==!1?pe.tagStart+pe.tagName.length+2:pe.tagStart+Rt*(ie.multilineTagIndentFactor||1);if(ie.alignCDATA&&/<!\[CDATA\[/.test(Ke))return 0;var dn=Ke&&/^<(\/)?([\w_:\.-]*)/.exec(Ke);if(dn&&dn[1])for(;en;)if(en.tagName==dn[2]){en=en.prev;break}else if(ie.implicitlyClosed.hasOwnProperty(en.tagName))en=en.prev;else break;else if(dn)for(;en;){var yn=ie.contextGrabbers[en.tagName];if(yn&&yn.hasOwnProperty(dn[2]))en=en.prev;else break}for(;en&&en.prev&&!en.startOfLine;)en=en.prev;return en?en.indent+Rt:pe.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:ie.htmlMode?"html":"xml",helperType:ie.htmlMode?"html":"xml",skipAttribute:function(pe){pe.state==te&&(pe.state=Zt)},xmlCurrentTag:function(pe){return pe.tagName?{name:pe.tagName,close:pe.type=="closeTag"}:null},xmlCurrentContext:function(pe){for(var Ke=[],_e=pe.context;_e;_e=_e.prev)_e.tagName&&Ke.push(_e.tagName);return Ke.reverse()}}}),St.defineMIME("text/xml","xml"),St.defineMIME("application/xml","xml"),St.mimeModes.hasOwnProperty("text/html")||St.defineMIME("text/html",{name:"xml",htmlMode:!0})})},97774:function(mn,je,Ut){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.default=void 0;var St=Object.assign||function(et){for(var At=1;At<arguments.length;At++){var at=arguments[At];for(var dt in at)Object.prototype.hasOwnProperty.call(at,dt)&&(et[dt]=at[dt])}return et},Xt=function(){function et(At,at){for(var dt=0;dt<at.length;dt++){var gt=at[dt];gt.enumerable=gt.enumerable||!1,gt.configurable=!0,"value"in gt&&(gt.writable=!0),Object.defineProperty(At,gt.key,gt)}}return function(At,at,dt){return at&&et(At.prototype,at),dt&&et(At,dt),At}}(),Ae=Ut(59301),xe=Ie(Ae),fe=Ut(12708),Rt=Ie(fe),ie=Ut(53291),ae=Ie(ie),de=Ut(47242),zt=Ut(65429);function Ie(et){return et&&et.__esModule?et:{default:et}}function Yt(et,At){if(!(et instanceof At))throw new TypeError("Cannot call a class as a function")}function Me(et,At){if(!et)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return At&&(typeof At=="object"||typeof At=="function")?At:et}function It(et,At){if(typeof At!="function"&&At!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof At);et.prototype=Object.create(At&&At.prototype,{constructor:{value:et,enumerable:!1,writable:!0,configurable:!0}}),At&&(Object.setPrototypeOf?Object.setPrototypeOf(et,At):et.__proto__=At)}var nt=function(et){It(At,et);function At(at){Yt(this,At);var dt=Me(this,(At.__proto__||Object.getPrototypeOf(At)).call(this,at));return dt.getEchartsInstance=function(){return dt.echartsLib.getInstanceByDom(dt.echartsElement)||dt.echartsLib.init(dt.echartsElement,dt.props.theme,dt.props.opts)},dt.dispose=function(){if(dt.echartsElement){try{(0,de.clear)(dt.echartsElement)}catch(gt){console.warn(gt)}dt.echartsLib.dispose(dt.echartsElement)}},dt.rerender=function(){var gt=dt.props,xt=gt.onEvents,kt=gt.onChartReady,Ht=dt.renderEchartDom();dt.bindEvents(Ht,xt||{}),typeof kt=="function"&&dt.props.onChartReady(Ht),dt.echartsElement&&(0,de.bind)(dt.echartsElement,function(){try{Ht.resize()}catch(Ot){console.warn(Ot)}})},dt.bindEvents=function(gt,xt){var kt=function(Zt,Wt){typeof Zt=="string"&&typeof Wt=="function"&&gt.on(Zt,function(te){Wt(te,gt)})};for(var Ht in xt)Object.prototype.hasOwnProperty.call(xt,Ht)&&kt(Ht,xt[Ht])},dt.renderEchartDom=function(){var gt=dt.getEchartsInstance();return gt.setOption(dt.props.option,dt.props.notMerge||!1,dt.props.lazyUpdate||!1),dt.props.showLoading?gt.showLoading(dt.props.loadingOption||null):gt.hideLoading(),gt},dt.echartsLib=at.echarts,dt.echartsElement=null,dt}return Xt(At,[{key:"componentDidMount",value:function(){this.rerender()}},{key:"componentDidUpdate",value:function(dt){if(!(typeof this.props.shouldSetOption=="function"&&!this.props.shouldSetOption(dt,this.props))){if(!(0,ae.default)(dt.theme,this.props.theme)||!(0,ae.default)(dt.opts,this.props.opts)||!(0,ae.default)(dt.onEvents,this.props.onEvents)){this.dispose(),this.rerender();return}var gt=["option","notMerge","lazyUpdate","showLoading","loadingOption"];if(!(0,ae.default)((0,zt.pick)(this.props,gt),(0,zt.pick)(dt,gt))){var xt=this.renderEchartDom();if(!(0,ae.default)(dt.style,this.props.style)||!(0,ae.default)(dt.className,this.props.className))try{xt.resize()}catch(kt){console.warn(kt)}}}}},{key:"componentWillUnmount",value:function(){this.dispose()}},{key:"render",value:function(){var dt=this,gt=this.props,xt=gt.style,kt=gt.className,Ht=St({height:300},xt);return xe.default.createElement("div",{ref:function(Zt){dt.echartsElement=Zt},style:Ht,className:"echarts-for-react "+kt})}}]),At}(Ae.Component);je.default=nt,nt.propTypes={option:Rt.default.object.isRequired,echarts:Rt.default.object,notMerge:Rt.default.bool,lazyUpdate:Rt.default.bool,style:Rt.default.object,className:Rt.default.string,theme:Rt.default.oneOfType([Rt.default.string,Rt.default.object]),onChartReady:Rt.default.func,showLoading:Rt.default.bool,loadingOption:Rt.default.object,onEvents:Rt.default.object,opts:Rt.default.shape({devicePixelRatio:Rt.default.number,renderer:Rt.default.oneOf(["canvas","svg"]),width:Rt.default.oneOfType([Rt.default.number,Rt.default.oneOf([null,void 0,"auto"])]),height:Rt.default.oneOfType([Rt.default.number,Rt.default.oneOf([null,void 0,"auto"])])}),shouldSetOption:Rt.default.func},nt.defaultProps={echarts:{},notMerge:!1,lazyUpdate:!1,style:{},className:"",theme:null,onChartReady:function(){},showLoading:!1,loadingOption:null,onEvents:{},opts:{},shouldSetOption:function(){return!0}}},42441:function(mn,je,Ut){"use strict";var St;St={value:!0},je.Z=void 0;var Xt=Ut(76411),Ae=Rt(Xt),xe=Ut(97774),fe=Rt(xe);function Rt(Ie){return Ie&&Ie.__esModule?Ie:{default:Ie}}function ie(Ie,Yt){if(!(Ie instanceof Yt))throw new TypeError("Cannot call a class as a function")}function ae(Ie,Yt){if(!Ie)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Yt&&(typeof Yt=="object"||typeof Yt=="function")?Yt:Ie}function de(Ie,Yt){if(typeof Yt!="function"&&Yt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Yt);Ie.prototype=Object.create(Yt&&Yt.prototype,{constructor:{value:Ie,enumerable:!1,writable:!0,configurable:!0}}),Yt&&(Object.setPrototypeOf?Object.setPrototypeOf(Ie,Yt):Ie.__proto__=Yt)}var zt=function(Ie){de(Yt,Ie);function Yt(Me){ie(this,Yt);var It=ae(this,(Yt.__proto__||Object.getPrototypeOf(Yt)).call(this,Me));return It.echartsLib=Ae.default,It}return Yt}(fe.default);je.Z=zt},65429:function(mn,je){"use strict";Object.defineProperty(je,"__esModule",{value:!0});var Ut=je.pick=function(Xt,Ae){var xe={};return Ae.forEach(function(fe){xe[fe]=Xt[fe]}),xe}},86204:function(mn){"use strict";var je=typeof Reflect=="object"?Reflect:null,Ut=je&&typeof je.apply=="function"?je.apply:function(gt,xt,kt){return Function.prototype.apply.call(gt,xt,kt)},St;je&&typeof je.ownKeys=="function"?St=je.ownKeys:Object.getOwnPropertySymbols?St=function(gt){return Object.getOwnPropertyNames(gt).concat(Object.getOwnPropertySymbols(gt))}:St=function(gt){return Object.getOwnPropertyNames(gt)};function Xt(dt){console&&console.warn&&console.warn(dt)}var Ae=Number.isNaN||function(gt){return gt!==gt};function xe(){xe.init.call(this)}mn.exports=xe,mn.exports.once=et,xe.EventEmitter=xe,xe.prototype._events=void 0,xe.prototype._eventsCount=0,xe.prototype._maxListeners=void 0;var fe=10;function Rt(dt){if(typeof dt!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof dt)}Object.defineProperty(xe,"defaultMaxListeners",{enumerable:!0,get:function(){return fe},set:function(dt){if(typeof dt!="number"||dt<0||Ae(dt))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+dt+".");fe=dt}}),xe.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},xe.prototype.setMaxListeners=function(gt){if(typeof gt!="number"||gt<0||Ae(gt))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+gt+".");return this._maxListeners=gt,this};function ie(dt){return dt._maxListeners===void 0?xe.defaultMaxListeners:dt._maxListeners}xe.prototype.getMaxListeners=function(){return ie(this)},xe.prototype.emit=function(gt){for(var xt=[],kt=1;kt<arguments.length;kt++)xt.push(arguments[kt]);var Ht=gt==="error",Ot=this._events;if(Ot!==void 0)Ht=Ht&&Ot.error===void 0;else if(!Ht)return!1;if(Ht){var Zt;if(xt.length>0&&(Zt=xt[0]),Zt instanceof Error)throw Zt;var Wt=new Error("Unhandled error."+(Zt?" ("+Zt.message+")":""));throw Wt.context=Zt,Wt}var te=Ot[gt];if(te===void 0)return!1;if(typeof te=="function")Ut(te,this,xt);else for(var we=te.length,pe=Me(te,we),kt=0;kt<we;++kt)Ut(pe[kt],this,xt);return!0};function ae(dt,gt,xt,kt){var Ht,Ot,Zt;if(Rt(xt),Ot=dt._events,Ot===void 0?(Ot=dt._events=Object.create(null),dt._eventsCount=0):(Ot.newListener!==void 0&&(dt.emit("newListener",gt,xt.listener?xt.listener:xt),Ot=dt._events),Zt=Ot[gt]),Zt===void 0)Zt=Ot[gt]=xt,++dt._eventsCount;else if(typeof Zt=="function"?Zt=Ot[gt]=kt?[xt,Zt]:[Zt,xt]:kt?Zt.unshift(xt):Zt.push(xt),Ht=ie(dt),Ht>0&&Zt.length>Ht&&!Zt.warned){Zt.warned=!0;var Wt=new Error("Possible EventEmitter memory leak detected. "+Zt.length+" "+String(gt)+" listeners added. Use emitter.setMaxListeners() to increase limit");Wt.name="MaxListenersExceededWarning",Wt.emitter=dt,Wt.type=gt,Wt.count=Zt.length,Xt(Wt)}return dt}xe.prototype.addListener=function(gt,xt){return ae(this,gt,xt,!1)},xe.prototype.on=xe.prototype.addListener,xe.prototype.prependListener=function(gt,xt){return ae(this,gt,xt,!0)};function de(){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 zt(dt,gt,xt){var kt={fired:!1,wrapFn:void 0,target:dt,type:gt,listener:xt},Ht=de.bind(kt);return Ht.listener=xt,kt.wrapFn=Ht,Ht}xe.prototype.once=function(gt,xt){return Rt(xt),this.on(gt,zt(this,gt,xt)),this},xe.prototype.prependOnceListener=function(gt,xt){return Rt(xt),this.prependListener(gt,zt(this,gt,xt)),this},xe.prototype.removeListener=function(gt,xt){var kt,Ht,Ot,Zt,Wt;if(Rt(xt),Ht=this._events,Ht===void 0)return this;if(kt=Ht[gt],kt===void 0)return this;if(kt===xt||kt.listener===xt)--this._eventsCount===0?this._events=Object.create(null):(delete Ht[gt],Ht.removeListener&&this.emit("removeListener",gt,kt.listener||xt));else if(typeof kt!="function"){for(Ot=-1,Zt=kt.length-1;Zt>=0;Zt--)if(kt[Zt]===xt||kt[Zt].listener===xt){Wt=kt[Zt].listener,Ot=Zt;break}if(Ot<0)return this;Ot===0?kt.shift():It(kt,Ot),kt.length===1&&(Ht[gt]=kt[0]),Ht.removeListener!==void 0&&this.emit("removeListener",gt,Wt||xt)}return this},xe.prototype.off=xe.prototype.removeListener,xe.prototype.removeAllListeners=function(gt){var xt,kt,Ht;if(kt=this._events,kt===void 0)return this;if(kt.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):kt[gt]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete kt[gt]),this;if(arguments.length===0){var Ot=Object.keys(kt),Zt;for(Ht=0;Ht<Ot.length;++Ht)Zt=Ot[Ht],Zt!=="removeListener"&&this.removeAllListeners(Zt);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(xt=kt[gt],typeof xt=="function")this.removeListener(gt,xt);else if(xt!==void 0)for(Ht=xt.length-1;Ht>=0;Ht--)this.removeListener(gt,xt[Ht]);return this};function Ie(dt,gt,xt){var kt=dt._events;if(kt===void 0)return[];var Ht=kt[gt];return Ht===void 0?[]:typeof Ht=="function"?xt?[Ht.listener||Ht]:[Ht]:xt?nt(Ht):Me(Ht,Ht.length)}xe.prototype.listeners=function(gt){return Ie(this,gt,!0)},xe.prototype.rawListeners=function(gt){return Ie(this,gt,!1)},xe.listenerCount=function(dt,gt){return typeof dt.listenerCount=="function"?dt.listenerCount(gt):Yt.call(dt,gt)},xe.prototype.listenerCount=Yt;function Yt(dt){var gt=this._events;if(gt!==void 0){var xt=gt[dt];if(typeof xt=="function")return 1;if(xt!==void 0)return xt.length}return 0}xe.prototype.eventNames=function(){return this._eventsCount>0?St(this._events):[]};function Me(dt,gt){for(var xt=new Array(gt),kt=0;kt<gt;++kt)xt[kt]=dt[kt];return xt}function It(dt,gt){for(;gt+1<dt.length;gt++)dt[gt]=dt[gt+1];dt.pop()}function nt(dt){for(var gt=new Array(dt.length),xt=0;xt<gt.length;++xt)gt[xt]=dt[xt].listener||dt[xt];return gt}function et(dt,gt){return new Promise(function(xt,kt){function Ht(Zt){dt.removeListener(gt,Ot),kt(Zt)}function Ot(){typeof dt.removeListener=="function"&&dt.removeListener("error",Ht),xt([].slice.call(arguments))}at(dt,gt,Ot,{once:!0}),gt!=="error"&&At(dt,Ht,{once:!0})})}function At(dt,gt,xt){typeof dt.on=="function"&&at(dt,"error",gt,xt)}function at(dt,gt,xt,kt){if(typeof dt.on=="function")kt.once?dt.once(gt,xt):dt.on(gt,xt);else if(typeof dt.addEventListener=="function")dt.addEventListener(gt,function Ht(Ot){kt.once&&dt.removeEventListener(gt,Ht),xt(Ot)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof dt)}},53291:function(mn){"use strict";var je=Array.isArray,Ut=Object.keys,St=Object.prototype.hasOwnProperty;mn.exports=function Xt(Ae,xe){if(Ae===xe)return!0;if(Ae&&xe&&typeof Ae=="object"&&typeof xe=="object"){var fe=je(Ae),Rt=je(xe),ie,ae,de;if(fe&&Rt){if(ae=Ae.length,ae!=xe.length)return!1;for(ie=ae;ie--!==0;)if(!Xt(Ae[ie],xe[ie]))return!1;return!0}if(fe!=Rt)return!1;var zt=Ae instanceof Date,Ie=xe instanceof Date;if(zt!=Ie)return!1;if(zt&&Ie)return Ae.getTime()==xe.getTime();var Yt=Ae instanceof RegExp,Me=xe instanceof RegExp;if(Yt!=Me)return!1;if(Yt&&Me)return Ae.toString()==xe.toString();var It=Ut(Ae);if(ae=It.length,ae!==Ut(xe).length)return!1;for(ie=ae;ie--!==0;)if(!St.call(xe,It[ie]))return!1;for(ie=ae;ie--!==0;)if(de=It[ie],!Xt(Ae[de],xe[de]))return!1;return!0}return Ae!==Ae&&xe!==xe}},6330:function(mn,je,Ut){"use strict";Ut.d(je,{HT:function(){return Li},iZ:function(){return ln}});var St={},Xt=function(re,he,ne,Xe,Fe){var an=new Worker(St[he]||(St[he]=URL.createObjectURL(new Blob([re+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return an.onmessage=function(Jn){var ii=Jn.data,Mi=ii.$e$;if(Mi){var hi=new Error(Mi[0]);hi.code=Mi[1],hi.stack=Mi[2],Fe(hi,null)}else Fe(null,ii)},an.postMessage(ne,Xe),an},Ae=Uint8Array,xe=Uint16Array,fe=Int32Array,Rt=new Ae([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ie=new Ae([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ae=new Ae([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),de=function(re,he){for(var ne=new xe(31),Xe=0;Xe<31;++Xe)ne[Xe]=he+=1<<re[Xe-1];for(var Fe=new fe(ne[30]),Xe=1;Xe<30;++Xe)for(var an=ne[Xe];an<ne[Xe+1];++an)Fe[an]=an-ne[Xe]<<5|Xe;return{b:ne,r:Fe}},zt=de(Rt,2),Ie=zt.b,Yt=zt.r;Ie[28]=258,Yt[258]=28;for(var Me=de(ie,0),It=Me.b,nt=Me.r,et=new xe(32768),At=0;At<32768;++At){var at=(At&43690)>>1|(At&21845)<<1;at=(at&52428)>>2|(at&13107)<<2,at=(at&61680)>>4|(at&3855)<<4,et[At]=((at&65280)>>8|(at&255)<<8)>>1}for(var dt=function(re,he,ne){for(var Xe=re.length,Fe=0,an=new xe(he);Fe<Xe;++Fe)re[Fe]&&++an[re[Fe]-1];var Jn=new xe(he);for(Fe=1;Fe<he;++Fe)Jn[Fe]=Jn[Fe-1]+an[Fe-1]<<1;var ii;if(ne){ii=new xe(1<<he);var Mi=15-he;for(Fe=0;Fe<Xe;++Fe)if(re[Fe])for(var hi=Fe<<4|re[Fe],Zn=he-re[Fe],ci=Jn[re[Fe]-1]++<<Zn,ke=ci|(1<<Zn)-1;ci<=ke;++ci)ii[et[ci]>>Mi]=hi}else for(ii=new xe(Xe),Fe=0;Fe<Xe;++Fe)re[Fe]&&(ii[Fe]=et[Jn[re[Fe]-1]++]>>15-re[Fe]);return ii},gt=new Ae(288),At=0;At<144;++At)gt[At]=8;for(var At=144;At<256;++At)gt[At]=9;for(var At=256;At<280;++At)gt[At]=7;for(var At=280;At<288;++At)gt[At]=8;for(var xt=new Ae(32),At=0;At<32;++At)xt[At]=5;var kt=dt(gt,9,0),Ht=dt(gt,9,1),Ot=dt(xt,5,0),Zt=dt(xt,5,1),Wt=function(re){for(var he=re[0],ne=1;ne<re.length;++ne)re[ne]>he&&(he=re[ne]);return he},te=function(re,he,ne){var Xe=he/8|0;return(re[Xe]|re[Xe+1]<<8)>>(he&7)&ne},we=function(re,he){var ne=he/8|0;return(re[ne]|re[ne+1]<<8|re[ne+2]<<16)>>(he&7)},pe=function(re){return(re+7)/8|0},Ke=function(re,he,ne){return(he==null||he<0)&&(he=0),(ne==null||ne>re.length)&&(ne=re.length),new Ae(re.subarray(he,ne))},_e={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},en=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],dn=function(re,he,ne){var Xe=new Error(he||en[re]);if(Xe.code=re,Error.captureStackTrace&&Error.captureStackTrace(Xe,dn),!ne)throw Xe;return Xe},yn=function(re,he,ne,Xe){var Fe=re.length,an=Xe?Xe.length:0;if(!Fe||he.f&&!he.l)return ne||new Ae(0);var Jn=!ne,ii=Jn||he.i!=2,Mi=he.i;Jn&&(ne=new Ae(Fe*3));var hi=function(eo){var kr=ne.length;if(eo>kr){var Ao=new Ae(Math.max(kr*2,eo));Ao.set(ne),ne=Ao}},Zn=he.f||0,ci=he.p||0,ke=he.b||0,An=he.l,be=he.d,Qt=he.m,ye=he.n,_n=Fe*8;do{if(!An){Zn=te(re,ci,1);var li=te(re,ci+1,3);if(ci+=3,li)if(li==1)An=Ht,be=Zt,Qt=9,ye=5;else if(li==2){var kn=te(re,ci,31)+257,Ln=te(re,ci+10,15)+4,Qe=kn+te(re,ci+5,31)+1;ci+=14;for(var sn=new Ae(Qe),vn=new Ae(19),Cn=0;Cn<Ln;++Cn)vn[ae[Cn]]=te(re,ci+Cn*3,7);ci+=Ln*3;for(var zn=Wt(vn),on=(1<<zn)-1,Ei=dt(vn,zn,1),Cn=0;Cn<Qe;){var Ii=Ei[te(re,ci,on)];ci+=Ii&15;var Wn=Ii>>4;if(Wn<16)sn[Cn++]=Wn;else{var nr=0,Ni=0;for(Wn==16?(Ni=3+te(re,ci,3),ci+=2,nr=sn[Cn-1]):Wn==17?(Ni=3+te(re,ci,7),ci+=3):Wn==18&&(Ni=11+te(re,ci,127),ci+=7);Ni--;)sn[Cn++]=nr}}var Mr=sn.subarray(0,kn),yr=sn.subarray(kn);Qt=Wt(Mr),ye=Wt(yr),An=dt(Mr,Qt,1),be=dt(yr,ye,1)}else dn(1);else{var Wn=pe(ci)+4,Hn=re[Wn-4]|re[Wn-3]<<8,cn=Wn+Hn;if(cn>Fe){Mi&&dn(0);break}ii&&hi(ke+Hn),ne.set(re.subarray(Wn,cn),ke),he.b=ke+=Hn,he.p=ci=cn*8,he.f=Zn;continue}if(ci>_n){Mi&&dn(0);break}}ii&&hi(ke+131072);for(var Zr=(1<<Qt)-1,Dr=(1<<ye)-1,Gr=ci;;Gr=ci){var nr=An[we(re,ci)&Zr],$r=nr>>4;if(ci+=nr&15,ci>_n){Mi&&dn(0);break}if(nr||dn(2),$r<256)ne[ke++]=$r;else if($r==256){Gr=ci,An=null;break}else{var Ue=$r-254;if($r>264){var Cn=$r-257,Fr=Rt[Cn];Ue=te(re,ci,(1<<Fr)-1)+Ie[Cn],ci+=Fr}var Er=be[we(re,ci)&Dr],fr=Er>>4;Er||dn(3),ci+=Er&15;var yr=It[fr];if(fr>3){var Fr=ie[fr];yr+=we(re,ci)&(1<<Fr)-1,ci+=Fr}if(ci>_n){Mi&&dn(0);break}ii&&hi(ke+131072);var $i=ke+Ue;if(ke<yr){var Rr=an-yr,ro=Math.min(yr,$i);for(Rr+ke<0&&dn(3);ke<ro;++ke)ne[ke]=Xe[Rr+ke]}for(;ke<$i;++ke)ne[ke]=ne[ke-yr]}}he.l=An,he.p=Gr,he.b=ke,he.f=Zn,An&&(Zn=1,he.m=Qt,he.d=be,he.n=ye)}while(!Zn);return ke!=ne.length&&Jn?Ke(ne,0,ke):ne.subarray(0,ke)},Nn=function(re,he,ne){ne<<=he&7;var Xe=he/8|0;re[Xe]|=ne,re[Xe+1]|=ne>>8},Kn=function(re,he,ne){ne<<=he&7;var Xe=he/8|0;re[Xe]|=ne,re[Xe+1]|=ne>>8,re[Xe+2]|=ne>>16},me=function(re,he){for(var ne=[],Xe=0;Xe<re.length;++Xe)re[Xe]&&ne.push({s:Xe,f:re[Xe]});var Fe=ne.length,an=ne.slice();if(!Fe)return{t:Gn,l:0};if(Fe==1){var Jn=new Ae(ne[0].s+1);return Jn[ne[0].s]=1,{t:Jn,l:1}}ne.sort(function(cn,kn){return cn.f-kn.f}),ne.push({s:-1,f:25001});var ii=ne[0],Mi=ne[1],hi=0,Zn=1,ci=2;for(ne[0]={s:-1,f:ii.f+Mi.f,l:ii,r:Mi};Zn!=Fe-1;)ii=ne[ne[hi].f<ne[ci].f?hi++:ci++],Mi=ne[hi!=Zn&&ne[hi].f<ne[ci].f?hi++:ci++],ne[Zn++]={s:-1,f:ii.f+Mi.f,l:ii,r:Mi};for(var ke=an[0].s,Xe=1;Xe<Fe;++Xe)an[Xe].s>ke&&(ke=an[Xe].s);var An=new xe(ke+1),be=ee(ne[Zn-1],An,0);if(be>he){var Xe=0,Qt=0,ye=be-he,_n=1<<ye;for(an.sort(function(kn,Ln){return An[Ln.s]-An[kn.s]||kn.f-Ln.f});Xe<Fe;++Xe){var li=an[Xe].s;if(An[li]>he)Qt+=_n-(1<<be-An[li]),An[li]=he;else break}for(Qt>>=ye;Qt>0;){var Wn=an[Xe].s;An[Wn]<he?Qt-=1<<he-An[Wn]++-1:++Xe}for(;Xe>=0&&Qt;--Xe){var Hn=an[Xe].s;An[Hn]==he&&(--An[Hn],++Qt)}be=he}return{t:new Ae(An),l:be}},ee=function(re,he,ne){return re.s==-1?Math.max(ee(re.l,he,ne+1),ee(re.r,he,ne+1)):he[re.s]=ne},gn=function(re){for(var he=re.length;he&&!re[--he];);for(var ne=new xe(++he),Xe=0,Fe=re[0],an=1,Jn=function(Mi){ne[Xe++]=Mi},ii=1;ii<=he;++ii)if(re[ii]==Fe&&ii!=he)++an;else{if(!Fe&&an>2){for(;an>138;an-=138)Jn(32754);an>2&&(Jn(an>10?an-11<<5|28690:an-3<<5|12305),an=0)}else if(an>3){for(Jn(Fe),--an;an>6;an-=6)Jn(8304);an>2&&(Jn(an-3<<5|8208),an=0)}for(;an--;)Jn(Fe);an=1,Fe=re[ii]}return{c:ne.subarray(0,Xe),n:he}},$n=function(re,he){for(var ne=0,Xe=0;Xe<he.length;++Xe)ne+=re[Xe]*he[Xe];return ne},Yn=function(re,he,ne){var Xe=ne.length,Fe=pe(he+2);re[Fe]=Xe&255,re[Fe+1]=Xe>>8,re[Fe+2]=re[Fe]^255,re[Fe+3]=re[Fe+1]^255;for(var an=0;an<Xe;++an)re[Fe+an+4]=ne[an];return(Fe+4+Xe)*8},nn=function(re,he,ne,Xe,Fe,an,Jn,ii,Mi,hi,Zn){Nn(he,Zn++,ne),++Fe[256];for(var ci=me(Fe,15),ke=ci.t,An=ci.l,be=me(an,15),Qt=be.t,ye=be.l,_n=gn(ke),li=_n.c,Wn=_n.n,Hn=gn(Qt),cn=Hn.c,kn=Hn.n,Ln=new xe(19),Qe=0;Qe<li.length;++Qe)++Ln[li[Qe]&31];for(var Qe=0;Qe<cn.length;++Qe)++Ln[cn[Qe]&31];for(var sn=me(Ln,7),vn=sn.t,Cn=sn.l,zn=19;zn>4&&!vn[ae[zn-1]];--zn);var on=hi+5<<3,Ei=$n(Fe,gt)+$n(an,xt)+Jn,Ii=$n(Fe,ke)+$n(an,Qt)+Jn+14+3*zn+$n(Ln,vn)+2*Ln[16]+3*Ln[17]+7*Ln[18];if(Mi>=0&&on<=Ei&&on<=Ii)return Yn(he,Zn,re.subarray(Mi,Mi+hi));var nr,Ni,Mr,yr;if(Nn(he,Zn,1+(Ii<Ei)),Zn+=2,Ii<Ei){nr=dt(ke,An,0),Ni=ke,Mr=dt(Qt,ye,0),yr=Qt;var Zr=dt(vn,Cn,0);Nn(he,Zn,Wn-257),Nn(he,Zn+5,kn-1),Nn(he,Zn+10,zn-4),Zn+=14;for(var Qe=0;Qe<zn;++Qe)Nn(he,Zn+3*Qe,vn[ae[Qe]]);Zn+=3*zn;for(var Dr=[li,cn],Gr=0;Gr<2;++Gr)for(var $r=Dr[Gr],Qe=0;Qe<$r.length;++Qe){var Ue=$r[Qe]&31;Nn(he,Zn,Zr[Ue]),Zn+=vn[Ue],Ue>15&&(Nn(he,Zn,$r[Qe]>>5&127),Zn+=$r[Qe]>>12)}}else nr=kt,Ni=gt,Mr=Ot,yr=xt;for(var Qe=0;Qe<ii;++Qe){var Fr=Xe[Qe];if(Fr>255){var Ue=Fr>>18&31;Kn(he,Zn,nr[Ue+257]),Zn+=Ni[Ue+257],Ue>7&&(Nn(he,Zn,Fr>>23&31),Zn+=Rt[Ue]);var Er=Fr&31;Kn(he,Zn,Mr[Er]),Zn+=yr[Er],Er>3&&(Kn(he,Zn,Fr>>5&8191),Zn+=ie[Er])}else Kn(he,Zn,nr[Fr]),Zn+=Ni[Fr]}return Kn(he,Zn,nr[256]),Zn+Ni[256]},Tn=new fe([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Gn=new Ae(0),yi=function(re,he,ne,Xe,Fe,an){var Jn=an.z||re.length,ii=new Ae(Xe+Jn+5*(1+Math.ceil(Jn/7e3))+Fe),Mi=ii.subarray(Xe,ii.length-Fe),hi=an.l,Zn=(an.r||0)&7;if(he){Zn&&(Mi[0]=an.r>>3);for(var ci=Tn[he-1],ke=ci>>13,An=ci&8191,be=(1<<ne)-1,Qt=an.p||new xe(32768),ye=an.h||new xe(be+1),_n=Math.ceil(ne/3),li=2*_n,Wn=function($o){return(re[$o]^re[$o+1]<<_n^re[$o+2]<<li)&be},Hn=new fe(25e3),cn=new xe(288),kn=new xe(32),Ln=0,Qe=0,sn=an.i||0,vn=0,Cn=an.w||0,zn=0;sn+2<Jn;++sn){var on=Wn(sn),Ei=sn&32767,Ii=ye[on];if(Qt[Ei]=Ii,ye[on]=Ei,Cn<=sn){var nr=Jn-sn;if((Ln>7e3||vn>24576)&&(nr>423||!hi)){Zn=nn(re,Mi,0,Hn,cn,kn,Qe,vn,zn,sn-zn,Zn),vn=Ln=Qe=0,zn=sn;for(var Ni=0;Ni<286;++Ni)cn[Ni]=0;for(var Ni=0;Ni<30;++Ni)kn[Ni]=0}var Mr=2,yr=0,Zr=An,Dr=Ei-Ii&32767;if(nr>2&&on==Wn(sn-Dr))for(var Gr=Math.min(ke,nr)-1,$r=Math.min(32767,sn),Ue=Math.min(258,nr);Dr<=$r&&--Zr&&Ei!=Ii;){if(re[sn+Mr]==re[sn+Mr-Dr]){for(var Fr=0;Fr<Ue&&re[sn+Fr]==re[sn+Fr-Dr];++Fr);if(Fr>Mr){if(Mr=Fr,yr=Dr,Fr>Gr)break;for(var Er=Math.min(Dr,Fr-2),fr=0,Ni=0;Ni<Er;++Ni){var $i=sn-Dr+Ni&32767,Rr=Qt[$i],ro=$i-Rr&32767;ro>fr&&(fr=ro,Ii=$i)}}}Ei=Ii,Ii=Qt[Ei],Dr+=Ei-Ii&32767}if(yr){Hn[vn++]=268435456|Yt[Mr]<<18|nt[yr];var eo=Yt[Mr]&31,kr=nt[yr]&31;Qe+=Rt[eo]+ie[kr],++cn[257+eo],++kn[kr],Cn=sn+Mr,++Ln}else Hn[vn++]=re[sn],++cn[re[sn]]}}for(sn=Math.max(sn,Cn);sn<Jn;++sn)Hn[vn++]=re[sn],++cn[re[sn]];Zn=nn(re,Mi,hi,Hn,cn,kn,Qe,vn,zn,sn-zn,Zn),hi||(an.r=Zn&7|Mi[Zn/8|0]<<3,Zn-=7,an.h=ye,an.p=Qt,an.i=sn,an.w=Cn)}else{for(var sn=an.w||0;sn<Jn+hi;sn+=65535){var Ao=sn+65535;Ao>=Jn&&(Mi[Zn/8|0]=hi,Ao=Jn),Zn=Yn(Mi,Zn+1,re.subarray(sn,Ao))}an.i=Jn}return Ke(ii,0,Xe+pe(Zn)+Fe)},Je=null,Le=function(){var re=-1;return{p:function(he){for(var ne=re,Xe=0;Xe<he.length;++Xe)ne=Je[ne&255^he[Xe]]^ne>>>8;re=ne},d:function(){return~re}}},tn=function(){var re=1,he=0;return{p:function(ne){for(var Xe=re,Fe=he,an=ne.length|0,Jn=0;Jn!=an;){for(var ii=Math.min(Jn+2655,an);Jn<ii;++Jn)Fe+=Xe+=ne[Jn];Xe=(Xe&65535)+15*(Xe>>16),Fe=(Fe&65535)+15*(Fe>>16)}re=Xe,he=Fe},d:function(){return re%=65521,he%=65521,(re&255)<<24|(re&65280)<<8|(he&255)<<8|he>>8}}},ti=function(re,he,ne,Xe,Fe){if(!Fe&&(Fe={l:1},he.dictionary)){var an=he.dictionary.subarray(-32768),Jn=new Ae(an.length+re.length);Jn.set(an),Jn.set(re,an.length),re=Jn,Fe.w=an.length}return yi(re,he.level==null?6:he.level,he.mem==null?Fe.l?Math.ceil(Math.max(8,Math.min(13,Math.log(re.length)))*1.5):20:12+he.mem,ne,Xe,Fe)},jn=function(re,he){var ne={};for(var Xe in re)ne[Xe]=re[Xe];for(var Xe in he)ne[Xe]=he[Xe];return ne},Gt=function(re,he,ne){for(var Xe=re(),Fe=re.toString(),an=Fe.slice(Fe.indexOf("[")+1,Fe.lastIndexOf("]")).replace(/\s+/g,"").split(","),Jn=0;Jn<Xe.length;++Jn){var ii=Xe[Jn],Mi=an[Jn];if(typeof ii=="function"){he+=";"+Mi+"=";var hi=ii.toString();if(ii.prototype)if(hi.indexOf("[native code]")!=-1){var Zn=hi.indexOf(" ",8)+1;he+=hi.slice(Zn,hi.indexOf("(",Zn))}else{he+=hi;for(var ci in ii.prototype)he+=";"+Mi+".prototype."+ci+"="+ii.prototype[ci].toString()}else he+=hi}else ne[Mi]=ii}return he},Ft=null,mt=function(re){var he=[];for(var ne in re)re[ne].buffer&&he.push((re[ne]=new re[ne].constructor(re[ne])).buffer);return he},vt=function(re,he,ne,Xe){if(!Ft[ne]){for(var Fe="",an={},Jn=re.length-1,ii=0;ii<Jn;++ii)Fe=Gt(re[ii],Fe,an);Ft[ne]={c:Gt(re[Jn],Fe,an),e:an}}var Mi=jn({},Ft[ne].e);return Xt(Ft[ne].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+he.toString()+"}",ne,Mi,mt(Mi),Xe)},Lt=function(){return[Ae,xe,fe,Rt,ie,ae,Ie,It,Ht,Zt,et,en,dt,Wt,te,we,pe,Ke,dn,yn,no,Ge,Te]},Ct=function(){return[Ae,xe,fe,Rt,ie,ae,Yt,nt,kt,gt,Ot,xt,et,Tn,Gn,dt,Nn,Kn,me,ee,gn,$n,Yn,nn,pe,Ke,yi,ti,jr,Ge]},_t=function(){return[Ai,Fi,ai,Le,Je]},Pe=function(){return[pi,ur]},ze=function(){return[zi,ai,tn]},wn=function(){return[Xi]},Ge=function(re){return postMessage(re,[re.buffer])},Te=function(re){return re&&{out:re.size&&new Ae(re.size),dictionary:re.dictionary}},Ze=function(re,he,ne,Xe,Fe,an){var Jn=vt(ne,Xe,Fe,function(ii,Mi){Jn.terminate(),an(ii,Mi)});return Jn.postMessage([re,he],he.consume?[re.buffer]:[]),function(){Jn.terminate()}},hn=function(re){return re.ondata=function(he,ne){return postMessage([he,ne],[he.buffer])},function(he){he.data.length?(re.push(he.data[0],he.data[1]),postMessage([he.data[0].length])):re.flush()}},In=function(re,he,ne,Xe,Fe,an,Jn){var ii,Mi=vt(re,Xe,Fe,function(hi,Zn){hi?(Mi.terminate(),he.ondata.call(he,hi)):Array.isArray(Zn)?Zn.length==1?(he.queuedSize-=Zn[0],he.ondrain&&he.ondrain(Zn[0])):(Zn[1]&&Mi.terminate(),he.ondata.call(he,hi,Zn[0],Zn[1])):Jn(Zn)});Mi.postMessage(ne),he.queuedSize=0,he.push=function(hi,Zn){he.ondata||dn(5),ii&&he.ondata(dn(4,0,1),null,!!Zn),he.queuedSize+=hi.length,Mi.postMessage([hi,ii=Zn],[hi.buffer])},he.terminate=function(){Mi.terminate()},an&&(he.flush=function(){Mi.postMessage([])})},si=function(re,he){return re[he]|re[he+1]<<8},Dn=function(re,he){return(re[he]|re[he+1]<<8|re[he+2]<<16|re[he+3]<<24)>>>0},Oi=function(re,he){return Dn(re,he)+Dn(re,he+4)*4294967296},ai=function(re,he,ne){for(;ne;++he)re[he]=ne,ne>>>=8},Ai=function(re,he){var ne=he.filename;if(re[0]=31,re[1]=139,re[2]=8,re[8]=he.level<2?4:he.level==9?2:0,re[9]=3,he.mtime!=0&&ai(re,4,Math.floor(new Date(he.mtime||Date.now())/1e3)),ne){re[3]=8;for(var Xe=0;Xe<=ne.length;++Xe)re[Xe+10]=ne.charCodeAt(Xe)}},pi=function(re){(re[0]!=31||re[1]!=139||re[2]!=8)&&dn(6,"invalid gzip data");var he=re[3],ne=10;he&4&&(ne+=(re[10]|re[11]<<8)+2);for(var Xe=(he>>3&1)+(he>>4&1);Xe>0;Xe-=!re[ne++]);return ne+(he&2)},ur=function(re){var he=re.length;return(re[he-4]|re[he-3]<<8|re[he-2]<<16|re[he-1]<<24)>>>0},Fi=function(re){return 10+(re.filename?re.filename.length+1:0)},zi=function(re,he){var ne=he.level,Xe=ne==0?0:ne<6?1:ne==9?3:2;if(re[0]=120,re[1]=Xe<<6|(he.dictionary&&32),re[1]|=31-(re[0]<<8|re[1])%31,he.dictionary){var Fe=tn();Fe.p(he.dictionary),ai(re,2,Fe.d())}},Xi=function(re,he){return((re[0]&15)!=8||re[0]>>4>7||(re[0]<<8|re[1])%31)&&dn(6,"invalid zlib data"),(re[1]>>5&1)==+!he&&dn(6,"invalid zlib data: "+(re[1]&32?"need":"unexpected")+" dictionary"),(re[1]>>3&4)+2};function Lr(re,he){return typeof re=="function"&&(he=re,re={}),this.ondata=he,re}var wi=null,Nr=null;function Br(re,he,ne){return ne||(ne=he,he={}),typeof ne!="function"&&dn(7),Ze(re,he,[Ct],function(Xe){return Ge(jr(Xe.data[0],Xe.data[1]))},0,ne)}function jr(re,he){return ti(re,he||{},0,0)}var Wi=null,po=null;function mo(re,he,ne){return ne||(ne=he,he={}),typeof ne!="function"&&dn(7),Ze(re,he,[Lt],function(Xe){return Ge(no(Xe.data[0],Te(Xe.data[1])))},1,ne)}function no(re,he){return yn(re,{i:2},he&&he.out,he&&he.dictionary)}var ir=null,so=null;function Tt(re,he,ne){return ne||(ne=he,he={}),typeof ne!="function"&&dn(7),Ze(re,he,[Ct,_t,function(){return[Pr]}],function(Xe){return Ge(Pr(Xe.data[0],Xe.data[1]))},2,ne)}function Pr(re,he){he||(he={});var ne=Le(),Xe=re.length;ne.p(re);var Fe=ti(re,he,Fi(he),8),an=Fe.length;return Ai(Fe,he),ai(Fe,an-8,ne.d()),ai(Fe,an-4,Xe),Fe}var Zi=null,xi=null;function Hi(re,he,ne){return ne||(ne=he,he={}),typeof ne!="function"&&dn(7),Ze(re,he,[Lt,Pe,function(){return[ji]}],function(Xe){return Ge(ji(Xe.data[0],Xe.data[1]))},3,ne)}function ji(re,he){var ne=pi(re);return ne+8>re.length&&dn(6,"invalid gzip data"),yn(re.subarray(ne,-8),{i:2},he&&he.out||new Ae(ur(re)),he&&he.dictionary)}var tr=null,qr=null;function un(re,he,ne){return ne||(ne=he,he={}),typeof ne!="function"&&dn(7),Ze(re,he,[Ct,ze,function(){return[ln]}],function(Xe){return Ge(ln(Xe.data[0],Xe.data[1]))},4,ne)}function ln(re,he){he||(he={});var ne=tn();ne.p(re);var Xe=ti(re,he,he.dictionary?6:2,4);return zi(Xe,he),ai(Xe,Xe.length-4,ne.d()),Xe}var We=null,Sn=null;function Ki(re,he,ne){return ne||(ne=he,he={}),typeof ne!="function"&&dn(7),Ze(re,he,[Lt,wn,function(){return[Li]}],function(Xe){return Ge(Li(Xe.data[0],Te(Xe.data[1])))},5,ne)}function Li(re,he){return yn(re.subarray(Xi(re,he&&he.dictionary),-4),{i:2},he&&he.out,he&&he.dictionary)}var dr=null,se=null;function Mn(re,he,ne){return ne||(ne=he,he={}),typeof ne!="function"&&dn(7),re[0]==31&&re[1]==139&&re[2]==8?Hi(re,he,ne):(re[0]&15)!=8||re[0]>>4>7||(re[0]<<8|re[1])%31?mo(re,he,ne):Ki(re,he,ne)}function Di(re,he){return re[0]==31&&re[1]==139&&re[2]==8?ji(re,he):(re[0]&15)!=8||re[0]>>4>7||(re[0]<<8|re[1])%31?no(re,he):Li(re,he)}var pr=function(re,he,ne,Xe){for(var Fe in re){var an=re[Fe],Jn=he+Fe,ii=Xe;Array.isArray(an)&&(ii=jn(Xe,an[1]),an=an[0]),an instanceof Ae?ne[Jn]=[an,ii]:(ne[Jn+="/"]=[new Ae(0),ii],pr(an,Jn,ne,Xe))}},Vn=typeof TextEncoder!="undefined"&&new TextEncoder,le=typeof TextDecoder!="undefined"&&new TextDecoder,De=0;try{le.decode(Gn,{stream:!0}),De=1}catch(re){}var Xn=function(re){for(var he="",ne=0;;){var Xe=re[ne++],Fe=(Xe>127)+(Xe>223)+(Xe>239);if(ne+Fe>re.length)return{s:he,r:Ke(re,ne-1)};Fe?Fe==3?(Xe=((Xe&15)<<18|(re[ne++]&63)<<12|(re[ne++]&63)<<6|re[ne++]&63)-65536,he+=String.fromCharCode(55296|Xe>>10,56320|Xe&1023)):Fe&1?he+=String.fromCharCode((Xe&31)<<6|re[ne++]&63):he+=String.fromCharCode((Xe&15)<<12|(re[ne++]&63)<<6|re[ne++]&63):he+=String.fromCharCode(Xe)}},On=null,qe=null;function ei(re,he){if(he){for(var ne=new Ae(re.length),Xe=0;Xe<re.length;++Xe)ne[Xe]=re.charCodeAt(Xe);return ne}if(Vn)return Vn.encode(re);for(var Fe=re.length,an=new Ae(re.length+(re.length>>1)),Jn=0,ii=function(Zn){an[Jn++]=Zn},Xe=0;Xe<Fe;++Xe){if(Jn+5>an.length){var Mi=new Ae(Jn+8+(Fe-Xe<<1));Mi.set(an),an=Mi}var hi=re.charCodeAt(Xe);hi<128||he?ii(hi):hi<2048?(ii(192|hi>>6),ii(128|hi&63)):hi>55295&&hi<57344?(hi=65536+(hi&1047552)|re.charCodeAt(++Xe)&1023,ii(240|hi>>18),ii(128|hi>>12&63),ii(128|hi>>6&63),ii(128|hi&63)):(ii(224|hi>>12),ii(128|hi>>6&63),ii(128|hi&63))}return Ke(an,0,Jn)}function fi(re,he){if(he){for(var ne="",Xe=0;Xe<re.length;Xe+=16384)ne+=String.fromCharCode.apply(null,re.subarray(Xe,Xe+16384));return ne}else{if(le)return le.decode(re);var Fe=Xn(re),an=Fe.s,ne=Fe.r;return ne.length&&dn(8),an}}var ki=function(re){return re==1?3:re<6?2:re==9?1:0},Vi=function(re,he){return he+30+si(re,he+26)+si(re,he+28)},rn=function(re,he,ne){var Xe=si(re,he+28),Fe=fi(re.subarray(he+46,he+46+Xe),!(si(re,he+8)&2048)),an=he+46+Xe,Jn=Dn(re,he+20),ii=ne&&Jn==4294967295?Ve(re,an):[Jn,Dn(re,he+24),Dn(re,he+42)],Mi=ii[0],hi=ii[1],Zn=ii[2];return[si(re,he+10),Mi,hi,Fe,an+si(re,he+30)+si(re,he+32),Zn]},Ve=function(re,he){for(;si(re,he)!=1;he+=4+si(re,he+2));return[Oi(re,he+12),Oi(re,he+4),Oi(re,he+20)]},fn=function(re){var he=0;if(re)for(var ne in re){var Xe=re[ne].length;Xe>65535&&dn(9),he+=Xe+4}return he},mi=function(re,he,ne,Xe,Fe,an,Jn,ii){var Mi=Xe.length,hi=ne.extra,Zn=ii&&ii.length,ci=fn(hi);ai(re,he,Jn!=null?33639248:67324752),he+=4,Jn!=null&&(re[he++]=20,re[he++]=ne.os),re[he]=20,he+=2,re[he++]=ne.flag<<1|(an<0&&8),re[he++]=Fe&&8,re[he++]=ne.compression&255,re[he++]=ne.compression>>8;var ke=new Date(ne.mtime==null?Date.now():ne.mtime),An=ke.getFullYear()-1980;if((An<0||An>119)&&dn(10),ai(re,he,An<<25|ke.getMonth()+1<<21|ke.getDate()<<16|ke.getHours()<<11|ke.getMinutes()<<5|ke.getSeconds()>>1),he+=4,an!=-1&&(ai(re,he,ne.crc),ai(re,he+4,an<0?-an-2:an),ai(re,he+8,ne.size)),ai(re,he+12,Mi),ai(re,he+14,ci),he+=16,Jn!=null&&(ai(re,he,Zn),ai(re,he+6,ne.attrs),ai(re,he+10,Jn),he+=14),re.set(Xe,he),he+=Mi,ci)for(var be in hi){var Qt=hi[be],ye=Qt.length;ai(re,he,+be),ai(re,he+2,ye),re.set(Qt,he+4),he+=4+ye}return Zn&&(re.set(ii,he),he+=Zn),he},Pi=function(re,he,ne,Xe,Fe){ai(re,he,101010256),ai(re,he+8,ne),ai(re,he+10,ne),ai(re,he+12,Xe),ai(re,he+16,Fe)},Pn=null,ni=null,Gi=null,er=null;function Or(re,he,ne){ne||(ne=he,he={}),typeof ne!="function"&&dn(7);var Xe={};pr(re,"",Xe,he);var Fe=Object.keys(Xe),an=Fe.length,Jn=0,ii=0,Mi=an,hi=new Array(an),Zn=[],ci=function(){for(var ye=0;ye<Zn.length;++ye)Zn[ye]()},ke=function(ye,_n){xr(function(){ne(ye,_n)})};xr(function(){ke=ne});var An=function(){var ye=new Ae(ii+22),_n=Jn,li=ii-Jn;ii=0;for(var Wn=0;Wn<Mi;++Wn){var Hn=hi[Wn];try{var cn=Hn.c.length;mi(ye,ii,Hn,Hn.f,Hn.u,cn);var kn=30+Hn.f.length+fn(Hn.extra),Ln=ii+kn;ye.set(Hn.c,Ln),mi(ye,Jn,Hn,Hn.f,Hn.u,cn,ii,Hn.m),Jn+=16+kn+(Hn.m?Hn.m.length:0),ii=Ln+cn}catch(Qe){return ke(Qe,null)}}Pi(ye,Jn,hi.length,li,_n),ke(null,ye)};an||An();for(var be=function(ye){var _n=Fe[ye],li=Xe[_n],Wn=li[0],Hn=li[1],cn=Le(),kn=Wn.length;cn.p(Wn);var Ln=ei(_n),Qe=Ln.length,sn=Hn.comment,vn=sn&&ei(sn),Cn=vn&&vn.length,zn=fn(Hn.extra),on=Hn.level==0?0:8,Ei=function(Ii,nr){if(Ii)ci(),ke(Ii,null);else{var Ni=nr.length;hi[ye]=jn(Hn,{size:kn,crc:cn.d(),c:nr,f:Ln,m:vn,u:Qe!=_n.length||vn&&sn.length!=Cn,compression:on}),Jn+=30+Qe+zn+Ni,ii+=76+2*(Qe+zn)+(Cn||0)+Ni,--an||An()}};if(Qe>65535&&Ei(dn(11,0,1),null),!on)Ei(null,Wn);else if(kn<16e4)try{Ei(null,jr(Wn,Hn))}catch(Ii){Ei(Ii,null)}else Zn.push(Br(Wn,Hn,Ei))},Qt=0;Qt<Mi;++Qt)be(Qt);return ci}function Oe(re,he){he||(he={});var ne={},Xe=[];pr(re,"",ne,he);var Fe=0,an=0;for(var Jn in ne){var ii=ne[Jn],Mi=ii[0],hi=ii[1],Zn=hi.level==0?0:8,ci=ei(Jn),ke=ci.length,An=hi.comment,be=An&&ei(An),Qt=be&&be.length,ye=fn(hi.extra);ke>65535&&dn(11);var _n=Zn?jr(Mi,hi):Mi,li=_n.length,Wn=Le();Wn.p(Mi),Xe.push(jn(hi,{size:Mi.length,crc:Wn.d(),c:_n,f:ci,m:be,u:ke!=Jn.length||be&&An.length!=Qt,o:Fe,compression:Zn})),Fe+=30+ke+ye+li,an+=76+2*(ke+ye)+(Qt||0)+li}for(var Hn=new Ae(an+22),cn=Fe,kn=an-Fe,Ln=0;Ln<Xe.length;++Ln){var ci=Xe[Ln];mi(Hn,ci.o,ci,ci.f,ci.u,ci.c.length);var Qe=30+ci.f.length+fn(ci.extra);Hn.set(ci.c,ci.o+Qe),mi(Hn,Fe,ci,ci.f,ci.u,ci.c.length,ci.o,ci.m),Fe+=16+Qe+(ci.m?ci.m.length:0)}return Pi(Hn,Fe,Xe.length,kn,cn),Hn}var Ui=null,hr=null,Si=null,Qr=null,xr=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(re){re()};function Ri(re,he,ne){ne||(ne=he,he={}),typeof ne!="function"&&dn(7);var Xe=[],Fe=function(){for(var ye=0;ye<Xe.length;++ye)Xe[ye]()},an={},Jn=function(ye,_n){xr(function(){ne(ye,_n)})};xr(function(){Jn=ne});for(var ii=re.length-22;Dn(re,ii)!=101010256;--ii)if(!ii||re.length-ii>65558)return Jn(dn(13,0,1),null),Fe;var Mi=si(re,ii+8);if(Mi){var hi=Mi,Zn=Dn(re,ii+16),ci=Zn==4294967295||hi==65535;if(ci){var ke=Dn(re,ii-12);ci=Dn(re,ke)==101075792,ci&&(hi=Mi=Dn(re,ke+32),Zn=Dn(re,ke+48))}for(var An=he&&he.filter,be=function(ye){var _n=rn(re,Zn,ci),li=_n[0],Wn=_n[1],Hn=_n[2],cn=_n[3],kn=_n[4],Ln=_n[5],Qe=Vi(re,Ln);Zn=kn;var sn=function(Cn,zn){Cn?(Fe(),Jn(Cn,null)):(zn&&(an[cn]=zn),--Mi||Jn(null,an))};if(!An||An({name:cn,size:Wn,originalSize:Hn,compression:li}))if(!li)sn(null,Ke(re,Qe,Qe+Wn));else if(li==8){var vn=re.subarray(Qe,Qe+Wn);if(Hn<524288||Wn>.8*Hn)try{sn(null,no(vn,{out:new Ae(Hn)}))}catch(Cn){sn(Cn,null)}else Xe.push(mo(vn,{size:Hn},sn))}else sn(dn(14,"unknown compression type "+li,1),null);else sn(null,null)},Qt=0;Qt<hi;++Qt)be(Qt)}else Jn(null,{});return Fe}function qi(re,he){for(var ne={},Xe=re.length-22;Dn(re,Xe)!=101010256;--Xe)(!Xe||re.length-Xe>65558)&&dn(13);var Fe=si(re,Xe+8);if(!Fe)return{};var an=Dn(re,Xe+16),Jn=an==4294967295||Fe==65535;if(Jn){var ii=Dn(re,Xe-12);Jn=Dn(re,ii)==101075792,Jn&&(Fe=Dn(re,ii+32),an=Dn(re,ii+48))}for(var Mi=he&&he.filter,hi=0;hi<Fe;++hi){var Zn=rn(re,an,Jn),ci=Zn[0],ke=Zn[1],An=Zn[2],be=Zn[3],Qt=Zn[4],ye=Zn[5],_n=Vi(re,ye);an=Qt,(!Mi||Mi({name:be,size:ke,originalSize:An,compression:ci}))&&(ci?ci==8?ne[be]=no(re.subarray(_n,_n+ke),{out:new Ae(An)}):dn(14,"unknown compression type "+ci):ne[be]=Ke(re,_n,_n+ke))}return ne}},12378:function(mn,je,Ut){"use strict";Ut.d(je,{$u:function(){return de},BD:function(){return Gt},E9:function(){return ae},FF:function(){return po},FJ:function(){return gt},Hn:function(){return dt},KX:function(){return kt},NB:function(){return Ge},S0:function(){return tn},UL:function(){return zt},Vk:function(){return at},Vm:function(){return Ze},YI:function(){return ti},ZA:function(){return Ae},Zt:function(){return Ie},al:function(){return Ct},bn:function(){return Lt},bx:function(){return Ft},g2:function(){return jn},h1:function(){return te},hD:function(){return zi},l4:function(){return Rt},rU:function(){return Te},s_:function(){return mt},uz:function(){return wn},z6:function(){return Yt}}),mn=Ut.hmd(mn),function(){var Tt;function Pr(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Zi(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Pr(a)}}function xi(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var Hi=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},ji;if(typeof Object.setPrototypeOf=="function")ji=Object.setPrototypeOf;else{var tr;t:{var qr={a:!0},un={};try{un.__proto__=qr,tr=un.a;break t}catch(a){}tr=!1}ji=tr?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var ln=ji;function We(a,y){if(a.prototype=Hi(y.prototype),a.prototype.constructor=a,ln)ln(a,y);else for(var x in y)if(x!="prototype")if(Object.defineProperties){var E=Object.getOwnPropertyDescriptor(y,x);E&&Object.defineProperty(a,x,E)}else a[x]=y[x];a.QA=y.prototype}var Sn=typeof Ut.g!="undefined"&&Ut.g!=null?Ut.g:self,Ki=typeof Object.assign=="function"?Object.assign:function(a,y){for(var x=1;x<arguments.length;x++){var E=arguments[x];if(E)for(var b in E)Object.prototype.hasOwnProperty.call(E,b)&&(a[b]=E[b])}return a},Li=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function dr(a,y){if(y){var x=Sn;a=a.split(".");for(var E=0;E<a.length-1;E++){var b=a[E];b in x||(x[b]={}),x=x[b]}a=a[a.length-1],E=x[a],y=y(E),y!=E&&y!=null&&Li(x,a,{writable:!0,value:y})}}dr("Object.assign",function(a){return a||Ki}),dr("Array.prototype.fill",function(a){return a||function(y,x,E){var b=this.length||0;for(0>x&&(x=Math.max(0,b+x)),(E==null||E>b)&&(E=b),E=Number(E),0>E&&(E=Math.max(0,b+E)),x=Number(x||0);x<E;x++)this[x]=y;return this}});var se=typeof globalThis=="object"&&globalThis||typeof Ut.g=="object"&&Ut.g.global===Ut.g&&Ut.g||typeof self=="object"&&self.self===self&&self||{};se.requestAnimationFrame===void 0&&(se.setImmediate===void 0?se.requestAnimationFrame=function(a){se.setTimeout(a,0)}:se.requestAnimationFrame=se.setImmediate);function Mn(){}function Di(a,y){var x=-1;return function(){var E=this,b=arguments;x!==-1&&se.clearTimeout(x),x=pr(function(){x=-1,a.apply(E,b)},y)}}function pr(a,y){return se.setTimeout(a,y)}function Vn(a){return se.document.createElement(a)}function le(a){throw Error(a)}function De(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),le(a)}function Xn(a,y,x,E){x=x===null?"*":typeof x=="string"?x:typeof x=="function"&&typeof x.className=="string"?x.className:"",E!==void 0&&(x+="."+E),le(x+" is not in the range "+y+": "+a)}function On(a){se.console&&se.console.log(a)}function qe(a){return typeof a=="object"&&a!==null}function ei(a){return Array.isArray(a)||se.NodeList&&a instanceof se.NodeList||se.HTMLCollection&&a instanceof se.HTMLCollection}function fi(a){return Array.prototype.slice.call(a)}function ki(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):le("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function Vi(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):le("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function rn(){var a=Or.pop();return a===void 0?[]:a}function Ve(a){a.length=0,Or.push(a)}function fn(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(qe(a)&&a.constructor)return fn(a.constructor);return typeof a}function mi(a){var y=a;return qe(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 Pi(a,y){if(a.hasOwnProperty(y))return!0;for(a=Object.getPrototypeOf(a);a&&a!==Function;){if(a.hasOwnProperty(y))return!0;var x=a.CA;if(x&&x[y])return!0;a=Object.getPrototypeOf(a)}return!1}function Pn(a,y,x){Object.defineProperty(Co.prototype,a,{get:y,set:x})}function ni(a){for(var y=[],x=0;256>x;x++)y["0123456789abcdef".charAt(x>>4)+"0123456789abcdef".charAt(x&15)]=String.fromCharCode(x);a.length%2&&(a="0"+a),x=[];for(var E=0,b=0;b<a.length;b+=2)x[E++]=y[a.substr(b,2)];for(a=x.join(""),a=a===""?"0":a,y=[],x=0;256>x;x++)y[x]=x;for(x=E=0;256>x;x++)E=(E+y[x]+119)%256,b=y[x],y[x]=y[E],y[E]=b;E=x=0;for(var z="",tt=0;tt<a.length;tt++)x=(x+1)%256,E=(E+y[x])%256,b=y[x],y[x]=y[E],y[E]=b,z+=String.fromCharCode(a.charCodeAt(tt)^y[(y[x]+y[E])%256]);return z.indexOf("GoJS 2.1 evaluation")>-1||z.indexOf("\xA9 1998-2021 Northwoods Software")>-1||z.indexOf("Not for distribution or production use")>-1||z.indexOf("gojs.net")>-1?"":z}var Gi=se.navigator!==void 0&&0<se.navigator.userAgent.indexOf("Trident/7"),er=se.navigator!==void 0&&se.navigator.platform!==void 0&&se.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Or=[];Object.freeze([]),Mn.className="Util",Mn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",Mn.adym="gojs.net",Mn.vfo="28e645fdb266",Mn.className="Util";function Oe(a,y,x){an(this),this.j=a,this.xa=y,this.o=x}Oe.prototype.toString=function(){return"EnumValue."+this.xa};function Ui(a,y){return y==null||y===""?null:a[y]}Sn.Object.defineProperties(Oe.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),Oe.className="EnumValue";function hr(){this.ew=[]}hr.prototype.toString=function(){return this.ew.join("")},hr.prototype.add=function(a){a!==""&&this.ew.push(a)},hr.className="StringBuilder";function Si(){}Si.className="PropertyCollection";var Qr={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){se.console&&se.console.log(a)},HA:function(a,y,x,E){a.strokeStyle="red",a.fillStyle="red",a.font="8px sans-serif",a.beginPath(),a.moveTo(-10,0),a.lineTo(10,0),a.moveTo(0,-10),a.lineTo(0,10),a.stroke(),a.setTransform(1,0,0,1,0,0),a.scale(x,x),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.lineWidth=2,a.beginPath(),a.moveTo(E.left,E.top+20),a.lineTo(E.left,E.top),a.lineTo(E.left+20,E.top),a.moveTo(E.right,E.bottom-20),a.lineTo(E.right,E.bottom),a.lineTo(E.right-20,E.bottom),a.stroke(),a.fillText("DB: "+Math.round(E.x)+", "+Math.round(E.y)+", "+Math.round(E.width)+", "+Math.round(E.height),E.left,E.top-5)},DA:function(a){var y={},x;for(x in a){if(y.x=x,y.x!=="licenseKey"){var E=a[y.x];if(E.prototype!==void 0){y.Zl=Object.getOwnPropertyNames(E.prototype);for(var b={Tj:0};b.Tj<y.Zl.length;b={Tj:b.Tj},b.Tj++){var z=Object.getOwnPropertyDescriptor(E.prototype,y.Zl[b.Tj]);z.get!==void 0&&z.set===void 0&&Object.defineProperty(E.prototype,y.Zl[b.Tj],{set:function(tt,rt){return function(){throw Error("Property "+tt.Zl[rt.Tj]+" of "+tt.x+" is read-only.")}}(y,b)})}}}y={Zl:y.Zl,x:y.x}}}};function xr(){}xr.prototype.reset=function(){},xr.prototype.next=function(){return!1},xr.prototype.Ad=function(){return!1},xr.prototype.first=function(){return null},xr.prototype.any=function(){return!1},xr.prototype.all=function(){return!0},xr.prototype.each=function(){return this},xr.prototype.map=function(){return this},xr.prototype.filter=function(){return this},xr.prototype.de=function(){},xr.prototype.toString=function(){return"EmptyIterator"},Sn.Object.defineProperties(xr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),xr.prototype.first=xr.prototype.first,xr.prototype.hasNext=xr.prototype.Ad,xr.prototype.next=xr.prototype.next,xr.prototype.reset=xr.prototype.reset;var Ri=null;xr.className="EmptyIterator",Ri=new xr;function qi(a){this.key=-1,this.value=a}qi.prototype.reset=function(){this.key=-1},qi.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},qi.prototype.Ad=function(){return this.next()},qi.prototype.first=function(){return this.key=0,this.value},qi.prototype.any=function(a){return this.key=-1,a(this.value)},qi.prototype.all=function(a){return this.key=-1,a(this.value)},qi.prototype.each=function(a){return this.key=-1,a(this.value),this},qi.prototype.map=function(a){return new qi(a(this.value))},qi.prototype.filter=function(a){return a(this.value)?new qi(this.value):Ri},qi.prototype.de=function(){this.value=null},qi.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Sn.Object.defineProperties(qi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),qi.prototype.first=qi.prototype.first,qi.prototype.hasNext=qi.prototype.Ad,qi.prototype.next=qi.prototype.next,qi.prototype.reset=qi.prototype.reset,qi.className="SingletonIterator";function re(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}re.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},re.prototype.next=function(){var a=this.Bb;if(a.Ja!==this.qa&&0>this.key)return!1;a=a.s;var y=a.length,x=++this.Za,E=this.qf;if(E!==null)for(;x<y;){var b=a[x];if(E(b))return this.key=this.Za=x,this.value=b,!0;x++}else{if(x<y)return this.key=x,this.value=a[x],!0;this.de()}return!1},re.prototype.Ad=function(){return this.next()},re.prototype.first=function(){var a=this.Bb;this.qa=a.Ja,this.Za=0,a=a.s;var y=a.length,x=this.qf;if(x!==null){for(var E=0;E<y;){var b=a[E];if(x(b))return this.key=this.Za=E,this.value=b;E++}return null}return 0<y?(a=a[0],this.key=0,this.value=a):null},re.prototype.any=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];if((E===null||E(z))&&a(z))return!0}return!1},re.prototype.all=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];if((E===null||E(z))&&!a(z))return!1}return!0},re.prototype.each=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];(E===null||E(z))&&a(z)}return this},re.prototype.map=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var E=y.length,b=this.qf,z=0;z<E;z++){var tt=y[z];(b===null||b(tt))&&x.push(a(tt))}return a=new ne,a.s=x,a.xb(),a.iterator},re.prototype.filter=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var E=y.length,b=this.qf,z=0;z<E;z++){var tt=y[z];(b===null||b(tt))&&a(tt)&&x.push(tt)}return a=new ne,a.s=x,a.xb(),a.iterator},re.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},re.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Sn.Object.defineProperties(re.prototype,{iterator:{get:function(){return this}},predicate:{get:function(){return this.qf},set:function(a){this.qf=a}},count:{get:function(){var a=this.qf;if(a!==null){for(var y=0,x=this.Bb.s,E=x.length,b=0;b<E;b++)a(x[b])&&y++;return y}return this.Bb.s.length}}}),re.prototype.first=re.prototype.first,re.prototype.hasNext=re.prototype.Ad,re.prototype.next=re.prototype.next,re.prototype.reset=re.prototype.reset,re.className="ListIterator";function he(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}he.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},he.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)},he.prototype.Ad=function(){return this.next()},he.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},he.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},he.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},he.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},he.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var E=y.length;for(this.Za=E,--E;0<=E;E--)x.push(a(y[E]));return a=new ne,a.s=x,a.xb(),a.iterator},he.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var E=y.length;for(this.Za=E,--E;0<=E;E--){var b=y[E];a(b)&&x.push(b)}return a=new ne,a.s=x,a.xb(),a.iterator},he.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},he.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Sn.Object.defineProperties(he.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),he.prototype.first=he.prototype.first,he.prototype.hasNext=he.prototype.Ad,he.prototype.next=he.prototype.next,he.prototype.reset=he.prototype.reset,he.className="ListIteratorBackwards";function ne(a){an(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&le("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Tt=ne.prototype,Tt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return this._isFrozen=!1,this},Tt.toString=function(){return"List()#"+ii(this)},Tt.add=function(a){return a===null?this:(this._isFrozen&&De(this,a),this.s.push(a),this.xb(),this)},Tt.push=function(a){this.add(a)},Tt.addAll=function(a){if(a===null)return this;this._isFrozen&&De(this);var y=this.s;if(ei(a))for(var x=a.length,E=0;E<x;E++)y.push(a[E]);else for(a=a.iterator;a.next();)y.push(a.value);return this.xb(),this},Tt.clear=function(){this._isFrozen&&De(this),this.s.length=0,this.xb()},Tt.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},Tt.has=function(a){return this.contains(a)},Tt.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},Tt.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Xn(a,"0 <= i < length",ne,"elt:i"),y[a]},Tt.get=function(a){return this.M(a)},Tt.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Xn(a,"0 <= i < length",ne,"setElt:i"),this._isFrozen&&De(this,a),x[a]=y},Tt.set=function(a,y){this.cd(a,y)},Tt.first=function(){var a=this.s;return a.length===0?null:a[0]},Tt.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},Tt.pop=function(){this._isFrozen&&De(this);var a=this.s;return 0<a.length?a.pop():null},ne.prototype.any=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)if(a(y[E]))return!0;return!1},ne.prototype.all=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)if(!a(y[E]))return!1;return!0},ne.prototype.each=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)a(y[E]);return this},ne.prototype.map=function(a){for(var y=new ne,x=[],E=this.s,b=E.length,z=0;z<b;z++)x.push(a(E[z]));return y.s=x,y.xb(),y},ne.prototype.filter=function(a){for(var y=new ne,x=[],E=this.s,b=E.length,z=0;z<b;z++){var tt=E[z];a(tt)&&x.push(tt)}return y.s=x,y.xb(),y},Tt=ne.prototype,Tt.Gb=function(a,y){0>a&&Xn(a,">= 0",ne,"insertAt:i"),this._isFrozen&&De(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},Tt.remove=function(a){if(a===null)return!1;this._isFrozen&&De(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)},Tt.delete=function(a){return this.remove(a)},Tt.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Xn(a,"0 <= i < length",ne,"removeAt:i"),this._isFrozen&&De(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Tt.removeRange=function(a,y){var x=this.s,E=x.length;if(0>a)a=0;else if(a>=E)return this;if(0>y)return this;if(y>=E&&(y=E-1),a>y)return this;this._isFrozen&&De(this);for(var b=a,z=y+1;z<E;)x[b++]=x[z++];return x.length=E-(y-a+1),this.xb(),this},ne.prototype.copy=function(){var a=new ne,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Tt=ne.prototype,Tt.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),E=0;E<y;E++)x[E]=a[E];return x},Tt.Iv=function(){for(var a=new Fe,y=this.s,x=this.count,E=0;E<x;E++)a.add(y[E]);return a},Tt.sort=function(a){return this._isFrozen&&De(this),this.s.sort(a),this.xb(),this},Tt.zi=function(a,y,x){var E=this.s,b=E.length;y===void 0&&(y=0),x===void 0&&(x=b),this._isFrozen&&De(this);var z=x-y;if(1>=z)return this;if((0>y||y>=b-1)&&Xn(y,"0 <= from < length",ne,"sortRange:from"),z===2)return x=E[y],b=E[y+1],0<a(x,b)&&(E[y]=b,E[y+1]=x,this.xb()),this;if(y===0)if(x>=b)E.sort(a);else for(y=E.slice(0,x),y.sort(a),a=0;a<x;a++)E[a]=y[a];else if(x>=b)for(x=E.slice(y),x.sort(a),a=y;a<b;a++)E[a]=x[a-y];else for(b=E.slice(y,x),b.sort(a),a=y;a<x;a++)E[a]=b[a-y];return this.xb(),this},Tt.reverse=function(){return this._isFrozen&&De(this),this.s.reverse(),this.xb(),this},Sn.Object.defineProperties(ne.prototype,{_dataArray:{get:function(){return this.s}},count:{get:function(){return this.s.length}},size:{get:function(){return this.s.length}},length:{get:function(){return this.s.length}},iterator:{get:function(){if(0>=this.s.length)return Ri;var a=this.Sa;return a!==null?(a.reset(),a):new re(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Ri;var a=this.Hg;return a!==null?(a.reset(),a):new he(this)}}}),ne.prototype.reverse=ne.prototype.reverse,ne.prototype.sortRange=ne.prototype.zi,ne.prototype.sort=ne.prototype.sort,ne.prototype.toSet=ne.prototype.Iv,ne.prototype.toArray=ne.prototype.Fa,ne.prototype.removeRange=ne.prototype.removeRange,ne.prototype.removeAt=ne.prototype.mb,ne.prototype.delete=ne.prototype.delete,ne.prototype.remove=ne.prototype.remove,ne.prototype.insertAt=ne.prototype.Gb,ne.prototype.pop=ne.prototype.pop,ne.prototype.last=ne.prototype.jc,ne.prototype.first=ne.prototype.first,ne.prototype.set=ne.prototype.set,ne.prototype.setElt=ne.prototype.cd,ne.prototype.get=ne.prototype.get,ne.prototype.elt=ne.prototype.M,ne.prototype.indexOf=ne.prototype.indexOf,ne.prototype.has=ne.prototype.has,ne.prototype.contains=ne.prototype.contains,ne.prototype.clear=ne.prototype.clear,ne.prototype.addAll=ne.prototype.addAll,ne.prototype.push=ne.prototype.push,ne.prototype.add=ne.prototype.add,ne.prototype.thaw=ne.prototype.ka,ne.prototype.freeze=ne.prototype.freeze,ne.className="List";function Xe(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Xe.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Xe.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)},Xe.prototype.Ad=function(){return this.next()},Xe.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},Xe.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},Xe.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},Xe.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},Xe.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new ne;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Xe.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new ne;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Xe.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Xe.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Sn.Object.defineProperties(Xe.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Xe.prototype.first=Xe.prototype.first,Xe.prototype.hasNext=Xe.prototype.Ad,Xe.prototype.next=Xe.prototype.next,Xe.prototype.reset=Xe.prototype.reset,Xe.className="SetIterator";function Fe(a){an(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&le("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Tt=Fe.prototype,Tt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return this._isFrozen=!1,this},Tt.toString=function(){return"Set()#"+ii(this)},Tt.add=function(a){if(a===null)return this;this._isFrozen&&De(this,a);var y=a;return qe(a)&&(y=Jn(a)),this.Tb[y]===void 0&&(this.Sb++,a=new ke(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},Tt.addAll=function(a){if(a===null)return this;if(this._isFrozen&&De(this),ei(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},Tt.contains=function(a){if(a===null)return!1;var y=a;return qe(a)&&(y=ii(a),y===void 0)?!1:this.Tb[y]!==void 0},Tt.has=function(a){return this.contains(a)},Tt.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},Tt.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},Tt.first=function(){var a=this.ea;return a===null?null:a.value},Fe.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Fe.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Fe.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},Fe.prototype.map=function(a){for(var y=new Fe,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},Fe.prototype.filter=function(a){for(var y=new Fe,x=this.ea;x!==null;){var E=x.value;a(E)&&y.add(E),x=x.va}return y},Tt=Fe.prototype,Tt.remove=function(a){if(a===null)return!1;this._isFrozen&&De(this,a);var y=a;if(qe(a)&&(y=ii(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,E=a.ll;return x!==null&&(x.ll=E),E!==null&&(E.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=E),delete this.Tb[y],this.Sb--,this.xb(),!0},Tt.delete=function(a){return this.remove(a)},Tt.hp=function(a){if(a===null)return this;if(this._isFrozen&&De(this),ei(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},Tt.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&De(this);var y=new Fe;y.addAll(a),a=[];for(var x=this.iterator;x.next();){var E=x.value;y.contains(E)||a.push(E)}return this.hp(a),this},Tt.clear=function(){this._isFrozen&&De(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},Fe.prototype.copy=function(){var a=new Fe,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},Fe.prototype.Fa=function(){var a=Array(this.Sb),y=this.Tb,x=0,E;for(E in y)a[x]=y[E].value,x++;return a},Fe.prototype.Hv=function(){var a=new ne,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function an(a){a.__gohashid=Mi++}function Jn(a){var y=a.__gohashid;return y===void 0&&(y=Mi++,a.__gohashid=y),y}function ii(a){return a.__gohashid}Sn.Object.defineProperties(Fe.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return Ri;var a=this.Sa;return a!==null?(a.reset(),a):new Xe(this)}}}),Fe.prototype.toList=Fe.prototype.Hv,Fe.prototype.toArray=Fe.prototype.Fa,Fe.prototype.clear=Fe.prototype.clear,Fe.prototype.retainAll=Fe.prototype.pA,Fe.prototype.removeAll=Fe.prototype.hp,Fe.prototype.delete=Fe.prototype.delete,Fe.prototype.remove=Fe.prototype.remove,Fe.prototype.first=Fe.prototype.first,Fe.prototype.containsAny=Fe.prototype.Ty,Fe.prototype.containsAll=Fe.prototype.Sy,Fe.prototype.has=Fe.prototype.has,Fe.prototype.contains=Fe.prototype.contains,Fe.prototype.addAll=Fe.prototype.addAll,Fe.prototype.add=Fe.prototype.add,Fe.prototype.thaw=Fe.prototype.ka,Fe.prototype.freeze=Fe.prototype.freeze;var Mi=1;Fe.className="Set",Fe.uniqueHash=an,Fe.hashIdUnique=Jn,Fe.hashId=ii;function hi(a){this.ma=a,this.qa=a.Ja,this.sa=null}hi.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},hi.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=this.key=a=y.key,!0):(this.de(),!1)},hi.prototype.Ad=function(){return this.next()},hi.prototype.first=function(){var a=this.ma;return this.qa=a.Ja,a=a.ea,a!==null?(this.sa=a,this.value=this.key=a=a.key):null},hi.prototype.any=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},hi.prototype.all=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},hi.prototype.each=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;)a(y.key),y=y.va;return this},hi.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new ne;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},hi.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new ne;for(y=y.ea;y!==null;){var E=y.key;a(E)&&x.add(E),y=y.va}return x.iterator},hi.prototype.de=function(){this.value=this.key=null,this.qa=-1},hi.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Sn.Object.defineProperties(hi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),hi.prototype.first=hi.prototype.first,hi.prototype.hasNext=hi.prototype.Ad,hi.prototype.next=hi.prototype.next,hi.prototype.reset=hi.prototype.reset,hi.className="MapKeySetIterator";function Zn(a){Fe.call(this),an(this),this._isFrozen=!0,this.ma=a}We(Zn,Fe),Tt=Zn.prototype,Tt.freeze=function(){return this},Tt.ka=function(){return this},Tt.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Tt.add=function(){le("This Set is read-only: "+this.toString())},Tt.contains=function(a){return this.ma.contains(a)},Tt.has=function(a){return this.contains(a)},Tt.remove=function(){le("This Set is read-only: "+this.toString())},Tt.delete=function(a){return this.remove(a)},Tt.clear=function(){le("This Set is read-only: "+this.toString())},Tt.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Zn.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Zn.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Zn.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Zn.prototype.map=function(a){for(var y=new Fe,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Zn.prototype.filter=function(a){for(var y=new Fe,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},Zn.prototype.copy=function(){return new Zn(this.ma)},Zn.prototype.Iv=function(){var a=new Fe,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Zn.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,E;for(E in a)y[x]=a[E].key,x++;return y},Zn.prototype.Hv=function(){var a=new ne,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Sn.Object.defineProperties(Zn.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?Ri:new hi(this.ma)}}}),Zn.prototype.toList=Zn.prototype.Hv,Zn.prototype.toArray=Zn.prototype.Fa,Zn.prototype.toSet=Zn.prototype.Iv,Zn.prototype.first=Zn.prototype.first,Zn.prototype.clear=Zn.prototype.clear,Zn.prototype.delete=Zn.prototype.delete,Zn.prototype.remove=Zn.prototype.remove,Zn.prototype.has=Zn.prototype.has,Zn.prototype.contains=Zn.prototype.contains,Zn.prototype.add=Zn.prototype.add,Zn.prototype.thaw=Zn.prototype.ka,Zn.prototype.freeze=Zn.prototype.freeze,Zn.className="MapKeySet";function ci(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}ci.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},ci.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)},ci.prototype.Ad=function(){return this.next()},ci.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},ci.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},ci.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},ci.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},ci.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new ne;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},ci.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new ne;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},ci.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},ci.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Sn.Object.defineProperties(ci.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),ci.prototype.first=ci.prototype.first,ci.prototype.hasNext=ci.prototype.Ad,ci.prototype.next=ci.prototype.next,ci.prototype.reset=ci.prototype.reset,ci.className="MapValueSetIterator";function ke(a,y){this.key=a,this.value=y,this.ll=this.va=null}ke.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},ke.className="KeyValuePair";function An(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}An.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},An.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)},An.prototype.Ad=function(){return this.next()},An.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},An.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},An.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},An.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},An.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new ne;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},An.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new ne;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},An.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},An.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Sn.Object.defineProperties(An.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),An.prototype.first=An.prototype.first,An.prototype.hasNext=An.prototype.Ad,An.prototype.next=An.prototype.next,An.prototype.reset=An.prototype.reset,An.className="MapIterator";function be(a){an(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"&&le("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Tt=be.prototype,Tt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return this._isFrozen=!1,this},Tt.toString=function(){return"Map()#"+ii(this)},Tt.add=function(a,y){this._isFrozen&&De(this,a);var x=a;qe(a)&&(x=Jn(a));var E=this.Tb[x];return E===void 0?(this.Sb++,a=new ke(a,y),this.Tb[x]=a,x=this.kf,x===null?this.ea=a:(a.ll=x,x.va=a),this.kf=a,this.xb()):E.value=y,this},Tt.set=function(a,y){return this.add(a,y)},Tt.addAll=function(a){if(a===null)return this;if(ei(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];this.add(E.key,E.value)}else if(a instanceof be)for(a=a.iterator;a.next();)this.add(a.key,a.value);else for(a=a.iterator;a.next();)y=a.value,this.add(y.key,y.value);return this},Tt.first=function(){return this.ea},be.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},be.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},be.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},be.prototype.map=function(a){for(var y=new be,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},be.prototype.filter=function(a){for(var y=new be,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Tt=be.prototype,Tt.contains=function(a){var y=a;return qe(a)&&(y=ii(a),y===void 0)?!1:this.Tb[y]!==void 0},Tt.has=function(a){return this.contains(a)},Tt.I=function(a){var y=a;return qe(a)&&(y=ii(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},Tt.get=function(a){return this.I(a)},Tt.remove=function(a){if(a===null)return!1;this._isFrozen&&De(this,a);var y=a;if(qe(a)&&(y=ii(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,E=a.ll;return x!==null&&(x.ll=E),E!==null&&(E.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=E),delete this.Tb[y],this.Sb--,this.xb(),!0},Tt.delete=function(a){return this.remove(a)},Tt.clear=function(){this._isFrozen&&De(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.jf!==null&&this.jf.reset(),this.kf=this.ea=null,this.xb()},be.prototype.copy=function(){var a=new be,y=this.Tb,x;for(x in y){var E=y[x];a.add(E.key,E.value)}return a},be.prototype.Fa=function(){var a=this.Tb,y=Array(this.Sb),x=0,E;for(E in a){var b=a[E];y[x]=new ke(b.key,b.value),x++}return y},be.prototype.Lf=function(){return new Zn(this)},Sn.Object.defineProperties(be.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return Ri;var a=this.Sa;return a!==null?(a.reset(),a):new An(this)}},iteratorKeys:{get:function(){return 0>=this.count?Ri:new hi(this)}},iteratorValues:{get:function(){if(0>=this.count)return Ri;var a=this.jf;return a!==null?(a.reset(),a):new ci(this)}}}),be.prototype.toKeySet=be.prototype.Lf,be.prototype.toArray=be.prototype.Fa,be.prototype.clear=be.prototype.clear,be.prototype.delete=be.prototype.delete,be.prototype.remove=be.prototype.remove,be.prototype.get=be.prototype.get,be.prototype.getValue=be.prototype.I,be.prototype.has=be.prototype.has,be.prototype.contains=be.prototype.contains,be.prototype.first=be.prototype.first,be.prototype.addAll=be.prototype.addAll,be.prototype.set=be.prototype.set,be.prototype.add=be.prototype.add,be.prototype.thaw=be.prototype.ka,be.prototype.freeze=be.prototype.freeze,be.className="Map";function Qt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):le("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var ye,_n,li,Wn,Hn;Qt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Qt.prototype.h=function(a,y){return this.x=a,this.y=y,this},Qt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Qt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Qt.prototype.copy=function(){var a=new Qt;return a.x=this.x,a.y=this.y,a},Tt=Qt.prototype,Tt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Tt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return Object.isFrozen(this)&&le("cannot thaw constant: "+this),this._isFrozen=!1,this};function cn(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;return(E=a[y++])&&(b=parseFloat(E)),new Qt(x,b)}return new Qt}function kn(a){return a.x.toString()+" "+a.y.toString()}Tt.toString=function(){return"Point("+this.x+","+this.y+")"},Tt.D=function(a){return a instanceof Qt?this.x===a.x&&this.y===a.y:!1},Tt.hi=function(a,y){return this.x===a&&this.y===y},Tt.Xa=function(a){return Ce.B(this.x,a.x)&&Ce.B(this.y,a.y)},Tt.add=function(a){return this.x+=a.x,this.y+=a.y,this},Tt.re=function(a){return this.x-=a.x,this.y-=a.y,this},Tt.offset=function(a,y){return this.x+=a,this.y+=y,this},Qt.prototype.rotate=function(a){if(a===0)return this;var y=this.x,x=this.y;if(y===0&&x===0)return this;if(360<=a?a-=360:0>a&&(a+=360),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));return this.x=a*y-E*x,this.y=E*y+a*x,this},Tt=Qt.prototype,Tt.scale=function(a,y){return this.x*=a,this.y*=y,this},Tt.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},Tt.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},Tt.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},Tt.ab=function(a){return Ln(a.x-this.x,a.y-this.y)},Tt.direction=function(a,y){return Ln(a-this.x,y-this.y)};function Ln(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}Tt.Ry=function(a,y){return Ce.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Tt.fA=function(a,y,x,E){return Ce.qh(a,y,x,E,this.x,this.y,this),this},Tt.gA=function(a,y){return Ce.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Tt.uA=function(a,y,x,E){return Ce.No(this.x,this.y,a,y,x,E,this),this},Tt.vA=function(a,y){return Ce.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Tt.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},Tt.yi=function(a,y,x,E,b){return this.x=a+b.x*x+b.offsetX,this.y=y+b.y*E+b.offsetY,this},Tt.transform=function(a){return a.Ga(this),this};function Qe(a,y){return y.Cd(a),a}function sn(a,y,x,E,b,z){var tt=b-x,rt=z-E,ot=tt*tt+rt*rt;x-=a,E-=y;var lt=-x*tt-E*rt;return 0>=lt||lt>=ot?(tt=b-a,rt=z-y,Math.min(x*x+E*E,tt*tt+rt*rt)):(a=tt*E-rt*x,a*a/ot)}function vn(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function Cn(a,y,x,E){return a=x-a,y=E-y,a===0?0<y?90:0>y?270:0:y===0?0<a?0:180:isNaN(a)||isNaN(y)?0:(E=180*Math.atan(Math.abs(y/a))/Math.PI,0>a?E=0>y?E+180:180-E:0>y&&(E=360-E),E)}Tt.w=function(){return isFinite(this.x)&&isFinite(this.y)},Qt.alloc=function(){var a=zn.pop();return a===void 0?new Qt:a},Qt.allocAt=function(a,y){var x=zn.pop();return x===void 0?new Qt(a,y):(x.x=a,x.y=y,x)},Qt.free=function(a){zn.push(a)},Qt.prototype.isReal=Qt.prototype.w,Qt.prototype.setSpot=Qt.prototype.yi,Qt.prototype.setRectSpot=Qt.prototype.xi,Qt.prototype.snapToGridPoint=Qt.prototype.vA,Qt.prototype.snapToGrid=Qt.prototype.uA,Qt.prototype.projectOntoLineSegmentPoint=Qt.prototype.gA,Qt.prototype.projectOntoLineSegment=Qt.prototype.fA,Qt.intersectingLineSegments=function(a,y,x,E,b,z,tt,rt){return Ce.Rl(a,y,x,E,b,z,tt,rt)},Qt.prototype.compareWithLineSegmentPoint=Qt.prototype.Ry,Qt.compareWithLineSegment=function(a,y,x,E,b,z){return Ce.Fl(a,y,x,E,b,z)},Qt.prototype.direction=Qt.prototype.direction,Qt.prototype.directionPoint=Qt.prototype.ab,Qt.prototype.normalize=Qt.prototype.normalize,Qt.prototype.distanceSquared=Qt.prototype.zd,Qt.prototype.distanceSquaredPoint=Qt.prototype.Bf,Qt.prototype.scale=Qt.prototype.scale,Qt.prototype.rotate=Qt.prototype.rotate,Qt.prototype.offset=Qt.prototype.offset,Qt.prototype.subtract=Qt.prototype.re,Qt.prototype.add=Qt.prototype.add,Qt.prototype.equalsApprox=Qt.prototype.Xa,Qt.prototype.equalTo=Qt.prototype.hi,Qt.prototype.equals=Qt.prototype.D,Qt.prototype.set=Qt.prototype.set,Qt.prototype.setTo=Qt.prototype.sg;var zn=[];Qt.className="Point",Qt.parse=cn,Qt.stringify=kn,Qt.distanceLineSegmentSquared=sn,Qt.distanceSquared=vn,Qt.direction=Cn,Qt.Origin=ye=new Qt(0,0).ja(),Qt.InfiniteTopLeft=_n=new Qt(-1/0,-1/0).ja(),Qt.InfiniteBottomRight=li=new Qt(1/0,1/0).ja(),Qt.SixPoint=Wn=new Qt(6,6).ja(),Qt.NoPoint=Hn=new Qt(NaN,NaN).ja(),Qt.parse=cn,Qt.stringify=kn,Qt.distanceLineSegmentSquared=sn,Qt.distanceSquared=vn,Qt.direction=Cn;function on(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):le("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var Ei,Ii,nr,Ni,Mr,yr,Zr;on.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},on.prototype.h=function(a,y){return this.width=a,this.height=y,this},on.prototype.sg=function(a,y){return this.width=a,this.height=y,this},on.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},on.prototype.copy=function(){var a=new on;return a.width=this.width,a.height=this.height,a},Tt=on.prototype,Tt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Tt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return Object.isFrozen(this)&&le("cannot thaw constant: "+this),this._isFrozen=!1,this};function Dr(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;return(E=a[y++])&&(b=parseFloat(E)),new on(x,b)}return new on}function Gr(a){return a.width.toString()+" "+a.height.toString()}Tt.toString=function(){return"Size("+this.width+","+this.height+")"},Tt.D=function(a){return a instanceof on?this.width===a.width&&this.height===a.height:!1},Tt.hi=function(a,y){return this.width===a&&this.height===y},Tt.Xa=function(a){return Ce.B(this.width,a.width)&&Ce.B(this.height,a.height)},Tt.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},Tt.w=function(){return isFinite(this.width)&&isFinite(this.height)},on.alloc=function(){var a=$r.pop();return a===void 0?new on:a},on.free=function(a){$r.push(a)},on.prototype.isReal=on.prototype.w,on.prototype.inflate=on.prototype.Bc,on.prototype.equalsApprox=on.prototype.Xa,on.prototype.equalTo=on.prototype.hi,on.prototype.equals=on.prototype.D,on.prototype.set=on.prototype.set,on.prototype.setTo=on.prototype.sg;var $r=[];on.className="Size",on.parse=Dr,on.stringify=Gr,on.ZeroSize=Ei=new on(0,0).ja(),on.OneSize=Ii=new on(1,1).ja(),on.SixSize=nr=new on(6,6).ja(),on.EightSize=Ni=new on(8,8).ja(),on.TenSize=Mr=new on(10,10).ja(),on.InfiniteSize=yr=new on(1/0,1/0).ja(),on.NoSize=Zr=new on(NaN,NaN).ja(),on.parse=Dr,on.stringify=Gr;function Ue(a,y,x,E){a===void 0?this.height=this.width=this.y=this.x=0:typeof a=="number"&&typeof y=="number"&&typeof x=="number"&&(0<=x||isNaN(x))&&typeof E=="number"&&(0<=E||isNaN(E))?(this.x=a,this.y=y,this.width=x,this.height=E):a instanceof Qt?(x=a.x,a=a.y,y instanceof Qt?(E=y.x,y=y.y,this.x=Math.min(x,E),this.y=Math.min(a,y),this.width=Math.abs(x-E),this.height=Math.abs(a-y)):y instanceof on?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):le("Incorrect second argument supplied to Rect constructor "+y)):le("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Tt=Ue.prototype,Tt.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Tt.h=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this};function Fr(a,y,x){a.width=y,a.height=x}Tt.sg=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this},Tt.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Tt.dd=function(a){return this.x=a.x,this.y=a.y,this},Tt.tA=function(a){return this.width=a.width,this.height=a.height,this},Ue.prototype.copy=function(){var a=new Ue;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Tt=Ue.prototype,Tt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Tt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return Object.isFrozen(this)&&le("cannot thaw constant: "+this),this._isFrozen=!1,this};function Er(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;(E=a[y++])&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;(E=a[y++])&&(z=parseFloat(E));for(var tt=0;a[y]==="";)y++;return(E=a[y++])&&(tt=parseFloat(E)),new Ue(x,b,z,tt)}return new Ue}function fr(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}Tt.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},Tt.D=function(a){return a instanceof Ue?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Tt.hi=function(a,y,x,E){return this.x===a&&this.y===y&&this.width===x&&this.height===E},Tt.Xa=function(a){return Ce.B(this.x,a.x)&&Ce.B(this.y,a.y)&&Ce.B(this.width,a.width)&&Ce.B(this.height,a.height)};function $i(a,y){return Ce.$(a.x,y.x)&&Ce.$(a.y,y.y)&&Ce.$(a.width,y.width)&&Ce.$(a.height,y.height)}Tt.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Tt.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},Tt.contains=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+E<=this.y+this.height},Tt.offset=function(a,y){return this.x+=a,this.y+=y,this},Tt.Bc=function(a,y){return Rr(this,y,a,y,a)},Tt.Co=function(a){return Rr(this,a.top,a.right,a.bottom,a.left)},Tt.Fv=function(a){return Rr(this,-a.top,-a.right,-a.bottom,-a.left)},Tt.Hz=function(a,y,x,E){return Rr(this,a,y,x,E)};function Rr(a,y,x,E,b){var z=a.width;return x+b<=-z?(a.x+=z/2,a.width=0):(a.x-=b,a.width+=x+b),x=a.height,y+E<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+E),a}Tt.Ex=function(a){return ro(this,a.x,a.y,a.width,a.height)},Tt.Uu=function(a,y,x,E){return ro(this,a,y,x,E)};function ro(a,y,x,E,b){var z=Math.max(a.x,y),tt=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+E),x=Math.min(a.y+a.height,x+b),a.x=z,a.y=tt,a.width=Math.max(0,y-z),a.height=Math.max(0,x-tt),a}Tt.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Tt.Vu=function(a,y,x,E){var b=this.width,z=this.x;return b!==1/0&&x!==1/0&&(b+=z,x+=a,isNaN(x)||isNaN(b)||z>x||a>b)?!1:(a=this.height,x=this.y,!(a!==1/0&&E!==1/0&&(a+=x,E+=y,isNaN(E)||isNaN(a)||x>E||y>a)))};function eo(a,y){var x=a.width,E=a.x,b=y.x-10;return E>y.width+10+10+b||b>x+E?!1:(x=a.height,a=a.y,E=y.y-10,!(a>y.height+10+10+E||E>x+a))}Tt.Ye=function(a){return kr(this,a.x,a.y,0,0)},Tt.ed=function(a){return kr(this,a.x,a.y,a.width,a.height)},Tt.Kv=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),kr(this,a,y,x,E)};function kr(a,y,x,E,b){var z=Math.min(a.x,y),tt=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+E),x=Math.max(a.y+a.height,x+b),a.x=z,a.y=tt,a.width=y-z,a.height=x-tt,a}Tt.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 Ao(a,y,x,E,b,z,tt,rt){return tt===void 0&&(tt=0),rt===void 0&&(rt=0),a<=b&&b+tt<=a+x&&y<=z&&z+rt<=y+E}function $o(a,y,x,E,b,z,tt,rt){return a>tt+b||b>x+a?!1:!(y>rt+z||z>E+y)}Tt.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Tt.Mz=function(){return this.width===0&&this.height===0},Ue.alloc=function(){var a=zs.pop();return a===void 0?new Ue:a},Ue.allocAt=function(a,y,x,E){var b=zs.pop();return b===void 0?new Ue(a,y,x,E):b.h(a,y,x,E)},Ue.free=function(a){zs.push(a)},Sn.Object.defineProperties(Ue.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 Qt(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new on(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new Qt(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}}}),Ue.prototype.isEmpty=Ue.prototype.Mz,Ue.prototype.isReal=Ue.prototype.w,Ue.intersectsLineSegment=function(a,y,x,E,b,z,tt,rt){return Ce.Fx(a,y,x,E,b,z,tt,rt)},Ue.prototype.setSpot=Ue.prototype.yi,Ue.prototype.union=Ue.prototype.Kv,Ue.prototype.unionRect=Ue.prototype.ed,Ue.prototype.unionPoint=Ue.prototype.Ye,Ue.prototype.intersects=Ue.prototype.Vu,Ue.prototype.intersectsRect=Ue.prototype.Yc,Ue.prototype.intersect=Ue.prototype.Uu,Ue.prototype.intersectRect=Ue.prototype.Ex,Ue.prototype.grow=Ue.prototype.Hz,Ue.prototype.subtractMargin=Ue.prototype.Fv,Ue.prototype.addMargin=Ue.prototype.Co,Ue.prototype.inflate=Ue.prototype.Bc,Ue.prototype.offset=Ue.prototype.offset,Ue.prototype.contains=Ue.prototype.contains,Ue.prototype.containsRect=Ue.prototype.Re,Ue.prototype.containsPoint=Ue.prototype.ca,Ue.prototype.equalsApprox=Ue.prototype.Xa,Ue.prototype.equalTo=Ue.prototype.hi,Ue.prototype.equals=Ue.prototype.D,Ue.prototype.setSize=Ue.prototype.tA,Ue.prototype.setPoint=Ue.prototype.dd,Ue.prototype.set=Ue.prototype.set,Ue.prototype.setTo=Ue.prototype.sg;var Zs=null,ka=null,zs=[];Ue.className="Rect",Ue.parse=Er,Ue.stringify=fr,Ue.contains=Ao,Ue.intersects=$o,Ue.ZeroRect=Zs=new Ue(0,0,0,0).ja(),Ue.NoRect=ka=new Ue(NaN,NaN,NaN,NaN).ja(),Ue.parse=Er,Ue.stringify=fr,Ue.contains=Ao,Ue.intersects=$o;function sr(a,y,x,E){a===void 0?this.left=this.bottom=this.right=this.top=0:y===void 0?this.left=this.bottom=this.right=this.top=a:x===void 0?(this.top=a,this.right=y,this.bottom=a,this.left=y):E!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=E):le("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}sr.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},sr.prototype.sg=function(a,y,x,E){return this.top=a,this.right=y,this.bottom=x,this.left=E,this},sr.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},sr.prototype.copy=function(){var a=new sr;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Tt=sr.prototype,Tt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Tt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return Object.isFrozen(this)&&le("cannot thaw constant: "+this),this._isFrozen=!1,this};function os(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=NaN;a[y]==="";)y++;var E=a[y++];if(E&&(x=parseFloat(E)),isNaN(x))return new sr;for(var b=NaN;a[y]==="";)y++;if((E=a[y++])&&(b=parseFloat(E)),isNaN(b))return new sr(x);for(var z=NaN;a[y]==="";)y++;if((E=a[y++])&&(z=parseFloat(E)),isNaN(z))return new sr(x,b);for(var tt=NaN;a[y]==="";)y++;return(E=a[y++])&&(tt=parseFloat(E)),isNaN(tt)?new sr(x,b):new sr(x,b,z,tt)}return new sr}function ns(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}Tt.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},Tt.D=function(a){return a instanceof sr?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Tt.hi=function(a,y,x,E){return this.top===a&&this.right===y&&this.bottom===x&&this.left===E},Tt.Xa=function(a){return Ce.B(this.top,a.top)&&Ce.B(this.right,a.right)&&Ce.B(this.bottom,a.bottom)&&Ce.B(this.left,a.left)},Tt.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},sr.alloc=function(){var a=ys.pop();return a===void 0?new sr:a},sr.free=function(a){ys.push(a)},sr.prototype.isReal=sr.prototype.w,sr.prototype.equalsApprox=sr.prototype.Xa,sr.prototype.equalTo=sr.prototype.hi,sr.prototype.equals=sr.prototype.D,sr.prototype.set=sr.prototype.set,sr.prototype.setTo=sr.prototype.sg;var js=null,us=null,ys=[];sr.className="Margin",sr.parse=os,sr.stringify=ns,sr.ZeroMargin=js=new sr(0,0,0,0).ja(),sr.TwoMargin=us=new sr(2,2,2,2).ja(),sr.parse=os,sr.stringify=ns;function di(a,y,x,E){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),E===void 0&&(E=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=E),this._isFrozen=!1}var Ar,br,Xr,io,yo,rr,Bo,Qi,Tr,gr,Wo,is,Lo,Ss,jo,Pa,Io,rl,bo,ma,_o,Ns,Ws,hu,Ll,es,Ml,ca,ds,Oa,Bs,Yo,As,Us,cu,va;di.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},di.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},di.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},di.prototype.copy=function(){var a=new di;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Tt=di.prototype,Tt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Tt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return Object.isFrozen(this)&&le("cannot thaw constant: "+this),this._isFrozen=!1,this};function Vo(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function Uo(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return Ar;if(a==="TopLeft")return br;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Xr;if(a==="TopRight")return io;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return yo;if(a==="Center")return rr;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Bo;if(a==="BottomLeft")return Qi;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return Tr;if(a==="BottomRight")return gr;if(a==="TopSide")return Wo;if(a==="LeftSide")return is;if(a==="RightSide")return Lo;if(a==="BottomSide")return Ss;if(a==="TopBottomSides")return jo;if(a==="LeftRightSides")return Pa;if(a==="TopLeftSides")return Io;if(a==="TopRightSides")return rl;if(a==="BottomLeftSides")return bo;if(a==="BottomRightSides")return ma;if(a==="NotTopSide")return _o;if(a==="NotLeftSide")return Ns;if(a==="NotRightSide")return Ws;if(a==="NotBottomSide")return hu;if(a==="AllSides")return Ll;if(a==="Default")return es;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E!==void 0&&0<E.length&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;E=a[y++],E!==void 0&&0<E.length&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;E=a[y++],E!==void 0&&0<E.length&&(z=parseFloat(E));for(var tt=0;a[y]==="";)y++;return E=a[y++],E!==void 0&&0<E.length&&(tt=parseFloat(E)),new di(x,b,z,tt)}return new di}function wo(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}Tt.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(Ar)?"None":this.D(br)?"TopLeft":this.D(Xr)?"Top":this.D(io)?"TopRight":this.D(yo)?"Left":this.D(rr)?"Center":this.D(Bo)?"Right":this.D(Qi)?"BottomLeft":this.D(Tr)?"Bottom":this.D(gr)?"BottomRight":this.D(Wo)?"TopSide":this.D(is)?"LeftSide":this.D(Lo)?"RightSide":this.D(Ss)?"BottomSide":this.D(jo)?"TopBottomSides":this.D(Pa)?"LeftRightSides":this.D(Io)?"TopLeftSides":this.D(rl)?"TopRightSides":this.D(bo)?"BottomLeftSides":this.D(ma)?"BottomRightSides":this.D(_o)?"NotTopSide":this.D(Ns)?"NotLeftSide":this.D(Ws)?"NotRightSide":this.D(hu)?"NotBottomSide":this.D(Ll)?"AllSides":this.D(es)?"Default":"None"},Tt.D=function(a){return a instanceof di?(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},Tt.gv=function(){return new di(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},Tt.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Ml))a=is;else if(a.D(ca))a=Lo;else if(a.D(ds))a=Wo;else if(a.D(Oa))a=Ss;else return!1;return a=a.offsetY,(this.offsetY&a)===a},Tt.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},Tt.Mc=function(){return isNaN(this.x)||isNaN(this.y)},Tt.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},Tt.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},Tt.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},di.alloc=function(){var a=fs.pop();return a===void 0?new di:a},di.free=function(a){fs.push(a)},di.prototype.isDefault=di.prototype.Xb,di.prototype.isNone=di.prototype.ys,di.prototype.isSide=di.prototype.$c,di.prototype.isNoSpot=di.prototype.Mc,di.prototype.isSpot=di.prototype.sb,di.prototype.includesSide=di.prototype.Hf,di.prototype.opposite=di.prototype.gv,di.prototype.equals=di.prototype.D,di.prototype.set=di.prototype.set,di.prototype.setTo=di.prototype.sg;var fs=[];di.className="Spot",di.parse=Uo,di.stringify=wo,di.None=Ar=Vo(new di(0,0,0,0),0).ja(),di.Default=es=Vo(new di(0,0,-1,0),-1).ja(),di.TopLeft=br=new di(0,0,0,0).ja(),di.TopCenter=Xr=new di(.5,0,0,0).ja(),di.TopRight=io=new di(1,0,0,0).ja(),di.LeftCenter=yo=new di(0,.5,0,0).ja(),di.Center=rr=new di(.5,.5,0,0).ja(),di.RightCenter=Bo=new di(1,.5,0,0).ja(),di.BottomLeft=Qi=new di(0,1,0,0).ja(),di.BottomCenter=Tr=new di(.5,1,0,0).ja(),di.BottomRight=gr=new di(1,1,0,0).ja(),di.MiddleTop=Bs=Xr,di.MiddleLeft=Yo=yo,di.MiddleRight=As=Bo,di.MiddleBottom=Us=Tr,di.Top=ds=Xr,di.Left=Ml=yo,di.Right=ca=Bo,di.Bottom=Oa=Tr,di.TopSide=Wo=Vo(new di(0,0,1,1),1).ja(),di.LeftSide=is=Vo(new di(0,0,1,2),1).ja(),di.RightSide=Lo=Vo(new di(0,0,1,4),1).ja(),di.BottomSide=Ss=Vo(new di(0,0,1,8),1).ja(),di.TopBottomSides=jo=Vo(new di(0,0,1,9),1).ja(),di.LeftRightSides=Pa=Vo(new di(0,0,1,6),1).ja(),di.TopLeftSides=Io=Vo(new di(0,0,1,3),1).ja(),di.TopRightSides=rl=Vo(new di(0,0,1,5),1).ja(),di.BottomLeftSides=bo=Vo(new di(0,0,1,10),1).ja(),di.BottomRightSides=ma=Vo(new di(0,0,1,12),1).ja(),di.NotTopSide=_o=Vo(new di(0,0,1,14),1).ja(),di.NotLeftSide=Ns=Vo(new di(0,0,1,13),1).ja(),di.NotRightSide=Ws=Vo(new di(0,0,1,11),1).ja(),di.NotBottomSide=hu=Vo(new di(0,0,1,7),1).ja(),di.AllSides=Ll=Vo(new di(0,0,1,15),1).ja(),cu=new di(.156,.156).ja(),va=new di(.844,.844).ja(),di.parse=Uo,di.stringify=wo;function Yi(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}Yi.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},Yi.prototype.setTransform=function(a,y,x,E,b,z){return this.m11=a,this.m12=y,this.m21=x,this.m22=E,this.dx=b,this.dy=z,this},Yi.prototype.copy=function(){var a=new Yi;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},Yi.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},Yi.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},Yi.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},Yi.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},Yi.prototype.multiply=function(a){var y=this.m11*a.m11+this.m21*a.m12,x=this.m12*a.m11+this.m22*a.m12,E=this.m11*a.m21+this.m21*a.m22,b=this.m12*a.m21+this.m22*a.m22;return this.dx=this.m11*a.dx+this.m21*a.dy+this.dx,this.dy=this.m12*a.dx+this.m22*a.dy+this.dy,this.m11=y,this.m12=x,this.m21=E,this.m22=b,this},Yi.prototype.bv=function(a){var y=1/(a.m11*a.m22-a.m12*a.m21),x=a.m22*y,E=-a.m12*y,b=-a.m21*y,z=a.m11*y,tt=y*(a.m21*a.dy-a.m22*a.dx);return a=y*(a.m12*a.dx-a.m11*a.dy),y=this.m11*x+this.m21*E,x=this.m12*x+this.m22*E,E=this.m11*b+this.m21*z,b=this.m12*b+this.m22*z,this.dx=this.m11*tt+this.m21*a+this.dx,this.dy=this.m12*tt+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=E,this.m22=b,this},Yi.prototype.Vj=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),y=-this.m12*a,x=-this.m21*a,E=this.m11*a,b=a*(this.m21*this.dy-this.m22*this.dx),z=a*(this.m12*this.dx-this.m11*this.dy);return this.m11=this.m22*a,this.m12=y,this.m21=x,this.m22=E,this.dx=b,this.dy=z,this},Yi.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a===0)return this;if(this.translate(y,x),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.m12*a+this.m22*E,z=this.m11*-E+this.m21*a,tt=this.m12*-E+this.m22*a;return this.m11=this.m11*a+this.m21*E,this.m12=b,this.m21=z,this.m22=tt,this.translate(-y,-x),this},Tt=Yi.prototype,Tt.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Tt.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Tt.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)},Tt.Cd=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=a.x,E=a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Tt.Eu=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=1.25*a.x,E=1.2*a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Tt.pp=function(a){var y=a.x,x=a.y,E=y+a.width,b=x+a.height,z=this.m11,tt=this.m12,rt=this.m21,ot=this.m22,lt=this.dx,ut=this.dy,ft=y*z+x*rt+lt,yt=y*tt+x*ot+ut,Mt=E*z+x*rt+lt,bt=E*tt+x*ot+ut;return x=y*z+b*rt+lt,y=y*tt+b*ot+ut,z=E*z+b*rt+lt,E=E*tt+b*ot+ut,b=Math.min(ft,Mt),ft=Math.max(ft,Mt),Mt=Math.min(yt,bt),yt=Math.max(yt,bt),b=Math.min(b,x),ft=Math.max(ft,x),Mt=Math.min(Mt,y),yt=Math.max(yt,y),b=Math.min(b,z),ft=Math.max(ft,z),Mt=Math.min(Mt,E),yt=Math.max(yt,E),a.h(b,Mt,ft-b,yt-Mt),a},Yi.alloc=function(){var a=na.pop();return a===void 0?new Yi:a},Yi.free=function(a){na.push(a)},Yi.prototype.transformRect=Yi.prototype.pp,Yi.prototype.transformPoint=Yi.prototype.Ga,Yi.prototype.scale=Yi.prototype.scale,Yi.prototype.translate=Yi.prototype.translate,Yi.prototype.rotate=Yi.prototype.rotate,Yi.prototype.invert=Yi.prototype.Vj,Yi.prototype.multiplyInverted=Yi.prototype.bv,Yi.prototype.multiply=Yi.prototype.multiply,Yi.prototype.reset=Yi.prototype.reset,Yi.prototype.isIdentity=Yi.prototype.ws,Yi.prototype.equals=Yi.prototype.D,Yi.prototype.setTransform=Yi.prototype.setTransform,Yi.prototype.set=Yi.prototype.set;var na=[];Yi.className="Transform",Yi.xF="54a702f3e53909c447824c6706603faf4c";var Ce={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=Ce.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);Ce.Uv=y}return 1>a?(x=1/a,2e3>=x?1/y[x|0]:Math.sqrt(a)):2e3>=a?y[a|0]:Math.sqrt(a)},B:function(a,y){return a-=y,.5>a&&-.5<a},$:function(a,y){return a-=y,5e-8>a&&-5e-8<a},Yb:function(a,y,x,E,b,z,tt){if(0>=b&&(b=1e-6),a<x)var rt=a,ot=x;else rt=x,ot=a;if(y<E)var lt=y,ut=E;else lt=E,ut=y;if(a===x)return lt<=tt&&tt<=ut&&a-b<=z&&z<=a+b;if(y===E)return rt<=z&&z<=ot&&y-b<=tt&&tt<=y+b;if(ot+=b,rt-=b,rt<=z&&z<=ot&&(ut+=b,lt-=b,lt<=tt&&tt<=ut))if(ot-rt>ut-lt)if(a-x>b||x-a>b){if(z=(E-y)/(x-a)*(z-a)+y,z-b<=tt&&tt<=z+b)return!0}else return!0;else if(y-E>b||E-y>b){if(tt=(x-a)/(E-y)*(tt-y)+a,tt-b<=z&&z<=tt+b)return!0}else return!0;return!1},cs:function(a,y,x,E,b,z,tt,rt,ot,lt,ut,ft){if(Ce.Yb(a,y,tt,rt,ft,x,E)&&Ce.Yb(a,y,tt,rt,ft,b,z))return Ce.Yb(a,y,tt,rt,ft,lt,ut);var yt=(a+x)/2,Mt=(y+E)/2,bt=(x+b)/2,Dt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(yt+bt)/2,x=(Mt+Dt)/2,bt=(bt+b)/2,Dt=(Dt+z)/2;var qt=(E+bt)/2,Vt=(x+Dt)/2;return Ce.cs(a,y,yt,Mt,E,x,qt,Vt,ot,lt,ut,ft)||Ce.cs(qt,Vt,bt,Dt,b,z,tt,rt,ot,lt,ut,ft)},ax:function(a,y,x,E,b,z,tt,rt,ot){var lt=(x+b)/2,ut=(E+z)/2;return ot.h((((a+x)/2+lt)/2+(lt+(b+tt)/2)/2)/2,(((y+E)/2+ut)/2+(ut+(z+rt)/2)/2)/2),ot},My:function(a,y,x,E,b,z,tt,rt){var ot=(x+b)/2,lt=(E+z)/2;return Cn(((a+x)/2+ot)/2,((y+E)/2+lt)/2,(ot+(b+tt)/2)/2,(lt+(z+rt)/2)/2)},Dl:function(a,y,x,E,b,z,tt,rt,ot,lt){if(Ce.Yb(a,y,tt,rt,ot,x,E)&&Ce.Yb(a,y,tt,rt,ot,b,z))kr(lt,a,y,0,0),kr(lt,tt,rt,0,0);else{var ut=(a+x)/2,ft=(y+E)/2,yt=(x+b)/2,Mt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(ut+yt)/2,x=(ft+Mt)/2,yt=(yt+b)/2,Mt=(Mt+z)/2;var bt=(E+yt)/2,Dt=(x+Mt)/2;Ce.Dl(a,y,ut,ft,E,x,bt,Dt,ot,lt),Ce.Dl(bt,Dt,yt,Mt,b,z,tt,rt,ot,lt)}return lt},Qe:function(a,y,x,E,b,z,tt,rt,ot,lt){if(Ce.Yb(a,y,tt,rt,ot,x,E)&&Ce.Yb(a,y,tt,rt,ot,b,z))lt.length===0&&(lt.push(a),lt.push(y)),lt.push(tt),lt.push(rt);else{var ut=(a+x)/2,ft=(y+E)/2,yt=(x+b)/2,Mt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(ut+yt)/2,x=(ft+Mt)/2,yt=(yt+b)/2,Mt=(Mt+z)/2;var bt=(E+yt)/2,Dt=(x+Mt)/2;Ce.Qe(a,y,ut,ft,E,x,bt,Dt,ot,lt),Ce.Qe(bt,Dt,yt,Mt,b,z,tt,rt,ot,lt)}return lt},jv:function(a,y,x,E,b,z,tt,rt,ot,lt){if(Ce.Yb(a,y,b,z,lt,x,E))return Ce.Yb(a,y,b,z,lt,rt,ot);var ut=(a+x)/2,ft=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var yt=(ut+x)/2,Mt=(ft+E)/2;return Ce.jv(a,y,ut,ft,yt,Mt,tt,rt,ot,lt)||Ce.jv(yt,Mt,x,E,b,z,tt,rt,ot,lt)},OA:function(a,y,x,E,b,z,tt){return tt.h(((a+x)/2+(x+b)/2)/2,((y+E)/2+(E+z)/2)/2),tt},iv:function(a,y,x,E,b,z,tt,rt){if(Ce.Yb(a,y,b,z,tt,x,E))kr(rt,a,y,0,0),kr(rt,b,z,0,0);else{var ot=(a+x)/2,lt=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ut=(ot+x)/2,ft=(lt+E)/2;Ce.iv(a,y,ot,lt,ut,ft,tt,rt),Ce.iv(ut,ft,x,E,b,z,tt,rt)}return rt},ep:function(a,y,x,E,b,z,tt,rt){if(Ce.Yb(a,y,b,z,tt,x,E))rt.length===0&&(rt.push(a),rt.push(y)),rt.push(b),rt.push(z);else{var ot=(a+x)/2,lt=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ut=(ot+x)/2,ft=(lt+E)/2;Ce.ep(a,y,ot,lt,ut,ft,tt,rt),Ce.ep(ut,ft,x,E,b,z,tt,rt)}return rt},Eo:function(a,y,x,E,b,z,tt,rt,ot,lt,ut,ft,yt,Mt){if(Ce.Yb(a,y,tt,rt,yt,x,E)&&Ce.Yb(a,y,tt,rt,yt,b,z))return!Ce.Rl(a,y,tt,rt,ot,lt,ut,ft)||(yt=(a-tt)*(lt-ft)-(y-rt)*(ot-ut),yt===0)?!1:(Mt.h(((a*rt-y*tt)*(ot-ut)-(a-tt)*(ot*ft-lt*ut))/yt,((a*rt-y*tt)*(lt-ft)-(y-rt)*(ot*ft-lt*ut))/yt),!0);var bt=(a+x)/2,Dt=(y+E)/2,qt=(x+b)/2,Vt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(bt+qt)/2,x=(Dt+Vt)/2,qt=(qt+b)/2,Vt=(Vt+z)/2;var oe=(E+qt)/2,ce=(x+Vt)/2,ge=1/0,Se=!1,Re=0,qn=0;return Ce.Eo(a,y,bt,Dt,E,x,oe,ce,ot,lt,ut,ft,yt,Mt)&&(a=(Mt.x-ot)*(Mt.x-ot)+(Mt.y-lt)*(Mt.y-lt),a<ge&&(ge=a,Se=!0,Re=Mt.x,qn=Mt.y)),Ce.Eo(oe,ce,qt,Vt,b,z,tt,rt,ot,lt,ut,ft,yt,Mt)&&(Mt.x-ot)*(Mt.x-ot)+(Mt.y-lt)*(Mt.y-lt)<ge&&(Se=!0,Re=Mt.x,qn=Mt.y),Se&&(Mt.x=Re,Mt.y=qn),Se},Fo:function(a,y,x,E,b,z,tt,rt,ot,lt,ut,ft,yt){var Mt=0;if(Ce.Yb(a,y,tt,rt,yt,x,E)&&Ce.Yb(a,y,tt,rt,yt,b,z)){if(yt=(a-tt)*(lt-ft)-(y-rt)*(ot-ut),yt===0)return Mt;var bt=((a*rt-y*tt)*(ot-ut)-(a-tt)*(ot*ft-lt*ut))/yt,Dt=((a*rt-y*tt)*(lt-ft)-(y-rt)*(ot*ft-lt*ut))/yt;if(bt>=ut)return Mt;if((ot>ut?ot-ut:ut-ot)<(lt>ft?lt-ft:ft-lt)){if(y<rt?(ot=y,a=rt):(ot=rt,a=y),Dt<ot||Dt>a)return Mt}else if(a<tt?(ot=a,a=tt):ot=tt,bt<ot||bt>a)return Mt;0<yt?Mt++:0>yt&&Mt--}else{bt=(a+x)/2,Dt=(y+E)/2;var qt=(x+b)/2,Vt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(bt+qt)/2,x=(Dt+Vt)/2,qt=(qt+b)/2,Vt=(Vt+z)/2;var oe=(E+qt)/2,ce=(x+Vt)/2;Mt+=Ce.Fo(a,y,bt,Dt,E,x,oe,ce,ot,lt,ut,ft,yt),Mt+=Ce.Fo(oe,ce,qt,Vt,b,z,tt,rt,ot,lt,ut,ft,yt)}return Mt},qh:function(a,y,x,E,b,z,tt){return Ce.$(a,x)?(y<E?(x=y,y=E):x=E,z<x?(tt.h(a,x),!1):z>y?(tt.h(a,y),!1):(tt.h(a,z),!0)):Ce.$(y,E)?(a<x?(E=a,a=x):E=x,b<E?(tt.h(E,y),!1):b>a?(tt.h(a,y),!1):(tt.h(b,y),!0)):(b=((a-b)*(a-x)+(y-z)*(y-E))/((x-a)*(x-a)+(E-y)*(E-y)),-5e-6>b?(tt.h(a,y),!1):1.000005<b?(tt.h(x,E),!1):(tt.h(a+b*(x-a),y+b*(E-y)),!0))},Ve:function(a,y,x,E,b,z,tt,rt,ot){return Ce.B(a,x)&&Ce.B(y,E)?(ot.h(a,y),!1):Ce.$(b,tt)?Ce.$(a,x)?(Ce.qh(a,y,x,E,b,z,ot),!1):Ce.qh(a,y,x,E,b,(E-y)/(x-a)*(b-a)+y,ot):(rt=(rt-z)/(tt-b),Ce.$(a,x)?(x=rt*(a-b)+z,y<E?(b=y,y=E):b=E,x<b?(ot.h(a,b),!1):x>y?(ot.h(a,y),!1):(ot.h(a,x),!0)):(tt=(E-y)/(x-a),Ce.$(rt,tt)?(Ce.qh(a,y,x,E,b,z,ot),!1):(b=(tt*a-rt*b+z-y)/(tt-rt),Ce.$(tt,0)?(a<x?(E=a,a=x):E=x,b<E?(ot.h(E,y),!1):b>a?(ot.h(a,y),!1):(ot.h(b,y),!0)):Ce.qh(a,y,x,E,b,tt*(b-a)+y,ot))))},MA:function(a,y,x,E,b){return Ce.Ve(x.x,x.y,E.x,E.y,a.x,a.y,y.x,y.y,b)},KA:function(a,y,x,E,b,z,tt,rt,ot,lt){function ut(qt,Vt){var oe=(qt-a)*(qt-a)+(Vt-y)*(Vt-y);oe<ft&&(ft=oe,ot.h(qt,Vt))}var ft=1/0;ut(ot.x,ot.y);var yt=0,Mt=0,bt=0,Dt=0;if(b<tt?(yt=b,Mt=tt):(yt=tt,Mt=b),z<rt?(bt=b,Dt=tt):(bt=tt,Dt=b),yt=(Mt-yt)/2+lt,lt=(Dt-bt)/2+lt,b=(b+tt)/2,z=(z+rt)/2,yt===0||lt===0)return ot;if(.5>(x>a?x-a:a-x)){if(yt=1-(x-b)*(x-b)/(yt*yt),0>yt)return ot;yt=Math.sqrt(yt),E=-lt*yt+z,ut(x,lt*yt+z),ut(x,E)}else{if(x=(E-y)/(x-a),E=1/(yt*yt)+x*x/(lt*lt),rt=2*x*(y-x*a)/(lt*lt)-2*x*z/(lt*lt)-2*b/(yt*yt),yt=rt*rt-4*E*(2*x*a*z/(lt*lt)-2*y*z/(lt*lt)+z*z/(lt*lt)+b*b/(yt*yt)-1+(y-x*a)*(y-x*a)/(lt*lt)),0>yt)return ot;yt=Math.sqrt(yt),lt=(-rt+yt)/(2*E),ut(lt,x*lt-x*a+y),yt=(-rt-yt)/(2*E),ut(yt,x*yt-x*a+y)}return ot},Ff:function(a,y,x,E,b,z,tt,rt,ot){var lt=1e21,ut=a,ft=y;if(Ce.Ve(a,y,a,E,b,z,tt,rt,ot)){var yt=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z);yt<lt&&(lt=yt,ut=ot.x,ft=ot.y)}return Ce.Ve(x,y,x,E,b,z,tt,rt,ot)&&(yt=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),yt<lt&&(lt=yt,ut=ot.x,ft=ot.y)),Ce.Ve(a,y,x,y,b,z,tt,rt,ot)&&(y=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),y<lt&&(lt=y,ut=ot.x,ft=ot.y)),Ce.Ve(a,E,x,E,b,z,tt,rt,ot)&&(a=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),a<lt&&(lt=a,ut=ot.x,ft=ot.y)),ot.h(ut,ft),1e21>lt},us:function(a,y,x){return Ce.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,E,b,z,tt,rt){var ot=a+x,lt=y+E;return b===tt?(z<rt?(tt=z,z=rt):tt=rt,a<=b&&b<=ot&&tt<=lt&&z>=y):z===rt?(b<tt?(rt=b,b=tt):rt=tt,y<=z&&z<=lt&&rt<=ot&&b>=a):!!(Ao(a,y,x,E,b,z)||Ao(a,y,x,E,tt,rt)||Ce.Rl(a,y,ot,y,b,z,tt,rt)||Ce.Rl(ot,y,ot,lt,b,z,tt,rt)||Ce.Rl(ot,lt,a,lt,b,z,tt,rt)||Ce.Rl(a,lt,a,y,b,z,tt,rt))},Rl:function(a,y,x,E,b,z,tt,rt){return a===x&&y===E&&b===tt&&z===rt?a===b&&y===z:0>=Ce.Fl(a,y,x,E,b,z)*Ce.Fl(a,y,x,E,tt,rt)&&0>=Ce.Fl(b,z,tt,rt,a,y)*Ce.Fl(b,z,tt,rt,x,E)},Fl:function(a,y,x,E,b,z){return x-=a,E-=y,a=b-a,y=z-y,z=a*E-y*x,z===0&&(z=a*x+y*E,0<z&&(z=(a-x)*x+(y-E)*E,0>z&&(z=0))),z},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,E,b,z){var tt=Math.PI;z||(E*=tt/180,b*=tt/180);var rt=E>b?-1:1;z=[];var ot=tt/2,lt=E;if(E=Math.min(2*tt,Math.abs(b-E)),1e-5>E)return ot=lt+rt*Math.min(E,ot),rt=a+x*Math.cos(lt),lt=y+x*Math.sin(lt),a+=x*Math.cos(ot),y+=x*Math.sin(ot),x=(rt+a)/2,ot=(lt+y)/2,z.push([rt,lt,x,ot,x,ot,a,y]),z;for(;1e-5<E;)b=lt+rt*Math.min(E,ot),z.push(Ce.Vy(x,lt,b,a,y)),E-=Math.abs(b-lt),lt=b;return z},Vy:function(a,y,x,E,b){var z=(x-y)/2,tt=a*Math.cos(z),rt=a*Math.sin(z),ot=-rt,lt=tt*tt+ot*ot,ut=lt+tt*tt+ot*rt;return lt=4/3*(Math.sqrt(2*lt*ut)-ut)/(tt*rt-ot*tt),rt=tt-lt*ot,tt=ot+lt*tt,ot=-tt,lt=z+y,z=Math.cos(lt),lt=Math.sin(lt),[E+a*Math.cos(y),b+a*Math.sin(y),E+rt*z-tt*lt,b+rt*lt+tt*z,E+rt*z-ot*lt,b+rt*lt+ot*z,E+a*Math.cos(x),b+a*Math.sin(x)]},No:function(a,y,x,E,b,z,tt){x=Math.floor((a-x)/b)*b+x,E=Math.floor((y-E)/z)*z+E;var rt=x;return x+b-a<b/2&&(rt=x+b),a=E,E+z-y<z/2&&(a=E+z),tt.h(rt,a),tt},vx:function(a,y){var x=Math.max(a,y);a=Math.min(a,y);var E;do y=x%a,x=E=a,a=y;while(0<y);return E},$y:function(a,y,x,E){var b=0>x,z=0>E;if(a<y)var tt=1,rt=0;else tt=0,rt=1;var ot=tt===0?a:y,lt=tt===0?x:E;return(tt===0?b:z)&&(lt=-lt),tt=rt,x=tt===0?x:E,(tt===0?b:z)&&(x=-x),Ce.az(ot,tt===0?a:y,lt,x,0,0)},az:function(a,y,x,E,b,z){if(0<E)if(0<x){b=a*a,z=y*y,a*=x;var tt=y*E,rt=-z+tt,ot=-z+Math.sqrt(a*a+tt*tt);y=rt;for(var lt=0;9999999999>lt&&(y=.5*(rt+ot),!(y===rt||y===ot));++lt){var ut=a/(y+b),ft=tt/(y+z);if(ut=ut*ut+ft*ft-1,0<ut)rt=y;else if(0>ut)ot=y;else break}x=b*x/(y+b)-x,E=z*E/(y+z)-E,x=Math.sqrt(x*x+E*E)}else x=Math.abs(E-y);else E=a*a-y*y,z=a*x,z<E?(E=z/E,z=y*Math.sqrt(Math.abs(1-E*E)),x=a*E-x,x=Math.sqrt(x*x+z*z)):x=Math.abs(x-a);return x},Ze:new Si,um:new Si,Mf:new Si,Nf:0,vm:100};Ce.za=Ce.AA;function bn(a){an(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 ne:(bn.V===null&&(bn.V=new ne().freeze()),this.ee=bn.V),this.aq=this.ee.Ja,this.Ip=new Ue().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=br,this.gg=gr,this.Rk=this.Sk=NaN,this.Uf=Fn}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,E=0;E<y.length;E++)x.add(y[E].copy());a.ee=x}else a.ee=this.ee;return a.aq=this.aq,a.Ip.assign(this.Ip),a.tk=this.tk,a.ym=this.ym,a.zm=this.zm,a.fg=this.fg.J(),a.gg=this.gg.J(),a.Sk=this.Sk,a.Rk=this.Rk,a.Uf=this.Uf,a},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)&&le("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?kl(this,a):a.type===bn.j&&this.type===bn.o?kl(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 E=0;E<x;E++)if(!y[E].Xa(a[E]))return!1;return!0}return Ce.B(this.startX,a.startX)&&Ce.B(this.startY,a.startY)&&Ce.B(this.endX,a.endX)&&Ce.B(this.endY,a.endY)};function kl(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&&Ce.B(a.startX,y.startX)&&Ce.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===vo&&Ce.B(a.endX,y.endX)&&Ce.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 Ue(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 Ue(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 E=x.length,b=0;b<E;b++){var z=x[b];0<b&&(y+=" x "),z.isFilled&&(y+="F "),y+=z.toString(a)}return y;default:return this.type.toString()}},bn.nb=function(a){a=a.split(/[Xx]/);for(var y=a.length,x="",E=0;E<y;E++){var b=a[E];x=b.match(/[Ff]/)!==null?E===0?x+b:x+("X"+(b[0]===" "?"":" ")+b):x+((E===0?"":"X ")+"F"+(b[0]===" "?"":" ")+b)}return x},bn.parse=function(a,y){function x(){return Dt>=ge-1?!0:lt[Dt+1].match(Se)!==null}function E(){return Dt++,lt[Dt]}function b(ar){var Ji=parseFloat(E()),to=parseFloat(E());qt===qt.toLowerCase()&&(Ji=ce.x+Ji,to=ce.y+to),ar.h(Ji,to)}function z(){return b(ce),ce}function tt(){return b(oe),oe}function rt(){var ar=Vt.toLowerCase();return ar!=="c"&&ar!=="s"&&ar!=="q"&&ar!=="t"?ce:new Qt(2*ce.x-oe.x,2*ce.y-oe.y)}y===void 0&&(y=!1);var ot=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(ot,"$1 $2"),a=a.replace(ot,"$1 $2"),a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^s])/gm,"$1 $2"),a=a.replace(/([^s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2"),a=a.replace(/([0-9])([+\-])/gm,"$1 $2"),a=a.replace(/[\s\r\t\n]+/gm," "),a=a.replace(/^\s+|\s+$/g,"");var lt=a.split(" ");for(a=0;a<lt.length;a++){var ut=lt[a];if(ut.match(/(\.[0-9]*)(\.)/gm)!==null){ot=rn();for(var ft="",yt=!1,Mt=0;Mt<ut.length;Mt++){var bt=ut[Mt];bt!=="."||yt?bt==="."?(ot.push(ft),ft="."):ft+=bt:(yt=!0,ft+=bt)}for(ot.push(ft),lt.splice(a,1),ut=0;ut<ot.length;ut++)lt.splice(a+ut,0,ot[ut]);a+=ot.length-1,Ve(ot)}}var Dt=-1,qt="",Vt="";ot=new Qt(0,0);var oe=new Qt(0,0),ce=new Qt(0,0),ge=lt.length;a=Dy(null),yt=ft=ut=!1,Mt=!0,bt=null;for(var Se=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(Dt>=ge-1);)if(Vt=qt,qt=E(),qt!=="")switch(qt.toUpperCase()){case"X":Mt=!0,ft=ut=!1;break;case"M":for(bt=z(),a.mc===null||Mt===!0?(Pg(a,bt.x,bt.y,ut,!ft,yt),Mt=!1):a.moveTo(bt.x,bt.y),ot.assign(ce);!x();)bt=z(),a.lineTo(bt.x,bt.y);break;case"L":for(;!x();)bt=z(),a.lineTo(bt.x,bt.y);break;case"H":for(;!x();)ce=new Qt((qt===qt.toLowerCase()?ce.x:0)+parseFloat(E()),ce.y),a.lineTo(ce.x,ce.y);break;case"V":for(;!x();)ce=new Qt(ce.x,(qt===qt.toLowerCase()?ce.y:0)+parseFloat(E())),a.lineTo(ce.x,ce.y);break;case"C":for(;!x();){bt=new Qt,b(bt);var Re=tt(),qn=z();yc(a,bt.x,bt.y,Re.x,Re.y,qn.x,qn.y)}break;case"S":for(;!x();)bt=rt(),Re=tt(),qn=z(),yc(a,bt.x,bt.y,Re.x,Re.y,qn.x,qn.y);break;case"Q":for(;!x();)bt=tt(),Re=z(),m0(a,bt.x,bt.y,Re.x,Re.y);break;case"T":for(;!x();)oe=bt=rt(),Re=z(),m0(a,bt.x,bt.y,Re.x,Re.y);break;case"B":for(;!x();){bt=parseFloat(E()),Re=parseFloat(E()),qn=parseFloat(E());var gi=parseFloat(E()),ui=parseFloat(E()),Qn=ui,pn=!1;x()||(Qn=parseFloat(E()),x()||(pn=parseFloat(E())!==0)),qt===qt.toLowerCase()&&(qn+=ce.x,gi+=ce.y),a.arcTo(bt,Re,qn,gi,ui,Qn,pn)}break;case"A":for(;!x();)bt=Math.abs(parseFloat(E())),Re=Math.abs(parseFloat(E())),qn=parseFloat(E()),ui=gi=!1,pn=Qn=0,Qn=E(),Qn.length===1?(gi=!!parseFloat(Qn),ui=!!parseFloat(E()),Qn=parseFloat(E())):Qn.length===2?(gi=!!parseFloat(Qn[0]),ui=!!parseFloat(Qn[1]),Qn=parseFloat(E())):(gi=!!parseFloat(Qn[0]),ui=!!parseFloat(Qn[1]),Qn=parseFloat(Qn.slice(2))),pn=parseFloat(E()),qt===qt.toLowerCase()&&(Qn=ce.x+Qn,pn=ce.y+pn),ce.h(Qn,pn),Mw(a,bt,Re,qn,gi,ui,Qn,pn);break;case"Z":Lw(a),ce.assign(ot);break;case"F":for(bt="",Re=1;lt[Dt+Re];)if(lt[Dt+Re]==="0")yt=!0,Re++;else if(lt[Dt+Re].match(/[Uu]/)!==null)Re++;else if(lt[Dt+Re].match(Se)===null)Re++;else{bt=lt[Dt+Re];break}bt.match(/[Mm]/)?ut=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(bt="",Re=1;lt[Dt+Re];)if(lt[Dt+Re].match(/[Ff]/)!==null)Re++;else if(lt[Dt+Re].match(Se)===null)Re++;else{bt=lt[Dt+Re];break}bt.match(/[Mm]/)?ft=!0:a.mc.isShadowed=!1}if(ot=a.os,v0=a,y)for(y=ot.figures.iterator;y.next();)y.value.isFilled=!0;return ot},bn.Ha=function(a,y){for(var x=a.length,E=Qt.alloc(),b=0;b<x;b++){var z=a[b];E.x=z[0],E.y=z[1],y.Ga(E),z[0]=E.x,z[1]=E.y,E.x=z[2],E.y=z[3],y.Ga(E),z[2]=E.x,z[3]=E.y,E.x=z[4],E.y=z[5],y.Ga(E),z[4]=E.x,z[5]=E.y,E.x=z[6],E.y=z[7],y.Ga(E),z[6]=E.x,z[7]=E.y}Qt.free(E)},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 E=a[x];E._isInvalidBounds=!1;var b=E.segments;E.sr=b.Ja,E=b.s,b=E.length;for(var z=0;z<b;z++){var tt=E[z];tt._isInvalidBounds=!1,tt.ae=null}}}a=this.Ip,a.ka(),isNaN(this.Sk)||isNaN(this.Rk)?a.h(0,0,0,0):a.h(0,0,this.Sk,this.Rk),du(this,a,!1),kr(a,0,0,0,0),a.freeze()},bn.prototype.ix=function(){var a=new Ue;return du(this,a,!0),a};function du(a,y,x){switch(a.type){case bn.j:case bn.u:case bn.F:x?y.h(a.od,a.pd,0,0):kr(y,a.od,a.pd,0,0),kr(y,a.Dc,a.Ec,0,0);break;case bn.o:var E=a.figures;a=E.s,E=E.length;for(var b=0;b<E;b++){var z=a[b];x&&b===0?y.h(z.startX,z.startY,0,0):kr(y,z.startX,z.startY,0,0);for(var tt=z.segments.s,rt=tt.length,ot=z.startX,lt=z.startY,ut=0;ut<rt;ut++){var ft=tt[ut];switch(ft.type){case vo:case ws:ot=ft.endX,lt=ft.endY,kr(y,ot,lt,0,0);break;case Ps:Ce.Dl(ot,lt,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.5,y),ot=ft.endX,lt=ft.endY;break;case Ha:Ce.iv(ot,lt,ft.point1X,ft.point1Y,ft.endX,ft.endY,.5,y),ot=ft.endX,lt=ft.endY;break;case ss:case sl:var yt=ft.type===ss?Fa(ft,z):ol(ft,z,ot,lt),Mt=yt.length;if(Mt===0){ot=ft.type===ss?ft.centerX:ft.endX,lt=ft.type===ss?ft.centerY:ft.endY,kr(y,ot,lt,0,0);break}ft=null;for(var bt=0;bt<Mt;bt++)ft=yt[bt],Ce.Dl(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.5,y);ft!==null&&(ot=ft[6],lt=ft[7]);break;default:le("Unknown Segment type: "+ft.type)}}}break;default:le("Unknown Geometry type: "+a.type)}}bn.prototype.normalize=function(){this._isFrozen&&De(this);var a=this.ix();return this.offset(-a.x,-a.y),new Qt(-a.x,-a.y)},bn.prototype.offset=function(a,y){return this._isFrozen&&De(this),this.transform(1,0,0,1,a,y),this},bn.prototype.scale=function(a,y){return this._isFrozen&&De(this),this.transform(a,0,0,y,0,0),this},bn.prototype.rotate=function(a,y,x){this._isFrozen&&De(this),y===void 0&&(y=0),x===void 0&&(x=0);var E=Yi.alloc();return E.reset(),E.rotate(a,y,x),this.transform(E.m11,E.m12,E.m21,E.m22,E.dx,E.dy),Yi.free(E),this},Tt=bn.prototype,Tt.transform=function(a,y,x,E,b,z){switch(this.type){case bn.j:case bn.u:case bn.F:var tt=this.od,rt=this.pd;this.od=tt*a+rt*x+b,this.pd=tt*y+rt*E+z,tt=this.Dc,rt=this.Ec,this.Dc=tt*a+rt*x+b,this.Ec=tt*y+rt*E+z;break;case bn.o:for(var ot=this.figures.s,lt=ot.length,ut=0;ut<lt;ut++){var ft=ot[ut];tt=ft.startX,rt=ft.startY,ft.startX=tt*a+rt*x+b,ft.startY=tt*y+rt*E+z,ft=ft.segments.s;for(var yt=ft.length,Mt=0;Mt<yt;Mt++){var bt=ft[Mt];switch(bt.type){case vo:case ws:tt=bt.endX,rt=bt.endY,bt.endX=tt*a+rt*x+b,bt.endY=tt*y+rt*E+z;break;case Ps:tt=bt.point1X,rt=bt.point1Y,bt.point1X=tt*a+rt*x+b,bt.point1Y=tt*y+rt*E+z,tt=bt.point2X,rt=bt.point2Y,bt.point2X=tt*a+rt*x+b,bt.point2Y=tt*y+rt*E+z,tt=bt.endX,rt=bt.endY,bt.endX=tt*a+rt*x+b,bt.endY=tt*y+rt*E+z;break;case Ha:tt=bt.point1X,rt=bt.point1Y,bt.point1X=tt*a+rt*x+b,bt.point1Y=tt*y+rt*E+z,tt=bt.endX,rt=bt.endY,bt.endX=tt*a+rt*x+b,bt.endY=tt*y+rt*E+z;break;case ss:tt=bt.centerX,rt=bt.centerY,bt.centerX=tt*a+rt*x+b,bt.centerY=tt*y+rt*E+z,y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),bt.startAngle+=tt),0>a&&(bt.startAngle=180-bt.startAngle,bt.sweepAngle=-bt.sweepAngle),0>E&&(bt.startAngle=-bt.startAngle,bt.sweepAngle=-bt.sweepAngle),bt.radiusX*=Math.sqrt(a*a+x*x),bt.radiusY!==void 0&&(bt.radiusY*=Math.sqrt(y*y+E*E));break;case sl:if(tt=bt.endX,rt=bt.endY,bt.endX=tt*a+rt*x+b,bt.endY=tt*y+rt*E+z,bt.radiusX===0||bt.radiusY===0)break;y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),bt.xAxisRotation+=tt),0>a&&(bt.xAxisRotation=180-bt.xAxisRotation,bt.isClockwiseArc=!bt.isClockwiseArc),0>E&&(bt.xAxisRotation=-bt.xAxisRotation,bt.isClockwiseArc=!bt.isClockwiseArc),bt.radiusX*=Math.sqrt(a*a+x*x),bt.radiusY*=Math.sqrt(y*y+E*E);break;default:le("Unknown Segment type: "+bt.type)}}}}return this._isInvalidBounds=!0,this},Tt.ca=function(a,y){y===void 0&&(y=0);var x=this.od,E=this.pd,b=this.Dc,z=this.Ec;switch(this.type){case bn.j:return Ce.Yb(x,E,b,z,y,a.x,a.y);case bn.u:var tt=Ue.allocAt(Math.min(x,b)-y,Math.min(E,z)-y,Math.abs(b-x)+2*y,Math.abs(z-E)+2*y);return a=tt.ca(a),Ue.free(tt),a;case bn.F:tt=Math.min(x,b)-y;var rt=Math.min(E,z)-y;return x=(Math.abs(b-x)+2*y)/2,y=(Math.abs(z-E)+2*y)/2,0>=x||0>=y?!1:(tt=a.x-(tt+x),rt=a.y-(rt+y),1>=tt*tt/(x*x)+rt*rt/(y*y));case bn.o:return rs(this,a,y,!0,!1);default:return!1}};function rs(a,y,x,E,b){var z=y.x;y=y.y;for(var tt=a.bounds.x-20,rt=0,ot,lt,ut,ft,yt=a.figures.s,Mt=yt.length,bt=0;bt<Mt;bt++){var Dt=yt[bt],qt=!Dt.isEvenOdd;if(Dt.isFilled){if(E&&Dt.ca(z,y,x))return!0;var Vt=Dt.segments;ot=Dt.startX,lt=Dt.startY;for(var oe=ot,ce=lt,ge=Vt.s,Se=0;Se<=Vt.length;Se++){var Re=void 0;if(Se!==Vt.length){Re=ge[Se];var qn=Re.type;a=Re.endX,ft=Re.endY}else qn=vo,a=oe,ft=ce;switch(qn){case ws:if(oe=ra(z,y,tt,y,ot,lt,oe,ce),isNaN(oe))return!0;rt+=oe,oe=a,ce=ft;break;case vo:if(ot=ra(z,y,tt,y,ot,lt,a,ft),isNaN(ot))return!0;rt+=ot;break;case Ps:ut=Ce.Fo(ot,lt,Re.point1X,Re.point1Y,Re.point2X,Re.point2Y,a,ft,tt,y,z,y,.5),rt+=ut;break;case Ha:ut=Ce.Fo(ot,lt,(ot+2*Re.point1X)/3,(lt+2*Re.point1Y)/3,(2*Re.point1X+a)/3,(2*Re.point1Y+ft)/3,a,ft,tt,y,z,y,.5),rt+=ut;break;case ss:case sl:qn=Re.type===ss?Fa(Re,Dt):ol(Re,Dt,ot,lt);var gi=qn.length;if(gi===0){if(ot=ra(z,y,tt,y,ot,lt,Re.type===ss?Re.centerX:Re.endX,Re.type===ss?Re.centerY:Re.endY),isNaN(ot))return!0;rt+=ot;break}Re=null;for(var ui=0;ui<gi;ui++){if(Re=qn[ui],ui===0){if(ut=ra(z,y,tt,y,ot,lt,Re[0],Re[1]),isNaN(ut))return!0;rt+=ut}ut=Ce.Fo(Re[0],Re[1],Re[2],Re[3],Re[4],Re[5],Re[6],Re[7],tt,y,z,y,.5),rt+=ut}Re!==null&&(a=Re[6],ft=Re[7]);break;default:le("Unknown Segment type: "+Re.type)}ot=a,lt=ft}if(qt){if(rt!==0)return!0}else if(rt%2!==0)return!0;rt=0}else if(Dt.ca(z,y,b?x:x+2))return!0}return!1}function ra(a,y,x,E,b,z,tt,rt){if(Ce.Yb(b,z,tt,rt,.05,a,y))return NaN;var ot=(a-x)*(z-rt);if(ot===0)return 0;var lt=((a*E-y*x)*(b-tt)-(a-x)*(b*rt-z*tt))/ot;if(y=(a*E-y*x)*(z-rt)/ot,lt>=a)return 0;if((b>tt?b-tt:tt-b)<(z>rt?z-rt:rt-z)){if(z<rt){if(y<z||y>rt)return 0}else if(y<rt||y>z)return 0}else if(b<tt){if(lt<b||lt>tt)return 0}else if(lt<tt||lt>b)return 0;return 0<ot?1:-1}function gl(a,y,x,E){a=a.figures.s;for(var b=a.length,z=0;z<b;z++)if(a[z].ca(y,x,E))return!0;return!1}Tt.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new Qt),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,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,tt=0,rt=0;rt<b;rt++){var ot=E[rt],lt=ot.length;for(a=0;a<lt;a++){var ut=ot[a];if(tt+ut>=z)return E=z-tt,E=ut===0?0:E/ut,x=x[rt],rt=x[2*a],b=x[2*a+1],y.h(rt+(x[2*a+2]-rt)*E,b+(x[2*a+3]-b)*E),y;tt+=ut}}return y},Tt.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,E=y.length,b=this.flattenedTotalLength*a,z=0,tt=0;tt<E;tt++){var rt=x[tt],ot=rt.length;for(a=0;a<ot;a++){var lt=rt[a];if(z+lt>=b)return b=y[tt],y=b[2*a],x=b[2*a+1],E=b[2*a+2],a=b[2*a+3],1>Math.abs(E-y)&&1>Math.abs(a-x)?0:1>Math.abs(E-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=E-y?0:180:180*Math.atan2(a-x,E-y)/Math.PI;z+=lt}}return NaN},Tt.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,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,tt=0,rt=0;rt<b;rt++){var ot=E[rt],lt=ot.length;for(a=0;a<lt;a++){var ut=ot[a];if(tt+ut>=z)return E=z-tt,E=ut===0?0:E/ut,ut=x[rt],x=ut[2*a],rt=ut[2*a+1],b=ut[2*a+2],a=ut[2*a+3],y[0]=x+(b-x)*E,y[1]=rt+(a-rt)*E,y[2]=1>Math.abs(b-x)&&1>Math.abs(a-rt)?0:1>Math.abs(b-x)?0<=a-rt?90:270:1>Math.abs(a-rt)?0<=b-x?0:180:180*Math.atan2(a-rt,b-x)/Math.PI,y;tt+=ut}}return y},Tt.xx=function(a){if(this.type===bn.j){var y=this.startX,x=this.startY,E=this.endX,b=this.endY;if(y!==E||x!==b){var z=a.x;if(a=a.y,y===E){if(x<b){var tt=x;E=b}else tt=b,E=x;return a<=tt?tt===x?0:1:a>=E?E===x?0:1:Math.abs(a-x)/(E-tt)}if(x===b)return y<E?tt=y:(tt=E,E=y),z<=tt?tt===y?0:1:z>=E?E===y?0:1:Math.abs(z-y)/(E-tt);tt=(E-y)*(E-y)+(b-x)*(b-x);var rt=Qt.alloc();return Ce.qh(y,x,E,b,z,a,rt),a=rt.x,z=rt.y,Qt.free(rt),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/tt)}}else if(this.type===bn.u){tt=this.startX,rt=this.startY;var ot=this.endX;if(b=this.endY,tt!==ot||rt!==b){y=ot-tt,x=b-rt,z=2*y+2*x,E=a.x,a=a.y,E=Math.min(Math.max(E,tt),ot),a=Math.min(Math.max(a,rt),b),tt=Math.abs(E-tt),ot=Math.abs(E-ot),rt=Math.abs(a-rt),b=Math.abs(a-b);var lt=Math.min(tt,ot,rt,b);if(lt===rt)return E/z;if(lt===ot)return(y+a)/z;if(lt===b)return(2*y+x-E)/z;if(lt===tt)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,E=Qt.alloc(),b=1/0,rt=tt=0,ot=y.length;for(var ut=lt=0,ft=0;ft<ot;ft++)for(var yt=y[ft],Mt=x[ft],bt=yt.length,Dt=0;Dt<bt;Dt+=2){var qt=yt[Dt],Vt=yt[Dt+1];if(Dt!==0){Ce.qh(lt,ut,qt,Vt,a.x,a.y,E);var oe=(E.x-a.x)*(E.x-a.x)+(E.y-a.y)*(E.y-a.y);oe<b&&(b=oe,tt=rt,tt+=Math.sqrt((E.x-lt)*(E.x-lt)+(E.y-ut)*(E.y-ut))),rt+=Mt[(Dt-2)/2]}lt=qt,ut=Vt}return Qt.free(E),a=tt/z,0>a?0:1<a?1:a}return 0};function Kl(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],E=[],b=[];if(a.type===bn.j)E.push(a.startX),E.push(a.startY),E.push(a.endX),E.push(a.endY),y.push(E),b.push(Math.sqrt((a.startX-a.endX)*(a.startX-a.endX)+(a.startY-a.endY)*(a.startY-a.endY))),x.push(b);else if(a.type===bn.u)E.push(a.startX),E.push(a.startY),E.push(a.endX),E.push(a.startY),E.push(a.endX),E.push(a.endY),E.push(a.startX),E.push(a.endY),E.push(a.startX),E.push(a.startY),y.push(E),b.push(Math.abs(a.startX-a.endX)),b.push(Math.abs(a.startY-a.endY)),b.push(Math.abs(a.startX-a.endX)),b.push(Math.abs(a.startY-a.endY)),x.push(b);else if(a.type===bn.F){var z=new Cs;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var tt=new Vr(ss);if(tt.startAngle=0,tt.sweepAngle=360,tt.centerX=(a.startX+a.endX)/2,tt.centerY=(a.startY+a.endY)/2,tt.radiusX=Math.abs(a.startX-a.endX)/2,tt.radiusY=Math.abs(a.startY-a.endY)/2,z.add(tt),a=Fa(tt,z),b=a.length,b===0)E.push(tt.centerX),E.push(tt.centerY);else{tt=z.startX,z=z.startY;for(var rt=0;rt<b;rt++){var ot=a[rt];Ce.Qe(tt,z,ot[2],ot[3],ot[4],ot[5],ot[6],ot[7],.5,E),tt=ot[6],z=ot[7]}}y.push(E),x.push(fu(E))}else for(a=a.figures.iterator;a.next();){b=a.value,E=[],E.push(b.startX),E.push(b.startY),tt=b.startX,z=b.startY,rt=tt,ot=z;for(var lt=b.segments.s,ut=lt.length,ft=0;ft<ut;ft++){var yt=lt[ft];switch(yt.type){case ws:4<=E.length&&(y.push(E),x.push(fu(E))),E=[],E.push(yt.endX),E.push(yt.endY),tt=yt.endX,z=yt.endY,rt=tt,ot=z;break;case vo:E.push(yt.endX),E.push(yt.endY),tt=yt.endX,z=yt.endY;break;case Ps:Ce.Qe(tt,z,yt.point1X,yt.point1Y,yt.point2X,yt.point2Y,yt.endX,yt.endY,.5,E),tt=yt.endX,z=yt.endY;break;case Ha:Ce.ep(tt,z,yt.point1X,yt.point1Y,yt.endX,yt.endY,.5,E),tt=yt.endX,z=yt.endY;break;case ss:var Mt=Fa(yt,b),bt=Mt.length;if(bt===0){E.push(yt.centerX),E.push(yt.centerY),tt=yt.centerX,z=yt.centerY;break}for(var Dt=0;Dt<bt;Dt++){var qt=Mt[Dt];Ce.Qe(tt,z,qt[2],qt[3],qt[4],qt[5],qt[6],qt[7],.5,E),tt=qt[6],z=qt[7]}break;case sl:if(Mt=ol(yt,b,tt,z),bt=Mt.length,Dt=yt.endX,qt=yt.endY,bt===0){E.push(Dt),E.push(qt),tt=Dt,z=qt;break}for(Dt=0;Dt<bt;Dt++)qt=Mt[Dt],Ce.Qe(tt,z,qt[2],qt[3],qt[4],qt[5],qt[6],qt[7],.5,E),tt=qt[6],z=qt[7];break;default:le("Segment not of valid type: "+yt.type)}yt.isClosed&&(E.push(rt),E.push(ot))}4<=E.length&&(y.push(E),x.push(fu(E)))}}}function fu(a){for(var y=[],x=0,E=0,b=a.length,z=0;z<b;z+=2){var tt=a[z],rt=a[z+1];z!==0&&y.push(Math.sqrt(vn(x,E,tt,rt))),x=tt,E=rt}return y}Tt.add=function(a){return this.ee.add(a),this},Tt.pm=function(a,y,x,E,b,z,tt,rt){return this._isFrozen&&De(this),this.fg=new di(a,y,b,z).freeze(),this.gg=new di(x,E,tt,rt).freeze(),this},Sn.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 Kl(this),this.tk}},flattenedLengths:{get:function(){return Kl(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,E=a=0;E<x;E++)for(var b=y[E],z=b.length,tt=0;tt<z;tt++)a+=b[tt]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&De(this,a),this.na=a,a===bn.o?this.ee=new ne:(bn.V===null&&(bn.V=new ne().freeze()),this.ee=bn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&De(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&De(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&De(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&De(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&De(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&De(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&De(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&De(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 Oe(bn,"Line",0),bn.u=new Oe(bn,"Rectangle",1),bn.F=new Oe(bn,"Ellipse",2),bn.o=new Oe(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 Cs(a,y,x,E,b){an(this),x===void 0&&(x=!0),E===void 0&&(E=!0),b===void 0&&(b=!1),this.l=2|(x?4:0)|(E?8:0)|(b?16:0),a!==void 0?this.od=a:this.od=0,y!==void 0?this.pd=y:this.pd=0,this.pl=new ne,this.sr=this.pl.Ja,this.fw=null}Cs.prototype.copy=function(){var a=new Cs;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,E=a.pl,b=0;b<x;b++){var z=y[b].copy();E.add(z)}return a.sr=this.sr,a.fw=this.fw,a},Tt=Cs.prototype,Tt.Xa=function(a){if(!(a instanceof Cs&&Ce.B(this.startX,a.startX)&&Ce.B(this.startY,a.startY)))return!1;var y=this.segments.s;a=a.segments.s;var x=y.length;if(x!==a.length)return!1;for(var E=0;E<x;E++)if(!y[E].Xa(a[E]))return!1;return!0},Tt.toString=function(a){a===void 0&&(a=-1);for(var y=0>a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a),x=this.segments.s,E=x.length,b=0;b<E;b++)y+=" "+x[b].toString(a);return y},Tt.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},Tt.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},Tt.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},Tt.add=function(a){return this.pl.add(a),this},Tt.ca=function(a,y,x){for(var E=this.startX,b=this.startY,z=E,tt=b,rt=this.segments.s,ot=rt.length,lt=0;lt<ot;lt++){var ut=rt[lt];switch(ut.type){case ws:z=ut.endX,tt=ut.endY,E=ut.endX,b=ut.endY;break;case vo:if(Ce.Yb(E,b,ut.endX,ut.endY,x,a,y))return!0;E=ut.endX,b=ut.endY;break;case Ps:if(Ce.cs(E,b,ut.point1X,ut.point1Y,ut.point2X,ut.point2Y,ut.endX,ut.endY,.5,a,y,x))return!0;E=ut.endX,b=ut.endY;break;case Ha:if(Ce.jv(E,b,ut.point1X,ut.point1Y,ut.endX,ut.endY,.5,a,y,x))return!0;E=ut.endX,b=ut.endY;break;case ss:case sl:var ft=ut.type===ss?Fa(ut,this):ol(ut,this,E,b),yt=ft.length,Mt=ut.type===ss?ut.centerX:ut.endX,bt=ut.type===ss?ut.centerY:ut.endY;if(yt===0){if(Ce.Yb(E,b,Mt,bt,x,a,y))return!0;E=Mt,b=bt;break}for(Mt=null,bt=0;bt<yt;bt++)if(Mt=ft[bt],bt===0&&Ce.Yb(E,b,Mt[0],Mt[1],x,a,y)||Ce.cs(Mt[0],Mt[1],Mt[2],Mt[3],Mt[4],Mt[5],Mt[6],Mt[7],.5,a,y,x))return!0;Mt!==null&&(E=Mt[6],b=Mt[7]);break;default:le("Unknown Segment type: "+ut.type)}if(ut.isClosed&&(E!==z||b!==tt)&&Ce.Yb(E,b,z,tt,x,a,y))return!0}return!1},Sn.Object.defineProperties(Cs.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&&De(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&De(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&De(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&De(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&De(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&De(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Cs.prototype.add=Cs.prototype.add,Cs.prototype.equalsApprox=Cs.prototype.Xa,Cs.className="PathFigure";function Vr(a,y,x,E,b,z,tt,rt){an(this),a===void 0&&(a=vo),this.na=a,this.l=2,y!==void 0?this.Dc=y:this.Dc=0,x!==void 0?this.Ec=x:this.Ec=0,E===void 0&&(E=0),b===void 0&&(b=0),z===void 0&&(z=0),tt===void 0&&(tt=0),a===sl?(a=z%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(E,0),this.Pg=Math.max(b,0),typeof tt=="boolean"?tt&&(this.isLargeArc=!0):typeof tt=="number"&&tt&&(this.isLargeArc=!0),rt&&(this.isClockwiseArc=!0)):(this.Ne=E,this.Vh=b,a===ss&&(z=Math.max(z,0)),this.Wh=z,typeof tt=="number"?(a===ss&&(tt=Math.max(tt,0)),this.Pg=tt):this.Pg=0),this.ae=null}Vr.prototype.copy=function(){var a=new Vr;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},Tt=Vr.prototype,Tt.Xa=function(a){if(!(a instanceof Vr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case ws:case vo:return Ce.B(this.endX,a.endX)&&Ce.B(this.endY,a.endY);case Ps:return Ce.B(this.endX,a.endX)&&Ce.B(this.endY,a.endY)&&Ce.B(this.point1X,a.point1X)&&Ce.B(this.point1Y,a.point1Y)&&Ce.B(this.point2X,a.point2X)&&Ce.B(this.point2Y,a.point2Y);case Ha:return Ce.B(this.endX,a.endX)&&Ce.B(this.endY,a.endY)&&Ce.B(this.point1X,a.point1X)&&Ce.B(this.point1Y,a.point1Y);case ss:return Ce.B(this.startAngle,a.startAngle)&&Ce.B(this.sweepAngle,a.sweepAngle)&&Ce.B(this.centerX,a.centerX)&&Ce.B(this.centerY,a.centerY)&&Ce.B(this.radiusX,a.radiusX)&&Ce.B(this.radiusY,a.radiusY);case sl:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&Ce.B(this.xAxisRotation,a.xAxisRotation)&&Ce.B(this.endX,a.endX)&&Ce.B(this.endY,a.endY)&&Ce.B(this.radiusX,a.radiusX)&&Ce.B(this.radiusY,a.radiusY);default:return!1}},Tt.qb=function(a){a.classType===Vr&&(this.type=a)},Tt.toString=function(a){switch(a===void 0&&(a=-1),this.type){case ws:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case vo:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Ps: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 Ha: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 ss: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 sl: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":"")},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return this._isFrozen=!1,this},Tt.close=function(){return this.isClosed=!0,this};function Fa(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,E=a.radiusY;if(E===void 0&&(E=x),x===0||E===0)return a.ae=[],a.ae;y=a.Ne;var b=a.Vh,z=Ce.jx(0,0,x<E?x:E,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==E){var tt=Yi.alloc();tt.reset(),x<E?tt.scale(1,E/x):tt.scale(x/E,1),bn.Ha(z,tt),Yi.free(tt)}for(x=z.length,E=0;E<x;E++)tt=z[E],tt[0]+=y,tt[1]+=b,tt[2]+=y,tt[3]+=b,tt[4]+=y,tt[5]+=b,tt[6]+=y,tt[7]+=b;return a.ae=z,a.ae}function ol(a,y,x,E){function b(Dt,qt,Vt,oe){return(Dt*oe<qt*Vt?-1:1)*Math.acos((Dt*Vt+qt*oe)/(Math.sqrt(Dt*Dt+qt*qt)*Math.sqrt(Vt*Vt+oe*oe)))}if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;if(a.radiusX===0||a.radiusY===0)return a.ae=[],a.ae;y=a.Wh;var z=a.Pg;y===0&&(y=1e-4),z===0&&(z=1e-4);var tt=Math.PI/180*a.Ne,rt=a.isLargeArc,ot=a.isClockwiseArc,lt=a.Dc,ut=a.Ec,ft=Math.cos(tt),yt=Math.sin(tt),Mt=ft*(x-lt)/2+yt*(E-ut)/2;tt=-yt*(x-lt)/2+ft*(E-ut)/2;var bt=Mt*Mt/(y*y)+tt*tt/(z*z);return 1<bt&&(y*=Math.sqrt(bt),z*=Math.sqrt(bt)),bt=(rt===ot?-1:1)*Math.sqrt((y*y*z*z-y*y*tt*tt-z*z*Mt*Mt)/(y*y*tt*tt+z*z*Mt*Mt)),isNaN(bt)&&(bt=0),rt=bt*y*tt/z,bt=bt*-z*Mt/y,isNaN(rt)&&(rt=0),isNaN(bt)&&(bt=0),x=(x+lt)/2+ft*rt-yt*bt,E=(E+ut)/2+yt*rt+ft*bt,ut=b(1,0,(Mt-rt)/y,(tt-bt)/z),ft=(Mt-rt)/y,lt=(tt-bt)/z,Mt=(-Mt-rt)/y,rt=(-tt-bt)/z,tt=b(ft,lt,Mt,rt),Mt=(ft*Mt+lt*rt)/(Math.sqrt(ft*ft+lt*lt)*Math.sqrt(Mt*Mt+rt*rt)),-1>=Mt?tt=Math.PI:1<=Mt&&(tt=0),!ot&&0<tt&&(tt-=2*Math.PI),ot&&0>tt&&(tt+=2*Math.PI),ot=y>z?1:y/z,Mt=y>z?z/y:1,y=Ce.jx(0,0,y>z?y:z,ut,ut+tt,!0),z=Yi.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(ot,Mt),bn.Ha(y,z),Yi.free(z),a.ae=y,a.ae}Sn.Object.defineProperties(Vr.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&&De(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&De(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&De(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&De(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&De(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&De(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&De(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&De(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&De(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Xn(a,">= zero",Vr,"radiusX"),this._isFrozen&&De(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Xn(a,">= zero",Vr,"radiusY"),this._isFrozen&&De(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&De(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&&De(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&&De(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&&De(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&&De(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Vr.prototype.equalsApprox=Vr.prototype.Xa;var ws=new Oe(Vr,"Move",0),vo=new Oe(Vr,"Line",1),Ps=new Oe(Vr,"Bezier",2),Ha=new Oe(Vr,"QuadraticBezier",3),ss=new Oe(Vr,"Arc",4),sl=new Oe(Vr,"SvgArc",4);Vr.className="PathSegment",Vr.Move=ws,Vr.Line=vo,Vr.Bezier=Ps,Vr.QuadraticBezier=Ha,Vr.Arc=ss,Vr.SvgArc=sl;function Ys(){this.H=null,this.xu=new Qt(0,0).freeze(),this.mt=new Qt(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}Ys.prototype.copy=function(){var a=new Ys;return this.clone(a)},Ys.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},Ys.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},Ys.prototype.So=function(a,y){var x=this.diagram;return x===null||Yc(x,a,y),y},Ys.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Yc(x,a,y),y.assign(x.Ps(y))),y},Sn.Object.defineProperties(Ys.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}}}),Ys.prototype.getMultiTouchDocumentPoint=Ys.prototype.Bz,Ys.prototype.getMultiTouchViewPoint=Ys.prototype.So,Ys.className="InputEvent";function Wu(){this.H=null,this.xa="",this.ar=this.Lr=null}Wu.prototype.copy=function(){var a=new Wu;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Wu.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},Sn.Object.defineProperties(Wu.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}}}),Wu.className="DiagramEvent";function Qo(){this.Fm=No,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Qo.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Qo.prototype.copy=function(){var a=new Qo;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=qe(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=qe(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=qe(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=qe(y)&&typeof y.J=="function"?y.J():y,a},Qo.prototype.qb=function(a){a.classType===Qo&&(this.change=a)},Qo.prototype.toString=function(){var a="";return a=this.change===oa?a+"* ":this.change===No?a+(this.model!==null?"!m":"!d"):a+((this.model!==null?"!m":"!d")+this.change),this.propertyName&&typeof this.propertyName=="string"&&(a+=" "+this.propertyName),this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange),a+=": ",this.change===oa?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=mi(this.object)),this.oldValue!==null&&(a+=" old: "+mi(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+mi(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Qo.prototype.I=function(a){return a?this.oldValue:this.newValue},Qo.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Qo.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Qo.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Qo.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Qo.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Sn.Object.defineProperties(Qo.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===oa&&(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}}}),Qo.prototype.redo=Qo.prototype.redo,Qo.prototype.canRedo=Qo.prototype.canRedo,Qo.prototype.undo=Qo.prototype.undo,Qo.prototype.canUndo=Qo.prototype.canUndo,Qo.prototype.getParam=Qo.prototype.Dz,Qo.prototype.getValue=Qo.prototype.I,Qo.prototype.clear=Qo.prototype.clear;var oa=new Oe(Qo,"Transaction",-1),No=new Oe(Qo,"Property",0),as=new Oe(Qo,"Insert",1),gs=new Oe(Qo,"Remove",2);Qo.className="ChangedEvent",Qo.Transaction=oa,Qo.Property=No,Qo.Insert=as,Qo.Remove=gs;function bs(){this.o=new ne().freeze(),this.xa="",this.j=!1}bs.prototype.toString=function(a){var y="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(a!==void 0&&0<a){a=this.changes.count;for(var x=0;x<a;x++){var E=this.changes.M(x);E!==null&&(y+=`
`+E.toString())}}return y},bs.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()},bs.prototype.canUndo=function(){return this.isComplete},bs.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()}},bs.prototype.canRedo=function(){return this.isComplete},bs.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()}},bs.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new be,x=0;x<a.count;x++){var E=a.M(x);if(E!==null&&E.change===No&&E.object){var b=y.get(E.object);b||(b=new be,y.set(E.object,b));var z=b.get(E.propertyName);z===null?b.set(E.propertyName,-1):(0<z&&a.cd(z,null),b.set(E.propertyName,x))}}for(x=y=0;x<a.count;x++)E=a.M(x),E!==null&&(x>y&&a.cd(y,E),y++);for(;a.length>y;)a.pop();a.freeze()}},Sn.Object.defineProperties(bs.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}}}),bs.prototype.optimize=bs.prototype.ak,bs.prototype.redo=bs.prototype.redo,bs.prototype.canRedo=bs.prototype.canRedo,bs.prototype.undo=bs.prototype.undo,bs.prototype.canUndo=bs.prototype.canUndo,bs.prototype.clear=bs.prototype.clear,bs.className="Transaction";function Ko(){this.Pt=new Fe,this.Jd=!1,this.u=new ne().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new ne().freeze(),this.hl=new ne,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Ko.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,E=0;E<x;E++)0<E&&(y+=" "),y+=this.nestedTransactionNames.M(E);if(y+="]",a!==void 0&&0<a)for(x=this.history.count,E=0;E<x;E++)y+=`
`+this.history.M(E).toString(a-1);return y},Ko.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},Ko.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},Tt=Ko.prototype,Tt.Xw=function(a){this.Pt.add(a)},Tt.Rx=function(a){this.Pt.remove(a)},Tt.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},Tt.eb=function(a){return a===void 0&&(a=""),dA(this,!0,a)},Tt.Kf=function(){return dA(this,!1,"")};function dA(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&On("Ending transaction without having started a transaction: "+x);var E=a.transactionLevel===1,b=a.currentTransaction;E&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,b));var z=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var tt=a.Ie.count;0<tt&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(tt-1),a.Ie.freeze()),tt=a.hl.count,0<tt&&(z=a.hl.M(tt-1),a.hl.mb(tt-1))}if(E){if(y)a.rq=!1,b===null&&x!==""&&(b=a.currentTransaction),a.isEnabled&&b!==null&&(b.isComplete||(b.isComplete=!0,b.name=x),a.lx(),y=a.history,y.ka(),E=a.maxHistoryLength,0<=E&&(E===0?y.clear():y.count>=E&&(z=y.M(0),z!==null&&z.clear(),y.mb(0),a.Ce--)),E===0||y.count!==0&&y.get(y.count-1)===b||(y.add(b),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,b);else{a.Fe=!0;try{a.isEnabled&&b!==null&&(b.isComplete=!0,b.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,b),a.Fe=!1}b!==null&&b.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&b!==null){for(a=z,x=b.changes,b=x.count-1;b>=a;b--)y=x.M(b),y!==null&&y.undo(),x.ka(),x.mb(b);x.freeze()}return!1}Tt.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()}},Ko.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Ko.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){On("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Ko.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Ko.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){On("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Ko.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var E=new Qo;for(E.change=oa,E.propertyName=a,E.object=x,E.oldValue=y,a=this.models;a.next();)y=a.value,E.model=y,y.ds(E)},Ko.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new bs);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||On("Change not within a transaction: "+x.toString()))}},Ko.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},Sn.Object.defineProperties(Ko.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}}}),Ko.prototype.handleChanged=Ko.prototype.Tu,Ko.prototype.redo=Ko.prototype.redo,Ko.prototype.undo=Ko.prototype.undo,Ko.prototype.canUndo=Ko.prototype.canUndo,Ko.prototype.discardHistoryAfterIndex=Ko.prototype.lx,Ko.prototype.rollbackTransaction=Ko.prototype.Kf,Ko.prototype.commitTransaction=Ko.prototype.eb,Ko.prototype.startTransaction=Ko.prototype.Ea,Ko.prototype.removeModel=Ko.prototype.Rx,Ko.prototype.addModel=Ko.prototype.Xw,Ko.prototype.clear=Ko.prototype.clear,Ko.className="UndoManager";function zr(){an(this),this.H=Iu,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new Ys,this.Zr=-1}zr.prototype.toString=function(){return this.name!==""?this.name+" Tool":fn(this.constructor)},zr.prototype.updateAdornments=function(){},zr.prototype.canStart=function(){return this.isEnabled},zr.prototype.doStart=function(){},zr.prototype.doActivate=function(){this.isActive=!0},zr.prototype.doDeactivate=function(){this.isActive=!1},zr.prototype.doStop=function(){},zr.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},zr.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},zr.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},zr.prototype.doMouseMove=function(){},zr.prototype.doMouseUp=function(){this.stopTool()},zr.prototype.doMouseWheel=function(){},zr.prototype.canStartMultiTouch=function(){return!0},zr.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Qt.allocAt(NaN,NaN)),E=y.So(1,Qt.allocAt(NaN,NaN));if(x.w()&&E.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var b=E.x-x.x,z=E.y-x.y;a.Jw=Math.sqrt(b*b+z*z),y.bubbles=!1}Qt.free(x),Qt.free(E)},zr.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Qt.allocAt(NaN,NaN)),E=y.So(1,Qt.allocAt(NaN,NaN));if(x.w()&&E.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var b=E.x-x.x,z=E.y-x.y;z=Math.sqrt(b*b+z*z)/a.Jw,b=new Qt((Math.min(E.x,x.x)+Math.max(E.x,x.x))/2,(Math.min(E.y,x.y)+Math.max(E.y,x.y))/2),z*=a.Bw;var tt=a.commandHandler;if(z!==a.scale&&tt.canResetZoom(z)){var rt=a.zoomPoint;a.zoomPoint=b,tt.resetZoom(z),a.zoomPoint=rt}y.bubbles=!1}Qt.free(x),Qt.free(E)},zr.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},zr.prototype.doKeyUp=function(){},zr.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},zr.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},zr.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(er?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||(er?y.meta:y.control)||y.shift||a.clearSelection()}},zr.prototype.standardMouseClick=function(a,y){a===void 0&&(a=null),y===void 0&&(y=function(b){return!b.layer.isTemporary});var x=this.diagram,E=x.lastInput;return a=x.ic(E.documentPoint,a,y),E.targetObject=a,Yu(a,E,x),E.handled};function Yu(a,y,x){if(y.handled=!1,a===null||a.If()){var E=0;y.left?E=y.clickCount===1?1:y.clickCount===2?2:1:y.right&&y.clickCount===1&&(E=3);var b="ObjectSingleClicked";if(a!==null){switch(E){case 1:b="ObjectSingleClicked";break;case 2:b="ObjectDoubleClicked";break;case 3:b="ObjectContextClicked"}E!==0&&x.R(b,a)}else{switch(E){case 1:b="BackgroundSingleClicked";break;case 2:b="BackgroundDoubleClicked";break;case 3:b="BackgroundContextClicked"}E!==0&&x.R(b)}if(a!==null)for(;a!==null;){switch(x=null,E){case 1:x=a.click;break;case 2:x=a.doubleClick?a.doubleClick:a.click;break;case 3:x=a.contextClick}if(x!==null&&(x(y,a),y.handled))break;a=a.panel}else{switch(a=null,E){case 1:a=x.click;break;case 2:a=x.doubleClick?x.doubleClick:x.click;break;case 3:a=x.contextClick}a!==null&&a(y)}}}zr.prototype.standardMouseOver=function(){var a=this.diagram,y=a.lastInput;if(a.animationManager.zb!==!0){var x=a.skipsUndoManager;a.skipsUndoManager=!0;var E=a.viewportBounds.ca(y.documentPoint)?a.ic(y.documentPoint,null,null):null;!y.event||y.event.type!=="pointercancel"&&y.event.type!=="pointerout"||(E=null),y.targetObject=E;var b=!1;if(E!==a.Ck){var z=a.Ck,tt=z;for(a.Ck=E,this.doCurrentObjectChanged(z,E),y.handled=!1;z!==null;){var rt=z.mouseLeave;if(rt!==null&&(E===z||E!==null&&E.rg(z)||(rt(y,z,E),b=!0,y.handled)))break;z=z.panel}for(z=tt,y.handled=!1;E!==null&&(tt=E.mouseEnter,!(tt!==null&&(z===E||z!==null&&z.rg(E)||(tt(y,E,z),b=!0,y.handled))));)E=E.panel;E=a.Ck}if(E!==null){for(z=E,tt="";z!==null&&(tt=z.cursor,tt==="");)z=z.panel;for(a.currentCursor=tt,y.handled=!1,z=E;z!==null&&(E=z.mouseOver,!(E!==null&&(E(y,z),b=!0,y.handled)));)z=z.panel}else this.doUpdateCursor(null),E=a.mouseOver,E!==null&&(E(y),b=!0);b&&a.$b(),a.skipsUndoManager=x}},zr.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},zr.prototype.doCurrentObjectChanged=function(){},zr.prototype.standardMouseWheel=function(){var a=this.diagram,y=a.lastInput,x=y.delta;if(x!==0&&a.documentBounds.w()){var E=a.commandHandler,b=a.toolManager.mouseWheelBehavior;if(E!==null&&(b===TA&&!y.shift||b===eu&&y.control))(0<x?E.canIncreaseZoom():E.canDecreaseZoom())&&(b=a.zoomPoint,a.zoomPoint=y.viewPoint,0<x?E.increaseZoom():E.decreaseZoom(),a.zoomPoint=b),y.bubbles=!1;else if(b===TA&&y.shift||b===eu&&!y.control){E=a.position.copy();var z=y.event;b=z.deltaMode;var tt=z.deltaX;z=z.deltaY;var rt="pixel";if(tt===0&&z===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(rt,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(rt,0<x?"left":"right",Math.abs(x)));else{switch(b){case 0:rt="pixel";break;case 1:rt="line";break;case 2:rt="page"}tt!==0&&a.allowHorizontalScroll&&(tt*=a.scrollHorizontalLineChange/16,a.scroll(rt,0<tt?"right":"left",Math.abs(tt))),z!==0&&a.allowVerticalScroll&&(z*=a.scrollVerticalLineChange/16,a.scroll(rt,0<z?"down":"up",Math.abs(z)))}this.doWheelChange(a,E,y)}}},zr.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},zr.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,E=y.clone(this.yy);this.Zr=pr(function(){x.doWaitAfter(E)},a)},zr.prototype.cancelWaitAfter=function(){this.Zr!==-1&&se.clearTimeout(this.Zr),this.Zr=-1},zr.prototype.doWaitAfter=function(){},zr.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof Jr);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},zr.prototype.isBeyondDragSize=function(a,y){var x=this.diagram;a===void 0&&(a=x.firstInput.viewPoint),y===void 0&&(y=x.lastInput.viewPoint);var E=x.toolManager.dragSize,b=E.width;return E=E.height,x.firstInput.isTouchEvent&&(b+=6,E+=6),Math.abs(y.x-a.x)>b||Math.abs(y.y-a.y)>E},Sn.Object.defineProperties(zr.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof He&&(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}}}),zr.prototype.startTransaction=zr.prototype.Ea,zr.className="Tool";function Co(){zr.call(this),this.name="ToolManager",this.hb=new ne,this.ob=new ne,this.Hb=new ne,this.F=this.V=850,this.o=new on(2,2).ja(),this.Ha=5e3,this.ia=eu,this.u=ch,this.Mp=this.j=null,this.zj=-1}We(Co,zr),Co.prototype.initializeStandardTools=function(){},Co.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Jr&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Co.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===gu&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===pu){y.bubbles=!0;return}if(this.gestureBehavior===gu)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,E=0;E<x;E++){var b=this.mouseDownTools.M(E);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseDown());return}}a.lastInput.button===1&&(this.mouseWheelBehavior===eu?this.mouseWheelBehavior=TA:this.mouseWheelBehavior===TA&&(this.mouseWheelBehavior=eu)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Co.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===pu){y.bubbles=!0;return}if(this.gestureBehavior===gu)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomMove();return}}if(this.isActive)for(var x=this.mouseMoveTools.length,E=0;E<x;E++){var b=this.mouseMoveTools.M(E);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseMove());return}}Oh(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Oh(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}Co.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof Jr&&(y===a||y.rg(a))||this.hideToolTip()},Co.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()))},Co.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)},Co.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 Jr)||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()},Co.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof Jr){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category="ToolTip",a.placeholder!==null&&(a.placeholder.scale=x.scale);var E=a.diagram;E!==null&&E!==x&&E.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionToolTip(a,y)}else a instanceof Mu&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(se.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var b=this;this.zj=pr(function(){b.hideToolTip()},a)}},Co.prototype.positionToolTip=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),E=a.measuredBounds,b=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=E.width),x.x+E.width>b.right&&(x.x-=E.width+5/y.scale),x.x<b.x&&(x.x=b.x),x.y=x.y+20/y.scale+E.height>b.bottom?x.y-(E.height+5/y.scale):x.y+20/y.scale,x.y<b.y&&(x.y=b.y),a.position=x}},Co.prototype.hideToolTip=function(){this.zj!==-1&&(se.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof Jr?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Mu&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Co.prototype.doMouseUp=function(){this.cancelWaitAfter();var a=this.diagram;if(this.isActive)for(var y=this.mouseUpTools.length,x=0;x<y;x++){var E=this.mouseUpTools.M(x);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseUp());return}}a.doFocus(),this.doDeactivate()},Co.prototype.doMouseWheel=function(){this.standardMouseWheel()},Co.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Co.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Co.prototype.findTool=function(a){for(var y=this.mouseDownTools.length,x=0;x<y;x++){var E=this.mouseDownTools.M(x);if(E.name===a)return E}for(y=this.mouseMoveTools.length,x=0;x<y;x++)if(E=this.mouseMoveTools.M(x),E.name===a)return E;for(y=this.mouseUpTools.length,x=0;x<y;x++)if(E=this.mouseUpTools.M(x),E.name===a)return E;return null},Co.prototype.replaceTool=function(a,y){y!==null&&(y.diagram=this.diagram);for(var x=this.mouseDownTools.length,E=0;E<x;E++){var b=this.mouseDownTools.M(E);if(b.name===a)return y!==null?this.mouseDownTools.cd(E,y):this.mouseDownTools.mb(E),b}for(x=this.mouseMoveTools.length,E=0;E<x;E++)if(b=this.mouseMoveTools.M(E),b.name===a)return y!==null?this.mouseMoveTools.cd(E,y):this.mouseMoveTools.mb(E),b;for(x=this.mouseUpTools.length,E=0;E<x;E++)if(b=this.mouseUpTools.M(E),b.name===a)return y!==null?this.mouseUpTools.cd(E,y):this.mouseUpTools.mb(E),b;return null},Co.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)},Sn.Object.defineProperties(Co.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 Jr?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}}}),Co.prototype.replaceStandardTool=Co.prototype.gb;var eu=new Oe(Co,"WheelScroll",0),TA=new Oe(Co,"WheelZoom",1),Hh=new Oe(Co,"WheelNone",2),ch=new Oe(Co,"GestureZoom",3),gu=new Oe(Co,"GestureCancel",4),pu=new Oe(Co,"GestureNone",5);Co.className="ToolManager",Co.WheelScroll=eu,Co.WheelZoom=TA,Co.WheelNone=Hh,Co.GestureZoom=ch,Co.GestureCancel=gu,Co.GestureNone=pu;function Ho(){zr.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 Qt(NaN,NaN),this.Fr=new Qt,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new Fe().freeze(),this.ia=new st,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var Gl;We(Ho,zr),Ho.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly&&!a.allowDragOut||!a.allowMove&&!a.allowCopy&&!a.allowDragOut||!a.allowSelect)return!1;var y=a.lastInput;return!y.left||a.currentTool!==this&&(!this.isBeyondDragSize()||y.isTouchEvent&&y.timestamp-a.firstInput.timestamp<this.Ik)?!1:this.findDraggablePart()!==null},Ho.prototype.findDraggablePart=function(){var a=this.diagram;if(a=a.Ol(a.firstInput.documentPoint,!1),a===null)return null;for(;a!==null&&!a.canSelect();)a=a.containingGroup;return a!==null&&(a.canMove()||a.canCopy())?a:null},Ho.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.Ol(a.firstInput.documentPoint,!1);if(y!==null){for(;y!==null&&!y.canSelect();)y=y.containingGroup;this.currentPart=y,this.currentPart===null||this.currentPart.isSelected||(a.R("ChangingSelection",a.selection),y=a.lastInput,(er?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},Ho.prototype.doActivate=function(){var a=this.diagram;this.Bn=null,this.currentPart===null&&this.standardMouseSelect();var y=this.currentPart;y!==null&&(y.canMove()||y.canCopy())&&(a.Fu(!0),Os=null,this.isActive=!0,this.tl.set(a.position),dh(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&&Ia(a),qc(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,Os=this,NA=this.diagram,this.doSimulatedDragOut()))};function dh(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof Rn?(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 pl,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}Ho.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},Ho.prototype.Pd=function(a){return a===void 0?new eA(ye):this.isGridSnapEnabled?new eA(new Qt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new eA(a.copy())},Ho.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),Pu(this),VA(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<Gl.count){for(var y=Gl,x=y.length,E=0;E<x;E++){var b=y.M(E);Oo(b),xo(b),Pu(b),b.diagram.ug()}y.clear()}Oo(this),this.tl.h(NaN,NaN),NA!==null&&(NA.currentCursor=""),Os=NA=null,xo(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),Yh(a,!0)},Ho.prototype.stopTransaction=function(){var a=this.diagram,y=zr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function Pu(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,Xu(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function fA(){var a=Os;xo(a),sa(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}Ho.prototype.doCancel=function(){xo(this),sa(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},Ho.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},Ho.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function Fu(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var E=x.undoManager;for(E.isEnabled&&E.isInTransaction?E.currentTransaction!==null&&0<E.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):sa(a),x.skipsUndoManager=!y,x.partManager.addsToTemporaryLayer=!y,a.startPoint=x.firstInput.documentPoint,y=a.copiesEffectiveCollection?a.draggedParts.Lf():x.selection,y=x.Kj(y,x,!0),x=new be,E=a.draggedParts.iterator;E.next();){var b=E.key;if(b.Zc()&&b.canCopy()){var z=y.I(b);z!==null&&(z.location=b.location,z.Va(),x.add(z,a.Pd(z.location)))}}for(y=y.iterator;y.next();)E=y.value,E instanceof Rn&&E.canCopy()&&x.add(E,a.Pd());a.copiedParts=x,dh(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Sc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function xo(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 Rn&&(x.value.point=new Qt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function Oo(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 Qs(a,y,x){var E=a.diagram,b=a.startPoint,z=Qt.alloc();z.assign(E.lastInput.documentPoint),a.moveParts(y,z.re(b),x),Qt.free(z),E.Gf("temporaryPixelRatio")===!0&&E.Yh===null&&30<E.$w&&(Ia(E),E.hk())}Ho.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var E=this.diagram;E!==null&&Bh(E,a,y,this.dragOptions,x)};function sa(a){if(a.draggedParts!==null){for(var y=a.diagram,x=a.draggedParts.iterator;x.next();){var E=x.key;E.Zc()&&(E.location=x.value.point)}for(x=a.draggedParts.iterator;x.next();)if(E=x.key,E instanceof Rn&&E.suspendsRouting){var b=x.value.point;a.draggedParts.add(E,a.Pd()),Sc(E,-b.x,-b.y)}y.bd()}}function ya(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),zl(a,!1));var E=a.findDragOverObject(y),b=x.lastInput;b.targetObject=E,a.doUpdateCursor(E);var z=x.skipsUndoManager,tt=!1;try{if(x.skipsUndoManager=!0,tt=Xu(a,b,E),!a.isActive&&Os===null)return;var rt=E!==null?E.part:null;if(rt===null||x.handlesDragDropForTopLevelParts&&rt.isTopLevel&&!(rt instanceof lr)){var ot=x.mouseDragOver;ot!==null&&(ot(b),tt=!0)}if(!a.isActive&&Os===null||(a.doDragOver(y,E),!a.isActive&&Os===null))return}finally{x.skipsUndoManager=z,tt&&x.bd()}a.Bn=E,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(b.viewPoint)}Ho.prototype.findDragOverObject=function(a){var y=this;return qu(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof Jr||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},Ho.prototype.doUpdateCursor=function(a){var y=this.diagram;(a===null||this.Bn!==a)&&(!this.diagram.currentTool.isActive||this.mayCopy()?y.currentCursor=this.copyCursor:this.mayMove()?y.currentCursor=this.moveCursor:this.mayDragOut()&&(y.currentCursor=this.nodropCursor))};function Xu(a,y,x){var E=!1,b=a.Cg.length,z=0<b?a.Cg[0]:null;if(x===z)return!1;y.handled=!1;for(var tt=0;tt<b;tt++){var rt=a.Cg[tt],ot=rt.mouseDragLeave;if(ot!==null&&(ot(y,rt,x),E=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&Os===null||x===null)return E;for(y.handled=!1,b=x;b!==null;)a.Cg.push(b),b=Eu(b);for(b=a.Cg.length,x=0;x<b&&(tt=a.Cg[x],rt=tt.mouseDragEnter,rt===null||(rt(y,tt,z),E=!0,!y.handled));x++);return E}function Eu(a){var y=a.panel;return y!==null?y:a instanceof Ti&&!(a instanceof lr)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function Ju(a,y,x){var E=a.Oe;if(E===null)return null;var b=a.diagram.og(y,E.portGravity,function(lt){return E.findValidLinkablePort(lt,x)});a=Qt.alloc();var z=1/0,tt=null;for(b=b.iterator;b.next();){var rt=b.value;if(rt.part!==null){var ot=rt.ga(rr,a);ot=y.Bf(ot),ot<z&&(tt=rt,z=ot)}}return Qt.free(a),tt}function zl(a,y){var x=a.draggedLink;if(x!==null&&!(2>x.pointsCount)){var E=a.diagram;if(!E.isReadOnly){var b=a.Oe;if(b!==null){var z=null,tt=null;x.fromNode===null&&(z=Ju(a,x.i(0),!1),z!==null&&(tt=z.part));var rt=null,ot=null;x.toNode===null&&(rt=Ju(a,x.i(x.pointsCount-1),!0),rt!==null&&(ot=rt.part)),b.isValidLink(tt,z,ot,rt)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=tt,z!==null&&(x.fromPortId=z.portId),x.toNode=ot,rt!==null&&(x.toPortId=rt.portId),x.fromPort!==E.Mx&&E.R("LinkRelinked",x,E.Mx),x.toPort!==E.Nx&&E.R("LinkRelinked",x,E.Nx)):Fd(b,tt,z,ot,rt):Fd(b,null,null,null,null)}}}}Ho.prototype.doDragOver=function(){};function mu(a,y){var x=a.diagram;a.dragsLink&&zl(a,!0),Pu(a);var E=a.findDragOverObject(y),b=x.lastInput;if(b.targetObject=E,E!==null){b.handled=!1;for(var z=E;z!==null;){var tt=z.mouseDrop;if(tt!==null&&(tt(b,z),b.handled))break;qg(a,b,z),z=Eu(z)}}else z=x.mouseDrop,z!==null&&z(b);if(a.isActive||Os!==null){for(b=(a.copiedParts||a.draggedParts).iterator;b.next();)z=b.key,z instanceof ri&&z.linksConnected.each(function(rt){rt.suspendsRouting=!1});if(a.doDropOnto(y,E),a.isActive||Os!==null){for(a=Ue.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof ri&&$g(x,E,a);Ue.free(a)}}}function qg(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof lr||(x=a.mouseDrop,x!==null&&x(y))}function $g(a,y,x){var E=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(E=!0),a=a.Nu(x,function(b){return b.part},function(b){return b instanceof Rn},!0,function(b){return b instanceof Rn},E),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}Ho.prototype.doDropOnto=function(){},Ho.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,y=a.lastInput;this.simulatedMouseMove(y.event,y.documentPoint,y.targetDiagram)||this.currentPart===null||this.draggedParts===null||(this.mayCopy()?(Fu(this,!1),qc(a,this.copiedParts),Qs(this,this.copiedParts,!1),VA(a,this.copiedParts)):this.mayMove()?(xo(this),Qs(this,this.draggedParts,!0)):this.mayDragOut()?(Fu(this,!1),Qs(this,this.copiedParts,!1)):xo(this),ya(this,a.lastInput.documentPoint))}},Ho.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=a.lastInput;if(!this.simulatedMouseUp(y.event,y.documentPoint,y.targetDiagram)){y=!1;var x=this.mayCopy();if(x&&this.copiedParts!==null?(xo(this),Fu(this,!0),qc(a,this.copiedParts),Qs(this,this.copiedParts,!1),VA(a,this.copiedParts),this.copiedParts!==null&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0}))):(y=!0,xo(this),this.mayMove()&&(Qs(this,this.draggedParts,!0),ya(this,a.lastInput.documentPoint))),this.Ym=!0,mu(this,a.lastInput.documentPoint),this.isActive){var E=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&tp(this),a.Ya(),VA(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",E)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},Ho.prototype.simulatedMouseMove=function(a,y,x){if(Os===null)return!1;var E=Os.diagram;x instanceof He||(x=null);var b=NA;return x!==b&&(b!==null&&b!==E&&(b.ug(),Os.isDragOutStarted=!1,b=b.toolManager.findTool("Dragging"),b!==null&&b.doSimulatedDragLeave()),NA=x,x!==null&&x!==E&&(fA(),b=x.toolManager.findTool("Dragging"),b!==null&&(Gl.contains(b)||Gl.add(b),b.doSimulatedDragEnter())),this.doUpdateCursor(null)),x===null||x===E||!x.allowDrop||x.isReadOnly||!x.allowInsert?!1:(E=x.toolManager.findTool("Dragging"),E!==null&&(a!==null&&(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)),x.lastInput.documentPoint=y,x.lastInput.viewPoint=x.op(y),x.lastInput.down=!1,x.lastInput.up=!1,E.doSimulatedDragOver()),!0)},Ho.prototype.simulatedMouseUp=function(a,y,x){if(Os===null)return!1;var E=NA,b=Os.diagram;if(x===null)return Os.doCancel(),!0;if(x!==E){var z=E.toolManager.findTool("Dragging");if(E!==null&&E!==b&&z!==null)return E.ug(),Os.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;NA=x,E=x.toolManager.findTool("Dragging"),E!==null&&(fA(),Gl.contains(E)||Gl.add(E),E.doSimulatedDragEnter())}return x!==this.diagram?(a!==null?(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)):y===null&&(y=new Qt),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=Os,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function tp(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof ri&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}Ho.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(er?!a.lastInput.alt:!a.lastInput.control))return!1;for(a=a.selection.iterator;a.next();)if(a.value.canCopy())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canCopy())},Ho.prototype.mayDragOut=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(!a.allowDragOut||!a.allowCopy||a.allowMove)return!1;for(a=a.selection.iterator;a.next();)if(a.value.canCopy())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canCopy())},Ho.prototype.mayMove=function(){var a=this.diagram;if(a.isReadOnly||!a.allowMove)return!1;for(a=a.selection.iterator;a.next();)if(a.value.canMove())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canMove())},Ho.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},Ho.prototype.Az=function(){return Os},Ho.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=Os;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},Ho.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Ra(a),a.animationManager.Cc(),a=Os,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},Ho.prototype.doSimulatedDragLeave=function(){var a=Os;a!==null&&a.doSimulatedDragOut(),this.doCancel()},Ho.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=Os;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;sg(this,y.draggedParts.Lf(),!1,a.firstInput),Qs(this,this.copiedParts,!1),ya(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},Ho.prototype.doSimulatedDrop=function(){var a=this.diagram,y=Os;if(y!==null){var x=y.diagram;if(y.Ym=!0,xo(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),sg(this,y.draggedParts.Lf(),!0,a.lastInput),Qs(this,this.copiedParts,!1);var E=new Fe;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0,E.add(b)})),mu(this,a.lastInput.documentPoint),a.Ya(),this.copiedParts!==null&&(this.transactionResult="ExternalCopy"),this.copiedParts=null,a.doFocus(),a.R("ExternalObjectsDropped",E,x),this.stopTransaction(),a.R("ChangedSelection",a.selection)}a.animationManager.Dm=!1};function sg(a,y,x,E){if(a.copiedParts===null){var b=a.diagram;if(!b.isReadOnly&&!b.isModelReadOnly){b.skipsUndoManager=!x,b.partManager.addsToTemporaryLayer=!x,a.startPoint=E.documentPoint,x=b.Kj(y,b,!0);var z=Ue.alloc();b=E=1/0;for(var tt=-1/0,rt=-1/0,ot=y.iterator;ot.next();){var lt=ot.value;if(lt.isVisible()){var ut=lt.location;lt=ut.x,ut=ut.y,isNaN(lt)||isNaN(ut)||(lt<E&&(E=lt),ut<b&&(b=ut),lt>tt&&(tt=lt),ut>rt&&(rt=ut))}}for(E===1/0?z.h(0,0,0,0):z.h(E,b,tt-E,rt-b),E=z.x+z.width/2,b=z.y+z.height/2,Ue.free(z),z=a.Fr,tt=new be,rt=Qt.alloc(),ot=y.iterator;ot.next();)lt=ot.value,lt instanceof Rn&&lt.canCopy()&&(ut=x.I(lt),ut!==null&&(ut.points=lt.points,Sc(ut,z.x-E,z.y-b),ut.suspendsRouting=!0,tt.add(ut,a.Pd())));for(y=y.iterator;y.next();)lt=y.value,lt.Zc()&&lt.canCopy()&&(ot=x.I(lt),ot!==null&&(lt=lt.location,rt.h(z.x-(E-lt.x),z.y-(b-lt.y)),ot.location=rt,ot.Va(),tt.add(ot,a.Pd(rt))));Qt.free(rt),a.copiedParts=tt,dh(a,tt.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Sc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}Ho.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},Ho.prototype.computeMove=function(a,y,x,E){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,E):new Qt},Sn.Object.defineProperties(Ho.prototype,{isCopyEnabled:{get:function(){return this.ob},set:function(a){this.ob=a}},copiesEffectiveCollection:{get:function(){return this.u},set:function(a){this.u=a}},dragOptions:{get:function(){return this.ia},set:function(a){this.ia=a}},isGridSnapEnabled:{get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){this.dragOptions.isGridSnapEnabled=a}},isComplexRoutingRealtime:{get:function(){return this.hb},set:function(a){this.hb=a}},isGridSnapRealtime:{get:function(){return this.dragOptions.isGridSnapRealtime},set:function(a){this.dragOptions.isGridSnapRealtime=a}},gridSnapCellSize:{get:function(){return this.dragOptions.gridSnapCellSize},set:function(a){this.dragOptions.gridSnapCellSize.D(a)||(a=a.J(),this.dragOptions.gridSnapCellSize=a)}},gridSnapCellSpot:{get:function(){return this.dragOptions.gridSnapCellSpot},set:function(a){this.dragOptions.gridSnapCellSpot.D(a)||(a=a.J(),this.dragOptions.gridSnapCellSpot=a)}},gridSnapOrigin:{get:function(){return this.dragOptions.gridSnapOrigin},set:function(a){this.dragOptions.gridSnapOrigin.D(a)||(a=a.J(),this.dragOptions.gridSnapOrigin=a)}},dragsLink:{get:function(){return this.dragOptions.dragsLink},set:function(a){this.dragOptions.dragsLink=a}},dragsTree:{get:function(){return this.dragOptions.dragsTree},set:function(a){this.dragOptions.dragsTree=a}},copyCursor:{get:function(){return this.F},set:function(a){this.F=a}},moveCursor:{get:function(){return this.Oc},set:function(a){this.Oc=a}},nodropCursor:{get:function(){return this.Pc},set:function(a){this.Pc=a}},currentPart:{get:function(){return this.V},set:function(a){this.V=a}},copiedParts:{get:function(){return this.o},set:function(a){this.o=a}},draggedParts:{get:function(){return this.Ha},set:function(a){this.Ha=a}},draggingParts:{get:function(){return this.copiedParts!==null?this.copiedParts.Lf():this.draggedParts!==null?this.draggedParts.Lf():this.te}},draggedLink:{get:function(){return this.diagram.draggedLink},set:function(a){this.diagram.draggedLink=a}},isDragOutStarted:{get:function(){return this.Hb},set:function(a){this.Hb=a}},startPoint:{get:function(){return this.Fr},set:function(a){this.Fr.D(a)||this.Fr.assign(a)}},delay:{get:function(){return this.Ik},set:function(a){this.Ik=a}}}),Ho.prototype.getDraggingSource=Ho.prototype.Az;var Os=null,NA=null;Ho.className="DraggingTool",Gl=new ne,Pn("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Co.prototype.doCancel=function(){Os!==null&&Os.doCancel(),zr.prototype.doCancel.call(this)};function ls(){zr.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Rn,y=new vr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new vr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new ri,y=new vr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Ii,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new ri,y=new vr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Ii,a.add(y),a.selectable=!1,a.layerName="Tool",this.Di=a,this.o=y,this.Pc=this.Oc=this.ob=this.hb=this.Hb=null,this.ia=!0,this.hy=new be,this.Of=this.gj=this.Pf=null}We(ls,zr),ls.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},ls.prototype.copyPortProperties=function(a,y,x,E,b){if(a!==null&&y!==null&&x!==null&&E!==null){var z=y.Df(),tt=on.alloc();tt.width=y.naturalBounds.width*z,tt.height=y.naturalBounds.height*z,E.desiredSize=tt,on.free(tt),b?(E.toSpot=y.toSpot,E.toEndSegmentLength=y.toEndSegmentLength):(E.fromSpot=y.fromSpot,E.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=rr,z=Qt.alloc(),x.location=y.ga(rr,z),Qt.free(z),E.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,E,b)}},ls.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=Ii,y.fromSpot=Ar,y.toSpot=Ar),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},ls.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},ls.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof ri){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)}},ls.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof ri))return null;for(;a!==null;){var E=y?a.toLinkable:a.fromLinkable;if(E===!0&&(a.portId!==null||a instanceof ri)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(E===!1)break;a=a.panel}return null},ls.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,E=this.portGravity;0>=E&&(E=.1);var b=this,z=y.og(x,E,function(ft){return b.findValidLinkablePort(ft,a)},null,!0);for(E=1/0,y=null,z=z.iterator;z.next();){var tt=z.value,rt=tt.part;if(rt instanceof ri){var ot=tt.ga(rr,Qt.alloc()),lt=x.x-ot.x,ut=x.y-ot.y;Qt.free(ot),ot=lt*lt+ut*ut,ot<E&&(lt=this.validPortsCache.I(tt),lt!==null?lt&&(y=tt,E=ot):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,rt,tt)||!a&&this.isValidLink(rt,tt,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(tt,!0),y=tt,E=ot):this.validPortsCache.add(tt,!1))}}return y!==null&&(x=y.part,x instanceof ri&&(x.layer===null||x.layer.allowLink))?y:null},ls.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},ls.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},ls.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},ls.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof ri))return!1;a=a.portId,a===null&&(a="");var E=y.part;if(!(E instanceof ri))return!1;for(y=y.portId,y===null&&(y=""),y=E.Sd(y);y.next();)if(E=y.value,E.fromNode===x&&E.fromPortId===a)return!0;return!1},ls.prototype.isValidLink=function(a,y,x,E){if(!this.isValidFrom(a,y)||!this.isValidTo(x,E)||!(y===null||E===null||(y.fromLinkableSelfNode&&E.toLinkableSelfNode||!this.isInSameNode(y,E))&&(y.fromLinkableDuplicates&&E.toLinkableDuplicates||!this.isLinked(y,E)))||this.originalLink!==null&&(a!==null&&this.isLabelDependentOnLink(a,this.originalLink)||x!==null&&this.isLabelDependentOnLink(x,this.originalLink))||a!==null&&x!==null&&(a.data===null&&x.data!==null||a.data!==null&&x.data===null)||!this.isValidCycle(a,x,this.originalLink))return!1;if(a!==null){var b=a.linkValidation;if(b!==null&&!b(a,y,x,E,this.originalLink))return!1}return x!==null&&(b=x.linkValidation,b!==null&&!b(a,y,x,E,this.originalLink))?!1:(b=this.linkValidation,b!==null?b(a,y,x,E,this.originalLink):!0)},ls.prototype.isLabelDependentOnLink=function(a,y){if(a===null)return!1;var x=a.labeledLink;if(x===null)return!1;if(x===y)return!0;var E=new Fe;return E.add(a),wa(this,x,y,E)};function wa(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),wa(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),wa(a,y.labeledLink,x,E))))}ls.prototype.isValidCycle=function(a,y,x){if(x===void 0&&(x=null),a===null||y===null)return this.isUnconnectedLinkValid;var E=this.diagram.validCycle;if(E!==id){if(E===jd){if(E=x||this.temporaryLink,E!==null&&!E.isTreeLink)return!0;for(E=y.linksConnected;E.next();){var b=E.value;if(b!==x&&b.isTreeLink&&b.toNode===y)return!1}return!ba(this,a,y,x,!0)}if(E===Nf){if(E=x||this.temporaryLink,E!==null&&!E.isTreeLink)return!0;for(E=a.linksConnected;E.next();)if(b=E.value,b!==x&&b.isTreeLink&&b.fromNode===a)return!1;return!ba(this,a,y,x,!0)}if(E===sc)return a===y?a=!0:(E=new Fe,E.add(y),a=Ta(this,E,a,y,x)),!a;if(E===ac)return!ba(this,a,y,x,!1);if(E===zd)return a===y?a=!0:(E=new Fe,E.add(y),a=DA(this,E,a,y,x)),!a}return!0};function ba(a,y,x,E,b){if(y===x)return!0;if(y===null||x===null)return!1;for(var z=y.linksConnected;z.next();){var tt=z.value;if(tt!==E&&(!b||tt.isTreeLink)&&tt.toNode===y&&(tt=tt.fromNode,tt!==y&&ba(a,tt,x,E,b)))return!0}return!1}function Ta(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==b&&tt.toNode===x&&(tt=tt.fromNode,tt!==x&&Ta(a,y,tt,E,b)))return!0}return!1}function DA(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==b){var rt=tt.fromNode;if(tt=tt.toNode,rt=rt===x?tt:rt,rt!==x&&DA(a,y,rt,E,b))return!0}}return!1}Sn.Object.defineProperties(ls.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}}}),ls.className="LinkingBaseTool";function da(){ls.call(this),this.name="Linking",this.V={},this.F=null,this.K=fh,this.Xd=null}We(da,ls),da.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},da.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 ri)))return null;var x=this.direction;if(x===fh||x===ag){var E=this.findValidLinkablePort(y,!1);if(E!==null||this.startObject===a&&(E=a.port,this.findValidLinkablePort(E,!1)))return this.isForwards=!0,E}return(x===fh||x===lg)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},da.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 ri&&(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 ri&&(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)},da.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()},da.prototype.doStop=function(){ls.prototype.doStop.call(this),this.startObject=null},da.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,E=null,b=null,z=null;try{var tt=this.targetPort=this.findTargetPort(this.isForwards);if(tt!==null){var rt=tt.part;rt instanceof ri&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),E=rt,b=tt):(y=rt,x=tt,this.originalToNode!==null&&(E=this.originalToNode,b=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(E=this.originalToNode,b=this.originalToPort);y!==null||E!==null?(z=this.insertLink(y,x,E,b),z!==null?(tt===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),z.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",z)):this.doNoLink(y,x,E,b)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),z&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},da.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Rn)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)},da.prototype.insertLink=function(a,y,x,E){return this.diagram.partManager.insertLink(a,y,x,E)},da.prototype.doNoLink=function(){},Sn.Object.defineProperties(da.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 fh=new Oe(da,"Either",0),ag=new Oe(da,"ForwardsOnly",0),lg=new Oe(da,"BackwardsOnly",0);da.className="LinkingTool",da.Either=fh,da.ForwardsOnly=ag,da.BackwardsOnly=lg;function pl(){ls.call(this),this.name="Relinking";var a=new vr;a.figure="Diamond",a.desiredSize=Ni,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new vr,a.figure="Diamond",a.desiredSize=Ni,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new Ue}We(pl,ls),pl.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Rn){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var E=a.selectionObject;E!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(E,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(E=a.selectionObject,E!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(E,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},pl.prototype.makeAdornment=function(a,y){var x=new Jr;return x.type=Bn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},pl.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},pl.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 Jr&&x.adornedPart instanceof Rn))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=Ei),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=Ei),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},pl.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===Lg||x===Bc)&&(x=Ja),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}},pl.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()},pl.prototype.doStop=function(){ls.prototype.doStop.call(this),this.handle=null},pl.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;this.transactionResult=null;var y=this.originalFromNode,x=this.originalFromPort,E=this.originalToNode,b=this.originalToPort,z=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var tt=this.targetPort.part;tt instanceof ri&&(this.isForwards?(E=tt,b=this.targetPort):(y=tt,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?b=E=null:x=y=null:z=null;z!==null?(this.reconnectLink(z,this.isForwards?E:y,this.isForwards?b:x,this.isForwards),this.targetPort===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint,z.bb()),this.transactionResult=this.name,a.R("LinkRelinked",z,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},pl.prototype.reconnectLink=function(a,y,x,E){return x=x!==null&&x.portId!==null?x.portId:"",E?(a.toNode=y,a.toPortId=x):(a.fromNode=y,a.fromPortId=x),!0},pl.prototype.doNoRelink=function(){};function Fd(a,y,x,E,b){y!==null?(a.copyPortProperties(y,x,a.temporaryFromNode,a.temporaryFromPort,!1),a.diagram.add(a.temporaryFromNode)):a.diagram.remove(a.temporaryFromNode),E!==null?(a.copyPortProperties(E,b,a.temporaryToNode,a.temporaryToPort,!0),a.diagram.add(a.temporaryToNode)):a.diagram.remove(a.temporaryToNode)}Sn.Object.defineProperties(pl.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 Jr))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),pl.className="RelinkingTool",Pn("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),Pn("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function ps(){zr.call(this),this.name="LinkReshaping";var a=new vr;a.figure="Rectangle",a.desiredSize=nr,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new vr,a.figure="Diamond",a.desiredSize=Ni,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new Qt,this.Yq=new ne}We(ps,zr),ps.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:cf},ps.prototype.om=function(a,y){a.reshapingBehavior=y},ps.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Rn){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)}},ps.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,E=y.isOrthogonal,b=null;if(y.points!==null&&1<x){b=new Jr,b.type=Bn.Link,x=y.firstPickIndex;var z=y.lastPickIndex,tt=E?1:0;if(y.resegmentable&&y.computeCurve()!==ql)for(var rt=x+tt;rt<z-tt;rt++){var ot=this.makeResegmentHandle(a,rt);ot!==null&&(ot.segmentIndex=rt,ot.segmentFraction=.5,ot.fromMaxLinks=999,b.add(ot))}for(tt=x+1;tt<z;tt++)if(rt=this.makeHandle(a,tt),rt!==null){if(rt.segmentIndex=tt,tt!==x)if(tt===x+1&&E){ot=y.i(x);var lt=y.i(x+1);Ce.B(ot.x,lt.x)&&Ce.B(ot.y,lt.y)&&(lt=y.i(x-1)),Ce.B(ot.x,lt.x)?(this.om(rt,UA),rt.cursor="n-resize"):Ce.B(ot.y,lt.y)&&(this.om(rt,IA),rt.cursor="w-resize")}else tt===z-1&&E?(ot=y.i(z-1),lt=y.i(z),Ce.B(ot.x,lt.x)&&Ce.B(ot.y,lt.y)&&(ot=y.i(z+1)),Ce.B(ot.x,lt.x)?(this.om(rt,UA),rt.cursor="n-resize"):Ce.B(ot.y,lt.y)&&(this.om(rt,IA),rt.cursor="w-resize")):tt!==z&&(this.om(rt,Ed),rt.cursor="move");b.add(rt)}b.adornedObject=a}return b},ps.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},ps.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},ps.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},ps.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 Rn){if(this.Ts=y,a.isMouseCaptured=!0,this.Ea(this.name),y.resegmentable&&this.handle.fromMaxLinks===999){var x=y.points.copy(),E=this.getResegmentingPoint();if(x.Gb(this.handle.segmentIndex+1,E),y.isOrthogonal&&x.Gb(this.handle.segmentIndex+1,E),y.points=x,y.Wb(),y.updateAdornments(),this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name),this.handle===null){this.doDeactivate();return}}this.Fw=y.i(this.handle.segmentIndex),this.Yq=y.points.copy(),this.isActive=!0}}},ps.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},ps.prototype.stopTransaction=function(){var a=this.diagram,y=zr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ps.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},ps.prototype.getResegmentingPoint=function(){return this.handle.ga(rr)},ps.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},ps.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.computeReshape(a.lastInput.documentPoint);if(this.reshape(y),y=this.adornedLink,y!==null&&y.resegmentable){var x=this.handle.segmentIndex,E=y.i(x-1),b=y.i(x),z=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var tt=y.i(x-2);if(Math.abs(E.x-b.x)<this.resegmentingDistance&&Math.abs(E.y-b.y)<this.resegmentingDistance&&(Lu(this,tt,E,b,z,!0)||Lu(this,tt,E,b,z,!1))){var rt=y.points.copy();Lu(this,tt,E,b,z,!0)?(rt.cd(x-2,new Qt(tt.x,(z.y+tt.y)/2)),rt.cd(x+1,new Qt(z.x,(z.y+tt.y)/2))):(rt.cd(x-2,new Qt((z.x+tt.x)/2,tt.y)),rt.cd(x+1,new Qt((z.x+tt.x)/2,z.y))),rt.mb(x),rt.mb(x-1),y.points=rt,y.Wb()}else tt=y.i(x+2),Math.abs(b.x-z.x)<this.resegmentingDistance&&Math.abs(b.y-z.y)<this.resegmentingDistance&&(Lu(this,E,b,z,tt,!0)||Lu(this,E,b,z,tt,!1))&&(rt=y.points.copy(),Lu(this,E,b,z,tt,!0)?(rt.cd(x-1,new Qt(E.x,(E.y+tt.y)/2)),rt.cd(x+2,new Qt(tt.x,(E.y+tt.y)/2))):(rt.cd(x-1,new Qt((E.x+tt.x)/2,E.y)),rt.cd(x+2,new Qt((E.x+tt.x)/2,tt.y))),rt.mb(x+1),rt.mb(x),y.points=rt,y.Wb())}}else tt=Qt.alloc(),Ce.qh(E.x,E.y,z.x,z.y,b.x,b.y,tt)&&tt.Bf(b)<this.resegmentingDistance*this.resegmentingDistance&&(E=y.points.copy(),E.mb(x),y.points=E,y.Wb()),Qt.free(tt)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function Lu(a,y,x,E,b,z){return z?Math.abs(y.y-x.y)<a.resegmentingDistance&&Math.abs(x.y-E.y)<a.resegmentingDistance&&Math.abs(E.y-b.y)<a.resegmentingDistance:Math.abs(y.x-x.x)<a.resegmentingDistance&&Math.abs(x.x-E.x)<a.resegmentingDistance&&Math.abs(E.x-b.x)<a.resegmentingDistance}ps.prototype.reshape=function(a){var y=this.adornedLink;y.uh();var x=this.handle.segmentIndex,E=this.Ru(this.handle);if(y.isOrthogonal)if(x===y.firstPickIndex+1)x=y.firstPickIndex+1,E===UA?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):E===IA&&(y.L(x,a.x,y.i(x-1).y),y.L(x+1,a.x,y.i(x+2).y));else if(x===y.lastPickIndex-1)x=y.lastPickIndex-1,E===UA?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):E===IA&&(y.L(x-1,a.x,y.i(x-2).y),y.L(x,a.x,y.i(x+1).y));else{E=x;var b=y.i(E),z=y.i(E-1),tt=y.i(E+1);Ce.B(z.x,b.x)&&Ce.B(b.y,tt.y)?(Ce.B(z.x,y.i(E-2).x)&&!Ce.B(z.y,y.i(E-2).y)?(y.m(E,a.x,z.y),x++,E++):y.L(E-1,a.x,z.y),Ce.B(tt.y,y.i(E+2).y)&&!Ce.B(tt.x,y.i(E+2).x)?y.m(E+1,tt.x,a.y):y.L(E+1,tt.x,a.y)):Ce.B(z.y,b.y)&&Ce.B(b.x,tt.x)?(Ce.B(z.y,y.i(E-2).y)&&!Ce.B(z.x,y.i(E-2).x)?(y.m(E,z.x,a.y),x++,E++):y.L(E-1,z.x,a.y),Ce.B(tt.x,y.i(E+2).x)&&!Ce.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):Ce.B(z.x,b.x)&&Ce.B(b.x,tt.x)?(Ce.B(z.x,y.i(E-2).x)&&!Ce.B(z.y,y.i(E-2).y)?(y.m(E,a.x,z.y),x++,E++):y.L(E-1,a.x,z.y),Ce.B(tt.x,y.i(E+2).x)&&!Ce.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):Ce.B(z.y,b.y)&&Ce.B(b.y,tt.y)&&(Ce.B(z.y,y.i(E-2).y)&&!Ce.B(z.x,y.i(E-2).x)?(y.m(E,z.x,a.y),x++,E++):y.L(E-1,z.x,a.y),Ce.B(tt.y,y.i(E+2).y)&&!Ce.B(tt.x,y.i(E+2).x)?y.m(E+1,tt.x,a.y):y.L(E+1,tt.x,a.y)),y.L(x,a.x,a.y)}else y.L(x,a.x,a.y),E=y.fromNode,b=y.fromPort,E!==null&&(z=E.findVisibleNode(),z!==null&&z!==E&&(E=z,b=E.port)),x===1&&y.computeSpot(!0,b).Mc()&&(z=b.ga(rr,Qt.alloc()),E=y.getLinkPointFromPoint(E,b,z,a,!0,Qt.alloc()),y.L(0,E.x,E.y),Qt.free(z),Qt.free(E)),E=y.toNode,b=y.toPort,E!==null&&(z=E.findVisibleNode(),z!==null&&z!==E&&(E=z,b=E.port)),x===y.pointsCount-2&&y.computeSpot(!1,b).Mc()&&(x=b.ga(rr,Qt.alloc()),a=y.getLinkPointFromPoint(E,b,x,a,!1,Qt.alloc()),y.L(y.pointsCount-1,a.x,a.y),Qt.free(x),Qt.free(a));y.zf()},ps.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case Ed:return a;case UA:return new Qt(y.i(x).x,a.y);case IA:return new Qt(a.x,y.i(x).y);default:case cf:return y.i(x)}},Sn.Object.defineProperties(ps.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 Jr))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}}}),ps.prototype.setReshapingBehavior=ps.prototype.om,ps.prototype.getReshapingBehavior=ps.prototype.Ru;var cf=new Oe(ps,"None",0),IA=new Oe(ps,"Horizontal",1),UA=new Oe(ps,"Vertical",2),Ed=new Oe(ps,"All",3);ps.className="LinkReshapingTool",ps.None=cf,ps.Horizontal=IA,ps.Vertical=UA,ps.All=Ed,Pn("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function fa(){zr.call(this),this.name="Resizing",this.o=new on(1,1).freeze(),this.j=new on(9999,9999).freeze(),this.yg=new on(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new vr;a.alignmentFocus=rr,a.figure="Rectangle",a.desiredSize=nr,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new Qt,this.Dw=new on,this.Tn=new Qt,this.rt=new on(0,0),this.qt=new on(1/0,1/0),this.pt=new on(1,1)}We(fa,zr),fa.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Rn)){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(),od(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},fa.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Jr,y.type=Bn.Spot,y.locationSpot=rr;var x=new Xa;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,br)),y.add(this.makeHandle(a,io)),y.add(this.makeHandle(a,gr)),y.add(this.makeHandle(a,Qi)),y.add(this.makeHandle(a,Bs)),y.add(this.makeHandle(a,As)),y.add(this.makeHandle(a,Us)),y.add(this.makeHandle(a,Yo))}else if(yu(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},fa.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},fa.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=rr),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 Bn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},fa.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},fa.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))},fa.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},fa.prototype.stopTransaction=function(){var a=this.diagram,y=zr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},fa.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},fa.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,Qt.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),Qt.free(b)}},fa.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,Qt.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),Qt.free(b),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},fa.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 lr){var E=new ne;if(E.add(a),!this.dragsMembers&&a.placeholder===null){var b=new st;b.dragsMembers=!1}y.moveParts(E,this.oppositePoint.copy().re(x),!0,b)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},fa.prototype.computeResize=function(a,y,x,E,b,z){y.Mc()&&(y=rr);var tt=this.adornedObject.naturalBounds,rt=tt.x,ot=tt.y,lt=tt.x+tt.width,ut=tt.y+tt.height,ft=1;if(!z){ft=tt.width;var yt=tt.height;0>=ft&&(ft=1),0>=yt&&(yt=1),ft=yt/ft}return yt=Qt.alloc(),Ce.No(a.x,a.y,rt,ot,b.width,b.height,yt),a=tt.copy(),0>=y.x?0>=y.y?(a.x=Math.max(yt.x,lt-E.width),a.x=Math.min(a.x,lt-x.width),a.width=Math.max(lt-a.x,x.width),a.y=Math.max(yt.y,ut-E.height),a.y=Math.min(a.y,ut-x.height),a.height=Math.max(ut-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.x=lt-a.width,a.y=ut-a.height)):1<=y.y?(a.x=Math.max(yt.x,lt-E.width),a.x=Math.min(a.x,lt-x.width),a.width=Math.max(lt-a.x,x.width),a.height=Math.max(Math.min(yt.y-ot,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.x=lt-a.width)):(a.x=Math.max(yt.x,lt-E.width),a.x=Math.min(a.x,lt-x.width),a.width=lt-a.x,z||(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft,a.y=ot+.5*(ut-ot-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(yt.x-rt,E.width),x.width),a.y=Math.max(yt.y,ut-E.height),a.y=Math.min(a.y,ut-x.height),a.height=Math.max(ut-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.y=ut-a.height)):1<=y.y?(a.width=Math.max(Math.min(yt.x-rt,E.width),x.width),a.height=Math.max(Math.min(yt.y-ot,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width))):(a.width=Math.max(Math.min(yt.x-rt,E.width),x.width),z||(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft,a.y=ot+.5*(ut-ot-a.height))):0>=y.y?(a.y=Math.max(yt.y,ut-E.height),a.y=Math.min(a.y,ut-x.height),a.height=ut-a.y,z||(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width,a.x=rt+.5*(lt-rt-a.width))):1<=y.y&&(a.height=Math.max(Math.min(yt.y-ot,E.height),x.height),z||(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width,a.x=rt+.5*(lt-rt-a.width))),Qt.free(yt),a},fa.prototype.computeReshape=function(){var a=xn;return this.adornedObject instanceof vr&&(a=_m(this.adornedObject)),!(a===vi||this.diagram.lastInput.shift)},fa.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},fa.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},fa.prototype.computeCellSize=function(){var a=new on(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},Sn.Object.defineProperties(fa.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 Jr))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 Jr)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}}}),fa.className="ResizingTool",Pn("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Na(){zr.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Qt,this.ue=null;var a=new vr;a.figure="Ellipse",a.desiredSize=Ni,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new Qt(NaN,NaN),this.u=0,this.F=50}We(Na,zr),Na.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)}},Na.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new Jr,y.type=Bn.Position,y.locationSpot=rr;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(yu(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Na.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},Na.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)},Na.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(rr)},Na.prototype.computeAdornmentLocation=function(a){var y=this.rotationPoint;y.w()||(y=this.computeRotationPoint(a)),y=a.qs(y);var x=this.handleAngle;0>x?x+=360:360<=x&&(x-=360),x=Math.round(45*Math.round(x/45));var E=this.handleDistance;return x===0?y.x=a.naturalBounds.width+E:x===45?(y.x=a.naturalBounds.width+E,y.y=a.naturalBounds.height+E):x===90?y.y=a.naturalBounds.height+E:x===135?(y.x=-E,y.y=a.naturalBounds.height+E):x===180?y.x=-E:x===225?(y.x=-E,y.y=-E):x===270?y.y=-E:x===315&&(y.x=a.naturalBounds.width+E,y.y=-E),a.ga(y)},Na.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Qt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Na.prototype.stopTransaction=function(){var a=this.diagram,y=zr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Na.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Na.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Na.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()},Na.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,E=y.rotateObject;(x===E||x.rg(E))&&(x=this.Tn.copy(),y.location=x.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},Na.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},Sn.Object.defineProperties(Na.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 Jr))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 Jr)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}}}),Na.className="RotatingTool",Pn("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function gh(){zr.call(this),this.name="ClickSelecting"}We(gh,zr),gh.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},gh.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},gh.className="ClickSelectingTool";function jl(){zr.call(this),this.name="Action",this.pk=null}We(jl,zr),jl.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,y=a.lastInput,x=a.ic(y.documentPoint,function(E){for(;E.panel!==null&&!E.isActionable;)E=E.panel;return E});return x!==null&&x.isActionable?(this.pk=x,a.Ck=a.ic(y.documentPoint,null,null),!0):!1},jl.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()},jl.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))}},jl.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()},jl.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())},jl.prototype.doStop=function(){this.pk=null},jl.className="ActionTool";function QA(){zr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Qt(0,0)}We(QA,zr),QA.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)},QA.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},QA.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var E=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof Ti)x.Zc()&&(yu(x),E=x.copy(),E!==null&&y.add(E));else if(x!==null){var b=y.model.copyNodeData(x);qe(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=Qt.allocAt(a.x,a.y);this.isGridSnapEnabled&&Jc(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),Qt.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",E)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return E},Sn.Object.defineProperties(QA.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}}}),QA.className="ClickCreatingTool";function bl(){zr.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Ti;a.layerName="Tool",a.selectable=!1;var y=new vr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}We(bl,zr),bl.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))},bl.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},bl.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},bl.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive&&this.box!==null){var y=this.computeBoxBounds(),x=this.box.fb("SHAPE");x===null&&(x=this.box.Pb());var E=on.alloc().h(y.width,y.height);x.desiredSize=E,this.box.mm(y.x,y.y,!1),on.free(E),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},bl.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()},bl.prototype.computeBoxBounds=function(){var a=this.diagram;return new Ue(a.firstInput.documentPoint,a.lastInput.documentPoint)},bl.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),er?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 ne,y=y.selection.iterator;y.next();){var E=y.value;a.contains(E)||x.add(E)}for(y=x.iterator;y.next();)y.value.isSelected=!1;for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0)}},Sn.Object.defineProperties(bl.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}}}),bl.className="DragSelectingTool";function aa(){zr.call(this),this.name="Panning",this.Xt=new Qt,this.xy=new Qt,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(se.document,"scroll",a.Kw,!1),a.stopTool()}}We(aa,zr),aa.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())},aa.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(se.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},aa.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},aa.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},aa.prototype.doMouseMove=function(){this.move()},aa.prototype.doMouseUp=function(){this.move(),this.stopTool()},aa.prototype.move=function(){var a=this.diagram;if(this.isActive&&a)if(this.xg)a.lastInput.bubbles=!0;else{var y=a.position,x=a.firstInput.documentPoint,E=a.lastInput.documentPoint,b=y.x+x.x-E.x;x=y.y+x.y-E.y,a.allowHorizontalScroll||(b=y.x),a.allowVerticalScroll||(x=y.y),a.position=this.xy.h(b,x)}},Sn.Object.defineProperties(aa.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),aa.className="PanningTool",Pn("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),Pn("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),Pn("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),Pn("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),Pn("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Mu(){this.F=this.u=this.j=this.o=null}Sn.Object.defineProperties(Mu.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}}}),Mu.className="HTMLInfo";function Tl(a,y,x){this.text=a,this.hx=y,this.visible=x}Tl.className="ContextMenuButtonInfo";function Da(){zr.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new Qt,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}We(Da,zr);function nu(a){var y=new Mu;y.show=function(b,z,tt){tt.showDefaultContextMenu()},y.hide=function(b,z){z.hideDefaultContextMenu()},HA=y,a.tu=function(){a.stopTool()},y=Vn("div");var x=Vn("div");y.style.cssText="top: 0px;z-index:10002;position: fixed;display: none;text-align: center;left: 25%;width: 50%;background-color: #F5F5F5;padding: 16px;border: 16px solid #444;border-radius: 10px;margin-top: 10px",x.style.cssText="z-index:10001;position: fixed;display: none;top: 0;left: 0;width: 100%;height: 100%;background-color: black;opacity: 0.8;";var E=Vn("style");se.document.getElementsByTagName("head")[0].appendChild(E),E.sheet.insertRule(".goCXul { list-style: none; }",0),E.sheet.insertRule(".goCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }",0),E.sheet.insertRule(".goCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }",0),E=a.diagram,E!==null&&(E.addEventListener(y,"contextmenu",ms,!1),E.addEventListener(y,"selectstart",ms,!1),E.addEventListener(x,"contextmenu",ms,!1)),y.className="goCXforeground",x.className="goCXbackground",se.document.body&&(se.document.body.appendChild(y),se.document.body.appendChild(x)),Oc=y,Rh=x,Qc=!0}function ms(a){return a.preventDefault(),!1}Da.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)},Da.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Da.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Da.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,E=null;if(a instanceof He||(a instanceof Be?E=a:E=y.ic(x.documentPoint,null,function(b){return!b.layer.isTemporary})),E!==null){for(a=E;a!==null;){if(a.contextMenu!==null)return a;a=a.panel}if(y.lastInput.isTouchEvent&&this.defaultTouchContextMenu)return E.part}else if(y.contextMenu!==null)return y;return null},Da.prototype.doActivate=function(){},Da.prototype.doMouseDown=function(){if(zr.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof Jr){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)},Da.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof Jr){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 E=null;x instanceof Mu||(E=y.ic(y.lastInput.documentPoint,null,null),E!==null&&E.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(E)}}else a.canStart()&&(gA(a,!0),a.isActive||a.stopTool())}Da.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function gA(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=HA,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var E=x.contextMenu;E!==null?(a.currentObject=x instanceof Be?x:null,a.showContextMenu(E,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof Jr&&!a.currentContextMenu.visible&&a.stopTool()}}Da.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Da.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof Jr){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category=this.name,a.placeholder!==null&&(a.placeholder.scale=x.scale);var E=a.diagram;E!==null&&E!==x&&E.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionContextMenu(a,y)}else a instanceof Mu&&a.show(y,x,this);this.currentContextMenu=a},Da.prototype.positionContextMenu=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),E=a.measuredBounds,b=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=E.width),x.x+E.width>b.right&&(x.x-=E.width+5/y.scale),x.x<b.x&&(x.x=b.x),x.y+E.height>b.bottom&&(x.y-=E.height+5/y.scale),x.y<b.y&&(x.y=b.y),a.position=x}},Da.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof Jr?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Mu&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function OA(a){var y=new ne;return y.add(new Tl("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new Tl("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new Tl("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new Tl("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new Tl("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new Tl("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new Tl("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new Tl("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new Tl("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new Tl("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new Tl("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new Tl("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new Tl("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}Da.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=OA(this)),Oc.innerHTML="",Rh.addEventListener("pointerdown",this.tu,!1);var y=this,x=Vn("ul");x.className="goCXul",Oc.appendChild(x),x.innerHTML="";for(var E=this.jt.iterator;E.next();){var b=E.value,z=b.visible;if(typeof b.hx=="function"&&(typeof z!="function"||z(a))){z=Vn("li"),z.className="goCXli";var tt=Vn("a");tt.className="goCXa",tt.href="#",tt.ky=b.hx,tt.addEventListener("pointerdown",function(rt){return this.ky(a),y.stopTool(),rt.preventDefault(),!1},!1),tt.textContent=b.text,z.appendChild(tt),x.appendChild(z)}}Oc.style.display="block",Rh.style.display="block"},Da.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===HA){Oc.style.display="none",Rh.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(Rh,"pointerdown",this.tu,!1),this.currentContextMenu=null}},Sn.Object.defineProperties(Da.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof Jr?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Qc===!1&&HA===null&&Xo&&nu(this),HA},set:function(a){a===null&&(Qc=!0),HA=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var HA=null,Qc=!1,Rh=null,Oc=null;Da.className="ContextMenuTool",Pn("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function Mo(){zr.call(this),this.name="TextEditing",this.Zh=new Fo,this.ia=null,this.V=_h,this.vj=null,this.qa=Kh,this.u=1,this.F=!0,this.o=null,this.j=new Mu,this.kt=null,Hc(this,this.j)}We(Mo,zr);function Hc(a,y){if(Xo){var x=Vn("textarea");a.kt=x,x.addEventListener("input",function(){if(a.textBlock!==null){var E=a.Lx(this.value);this.style.width=20+E.measuredBounds.width*this.wA+"px",this.rows=E.lineCount}},!1),x.addEventListener("keydown",function(E){if(!E.isComposing&&a.textBlock!==null){var b=E.key;b==="Enter"?(a.textBlock.isMultiline===!1&&E.preventDefault(),a.acceptText(Rc)):b==="Tab"?(a.acceptText(xa),E.preventDefault()):b==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Kh){var E=a.kt;a.qa===Gh&&(a.qa=_c),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Kh){var E=a.kt;typeof E.focus=="function"&&E.focus(),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),y.valueFunction=function(){return x.value},y.mainElement=x,y.show=function(E,b,z){if(E instanceof Fo&&z instanceof Mo)if(z.state===Kc)x.style.border="3px solid red",x.focus();else{var tt=E.ga(rr),rt=b.position,ot=b.scale,lt=E.Df()*ot;lt<z.minimumEditorScale&&(lt=z.minimumEditorScale);var ut=E.naturalBounds.width*lt+6,ft=E.naturalBounds.height*lt+2,yt=(tt.x-rt.x)*ot;tt=(tt.y-rt.y)*ot,rt=E.verticalAlignment,ot=(E.lineHeight+E.spacingAbove+E.spacingBelow)*E.lineCount*lt,ft=rt.y*ft-rt.y*ot+rt.offsetY-(.5*ft-.5*ot)-ot/2,x.value=E.text,b.div.style.font=E.font,x.style.position="absolute",x.style.zIndex="100",x.style.font="inherit",x.style.fontSize=100*lt+"%",x.style.lineHeight="normal",x.style.width=ut+"px",x.style.left=(yt-ut/2|0)-1+"px",x.style.top=(tt+ft|0)-1+"px",x.style.textAlign=E.textAlign,x.style.margin="0",x.style.padding="1px",x.style.border="0",x.style.outline="none",x.style.whiteSpace="pre-wrap",x.style.overflow="hidden",x.rows=E.lineCount,x.wA=lt,x.className="goTXarea",b.div.appendChild(x),x.focus(),z.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(E){E.div.removeChild(x)}}}Mo.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||RA&&RA!==this&&(RA.acceptText(ku),RA&&RA!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Fo&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===_h&&!y.isSelected||this.starting===Md&&2>a.lastInput.clickCount)):!1},Mo.prototype.doStart=function(){RA=this,this.textBlock!==null&&this.doActivate()},Mo.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 Fo&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=Gh;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var E=new Ue(this.textBlock.ga(br),this.textBlock.ga(gr));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},Mo.prototype.doCancel=function(){this.stopTool()},Mo.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Mo.prototype.doMouseDown=function(){this.isActive&&this.acceptText(ku)},Mo.prototype.acceptText=function(a){switch(a){case ku:this.qa===zh?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===Gh||this.qa===Kc||this.qa===_c)&&(this.qa=ff,df(this));break;case Ld:case Rc:case xa:(Rc!==a||this.textBlock.isMultiline!==!0)&&(this.qa===Gh||this.qa===Kc||this.qa===_c)&&(this.qa=ff,df(this))}};function df(a){var y=a.textBlock,x=a.diagram,E=a.currentTextEditor;if(y!==null&&E!==null){var b=y.text,z="";E.valueFunction!==null&&(z=E.valueFunction()),a.isValidText(y,b,z)?(a.Ea(a.name),a.qa=zh,a.transactionResult=a.name,y.text=z,a.doSuccess(b,z),x!==null&&x.R("TextEdited",y,b),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=Kc,a.doError(b,z))}}Mo.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)},Mo.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Mo.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Kh,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},Mo.prototype.doStop=function(){RA=null},Mo.prototype.isValidText=function(a,y,x){var E=this.textValidation;return E!==null&&!E(a,y,x)?!1:(E=a.textValidation,!!(E===null||E(a,y,x)))},Mo.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Sn.Object.defineProperties(Mo.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)}}}),Mo.prototype.measureTemporaryTextBlock=Mo.prototype.Lx;var Ld=new Oe(Mo,"LostFocus",0),ku=new Oe(Mo,"MouseDown",1),xa=new Oe(Mo,"Tab",2),Rc=new Oe(Mo,"Enter",3),ep=new Oe(Mo,"SingleClick",0),_h=new Oe(Mo,"SingleClickSelected",1),Md=new Oe(Mo,"DoubleClick",2),Kh=new Oe(Mo,"StateNone",0),Gh=new Oe(Mo,"StateActive",1),_c=new Oe(Mo,"StateEditing",2),ff=new Oe(Mo,"StateValidating",3),Kc=new Oe(Mo,"StateInvalid",4),zh=new Oe(Mo,"StateValidated",5),RA=null;Mo.className="TextEditingTool",Mo.LostFocus=Ld,Mo.MouseDown=ku,Mo.Tab=xa,Mo.Enter=Rc,Mo.SingleClick=ep,Mo.SingleClickSelected=_h,Mo.DoubleClick=Md,Mo.StateNone=Kh,Mo.StateActive=Gh,Mo.StateEditing=_c,Mo.StateValidating=ff,Mo.StateInvalid=Kc,Mo.StateValidated=zh,Pn("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function al(a){vh||(gf(),vh=!0),this.H=Iu,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=Du,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new Fe,this.ce=new la,this.ce.Yd=this,this.Ei=new Fe,this.pu=new Fe,this.Sr=new Fe,this.pr=new Fe,a&&Object.assign(this,a)}al.prototype.Xe=function(a){this.H=a},al.prototype.canStart=function(){return!0};function bu(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),ua(a.H),a.zb=!0)}function Wr(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,E=a.Zd.contains("Model");E&&(a.Ok=!0,a.Pk===Du?(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===bd&&y.vc.clear(),a.Qw=!!(a.Pk===Gc&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),E&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),yh(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,E=y.vc.get(x),x.autoScale!==pa&&E!==null&&(delete E.start.scale,delete E.end.scale),se.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Ia(x),Ud(x),a.zb=!1,y.start(),y.bc&&(_A(a),x.Ya(),pf(y,0),Ra(x,!0),KA(a),x.R("AnimationStarting",a)))}))}}function pA(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function kd(a,y,x,E){a.isTicking||pA(a)||y instanceof Rn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,E,!1)}Tt=al.prototype,Tt.fv=function(a){return this.ce.fv(a)},Tt.Xu=function(a){return this.ce.Xu(a)};function jh(a,y){function x(){if(0<b.Sr.count&&(E.addAll(b.Sr),b.Sr.clear(),b.bc=!0),b.bc!==!1&&E.count!==0){b.pu.addAll(E);for(var z=b.pu.iterator;z.next();){var tt=z.value;if(tt.bc!==!1){t:if(0<tt.yl.count)var rt=!0;else{for(rt=tt.vc.iterator;rt.next();){var ot=rt.key;if(ot instanceof Be&&ot.diagram!==null||ot instanceof He){rt=!0;break t}}rt=!1}rt?zc(tt,!1):tt.Xk=!0}}b.pu.clear(),b.bc!==!1&&(_A(b),Ra(b.H),KA(b)),se.requestAnimationFrame(x)}}var E=a.Ei,b=a;a.bc?a.Sr.add(y):(a.bc=!0,E.add(y),se.requestAnimationFrame(function(){x()}))}function Tu(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function _A(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 KA(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}Tt.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(),yh(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),yh(y,this.H)},Tt.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))},Tt.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),Za(this,a))},Tt.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),GA(this.ce,y,"position",y.position,y.position),Za(this,a))};function Vh(a,y,x){!a.zb||y.D(x)||pA(a)||(a.H.pi||(y=x.copy()),GA(a.ce,a.H,"position",y,x))}function ph(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function Za(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function mh(a,y,x,E,b){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var z=a[0],tt=a[1],rt=a[2];a=a[3];var ot=y[0],lt=y[1],ut=y[2];return y=y[3],rt===0||rt===100?(z=ot,tt=lt):(ut===0||ut===100)&&(ot=z,lt=tt),180<Math.abs(ot-z)&&(ot>z?z+=360:ot+=360),z=b(x,z,ot-z,E)%360,tt=b(x,tt,lt-tt,E),rt=b(x,rt,ut-rt,E),x=b(x,a,y-a,E),"hsla("+z+", "+tt+"%, "+rt+"%, "+x+")"}function gf(){function a(x,E,b,z,tt,rt){x.position=new Qt(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}var y=new be;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,E,b,z,tt,rt){tt<rt?x.mm(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt),!1):x.position=new Qt(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}),y.add("location",function(x,E,b,z,tt,rt){tt<rt?x.mm(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt),!0):x.location=new Qt(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}),y.add("position:placeholder",function(x,E,b,z,tt,rt){tt<rt?x.mm(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt),!1):x.position=new Qt(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}),y.add("position:nodeCollapse",function(x,E,b,z,tt,rt){var ot=x.actualBounds,lt=b.actualBounds;b=lt.x+lt.width/2-ot.width/2,ot=lt.y+lt.height/2-ot.height/2,tt<rt?x.mm(z(tt,E.x,b-E.x,rt),z(tt,E.y,ot-E.y,rt),!1):x.position=new Qt(z(tt,E.x,b-E.x,rt),z(tt,E.y,ot-E.y,rt))}),y.add("desiredSize",function(x,E,b,z,tt,rt){x.desiredSize=new Ue(z(tt,E.width,b.width-E.width,rt),z(tt,E.height,b.height-E.height,rt))}),y.add("width",function(x,E,b,z,tt,rt){x.width=z(tt,E,b-E,rt)}),y.add("height",function(x,E,b,z,tt,rt){x.height=z(tt,E,b-E,rt)}),y.add("fill",function(x,E,b,z,tt,rt){x.fill=mh(E,b,tt,rt,z)}),y.add("stroke",function(x,E,b,z,tt,rt){x.stroke=mh(E,b,tt,rt,z)}),y.add("strokeWidth",function(x,E,b,z,tt,rt){x.strokeWidth=z(tt,E,b-E,rt)}),y.add("strokeDashOffset",function(x,E,b,z,tt,rt){x.strokeDashOffset=z(tt,E,b-E,rt)}),y.add("background",function(x,E,b,z,tt,rt){x.background=mh(E,b,tt,rt,z)}),y.add("areaBackground",function(x,E,b,z,tt,rt){x.areaBackground=mh(E,b,tt,rt,z)}),y.add("opacity",function(x,E,b,z,tt,rt){x.opacity=z(tt,E,b-E,rt)}),y.add("scale",function(x,E,b,z,tt,rt){x.scale=z(tt,E,b-E,rt)}),y.add("angle",function(x,E,b,z,tt,rt){x.angle=z(tt,E,b-E,rt)}),Nu=y}Sn.Object.defineProperties(al.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&&Xn(a,">= 1",al,"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}}}),al.prototype.stopAnimation=al.prototype.Cc;var Nu=null,vh=!1,Du=new Oe(al,"Default",1),Gc=new Oe(al,"AnimateLocations",2),bd=new Oe(al,"None",3);al.className="AnimationManager",al.defineAnimationEffect=function(a,y){vh||(gf(),vh=!0),Nu.add(a,y)},al.Default=Du,al.AnimateLocations=Gc,al.None=bd;function la(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=Zh,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=ye,this.vc=new be,this.Tt=new be,this.yl=new Fe,this.Ut=new Fe,this.dw=yA,a&&Object.assign(this,a)}la.prototype.suspend=function(){this.Xk=!0},la.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,zc(this,!0),_A(this.Yd),Ra(this.H),KA(this.Yd),this.H.redraw()};function yh(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}Tt=la.prototype,Tt.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 He?a=x:x instanceof Be&&(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===Du&&this===y.defaultAnimation&&(this.Lp=ug,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=lc),_A(y),this.yl.each(function(E){E.data=null,a.add(E)}),KA(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,jh(y,this),this)},Tt.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},Tt.add=function(a,y,x,E,b){if(y==="position"&&x.Xa(E))return this;if(this.H===null&&(a instanceof He?this.H=a:a instanceof Be&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Ti){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return GA(this,a,y,x,E,b),this};function GA(a,y,x,E,b,z){var tt=a.vc;if(y instanceof He&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(BA(E),ip(),E=[En.j,En.u,En.o,En.F],BA(b),ip(),b=[En.j,En.u,En.o,En.F]),tt.contains(y)){var rt=tt.I(y),ot=rt.start,lt=rt.end;ot[x]===void 0&&(ot[x]=wh(E)),lt[x]=wh(b)}else ot={},lt={},ot[x]=wh(E),lt[x]=wh(b),rt=ot.position,y instanceof Be&&rt instanceof Qt&&!rt.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&rt.assign(lt.position),rt=new xh(ot,lt,z),tt.add(y,rt);tt=ot[x],tt instanceof Qt&&!tt.w()&&tt.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof Ti?rt.Ku.location=wh(y.location):z&&(rt.Ku[x]=wh(E))}function wh(a){return a instanceof Qt||a instanceof on?a.copy():a}Tt.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},Tt.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function zc(a,y){if(!a.Xk||y){var x=a.Yd;if(a.bc!==!1){var E=+new Date,b=E>a.cn?a.Gd:E-a.Qd;y&&(b=a.gw,b<a.Gd?(a.Qd=+new Date-b,a.cn=a.Qd+a.Gd):b=a.Gd),_A(x),pf(a,b),Ra(a.H,!0),KA(x),E>a.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function pf(a,y){for(var x=a.Gd,E=a.vc.iterator,b=a.Wk;E.next();){var z=E.key;if(!(z instanceof Be&&z.diagram===null)){var tt=E.value,rt=b?tt.end:tt.start;tt=b?tt.start:tt.end;var ot=Nu,lt;for(lt in tt)lt==="position"&&(tt["position:placeholder"]||tt["position:nodeCollapse"])||ot.get(lt)===null||ot.get(lt)(z,rt[lt],tt[lt],a.Lp,y,x,a)}}}Tt.stop=function(){return this.bc?(this.Ml(!0),this):this},Tt.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,_A(x);for(var E=this.vc,b=this.yl.iterator;b.next();)y.remove(b.value);for(b=this.Ut.iterator;b.next();)b.value.v();b=this.ho,E=E.iterator;for(var z=Nu;E.next();){var tt=E.key,rt=E.value,ot=b?rt.end:rt.start,lt=b?rt.start:rt.end,ut=rt.Ku,ft;for(ft in lt)if(z.get(ft)!==null){var yt=ft;!rt.Hu||yt!=="position:nodeCollapse"&&yt!=="position:placeholder"||(yt="position"),z.get(yt)(tt,ot[ft],ut[ft]!==void 0?ut[ft]:rt.Hu?ot[ft]:lt[ft],this.Lp,this.Gd,this.Gd,this)}rt.Hu&&ut.location!==void 0&&tt instanceof Ti&&(tt.location=ut.location),rt.nv&&tt instanceof Ti&&tt.Zb(!1)}if(y.As.clear(),Yh(y,!1),y.Ya(),y.N(),Ra(y,!0),x.defaultAnimation===this){for(ft=x.pr.iterator;ft.next();)b=ft.value,b.Tg!==null&&(b.points=b.Tg,b.Tg=null);x.pr.clear()}Ra(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),KA(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),yh(this,null),x.Ml(this),y.$b())}},Tt.Cj=function(a,y){var x=y.actualBounds,E=null;if(y instanceof lr&&(E=y.placeholder),E!==null?(x=E.ga(br),E=E.padding,x.x+=E.left,x.y+=E.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new Qt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof lr)for(a=a.memberParts;a.next();)E=a.value,E instanceof ri&&this.Cj(E,y)},Tt.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof lr&&(x=y.placeholder),x!==null){var E=x.ga(br);x=x.padding,E.x+=x.left,E.y+=x.top,this.add(a,"position:placeholder",a.position,E,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),E=this.vc,E.contains(a)&&(E.I(a).nv=!0),a instanceof lr)for(a=a.memberParts;a.next();)E=a.value,E instanceof ri&&this.Aj(E,y)}},Tt.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Sn.Object.defineProperties(la.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Xn(a,">= 1",la,"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:le("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}}}),la.prototype.getTemporaryState=la.prototype.Ez,la.prototype.stop=la.prototype.stop,la.prototype.add=la.prototype.add,la.prototype.addTemporaryPart=la.prototype.Iy;function Zh(a,y,x,E){return a/=E/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function ug(a,y,x,E){return a===E?y+x:x*(-Math.pow(2,-10*a/E)+1)+y}la.className="Animation",la.EaseLinear=function(a,y,x,E){return x*a/E+y},la.EaseInOutQuad=Zh,la.EaseInQuad=function(a,y,x,E){return x*(a/=E)*a+y},la.EaseOutQuad=function(a,y,x,E){return-x*(a/=E)*(a-2)+y},la.EaseInExpo=function(a,y,x,E){return a===0?y:x*Math.pow(2,10*(a/E-1))+y},la.EaseOutExpo=ug;function xh(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}xh.className="AnimationState";function iu(a,y,x){this.xd=null,this.rf=a,this.so=x||vf,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=Sh))}iu.prototype.copy=function(){var a=new iu(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 mf(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))}Sn.Object.defineProperties(iu.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 vf=new Oe(iu,"Default",1),Sh=new Oe(iu,"Immediate",2),Wh=new Oe(iu,"Bundled",3);iu.className="AnimationTrigger",iu.Default=vf,iu.Immediate=Sh,iu.Bundled=Wh;function Vs(a){an(this),this.H=null,this.Pa=new ne,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)}Tt=Vs.prototype,Tt.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,mr(x)}a.clear(),this.Zq.length=0},Tt.Xe=function(a){this.H=a},Tt.toString=function(a){a===void 0&&(a=0);var y='Layer "'+this.name+'"';if(0>=a)return y;for(var x=0,E=0,b=0,z=0,tt=0,rt=this.Pa.iterator;rt.next();){var ot=rt.value;ot instanceof lr?b++:ot instanceof ri?E++:ot instanceof Rn?z++:ot instanceof Jr?tt++:x++}if(rt="",0<x&&(rt+=x+" Parts "),0<E&&(rt+=E+" Nodes "),0<b&&(rt+=b+" Groups "),0<z&&(rt+=z+" Links "),0<tt&&(rt+=tt+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,rt+=`
`+x.toString(),E=x.data,E!==null&&ii(E)&&(rt+=" #"+ii(E)),x instanceof ri?rt+=" "+mi(E):x instanceof Rn&&(rt+=" "+mi(x.fromNode)+" "+mi(x.toNode));return y+" "+this.Pa.count+": "+rt},Tt.ic=function(a,y,x){if(y===void 0&&(y=null),x===void 0&&(x=null),this.Uh===!1)return null;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var b=Qt.alloc(),z=this.Pa.s,tt=z.length;tt--;){var rt=z[tt];if((E!==!0||od(rt)!==!1)&&rt.isVisible()&&(b.assign(a),Qe(b,rt.oe),rt=rt.ic(b,y,x),rt!==null&&(y!==null&&(rt=y(rt)),rt!==null&&(x===null||x(rt)))))return Qt.free(b),rt}return Qt.free(b),null},Tt.ji=function(a,y,x,E){if(y===void 0&&(y=null),x===void 0&&(x=null),E instanceof ne||E instanceof Fe||(E=new Fe),this.Uh===!1)return E;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var z=Qt.alloc(),tt=this.Pa.s,rt=tt.length;rt--;){var ot=tt[rt];if((b!==!0||od(ot)!==!1)&&ot.isVisible()){z.assign(a),Qe(z,ot.oe);var lt=ot;ot.ji(z,y,x,E)&&(y!==null&&(lt=y(lt)),lt===null||x!==null&&!x(lt)||E.add(lt))}}return Qt.free(z),E},Tt.Cf=function(a,y,x,E,b){if(y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof ne||b instanceof Fe||(b=new Fe),this.Uh===!1)return b;var z=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(z=!0);for(var tt=this.Pa.s,rt=tt.length;rt--;){var ot=tt[rt];if((z!==!0||od(ot)!==!1)&&ot.isVisible()){var lt=ot;ot.Cf(a,y,x,E,b)&&(y!==null&&(lt=y(lt)),lt===null||x!==null&&!x(lt)||b.add(lt))}}return b},Tt.Nu=function(a,y,x,E,b,z,tt){if(this.Uh===!1)return b;for(var rt=this.Pa.s,ot=rt.length;ot--;){var lt=rt[ot];if((tt!==!0||od(lt)!==!1)&&z(lt)&&lt.isVisible()){var ut=lt;lt.Cf(a,y,x,E,b)&&(y!==null&&(ut=y(ut)),ut===null||x!==null&&!x(ut)||b.add(ut))}}return b},Tt.og=function(a,y,x,E,b,z){if(x===void 0&&(x=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof ne||b instanceof Fe)&&(z=b),b=!0),z instanceof ne||z instanceof Fe||(z=new Fe),this.Uh===!1)return z;var tt=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(tt=!0);for(var rt=Qt.alloc(),ot=Qt.alloc(),lt=this.Pa.s,ut=lt.length;ut--;){var ft=lt[ut];if((tt!==!0||od(ft)!==!1)&&ft.isVisible()){rt.assign(a),Qe(rt,ft.oe),ot.h(a.x+y,a.y),Qe(ot,ft.oe);var yt=ft;ft.og(rt,ot,x,E,b,z)&&(x!==null&&(yt=x(yt)),yt===null||E!==null&&!E(yt)||z.add(yt))}}return Qt.free(rt),Qt.free(ot),z},Tt.Fd=function(a,y){if(this.visible){var x=this.Pa.s,E=x.length;if(E!==0){a=rn();for(var b=rn(),z=0;z<E;z++){var tt=x[z];if(tt.vw=z,tt instanceof Rn){if(tt.fd===!1)continue}else if(tt instanceof Jr&&tt.adornedPart!==null)continue;var rt=tt.actualBounds;tt.isVisible()&&eo(rt,y)?(tt.Fd(!0),a.push(tt)):(tt.Fd(!1),tt.adornments!==null&&0<tt.adornments.count&&b.push(tt))}for(y=0;y<a.length;y++)for(x=a[y],qm(x),x=x.adornments;x.next();)E=x.value,E.measure(1/0,1/0),E.arrange(),E.Fd(!0);for(y=0;y<b.length;y++)qm(b[y]);Ve(a),Ve(b)}}};function mA(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}Tt.gc=function(a,y,x){if(this.visible&&this.pb!==0&&(x===void 0&&(x=!0),x||!this.isTemporary)){x=this.Pa.s;var E=x.length;if(E!==0){if(a.isTemporary)for(var b=0;b<E;b++)x[b].Gj();b=mA(this,a);var z=this.Zq;z.length=0;for(var tt=y.scale,rt=Ue.alloc(),ot=0;ot<E;ot++)this.Oj(a,x[ot],y,z,tt,rt,!0);if(Ue.free(rt),a.isTemporary)for(y=0;y<E;y++)x[y].Gj();a.globalAlpha=b}}};function jc(a,y,x,E,b){if(a.visible&&a.pb!==0&&(b||!a.isTemporary)){b=a.Pa.s;var z=b.length;if(z!==0){var tt=mA(a,y),rt=a.Zq;rt.length=0;for(var ot=x.scale,lt=Ue.alloc(),ut=0;ut<z;ut++){var ft=b[ut];E.contains(ft)&&a.Oj(y,ft,x,rt,ot,lt,!1)}Ue.free(lt),y.globalAlpha=tt}}}Tt.Oj=function(a,y,x,E,b,z,tt){if(tt&&!od(y))a.Hs(y);else{if(E!==null&&y instanceof Rn&&(y.isOrthogonal&&E.push(y),y.fd===!1)){a.Hs(y);return}for(tt=!1,E=y.containingGroup;E!==null;)tt?E.tb!==null&&z.Ex(E.tb):E.tb!==null&&(tt=!0,z.assign(E.tb)),E=E.containingGroup;var rt=y.actualBounds;if(E=!1,tt&&y.isVisible()){if(!z.Yc(rt)){a.Hs(y);return}E=!z.Re(rt)}E&&(a.save(),a instanceof Ya?a.bk=z.copy():(a.beginPath(),a.rect(z.x,z.y,z.width,z.height),a.clip())),rt.width*b>x.Oq||rt.height*b>x.Oq?y.gc(a,x):(b=y.actualBounds,z=y.naturalBounds,b.width===0||b.height===0||isNaN(b.x)||isNaN(b.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(Zo(y,a,y.areaBackground,!0,!0,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.areaBackground===null&&y.background===null&&(Zo(y,a,"rgba(0,0,0,0.3)",!0,!1,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.background!==null&&(a.transform(x.m11,x.m12,x.m21,x.m22,x.dx,x.dy),Zo(y,a,y.background,!0,!1,z,b),a.fillRect(0,0,z.width/2,z.height/2),x.ws()||(y=1/(x.m11*x.m22-x.m12*x.m21),a.transform(x.m22*y,-x.m12*y,-x.m21*y,x.m11*y,y*(x.m21*x.dy-x.m22*x.dx),y*(x.m12*x.dx-x.m11*x.dy)))))),E&&(a.restore(),a.Vc(!0))}},Tt.g=function(a,y,x,E,b){var z=this.diagram;z!==null&&z.cb(No,a,this,y,x,E,b)},Tt.oi=function(a,y,x){var E=this.Pa;if(y.Ig=this,this===null&&mr(y),a>=E.count)a=E.count;else if(E.M(a)===y)return-1;return E.Gb(a,y),y.Vo(x),E=this.diagram,E!==null&&(x?E.N():E.oi(y)),Td(this,a,y),a},Tt.pc=function(a,y,x){if(!x&&y.layer!==this&&y.layer!==null)return y.layer.pc(a,y,x);var E=this.Pa;if(0>a||a>=E.length){if(a=E.indexOf(y),0>a)return-1}else if(E.M(a)!==y&&(a=E.indexOf(y),0>a))return-1;return y.Wo(x),E.mb(a),E=this.diagram,E!==null&&(x?E.N():E.pc(y)),y.Ig=null,mr(y),a};function Td(a,y,x){if(y=Nd(a,y,x),x instanceof lr&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var E=-1,b=a.Pa.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];if(rt===x&&(y=tt,0<=E)||0>E&&rt.containingGroup===x&&(E=tt,0<=y))break}!(0>E)&&E<y&&(b=a.Pa,b.mb(y),b.Gb(E,x))}y=x.containingGroup,y!==null&&Td(a,-1,y)}x.svg!==null&&x.svg.remove()}function Nd(a,y,x){var E=x.zOrder;if(isNaN(E))return y;a=a.Pa;var b=a.count;if(1>=b)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var z=y-1,tt=NaN;0<=z&&(tt=a.M(z).zOrder,!!isNaN(tt));)z--;for(var rt=y+1,ot=NaN;rt<b&&(ot=a.M(rt).zOrder,!!isNaN(ot));)rt++;if(!isNaN(tt)&&tt>E)for(;;){if(z===-1||tt<=E){if(z++,z===y)break;return a.mb(y),a.Gb(z,x),z}for(tt=NaN;0<=--z&&(tt=a.M(z).zOrder,isNaN(tt)););}else if(!isNaN(ot)&&ot<E)for(;;){if(rt===b||ot>=E){if(rt--,rt===y)break;return a.mb(y),a.Gb(rt,x),rt}for(ot=NaN;++rt<b&&(ot=a.M(rt).zOrder,isNaN(ot)););}return y}Sn.Object.defineProperties(Vs.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===""&&le("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&le("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)&&Xn(a,"0 <= value <= 1",Vs,"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))}}}),Vs.prototype.findObjectsNear=Vs.prototype.og,Vs.prototype.findObjectsIn=Vs.prototype.Cf,Vs.prototype.findObjectsAt=Vs.prototype.ji,Vs.prototype.findObjectAt=Vs.prototype.ic,Vs.className="Layer";function He(a,y){if(xA||(Hs(),xA=!0),an(this),Iu=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,Xo){var x=this,E=function(){x.removeEventListener(se.document,"DOMContentLoaded",E,!1),x.setRTL()};se.document.body!==null?this.setRTL():x.addEventListener(se.document,"DOMContentLoaded",E,!1)}this.ol=null,Gd.add("Model",co);var b=this;return this.Hb=function(z){var tt=b.partManager;if(z.model===tt.diagram.model&&tt.diagram.aa){tt.diagram.aa=!1;try{var rt=z.change;z.modelChange===""&&rt===No&&tt.updateDataBindings(z.object,z.propertyName)}finally{tt.diagram.aa=!0}}},this.Oc=function(z){b.partManager.doModelChanged(z)},this.hu=this.ku=null,Ag(this),this.model=Ev(),this.Wg=!0,Qd(this),this.layout=new zo,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 uc,a!==void 0&&(typeof a=="string"||se.Element&&a instanceof Element?Vc(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var zA,Iu;function Ag(a){a.Yd=new al,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new ne,a.pj=new be,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new Qt(NaN,NaN).freeze(),a.du=new Qt(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new Qt(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new Yi,a.zu=new Qt(NaN,NaN).freeze(),a.ut=new Ue(NaN,NaN,NaN,NaN).freeze(),a.rj=new sr(0,0,0,0).freeze(),a.sj=yA,a.nu=!1,a.Zt=null,a.fu=null,a.yh=pa,a.zk=es,a.Fg=pa,a.pq=es,a.yt=br,a.Bt=br,a.Fc=!0,a.pn=!1,a.De=new Fe,a.Eh=new be,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new sr(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new Ys,a.bq.diagram=a,a.Qg=new Ys,a.Qg.diagram=a,a.cj=new Ys,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,pg(a),a.ai=new Fe,a.Ht=!0,a.uu=YA,a.pw=!1,a.wu=id,a.it="auto",a.Op="auto",a.zh=null,a.Fh=null,a.Bh=null,a.Qh=null,a.Oh=null,a.Nh=null,a.Qt=null,a.Lh=null,a.xt=!1,a.Mh=null,a.Ph=null,a.$h=null,a.Ch=null,a.Rt=!1,a.Yt={},a.oj=[null,null],a.Wg=!1,a.Iw=!1,a.ou=!1,a.lt=!1,a.rw=!0,a.ld=!1,a.$i=!1,a.Tw=!0,a.Ce=-2,a.Og=new be,a.Xn=new ne,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 sr(5).freeze(),a.Hw=new Fe().freeze(),a.Nt=999999999,a.nw=new Fe().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 Fe,a.ow=new Fe,a.Xh=null,a.aw=new on(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Qt,bounds:new Ue,Py:new on,bA:new on,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new Ue(NaN,NaN,NaN,NaN).freeze(),a.wo=new on(NaN,NaN).freeze(),a.Sp=new Ue(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new be;var y=new ri,x=new Fo;x.bind(new Ls("text","",mi)),y.add(x),a.ny=y,a.Lg.add("",y),y=new ri,x=new Fo,x.stroke="brown",x.bind(new Ls("text","",mi)),y.add(x),a.Lg.add("Comment",y),y=new ri,y.selectable=!1,y.avoidable=!1,x=new vr,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new on(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new be,y=new lr,y.selectionObjectName="GROUPPANEL",y.type=Bn.Vertical,x=new Fo,x.font="bold 12pt sans-serif",x.bind(new Ls("text","",mi)),y.add(x),x=new Bn(Bn.Auto),x.name="GROUPPANEL";var E=new vr;E.figure="Rectangle",E.fill="rgba(128,128,128,0.2)",E.stroke="black",x.add(E),E=new Xa,E.padding=new sr(5,5,5,5).ja(),x.add(E),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new be,y=new Rn,x=new vr,x.isPanelMain=!0,y.add(x),x=new vr,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Rn,x=new vr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Jr,y.type=Bn.Auto,x=new vr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Xa,x.margin=new sr(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new Jr,y.type=Bn.Link,x=new vr,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 co,a.toolManager=new Co,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new st,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=Id(),a.eq=null,a.fq=Hn,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 Qt,a.zy=500,a.wp=new Qt,a.wq=!1}He.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Fh=null,ZA="",Dd(this,!1),this.Xn.clear(),Bg(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function Dd(a,y){a.animationManager.Cc(!0),a.Hw=new Fe().freeze(),a.nw=new Fe().freeze();var x=a.skipsUndoManager,E=a.cc!==null&&a.cc!==void 0;E&&(a.skipsUndoManager=!0);var b=null;a.fe!==null&&(b=a.fe.part,b!==null&&a.remove(b));var z=[],tt=a.Wa.length;if(y){for(y=0;y<tt;y++)for(var rt=a.Wa.s[y].parts;rt.next();){var ot=rt.value;ot!==b&&ot.data===null&&z.push(ot)}for(y=0;y<z.length;y++)a.remove(z[y])}for(y=0;y<tt;y++)a.Wa.s[y].clear();return a.partManager.clear(),a.De.clear(),a.Eh.clear(),a.ai.clear(),a.Ck=null,a.Xn.clear(),Bg(),a.Og.clear(),Or=[],b!==null&&(a.add(b),a.partManager.parts.remove(b)),E&&(a.skipsUndoManager=x),z}function Id(){return null}He.prototype.reset=function(){this.clear(),this.vb=!0,Ag(this),ru(this),this.Wg=!0,Qd(this),this.layout=new zo,this.Wg=!1,this.model=Ev(),this.model.undoManager=new Ko,this.vb=this.rn=!1,this.N()},He.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=se.document.body);var y=Vn("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},He.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=se.document.body);var y=0;if(Xo){var x=Tf;y=zA,x===null&&(x=Tf=Vn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=zA=Vn("div"),y.style.position="absolute",y.style.visibility="hidden",y.style.width="200px",y.style.height="150px",y.style.boxSizing="content-box",y.appendChild(x)),y.style.overflow="hidden",a.appendChild(y);var E=x.offsetWidth;y.style.overflow="scroll",x=x.offsetWidth,E===x&&(x=y.clientWidth),a.removeChild(y),y=E-x,y!==0||er||(y=11)}this.Db=y,this.Gw=!0},He.prototype.qb=function(a){a.classType===He&&(this.autoScale=a)},He.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 Vc(a,y){if(Xo){if(y!=null||le("Diagram setup requires an argument DIV."),a.Ka!==null&&le("Diagram has already completed setup."),typeof y=="string"?a.Ka=se.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:le("No DIV or DIV id supplied: "+y),a.Ka===null&&le("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&le("Invalid div id; div already has a Diagram associated with it."),!a.ol&&se.ResizeObserver){var x=Di(function(){a.$b()},250);a.ol=new se.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}se.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var E="rgba(2"+y+"5, 255, 255, 0)";y--,a.Ka.style["-webkit-tap-highlight-color"]=E,a.Ka.innerHTML="",a.Ka.H=a,a.Ka.goDiagram=a,a.Ka.go=se.go;var b=new Xl(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",se.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),b.style.zIndex="2",b.style.userSelect="none",b.style.MozUserSelect="none",b.style.touchAction="none",b.style.letterSpacing="normal !important",b.style.wordSpacing="normal !important"),a.ta=b,a.ib=b.context,E=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),Cf(a,a.Aa,a.ya),a.Ka.insertBefore(b.Oa,a.Ka.firstChild),b=new Xl(null),b.width=1,b.height=1,a.jw=b,a.oy=b.context,Xo){b=Vn("div");var z=Vn("div");b.style.position="absolute",b.style.overflow="auto",b.style.width=a.Aa+"px",b.style.height=a.ya+"px",b.style.zIndex="1",z.style.position="absolute",z.style.width="1px",z.style.height="1px",a.Ka.appendChild(b),b.appendChild(z),b.onscroll=dg,b.addEventListener("pointerdown",fg),b.H=a,b.uy=!0,b.vy=!0,a.ku=b,a.hu=z}a.hk=Di(function(){a.Yh=null,a.N()},300),a.Ov=Di(function(){Ud(a)},250),a.preventDefault=function(tt){return tt.preventDefault(),!1},a.$j=function(tt){if(a.isEnabled){var rt=Nl(a,tt,!0);rt.bubbles=!0;var ot=0,lt=0;rt.delta=0,tt.deltaX!==void 0?(tt.deltaX!==0&&(ot=0<tt.deltaX?1:-1),tt.deltaY!==0&&(lt=0<tt.deltaY?1:-1),rt.delta=Math.abs(tt.deltaX)>Math.abs(tt.deltaY)?-ot:-lt):tt.wheelDeltaX!==void 0?(tt.wheelDeltaX!==0&&(ot=0<tt.wheelDeltaX?-1:1),tt.wheelDeltaY!==0&&(lt=0<tt.wheelDeltaY?-1:1),rt.delta=Math.abs(tt.wheelDeltaX)>Math.abs(tt.wheelDeltaY)?-ot:-lt):tt.wheelDelta!==void 0&&tt.wheelDelta!==0&&(rt.delta=0<tt.wheelDelta?1:-1),a.doMouseWheel(),Zl(rt,tt)}},a.aA=function(tt){a.isEnabled&&(a.Vk=!1,Nl(a,tt,!0),tt=a.currentTool,tt.cancelWaitAfter(),tt.standardMouseOver())},a.ui=function(tt){if(a.isEnabled){a.Vk=!0;var rt=a.Yt;rt[tt.pointerId]===void 0&&(rt[tt.pointerId]=tt),rt=a.oj;var ot=!1;if(rt[0]===null||rt[0].pointerId!==tt.pointerId&&rt[0].pointerType===tt.pointerType)if(rt[1]!==null&&rt[1].pointerId===tt.pointerId)rt[1]=tt,ot=!0;else if(rt[0]===null)rt[0]=tt;else if(rt[1]===null)rt[1]=tt,ot=!0;else{tt.preventDefault();return}else rt[0]=tt;(rt=tt.pointerType==="touch"||tt.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var lt=ot;ot=xf(a,tt,!0,!1,!0,lt),Jh(a,tt,ot),ot.targetDiagram=wf(tt,tt.target),ot.targetObject=null,lt||ot.clone(a.bq),lt=a.uw,rt=rt?25:10,tt.timeStamp-a.tw<a.zy&&!(Math.abs(lt.x-tt.screenX)>rt||Math.abs(lt.y-tt.screenY)>rt)?a.yq++:a.yq=1,ot.clickCount=a.yq,a.tw=tt.timeStamp,a.uw.sg(tt.screenX,tt.screenY),a.doMouseDown(),tt.button===1?tt.preventDefault():Zl(ot,tt)}},a.dk=function(tt){if(a.isEnabled){a.Vk=!0;var rt=a.oj;if(rt[0]===null||rt[0].pointerId!==tt.pointerId&&rt[0].pointerType===tt.pointerType){if(rt[1]!==null&&rt[1].pointerId===tt.pointerId){rt[1]=tt;return}if(rt[0]===null)rt[0]=tt;else return}else rt[0]=tt;if(rt[0].pointerId===tt.pointerId){rt=xf(a,tt,!1,!1,!1,rt[1]!==null);var ot=se.document.elementFromPoint(tt.clientX,tt.clientY)||null;ot!==null&&ot.shadowRoot!==void 0&&ot.shadowRoot!==null&&(ot=ot.shadowRoot.elementFromPoint(tt.clientX,tt.clientY));var lt=a,ut=tt;ot&&ot.H&&(ut=tt,lt=ot.H),rt.targetDiagram=lt,Jh(a,ut,rt),rt.targetObject=null,a.doMouseMove(),Zl(rt,tt)}}},a.fk=function(tt){if(a.isEnabled){a.Vk=!0;var rt=tt.pointerType==="touch"||tt.pointerType==="pen",ot=a.Yt;if(rt&&a.qu)delete ot[tt.pointerId],tt.preventDefault();else if(ot=a.oj,ot[0]===null||ot[0].pointerId!==tt.pointerId&&ot[0].pointerType===tt.pointerType)ot[1]!==null&&ot[1].pointerId===tt.pointerId&&(ot[1]=null);else{ot[0]=null,ot=xf(a,tt,!1,!0,!0,!1);var lt=se.document.elementFromPoint(tt.clientX,tt.clientY)||null;lt!==null&&lt.shadowRoot!==void 0&&lt.shadowRoot!==null&&(lt=lt.shadowRoot.elementFromPoint(tt.clientX,tt.clientY)),lt!==null&&lt.H instanceof He&&lt.H!==a&&Jh(lt.H,tt,ot),lt===null&&(lt=tt.target),Jh(a,tt,ot),ot.clickCount=a.yq,ot.targetDiagram=wf(tt,lt),ot.targetObject=null,a.doMouseUp(),Zl(ot,tt),rt&&(a.wq=!1)}}},a.ek=function(tt){if(a.isEnabled){a.Vk=!1;var rt=a.Yt;rt[tt.pointerId]&&delete rt[tt.pointerId],rt=a.oj,rt[0]!==null&&rt[0].pointerId===tt.pointerId&&(rt[0]=null),rt[1]!==null&&rt[1].pointerId===tt.pointerId&&(rt[1]=null),tt.pointerType!=="touch"&&tt.pointerType!=="pen"&&(tt=a.currentTool,tt.cancelWaitAfter(),tt.standardMouseOver())}},a.ck=function(tt){var rt=a.oj;rt[0]!==null&&rt[0].pointerId===tt.pointerId?(rt[0]=null,a.wq=!1):rt[1]!==null&&rt[1].pointerId===tt.pointerId&&(rt[1]=null)},a.Vp=E.Z["d"+Ac[1]+Ac[2]+"wI"+vu.slice(1,5)]["b"+Hw.slice(1,y)](E.Z,tA,y,y),E.Vc(!0),hg(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}He.prototype.addEventListener=function(a,y,x,E){a.addEventListener(y,x,{capture:E,passive:!1})},He.prototype.removeEventListener=function(a,y,x,E){a.removeEventListener(y,x,{capture:E})};function hg(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(se,"resize",a.Ov,!1)}function Ia(a){30<a.Sq&&(a.Yh=1)}function Yh(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),Qr&&Qr.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}He.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:se.devicePixelRatio||1},He.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},He.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},He.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},He.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},He.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},He.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},He.prototype.doFocus=function(){this.focus()},He.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=se.scrollX||se.pageXOffset,y=se.scrollY||se.pageYOffset;this.ta.focus(),se.scrollTo(a,y)}},He.prototype.Oy=function(){this.H.R("GainedFocus")},He.prototype.Ny=function(){this.H.R("LostFocus")};function Ud(a){if(a.ta!==null){var y=a.Ka;if(y!==null&&y.clientWidth!==0&&y.clientHeight!==0){a.Gw||a.setScrollWidth();var x=a.gf?a.Db:0,E=a.Be?a.Db:0,b=a.Mb;a.Mb=a.computePixelRatio(),a.Mb!==b&&(a.pn=!0,a.$b()),(y.clientWidth!==a.Aa+x||y.clientHeight!==a.ya+E)&&(a.Ee=!0,a.Fc=!0,y=a.layout,y!==null&&y.isViewportSized&&a.autoScale===pa&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Qd(a){var y=new Vs;y.name="Background",a.Al(y),y=new Vs,y.name="",a.Al(y),y=new Vs,y.name="Foreground",a.Al(y),y=new Vs,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new Vs,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new Vs,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function cg(a){var y=new Bn(Bn.Grid);y.name="GRID";var x=new vr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new vr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new vr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new vr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new vr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new vr,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Ti,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 dg(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):nc(this.H)}function fg(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):nc(this.H)}He.prototype.kx=function(a){if(this.ta!==null){var y=this.ku,x=this.hu;this.qr=!0;var E=this.documentBounds,b=this.viewportBounds,z=this.rj,tt=E.x-z.left,rt=E.y-z.top,ot=E.width+z.left+z.right,lt=E.height+z.top+z.bottom,ut=E.right+z.right;z=E.bottom+z.bottom;var ft=b.x;E=b.y;var yt=b.width,Mt=b.height,bt=b.right,Dt=b.bottom;b=this.scale;var qt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":qt=qt+a.scrollWidth-a.clientWidth;break;case"reverse":qt=a.scrollWidth-qt-a.clientWidth}var Vt=qt;yt<ot||Mt<lt?(qt=Qt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Vt&&(qt.x=Vt/b+tt,this.ju=Vt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(qt.y=a.scrollTop/b+rt,this.lu=a.scrollTop),this.position=qt,Qt.free(qt),this.Ee=this.qr=!1):(qt=Qt.alloc(),a.uy&&this.allowHorizontalScroll&&(tt<ft&&(this.position=qt.h(Vt+tt,this.position.y)),ut>bt&&(this.position=qt.h(-(y.scrollWidth-this.Aa)+Vt-this.Aa/b+ut,this.position.y))),a.vy&&this.allowVerticalScroll&&(rt<E&&(this.position=qt.h(this.position.x,a.scrollTop+rt)),z>Dt&&(this.position=qt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/b+z))),Qt.free(qt),this.vd=!0,this.Ee=this.qr=!1,E=this.documentBounds,b=this.viewportBounds,ut=E.right,bt=b.right,z=E.bottom,Dt=b.bottom,tt=E.x,ft=b.x,rt=E.y,E=b.y,yt>=ot&&tt>=ft&&ut<=bt&&(x.style.width="1px"),Mt>=lt&&rt>=E&&z<=Dt&&(x.style.height="1px"))}},He.prototype.computeBounds=function(a){return a===void 0&&(a=new Ue),ua(this),Vl(this,a)};function Vl(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,E=a.Wa.s,b=E.length,z=0;z<b;z++){var tt=E[z];if(tt.visible&&tt.isInDocumentBounds){tt=tt.Pa.s;for(var rt=tt.length,ot=0;ot<rt;ot++){var lt=tt[ot];lt.isInDocumentBounds&&lt.isVisible()&&(lt=lt.actualBounds,lt.w()&&(x?(x=!1,y.assign(lt)):y.ed(lt)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}He.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(ei(a))for(var E=0;E<a.length;E++){var b=a[E];!y&&b instanceof Rn||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds))}else for(a=a.iterator;a.next();)E=a.value,!y&&E instanceof Rn||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds));return x===null?new Ue(NaN,NaN,0,0):x};function vl(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=Qt.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var E=a.viewportBounds;E=Ue.allocAt(0,0,E.width,E.height);var b=Qt.alloc();b.xi(E,a.initialViewportSpot),b.h(x.x-b.x,x.y-b.y),a.position=b,Ue.free(E),Qt.free(b),Qt.free(x)}x=a.yh,y&&a.Fg!==pa&&(x=a.Fg);var z=x!==pa?Xh(a,x):a.scale;x=a.pa.x,E=a.pa.y,b=a.Aa/z;var tt=a.ya/z,rt=a.zk,ot=a.pq;y&&!rt.sb()&&(ot.sb()||ot.Xb())&&(rt=ot.Xb()?rr:ot),yf(a,a.documentBounds,b,tt,rt,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,Ce.B(z.x,x)&&Ce.B(z.y,E)&&Ce.B(z.width,b)&&Ce.B(z.height,tt)||a.onViewportBoundsChanged(new Ue(x,E,b,tt),z,y,!1)}}function Xh(a,y){var x=a.Pp;if(a.ta===null)return x;a.Va();var E=a.documentBounds;if(!E.w())return x;var b=E.width;E=E.height;var z=a.Aa+(a.gf?a.Db:0),tt=a.ya+(a.Be?a.Db:0),rt=z/b,ot=tt/E;return y===ll?(y=Math.min(ot,rt),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===WA?(y=ot>rt?(tt-a.Db)/E:(z-a.Db)/b,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}He.prototype.zoomToFit=function(){var a=this.sj;this.sj=yA,this.scale=Xh(this,ll),a!==yA&&(vl(this,!1),yf(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Tt=He.prototype,Tt.BA=function(a,y){y===void 0&&(y=ll);var x=a.width,E=a.height;if(!(x===0||E===0||isNaN(x)&&isNaN(E))){var b=1;if(y===ll||y===WA)if(isNaN(x))b=this.viewportBounds.height*this.scale/E;else if(isNaN(E))b=this.viewportBounds.width*this.scale/x;else{b=this.Aa;var z=this.ya;b=y===WA?z/E>b/x?(z-(this.Be?this.Db:0))/E:(b-(this.gf?this.Db:0))/x:Math.min(z/E,b/x)}this.scale=b,this.position=new Qt(a.x,a.y)}},Tt.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new Qt(x.x+(a.x*x.width+a.offsetX)-(y.x*E.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*E.height-y.offsetY))},Tt.zz=function(a){if(a instanceof Be){this.eq=a;var y=Qt.alloc();this.fq=this.op(a.ga(br,y)),Qt.free(y)}else this.eq=null,this.fq=Hn};function yf(a,y,x,E,b,z){var tt=Qt.allocAt(a.pa.x,a.pa.y),rt=tt.x,ot=tt.y;if(a.eq!==null){var lt=Qt.alloc();lt=a.eq.ga(br,lt),rt=lt.x-a.fq.x/a.scale,ot=lt.y-a.fq.y/a.scale,b=Ar,Qt.free(lt)}(z||a.scrollMode===yA)&&(b.sb()&&(x>y.width&&(rt=y.x+(b.x*y.width+b.offsetX)-(b.x*x-b.offsetX)),E>y.height&&(ot=y.y+(b.y*y.height+b.offsetY)-(b.y*E-b.offsetY))),b=a.rj,z=x-y.width,x<y.width+b.left+b.right?(rt=Math.min(rt+x/2,y.right+Math.max(z,b.right)-x/2),rt=Math.max(rt,y.left-Math.max(z,b.left)+x/2),rt-=x/2):rt>y.left?rt=y.left:rt<y.right-x&&(rt=y.right-x),x=E-y.height,E<y.height+b.top+b.bottom?(ot=Math.min(ot+E/2,y.bottom+Math.max(x,b.bottom)-E/2),ot=Math.max(ot,y.top-Math.max(x,b.top)+E/2),ot-=E/2):ot>y.top?ot=y.top:ot<y.bottom-E&&(ot=y.bottom-E)),tt.x=isFinite(rt)?rt:-a.yb.left,tt.y=isFinite(ot)?ot:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,tt),tt.x=y.x,tt.y=y.y),Vh(a.Yd,a.pa,tt),a.pa.h(tt.x,tt.y),ru(a),Qt.free(tt)}Tt.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=qu(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof Ti)return a}else if(a=qu(this,a,function(x){return x.part}),a instanceof Ti)return a;return null},Tt.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),ua(this);for(var E=this.Wa.iteratorBackwards;E.next();){var b=E.value;if(b.visible&&(b=b.ic(a,y,x),b!==null))return b}return null};function qu(a,y,x,E){for(x===void 0&&(x=null),E===void 0&&(E=null),ua(a),a=a.Wa.iteratorBackwards;a.next();){var b=a.value;if(b.visible&&!b.isTemporary&&(b=b.ic(y,x,E),b!==null))return b}return null}Tt.lz=function(a,y,x){return y===void 0&&(y=!0),Zc(this,a,function(E){return E.part},y?function(E){return E instanceof Ti&&E.canSelect()}:null,x)};function Zc(a,y,x,E,b){for(x===void 0&&(x=null),E===void 0&&(E=null),b instanceof ne||b instanceof Fe||(b=new Fe),ua(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,E,b)}return b}Tt.ji=function(a,y,x,E){y===void 0&&(y=null),x===void 0&&(x=null),E instanceof ne||E instanceof Fe||(E=new Fe),ua(this);for(var b=this.Wa.iteratorBackwards;b.next();){var z=b.value;z.visible&&z.ji(a,y,x,E)}return E},Tt.ux=function(a,y,x,E){return y===void 0&&(y=!1),x===void 0&&(x=!0),Od(this,a,function(b){return b instanceof Ti&&(!x||b.canSelect())},y,E)},Tt.Cf=function(a,y,x,E,b){y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof ne||b instanceof Fe||(b=new Fe),ua(this);for(var z=this.Wa.iteratorBackwards;z.next();){var tt=z.value;tt.visible&&tt.Cf(a,y,x,E,b)}return b},Tt.Nu=function(a,y,x,E,b,z){var tt=new Fe;ua(this);for(var rt=this.Wa.iteratorBackwards;rt.next();){var ot=rt.value;ot.visible&&ot.Nu(a,y,x,E,tt,b,z)}return tt};function Od(a,y,x,E,b){var z=null;for(z===void 0&&(z=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof ne||b instanceof Fe||(b=new Fe),ua(a),a=a.Wa.iteratorBackwards;a.next();){var tt=a.value;tt.visible&&!tt.isTemporary&&tt.Cf(y,z,x,E,b)}return b}Tt.mz=function(a,y,x,E,b){return x===void 0&&(x=!0),E===void 0&&(E=!0),Wc(this,a,y,function(z){return z instanceof Ti&&(!E||z.canSelect())},x,b)},Tt.og=function(a,y,x,E,b,z){x===void 0&&(x=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof ne||b instanceof Fe)&&(z=b),b=!0),z instanceof ne||z instanceof Fe||(z=new Fe),ua(this);for(var tt=this.Wa.iteratorBackwards;tt.next();){var rt=tt.value;rt.visible&&rt.og(a,y,x,E,b,z)}return z};function Wc(a,y,x,E,b,z){var tt=null;for(tt===void 0&&(tt=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof ne||b instanceof Fe)&&(z=b),b=!0),z instanceof ne||z instanceof Fe||(z=new Fe),ua(a),a=a.Wa.iteratorBackwards;a.next();){var rt=a.value;rt.visible&&!rt.isTemporary&&rt.og(y,x,tt,E,b,z)}return z}He.prototype.acceptEvent=function(a){return Nl(this,a,a instanceof MouseEvent)};function Nl(a,y,x){var E=a.Qg;return a.Qg=a.cj,a.cj=E,E.diagram=a,E.event=y,x?Jh(a,y,E):(E.viewPoint=a.Qg.viewPoint,E.documentPoint=a.Qg.documentPoint),a=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),E.modifiers=a,E.button=y.button,y.buttons!==void 0&&(E.buttons=y.buttons),er&&y.button===0&&y.ctrlKey&&(E.button=2),E.down=!1,E.up=!1,E.clickCount=1,E.delta=0,E.handled=!1,E.bubbles=!1,E.timestamp=y.timeStamp,E.isMultiTouch=!1,E.targetDiagram=wf(y,y.target),E.targetObject=null,E}function wf(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 xf(a,y,x,E,b,z){var tt=a.Qg;return a.Qg=a.cj,a.cj=tt,tt.diagram=a,tt.clickCount=1,a=tt.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),tt.modifiers=a,tt.event=y,tt.timestamp=y.timeStamp,tt.button=y.button,tt.buttons=y.buttons,er&&y.button===0&&y.ctrlKey&&(tt.button=2),tt.down=x,tt.up=E,tt.handled=!1,tt.bubbles=b,tt.isMultiTouch=z,tt}function Zl(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}He.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Nl(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(),Zl(x,a)},He.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Nl(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(),Zl(x,a)},He.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Nl(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),Zl(x,a)},He.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Nl(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),Zl(x,a)},He.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new Qt(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?Qe(new Qt(y,a),this.Ab):new Qt(y,a)};function Jh(a,y,x){var E=a.ta,b=a.Aa,z=a.ya,tt=0,rt=0;E!==null&&(E=E.getBoundingClientRect(),tt=y.clientX-b/E.width*E.left,rt=y.clientY-z/E.height*E.top),x.viewPoint.h(tt,rt),a.Ab!==null?(y=Qt.allocAt(tt,rt),a.Ab.Cd(y),x.documentPoint.assign(y),Qt.free(y)):x.documentPoint.h(tt,rt)}function Yc(a,y,x){if(a.oj[0]!==null){y=a.oj[y];var E=a.ta;E!==null&&(E=E.getBoundingClientRect(),x.h(y.clientX-a.Aa/E.width*E.left,y.clientY-a.ya/E.height*E.top))}}He.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function Sf(a){a.ld||ua(a),a.Va()}He.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Tt=He.prototype,Tt.Pz=function(){return this.kg},Tt.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Ra(this),this.hf=!1,this.du=new Qt(NaN,NaN),y.isEnabled=x,this.ld=!0;var E=this;a!==null&&pr(function(){E.ld=!1,bu(y,"Model"),a(E)},1)},Tt.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;se.requestAnimationFrame(function(){y.kg&&y.bd()})}},Tt.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Ra(this))};function ga(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||nc(a)||(y&&ua(a),x&&vl(a,!1))}function Ra(a,y){if(!a.ld&&(a.kg=!1,a.Ka!==null||a.wo.w())){a.ld=!0;var x=a.animationManager,E=a.Xn;if(!x.isAnimating&&E.length!==0){for(var b=E.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];Es(rt,!1),rt.v()}E.clear()}E=a.ow,0<E.count&&(E.each(function(ot){ot.Nv()}),E.clear()),b=E=!1,x.defaultAnimation.isAnimating&&(b=!0,E=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||Ud(a),ga(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(Uu(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),ua(a),z=!1,(!a.hf||a.xh)&&(a.hf?Mf(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),Mf(a,!1)),z=!0),a.Jk=!1,ua(a),a.ou||Sf(a),ga(a,!0,!1),tt=!1,z?(x=Ue.alloc(),x.assign(a.viewportBounds),a.hf||(tt=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,Bf(a)),a.R("LayoutCompleted"),ga(a,!0,!1),Ue.free(x)):x.Ok&&x.Qw&&(a.Fg!==pa?a.scale=Xh(a,a.Fg):a.yh!==pa?a.scale=Xh(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),vl(a,!0)),z&&tt&&a.eb("Initial Layout"),ua(a),y||a.gc(a.ib),b&&(a.skipsUndoManager=E),a.ld=!1}}function Bf(a){if(a.Fg!==pa)a.scale=Xh(a,a.Fg);else if(a.yh!==pa)a.scale=Xh(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}vl(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Uu(a)}function ua(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 Fe,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof lr&&E.U&65536&&(E.U=E.U^65536)})}}Tt.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof lr||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof lr&&x.isVisible()&&qh(this,x);for(a.reset();a.next();)x=a.value,x instanceof Rn&&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 Jr&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function qh(a,y){for(var x=rn(),E=rn(),b=y.memberParts;b.next();){var z=b.value;z.isVisible()&&(z instanceof lr?(xl(z)||La(z)||rd(z))&&qh(a,z):z instanceof Rn?z.fromNode===y||z.toNode===y?E.push(z):x.push(z):(z.measure(1/0,1/0),z.arrange()))}for(a=x.length,b=0;b<a;b++)z=x[b],z.measure(1/0,1/0),z.arrange();for(Ve(x),y.measure(1/0,1/0),y.arrange(),a=E.length,y=0;y<a;y++)x=E[y],x.measure(1/0,1/0),x.arrange();Ve(E)}Tt.Fd=function(a,y,x,E){if(this.vd||this.animationManager.isAnimating)for(var b=0;b<y;b++)a[b].Fd(x,E)},Tt.gc=function(a){if(this.Ka!==null){if(this.ta===null&&le("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){ec(this);var x=this.Aa,E=this.ya;if(a.Gv.resize(x,E,x,E),x=this.Wa.s,E=x.length,this.Fd(x,E,this,this.viewportBounds),this.Fc||y.isAnimating){y=this.pa;var b=this.Ca,z=Math.round(y.x*b)/b,tt=Math.round(y.y*b)/b,rt=this.Ab;for(rt.reset(),b!==1&&rt.scale(b),y.x===0&&y.y===0||rt.translate(-z,-tt),a.ti=null,Uf(a,rt.m11,rt.m12,rt.m21,rt.m22,rt.dx,rt.dy),this.pb!==1&&(a.globalAlpha=this.pb),jA(this,a),y=this.Mb,this.ta.context.setTransform(y,0,0,y,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya),y=0;y<E;y++)x[y].gc(a,this);a=!1,this.Yf?Wl(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(Yi.prototype.Cd=Yi.prototype.Eu),this.Fc=this.vd=!1}}}}else t:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,ec(this),this.Ka.style.opacity!=="0")){if(E=a!==this.ib,y=this.Wa.s,b=y.length,this.Fd(y,b,this,this.viewportBounds),E)a.Vc(!0),this.vd=!0;else if(!this.Fc&&!z.isAnimating)break t;z=this.Ab,z.reset(),tt=this.Mb,rt=this.pa;var ot=this.Ca,lt=Math.round(rt.x*ot)/ot,ut=Math.round(rt.y*ot)/ot;for(ot!==1&&z.scale(ot),rt.x===0&&rt.y===0||z.translate(-lt,-ut),a.setTransform(tt,0,0,tt,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),jA(this,a),rt=0;rt<b;rt++)a.setTransform(tt,0,0,tt,0,0),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),a.yc(),y[rt].gc(a,this);if(y=!1,this.Yf?Wl(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(Yi.prototype.Cd=Yi.prototype.Eu),E?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,E=Qr&&Qr.nx,x=this.zw,E||this.Yh===null){for(x[this.Tq]=y,this.Tq=(this.Tq+1)%x.length,b=y=0;b<x.length;b++)y+=x[b];this.Sq=y/x.length}if(this.pb!==1&&(a.globalAlpha=1),E)for(a.setTransform(1,0,0,1,0,0),E=0;E<x.length;E++)a.fillText(x[E].toString(),20,150+ +(20*E))}}};function $h(a,y,x,E,b,z,tt,rt,ot,lt){if(a.Ka!==null){a.ta===null&&le("No canvas specified"),tt===void 0&&(tt=null),rt===void 0&&(rt=null),ot===void 0&&(ot=!1),lt===void 0&&(lt=!1),ec(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ut=a.Ca;a.Ca=b;var ft=a.Wa.s,yt=ft.length;try{var Mt=new Ue(z.x,z.y,E.width/b,E.height/b),bt=Mt.copy();bt.Co(x),Uu(a,bt),ua(a),a.Fd(ft,yt,a,Mt),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,E.width,E.height),rt!==null&&rt!==""&&(y.fillStyle=rt,y.ox(0,0,E.width,E.height));var Dt=a.Mb;y.scale(Dt,Dt);var qt=Yi.alloc();qt.reset(),qt.translate(x.left,x.top),qt.scale(b),z.x===0&&z.y===0||qt.translate(-z.x,-z.y),y.setTransform(qt.m11,qt.m12,qt.m21,qt.m22,qt.dx,qt.dy),y.yc(),y instanceof Ya&&Uf(y,qt.m11,qt.m12,qt.m21,qt.m22,qt.dx,qt.dy),Yi.free(qt),jA(a,y),y.globalAlpha=a.pb;var Vt=a.Qj("Grid");if(tt){var oe=new Fe,ce=tt.iterator;for(ce.reset();ce.next();){var ge=ce.value;ge instanceof Ti&&(lt||ge.layer!==Vt)&&(ge.Gj(),oe.add(ge))}for(lt=0;lt<yt;lt++)jc(ft[lt],y,a,oe,ot);oe.each(function(Re){return Re.Gj()})}else for(oe=0;oe<yt;oe++){var Se=ft[oe];Se===Vt?lt&&Se.gc(y,a,!0):Se.gc(y,a,ot)}a.$i=!1,a.Yf&&Wl(a.Yf,a)&&a.Vp()}finally{a.Ca=ut,a.ib.Vc(!0),a.vd=!0,a.Fd(ft,yt,a,a.viewportBounds),Uu(a),a.ib instanceof Ya&&(a.ib.Nj.PA(),a.redraw())}}}Tt.Gf=function(a){return this.Rg[a]},Tt.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},Tt.Tx=function(){this.Rg=new Si,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(er||Gi),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function jA(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}Tt.Ql=function(a){return this.on[a]},Tt.sA=function(a,y){this.on[a]=y},Tt.Sx=function(){this.on=new Si,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},Tt.set=function(a){return Object.assign(this,a),this},Tt.Du=function(a){return this.nm(a)},Tt.nm=function(a){return tc(this,a),this};function tc(a,y){var x=a instanceof Bn,E=a instanceof He,b;for(b in y){b===""&&le("Setting properties requires non-empty property names");var z=a,tt=b;if(x||E){var rt=b.indexOf(".");if(0<rt){var ot=b.substring(0,rt);x?z=a.fb(ot):(z=a[ot],z==null&&(z=a.toolManager[ot])),qe(z)?tt=b.substr(rt+1):le("Unable to find object named: "+ot+" in "+a.toString()+" when trying to set property: "+b)}}if(tt[0]!=="_"&&!Pi(z,tt))if(E&&tt==="ModelChanged"){a.Yw(y[tt]);continue}else if(E&&tt==="Changed"){a.Pe(y[tt]);continue}else if(E&&Pi(a.toolManager,tt))z=a.toolManager;else if(E&&kf(a,tt)){a.Bj(tt,y[tt]);continue}else if(a instanceof Bi&&tt==="Changed"){a.Pe(y[tt]);continue}else le('Trying to set undefined property "'+tt+'" on object: '+z.toString());z[tt]=y[b],tt[0]==="_"&&z instanceof Be&&z.Vw(tt)}}Tt.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new be,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},Tt.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")},He.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!==lc&&this.rj.hi(0,0,0,0)&&y.width===a.width&&y.height===a.height){var E=this.scale,b=Math.max(a.y,y.y),z=Math.min(a.y+a.height,y.y+y.height);if(0<Math.max(0,Math.min(a.x+a.width,y.x+y.width)-Math.max(a.x,y.x))*E&&0<Math.max(0,z-b)*E){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(E=Ue.alloc(),Rd(this,this.computeBounds(E)),Ue.free(E)),E=this.ta,E===null||E instanceof Ba)))){var tt=this.Mb;b=this.Aa*tt;var rt=this.ya*tt,ot=this.scale*tt;z=Math.round(Math.round(y.x*ot)-Math.round(a.x*ot)),y=Math.round(Math.round(y.y*ot)-Math.round(a.y*ot)),ot=this.jw,a=this.oy,ot.width!==b&&(ot.width=b),ot.height!==rt&&(ot.height=rt),a.clearRect(0,0,b,rt),ot=190*tt;var lt=70*tt,ut=Math.max(z,0),ft=Math.max(y,0),yt=Math.floor(b-ut),Mt=Math.floor(rt-ft);a.drawImage(E.Oa,ut,ft,yt,Mt,0,0,yt,Mt),Wl(this.Yf,this)&&a.clearRect(0,0,ot,lt),E=rn(),a=rn(),Mt=Math.abs(z),yt=Math.abs(y);var bt=ut===0?0:b-Mt;ut=Qt.allocAt(bt,0),Mt=Qt.allocAt(Mt+bt,rt),a.push(new Ue(Math.min(ut.x,Mt.x),Math.min(ut.y,Mt.y),Math.abs(ut.x-Mt.x),Math.abs(ut.y-Mt.y)));var Dt=this.Ab;if(Dt.reset(),Dt.scale(tt,tt),this.Ca!==1&&Dt.scale(this.Ca),tt=this.pa,(tt.x!==0||tt.y!==0)&&isFinite(tt.x)&&isFinite(tt.y)&&Dt.translate(-tt.x,-tt.y),Qe(ut,Dt),Qe(Mt,Dt),E.push(new Ue(Math.min(ut.x,Mt.x),Math.min(ut.y,Mt.y),Math.abs(ut.x-Mt.x),Math.abs(ut.y-Mt.y))),bt=ft===0?0:rt-yt,ut.h(0,bt),Mt.h(b,yt+bt),a.push(new Ue(Math.min(ut.x,Mt.x),Math.min(ut.y,Mt.y),Math.abs(ut.x-Mt.x),Math.abs(ut.y-Mt.y))),Qe(ut,Dt),Qe(Mt,Dt),E.push(new Ue(Math.min(ut.x,Mt.x),Math.min(ut.y,Mt.y),Math.abs(ut.x-Mt.x),Math.abs(ut.y-Mt.y))),Wl(this.Yf,this)&&(b=0<z?0:-z,rt=0<y?0:-y,ut.h(b,rt),Mt.h(ot+b,lt+rt),a.push(new Ue(Math.min(ut.x,Mt.x),Math.min(ut.y,Mt.y),Math.abs(ut.x-Mt.x),Math.abs(ut.y-Mt.y))),Qe(ut,Dt),Qe(Mt,Dt),E.push(new Ue(Math.min(ut.x,Mt.x),Math.min(ut.y,Mt.y),Math.abs(ut.x-Mt.x),Math.abs(ut.y-Mt.y)))),Qt.free(ut),Qt.free(Mt),ga(this,!1,!0),this.Ka===null&&le("No div specified"),this.ta===null&&le("No canvas specified"),!this.animationManager.zb&&(b=this.ib,this.Fc)){for(ec(this),rt=this.Mb,b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,this.Aa*rt,this.ya*rt),b.drawImage(this.jw.Oa,0<z?0:Math.round(-z),0<y?0:Math.round(-y)),z=this.pa,tt=this.Ca,ot=Math.round(z.x*tt)/tt,lt=Math.round(z.y*tt)/tt,y=this.Ab,y.reset(),tt!==1&&y.scale(tt),z.x===0&&z.y===0||y.translate(-ot,-lt),b.save(),b.beginPath(),z=a.length,tt=0;tt<z;tt++)ot=a[tt],ot.width!==0&&ot.height!==0&&b.rect(Math.floor(ot.x),Math.floor(ot.y),Math.ceil(ot.width),Math.ceil(ot.height));for(b.clip(),b.setTransform(rt,0,0,rt,0,0),b.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),b.yc(),y=this.Wa.s,z=y.length,this.Fd(y,z,this,this.viewportBounds),jA(this,b),b.globalAlpha=this.pb,rt=0;rt<z;rt++)if(tt=y[rt],ot=E,tt.visible&&tt.pb!==0){lt=mA(tt,b),ft=tt.Zq,ft.length=0,ut=this.scale,yt=Ue.alloc(),Mt=tt.Pa.s,Dt=Mt.length,bt=ot.length;for(var qt=0;qt<Dt;qt++){var Vt=Mt[qt],oe=$d(Vt,Vt.actualBounds);t:{for(var ce=2/ut,ge=4/ut,Se=0;Se<bt;Se++){var Re=ot[Se];if(Re.width!==0&&Re.height!==0&&oe.Vu(Re.x-ce,Re.y-ce,Re.width+ge,Re.height+ge)){oe=!0;break t}}oe=!1}oe&&tt.Oj(b,Vt,this,ft,ut,yt,!0)}Ue.free(yt),b.globalAlpha=lt}b.restore(),b.Vc(!0),this.Yf&&Wl(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}Ve(E),Ve(a),this.ld=!1}}else this.bd();x&&(Ia(this),this.bd(),Yh(this,!0))}else x?(Ia(this),this.bd(),Yh(this,!0)):this.bd()}};function ec(a){a.pn!==!1&&(a.pn=!1,Cf(a,a.Aa,a.ya))}function Cf(a,y,x){ru(a);var E=a.Mb;a.ta.resize(y*E,x*E,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function nc(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,E=a.ya,b=a.Ka,z=!1,tt=a.gf?a.Db:0,rt=a.Be?a.Db:0,ot=b.clientWidth||x+tt,lt=b.clientHeight||E+rt,ut=a.viewportBounds;b=ut.x;var ft=ut.y,yt=ut.width,Mt=ut.height;if((ot!==x+tt||lt!==E+rt)&&(a.gf=!1,a.Be=!1,rt=tt=0,a.Aa=ot,a.ya=lt,z=a.pn=!0,ru(a)),!a.hf||!a.viewportBounds.w())return!0;var bt=a.ku,Dt=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var qt=a.documentBounds,Vt=0,oe=0,ce=0,ge=0,Se=ut.width,Re=ut.height,qn=a.rj;a.contentAlignment.sb()?(qt.width>Se&&(Vt=qn.left,oe=qn.right),qt.height>Re&&(ce=qn.top,ge=qn.bottom)):(Vt=qn.left,oe=qn.right,ce=qn.top,ge=qn.bottom);var gi=qt.width+Vt+oe,ui=qt.height+ce+ge;qn=a.scale;var Qn=gi>ot/qn,pn=ui>lt/qn;if(!(z||a.gf||a.Be||Qn||pn))return!0;Vt=qt.x-Vt,ot=ut.x,oe=qt.right+oe,lt=ut.right+tt,ce=qt.y-ce;var ar=ut.y;qt=qt.bottom+ge,ut=ut.bottom+rt;var Ji="1px";if(ge="1px",a.scrollMode===yA&&(Qn||pn)&&(Qn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Qn=1,Vt+1<ot&&(Qn=Math.max((ot-Vt)*qn+a.Aa,Qn)),oe>lt+1&&(Qn=Math.max((oe-lt)*qn+a.Aa,Qn)),Se+tt+1<gi&&(Qn=Math.max((gi-Se)*qn+a.Aa,Qn)),Ji=Qn.toString()+"px"),pn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Qn=1,ce+1<ar&&(Qn=Math.max((ar-ce)*qn+a.ya,Qn)),qt>ut+1&&(Qn=Math.max((qt-ut)*qn+a.ya,Qn)),Re+rt+1<ui&&(Qn=Math.max((ui-Re)*qn+a.ya,Qn)),ge=Qn.toString()+"px")),Qn=Ji!=="1px",pn=ge!=="1px",Qn&&pn||!Qn&&!pn||(pn&&(lt-=a.Db),Qn&&(ut-=a.Db),gi<Se+tt||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(tt=1,Vt+1<ot&&(tt=Math.max((ot-Vt)*qn+a.Aa,tt)),oe>lt+1&&(tt=Math.max((oe-lt)*qn+a.Aa,tt)),Se+1<gi&&(tt=Math.max((gi-Se)*qn+a.Aa,tt)),Ji=tt.toString()+"px"),Qn=Ji!=="1px",tt=a.ya,Qn!==a.Be&&(tt=Qn?a.ya-a.Db:a.ya+a.Db),ui<Re+rt||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(rt=1,ce+1<ar&&(rt=Math.max((ar-ce)*qn+tt,rt)),qt>ut+1&&(rt=Math.max((qt-ut)*qn+tt,rt)),Re+1<ui&&(rt=Math.max((ui-Re)*qn+tt,rt)),ge=rt.toString()+"px"),pn=ge!=="1px"),a.qr&&Qn===a.Be&&pn===a.gf)return x===a.Aa&&E===a.ya||a.bd(),!1;if(Qn!==a.Be&&(Ji==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=Qn,Dt.style.width=Ji,pn!==a.gf&&(ge==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(rt=Qt.alloc(),pn?(y.style.left=a.Db+"px",a.position=rt.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=rt.h(a.pa.x-a.Db/a.scale,a.pa.y)),Qt.free(rt))),z&&ru(a),a.gf=pn,Dt.style.height=ge,a.gu=!0,z&&(a.pn=!0),y=bt.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Se+1<gi?y=(a.position.x-Vt)*qn:Vt+1<ot?y=bt.scrollWidth-bt.clientWidth:oe>lt+1&&(y=a.position.x*qn)),a.tn)switch(a.bu){case"negative":y=-(bt.scrollWidth-y-bt.clientWidth);break;case"reverse":y=bt.scrollWidth-y-bt.clientWidth}return bt.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Re+1<ui?bt.scrollTop=(a.position.y-ce)*qn:ce+1<ar?bt.scrollTop=bt.scrollHeight-bt.clientHeight:qt>ut+1&&(bt.scrollTop=a.position.y*qn)),ot=a.Aa,lt=a.ya,bt.style.width=ot+(a.gf?a.Db:0)+"px",bt.style.height=lt+(a.Be?a.Db:0)+"px",x!==ot||E!==lt||a.animationManager.zb?(x=Ue.allocAt(b,ft,yt,Mt),a.onViewportBoundsChanged(x,a.viewportBounds,qn,z),Ue.free(x),!1):!0}Tt=He.prototype,Tt.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&le("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&&le('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(as,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},Tt.oi=function(a){this.partManager.oi(a);var y=this;Hu(a,function(x){vA(y,x)}),(a instanceof Jr||a instanceof lr&&a.placeholder!==null)&&a.v(),a.data!==null&&Hu(a,function(x){Cv(y.partManager,x)}),La(a)!==!0&&rd(a)!==!0||this.De.add(a),_y(a,!0,this),Gy(a)?(a.actualBounds.w()&&this.N($d(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N($d(a,a.actualBounds)),this.$b()},Tt.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Hu(a,function(x){Pv(y.partManager,x,y)}),this.De.remove(a),Gy(a)?(a.actualBounds.w()&&this.N($d(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N($d(a,a.actualBounds)),this.$b()},Tt.remove=function(a){Pf(this,a,!0)};function Pf(a,y,x){var E=y.layer;E!==null&&E.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=E.pc(-1,y,!1),0<=x&&a.cb(gs,"parts",E,y,null,x,null),a=y.layerChanged,a!==null&&a(y,E,null))}Tt.Is=function(a,y){if(y===void 0&&(y=!1),ei(a))for(var x=a.length,E=0;E<x;E++){var b=a[E];y&&!b.canDelete()||this.remove(b)}else for(x=new Fe,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},Tt.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},He.prototype.moveParts=function(a,y,x,E){if(x===void 0&&(x=!1),E===void 0&&(E=Xc(this)),this.toolManager!==null){var b=new be;if(a!==null)if(ei(a))for(var z=0;z<a.length;z++)$u(this,b,a[z],x,E);else for(a=a.iterator;a.next();)$u(this,b,a.value,x,E);else{for(a=this.parts;a.next();)$u(this,b,a.value,x,E);for(a=this.nodes;a.next();)$u(this,b,a.value,x,E);for(a=this.links;a.next();)$u(this,b,a.value,x,E)}Bh(this,b,y,E,x)}};function $u(a,y,x,E,b,z){if(!y.contains(x)&&(z===void 0&&(z=!1),!E||z||x.canMove()||x.canCopy()))if(b===void 0&&(b=Xc(a)),x instanceof ri){if(y.add(x,a.Pd(b,x,x.location)),x instanceof lr&&(x.placeholder!==null||b.dragsMembers))for(z=x.memberParts;z.next();)$u(a,y,z.value,E,b,b.groupsAlwaysMove);for(z=x.linksConnected;z.next();){var tt=z.value;if(!y.contains(tt)){var rt=tt.fromNode,ot=tt.toNode;rt!==null&&y.contains(rt)&&ot!==null&&y.contains(ot)&&$u(a,y,tt,E,b)}}if(b.dragsTree)for(x=x.Ou();x.next();)$u(a,y,x.value,E,b)}else if(x instanceof Rn)for(y.add(x,a.Pd(b,x)),x=x.labelNodes;x.next();)$u(a,y,x.value,E,b);else x instanceof Jr||y.add(x,a.Pd(b,x,x.location))}function Bh(a,y,x,E,b){if(y!==null&&y.count!==0){var z=Qt.alloc(),tt=Qt.alloc();tt.assign(x),isNaN(tt.x)&&(tt.x=0),isNaN(tt.y)&&(tt.y=0),(x=a.Mr)||qc(a,y);for(var rt=rn(),ot=rn(),lt=y.iterator,ut=Qt.alloc();lt.next();){var ft=lt.key,yt=lt.value;if(ft.Zc()){var Mt=$c(a,ft,y);Mt!==null?rt.push(new it(ft,yt,Mt)):(!b||ft.canMove())&&(Mt=yt.point,z.assign(Mt),a.computeMove(ft,z.add(tt),E,ut),ft.location=ut,yt.shifted===void 0&&(yt.shifted=new Qt),yt.shifted.assign(ut.re(Mt)))}else lt.key instanceof Rn&&ot.push(lt.sa)}for(Qt.free(ut),b=rt.length,lt=0;lt<b;lt++)ft=rt[lt],z.assign(ft.info.point),ft.Su.shifted===void 0&&(ft.Su.shifted=new Qt),ft.node.location=z.add(ft.Su.shifted);for(b=Qt.alloc(),lt=Qt.alloc(),ft=ot.length,yt=0;yt<ft;yt++){var bt=ot[yt];if(Mt=bt.key,Mt instanceof Rn)if(Mt.suspendsRouting){Mt.Tg=null,ut=Mt.fromNode;var Dt=Mt.toNode;if(a.draggedLink!==null&&E.dragsLink)if(Dt=bt.value.point,Mt.dragComputation===null)y.add(Mt,a.Pd(E,Mt,tt)),Sc(Mt,tt.x-Dt.x,tt.y-Dt.y);else{bt=Qt.allocAt(0,0),(ut=Mt.i(0))&&ut.w()&&bt.assign(ut);var qt=ut=Qt.alloc().assign(bt).add(tt);E.isGridSnapEnabled&&(E.isGridSnapRealtime||a.lastInput.up)&&(qt=Qt.alloc(),Jc(a,Mt,ut,qt,E)),ut.assign(Mt.dragComputation(Mt,ut,qt)).re(bt),y.add(Mt,a.Pd(E,Mt,ut)),Sc(Mt,ut.x-Dt.x,ut.y-Dt.y),Qt.free(bt),Qt.free(ut),qt!==ut&&Qt.free(qt)}else ut!==null&&(b.assign(ut.location),qt=y.I(ut),qt!==null&&b.re(qt.point)),Dt!==null&&(lt.assign(Dt.location),qt=y.I(Dt),qt!==null&&lt.re(qt.point)),ut!==null&&Dt!==null?b.Xa(lt)?(ut=bt.value.point,Dt=z,Dt.assign(b),Dt.re(ut),y.add(Mt,a.Pd(E,Mt,b)),Sc(Mt,Dt.x,Dt.y)):(Mt.suspendsRouting=!1,Mt.bb()):(bt=bt.value.point,ut=ut!==null?b:Dt!==null?lt:tt,y.add(Mt,a.Pd(E,Mt,ut)),Sc(Mt,ut.x-bt.x,ut.y-bt.y))}else(Mt.fromNode===null||Mt.toNode===null)&&(ut=bt.value.point,y.add(Mt,a.Pd(E,Mt,tt)),Sc(Mt,tt.x-ut.x,tt.y-ut.y))}Qt.free(z),Qt.free(tt),Qt.free(b),Qt.free(lt),Ve(rt),Ve(ot),x||(ua(a),VA(a,y))}}He.prototype.computeMove=function(a,y,x,E){if(E===void 0&&(E=new Qt),E.assign(y),a===null)return E;var b=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(b=Qt.alloc(),Jc(this,a,y,b,x)),x=a.dragComputation!==null?a.dragComputation(a,y,b):b;var tt=a.minLocation,rt=tt.x;isNaN(rt)&&(rt=z?Math.round(1e3*a.location.x)/1e3:a.location.x),tt=tt.y,isNaN(tt)&&(tt=z?Math.round(1e3*a.location.y)/1e3:a.location.y);var ot=a.maxLocation,lt=ot.x;return isNaN(lt)&&(lt=z?Math.round(1e3*a.location.x)/1e3:a.location.x),ot=ot.y,isNaN(ot)&&(ot=z?Math.round(1e3*a.location.y)/1e3:a.location.y),E.h(Math.max(rt,Math.min(x.x,lt)),Math.max(tt,Math.min(x.y,ot))),b!==y&&Qt.free(b),E};function Xc(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function Jc(a,y,x,E,b){if(b===void 0&&(b=Xc(a)),E.assign(x),y!==null){var z=a.grid;y=b.gridSnapCellSize,a=y.width,y=y.height;var tt=b.gridSnapOrigin,rt=tt.x;if(tt=tt.y,b=b.gridSnapCellSpot,z!==null){var ot=z.gridCellSize;isNaN(a)&&(a=ot.width),isNaN(y)&&(y=ot.height),z=z.gridOrigin,isNaN(rt)&&(rt=z.x),isNaN(tt)&&(tt=z.y)}z=Qt.allocAt(0,0),z.yi(0,0,a,y,b),Ce.No(x.x,x.y,rt+z.x,tt+z.y,a,y,E),Qt.free(z)}}function qc(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Rn&&(y.suspendsRouting=!0)}function VA(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Rn&&(x.suspendsRouting=!1,Av(x)&&x.bb())}a.Mr=!1}}function $c(a,y,x){return y=y.containingGroup,y!==null&&(a=$c(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}Tt=He.prototype,Tt.Pd=function(a,y,x){if(x===void 0)return new eA(ye);var E=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(E=!1),E?new eA(new Qt(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new eA(x.copy())};function Ff(a,y,x){if(y.diagram!==null&&y.diagram!==a&&le("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&le("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&le("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&le("Cannot move a Layer before or after itself: "+y)),y.diagram!==a){y=y.name,a=a.Wa,x=a.count;for(var E=0;E<x;E++)a.M(E).name===y&&le("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}Tt.Al=function(a){Ff(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(as,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},Tt.Ww=function(a,y){Ff(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(gs,"layers",this,a,null,E,null));var b=x.count,z;for(z=0;z<b;z++)if(x.M(z)===y){x.Gb(z,a);break}return this.cc!==null&&this.cb(as,"layers",this,null,a,null,z),this.N(),0>E&&this.Ya(),this},Tt.Cy=function(a,y){Ff(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(gs,"layers",this,a,null,E,null));var b=x.count,z;for(z=0;z<b;z++)if(x.M(z)===y){x.Gb(z+1,a);break}return this.cc!==null&&this.cb(as,"layers",this,null,a,null,z+1),this.N(),0>E&&this.Ya(),this},Tt.kA=function(a){if(a.diagram!==this&&le("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram),a.name!==""){var y=this.Wa,x=y.indexOf(a);if(y.remove(a)){for(y=a.Pa.copy().iterator;y.next();){var E=y.value,b=E.layerName;b!==a.name?E.layerName=b:E.layerName=""}this.cc!==null&&this.cb(gs,"layers",this,a,null,x,null),this.N(),this.Ya()}}},Tt.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},Tt.Yw=function(a){return this.pf===null&&(this.pf=new ne),this.pf.add(a),this.model.Pe(a),this},Tt.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},Tt.Pe=function(a){return this.zg===null&&(this.zg=new ne),this.zg.add(a),this},Tt.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},Tt.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==oa&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,E=0;E<x;E++)y.M(E)(a)},Tt.cb=function(a,y,x,E,b,z,tt){z===void 0&&(z=null),tt===void 0&&(tt=null);var rt=new Qo;rt.diagram=this,rt.change=a,rt.propertyName=y,rt.object=x,rt.oldValue=E,rt.oldParam=z,rt.newValue=b,rt.newParam=tt,this.ds(rt)},Tt.g=function(a,y,x,E,b){this.cb(No,a,this,y,x,E,b)},He.prototype.changeState=function(a,y){if(a!==null&&a.diagram===this){var x=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var E=a.change;if(E===No){var b=a.object;if(Ro(b,a.propertyName,a.I(y)),b instanceof Be){var z=b.part;z!==null&&z.Wb()}this.isModified=!0}else if(E===as){var tt=a.object,rt=a.newParam,ot=a.newValue;if(tt instanceof Bn)if(typeof rt=="number"&&ot instanceof Be){y?tt.pc(rt):tt.Gb(rt,ot);var lt=tt.part;lt!==null&&lt.Wb()}else typeof rt=="number"&&ot instanceof Ds&&(ot.isRow?fy(tt,rt,y?void 0:ot):gy(tt,rt,y?void 0:ot));else if(tt instanceof Vs){var ut=a.oldParam===!0;typeof rt=="number"&&ot instanceof Ti&&(y?(ot.isSelected=!1,ot.isHighlighted=!1,ot.Wb(),tt.pc(ut?rt:-1,ot,ut)):tt.oi(rt,ot,ut))}else tt instanceof He?typeof rt=="number"&&ot instanceof Vs&&(y?this.Wa.mb(rt):(ot.Xe(this),this.Wa.Gb(rt,ot))):le("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(E===gs){var ft=a.object,yt=a.oldParam,Mt=a.oldValue;if(ft instanceof Bn)typeof yt=="number"&&Mt instanceof Be?y?ft.Gb(yt,Mt):ft.pc(yt):typeof yt=="number"&&Mt instanceof Ds&&(Mt.isRow?fy(ft,yt,y?Mt:void 0):gy(ft,yt,y?Mt:void 0));else if(ft instanceof Vs){var bt=a.newParam===!0;typeof yt=="number"&&Mt instanceof Ti&&(y?0>ft.Pa.indexOf(Mt)&&ft.oi(yt,Mt,bt):(Mt.isSelected=!1,Mt.isHighlighted=!1,Mt.Wb(),ft.pc(bt?yt:-1,Mt,bt)))}else ft instanceof He?typeof yt=="number"&&Mt instanceof Vs&&(y?(Mt.Xe(this),this.Wa.Gb(yt,Mt)):this.Wa.mb(yt)):le("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==oa&&le("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},He.prototype.Ea=function(a){return this.undoManager.Ea(a)},He.prototype.eb=function(a){return this.undoManager.eb(a)},He.prototype.Kf=function(){return this.undoManager.Kf()},He.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},He.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},He.prototype.rp=function(){this.partManager.rp()};function Ef(a,y,x){var E=a.animationManager;if(a.vb||a.ld)a.Ca=x,ru(a),a.N(),a.Ee=!0,E.zb&&(pA(E)||E.ce.add(E.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,ru(a);else{a.vb=!0;var b=a.viewportBounds.copy(),z=a.Aa,tt=a.ya,rt=a.zoomPoint.x,ot=a.zoomPoint.y,lt=a.contentAlignment;isNaN(rt)&&(lt.$c()?lt.Hf(is)?rt=0:lt.Hf(Lo)&&(rt=z-1):rt=lt.sb()?lt.x*(z-1):z/2),isNaN(ot)&&(lt.$c()?lt.Hf(Wo)?ot=0:lt.Hf(Ss)&&(ot=tt-1):ot=lt.sb()?lt.y*(tt-1):tt/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),x<a.minScale&&(x=a.minScale),x>a.maxScale&&(x=a.maxScale),z=Qt.allocAt(a.pa.x+rt/y-rt/x,a.pa.y+ot/y-ot/x),a.position=z,Qt.free(z),a.Ca=x,ru(a),a.vb=!1,a.onViewportBoundsChanged(b,a.viewportBounds,y,!1),vl(a,!1),E.zb&&(pA(E)||E.ce.add(E.H,"scale",y,a.Ca))}}He.prototype.onViewportBoundsChanged=function(a,y,x,E){if(!a.D(y)){E===void 0&&(E=!1),E||(this.Ee=!0),this.vd=!0;var b=this.layout;b===null||!b.isViewportSized||this.autoScale!==pa||a.width===y.width&&a.height===y.height||b.C(),b=this.currentTool,this.Vk===!0&&b instanceof Co&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Oh(b,this)),this.vb||this.invalidateViewport(a,y),Uu(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.canvasSize.width=Math.round(a.width*x),this.fc.canvasSize.height=Math.round(a.height*x),this.fc.newCanvasSize.width=this.Aa,this.fc.newCanvasSize.height=this.ya,this.fc.isScroll=E,this.R("ViewportBoundsChanged",this.fc,a),this.isVirtualized&&this.links.each(function(z){z.isAvoiding&&z.actualBounds.Yc(y)&&z.bb()})}};function Uu(a,y){var x=a.fe;if(x!==null&&x.visible){for(var E=on.alloc(),b=1,z=1,tt=x.O.s,rt=tt.length,ot=0;ot<rt;ot++){var lt=tt[ot],ut=Math.abs(lt.interval);2>ut||(Mh(lt.figure)?z=z*ut/Ce.vx(z,ut):b=b*ut/Ce.vx(b,ut))}if(tt=x.gridCellSize,E.h(z*tt.width,b*tt.height),y!==void 0)b=y.width,z=y.height,a=y.x,tt=y.y;else{if(y=Ue.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){Ue.free(y);return}b=y.width,z=y.height,a=y.x,tt=y.y,Ue.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=Qt.alloc(),Ce.No(a,tt,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),on.free(E),x.part.location=y,Qt.free(y)}}He.prototype.clearSelection=function(a){a===void 0&&(a=!1);var y=this.selection;if(y.count!==0){a||this.R("ChangingSelection",y);for(var x=y.Fa(),E=x.length,b=0;b<E;b++)x[b].isSelected=!1;y.ka(),y.clear(),y.freeze(),a||this.R("ChangedSelection",y)}},He.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))},He.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),ei(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];E instanceof Ti||le("Diagram.selectCollection given something that is not a Part: "+E),E.isSelected=!0}else for(a=a.iterator;a.next();)y=a.value,y instanceof Ti||le("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},He.prototype.clearHighlighteds=function(){var a=this.highlighteds;if(0<a.count){for(var y=a.Fa(),x=y.length,E=0;E<x;E++)y[E].isHighlighted=!1;a.ka(),a.clear(),a.freeze()}},Tt=He.prototype,Tt.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},Tt.Jz=function(a){a=new Fe().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 Ti||le("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},Tt.scroll=function(a,y,x){x===void 0&&(x=1);var E=y==="up"||y==="down",b=0,z=Qt.alloc();if(a==="pixel")b=x;else if(a==="line")b=x*(E?this.scrollVerticalLineChange:this.scrollHorizontalLineChange);else if(a==="page")a=E?this.viewportBounds.height:this.viewportBounds.width,a*=this.scale,a!==0&&(b=x*Math.max(a-(E?this.scrollVerticalLineChange:this.scrollHorizontalLineChange),0));else{if(a==="document"){b=this.documentBounds,x=this.viewportBounds,y==="up"?this.position=z.h(x.x,b.y):y==="left"?this.position=z.h(b.x,x.y):y==="down"?this.position=z.h(x.x,b.bottom-x.height):y==="right"&&(this.position=z.h(b.right-x.width,x.y)),Qt.free(z);return}le("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}b/=this.scale,x=this.position,y==="up"?this.position=z.h(x.x,x.y-b):y==="down"?this.position=z.h(x.x,x.y+b):y==="left"?this.position=z.h(x.x-b,x.y):y==="right"?this.position=z.h(x.x+b,x.y):le("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),Qt.free(z)},Tt.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)},Tt.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},Tt.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)},Tt.zA=function(a){var y=this.Ab,x=a.x,E=a.y,b=x+a.width,z=E+a.height,tt=y.m11,rt=y.m12,ot=y.m21,lt=y.m22,ut=y.dx,ft=y.dy,yt=x*tt+E*ot+ut;y=x*rt+E*lt+ft;var Mt=b*tt+E*ot+ut;return a=b*rt+E*lt+ft,E=x*tt+z*ot+ut,x=x*rt+z*lt+ft,tt=b*tt+z*ot+ut,b=b*rt+z*lt+ft,z=Math.min(yt,Mt),yt=Math.max(yt,Mt),Mt=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,E),yt=Math.max(yt,E),Mt=Math.min(Mt,x),y=Math.max(y,x),z=Math.min(z,tt),yt=Math.max(yt,tt),Mt=Math.min(Mt,b),y=Math.max(y,b),new Ue(z,Mt,yt-z,y-Mt)},Tt.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),Qe(a.copy(),this.Ab)};function gg(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function ic(a){return a=Gd.get(a),a!==null?new a:new co}He.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,E=a.propertyName;if(x===oa&&E[0]==="S")if(E==="StartingFirstTransaction"){var b=this;a=this.toolManager,a.mouseDownTools.each(function(ot){return ot.diagram=b}),a.mouseMoveTools.each(function(ot){return ot.diagram=b}),a.mouseUpTools.each(function(ot){return ot.diagram=b}),this.ld||this.hf||(this.Jk=!0,this.fn&&(this.kg=!0))}else E==="StartingUndo"||E==="StartingRedo"?(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc(),this.R("ChangingSelection",this.selection)):E==="StartedTransaction"&&(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc());else if(this.aa){this.aa=!1;try{if(a.modelChange===""&&x===oa){(E==="FinishedUndo"||E==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),ua(this));var z=this.animationManager;E==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||Wr(z),E==="CommittedTransaction"&&this.undoManager.isJustDiscarded&&(this.Ce=Math.min(this.Ce,this.undoManager.historyIndex-1)),E!=="CommittedTransaction"&&E!=="RolledBackTransaction"||!this.undoManager.isPendingUnmodified||setTimeout(function(){y.isModified=!1},1);var tt=a.isTransactionFinished;if(tt&&(gg(this),this.As.clear(),Tu(this.animationManager)),!this.Rt&&tt&&this.lastInput.targetDiagram){this.Rt=!0;var rt=this;pr(function(){rt.currentTool.standardMouseOver(),rt.Rt=!1},10)}}}finally{this.aa=!0}}}};function vA(a,y){y=y.O.s;for(var x=y.length,E=0;E<x;E++)Ch(a,y[E])}function Ch(a,y){if(y instanceof cl){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof Fe&&x.Bg.add(a);var E=y.Eg;if(E!==null&&E.sq===!0&&y.diagram!==null&&y.diagram.Xn.add(y),x.hn)if(x=x.getAttribute("src")||"",E=a.Og.I(x),E===null)E=[],E.push(y),a.Og.add(x,E);else{for(a=0;a<E.length;a++)if(E[a]===y)return;E.push(y)}}}}function Hd(a,y){if(y instanceof cl){var x=y.element;if(x!==null&&x instanceof HTMLImageElement&&x.hn){var E=x.getAttribute("src")||"",b=a.Og.I(E);if(b!==null){for(var z=0;z<b.length;z++)if(b[z]===y){b.splice(z,1),b.length===0&&(a.Og.remove(E),x.Fq&&x.removeEventListener("load",x.Fq),x.Yp&&x.removeEventListener("error",x.Yp),delete x.Fq,delete x.Yp,x.Bg instanceof Fe&&x.Bg.remove(a),Bg(E));break}}}}}He.prototype.Wd=function(){this.partManager.Wd()},He.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},He.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},He.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},He.prototype.Vb=function(a){return this.partManager.Vb(a)},He.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Tt=He.prototype,Tt.Lc=function(a){return this.partManager.Lc(a)},Tt.ii=function(a){return this.partManager.ii(a)},Tt.Kc=function(a){return this.partManager.Kc(a)},Tt.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:xi(Zi(y)))},Tt.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:xi(Zi(y)))};function ru(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 Rd(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),vl(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}Tt.Va=function(){if(this.Zi){var a=Ue.alloc();Rd(this,this.computeBounds(a)),Ue.free(a)}},Tt.rz=function(){for(var a=new Fe,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},Tt.qz=function(){return this.ai.iterator},Tt.Uz=function(a){ua(this),a&&td(this,!0),this.ld?Mf(this,!1):(this.Jk=!0,Ra(this))};function td(a,y){for(var x=a.ai.iterator;x.next();)Lf(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function Lf(a,y,x){if(y!==null){for(var E=y.gl.iterator;E.next();)Lf(a,E.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function Mf(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var E=a.undoManager.transactionLevel,b=a.layout,z=a.animationManager;try{E===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=E&&!z.defaultAnimation.isAnimating&&!z.zb&&(y||bu(z,"Layout")),a.xh=!1;for(var tt=a.ai.iterator;tt.next();)rc(a,tt.value,y,E);b.isValidLayout||(!y||b.isRealtime||b.isRealtime===null||E===0?(b.doLayout(a),ua(a),b.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,E===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||E!==0&&E!==1||Wr(z),a.aa=x}}}function rc(a,y,x,E){if(y!==null){for(var b=y.gl.iterator;b.next();)rc(a,b.value,x,E);b=y.layout,b===null||b.isValidLayout||(!x||b.isRealtime||E===0?(y.rh=!y.location.w(),b.doLayout(y),y.C(32),qh(a,y),b.isValidLayout=!0):a.xh=!0)}}Tt.yz=function(){for(var a=new ne,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function pg(a){function y(b){var z=b.toLowerCase(),tt=new ne;x.add(b,tt),x.add(z,tt),E.add(b,b),E.add(z,b)}var x=new be,E=new be;y("InitialAnimationStarting"),y("AnimationStarting"),y("AnimationFinished"),y("BackgroundSingleClicked"),y("BackgroundDoubleClicked"),y("BackgroundContextClicked"),y("ClipboardChanged"),y("ClipboardPasted"),y("DocumentBoundsChanged"),y("ExternalObjectsDropped"),y("GainedFocus"),y("InitialLayoutCompleted"),y("LayoutCompleted"),y("LinkDrawn"),y("LinkRelinked"),y("LinkReshaped"),y("LostFocus"),y("Modified"),y("ObjectSingleClicked"),y("ObjectDoubleClicked"),y("ObjectContextClicked"),y("PartCreated"),y("PartResized"),y("PartRotated"),y("SelectionMoved"),y("SelectionCopied"),y("SelectionDeleting"),y("SelectionDeleted"),y("SelectionGrouped"),y("SelectionUngrouped"),y("ChangingSelection"),y("ChangedSelection"),y("SubGraphCollapsed"),y("SubGraphExpanded"),y("TextEdited"),y("TreeCollapsed"),y("TreeExpanded"),y("ViewportBoundsChanged"),y("InvalidateDraw"),a.iw=x,a.hw=E}function kf(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function _d(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;le("Unknown DiagramEvent name: "+y)}Tt.Bj=function(a,y){return a=_d(this,a),a!==null&&a.add(y),this},Tt.am=function(a,y){a=_d(this,a),a!==null&&a.remove(y)},Tt.R=function(a,y,x){var E=_d(this,a),b=new Wu;if(b.diagram=this,a=kf(this,a),a!==null&&(b.name=a),y!==void 0&&(b.subject=y),x!==void 0&&(b.parameter=x),y=E.length,y===1)E.M(0)(b);else if(y!==0)for(E=E.Fa(),x=0;x<y;x++)(0,E[x])(b)};function Kd(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}Tt.Yj=function(a,y){return ed(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},He.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?Vl(this,a):a.assign(this.documentBounds)};function ed(a,y,x,E){var b=a.Xh;if(b===null&&(a.Xh=b=new Sp(a.avoidanceCellSize)),b.vs||b.group!==x||b.Yx!==E){if(b.Hx=Math.max(b.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.width)),b.Ix=Math.max(b.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.height)),x!==null&&(x=Ph(a,x)),x===null){y=Ue.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),b.initialize(y);for(var z=a.nodes;z.next();){var tt=z.value,rt=tt.layer;rt!==null&&rt.visible&&!rt.isTemporary&&oc(a,tt,E,y)}Ue.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),b.initialize(y)),y=Ue.alloc(),z=x.memberParts;z.next();)tt=z.value,tt instanceof ri&&oc(a,tt,E,y);Ue.free(y)}b.group=x,b.Yx=E,b.vs=!1}else y&&l1(b);return b}function Ph(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?Ph(a,y.containingGroup):null}function oc(a,y,x,E){if(y!==x&&y.isVisible()){if(y.avoidable&&!y.isLinkLabel){y=y.getAvoidableRect(E),a=a.Xh;var b=y.x,z=y.y;if(Mg(a,b,z))for(x=(z-a.Od)/a.sc|0,E=Math.min((b+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((z+y.height-a.Od)/a.sc|0,a.ei),b=(b-a.Nd)/a.rc|0;b<=E;b++)if(z=a.ac[b],z.fill)z.fill(Cc,x,y+1);else for(var tt=x;tt<=y;tt++)z[tt]=Cc}else if(y instanceof lr)for(y=y.memberParts;y.next();)b=y.value,b instanceof ri&&oc(a,b,x,E)}}function Qu(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}He.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():bf(this)};function bf(a){a.vk===-1&&(a.vk=pr(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=Ue.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Rd(a,y),Ue.free(y),a.Fc=!0,a.bd(),bf(a))}},a.vp))}He.prototype.ug=function(){this.vk!==-1&&(se.clearTimeout(this.vk),this.vk=-1)},He.prototype.computeAutoScrollPosition=function(a){var y=this.position,x=this.xp;if(0>=x.top&&0>=x.left&&0>=x.right&&0>=x.bottom)return y;var E=this.viewportBounds,b=this.scale;E=Ue.allocAt(0,0,E.width*b,E.height*b);var z=Qt.allocAt(0,0);if(a.x>=E.x&&a.x<E.x+x.left&&this.allowHorizontalScroll){var tt=Math.max(this.scrollHorizontalLineChange,1);tt|=0,z.x-=tt,a.x<E.x+x.left/2&&(z.x-=tt),a.x<E.x+x.left/4&&(z.x-=4*tt)}else a.x<=E.x+E.width&&a.x>E.x+E.width-x.right&&this.allowHorizontalScroll&&(tt=Math.max(this.scrollHorizontalLineChange,1),tt|=0,z.x+=tt,a.x>E.x+E.width-x.right/2&&(z.x+=tt),a.x>E.x+E.width-x.right/4&&(z.x+=4*tt));return a.y>=E.y&&a.y<E.y+x.top&&this.allowVerticalScroll?(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y-=tt,a.y<E.y+x.top/2&&(z.y-=tt),a.y<E.y+x.top/4&&(z.y-=4*tt)):a.y<=E.y+E.height&&a.y>E.y+E.height-x.bottom&&this.allowVerticalScroll&&(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y+=tt,a.y>E.y+E.height-x.bottom/2&&(z.y+=tt),a.y>E.y+E.height-x.bottom/4&&(z.y+=4*tt)),z.Xa(ye)||(y=new Qt(y.x+z.x/b,y.y+z.y/b)),Ue.free(E),Qt.free(z),y},Tt=He.prototype,Tt.Cs=function(){return null},Tt.av=function(){return null},Tt.bs=function(a,y){this.pj.add(a,y)},Tt.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof lr&&(y.$p=null)})};function nd(a,y,x){function E(){var ut=+new Date;for(z=!0,tt.reset();tt.next();)if(!tt.value[0].al){z=!1;break}z||ut-lt>ot?y(x,b,rt):se.requestAnimationFrame(E)}for(var b=x.callback,z=!0,tt=a.Og.iterator;tt.next();)if(!tt.value[0].al){z=!1;break}if(typeof b!="function"||z)return y(x,b,a);var rt=a,ot=x.callbackTimeout||300,lt=+new Date;return se.requestAnimationFrame(function(){E()}),null}Tt.Wz=function(a){return Xo?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Tt.Jx=function(a){return a===void 0&&(a={}),nd(this,this.Xz,a)},Tt.Xz=function(a,y,x){var E=mg(x,a,"canvas",null);if(E===null)return null;x=E.Z.canvas;var b=null;if(x!==null)switch(b=a.returnType,b===void 0?b="string":b=b.toLowerCase(),b){case vu+"data":b=E.getImageData(0,0,x.width,x.height);break;case vu:E=(a.document||document).createElement("img"),E.src=x.toDataURL(a.type,a.details),b=E;break;case"blob":return typeof y!="function"&&le('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.'),typeof x.toBlob=="function"?(x.toBlob(y,a.type,a.details),"toBlob"):(y(null),null);default:b=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(b),null):b};function mg(a,y,x,E){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&le("properties argument must be an Object.");var b=y.size||null,z=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(z="NaN");var tt=y.maxSize;y.maxSize===void 0&&(tt=x==="SVG"?new on(1/0,1/0):new on(2e3,2e3));var rt=y.position||null,ot=y.parts||null,lt=y.padding===void 0?1:y.padding,ut=y.background||null,ft=y.omitTemporary;ft===void 0&&(ft=!0);var yt=y.document||document,Mt=y.elementFinished||null,bt=y.showTemporary;bt===void 0&&(bt=!ft),y=y.showGrid,y===void 0&&(y=bt),b!==null&&isNaN(b.width)&&isNaN(b.height)&&(b=null),typeof lt=="number"?lt=new sr(lt):lt instanceof sr||le("MakeImage padding must be a Margin or a number."),lt.left=Math.max(lt.left,0),lt.right=Math.max(lt.right,0),lt.top=Math.max(lt.top,0),lt.bottom=Math.max(lt.bottom,0),a.ib.Vc(!0),ft=new Xl(null,yt,void 0,!0);var Dt=ft.context;if(!(b||z||ot||rt))return ft.width=a.Aa+Math.ceil(lt.left+lt.right),ft.height=a.ya+Math.ceil(lt.top+lt.bottom),x==="SVG"?E===null?null:(E.resize(ft.width,ft.height,ft.width,ft.height),E.ownerDocument=yt,E.hs=Mt,$h(a,E.context,lt,new on(ft.width,ft.height),a.Ca,a.pa,ot,ut,bt,y),E.context):(a.Xm=!1,$h(a,Dt,lt,new on(ft.width,ft.height),a.Ca,a.pa,ot,ut,bt,y),a.Xm=!0,ft.context);var qt=a.Pp,Vt=a.documentBounds.copy();if(Vt.Fv(a.yb),bt)for(var oe=a.Wa.s,ce=oe.length,ge=0;ge<ce;ge++){var Se=oe[ge];if(Se.visible&&Se.isTemporary){Se=Se.Pa.s;for(var Re=Se.length,qn=0;qn<Re;qn++){var gi=Se[qn];gi.isInDocumentBounds&&gi.isVisible()&&(gi=gi.actualBounds,gi.w()&&Vt.ed(gi))}}}if(oe=new Qt(Vt.x,Vt.y),ot!==null){for(ce=new Ue(0,0,0,0),ge=!0,Se=ot.iterator,Se.reset();Se.next();)Re=Se.value,Re instanceof Ti&&(qn=Re.layer,qn!==null&&!qn.visible||qn!==null&&!bt&&qn.isTemporary||!Re.isVisible()||(Re=Re.actualBounds,Re.w()&&(ge?(ge=!1,ce.assign(Re)):ce.ed(Re))));Vt.width=ce.width,Vt.height=ce.height,oe.x=ce.x,oe.y=ce.y}return rt!==null&&rt.w()&&(oe=rt,z||(z=qt)),ce=rt=0,lt!==null&&(rt=lt.left+lt.right,ce=lt.top+lt.bottom),ge=Se=0,b!==null&&(Se=b.width,ge=b.height,isFinite(Se)&&(Se=Math.max(0,Se-rt)),isFinite(ge)&&(ge=Math.max(0,ge-ce))),b!==null&&z!==null?(z==="NaN"&&(z=qt),b.w()?(b=Se,Vt=ge):isNaN(ge)?(b=Se,Vt=Vt.height*z):(b=Vt.width*z,Vt=ge)):b!==null?b.w()?(z=Math.min(Se/Vt.width,ge/Vt.height),b=Se,Vt=ge):isNaN(ge)?(z=Se/Vt.width,b=Se,Vt=Vt.height*z):(z=ge/Vt.height,b=Vt.width*z,Vt=ge):z!==null?z==="NaN"&&tt.w()?(z=Math.min((tt.width-rt)/Vt.width,(tt.height-ce)/Vt.height),z>qt?(z=qt,b=Vt.width,Vt=Vt.height):(b=tt.width,Vt=tt.height)):(b=Vt.width*z,Vt=Vt.height*z):(z=qt,b=Vt.width,Vt=Vt.height),lt!==null?(b+=rt,Vt+=ce):lt=new sr(0),tt!==null&&(qt=tt.width,tt=tt.height,isNaN(qt)&&(qt=2e3),isNaN(tt)&&(tt=2e3),isFinite(qt)&&(b=Math.min(b,qt)),isFinite(tt)&&(Vt=Math.min(Vt,tt))),ft.width=Math.ceil(b),ft.height=Math.ceil(Vt),x==="SVG"?E===null?null:(E.resize(ft.width,ft.height,ft.width,ft.height),E.ownerDocument=yt,E.hs=Mt,$h(a,E.context,lt,new on(Math.ceil(b),Math.ceil(Vt)),z,oe,ot,ut,bt,y),E.context):(a.Xm=!1,$h(a,Dt,lt,new on(Math.ceil(b),Math.ceil(Vt)),z,oe,ot,ut,bt,y),a.Xm=!0,ft.context)}Sn.Object.defineProperties(He.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof pt||(a===""&&(a="default"),a=a.toLowerCase(),a!==this.nl&&(this.nl=a,a==="default"||a==="canvas"?(a=this.pj.get("svg"),a!==null&&a.Oa.remove(),this.ta&&(this.ib=this.ta.context)):a==="svg"?(this.pj.contains("svg")?a=this.pj.get("svg"):(a=new Ba(this,se.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 Ba(this,se.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(se,"resize",this.Ov,!1),this.removeEventListener(se,"wheel",this.$j,!0),Iu===this&&(Iu=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Vc(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)&&Xn(a,"0 <= value <= 1",He,"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),vl(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),vl(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),vl(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),vl(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&Xn(a,">= 0",He,"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&&Xn(a,">= 0",He,"scrollVerticalLineChange"),this.mu=a,this.g("scrollVerticalLineChange",y,a))}},lastInput:{get:function(){return this.cj},set:function(a){this.cj=a}},previousInput:{get:function(){return this.Qg},set:function(a){this.Qg=a}},firstInput:{get:function(){return this.bq},set:function(a){this.bq=a}},currentCursor:{get:function(){return this.it},set:function(a){if(a===""&&(a=this.Op),this.it!==a){var y=this.ta,x=this.Ka;if(y!==null&&x!==null){this.it=a;var E=y.style.cursor;y.style.cursor=a,x.style.cursor=a,y.style.cursor===E&&(y.style.cursor="-webkit-"+a,x.style.cursor="-webkit-"+a,y.style.cursor===E&&(y.style.cursor="-moz-"+a,x.style.cursor="-moz-"+a,y.style.cursor===E&&(y.style.cursor=a,x.style.cursor=a)))}}}},defaultCursor:{get:function(){return this.Op},set:function(a){a===""&&(a="auto");var y=this.Op;y!==a&&(this.Op=a,this.g("defaultCursor",y,a))}},click:{get:function(){return this.zh},set:function(a){var y=this.zh;y!==a&&(this.zh=a,this.g("click",y,a))}},doubleClick:{get:function(){return this.Fh},set:function(a){var y=this.Fh;y!==a&&(this.Fh=a,this.g("doubleClick",y,a))}},contextClick:{get:function(){return this.Bh},set:function(a){var y=this.Bh;y!==a&&(this.Bh=a,this.g("contextClick",y,a))}},mouseOver:{get:function(){return this.Qh},set:function(a){var y=this.Qh;y!==a&&(this.Qh=a,this.g("mouseOver",y,a))}},mouseHover:{get:function(){return this.Oh},set:function(a){var y=this.Oh;y!==a&&(this.Oh=a,this.g("mouseHover",y,a))}},mouseHold:{get:function(){return this.Nh},set:function(a){var y=this.Nh;y!==a&&(this.Nh=a,this.g("mouseHold",y,a))}},mouseDragOver:{get:function(){return this.Qt},set:function(a){var y=this.Qt;y!==a&&(this.Qt=a,this.g("mouseDragOver",y,a))}},mouseDrop:{get:function(){return this.Lh},set:function(a){var y=this.Lh;y!==a&&(this.Lh=a,this.g("mouseDrop",y,a))}},handlesDragDropForTopLevelParts:{get:function(){return this.xt},set:function(a){var y=this.xt;y!==a&&(this.xt=a,this.g("handlesDragDropForTopLevelParts",y,a))}},mouseEnter:{get:function(){return this.Mh},set:function(a){var y=this.Mh;y!==a&&(this.Mh=a,this.g("mouseEnter",y,a))}},mouseLeave:{get:function(){return this.Ph},set:function(a){var y=this.Ph;y!==a&&(this.Ph=a,this.g("mouseLeave",y,a))}},toolTip:{get:function(){return this.$h},set:function(a){var y=this.$h;y!==a&&(this.$h=a,this.g("toolTip",y,a))}},contextMenu:{get:function(){return this.Ch},set:function(a){var y=this.Ch;y!==a&&(this.Ch=a,this.g("contextMenu",y,a))}},commandHandler:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a,a.Xe(this))}},toolManager:{get:function(){return this.te},set:function(a){this.te!==a&&(this.te=a,a.diagram=this)}},defaultTool:{get:function(){return this.ob},set:function(a){var y=this.ob;y!==a&&(this.ob=a,a.diagram=this,this.currentTool===y&&(this.currentTool=a))}},currentTool:{get:function(){return this.hb},set:function(a){var y=this.hb;y&&(y.isActive&&y.doDeactivate(),y.cancelWaitAfter(),y.doStop()),a===null&&(a=this.defaultTool),a!==null&&(this.hb=a,a.diagram=this,a.doStart())}},selection:{get:function(){return this.Hw}},maxSelectionCount:{get:function(){return this.Nt},set:function(a){var y=this.Nt;if(y!==a)if(0<=a&&!isNaN(a)){if(this.Nt=a,this.g("maxSelectionCount",y,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0<a)){this.R("ChangingSelection",this.selection),y=this.selection.Fa();for(var x=0;x<a;x++)y[x].isSelected=!1;this.R("ChangedSelection",this.selection)}}else Xn(a,">= 0",He,"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||gg(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&&le("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=Dd(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var E=this.vb;this.vb=!0,bu(this.animationManager,"Model"),y&&(this.pf!==null&&this.pf.each(function(z){return y.ik(z)}),y.ik(this.Oc)),this.cc=a,this.partManager=ic(this.cc.type);for(var b=0;b<x.length;b++)this.add(x[b]);a.Pe(this.Hb),this.partManager.addAllModeledParts(),a.ik(this.Hb),a.Pe(this.Oc),this.pf!==null&&this.pf.each(function(z){return a.Pe(z)}),this.vb=E,this.Ya(),this.vb||this.N(),y&&a.undoManager.copyProperties(y.undoManager)}}},aa:{get:function(){return this.rw},set:function(a){this.rw=a}},As:{get:function(){return this.sy}},skipsModelSourceBindings:{get:function(){return this.Iw},set:function(a){this.Iw=a}},Ns:{get:function(){return this.ou},set:function(a){this.ou=a}},nodeTemplate:{get:function(){return this.Lg.I("")},set:function(a){var y=this.Lg.I("");y!==a&&(this.Lg.add("",a),this.g("nodeTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},nodeTemplateMap:{get:function(){return this.Lg},set:function(a){var y=this.Lg;y!==a&&(this.Lg=a,this.g("nodeTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplate:{get:function(){return this.Yi.I("")},set:function(a){var y=this.Yi.I("");y!==a&&(this.Yi.add("",a),this.g("groupTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplateMap:{get:function(){return this.Yi},set:function(a){var y=this.Yi;y!==a&&(this.Yi=a,this.g("groupTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplate:{get:function(){return this.Kh.I("")},set:function(a){var y=this.Kh.I("");y!==a&&(this.Kh.add("",a),this.g("linkTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplateMap:{get:function(){return this.Kh},set:function(a){var y=this.Kh;y!==a&&(this.Kh=a,this.g("linkTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},isMouseCaptured:{get:function(){return this.qw},set:function(a){var y=this.ta;y!==null&&(y=y.Oa,y instanceof SVGElement||(a?(this.lastInput.bubbles=!1,this.removeEventListener(y,"pointermove",this.dk,!1),this.removeEventListener(y,"pointerdown",this.ui,!1),this.removeEventListener(y,"pointerup",this.fk,!1),this.removeEventListener(y,"pointerout",this.ek,!1),this.removeEventListener(y,"pointercancel",this.ck,!1),this.addEventListener(se,"pointermove",this.dk,!0),this.addEventListener(se,"pointerdown",this.ui,!0),this.addEventListener(se,"pointerup",this.fk,!0),this.addEventListener(se,"pointerout",this.ek,!0),this.addEventListener(se,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(se,"wheel",this.$j,!0),this.addEventListener(se,"selectstart",this.preventDefault,!1)):(this.removeEventListener(se,"pointermove",this.dk,!0),this.removeEventListener(se,"pointerdown",this.ui,!0),this.removeEventListener(se,"pointerup",this.fk,!0),this.removeEventListener(se,"pointerout",this.ek,!0),this.removeEventListener(se,"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(se,"wheel",this.$j,!0),this.removeEventListener(se,"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=Qt.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),Vh(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?ru(this):(this.vb=!0,a=this.scale,yf(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)}Qt.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=cg(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=cg(this)),a.type!==Bn.Grid&&le("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),Uu(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),ru(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||le("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 sr(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===yA&&vl(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,vl(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,Ef(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&&Ef(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!==pa&&vl(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()||le("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()||le("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)):Xn(a,"> 0",He,"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)):Xn(a,"> 0",He,"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),vl(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 sr(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&&le("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();)cp(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==YA&&a!==Fs&&a!==wA&&le("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 on(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 sr(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Sn.Object.defineProperties(He,{licenseKey:{get:function(){return Vd.jc()},set:function(a){Vd.add(a.replace(/\s/g,""))}},version:{get:function(){return $s}}}),He.prototype.makeImageData=He.prototype.Jx,He.prototype.makeImage=He.prototype.Wz,He.prototype.cacheGroupExternalLinks=He.prototype.Fu,He.prototype.addRenderer=He.prototype.bs,He.prototype.makeSVG=He.prototype.av,He.prototype.makeSvg=He.prototype.Cs,He.prototype.stopAutoScroll=He.prototype.ug,He.prototype.doAutoScroll=He.prototype.gs,He.prototype.isUnoccupied=He.prototype.Yj,He.prototype.raiseDiagramEvent=He.prototype.R,He.prototype.removeDiagramListener=He.prototype.am,He.prototype.addDiagramListener=He.prototype.Bj,He.prototype.findTreeRoots=He.prototype.yz,He.prototype.layoutDiagram=He.prototype.Uz,He.prototype.findTopLevelGroups=He.prototype.qz,He.prototype.findTopLevelNodesAndLinks=He.prototype.rz,He.prototype.ensureBounds=He.prototype.Va,He.prototype.findLinksByExample=He.prototype.ls,He.prototype.findNodesByExample=He.prototype.ms,He.prototype.findLinkForData=He.prototype.Kc,He.prototype.findNodeForData=He.prototype.ii,He.prototype.findPartForData=He.prototype.Lc,He.prototype.findLinkForKey=He.prototype.findLinkForKey,He.prototype.findNodeForKey=He.prototype.Vb,He.prototype.findPartForKey=He.prototype.findPartForKey,He.prototype.rebuildParts=He.prototype.Wd,He.prototype.transformViewToDoc=He.prototype.Ps,He.prototype.transformRectDocToView=He.prototype.zA,He.prototype.transformDocToView=He.prototype.op,He.prototype.centerRect=He.prototype.es,He.prototype.scrollToRect=He.prototype.tv,He.prototype.scroll=He.prototype.scroll,He.prototype.highlightCollection=He.prototype.Jz,He.prototype.highlight=He.prototype.Iz,He.prototype.selectCollection=He.prototype.rA,He.prototype.select=He.prototype.select,He.prototype.updateAllRelationshipsFromData=He.prototype.rp,He.prototype.updateAllTargetBindings=He.prototype.updateAllTargetBindings,He.prototype.commit=He.prototype.commit,He.prototype.rollbackTransaction=He.prototype.Kf,He.prototype.commitTransaction=He.prototype.eb,He.prototype.startTransaction=He.prototype.Ea,He.prototype.raiseChanged=He.prototype.g,He.prototype.raiseChangedEvent=He.prototype.cb,He.prototype.removeChangedListener=He.prototype.ik,He.prototype.addChangedListener=He.prototype.Pe,He.prototype.removeModelChangedListener=He.prototype.mA,He.prototype.addModelChangedListener=He.prototype.Yw,He.prototype.findLayer=He.prototype.Qj,He.prototype.removeLayer=He.prototype.kA,He.prototype.addLayerAfter=He.prototype.Cy,He.prototype.addLayerBefore=He.prototype.Ww,He.prototype.addLayer=He.prototype.Al,He.prototype.moveParts=He.prototype.moveParts,He.prototype.copyParts=He.prototype.Kj,He.prototype.removeParts=He.prototype.Is,He.prototype.remove=He.prototype.remove,He.prototype.add=He.prototype.add,He.prototype.clearDelayedGeometries=He.prototype.bx,He.prototype.setProperties=He.prototype.nm,He.prototype.attach=He.prototype.Du,He.prototype.set=He.prototype.set,He.prototype.resetInputOptions=He.prototype.Sx,He.prototype.setInputOption=He.prototype.sA,He.prototype.getInputOption=He.prototype.Ql,He.prototype.resetRenderingHints=He.prototype.Tx,He.prototype.setRenderingHint=He.prototype.Xx,He.prototype.getRenderingHint=He.prototype.Gf,He.prototype.maybeUpdate=He.prototype.bd,He.prototype.requestUpdate=He.prototype.$b,He.prototype.delayInitialization=He.prototype.Xy,He.prototype.isUpdateRequested=He.prototype.Pz,He.prototype.invalidateDocumentBounds=He.prototype.Ya,He.prototype.findObjectsNear=He.prototype.og,He.prototype.findPartsNear=He.prototype.mz,He.prototype.findObjectsIn=He.prototype.Cf,He.prototype.findPartsIn=He.prototype.ux,He.prototype.findObjectsAt=He.prototype.ji,He.prototype.findPartsAt=He.prototype.lz,He.prototype.findObjectAt=He.prototype.ic,He.prototype.findPartAt=He.prototype.Ol,He.prototype.focusObject=He.prototype.zz,He.prototype.alignDocument=He.prototype.Jy,He.prototype.zoomToRect=He.prototype.BA,He.prototype.zoomToFit=He.prototype.zoomToFit,He.prototype.diagramScroll=He.prototype.kx,He.prototype.focus=He.prototype.focus;var Gd=new be,Tf=null,Xo=se.document!==void 0,Fh=null,ZA="",pa=new Oe(He,"None",0),ll=new Oe(He,"Uniform",1),WA=new Oe(He,"UniformToFill",2),id=new Oe(He,"CycleAll",10),sc=new Oe(He,"CycleNotDirected",11),ac=new Oe(He,"CycleNotDirectedFast",12),zd=new Oe(He,"CycleNotUndirected",13),jd=new Oe(He,"CycleDestinationTree",14),Nf=new Oe(He,"CycleSourceTree",15),yA=new Oe(He,"DocumentScroll",1),lc=new Oe(He,"InfiniteScroll",2),YA=new Oe(He,"TreeParentCollapsed",21),Fs=new Oe(He,"AllParentsCollapsed",22),wA=new Oe(He,"AnyParentsCollapsed",23),Vd=new ne,$s="2.3.10",vu="image",tA=null,xA=!1;function Hs(){if(Xo){var a=se.document.createElement("canvas"),y=a.getContext("2d"),x=ni("7ca11abfd022028846");y[x]=ni("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",Mn.Dx+"4ae6247590da4bb21c324ba3a84e385776",Yi.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",Ce.za],b=1;5>b;b++)y[ni("7ca11abfd7330390")](ni(E[b-1]),10,15*b);for(y[x]=ni("39f046ebb36e4b"),x=1;5>x;x++)y[ni("7ca11abfd7330390")](ni(E[x-1]),10,15*x);(E.length!==4||E[0][0]!=="5"||E[3][0]!=="7")&&(Yi.prototype.Cd=Yi.prototype.Eu),tA=a}}He.className="Diagram",He.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=se.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof He?y.H:null},He.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},He.useDOM=function(a){Xo=a?se.document!==void 0:!1},He.isUsingDOM=function(){return Xo},He.None=pa,He.Uniform=ll,He.UniformToFill=WA,He.CycleAll=id,He.CycleNotDirected=sc,He.CycleNotDirectedFast=ac,He.CycleNotUndirected=zd,He.CycleDestinationTree=jd,He.CycleSourceTree=Nf,He.DocumentScroll=yA,He.InfiniteScroll=lc,He.TreeParentCollapsed=YA,He.AllParentsCollapsed=Fs,He.AnyParentsCollapsed=wA;function uc(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Wl(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=se[ni("76a715b2f73f148a")][ni("72ba13b5")]||"";if(a.Rc=!0,Xo){var E=He[ni("76a115b6ed251eaf4692")];if(E)for(var b=Vd.iterator;b.next()&&(E=b.value,E=ni(E).split(ni("39e9")),!(6>E.length));){var z=ni(E[1]).split(".");if(E[4]!=="7da71ca0")break;var tt=ni(Mn[ni("6cae19")]).split(".");if(z[0]>tt[0]||z[0]===tt[0]&&z[1]>=tt[1]){var rt=se[ni("74a900bae4370f8b51")][ni("6fbb13a1c2311e8a57")].toLowerCase();if(tt=rt[ni("73a612b6fb191d")](ni("3aad1ab6e022098b4dc4")),z=ni(E[2]),-1<tt&&(rt=rt[ni("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<rt&&rt<tt),!a.Rc))break;for(tt=x[ni("76ad18b4f73e")],rt=x[ni("73a612b6fb191d")](ni("35e7"))+2;rt<tt;rt++)y+=x[rt];if(tt=y[ni("73a612b6fb191d")](z),0>tt&&z!==ni("7da71ca0ad381e90")&&(tt=y[ni("73a612b6fb191d")](ni("76a715b2ef3e149757"))),0>tt&&(tt=y[ni("73a612b6fb191d")](ni("76a715b2ef3e149757"))),0>tt&&(tt=y[ni("73a612b6fb191d")](ni("2bfa41fdb3784bca12"))),0>tt&&(tt=x[ni("73a612b6fb191d")](ni("7baa19a6f76c1988428554"))),a.Rc=!(0<=tt&&tt<y[ni("73a612b6fb191d")](ni("35"))||y[ni("73a612b6fb191d")](ni("35"))===-1),!a.Rc||x[ni("73a612b6fb191d")](ni("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[ni("73a612b6fb191d")](z)),!a.Rc)||(tt=se[ni("76a715b2f73f148a")][ni("69ad17a1e03e")],rt=tt[ni("73a612b6fb191d")](ni("7fb002b6ed25128b4da25b2e")),-1<rt&&(a.Rc=!(tt[ni("73a612b6fb191d")](z)>rt),!a.Rc)))break;if(z[0]==="#"){tt=se.document.createElement("div");for(var ot=E[0].replace(/[A-Za-z]/g,"");4>ot.length;)ot+="9";if(rt=ot,ot=ot.substr(ot.length-4),E="",E+=["gsh","gsf"][parseInt(ot.substr(0,1),10)%2],E+=["Header","Background","Display","Feedback"][parseInt(ot.substr(0,1),10)%4],tt[ni("79a417a0f0181a8946")]=E,se.document[ni("78a712aa")]){se.document[ni("78a712aa")][ni("7bb806b6ed32388c4a875b")](tt),ot=se.getComputedStyle(tt).getPropertyValue(ni("78a704b7e62456904c9b12701b6532a8"));var lt=se.getComputedStyle(tt).getPropertyValue(ni("75b817b0ea2202"));if(se.document[ni("78a712aa")][ni("68ad1bbcf533388c4a875b")](tt),ot){if(tt=se[ni("77a902b0eb1b1e804a8a")],lt==="0."+parseInt(rt,10)%100||ot.indexOf(parseInt(z[1]+z[2],16))!==-1&&ot.indexOf(parseInt(z[3]+z[4],16))!==-1){a.Rc=!1;break}else if(tt&&tt(ni("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(E="."+E,z=0;z<document.styleSheets.length;z++){tt=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var ut in tt)if(E===tt[ut].selectorText){a.Rc=!1;break t}}}}else a.Rc=null,a.Rc=!1}}}else{for(ut=x[ni("76ad18b4f73e")],b=x[ni("73a612b6fb191d")](ni("35e7"))+2;b<ut;b++)y+=x[b];x=y[ni("73a612b6fb191d")](ni("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[ni("73a612b6fb191d")](ni("35")))}}}return 0<a.Rc&&a!==a.wy}uc.className="DiagramHelper";function eA(a){this.j=a===void 0?new Qt:a,this.o=new Qt}Sn.Object.defineProperties(eA.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 Ac="DraggingInfo";eA.className="DraggingInfo";function it(a,y,x){this.node=a,this.info=y,this.Su=x}it.className="DraggingNodeInfoPair";function st(){this.reset()}st.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new on(NaN,NaN).freeze(),this.gridSnapCellSpot=br,this.gridSnapOrigin=new Qt(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},st.className="DraggingOptions";function ct(a,y){if(typeof a=="string"||se.Element&&a instanceof Element)var x=He.call(this,a)||this;else x=He.call(this)||this,y=a;return ht(x),y&&x.nm(y),x}We(ct,He);function ht(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=Xr,a.layout=new Aa}ct.prototype.reset=function(){He.prototype.reset.call(this),ht(this)},ct.className="Palette";function pt(a,y){if(typeof a=="string"||se.Element&&a instanceof Element)var x=He.call(this,a)||this;else x=He.call(this)||this,y=a;var E=x;x.animationManager.isEnabled=!1,x.vb=!0,x.V=null,x.mn=!1,x.nn=!1,x.F=!0,x.u=!0,x.ia=0,x.o=!1,x.ql=null,x.Xx("drawShadows",!1),a=new Ti;var b=new vr;return b.stroke="magenta",b.strokeWidth=2,b.fill="transparent",b.name="BOXSHAPE",a.selectable=!0,a.selectionAdorned=!1,a.selectionObjectName="BOXSHAPE",a.locationObjectName="BOXSHAPE",a.resizeObjectName="BOXSHAPE",a.cursor="move",a.add(b),x.j=a,x.allowCopy=!1,x.allowDelete=!1,x.allowSelect=!0,x.autoScrollRegion=new sr(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new $t,x.toolManager.mouseMoveTools),x.click=function(){var z=E.observed;if(z!==null){var tt=z.viewportBounds,rt=E.lastInput.documentPoint;z.position=new Qt(rt.x-tt.width/2,rt.y-tt.height/2)}},x.Pf=function(){E.Ya(),Kt(E)},x.Xd=function(){E.observed!==null&&(E.Ya(),E.N())},x.Ha=function(){1>E.updateDelay?E.N():E.o||(E.o=!0,setTimeout(function(){return E.redraw()},E.updateDelay))},x.Of=function(){E.observed!==null&&Kt(E)},x.autoScale=ll,x.vb=!1,y&&Object.assign(x,y),x}We(pt,He),pt.prototype.computePixelRatio=function(){return 1},pt.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.ta,y=this.ib;if(a!==null&&y!==null){if(ec(this),this.ql===null){var x=new Xl(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),Nt(this)}finally{this.ta=a,this.ib=y}}}He.prototype.redraw.call(this)},pt.prototype.gc=function(){if(this.Ka===null&&le("No div specified"),this.ta===null&&le("No canvas specified"),!(this.ta instanceof Ba)&&(qm(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){ec(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?Nt(this):this.ql!==null&&(a.drawImage(this.ql.Oa,0,0),y=this.Ab,y.reset(),this.scale!==1&&y.scale(this.scale),this.position.x===0&&this.position.y===0||y.translate(-this.position.x,-this.position.y),a.scale(this.Mb,this.Mb),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.yc()),y=this.Wa.s;for(var x=y.length,E=0;E<x;E++)y[E].gc(a,this);this.Fc=this.vd=!1}}};function Nt(a){var y=a.observed;if(y!==null){var x=a.drawsTemporaryLayers,E=a.drawsGrid&&x,b=y.grid;E&&b!==null&&b.visible&&!isNaN(b.width)&&!isNaN(b.height)&&(b=Ue.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Uu(y,b),Ue.free(b),ua(y));var z=a.Ab;z.reset(),a.scale!==1&&z.scale(a.scale),a.position.x===0&&a.position.y===0||z.translate(-a.position.x,-a.position.y),b=a.ib,b.scale(a.Mb,a.Mb),b.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),b.yc(),y=y.Wa.s,z=y.length;for(var tt=0;tt<z;tt++){var rt=y[tt],ot=a;if(rt.visible&&rt.opacity!==0){var lt=rt.diagram.grid.part;if(!x&&rt.isTemporary)E&&lt.layer===rt&&(rt=mA(rt,b),lt.gc(b,ot),b.globalAlpha=rt);else{for(var ut=mA(rt,b),ft=ot.scale,yt=Ue.alloc(),Mt=rt.Pa.s,bt=Mt.length,Dt=0;Dt<bt;Dt++){var qt=Mt[Dt];(E||qt!==lt)&&rt.Oj(b,qt,ot,null,ft,yt,!1)}Ue.free(yt),b.globalAlpha=ut}}}}}function Kt(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var E=y.selectionObject,b=on.alloc();b.h(x.width,x.height),E.desiredSize=b,on.free(b),a=2/a.scale,E instanceof vr&&(E.strokeWidth=a),y.location=new Qt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}pt.prototype.computeBounds=function(){var a=this.observed;if(a===null)return Zs;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},pt.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},pt.prototype.onViewportBoundsChanged=function(a,y,x,E){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),Kt(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.Oz=E,this.R("ViewportBoundsChanged",this.fc,a))},Sn.Object.defineProperties(pt.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof pt&&le("Overview.observed Diagram may not be an Overview itself: "+a),y!==a){if(y!==null&&(this.remove(this.box),y.am("ViewportBoundsChanged",this.Pf),y.am("DocumentBoundsChanged",this.Xd),y.am("InvalidateDraw",this.Ha),y.am("AnimationFinished",this.Of)),this.V=a,a!==null&&(a.Bj("ViewportBoundsChanged",this.Pf),a.Bj("DocumentBoundsChanged",this.Xd),a.Bj("InvalidateDraw",this.Ha),a.Bj("AnimationFinished",this.Of),this.add(this.box)),this.Ya(),a===null){this.ql=null;var x=this.ta,E=this.ib;x&&E&&(E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,x.width,x.height))}else this.Ha(null),Kt(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),Kt(this),this.g("box",y,a))}},drawsTemporaryLayers:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a,this.redraw())}},drawsGrid:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a,this.redraw())}},updateDelay:{get:function(){return this.ia},set:function(a){0>a&&(a=0),this.ia!==a&&(this.ia=a)}}}),pt.className="Overview";function $t(){Ho.call(this),this.j=null}We($t,Ho),$t.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 Qt(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new Qt(a.x-this.j.x,a.y-this.j.y)),!0)},$t.prototype.doActivate=function(){this.j=null,Ho.prototype.doActivate.call(this)},$t.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},$t.prototype.moveParts=function(){var a=this.diagram,y=a.observed;if(y!==null){var x=a.box;if(x!==null){if(this.j===null){var E=a.firstInput.documentPoint;x=x.location,this.j=new Qt(E.x-x.x,E.y-x.y)}a=a.lastInput.documentPoint,y.position=new Qt(a.x-this.j.x,a.y-this.j.y)}}},$t.className="OverviewDraggingTool";function Jt(){an(this),this.H=Iu,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=Zs,this.hb=!0,this.cg=null,this.ob=200}Jt.prototype.toString=function(){return"CommandHandler"},Jt.prototype.Xe=function(a){this.H=a},Jt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=er?y.meta:y.control,E=y.shift,b=y.alt,z=y.key;!x||z!=="C"&&z!=="Insert"?x&&z==="X"||E&&z==="Del"?this.canCutSelection()&&this.cutSelection():x&&z==="V"||E&&z==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&z==="Y"||b&&E&&z==="Backspace"?this.canRedo()&&this.redo():x&&z==="Z"||b&&z==="Backspace"?this.canUndo()&&this.undo():z==="Del"||z==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&z==="A"?this.canSelectAll()&&this.selectAll():z==="Esc"?this.canStopCommand()&&this.stopCommand():z==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):z==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):z==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):z==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):z==="PageUp"?E&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):z==="PageDown"?E&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):z==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):z==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):z===" "?this.canScrollToPart()&&this.scrollToPart():z==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():z==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&z==="0"?this.canResetZoom()&&this.resetZoom():E&&z==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!E&&z==="G"?this.canGroupSelection()&&this.groupSelection():x&&E&&z==="G"?this.canUngroupSelection()&&this.ungroupSelection():z==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():z==="ContextMenu"||y.event&&y.event.key==="ContextMenu"?this.canShowContextMenu()&&this.showContextMenu():y.bubbles=!0:this.canCopySelection()&&this.copySelection()},Jt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Jt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Co&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Jt.prototype.canStopCommand=function(){return!0},Jt.prototype.selectAll=function(){var a=this.diagram;a.N();try{a.currentCursor="wait",a.R("ChangingSelection",a.selection);for(var y=a.parts;y.next();)y.value.isSelected=!0;for(var x=a.nodes;x.next();)x.value.isSelected=!0;for(var E=a.links;E.next();)E.value.isSelected=!0}finally{a.R("ChangedSelection",a.selection),a.currentCursor=""}},Jt.prototype.canSelectAll=function(){return this.diagram.allowSelect},Jt.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 Fe,x=a.selection.iterator;x.next();)sd(y,x.value,!0,this.deletesTree?1/0:0,this.deletesConnectedLinks?null:!1,function(E){return E.canDelete()});a.Is(y,!0),a.R("SelectionDeleted",y)}finally{a.eb("Delete"),a.R("ChangedSelection",a.selection),a.currentCursor=""}},Jt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Jt.prototype.copySelection=function(){var a=this.diagram,y=new Fe;for(a=a.selection.iterator;a.next();)sd(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},Jt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Jt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Jt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Jt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Fh=null,ZA="";else{x=y.model;var E=!1,b=!1,z=null;try{x.Tl()&&(E=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(b=x.Ij,x.Ij=this.copiesGroupKey),z=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=E),x.Wj()&&(x.Ij=b),x=new ne,x.addAll(z),Fh=x,ZA=y.model.dataFormat}}y.R("ClipboardChanged",x)},Jt.prototype.pasteFromClipboard=function(){var a=new Fe,y=Fh;if(y===null)return a;var x=this.diagram;if(ZA!==x.model.dataFormat)return a;var E=x.model,b=!1,z=!1,tt=null;try{E.Tl()&&(b=E.Jj,E.Jj=this.copiesParentKey),E.Wj()&&(z=E.Ij,E.Ij=this.copiesGroupKey),tt=x.Kj(y,x,!1)}finally{for(E.Tl()&&(E.Jj=b),E.Wj()&&(E.Ij=z),y=tt.iterator;y.next();)x=y.value,E=y.key,x.location.w()||(E.location.w()?x.location=E.location:!x.position.w()&&E.position.w()&&(x.position=E.position)),a.add(x)}return a},Jt.prototype.pasteSelection=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Paste");var x=this.pasteFromClipboard();0<x.count&&y.clearSelection(!0);for(var E=x.iterator;E.next();)E.value.isSelected=!0;if(a!==null){var b=y.computePartsBounds(y.selection);if(b.w()){var z=this.computeEffectiveCollection(y.selection,y.Wm);Bh(y,z,new Qt(a.x-b.centerX,a.y-b.centerY),y.Wm,!1)}}y.R("ClipboardPasted",x)}finally{y.eb("Paste"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Jt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Fh===null||Fh.count===0||ZA!==a.model.dataFormat)},Jt.prototype.undo=function(){this.diagram.undoManager.undo()},Jt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Jt.prototype.redo=function(){this.diagram.undoManager.redo()},Jt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Jt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===pa&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Jt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==pa?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Jt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===pa&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Jt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==pa?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Jt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Jt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Jt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,E=a.scale;bu(y,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&E===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.sw,this.Au=NaN,this.yu=Zs):(this.Jt=E,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),Wr(y)},Jt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Jt.prototype.scrollToPart=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.Va(),a===null){try{this.cg!==null&&(this.cg.next()?a=this.cg.value:this.cg=null)}catch(ot){this.cg=null}a===null&&(0<y.highlighteds.count?this.cg=y.highlighteds.iterator:0<y.selection.count&&(this.cg=y.selection.iterator),this.cg!==null&&this.cg.next()&&(a=this.cg.value))}if(a!==null){var x=y.animationManager;bu(x,"Scroll To Part");var E=this.scrollToPartPause;if(0<E){var b=ve(this,a,[a]);if(b.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var z=function(){y.Ea();for(var ot=b.pop();0<b.length&&ot instanceof ri&&ot.isTreeExpanded&&(!(ot instanceof lr)||ot.isSubGraphExpanded);)ot=b.pop();0<b.length?(ot instanceof Ti&&y.tv(ot.actualBounds),ot instanceof ri&&!ot.isTreeExpanded&&(ot.isTreeExpanded=!0),ot instanceof lr&&!ot.isSubGraphExpanded&&(ot.isSubGraphExpanded=!0)):(ot instanceof Ti&&y.es(ot.actualBounds),y.am("LayoutCompleted",tt)),y.eb("Scroll To Part")},tt=function(){pr(z,(x.isEnabled?x.duration:0)+E)};y.Bj("LayoutCompleted",tt),z()}}else{var rt=y.position.copy();y.es(a.actualBounds),rt.Xa(y.position)&&x.Cc()}}};function ve(a,y,x){if(y.isVisible())return x;if(y instanceof Jr)ve(a,y.adornedPart,x);else if(y instanceof Rn){var E=y.fromNode;E!==null&&ve(a,E,x),y=y.toNode,y!==null&&ve(a,y,x)}else y instanceof ri&&(E=y.labeledLink,E!==null&&ve(a,E,x),E=y.pg(),E!==null&&(E.isTreeExpanded||E.wasTreeExpanded||x.push(E),ve(a,E,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),ve(a,y,x));return x}Jt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Ti)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Jt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),bu(y.animationManager,"Collapse Tree");var x=new ne;if(a!==null&&a.isTreeExpanded)a.collapseTree(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof ri&&b.isTreeExpanded&&(b.collapseTree(),x.add(b))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},Jt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof ri&&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 ri&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Jt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),bu(y.animationManager,"Expand Tree");var x=new ne;if(a!==null&&!a.isTreeExpanded)a.expandTree(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof ri&&!b.isTreeExpanded&&(b.expandTree(),x.add(b))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},Jt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof ri)||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 ri&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Jt.prototype.groupSelection=function(){var a=this.diagram,y=a.model;if(y.Xj()){var x=this.archetypeGroupData;if(x!==null){var E=null;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Group");for(var b=new ne,z=a.selection.iterator;z.next();){var tt=z.value;tt.Zc()&&tt.canGroup()&&b.add(tt)}for(var rt=new ne,ot=b.iterator;ot.next();){var lt=ot.value;z=!1;for(var ut=b.iterator;ut.next();)if(lt.Td(ut.value)){z=!0;break}z||rt.add(lt)}if(0<rt.count){var ft=rt.first().containingGroup;if(ft!==null)for(;ft!==null;){b=!1;for(var yt=rt.iterator;yt.next();)if(!yt.value.Td(ft)){b=!0;break}if(b)ft=ft.containingGroup;else break}if(x instanceof lr)yu(x),E=x.copy(),E!==null&&a.add(E);else if(y.Yu(x)){var Mt=y.copyNodeData(x);qe(Mt)&&(y.xf(Mt),E=a.ii(Mt))}if(E!==null){ft!==null&&this.isValidMember(ft,E)&&(E.containingGroup=ft);for(var bt=rt.iterator;bt.next();){var Dt=bt.value;this.isValidMember(E,Dt)&&(Dt.containingGroup=E)}a.clearSelection(!0),E.isSelected=!0}}a.R("SelectionGrouped",E)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},Jt.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 $e(a){var y=rn();for(a=a.iterator;a.next();){var x=a.value;x instanceof Rn||y.push(x)}a=new Fe,x=y.length;for(var E=0;E<x;E++){for(var b=y[E],z=!0,tt=0;tt<x;tt++)if(b.Td(y[tt])){z=!1;break}z&&a.add(b)}return Ve(y),a}Jt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Rn)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},Jt.prototype.ungroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.model;if(x.Xj())try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Ungroup");var E=new ne;if(a!==null)E.add(a);else for(var b=y.selection.iterator;b.next();){var z=b.value;z instanceof lr&&z.canUngroup()&&E.add(z)}var tt=new ne;if(0<E.count){y.clearSelection(!0);for(var rt=E.iterator;rt.next();){var ot=rt.value;ot.expandSubGraph();var lt=ot.containingGroup,ut=lt!==null&&lt.data!==null?x.wa(lt.data):void 0;tt.addAll(ot.memberParts);for(var ft=tt.iterator;ft.next();){var yt=ft.value;if(yt.isSelected=!0,!(yt instanceof Rn)){var Mt=yt.data;Mt!==null?x.mp(Mt,ut):yt.containingGroup=lt}}y.remove(ot)}}y.R("SelectionUngrouped",E,tt)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Jt.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 lr))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof lr&&y.canUngroup())return!0;return!1},Jt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=$e(a).iterator;a.next();){var E=a.value;E.containingGroup!==null&&(!y||this.isValidMember(null,E)?E.containingGroup=null:x=!1)}return x},Jt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),bu(y.animationManager,"Collapse SubGraph");var x=new ne;if(a!==null&&a.isSubGraphExpanded)a.collapseSubGraph(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof lr&&b.isSubGraphExpanded&&(b.collapseSubGraph(),x.add(b))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Jt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof lr&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof lr&&y.isSubGraphExpanded)return!0;return!1},Jt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),bu(y.animationManager,"Expand SubGraph");var x=new ne;if(a!==null&&!a.isSubGraphExpanded)a.expandSubGraph(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof lr&&!b.isSubGraphExpanded&&(b.expandSubGraph(),x.add(b))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Jt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof lr&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof lr&&!y.isSubGraphExpanded)return!0;return!1},Jt.prototype.editTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.toolManager.findTool("TextEditing");if(x!==null){if(a===null){a=null;for(var E=y.selection.iterator;E.next();){var b=E.value;if(b.canEdit()){a=b;break}}if(a===null)return;a=a.Nl(function(z){return z instanceof Fo&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},Jt.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 Fo))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 Fo&&x.editable}),a!==null))return!0;return!1},Jt.prototype.showContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");if(x!==null&&(a===void 0&&(a=0<y.selection.count?y.selection.first():y),a=x.findObjectWithContextMenu(a),a!==null)){var E=y.lastInput,b=null;a instanceof Be?b=a.ga(rr):y.viewportBounds.ca(E.documentPoint)||(b=y.viewportBounds,b=new Qt(b.x+b.width/2,b.y+b.height/2)),b!==null&&(E.viewPoint=y.op(b),E.documentPoint=b,E.left=!1,E.right=!0,E.up=!0),y.currentTool=x,gA(x,!1,a)}},Jt.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)},Jt.prototype.computeEffectiveCollection=function(a,y){var x=this.diagram,E=x.toolManager.findTool("Dragging"),b=x.currentTool===E;if(y===void 0&&(y=b?E.dragOptions:x.Wm),E=new be,a===null)return E;for(var z=a.iterator;z.next();)$u(x,E,z.value,b,y);if(x.draggedLink!==null&&y.dragsLink)return E;for(z=a.iterator;z.next();)a=z.value,a instanceof Rn&&(y=a.fromNode,y===null||E.contains(y)?(y=a.toNode,y===null||E.contains(y)||E.remove(a)):E.remove(a));return E},Sn.Object.defineProperties(Jt.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||le("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}}}),Jt.className="CommandHandler",Id=function(){return new Jt};function Be(){an(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Qt(NaN,NaN).freeze(),this.jd=Zr,this.Ab=new Yi,this.wh=new Yi,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=js,this.uc=new Ue(NaN,NaN,NaN,NaN).freeze(),this.Ib=new Ue(NaN,NaN,NaN,NaN).freeze(),this.dc=new Ue(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=es,this.Ag=this.io=0,this.V=this.tb=this.Dh=this.A=this.Ua=null,this.Uc=!1,this.jo=this.Ng=null}var Fn,xn,vi,Ci,_i,or,Ir,Sr,_r,ho;Be.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=fi(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},Be.prototype.Vw=function(a){var y=this.Dh;if(ei(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},Be.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},Be.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},Be.prototype.copy=function(){return this.clone()},Tt=Be.prototype,Tt.qb=function(a){a.classType===Rn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:le("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===Be&&(this.stretch=a)},Tt.toString=function(){return fn(this.constructor)+"#"+ii(this)},Tt.th=function(){this.A!==null&&(this.A.nc=!0)};function wr(a){a.A===null?a.A=new hc:a.A.nc&&(a.A=a.A.copy())}Tt.Xc=function(){if(this.ba===null){var a=new If;a.Xi=Ar,a.yj=Ar,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},Tt.cb=function(a,y,x,E,b,z,tt){var rt=this.part;if(rt!==null&&(rt.gk(a,y,x,E,b,z,tt),x===this&&a===No&&ia(this)&&ko(this,rt,y),z=this.diagram,this.animationTriggers===null||z===null||!z.pi||z.undoManager.isUndoingRedoing||z.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&z.animationManager.isEnabled&&!z.animationManager.isTicking&&(this.jo===null&&(this.jo=new be),tt=z.undoManager.transactionLevel===0,a.startCondition===Sh?tt=!0:a.startCondition===Wh&&(tt=!1),tt?(z=new la,mf(a,z),tt=this.jo.get(a),tt!==null&&tt.stop(),this.jo.add(a,z),z.vu=this,z.Nw=a,z.add(this,y,E,b),z.start()):(bu(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,E,b)))),this instanceof Bn&&x===rt&&(rt.l&16777216)!==0&&rt.data!==null))for(x=this.O.s,E=x.length,b=0;b<E;b++)rt=x[b],rt instanceof Bn&&Hu(rt,function(ot){ot.data!==null&&ot.l&16777216&&ot.La(y)})};function ko(a,y,x){var E=a.ih();if(E!==null)for(var b=a.localBindings.iterator;b.next();){var z=b.value,tt=null;if(z.sourceName!==null){if(tt=k1(z,E,a),tt===null)continue;z.sp(a,tt,x,null)}else if(z.isToModel){var rt=y.diagram;rt===null||rt.skipsModelSourceBindings||z.sp(a,rt.model.modelData,x,E)}else{if(rt=E.data,rt===null)continue;var ot=y.diagram;ot===null||ot.skipsModelSourceBindings||z.sp(a,rt,x,E)}tt===a&&(rt=E.ks(z.Ai),rt!==null&&z.Mv(rt,tt,x))}}Tt.ks=function(a){return this.bindingId===a?this:null},Tt.g=function(a,y,x){this.cb(No,a,this,y,x)},Tt.Ge=function(a,y,x,E){var b=this.uc;if(b.h(a,y,x,E),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new Yi);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),z.pp(b)}};function Rs(a,y,x,E){return a.pickable===!1?!1:(E.multiply(a.transform),x?a.Yc(y,E):a.fh(y,E))}Tt.tx=function(a,y,x){if(this.pickable===!1)return!1;var E=this.naturalBounds;return y=a.Bf(y),x?sn(a.x,a.y,0,0,0,E.height)<=y||sn(a.x,a.y,0,E.height,E.width,E.height)<=y||sn(a.x,a.y,E.width,E.height,E.width,0)<=y||sn(a.x,a.y,E.width,0,0,0)<=y:a.zd(0,0)<=y&&a.zd(0,E.height)<=y&&a.zd(E.width,0)<=y&&a.zd(E.width,E.height)<=y},Tt.se=function(){return!0},Tt.ca=function(a){var y=Qt.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return Qt.free(y),!1;var E=this.diagram;if(E!==null&&E.wq){var b=E.Ql("extraTouchThreshold"),z=E.Ql("extraTouchArea"),tt=z/2,rt=this.naturalBounds;E=this.Df()*E.scale;var ot=1/E;if(rt.width*E<b&&rt.height*E<b)return a=Ao(x.x-tt*ot,x.y-tt*ot,x.width+z*ot,x.height+z*ot,y.x,y.y),Qt.free(y),a}return b=!1,(this instanceof Jr||this instanceof vr?Ao(x.x-5,x.y-5,x.width+10,x.height+10,y.x,y.y):x.ca(y))&&(this.tb&&!this.tb.ca(y)?b=!1:this.areaBackground!==null&&x.ca(y)||this.Ma!==null&&this.dc.ca(a)?b=!0:b=this.gh(a)),Qt.free(y),b},Tt.gh=function(a){var y=this.naturalBounds;return Ao(0,0,y.width,y.height,a.x,a.y)},Tt.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=Ue.allocAt(0,0,y.width,y.height);var x=this.transform,E=!1,b=Qt.allocAt(a.x,a.y);return y.ca(x.Cd(b))&&(b.h(a.x,a.bottom),y.ca(x.Cd(b))&&(b.h(a.right,a.bottom),y.ca(x.Cd(b))&&(b.h(a.right,a.y),y.ca(x.Cd(b))&&(E=!0)))),Qt.free(b),Ue.free(y),E},Tt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,E=!1,b=Qt.allocAt(0,0);return a.ca(y.Ga(b))&&(b.h(0,x.height),a.ca(y.Ga(b))&&(b.h(x.width,x.height),a.ca(y.Ga(b))&&(b.h(x.width,0),a.ca(y.Ga(b))&&(E=!0)))),Qt.free(b),E},Tt.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,E=Qt.allocAt(0,0),b=Qt.allocAt(0,x.height),z=Qt.allocAt(x.width,x.height),tt=Qt.allocAt(x.width,0),rt=!1;if(a.ca(y.Ga(E))||a.ca(y.Ga(b))||a.ca(y.Ga(z))||a.ca(y.Ga(tt)))rt=!0;else{x=Ue.allocAt(0,0,x.width,x.height);var ot=Qt.allocAt(a.x,a.y);x.ca(y.Cd(ot))?rt=!0:(ot.h(a.x,a.bottom),x.ca(y.Cd(ot))?rt=!0:(ot.h(a.right,a.bottom),x.ca(y.Cd(ot))?rt=!0:(ot.h(a.right,a.y),x.ca(y.Cd(ot))&&(rt=!0)))),Qt.free(ot),Ue.free(x),!rt&&(Ce.us(a,E,b)||Ce.us(a,b,z)||Ce.us(a,z,tt)||Ce.us(a,tt,E))&&(rt=!0)}return Qt.free(E),Qt.free(b),Qt.free(z),Qt.free(tt),rt},Tt.ga=function(a,y){if(y===void 0&&(y=new Qt),a instanceof di){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},Tt.mi=function(a){a===void 0&&(a=new Ue);var y=this.naturalBounds,x=this.oe,E=Qt.allocAt(0,0).transform(x);return a.h(E.x,E.y,0,0),E.h(y.width,0).transform(x),kr(a,E.x,E.y,0,0),E.h(y.width,y.height).transform(x),kr(a,E.x,E.y,0,0),E.h(0,y.height).transform(x),kr(a,E.x,E.y,0,0),Qt.free(E),a},Tt.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},Tt.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},Tt.qs=function(a,y){return y===void 0&&(y=new Qt),y.assign(a),this.oe.Cd(y),y},Tt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Tt.Sj=function(a,y,x,E,b){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),rt=z.m22*tt,ot=-z.m12*tt,lt=-z.m21*tt,ut=z.m11*tt,ft=tt*(z.m21*z.dy-z.m22*z.dx),yt=tt*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,Ce.Ff(z.left,z.top,z.right,z.bottom,a,y,x,E,b)):(tt=a*rt+y*lt+ft,a=a*ot+y*ut+yt,y=x*rt+E*lt+ft,x=x*ot+E*ut+yt,b.h(0,0),E=this.naturalBounds,x=Ce.Ff(0,0,E.width,E.height,tt,a,y,x,b),b.transform(z),x)},Be.prototype.measure=function(a,y,x,E){if(xl(this)!==!1){var b=this.Kg,z=b.right+b.left;b=b.top+b.bottom,a=Math.max(a-z,0),y=Math.max(y-b,0),x=Math.max((x||0)-z,0),E=Math.max((E||0)-b,0),z=this.angle,b=this.desiredSize;var tt=this.kq();z===90||z===270?(a=isFinite(b.height)?b.height+tt:a,y=isFinite(b.width)?b.width+tt:y):(a=isFinite(b.width)?b.width+tt:a,y=isFinite(b.height)?b.height+tt:y),b=x||0,tt=E||0;var rt=this instanceof Bn;switch(Ka(this,!0)){case xn:tt=b=0,rt&&(y=a=1/0);break;case Fn:isFinite(a)&&a>x&&(b=a),isFinite(y)&&y>E&&(tt=y);break;case Ci:isFinite(a)&&a>x&&(b=a),tt=0,rt&&(y=1/0);break;case _i:isFinite(y)&&y>E&&(tt=y),b=0,rt&&(a=1/0)}rt=this.maxSize;var ot=this.minSize;b>rt.width&&ot.width<rt.width&&(b=rt.width),tt>rt.height&&ot.height<rt.height&&(tt=rt.height),x=Math.max(b,ot.width),E=Math.max(tt,ot.height),rt.width<x&&(x=Math.min(ot.width,x)),rt.height<E&&(E=Math.min(ot.height,E)),a=Math.min(rt.width,a),y=Math.min(rt.height,y),a=Math.max(x,a),y=Math.max(E,y),(z===90||z===270)&&(z=a,a=y,y=z,z=x,x=E,E=z),this.uc.ka(),this.Wl(a,y,x,E),this.uc.freeze(),this.uc.w()||le("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Es(this,!1)}},Be.prototype.Wl=function(){},Be.prototype.Dd=function(){return!1},Be.prototype.arrange=function(a,y,x,E,b){this.Uk();var z=Ue.alloc();z.assign(this.Ib),this.Ib.ka(),La(this)===!1?this.Ib.h(a,y,x,E):this.eh(a,y,x,E),this.Ib.freeze(),b===void 0?this.tb=null:this.tb=b,x=!1,b!==void 0?x=!0:(b=this.panel,b!==null&&vc(b)&&(b=b.panel),b!==null&&(b=b.dc,E=this.measuredBounds,this.areaBackground!==null&&(E=this.Ib),x=y+E.height,E=a+E.width,x=!(0<=a+.05&&E<=b.width+.05&&0<=y+.05&&x<=b.height+.05),this instanceof Fo&&(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()||le("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),nA(this,!1),Ue.free(z)},Tt=Be.prototype,Tt.eh=function(){};function Ea(a,y,x,E,b){if(a.Ib.h(y,x,E,b),!a.desiredSize.w()){var z=a.uc;x=a.Kg,y=x.right+x.left;var tt=x.top+x.bottom;switch(x=z.width+y,z=z.height+tt,E+=y,b+=tt,y=Ka(a,!0),x===E&&z===b&&(y=xn),y){case xn:(x>E||z>b)&&(Es(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case Fn:Es(a,!0),a.measure(E,b,0,0);break;case Ci:Es(a,!0),a.measure(E,z,0,0);break;case _i:Es(a,!0),a.measure(x,b,0,0)}}}Tt.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||ev(x,!0),this.N(),$i(a,y)||(x.oh(),this.Pn(x)))},Tt.Pn=function(a){this.portId!==null&&(ev(a,!0),a instanceof ri&&Zy(a,this))},Tt.gc=function(a,y){if(!ul(this,a,y)&&this.visible){var x=this.opacity;if(x!==0){var E=1;x!==1&&(E=a.globalAlpha,a.globalAlpha=E*x);var b="";this.filter!==""&&(b=a.filter,a.filter=this.filter);var z=this instanceof Bn&&vc(this),tt=this.Ib;if(z){var rt=this.Ib,ot=this.dc,lt=this.areaBackground,ut=this.Ma;lt===null&&ut===null||a.yc(),lt!==null&&(Zo(this,a,lt,!0,!0,ot,rt),lt instanceof lo&&lt.type===Cr?(a.beginPath(),a.rect(rt.x,rt.y,rt.width,rt.height),a.ng(lt)):a.fillRect(rt.x,rt.y,rt.width,rt.height)),ut!==null&&(Zo(this,a,ut,!0,!1,ot,rt),ut instanceof lo&&ut.type===Cr?(a.beginPath(),a.rect(rt.x,rt.y,rt.width,rt.height),a.ng(ut)):a.fillRect(rt.x,rt.y,rt.width,rt.height)),this.hh(a,y)}if(!z&&(z||tt.width!==0&&tt.height!==0&&!isNaN(tt.x)&&!isNaN(tt.y))){z=this.transform,rt=this.panel,this.l&4096&&_s(this),lt=this.part,ot=!1;var ft=0;lt&&y.Gf("drawShadows")&&(ot=lt.isShadowed)&&(ut=lt.shadowOffset,ft=Math.max(ut.y,ut.x)*y.scale*y.Mb),ut=this.Dd();var yt;if(!(yt=y.$i||!ut)){var Mt=this.naturalBounds;yt=this.wh;var bt=yt.m11,Dt=yt.m21,qt=yt.dx,Vt=yt.m12,oe=yt.m22,ce=yt.dy,ge,Se=ge=0;yt=ge*bt+Se*Dt+qt;var Re=ge*Vt+Se*oe+ce;ge=Mt.width+ft,Se=0;var qn=ge*bt+Se*Dt+qt;ge=ge*Vt+Se*oe+ce,Se=Math.min(yt,qn);var gi=Math.min(Re,ge),ui=Math.max(yt+0,qn)-Se,Qn=Math.max(Re+0,ge)-gi;yt=Se,Re=gi,ge=Mt.width+ft,Se=Mt.height+ft,qn=ge*bt+Se*Dt+qt,ge=ge*Vt+Se*oe+ce,Se=Math.min(yt,qn),gi=Math.min(Re,ge),ui=Math.max(yt+ui,qn)-Se,Qn=Math.max(Re+Qn,ge)-gi,yt=Se,Re=gi,ge=0,Se=Mt.height+ft,qn=ge*bt+Se*Dt+qt,ge=ge*Vt+Se*oe+ce,Se=Math.min(yt,qn),gi=Math.min(Re,ge),ui=Math.max(yt+ui,qn)-Se,Qn=Math.max(Re+Qn,ge)-gi,yt=Se,Re=gi,ft=y.viewportBounds,Mt=ft.x,bt=ft.y,yt=!(yt>ft.width+Mt||Mt>ui+yt||Re>ft.height+bt||bt>Qn+Re)}if(yt){if(yt=(this.l&256)!==0,a.clipInsteadOfFill&&(yt=!1),this instanceof Fo&&(a.font=this.font),yt){if(Re=rt.se()?rt.naturalBounds:rt.actualBounds,ui=Math.max(tt.x,Re.x),Qn=Math.max(tt.y,Re.y),ft=Math.min(tt.right,Re.right)-ui,Mt=Math.min(tt.bottom,Re.bottom)-Qn,bt=this.tb,bt!==null&&(ui=bt.x,Qn=bt.y,ft=bt.width,Mt=bt.height),ui>tt.width+tt.x||tt.x>Re.width+Re.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect(ui,Qn,ft,Mt),a.clip()}if(ut){if(!lt.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}ot&&(Re=lt.shadowOffset,a.Ev(Re.x*y.scale*this.scale*y.Mb,Re.y*y.scale*this.scale*y.Mb,lt.shadowBlur),SA(a),a.shadowColor=lt.shadowColor)}ot&&this.shadowVisible===!0?SA(a):ot&&this.shadowVisible===!1&&Ou(a),lt=this.naturalBounds,this.areaBackground!==null&&(a.yc(),yl(this,a,lt,tt)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),ot&&Xs(this,rt)&&this.shadowVisible===null&&Ou(a),this.Ma!==null&&(a.yc(),Ua(this,a,lt,tt)),ot&&(this.Ma!==null||this.areaBackground!==null||Xs(this,rt))?(wl(this,!0),this.shadowVisible===null&&Ou(a)):wl(this,!1),this.hh(a,y),ot&&this.l&512&&SA(a),ut&&ot&&Ou(a),yt&&(a.restore(),a.Vc(this instanceof Bn)),z.ws()||(y=1/(z.m11*z.m22-z.m12*z.m21),a.transform(z.m22*y,-z.m12*y,-z.m21*y,z.m11*y,y*(z.m21*z.dy-z.m22*z.dx),y*(z.m12*z.dx-z.m11*z.dy)))}}x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b)}}};function Xs(a,y){return y===null?!1:(vc(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Bn.Auto||y.type===Bn.Spot)&&y.Pb()!==a)}Tt.Dv=function(){};function yl(a,y,x,E){Zo(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof lo&&a.areaBackground.type===Cr?(y.beginPath(),y.rect(E.x,E.y,E.width,E.height),y.ng(a.areaBackground)):y.fillRect(E.x,E.y,E.width,E.height)}function Ua(a,y,x,E){var b=a.kq(),z=x.x,tt=x.y,rt=x.width+b,ot=x.height+b;Zo(a,y,a.Ma,!0,!1,x,E),a.Ma instanceof lo&&a.Ma.type===Cr?(y.beginPath(),y.rect(z-b/2,tt-b/2,rt,ot),y.ng(a.Ma)):y.fillRect(z-b/2,tt-b/2,rt,ot)}function Sa(a,y,x){for(var E=y.O.s,b=E.length,z=-1,tt=0;tt<b;tt++)if(E[tt]===a){z=tt;break}if(a=z,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===Bn.Table?(y=y.svg.getElementsByClassName("gojs-ts"),y=y.length!==0?y[0]:null,y!==null&&y.after(x)):y.svg.prepend(x);else{for(;a!==0&&!y.M(a-1).Ed();)a--;a===0?y.svg.prepend(x):(a=y.M(a-1).svg,a!==null?a.after(x):y.svg.appendChild(x))}}function ul(a,y,x){if(!(y instanceof Ya))return!1;if(!a.visible||a.opacity===0||a.Dd()&&!a.isVisible())return a.svg!==null&&a.svg.parentNode!==null&&a.svg.remove(),!0;var E=a.panel,b=a.nk(y);if(a.kk(y,x,b))return a.svg.parentElement!==null?(a.Dd()&&(y.ti=a.svg),!0):(a.Dd()?(y.ti!==null?y.ti.after(a.svg):y.Nj.prepend(a.svg),y.ti=a.svg):E&&Sa(a,E,a.svg),!0);if(a.Dd()&&a.isShadowed){var z=a.shadowOffset;y.Ev(z.x*x.scale*a.scale*x.Mb,z.y*x.scale*a.scale*x.Mb,a.shadowBlur),SA(y),y.shadowColor=a.shadowColor}a instanceof Fo&&(y.font=a.font),y.yd=null;var tt=a.transform;z=a instanceof Bn;var rt=a instanceof Bn?vc(a):!1;a.l&4096&&_s(a);var ot=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,b&&(y.o=!0,z&&rt?(Of(y,1,0,0,1,0,0),a.svg=y.ad):z?(Of(y,tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy),a.svg=y.ad):Of(y,1,0,0,1,0,0)),b=a.naturalBounds,a.areaBackground!==null){var lt=tt.copy().Vj();y.rb.ha=[lt.m11,lt.m12,lt.m21,lt.m22,lt.dx,lt.dy],yl(a,y,b,ot),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return z||(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy]),a.background!==null&&(z?(rt&&(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy]),Ua(a,y,b,ot),rt&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy],Ua(a,y,b,ot)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),tt=y.yd,b=a.part,rt=!1,b&&x.Gf("drawShadows")&&(rt=b.isShadowed),y.clipInsteadOfFill&&(rt=!1),a.Dd()&&rt&&SA(y),rt&&a.shadowVisible===!0?SA(y):rt&&a.shadowVisible===!1&&Ou(y),b=a.panel,rt&&Xs(a,b)&&a.shadowVisible===null&&Ou(y),y.Il&&(lt=x.computePixelRatio(),lt="drop-shadow("+y.shadowOffsetX/lt+"px "+y.shadowOffsetY/lt+"px "+y.shadowBlur/lt/2+"px "+y.shadowColor+")",a.background!==null&&tt.Ma.setAttributeNS(null,"filter",lt),a.areaBackground!==null&&tt.gd.setAttributeNS(null,"filter",lt)),rt&&(a.Ma!==null||a.areaBackground!==null||Xs(a,b))?(wl(a,!0),a.shadowVisible===null&&Ou(y)):wl(a,!1),b=rt,a.hh(y,x),z&&y.nh.pop(),y.o&&y.nh.pop(),tt=y.Gv.hs,rt=z?a.svg:y.yd,lt=a.svg,!z&&lt!==null&&rt!==lt&&lt.parentNode===a.panel.svg?(a.svg.replaceWith(rt),a.svg=rt,rt!==null&&a.$o(y,E,ot,rt),_a(y,lt),!0):(a.svg=rt,tt!==null&&rt===null&&(yg(y),y.nh.pop()),rt===null||(a.$o(y,E,ot,rt),y.Il&&(x=x.computePixelRatio(),a.Dv(rt,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),b&&a.l&512&&SA(y),a.Dd()&&Ou(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&rt.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&rt.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(rt):y.Nj.prepend(rt),y.ti=rt):E!==null&&Sa(a,E,rt),tt!==null&&tt(a,rt)),!0)}Tt.$o=function(a,y,x,E){var b=(this.l&256)!==0;if(a.clipInsteadOfFill&&(b=!1),b){var z=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,z.x),b=Math.max(x.y,z.y);var tt=Math.min(x.right,z.right)-y;x=Math.min(x.bottom,z.bottom)-b,z=this.tb,z!==null&&(y=z.x,b=z.y,tt=z.width,x=z.height),z=E.getAttribute("clip-path");var rt=null;z!==null&&(rt=a.svg.getElementById(z.split("#")[1].slice(0,-1))),rt===null?(z="CLIP"+Mi++,rt=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:b,width:tt,height:x}),this instanceof Bn&&(b=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")")),rt.appendChild(y),a.svg.appendChild(rt),E.setAttributeNS(null,"clip-path","url(#"+z+")")):(a=rt.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",b.toString()),a.setAttribute("width",tt.toString()),a.setAttribute("height",x.toString()))}else E.removeAttributeNS(null,"clip-path"),_a(a,E)};function _a(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function mr(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Zi(y);for(var E=y.next();!E.done;E=y.next())E=x.getElementById(E.value.split("#")[1].slice(0,-1)),E!==null&&E.remove()}a.svg.remove()}}Tt.hh=function(){},Tt.lv=function(){this.Uc=!0},Tt.kk=function(a,y,x){if(this.Uc)return this.lv(),this.Uc=!1;if(y=this.svg,y===null)return!1;if(!this.visible)return y.remove(),!1;if(y.nodeName!=="g"&&x||y.nodeName==="g"&&!x)return!1;var E=this.transform,b=this instanceof Bn?vc(this):!1;if(!(this instanceof Bn&&b))if(this instanceof cl){var z=this.bt;a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy],z!==null&&$p(a,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7]),x?y.lastElementChild.setAttributeNS(null,"transform",t0(a)):y.setAttributeNS(null,"transform",t0(a))}else if(!x||this instanceof Bn)y.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");else if(this instanceof vr){z=y.getElementsByTagName("path");for(var tt=0;tt<z.length;tt++)z[tt].setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")}else y.lastElementChild.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");return z=this.Dd()?this.opacity*a.globalAlpha:this.opacity,z===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",z.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(z=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(tt=E.copy().Vj(),a.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy],yl(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(tt=y.gd.getAttribute("filter"),tt!==null&&a.ad.setAttribute("filter",tt),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),z&&Hf(a,z)),(this.background!==null||y.Ma!==void 0)&&(z=y.Ma,this.background===null?(Hf(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((b||x&&!(this instanceof Bn))&&(a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy]),Ua(this,a,this.naturalBounds,this.actualBounds),y.Ma?(Hf(a,y.Ma),x=y.Ma.getAttribute("filter"),x!==null&&a.ad.setAttribute("filter",x),y.Ma.replaceWith(a.ad)):y.prepend(a.ad),y.Ma=a.ad),z&&Hf(a,z)),this.$o(a,this.panel,this.actualBounds,y),!0},Tt.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 Zo(a,y,x,E,b,z,tt){if(x!==null){var rt=1,ot=1;if(typeof x=="string")E?y.fillStyle=x:y.strokeStyle=x;else if(x.type===Hr)E?y.fillStyle=x.color:y.strokeStyle=x.color;else{var lt=a.kq();if(rt=z.width,ot=z.height,b?(rt=tt.width,ot=tt.height):E||(rt+=lt,ot+=lt),(z=y instanceof pc)&&x.xe&&(x.type===Go||x.yk===rt&&x.ft===ot))var ut=x.xe;else{var ft=0,yt=0,Mt=0,bt=0,Dt=0,qt=0;if(qt=Dt=0,b?(Dt=tt.x,qt=tt.y):E||(Dt-=lt/2,qt-=lt/2),ft=x.start.x*rt+x.start.offsetX,yt=x.start.y*ot+x.start.offsetY,Mt=x.end.x*rt+x.end.offsetX,bt=x.end.y*ot+x.end.offsetY,ft+=Dt,Mt+=Dt,yt+=qt,bt+=qt,x.type===cr)ut=y.createLinearGradient(ft,yt,Mt,bt);else if(x.type===Cr)qt=isNaN(x.endRadius)?Math.max(rt,ot)/2:x.endRadius,isNaN(x.startRadius)?(Dt=0,qt=Math.max(rt,ot)/2):Dt=x.startRadius,ut=y.createRadialGradient(ft,yt,Dt,Mt,bt,qt);else if(x.type===Go)try{ut=y.createPattern(x.pattern,"repeat")}catch(oe){ut=null}if(x.type!==Go&&(b=x.colorStops,b!==null))for(b=b.iterator;b.next();)ut.addColorStop(b.key,b.value);if(z&&(x.xe=ut,ut!==null&&(x.yk=rt,x.ft=ot),ut===null&&x.type===Go&&x.yk!==-1)){x.yk=-1;var Vt=a.diagram;Vt!==null&&x.yk===-1&&pr(function(){Vt.redraw()},600)}}E?y.fillStyle=ut:y.strokeStyle=ut}}}Tt.rg=function(a){if(a instanceof Bn)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},Tt.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},Tt.If=function(){for(var a=this instanceof Bn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function _s(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Yl(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)}Yl(a,!1),Wa(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Wa(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,Wa(a,!1)))}Tt.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Qt.alloc();z.yi(y,x,E,b,rr),a.rotate(this.Kb,z.x,z.y),Qt.free(z)}},Tt.v=function(a){if(!xl(this)){a===void 0&&(a=!1),Es(this,!0),nA(this,!0);var y=this.panel;y===null||a||y.v()}},Tt.Uj=function(){xl(this)||(Es(this,!0),nA(this,!0))};function Ts(a){if(!La(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof ri&&a.Bd(),y.$b())),nA(a,!0)}}Tt.Uk=function(){!(this.l&2048)&&(Yl(this,!0),Wa(this,!0))},Tt.Wu=function(){Wa(this,!0)},Tt.N=function(){var a=this.part;a!==null&&a.N()};function Ka(a,y){var x=a.stretch,E=a.panel;return E!==null&&E.type===Bn.Table?Jo(a,E.Fb(a.row),E.Eb(a.column),y):E!==null&&E.type===Bn.Auto&&E.Pb()===a?Po(a,Fn,y):x===or?E!==null?E.type===Bn.Spot&&E.Pb()===a?Po(a,Fn,y):(x=E.defaultStretch,x===or?Po(a,xn,y):Po(a,x,y)):Po(a,xn,y):Po(a,x,y)}function Jo(a,y,x,E){var b=a.stretch;if(b!==or)return Po(a,b,E);var z=b=null;switch(y.stretch){case _i:z=!0;break;case Fn:z=!0}switch(x.stretch){case Ci:b=!0;break;case Fn:b=!0}return y=a.panel.defaultStretch,b===null&&(b=y===Ci||y===Fn),z===null&&(z=y===_i||y===Fn),b===!0&&z===!0?Po(a,Fn,E):b===!0?Po(a,Ci,E):z===!0?Po(a,_i,E):Po(a,xn,E)}function Po(a,y,x){if(x)return y;if(y===xn||(x=a.desiredSize,x.w()))return xn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===Ci)return xn;if(y===Fn)return _i}else{if(y===_i)return xn;if(y===Fn)return Ci}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===_i)return xn;if(y===Fn)return Ci}else{if(y===Ci)return xn;if(y===Fn)return _i}return y}function wl(a,y){a.l=y?a.l|512:a.l&-513}function ia(a){return(a.l&1024)!==0}function XA(a,y){a.l=y?a.l|1024:a.l&-1025}function Yl(a,y){a.l=y?a.l|2048:a.l&-2049}function Wa(a,y){a.l=y?a.l|4096:a.l&-4097}function xl(a){return(a.l&8192)!==0}function Es(a,y){a.l=y?a.l|8192:a.l&-8193}function La(a){return(a.l&16384)!==0}function nA(a,y){a.l=y?a.l|16384:a.l&-16385}Tt.Gj=function(){this.svg=null},Tt.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},Tt.Av=function(){},Tt.zv=function(a){return this.pa=a,Ts(this),!0},Tt.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},Tt.kq=function(){return 0};function Eh(a){var y=a.part;if(y instanceof ri&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||Zy(y,a)}}function qp(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof Bn?a instanceof ri?a.Bd():a.qm(a,function(x){Eh(x)}):Eh(a))}Tt.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Ls(a,y,x,E):b=a,b.xd=this,a=this.ih(),a!==null&&py(a)&&le("Cannot add a Binding to a template that has already been copied: "+b),this.localBindings===null&&(this.localBindings=new ne),this.localBindings.add(b),this},Tt.set=function(a){return Object.assign(this,a),this},Tt.Du=function(a){return vg(this,a),this},Tt.apply=function(a){return a(this),this},Tt.nm=function(a){return tc(this,a),this},Tt.pz=function(){return this.ih()},Tt.ih=function(){for(var a=this instanceof Bn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},Tt.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new be),this.animationTriggers.add(a.propertyName,a),this};function Sl(a,y){for(var x=1;x<arguments.length;++x);x=arguments;var E=null,b=null;if(typeof a=="function")b=a;else if(typeof a=="string"){var z=Zd.I(a);typeof z=="function"?(x=fi(arguments),E=z(x),qe(E)||le('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):b=se.go[a]}if(E===null&&(b!=null&&b.constructor||le("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),E=new b),b=1,E instanceof He&&1<x.length){z=E;var tt=x[1];(typeof tt=="string"||tt instanceof HTMLDivElement)&&(Vc(z,tt),b++)}for(;b<x.length;b++)z=x[b],z===void 0?le("Undefined value at argument "+b+" for object being constructed by GraphObject.make: "+E):vg(E,z);return E}function vg(a,y){if(typeof y=="string")if(a instanceof Fo)a.text=y;else if(a instanceof vr)a.figure=y;else if(a instanceof cl)a.source=y;else if(a instanceof Bn)y=Ru.I(y),y!==null&&(a.type=y);else if(a instanceof lo){var x=Ui(lo,y);x!==null?a.type=x:le("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof bn?(y=Ui(bn,y),y!==null&&(a.type=y)):a instanceof Vr&&(y=Ui(Vr,y),y!==null&&(a.type=y));else if(y instanceof Be)a instanceof Bn||le("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Ds){var E;y.isRow&&typeof a.getRowDefinition=="function"?E=a.getRowDefinition(y.index):y.isRow||typeof a.getColumnDefinition!="function"||(E=a.getColumnDefinition(y.index)),E instanceof Ds?s0(E,y):le("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof Oe)typeof a.qb=="function"&&a.qb(y);else if(y instanceof uo)a.type=y;else if(y instanceof Ls)a instanceof Be||a instanceof Ds?a.bind(y):le("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof iu)a instanceof Be?a.Jv(y):le("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Cs)a instanceof bn&&a.type===bn.o?a.figures.add(y):le("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Vr)a instanceof Cs?a.segments.add(y):le("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof zo)a instanceof He||a instanceof lr?a.layout=y:le("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++)vg(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof lo){x=new Si;for(var b in y)E=parseFloat(b),isNaN(E)?x[b]=y[b]:a.addColorStop(E,y[b]);tc(a,x)}else if(a instanceof Ds){y.row!==void 0?(b=y.row,(b==null||b===1/0||isNaN(b)||0>b)&&le("Must specify non-negative integer row for RowColumnDefinition "+y+", not: "+b),a.isRow=!0,a.index=b):y.column!==void 0&&(b=y.column,(b==null||b===1/0||isNaN(b)||0>b)&&le("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+b),a.isRow=!1,a.index=b),b=new Si;for(x in y)x!=="row"&&x!=="column"&&(b[x]=y[x]);tc(a,b)}else tc(a,y);else le('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function iA(a,y){Zd.add(a,y)}function Df(a,y,x){x===void 0&&(x=null);var E=a[1];if(typeof x=="function"?x(E):typeof E=="string")return a.splice(1,1),E;if(y===void 0)throw Error("no "+(typeof x=="function"?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return y}Sn.Object.defineProperties(Be.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new hc),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 hc),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 hc),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(wr(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&&(wr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Ja},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new Lh),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Ja&&(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 Lh),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 Lh),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:ye},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new Lh),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:or},set:function(a){var y=this.stretch;y!==a&&(wr(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&&(wr(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)&&Xn(a,"0 <= value <= 1",Be,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N($d(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($d(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(),qp(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&&Et(a,"GraphObject.areaBackground"),a instanceof lo&&a.freeze(),wr(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&&Et(a,"GraphObject.background"),a instanceof lo&&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 Ti)return this.Ng=a;a=a.panel}return null}},svg:{get:function(){return this.V},set:function(a){this.V=a}},panel:{get:function(){return this.Me}},layer:{get:function(){var a=this.part;return a!==null?a.layer:null}},diagram:{get:function(){var a=this.part;return a!==null?a.diagram:null}},position:{get:function(){return this.pa},set:function(a){var y=a.x,x=a.y,E=this.pa,b=E.x;E=E.y,(b===y||isNaN(b)&&isNaN(y))&&(E===x||isNaN(E)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,b,E)&&this.g("position",new Qt(b,E),a))}},actualBounds:{get:function(){return this.Ib}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&(0>=a&&le("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,qp(this),this.v(),this.g("angle",y,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var y=a.width,x=a.height,E=this.jd,b=E.width,z=E.height;(b===y||isNaN(b)&&isNaN(y))&&(z===x||isNaN(z)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof vr&&this.qc(),this.g("desiredSize",E,a),ia(this)&&(a=this.part,a!==null&&(ko(this,a,"width"),ko(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 on(a,this.jd.height).freeze(),this.v(),this instanceof vr&&this.qc(),this.g("desiredSize",y,a),ia(this)&&(a=this.part,a!==null&&ko(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 on(this.jd.width,a).freeze(),this.v(),this instanceof vr&&this.qc(),this.g("desiredSize",y,a),ia(this)&&(a=this.part,a!==null&&ko(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:Ei},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(),wr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:yr},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(),wr(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 sr(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&&_s(this),this.Ab}},oe:{get:function(){return this.l&4096&&_s(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(wr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:xn},set:function(a){this.reshapingBehavior!==a&&(wr(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()&&le("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),Ts(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&&Xn(a,">= 0",Be,"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&&Xn(a,">= 1",Be,"columnSpan"),wr(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&&Xn(a,">= 0",Be,"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&&Xn(a,">= 1",Be,"rowSpan"),wr(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&&(wr(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 ri||le("Cannot set portID on a Link: "+a),y!==null&&x!==null&&ov(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,Xy(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:Ar},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Eh(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Xn(a,">= 0",Be,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Eh(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),Eh(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&&Xn(a,">= 0",Be,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:Ar},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Eh(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Xn(a,">= 0",Be,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Eh(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),Eh(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&&Xn(a,">= 0",Be,"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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(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&&(wr(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),Be.prototype.trigger=Be.prototype.Jv,Be.prototype.findBindingPanel=Be.prototype.ih,Be.prototype.findTemplateBinder=Be.prototype.pz,Be.prototype.setProperties=Be.prototype.nm,Be.prototype.apply=Be.prototype.apply,Be.prototype.attach=Be.prototype.Du,Be.prototype.set=Be.prototype.set,Be.prototype.isEnabledObject=Be.prototype.If,Be.prototype.isVisibleObject=Be.prototype.Ed,Be.prototype.isContainedBy=Be.prototype.rg,Be.prototype.getNearestIntersectionPoint=Be.prototype.rs,Be.prototype.getLocalPoint=Be.prototype.qs,Be.prototype.getDocumentScale=Be.prototype.Df,Be.prototype.getDocumentAngle=Be.prototype.li,Be.prototype.getDocumentBounds=Be.prototype.mi,Be.prototype.getDocumentPoint=Be.prototype.ga,Be.prototype.intersectsRect=Be.prototype.Yc,Be.prototype.containedInRect=Be.prototype.fh,Be.prototype.containsRect=Be.prototype.Re,Be.prototype.containsPoint=Be.prototype.ca,Be.prototype.raiseChanged=Be.prototype.g,Be.prototype.raiseChangedEvent=Be.prototype.cb,Be.prototype.addCopyProperty=Be.prototype.Vw;var Zd=null;Be.className="GraphObject",Zd=new be,iA("Button",function(){function a(x,E){return x.diagram.ic(x.documentPoint,function(b){for(;b.panel!==null&&!b.isActionable;)b=b.panel;return b},function(b){return b===E})!==null}var y=Sl(Bn,Bn.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof Bn){var b=x.fb("ButtonBorder");b!==null&&(b.fill=E?x._buttonFillNormal:x._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD",_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Sl(vr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new di(0,0,2.76142374915397,2.761423749153969),spot2:new di(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return y.mouseEnter=function(x,E){if(E.If()&&E instanceof Bn&&(x=E.fb("ButtonBorder"),x instanceof vr)){var b=E._buttonFillOver;E._buttonFillNormal=x.fill,x.fill=b,b=E._buttonStrokeOver,E._buttonStrokeNormal=x.stroke,x.stroke=b}},y.mouseLeave=function(x,E){E.If()&&E instanceof Bn&&(x=E.fb("ButtonBorder"),x instanceof vr&&(x.fill=E._buttonFillNormal,x.stroke=E._buttonStrokeNormal))},y.actionDown=function(x,E){if(E.If()&&E instanceof Bn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof vr){x=x.diagram;var z=x.skipsUndoManager;x.skipsUndoManager=!0;var tt=E._buttonFillPressed;E._buttonFillOver=b.fill,b.fill=tt,tt=E._buttonStrokePressed,E._buttonStrokeOver=b.stroke,b.stroke=tt,x.skipsUndoManager=z}}},y.actionUp=function(x,E){if(E.If()&&E instanceof Bn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof vr){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionCancel=function(x,E){if(E.If()&&E instanceof Bn&&E._buttonFillPressed!==null){var b=E.fb("ButtonBorder");if(b instanceof vr){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionMove=function(x,E){if(E.If()&&E instanceof Bn&&E._buttonFillPressed!==null){var b=x.diagram;if(b.firstInput.button===0&&(b.currentTool.standardMouseOver(),a(x,E)&&(x=E.fb("ButtonBorder"),x instanceof vr))){var z=b.skipsUndoManager;b.skipsUndoManager=!0;var tt=E._buttonFillPressed;x.fill!==tt&&(x.fill=tt),tt=E._buttonStrokePressed,x.stroke!==tt&&(x.stroke=tt),b.skipsUndoManager=z}}},y}),iA("TreeExpanderButton",function(){var a=Sl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Sl(vr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ni},new Ls("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Ls("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof Jr&&(x=x.adornedPart),x instanceof ri){var E=x.diagram;if(E!==null){if(E=E.commandHandler,x.isTreeExpanded){if(!E.canCollapseTree(x))return}else if(!E.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?E.collapseTree(x):E.expandTree(x)}}},a}),iA("SubGraphExpanderButton",function(){var a=Sl("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Sl(vr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ni},new Ls("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 Jr&&(x=x.adornedPart),x instanceof lr){var E=x.diagram;if(E!==null){if(E=E.commandHandler,x.isSubGraphExpanded){if(!E.canCollapseSubGraph(x))return}else if(!E.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?E.collapseSubGraph(x):E.expandSubGraph(x)}}},a}),iA("ToolTip",function(){return Sl(Jr,Bn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Qt(0,3),shadowBlur:5},Sl(vr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new di(0,0,4,6),spot2:new di(1,1,-4,-4)}))}),iA("ContextMenu",function(){return Sl(Jr,Bn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Qt(0,3),shadowBlur:5},new Ls("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),iA("ContextMenuButton",function(){var a=Sl("Button");a.stretch=Ci;var y=a.fb("ButtonBorder");return y instanceof vr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new di(0,0,2,3),y.spot2=new di(1,1,-2,-2)),a}),iA("PanelExpanderButton",function(a){var y=Df(a,"COLLAPSIBLE"),x=Sl("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},Sl(vr,{name:"ButtonIcon",strokeWidth:2},new Ls("geometryString","visible",function(E){return E?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof vr&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(E,b){var z=b.diagram;if(z!==null&&!z.isReadOnly){var tt=b.ih();tt===null&&(tt=b.part),tt!==null&&(b=tt.fb(y),b!==null&&(E.handled=!0,z.Ea("Collapse/Expand Panel"),b.visible=!b.visible,z.eb("Collapse/Expand Panel")))}},x}),iA("CheckBoxButton",function(a){var y=Df(a);return a=Sl("Button",{desiredSize:new on(14,14)},Sl(vr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Fn,geometryStretch:vi,visible:!1},y!==""?new Ls("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof Bn){var b=x.diagram;if(!(b===null||b.isReadOnly||y!==""&&b.model.isReadOnly)){x.handled=!0;var z=E.fb("ButtonIcon");b.Ea("checkbox"),z.visible=!z.visible,typeof E._doClick=="function"&&E._doClick(x,E),b.eb("checkbox")}}},a}),iA("CheckBox",function(a){a=Df(a),a=Sl("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new sr(0,1,0,0)});var y=Sl(Bn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new sr(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}),Be.None=xn=new Oe(Be,"None",0),Be.Default=or=new Oe(Be,"Default",0),Be.Vertical=_i=new Oe(Be,"Vertical",4),Be.Horizontal=Ci=new Oe(Be,"Horizontal",5),Be.Fill=Fn=new Oe(Be,"Fill",3),Be.Uniform=vi=new Oe(Be,"Uniform",1),Be.UniformToFill=Ir=new Oe(Be,"UniformToFill",2),Be.FlipVertical=Sr=new Oe(Be,"FlipVertical",1),Be.FlipHorizontal=_r=new Oe(Be,"FlipHorizontal",2),Be.FlipBoth=ho=new Oe(Be,"FlipBoth",3),Be.make=Sl,Be.getBuilders=function(){var a=new be,y;for(y in Zd)if(y!==y.toLowerCase()){var x=Zd.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},Be.defineBuilder=iA,Be.build=function(a,y,x){for(var E=[],b=2;b<arguments.length;++b)E[b-2]=arguments[b];if(b=Zd.I(a),typeof b=="function"&&(E=b([a].concat(E)),E instanceof Be))return y&&E.set(y),E;le('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},Be.takeBuilderArgument=Df;function hc(){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=Ei,this.o=yr,this.hg=or,this.ob=this.Bi=1,this.Pf=xn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}hc.prototype.copy=function(){var a=new hc;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 Lh(){this.u=-1/0,this.o=0,this.F=ye,this.rr=Ja,this.j=this.V="None"}Lh.prototype.copy=function(){var a=new Lh;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},Lh.className="LinkElementSettings";function If(){this.yj=this.Xi=es,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}If.prototype.copy=function(){var a=new If;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},If.className="LinkSettings";function cc(){this.ha=[1,0,0,1,0,0]}cc.prototype.copy=function(){var a=new cc;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},cc.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},cc.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},cc.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a!==0){if(this.translate(y,x),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.ha[1]*a+this.ha[3]*E,z=this.ha[0]*-E+this.ha[2]*a,tt=this.ha[1]*-E+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*E,this.ha[1]=b,this.ha[2]=z,this.ha[3]=tt,this.translate(-y,-x)}},cc.className="STransform";function JA(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}JA.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},JA.className="SGradient";function Ba(a,y,x){this.ownerDocument=a=y===void 0?se.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 Ya(this,x)}Ba.prototype.resize=function(a,y,x,E){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=E+"px",this.Oa.setAttributeNS(null,"width",x+"px"),this.Oa.setAttributeNS(null,"height",E+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+x+" "+E),this.context.ww.firstElementChild.setAttributeNS(null,"width",x+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",E+"px"),!0):!1},Ba.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),qe(y))for(var E in y)a.setAttributeNS(E==="href"?"http://www.w3.org/1999/xlink":"",E,y[E]);return x!==void 0&&(a.textContent=x),a},Ba.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Ba.prototype.focus=function(){this.Oa.focus()},Ba.prototype.mx=function(){this.ownerDocument=null},Sn.Object.defineProperties(Ba.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}}}),Ba.className="SVGSurface";function Ya(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 cc,this.j=yg(this),this.Nj=yg(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Mi++,E=this.Ud("clipPath",{id:"mainClip"+x});E.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=E,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(E),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function Uf(a,y,x,E,b,z,tt){a.Nj===void 0?Of(a,y,x,E,b,z,tt):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+E+", "+b+", "+z+", "+tt+")")}Tt=Ya.prototype,Tt.arc=function(a,y,x,E,b,z,tt,rt){var ot=2*Math.PI,lt=ot-1e-6,ut=x*Math.cos(E),ft=x*Math.sin(E),yt=a+ut,Mt=y+ft,bt=z?0:1;E=z?E-b:b-E,(1e-6<Math.abs(tt-yt)||1e-6<Math.abs(rt-Mt))&&this.path.push(["L",yt,+Mt]),0>E&&(E=E%ot+ot),E>lt?(this.path.push(["A",x,x,0,1,bt,a-ut,y-ft]),this.path.push(["A",x,x,0,1,bt,yt,Mt])):1e-6<E&&this.path.push(["A",x,x,0,+(E>=Math.PI),bt,a+x*Math.cos(b),y+x*Math.sin(b)])},Tt.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},Tt.Se=function(a){this.addPath(this.path,this.rb,a||0)},Tt.bezierCurveTo=function(a,y,x,E,b,z){this.path.push(["C",a,y,x,E,b,z])},Tt.clearRect=function(){},Tt.clip=function(){this.Yl.clipPath=!0},Tt.closePath=function(){this.path.push(["z"])},Tt.createLinearGradient=function(a,y,x,E){var b=new JA("linear");return b.x1=a,b.y1=y,b.x2=x,b.y2=E,b},Tt.createPattern=function(a){var y="";a instanceof HTMLCanvasElement&&(y=a.toDataURL()),a instanceof HTMLImageElement&&(y=a.getAttribute("src"));var x=this.eA;if(x[y])return"url(#"+x[y]+")";var E="PATTERN"+Mi++,b={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:E,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud(vu,b)),this.svg.appendChild(a),x[y]=E,"url(#"+E+")"},Tt.createRadialGradient=function(a,y,x,E,b,z){var tt=new JA("radial");return tt.x1=a,tt.y1=y,tt.r1=x,tt.x2=E,tt.y2=b,tt.r2=z,tt};function $p(a,y,x,E,b,z,tt,rt,ot){E=rt/E,b=ot/b,z===0&&tt===0||a.rb.translate(z,tt),E===1&&b===1||a.rb.scale(E,b),y===0&&x===0||a.rb.translate(-y,-x)}Tt.drawImage=function(a,y,x,E,b,z,tt,rt,ot){var lt="";a instanceof HTMLCanvasElement&&(lt=a.toDataURL()),a instanceof HTMLImageElement&&(lt=a.getAttribute("src"));var ut=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,E===void 0&&(z=y,tt=x,rt=E=ut,ot=b=a),E=E||0,b=b||0,rt=rt||0,ot=ot||0,$p(this,y,x,E,b,z||0,tt||0,rt,ot),z={x:0,y:0,width:ut||E,height:a||b,href:lt},Ce.$(E,rt)&&Ce.$(b,ot)?lt.toLowerCase().indexOf(".svg")===-1&&lt.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||E!==ut||b!==a)&&(E+=y,b+=x,z["clip-path"]="path('M "+y+","+x+" L "+E+" "+x+" L "+E+" "+b+" L "+y+" "+b+" z')"),dc(this,vu,z,this.rb),this.addElement(vu,z)},Tt.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),fc(this,this.Yl)},Tt.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Tt.fillRect=function(a,y,x,E){a=[a,y,x,E],a={x:a[0],y:a[1],width:a[2],height:a[3]},dc(this,"fill",a,this.rb),this.addElement("rect",a)},Tt.ox=function(a,y,x,E){a={x:a,y,width:x,height:E},dc(this,"fill",a,this.rb),fc(this,a),this.svg.prepend(this.Ud("rect",a))},Tt.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},dc(this,"fill",y,this.rb),this.addElement("text",y,a[0])},Tt.lineTo=function(a,y){this.path.push(["L",a,y])},Tt.moveTo=function(a,y){this.path.push(["M",a,y])},Tt.quadraticCurveTo=function(a,y,x,E){this.path.push(["Q",a,y,x,E])},Tt.rect=function(a,y,x,E){this.path.push(["M",a,y],["L",a+x,y],["L",a+x,y+E],["L",a,y+E],["z"])},Tt.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},Tt.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())},Tt.setTransform=function(a,y,x,E,b,z){a===1&&y===0&&x===0&&E===1&&b===0&&z===0||Of(this,a,y,x,E,b,z)};function t0(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}Tt.scale=function(a,y){this.rb.scale(a,y)},Tt.translate=function(a,y){this.rb.translate(a,y)},Tt.transform=function(){},Tt.yc=function(){},Tt.stroke=function(){e0(this,this.Yl)},Tt.jk=function(){this.clipInsteadOfFill||this.stroke()},Tt.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},Tt.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 dc(a,y,x,E){y==="fill"?fc(a,x):y==="stroke"&&e0(a,x),E!==null&&(a=E.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function fc(a,y){a.fillStyle instanceof JA?y.fill=gc(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 Qf(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof JA?y.setAttributeNS(null,"fill",gc(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 e0(a,y){if(a.strokeStyle instanceof JA)y.stroke=gc(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 gc(a,y,x){var E="";if(E=a.Hl!==null?a.Hl.getAttribute(x?"fill":"stroke"):null,E!==null&&E.indexOf("GRAD")!==-1?(E=E.split("#")[1].slice(0,-1),x=a.svg.getElementById(E),x!==null&&x.remove()):E="GRAD"+Mi++,y.type==="linear")x=a.Ud("linearGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,id:E,gradientUnits:"userSpaceOnUse"});else if(y.type==="radial")x=a.Ud("radialGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,r1:y.r1,r2:y.r2,id:E});else throw Error("invalid gradient");var b=y.gx;y=b.length;for(var z=[],tt=0;tt<y;tt++){var rt=b[tt],ot=rt.color;rt={offset:rt.offset,"stop-color":ot},/^rgba\(/.test(ot)&&(ot=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(ot),rt["stop-color"]="rgb("+ot[1]+","+ot[2]+","+ot[3]+")",rt["stop-opacity"]=ot[4]),z.push(rt)}for(z.sort(function(lt,ut){return lt.offset>ut.offset?1:-1}),b=0;b<y;b++)x.appendChild(a.Ud("stop",z[b]));return a.svg.appendChild(x),"url(#"+E+")"}Tt.addPath=function(a,y,x){for(var E=[],b=0;b<a.length;b++){var z=fi(a[b]),tt=[z.shift()];if(tt[0]==="A")tt.push(z.shift()+","+z.shift(),z.shift(),z.shift()+","+z.shift(),z.shift()+","+z.shift());else for(;z.length;)tt.push(z.shift()+","+z.shift());E.push(tt.join(" "))}if(E=E.join(" "),a=this.Yl,a.clipPath)0<this.nh.length&&this.nh[this.nh.length-1].setAttributeNS(null,"clip-path",'path("'+E+'")');else if(a.d=E,dc(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var rt in a)rt!=="transform"&&y.setAttributeNS(null,rt,a[rt]);else{rt=y.getElementsByTagName("path");for(var ot in a)ot!=="transform"&&rt[x].setAttributeNS(null,ot,a[ot])}else this.addElement("path",a)};function Of(a,y,x,E,b,z,tt){var rt=new cc;rt.ha=[y,x,E,b,z,tt],y={},dc(a,"g",y,rt),rt=a.addElement("g",y),a.nh.push(rt)}function yg(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}Tt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Ou(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function SA(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}Tt.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},Tt.fs=function(){this.Ct=!1},Tt.Vc=function(){},Tt.Wx=function(){},Ya.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Ya.prototype.getImageData=function(){return null},Ya.prototype.measureText=function(){return null};function Hf(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()))}Ya.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Ya.className="SVGContext",He.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Ba(this,se.document));var y=new Ba(this,se.document,!0);a===void 0&&(a=new Si);var x=this;return nd(this,function(E,b){return E=mg(x,E,"SVG",y),E=E!==null?E.svg:null,typeof b=="function"?(b(E),null):E},a)},He.prototype.makeSvg=He.prototype.Cs,He.prototype.av=function(a){return this.Cs(a)},He.prototype.makeSVG=He.prototype.av;function Xl(a,y,x,E){this.ownerDocument=y=y===void 0?se.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new pc(y,x,E),y.H=a}Xl.prototype.resize=function(a,y,x,E){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=E+"px",!0):!1},Xl.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},Xl.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Xl.prototype.focus=function(){this.Oa.focus()},Xl.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},Sn.Object.defineProperties(Xl.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}}}),Xl.className="CanvasSurface";function pc(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&le("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 Yi,this.isTemporary=!!x}Tt=pc.prototype,Tt.Wx=function(a){this.Z.imageSmoothingEnabled=a},Tt.arc=function(a,y,x,E,b,z){this.Z.arc(a,y,x,E,b,z)},Tt.beginPath=function(){this.Z.beginPath()},Tt.Se=function(){},Tt.bezierCurveTo=function(a,y,x,E,b,z){this.Z.bezierCurveTo(a,y,x,E,b,z)},Tt.clearRect=function(a,y,x,E){this.yc(),this.Z.clearRect(a,y,x,E)},Tt.clip=function(){this.Z.clip()},Tt.closePath=function(){this.Z.closePath()},Tt.createLinearGradient=function(a,y,x,E){return this.Z.createLinearGradient(a,y,x,E)},Tt.createPattern=function(a,y){return this.Z.createPattern(a,y)},Tt.createRadialGradient=function(a,y,x,E,b,z){return this.Z.createRadialGradient(a,y,x,E,b,z)},Tt.drawImage=function(a,y,x,E,b,z,tt,rt,ot){E===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,E,b,z,tt,rt,ot)},Tt.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},Tt.fillRect=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Tt.ox=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Tt.fillText=function(a,y,x){this.Z.fillText(a,y,x)},Tt.getImageData=function(a,y,x,E){return this.Z.getImageData(a,y,x,E)},Tt.lineTo=function(a,y){this.Z.lineTo(a,y)},Tt.measureText=function(a){return this.Z.measureText(a)},Tt.moveTo=function(a,y){this.Z.moveTo(a,y)},Tt.quadraticCurveTo=function(a,y,x,E){this.Z.quadraticCurveTo(a,y,x,E)},Tt.rect=function(a,y,x,E){this.Z.rect(a,y,x,E)},Tt.restore=function(){this.Z.restore()},Tt.save=function(){this.yc(),this.Z.save()},pc.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Tt=pc.prototype,Tt.setTransform=function(a,y,x,E,b,z){this.El.setTransform(a,y,x,E,b,z)},Tt.scale=function(a,y){this.El.scale(a,y)},Tt.translate=function(a,y){this.El.translate(a,y)},Tt.stroke=function(){this.Z.stroke()},Tt.transform=function(a,y,x,E,b,z){if(a!==1||y!==0||x!==0||E!==1||b!==0||z!==0){var tt=this.El,rt=tt.m11*a+tt.m21*y;a=tt.m12*a+tt.m22*y,y=tt.m11*x+tt.m21*E,x=tt.m12*x+tt.m22*E,tt.dx=tt.m11*b+tt.m21*z+tt.dx,tt.dy=tt.m12*b+tt.m22*z+tt.dy,tt.m11=rt,tt.m12=a,tt.m21=y,tt.m22=x}},Tt.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},Tt.ng=function(a,y){if(a instanceof lo&&a.type===Cr){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)},Tt.jk=function(){this.Hm||this.stroke()},Tt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},Tt.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},Tt.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(Tm),a.lineDashOffset=0)},Tt.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Tt.Hs=function(){},Sn.Object.defineProperties(pc.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 Tm=Object.freeze([]);pc.className="CanvasSurfaceContext";function Rf(){this.F=this.o=this.u=this.j=0}Rf.className="ColorNumbers";function lo(a,y){bi||(Pt(),bi=!0),an(this),this._isFrozen=!1,a===void 0?(this.na=Hr,this.xk="black"):typeof a=="string"?(this.na=Hr,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===cr?(this.Qd=Xr,this.Lk=Tr):this.Lk=a===Cr?this.Qd=rr:this.Qd=Ar,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}lo.prototype.copy=function(){var a=new lo;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},Tt=lo.prototype,Tt.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Tt.ka=function(){return Object.isFrozen(this)&&le("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Tt.qb=function(a){a.classType===lo&&(this.type=a)},Tt.toString=function(){var a="Brush(";if(this.type===Hr)a+=this.color;else if(a=this.type===cr?a+"Linear ":this.type===Cr?a+"Radial ":this.type===Go?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+")"},Tt.addColorStop=function(a,y){return this._isFrozen&&De(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Xn(a,"0 <= loc <= 1",lo,"addColorStop:loc"),this.we===null&&(this.we=new be),this.we.add(a,y),this.na===Hr&&(this.type=cr),this.xe=null,this},Tt.Vz=function(a,y){if(this._isFrozen&&De(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?oo:y,this.type===Hr)BA(this.color),this.color=Yd(a,y);else if((this.type===cr||this.type===Cr)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)BA(x.value),this.addColorStop(x.key,Yd(a,y));return this};function n0(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?oo:x,BA(a),Yd(y,x)}Tt.Wy=function(a,y){if(this._isFrozen&&De(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?oo:y,this.type===Hr)BA(this.color),this.color=Yd(-a,y);else if((this.type===cr||this.type===Cr)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)BA(x.value),this.addColorStop(x.key,Yd(-a,y));return this};function i0(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?oo:x,BA(a),Yd(-y,x)}function np(a,y,x){BA(a),a=Ne.j;var E=Ne.u,b=Ne.o,z=Ne.F;return BA(y),x===void 0&&(x=.5),"rgba("+Math.round((Ne.j-a)*x+a)+", "+Math.round((Ne.u-E)*x+E)+", "+Math.round((Ne.o-b)*x+b)+", "+Math.round((Ne.F-z)*x+z)+")"}Tt.Gx=function(){if(this.type===Hr)return Wd(this.color);if((this.type===cr||this.type===Cr)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Cr)return Wd(a.first().value);if(a.get(.5)!==null)return Wd(a.get(.5));if(a.count===2)return a=a.Fa(),Wd(np(a[0].value,a[1].value));for(var y=a.iterator,x=-1,E=-1,b=1,z=1;y.next();){var tt=y.key,rt=Math.abs(.5-y.key);b>z&&rt<b?(x=tt,b=rt):z>=b&&rt<z&&(E=tt,z=rt)}return x>E&&(z=x,x=E,E=z,z=b),b=E-x,Wd(np(a.get(x),a.get(E),1-z/b))}return!1};function Wd(a){return a?a instanceof lo?a.Gx():(BA(a),128>(299*Ne.j+587*Ne.u+114*Ne.o)/1e3):!1}function Yd(a,y){switch(y){case oo:y=100*rp(Ne.j);var x=100*rp(Ne.u),E=100*rp(Ne.o);return Un.j=.4124564*y+.3575761*x+.1804375*E,Un.u=.2126729*y+.7151522*x+.072175*E,Un.o=.0193339*y+.119192*x+.9503041*E,Un.F=Ne.F,y=Bt(Un.j/Ee[0]),x=Bt(Un.u/Ee[1]),E=Bt(Un.o/Ee[2]),oi.j=116*x-16,oi.u=500*(y-x),oi.o=200*(x-E),oi.F=Un.F,oi.j=Math.min(100,Math.max(0,oi.j+100*a)),a=(oi.j+16)/116,y=a-oi.o/200,Un.j=Ee[0]*wt(oi.u/500+a),Un.u=Ee[1]*(oi.j>ue*jt?Math.pow(a,3):oi.j/ue),Un.o=Ee[2]*wt(y),Un.F=oi.F,a=-.969266*Un.j+1.8760108*Un.u+.041556*Un.o,y=.0556434*Un.j+-.2040259*Un.u+1.0572252*Un.o,Ne.j=255*op((3.2404542*Un.j+-1.5371385*Un.u+-.4985314*Un.o)/100),Ne.u=255*op(a/100),Ne.o=255*op(y/100),Ne.F=Un.F,Ne.j=Math.round(Ne.j),255<Ne.j?Ne.j=255:0>Ne.j&&(Ne.j=0),Ne.u=Math.round(Ne.u),255<Ne.u?Ne.u=255:0>Ne.u&&(Ne.u=0),Ne.o=Math.round(Ne.o),255<Ne.o?Ne.o=255:0>Ne.o&&(Ne.o=0),"rgba("+Ne.j+", "+Ne.u+", "+Ne.o+", "+Ne.F+")";case ao:return ip(),En.o=Math.min(100,Math.max(0,En.o+100*a)),"hsla("+En.j+", "+En.u+"%, "+En.o+"%, "+En.F+")";default:le("Unknown color space: "+y)}}function BA(a){bi||(Pt(),bi=!0);var y=Ye;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,Ne.j=a[0],Ne.u=a[1],Ne.o=a[2],Ne.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Ne.j=0,Ne.u=0,Ne.o=0,Ne.F=1)}}function ip(){var a=Ne.j/255,y=Ne.u/255,x=Ne.o/255,E=Math.max(a,y,x),b=Math.min(a,y,x),z=E-b;if(b=(E+b)/2,z===0)var tt=a=0;else{switch(E){case a:tt=(y-x)/z%6;break;case y:tt=(x-a)/z+2;break;case x:tt=(a-y)/z+4}tt*=60,0>tt&&(tt+=360),a=z/(1-Math.abs(2*b-1))}En.j=Math.round(tt),En.u=Math.round(100*a),En.o=Math.round(100*b),En.F=Ne.F}function rp(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function op(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function Bt(a){return a>jt?Math.pow(a,1/3):(ue*a+16)/116}function wt(a){var y=a*a*a;return y>jt?y:(116*a-16)/ue}function Et(a,y){typeof a!="string"&&(a instanceof lo||le("Value for "+y+" must be a color string or a Brush, not "+a))}function Pt(){Ye=Xo?new Xl(null,void 0,{willReadFrequently:!0}).context:null}Sn.Object.defineProperties(lo.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&De(this,a),this.na=a,this.start.Mc()&&(a===cr?this.start=Xr:a===Cr&&(this.start=rr)),this.end.Mc()&&(a===cr?this.end=Tr:a===Cr&&(this.end=rr)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&De(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&De(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&De(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&De(this,a),0>a&&Xn(a,">= zero",lo,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&De(this,a),0>a&&Xn(a,">= zero",lo,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&De(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&De(this,a),this.cr=a,this.xe=null}}}),lo.prototype.isDark=lo.prototype.Gx,lo.prototype.darkenBy=lo.prototype.Wy,lo.prototype.lightenBy=lo.prototype.Vz,lo.prototype.addColorStop=lo.prototype.addColorStop;var jt=216/24389,ue=24389/27,Ee=[95.047,100,108.883],Ye=null,Ne=new Rf,En=new Rf,Un=new Rf,oi=new Rf,bi=!1;lo.className="Brush";var Hr;lo.Solid=Hr=new Oe(lo,"Solid",0);var cr;lo.Linear=cr=new Oe(lo,"Linear",1);var Cr;lo.Radial=Cr=new Oe(lo,"Radial",2);var Go;lo.Pattern=Go=new Oe(lo,"Pattern",4);var oo;lo.Lab=oo=new Oe(lo,"Lab",5);var ao;lo.HSL=ao=new Oe(lo,"HSL",6),lo.randomColor=function(a,y){a===void 0&&(a=128),y===void 0&&(y=Math.max(a,255));var x=Math.abs(y-a);y=Math.floor(a+Math.random()*x).toString(16);var E=Math.floor(a+Math.random()*x).toString(16);return a=Math.floor(a+Math.random()*x).toString(16),2>y.length&&(y="0"+y),2>E.length&&(E="0"+E),2>a.length&&(a="0"+a),"#"+y+E+a},lo.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;bi||(Pt(),bi=!0);var y=Ye;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)},lo.lighten=function(a){return n0(a)},lo.lightenBy=n0,lo.darken=function(a){return i0(a)},lo.darkenBy=i0,lo.mix=np,lo.isDark=Wd;function uo(){this.xa="Base"}uo.prototype.measure=function(){},uo.prototype.Yz=function(a,y,x,E,b){a.measure(y,x,E,b)},uo.prototype.arrange=function(){},uo.prototype.Ly=function(a,y,x,E,b,z){a.arrange(y,x,E,b,z)},uo.prototype.iA=function(a){a.Uj()},uo.prototype.gc=function(){},Sn.Object.defineProperties(uo.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Bn}}}),uo.prototype.remeasureObject=uo.prototype.iA,uo.prototype.arrangeElement=uo.prototype.Ly,uo.prototype.measureElement=uo.prototype.Yz,uo.className="PanelLayout";function qo(){this.xa="Base"}We(qo,uo),qo.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length;a=Al(a);for(var ot=0;ot<rt;ot++){var lt=E[ot];if(lt.visible||lt===a){var ut=lt.margin,ft=ut.right+ut.left;ut=ut.top+ut.bottom,lt.measure(y,x,z,tt);var yt=lt.measuredBounds;ft=Math.max(yt.width+ft,0),ut=Math.max(yt.height+ut,0),yt=lt.position.x;var Mt=lt.position.y;isFinite(yt)||(yt=0),isFinite(Mt)||(Mt=0),lt instanceof vr&&lt.isGeometryPositioned&&(lt=lt.strokeWidth/2,yt-=lt,Mt-=lt),kr(b,yt,Mt,ft,ut)}}},qo.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding;for(a=x.x-b.left,x=x.y-b.top,b=0;b<E;b++){var z=y[b],tt=z.measuredBounds,rt=z.margin,ot=z.position.x,lt=z.position.y;if(ot=isNaN(ot)?-a:ot-a,lt=isNaN(lt)?-x:lt-x,z instanceof vr&&z.isGeometryPositioned){var ut=z.strokeWidth/2;ot-=ut,lt-=ut}z.visible&&z.arrange(ot+rt.left,lt+rt.top,tt.width,tt.height)}};function To(){this.xa="Base"}We(To,uo),To.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length;y=rn(),z=Al(a);for(var ot=0;ot<rt;ot++){var lt=E[ot];if(lt.visible||lt===z){var ut=Ka(lt,!1);if(ut!==xn&&ut!==Ci)y.push(lt);else{lt.measure(1/0,x,0,tt),ut=lt.margin,lt=lt.measuredBounds;var ft=Math.max(lt.height+ut.top+ut.bottom,0);b.width+=Math.max(lt.width+ut.right+ut.left,0),b.height=Math.max(b.height,ft)}}}for(E=y.length,a.desiredSize.height?x=Math.min(a.desiredSize.height,a.maxSize.height):b.height!==0&&(x=Math.min(b.height,a.maxSize.height)),a=0;a<E;a++)ot=y[a],(ot.visible||ot===z)&&(ut=ot.margin,rt=ut.right+ut.left,ut=ut.top+ut.bottom,ot.measure(1/0,x,0,tt),ot=ot.measuredBounds,ut=Math.max(ot.height+ut,0),b.width+=Math.max(ot.width+rt,0),b.height=Math.max(b.height,ut));Ve(y)},To.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.top,tt=a.isOpposite,rt=tt?x.width:b.left,ot=0;ot<E;ot++){var lt=z,ut=y[ot];if(ut.visible){var ft=ut.measuredBounds,yt=ut.margin,Mt=yt.top+yt.bottom,bt=z+b.bottom,Dt=ft.height,qt=Ka(ut,!1);(isNaN(ut.desiredSize.height)&&qt===Fn||qt===_i)&&(Dt=Math.max(x.height-Mt-bt,0)),Mt=Dt+Mt+bt,bt=ut.alignment,bt.Xb()&&(bt=a.defaultAlignment),bt.sb()||(bt=rr),tt&&(rt-=ft.width+yt.left+yt.right),ut.arrange(rt+bt.offsetX+yt.left,lt+bt.offsetY+yt.top+(x.height*bt.y-Mt*bt.y),ft.width,Dt),tt||(rt+=ft.width+yt.left+yt.right)}}};function Yr(){this.xa="Base"}We(Yr,uo),Yr.prototype.measure=function(a,y,x,E,b,z){var tt=E.length;x=rn();for(var rt=Al(a),ot=0;ot<tt;ot++){var lt=E[ot];if(lt.visible||lt===rt){var ut=Ka(lt,!1);if(ut!==xn&&ut!==_i)x.push(lt);else{var ft=lt.margin;ut=ft.right+ft.left,ft=ft.top+ft.bottom,lt.measure(y,1/0,z,0),lt=lt.measuredBounds,Fr(b,Math.max(b.width,Math.max(lt.width+ut,0)),b.height+Math.max(lt.height+ft,0))}}}if(E=x.length,E!==0){for(a.desiredSize.width?y=Math.min(a.desiredSize.width,a.maxSize.width):b.width!==0&&(y=Math.min(b.width,a.maxSize.width)),a=0;a<E;a++)ot=x[a],(ot.visible||ot===rt)&&(lt=ot.margin,tt=lt.right+lt.left,lt=lt.top+lt.bottom,ot.measure(y,1/0,z,0),ot=ot.measuredBounds,lt=Math.max(ot.height+lt,0),b.width=Math.max(b.width,Math.max(ot.width+tt,0)),b.height+=lt);Ve(x)}},Yr.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.left,tt=a.isOpposite,rt=tt?x.height:b.top,ot=0;ot<E;ot++){var lt=z,ut=y[ot];if(ut.visible){var ft=ut.measuredBounds,yt=ut.margin,Mt=yt.left+yt.right,bt=z+b.right,Dt=ft.width,qt=Ka(ut,!1);(isNaN(ut.desiredSize.width)&&qt===Fn||qt===Ci)&&(Dt=Math.max(x.width-Mt-bt,0)),Mt=Dt+Mt+bt,bt=ut.alignment,bt.Xb()&&(bt=a.defaultAlignment),bt.sb()||(bt=rr),tt&&(rt-=ft.height+yt.bottom+yt.top),ut.arrange(lt+bt.offsetX+yt.left+(x.width*bt.x-Mt*bt.x),rt+bt.offsetY+yt.top,Dt,ft.height),tt||(rt+=ft.height+yt.bottom+yt.top)}}};function hs(){this.xa="Base"}We(hs,uo),hs.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length,ot=a.Pb(),lt=ot.margin,ut=lt.right+lt.left,ft=lt.top+lt.bottom;ot.measure(y,x,z,tt);var yt=ot.measuredBounds;z=yt.width,tt=yt.height;var Mt=Math.max(z+ut,0),bt=Math.max(tt+ft,0),Dt=a.isClipping,qt=Ue.allocAt(-lt.left,-lt.top,Mt,bt),Vt=Ue.allocAt(0,0,z,tt);vs(ot,Vt,!0),z=Vt.width,tt=Vt.height;for(var oe=!0,ce=Al(a),ge=0;ge<rt;ge++){var Se=E[ge];yt=y;var Re=x;if(Se!==ot&&(Se.visible||Se===ce)){lt=Se.margin;var qn=lt.left,gi=lt.top;switch(Mt=lt.right+lt.left,bt=lt.top+lt.bottom,lt=Ka(Se,!1),lt){case Fn:yt=z,Re=tt,gi=qn=bt=Mt=0;break;case Ci:yt=z,qn=Mt=0;break;case _i:Re=tt,gi=bt=0}Se.measure(yt,Re,0,0),yt=Se.measuredBounds,Mt=Math.max(yt.width+Mt,0),bt=Math.max(yt.height+bt,0),lt=Se.alignment,lt.Xb()&&(lt=a.defaultAlignment),lt.sb()||(lt=rr);var ui=Se.alignmentFocus;if(ui.Xb()&&(ui=rr),Re=null,Se instanceof Bn&&Se.$e!==""&&(Re=Se.fb(Se.$e),Re===Se&&(Re=null)),qn=Vt.x-qn,gi=Vt.y-gi,Re!==null){for(Se.arrange(0,0,yt.width,yt.height),yt=Re.actualBounds,yt=Qt.allocAt(yt.x+(ui.x*yt.width-ui.offsetX),yt.y+(ui.y*yt.height-ui.offsetY)),Re=Re.panel;Re!==Se;)Re.transform.Ga(yt),Re=Re.panel;qn+=lt.x*z+lt.offsetX-yt.x,gi+=lt.y*tt+lt.offsetY-yt.y,Qt.free(yt)}else qn+=lt.x*z+lt.offsetX-(ui.x*yt.width+ui.offsetX),gi+=lt.y*tt+lt.offsetY-(ui.y*yt.height+ui.offsetY);oe?(oe=!1,b.h(qn,gi,Mt,bt)):kr(b,qn,gi,Mt,bt)}}switch(oe?b.assign(qt):Dt?b.Uu(Vt.x,Vt.y,Vt.width,Vt.height):kr(b,qt.x,qt.y,qt.width,qt.height),Ue.free(qt),Ue.free(Vt),lt=ot.stretch,lt===or&&(lt=Ka(ot,!1)),lt){case xn:return;case Fn:if(!isFinite(y)&&!isFinite(x))return;break;case Ci:if(!isFinite(y))return;break;case _i:if(!isFinite(x))return}for(yt=ot.measuredBounds,z=yt.width,tt=yt.height,Mt=Math.max(z+ut,0),bt=Math.max(tt+ft,0),lt=ot.margin,Vt=Ue.allocAt(-lt.left,-lt.top,Mt,bt),vs(ot,Vt,!0),z=Vt.width,tt=Vt.height,y=0;y<rt;y++)x=E[y],x===ot||!x.visible&&x!==ce||(lt=x.margin,Mt=lt.right+lt.left,bt=lt.top+lt.bottom,yt=x.measuredBounds,Mt=Math.max(yt.width+Mt,0),bt=Math.max(yt.height+bt,0),ut=x.alignment,ut.Xb()&&(ut=a.defaultAlignment),ut.sb()||(ut=rr),x=x.alignmentFocus,x.Xb()&&(x=rr),oe?(oe=!1,b.h(ut.x*z+ut.offsetX-(x.x*yt.width+x.offsetX)-lt.left,ut.y*tt+ut.offsetY-(x.y*yt.height+x.offsetY)-lt.top,Mt,bt)):kr(b,ut.x*z+ut.offsetX-(x.x*yt.width+x.offsetX)-lt.left,ut.y*tt+ut.offsetY-(x.y*yt.height+x.offsetY)-lt.top,Mt,bt));oe?b.assign(qt):Dt?b.Uu(Vt.x,Vt.y,Vt.width,Vt.height):kr(b,qt.x,qt.y,qt.width,qt.height),Ue.free(Vt)},hs.prototype.arrange=function(a,y,x){var E=y.length,b=a.Pb(),z=b.measuredBounds,tt=z.width,rt=z.height,ot=a.padding;z=ot.left,ot=ot.top;var lt=z-x.x,ut=ot-x.y;for(b.arrange(lt,ut,tt,rt),tt=Ue.allocAt(0,0,tt,rt),vs(b,tt,!1),rt=0;rt<E;rt++){var ft=y[rt];if(ft!==b){lt=ft.measuredBounds;var yt=lt.width,Mt=lt.height;ut=ft.alignment,ut.Xb()&&(ut=a.defaultAlignment),ut.sb()||(ut=rr);var bt=ft.alignmentFocus;if(bt.Xb()&&(bt=rr),lt=null,ft instanceof Bn&&ft.$e!==""&&(lt=ft.fb(ft.$e),lt===ft&&(lt=null)),lt!==null){var Dt=lt.actualBounds;for(bt=Qt.allocAt(Dt.x+(bt.x*Dt.width-bt.offsetX),Dt.y+(bt.y*Dt.height-bt.offsetY)),lt=lt.panel;lt!==ft;)lt.transform.Ga(bt),lt=lt.panel;lt=ut.x*tt.width+ut.offsetX-bt.x,ut=ut.y*tt.height+ut.offsetY-bt.y,Qt.free(bt)}else lt=ut.x*tt.width+ut.offsetX-(bt.x*yt+bt.offsetX),ut=ut.y*tt.height+ut.offsetY-(bt.y*Mt+bt.offsetY);lt+=tt.x-x.x,ut+=tt.y-x.y,ft.visible&&ft.arrange(z+lt,ot+ut,yt,Mt)}}Ue.free(tt)};function vs(a,y,x){var E=null;if(a instanceof Bn&&a.$e!==""&&(E=a.fb(a.$e),E===a&&(E=null)),E!==null)for(x&&a.arrange(0,0,y.width,y.height),y.assign(E.actualBounds),E=E.panel;E!==a;)E.transform.pp(y),E=E.panel}function Do(){this.xa="Base"}We(Do,uo),Do.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length,ot=a.Pb(),lt=ot.margin,ut=y,ft=x,yt=lt.right+lt.left,Mt=lt.top+lt.bottom;ot.measure(y,x,z,tt),lt=ot.measuredBounds;var bt=0,Dt=null;ot instanceof vr&&(Dt=ot,bt=Dt.strokeWidth*Dt.scale);var qt=Math.max(lt.width+yt,0);lt=Math.max(lt.height+Mt,0);var Vt=Dm(ot),oe=Vt.x*qt+Vt.offsetX;Vt=Vt.y*lt+Vt.offsetY;var ce=Im(ot),ge=ce.x*qt+ce.offsetX;for(ce=ce.y*lt+ce.offsetY,isFinite(y)&&(ut=Math.max(Math.abs(oe-ge)-bt,0)),isFinite(x)&&(ft=Math.max(Math.abs(Vt-ce)-bt,0)),bt=on.alloc(),bt.h(0,0),a=Al(a),ce=0;ce<rt;ce++)Vt=E[ce],Vt===ot||!Vt.visible&&Vt!==a||(lt=Vt.margin,qt=lt.right+lt.left,oe=lt.top+lt.bottom,Vt.measure(ut,ft,0,0),lt=Vt.measuredBounds,qt=Math.max(lt.width+qt,0),lt=Math.max(lt.height+oe,0),bt.h(Math.max(qt,bt.width),Math.max(lt,bt.height)));if(rt===1)b.width=qt,b.height=lt,on.free(bt);else{switch(Vt=Dm(ot),ce=Im(ot),rt=E=0,ce.x!==Vt.x&&ce.y!==Vt.y&&(E=bt.width/Math.abs(ce.x-Vt.x),rt=bt.height/Math.abs(ce.y-Vt.y)),on.free(bt),bt=0,Dt!==null&&(bt=Dt.strokeWidth*Dt.scale,_m(Dt)===vi&&(E=rt=Math.max(E,rt))),E+=Math.abs(Vt.offsetX)+Math.abs(ce.offsetX)+bt,rt+=Math.abs(Vt.offsetY)+Math.abs(ce.offsetY)+bt,Dt=ot.stretch,Dt===or&&(Dt=Ka(ot,!1)),Dt){case xn:tt=z=0;break;case Fn:isFinite(y)&&(E=y),isFinite(x)&&(rt=x);break;case Ci:isFinite(y)&&(E=y),tt=0;break;case _i:z=0,isFinite(x)&&(rt=x)}ot.Uj(),ot.measure(E,rt,z,tt),b.width=ot.measuredBounds.width+yt,b.height=ot.measuredBounds.height+Mt}},Do.prototype.arrange=function(a,y){var x=y.length,E=a.Pb(),b=E.measuredBounds,z=Ue.alloc();z.h(0,0,1,1);var tt=E.margin,rt=tt.left;tt=tt.top;var ot=a.padding,lt=ot.left;ot=ot.top,E.arrange(lt+rt,ot+tt,b.width,b.height);var ut=Dm(E),ft=Im(E),yt=ut.y*b.height+ut.offsetY,Mt=ft.x*b.width+ft.offsetX;for(ft=ft.y*b.height+ft.offsetY,z.x=ut.x*b.width+ut.offsetX,z.y=yt,kr(z,Mt,ft,0,0),z.x+=rt+lt,z.y+=tt+ot,b=0;b<x;b++)rt=y[b],rt!==E&&(lt=rt.measuredBounds,tt=rt.margin,ot=Math.max(lt.width+tt.right+tt.left,0),ut=Math.max(lt.height+tt.top+tt.bottom,0),yt=rt.alignment,yt.Xb()&&(yt=a.defaultAlignment),yt.sb()||(yt=rr),ot=z.width*yt.x+yt.offsetX-ot*yt.x+tt.left+z.x,tt=z.height*yt.y+yt.offsetY-ut*yt.y+tt.top+z.y,rt.visible&&(Ao(z.x,z.y,z.width,z.height,ot,tt,lt.width,lt.height)?rt.arrange(ot,tt,lt.width,lt.height):rt.arrange(ot,tt,lt.width,lt.height,new Ue(z.x,z.y,z.width,z.height))));Ue.free(z)};function Ma(){this.xa="Base",this.name="Table"}We(Ma,uo),Ma.prototype.measure=function(a,y,x,E,b){for(var z=E.length,tt=rn(),rt=rn(),ot=0;ot<z;ot++){var lt=E[ot],ut=lt instanceof Bn?lt:null;if(ut!==null&&vc(ut)&&lt.visible){rt.push(ut);for(var ft=ut.O.s,yt=ft.length,Mt=0;Mt<yt;Mt++){var bt=ft[Mt];ut.type===Bn.TableRow?bt.row=lt.row:ut.type===Bn.TableColumn&&(bt.column=lt.column),tt.push(bt)}}else tt.push(lt)}z=tt.length,z===0&&(a.Fb(0),a.Eb(0));for(var Dt=[],qt=0;qt<z;qt++){var Vt=tt[qt];Vt.visible&&(Es(Vt,!0),nA(Vt,!0),Dt[Vt.row]||(Dt[Vt.row]=[]),Dt[Vt.row][Vt.column]||(Dt[Vt.row][Vt.column]=[]),Dt[Vt.row][Vt.column].push(Vt))}Ve(tt);var oe=rn(),ce=rn(),ge=rn(),Se={count:0},Re={count:0},qn=y,gi=x,ui=a.rowDefs,Qn=a.colDefs,pn=null;z=ui.length;for(var ar=0;ar<z;ar++)pn=ui[ar],pn!==void 0&&(pn.actual=0);z=Qn.length;for(var Ji=0;Ji<z;Ji++)pn=Qn[Ji],pn!==void 0&&(pn.actual=0);for(var to=Dt.length,So=0,Js=0;Js<to;Js++)Dt[Js]&&(So=Math.max(So,Dt[Js].length));var ea=Math.min(a.topIndex,to-1),za=Math.min(a.leftIndex,So-1),qs=0;to=Dt.length;for(var Lc=Al(a),Ms=0;Ms<to;Ms++)if(Dt[Ms]){So=Dt[Ms].length;var lA=a.Fb(Ms);lA.actual=0;for(var ja=lA.oc=0;ja<So;ja++)if(Dt[Ms][ja]){var Mc=a.Eb(ja);oe[ja]===void 0&&(Mc.actual=0,Mc.oc=0,oe[ja]=!0);for(var tu=Dt[Ms][ja],Su=tu.length,Ol=0;Ol<Su;Ol++){var Cl=tu[Ol];if(Cl.visible||Cl===Lc){var md=1<Cl.rowSpan||1<Cl.columnSpan;md&&(Ms<ea||ja<za||ce.push(Cl));var uA=Cl.margin,Kg=uA.right+uA.left,Hl=uA.top+uA.bottom,Va=Jo(Cl,lA,Mc,!1),zp=Cl.desiredSize,qf=!isNaN(zp.height),LA=!isNaN(zp.width)&&qf;if(md||Va===xn||LA||Ms<ea||ja<za||(Se[ja]!==void 0||Va!==Fn&&Va!==Ci||(Se[ja]=-1,Se.count++),Re[Ms]!==void 0||Va!==Fn&&Va!==_i||(Re[Ms]=-1,Re.count++),ge.push(Cl)),Cl.measure(1/0,1/0,0,0),!(Ms<ea||ja<za)){var Pl=Cl.measuredBounds,of=Math.max(Pl.width+Kg,0),Rl=Math.max(Pl.height+Hl,0);if(Cl.rowSpan===1&&(Va===xn||Va===Ci)){pn=a.Fb(Ms);var vd=pn.Wc();qs=Math.max(Rl-pn.actual,0),qs+vd>gi&&(qs=Math.max(gi-vd,0));var wm=pn.oa===0;pn.oc=pn.oc+qs,pn.actual=pn.oa+qs,gi=Math.max(gi-(qs+(wm?vd:0)),0)}if(Cl.columnSpan===1&&(Va===xn||Va===_i)){pn=a.Eb(ja);var jp=pn.Wc();qs=Math.max(of-pn.actual,0),qs+jp>qn&&(qs=Math.max(qn-jp,0));var iy=pn.oa===0;pn.oc=pn.oc+qs,pn.actual=pn.oa+qs,qn=Math.max(qn-(qs+(iy?jp:0)),0)}md&&Cl.Uj()}}}}}Ve(oe);var uh=0,Th=0;z=a.columnCount;for(var $f=0;$f<z;$f++){var yd=Qn[$f];yd!==void 0&&(uh+=isNaN(yd.Hc)?yd.oc:yd.Hc,yd.oc!==0&&(uh+=yd.Wc()))}z=a.rowCount;for(var Gg=0;Gg<z;Gg++){var wd=ui[Gg];wd!==void 0&&(Th+=isNaN(wd.Hc)?wd.oc:wd.Hc,wd.oc!==0&&(Th+=wd.Wc()))}qn=Math.max(y-uh,0);var Ah=gi=Math.max(x-Th,0),kc=qn;z=ge.length;for(var Fl=0;Fl<z;Fl++){var MA=ge[Fl],xm=a.Fb(MA.row),Nh=a.Eb(MA.column),zg=MA.measuredBounds,AA=MA.margin,sf=AA.right+AA.left,kA=AA.top+AA.bottom;Se[MA.column]=Nh.oc===0&&Se[MA.column]!==void 0?Math.max(zg.width+sf,Se[MA.column]):null,Re[MA.row]=xm.oc===0&&Re[MA.row]!==void 0?Math.max(zg.height+kA,Re[MA.row]):null}var tg=0,jg=0,Vu;for(Vu in Re)Vu!=="count"&&(tg+=Re[Vu]);for(Vu in Se)Vu!=="count"&&(jg+=Se[Vu]);for(var ha=on.alloc(),Vp=0;Vp<z;Vp++){var nl=ge[Vp];if(nl.visible||nl===Lc){var ks=a.Fb(nl.row),il=a.Eb(nl.column),Dh=0;isFinite(il.width)?Dh=il.width:(isFinite(qn)&&Se[nl.column]!==null?jg===0?Dh=il.actual+qn:Dh=Se[nl.column]/jg*kc:Se[nl.column]!==null?Dh=qn:Dh=il.actual||qn,Dh=Math.max(0,Dh-il.Wc()));var bc=0;switch(isFinite(ks.height)?bc=ks.height:(isFinite(gi)&&Re[nl.row]!==null?tg===0?bc=ks.actual+gi:bc=Re[nl.row]/tg*Ah:Re[nl.row]!==null?bc=gi:bc=ks.actual||gi,bc=Math.max(0,bc-ks.Wc())),ha.h(Math.max(il.minimum,Math.min(Dh,il.maximum)),Math.max(ks.minimum,Math.min(bc,ks.maximum))),Va=Jo(nl,ks,il,!1),Va){case Ci:ha.height=Math.max(ha.height,ks.actual+gi);break;case _i:ha.width=Math.max(ha.width,il.actual+qn)}var af=nl.margin,ry=af.right+af.left,Sm=af.top+af.bottom;nl.Uj(),nl.measure(ha.width,ha.height,il.minimum,ks.minimum);var Vg=nl.measuredBounds,lf=Math.max(Vg.width+ry,0),eg=Math.max(Vg.height+Sm,0);isFinite(qn)&&(lf=Math.min(lf,ha.width)),isFinite(gi)&&(eg=Math.min(eg,ha.height));var El=0;El=ks.actual,ks.actual=Math.max(ks.actual,eg),ks.oc=Math.max(ks.oc,eg),qs=ks.actual-El,gi=Math.max(gi-qs,0),Re[nl.row]===null&&(Ah=Math.max(Ah-qs,0)),El=il.actual,il.actual=Math.max(il.actual,lf),il.oc=Math.max(il.oc,lf),qs=il.actual-El,qn=Math.max(qn-qs,0),Se[nl.column]===null&&(kc=Math.max(kc-qs,0))}}Ve(ge);var Ih=on.alloc(),hA=rn(),Au=rn();if(z=ce.length,z!==0){for(var xd=0;xd<to;xd++)if(Dt[xd]){So=Dt[xd].length;var Zg=a.Fb(xd);hA[xd]=Zg.actual;for(var Sd=0;Sd<So;Sd++)if(Dt[xd][Sd]){var Bm=a.Eb(Sd);Au[Sd]=Bm.actual}}}for(var Wg=0;Wg<z;Wg++){var cs=ce[Wg];if(cs.visible||cs===Lc){var Zu=a.Fb(cs.row),Bu=a.Eb(cs.column);switch(ha.h(Math.max(Bu.minimum,Math.min(y,Bu.maximum)),Math.max(Zu.minimum,Math.min(x,Zu.maximum))),Va=Jo(cs,Zu,Bu,!1),Va){case Fn:Au[Bu.index]!==0&&(ha.width=Math.min(ha.width,Au[Bu.index])),hA[Zu.index]!==0&&(ha.height=Math.min(ha.height,hA[Zu.index]));break;case Ci:Au[Bu.index]!==0&&(ha.width=Math.min(ha.width,Au[Bu.index]));break;case _i:hA[Zu.index]!==0&&(ha.height=Math.min(ha.height,hA[Zu.index]))}isFinite(Bu.width)&&(ha.width=Bu.width),isFinite(Zu.height)&&(ha.height=Zu.height),Ih.h(0,0);for(var Cm=Bu.minimum,_l=Zu.minimum,Tc=1;Tc<cs.rowSpan&&!(cs.row+Tc>=a.rowCount);Tc++)pn=a.Fb(cs.row+Tc),qs=0,qs=Va===Fn||Va===_i?Math.max(pn.minimum,hA[cs.row+Tc]===0?pn.maximum:Math.min(hA[cs.row+Tc],pn.maximum)):Math.max(pn.minimum,isNaN(pn.Hc)?pn.maximum:Math.min(pn.Hc,pn.maximum)),Ih.height+=qs,_l+=pn.minimum;for(var Cu=1;Cu<cs.columnSpan&&!(cs.column+Cu>=a.columnCount);Cu++)pn=a.Eb(cs.column+Cu),qs=0,qs=Va===Fn||Va===Ci?Math.max(pn.minimum,Au[cs.column+Cu]===0?pn.maximum:Math.min(Au[cs.column+Cu],pn.maximum)):Math.max(pn.minimum,isNaN(pn.Hc)?pn.maximum:Math.min(pn.Hc,pn.maximum)),Ih.width+=qs,Cm+=pn.minimum;ha.width+=Ih.width,ha.height+=Ih.height;var Yg=cs.margin,Bd=Yg.right+Yg.left,Zp=Yg.top+Yg.bottom;cs.measure(ha.width,ha.height,Cm,_l);for(var Xg=cs.measuredBounds,bA=Math.max(Xg.width+Bd,0),uf=Math.max(Xg.height+Zp,0),Cd=0,Jg=0;Jg<cs.rowSpan&&!(cs.row+Jg>=a.rowCount);Jg++)pn=a.Fb(cs.row+Jg),Cd+=pn.total||0;if(Cd<uf){var Nc=uf-Cd,hh=uf-Cd;if(cs.spanAllocation!==null)for(var Dc=cs.spanAllocation,Uh=0;Uh<cs.rowSpan&&!(0>=Nc)&&!(cs.row+Uh>=a.rowCount);Uh++){pn=a.Fb(cs.row+Uh);var Ic=pn.oa||0,Af=Dc(cs,pn,hh);pn.actual=Math.min(pn.maximum,Ic+Af),pn.oa!==Ic&&(Nc-=pn.oa-Ic)}for(;0<Nc;){var cA=pn.oa||0;if(isNaN(pn.height)&&pn.maximum>cA&&(pn.actual=Math.min(pn.maximum,cA+Nc),pn.oa!==cA&&(Nc-=pn.oa-cA)),pn.index===0)break;pn=a.Fb(pn.index-1)}}for(var ng=0,Uc=0;Uc<cs.columnSpan&&!(cs.column+Uc>=a.columnCount);Uc++)pn=a.Eb(cs.column+Uc),ng+=pn.total||0;if(ng<bA){var ig=bA-ng,oy=bA-ng;if(cs.spanAllocation!==null)for(var Qh=cs.spanAllocation,hf=0;hf<cs.columnSpan&&!(0>=ig)&&!(cs.column+hf>=a.columnCount);hf++){pn=a.Eb(cs.column+hf);var Wp=pn.oa||0,sy=Qh(cs,pn,oy);pn.actual=Math.min(pn.maximum,Wp+sy),pn.oa!==Wp&&(ig-=pn.oa-Wp)}for(;0<ig;){var Pm=pn.oa||0;if(isNaN(pn.width)&&pn.maximum>Pm&&(pn.actual=Math.min(pn.maximum,Pm+ig),pn.oa!==Pm&&(ig-=pn.oa-Pm)),pn.index===0)break;pn=a.Eb(pn.index-1)}}}}Ve(ce),on.free(Ih),on.free(ha),hA!==void 0&&Ve(hA),Au!==void 0&&Ve(Au);var rg=0,og=0,Fm=a.desiredSize,vw=a.maxSize;Va=Ka(a,!0);var Yp=Th=uh=0,Xp=0;z=a.columnCount;for(var Em=0;Em<z;Em++)Qn[Em]!==void 0&&(pn=a.Eb(Em),isFinite(pn.width)?(Yp+=pn.width,Yp+=pn.Wc()):a0(pn)===ap?(Yp+=pn.oa,Yp+=pn.Wc()):pn.oa!==0&&(uh+=pn.oa,uh+=pn.Wc()));isFinite(Fm.width)?rg=Math.min(Fm.width,vw.width):rg=Va!==xn&&isFinite(y)?y:uh,rg=Math.max(rg,a.minSize.width),rg=Math.max(rg-Yp,0);for(var rx=uh===0?1:Math.max(rg/uh,1),Lm=0;Lm<z;Lm++)Qn[Lm]!==void 0&&(pn=a.Eb(Lm),isFinite(pn.width)||a0(pn)===ap||(pn.actual=pn.oa*rx),pn.position=b.width,pn.oa!==0&&(b.width+=pn.oa,b.width+=pn.Wc()));z=a.rowCount;for(var Mm=0;Mm<z;Mm++)ui[Mm]!==void 0&&(pn=a.Fb(Mm),isFinite(pn.height)?(Xp+=pn.height,Xp+=pn.Wc()):a0(pn)===ap?(Xp+=pn.oa,Xp+=pn.Wc()):pn.oa!==0&&(Th+=pn.oa,Th+=pn.Wc()));isFinite(Fm.height)?og=Math.min(Fm.height,vw.height):og=Va!==xn&&isFinite(x)?x:Th,og=Math.max(og,a.minSize.height),og=Math.max(og-Xp,0);for(var ox=Th===0?1:Math.max(og/Th,1),km=0;km<z;km++)ui[km]!==void 0&&(pn=a.Fb(km),isFinite(pn.height)||a0(pn)===ap||(pn.actual=pn.oa*ox),pn.position=b.height,pn.oa!==0&&(b.height+=pn.oa,b.height+=pn.Wc()));z=rt.length;for(var ay=0;ay<z;ay++){var Jp=rt[ay],ly=0,uy=0;Jp.type===Bn.TableRow?(ly=b.width,pn=a.Fb(Jp.row),uy=pn.actual):(pn=a.Eb(Jp.column),ly=pn.actual,uy=b.height),Jp.measuredBounds.h(0,0,ly,uy),Es(Jp,!1)}Ve(rt),a.inRowsCols=Dt},Ma.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding,z=b.left;b=b.top;var tt=a.inRowsCols;if(tt!==null){for(var rt,ot,lt=tt.length,ut=0,ft=0;ft<lt;ft++)tt[ft]&&(ut=Math.max(ut,tt[ft].length));ot=a.rowDefs,rt=a.colDefs;var yt=ft=0,Mt=Math.min(a.topIndex,lt-1);if(0<ot.length){for(;Mt!==lt&&(ot[Mt]===void 0||ot[Mt].oa===0);)Mt++;Mt=Math.max(Math.min(Mt,lt-1),0),ft=-ot[Mt].position}var bt=Math.min(a.leftIndex,ut-1);if(0<rt.length){for(;bt!==ut&&(rt[bt]===void 0||rt[bt].oa===0);)bt++;bt=Math.max(Math.min(bt,ut-1),0),yt=-rt[bt].position}for(var Dt=0,qt=0;Dt!==lt&&ot[Dt]===void 0;)Dt++;for(;qt!==lt&&rt[qt]===void 0;)qt++;ut=a.part,a.Fb(Dt),a.Eb(qt);for(var Vt=0;Vt<y.length;Vt++){var oe=y[Vt];if(oe instanceof Bn&&oe.visible&&vc(oe)){if(oe.type===Bn.TableRow){rt=a.Fb(oe.row);var ce=a.Eb(qt)}else rt=a.Fb(Dt),ce=a.Eb(oe.column);ot=rt.position+ft+b,rt.oa!==0&&(ot+=rt.Io(Math.max(Dt,Mt))),rt=ce.position+yt+z,ce.oa!==0&&(rt+=ce.Io(Math.max(qt,bt))),ce=oe.measuredBounds,oe.Uk(),oe.actualBounds.ka();var ge=oe.actualBounds,Se=Ue.allocAt(ge.x,ge.y,ge.width,ge.height);ge.x=oe.type===Bn.TableRow?z:rt,ge.y=oe.type===Bn.TableColumn?b:ot,ge.width=ce.width,ge.height=ce.height,oe.actualBounds.freeze(),nA(oe,!1),$i(Se,ge)||ut===null||(ut.oh(),oe.Pn(ut)),Ue.free(Se)}}for(Vt=on.alloc(),oe=0;oe<lt;oe++)if(tt[oe]){for(ut=tt[oe].length,ce=a.Fb(oe),ot=ce.position+ft+b,ce.oa!==0&&(ot+=ce.Io(Math.max(Dt,Mt))),ge=0;ge<ut;ge++)if(tt[oe][ge]){Se=a.Eb(ge),rt=Se.position+yt+z,Se.oa!==0&&(rt+=Se.Io(Math.max(qt,bt)));for(var Re=tt[oe][ge],qn=Re.length,gi=0;gi<qn;gi++){var ui=Re[gi],Qn=ui.measuredBounds;Vt.h(0,0);for(var pn=1;pn<ui.rowSpan&&!(oe+pn>=a.rowCount);pn++){var ar=a.Fb(oe+pn);ar.oa!==0&&(Vt.height+=ar.total)}for(pn=1;pn<ui.columnSpan&&!(ge+pn>=a.columnCount);pn++)ar=a.Eb(ge+pn),ar.oa!==0&&(Vt.width+=ar.total);var Ji=Se.oa+Vt.width,to=ce.oa+Vt.height;pn=rt,ar=ot;var So=Ji,Js=to,ea=rt,za=ot,qs=Ji,Lc=to;rt+Ji>x.width&&(qs=Math.max(x.width-rt,0)),ot+to>x.height&&(Lc=Math.max(x.height-ot,0));var Ms=ui.alignment;if(Ms.Xb()){Ms=a.defaultAlignment,Ms.sb()||(Ms=rr);var lA=Ms.x,ja=Ms.y,Mc=Ms.offsetX;Ms=Ms.offsetY;var tu=Se.alignment,Su=ce.alignment;tu.sb()&&(lA=tu.x,Mc=tu.offsetX),Su.sb()&&(ja=Su.y,Ms=Su.offsetY)}else lA=Ms.x,ja=Ms.y,Mc=Ms.offsetX,Ms=Ms.offsetY;(isNaN(lA)||isNaN(ja))&&(ja=lA=.5,Ms=Mc=0),tu=Qn.width,Su=Qn.height;var Ol=ui.margin,Cl=Ol.left+Ol.right,md=Ol.top+Ol.bottom,uA=Jo(ui,ce,Se,!1);!isNaN(ui.desiredSize.width)||uA!==Fn&&uA!==Ci||(tu=Math.max(Ji-Cl,0)),!isNaN(ui.desiredSize.height)||uA!==Fn&&uA!==_i||(Su=Math.max(to-md,0)),Ji=ui.maxSize,to=ui.minSize,tu=Math.min(Ji.width,tu),Su=Math.min(Ji.height,Su),tu=Math.max(to.width,tu),Su=Math.max(to.height,Su),Ji=Su+md,pn+=So*lA-(tu+Cl)*lA+Mc+Ol.left,ar+=Js*ja-Ji*ja+Ms+Ol.top,ui.visible&&(Ao(ea,za,qs,Lc,pn,ar,Qn.width,Qn.height)?ui.arrange(pn,ar,tu,Su):ui.arrange(pn,ar,tu,Su,new Ue(ea,za,qs,Lc)))}}}for(on.free(Vt),a=0;a<E;a++)x=y[a],z=x instanceof Bn?x:null,z!==null&&vc(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function Dl(){this.xa="Base"}We(Dl,uo),Dl.prototype.measure=function(){},Dl.prototype.arrange=function(){};function Jl(){this.xa="Base"}We(Jl,uo),Jl.prototype.measure=function(){},Jl.prototype.arrange=function(){};function Ks(){this.xa="Base"}We(Ks,uo),Ks.prototype.measure=function(a,y,x,E,b,z,tt){1<E.length&&le("Viewbox Panel cannot contain more than one GraphObject."),E=E[0],E.Ca=1,E.Uj(),E.measure(1/0,1/0,z,tt);var rt=E.measuredBounds,ot=E.margin,lt=ot.right+ot.left;if(ot=ot.top+ot.bottom,isFinite(y)||isFinite(x)){var ut=E.scale,ft=rt.width;rt=rt.height;var yt=Math.max(y-lt,0),Mt=Math.max(x-ot,0),bt=1;a.viewboxStretch===vi?ft!==0&&rt!==0&&(bt=Math.min(yt/ft,Mt/rt)):ft!==0&&rt!==0&&(bt=Math.max(yt/ft,Mt/rt)),bt===0&&(bt=1e-4),E.Ca*=bt,ut!==E.scale&&(Es(E,!0),E.measure(1/0,1/0,z,tt))}rt=E.measuredBounds,b.width=isFinite(y)?y:Math.max(rt.width+lt,0),b.height=isFinite(x)?x:Math.max(rt.height+ot,0)},Ks.prototype.arrange=function(a,y,x){y=y[0];var E=y.measuredBounds,b=y.margin,z=Math.max(E.width+(b.right+b.left),0);b=Math.max(E.height+(b.top+b.bottom),0);var tt=y.alignment;tt.Xb()&&(tt=a.defaultAlignment),tt.sb()||(tt=rr),y.arrange(x.width*tt.x-z*tt.x+tt.offsetX,x.height*tt.y-b*tt.y+tt.offsetY,E.width,E.height)};function Ga(){this.xa="Base"}We(Ga,uo),Ga.prototype.measure=function(){},Ga.prototype.arrange=function(){},Ga.prototype.gc=function(a,y,x){x=a.Df()*x.scale,0>=x&&(x=1);var E=a.gridCellSize,b=E.width;E=E.height;var z=a.naturalBounds,tt=a.actualBounds,rt=z.width,ot=z.height,lt=Math.ceil(rt/b),ut=Math.ceil(ot/E),ft=a.gridOrigin,yt=ft.x;ft=ft.y,y.save(),y.beginPath(),y.rect(0,0,rt,ot),y.clip(),y.Se();for(var Mt=[],bt=a.O.s,Dt=bt.length,qt=0;qt<Dt;qt++){var Vt=bt[qt],oe=[];if(Mt.push(oe),Vt.visible){var ce=Vt.interval;if(!(0>ce)){Vt=Mh(Vt.figure);for(var ge=0;ge<Dt;ge++)if(ge!==qt){var Se=bt[ge];Se.visible&&Mh(Se.figure)===Vt&&(Se=Se.interval,Se>ce&&oe.push(Se))}}}}for(bt=a.O.s,Dt=bt.length,qt=0;qt<Dt;qt++){var Re=bt[qt];if(Re.visible&&(oe=Re.interval||1,Vt=Math.abs(oe),!(2>b*Vt*x))){if(ce=Re.segmentIndex,(!isFinite(ce)||isNaN(ce))&&(ce=0),0>ce&&(ce=Vt-Math.min(-ce,Vt)),ce=Math.round(ce%Vt),Vt=Re.opacity,ge=1,Vt!==1){if(Vt===0)continue;ge=y.globalAlpha,y.globalAlpha=ge*Vt}Se=Mt[qt];var qn=!1,gi=Re.strokeDashArray;if(gi!==null&&(qn=!0,y.js(gi,Re.strokeDashOffset)),Re.figure==="LineV"&&Re.stroke!==null&&0<Re.strokeWidth){for(y.lineWidth=Re.strokeWidth,Zo(a,y,Re.stroke,!1,!1,z,tt),y.beginPath(),gi=Re=Math.floor((yt-b)/b);gi<=Re+lt;gi++){var ui=gi*b+yt;0<=ui&&ui<=rt&&CA(gi,oe,ce,Se)&&(y.moveTo(ui,0),y.lineTo(ui,ot))}y.stroke(),y.Se()}else if(Re.figure==="LineH"&&Re.stroke!==null&&0<Re.strokeWidth){for(y.lineWidth=Re.strokeWidth,Zo(a,y,Re.stroke,!1,!1,z,tt),y.beginPath(),gi=Re=Math.floor((ft-E)/E);gi<=Re+ut;gi++)ui=gi*E+ft,0<=ui&&ui<=ot&&CA(gi,oe,ce,Se)&&(y.moveTo(0,ui),y.lineTo(rt,ui));y.stroke(),y.Se()}else if(Re.figure==="BarV"&&Re.fill!==null)for(Zo(a,y,Re.fill,!0,!1,z,tt),Re=Re.width,isNaN(Re)&&(Re=b),ui=gi=Math.floor((yt-b)/b);ui<=gi+lt;ui++){var Qn=ui*b+yt;0<=Qn+Re&&Qn<=rt&&CA(ui,oe,ce,Se)&&y.fillRect(Qn,0,Re,ot)}else if(Re.figure==="BarH"&&Re.fill!==null)for(Zo(a,y,Re.fill,!0,!1,z,tt),Re=Re.height,isNaN(Re)&&(Re=E),ui=gi=Math.floor((ft-E)/E);ui<=gi+ut;ui++)Qn=ui*E+ft,0<=Qn+Re&&Qn<=ot&&CA(ui,oe,ce,Se)&&y.fillRect(0,Qn,rt,Re);qn&&y.fs(),Vt!==1&&(y.globalAlpha=ge)}}y.restore(),y.Vc(!1)};function CA(a,y,x,E){if(0>y)return a%y===x;if(a%y!==x)return!1;y=E.length;for(var b=0;b<y;b++)if(a%E[b]===x)return!1;return!0}function Il(){this.xa="Base"}We(Il,uo),Il.prototype.measure=function(a,y,x,E,b){var z=E.length;if(a instanceof Jr||a instanceof Rn){var tt=null,rt=null;if(a instanceof Rn&&(tt=a),a instanceof Jr&&(rt=a,tt=rt.adornedPart,a.j===null&&(a.j=[])),tt instanceof Rn){var ot=tt;if(z===0)Fr(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var lt=a instanceof Jr?null:tt.path;y=tt.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ut=ot.points,ft=tt.pointsCount;rt!==null?rt.Ul(!1):tt!==null&&tt.Ul(!1),rt=y.width;var yt=y.height,Mt=a.j;if(Mt.length=0,lt!==null){ou(a,rt,yt,lt);var bt=lt.measuredBounds;x.ed(bt),Mt.push(bt)}bt=Yi.alloc();for(var Dt=Qt.alloc(),qt=Qt.alloc(),Vt=0;Vt<z;Vt++){var oe=E[Vt];if(oe!==lt)if(oe.isPanelMain&&oe instanceof vr){ou(a,rt,yt,oe);var ce=oe.measuredBounds;x.ed(ce),Mt.push(ce)}else if(2>ft)oe.measure(1/0,1/0,0,0),ce=oe.measuredBounds,x.ed(ce),Mt.push(ce);else{var ge=oe.segmentIndex,Se=oe.segmentFraction,Re=oe.alignmentFocus;Re.Mc()&&(Re=rr);var qn=oe.segmentOrientation,gi=oe.segmentOffset;if(isNaN(ge)){var ui=ot.ua;ce=rn(),ui.Qu(Se,ce);var Qn=Qt.allocAt(ce[0],ce[1]);if(Qn.add(ot.i(0)),ui.type===bn.j?Qn.offset(-ui.startX,-ui.startY):(ui=ui.figures.first(),ui!==null&&Qn.offset(-ui.startX,-ui.startY)),ui=ce[2],qn!==Ja){var pn=ot.computeAngle(oe,qn,ui);oe.Kb=pn}pn=Qn.x-y.x;var ar=Qn.y-y.y;Qt.free(Qn),Ve(ce)}else if(ge<-ft||ge>=ft)ce=Qt.alloc(),ot.vg(),ot.computeMidPoint(ce),ui=ot.midAngle,qn!==Ja&&(pn=ot.computeAngle(oe,qn,ui),oe.Kb=pn),pn=ce.x-y.x,ar=ce.y-y.y,Qt.free(ce);else{if(pn=0,0<=ge?(ar=ut.M(ge),ce=ge<ft-1?ut.M(ge+1):ar):(pn=ft+ge,ar=ut.M(pn),ce=0<pn?ut.M(pn-1):ar),ar.Xa(ce)){0<=ge?(ui=0<ge?ut.M(ge-1):ar,pn=ge<ft-2?ut.M(ge+2):ce):(ui=pn<ft-1?ut.M(pn+1):ar,pn=1<pn?ut.M(pn-2):ce),Qn=ui.Bf(ar);var Ji=ce.Bf(pn);ui=Qn>Ji+10?0<=ge?ui.ab(ar):ar.ab(ui):Ji>Qn+10?0<=ge?ce.ab(pn):pn.ab(ce):0<=ge?ui.ab(pn):pn.ab(ui)}else ui=0<=ge?ar.ab(ce):ce.ab(ar);qn!==Ja&&(pn=ot.computeAngle(oe,qn,ui),oe.Kb=pn),pn=ar.x+(ce.x-ar.x)*Se-y.x,ar=ar.y+(ce.y-ar.y)*Se-y.y}oe.measure(1/0,1/0,0,0),ce=oe.measuredBounds,Qn=oe.naturalBounds;var to=0;oe instanceof vr&&(to=oe.strokeWidth),Ji=Qn.width+to;var So=Qn.height+to;bt.reset(),bt.translate(-ce.x,-ce.y),bt.scale(oe.scale,oe.scale),bt.rotate(qn===Ja?oe.angle:ui,Ji/2,So/2),qn!==mp&&qn!==yp||bt.rotate(90,Ji/2,So/2),qn!==vp&&qn!==wp||bt.rotate(-90,Ji/2,So/2),qn===T0&&(45<ui&&135>ui||225<ui&&315>ui)&&bt.rotate(-ui,Ji/2,So/2),Qn=new Ue(0,0,Ji,So),Dt.xi(Qn,Re),bt.Ga(Dt),Re=-Dt.x+to/2*oe.scale,oe=-Dt.y+to/2*oe.scale,qt.assign(gi),to=isNaN(gi.x);var Js=isNaN(gi.y);if(to||Js){Ji=Ji/2+3,So=So/2+3;var ea=45<=ui&&135>=ui,za=225<=ui&&315>=ui;qn===Ja&&(ea||za)?(qt.x=Js?Ji:gi.y,qt.y=to?So:gi.x,ea?0<=ge||isNaN(ge)&&.5>Se||!to||(qt.y=-So):za&&((0<=ge||isNaN(ge)&&.5>Se)&&to&&(qt.y=-So),Js&&(qt.x=-Ji))):(to&&(qt.x=0<=ge||isNaN(ge)&&.5>Se?Ji:-Ji),Js&&(qt.y=-So),qt.rotate(ui))}else qt.rotate(ui);pn+=qt.x,ar+=qt.y,Qn.set(ce),Qn.h(pn+Re,ar+oe,ce.width,ce.height),Mt.push(Qn),x.ed(Qn)}}if(tt!==null)for(E=tt.labelNodes;E.next();)E.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),Fr(b,x.width||0,x.height||0),Yi.free(bt),Qt.free(Dt),Qt.free(qt)}}}},Il.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Jr||a instanceof Rn){var E=a,b=null;a instanceof Jr&&(b=a,E=b.adornedPart);var z=a instanceof Jr?null:E.path,tt=a.j;if(tt.length!==0){var rt=0;if(z!==null&&rt<tt.length){var ot=tt[rt];rt++,z.arrange(ot.x-a.jg.x,ot.y-a.jg.y,ot.width,ot.height)}for(ot=0;ot<x;ot++){var lt=y[ot];if(lt!==z&&rt<tt.length){var ut=tt[rt];rt++,lt.arrange(ut.x-a.jg.x,ut.y-a.jg.y,ut.width,ut.height)}}}if(y=E.points,x=y.count,2<=x&&a instanceof Rn)for(z=a.labelNodes;z.next();){var ft=a;tt=z.value,rt=tt.segmentIndex,ot=tt.segmentFraction;var yt=tt.alignmentFocus;if(lt=tt.segmentOrientation,ut=tt.segmentOffset,isNaN(rt)){var Mt=ft.ua,bt=rn();Mt.Qu(ot,bt);var Dt=Qt.allocAt(bt[0],bt[1]);Dt.add(ft.i(0)),Mt.type===bn.j||(Mt=Mt.figures.first()),Dt.offset(-Mt.startX,-Mt.startY),Mt=bt[2],lt!==Ja&&(ft=ft.computeAngle(tt,lt,Mt),tt.angle=ft),ft=Dt.x;var qt=Dt.y;Qt.free(Dt),Ve(bt)}else if(rt<-x||rt>=x)bt=Qt.alloc(),Mt=ft,qt=bt,Mt.vg(),Mt.computeMidPoint(qt),Mt=ft.midAngle,lt!==Ja&&(ft=ft.computeAngle(tt,lt,Mt),tt.angle=ft),ft=bt.x,qt=bt.y,Qt.free(bt);else{if(Dt=0,0<=rt?(bt=y.s[rt],qt=rt<x-1?y.s[rt+1]:bt):(Dt=x+rt,bt=y.s[Dt],qt=0<Dt?y.s[Dt-1]:bt),bt.Xa(qt)){0<=rt?(Mt=0<rt?y.s[rt-1]:bt,Dt=rt<x-2?y.s[rt+2]:qt):(Mt=Dt<x-1?y.s[Dt+1]:bt,Dt=1<Dt?y.s[Dt-2]:qt);var Vt=Mt.Bf(bt),oe=qt.Bf(Dt);Mt=Vt>oe+10?0<=rt?Mt.ab(bt):bt.ab(Mt):oe>Vt+10?0<=rt?qt.ab(Dt):Dt.ab(qt):0<=rt?Mt.ab(Dt):Dt.ab(Mt)}else Mt=0<=rt?bt.ab(qt):qt.ab(bt);lt!==Ja&&(ft=ft.computeAngle(tt,lt,Mt),tt.angle=ft),ft=bt.x+(qt.x-bt.x)*ot,qt=bt.y+(qt.y-bt.y)*ot}if(yt.ys())tt.location=new Qt(ft,qt);else{yt.Mc()&&(yt=rr),bt=Yi.alloc(),bt.reset(),bt.scale(tt.scale,tt.scale),bt.rotate(tt.angle,0,0);var ce=tt.naturalBounds;Dt=Ue.allocAt(0,0,ce.width,ce.height),Vt=Qt.alloc(),Vt.xi(Dt,yt),bt.Ga(Vt),yt=-Vt.x,oe=-Vt.y;var ge=ce.width,Se=ce.height;ce=Qt.alloc(),ce.assign(ut);var Re=isNaN(ut.x),qn=isNaN(ut.y);if(Re||qn){ge=ge/2+3,Se=Se/2+3;var gi=45<=Mt&&135>=Mt,ui=225<=Mt&&315>=Mt;lt===Ja&&(gi||ui)?(ce.x=qn?ge:ut.y,ce.y=Re?Se:ut.x,gi?0<=rt||isNaN(rt)&&.5>ot||!Re||(ce.y=-Se):ui&&((0<=rt||isNaN(rt)&&.5>ot)&&Re&&(ce.y=-Se),qn&&(ce.x=-ge))):(Re&&(ce.x=0<=rt||isNaN(rt)&&.5>ot?ge:-ge),qn&&(ce.y=-Se),ce.rotate(Mt))}else ce.rotate(Mt);ft+=ce.x,qt+=ce.y,bt.pp(Dt),yt+=Dt.x,oe+=Dt.y,rt=Qt.allocAt(ft+yt,qt+oe),tt.move(rt),Qt.free(rt),Qt.free(ce),Qt.free(Vt),Ue.free(Dt),Yi.free(bt)}}b!==null?b.Ul(!1):E.Ul(!1),E=Uy(a),a.location.h(a.position.x+E.x,a.position.y+E.y),Qt.free(E)}};function ou(a,y,x,E){if(xl(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof Jr&&a.type===Bn.Link&&a.adornedObject instanceof vr&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof Rn&&a.ua!==null?(a=a.geometry.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):a instanceof Jr&&a.adornedPart.ua!==null?(a=a.adornedPart.ua.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):E.Ge(-(b/2),-(b/2),y+b,x+b),b=E.desiredSize,b.w()||E.ua===null?E.dc.h(0,0,b.width,b.height):E.dc.assign(E.ua.bounds),Es(E,!1)}}function PA(){this.xa="Base"}We(PA,uo),PA.prototype.measure=function(a,y,x,E,b,z,tt){var rt=a.Pb();a.graduatedBounds=[];var ot=rt.margin,lt=ot.right+ot.left,ut=ot.top+ot.bottom;rt.measure(y,x,z,tt);var ft=rt.measuredBounds,yt=new Ue(-ot.left,-ot.top,Math.max(ft.width+lt,0),Math.max(ft.height+ut,0));a.graduatedBounds.push(yt),b.assign(yt);for(var Mt=rt.geometry,bt=rt.strokeWidth,Dt=Mt.flattenedSegments,qt=Mt.flattenedLengths,Vt=Mt.flattenedTotalLength,oe=Dt.length,ce=0,ge=0,Se=rn(),Re=0;Re<oe;Re++){var qn=Dt[Re],gi=[];ge=ce=0;for(var ui=qn.length,Qn=0;Qn<ui;Qn+=2){var pn=qn[Qn],ar=qn[Qn+1];if(Qn!==0){var Ji=180*Math.atan2(ar-ge,pn-ce)/Math.PI;0>Ji&&(Ji+=360),gi.push(Ji)}ce=pn,ge=ar}Se.push(gi)}if(a.graduatedIntervals===null){for(var to=[],So=a.O.s,Js=So.length,ea=0;ea<Js;ea++){var za=So[ea],qs=[];if(to.push(qs),za.visible){var Lc=za.interval;if(!(0>Lc)){for(var Ms=0;Ms<Js;Ms++)if(Ms!==ea){var lA=So[Ms];if(lA.visible&&za.constructor===lA.constructor){var ja=lA.interval;ja>Lc&&qs.push(ja)}}}}}a.graduatedIntervals=to}var Mc=a.graduatedIntervals,tu=a.O.s,Su=tu.length,Ol=0,Cl=0,md=Vt;a.graduatedMarks=[];for(var uA,Kg=0;Kg<Su;Kg++){var Hl=tu[Kg];if(uA=[],Hl.visible&&Hl!==rt){var Va=Math.abs(Hl.interval),zp=a.graduatedTickUnit;if(!(2>zp*Va*Vt/a.graduatedRange&&Hl.graduatedSkip===null)){var qf=qt[0][0],LA=0,Pl=0;Cl=Vt*Hl.graduatedStart-1e-4,md=Vt*Hl.graduatedEnd+1e-4;var of=zp*Va,Rl=a.graduatedTickBase;if(Rl<a.graduatedMin){var vd=(a.graduatedMin-Rl)/of;vd=vd%1===0?vd:Math.floor(vd+1),Rl+=vd*of}else Rl>a.graduatedMin+of&&(Rl-=Math.floor((Rl-a.graduatedMin)/of)*of);for(var wm=Mc[Kg],jp=Rl,iy=1e-6*a.graduatedMax,uh=1;Rl<=a.graduatedMax+iy;uh++){t:{for(var Th=wm.length,$f=0;$f<Th;$f++){var yd=(Rl-a.graduatedTickBase)%(wm[$f]*a.graduatedTickUnit),Gg=1e-6*a.graduatedTickUnit;if(yd<Gg&&yd>-Gg){var wd=!1;break t}}wd=!0}if(wd&&(Rl>a.graduatedMax&&(Rl=a.graduatedMax),Hl.graduatedSkip===null||Hl instanceof Fo&&!Hl.graduatedSkip(Rl,Hl)||Hl instanceof vr&&!Hl.graduatedSkip(Rl,Hl))&&(Ol=(Rl-a.graduatedMin)*Vt/a.graduatedRange,Ol>Vt&&(Ol=Vt),Cl<=Ol&&Ol<=md)){for(var Ah=Se[LA][Pl],kc=qt[LA][Pl];LA<qt.length;){for(;Ol>qf&&Pl<qt[LA].length-1;)Pl++,Ah=Se[LA][Pl],kc=qt[LA][Pl],qf+=kc;if(Ol<=qf)break;LA++,Pl=0,Ah=Se[LA][Pl],kc=qt[LA][Pl],qf+=kc}var Fl=Dt[LA],MA=Fl[2*Pl],xm=Fl[2*Pl+1],Nh=(Ol-(qf-kc))/kc,zg=new Qt(MA+(Fl[2*Pl+2]-MA)*Nh+bt/2-Mt.bounds.x,xm+(Fl[2*Pl+3]-xm)*Nh+bt/2-Mt.bounds.y);zg.scale(rt.scale,rt.scale);t:{var AA=Ah,sf=Se[LA];if(!(.5005>Nh&&.4995<Nh)){var kA=AA;if(.5>Nh?0<Pl?kA=sf[Pl-1]:Ce.$(Fl[0],Fl[Fl.length-2])&&Ce.$(Fl[1],Fl[Fl.length-1])&&(kA=sf[sf.length-1]):.5<Nh&&(Pl+1<sf.length?kA=sf[Pl+1]:Ce.$(Fl[0],Fl[Fl.length-2])&&Ce.$(Fl[1],Fl[Fl.length-1])&&(kA=sf[0])),AA!==kA){var tg=Math.abs(AA-kA);if(180<tg&&(AA<kA?AA+=360:kA+=360,tg=Math.abs(AA-kA)),5e-4>Nh||.9995<Nh){Ah=(AA+kA)/2%360;break t}if(10>tg){var jg=1-Math.abs(.5-Nh);Ah=(AA*jg+kA*(1-jg))%360;break t}}}Ah=AA}if(Hl instanceof Fo){var Vu="";Hl.graduatedFunction!==null?(Vu=Hl.graduatedFunction(Rl,Hl),Vu=Vu!=null?Vu.toString():""):Vu=(+Rl.toFixed(2)).toString(),Vu!==""&&uA.push({$l:zg,angle:Ah,text:Vu})}else uA.push({$l:zg,angle:Ah})}Rl=jp+uh*of}}}a.graduatedMarks.push(uA)}Ve(Se);var ha=a.graduatedMarks;if(ha!==null)for(var Vp=E.length,nl=0;nl<Vp;nl++){var ks=E[nl],il=ha[nl];if(ks.visible&&ks!==rt&&il.length!==0){if(ks instanceof vr){var Dh=a,bc=b,af=ks.alignmentFocus;af.Mc()&&(af=Xr);var ry=ks.angle;ks.Kb=0,ks.measure(1/0,1/0,0,0),ks.Kb=ry;var Sm=ks.measuredBounds,Vg=Sm.width,lf=Sm.height,eg=Ue.allocAt(0,0,Vg,lf),El=Qt.alloc();El.xi(eg,af),Ue.free(eg);for(var Ih=-El.x,hA=-El.y,Au=new Ue,xd=il.length,Zg=0;Zg<xd;Zg++)for(var Sd=il[Zg],Bm=Sd.$l.x,Wg=Sd.$l.y,cs=Sd.angle,Zu=0;4>Zu;Zu++){switch(Zu){case 0:El.h(Ih,hA);break;case 1:El.h(Ih+Vg,hA);break;case 2:El.h(Ih,hA+lf);break;case 3:El.h(Ih+Vg,hA+lf)}El.rotate(cs+ks.angle),El.offset(Bm,Wg),Zg===0&&Zu===0?Au.h(El.x,El.y,0,0):Au.Ye(El),El.offset(-Bm,-Wg),El.rotate(-cs-ks.angle)}Qt.free(El),Dh.graduatedBounds!==null&&Dh.graduatedBounds.push(Au),kr(bc,Au.x,Au.y,Au.width,Au.height)}else if(ks instanceof Fo){var Bu=a,Cm=b;Bu.temporaryTextBlock===null&&(Bu.temporaryTextBlock=new Fo);var _l=Bu.temporaryTextBlock;Sy(_l,ks);var Tc=ks.alignmentFocus;Tc.Mc()&&(Tc=Xr);for(var Cu=ks.segmentOrientation,Yg=ks.segmentOffset,Bd=new Ue,Zp=0,Xg=0,bA=0,uf=0,Cd=0,Jg=il.length,Nc=0;Nc<Jg;Nc++){var hh=il[Nc];Zp=hh.$l.x,Xg=hh.$l.y,bA=hh.angle,Cd=uf=ks.angle,Cu!==Ja&&(Cd=Cu===pp||Cu===b0?bA+ks.angle:bA,uf=Rn.computeAngle(Cu,Cd)),_l.Kb=uf,_l.text=hh.text||"",_l.measure(1/0,1/0,0,0);var Dc=_l.measuredBounds,Uh=_l.naturalBounds,Ic=Uh.width,Af=Uh.height,cA=Yi.alloc();cA.reset(),cA.translate(-Dc.x,-Dc.y),cA.scale(_l.scale,_l.scale),cA.rotate(Cd,Ic/2,Af/2),Cu!==mp&&Cu!==yp||cA.rotate(90,Ic/2,Af/2),Cu!==vp&&Cu!==wp||cA.rotate(-90,Ic/2,Af/2),Cu===T0&&(45<bA&&135>bA||225<bA&&315>bA)&&cA.rotate(-bA,Ic/2,Af/2);var ng=Ue.allocAt(0,0,Ic,Af),Uc=Qt.alloc();Uc.xi(ng,Tc),cA.Ga(Uc);var ig=-Uc.x,oy=-Uc.y,Qh=Qt.alloc();Qh.assign(Yg),isNaN(Qh.x)&&(Qh.x=Ic/2+3),isNaN(Qh.y)&&(Qh.y=-(Af/2+3)),Qh.rotate(bA),Zp+=Qh.x+ig,Xg+=Qh.y+oy;var hf=new Ue(Zp,Xg,Dc.width,Dc.height),Wp=new Ue(Dc.x,Dc.y,Dc.width,Dc.height),sy=new Ue(Uh.x,Uh.y,Uh.width,Uh.height);hh.Sz=uf,hh.lineCount=_l.lineCount,hh.lines=[_l.Cb,_l.Ih,_l.df,_l.Le,_l.Qc,_l.Qb,_l.ze],hh.actualBounds=hf,hh.measuredBounds=Wp,hh.naturalBounds=sy,Nc===0?Bd.assign(hf):Bd.ed(hf),Qt.free(Qh),Qt.free(Uc),Ue.free(ng),Yi.free(cA)}Bu.graduatedBounds!==null&&Bu.graduatedBounds.push(Bd),kr(Cm,Bd.x,Bd.y,Bd.width,Bd.height)}Es(ks,!1)}}},PA.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var E=a.Pb(),b=a.graduatedMarks;if(b!==null){var z=a.graduatedBounds,tt=0,rt=z[tt];tt++,E!==null&&E.arrange(rt.x-x.x,rt.y-x.y,rt.width,rt.height);for(var ot=y.length,lt=0;lt<ot;lt++){var ut=y[lt];rt=b[lt],ut.visible&&ut!==E&&rt.length!==0&&(rt=z[tt],tt++,ut.arrange(rt.x-x.x,rt.y-x.y,rt.width,rt.height))}a.graduatedBounds=null}}},PA.prototype.gc=function(a,y,x){var E=x.$i;x.$i=!0;var b=a.naturalBounds,z=b.width,tt=b.height;b=y instanceof Ya,y.save(),y.beginPath(),y.rect(-1,-1,z+1,tt+1),y.clip(),y.Se(),z=a.Pb(),z.gc(y,x),tt=a.Df()*x.scale,0>=tt&&(tt=1);for(var rt=z.actualBounds,ot=a.O.s,lt=a.graduatedMarks,ut=ot.length,ft=0;ft<ut;ft++){var yt=ot[ft],Mt=lt[ft],bt=Mt.length;if(yt.visible&&yt!==z&&Mt.length!==0){if(yt instanceof vr){if(!(2>a.graduatedTickUnit*yt.interval*z.geometry.flattenedTotalLength/a.graduatedRange*tt&&yt.graduatedSkip===null)){var Dt=yt.measuredBounds,qt=yt.strokeWidth*yt.scale,Vt=yt.alignmentFocus;Vt.Mc()&&(Vt=Xr);for(var oe=0;oe<bt;oe++){var ce=Mt[oe].$l,ge=Mt[oe].angle,Se=Vt,Re=yt.Ab;Re.reset(),Re.translate(ce.x+rt.x,ce.y+rt.y),Re.rotate(ge+yt.angle,0,0),Re.translate(-Dt.width*Se.x+Se.offsetX+qt/2,-Dt.height*Se.y+Se.offsetY+qt/2),Re.scale(yt.scale,yt.scale),Yl(yt,!1),yt.wh.set(yt.Ab),yt.Kk=yt.scale,Wa(yt,!1),yt.gc(y,x),b&&(a.svg.appendChild(yt.svg),yt.svg=null),yt.Ab.reset()}}}else if(yt instanceof Fo)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Fo),Dt=a.temporaryTextBlock,Sy(Dt,yt),qt=0;qt<bt;qt++)Vt=Mt[qt],Vt.actualBounds&&Vt.measuredBounds&&Vt.naturalBounds&&(Dt.ec=Vt.text||"",Dt.Kb=Vt.Sz||0,Dt.Gc=Vt.lineCount||0,oe=Vt.lines,oe!==void 0&&(Dt.Cb=oe[0],Dt.Ih=oe[1],Dt.df=oe[2],Dt.Le=oe[3],Dt.Qc=oe[4],Dt.Qb=oe[5],Dt.ze=oe[6]),Vt.naturalBounds&&(Dt.dc=Vt.naturalBounds),Vt.actualBounds&&(oe=Vt.actualBounds,Dt.arrange(oe.x,oe.y,oe.width,oe.height)),oe=Vt.actualBounds,Dt.arrange(oe.x,oe.y,oe.width,oe.height),ce=Vt.measuredBounds,Vt=Vt.naturalBounds,ge=Dt.Ab,ge.reset(),ge.translate(oe.x+rt.x,oe.y+rt.y),ge.translate(-ce.x,-ce.y),Dt.no(ge,Vt.x,Vt.y,Vt.width,Vt.height),Yl(Dt,!1),Dt.wh.set(Dt.Ab),Dt.Kk=Dt.scale,Wa(Dt,!1),Dt.Ng=yt.part,Dt.Me=yt.panel,Dt.gc(y,x),Dt.Me=null,Dt.Ng=null,b&&(a.svg.appendChild(Dt.svg),Dt.svg=null))}}x.$i=E,y.restore(),y.Vc(!0)};function Bn(a,y){if(Be.call(this),this.na=null,a===void 0)this.na=Bn.Position;else if(typeof a=="string"){var x=Ru.I(a);x!==null&&(this.na=x)}else a instanceof uo?this.na=a:a&&(this.na=Bn.Position,y=a);this.na===null&&le("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Bn.Grid?1048576:0),this.O=new ne,this.yb=js,this.Tm=es,this.Uf=or,this.$g=null,this.$e="",this.jg=new Ue(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=vi,this.jn=Mr,this.kn=ye,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}We(Bn,Be),Bn.prototype.cloneProtected=function(a){Be.prototype.cloneProtected.call(this,a),a.na=this.na,a.yb=this.yb.J(),a.Tm=this.Tm.J(),a.Uf=this.Uf,a.$e=this.$e,a.jg.assign(this.jg),this.T!==null&&(a.T=this.T.copy(a)),a.xo=this.xo,a.jn=this.jn.J(),a.kn=this.kn.J(),this.ra!==null&&(a.ra=this.ra.copy()),a.ub=this.ub,a.zn=this.zn,a.Hh=this.Hh},Bn.prototype.Af=function(a){Be.prototype.Af.call(this,a),a.O=this.O;for(var y=a.O.s,x=y.length,E=0;E<x;E++)y[E].Me=a;a.$g=null},Bn.prototype.copy=function(){var a=Be.prototype.copy.call(this);if(a!==null){for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E].copy();b.wi(a),b.Ng=null;var z=a.O,tt=z.count;if(z.Gb(tt,b),z=a.part,z!==null){z.Rh=null,b.portId!==null&&z instanceof ri&&(z.Te=!0);var rt=a.diagram;rt!==null&&rt.undoManager.isUndoingRedoing||z.cb(as,"elements",a,null,b,null,tt)}}return a}return null},Tt=Bn.prototype,Tt.toString=function(){return"Panel("+this.type.name+")#"+ii(this)},Tt.Pn=function(a){Be.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,E=0;E<x;E++)y[E].Pn(a)},Tt.hh=function(a,y){if(this.na===Bn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Bn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Bn.Table)if(a.yc(),a instanceof Ya){var x=a.yd;a.yd=yg(a,"gojs-ts"),qA(this,a),a.nh.pop(),a.yd=x}else qA(this,a);(x=this.isClipping&&this.na===Bn.Spot)&&a.save();for(var E=this.Pb(),b=this.O.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];x&&rt===E&&(a.clipInsteadOfFill=!0),rt.gc(a,y),x&&rt===E&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function qA(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,E=0<a.columnCount?a.colDefs:null;x!==null&&$A(a,y,!0,x,!0),E!==null&&$A(a,y,!1,E,!0),x!==null&&mc(a,y,!0,x),E!==null&&mc(a,y,!1,E),x!==null&&$A(a,y,!0,x,!1),E!==null&&$A(a,y,!1,E,!1)}function mc(a,y,x,E){for(var b=E.length,z=a.actualBounds,tt=a.naturalBounds,rt=!0,ot=0;ot<b;ot++){var lt=E[ot];if(lt!==void 0&&lt.actual!==0)if(rt)rt=!1;else{if(x){if(lt.position>tt.height)continue}else if(lt.position>tt.width)continue;var ut=lt.separatorStrokeWidth;isNaN(ut)&&(ut=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ft=lt.separatorStroke;if(ft===null&&(ft=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ut!==0&&ft!==null){Zo(a,y,ft,!1,!1,tt,z),ft=!1;var yt=lt.separatorDashArray;yt===null&&(yt=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),yt!==null&&(ft=!0,y.js(yt,0)),y.beginPath(),yt=lt.position+ut,x?yt>tt.height&&(ut-=yt-tt.height):yt>tt.width&&(ut-=yt-tt.width),lt=lt.position+ut/2,y.lineWidth=ut,ut=a.yb,x?(lt+=ut.top,yt=tt.width-ut.right,y.moveTo(ut.left,lt),y.lineTo(yt,lt)):(lt+=ut.left,yt=tt.height-ut.bottom,y.moveTo(lt,ut.top),y.lineTo(lt,yt)),y.stroke(),y.Se(),ft&&y.fs()}}}}function $A(a,y,x,E,b){for(var z=E.length,tt=a.actualBounds,rt=a.naturalBounds,ot=th(a,!0),lt=th(a,!1),ut=0;ut<z;ut++){var ft=E[ut];if(ft!==void 0&&ft.background!==null&&ft.coversSeparators!==b&&ft.actual!==0){var yt=x?tt.height:tt.width;if(!(ft.position>yt)){var Mt=ft.Wc(),bt=ft.separatorStrokeWidth;isNaN(bt)&&(bt=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Dt=ft.separatorStroke;Dt===null&&(Dt=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(Dt===null||ft.index===(x?ot:lt))&&(bt=0),Mt-=bt,bt=ft.position+bt,Mt+=ft.actual,bt+Mt>yt&&(Mt=yt-bt),0>=Mt||(yt=a.yb,Zo(a,y,ft.background,!0,!1,rt,tt),x?y.fillRect(yt.left,bt+yt.top,tt.width-(yt.left+yt.right),Mt):y.fillRect(bt+yt.left,yt.top,Mt,tt.height-(yt.top+yt.bottom)))}}}}function th(a,y){for(var x=y?a.rowCount:a.columnCount,E=0;E<x;E++){var b=y?a.rowDefs[E]:a.colDefs[E];if(b!==void 0)return b.index}return 0}function Mh(a){return a==="LineV"||a==="BarV"}Tt.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},Tt.kk=function(a,y,x){if(!Be.prototype.kk.call(this,a,y,x))return!1;if(this.type===Bn.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,qA(this,a),a.yd=null;else if(this.na===Bn.Grid||this.na===Bn.Graduated)return this.svg.innerHTML="",this.svg.remove(),!1;x=this.O.s;for(var E=x.length,b=0;b<E;b++)x[b].gc(a,y);return!0},Tt.nk=function(){return!0},Tt.$o=function(a,y,x,E){if(!this.isClipping)if(this.Dd()&&a.bk!==null){a=a.bk,y=this.O.s;for(var b=0,z=0,tt=0;tt<y.length;tt++)if(y[tt].Ed()){var rt=y[tt].actualBounds;b=tt===0?rt.x:Math.min(rt.x,b),z=tt===0?rt.y:Math.min(rt.y,z)}E.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-b)+","+(a.y-x.y-z)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else Be.prototype.$o.call(this,a,y,x,E)},Tt.Sj=function(a,y,x,E,b){var z=this.se(),tt=this.transform,rt=1/(tt.m11*tt.m22-tt.m12*tt.m21),ot=tt.m22*rt,lt=-tt.m12*rt,ut=-tt.m21*rt,ft=tt.m11*rt,yt=rt*(tt.m21*tt.dy-tt.m22*tt.dx),Mt=rt*(tt.m12*tt.dx-tt.m11*tt.dy);if(this.areaBackground!==null)return tt=this.actualBounds,Ce.Ff(tt.left,tt.top,tt.right,tt.bottom,a,y,x,E,b);if(this.background!==null)return z=a*ot+y*ut+yt,rt=a*lt+y*ft+Mt,a=x*ot+E*ut+yt,ot=x*lt+E*ft+Mt,b.h(0,0),x=this.naturalBounds,z=Ce.Ff(0,0,x.width,x.height,z,rt,a,ot,b),b.transform(tt),z;z||(ot=1,ut=lt=0,ft=1,Mt=yt=0),rt=a*ot+y*ut+yt,a=a*lt+y*ft+Mt,ot=x*ot+E*ut+yt,x=x*lt+E*ft+Mt,b.h(ot,x),E=(ot-rt)*(ot-rt)+(x-a)*(x-a),lt=!1,ft=this.O.s,Mt=ft.length,ut=Qt.alloc(),yt=null,y=1/0;var bt=null,Dt=this.isClipping&&this.na===Bn.Spot;Dt&&(bt=Qt.alloc(),yt=this.Pb(),(lt=yt.Sj(rt,a,ot,x,bt))&&(y=(rt-bt.x)*(rt-bt.x)+(a-bt.y)*(a-bt.y)));for(var qt=0;qt<Mt;qt++){var Vt=ft[qt];Vt.visible&&Vt!==yt&&Vt.Sj(rt,a,ot,x,ut)&&(lt=!0,Vt=(rt-ut.x)*(rt-ut.x)+(a-ut.y)*(a-ut.y),Vt<E&&(E=Vt,b.set(ut)))}return Dt&&(y>E&&b.set(bt),Qt.free(bt)),Qt.free(ut),z&&b.transform(tt),lt},Tt.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();Be.prototype.Gj.call(this)},Tt.v=function(a){if(!xl(this)){Be.prototype.v.call(this,a),a=null,(this.na===Bn.Auto||this.na===Bn.Link)&&(a=this.Pb());for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];if((b===a||b.isPanelMain)&&b.v(!0),!b.desiredSize.w()){var z=Ka(b,!1);(b instanceof Xa||b instanceof Bn||b instanceof Fo||z!==xn)&&b.v(!0)}}}},Tt.Uj=function(){if(!xl(this)){Es(this,!0),nA(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},Tt.Uk=function(){if(!(this.l&2048)){Yl(this,!0),Wa(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Tt.Wu=function(){Wa(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},Tt.Wl=function(a,y,x,E){var b=this.jg;b.h(0,0,0,0);var z=this.desiredSize,tt=this.minSize;x===void 0&&(x=tt.width,E=tt.height),x=Math.max(x,tt.width),E=Math.max(E,tt.height);var rt=this.maxSize;isNaN(z.width)||(a=Math.min(z.width,rt.width)),isNaN(z.height)||(y=Math.min(z.height,rt.height)),a=Math.max(x,a),y=Math.max(E,y);var ot=this.yb;a=Math.max(a-ot.left-ot.right,0),y=Math.max(y-ot.top-ot.bottom,0);var lt=this.O.s;lt.length!==0&&this.na.measure(this,a,y,lt,b,x,E),a=b.width+ot.left+ot.right,ot=b.height+ot.top+ot.bottom,isFinite(z.width)&&(a=z.width),isFinite(z.height)&&(ot=z.height),a=Math.min(rt.width,a),ot=Math.min(rt.height,ot),a=Math.max(tt.width,a),ot=Math.max(tt.height,ot),a=Math.max(x,a),ot=Math.max(E,ot),Fr(b,a,ot),Fr(this.naturalBounds,a,ot),this.Ge(0,0,a,ot)},Tt.Pb=function(){if(this.$g===null){var a=this.O.s,y=a.length;if(y===0)return null;for(var x=0;x<y;x++){var E=a[x];if(E.isPanelMain===!0)return this.$g=E}this.$g=a[0]}return this.$g};function Al(a){return a.part!==null?a.part.locationObject:null}Tt.eh=function(a,y,x,E){var b=this.O.s;if(this.actualBounds.h(a,y,x,E),b.length!==0){if(!this.desiredSize.w()){a=Ka(this,!0);var z=this.measuredBounds;y=z.width,z=z.height;var tt=this.Kg,rt=tt.left+tt.right;switch(tt=tt.top+tt.bottom,y===x&&z===E&&(a=xn),a){case xn:(y>x||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case Fn:this.v(!0),this.measure(x+rt,E+tt,0,0);break;case Ci:this.v(!0),this.measure(x+rt,z+tt,0,0);break;case _i:this.v(!0),this.measure(y+rt,E+tt,0,0)}}this.na.arrange(this,b,this.jg)}},Tt.gh=function(a){var y=this.naturalBounds,x=Al(this);if(Ao(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var E=y.length,b=Qt.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(Qe(b.set(a),z.transform),z.ca(b)))return Qt.free(b),!0}return Qt.free(b),!(this.Ma===null&&this.areaBackground===null)}return!1},Tt.ks=function(a){if(this.bindingId===a)return this;for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E].ks(a);if(b!==null)return b}return null},Tt.qm=function(a,y){if(y(this,a),a instanceof Bn){a=a.O.s;for(var x=a.length,E=0;E<x;E++)this.qm(a[E],y)}};function Hu(a,y){Xd(a,a,y)}function Xd(a,y,x){x(y),y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=y[b];z instanceof Bn&&Xd(a,z,x)}}function Cw(a,y){hy(a,a,y)}function hy(a,y,x){if(x(y),y instanceof Bn){y=y.O.s;for(var E=y.length,b=0;b<E;b++)hy(a,y[b],x)}}Tt.Nl=function(a){return cy(this,this,a)};function cy(a,y,x){if(x(y))return y;if(y instanceof Bn){y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=cy(a,y[b],x);if(z!==null)return z}}return null}Tt.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=sp(this));for(var E=0;E<x;E++){var b=y[E];if(b instanceof Bn){var z=b.fb(a);if(z!==null)return z}if(b.name===a)return b}return null};function dy(a){a=a.O.s;for(var y=a.length,x=0,E=0;E<y;E++){var b=a[E];b instanceof Bn?x=Math.max(x,dy(b)):b instanceof vr&&(x=Math.max(x,b.ig/2*b.strokeMiterLimit*b.Df()))}return x}Tt.se=function(){return!(this.type===Bn.TableRow||this.type===Bn.TableColumn)};function vc(a){return a.type===Bn.TableRow||a.type===Bn.TableColumn}Tt.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),La(this)))return null;var E=this.naturalBounds,b=1/this.Df(),z=this.se(),tt=z?a:Qe(Qt.allocAt(a.x,a.y),this.transform),rt=this.diagram,ot=10,lt=5;if(rt!==null&&(ot=rt.Ql("extraTouchArea"),lt=ot/2),Ao(-(lt*b),-(lt*b),E.width+ot*b,E.height+ot*b,tt.x,tt.y)){if(!this.isAtomic){b=this.O.s;var ut=b.length;if(rt=Qt.alloc(),lt=(ot=this.isClipping&&this.na===Bn.Spot)?this.Pb():null,ot&&(lt.se()?Qe(rt.set(a),lt.transform):rt.set(a),!lt.ca(rt)))return Qt.free(rt),z||Qt.free(tt),null;for(var ft=Al(this);ut--;){var yt=b[ut];if((yt.visible||yt===ft)&&(yt.se()?Qe(rt.set(a),yt.transform):rt.set(a),!ot||yt!==lt)){var Mt=null;if(yt instanceof Bn?Mt=yt.ic(rt,y,x):yt.pickable===!0&&yt.ca(rt)&&(Mt=yt),Mt!==null&&(y!==null&&(Mt=y(Mt)),Mt!==null&&(x===null||x(Mt))))return Qt.free(rt),z||Qt.free(tt),Mt}}Qt.free(rt)}return this.background===null&&this.areaBackground===null?(z||Qt.free(tt),null):(a=Ao(0,0,E.width,E.height,tt.x,tt.y)?this:null,z||Qt.free(tt),a)}return z||Qt.free(tt),null},Tt.ji=function(a,y,x,E){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var b=this.naturalBounds,z=this.se(),tt=z?a:Qe(Qt.allocAt(a.x,a.y),this.transform);if(b=Ao(0,0,b.width,b.height,tt.x,tt.y),vc(this)||b){if(!this.isAtomic){for(var rt=this.O.s,ot=rt.length,lt=Qt.alloc(),ut=Al(this);ot--;){var ft=rt[ot];if(ft.visible||ft===ut){ft.se()?Qe(lt.set(a),ft.transform):lt.set(a);var yt=ft;ft=ft instanceof Bn?ft:null,(ft!==null?ft.ji(lt,y,x,E):yt.ca(lt))&&yt.pickable!==!1&&(y!==null&&(yt=y(yt)),yt===null||x!==null&&!x(yt)||E.add(yt))}}Qt.free(lt)}return z||Qt.free(tt),b&&(this.background!==null||this.areaBackground!==null)}return z||Qt.free(tt),!1},Tt.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=Yi.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return Nm(this,y,x,b),z===void 0&&Yi.free(tt),!0;if(this.Yc(a,tt)){if(!this.isAtomic)for(var rt=Al(this),ot=this.O.s,lt=ot.length;lt--;){var ut=ot[lt];if(ut.visible||ut===rt){var ft=ut.actualBounds,yt=this.naturalBounds;ft.x>yt.width||ft.y>yt.height||0>ft.x+ft.width||0>ft.y+ft.height||(ft=ut,ut=ut instanceof Bn?ut:null,yt=Yi.alloc(),yt.set(tt),(ut!==null?ut.Cf(a,y,x,E,b,yt):Rs(ft,a,E,yt))&&(y!==null&&(ft=y(ft)),ft===null||x!==null&&!x(ft)||b.add(ft)),Yi.free(yt))}}return z===void 0&&Yi.free(tt),E}return z===void 0&&Yi.free(tt),!1};function Nm(a,y,x,E){for(var b=a.O.s,z=b.length;z--;){var tt=b[z];if(tt.visible){var rt=tt.actualBounds,ot=a.naturalBounds;rt.x>ot.width||rt.y>ot.height||0>rt.x+rt.width||0>rt.y+rt.height||(tt instanceof Bn&&Nm(tt,y,x,E),y!==null&&(tt=y(tt)),tt===null||x!==null&&!x(tt)||E.add(tt))}}}Tt.og=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;x===void 0&&(x=null),E===void 0&&(E=null);var tt=this.naturalBounds,rt=this.se(),ot=rt?a:Qe(Qt.allocAt(a.x,a.y),this.transform),lt=rt?y:Qe(Qt.allocAt(y.x,y.y),this.transform),ut=ot.Bf(lt),ft=0<ot.x&&ot.x<tt.width&&0<ot.y&&ot.y<tt.height||sn(ot.x,ot.y,0,0,0,tt.height)<=ut||sn(ot.x,ot.y,0,tt.height,tt.width,tt.height)<=ut||sn(ot.x,ot.y,tt.width,tt.height,tt.width,0)<=ut||sn(ot.x,ot.y,tt.width,0,0,0)<=ut;if(tt=ot.zd(0,0)<=ut&&ot.zd(0,tt.height)<=ut&&ot.zd(tt.width,0)<=ut&&ot.zd(tt.width,tt.height)<=ut,rt||(Qt.free(ot),Qt.free(lt)),ft){if(!this.isAtomic){ot=Qt.alloc(),lt=Qt.alloc(),ut=Al(this);for(var yt=this.O.s,Mt=yt.length;Mt--;){var bt=yt[Mt];if(bt.visible||bt===ut){var Dt=bt.actualBounds,qt=this.naturalBounds;(!rt||!(Dt.x>qt.width||Dt.y>qt.height||0>Dt.x+Dt.width||0>Dt.y+Dt.height))&&(bt.se()?(Dt=bt.transform,Qe(ot.set(a),Dt),Qe(lt.set(y),Dt)):(ot.set(a),lt.set(y)),Dt=bt,bt=bt instanceof Bn?bt:null,(bt!==null?bt.og(ot,lt,x,E,b,z):Dt.tx(ot,lt,b))&&(x!==null&&(Dt=x(Dt)),Dt===null||E!==null&&!E(Dt)||z.add(Dt)))}}Qt.free(ot),Qt.free(lt)}return b?ft:tt}return!1};function Dm(a){var y=null;return a instanceof vr&&(y=a.spot1,y===es&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=br),y}function Im(a){var y=null;return a instanceof vr&&(y=a.spot2,y===es&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=gr),y}Tt.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},Tt.M=function(a){return this.O.M(a)},Tt.Gb=function(a,y){y instanceof Ti&&le("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&le("Cannot make a Panel contain itself: "+this.toString()),le("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&le("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+y.toString()+", already contained by "+x.toString()+", cannot be shared by this Panel: "+this.toString()),this.na!==Bn.Grid||y instanceof vr||le("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Bn.Graduated||y instanceof vr||y instanceof Fo||le("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+y),y.wi(this),y.Ng=null,this.itemArray!==null){var E=y.data;E!==null&&typeof E=="object"&&(this.ge===null&&(this.ge=new be),this.ge.add(E,y))}var b=this.O;if(E=-1,x===this){for(var z=-1,tt=this.O.s,rt=tt.length,ot=0;ot<rt;ot++)if(tt[ot]===y){z=ot;break}if(z!==-1){if(z===a||z+1>=b.count&&a>=b.count)return;b.mb(z),E=z}else le("element "+y.toString()+" has panel "+x.toString()+" but is not contained by it.")}(0>a||a>b.count)&&(a=b.count),b.Gb(a,y),(a===0||y.isPanelMain)&&(this.$g=null),xl(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Bn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||o0(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof ri&&(x.Te=!0),x.Te&&x instanceof ri&&(x.wc=null),b=this.diagram,b!==null&&b.undoManager.isUndoingRedoing||(E!==-1&&x.cb(gs,"elements",this,y,null,E,null),x.cb(as,"elements",this,null,y,null,a)))};function Um(a,y){a.l=y?a.l|16777216:a.l&-16777217}Tt.remove=function(a){for(var y=this.O.s,x=y.length,E=-1,b=0;b<x;b++)if(y[b]===a){E=b;break}E!==-1&&this.pc(E,!0)},Tt.mb=function(a){0<=a&&this.pc(a,!0)},Tt.pc=function(a,y){var x=this.O,E=x.M(a);if(E.Ng=null,E.wi(null),this.ge!==null){var b=E.data;typeof b=="object"&&this.ge.remove(b)}x.mb(a),Es(this,!1),this.v(),this.$g===E&&(this.$g=null),this.graduatedIntervals=null;var z=this.part;z!==null&&(z.Rh=null,z.ag=NaN,z.Wb(),z instanceof ri&&(E instanceof Bn?E.qm(E,function(tt,rt){ov(z,rt,y)}):ov(z,E,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(gs,"elements",this,E,null,a,null))},Tt.Fb=function(a){0>a&&Xn(a,">= 0",Bn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Ds;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(as,"rowdefs",this,null,x,null,a)}return y[a]},Tt.oA=function(a){if(0>a&&Xn(a,">= 0",Bn,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(gs,"rowdefs",this,x,null,a,null),this.v()}}};function fy(a,y,x){var E=a.rowDefs;if(!(0>y)){if(E[y]=x instanceof Ds?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Tt.Eb=function(a){0>a&&Xn(a,">= 0",Bn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Ds;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(as,"coldefs",this,null,x,null,a)}return y[a]},Tt.jA=function(a){if(0>a&&Xn(a,">= 0",Bn,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(gs,"coldefs",this,x,null,a,null),this.v()}}};function gy(a,y,x){var E=a.colDefs;if(!(0>y)){if(E[y]=x instanceof Ds?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Tt.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&s0(y,a),this},Tt.Hy=function(a,y){return(a=this.Fb(a))&&s0(a,new Ds(y)),this},Tt.By=function(a,y){return(a=this.Eb(a))&&s0(a,new Ds(y)),this},Tt.nz=function(a){if(0>a||this.type!==Bn.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,E=x.length,b=this.topIndex;b<E;b++){var z=x[b];if(z!==void 0&&(y+=z.total,a<y))break}return b},Tt.fz=function(a){if(0>a||this.type!==Bn.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,E=x.length,b=this.leftIndex;b<E;b++){var z=x[b];if(z!==void 0&&(y+=z.total,a<y))break}return b},Tt.Fz=function(a,y){if(y===void 0&&(y=new Qt(NaN,NaN)),this.type!==Bn.Graduated)return y.h(NaN,NaN),y;a=Math.min(Math.max(a,this.graduatedMin),this.graduatedMax);var x=this.Pb();return x.geometry.Pu((a-this.graduatedMin)/this.graduatedRange,y),x.transform.Ga(y)},Tt.Gz=function(a){if(this.type!==Bn.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function py(a){return a=a.allBindings,a!==null&&a._isFrozen}function yu(a){var y=a.allBindings;if(y===null)a.data!==null&&le("Template cannot have .data be non-null: "+a),a.allBindings=y=new ne;else if(y._isFrozen)return;var x=new ne;Um(a,!1),a.qm(a,function(lt,ut){ut.th();var ft=ut.localBindings;if(ft!==null)for(XA(ut,!1),ft=ft.iterator;ft.next();){var yt=ft.value;yt.mode===Lp&&XA(ut,!0);var Mt=yt.sourceName;Mt!==null&&(Mt==="/"&&Um(lt,!0),Mt=k1(yt,lt,ut),Mt!==null&&(x.add(Mt),Mt.srcBindings===null&&(Mt.srcBindings=new ne),Mt.srcBindings.add(yt))),y.add(yt)}if(ut instanceof Bn&&ut.type===Bn.Table){if(0<ut.rowCount){for(lt=ut.rowDefs,ft=lt.length,yt=0;yt<ft;yt++)if(Mt=lt[yt],Mt!==void 0&&Mt.be!==null)for(var bt=Mt.be.iterator;bt.next();){var Dt=bt.value;Dt.xd=Mt,Dt.to=2,Dt.wl=Mt.index,y.add(Dt)}}if(0<ut.columnCount){for(ut=ut.colDefs,lt=ut.length,ft=0;ft<lt;ft++)if(yt=ut[ft],yt!==void 0&&yt.be!==null)for(Mt=yt.be.iterator;Mt.next();)bt=Mt.value,bt.xd=yt,bt.to=1,bt.wl=yt.index,y.add(bt)}}});for(var E=x.iterator;E.next();){var b=E.value;if(b.srcBindings!==null){XA(b,!0);for(var z=b.srcBindings.iterator;z.next();){var tt=z.value;b.localBindings===null&&(b.localBindings=new ne),b.localBindings.add(tt)}}b.srcBindings=null}for(E=y.iterator;E.next();)if(b=E.value,z=b.xd,z!==null){b.xd=null;var rt=b.targetProperty,ot=rt.indexOf(".");0<ot&&z instanceof Bn&&(tt=rt.substring(0,ot),rt=rt.substr(ot+1),ot=z.fb(tt),ot!==null?(z=ot,b.targetProperty=rt):On('Warning: unable to find GraphObject named "'+tt+'" for Binding: '+b.toString())),z instanceof Ds?(tt=ii(z.panel),b.Ai=tt===void 0?-1:tt,z.panel.bindingId=b.Ai):z instanceof Be?(tt=ii(z),b.Ai=tt===void 0?-1:tt,z.bindingId=b.Ai):le("Unknown type of binding target: "+z)}y.freeze(),a instanceof Ti&&a.Zc()&&a.Va()}Tt.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return Cw(y,function(x){x instanceof Bn&&(x.allBindings=null,x.ub=null);var E=x.localBindings;E!==null&&(x.localBindings=null,E.each(function(b){x.bind(b.copy())})),E=x.animationTriggers,E!==null&&(x.animationTriggers=null,E.each(function(b){x.Jv(b.value.copy())}))}),a&&yu(y),y},Tt.La=function(a){var y=this.allBindings;if(y!==null)for(a===void 0&&(a=""),y=y.iterator;y.next();){var x=y.value,E=x.sourceProperty;if((a===""||E===""||E===a)&&(E=x.targetProperty,x.converter!==null||E!=="")){E=this.data;var b=x.sourceName;if(b!==null){if(b==="")E=this;else if(b==="/")E=this;else if(b===".")E=this;else if(b==="..")E=this;else if(E=this.fb(b),E===null)continue}else if(x.isToModel)if(E=this.diagram,E!==null)E=E.model.modelData;else continue;var z=this,tt=x.Ai;if(tt!==-1){if(z=this.ks(tt),z===null)continue}else x.xd!==null&&(z=x.xd);if(b==="/"?E=z.part:b==="."?E=z:b===".."&&(E=z.panel),b=x.to,b!==0){if(!(z instanceof Bn))continue;b===1?z=z.Eb(x.wl):b===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,E)}}},Tt.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function Pw(a,y){a=a.O.s;for(var x=a.length,E=y.length,b=0,z=null;b<x&&(z=a[b],!(z instanceof Bn&&z.data!==null));)b++,z=a[b];if(x-b!==E)return!0;if(z===null)return 0<E;for(var tt=0;b<x&&tt<E;){if(z=a[b],!(z instanceof Bn)||z.data!==y[tt])return!0;b++,tt++}return!1}function sp(a){if(a.type===Bn.Spot||a.type===Bn.Auto)return Math.min(a.O.length,1);if(a.type===Bn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var E=a.M(x);if(!(E instanceof vr&&E.isPanelMain))break}return x}return a.type===Bn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Bn&&vc(a))?1:0}Tt.mv=function(){for(var a=sp(this);this.O.length>a;)this.pc(this.O.length-1,!1);my(this,this.itemArray)};function my(a,y){var x=sp(a);if(y===null||y.length===0)for(;a.O.length>x;)a.pc(a.O.length-1,!1);else if(a.O.length<=x){x=y.length;for(var E=0;E<x;E++)r0(a,y[E],E,!0)}else{E=x;for(var b=0;b<y.length;b++,E++){var z=y[b],tt=E<a.O.length?a.O.M(E):null;if(tt instanceof Bn){if(tt.data!==z){var rt=Om(a,tt.data),ot=Om(a,z),lt=ot!==rt;lt||(rt=Hm(a,rt),lt=Hm(a,ot)!==rt),lt?(a.pc(E,!1),r0(a,z,b,!1)):tt.data=z}}else r0(a,z,b,!1)}for(;E<a.O.length;)a.pc(E,!1);a.$g=null,Qm(a,x,0),xl(a)||a.v(),a.graduatedIntervals=null,a.If()||o0(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof ri&&(y.Te=!0),y.Te&&y instanceof ri&&(y.wc=null))}}function r0(a,y,x,E){if(!(y==null||0>x)){var b=Om(a,y);if(b=Hm(a,b),b!==null){if(yu(b),b=b.copy(),b.l&16777216){var z=a.ih();z!==null&&Um(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new be),a.ge.add(y,b)),z=x+sp(a),a.Gb(z,b),E&&(b.ub=y,Qm(a,z,x),b.ub=null),b.data=y}}}function Qm(a,y,x){for(a=a.O;y<a.length;){var E=a.M(y);if(E instanceof Bn){var b=y,z=x;E.type===Bn.TableRow?E.row=b:E.type===Bn.TableColumn&&(E.column=b),E.itemIndex=z}y++,x++}}function Om(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=xs(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;le("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function Hm(a,y){var x=a.itemTemplateMap,E=null;return x!==null&&(E=x.I(y)),E===null&&(x!==null&&(E=x.I("")),E===null&&(vy||(vy=!0,On('No item template Panel found for category "'+y+'" on '+a),On(" Using default item template."),a=new Bn,y=new Fo,y.bind(new Ls("text","",mi)),a.add(y),yy=a),E=yy)),E}function o0(a,y,x){var E=y.enabledChanged;if(E!==null&&E(y,x),y instanceof Bn){y=y.O.s,E=y.length;for(var b=0;b<E;b++){var z=y[b];x&&z instanceof Bn&&!z.isEnabled||o0(a,z,x)}}}function FA(a,y){y.name=a,Ru.add(a,y)}Sn.Object.defineProperties(Bn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Bn.Grid,this.v(),this.g("type",y,a))}},elements:{get:function(){return this.O.iterator}},naturalBounds:{get:function(){return this.dc}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"?(0>a&&Xn(a,">= 0",Bn,"padding"),a=new sr(a)):(0>a.left&&Xn(a.left,">= 0",Bn,"padding:value.left"),0>a.right&&Xn(a.right,">= 0",Bn,"padding:value.right"),0>a.top&&Xn(a.top,">= 0",Bn,"padding:value.top"),0>a.bottom&&Xn(a.bottom,">= 0",Bn,"padding:value.bottom"));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.v(),this.g("padding",y,a))}},defaultAlignment:{get:function(){return this.Tm},set:function(a){var y=this.Tm;y.D(a)||(this.Tm=a=a.J(),this.v(),this.g("defaultAlignment",y,a))}},defaultStretch:{get:function(){return this.Uf},set:function(a){var y=this.Uf;y!==a&&(this.Uf=a,this.v(),this.g("defaultStretch",y,a))}},defaultSeparatorPadding:{get:function(){return this.T!==null?this.T.Qp:js},set:function(a){typeof a=="number"&&(a=new sr(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new su),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 lo)&&(a instanceof lo&&a.freeze(),this.T===null&&(this.T=new su),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 su),this.T.Ha=a,this.v(),this.g("defaultRowSeparatorStrokeWidth",y,a))}},defaultRowSeparatorDashArray:{get:function(){return this.T!==null?this.T.V:null},set:function(a){var y=this.defaultRowSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||le("defaultRowSeparatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.T===null&&(this.T=new su),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 lo)&&(a instanceof lo&&a.freeze(),this.T===null&&(this.T=new su),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 su),this.T.F=a,this.v(),this.g("defaultColumnSeparatorStrokeWidth",y,a))}},defaultColumnSeparatorDashArray:{get:function(){return this.T!==null?this.T.o:null},set:function(a){var y=this.defaultColumnSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||le("defaultColumnSeparatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.T===null&&(this.T=new su),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 su),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||le("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Uu(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()||le("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Uu(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 kh),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),ia(this)&&(a=this.part,a!==null&&ko(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 kh),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),ia(this)&&(a=this.part,a!==null&&ko(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 kh),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 kh),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 kh,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 kh,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 kh,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 kh,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 su),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new su),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:l0},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new su),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:l0},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new su),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)&&le("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new su),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)&&le("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new su),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 Ti&&!(this instanceof Jr);yu(this),this.ub=a;var E=this.diagram;E!==null&&(x?(x=E.partManager,this instanceof Rn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Ti&&(y!==null&&x.cf.remove(y),a!==null&&x.cf.add(a,this))):(x=this.panel,x!==null&&x.ge!==null&&(y!==null&&x.ge.remove(y),a!==null&&x.ge.add(a,this)))),this.g("data",y,a),E!==null&&E.undoManager.isUndoingRedoing||a!==null&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var y=this.zn;y!==a&&(this.zn=a,this.g("itemIndex",y,a))}},allBindings:{get:function(){return this.A!==null?this.A.nb:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new hc),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&Pw(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&Pv(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&Cv(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||my(this,a)}}},itemTemplate:{get:function(){return this.itemTemplateMap===null?null:this.itemTemplateMap.I("")},set:function(a){if(this.itemTemplateMap===null){if(a===null)return;this.itemTemplateMap=new be}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Ti||a.isPanelMain)&&le("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(););wr(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&&(wr(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 lr&&(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&&o0(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))}}}),Sn.Object.defineProperties(Bn,{Position:{get:function(){return Ru.I("Position")}},Horizontal:{get:function(){return Ru.I("Horizontal")}},Vertical:{get:function(){return Ru.I("Vertical")}},Spot:{get:function(){return Ru.I("Spot")}},Auto:{get:function(){return Ru.I("Auto")}},Table:{get:function(){return Ru.I("Table")}},Viewbox:{get:function(){return Ru.I("Viewbox")}},TableRow:{get:function(){return Ru.I("TableRow")}},TableColumn:{get:function(){return Ru.I("TableColumn")}},Link:{get:function(){return Ru.I("Link")}},Grid:{get:function(){return Ru.I("Grid")}},Graduated:{get:function(){return Ru.I("Graduated")}}}),Bn.prototype.rebuildItemElements=Bn.prototype.mv,Bn.prototype.findItemPanelForData=Bn.prototype.sx,Bn.prototype.updateTargetBindings=Bn.prototype.La,Bn.prototype.copyTemplate=Bn.prototype.Uy,Bn.prototype.graduatedValueForPoint=Bn.prototype.Gz,Bn.prototype.graduatedPointForValue=Bn.prototype.Fz,Bn.prototype.findColumnForLocalX=Bn.prototype.fz,Bn.prototype.findRowForLocalY=Bn.prototype.nz,Bn.prototype.addColumnDefinition=Bn.prototype.By,Bn.prototype.addRowDefinition=Bn.prototype.Hy,Bn.prototype.addRowColumnDefinition=Bn.prototype.Gy,Bn.prototype.removeColumnDefinition=Bn.prototype.jA,Bn.prototype.getColumnDefinition=Bn.prototype.Eb,Bn.prototype.removeRowDefinition=Bn.prototype.oA,Bn.prototype.getRowDefinition=Bn.prototype.Fb,Bn.prototype.removeAt=Bn.prototype.mb,Bn.prototype.remove=Bn.prototype.remove,Bn.prototype.insertAt=Bn.prototype.Gb,Bn.prototype.elt=Bn.prototype.M,Bn.prototype.add=Bn.prototype.add,Bn.prototype.findObject=Bn.prototype.fb,Bn.prototype.findInVisualTree=Bn.prototype.Nl,Bn.prototype.walkVisualTreeFrom=Bn.prototype.qm,Bn.prototype.findMainElement=Bn.prototype.Pb;var vy=!1,yy=null,Ru=new be;Bn.className="Panel",Bn.definePanelLayout=FA,FA("Position",new qo),FA("Vertical",new Yr),FA("Auto",new Do),FA("Link",new Il);function kh(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}kh.prototype.copy=function(){var a=new kh;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},kh.className="GradPanelSettings";function su(){this.Pc=[],this.Oc=[],this.j=this.ob=l0,this.hb=this.Hb=0,this.Qp=js,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}su.prototype.copy=function(a){for(var y=new su,x=this.Pc,E=x.length,b=y.Pc,z=0;z<E;z++)if(x[z]!==void 0){var tt=x[z].copy();tt.wi(a),b[z]=tt}for(x=this.Oc,E=x.length,b=y.Oc,z=0;z<E;z++)x[z]!==void 0&&(tt=x[z].copy(),tt.wi(a),b[z]=tt);return y.ob=this.ob,y.j=this.j,y.Hb=this.Hb,y.hb=this.hb,y.Qp=this.Qp.J(),y.Ha=this.Ha,y.ia=this.ia,y.V=this.V,y.F=this.F,y.u=this.u,y.o=this.o,y.nb=this.nb,y},su.className="TablePanelSettings";function Ds(a){an(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=es,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Rm,this.hg=or,this.lo=this.dg=null,this.mo=NaN,this.Ma=this.tj=null,this.Pm=!1,a&&(Object.assign(this,a),a.column!==void 0?(this.isRow=!1,this.index=a.column):a.row!==void 0&&(this.isRow=!0,this.index=a.row))}Ds.prototype.copy=function(){var a=new Ds;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=fi(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function s0(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=fi(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Tt=Ds.prototype,Tt.qb=function(a){a.classType===Ds&&(this.sizing=a)},Tt.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+ii(this)},Tt.wi=function(a){this.Me=a},Tt.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)},Tt.Wc=function(){var a=0,y=this.Me,x=0,E=this.isRow;if(y!==null&&y.type===Bn.Table)for(var b=E?y.rowDefs.length:y.colDefs.length,z=0;z<b;z++){var tt=E?y.rowDefs[z]:y.colDefs[z];if(tt!==void 0&&tt.oa!==0){x=tt.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=E?y.defaultRowSeparatorStroke:y.defaultColumnSeparatorStroke),x!==null&&(a=this.separatorStrokeWidth,isNaN(a)&&(y!==null?a=E?y.defaultRowSeparatorStrokeWidth:y.defaultColumnSeparatorStrokeWidth:a=0))),E=this.dg,E===null)if(y!==null)E=y.defaultSeparatorPadding;else return a;return a+(this.isRow?E.top+E.bottom:E.left+E.right)},Tt.Ob=function(a,y,x){var E=this.Me;if(E!==null&&(E.cb(No,a,this,y,x,void 0,void 0),this.be!==null&&(y=E.diagram,y!==null&&!y.skipsModelSourceBindings&&(E=E.ih(),E!==null&&(y=E.data,y!==null)))))for(x=this.be.iterator;x.next();)x.value.sp(this,y,a,E)};function a0(a){if(a.sizing===Rm){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}Tt.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Ls(a,y,x,E):b=a,b.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&py(y)&&le("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+b+" on "+a)),this.be===null&&(this.be=new ne),this.be.add(b),this},Sn.Object.defineProperties(Ds.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&&Xn(a,">= 0",Ds,"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&&Xn(a,">= 0",Ds,"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))&&Xn(a,">= 0",Ds,"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&&Xn(a,">= 0",Ds,"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 sr(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&&Et(a,"RowColumnDefinition.separatorStroke"),a instanceof lo&&a.freeze(),this.lo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStroke",y,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var y=this.mo;y!==a&&(this.mo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStrokeWidth",y,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var y=this.tj;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||le("separatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.tj=a,this.panel!==null&&this.panel.N(),this.Ob("separatorDashArray",y,a)}}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&Et(a,"RowColumnDefinition.background"),a instanceof lo&&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}}}),Ds.prototype.computeEffectiveSpacing=Ds.prototype.Wc,Ds.prototype.computeEffectiveSpacingTop=Ds.prototype.Io;var Rm=new Oe(Ds,"Default",0),ap=new Oe(Ds,"None",1),l0=new Oe(Ds,"ProportionalExtra",2);Ds.className="RowColumnDefinition",Ds.Default=Rm,Ds.None=ap,Ds.ProportionalExtra=l0;function vr(a,y){Be.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)}We(vr,Be),vr.prototype.cloneProtected=function(a){Be.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=fi(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 Jd(a){a.Na===null?a.Na=new Gm:a.Na.nc&&(a.Na=a.Na.copy())}Tt=vr.prototype,Tt.th=function(){Be.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Tt.qb=function(a){a===xn||a===vi||a===Ir||a===or?this.geometryStretch=a:Be.prototype.qb.call(this,a)},Tt.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+ii(this)};function wg(a,y,x,E){var b=x.length;if(!(4>b)){var z=E.measuredBounds,tt=Math.max(1,z.width);z=z.height;for(var rt=x[0],ot=x[1],lt,ut,ft,yt,Mt,bt,Dt=0,qt=rn(),Vt=2;Vt<b;Vt+=2)lt=x[Vt],ut=x[Vt+1],ft=lt-rt,rt=ut-ot,ft===0&&(ft=.001),yt=rt/ft,Mt=Math.atan2(rt,ft),bt=Math.sqrt(ft*ft+rt*rt),qt.push([ft,Mt,yt,bt]),Dt+=bt,rt=lt,ot=ut;rt=x[0],ot=x[1],ft=E.measuredBounds.width,E instanceof vr&&(ft-=E.strokeWidth),1>ft&&(ft=1),b=x=ft,lt=tt/2,ut=lt!==0,Vt=0,bt=qt[Vt],ft=bt[0],Mt=bt[1],yt=bt[2],bt=bt[3];for(var oe=0;.1<=Dt;){if(oe===0&&(ut?(b=x,b-=lt,Dt-=lt,ut=!1):b=x,b===0&&(b=1)),b>Dt){Ve(qt);return}b>bt?(oe=b-bt,b=bt):oe=0;var ce=Math.sqrt(b*b/(1+yt*yt));if(0>ft&&(ce=-ce),rt+=ce,ot+=yt*ce,a.translate(rt,ot),a.rotate(Mt),a.translate(-(tt/2),-(z/2)),oe===0&&E.hh(a,y),a.translate(tt/2,z/2),a.rotate(-Mt),a.translate(-rt,-ot),Dt-=b,bt-=b,oe!==0){if(Vt++,Vt===qt.length){Ve(qt);return}bt=qt[Vt],ft=bt[0],Mt=bt[1],yt=bt[2],bt=bt[3],b=oe}}Ve(qt)}}Tt.hh=function(a,y){var x=this.xc,E=this.Ui;if(x!==null||E!==null){var b=this.ua;if(b!==null){a.yc();var z=this.actualBounds,tt=this.naturalBounds;E!==null&&Zo(this,a,E,!0,!1,tt,z);var rt=this.part,ot=this.ig;if(x===null||ot!==0||rt===null||!this.isPanelMain&&rt.Pb()!==this||(ot=rt.type===Bn.Link&&rt instanceof Jr&&rt.category==="Selection"&&rt.adornedObject instanceof vr&&rt.adornedPart.Pb()===rt.adornedObject?rt.adornedObject.strokeWidth:0),ot===0&&(x=null),x!==null&&ot!==0&&(Zo(this,a,x,!1,!1,tt,z),a.lineWidth=ot,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),z=!1,rt&&y.Gf("drawShadows")&&(z=rt.isShadowed),a.Il===!1&&(z=!1),rt=!0,x===null||E!==null&&E!=="transparent"||(rt=!1),tt=!1,ot=this.strokeDashArray,ot!==null&&(tt=!0,a.js(ot,this.strokeDashOffset)),b.type===bn.j)a.beginPath(),a.moveTo(b.startX,b.startY),a.lineTo(b.endX,b.endY),x!==null&&a.jk(),a.Se();else if(b.type===bn.u){var lt=b.startX;ot=b.startY;var ut=b.endX,ft=b.endY;b=Math.min(lt,ut);var yt=Math.min(ot,ft);lt=Math.abs(ut-lt),ot=Math.abs(ft-ot),a.beginPath(),a.rect(b,yt,lt,ot),E!==null&&a.ng(E),x!==null&&(rt&&z&&Ou(a),a.jk(),rt&&z&&SA(a)),a.Se()}else if(b.type===bn.F)lt=b.startX,ot=b.startY,ut=b.endX,ft=b.endY,b=Math.abs(ut-lt)/2,yt=Math.abs(ft-ot)/2,lt=Math.min(lt,ut)+b,ot=Math.min(ot,ft)+yt,a.beginPath(),a.moveTo(lt,ot-yt),a.bezierCurveTo(lt+Ce.wg*b,ot-yt,lt+b,ot-Ce.wg*yt,lt+b,ot),a.bezierCurveTo(lt+b,ot+Ce.wg*yt,lt+Ce.wg*b,ot+yt,lt,ot+yt),a.bezierCurveTo(lt-Ce.wg*b,ot+yt,lt-b,ot+Ce.wg*yt,lt-b,ot),a.bezierCurveTo(lt-b,ot-Ce.wg*yt,lt-Ce.wg*b,ot-yt,lt,ot-yt),a.closePath(),E!==null&&a.ng(E),x!==null&&(rt&&z&&Ou(a),a.jk(),rt&&z&&SA(a)),a.Se();else if(b.type===bn.o)for(b=b.figures,ot=b.length,yt=0;yt<ot;yt++){lt=b.s[yt],a.beginPath(),a.moveTo(lt.startX,lt.startY),ut=lt.segments.s,ft=ut.length;for(var Mt=null,bt=0;bt<ft;bt++){var Dt=ut[bt];switch(Dt.type){case ws:a.moveTo(Dt.endX,Dt.endY);break;case vo:a.lineTo(Dt.endX,Dt.endY);break;case Ps:a.bezierCurveTo(Dt.point1X,Dt.point1Y,Dt.point2X,Dt.point2Y,Dt.endX,Dt.endY);break;case Ha:a.quadraticCurveTo(Dt.point1X,Dt.point1Y,Dt.endX,Dt.endY);break;case ss:if(Dt.radiusX===Dt.radiusY){var qt=Math.PI/180;a.arc(Dt.point1X,Dt.point1Y,Dt.radiusX,Dt.startAngle*qt,(Dt.startAngle+Dt.sweepAngle)*qt,0>Dt.sweepAngle,Mt!==null?Mt.endX:lt.startX,Mt!==null?Mt.endY:lt.startY)}else if(Mt=Fa(Dt,lt),qt=Mt.length,qt===0)a.lineTo(Dt.centerX,Dt.centerY);else for(var Vt=0;Vt<qt;Vt++){var oe=Mt[Vt];Vt===0&&a.lineTo(oe[0],oe[1]),a.bezierCurveTo(oe[2],oe[3],oe[4],oe[5],oe[6],oe[7])}break;case sl:if(Vt=qt=0,Mt!==null&&Mt.type===ss){if(Mt=Fa(Mt,lt),oe=Mt.length,oe===0){a.lineTo(Dt.endX,Dt.endY);break}Mt=Mt[oe-1]||null,Mt!==null&&(qt=Mt[6],Vt=Mt[7])}else qt=Mt!==null?Mt.endX:lt.startX,Vt=Mt!==null?Mt.endY:lt.startY;if(Mt=ol(Dt,lt,qt,Vt),qt=Mt.length,qt===0){a.lineTo(Dt.endX,Dt.endY);break}for(Vt=0;Vt<qt;Vt++)oe=Mt[Vt],a.bezierCurveTo(oe[2],oe[3],oe[4],oe[5],oe[6],oe[7]);break;default:le("Segment not of valid type: "+Dt.type)}Dt.isClosed&&a.closePath(),Mt=Dt}ut=lt.isFilled,z?lt.isShadowed?(ut===!0&&E!=="transparent"&&E!==null&&a.ng(E,lt.isEvenOdd),x!==null&&(ut&&rt&&Ou(a),a.jk(),ut&&rt&&SA(a))):(Ou(a),ut&&E!=="transparent"&&E!==null&&a.ng(E,lt.isEvenOdd),x!==null&&a.jk(),SA(a)):(ut&&E!==null&&a.ng(E,lt.isEvenOdd),x!==null&&a.jk()),a.Se(yt)}if(tt&&a.fs(),this.pathPattern!==null){if(x=this.pathPattern,x.measure(1/0,1/0),E=x.measuredBounds,x.arrange(0,0,E.width,E.height),z=this.geometry,a.save(),a.beginPath(),E=rn(),z.type===bn.j)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.endY),wg(a,y,E,x);else if(z.type===bn.o)for(z=z.figures.iterator;z.next();){for(rt=z.value,E.length=0,E.push(rt.startX),E.push(rt.startY),tt=rt.startX,b=rt.startY,ot=tt,yt=b,lt=rt.segments.s,ut=lt.length,ft=0;ft<ut;ft++){switch(bt=lt[ft],bt.type){case ws:wg(a,y,E,x),E.length=0,E.push(bt.endX),E.push(bt.endY),tt=bt.endX,b=bt.endY,ot=tt,yt=b;break;case vo:E.push(bt.endX),E.push(bt.endY),tt=bt.endX,b=bt.endY;break;case Ps:Ce.Qe(tt,b,bt.point1X,bt.point1Y,bt.point2X,bt.point2Y,bt.endX,bt.endY,.5,E),tt=bt.endX,b=bt.endY;break;case Ha:Ce.ep(tt,b,bt.point1X,bt.point1Y,bt.endX,bt.endY,.5,E),tt=bt.endX,b=bt.endY;break;case ss:if(Dt=Fa(bt,rt),Mt=Dt.length,Mt===0){E.push(bt.centerX),E.push(bt.centerY),tt=bt.centerX,b=bt.centerY;break}for(qt=0;qt<Mt;qt++)Vt=Dt[qt],Ce.Qe(tt,b,Vt[2],Vt[3],Vt[4],Vt[5],Vt[6],Vt[7],.5,E),tt=Vt[6],b=Vt[7];break;case sl:if(Dt=ol(bt,rt,tt,b),Mt=Dt.length,Mt===0){E.push(bt.endX),E.push(bt.endY),tt=bt.endX,b=bt.endY;break}for(qt=0;qt<Mt;qt++)Vt=Dt[qt],Ce.Qe(tt,b,Vt[2],Vt[3],Vt[4],Vt[5],Vt[6],Vt[7],.5,E),tt=Vt[6],b=Vt[7];break;default:le("Segment not of valid type: "+bt.type)}bt.isClosed&&(E.push(ot),E.push(yt),wg(a,y,E,x))}wg(a,y,E,x)}else if(z.type===bn.u)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.startY),E.push(z.endX),E.push(z.endY),E.push(z.startX),E.push(z.endY),E.push(z.startX),E.push(z.startY),wg(a,y,E,x);else if(z.type===bn.F){if(b=new Cs,b.startX=z.endX,b.startY=(z.startY+z.endY)/2,tt=new Vr(ss),tt.startAngle=0,tt.sweepAngle=360,tt.centerX=(z.startX+z.endX)/2,tt.centerY=(z.startY+z.endY)/2,tt.radiusX=Math.abs(z.startX-z.endX)/2,tt.radiusY=Math.abs(z.startY-z.endY)/2,b.add(tt),z=Fa(tt,b),rt=z.length,rt===0)E.push(tt.centerX),E.push(tt.centerY);else for(tt=b.startX,b=b.startY,ot=0;ot<rt;ot++)yt=z[ot],Ce.Qe(tt,b,yt[2],yt[3],yt[4],yt[5],yt[6],yt[7],.5,E),tt=yt[6],b=yt[7];wg(a,y,E,x)}Ve(E),a.restore(),a.Vc(!1)}}}},Tt.kk=function(a,y,x){return!Be.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)},Tt.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:Be.prototype.nk.call(this,a)},Tt.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)}},Tt.ga=function(a,y){if(y===void 0&&(y=new Qt),a instanceof di){a.Mc()&&le("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var x=this.naturalBounds,E=this.strokeWidth;y.h(a.x*(x.width+E)-E/2+x.x+a.offsetX,a.y*(x.height+E)-E/2+x.y+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},Tt.mi=function(a){a===void 0&&(a=new Ue);var y=this.naturalBounds,x=this.oe;y=Ue.allocAt(y.x,y.y,y.width,y.height);var E=this.strokeWidth;return y.Bc(E/2,E/2),E=Qt.allocAt(y.x,y.y).transform(x),a.h(E.x,E.y,0,0),E.h(y.right,y.y).transform(x),kr(a,E.x,E.y,0,0),E.h(y.right,y.bottom).transform(x),kr(a,E.x,E.y,0,0),E.h(y.x,y.bottom).transform(x),kr(a,E.x,E.y,0,0),Ue.free(y),Qt.free(E),a},Tt.gh=function(a,y){var x=this.geometry;if(x===null||this.fill===null&&this.stroke===null)return!1;var E=x.bounds,b=this.strokeWidth/2;x.type!==bn.j||y||(b+=2);var z=Ue.alloc();if(z.assign(E),z.Bc(b+2,b+2),!z.ca(a))return Ue.free(z),!1;if(E=b+1e-4,x.type===bn.j)return this.stroke===null||(E=(x.endX-x.startX)*(a.x-x.startX)+(x.endY-x.startY)*(a.y-x.startY),0>(x.startX-x.endX)*(a.x-x.endX)+(x.startY-x.endY)*(a.y-x.endY)||0>E)?!1:(Ue.free(z),Ce.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===bn.u){y=x.startX;var tt=x.startY,rt=x.endX;if(x=x.endY,z.x=Math.min(y,rt),z.y=Math.min(tt,x),z.width=Math.abs(rt-y),z.height=Math.abs(x-tt),this.fill===null){if(z.Bc(-E,-E),z.ca(a))return Ue.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),Ue.free(z),a}if(x.type===bn.F){tt=x.startX,b=x.startY,rt=x.endX;var ot=x.endY;if(x=Math.min(tt,rt),y=Math.min(b,ot),tt=Math.abs(rt-tt)/2,b=Math.abs(ot-b)/2,x=a.x-(x+tt),y=a.y-(y+b),this.fill===null){if(tt-=E,b-=E,0>=tt||0>=b||1>=x*x/(tt*tt)+y*y/(b*b))return Ue.free(z),!1;tt+=E,b+=E}return this.stroke!==null&&(tt+=E,b+=E),Ue.free(z),0>=tt||0>=b?!1:1>=x*x/(tt*tt)+y*y/(b*b)}if(x.type===bn.o)return Ue.free(z),this.fill===null?gl(x,a.x,a.y,b):rs(x,a,b,1<this.strokeWidth,y);le("Unknown Geometry type: "+x.type)},Tt.Wl=function(a,y,x,E){var b=this.desiredSize,z=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var tt=this.geometry.bounds;else{var rt=this.figure,ot=Km[rt];if(ot===void 0){var lt=Ce.Ze[rt];typeof lt=="string"&&(lt=Ce.Ze[lt]),typeof lt=="function"?(ot=lt(null,100,100),Km[rt]=ot):le("Unsupported Figure: "+rt)}tt=ot.bounds}rt=tt.width,ot=tt.height,lt=tt.width;var ut=tt.height;switch(Ka(this,!0)){case xn:E=x=0;break;case Fn:lt=Math.max(a-z,0),ut=Math.max(y-z,0);break;case Ci:lt=Math.max(a-z,0),E=0;break;case _i:x=0,ut=Math.max(y-z,0)}isFinite(b.width)&&(lt=b.width),isFinite(b.height)&&(ut=b.height);var ft=this.maxSize,yt=this.minSize;switch(x=Math.max(x-z,yt.width),E=Math.max(E-z,yt.height),lt=Math.min(ft.width,lt),ut=Math.min(ft.height,ut),lt=isFinite(lt)?Math.max(x,lt):Math.max(rt,x),ut=isFinite(ut)?Math.max(E,ut):Math.max(ot,E),x=_m(this),x){case xn:break;case Fn:rt=lt,ot=ut;break;case vi:x=Math.min(lt/rt,ut/ot),isFinite(x)||(x=1),rt*=x,ot*=x;break;default:le(x+" is not a valid geometryStretch.")}this.Rd!==null?(rt===0&&(rt=.001),ot===0&&(ot=.001),x=this.Rd!==null?this.Rd:this.ua,tt=x.bounds,E=rt/tt.width,tt=ot/tt.height,isFinite(E)||(E=1),isFinite(tt)||(tt=1),this.ua=E===1&&tt===1?x:x.copy().scale(E,tt)):this.ua!==null&&Ce.$(this.ua.Sk,a-z)&&Ce.$(this.ua.Rk,y-z)||(this.ua=vr.makeGeometry(this,rt,ot)),tt=this.ua.bounds,a===1/0||y===1/0?this.Ge(tt.x-z/2,tt.y-z/2,a===0&&rt===0?0:tt.width+z,y===0&&ot===0?0:tt.height+z):this.Ge(-(z/2),-(z/2),lt+z,ut+z),b.w()?(lt=b.width,ut=b.height,lt=Math.min(ft.width,lt),ut=Math.min(ft.height,ut),lt=Math.max(yt.width,lt),ut=Math.max(yt.height,ut),this.dc.h(0,0,lt,ut)):this.dc.assign(tt)};function _m(a){var y=a.geometryStretch;return a.Rd!==null?y===or?Fn:y:y===or?Km[a.figure].defaultStretch:y}Tt.eh=function(a,y,x,E){Ea(this,a,y,x,E)},Tt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Tt.Sj=function(a,y,x,E,b){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),rt=z.m22*tt,ot=-z.m12*tt,lt=-z.m21*tt,ut=z.m11*tt,ft=tt*(z.m21*z.dy-z.m22*z.dx),yt=tt*(z.m12*z.dx-z.m11*z.dy);z=a*rt+y*lt+ft,tt=a*ot+y*ut+yt,rt=x*rt+E*lt+ft,ot=x*ot+E*ut+yt,ft=this.ig/2,lt=this.ua,lt===null&&(this.measure(1/0,1/0),lt=this.ua);var Mt=lt.bounds;if(ut=!1,lt.type===bn.j)if(1.5>=this.strokeWidth)ut=Ce.Ve(lt.startX,lt.startY,lt.endX,lt.endY,z,tt,rt,ot,b);else{if(lt.startX===lt.endX?(E=ft,ut=0):(y=(lt.endY-lt.startY)/(lt.endX-lt.startX),ut=ft/Math.sqrt(1+y*y),E=ut*y),y=rn(),a=new Qt,Ce.Ve(lt.startX+E,lt.startY+ut,lt.endX+E,lt.endY+ut,z,tt,rt,ot,a)&&y.push(a),a=new Qt,Ce.Ve(lt.startX-E,lt.startY-ut,lt.endX-E,lt.endY-ut,z,tt,rt,ot,a)&&y.push(a),a=new Qt,Ce.Ve(lt.startX+E,lt.startY+ut,lt.startX-E,lt.startY-ut,z,tt,rt,ot,a)&&y.push(a),a=new Qt,Ce.Ve(lt.endX+E,lt.endY+ut,lt.endX-E,lt.endY-ut,z,tt,rt,ot,a)&&y.push(a),rt=y.length,rt===0)return Ve(y),!1;for(ut=!0,ot=1/0,E=0;E<rt;E++)a=y[E],x=(a.x-z)*(a.x-z)+(a.y-tt)*(a.y-tt),x<ot&&(ot=x,b.x=a.x,b.y=a.y);Ve(y)}else if(lt.type===bn.u)ut=Ce.Ff(Mt.x-ft,Mt.y-ft,Mt.x+Mt.width+ft,Mt.y+Mt.height+ft,z,tt,rt,ot,b);else if(lt.type===bn.F){y=Ue.allocAt(Mt.x,Mt.y,Mt.width,Mt.height).Bc(ft,ft);t:if(y.width===0)ut=Ce.Ve(y.x,y.y,y.x,y.y+y.height,z,tt,rt,ot,b);else if(y.height===0)ut=Ce.Ve(y.x,y.y,y.x+y.width,y.y,z,tt,rt,ot,b);else{if(a=y.width/2,lt=y.height/2,E=y.x+a,ut=y.y+lt,x=9999,z!==rt&&(x=(tt-ot)/(z-rt)),9999>Math.abs(x)){if(ot=tt-ut-x*(z-E),0>a*a*x*x+lt*lt-ot*ot){b.x=NaN,b.y=NaN,ut=!1;break t}ft=Math.sqrt(a*a*x*x+lt*lt-ot*ot),rt=(-(a*a*x*ot)+a*lt*ft)/(lt*lt+a*a*x*x)+E,a=(-(a*a*x*ot)-a*lt*ft)/(lt*lt+a*a*x*x)+E,lt=x*(rt-E)+ot+ut,ot=x*(a-E)+ot+ut,Math.abs((z-rt)*(z-rt))+Math.abs((tt-lt)*(tt-lt))<Math.abs((z-a)*(z-a))+Math.abs((tt-ot)*(tt-ot))?(b.x=rt,b.y=lt):(b.x=a,b.y=ot)}else{if(rt=lt*lt,ot=z-E,rt-=rt/(a*a)*ot*ot,0>rt){b.x=NaN,b.y=NaN,ut=!1;break t}ot=Math.sqrt(rt),rt=ut+ot,ot=ut-ot,Math.abs(rt-tt)<Math.abs(ot-tt)?(b.x=z,b.y=rt):(b.x=z,b.y=ot)}ut=!0}Ue.free(y)}else if(lt.type===bn.o){yt=Qt.alloc();var bt=rt-z,Dt=ot-tt,qt=bt*bt+Dt*Dt,Vt=z,oe=tt;if(0<qt&&Mt.contains(Vt,oe)&&(yt.x=Vt,yt.y=oe,this.ca(yt)))for(bt!==0&&.5>Math.abs(bt)?(Dt*=.5/bt,bt=.5):Dt!==0&&.5>Math.abs(Dt)&&(bt*=.5/Dt,Dt=.5),Vt-=bt,oe-=Dt;Mt.contains(Vt,oe);)Vt-=bt,oe-=Dt;for(b.x=rt,b.y=ot,Dt=0;Dt<lt.figures.count;Dt++){var ce=lt.figures.s[Dt],ge=ce.isFilled?Vt:z,Se=ce.isFilled?oe:tt,Re=ce.segments;Mt=ce.startX,bt=ce.startY;for(var qn=Mt,gi=bt,ui=0;ui<Re.count;ui++){var Qn=Re.s[ui],pn=Qn.type,ar=Qn.endX,Ji=Qn.endY,to=!1;switch(pn){case ws:qn=ar,gi=Ji;break;case vo:to=A0(Mt,bt,ar,Ji,ge,Se,rt,ot,yt);break;case Ps:to=Ce.Eo(Mt,bt,Qn.point1X,Qn.point1Y,Qn.point2X,Qn.point2Y,ar,Ji,ge,Se,rt,ot,.6,yt);break;case Ha:to=Ce.Eo(Mt,bt,Mt+2/3*(Qn.point1X-Mt),bt+2/3*(Qn.point1Y-bt),ar+2/3*(Qn.point1X-ar),Ji+2/3*(Qn.point1Y-Ji),ar,Ji,ge,Se,rt,ot,.6,yt);break;case ss:case sl:pn=Qn.type===ss?Fa(Qn,ce):ol(Qn,ce,Mt,bt);var So=pn.length;if(So===0){to=A0(Mt,bt,Qn.type===ss?Qn.centerX:Qn.endX,Qn.type===ss?Qn.centerY:Qn.endY,ge,Se,rt,ot,yt);break}for(Ji=null,ar=0;ar<So;ar++){if(Ji=pn[ar],ar===0&&A0(Mt,bt,Ji[0],Ji[1],ge,Se,rt,ot,yt)){var Js=u0(ge,Se,yt,qt,b);Js<qt&&(qt=Js,ut=!0)}Ce.Eo(Ji[0],Ji[1],Ji[2],Ji[3],Ji[4],Ji[5],Ji[6],Ji[7],ge,Se,rt,ot,.6,yt)&&(Js=u0(ge,Se,yt,qt,b),Js<qt&&(qt=Js,ut=!0))}ar=Ji[6],Ji=Ji[7];break;default:le("Unknown Segment type: "+pn)}Mt=ar,bt=Ji,to&&(to=u0(ge,Se,yt,qt,b),to<qt&&(qt=to,ut=!0)),Qn.isClosed&&(ar=qn,Ji=gi,A0(Mt,bt,ar,Ji,ge,Se,rt,ot,yt)&&(Qn=u0(ge,Se,yt,qt,b),Qn<qt&&(qt=Qn,ut=!0)))}}z=x-a,tt=E-y,rt=Math.sqrt(z*z+tt*tt),rt!==0&&(z/=rt,tt/=rt),b.x-=z*ft,b.y-=tt*ft,Qt.free(yt)}else le("Unknown Geometry type: "+lt.type);return ut?(this.transform.Ga(b),!0):!1};function u0(a,y,x,E,b){return a=x.x-a,y=x.y-y,y=a*a+y*y,y<E?(b.x=x.x,b.y=x.y,y):E}function A0(a,y,x,E,b,z,tt,rt,ot){if(Ce.$(a,x)&&Ce.$(y,E)||Ce.$(b,tt)&&Ce.$(z,rt))return!1;var lt=!1,ut=(b-tt)*(y-E)-(z-rt)*(a-x);return ut===0?!1:(ot.x=((b*rt-z*tt)*(a-x)-(b-tt)*(a*E-y*x))/ut,ot.y=((b*rt-z*tt)*(y-E)-(z-rt)*(a*E-y*x))/ut,(a>x?a-x:x-a)<(y>E?y-E:E-y)?(a=y<E?y:E,y=y<E?E:y,(ot.y>a||Ce.$(ot.y,a))&&(ot.y<y||Ce.$(ot.y,y))&&(lt=!0)):(y=a<x?a:x,a=a<x?x:a,(ot.x>y||Ce.$(ot.x,y))&&(ot.x<a||Ce.$(ot.x,a))&&(lt=!0)),lt)}Tt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.ua;x===null&&(this.measure(1/0,1/0),x=this.ua),x=x.bounds;var E=this.strokeWidth/2,b=!1,z=Qt.alloc();return z.h(x.x-E,x.y-E),a.ca(y.Ga(z))&&(z.h(x.x-E,x.bottom+E),a.ca(y.Ga(z))&&(z.h(x.right+E,x.bottom+E),a.ca(y.Ga(z))&&(z.h(x.right+E,x.y-E),a.ca(y.Ga(z))&&(b=!0)))),Qt.free(z),b},Tt.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=Yi.alloc();x.set(y),x.Vj();var E=a.left,b=a.right,z=a.top;a=a.bottom;var tt=Qt.alloc();if(tt.h(E,z),x.Ga(tt),this.gh(tt,!0)||(tt.h(b,z),x.Ga(tt),this.gh(tt,!0))||(tt.h(E,a),x.Ga(tt),this.gh(tt,!0))||(tt.h(b,a),x.Ga(tt),this.gh(tt,!0)))return Qt.free(tt),!0;var rt=Qt.alloc(),ot=Qt.alloc();return x.set(y),x.bv(this.transform),x.Vj(),rt.x=b,rt.y=z,rt.transform(x),tt.x=E,tt.y=z,tt.transform(x),y=!1,qd(this,tt,rt,ot)?y=!0:(tt.x=b,tt.y=a,tt.transform(x),qd(this,tt,rt,ot)?y=!0:(rt.x=E,rt.y=a,rt.transform(x),qd(this,tt,rt,ot)?y=!0:(tt.x=E,tt.y=z,tt.transform(x),qd(this,tt,rt,ot)&&(y=!0)))),Qt.free(tt),Yi.free(x),Qt.free(rt),Qt.free(ot),y};function qd(a,y,x,E){if(!a.rs(y,x,E))return!1;a=y.x,y=y.y;var b=x.x,z=x.y;return x=E.x,E=E.y,a===b?(y<z?(a=y,y=z):a=z,E>=a&&E<=y):(a<b?(E=a,a=b):E=b,x>=E&&x<=a)}Tt.tx=function(a,y,x){function E(qt,Vt){for(var oe=qt.length,ce=0;ce<oe;ce+=2)if(Vt.zd(qt[ce],qt[ce+1])>b)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var b=a.Bf(y),z=b;if(1.5<this.strokeWidth&&(b=this.strokeWidth/2+Math.sqrt(b),b*=b),y=this.ua,y===null&&(this.measure(1/0,1/0),y=this.ua,y===null))return!1;if(!x){var tt=y.bounds,rt=tt.x,ot=tt.y,lt=tt.x+tt.width;if(tt=tt.y+tt.height,vn(a.x,a.y,rt,ot)<=b&&vn(a.x,a.y,lt,ot)<=b&&vn(a.x,a.y,rt,tt)<=b&&vn(a.x,a.y,lt,tt)<=b)return!0}if(rt=y.startX,ot=y.startY,lt=y.endX,tt=y.endY,y.type===bn.j){if(x=(rt-lt)*(a.x-lt)+(ot-tt)*(a.y-tt),sn(a.x,a.y,rt,ot,lt,tt)<=(0<=(lt-rt)*(a.x-rt)+(tt-ot)*(a.y-ot)&&0<=x?b:z))return!0}else{if(y.type===bn.u)return y=!1,x&&(y=sn(a.x,a.y,rt,ot,rt,tt)<=b||sn(a.x,a.y,rt,ot,lt,ot)<=b||sn(a.x,a.y,lt,ot,lt,tt)<=b||sn(a.x,a.y,rt,tt,lt,tt)<=b),y;if(y.type===bn.F){y=a.x-(rt+lt)/2,z=a.y-(ot+tt)/2;var ut=Math.abs(lt-rt)/2,ft=Math.abs(tt-ot)/2;if(ut===0||ft===0)return sn(a.x,a.y,rt,ot,lt,tt)<=b;if(x){if(a=Ce.$y(ut,ft,y,z),a*a<=b)return!0}else return!(vn(y,z,-ut,0)>=b||vn(y,z,0,-ft)>=b||vn(y,z,0,ft)>=b||vn(y,z,ut,0)>=b)}else if(y.type===bn.o){if(lt=y.bounds,z=lt.x,rt=lt.y,ot=lt.x+lt.width,lt=lt.y+lt.height,a.x>ot&&a.x<z&&a.y>lt&&a.y<rt&&sn(a.x,a.y,z,rt,z,lt)>b&&sn(a.x,a.y,z,rt,ot,rt)>b&&sn(a.x,a.y,ot,lt,z,lt)>b&&sn(a.x,a.y,ot,lt,ot,rt)>b)return!1;if(z=Math.sqrt(b),x){if(this.fill===null?gl(y,a.x,a.y,z):rs(y,a,z,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(z=x.s[y],tt=z.startX,ut=z.startY,a.zd(tt,ut)>b)return!1;for(rt=z.segments.s,ot=rt.length,lt=0;lt<ot;lt++)switch(ft=rt[lt],ft.type){case ws:case vo:if(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b)return!1;break;case Ps:var yt=rn();if(Ce.Qe(tt,ut,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.8,yt),tt=E(yt,a),Ve(yt),tt||(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b))return!1;break;case Ha:if(yt=rn(),Ce.ep(tt,ut,ft.point1X,ft.point1Y,ft.endX,ft.endY,.8,yt),tt=E(yt,a),Ve(yt),tt||(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b))return!1;break;case ss:case sl:yt=ft.type===ss?Fa(ft,z):ol(ft,z,tt,ut);var Mt=yt.length;if(Mt===0){if(tt=ft.type===ss?ft.centerX:ft.endX,ut=ft.type===ss?ft.centerY:ft.endY,a.zd(tt,ut)>b)return!1;break}ft=null;for(var bt=rn(),Dt=0;Dt<Mt;Dt++)if(ft=yt[Dt],bt.length=0,Ce.Qe(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.8,bt),E(bt,a))return Ve(bt),!1;Ve(bt),ft!==null&&(tt=ft[6],ut=ft[7]);break;default:le("Unknown Segment type: "+ft.type)}}return!0}}}return!1},Tt.qc=function(){this.ua=null},Tt.kq=function(){return this.ig};function wy(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=pp,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=As):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new di(1-As.x,As.y)))}vr.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var E=eh[a.toArrow];else a.fromArrow!=="None"?E=eh[a.fromArrow]:(E=Ce.Ze[a.figure],typeof E=="string"&&(E=Ce.Ze[E]),E===void 0&&le("Unknown Shape.figure: "+a.figure),E=E(a,y,x),E.Sk=y,E.Rk=x);if(E===null){var b=Ce.Ze.Rectangle;typeof b=="function"&&(E=b(a,y,x))}return E};function xy(a){var y=eh[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=eh[x],y===void 0){var E=null,b;for(b in Ce.um)if(b.toLowerCase()===x){E=b;break}if(E!==null)return a=bn.parse(Ce.um[E],!1),eh[E]=a,x!==E&&(eh[x]=E),E}}return typeof y=="string"?y:y instanceof bn?a:null}Sn.Object.defineProperties(vr.prototype,{geometry:{get:function(){return this.ua!==null?this.ua:this.Rd},set:function(a){var y=this.ua,x=this.Rd;if(y!==a){a!==null?this.Rd=this.ua=a.freeze():this.Rd=this.ua=null;var E=this.part;E!==null&&(E.ag=NaN),this.v(),this.g("geometry",y||x,a),ia(this)&&(a=this.part,a!==null&&ko(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=Qt.allocAt(-y.x,-y.y),Qt.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&&Et(a,"Shape.fill"),a instanceof lo&&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&&Et(a,"Shape.stroke"),a instanceof lo&&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 Xn(a,"value >= 0",vr,"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"?Xn(a,'"butt", "round", or "square"',vr,"strokeCap"):(Jd(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"?Xn(a,'"miter", "bevel", or "round"',vr,"strokeJoin"):(Jd(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){Jd(this),this.Na.Jr=a,this.N();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeMiterLimit",y,a)}}},strokeDashArray:{get:function(){return this.Yg},set:function(a){var y=this.Yg;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];0<=z&&isFinite(z)||le("strokeDashArray:value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.Yg=a,this.N(),this.g("strokeDashArray",y,a)}}},strokeDashOffset:{get:function(){return this.Na!==null?this.Na.uj:0},set:function(a){var y=this.strokeDashOffset;y!==a&&0<=a&&(Jd(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=Ce.Ze[a];typeof x=="function"?x=a:(x=Ce.Ze[a.toLowerCase()])||le("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=xy(a);x===null?le("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Lh),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),wy(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=xy(a);x===null?le("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Lh),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),wy(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:es},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Jd(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:es},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Jd(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&&(Jd(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:or},set:function(a){var y=this.geometryStretch;y!==a&&(Jd(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 nh),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&Uu(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 nh),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 nh),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 nh),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),vr.prototype.intersectsRect=vr.prototype.Yc,vr.prototype.containedInRect=vr.prototype.fh,vr.prototype.getNearestIntersectionPoint=vr.prototype.rs,vr.prototype.getDocumentBounds=vr.prototype.mi,vr.prototype.getDocumentPoint=vr.prototype.ga;var eh=new Si,Km=new Si;vr.className="Shape",vr.getFigureGenerators=function(){var a=new be,y;for(y in Ce.Ze)y!==y.toLowerCase()&&a.add(y,Ce.Ze[y]);return a.freeze(),a},vr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),E=Ce.Ze;E[a]=y,E[x]=a},vr.getArrowheadGeometries=function(){var a=new be;for(E in Ce.um)if(eh[E]===void 0){var y=bn.parse(Ce.um[E],!1);eh[E]=y,y=E.toLowerCase(),y!==E&&(eh[y]=E)}for(var x in eh)if(x!==x.toLowerCase()){var E=eh[x];E instanceof bn&&a.add(x,E)}return a.freeze(),a},vr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=bn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||le("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var E=eh;E[a]=x,E[y]=a};function Gm(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=or,this.gg=this.fg=es}Gm.prototype.copy=function(){var a=new Gm;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 Fo(a,y){return Be.call(this),g0||(hl=Xo?new Xl(null).context:null,g0=!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}We(Fo,Be),Fo.prototype.cloneProtected=function(a){Be.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 EA(a){a.da===null?a.da=new Xm:a.da.nc&&(a.da=a.da.copy())}Tt=Fo.prototype,Tt.th=function(){Be.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function Sy(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}Tt.qb=function(a){a.classType===Fo?this.wrap=a:Be.prototype.qb.call(this,a)},Tt.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},Tt.v=function(){Be.prototype.v.call(this)},Tt.hh=function(a,y){if(this.xc!==null&&this.ec.length!==0&&this.Ae!==null){var x=this.naturalBounds,E=this.actualBounds,b=x.width,z=x.height,tt=up(this),rt=a.textAlign=this.textAlign,ot=y.tn;rt==="start"?rt=ot?"right":"left":rt==="end"&&(rt=ot?"left":"right"),ot=this.isUnderline;var lt=this.isStrikethrough;Zo(this,a,this.xc,!0,!1,x,E),(ot||lt)&&Zo(this,a,this.xc,!1,!1,x,E),E=0,x=!1;var ut=this.oe,ft=ut.dx-(tt*ut.m21+ut.dx);ut=ut.dy-(tt*ut.m22+ut.dy);var yt=y.scale;switch(8>(ft*ft+ut*ut)*yt*yt&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Ya&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,ft=this.spacingBelow,this.flip){case _r:a.translate(b,0),a.scale(-1,1);break;case Sr:a.translate(0,z),a.scale(1,-1);break;case ho:a.translate(b,z),a.scale(-1,-1)}if(a.yc(),ut=this.Gc,yt=(y+tt+ft)*ut,z>yt&&(E=this.verticalAlignment,E=E.y*z-E.y*yt+E.offsetY),ut===1&&this.ze!==null)ft=this.Cb,ft>b&&(ft=b),this.Oj(this.ze,a,0,E+y,b,tt,ft,x,rt,ot,lt);else if(this.Qc!==null&&this.Qb!==null)for(yt=0;yt<ut;yt++){var Mt=this.Qc[yt];Mt>b&&(Mt=b),E+=y,this.Oj(this.Qb[yt],a,0,E,b,tt,Mt,x,rt,ot,lt),E+=tt+ft}switch(this.flip){case _r:a.scale(-1,1),a.translate(-b,0);break;case Sr:a.scale(1,-1),a.translate(0,-z);break;case ho:a.scale(-1,-1),a.translate(-b,-z)}}},Tt.Oj=function(a,y,x,E,b,z,tt,rt,ot,lt,ut){var ft=0;if(rt)ot==="left"?ft=0:ot==="right"?ft=b-tt:ot==="center"&&(ft=(b-tt)/2),y.fillRect(x+ft,E+.25*z,tt,1);else{if(ot==="left"?ft=0:ot==="right"?ft=b:ot==="center"&&(ft=b/2),b=h0!==null?h0(this,z):.75*z,y.fillText(a,x+ft,E+b),a=z/20|0,a===0&&(a=1),ot==="right"?ft-=tt:ot==="center"&&(ft-=tt/2),lt){rt=c0!==null?c0(this,z):.8*z,ot=x+ft,lt=E+rt,b=x+ft+tt,rt=E+rt;var yt=a;y.beginPath(),y.lineWidth=yt,y.moveTo(ot,lt),y.lineTo(b,rt),y.stroke(),y.Se(),y instanceof Ya&&y.ad.classList.add("gojs-td")}ut&&(ut=E+z-z/2.2|0,a%2!==0&&(ut+=.5),E=x+ft,z=ut,x=x+ft+tt,tt=ut,ft=a,y.beginPath(),y.lineWidth=ft,y.moveTo(E,z),y.lineTo(x,tt),y.stroke(),y.Se(),y instanceof Ya&&y.ad.classList.add("gojs-td"))}},Tt.kk=function(a,y,x){if(!Be.prototype.kk.call(this,a,y,x))return!1;if(Zo(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++)Qf(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,Qf(a,y,!0);return!0},Tt.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:Be.prototype.nk.call(this,a)},Tt.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)}},Tt.Wl=function(a,y,x,E){var b=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;hl!==null&&My!==z&&(My=hl.font=z),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var tt;if(isNaN(this.desiredSize.width)){if(z=this.ec.replace(/\r\n/g,`
`).replace(/\r/g,`
`),z.length===0)z=8;else if(this.isMultiline){for(var rt=tt=0,ot=!1;!ot;){var lt=z.indexOf(`
`,rt);lt===-1&&(lt=z.length,ot=!0),rt=z.substr(rt,lt-rt),this.formatting===Ap&&(rt=rt.trim()),tt=Math.max(tt,_u(rt)),rt=lt+1}z=tt}else tt=z.indexOf(`
`,0),0<=tt&&(z=z.substr(0,tt)),z=_u(z);z=Math.min(z,a/this.scale)}else z=this.desiredSize.width;if(this.panel!==null&&(z=Math.min(z,this.panel.maxSize.width)),tt=Cy(this,z),isNaN(this.desiredSize.height)?tt=Math.min(tt,y/this.scale):tt=this.desiredSize.height,ot=tt,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===d0&&(y=this.Ae,y=this.overflow===d0?By(y):0,lt=this.spacingAbove+this.spacingBelow,lt=Math.max(0,up(this)+lt),ot=Math.min(this.maxLines-1,Math.max(Math.floor(ot/lt+.01)-1,0)),!(ot+1>=this.Qb.length))){for(this.l|=16777216,lt=this.Qb[ot],y=Math.max(1,a-y);_u(lt)>y&&1<lt.length;)lt=lt.substr(0,lt.length-1);lt+=hp,y=_u(lt),this.Qb[ot]=lt,this.Qb=this.Qb.slice(0,ot+1),this.Qc[ot]=y,this.Qc=this.Qc.slice(0,ot+1),this.Le=this.Qb.length,this.Cb=Math.max(this.Cb,y),this.Gc=this.Le,this.Gc===1&&(this.ze=this.Qb[0])}(this.wrap===Py||isNaN(this.desiredSize.width))&&(z=isNaN(a)?this.Cb:Math.min(a,this.Cb)),z=Math.max(x,z),tt=Math.max(E,tt),Fr(this.dc,z,tt),this.Ge(0,0,z,tt),this.svg!==null&&b!==this.Gc&&(this.Uc=!0)},Tt.eh=function(a,y,x,E){Ea(this,a,y,x,E)};function lp(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 zm(a,y,x,E){var b=a.formatting===Ap;b&&(y=y.trim());var z=0,tt=a.Ae,rt=a.spacingAbove+a.spacingBelow;rt=Math.max(0,up(a)+rt);var ot=a.overflow===d0?By(tt):0;if(a.Gc>=a.maxLines)E!==null&&E.h(0,rt);else if(tt=y,a.wrap===jm){a.Le=1;var lt=_u(y);if(ot===0||lt<=x)a.Cb=Math.max(a.Cb,lt),lp(a,y,a.Cb),E!==null&&E.h(lt,rt);else{for(z=xg(a,tt),tt=tt.substr(z.length),y=xg(a,tt),lt=_u(z+y);0<y.length&&lt<=x;)z+=y,tt=tt.substr(y.length),y=xg(a,tt),lt=z+y,b&&(lt=lt.trim()),lt=_u(lt);for(b&&(y=y.trim()),z+=y,x=Math.max(1,x-ot);_u(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=hp;var ut=_u(z);a.Cb=ut,lp(a,z,ut),E!==null&&E.h(ut,rt)}}else{for(ot=0,tt.length===0&&(ot=1,lp(a,tt,0));0<tt.length;){for(y=xg(a,tt),tt=tt.substr(y.length);_u(y)>x;){var ft=1;for(lt=_u(y.substr(0,ft)),ut=0;lt<=x;)ft++,ut=lt,lt=_u(y.substr(0,ft));if(ft===1){var yt=lt;z=Math.max(z,lt)}else yt=ut,z=Math.max(z,ut);if(ft--,1>ft&&(ft=1),lp(a,y.substr(0,ft),yt),ot++,y=y.substr(ft),a.Gc+ot>a.maxLines)break}for(ut=xg(a,tt),lt=_u(y+ut);0<ut.length&&lt<=x;)y+=ut,tt=tt.substr(ut.length),ut=xg(a,tt),lt=y+ut,b&&(lt=lt.trim()),lt=_u(lt);if(b&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ut.length===0?(ft=lt,z=Math.max(z,lt)):(ft=ut=_u(y),z=Math.max(z,ut)),lp(a,y,ft),ot++,a.Gc+ot>a.maxLines))break}a.Le=Math.min(a.maxLines,ot),a.Cb=Math.max(a.Cb,z),E!==null&&E.h(a.Cb,rt*a.Le)}}function xg(a,y){if(a.wrap===Fy)return y.substr(0,1);for(var x=y.length,E=0,b=Fw;E<x&&!b.test(y.charAt(E));)E++;for(a.formatting===Ey&&(x=Math.min(x,E+1));E<x&&b.test(y.charAt(E));)E++;return E>=y.length?y:y.substr(0,E)}function _u(a){return hl===null?8*a.length:hl.measureText(a).width}function up(a){if(a.df!==null)return a.df;var y=a.Ae;if(hl===null){var x=16;return a.df=x}return Wm[y]!==void 0&&5e3>Ly?x=Wm[y]:(x=1.3*hl.measureText("M").width,Wm[y]=x,Ly++),a.df=x}function By(a){if(hl===null)return 6;if(f0[a]!==void 0&&5e3>Ym)var y=f0[a];else y=hl.measureText(hp).width,f0[a]=y,Ym++;return y}function Cy(a,y){var x=a.ec.replace(/\r\n/g,`
`).replace(/\r/g,`
`),E=a.spacingAbove+a.spacingBelow;if(E=Math.max(0,up(a)+E),x.length===0)return a.Cb=0,a.Gc=1,E;if(!a.isMultiline){var b=x.indexOf(`
`,0);0<=b&&(x=x.substr(0,b))}b=0;for(var z=a.Gc=0,tt,rt=!1;!rt;){if(tt=x.indexOf(`
`,z),tt===-1&&(tt=x.length,rt=!0),z<=tt){if(z=x.substr(z,tt-z),a.wrap!==jm){a.Le=0;var ot=on.alloc();zm(a,z,y,ot),b+=ot.height,on.free(ot),a.Gc+=a.Le}else zm(a,z,y,null),b+=E,a.Gc++;a.Gc===a.maxLines&&(rt=!0)}z=tt+1}return a.Lq=b}Sn.Object.defineProperties(Fo.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"||(EA(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:xn},set:function(a){var y=this.flip;y!==a&&(EA(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:ds},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),EA(this),this.da.Yr=a,Ts(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=on.alloc();zm(this,this.ec,999999,a);var y=a.width;on.free(a),a=Cy(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Fr(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:Vm},set:function(a){var y=this.wrap;y!==a&&(EA(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Zm},set:function(a){var y=this.overflow;y!==a&&(EA(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&&Et(a,"TextBlock.stroke"),a instanceof lo&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return up(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&&(EA(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&&(EA(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 nh),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 nh),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 nh),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 nh),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 nh),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&&(EA(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&&(EA(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&&(EA(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&&(EA(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:Ap},set:function(a){var y=this.formatting;y!==a&&(EA(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&&Xn(a,"> 0",Fo,"maxLines"),EA(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 h0=null,c0=null,jm=new Oe(Fo,"None",0),Py=new Oe(Fo,"WrapFit",1),Vm=new Oe(Fo,"WrapDesiredSize",2),Fy=new Oe(Fo,"WrapBreakAll",3),Zm=new Oe(Fo,"OverflowClip",0),d0=new Oe(Fo,"OverflowEllipsis",1),Ap=new Oe(Fo,"FormatTrim",0),Ey=new Oe(Fo,"FormatNone",0),Fw=/[ \u200b\u00ad]/,Wm=new Si,Ly=0,f0=new Si,Ym=0,hp="...",My="",hl=null,g0=!1;Fo.className="TextBlock";function Xm(){this.nc=!1,this.Hd=null,this.Xf=xn,this.gq=Ap,this.Jq=1/0,this.$q=Zm,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=ds,this.$r=Vm}Xm.prototype.copy=function(){var a=new Xm;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},Fo.getEllipsis=function(){return hp},Fo.setEllipsis=function(a){hp=a,f0=new Si,Ym=0},Fo.getBaseline=function(){return h0},Fo.setBaseline=function(a){h0=a},Fo.getUnderline=function(){return c0},Fo.setUnderline=function(a){c0=a},Fo.isValidFont=function(a){if(g0||(hl=Xo?new Xl(null).context:null,g0=!0),hl===null)return!0;var y=hl.font;if(a===y||a==="10px sans-serif")return!0;hl.font="10px sans-serif",hl.font=a;var x=hl.font;if(x!=="10px sans-serif")return hl.font=y,!0;hl.font="19px serif";var E=hl.font;return hl.font=a,x=hl.font,hl.font=y,x!==E},Fo.FormatNone=Ey,Fo.FormatTrim=Ap,Fo.None=jm,Fo.OverflowClip=Zm,Fo.OverflowEllipsis=d0,Fo.WrapBreakAll=Fy,Fo.WrapDesiredSize=Vm,Fo.WrapFit=Py;function nh(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}nh.prototype.copy=function(){var a=new nh;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},nh.className="GradElementSettings";function cl(a,y){Be.call(this),this.Eg=null,this.qo="",this.Xg=ka,this.Nk=Fn,this.Zg=this.Hd=null,this.Mk=rr,this.Xf=xn,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 Sg;We(cl,Be),cl.prototype.cloneProtected=function(a){Be.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},cl.prototype.qb=function(a){a===xn||a===vi||a===Ir?this.imageStretch=a:Be.prototype.qb.call(this,a)},cl.prototype.toString=function(){return"Picture("+this.source+")#"+ii(this)};function Bg(a){a===void 0&&(a=""),a!==""?Sg[a]&&(delete Sg[a],p0--):(Sg=new Si,p0=0)}function ky(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value;b.N();var z=y.getAttribute("src")||"",tt=b.Og.I(z);if(tt!==null)for(var rt=tt.length,ot=0;ot<rt;ot++)z=tt[ot],b.Xn.add(z),z.Uc=!0,b.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),z.Zg!==null&&z.Zg(z,x))}y.Bg.clear()}a.desiredSize.w()||(Es(a,!1),a.v())},y.Yp=function(x){y.ln=x;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value,z=y.getAttribute("src")||"",tt=b.Og.I(z);if(tt!==null){b=tt.length,z=rn();for(var rt=0;rt<b;rt++)z.push(tt[rt]);if(y.hn)for(rt=0;rt<b;rt++)tt=z[rt],tt.Hd!==null&&tt.Hd(tt,x);Ve(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}cl.prototype.hA=function(){if(this.source!==""){Bg(this.source);var a=this.source;this.source="",this.source=a}},cl.prototype.redraw=function(){this.N(),this.Uc=!0},cl.prototype.hh=function(a,y){var x=this.Eg;if(x!==null){var E=x.getAttribute("src");if(!(x instanceof HTMLImageElement&&(E===null||E==="")||x.ln instanceof Event&&a instanceof pc)){var b=a instanceof Ya;E=this.naturalBounds;var z=0,tt=0,rt=this.qn,ot=rt?+x.width:x.naturalWidth;if(rt=rt?+x.height:x.naturalHeight,ot===void 0&&x.videoWidth&&(ot=x.videoWidth),rt===void 0&&x.videoHeight&&(rt=x.videoHeight),ot=ot||E.width,rt=rt||E.height,ot!==0&&rt!==0){var lt=ot,ut=rt;this.sourceRect.w()&&(z=this.Xg.x,tt=this.Xg.y,ot=this.Xg.width,rt=this.Xg.height);var ft=ot,yt=rt,Mt=this.Nk,bt=this.Mk;switch(Mt){case xn:if(this.sourceRect.w())break;ft>=E.width&&(z=z+bt.offsetX+(ft*bt.x-E.width*bt.x)),yt>=E.height&&(tt=tt+bt.offsetY+(yt*bt.y-E.height*bt.y)),ot=Math.min(E.width,ft),rt=Math.min(E.height,yt);break;case Fn:ft=E.width,yt=E.height;break;case vi:case Ir:Mt===vi?(Mt=Math.min(E.height/yt,E.width/ft),ft*=Mt,yt*=Mt):Mt===Ir&&(Mt=Math.max(E.height/yt,E.width/ft),ft*=Mt,yt*=Mt,ft>=E.width&&(z=(z+bt.offsetX+(ft*bt.x-E.width*bt.x)/ft)*ot),yt>=E.height&&(tt=(tt+bt.offsetY+(yt*bt.y-E.height*bt.y)/yt)*rt),ot*=1/(ft/E.width),rt*=1/(yt/E.height),ft=E.width,yt=E.height)}Mt=this.Df()*y.scale;var Dt=ft*Mt*yt*Mt,qt=ot*rt/Dt,Vt=x.__goCache;Mt=null;var oe=Ew;if(!b){if(x.sq&&Vt!==void 0&&4<Dt&&qt>oe*oe)for(Vt.gi===null&&(Ty(Vt,4,lt,ut,x),Ty(Vt,16,lt,ut,x)),b=Vt.gi,lt=b.length,ut=0;ut<lt&&b[ut].ratio*b[ut].ratio<qt;ut++)Mt=b[ut];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{b=new Xl(null).context;try{b.drawImage(this.Eg,0,0)}catch(ce){this.en=!1}try{b.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(ce){this.vl=!0}}if(this.vl)return}}switch(b=ft<E.width?bt.offsetX+(E.width*bt.x-ft*bt.x):0,bt=yt<E.height?bt.offsetY+(E.height*bt.y-yt*bt.y):0,this.flip){case _r:a.translate(Math.min(E.width,ft),0),a.scale(-1,1);break;case Sr:a.translate(0,Math.min(E.height,yt)),a.scale(1,-1);break;case ho:a.translate(Math.min(E.width,ft),Math.min(E.height,yt)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Vt!==void 0&&Mt!==null&&Mt.ratio!==1){a.save(),y=Mt.ratio;try{a.drawImage(Mt.source,z/y,tt/y,Math.min(Mt.source.width,ot/y),Math.min(Mt.source.height,rt/y),b,bt,Math.min(E.width,ft),Math.min(E.height,yt)),a instanceof Ya&&(this.bt=[z/y,tt/y,Math.min(Mt.source.width,ot/y),Math.min(Mt.source.height,rt/y),b,bt,Math.min(E.width,ft),Math.min(E.height,yt)])}catch(ce){this.en=!1}a.restore()}else try{a.drawImage(x,z,tt,ot,rt,b,bt,Math.min(E.width,ft),Math.min(E.height,yt)),a instanceof Ya&&(this.bt=[z,tt,ot,rt,b,bt,Math.min(E.width,ft),Math.min(E.height,yt)])}catch(ce){this.en=!1}switch(this.flip){case _r:a.scale(-1,1),a.translate(-Math.min(E.width,ft),0);break;case Sr:a.scale(1,-1),a.translate(0,-Math.min(E.height,yt));break;case ho:a.scale(-1,-1),a.translate(-Math.min(E.width,ft),-Math.min(E.height,yt))}}}}},cl.prototype.Wl=function(a,y,x,E){var b=this.desiredSize,z=Ka(this,!0),tt=this.Eg,rt=this.qn,ot=0,lt=0;(rt||!this.al&&tt&&tt.complete)&&(this.al=!0),tt===null?(isFinite(b.width)||(a=0),isFinite(b.height)||(y=0)):(ot=rt?+tt.width:tt.naturalWidth,lt=rt?+tt.height:tt.naturalHeight),isFinite(b.width)||z===Fn||z===Ci?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:tt!==null&&(a=ot)),x=0):tt!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:ot),isFinite(b.height)||z===Fn||z===_i?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:tt!==null&&(y=lt)),E=0):tt!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:lt),isFinite(b.width)&&(a=b.width),isFinite(b.height)&&(y=b.height),b=this.maxSize,z=this.minSize,x=Math.max(x||0,z.width),E=Math.max(E||0,z.height),a=Math.min(b.width,a),y=Math.min(b.height,y),a=Math.max(x,a),y=Math.max(E,y),tt===null||tt.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),Fr(this.dc,a,y),this.Ge(0,0,a,y)},cl.prototype.eh=function(a,y,x,E){Ea(this,a,y,x,E)},Sn.Object.defineProperties(cl.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||le("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var E=this.diagram;E!==null&&Hd(E,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new Fe),E!==null&&x&&Ch(E,this),a!==null&&(this.qn||a.complete===!0?(a.hn&&(a.ln instanceof Event&&this.Hd!==null?this.Hd(this,a.ln):a.sq===!0&&!a.ln&&this.Zg!==null&&a.eu&&this.Zg(this,a.eu)),a.sq=!0,this.desiredSize.w()||(Es(this,!1),this.v())):x&&ky(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=Sg;if(Xo){var E=null;if(x[a]!==void 0)E=x[a];else if(a!==""){30<p0&&(Bg(),x=Sg),E=Vn("img"),E.hn=!0,ky(this,E);var b=this.rl;b!==null&&(E.crossOrigin=b(this)),E.src=a,x[a]=E,p0++}this.element=E,E!==null&&E.__goCache===void 0&&(E.__goCache=new by),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}}}),cl.prototype.redraw=cl.prototype.redraw,cl.prototype.reloadSource=cl.prototype.hA;var p0=0,Ew=4;cl.className="Picture",Sg=new Si,cl.clearCache=Bg;function by(){this.gi=null}function Ty(a,y,x,E,b){a.gi===null&&(a.gi=[]);var z=new Xl(null),tt=z.context,rt=1/y;z.width=x/y,z.height=E/y,z.width!==0&&z.height!==0&&(y=new Ny(z.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],b=x.source,x=x.ratio),tt.setTransform(rt*x,0,0,rt*x,0,0),tt.yc(),tt.drawImage(b,0,0),a.gi.push(y))}by.className="PictureCacheArray";function Ny(a,y){this.source=a,this.ratio=y}Ny.className="PictureCacheInstance";function Cg(){this.os=new bn,this.mc=null}Cg.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new bn,this.mc=null};function Pg(a,y,x,E,b,z){a.mc=new Cs,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=E,a.mc.isEvenOdd=z||!1,a.os.figures.add(a.mc),b!==void 0&&(a.mc.isShadowed=b)}function Lw(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}Cg.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var E=new Vr(ws);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)},Cg.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var E=new Vr(vo);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)};function yc(a,y,x,E,b,z,tt){var rt;rt===void 0&&(rt=!1);var ot=new Vr(Ps);ot.point1X=y,ot.point1Y=x,ot.point2X=E,ot.point2Y=b,ot.endX=z,ot.endY=tt,rt&&ot.close(),a.mc.segments.add(ot)}function m0(a,y,x,E,b){var z;z===void 0&&(z=!1);var tt=new Vr(Ha);tt.point1X=y,tt.point1Y=x,tt.endX=E,tt.endY=b,z&&tt.close(),a.mc.segments.add(tt)}Cg.prototype.arcTo=function(a,y,x,E,b,z,tt){z===void 0&&(z=0),tt===void 0&&(tt=!1);var rt=new Vr(ss);rt.startAngle=a,rt.sweepAngle=y,rt.centerX=x,rt.centerY=E,rt.radiusX=b,rt.radiusY=z!==0?z:b,tt&&rt.close(),this.mc.segments.add(rt)};function Mw(a,y,x,E,b,z,tt,rt){var ot;ot===void 0&&(ot=!1),y=new Vr(sl,tt,rt,y,x,E,b,z),ot&&y.close(),a.mc.segments.add(y)}function Dy(a){var y=v0;return y!==null?(v0=null,y.reset(a),y):(y=new Cg,y.reset(a),y)}var v0=null;Cg.className="StreamGeometryContext";function Qa(a,y){var x=a.toLowerCase(),E=Ce.Ze;E[a]=y,E[x]=a}Qa("Rectangle",function(a,y,x){a="r"+y+","+x;var E=Ce.Mf[a];return E!==void 0||(E=new bn(bn.u),E.endX=y,E.endY=x,Ce.Nf<Ce.vm&&(Ce.Mf[a]=E,Ce.Nf++)),E}),Qa("Square",function(a,y,x){a="s"+y+","+x;var E=Ce.Mf[a];return E!==void 0||(E=new bn(bn.u),E.endX=y,E.endY=x,E.defaultStretch=vi,Ce.Nf<Ce.vm&&(Ce.Mf[a]=E,Ce.Nf++)),E}),Qa("RoundedRectangle",function(a,y,x){a=a?a.parameter1:NaN,(isNaN(a)||0>a)&&(a=5),a=Math.min(a,y/3),a=Math.min(a,x/3);var E="rr"+y+","+x+","+a,b=Ce.Mf[E];if(b!==void 0)return b;var z=a*Ce.wg;return b=new bn().add(new Cs(a,0,!0).add(new Vr(vo,y-a,0)).add(new Vr(Ps,y,a,y-z,0,y,z)).add(new Vr(vo,y,x-a)).add(new Vr(Ps,y-a,x,y,x-z,y-z,x)).add(new Vr(vo,a,x)).add(new Vr(Ps,0,x-a,z,x,0,x-z)).add(new Vr(vo,0,a)).add(new Vr(Ps,a,0,0,z,z,0).close())),1<z&&(b.spot1=new di(0,0,z,z),b.spot2=new di(1,1,-z,-z)),Ce.Nf<Ce.vm&&(Ce.Mf[E]=b,Ce.Nf++),b}),Qa("Border","RoundedRectangle"),Qa("Ellipse",function(a,y,x){a="e"+y+","+x;var E=Ce.Mf[a];return E!==void 0||(E=new bn(bn.F),E.endX=y,E.endY=x,E.spot1=cu,E.spot2=va,Ce.Nf<Ce.vm&&(Ce.Mf[a]=E,Ce.Nf++)),E}),Qa("Circle",function(a,y,x){a="c"+y+","+x;var E=Ce.Mf[a];return E!==void 0||(E=new bn(bn.F),E.endX=y,E.endY=x,E.spot1=cu,E.spot2=va,E.defaultStretch=vi,Ce.Nf<Ce.vm&&(Ce.Mf[a]=E,Ce.Nf++)),E}),Qa("TriangleRight",function(a,y,x){return new bn().add(new Cs(0,0).add(new Vr(vo,y,.5*x)).add(new Vr(vo,0,x).close())).pm(0,.25,.5,.75)}),Qa("TriangleDown",function(a,y,x){return new bn().add(new Cs(0,0).add(new Vr(vo,y,0)).add(new Vr(vo,.5*y,x).close())).pm(.25,0,.75,.5)}),Qa("TriangleLeft",function(a,y,x){return new bn().add(new Cs(y,x).add(new Vr(vo,0,.5*x)).add(new Vr(vo,y,0).close())).pm(.5,.25,1,.75)}),Qa("TriangleUp",function(a,y,x){return new bn().add(new Cs(y,x).add(new Vr(vo,0,x)).add(new Vr(vo,.5*y,0).close())).pm(.25,.5,.75,1)}),Qa("Triangle","TriangleUp"),Qa("Diamond",function(a,y,x){return new bn().add(new Cs(.5*y,0).add(new Vr(vo,0,.5*x)).add(new Vr(vo,.5*y,x)).add(new Vr(vo,y,.5*x).close())).pm(.25,.25,.75,.75)}),Qa("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}),Qa("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}),Qa("None","Rectangle"),Qa("BarH","Rectangle"),Qa("BarV","Rectangle"),Qa("MinusLine","LineH"),Qa("PlusLine",function(a,y,x){return new bn().add(new Cs(0,x/2,!1).add(new Vr(vo,y,x/2)).add(new Vr(ws,y/2,0)).add(new Vr(vo,y/2,x)))}),Qa("XLine",function(a,y,x){return new bn().add(new Cs(0,x,!1).add(new Vr(vo,y,0)).add(new Vr(ws,0,0)).add(new Vr(vo,y,x)))}),Qa("LineRight",function(a,y,x){return new bn().add(new Cs(.25*y,0,!1).add(new Vr(vo,.75*y,.5*x)).add(new Vr(vo,.25*y,x)))}),Qa("LineDown",function(a,y,x){return new bn().add(new Cs(0,.25*x,!1).add(new Vr(vo,.5*y,.75*x)).add(new Vr(vo,y,.25*x)))}),Qa("LineLeft",function(a,y,x){return new bn().add(new Cs(.75*y,0,!1).add(new Vr(vo,.25*y,.5*x)).add(new Vr(vo,.75*y,x)))}),Qa("LineUp",function(a,y,x){return new bn().add(new Cs(0,.75*x,!1).add(new Vr(vo,.5*y,.25*x)).add(new Vr(vo,y,.75*x)))}),Ce.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 Jm(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=Zr,this.ir=null,this.jr="",this.lr=es,this.Gq="",this.Hq=br,this.Pq=_n,this.Kq=li,this.Up=null,this.Cq=127,this.zr=Wn,this.yr="gray",this.Vg=4}Jm.prototype.copy=function(){var a=new Jm;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 Ti(a,y){a===void 0||a instanceof uo||typeof a=="string"?Bn.call(this,a):(Bn.call(this),a&&(y=a)),this.G=2408959,this.Tf="",this.P=null,this.Jg="",this.Qf=this.Ug=null,this.ec="",this.Ah=this.Ig=null,this.ke=new Qt(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new Ue,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}We(Ti,Bn),Ti.prototype.cloneProtected=function(a){Bn.prototype.cloneProtected.call(this,a),a.G=this.G&-4097|49152,a.Tf=this.Tf,this.P!==null&&(a.P=this.P.nc?this.P:this.P.copy()),a.Jg=this.Jg,a.Qf=null,a.ec=this.ec,a.ke.assign(this.ke),a.Ao=this.Ao},Tt=Ti.prototype,Tt.Af=function(a){Bn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Tt.toString=function(){var a=fn(this.constructor)+"#"+ii(this);return this.data!==null&&(a+="("+mi(this.data)+")"),a};function dl(a){a.P===null?a.P=new Jm:a.P.nc&&(a.P=a.P.copy())}Tt.th=function(){Bn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},Tt.gk=function(a,y,x,E,b,z,tt){var rt=this.diagram;rt!==null&&(a===as&&y==="elements"?b instanceof Bn?Hu(b,function(ot){Cv(rt.partManager,ot),vA(rt,ot)}):Ch(rt,b):a===gs&&y==="elements"&&(b instanceof Bn?Hu(b,function(ot){Pv(rt.partManager,ot,rt)}):Hd(rt,b)),rt.cb(a,y,x,E,b,z,tt))},Tt.La=function(a){if(Bn.prototype.La.call(this,a),this.data!==null){for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];b instanceof Bn&&Hu(b,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Ti.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Ti.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Ti.prototype.bh=function(a,y){if(y!==null){var x=null,E=this.Qf;if(E!==null&&(x=E.I(a)),x!==y){if(x!==null){var b=x.diagram;b!==null&&b.remove(x)}E===null&&(this.Qf=E=new be),y.Tf!==a&&(y.category=a),E.add(a,y),a=this.diagram,a!==null&&(a.add(y),a=y.adornedObject,a!==null&&(a=a.ih(),a!==null&&(y.data=a.data)))}}},Ti.prototype.Jf=function(a){var y=this.Qf;if(y!==null){var x=y.I(a);if(x!==null){var E=x.diagram;E!==null&&E.remove(x)}y.remove(a),y.count===0&&(this.Qf=null)}},Ti.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=rn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Ve(y)}},Ti.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 lr?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof Jr))break t;yu(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Bn.Link),x.adornedObject=y)}if(x!==null){x.type===Bn.Link&&x.v(),this.bh("Selection",x);break t}}this.Jf("Selection")}for(kw(this,a),y=this.adornments;y.next();)y.value.La()}},Ti.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function qm(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function kw(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function y0(a){if(rd(a)===!1){tv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function Iy(a){if(a.G|=2097152,rd(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||Oy(a,y,x),x=a.Ib;var E=Ue.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(E,x),Ue.free(E),tv(a,!1)}}Ti.prototype.Ge=function(a,y,x,E){var b=this.uc;b.h(a,y,x,E),this.Lb===null&&(this.Lb=new Yi);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),this.Lb=z,z.ws()||z.pp(b)},Ti.prototype.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=rr;this.locationSpot.sb()&&(z=this.locationSpot);var tt=Qt.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,tt.yi(x.x,x.y,x.width,x.height,z),y.Lb!==null&&y.Lb.Ga(tt),tt.offset(-y.measuredBounds.x,-y.measuredBounds.y),z=y.panel;z!==null&&z!==this;)z.Lb!==null&&z.Lb.Ga(tt),tt.offset(-z.measuredBounds.x,-z.measuredBounds.y),z=z.panel;else tt.yi(y,x,E,b,z);a.rotate(this.Kb,tt.x,tt.y),Qt.free(tt)}},Ti.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Ti.prototype.moveTo=function(a,y,x){a=Qt.allocAt(a,y),this.move(a,x),Qt.free(a)},Ti.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())},Ti.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())},Ti.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new be),y.I(a)!==null)return y.I(a);var x=Bn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function wc(a,y,x,E){E===void 0&&(E=new Qt),x=x.Mc()?rr:x;var b=y.naturalBounds;if(E.h(b.width*x.x+x.offsetX,b.height*x.y+x.offsetY),y===null||y===a)return E;for(y.transform.Ga(E),y=y.panel;y!==null&&y!==a;)y.transform.Ga(E),y=y.panel;return a.Lb!==null&&a.Lb.Ga(E),E.offset(-a.uc.x,-a.uc.y),E}Ti.prototype.mi=function(a){return a===void 0&&(a=new Ue),a.assign(this.actualBounds)},Ti.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function Uy(a){var y=Qt.alloc(),x=a.locationObject,E=x.naturalBounds,b=x instanceof vr?x.strokeWidth:0;if(y.yi(0,0,E.width+b,E.height+b,a.locationSpot),x!==a)for(y.offset(-b/2,-b/2),x.transform.Ga(y),x=x.panel;x!==null&&x!==a;)x.transform.Ga(y),x=x.panel;return a.Lb!==null&&a.Lb.Ga(y),y.offset(-a.uc.x,-a.uc.y),y}function $d(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=dy(a));var E=a.ag,b=2*E;if(!a.isShadowed)return x.h(y.x-1-E,y.y-1-E,y.width+2+b,y.height+2+b),x;E=y.x,b=y.y;var z=y.width;y=y.height;var tt=a.shadowBlur;return a=a.shadowOffset,z+=tt,y+=tt,E-=tt/2,b-=tt/2,0<a.x?z+=a.x:(E+=a.x,z-=a.x),0<a.y?y+=a.y:(b+=a.y,y-=a.y),x.h(E-1,b-1,z+2,y+2),x}Ti.prototype.arrange=function(){if(La(this)===!1)Iy(this);else{nA(this,!1);var a=this.Ib,y=Ue.alloc();y.assign(a);var x=od(this);this.eh(0,0,this.uc.width,this.uc.height);var E=this.position;Oy(this,E,this.location),a.ka(),a.x=E.x,a.y=E.y,a.freeze(),this.Xl(y,a),y.D(a)?this.Fd(x):!this.Zc()||Ce.B(y.width,a.width)&&Ce.B(y.height,a.height)||0<=this.vw&&this.C(16),Ue.free(y),tv(this,!1)}},Tt=Ti.prototype,Tt.Xl=function(a,y){var x=this.diagram;if(x!==null){var E=!1;if(x.Zi===!1&&a.w()){var b=Ue.alloc();b.assign(x.documentBounds),b.Fv(x.padding),a.x>b.x&&a.y>b.y&&a.right<b.right&&a.bottom<b.bottom&&y.x>b.x&&y.y>b.y&&y.right<b.right&&y.bottom<b.bottom&&(E=!0),Ue.free(b)}!(this.G&65536)&&a.D(y)||_y(this,E,x),x.N(),!a.w()&&!y.w()||$i(a,y)||(this instanceof ri&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},Tt.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var E=this.diagram;return E!==null&&Qy(this,E,a,y,x),this.pa=a,this.G&=-2097153,!this.ke.w()||E!==null&&!E.animationManager.isTicking&&E.undoManager.isUndoingRedoing||(E=this.ke,this.ke=new Qt(E.x+(a.x-y),E.y+(a.y-x)),this.g("location",E,this.ke.copy())),rd(this)===!1&&La(this)===!1&&(y0(this),Iy(this)),!0};function Qy(a,y,x,E,b){y===null||a instanceof Jr||(y=y.animationManager,y.zb&&kd(y,a,new Qt(E,b),x))}Tt.mm=function(a,y,x){var E=this.ke,b=this.pa;if(x){if(E.x===a&&E.y===y)return;rd(this)||La(this)?b.h(NaN,NaN):b.h(b.x+a-E.x,b.y+y-E.y),E.h(a,y)}else{if(b.x===a&&b.y===y)return;E.h(E.x+a-b.x,E.y+y-b.y),b.h(a,y)}y0(this)},Tt.Av=function(){this.G&=-2097153,y0(this)};function Oy(a,y,x){var E=Uy(a),b=a.diagram,z=x.w(),tt=y.w();z&&tt?a.G&2097152?Hy(a,y,x,b,E):Ry(a,y,x,b,E):z?Hy(a,y,x,b,E):tt&&Ry(a,y,x,b,E),a.G|=2097152,Qt.free(E),a.Uk()}function Hy(a,y,x,E,b){var z=y.x,tt=y.y;y.h(x.x-b.x,x.y-b.y),E!==null&&(x=E.animationManager,(E=x.defaultAnimation.isAnimating)||!x.zb||a instanceof Jr||kd(x,a,new Qt(z,tt),y),E||y.x===z&&y.y===tt||a.g("position",new Qt(z,tt),y.copy()))}function Ry(a,y,x,E,b){var z=x.copy();x.h(y.x+b.x,y.y+b.y),x.D(z)||E===null||a.g("location",z,x.copy())}function _y(a,y,x){ev(a,!1),a instanceof ri&&Qu(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var E=x.viewportBounds;E.w()?od(a)?(eo(y,E)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(E)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}Tt.si=function(){return!0},Tt.Zc=function(){return!0},Tt.ph=function(){return!1},Tt.Dd=function(){return!0};function $m(a,y,x,E){y.constructor===a.constructor||zy||(zy=!0,On('Should not change the class of the Part when changing category from "'+x+'" to "'+E+'"'),On(" Old class: "+fn(a.constructor)+", new class: "+fn(y.constructor)+", part: "+a.toString())),a.Ej();var b=a.data;x=a.layerName;var z=a.isSelected,tt=a.isHighlighted,rt=!0,ot=!0,lt=!1;a instanceof ri&&(rt=a.isTreeLeaf,ot=a.isTreeExpanded,lt=a.wasTreeExpanded),y.Af(a),y.cloneProtected(a),a.Tf=E,a.svg!==null&&(a.svg.remove(),a.svg=null,a.Uc=!0),a.v(),a.N(),y=a.diagram,E=!0,y!==null&&(E=y.skipsUndoManager,y.skipsUndoManager=!0),a.ub=b,a.G=z?a.G|4096:a.G&-4097,a.G=tt?a.G|524288:a.G&-524289,a instanceof ri&&(a.U=rt?a.U|4:a.U&-5,a.U=ot?a.U|1:a.U&-2,a.U=lt?a.U|2:a.U&-3),b!==null&&a.La(),b=a.layerName,b!==x&&(a.Jg=x,a.layerName=b),y!==null&&(y.skipsUndoManager=E),a.Zc()&&a.C(64)}Ti.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},Ti.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},Ti.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},Ti.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},Ti.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},Ti.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},Ti.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},Ti.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},Ti.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 rd(a){return(a.G&32768)!==0}function tv(a,y){a.G=y?a.G|32768:a.G&-32769}function ev(a,y){a.G=y?a.G|65536:a.G&-65537}function od(a){return(a.G&131072)!==0}Tt=Ti.prototype,Tt.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function w0(a,y){a.G=y?a.G|1048576:a.G&-1048577}Tt.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},Tt.N=function(){var a=this.diagram;a!==null&&!La(this)&&!rd(this)&&this.isVisible()&&this.Ib.w()&&a.N($d(this,this.Ib))},Tt.v=function(){Bn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof ri&&this.labeledLink!==null&&Ts(this.labeledLink),a.$b(!0))},Tt.Vo=function(a){a||(a=this.Ah,a!==null&&av(a,this))},Tt.Wo=function(a){a||(a=this.Ah,a!==null&&lv(a,this))},Tt.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},Tt.oz=function(){return nv(this,this)};function nv(a,y){var x=y.containingGroup;return x!==null?1+nv(a,x):y instanceof ri&&(y=y.labeledLink,y!==null)?nv(a,y):0}Tt.sz=function(){return Ky(this,this)};function Ky(a,y){var x=y.containingGroup;return x!==null||y instanceof ri&&(x=y.labeledLink,x!==null)?Ky(a,x):y}Tt.Td=function(a){return a instanceof lr?iv(this,this,a):!1};function iv(a,y,x){if(y===x||x===null)return!1;var E=y.containingGroup;return E===null||E!==x&&!iv(a,E,x)?y instanceof ri&&(y=y.labeledLink,y!==null)?iv(a,y,x):!1:!0}Tt.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof lr&&w0(y,!0),y instanceof ri){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 ri&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof lr&&w0(y,!1),y instanceof ri&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Ti.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof ri&&this.isLinkLabel)},Ti.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 ri&&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 Gy(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function sd(a,y,x,E,b,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof Jr)){if(a.add(y),y instanceof ri){if(x&&y instanceof lr)for(var tt=y.memberParts;tt.next();)sd(a,tt.value,x,E,b,z);if(b!==!1)for(tt=y.linksConnected;tt.next();){var rt=tt.value;if(!a.contains(rt)){var ot=rt.fromNode,lt=rt.toNode;ot=ot===null||a.contains(ot),lt=lt===null||a.contains(lt),(b?ot&&lt:ot||lt)&&sd(a,rt,x,E,b,z)}}if(1<E)for(y=y.Ou();y.next();)sd(a,y.value,x,E-1,b,z)}else if(y instanceof Rn)for(y=y.labelNodes;y.next();)sd(a,y.value,x,E,b,z)}}Sn.Object.defineProperties(Ti.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?Ri:this.Qf.iteratorValues}},layer:{get:function(){return this.Ig}},diagram:{get:function(){var a=this.Ig;return a==null?null:a.diagram}},layerName:{get:function(){return this.Jg},set:function(a){var y=this.Jg;if(y!==a){var x=this.diagram;if((x===null||x.Qj(a)!==null&&!x.partManager.addsToTemporaryLayer)&&(this.Jg=a,x!==null&&x.Ya(),this.g("layerName",y,a),y=this.layer,y!==null&&y.name!==a&&(x=y.diagram,x!==null&&(a=x.Qj(a),a!==null&&a!==y)))){var E=y.pc(-1,this,!0);if(0<=E&&x.cb(gs,"parts",y,this,null,E,!0),E=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=E&&x.cb(as,"parts",a,null,this,!0,E),E=this.layerChanged,E!==null){var b=x.aa;x.aa=!0,E(this,y,a),x.aa=b}}}}},layerChanged:{get:function(){return this.P!==null?this.P.zq:null},set:function(a){var y=this.layerChanged;y!==a&&(dl(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&&Td(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 Jr?this.type!==Bn.Link&&this.placeholder!==null?this.nf=this.placeholder:this.nf=this:this.nf=this}return this.nf.visible?this.nf:this}},minLocation:{get:function(){return this.P!==null?this.P.Pq:_n},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),dl(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:li},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),dl(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&&(dl(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:br},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),dl(this),this.P.Hq=a,this.v(),this.g("locationSpot",y,a))}},location:{get:function(){return this.ke},set:function(a){var y=a.x,x=a.y,E=this.ke;if(!(E.x===y||isNaN(E.x)&&isNaN(y))||!(E.y===x||isNaN(E.y)&&isNaN(x))){if(a=a.copy(),y=a,this.ph())y=!1;else{if(this.ke=y,this.G|=2097152,La(this)===!1&&(y0(this),x=this.pa,x.w())){var b=this.diagram;if(b===null||b.animationManager.isTicking||!b.undoManager.isUndoingRedoing){var z=x.copy();x.h(x.x+(y.x-E.x),x.y+(y.y-E.y)),Qy(this,b,x,z.x,z.y),this.g("position",z,x.copy())}}y=!0}y&&this.g("location",E,a.copy())}}},category:{get:function(){return this.Tf},set:function(a){var y=this.Tf;if(y!==a){this.svg!==null&&(this.svg.remove(),this.Uc=!0);var x=this.diagram,E=this.data,b=null;if(x!==null&&E!==null&&!(this instanceof Jr)){var z=x.model.undoManager;z.isEnabled&&!z.isUndoingRedoing&&(b=this.clone(),b.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||E===null||this instanceof Jr?this instanceof Jr&&(b=this.adornedPart,b!==null&&(a=b.Qf,a!==null&&a.remove(y),b.bh(this.category,this))):(z=x.model,z.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(E,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(yu(x),x=x.copy(),x!==null&&$m(this,x,y,a))):(z!==null&&z.jm(E,a),x=g1(x.partManager,E,a),x!==null&&(yu(x),x=x.copy(),x===null||x instanceof Rn||(E=this.location.copy(),$m(this,x,y,a),this.location.w()||(this.location=E)))),b!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",b,y))))}}},self:{get:function(){return this},set:function(a){$m(this,a,this.category,a.category)}},copyable:{get:function(){return(this.G&1)!==0},set:function(a){var y=(this.G&1)!==0;y!==a&&(this.G^=1,this.g("copyable",y,a))}},deletable:{get:function(){return(this.G&2)!==0},set:function(a){var y=(this.G&2)!==0;y!==a&&(this.G^=2,this.g("deletable",y,a))}},textEditable:{get:function(){return(this.G&4)!==0},set:function(a){var y=(this.G&4)!==0;y!==a&&(this.G^=4,this.g("textEditable",y,a),this.Wb())}},groupable:{get:function(){return(this.G&8)!==0},set:function(a){var y=(this.G&8)!==0;y!==a&&(this.G^=8,this.g("groupable",y,a))}},movable:{get:function(){return(this.G&16)!==0},set:function(a){var y=(this.G&16)!==0;y!==a&&(this.G^=16,this.g("movable",y,a))}},selectionAdorned:{get:function(){return(this.G&32)!==0},set:function(a){var y=(this.G&32)!==0;y!==a&&(this.G^=32,this.g("selectionAdorned",y,a),this.Wb())}},isInDocumentBounds:{get:function(){return(this.G&64)!==0},set:function(a){var y=(this.G&64)!==0;if(y!==a){this.G^=64;var x=this.diagram;x!==null&&x.Ya(),this.g("isInDocumentBounds",y,a)}}},isLayoutPositioned:{get:function(){return(this.G&128)!==0},set:function(a){var y=(this.G&128)!==0;y!==a&&(this.G^=128,this.g("isLayoutPositioned",y,a),this.C(a?4:8))}},selectable:{get:function(){return(this.G&256)!==0},set:function(a){var y=(this.G&256)!==0;y!==a&&(this.G^=256,this.g("selectable",y,a),this.Wb())}},reshapable:{get:function(){return(this.G&512)!==0},set:function(a){var y=(this.G&512)!==0;y!==a&&(this.G^=512,this.g("reshapable",y,a),this.Wb())}},resizable:{get:function(){return(this.G&1024)!==0},set:function(a){var y=(this.G&1024)!==0;y!==a&&(this.G^=1024,this.g("resizable",y,a),this.Wb())}},rotatable:{get:function(){return(this.G&2048)!==0},set:function(a){var y=(this.G&2048)!==0;y!==a&&(this.G^=2048,this.g("rotatable",y,a),this.Wb())}},isSelected:{get:function(){return(this.G&4096)!==0},set:function(a){var y=(this.G&4096)!==0;if(y!==a){var x=this.diagram;if(!a||this.canSelect()&&!(x!==null&&x.selection.count>=x.maxSelectionCount)){this.G^=4096;var E=!1;if(x!==null){E=x.skipsUndoManager,x.skipsUndoManager=!0;var b=x.selection;b.ka(),a?b.add(this):b.remove(this),b.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=E)}}}},isHighlighted:{get:function(){return(this.G&524288)!==0},set:function(a){var y=(this.G&524288)!==0;if(y!==a){this.G^=524288;var x=this.diagram;x!==null&&(x=x.highlighteds,x.ka(),a?x.add(this):x.remove(this),x.freeze()),this.g("isHighlighted",y,a),this.N(),a=this.highlightedChanged,a!==null&&a(this)}}},isShadowed:{get:function(){return(this.G&8192)!==0},set:function(a){var y=(this.G&8192)!==0;y!==a&&(this.G^=8192,this.Uc=!0,this.g("isShadowed",y,a),this.N())}},isAnimated:{get:function(){return(this.G&262144)!==0},set:function(a){var y=(this.G&262144)!==0;y!==a&&(this.G^=262144,this.g("isAnimated",y,a))}},highlightedChanged:{get:function(){return this.P!==null?this.P.oq:null},set:function(a){var y=this.highlightedChanged;y!==a&&(dl(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&&(dl(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&&(dl(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 Rn?(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&&(dl(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&&(dl(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&&(dl(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:Zr},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),dl(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&&(dl(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&&(dl(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:es},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),dl(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&&le("Cannot make a Group a member of itself: "+this.toString()),le("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?lv(y,this):this instanceof lr&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?av(a,this):this instanceof lr&&x!==null&&x.ai.add(this),this.C(1),x!==null&&x.aa){var E=this.data,b=x.model;if(E!==null&&b.Xj()){var z=b.wa(a!==null?a.data:null);b.mp(E,z)}}if(E=this.containingGroupChanged,E!==null&&(b=!0,x!==null&&(b=x.aa,x.aa=!0),E(this,y,a),x!==null&&(x.aa=b)),this instanceof lr){for(x=new Fe,sd(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof ri)for(E=E.linksConnected;E.next();)Fg(E.value)}if(this instanceof ri){for(x=this.linksConnected;x.next();)Fg(x.value);x=this.labeledLink,x!==null&&Fg(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&Td(y,-1,a))}}else le("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&&(dl(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof ri&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(dl(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&&(dl(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:Wn},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),dl(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&&(dl(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&&(dl(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Ti.prototype.invalidateLayout=Ti.prototype.C,Ti.prototype.findCommonContainingGroup=Ti.prototype.px,Ti.prototype.isMemberOf=Ti.prototype.Td,Ti.prototype.findTopLevelPart=Ti.prototype.sz,Ti.prototype.findSubGraphLevel=Ti.prototype.oz,Ti.prototype.ensureBounds=Ti.prototype.Va,Ti.prototype.getDocumentBounds=Ti.prototype.mi,Ti.prototype.findObject=Ti.prototype.fb,Ti.prototype.moveTo=Ti.prototype.moveTo,Ti.prototype.invalidateAdornments=Ti.prototype.Wb,Ti.prototype.clearAdornments=Ti.prototype.Ej,Ti.prototype.removeAdornment=Ti.prototype.Jf,Ti.prototype.addAdornment=Ti.prototype.bh,Ti.prototype.findAdornment=Ti.prototype.Pj,Ti.prototype.updateTargetBindings=Ti.prototype.La;var zy=!1;Ti.className="Part",Ti.LayoutNone=0,Ti.LayoutAdded=1,Ti.LayoutRemoved=2,Ti.LayoutShown=4,Ti.LayoutHidden=8,Ti.LayoutNodeSized=16,Ti.LayoutGroupLayout=32,Ti.LayoutNodeReplaced=64,Ti.LayoutStandard=127,Ti.LayoutAll=16777215;function Jr(a,y){a===void 0||a instanceof uo||typeof a=="string"?Ti.call(this,a):(Ti.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)}We(Jr,Ti),Jr.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Jr.prototype.updateRelationshipsFromData=function(){},Jr.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Rn&&y instanceof vr){y=x.path,x.Ul(a),a=y.geometry,x=this.O.s,y=x.length;for(var E=0;E<y;E++){var b=x[E];b.isPanelMain&&b instanceof vr&&(b.ua=a)}}},Jr.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!La(a))},Jr.prototype.Zc=function(){return!1},Jr.prototype.gk=function(a,y,x,E,b,z,tt){if(a===as&&y==="elements"){if(b instanceof Xa)this.$a===null&&(this.$a=b);else if(b instanceof Bn){var rt=b.Nl(function(ot){return ot instanceof Xa});rt instanceof Xa&&this.$a===null&&(this.$a=rt)}}else a===gs&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof Bn&&this.$a.rg(E)&&(this.$a=null));Ti.prototype.gk.call(this,a,y,x,E,b,z,tt)},Jr.prototype.updateAdornments=function(){},Jr.prototype.Lj=function(){},Sn.Object.defineProperties(Jr.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}}}),Jr.className="Adornment";function rv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=us,this.er=B0,this.Kr=this.ij=this.Nq=this.Mq=null}rv.prototype.copy=function(){var a=new rv;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 ri(a,y){a===void 0||a instanceof uo||typeof a=="string"?Ti.call(this,a):(Ti.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new ne,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}We(ri,Ti),ri.prototype.cloneProtected=function(a){Ti.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Tt=ri.prototype,Tt.Af=function(a){Ti.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function xc(a){a.Ba===null?a.Ba=new rv:a.Ba.nc&&(a.Ba=a.Ba.copy())}Tt.th=function(){Ti.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function jy(a,y){y!==null&&(a.af===null&&(a.af=new Fe),a.af.add(y))}function Vy(a,y,x,E){if(y===null||a.af===null)return null;for(var b=a.af.iterator;b.next();){var z=b.value;if(z.Ds===a&&z.cv===y&&z.Ox===x&&z.Px===E||z.Ds===y&&z.cv===a&&z.Ox===E&&z.Px===x)return z}return null}Tt.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=Vy(this,a,y,x),a!==null&&a.Sl()},Tt.gk=function(a,y,x,E,b,z,tt){a===as&&y==="elements"?this.wc=null:a===gs&&y==="elements"&&(this.wc=null),Ti.prototype.gk.call(this,a,y,x,E,b,z,tt)},Tt.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Ul(x.fromPort),Ul(x.toPort),x.bb())}};function Zy(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Ul(x.fromPort),Ul(x.toPort),x.bb())}}function Ul(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Ul(y.port)}}Tt.si=function(){return!0},ri.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},ri.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},ri.prototype.isVisible=function(){if(!Ti.prototype.isVisible.call(this))return!1;var a=!0,y=YA,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===YA){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Fs){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(E){return!E.isTreeExpanded}))return!1}else if(y===wA&&(a=a?this.Oo():this.Po(),0<a.count&&a.any(function(E){return!E.isTreeExpanded})))return!1;return a=this.labeledLink,a!==null?a.isVisible():!0},ri.prototype.Zb=function(a){Ti.prototype.Zb.call(this,a);for(var y=this.linksConnected;y.next();){var x=y.value;if(a&&this.containingGroup!==null){var E=x.To(this);E===null||E.Td(this.containingGroup)||x.bb()}x.Zb(a)}},ri.prototype.qx=function(){var a=new Fe,y=new Fe;return Wy(this,this,a,y),y.iterator};function Wy(a,y,x,E){if(y!==null&&!x.has(y)){x.add(y);var b=!0,z=a.diagram;z!==null&&(b=z.isTreePathToChildren),y.linksConnected.each(function(tt){tt.isTreeLink?(b?tt.fromNode===y:tt.toNode===y)&&Wy(a,b?tt.toNode:tt.fromNode,x,E):E.add(tt)})}}ri.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new re(this.jb),x=this;return y.predicate=function(E){return E.fromNode===x&&E.fromPortId===a||E.toNode===x&&E.toPortId===a},y},Tt=ri.prototype,Tt.Mo=function(a){a===void 0&&(a=null);var y=new re(this.jb),x=this;return y.predicate=function(E){return E.fromNode!==x?!1:a===null?!0:E.fromPortId===a},y},Tt.Sd=function(a){a===void 0&&(a=null);var y=new re(this.jb),x=this;return y.predicate=function(E){return E.toNode!==x?!1:a===null?!0:E.toPortId===a},y},Tt.Mu=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode===this?(a===null||b.fromPortId===a)&&(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Fe,y.add(x),y.add(b)):x=b):b.toNode!==this||a!==null&&b.toPortId!==a||(b=b.fromNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Fe,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new qi(x):Ri},Tt.Po=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode!==this||a!==null&&b.fromPortId!==a||(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Fe,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new qi(x):Ri},Tt.Oo=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.toNode!==this||a!==null&&b.toPortId!==a||(b=b.fromNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Fe,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new qi(x):Ri},Tt.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new re(this.jb),b=this;return E.predicate=function(z){return!((z.fromNode!==b||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)&&(z.fromNode!==a||z.toNode!==b||x!==null&&z.fromPortId!==x||y!==null&&z.toPortId!==y))},E},Tt.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new re(this.jb),b=this;return E.predicate=function(z){return!(z.fromNode!==b||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)},E};function x0(a,y,x){Ul(x);var E=a.jb.contains(y);if(E||a.jb.add(y),!E||y.fromNode===y.toNode){var b=a.linkConnected;if(b!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),b(a,y,x),tt!==null&&(tt.aa=z)}}!E&&y.isTreeLink&&(x=y.fromNode,y=y.toNode,x!==null&&y!==null&&x!==y&&(E=!0,a=a.diagram,a!==null&&(E=a.isTreePathToChildren),b=E?y:x,z=E?x:y,b.ci||(b.ci=z),!z.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(E?x===z&&(z.isTreeLeaf=!1):y===z&&(z.isTreeLeaf=!1))))}function S0(a,y,x){Ul(x);var E=a.jb.remove(y),b=null;if(E||y.toNode===y.fromNode){var z=a.linkDisconnected;if(b=a.diagram,z!==null){var tt=!0;b!==null&&(tt=b.aa,b.aa=!0),z(a,y,x),b!==null&&(b.aa=tt)}}E&&y.isTreeLink&&(x=!0,b!==null&&(x=b.isTreePathToChildren),a=x?y.toNode:y.fromNode,y=x?y.fromNode:y.toNode,a!==null&&(a.ci=!1),y===null||y.isTreeLeaf||(y.jb.count===0?(y.ci=null,b!==null&&b.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):cp(y)))}function cp(a){if(a.ci=!1,a.jb.count!==0){var y=!0,x=a.diagram;if(x===null||!x.undoManager.isUndoingRedoing){for(x!==null&&(y=x.isTreePathToChildren),x=a.jb.iterator;x.next();){var E=x.value;if(E.isTreeLink){if(y){if(E.fromNode===a){a.isTreeLeaf=!1;return}}else if(E.toNode===a){a.isTreeLeaf=!1;return}}}a.isTreeLeaf=!0}}}ri.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Tt=ri.prototype,Tt.Vo=function(a){Ti.prototype.Vo.call(this,a),a||(cp(this),a=this.Yk,a!==null&&i1(a,this))},Tt.Wo=function(a){Ti.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},Tt.Lj=function(){if(0<this.jb.count){var a=this.diagram;if(a!==null)for(var y=a.commandHandler!==null?a.commandHandler.deletesConnectedLinks:!0,x=this.jb.copy().iterator;x.next();){var E=x.value;y?a.remove(E):(E.fromNode===this&&(E.fromNode=null),E.toNode===this&&(E.toNode=null))}}this.labeledLink=null,Ti.prototype.Lj.call(this)},Tt.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;Yy(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function Yy(a){a.wc===null?a.wc=new be:a.wc.clear(),a.qm(a,function(y,x){Xy(y,x)}),a.wc.count===0&&a.wc.add("",a)}function Xy(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function ov(a,y,x){var E=y.portId;if(E!==null&&(a.wc!==null&&a.wc.remove(E),y=a.diagram,y!==null&&x)){for(x=null,a=a.findLinksConnected(E);a.next();)E=a.value,x===null&&(x=rn()),x.push(E);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Ve(x)}}}Tt.Nz=function(a){if(a===null||a===this)return!1;var y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this,y)for(;x!==a;){y=null;for(var E=x.jb.iterator;E.next();){var b=E.value;if(b.isTreeLink&&(y=b.fromNode,y!==x&&y!==this))break}if(y===this||y===null||y===x)return!1;x=y}else for(;x!==a;){for(y=null,E=x.jb.iterator;E.next()&&(b=E.value,!b.isTreeLink||(y=b.toNode,y===x||y===this)););if(y===this||y===null||y===x)return!1;x=y}return!0},Tt.xz=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this,a)for(;;){a=null;for(var x=y.jb.iterator;x.next();){var E=x.value;if(E.isTreeLink&&(a=E.fromNode,a!==y&&a!==this))break}if(a===this)return this;if(a===null||a===y)return y;y=a}else for(;;){for(a=null,x=y.jb.iterator;x.next()&&(E=x.value,!E.isTreeLink||(a=E.toNode,a===y||a===this)););if(a===this)return this;if(a===null||a===y)return y;y=a}},Tt.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)w0(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;)w0(y,!1),y=y.pg();return x},Tt.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},Tt.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof ri)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},Tt.vz=function(){function a(x,E){E.add(x);var b=x.kh();b!==null&&(E.add(b),x=x.pg(),x!==null&&a(x,E))}var y=new Fe;return a(this,y),y},Tt.uz=function(){return Jy(this,this)};function Jy(a,y){return y=y.pg(),y===null?0:1+Jy(a,y)}Tt.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new re(this.jb);var x=this;return y.predicate=a?function(E){return!!(E.isTreeLink&&E.fromNode===x)}:function(E){return!!(E.isTreeLink&&E.toNode===x)},y},Tt.Ou=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren);var x=y=null,E=this.jb.iterator;if(a)for(;E.next();)a=E.value,a.isTreeLink&&a.fromNode===this&&(a=a.toNode,y!==null?y.add(a):x!==null&&x!==a?(y=new ne,y.add(x),y.add(a)):x=a);else for(;E.next();)a=E.value,a.isTreeLink&&a.toNode===this&&(a=a.fromNode,y!==null?y.add(a):x!==null&&x!==a?(y=new ne,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new qi(x):Ri},Tt.wz=function(a){a===void 0&&(a=1/0);var y=new Fe;return sd(y,this,!1,a,!0),y},ri.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 Fe;x.add(this),qy(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===YA),y.Ue=!1}};function qy(a,y,x,E,b,z,tt){if(1<E)for(var rt=x?a.Mo():a.Sd();rt.next();){var ot=rt.value;ot.isTreeLink&&(ot=ot.To(a),ot===null||ot===a||y.contains(ot)||(y.add(ot),qy(ot,y,x,E-1,b,z,tt)))}else $y(a,y,x,b,z,tt)}function $y(a,y,x,E,b,z){for(var tt=b===a?!0:a.isTreeExpanded,rt=x?a.Mo():a.Sd(),ot={};rt.next();){var lt=rt.value;if(lt.isTreeLink&&(lt=lt.To(a),lt!==null&&lt!==a)){var ut=y.contains(lt);if(ut||y.add(lt),tt){var ft=x?lt.Oo():lt.Po();ot.uv=a,ft.all(function(yt){return function(Mt){return Mt===yt.uv||!Mt.isTreeExpanded}}(ot))&&E.Aj(lt,b),lt.oh(),lt.Zb(!1)}lt.isTreeExpanded&&(lt.wasTreeExpanded=lt.isTreeExpanded,ut||$y(lt,y,x,E,b,z))}ot={uv:ot.uv}}a.isTreeExpanded=!1}ri.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 Fe;x.add(this),t1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===YA),y.Ue=!1}};function t1(a,y,x,E,b,z,tt){for(var rt=z===a?!1:a.isTreeExpanded,ot=x?a.Mo():a.Sd(),lt={};ot.next();){var ut=ot.value;if(ut.isTreeLink&&(rt||ut.fd||ut.bb(),ut=ut.To(a),ut!==null&&ut!==a&&!y.contains(ut))){if(y.add(ut),!rt){ut.Zb(!0),ut.oh();var ft=x?ut.Oo():ut.Po();lt.vv=a,ft.all(function(yt){return function(Mt){return Mt===yt.vv||!Mt.isTreeExpanded}}(lt))&&b.Cj(ut,z)}(2<E||ut.wasTreeExpanded)&&(ut.wasTreeExpanded=!1,t1(ut,y,x,E-1,b,z,tt))}lt={vv:lt.vv}}a.isTreeExpanded=!0}Sn.Object.defineProperties(ri.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:B0},set:function(a){var y=this.portSpreading;y!==a&&(xc(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:us},set:function(a){typeof a=="number"&&(a=new sr(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),xc(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&&(xc(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&&(xc(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&&(xc(this),this.Ba.gj=a,this.g("linkValidation",y,a))}},isLinkLabel:{get:function(){return this.Yk!==null}},labeledLink:{get:function(){return this.Yk},set:function(a){var y=this.Yk;if(y!==a){var x=this.diagram,E=this.data;if(y!==null){if(y.wd!==null&&(y.wd.remove(this),y.v()),x!==null&&E!==null&&!x.undoManager.isUndoingRedoing){var b=y.data,z=x.model;if(b!==null&&z.ri()){var tt=z.wa(E);tt!==void 0&&z.Qx(b,tt)}}this.containingGroup=null}this.Yk=a,a!==null&&(i1(a,this),x===null||E===null||x.undoManager.isUndoingRedoing||(b=a.data,x=x.model,b!==null&&x.ri()&&(E=x.wa(E),E!==void 0&&x.Bu(b,E))),this.containingGroup=a.containingGroup),Ts(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&Yy(this),this.wc.iteratorValues}},isTreeExpanded:{get:function(){return(this.U&1)!==0},set:function(a){var y=(this.U&1)!==0;if(y!==a){this.U^=1;var x=this.diagram;if(this.g("isTreeExpanded",y,a),y=this.treeExpandedChanged,y!==null){var E=!0;x!==null&&(E=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=E)}x!==null&&x.undoManager.isUndoingRedoing?this.Zb(a):a?this.expandTree():this.collapseTree()}}},wasTreeExpanded:{get:function(){return(this.U&2)!==0},set:function(a){var y=(this.U&2)!==0;y!==a&&(this.U^=2,this.g("wasTreeExpanded",y,a))}},treeExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Vr:null},set:function(a){var y=this.treeExpandedChanged;y!==a&&(xc(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))}}}),ri.prototype.expandTree=ri.prototype.expandTree,ri.prototype.collapseTree=ri.prototype.collapseTree,ri.prototype.findTreeParts=ri.prototype.wz,ri.prototype.findTreeChildrenNodes=ri.prototype.Ou,ri.prototype.findTreeChildrenLinks=ri.prototype.Qo,ri.prototype.findTreeLevel=ri.prototype.uz,ri.prototype.findTreeParentChain=ri.prototype.vz,ri.prototype.findTreeParentNode=ri.prototype.pg,ri.prototype.findTreeParentLink=ri.prototype.kh,ri.prototype.findCommonTreeParent=ri.prototype.gz,ri.prototype.findTreeRoot=ri.prototype.xz,ri.prototype.isInTreeOf=ri.prototype.Nz,ri.prototype.findPort=ri.prototype.ns,ri.prototype.findLinksTo=ri.prototype.kz,ri.prototype.findLinksBetween=ri.prototype.jz,ri.prototype.findNodesInto=ri.prototype.Oo,ri.prototype.findNodesOutOf=ri.prototype.Po,ri.prototype.findNodesConnected=ri.prototype.Mu,ri.prototype.findLinksInto=ri.prototype.Sd,ri.prototype.findLinksOutOf=ri.prototype.Mo,ri.prototype.findExternalTreeLinksConnected=ri.prototype.qx,ri.prototype.invalidateConnectedLinks=ri.prototype.Bd,ri.prototype.invalidateLinkBundle=ri.prototype.Lz;var bw=new Oe(ri,"SpreadingNone",10),B0=new Oe(ri,"SpreadingEvenly",11),sv=new Oe(ri,"SpreadingPacked",12);ri.className="Node",ri.SpreadingNone=bw,ri.SpreadingEvenly=B0,ri.SpreadingPacked=sv;function lr(a,y){a===void 0||a instanceof uo||typeof a=="string"?ri.call(this,a):(ri.call(this),a&&(y=a)),this.U|=4608,this.Gn=new Fe,this.$a=null,this.Sc=new zo,this.Sc.group=this,this.gl=new Fe,this.tb=this.$p=null,y&&Object.assign(this,y)}We(lr,ri),lr.prototype.cloneProtected=function(a){ri.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Xa});y instanceof Xa?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())},Tt=lr.prototype,Tt.Af=function(a){ri.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 ri)x.Bd(y);else if(x instanceof Rn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Tt.gk=function(a,y,x,E,b,z,tt){if(a===as&&y==="elements"){if(b instanceof Xa)this.$a===null?this.$a=b:this.$a!==b&&le("Cannot insert a second Placeholder into the visual tree of a Group.");else if(b instanceof Bn){var rt=b.Nl(function(ot){return ot instanceof Xa});rt instanceof Xa&&(this.$a===null?this.$a=rt:this.$a!==rt&&le("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===gs&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof Bn&&this.$a.rg(E)&&(this.$a=null));ri.prototype.gk.call(this,a,y,x,E,b,z,tt)},Tt.Xl=function(a,y){ri.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Bn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Bn&&(a=a.Pb()),this.tb===null&&(this.tb=new Ue),a.mi(this.tb),a instanceof vr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Tt.eh=function(a,y,x,E){this.nf=this.$a,ri.prototype.eh.call(this,a,y,x,E)},Tt.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Rn||y.Va()}),ri.prototype.Va.call(this)},Tt.si=function(){if(!ri.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof ri){if(y.isVisible()&&La(y))return!1}else if(y instanceof Rn&&y.isVisible()&&La(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function av(a,y){if(a.Gn.add(y)){y instanceof lr&&a.gl.add(y);var x=a.memberAdded;if(x!==null){var E=!0,b=a.diagram;b!==null&&(E=b.aa,b.aa=!0),x(a,y),b!==null&&(b.aa=E)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!1)}y instanceof Rn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function lv(a,y){if(a.Gn.remove(y)){y instanceof lr&&a.gl.remove(y);var x=a.memberRemoved;if(x!==null){var E=!0,b=a.diagram;b!==null&&(E=b.aa,b.aa=!0),x(a,y),b!==null&&(b.aa=E)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!0)}y instanceof Rn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}Tt.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)}ri.prototype.Lj.call(this)},lr.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=$e(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},lr.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var E=!0;for(a=$e(a).iterator;a.next();){var b=a.value;!y||x.isValidMember(this,b)?b.containingGroup=this:E=!1}return E},lr.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))},Tt=lr.prototype,Tt.Bd=function(a){var y=(this.U&65536)!==0;if(ri.prototype.Bd.call(this,a),!y)for(!(this.U&65536)&&(this.U=this.U^65536),y=this.Lu();y.next();){var x=y.value;if(a===void 0||!a.contains(x)){var E=x.fromNode;E!==null&&E!==this&&E.Td(this)&&!E.isVisible()?(Ul(x.fromPort),Ul(x.toPort),x.bb()):(E=x.toNode,E!==null&&E!==this&&E.Td(this)&&!E.isVisible()&&(Ul(x.fromPort),Ul(x.toPort),x.bb()))}}},Tt.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 Fe,E=y.iterator;E.next();){var b=E.value;if(b instanceof ri)for(b=b.linksConnected;b.next();){var z=b.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},Tt.iz=function(){var a=this.Rj();a.add(this);for(var y=new Fe,x=a.iterator;x.next();){var E=x.value;if(E instanceof ri)for(E=E.linksConnected;E.next();){var b=E.value,z=b.fromNode;z===null||a.contains(z)&&z!==this||y.add(z),b=b.toNode,b===null||a.contains(b)&&b!==this||y.add(b)}}return y.iterator},Tt.hz=function(){function a(x,E){x!==null&&(E.add(x),a(x.containingGroup,E))}var y=new Fe;return a(this,y),y},Tt.Rj=function(){var a=new Fe;return sd(a,this,!0,0,!0),a.remove(this),a},Tt.Zb=function(a){ri.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},lr.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();e1(this,y,a,this),a.Ue=!1}};function e1(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!1),z instanceof lr&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,e1(z,y,x,E)),z instanceof ri)z.Bd(y),x.Aj(z,E);else if(z instanceof Rn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}lr.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();n1(this,y,a,this),a.Ue=!1}};function n1(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!0),z instanceof lr&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,n1(z,y,x,E)),z instanceof ri)z.Bd(y),x.Cj(z,E);else if(z instanceof Rn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}lr.prototype.move=function(a,y){y===void 0&&(y=!1);var x=y?this.location:this.position,E=x.x;x=x.y;var b=a.x,z=a.y;if(!(E===b||isNaN(E)&&isNaN(b))||!(x===z||isNaN(x)&&isNaN(z))){for(E=b-(isNaN(E)?0:E),x=z-(isNaN(x)?0:x),z=Qt.alloc(),ri.prototype.move.call(this,a,y),a=new Fe,y=this.Rj().iterator;y.next();)b=y.value,b instanceof Rn&&(b.suspendsRouting&&a.add(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(b.suspendsRouting=!0);for(y.reset();y.next();)if(b=y.value,!(b.ph()||b instanceof ri&&b.isLinkLabel)){var tt=b.position,rt=b.location;tt.w()?(z.x=tt.x+E,z.y=tt.y+x,b.position=z):rt.w()&&(z.x=rt.x+E,z.y=rt.y+x,b.location=z)}for(y.reset();y.next();)b=y.value,b instanceof Rn&&(b.suspendsRouting=a.contains(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(tt=b.position,z.x=tt.x+E,z.y=tt.y+x,z.w()?b.move(z):b.bb(),Av(b)&&b.bb());Qt.free(z)}},Sn.Object.defineProperties(lr.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&&le("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&&(xc(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&&(xc(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&&(xc(this),this.Ba.ij=a,this.g("memberValidation",y,a))}},ungroupable:{get:function(){return(this.U&256)!==0},set:function(a){var y=(this.U&256)!==0;y!==a&&(this.U^=256,this.g("ungroupable",y,a))}},isSubGraphExpanded:{get:function(){return(this.U&512)!==0},set:function(a){var y=(this.U&512)!==0;if(y!==a){this.U^=512;var x=this.diagram;if(this.g("isSubGraphExpanded",y,a),y=this.subGraphExpandedChanged,y!==null){var E=!0;x!==null&&(E=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=E)}x!==null&&x.undoManager.isUndoingRedoing?(this.$a!==null&&this.$a.v(),this.memberParts.each(function(b){b.updateAdornments()})):a?this.expandSubGraph():this.collapseSubGraph()}}},wasSubGraphExpanded:{get:function(){return(this.U&1024)!==0},set:function(a){var y=(this.U&1024)!==0;y!==a&&(this.U^=1024,this.g("wasSubGraphExpanded",y,a))}},subGraphExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Kr:null},set:function(a){var y=this.subGraphExpandedChanged;y!==a&&(xc(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)}}}),lr.prototype.expandSubGraph=lr.prototype.expandSubGraph,lr.prototype.collapseSubGraph=lr.prototype.collapseSubGraph,lr.prototype.findSubGraphParts=lr.prototype.Rj,lr.prototype.findContainingGroupChain=lr.prototype.hz,lr.prototype.findExternalNodesConnected=lr.prototype.iz,lr.prototype.findExternalLinksConnected=lr.prototype.Lu,lr.prototype.ensureBounds=lr.prototype.Va,lr.className="Group";function Xa(a){Be.call(this),this.yb=js,this.ko=new Ue(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}We(Xa,Be),Xa.prototype.cloneProtected=function(a){Be.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Xa.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Ao(0,0,y.width,y.height,a.x,a.y)},Xa.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof lr||a instanceof Jr)||le("Placeholder is not inside a Group or Adornment."),a instanceof lr){var y=this.computeBorder(this.ko),x=this.minSize,E=this.dc;for(Fr(E,(isFinite(x.width)?Math.max(x.width,y.width):y.width)||0,(isFinite(x.height)?Math.max(x.height,y.height):y.height)||0),this.Ge(0,0,E.width,E.height),E=a.memberParts,x=!1;E.next();)if(E.value.isVisible()){x=!0;break}E=a.diagram,!x||E===null||E.animationManager.Xu(a)||isNaN(y.x)||isNaN(y.y)||(x=Qt.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),Qt.free(x))}else{y=this.dc,x=this.yb,E=x.left+x.right;var b=x.top+x.bottom,z=a.adornedObject;a.angle=z.li();var tt=0;z instanceof vr&&(tt=z.strokeWidth);var rt=z.Df(),ot=z.naturalBounds,lt=(ot.width+tt)*rt;tt=(ot.height+tt)*rt,a.type!==Bn.Link&&(rt=z.ga(a.category==="Selection"?br:a.locationSpot,Qt.alloc()),a.location=rt,Qt.free(rt)),isNaN(lt)||isNaN(tt)?(a=z.ga(br,Qt.alloc()),lt=Ue.allocAt(a.x,a.y,0,0),lt.Ye(z.ga(gr,a)),lt.Ye(z.ga(io,a)),lt.Ye(z.ga(Qi,a)),Fr(y,lt.width+E||0,lt.height+b||0),this.Ge(-x.left,-x.top,y.width,y.height),Qt.free(a),Ue.free(lt)):(Fr(y,lt+E||0,tt+b||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Xa.prototype.eh=function(a,y,x,E){this.actualBounds.h(a,y,x,E)},Xa.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,E=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof lr&&!y.layer.isTemporary&&y.computesBoundsAfterDrag&&this.ko.w()){var b=x.toolManager.findTool("Dragging");if(b===x.currentTool&&(x=b.computeBorder(y,this.ko,a),x!==null))return x}x=Ue.alloc(),b=this.computeMemberBounds(x);var z=this.yb;return y instanceof lr&&!y.isSubGraphExpanded?a.h(b.x-z.left,b.y-z.top,0,0):a.h(b.x-z.left,b.y-z.top,Math.max(b.width+z.left+z.right,0),Math.max(b.height+z.top+z.bottom,0)),Ue.free(x),E&&y instanceof lr&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Xa.prototype.computeMemberBounds=function(a){if(!(this.part instanceof lr))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,E=1/0,b=-1/0,z=-1/0,tt=y.memberParts;tt.next();){var rt=tt.value;if(rt.isVisible()){if(rt instanceof Rn&&(!y.computesBoundsIncludingLinks||xl(rt)||rt.fromNode===y||rt.toNode===y))continue;rt=rt.actualBounds,rt.left<x&&(x=rt.left),rt.top<E&&(E=rt.top),rt.right>b&&(b=rt.right),rt.bottom>z&&(z=rt.bottom)}}return isFinite(x)&&isFinite(E)?a.h(x,E,b-x,z-E):(y=y.location,a.h(y.x,y.y,0,0)),a},Sn.Object.defineProperties(Xa.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new sr(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Xa.className="Placeholder";function Rn(a){Ti.call(this,Bn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Ja,this.Om=0,this.Qm=Ja,this.Rm=NaN,this.qj=dv,this.po=.5,this.wd=null,this.Nb=new ne().freeze(),this.Tg=this.Mg=null,this.ml=new Ue,this.ua=new bn,this.u=this.o=this.Sf=this.Wf=null,this.su=new Qt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}We(Rn,Ti),Rn.prototype.cloneProtected=function(a){Ti.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())},Tt=Rn.prototype,Tt.Af=function(a){Ti.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&&Ul(y),a=a.toPort,a!==null&&Ul(a)},Tt.qb=function(a){a.classType===Rn?(a.value&2)===2?this.routing=a:a===ql||a===Bc||a===Lg?this.curve=a:a===gp||a===M0||a===k0?this.adjusting=a:a!==dv&&a!==Ja&&le("Unknown Link enum value for a Link property: "+a):Ti.prototype.qb.call(this,a)},Tt.Xc=function(){this.ba===null&&(this.ba=new If)},Tt.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),La(a)||rd(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),La(a)||rd(a)))},Tt.zv=function(){return!1},Tt.Av=function(){},Tt.Zc=function(){return!1},Rn.prototype.computeAngle=function(a,y,x){return Rn.computeAngle(y,x)},Rn.computeAngle=function(a,y){switch(a){default:case Ja:a=0;break;case pp:a=y;break;case mp:a=y+90;break;case vp:a=y-90;break;case fv:a=y+180;break;case b0:a=Ce.bp(y),90<a&&270>a&&(a-=180);break;case yp:a=Ce.bp(y+90),90<a&&270>a&&(a-=180);break;case wp:a=Ce.bp(y-90),90<a&&270>a&&(a-=180);break;case T0:if(a=Ce.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return Ce.bp(a)};function Fg(a){var y=a.fromNode,x=a.toNode,E=null;if(y!==null?E=x!==null?y.px(x):y.containingGroup:x!==null?E=x.containingGroup:E=null,y=E,x=a.Ah,x!==y){x!==null&&lv(x,a),a.Ah=y,y!==null&&av(y,a);var b=a.containingGroupChanged;if(b!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),b(a,x,y),tt!==null&&(tt.aa=z)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=E}Tt=Rn.prototype,Tt.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Ti.prototype.oh.call(this)},Tt.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},Tt.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function i1(a,y){a.wd===null&&(a.wd=new Fe),a.wd.add(y),a.v()}Tt.Vo=function(a){if(Ti.prototype.Vo.call(this,a),tf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,x0(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||x0(x,this,E)}dp(this)}},Tt.Wo=function(a){if(Ti.prototype.Wo.call(this,a),tf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,S0(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||S0(x,this,E)}fp(this)}},Tt.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))},Rn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Rn.prototype.move=function(a,y){var x=y?this.location:this.position,E=x.x;isNaN(E)&&(E=0);var b=x.y;for(isNaN(b)&&(b=0),E=a.x-E,b=a.y-b,y===!0?Ti.prototype.move.call(this,a,!1):(a=Qt.allocAt(x.x+E,x.y+b),Ti.prototype.move.call(this,a,!1),Qt.free(a)),Sc(this,E,b),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+E,x.y+b)},Rn.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},Rn.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},Rn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(Hn),a;if(y===1)return a.assign(this.i(0)),a;if(y===2){var x=this.i(0),E=this.i(1);return a.h((x.x+E.x)/2,(x.y+E.y)/2),a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===ql))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()===ql){if(y===3){x=this.i(0),E=this.i(1);var b=this.i(2);return Ce.ax(x.x,x.y,E.x,E.y,E.x,E.y,b.x,b.y,a),a}if(E=(y-1)/3|0,x=3*(E/2|0),E%2===1){E=this.i(x),b=this.i(x+1);var z=this.i(x+2);x=this.i(x+3),Ce.ax(E.x,E.y,b.x,b.y,z.x,z.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var tt=this.flattenedLengths;for(x=this.flattenedTotalLength,b=z=E=0;E<x/2&&z<y&&(b=tt[z],!(E+b>x/2));)E+=b,z++;return y=this.i(z),z=this.i(z+1),1>Math.abs(y.x-z.x)?y.y>z.y?a.h(y.x,y.y-(x/2-E)):a.h(y.x,y.y+(x/2-E)):1>Math.abs(y.y-z.y)?y.x>z.x?a.h(y.x-(x/2-E),y.y):a.h(y.x+(x/2-E),y.y):(x=(x/2-E)/b,a.h(y.x+x*(z.x-y.x),y.y+x*(z.y-y.y))),a},Rn.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()===ql))return this.ua.wx(.5);if(this.computeCurve()===ql&&4<=a){var y=(a-1)/3|0,x=3*(y/2|0);if(y%2===1){x=Math.floor(x),a=this.i(x),y=this.i(x+1);var E=this.i(x+2);return x=this.i(x+3),Ce.My(a.x,a.y,y.x,y.y,E.x,E.y,x.x,x.y)}if(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,E=this.flattenedTotalLength;var b=0;x=0;for(var z;b<E/2&&x<a&&(z=y[x],!(b+z>E/2));)b+=z,x++;if(y=this.i(x),E=this.i(x+1),1>Math.abs(y.x-E.x)&&1>Math.abs(y.y-E.y)){if(0<x&&x+2<a)return this.i(x-1).ab(this.i(x+2))}else{if(1>Math.abs(y.x-E.x))return y.y>E.y?270:90;if(1>Math.abs(y.y-E.y))return y.x>E.x?180:0}return y.ab(E)},Tt=Rn.prototype,Tt.i=function(a){return this.Nb.s[a]},Tt.dd=function(a,y){this.Nb.cd(a,y)},Tt.L=function(a,y,x){this.Nb.cd(a,new Qt(y,x))},Tt.Kz=function(a,y){this.Nb.Gb(a,y)},Tt.m=function(a,y,x){this.Nb.Gb(a,new Qt(y,x))},Tt.ne=function(a){this.Nb.add(a)},Tt.yf=function(a,y){this.Nb.add(new Qt(a,y))},Tt.pv=function(a){this.Nb.mb(a)},Tt.Fj=function(){this.Nb.clear()};function Sc(a,y,x){if(y!==0||x!==0)if(a.pointsCount===0)a.defaultFromPoint&&a.defaultFromPoint.offset(y,x),a.defaultToPoint&&a.defaultToPoint.offset(y,x);else{for(var E=a.fd,b=new ne,z=a.Nb.iterator;z.next();){var tt=z.value;b.add(new Qt(tt.x+y,tt.y+x).freeze())}b.freeze(),z=a.Nb,a.Nb=b,tt=a.diagram,isNaN(y)||isNaN(x)||tt!==null&&tt.animationManager.zb?a.v():(a.ke.h(a.ke.x+y,a.ke.y+x),a.pa.h(a.pa.x+y,a.pa.y+x),Ts(a)),E?C0(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),tt!==null&&tt.animationManager.zb&&ph(tt.animationManager,a,b),a.g("points",z,b)}}Tt.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},Tt.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,E=1/0,b=a.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];x=Math.min(rt.x,x),E=Math.min(rt.y,E)}rt=tt=1/0;for(var ot=y.s,lt=ot.length,ut=0;ut<lt;ut++){var ft=ot[ut];tt=Math.min(ft.x,tt),rt=Math.min(ft.y,rt),ft.freeze()}if(y.freeze(),lt===z){for(z=0;z<lt;z++)if(ut=b[z],ft=ot[z],ut.x-x!==ft.x-tt||ut.y-E!==ft.y-rt){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&ph(x.animationManager,this,y),C0(this),this.g("points",a,y)}},Tt.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function C0(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),L0(a,!1))}Tt.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())}},Tt.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()}}},Rn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Gf||(Gf=new ri,Gf.desiredSize=Ei,Gf.Va()),this.defaultFromPoint&&(Gf.location=this.defaultFromPoint,Gf.Va(),y=a=Gf)):y=this.fromPort,y!==null&&!a.isVisible()){var x=a.findVisibleNode();x!==null&&x!==a?(a=x,y=x.port):a=x}if(this.Lw=a,a===null||!a.location.w())return!1;for(;!(y===null||y.actualBounds.w()&&y.Ed());)y=y.panel;if(y===null)return!1;var E=this.toNode,b=null;if(E===null?(zf||(zf=new ri,zf.desiredSize=Ei,zf.Va()),this.defaultToPoint&&(zf.location=this.defaultToPoint,zf.Va(),b=E=zf)):b=this.toPort,b===null||E.isVisible()||(x=E.findVisibleNode(),x!==null&&x!==E?(E=x,b=x.port):E=x),this.Mw=E,E===null||!E.location.w())return!1;for(;!(b===null||b.actualBounds.w()&&b.Ed());)b=b.panel;if(b===null)return!1;var z=this.pointsCount,tt=this.computeSpot(!0,y);x=this.computeSpot(!1,b);var rt=Eg(tt),ot=Eg(x),lt=y===b&&y!==null,ut=this.isOrthogonal,ft=this.curve===ql;this.Wf=lt&&!ut?ft=!0:!1;var yt=this.computeAdjusting()===Ja||lt;if(!ut&&!lt&&rt&&ot){if(rt=!1,!yt&&3<=z&&(yt=this.getLinkPoint(a,y,tt,!0,!1,E,b),ot=this.getLinkPoint(E,b,x,!1,!1,a,y),rt=this.adjustPoints(0,yt,z-1,ot))&&(yt=this.getLinkPoint(a,y,tt,!0,!1,E,b),ot=this.getLinkPoint(E,b,x,!1,!1,a,y),this.adjustPoints(0,yt,z-1,ot)),!rt)if(this.Fj(),ft){z=this.getLinkPoint(a,y,tt,!0,!1,E,b),yt=this.getLinkPoint(E,b,x,!1,!1,a,y),rt=yt.x-z.x,ot=yt.y-z.y,lt=this.computeCurviness(),ft=ut=0;var Mt=z.x+rt/3,bt=z.y+ot/3,Dt=Mt,qt=bt;Ce.B(ot,0)?qt=0<rt?qt-lt:qt+lt:(ut=-rt/ot,ft=Math.sqrt(lt*lt/(ut*ut+1)),0>lt&&(ft=-ft),Dt=(0>ot?-1:1)*ft+Mt,qt=ut*(Dt-Mt)+bt),Mt=z.x+2*rt/3,bt=z.y+2*ot/3;var Vt=Mt,oe=bt;Ce.B(ot,0)?oe=0<rt?oe-lt:oe+lt:(Vt=(0>ot?-1:1)*ft+Mt,oe=ut*(Vt-Mt)+bt),this.Fj(),this.ne(z),this.yf(Dt,qt),this.yf(Vt,oe),this.ne(yt),this.dd(0,this.getLinkPoint(a,y,tt,!0,!1,E,b)),this.dd(3,this.getLinkPoint(E,b,x,!1,!1,a,y))}else z=E,yt=b,E=this.getLinkPoint(a,y,tt,!0,!1,z,yt),b=this.getLinkPoint(z,yt,x,!1,!1,a,y),this.hasCurviness()?(yt=b.x-E.x,x=b.y-E.y,tt=this.computeCurviness(),a=E.x+yt/2,y=E.y+x/2,z=a,rt=y,Ce.B(x,0)?rt=0<yt?rt-tt:rt+tt:(yt=-yt/x,z=Math.sqrt(tt*tt/(yt*yt+1)),0>tt&&(z=-z),z=(0>x?-1:1)*z+a,rt=yt*(z-a)+y),this.ne(E),this.yf(z,rt),this.ne(b)):(this.ne(E),this.ne(b),rt=Ue.alloc(),y.mi(rt),ot=rt.ca(b),yt.mi(rt),lt=rt.ca(E),(ot||lt)&&(tt=y.ga(F0(tt),new Qt),this.dd(0,this.getLinkPointFromPoint(a,y,tt,b,!0,tt)),x=yt.ga(F0(x),new Qt),this.dd(1,this.getLinkPointFromPoint(z,yt,x,E,!1,x))),Ue.free(rt))}else{ft=this.isAvoiding,yt&&(ut&&ft||lt)&&this.Fj();var ce=lt?this.computeCurviness():0;ft=this.getLinkPoint(a,y,tt,!0,ut,E,b),Mt=Dt=bt=0,(ut||!rt||lt)&&(qt=this.computeEndSegmentLength(a,y,tt,!0),Mt=this.getLinkDirection(a,y,ft,tt,!0,ut,E,b),lt&&(rt||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(Mt-=ut?90:30,0>ce&&(Mt-=180)),0>Mt?Mt+=360:360<=Mt&&(Mt-=360),lt&&(qt+=Math.abs(ce)*(ut?1:2)),Mt===0?bt=qt:Mt===90?Dt=qt:Mt===180?bt=-qt:Mt===270?Dt=-qt:(bt=qt*Math.cos(Mt*Math.PI/180),Dt=qt*Math.sin(Mt*Math.PI/180)),tt.Mc()&&lt&&(qt=y.ga(rr,Qt.alloc()),Vt=Qt.allocAt(qt.x+1e3*bt,qt.y+1e3*Dt),this.getLinkPointFromPoint(a,y,qt,Vt,!0,ft),Qt.free(qt),Qt.free(Vt))),qt=this.getLinkPoint(E,b,x,!1,ut,a,y);var ge=oe=Vt=0;if(ut||!ot||lt){var Se=this.computeEndSegmentLength(E,b,x,!1);ge=this.getLinkDirection(E,b,qt,x,!1,ut,a,y),lt&&(ot||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(ge+=ut?0:30,0>ce&&(ge+=180)),0>ge?ge+=360:360<=ge&&(ge-=360),lt&&(Se+=Math.abs(ce)*(ut?1:2)),ge===0?Vt=Se:ge===90?oe=Se:ge===180?Vt=-Se:ge===270?oe=-Se:(Vt=Se*Math.cos(ge*Math.PI/180),oe=Se*Math.sin(ge*Math.PI/180)),x.Mc()&&lt&&(x=b.ga(rr,Qt.alloc()),tt=Qt.allocAt(x.x+1e3*Vt,x.y+1e3*oe),this.getLinkPointFromPoint(E,b,x,tt,!1,qt),Qt.free(x),Qt.free(tt))}x=ft,(ut||!rt||lt)&&(x=new Qt(ft.x+bt,ft.y+Dt)),tt=qt,(ut||!ot||lt)&&(tt=new Qt(qt.x+Vt,qt.y+oe)),!yt&&!ut&&rt&&3<z&&this.adjustPoints(0,ft,z-2,tt)?this.dd(z-1,qt):!yt&&!ut&&ot&&3<z&&this.adjustPoints(1,x,z-1,qt)?this.dd(0,ft):!yt&&(ut?6<=z:4<z)&&this.adjustPoints(1,x,z-2,tt)?(this.dd(0,ft),this.dd(z-1,qt)):(this.Fj(),this.ne(ft),(ut||!rt||lt)&&this.ne(x),ut&&this.addOrthoPoints(x,Mt,tt,ge,a,E),(ut||!ot||lt)&&this.ne(tt),this.ne(qt))}return!0};function uv(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}Rn.prototype.getLinkPointFromPoint=function(a,y,x,E,b,z){if(z===void 0&&(z=new Qt),a===null||y===null)return z.assign(x),z;if(a.isVisible()||(b=a.findVisibleNode(),b!==null&&b!==a&&(y=b.port)),a=null,b=y.panel,b===null||b.se()||(b=b.panel),b===null){b=E.x,E=E.y;var tt=x.x;x=x.y}else{a=b.oe,b=1/(a.m11*a.m22-a.m12*a.m21),tt=a.m22*b;var rt=-a.m12*b,ot=-a.m21*b,lt=a.m11*b,ut=b*(a.m21*a.dy-a.m22*a.dx),ft=b*(a.m12*a.dx-a.m11*a.dy);b=E.x*tt+E.y*ot+ut,E=E.x*rt+E.y*lt+ft,tt=x.x*tt+x.y*ot+ut,x=x.x*rt+x.y*lt+ft}return y.Sj(b,E,tt,x,z),a!==null&&z.transform(a),z};function P0(a,y){var x=y.Zn;return x===null&&(x=new jf,x.port=y,x.node=y.part,y.Zn=x),h1(x,a)}Rn.prototype.getLinkPoint=function(a,y,x,E,b,z,tt,rt){if(rt===void 0&&(rt=new Qt),x.sb()&&!Eg(x))return y.ga(x,rt),rt;if(x.$c()){var ot=P0(this,y);if(ot!==null){if(rt.assign(ot.Zo),b&&this.routing===o1){var lt=P0(this,tt);if(lt!==null&&ot.Gl<lt.Gl){ot=Qt.alloc(),lt=Qt.alloc();var ut=new Ue(y.ga(br,ot),y.ga(gr,lt)),ft=this.computeSpot(!E,tt);a=this.getLinkPoint(z,tt,ft,!E,b,a,y,lt),(x.Hf(is)||x.Hf(Lo))&&a.y>=ut.y&&a.y<=ut.y+ut.height?rt.y=a.y:(x.Hf(Wo)||x.Hf(Ss))&&a.x>=ut.x&&a.x<=ut.x+ut.width&&(rt.x=a.x),Qt.free(ot),Qt.free(lt)}}return rt}}return x=y.ga(F0(x),Qt.alloc()),this.pointsCount>(b?6:2)?(tt=E?this.i(1):this.i(this.pointsCount-2),b&&(tt=uv(x,tt.copy()))):(ot=this.computeSpot(!E,tt),z=Qt.alloc(),tt=tt.ga(F0(ot),z),b&&(tt=uv(x,tt)),Qt.free(z)),this.getLinkPointFromPoint(a,y,x,tt,E,rt),Qt.free(x),rt},Rn.prototype.getLinkDirection=function(a,y,x,E,b,z,tt,rt){t:if(E.sb())var ot=E.x>E.y?E.x>1-E.y?0:E.x<1-E.y?270:315:E.x<E.y?E.x>1-E.y?90:E.x<1-E.y?180:135:.5>E.x?225:.5<E.x?45:0;else{if(E.$c()&&(ot=P0(this,y),ot!==null))switch(ot.Nc){case 1:ot=270;break t;case 2:ot=180;break t;default:case 4:ot=0;break t;case 8:ot=90;break t}ot=y.ga(rr,Qt.alloc()),this.pointsCount>(z?6:2)?(rt=b?this.i(1):this.i(this.pointsCount-2),rt=z?uv(ot,rt.copy()):x):(x=Qt.alloc(),rt=rt.ga(rr,x),Qt.free(x)),x=Math.abs(rt.x-ot.x)>Math.abs(rt.y-ot.y)?rt.x>=ot.x?0:180:rt.y>=ot.y?90:270,Qt.free(ot),ot=x}return E.Mc()&&tt.Td(a)&&(ot+=180,360<=ot&&(ot-=360)),Eg(E)||(a=y.li(),a===0)||(45<=a&&135>a?ot+=90:135<=a&&225>a?ot+=180:225<=a&&315>a&&(ot+=270),360<=ot&&(ot-=360)),ot},Rn.prototype.computeEndSegmentLength=function(a,y,x,E){return y!==null&&x.$c()&&(a=P0(this,y),a!==null)?a.Ju:(a=E?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=E?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},Rn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=rr:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===es?Ar:y)):(a=y||this.toPort,a===null?a=rr:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===es?Ar:y)),a};function Eg(a){return a===Ar||a.x===.5&&a.y===.5}function F0(a){return a.x===.5&&a.y===.5?a:rr}Rn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Ja&&4<this.pointsCount?this.computeMidPoint(new Qt):(a=y.Zn,a=a!==null?h1(a,this):null,a!==null?a.Zo:y.ga(rr))},Rn.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},Rn.prototype.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=Yi.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return Nm(this,y,x,b),z===void 0&&Yi.free(tt),!0;if(this.Yc(a,tt)){var rt=!1;if(!this.isAtomic)for(var ot=this.O.s,lt=ot.length;lt--;){var ut=ot[lt];if(ut.visible||ut===this.locationObject){var ft=ut.actualBounds,yt=this.naturalBounds;if(!(ft.x>yt.width||ft.y>yt.height||0>ft.x+ft.width||0>ft.y+ft.height)){if(ft=Yi.alloc(),ft.set(tt),ut instanceof Bn)rt=ut.Cf(a,y,x,E,b,ft);else if(this.path===ut){if(ut instanceof vr)if(rt=a,yt=E,ut.pickable===!1)rt=!1;else if(ft.multiply(ut.transform),yt)t:{var Mt=rt,bt=ft;if(ut.fh(Mt,bt))rt=!0;else{if(bt===void 0&&(bt=ut.transform,Mt.Re(ut.actualBounds))){rt=!0;break t}rt=Mt.left,yt=Mt.right;var Dt=Mt.top;Mt=Mt.bottom;var qt=Qt.alloc(),Vt=Qt.alloc(),oe=Qt.alloc(),ce=Yi.alloc();ce.set(bt),ce.bv(ut.transform),ce.Vj(),Vt.x=yt,Vt.y=Dt,Vt.transform(ce),qt.x=rt,qt.y=Dt,qt.transform(ce),bt=!1,qd(ut,qt,Vt,oe)?bt=!0:(qt.x=yt,qt.y=Mt,qt.transform(ce),qd(ut,qt,Vt,oe)?bt=!0:(Vt.x=rt,Vt.y=Mt,Vt.transform(ce),qd(ut,qt,Vt,oe)?bt=!0:(qt.x=rt,qt.y=Dt,qt.transform(ce),qd(ut,qt,Vt,oe)&&(bt=!0)))),Yi.free(ce),Qt.free(qt),Qt.free(Vt),Qt.free(oe),rt=bt}}else rt=ut.fh(rt,ft)}else rt=Rs(ut,a,E,ft);rt&&(yt=ut,y!==null&&(yt=y(ut)),yt&&(x===null||x(yt))&&b.add(yt)),Yi.free(ft)}}}return z===void 0&&Yi.free(tt),rt||this.background!==null||this.areaBackground!==null}return z===void 0&&Yi.free(tt),!1},Rn.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?ql:this.curve},Rn.prototype.computeCorner=function(){if(this.curve===ql)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Rn.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];if(b!==a&&!b.isPanelMain&&(b.segmentIndex===-1/0||isNaN(b.segmentIndex)))return b}for(a=this.labelNodes;a.next();)if(y=a.value,y.segmentIndex===-1/0||isNaN(y.segmentIndex))return y;return null},Rn.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=a1;a=Math.max(a,this.computeThickness());var y=this.fromPort,x=this.toPort;if(y!==null&&x!==null){var E=this.findMidLabel();if(E!==null){var b=E.naturalBounds,z=E.margin,tt=isNaN(b.width)?30:b.width*E.scale+z.left+z.right;b=isNaN(b.height)?14:b.height*E.scale+z.top+z.bottom,E=E.segmentOrientation,E===pp||E===b0||E===fv?a=Math.max(a,b):E===vp||E===wp||E===mp||E===yp?a=Math.max(a,tt):(y=y.ga(rr).ab(x.ga(rr))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*tt)+Math.abs(Math.cos(y)*b)+1)),this.curve===ql&&(a*=1.333)}}return a},Rn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Ja&&x.bb()}},Rn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=s1;var y=this.Sf;if(y!==null){for(var x=rn(),E=0,b=y.links,z=0;z<b.length;z++){var tt=b[z].computeSpacing();x.push(tt),E+=tt}for(E=-E/2,z=0;z<b.length;z++){if(b[z]===this){a=E+x[z]/2;break}E+=x[z]}y.Ds===this.fromNode&&(a=-a),Ve(x)}}return a},Rn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Rn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Rn.prototype.adjustPoints=function(a,y,x,E){var b=this.computeAdjusting();if(this.isOrthogonal){if(b===M0)return!1;b===k0&&(b=gp)}switch(b){case M0:var z=this.i(a),tt=this.i(x);if(!z.Xa(y)||!tt.Xa(E)){b=z.x,z=z.y;var rt=tt.x-b,ot=tt.y-z,lt=Math.sqrt(rt*rt+ot*ot);if(!Ce.$(lt,0)){if(Ce.$(rt,0))var ut=0>ot?-Math.PI/2:Math.PI/2;else ut=Math.atan(ot/Math.abs(rt)),0>rt&&(ut=Math.PI-ut);tt=y.x;var ft=y.y;rt=E.x-tt;var yt=E.y-ft;for(ot=Math.sqrt(rt*rt+yt*yt),Ce.$(rt,0)?yt=0>yt?-Math.PI/2:Math.PI/2:(yt=Math.atan(yt/Math.abs(rt)),0>rt&&(yt=Math.PI-yt)),lt=ot/lt,ut=yt-ut,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),rt=y.x-b,ot=y.y-z,y=Math.sqrt(rt*rt+ot*ot),Ce.$(y,0)||(Ce.$(rt,0)?ot=0>ot?-Math.PI/2:Math.PI/2:(ot=Math.atan(ot/Math.abs(rt)),0>rt&&(ot=Math.PI-ot)),rt=ot+ut,y*=lt,this.L(a,tt+y*Math.cos(rt),ft+y*Math.sin(rt)));this.dd(x,E)}}return!0;case k0:if(z=this.i(a),ft=this.i(x),!z.Xa(y)||!ft.Xa(E)){b=z.x,z=z.y,tt=ft.x,ft=ft.y,lt=(tt-b)*(tt-b)+(ft-z)*(ft-z),rt=y.x,ut=y.y,ot=E.x,yt=E.y;var Mt=1;if(ot-rt!==0){var bt=(yt-ut)/(ot-rt);Mt=Math.sqrt(1+1/(bt*bt))}else bt=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var Dt=y.x,qt=y.y,Vt=.5;lt!==0&&(Vt=((b-Dt)*(b-tt)+(z-qt)*(z-ft))/lt);var oe=b+Vt*(tt-b),ce=z+Vt*(ft-z);y=Math.sqrt((Dt-oe)*(Dt-oe)+(qt-ce)*(qt-ce)),qt<bt*(Dt-oe)+ce&&(y=-y),0<bt&&(y=-y),Dt=rt+Vt*(ot-rt),Vt=ut+Vt*(yt-ut),bt!==0?(y=Dt+y/Mt,this.L(a,y,Vt-(y-Dt)/bt)):this.L(a,Dt,Vt+y)}this.dd(x,E)}return!0;case gp:t:{if(this.isOrthogonal&&(b=this.i(a),z=this.i(a+1),tt=this.i(a+2),rt=z.x,ut=z.y,ft=rt,lt=ut,Ce.B(b.y,z.y)?Ce.B(z.x,tt.x)?ut=y.y:Ce.B(z.y,tt.y)&&(rt=y.x):Ce.B(b.x,z.x)&&(Ce.B(z.y,tt.y)?rt=y.x:Ce.B(z.x,tt.x)&&(ut=y.y)),this.L(a+1,rt,ut),b=this.i(x),z=this.i(x-1),tt=this.i(x-2),rt=z.x,ut=z.y,ot=rt,yt=ut,Ce.B(b.y,z.y)?Ce.B(z.x,tt.x)?ut=E.y:Ce.B(z.y,tt.y)&&(rt=E.x):Ce.B(b.x,z.x)&&(Ce.B(z.y,tt.y)?rt=E.x:Ce.B(z.x,tt.x)&&(ut=E.y)),this.L(x-1,rt,ut),Av(this))){this.L(a+1,ft,lt),this.L(x-1,ot,yt),x=!1;break t}this.dd(a,y),this.dd(x,E),x=!0}return x;default:return!1}},Rn.prototype.addOrthoPoints=function(a,y,x,E,b,z){0>y?y+=360:360<=y&&(y-=360),0>E?E+=360:360<=E&&(E-=360);var tt=E;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,E=315<=E||45>E?0:45<=E&&135>E?90:135<=E&&225>E?180:270;var rt=b.actualBounds.copy(),ot=z.actualBounds.copy();if(rt.w()&&ot.w()){rt.Bc(xp,xp),ot.Bc(xp,xp),rt.Ye(a),ot.Ye(x);var lt=Qt.alloc(),ut=Qt.alloc();y===0?x.x>a.x||E===270&&x.y<a.y&&ot.right>a.x||E===90&&x.y>a.y&&ot.right>a.x?(lt.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),E===180?(lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ut.x=lt.x,ut.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(lt.x=a.x<ot.left?this.computeMidOrthoPosition(a.x,a.y,ot.left,x.y,!1):a.x<ot.right&&(E===270&&a.y<ot.top||E===90&&a.y>ot.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ot.right,ut.x=lt.x,ut.y=x.y):E===0&&a.x<ot.left&&a.y>ot.top&&a.y<ot.bottom&&(lt.x=a.x,lt.y=a.y<x.y?Math.min(x.y,ot.top):Math.max(x.y,ot.bottom),ut.y=lt.y)):(lt.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),(E===180||E===90&&x.y<rt.top||E===270&&x.y>rt.bottom)&&(E===180&&(ot.ca(a)||rt.ca(x))?lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===180||E===90)?lt.y=this.computeMidOrthoPosition(a.x,rt.top,x.x,Math.max(x.y,ot.bottom),!0):x.y>a.y&&(E===180||E===270)&&(lt.y=this.computeMidOrthoPosition(a.x,rt.bottom,x.x,Math.min(x.y,ot.top),!0)),ut.x=x.x,ut.y=lt.y),lt.y>rt.top&&lt.y<rt.bottom&&(x.x>=rt.left&&x.x<=a.x||a.x<=ot.right&&a.x>=x.x?(E===90||E===270)&&(lt.h(Math.max((a.x+x.x)/2,a.x),a.y),ut.h(lt.x,x.y)):(lt.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===0?rt.top:Math.min(rt.top,ot.top)):Math.max(x.y,E===0?rt.bottom:Math.max(rt.bottom,ot.bottom)),ut.x=x.x,ut.y=lt.y))):y===180?x.x<a.x||E===270&&x.y<a.y&&ot.left<a.x||E===90&&x.y>a.y&&ot.left<a.x?(lt.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),E===0?(lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ut.x=lt.x,ut.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(lt.x=a.x>ot.right?this.computeMidOrthoPosition(a.x,a.y,ot.right,x.y,!1):a.x>ot.left&&(E===270&&a.y<ot.top||E===90&&a.y>ot.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ot.left,ut.x=lt.x,ut.y=x.y):E===180&&a.x>ot.right&&a.y>ot.top&&a.y<ot.bottom&&(lt.x=a.x,lt.y=a.y<x.y?Math.min(x.y,ot.top):Math.max(x.y,ot.bottom),ut.y=lt.y)):(lt.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),(E===0||E===90&&x.y<rt.top||E===270&&x.y>rt.bottom)&&(E===0&&(ot.ca(a)||rt.ca(x))?lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===0||E===90)?lt.y=this.computeMidOrthoPosition(a.x,rt.top,x.x,Math.max(x.y,ot.bottom),!0):x.y>a.y&&(E===0||E===270)&&(lt.y=this.computeMidOrthoPosition(a.x,rt.bottom,x.x,Math.min(x.y,ot.top),!0)),ut.x=x.x,ut.y=lt.y),lt.y>rt.top&&lt.y<rt.bottom&&(x.x<=rt.right&&x.x>=a.x||a.x>=ot.left&&a.x<=x.x?(E===90||E===270)&&(lt.h(Math.min((a.x+x.x)/2,a.x),a.y),ut.h(lt.x,x.y)):(lt.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===180?rt.top:Math.min(rt.top,ot.top)):Math.max(x.y,E===180?rt.bottom:Math.max(rt.bottom,ot.bottom)),ut.x=x.x,ut.y=lt.y))):y===90?x.y>a.y||E===180&&x.x<a.x&&ot.bottom>a.y||E===0&&x.x>a.x&&ot.bottom>a.y?(lt.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),E===270?(lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ut.x=x.x,ut.y=lt.y):E===180&&x.x<a.x||E===0&&x.x>a.x?(lt.y=a.y<ot.top?this.computeMidOrthoPosition(a.x,a.y,x.x,ot.top,!0):a.y<ot.bottom&&(E===180&&a.x<ot.left||E===0&&a.x>ot.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ot.bottom,ut.x=x.x,ut.y=lt.y):E===90&&a.y<ot.top&&a.x>ot.left&&a.x<ot.right&&(lt.x=a.x<x.x?Math.min(x.x,ot.left):Math.max(x.x,ot.right),lt.y=a.y,ut.x=lt.x)):(lt.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),(E===270||E===0&&x.x<rt.left||E===180&&x.x>rt.right)&&(E===270&&(ot.ca(a)||rt.ca(x))?lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===270||E===0)?lt.x=this.computeMidOrthoPosition(rt.left,a.y,Math.max(x.x,ot.right),x.y,!1):x.x>a.x&&(E===270||E===180)&&(lt.x=this.computeMidOrthoPosition(rt.right,a.y,Math.min(x.x,ot.left),x.y,!1)),ut.x=lt.x,ut.y=x.y),lt.x>rt.left&&lt.x<rt.right&&(x.y>=rt.top&&x.y<=a.y||a.y<=ot.bottom&&a.y>=x.y?(E===0||E===180)&&(lt.h(a.x,Math.max((a.y+x.y)/2,a.y)),ut.h(x.x,lt.y)):(lt.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===90?rt.left:Math.min(rt.left,ot.left)):Math.max(x.x,E===90?rt.right:Math.max(rt.right,ot.right)),ut.x=lt.x,ut.y=x.y))):x.y<a.y||E===180&&x.x<a.x&&ot.top<a.y||E===0&&x.x>a.x&&ot.top<a.y?(lt.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),E===90?(lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ut.x=x.x,ut.y=lt.y):E===180&&x.x<a.x||E===0&&x.x>=a.x?(lt.y=a.y>ot.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,ot.bottom,!0):a.y>ot.top&&(E===180&&a.x<ot.left||E===0&&a.x>ot.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ot.top,ut.x=x.x,ut.y=lt.y):E===270&&a.y>ot.bottom&&a.x>ot.left&&a.x<ot.right&&(lt.x=a.x<x.x?Math.min(x.x,ot.left):Math.max(x.x,ot.right),lt.y=a.y,ut.x=lt.x)):(lt.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),(E===90||E===0&&x.x<rt.left||E===180&&x.x>rt.right)&&(E===90&&(ot.ca(a)||rt.ca(x))?lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===90||E===0)?lt.x=this.computeMidOrthoPosition(rt.left,a.y,Math.max(x.x,ot.right),x.y,!1):x.x>a.x&&(E===90||E===180)&&(lt.x=this.computeMidOrthoPosition(rt.right,a.y,Math.min(x.x,ot.left),x.y,!1)),ut.x=lt.x,ut.y=x.y),lt.x>rt.left&&lt.x<rt.right&&(x.y<=rt.bottom&&x.y>=a.y||a.y>=ot.top&&a.y<=x.y?(E===0||E===180)&&(lt.h(a.x,Math.min((a.y+x.y)/2,a.y)),ut.h(x.x,lt.y)):(lt.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===270?rt.left:Math.min(rt.left,ot.left)):Math.max(x.x,E===270?rt.right:Math.max(rt.right,ot.right)),ut.x=lt.x,ut.y=x.y)));var ft=x;if(this.isAvoiding){var yt=this.diagram;if(yt===null||b===z||this.layer.isTemporary||!Kd(yt)||rt.ca(ft)&&!z.Td(b)||ot.ca(a)&&!b.Td(z))y=!1;else{var Mt=ed(yt,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Mt.Yj(Math.min(a.x,lt.x),Math.min(a.y,lt.y),Math.abs(a.x-lt.x),Math.abs(a.y-lt.y))&&Mt.Yj(Math.min(lt.x,ut.x),Math.min(lt.y,ut.y),Math.abs(lt.x-ut.x),Math.abs(lt.y-ut.y))&&Mt.Yj(Math.min(ut.x,ft.x),Math.min(ut.y,ft.y),Math.abs(ut.x-ft.x),Math.abs(ut.y-ft.y)))y=!1;else{b=a,z=ft;var bt=x=null;if(yt.isVirtualized){yt=Mt.bounds.copy(),yt.Bc(-Mt.Ho,-Mt.Go);var Dt=Qt.alloc();Mg(Mt,a.x,a.y)||(Ce.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,a.x,a.y,lt.x,lt.y,Dt)?(x=a=Dt.copy(),y=Dt.ab(lt)):Ce.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,lt.x,lt.y,ut.x,ut.y,Dt)?(x=a=Dt.copy(),y=Dt.ab(ut)):Ce.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,ut.x,ut.y,ft.x,ft.y,Dt)&&(x=a=Dt.copy(),y=Dt.ab(ft))),Mg(Mt,ft.x,ft.y)||(Ce.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,ft.x,ft.y,ut.x,ut.y,Dt)?(bt=ft=Dt.copy(),E=ut.ab(Dt)):Ce.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,ut.x,ut.y,lt.x,lt.y,Dt)?(bt=ft=Dt.copy(),E=lt.ab(Dt)):Ce.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,lt.x,lt.y,a.x,a.y,Dt)&&(bt=ft=Dt.copy(),E=a.ab(Dt))),Qt.free(Dt)}rt=rt.copy().ed(ot),rt.Bc(Mt.Ho*Mt.Os,Mt.Go*Mt.Os),u1(Mt,a,y,ft,E,rt,!0),ot=ih(Mt,ft.x,ft.y),!Mt.abort&&ot>=kg&&(l1(Mt),rt.Bc(Mt.Ho*Mt.Hx,Mt.Go*Mt.Ix),u1(Mt,a,y,ft,E,rt,!1),ot=ih(Mt,ft.x,ft.y)),!Mt.abort&&ot<kg&&ih(Mt,ft.x,ft.y)!==Cc?(hv(this,Mt,ft.x,ft.y,E,!0,tt),rt=this.i(2),4>this.pointsCount?(y===0||y===180?(rt.x=a.x,rt.y=ft.y):(rt.x=ft.x,rt.y=a.y),this.L(2,rt.x,rt.y),this.m(3,rt.x,rt.y)):(tt=this.i(3),y===0||y===180?Ce.B(rt.x,tt.x)?(rt=y===0?Math.max(rt.x,a.x):Math.min(rt.x,a.x),this.L(2,rt,a.y),this.L(3,rt,tt.y)):Ce.B(rt.y,tt.y)?(Math.abs(a.y-rt.y)<=Mt.Go/2&&(this.L(2,rt.x,a.y),this.L(3,tt.x,a.y)),this.m(2,rt.x,a.y)):this.L(2,a.x,rt.y):(y===90||y===270)&&(Ce.B(rt.y,tt.y)?(rt=y===90?Math.max(rt.y,a.y):Math.min(rt.y,a.y),this.L(2,a.x,rt),this.L(3,tt.x,rt)):Ce.B(rt.x,tt.x)?(Math.abs(a.x-rt.x)<=Mt.Ho/2&&(this.L(2,a.x,rt.y),this.L(3,a.x,tt.y)),this.m(2,a.x,rt.y)):this.L(2,rt.x,a.y))),x!==null&&(a=this.i(1),tt=this.i(2),a.x!==tt.x&&a.y!==tt.y?y===0||y===180?this.m(2,a.x,tt.y):this.m(2,tt.x,a.y):y===0||y===180?this.m(2,b.x,x.y):this.m(2,x.x,b.y)),bt!==null&&(E===0||E===180?this.yf(z.x,bt.y):this.yf(bt.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(lt.copy()),this.ne(ut.copy())),Qt.free(lt),Qt.free(ut)}},Rn.prototype.computeMidOrthoPosition=function(a,y,x,E,b){var z=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(z=this.computeCurviness()),b?(y+E)/2+z:(a+x)/2+z};function Av(a){if(a.diagram===null||!a.isAvoiding||!Kd(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=ed(a.diagram,!0,a.containingGroup,null);for(var E=1;E<x-2;E++){var b=y[E],z=y[E+1];if(!a.Yj(Math.min(b.x,z.x),Math.min(b.y,z.y),Math.abs(b.x-z.x),Math.abs(b.y-z.y)))return!0}return!1}function hv(a,y,x,E,b,z,tt){var rt=y.Ho,ot=y.Go,lt=ih(y,x,E),ut=x,ft=E;for(b===0?ut+=rt:b===90?ft+=ot:b===180?ut-=rt:ft-=ot,b!==tt&&lt>ef&&ih(y,ut,ft)!==lt-1&&(ih(y,x-rt,E)===lt-1?(b=180,ut=x-rt,ft=E):ih(y,x+rt,E)===lt-1?(b=0,ut=x+rt,ft=E):ih(y,x,E-ot)===lt-1?(b=270,ut=x,ft=E-ot):ih(y,x,E+ot)===lt-1&&(b=90,ut=x,ft=E+ot));lt>ef&&ih(y,ut,ft)===lt-1;)x=ut,E=ft,b===0?ut+=rt:b===90?ft+=ot:b===180?ut-=rt:ft-=ot,--lt;z?lt>ef&&(b===180||b===0?x=Math.floor(x/rt)*rt+rt/2:(b===90||b===270)&&(E=Math.floor(E/ot)*ot+ot/2)):(x=Math.floor(x/rt)*rt+rt/2,E=Math.floor(E/ot)*ot+ot/2),lt>ef&&(z=b,tt=x,ut=E,b===0?(z=90,ut+=ot):b===90?(z=180,tt-=rt):b===180?(z=270,ut-=ot):b===270&&(z=0,tt+=rt),ih(y,tt,ut)===lt-1?hv(a,y,tt,ut,z,!1,z):(tt=x,ut=E,b===0?(z=270,ut-=ot):b===90?(z=0,tt+=rt):b===180?(z=90,ut+=ot):b===270&&(z=180,tt-=rt),ih(y,tt,ut)===lt-1&&hv(a,y,tt,ut,z,!1,z))),a.yf(x,E)}Rn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),E=this.i(1),b=sn(y,a,x.x,x.y,E.x,E.y),z=0,tt=1;tt<this.pointsCount-1;tt++){x=this.i(tt+1);var rt=sn(y,a,E.x,E.y,x.x,x.y);E=x,rt<b&&(z=tt,b=rt)}return z},Rn.prototype.qc=function(){this.lk=!1,this.v()},Rn.prototype.Ul=function(a){if(!(!a&&(this.fd===!1||(a=this.Pb(),this.lk&&(a===null||a.geometry!==null))))&&(2>this.pointsCount?this.lk=!0:this.ua=this.makeGeometry(),a=this.path,a!==null)){a.ua=this.ua;for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];b!==a&&b.isPanelMain&&b instanceof vr&&(b.ua=this.ua)}}},Rn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,E=this.diagram;E!==null&&tf(this)&&E.Eh.contains(this)&&(this.ml.width!==0||this.ml.height!==0)&&(E.animationManager.isAnimating||E.currentTool!==E.toolManager)&&(x=!0);var b=this.i(0).copy(),z=b.copy();E=this.Nb.s;var tt=this.computeCurve();if(tt===ql&&3<=y&&!Ce.$(this.smoothness,0))if(y===3){var rt=this.i(1);E=Math.min(b.x,rt.x);var ot=Math.min(b.y,rt.y);rt=this.i(2),E=Math.min(E,rt.x),ot=Math.min(ot,rt.y)}else{if(this.isOrthogonal)for(ot=0;ot<y;ot++)rt=E[ot],z.x=Math.min(rt.x,z.x),z.y=Math.min(rt.y,z.y);else for(E=3;E<y;E+=3)E+3>=y&&(E=y-1),ot=this.i(E),z.x=Math.min(ot.x,z.x),z.y=Math.min(ot.y,z.y);E=z.x,ot=z.y}else{for(ot=0;ot<y;ot++)rt=E[ot],z.x=Math.min(rt.x,z.x),z.y=Math.min(rt.y,z.y);E=z.x,ot=z.y}if(E-=this.su.x,ot-=this.su.y,b.x-=E,b.y-=ot,y!==2||tf(this)){if(a.type=bn.o,rt=Dy(a),this.computeShortLength(!0)!==0&&(b=_f(this,b,!0,z)),Pg(rt,b.x,b.y,!1),tt===ql&&3<=y&&!Ce.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-E,x=x.y-ot,b=this.i(2).copy(),b.x-=E,b.y-=ot,this.computeShortLength(!1)!==0&&(b=_f(this,b,!1,z)),yc(rt,y,x,y,x,b.x,b.y);else if(this.isOrthogonal){y=Qt.allocAt(E,ot),x=Qt.alloc(),x.assign(this.i(1)),z=Qt.allocAt(E,ot),b=Qt.allocAt(E,ot),tt=this.i(0);for(var lt,ut=this.smoothness/3,ft=1;ft<this.pointsCount-1;ft++){lt=this.i(ft);var yt=tt,Mt=lt,bt=this.i(cv(this,lt,ft,!1));if((!Ce.$(yt.x,Mt.x)||!Ce.$(Mt.x,bt.x))&&(!Ce.$(yt.y,Mt.y)||!Ce.$(Mt.y,bt.y))){var Dt=ut;isNaN(Dt)&&(Dt=this.smoothness/3);var qt=yt.x;yt=yt.y;var Vt=Mt.x;Mt=Mt.y;var oe=bt.x;bt=bt.y;var ce=Dt*E0(qt,yt,Vt,Mt);Dt*=E0(Vt,Mt,oe,bt),Ce.$(yt,Mt)&&Ce.$(Vt,oe)&&(Vt>qt?bt>Mt?(z.x=Vt-ce,z.y=Mt-ce,b.x=Vt+Dt,b.y=Mt+Dt):(z.x=Vt-ce,z.y=Mt+ce,b.x=Vt+Dt,b.y=Mt-Dt):bt>Mt?(z.x=Vt+ce,z.y=Mt-ce,b.x=Vt-Dt,b.y=Mt+Dt):(z.x=Vt+ce,z.y=Mt+ce,b.x=Vt-Dt,b.y=Mt-Dt)),Ce.$(qt,Vt)&&Ce.$(Mt,bt)&&(Mt>yt?(oe>Vt?(z.x=Vt-ce,z.y=Mt-ce,b.x=Vt+Dt):(z.x=Vt+ce,z.y=Mt-ce,b.x=Vt-Dt),b.y=Mt+Dt):(oe>Vt?(z.x=Vt-ce,z.y=Mt+ce,b.x=Vt+Dt):(z.x=Vt+ce,z.y=Mt+ce,b.x=Vt-Dt),b.y=Mt-Dt)),(Ce.$(qt,Vt)&&Ce.$(Vt,oe)||Ce.$(yt,Mt)&&Ce.$(Mt,bt))&&(qt=.5*(qt+oe),yt=.5*(yt+bt),z.x=qt,z.y=yt,b.x=qt,b.y=yt),(ft===1||ft===2&&Ce.$(tt.x,this.i(0).x)&&Ce.$(tt.y,this.i(0).y))&&(x.x=.5*(tt.x+lt.x),x.y=.5*(tt.y+lt.y)),yc(rt,x.x-E,x.y-ot,z.x-E,z.y-ot,lt.x-E,lt.y-ot),y.set(z),x.set(b),tt=lt}}lt=tt.x,tt=tt.y,ut=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ut=_f(this,ut.copy(),!1,ye)),lt=.5*(lt+ut.x),tt=.5*(tt+ut.y),yc(rt,b.x-E,b.y-ot,lt-E,tt-ot,ut.x-E,ut.y-ot),Qt.free(y),Qt.free(x),Qt.free(z),Qt.free(b)}else for(x=3;x<y;x+=3)z=this.i(x-2),x+3>=y&&(x=y-1),b=this.i(x-1),tt=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(tt=_f(this,tt.copy(),!1,ye)),yc(rt,z.x-E,z.y-ot,b.x-E,b.y-ot,tt.x-E,tt.y-ot);else{for(z=Qt.alloc(),z.assign(this.i(0)),b=Qt.alloc(),b.assign(z),tt=this.computeCorner(),ft=1,lt=0;ft<y;){if(ft=cv(this,z,ft,1<ft),ut=this.i(ft),ft>=y-1){if(!z.D(ut))this.computeShortLength(!1)!==0&&(ut=_f(this,ut.copy(),!1,ye)),Kf(this,rt,-E,-ot,z,ut,x);else if(lt===0)for(ft=1;ft<y;)b.assign(z),ut=this.i(ft++),Kf(this,rt,-E,-ot,z,ut,x),z.assign(ut);break}if(lt=cv(this,ut,ft+1,ft<y-3),ft=-E,qt=-ot,yt=ut,Vt=this.i(lt),Dt=x,Ce.B(z.y,yt.y)&&Ce.B(yt.x,Vt.x))if(bt=Math.min(tt,Math.abs(yt.x-b.x)/2),bt=ce=Math.min(bt,Math.abs(Vt.y-yt.y)/2),Ce.B(bt,0))Kf(this,rt,ft,qt,z,yt,Dt),z.assign(yt);else{var ge=yt.x,Se=yt.y;Mt=ge,oe=Se,yt.x>z.x?ge=yt.x-bt:ge=yt.x+bt,Vt.y>yt.y?oe=yt.y+ce:oe=yt.y-ce,Vt=Qt.allocAt(ge,Se),Kf(this,rt,ft,qt,z,Vt,Dt),Qt.free(Vt),m0(rt,yt.x+ft,yt.y+qt,Mt+ft,oe+qt),z.h(Mt,oe)}else Ce.B(z.x,yt.x)&&Ce.B(yt.y,Vt.y)?(bt=Math.min(tt,Math.abs(yt.y-b.y)/2),bt=ce=Math.min(bt,Math.abs(Vt.x-yt.x)/2),Ce.B(ce,0)?(Kf(this,rt,ft,qt,z,yt,Dt),z.assign(yt)):(ge=yt.x,Se=yt.y,Mt=ge,oe=Se,yt.y>z.y?Se=yt.y-bt:Se=yt.y+bt,Vt.x>yt.x?Mt=yt.x+ce:Mt=yt.x-ce,Vt=Qt.allocAt(ge,Se),Kf(this,rt,ft,qt,z,Vt,Dt),Qt.free(Vt),m0(rt,yt.x+ft,yt.y+qt,Mt+ft,oe+qt),z.h(Mt,oe))):(Kf(this,rt,ft,qt,z,yt,Dt),z.assign(yt));b.assign(ut),ft=lt}Qt.free(z)}v0=rt}else rt=this.i(1).copy(),rt.x-=E,rt.y-=ot,this.computeShortLength(!0)!==0&&(b=_f(this,b,!0,z)),this.computeShortLength(!1)!==0&&(rt=_f(this,rt,!1,z)),a.type=bn.j,a.startX=b.x,a.startY=b.y,a.endX=rt.x,a.endY=rt.y;return this.lk=!0,a};function E0(a,y,x,E){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=E-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),Ce.$(a,0)?y:Ce.$(y,0)?a:Math.sqrt(a*a+y*y)))}function _f(a,y,x,E){var b=a.pointsCount;if(2>b)return y;if(x){var z=a.i(1);if(x=z.x-E.x,z=z.y-E.y,E=E0(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!0),a>b&&(a=b),b=a*(z-y.y)/E,y.x+=a*(x-y.x)/E,y.y+=b}else{if(z=a.i(b-2),x=z.x-E.x,z=z.y-E.y,E=E0(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!1),a>b&&(a=b),b=a*(y.y-z)/E,y.x-=a*(y.x-x)/E,y.y-=b}return y}function cv(a,y,x,E){for(var b=a.pointsCount,z=y;Ce.$(y.x,z.x)&&Ce.$(y.y,z.y);){if(x>=b)return b-1;z=a.i(x++)}if(!Ce.$(y.x,z.x)&&!Ce.$(y.y,z.y))return x-1;for(var tt=z;Ce.$(y.x,z.x)&&Ce.$(z.x,tt.x)&&(!E||(y.y>=z.y?z.y>=tt.y:z.y<=tt.y))||Ce.$(y.y,z.y)&&Ce.$(z.y,tt.y)&&(!E||(y.x>=z.x?z.x>=tt.x:z.x<=tt.x));){if(x>=b)return b-1;tt=a.i(x++)}return x-2}Rn.prototype.computeJumpLength=function(){return 10};function Kf(a,y,x,E,b,z,tt){if(!tt&&tf(a)){tt=a.computeJumpLength();var rt=tt/2,ot=[],lt=0;if(a.isVisible()&&(lt=Tw(a,b,z,ot)),0<lt){if(Ce.B(b.y,z.y))if(b.x<z.x)for(var ut=0;ut<lt;){var ft=Math.max(b.x,Math.min(ot[ut++]-rt,z.x-tt));y.lineTo(ft+x,z.y+E);for(var yt=ft+x,Mt=Math.min(ft+tt,z.x);ut<lt&&(ft=ot[ut],ft<Mt+tt);)ut++,Mt=Math.min(ft+rt,z.x);ft=z.y-tt+E,Mt+=x;var bt=z.y+E;a.curve===Bc?Pg(y,Mt,bt,!1):yc(y,yt,ft,Mt,ft,Mt,bt)}else for(--lt;0<=lt;){for(ut=Math.min(b.x,Math.max(ot[lt--]+rt,z.x+tt)),y.lineTo(ut+x,z.y+E),yt=ut+x,ft=Math.max(ut-tt,z.x);0<=lt&&(ut=ot[lt],ut>ft-tt);)lt--,ft=Math.max(ut-rt,z.x);ut=z.y-tt+E,ft+=x,Mt=z.y+E,a.curve===Bc?Pg(y,ft,Mt,!1):yc(y,yt,ut,ft,ut,ft,Mt)}else if(Ce.B(b.x,z.x))if(b.y<z.y)for(ut=0;ut<lt;){for(ft=Math.max(b.y,Math.min(ot[ut++]-rt,z.y-tt)),y.lineTo(z.x+x,ft+E),yt=ft+E,ft=Math.min(ft+tt,z.y);ut<lt&&(Mt=ot[ut],Mt<ft+tt);)ut++,ft=Math.min(Mt+rt,z.y);Mt=z.x-tt+x,bt=z.x+x,ft+=E,a.curve===Bc?Pg(y,bt,ft,!1):yc(y,Mt,yt,Mt,ft,bt,ft)}else for(--lt;0<=lt;){for(ut=Math.min(b.y,Math.max(ot[lt--]+rt,z.y+tt)),y.lineTo(z.x+x,ut+E),yt=ut+E,ut=Math.max(ut-tt,z.y);0<=lt&&(ft=ot[lt],ft>ut-tt);)lt--,ut=Math.max(ft-rt,z.y);ft=z.x-tt+x,Mt=z.x+x,ut+=E,a.curve===Bc?Pg(y,Mt,ut,!1):yc(y,ft,yt,ft,ut,Mt,ut)}}}y.lineTo(z.x+x,z.y+E)}function Tw(a,y,x,E){var b=a.diagram;if(b===null||y.D(x))return 0;for(b=b.layers;b.next();){var z=b.value;if(z!==null&&z.visible){z=z.Pa.s;for(var tt=z.length,rt=0;rt<tt;rt++){var ot=z[rt];if(ot instanceof Rn){if(ot===a)return 0<E.length&&E.sort(function(ut,ft){return ut-ft}),E.length;if(ot.isVisible()&&tf(ot)){var lt=ot.routeBounds;lt.w()&&a.routeBounds.Yc(lt)&&!a.usesSamePort(ot)&&(lt=ot.path,lt!==null&&lt.Ed()&&Nw(y,x,E,ot))}}}}}return 0<E.length&&E.sort(function(ut,ft){return ut-ft}),E.length}function Nw(a,y,x,E){for(var b=Ce.B(a.y,y.y),z=E.pointsCount,tt=E.i(0),rt=Qt.alloc(),ot=1;ot<z;ot++){var lt=E.i(ot);if(ot<z-1){var ut=E.i(ot+1);if(tt.y===lt.y&&lt.y===ut.y){if(lt.x>tt.x&&ut.x>=lt.x||lt.x<tt.x&&ut.x<=lt.x)continue}else if(tt.x===lt.x&&lt.x===ut.x&&(lt.y>tt.y&&ut.y>=lt.y||lt.y<tt.y&&ut.y<=lt.y))continue}t:{ut=a.x;var ft=a.y,yt=y.x,Mt=y.y,bt=tt.x;tt=tt.y;var Dt=lt.x,qt=lt.y;if(Ce.B(ut,yt)){if(!Ce.B(ft,Mt)&&Ce.B(tt,qt)&&Math.min(ft,Mt)<tt&&Math.max(ft,Mt)>tt&&Math.min(bt,Dt)<ut&&Math.max(bt,Dt)>ut&&!Ce.B(bt,Dt)){rt.x=ut,rt.y=tt,ut=!0;break t}}else if(Ce.B(ft,Mt)&&Ce.B(bt,Dt)&&Math.min(ut,yt)<bt&&Math.max(ut,yt)>bt&&Math.min(tt,qt)<ft&&Math.max(tt,qt)>ft&&!Ce.B(tt,qt)){rt.x=bt,rt.y=ft,ut=!0;break t}rt.x=0,rt.y=0,ut=!1}ut&&(b?x.push(rt.x):x.push(rt.y)),tt=lt}Qt.free(rt)}function tf(a){return a=a.curve,a===Lg||a===Bc}function L0(a,y){(y||tf(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()))}Rn.prototype.Xo=function(a){var y=this.layer;if(y!==null&&y.visible&&!y.isTemporary){var x=y.diagram;if(x!==null&&!x.animationManager.isTicking){var E=!1;for(x=x.layers;x.next();){var b=x.value;if(b.visible){if(b===y){E=!0;var z=!1;b=b.Pa.s;for(var tt=b.length,rt=0;rt<tt;rt++){var ot=b[rt];ot instanceof Rn&&(ot===this?z=!0:z&&r1(this,ot,a))}}else if(E)for(z=b.Pa.s,b=z.length,tt=0;tt<b;tt++)rt=z[tt],rt instanceof Rn&&r1(this,rt,a)}}}}};function r1(a,y,x){if(y!==null&&y.lk&&y.fd&&tf(y)){var E=y.routeBounds;E.w()&&(a.routeBounds.Yc(E)||x.Yc(E))&&(a.usesSamePort(y)||y.qc())}}Rn.prototype.usesSamePort=function(a){var y=this.pointsCount,x=a.pointsCount;if(0<y&&0<x){var E=this.i(0),b=a.i(0);if(E.Xa(b)||(y=this.i(y-1),a=a.i(x-1),y.Xa(a)||E.Xa(a)||y.Xa(b)))return!0}else if(this.fromNode===a.fromNode||this.toNode===a.toNode||this.fromNode===a.toNode||this.toNode===a.fromNode)return!0;return!1},Rn.prototype.isVisible=function(){if(!Ti.prototype.isVisible.call(this))return!1;var a=this.containingGroup,y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this.fromNode,x!==null){if(this.isTreeLink&&y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(var E=x;E!==null;){if(E.labeledLink===this)return!0;E=E.containingGroup}if(x=x.findVisibleNode(),x===null||x===a)return!1}if(x=this.toNode,x!==null){if(this.isTreeLink&&!y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(y=x;y!==null;){if(y.labeledLink===this)return!0;y=y.containingGroup}if(y=x.findVisibleNode(),y===null||y===a)return!1}return!0},Rn.prototype.Zb=function(a){if(Ti.prototype.Zb.call(this,a),a&&L0(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},Rn.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?gp:this.qk};function dp(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var E=a.ff,b=a.vf,z=a=null,tt=y.jb.s,rt=tt.length,ot=0;ot<rt;ot++){var lt=tt[ot];(lt.ef===y&&lt.ff===E&&lt.uf===x&&lt.vf===b||lt.ef===x&&lt.ff===b&&lt.uf===y&&lt.vf===E)&&(z===null?z=lt:(a===null&&(a=[],a.push(z)),a.push(lt)))}if(a!==null){for(z=Vy(y,x,E,b),z===null&&(z=new N0(y,E,x,b),jy(y,z),jy(x,z)),z.links=a,y=0;y<a.length;y++)a[y].Sf=z;z.Sl()}}}}function fp(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(Vi(y.links,a),y.Sl()))}Rn.prototype.ph=function(){return!0},Sn.Object.defineProperties(Rn.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&&S0(y,this,x),fp(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var E=this.diagram;E!==null&&E.aa&&E.partManager.setFromNodeForLink(this,a,y);var b=this.fromPort,z=this.fromPortChanged;if(z!==null){var tt=!0;E!==null&&(tt=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=tt)}a!==null&&(this.uf!==a&&x0(a,this,b),dp(this),this.C(1)),this.g("fromNode",y,a),Fg(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&Ul(x),fp(this),this.ff=a;var E=this.fromPort;E!==null&&Ul(E);var b=this.diagram;if(b!==null){var z=this.data,tt=b.model;z!==null&&tt.ri()&&tt.xv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.fromPortChanged,z!==null&&(tt=!0,b!==null&&(tt=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=tt))),dp(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&&S0(y,this,x),fp(this),this.C(2)),this.uf=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var E=this.diagram;E!==null&&E.aa&&E.partManager.setToNodeForLink(this,a,y);var b=this.toPort,z=this.toPortChanged;if(z!==null){var tt=!0;E!==null&&(tt=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=tt)}a!==null&&(this.ef!==a&&x0(a,this,b),dp(this),this.C(1)),this.g("toNode",y,a),Fg(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&Ul(x),fp(this),this.vf=a;var E=this.toPort;E!==null&&Ul(E);var b=this.diagram;if(b!==null){var z=this.data,tt=b.model;z!==null&&tt.ri()&&tt.Cv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.toPortChanged,z!==null&&(tt=!0,b!==null&&(tt=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=tt))),dp(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:es},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&&Ul(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&&Xn(a,">= 0",Rn,"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:es},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&&Ul(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&&Xn(a,">= 0",Rn,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),this.bb())}},toShortLength:{get:function(){return this.ba!==null?this.ba.xj:NaN},set:function(a){var y=this.toShortLength;y!==a&&(this.Xc(),this.ba.xj=a,this.qc(),this.g("toShortLength",y,a))}},isLabeledLink:{get:function(){return this.wd===null?!1:0<this.wd.count}},labelNodes:{get:function(){return this.wd===null?Ri:this.wd.iterator}},relinkableFrom:{get:function(){return(this.Qa&1)!==0},set:function(a){var y=(this.Qa&1)!==0;y!==a&&(this.Qa^=1,this.g("relinkableFrom",y,a),this.Wb())}},relinkableTo:{get:function(){return(this.Qa&2)!==0},set:function(a){var y=(this.Qa&2)!==0;y!==a&&(this.Qa^=2,this.g("relinkableTo",y,a),this.Wb())}},resegmentable:{get:function(){return(this.Qa&4)!==0},set:function(a){var y=(this.Qa&4)!==0;y!==a&&(this.Qa^=4,this.g("resegmentable",y,a),this.Wb())}},isTreeLink:{get:function(){return(this.Qa&8)!==0},set:function(a){var y=(this.Qa&8)!==0;y!==a&&(this.Qa^=8,this.g("isTreeLink",y,a),this.fromNode!==null&&cp(this.fromNode),this.toNode!==null&&cp(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof vr?a:null}},routeBounds:{get:function(){this.vg();var a=this.ml,y=1/0,x=1/0,E=this.pointsCount;if(E===0)a.h(NaN,NaN,0,0);else{if(E===1)E=this.i(0),y=Math.min(E.x,y),x=Math.min(E.y,x),a.h(E.x,E.y,0,0);else if(E===2){E=this.i(0);var b=this.i(1);y=Math.min(E.x,b.x),x=Math.min(E.y,b.y),a.h(E.x,E.y,0,0),a.Ye(b)}else if(this.computeCurve()===ql&&3<=E&&!this.isOrthogonal)if(b=this.i(0),y=b.x,x=b.y,a.h(y,x,0,0),E===3){E=this.i(1),y=Math.min(E.x,y),x=Math.min(E.y,x);var z=this.i(2);y=Math.min(z.x,y),x=Math.min(z.y,x),Ce.Dl(b.x,b.y,E.x,E.y,E.x,E.y,z.x,z.y,.5,a)}else for(z=3;z<E;z+=3){var tt=this.i(z-2);z+3>=E&&(z=E-1);var rt=this.i(z-1),ot=this.i(z);Ce.Dl(b.x,b.y,tt.x,tt.y,rt.x,rt.y,ot.x,ot.y,.5,a),y=Math.min(ot.x,y),x=Math.min(ot.y,x),b=ot}else for(b=this.i(0),z=this.i(1),y=Math.min(b.x,z.x),x=Math.min(b.y,z.y),a.h(b.x,b.y,0,0),a.Ye(z),b=2;b<E;b++)z=this.i(b),y=Math.min(z.x,y),x=Math.min(z.y,x),a.Ye(z);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new Qt)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||C0(this);for(var a=this.cq=[],y=this.pointsCount,x=0;x<y-1;x++){var E=this.i(x),b=this.i(x+1);Ce.$(E.x,b.x)?(E=b.y-E.y,0>E&&(E=-E)):Ce.$(E.y,b.y)?(E=b.x-E.x,0>E&&(E=-E)):E=Math.sqrt(E.Bf(b)),a.push(E)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,E=a=0;E<x;E++)a+=y[E];this.vt=a}return a}},points:{get:function(){return this.Nb},set:function(a){var y=this.Nb;if(y!==a){var x=null;if(Array.isArray(a)){var E=a.length%2===0;if(E){for(var b=0;b<a.length;b++)if(typeof a[b]!="number"||isNaN(a[b])){E=!1;break}}if(E)for(x=new ne,E=0;E<a.length/2;E++)b=new Qt(a[2*E],a[2*E+1]).freeze(),x.add(b);else{for(E=!0,b=0;b<a.length;b++){var z=a[b];if(!qe(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){E=!1;break}}if(E)for(x=new ne,E=0;E<a.length;E++)b=a[E],x.add(new Qt(b.x,b.y).freeze())}}else if(a instanceof ne)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else le("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),C0(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&ph(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||!Eg(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!Eg(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(),L0(this,y===Bc||y===Lg||a===Bc||a===Lg),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(),L0(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)}}}),Rn.prototype.invalidateOtherJumpOvers=Rn.prototype.Xo,Rn.prototype.findClosestSegment=Rn.prototype.ez,Rn.prototype.updateRoute=Rn.prototype.vg,Rn.prototype.invalidateRoute=Rn.prototype.bb,Rn.prototype.rollbackRoute=Rn.prototype.rv,Rn.prototype.commitRoute=Rn.prototype.zf,Rn.prototype.startRoute=Rn.prototype.uh,Rn.prototype.clearPoints=Rn.prototype.Fj,Rn.prototype.removePoint=Rn.prototype.pv,Rn.prototype.addPointAt=Rn.prototype.yf,Rn.prototype.addPoint=Rn.prototype.ne,Rn.prototype.insertPointAt=Rn.prototype.m,Rn.prototype.insertPoint=Rn.prototype.Kz,Rn.prototype.setPointAt=Rn.prototype.L,Rn.prototype.setPoint=Rn.prototype.dd,Rn.prototype.getPoint=Rn.prototype.i,Rn.prototype.getOtherPort=Rn.prototype.Cz,Rn.prototype.getOtherNode=Rn.prototype.To;var Gf=null,zf=null,dv=new Oe(Rn,"Normal",1),Dw=new Oe(Rn,"Orthogonal",2),Iw=new Oe(Rn,"AvoidsNodes",6),o1=new Oe(Rn,"AvoidsNodesStraight",7),Ja=new Oe(Rn,"None",0),ql=new Oe(Rn,"Bezier",9),Bc=new Oe(Rn,"JumpGap",10),Lg=new Oe(Rn,"JumpOver",11),gp=new Oe(Rn,"End",17),M0=new Oe(Rn,"Scale",18),k0=new Oe(Rn,"Stretch",19),pp=new Oe(Rn,"OrientAlong",21),mp=new Oe(Rn,"OrientPlus90",22),vp=new Oe(Rn,"OrientMinus90",23),fv=new Oe(Rn,"OrientOpposite",24),b0=new Oe(Rn,"OrientUpright",25),yp=new Oe(Rn,"OrientPlus90Upright",26),wp=new Oe(Rn,"OrientMinus90Upright",27),T0=new Oe(Rn,"OrientUpright45",28),s1=16,a1=14,xp=8;Rn.className="Link",Rn.Normal=dv,Rn.Orthogonal=Dw,Rn.AvoidsNodes=Iw,Rn.AvoidsNodesStraight=o1,Rn.None=Ja,Rn.Bezier=ql,Rn.JumpGap=Bc,Rn.JumpOver=Lg,Rn.End=gp,Rn.Scale=M0,Rn.Stretch=k0,Rn.OrientAlong=pp,Rn.OrientPlus90=mp,Rn.OrientMinus90=vp,Rn.OrientOpposite=fv,Rn.OrientUpright=b0,Rn.OrientPlus90Upright=yp,Rn.OrientMinus90Upright=wp,Rn.OrientUpright45=T0,Rn.EndSegmentStep=8,Rn.CurvinessStart=s1,Rn.SpacingMin=a1,Rn.OrthoShortCut=xp;function N0(a,y,x,E){an(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=E,this.links=[]}N0.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},N0.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))}},N0.className="LinkBundle";function Sp(a){an(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}Sp.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,E=a.y+a.height;if(this.Nd=Math.floor((a.x-this.rc)/this.rc)*this.rc,this.Od=Math.floor((y-this.sc)/this.sc)*this.sc,this.En=Math.ceil((x+2*this.rc)/this.rc)*this.rc,this.Fn=Math.ceil((E+2*this.sc)/this.sc)*this.sc,a=1+(Math.ceil((this.En-this.Nd)/this.rc)|0),y=1+(Math.ceil((this.Fn-this.Od)/this.sc)|0),this.ac===null||this.di<a-1||this.ei<y-1){for(x=[],E=0;E<=a;E++)x[E]=new Uint32Array(y);this.ac=x,this.di=a-1,this.ei=y-1}if(a=gv,this.ac!==null)for(y=0;y<=this.di;y++)if(x=this.ac[y],x.fill)x.fill(a);else for(E=0;E<=this.ei;E++)x[E]=a}};function Mg(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function ih(a,y,x){return Mg(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):gv}function l1(a){if(a.ac!==null)for(var y=0;y<=a.di;y++)for(var x=a.ac[y],E=0;E<=a.ei;E++)x[E]>=ef&&(x[E]=gv)}Sp.prototype.Yj=function(a,y,x,E){if(a>this.En||a+x<this.Nd||y>this.Fn||y+E<this.Od)return!0;a=(a-this.Nd)/this.rc|0,y=(y-this.Od)/this.sc|0,x=Math.max(0,x)/this.rc+1|0;var b=Math.max(0,E)/this.sc+1|0;if(0>a&&(x+=a,a=0),0>y&&(b+=y,y=0),0>x||0>b)return!0;for(E=Math.min(a+x-1,this.di)|0,x=Math.min(y+b-1,this.ei)|0;a<=E;a++){b=this.ac[a];for(var z=y;z<=x;z++)if(b[z]===Cc)return!1}return!0};function rh(a,y,x,E,b,z,tt,rt,ot){if(!(y<z||y>tt||x<rt||x>ot)){var lt=y|0,ut=x|0,ft=a.ac[lt][ut];if(ft>=ef&&ft<kg)for(b?ut+=E:lt+=E,ft+=1;z<=lt&&lt<=tt&&rt<=ut&&ut<=ot&&!(ft>=a.ac[lt][ut]);)a.ac[lt][ut]=ft,ft+=1,b?ut+=E:lt+=E;if(lt=b?ut:lt,b)if(0<E)for(x+=E;x<lt;x+=E)rh(a,y,x,1,!b,z,tt,rt,ot),rh(a,y,x,-1,!b,z,tt,rt,ot);else for(x+=E;x>lt;x+=E)rh(a,y,x,1,!b,z,tt,rt,ot),rh(a,y,x,-1,!b,z,tt,rt,ot);else if(0<E)for(y+=E;y<lt;y+=E)rh(a,y,x,1,!b,z,tt,rt,ot),rh(a,y,x,-1,!b,z,tt,rt,ot);else for(y+=E;y>lt;y+=E)rh(a,y,x,1,!b,z,tt,rt,ot),rh(a,y,x,-1,!b,z,tt,rt,ot)}}function D0(a,y,x,E,b,z,tt,rt,ot){y|=0,x|=0;var lt=Cc,ut=ef;for(a.ac[y][x]=ut;lt===Cc&&y>z&&y<tt&&x>rt&&x<ot;)ut+=1,a.ac[y][x]=ut,b?x+=E:y+=E,lt=a.ac[y][x]}function I0(a,y,x,E,b,z,tt,rt,ot){y|=0,x|=0;var lt=Cc,ut=kg;for(a.ac[y][x]=ut;lt===Cc&&y>z&&y<tt&&x>rt&&x<ot;)a.ac[y][x]=ut,b?x+=E:y+=E,lt=a.ac[y][x]}function u1(a,y,x,E,b,z,tt){if(a.ac!==null){a.abort=!1;var rt=y.x,ot=y.y;if(Mg(a,rt,ot)){rt-=a.Nd,rt/=a.rc,ot-=a.Od,ot/=a.sc;var lt=E.x,ut=E.y;if(Mg(a,lt,ut))if(lt-=a.Nd,lt/=a.rc,ut-=a.Od,ut/=a.sc,1>=Math.abs(rt-lt)&&1>=Math.abs(ot-ut))a.abort=!0;else{var ft=z.x;E=z.y,y=z.x+z.width;var yt=z.y+z.height;ft-=a.Nd,ft/=a.rc,E-=a.Od,E/=a.sc,y-=a.Nd,y/=a.rc,yt-=a.Od,yt/=a.sc,z=Math.max(0,Math.min(a.di,ft|0)),y=Math.min(a.di,Math.max(0,y|0)),ft=Math.max(0,Math.min(a.ei,E|0)),yt=Math.min(a.ei,Math.max(0,yt|0)),E=a.ac,rt|=0,ot|=0,lt|=0,ut|=0;var Mt=x===0||x===90?1:-1;if(x=x===90||x===270,E[rt][ot]===Cc?(D0(a,rt,ot,Mt,x,z,y,ft,yt),D0(a,rt,ot,1,!x,z,y,ft,yt),D0(a,rt,ot,-1,!x,z,y,ft,yt)):D0(a,rt,ot,Mt,x,rt,ot,rt,ot),E[lt][ut]===Cc?(I0(a,lt,ut,b===0||b===90?1:-1,b===90||b===270,z,y,ft,yt),I0(a,lt,ut,1,!(b===90||b===270),z,y,ft,yt),I0(a,lt,ut,-1,!(b===90||b===270),z,y,ft,yt)):I0(a,lt,ut,Mt,x,lt,ut,lt,ut),x=rn(),tt&&A1(a,lt,ut,b,rt,ot,x))for((x[0]!==lt||x[1]!==ut)&&(x.unshift(ut),x.unshift(lt)),(x[x.length-2]!==rt||x[x.length-1]!==ot)&&(x.push(rt),x.push(ot)),a=ef,b=x[x.length-2],tt=x[x.length-1],E[b][tt]=a++,z=x.length-4;0<=z;z-=2)for(b=x[z+2],tt=x[z+3],y=x[z],lt=x[z+1];y>b?b++:y<b?b--:lt>tt?tt++:lt<tt&&tt--,E[b][tt]=a++,b!==y||tt!==lt;);else rh(a,rt,ot,1,!1,z,y,ft,yt),rh(a,rt,ot,-1,!1,z,y,ft,yt),rh(a,rt,ot,1,!0,z,y,ft,yt),rh(a,rt,ot,-1,!0,z,y,ft,yt);Ve(x)}}}}function A1(a,y,x,E,b,z,tt){for(var rt=a.ac,ot=y,lt=x;;){if(ot===b&&lt===z)return!0;var ut=ot,ft=lt;if(E===0)if(ut<b)ut++;else break;else if(E===90)if(ft<z)ft++;else break;else if(E===180)if(ut>b)ut--;else break;else if(ft>z)ft--;else break;var yt=rt[ut][ft];if(yt===0||yt===pv)break;ot=ut,lt=ft}for(;;){if(ut=E,ft=ot,yt=lt,E===0?yt<z?(ut=90,yt++):yt>z&&(ut=270,yt--):E===90?ft<b?(ut=0,ft++):ft>b&&(ut=180,ft--):E===180?yt<z?(ut=90,yt++):yt>z&&(ut=270,yt--):ft<b?(ut=0,ft++):ft>b&&(ut=180,ft--),ft=rt[ft][yt],ut!==E&&ft!==0&&ft!==pv){if(tt.push(ot),tt.push(lt),A1(a,ot,lt,ut,b,z,tt))return!0;tt.pop(),tt.pop()}if(rt[ot][lt]=pv,E===0){if(ot===y)return!1;ot--}else if(E===90){if(lt===x)return!1;lt--}else if(E===180){if(ot===y)return!1;ot++}else{if(lt===x)return!1;lt++}}}Sn.Object.defineProperties(Sp.prototype,{bounds:{get:function(){return new Ue(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 Cc=0,ef=1,kg=999999,gv=kg+1,pv=kg+2;Sp.className="PositionArray";function jf(){an(this),this.port=this.node=null,this.pe=[],this.ap=!1}jf.prototype.toString=function(){for(var a=this.pe,y=this.node.toString()+" "+a.length.toString()+":",x=0;x<a.length;x++){var E=a[x];E!==null&&(y+=`
`+E.toString())}return y};function Uw(a,y,x,E){switch(y=y.offsetY,y){case 8:return 90;case 2:return 180;case 1:return 270;case 4:return 0}switch(y){case 9:return 180<x?270:90;case 6:return 90<x&&270>=x?180:0}switch(a=180*Math.atan2(a.height,a.width)/Math.PI,y){case 3:return x>a&&x<=180+a?180:270;case 5:return x>180-a&&x<=360-a?270:0;case 12:return x>a&&x<=180+a?90:0;case 10:return x>180-a&&x<=360-a?180:90;case 7:return 90<x&&x<=180+a?180:x>180+a&&x<=360-a?270:0;case 13:return 180<x&&x<=360-a?270:x>a&&180>=x?90:0;case 14:return x>a&&x<=180-a?90:x>180-a&&270>=x?180:0;case 11:return x>180-a&&x<=180+a?180:x>180+a?270:90}return E&&y!==15&&(x-=15,0>x&&(x+=360)),x>a&&x<180-a?90:x>=180-a&&x<=180+a?180:x>180+a&&x<360-a?270:0}jf.prototype.Sl=function(){this.pe.length=0};function h1(a,y){var x=a.pe;if(x.length===0){t:if(!a.ap){x=a.ap,a.ap=!0;var E=null,b=a.node,z=b instanceof lr?b:null;if(z===null||z.isSubGraphExpanded)var tt=b.isTreeExpanded?b.findLinksConnected(a.port.portId):b.qx();else{if(!z.actualBounds.w()){a.ap=x;break t}E=z,tt=E.Lu()}z=a.pe.length=0;var rt=a.port.ga(br,Qt.alloc()),ot=a.port.ga(gr,Qt.alloc());for(b=Ue.allocAt(rt.x,rt.y,0,0),b.Ye(ot),Qt.free(rt),Qt.free(ot),rt=Qt.allocAt(b.x+b.width/2,b.y+b.height/2),ot=a.port.li(),tt=tt.iterator;tt.next();){var lt=tt.value;if(lt.isVisible()&&lt.fromPort!==lt.toPort){var ut=lt.fromPort===a.port||lt.fromNode!==null&&lt.fromNode.Td(E),ft=lt.computeSpot(ut,a.port);if(ft.$c()&&(ut=ut?lt.toPort:lt.fromPort,ut!==null)){var yt=ut.part;if(yt!==null){var Mt=yt.findVisibleNode();Mt!==null&&Mt!==yt&&(yt=Mt,ut=yt.port),ut=lt.computeOtherPoint(yt,ut),yt=rt.ab(ut),yt-=ot,0>yt?yt+=360:360<=yt&&(yt-=360),ft=Uw(b,ft,yt,lt.isOrthogonal),ft===0?(ft=4,180<yt&&(yt-=360)):ft===90?(ft=8,270<yt&&(yt-=360)):ft===180?ft=2:(ft=1,90>yt&&(yt+=360)),Mt=a.pe[z],Mt===void 0?(Mt=new mv(lt,yt,ft),a.pe[z]=Mt):(Mt.link=lt,Mt.angle=yt,Mt.Nc=ft),Mt.hv.set(ut),z++}}}}for(Qt.free(rt),a.pe.sort(jf.prototype.j),ot=a.pe.length,E=-1,z=rt=0;z<ot;z++)tt=a.pe[z],tt!==void 0&&(tt.Nc!==E&&(E=tt.Nc,rt=0),tt.Uo=rt,rt++);for(E=-1,rt=0,z=ot-1;0<=z;z--)ot=a.pe[z],ot!==void 0&&(ot.Nc!==E&&(E=ot.Nc,rt=ot.Uo+1),ot.Gl=rt);if(z=a.pe,ft=a.port,E=a.node.portSpreading,rt=Qt.alloc(),ot=Qt.alloc(),tt=Qt.alloc(),lt=Qt.alloc(),ft.ga(br,rt),ft.ga(io,ot),ft.ga(gr,tt),ft.ga(Qi,lt),Mt=yt=ut=ft=0,E===sv)for(var bt=0;bt<z.length;bt++){var Dt=z[bt];if(Dt!==null){var qt=Dt.link.computeThickness();switch(Dt.Nc){case 8:yt+=qt;break;case 2:Mt+=qt;break;case 1:ft+=qt;break;default:case 4:ut+=qt}}}var Vt=bt=0,oe=1,ce=Dt=0;for(qt=0;qt<z.length;qt++){var ge=z[qt];if(ge!==null){if(bt!==ge.Nc){switch(bt=ge.Nc,bt){case 8:var Se=tt;Vt=lt;break;case 2:Se=lt,Vt=rt;break;case 1:Se=rt,Vt=ot;break;default:case 4:Se=ot,Vt=tt}switch(Dt=Vt.x-Se.x,ce=Vt.y-Se.y,bt){case 8:yt>Math.abs(Dt)?(oe=Math.abs(Dt)/yt,yt=Math.abs(Dt)):oe=1;break;case 2:Mt>Math.abs(ce)?(oe=Math.abs(ce)/Mt,Mt=Math.abs(ce)):oe=1;break;case 1:ft>Math.abs(Dt)?(oe=Math.abs(Dt)/ft,ft=Math.abs(Dt)):oe=1;break;default:case 4:ut>Math.abs(ce)?(oe=Math.abs(ce)/ut,ut=Math.abs(ce)):oe=1}Vt=0}var Re=ge.Zo;if(E===sv){switch(ge=ge.link.computeThickness(),ge*=oe,Re.set(Se),bt){case 8:Re.x=Se.x+Dt/2+yt/2-Vt-ge/2;break;case 2:Re.y=Se.y+ce/2+Mt/2-Vt-ge/2;break;case 1:Re.x=Se.x+Dt/2-ft/2+Vt+ge/2;break;default:case 4:Re.y=Se.y+ce/2-ut/2+Vt+ge/2}Vt+=ge}else{var qn=.5;E===B0&&(qn=(ge.Uo+1)/(ge.Gl+1)),Re.x=Se.x+Dt*qn,Re.y=Se.y+ce*qn}}}for(Qt.free(rt),Qt.free(ot),Qt.free(tt),Qt.free(lt),Se=a.pe,z=0;z<Se.length;z++)E=Se[z],E!==null&&(E.Ju=a.computeEndSegmentLength(E));a.ap=x,Ue.free(b)}x=a.pe}for(a=0;a<x.length;a++)if(b=x[a],b!==null&&b.link===y)return b;return null}jf.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},jf.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,Ar,y.fromPort===this.port),E=a.Uo;if(0>E)return x;var b=a.Gl;if(1>=b||!y.isOrthogonal)return x;y=a.hv;var z=a.Zo;return(a.Nc===2||a.Nc===8)&&(E=b-1-E),((a=a.Nc===2||a.Nc===4)?y.y<z.y:y.x<z.x)?x+8*E:(a?y.y===z.y:y.x===z.x)?x:x+8*(b-1-E)},jf.className="Knot";function mv(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new Qt,this.Gl=this.Uo=0,this.Zo=new Qt,this.Ju=0}mv.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()},mv.className="LinkInfo";function zo(a){an(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new Qt(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}zo.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},zo.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},zo.prototype.qb=function(){},zo.prototype.toString=function(){var a=fn(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},zo.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())}}},zo.prototype.createNetwork=function(){return new Eo(this)},zo.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof He?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof lr?y.lg(a.memberParts):y.lg(a.iterator),y},zo.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")}},zo.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()}},zo.prototype.doLayout=function(a){var y=new Fe;a instanceof He?(ad(this,y,a.nodes,!0,this.rh,!0,!1,!0),ad(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof lr?ad(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},zo.prototype.doMinimalNoNetworkLayout=function(a){var y=Math.ceil(Math.sqrt(a.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var x=this.arrangementOrigin.x,E=x,b=this.arrangementOrigin.y,z=0,tt=0;for(a=a.iterator;a.next();){var rt=a.value;Bp(rt);var ot=rt.measuredBounds,lt=ot.width;ot=ot.height,rt.moveTo(E,b),rt instanceof lr&&(rt.rh=!1),E+=Math.max(lt,50)+20,tt=Math.max(tt,Math.max(ot,50)),z>=y-1?(z=0,E=x,b+=tt+20,tt=0):z++}},zo.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var y=this.arrangementOrigin.x,x=y,E=this.arrangementOrigin.y,b=0,z=0,tt=this.network.vertexes.iterator;tt.next();){var rt=tt.value.node;if(!(rt===null||rt instanceof Rn)&&(Bp(rt),this.rh(rt))){var ot=rt.measuredBounds,lt=ot.width;ot=ot.height,rt.moveTo(x,E),rt instanceof lr&&(rt.rh=!1),x+=Math.max(lt,50)+20,z=Math.max(z,Math.max(ot,50)),b>=a-1?(b=0,x=y,E+=z+20,z=0):b++}}},zo.prototype.rh=function(a){return!!(!a.location.w()||a instanceof lr&&a.rh)};function ad(a,y,x,E,b,z,tt,rt){for(x=x.iterator;x.next();){var ot=x.value;E&&!ot.isTopLevel||b!==null&&!b(ot)||!ot.canLayout()||(z&&ot instanceof ri?ot.isLinkLabel||(ot instanceof lr&&ot.layout===null?ad(a,y,ot.memberParts,!1,b,z,tt,rt):(Bp(ot),y.add(ot))):tt&&ot instanceof Rn?y.add(ot):!rt||!ot.Zc()||ot instanceof ri||(Bp(ot),y.add(ot)))}}function Bp(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}zo.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new Ue),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},zo.prototype.ex=function(a){var y=new Fe;return a instanceof He?(ad(this,y,a.nodes,!0,null,!0,!0,!0),ad(this,y,a.links,!0,null,!0,!0,!0),ad(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof lr?ad(this,y,a.memberParts,!1,null,!0,!0,!0):ad(this,y,a.iterator,!1,null,!0,!0,!0),y},zo.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(br),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Sn.Object.defineProperties(zo.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())}}}),zo.prototype.collectParts=zo.prototype.ex,zo.prototype.getLayoutBounds=zo.prototype.ni,zo.prototype.invalidateLayout=zo.prototype.C,zo.className="Layout";function Eo(a){an(this),this.Sc=a,this.wf=new Fe,this.ye=new Fe,this.Es=new be,this.zs=new be}Eo.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 Fe,this.ye=new Fe,this.Es=new be,this.zs=new be},Eo.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},Eo.prototype.createVertex=function(){return new Gs(this)},Eo.prototype.createEdge=function(){return new Ql(this)},Eo.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(tt){if(tt instanceof ri)return!tt.isLinkLabel;if(tt instanceof Rn){var rt=tt.fromNode;return rt===null||rt.isLinkLabel?!1:(tt=tt.toNode,!(tt===null||tt.isLinkLabel))}return!1}),a=a.iterator;a.next();){var E=a.value;if(E instanceof ri&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)){if(E instanceof lr&&E.layout===null)this.lg(E.memberParts,!1);else if(this.ki(E)===null){var b=this.createVertex();b.node=E,this.dh(b)}}}for(a.reset();a.next();)if(E=a.value,E instanceof Rn&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)&&this.Lo(E)===null){var z=E.fromNode;b=E.toNode,z!==null&&b!==null&&z!==b&&(z=this.findGroupVertex(z),b=this.findGroupVertex(b),z!==null&&b!==null&&this.Zj(z,b,E))}}},Eo.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},Tt=Eo.prototype,Tt.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},Tt.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},Tt.Iu=function(a){if(a!==null&&c1(this,a)){for(var y=a.tg,x=y.count-1;0<=x;x--){var E=y.M(x);this.Mj(E)}for(y=a.mg,a=y.count-1;0<=a;a--)x=y.M(a),this.Mj(x)}};function c1(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}Tt.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},Tt.ki=function(a){return a===null?null:this.Es.I(a)},Tt.Bo=function(a){if(a!==null){vv(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function vv(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}}Tt.Dy=function(a){if(a===null)return null;var y=a.fromNode,x=a.toNode,E=this.Lo(a);return E===null?(E=this.createEdge(),E.link=a,y!==null&&(E.fromVertex=this.Bl(y)),x!==null&&(E.toVertex=this.Bl(x)),this.Bo(E)):(y!==null?E.fromVertex=this.Bl(y):E.fromVertex=null,x!==null?E.toVertex=this.Bl(x):E.toVertex=null),E},Tt.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),yv(this,a)}};function yv(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}Tt.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},Tt.Lo=function(a){return a===null?null:this.zs.I(a)},Tt.Zj=function(a,y,x){if(a===null||y===null)return null;if(a.network===this&&y.network===this){var E=this.createEdge();return E.link=x,E.fromVertex=a,E.toVertex=y,this.Bo(E),E}return null},Tt.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))}},Tt.Ko=function(){for(var a=rn(),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]);Ve(a)},Eo.prototype.deleteArtificialVertexes=function(){for(var a=rn(),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=rn(),x=this.ye.iterator;x.next();){var E=x.value;E.link===null&&E.data===null&&y.push(E)}for(x=y.length,E=0;E<x;E++)this.Mj(y[E]);Ve(a),Ve(y)};function Qw(a){for(var y=rn(),x=a.ye.iterator;x.next();){var E=x.value;E.fromVertex!==null&&E.toVertex!==null||y.push(E)}for(x=y.length,E=0;E<x;E++)a.Mj(y[E]);Ve(y)}Eo.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Qw(this),this.Ko()),a=new ne;for(var y=!0;y;){y=!1;for(var x=this.wf.iterator;x.next();){var E=x.value;if(0<E.tg.count||0<E.mg.count){y=this.layout.createNetwork(),a.add(y),wv(this,y,E),y=!0;break}}}return a.sort(function(b,z){return b===null||z===null||b===z?0:z.vertexes.count-b.vertexes.count}),a};function wv(a,y,x){if(x!==null&&x.network!==y){c1(a,x),y.dh(x);for(var E=x.sourceEdges;E.next();){var b=E.value;b.network!==y&&(yv(a,b),vv(y,b),wv(a,y,b.fromVertex))}for(E=x.destinationEdges;E.next();)x=E.value,x.network!==y&&(yv(a,x),vv(y,x),wv(a,y,x.toVertex))}}Eo.prototype.dz=function(){for(var a=new Fe,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},Sn.Object.defineProperties(Eo.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}}}),Eo.prototype.findAllParts=Eo.prototype.dz,Eo.prototype.splitIntoSubNetworks=Eo.prototype.Zx,Eo.prototype.deleteSelfEdges=Eo.prototype.Ko,Eo.prototype.reverseEdge=Eo.prototype.gm,Eo.prototype.linkVertexes=Eo.prototype.Zj,Eo.prototype.findEdge=Eo.prototype.Lo,Eo.prototype.deleteLink=Eo.prototype.Yy,Eo.prototype.deleteEdge=Eo.prototype.Mj,Eo.prototype.addLink=Eo.prototype.Dy,Eo.prototype.addEdge=Eo.prototype.Bo,Eo.prototype.findVertex=Eo.prototype.ki,Eo.prototype.deleteNode=Eo.prototype.Zy,Eo.prototype.deleteVertex=Eo.prototype.Iu,Eo.prototype.addNode=Eo.prototype.Bl,Eo.prototype.addVertex=Eo.prototype.dh,Eo.prototype.addParts=Eo.prototype.lg,Eo.className="LayoutNetwork";function Gs(a){an(this),this.ob=a,this.j=new Ue(0,0,10,10).freeze(),this.o=new Qt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new ne,this.mg=new ne}Gs.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new ne,this.mg=new ne},Gs.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+ii(this);if(0<a&&(y+=this.node!==null?"("+this.node.toString()+")":"",1<a)){a="";for(var x=!0,E=this.tg.iterator;E.next();){var b=E.value;x?x=!1:a+=",",a+=b.toString(0)}for(b="",x=!0,E=this.mg.iterator;E.next();){var z=E.value;x?x=!1:b+=",",b+=z.toString(0)}y+=" sources: "+a+" destinations: "+b}return y},Gs.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;qe(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 lr)){x=Ue.alloc(),a.Va();var E=this.network.layout.ni(a,x),b=a.locationObject.ga(rr);if(E.w()&&b.w()){a.moveTo(y.x+this.focusX-(b.x-E.x),y.y+this.focusY-(b.y-E.y)),Ue.free(x);return}Ue.free(x)}a.moveTo(y.x,y.y)}},Gs.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},Gs.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},Gs.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},Gs.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function xv(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}Sn.Object.defineProperties(Gs.prototype,{sourceEdgesArrayAccess:{get:function(){return this.tg._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.mg._dataArray}},data:{get:function(){return this.ub},set:function(a){if(this.ub=a,a!==null&&a.bounds){var y=a.bounds;a=y.x;var x=y.y,E=y.width;y=y.height,this.o.h(E/2,y/2),this.j.h(a,x,E,y)}}},node:{get:function(){return this.Sh},set:function(a){if(this.Sh!==a){this.Sh=a,a.Va();var y=this.network.layout,x=Ue.alloc(),E=y.ni(a,x);y=E.x;var b=E.y,z=E.width;if(E=E.height,isNaN(y)&&(y=0),isNaN(b)&&(b=0),this.j.h(y,b,z,E),Ue.free(x),!(a instanceof lr)&&(a=a.locationObject.ga(rr),a.w())){this.o.h(a.x-y,a.y-b);return}this.o.h(z/2,E/2)}}},bounds:{get:function(){return this.j},set:function(a){this.j.D(a)||this.j.assign(a)}},focus:{get:function(){return this.o},set:function(a){this.o.D(a)||this.o.assign(a)}},centerX:{get:function(){return this.j.x+this.o.x},set:function(a){var y=this.j;y.x+this.o.x!==a&&(y.ka(),y.x=a-this.o.x,y.freeze())}},centerY:{get:function(){return this.j.y+this.o.y},set:function(a){var y=this.j;y.y+this.o.y!==a&&(y.ka(),y.y=a-this.o.y,y.freeze())}},focusX:{get:function(){return this.o.x},set:function(a){var y=this.o;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},focusY:{get:function(){return this.o.y},set:function(a){var y=this.o;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},x:{get:function(){return this.j.x},set:function(a){var y=this.j;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},y:{get:function(){return this.j.y},set:function(a){var y=this.j;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},width:{get:function(){return this.j.width},set:function(a){var y=this.j;y.width!==a&&(y.ka(),y.width=a,y.freeze())}},height:{get:function(){return this.j.height},set:function(a){var y=this.j;y.height!==a&&(y.ka(),y.height=a,y.freeze())}},network:{get:function(){return this.ob},set:function(a){this.ob=a}},sourceVertexes:{get:function(){for(var a=new Fe,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new Fe,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new Fe,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 ne,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}}}),Gs.prototype.deleteDestinationEdge=Gs.prototype.Jl,Gs.prototype.addDestinationEdge=Gs.prototype.zl,Gs.prototype.deleteSourceEdge=Gs.prototype.Kl,Gs.prototype.addSourceEdge=Gs.prototype.Cl,Gs.className="LayoutVertex",Gs.standardComparer=xv,Gs.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.Sh;var x=y.Sh;if(a!==null){if(x!==null){for(y=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),a=x.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),x=0;x<y.length;x++)if(a[x]!==""&&a[x]!==void 0){var E=parseFloat(y[x]),b=parseFloat(a[x]);if(isNaN(E))if(isNaN(b)){if(y[x].localeCompare(a[x])!==0)return y[x].localeCompare(a[x])}else return 1;else{if(isNaN(b))return-1;if(E-b!==0)return E-b}}else if(y[x]!=="")return 1;return a[x]!==""&&a[x]!==void 0?-1:0}return 1}return x!==null?-1:0}return 1}return y!==null?-1:0};function Ql(a){an(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Ql.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Ql.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+ii(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},Ql.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Ql.prototype.commit=function(){},Ql.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},Sn.Object.defineProperties(Ql.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)}}}),Ql.prototype.getOtherVertex=Ql.prototype.Ax,Ql.className="LayoutEdge";function Aa(a){zo.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new on(NaN,NaN).freeze(),this.tf=new on(10,10).freeze(),this.Jb=Cp,this.Rb=Q0,this.nd=Pp,this.hd=d1,a&&Object.assign(this,a)}We(Aa,zo),Aa.prototype.cloneProtected=function(a){zo.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},Aa.prototype.qb=function(a){a.classType===Aa?a===Pp||a===H0||a===Sv||a===O0?this.sorting=a:a===Q0||a===rA?this.arrangement=a:a===Cp||a===U0?this.alignment=a:le("Unknown enum value: "+a):zo.prototype.qb.call(this,a)},Aa.prototype.doLayout=function(a){this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var y=this.ex(a);a=this.diagram;for(var x=y.copy().iterator;x.next();){var E=x.value;if(!E.ph()||E.fromNode===null&&E.toNode===null){if(E.Va(),E instanceof lr)for(E=E.memberParts;E.next();)y.remove(E.value)}else y.remove(E)}var b=y.Fa();if(b.length!==0){switch(this.sorting){case O0:b.reverse();break;case Pp:b.sort(this.comparer);break;case H0:b.sort(this.comparer),b.reverse()}var z=this.wrappingColumn;isNaN(z)&&(z=0);var tt=this.wrappingWidth;switch(isNaN(tt)&&a!==null?(y=a.padding,tt=Math.max(a.viewportBounds.width-y.left-y.right,0)):tt=Math.max(this.wrappingWidth,0),0>=z&&0>=tt&&(z=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),E=[],this.alignment){case U0:var rt=y,ot=x,lt=Ue.alloc(),ut=Math.max(this.cellSize.width,1);if(!isFinite(ut))for(var ft=ut=0;ft<b.length;ft++){var yt=this.ni(b[ft],lt);ut=Math.max(ut,yt.width)}if(ut=Math.max(ut+rt,1),ft=Math.max(this.cellSize.height,1),!isFinite(ft))for(yt=ft=0;yt<b.length;yt++){var Mt=this.ni(b[yt],lt);ft=Math.max(ft,Mt.height)}ft=Math.max(ft+ot,1),yt=this.arrangement;for(var bt=Mt=this.arrangementOrigin.x,Dt=this.arrangementOrigin.y,qt=0,Vt=0,oe=0;oe<b.length;oe++){var ce=b[oe],ge=this.ni(ce,lt),Se=Math.ceil((ge.width+rt)/ut)*ut,Re=Math.ceil((ge.height+ot)/ft)*ft;switch(yt){case rA:var qn=Math.abs(bt-ge.width);break;default:qn=bt+ge.width}switch((0<z&&qt>z-1||0<tt&&0<qt&&qn-Mt>tt)&&(E.push(new Ue(0,Dt,tt+rt,Vt)),qt=0,bt=Mt,Dt+=Vt,Vt=0),Vt=Math.max(Vt,Re),yt){case rA:ge=-ge.width;break;default:ge=0}switch(ce.moveTo(bt+ge,Dt),yt){case rA:bt-=Se;break;default:bt+=Se}qt++}E.push(new Ue(0,Dt,tt+rt,Vt)),Ue.free(lt);break;case Cp:for(ot=tt,ut=z,ft=y,yt=x,tt=Ue.alloc(),Mt=Math.max(this.cellSize.width,1),z=Dt=lt=0,rt=Qt.alloc(),bt=0;bt<b.length;bt++)Vt=b[bt],qt=this.ni(Vt,tt),Vt=wc(Vt,Vt.locationObject,Vt.locationSpot,rt),lt=Math.max(lt,Vt.x),Dt=Math.max(Dt,qt.width-Vt.x),z=Math.max(z,Vt.y);switch(bt=this.arrangement,bt){case rA:lt+=ft;break;default:Dt+=ft}Mt=isFinite(Mt)?Math.max(Mt+ft,1):Math.max(lt+Dt,1);var gi=Vt=this.arrangementOrigin.x;for(oe=this.arrangementOrigin.y,Dt=0,ot>=lt&&(ot-=lt),lt=ce=0,Se=Math.max(this.cellSize.height,1),ge=z=0,Re=!0,qt=Qt.alloc(),qn=0;qn<b.length;qn++){var ui=b[qn],Qn=this.ni(ui,tt),pn=wc(ui,ui.locationObject,ui.locationSpot,rt);if(0<Dt)switch(bt){case rA:gi=(gi-Vt-(Qn.width-pn.x))/Mt,gi=Ce.$(Math.round(gi),gi)?Math.round(gi):Math.floor(gi),gi=gi*Mt+Vt;break;default:gi=(gi-Vt+pn.x)/Mt,gi=Ce.$(Math.round(gi),gi)?Math.round(gi):Math.ceil(gi),gi=gi*Mt+Vt}else switch(bt){case rA:ce=gi+pn.x+Qn.width;break;default:ce=gi-pn.x}switch(bt){case rA:var ar=-(gi+pn.x)+ce;break;default:ar=gi+Qn.width-pn.x-ce}if(0<ut&&Dt>ut-1||0<ot&&0<Dt&&ar>ot){for(E.push(new Ue(0,Re?oe-z:oe,ot+ft,ge+z+yt)),gi=0;gi<Dt&&qn!==Dt;gi++){ar=b[qn-Dt+gi];var Ji=wc(ar,ar.locationObject,ar.locationSpot,qt);ar.moveTo(ar.position.x,ar.position.y+z-Ji.y)}ge+=yt,oe=Re?oe+ge:oe+(ge+z),Dt=ge=z=0,gi=Vt,Re=!1}switch(gi===Vt&&(lt=bt===rA?Math.max(lt,Qn.width-pn.x):Math.min(lt,-pn.x)),z=Math.max(z,pn.y),ge=Math.max(ge,Qn.height-pn.y),isFinite(Se)&&(ge=Math.max(ge,Math.max(Qn.height,Se)-pn.y)),Re?ui.moveTo(gi-pn.x,oe-pn.y):ui.moveTo(gi-pn.x,oe),bt){case rA:gi-=pn.x+ft;break;default:gi+=Qn.width-pn.x+ft}Dt++}if(E.push(new Ue(0,oe,ot+ft,(Re?ge:ge+z)+yt)),b.length!==Dt)for(ot=0;ot<Dt;ot++)ut=b[b.length-Dt+ot],ft=wc(ut,ut.locationObject,ut.locationSpot,rt),ut.moveTo(ut.position.x,ut.position.y+z-ft.y);if(Qt.free(rt),Qt.free(qt),bt===rA)for(b=0;b<E.length;b++)z=E[b],z.width+=lt,z.x-=lt;else for(b=0;b<E.length;b++)z=E[b],z.x>lt&&(z.width+=z.x-lt,z.x=lt);Ue.free(tt)}for(rt=z=tt=b=0;rt<E.length;rt++)ot=E[rt],b=Math.min(b,ot.x),tt=Math.min(tt,ot.y),z=Math.max(z,ot.x+ot.width);this.arrangement===rA?this.commitLayers(E,new Qt(b+y/2-(z+b),tt-x/2)):this.commitLayers(E,new Qt(b-y/2,tt-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},Aa.prototype.commitLayers=function(){};function d1(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}Sn.Object.defineProperties(Aa.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!==Cp&&a!==U0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==Q0&&a!==rA||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==Sv&&a!==O0&&a!==Pp&&a!==H0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var U0=new Oe(Aa,"Position",0),Cp=new Oe(Aa,"Location",1),Q0=new Oe(Aa,"LeftToRight",2),rA=new Oe(Aa,"RightToLeft",3),Sv=new Oe(Aa,"Forward",4),O0=new Oe(Aa,"Reverse",5),Pp=new Oe(Aa,"Ascending",6),H0=new Oe(Aa,"Descending",7);Aa.className="GridLayout",Aa.standardComparer=d1,Aa.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),y=y.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);for(var x=0;x<a.length;x++)if(y[x]!==""&&y[x]!==void 0){var E=parseFloat(a[x]),b=parseFloat(y[x]);if(isNaN(E))if(isNaN(b)){if(a[x].localeCompare(y[x])!==0)return a[x].localeCompare(y[x])}else return 1;else{if(isNaN(b))return-1;if(E-b!==0)return E-b}}else if(a[x]!=="")return 1;return y[x]!==""&&y[x]!==void 0?-1:0}return 1}return y!==null?-1:0},Aa.Position=U0,Aa.Location=Cp,Aa.LeftToRight=Q0,Aa.RightToLeft=rA,Aa.Forward=Sv,Aa.Reverse=O0,Aa.Ascending=Pp,Aa.Descending=H0;function co(){this.On=new Fe,this.Dn=new Fe,this.Pa=new Fe,this.cf=new be,this.bf=new be,this.aj=new be,this.H=null,this.tp=!1}Tt=co.prototype,Tt.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},Tt.Xe=function(a){this.H=a},Tt.oi=function(a){if(a instanceof ri){if(this.On.add(a),a instanceof lr){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 Rn?this.Dn.add(a):a instanceof Jr||this.Pa.add(a);y=a.data,y===null||a instanceof Jr||(a instanceof Rn?this.bf.add(y,a):this.cf.add(y,a))},Tt.pc=function(a){if(a.Ej(),a instanceof ri){if(this.On.remove(a),a instanceof lr){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 Rn?this.Dn.remove(a):a instanceof Jr||this.Pa.remove(a);y=a.data,y===null||a instanceof Jr||(a instanceof Rn?this.bf.remove(y):this.cf.remove(y))},Tt.Wd=function(){var a=this.H;if(a!==null){for(var y=a.nodeTemplateMap.iterator;y.next();){var x=y.value,E=y.key;(!x.Zc()||x instanceof lr)&&le('Invalid node template in Diagram.nodeTemplateMap: template for "'+E+'" must be a Node or a simple Part, not a Group or Link: '+x)}for(y=a.groupTemplateMap.iterator;y.next();)x=y.value,E=y.key,x instanceof lr||le('Invalid group template in Diagram.groupTemplateMap: template for "'+E+'" must be a Group, not a normal Node or Link: '+x);for(y=a.linkTemplateMap.iterator;y.next();)x=y.value,E=y.key,x instanceof Rn||le('Invalid link template in Diagram.linkTemplateMap: template for "'+E+'" must be a Link, not a normal Node or simple Part: '+x);for(y=rn(),x=a.selection.iterator;x.next();)(E=x.value.data)&&y.push(E);for(x=rn(),a=a.highlighteds.iterator;a.next();)(E=a.value.data)&&x.push(E);for(a=rn(),E=this.nodes.iterator;E.next();){var b=E.value;b.data!==null&&(a.push(b.data),a.push(b.location))}for(E=this.links.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(E=this.parts.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(this.removeAllModeledParts(),this.addAllModeledParts(),E=0;E<y.length;E++)b=this.Lc(y[E]),b!==null&&(b.isSelected=!0);for(E=0;E<x.length;E++)b=this.Lc(x[E]),b!==null&&(b.isHighlighted=!0);for(E=0;E<a.length;E+=2)b=this.Lc(a[E]),b!==null&&(b.location=a[E+1]);Ve(y),Ve(x),Ve(a)}},co.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},co.prototype.addModeledParts=function(a,y){var x=this,E=this.diagram.model;a.forEach(function(b){E.lb(b)&&f1(x,b,!1)}),a.forEach(function(b){E.lb(b)&&x.resolveReferencesForData(b)}),y!==!1&&td(this.diagram,!1)};function f1(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);t:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var E=a.Ro(y),b=g1(a,y,E);if(b!==null&&(yu(b),b=b.copy(),b!==null)){var z=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=E,b.ub=y,a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=z,E=b;break t}}E=null}E!==null&&x&&a.resolveReferencesForData(y)}}co.prototype.insertLink=function(){return null},co.prototype.resolveReferencesForData=function(){},co.prototype.Ro=function(a){return this.H.model.Ro(a)};function g1(a,y,x){a=a.H;var E=a.model;return E.Xj()&&E.Yu(y)?(y=a.groupTemplateMap.I(x),y===null&&(y=a.groupTemplateMap.I(""),y===null&&(v1||(v1=!0,On('No Group template found for category "'+x+'"'),On(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(m1||(m1=!0,On('No Node template found for category "'+x+'"'),On(" Using default node template")),y=a.ny))),y}co.prototype.getLinkCategoryForData=function(){return""},co.prototype.setLinkCategoryForData=function(){},co.prototype.setFromNodeForLink=function(){},co.prototype.setToNodeForLink=function(){},co.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(y1||(y1=!0,On('No Link template found for category "'+a+'"'),On(" Using default link template")),x=y.my)),x},co.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},co.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},co.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Pf(this.diagram,a,!1),this.unresolveReferencesForPart(a))},co.prototype.unresolveReferencesForPart=function(){},co.prototype.removeDataForLink=function(){},co.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},co.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof ri?a:null)},co.prototype.findLinkForKey=function(){return null},Tt=co.prototype,Tt.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},Tt.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof ri?a:null)},Tt.Kc=function(a){return a===null?null:this.bf.I(a)},Tt.ms=function(a){for(var y=0;y<arguments.length;++y);y=new Fe;for(var x=this.On.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var tt=arguments[z];if(qe(tt)&&Bv(this,b,tt)){y.add(E);break}}}return y.iterator},Tt.ls=function(a){for(var y=0;y<arguments.length;++y);y=new Fe;for(var x=this.Dn.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var tt=arguments[z];if(qe(tt)&&Bv(this,b,tt)){y.add(E);break}}}return y.iterator};function Bv(a,y,x){for(var E in x){var b=y[E],z=x[E];if(ei(z)){if(!ei(b)||b.length<z.length)return!1;for(var tt=0;tt<b.length;tt++){var rt=z[tt];if(rt!==void 0&&!p1(a,b[tt],rt))return!1}}else if(!p1(a,b,z))return!1}return!0}function p1(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(qe(y)&&qe(x)){if(!Bv(a,y,x))return!1}else if(y!==x)return!1;return!0}co.prototype.doModelChanged=function(a){if(this.H){var y=this.H;if(a.model===y.model){var x=a.change;if(y.doModelChanged(a),y.aa){y.aa=!1;try{var E=a.modelChange;if(E!=="")if(x===No){if(E==="nodeCategory"){var b=this.Lc(a.object),z=a.newValue;b!==null&&typeof z=="string"&&(b.category=z)}else E==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===as){var tt=a.newValue;E==="nodeDataArray"&&qe(tt)&&f1(this,tt),y.isModified=!0}else if(x===gs){var rt=a.oldValue;E==="nodeDataArray"&&qe(rt)&&this.ip(rt),y.isModified=!0}else x===oa&&(E==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):E==="ModelDisplaced"&&this.Wd());else if(x===No){var ot=a.propertyName,lt=a.object;lt===y.model?(ot==="nodeKeyProperty"||ot==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(lt,ot),y.isModified=!0}else if(x===as||x===gs){var ut=a.change===as,ft=ut?a.newParam:a.oldParam,yt=ut?a.newValue:a.oldValue,Mt=this.aj.I(a.object);if(Array.isArray(Mt))for(a=0;a<Mt.length;a++){var bt=Mt[a];if(ut)r0(bt,yt,ft,!0);else if(!(0>ft)){var Dt=ft+sp(bt);bt.pc(Dt,!0),Qm(bt,Dt,ft)}}y.isModified=!0}}finally{y.aa=!0}}}}},co.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)},co.prototype.rp=function(){for(var a=this.H.model,y=new Fe,x=a.nodeDataArray,E=0;E<x.length;E++)y.add(x[E]);var b=[];for(this.nodes.each(function(tt){tt.data===null||y.contains(tt.data)||b.push(tt.data)}),this.parts.each(function(tt){tt.data===null||y.contains(tt.data)||b.push(tt.data)}),b.forEach(function(tt){L1(a,tt,!1)}),E=0;E<x.length;E++){var z=x[E];this.Lc(z)===null&&E1(a,z,!1)}for(this.refreshDataBoundLinks(),x=this.parts.iterator;x.next();)x.value.updateRelationshipsFromData();for(x=this.nodes.iterator;x.next();)x.value.updateRelationshipsFromData();for(x=this.links.iterator;x.next();)x.value.updateRelationshipsFromData()},co.prototype.refreshDataBoundLinks=function(){},co.prototype.updateRelationshipsFromData=function(){},co.prototype.updateDataBindings=function(a,y){if(typeof y=="string"){var x=this.Lc(a);if(x!==null)x.La(y);else{x=null;for(var E=this.aj.iterator;E.next();){for(var b=E.value,z=0;z<b.length;z++){var tt=b[z].sx(a);tt!==null&&(x===null&&(x=rn()),x.push(tt))}if(x!==null)break}if(x!==null){for(E=0;E<x.length;E++)x[E].La(y);Ve(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function Cv(a,y){var x=y.Hh;if(ei(x)){var E=a.aj.I(x);if(E===null)E=[],E.push(y),a.aj.add(x,E);else{for(a=0;a<E.length;a++)if(E[a]===y)return;E.push(y)}}}function Pv(a,y,x){Hu(y,function(tt){tt=tt.O.s;for(var rt=tt.length,ot=0;ot<rt;ot++)Hd(x,tt[ot])});var E=y.Hh;if(ei(E)){var b=a.aj.I(E);if(b!==null){for(var z=0;z<b.length;z++)if(b[z]===y){b.splice(z,1),b.length===0&&a.aj.remove(E);break}}}}co.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var E=new be;if(ei(a))for(var b=0;b<a.length;b++)R0(this,a[b],y,E,x);else for(a=a.iterator;a.next();)R0(this,a.value,y,E,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,b=new Fe;for(var z=new be,tt=E.iterator;tt.next();){var rt=tt.value;if(rt instanceof Rn)a||rt.fromNode!==null&&rt.toNode!==null||b.add(rt);else if(rt instanceof ri&&rt.data!==null&&x.Tl()){var ot=rt;rt=tt.key;var lt=rt.pg();lt!==null&&(lt=E.I(lt),lt!==null?(x.qe(ot.data,x.wa(lt.data)),ot=y.Kc(ot.data),rt=rt.kh(),rt!==null&&ot!==null&&z.add(rt,ot)):x.qe(ot.data,void 0))}}if(0<b.count&&y.Is(b,!1),0<z.count)for(x=z.iterator;x.next();)E.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var ut=new be;E.each(function(ft){ft.key.data!==null&&ut.add(ft.key.data,ft.value.data)}),x(ut,y,this.H.model)}for(y=E.iterator;y.next();)y.value.La();return E};function R0(a,y,x,E,b){if(y===null||b&&!y.canCopy())return null;if(E.contains(y))return E.I(y);var z=a.copyPartData(y,x);if(!(z instanceof Ti))return null;if(z.isSelected=!1,z.isHighlighted=!1,E.add(y,z),y instanceof ri){for(var tt=y.linksConnected;tt.next();){var rt=tt.value;if(rt.fromNode===y){var ot=E.I(rt);ot!==null&&(ot.fromNode=z)}rt.toNode===y&&(rt=E.I(rt),rt!==null&&(rt.toNode=z))}if(y instanceof lr&&z instanceof lr)for(y=y.memberParts;y.next();)tt=R0(a,y.value,x,E,b),tt instanceof Rn||tt===null||(tt.containingGroup=z)}else if(y instanceof Rn&&z instanceof Rn)for(tt=y.fromNode,tt!==null&&(tt=E.I(tt),tt!==null&&(z.fromNode=tt)),tt=y.toNode,tt!==null&&(tt=E.I(tt),tt!==null&&(z.toNode=tt)),y=y.labelNodes;y.next();)tt=R0(a,y.value,x,E,b),tt!==null&&tt instanceof ri&&(tt.labeledLink=z);return z}co.prototype.copyPartData=function(a,y){var x=null,E=a.data;if(E!==null&&y!==null){var b=y.model;a instanceof Rn||(E=b.copyNodeData(E),qe(E)&&(b.xf(E),x=y.Lc(E)))}else yu(a),x=a.copy(),x!==null&&(b=this.H,y!==null?y.add(x):E!==null&&b!==null&&b.commandHandler!==null&&b.commandHandler.copiesClipboardData&&(y=b.model,b=null,x instanceof Rn||(b=y.copyNodeData(E)),qe(b)&&(x.data=b)));return x},Sn.Object.defineProperties(co.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}}}),co.prototype.updateAllRelationshipsFromData=co.prototype.rp,co.prototype.findLinksByExample=co.prototype.ls,co.prototype.findNodesByExample=co.prototype.ms,co.prototype.findLinkForData=co.prototype.Kc,co.prototype.findNodeForData=co.prototype.ii,co.prototype.findPartForData=co.prototype.Lc,co.prototype.findNodeForKey=co.prototype.Vb,co.prototype.removeModeledPart=co.prototype.ip,co.prototype.removeModeledParts=co.prototype.Gs,co.prototype.rebuildParts=co.prototype.Wd;var m1=!1,v1=!1,y1=!1;co.className="PartManager";function ta(a){co.apply(this,arguments)}We(ta,co),ta.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),w1(this,a.linkDataArray)},ta.prototype.addModeledParts=function(a){for(co.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)Fg(a.value);td(this.diagram,!1)};function w1(a,y){y.forEach(function(x){x1(a,x)}),td(a.diagram,!1)}function x1(a,y){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.bf.contains(y)){var x=a.getLinkCategoryForData(y),E=a.findLinkTemplateForCategory(x);if(E!==null){yu(E);var b=E.copy();if(b!==null){E=a.diagram.skipsModelSourceBindings,a.diagram.skipsModelSourceBindings=!0,b.Tf=x,b.ub=y,x=a.diagram.model;var z=z0(x,y,!0);z!==""&&(b.fromPortId=z),z=$l(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof ri&&(b.fromNode=z)),z=z0(x,y,!1),z!==""&&(b.toPortId=z),z=$l(x,y,!1),z!==void 0&&(z=a.Vb(z),z instanceof ri&&(b.toNode=z)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(tt){tt=a.Vb(tt),tt!==null&&(tt.labeledLink=b)}),a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=E}}}}ta.prototype.removeAllModeledParts=function(){var a=this.diagram.model;S1(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function S1(a,y){y.forEach(function(x){a.ip(x)})}ta.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},ta.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},ta.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},ta.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},ta.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},ta.prototype.findPartForKey=function(a){var y=co.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},ta.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},ta.prototype.doModelChanged=function(a){var y=this;if(co.prototype.doModelChanged.call(this,a),this.diagram){var x=this.diagram;if(a.model===x.model){var E=a.change;if(x.aa){x.aa=!1;try{var b=a.modelChange;if(b!==""){if(E===No){if(b==="linkFromKey"){var z=this.Kc(a.object);if(z!==null){var tt=this.Vb(a.newValue);z.fromNode=tt}}else if(b==="linkToKey"){var rt=this.Kc(a.object);if(rt!==null){var ot=this.Vb(a.newValue);rt.toNode=ot}}else if(b==="linkFromPortId"){var lt=this.Kc(a.object);if(lt!==null){var ut=a.newValue;typeof ut=="string"&&(lt.fromPortId=ut)}}else if(b==="linkToPortId"){var ft=this.Kc(a.object);if(ft!==null){var yt=a.newValue;typeof yt=="string"&&(ft.toPortId=yt)}}else if(b==="nodeGroupKey"){var Mt=this.Lc(a.object);if(Mt!==null){var bt=a.newValue;if(bt!==void 0){var Dt=this.Vb(bt);Dt instanceof lr?Mt.containingGroup=Dt:Mt.containingGroup=null}else Mt.containingGroup=null}}else if(b==="linkLabelKeys"){var qt=this.Kc(a.object);if(qt!==null){var Vt=a.oldValue,oe=a.newValue;Array.isArray(Vt)&&Vt.forEach(function(pn){0<=oe.indexOf(pn)||(pn=y.Vb(pn),pn!==null&&(pn.labeledLink=null))}),Array.isArray(oe)&&oe.forEach(function(pn){pn=y.Vb(pn),pn!==null&&(pn.labeledLink=qt)})}}else if(b==="linkCategory"){var ce=this.Kc(a.object),ge=a.newValue;ce!==null&&typeof ge=="string"&&(ce.category=ge)}else b==="linkDataArray"&&(S1(this,a.oldValue),w1(this,a.newValue));x.isModified=!0}else if(E===as){var Se=a.newValue;if(b==="linkDataArray"&&typeof Se=="object"&&Se!==null)x1(this,Se);else if(b==="linkLabelKeys"&&ud(Se)){var Re=this.Kc(a.object),qn=this.Vb(Se);Re!==null&&qn!==null&&(qn.labeledLink=Re)}x.isModified=!0}else if(E===gs){var gi=a.oldValue;if(b==="linkDataArray"&&typeof gi=="object"&&gi!==null)this.ip(gi);else if(b==="linkLabelKeys"&&ud(gi)){var ui=this.Vb(gi);ui!==null&&(ui.labeledLink=null)}x.isModified=!0}}else if(E===No){var Qn=a.propertyName;a.object!==x.model||Qn!=="linkFromKeyProperty"&&Qn!=="linkToKeyProperty"&&Qn!=="linkFromPortIdProperty"&&Qn!=="linkToPortIdProperty"&&Qn!=="linkLabelKeysProperty"&&Qn!=="nodeIsGroupProperty"&&Qn!=="nodeGroupKeyProperty"&&Qn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},ta.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new Fe,E=y.linkDataArray;E.forEach(function(z){x.add(z)});var b=[];this.links.each(function(z){z.data===null||x.contains(z.data)||b.push(z.data)}),b.forEach(function(z){D1(y,z,!1)}),E.forEach(function(z){a.Kc(z)===null&&N1(y,z,!1)})},ta.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;if(a instanceof Rn){var b=$l(E,y,!0);if(b=x.Vb(b),a.fromNode=b,b=$l(E,y,!1),b=x.Vb(b),a.toNode=b,y=E.Ef(y),0<y.length||0<a.labelNodes.count){if(y.length===1&&a.labelNodes.count===1){b=y[0];var z=a.labelNodes.first();if(E.wa(z.data)===b)return}b=new Fe().addAll(y);var tt=new Fe;a.labelNodes.each(function(rt){rt.data!==null&&(rt=E.wa(rt.data),rt!==void 0&&tt.add(rt))}),y=tt.copy(),y.hp(b),b=b.copy(),b.hp(tt),(0<y.count||0<b.count)&&(y.each(function(rt){rt=x.Vb(rt),rt!==null&&rt.labeledLink===a&&(rt.labeledLink=null)}),b.each(function(rt){rt=x.Vb(rt),rt!==null&&rt.labeledLink!==a&&(rt.labeledLink=a)}))}}else!(a instanceof Jr)&&(y=E.lh(y),y=x.findPartForKey(y),y===null||y instanceof lr)&&(a.containingGroup=y)}}},ta.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=Fp(y,x),b=this.Lc(a);if(E!==null&&b!==null){E=E.iterator;for(var z={};E.next();){var tt=E.value;y.lb(tt)?b instanceof lr&&y.lh(tt)===x&&(tt=this.Lc(tt),tt!==null&&(tt.containingGroup=b)):(z.link=this.Kc(tt),z.link!==null&&b instanceof ri&&($l(y,tt,!0)===x&&(z.link.fromNode=b),$l(y,tt,!1)===x&&(z.link.toNode=b),tt=y.Ef(tt),Array.isArray(tt)&&tt.some(function(rt){return function(ot){return ot===x?(b.labeledLink=rt.link,!0):!1}}(z)))),z={link:z.link}}sA(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof lr&&(b.containingGroup=a))}},ta.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof ri){var x=y.wa(a.data);if(x!==void 0){for(var E=a.linksConnected;E.next();)oA(y,x,E.value.data);if(a.isLinkLabel&&(E=a.labeledLink,E!==null&&oA(y,x,E.data)),a instanceof lr)for(a=a.memberParts;a.next();)E=a.value.data,y.lb(E)&&oA(y,x,E)}}},ta.prototype.copyPartData=function(a,y){var x=co.prototype.copyPartData.call(this,a,y);if(a instanceof Rn)if(a=a.data,a!==null&&y!==null){var E=y.model;a=E.Jo(a),typeof a=="object"&&a!==null&&(E.fi(a),x=y.Kc(a))}else x!==null&&(y=this.diagram,a!==null&&y!==null&&y.commandHandler!==null&&y.commandHandler.copiesClipboardData&&(y=y.model.Jo(a),typeof y=="object"&&y!==null&&(x.data=y)));return x},ta.prototype.insertLink=function(a,y,x,E){var b=this.diagram,z=b.model,tt=b.toolManager.findTool("Linking"),rt="";if(a!==null&&(y===null&&(y=a),rt=y.portId,rt===null&&(rt="")),y="",x!==null&&(E===null&&(E=x),y=E.portId,y===null&&(y="")),E=tt.archetypeLinkData,E instanceof Rn){if(yu(E),z=E.copy(),z!==null)return z.fromNode=a,z.fromPortId=rt,z.toNode=x,z.toPortId=y,b.add(z),a=tt.archetypeLabelNodeData,a instanceof ri&&(yu(a),a=a.copy(),a!==null&&(a.labeledLink=z,b.add(a))),z}else if(E!==null&&(E=z.Jo(E),typeof E=="object"&&E!==null))return a!==null&&Tg(z,E,z.wa(a.data),!0),Ng(z,E,rt,!0),x!==null&&Tg(z,E,z.wa(x.data),!1),Ng(z,E,y,!1),z.fi(E),a=tt.archetypeLabelNodeData,a===null||a instanceof ri||(a=z.copyNodeData(a),typeof a=="object"&&a!==null&&(z.xf(a),a=z.wa(a),a!==void 0&&z.Bu(E,a))),b.Kc(E);return null},ta.prototype.findLinkForKey=ta.prototype.findLinkForKey,ta.prototype.findPartForKey=ta.prototype.findPartForKey,ta.prototype.removeAllModeledParts=ta.prototype.removeAllModeledParts,ta.prototype.addModeledParts=ta.prototype.addModeledParts,ta.prototype.addAllModeledParts=ta.prototype.addAllModeledParts,ta.className="GraphLinksPartManager";function au(){co.apply(this,arguments),this.Sg=null}We(au,co);function _0(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var E=a.diagram.toolManager.findTool("Linking"),b=y,z=x;if(a.diagram.isTreePathToChildren||(b=x,z=y),(E===null||!ba(E,b,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),E=a.findLinkTemplateForCategory(y),E!==null&&(yu(E),E=E.copy(),E!==null))){var tt=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,E.Tf=y,E.ub=x.data,E.fromNode=b,E.toNode=z,a.diagram.add(E),E.ub=null,E.data=x.data,a.diagram.skipsModelSourceBindings=tt}}}au.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},au.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},au.prototype.setFromNodeForLink=function(a,y,x){var E=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren)E.qe(a.data,E.wa(y));else{var b=this.Sg;this.Sg=a,x!==null&&E.qe(x.data,void 0),E.qe(y,E.wa(a.toNode!==null?a.toNode.data:null)),this.Sg=b}},au.prototype.setToNodeForLink=function(a,y,x){var E=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren){var b=this.Sg;this.Sg=a,x!==null&&E.qe(x.data,void 0),E.qe(y,E.wa(a.fromNode!==null?a.fromNode.data:null)),this.Sg=b}else E.qe(a.data,E.wa(y))},au.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},au.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},au.prototype.doModelChanged=function(a){if(co.prototype.doModelChanged.call(this,a),this.diagram){var y=this.diagram;if(a.model===y.model){var x=a.change;if(y.aa){y.aa=!1;try{var E=a.modelChange;if(E!==""){if(x===No){if(E==="nodeParentKey"){var b=a.object,z=this.Vb(a.newValue),tt=this.ii(b);if(this.Sg!==null)z!==null&&(this.Sg.data=b,this.Sg.category=this.getLinkCategoryForData(b));else if(tt!==null){var rt=tt.kh();rt!==null?z===null?y.remove(rt):y.isTreePathToChildren?rt.fromNode=z:rt.toNode=z:_0(this,z,tt)}}else if(E==="parentLinkCategory"){var ot=this.ii(a.object),lt=a.newValue;if(ot!==null&&typeof lt=="string"){var ut=ot.kh();ut!==null&&(ut.category=lt)}}y.isModified=!0}}else if(x===No){var ft=a.propertyName;a.object===y.model&&ft==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},au.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;a instanceof ri&&(y=E.mh(y),y=x.Vb(y),E=a.pg(),y!==E&&(E=a.kh(),y!==null?E!==null?x.isTreePathToChildren?E.fromNode=y:E.toNode=y:_0(this,y,a):E!==null&&Pf(x,E,!1)))}}},au.prototype.updateDataBindings=function(a,y){co.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},au.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=Fp(y,x),b=this.Lc(a);if(E!==null&&b!==null){for(E=E.iterator;E.next();){var z=E.value;y.lb(z)&&b instanceof ri&&y.mh(z)===x&&_0(this,b,this.ii(z))}sA(y,x)}a=y.mh(a),a!==void 0&&b instanceof ri&&(a=this.Vb(a),_0(this,a,b))}},au.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof ri){var x=y.wa(a.data),E=this.Kc(a.data);if(E!==null){E.isSelected=!1,E.isHighlighted=!1;var b=E.layer;if(b!==null){var z=b.pc(-1,E,!1);0<=z&&this.diagram.cb(gs,"parts",b,E,null,z,null),z=E.layerChanged,z!==null&&z(E,b,null)}}for(E=this.diagram.isTreePathToChildren,a=a.linksConnected;a.next();)b=a.value,b=(E?b.toNode:b.fromNode).data,y.lb(b)&&oA(y,x,b)}},au.prototype.insertLink=function(a,y,x){y=this.diagram.model;var E=a,b=x;return this.diagram.isTreePathToChildren||(E=x,b=a),E!==null&&b!==null?(y.qe(b.data,y.wa(E.data)),b.kh()):null},au.prototype.findLinkForKey=au.prototype.findLinkForKey,au.className="TreePartManager";function Bi(a,y){this.kl=new Fe,this.il=new Fe,this.Wv=`,
"insertedNodeKeys": `,this.jy=`,
"modifiedNodeData": `,this.Yv=`,
"removedNodeKeys": `,this.vh=null,an(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new be,this.Th="key",this.Bk=this.bl=null,this.Jm=this.Km=!1,this.Mm=!0,this.xm=null,this.lj="category",this.Vf=new be,this.Lt=new ne,this.Wg=!1,this.o=null,this.undoManager=new Ko,a!==void 0&&(ei(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Bi.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},Bi.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Bi.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},Bi.prototype.toString=function(a){if(a===void 0&&(a=0),1<a)return this.np();var y=(this.name!==""?this.name:"")+" Model";if(0<a){y+=`
node data:`,a=this.nodeDataArray;for(var x=a.length,E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+mi(b)}}return y},Bi.prototype.xA=function(a){a.change!==oa&&le("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof bs?(C1(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},Bi.prototype.Qv=function(a,y){var x=this,E=!1,b=new Fe,z=new Fe,tt=new Fe,rt=this.vh;a.changes.each(function(ft){ft.model===x&&(ft.modelChange==="nodeDataArray"?ft.change===as?b.add(ft.newValue):ft.change===gs&&tt.add(ft.oldValue):x.lb(ft.object)?z.add(ft.object):ft.change!==No||x.modelData!==ft.object&&ft.propertyName!=="modelData"?ft.object!==null&&(rt&&rt.contains(ft.object)?rt.get(ft.object).each(function(yt){x.lb(yt)&&z.add(yt)}):ft.object instanceof Bi||x.ri()&&x.Jc(ft.object)||P1(x,ft.object).each(function(yt){z.add(yt)})):E=!0)});var ot=this.il;ot.clear(),b.each(function(ft){ot.add(x.wa(ft)),y||z.add(ft)});var lt=this.kl;lt.clear(),tt.each(function(ft){lt.add(x.wa(ft)),y&&z.add(ft)}),a=x.cloneDeep(z.Fa());var ut=null;return E&&(ut===null&&(ut={}),ut.modelData=this.cloneDeep(this.modelData)),0<ot.count&&(ut===null&&(ut={}),y?ut.removedNodeKeys=ot.Fa():ut.insertedNodeKeys=ot.Fa()),0<a.length&&(ut===null&&(ut={}),ut.modifiedNodeData=a),0<lt.count&&(ut===null&&(ut={}),y?ut.insertedNodeKeys=lt.Fa():ut.removedNodeKeys=lt.Fa()),lt.clear(),ot.clear(),ut},Bi.prototype.cloneDeep=function(a){return bg(this,a,!0)};function bg(a,y,x,E,b,z){function tt(ft,yt){rt?(ft.__gohashid===void 0&&z.push(ft),E.set(ft,yt)):(ft=Mi++,E.set(ft,yt),b.set(ft,y))}if(!qe(y))return y;z||(z=[]);var rt=Object.isExtensible(y);if(E||(E=new be),rt){var ot=E.get(y);if(ot)return ot}else for(b||(b=new be),ot=b.iterator;ot.next();){var lt=ot.key;if(ot.value===y&&(lt=E.get(lt)))return lt}if(Array.isArray(y)){ot=[],tt(y,ot);for(var ut=0;ut<y.length;ut++)ot.push(bg(a,y[ut],!1,E,b,z))}else if(y instanceof Qt||y instanceof on||y instanceof Ue||y instanceof sr||y instanceof di)ot=y.copy(),tt(y,ot);else{if(y instanceof lo||y instanceof bn||y instanceof Oe)return y;if(y instanceof ne)ot=new ne().addAll(bg(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof Fe)ot=new Fe().addAll(bg(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof be)ot=new be().addAll(bg(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof Date)ot=new Date(y.getTime()),tt(y,ot);else if(y instanceof RegExp)ot=new RegExp(y),tt(y,ot),ot.lastIndex=y.lastIndex;else if(typeof y.copy=="function")ot=y.copy(),tt(y,ot);else for(ut in ot={},tt(y,ot),y)ut!=="__gohashid"&&(ot[ut]=bg(a,y[ut],!1,E,b,z))}return x&&z.forEach(function(ft){delete ft.__gohashid}),ot}Tt=Bi.prototype,Tt.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},Tt.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},Tt.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 B1(a,y){y=y.modelData,qe(y)&&(a.dm(y),a.modelData=y)}Tt.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!F1(x,a[x])){y=!0;break}return a="",y&&(a=`,
"modelData": `+Fv(this,this.modelData)),a+`,
"nodeDataArray": `+ld(this,this.nodeDataArray,!0)},Tt.kv=function(a){B1(this,a),a=a.nodeDataArray,ei(a)&&(this.dm(a),this.nodeDataArray=a)};function C1(a,y){function x(b,z){if((z=z.part)&&(z=z.data,b!==z)){var tt=E.get(b);tt===null?(tt=new Fe,tt.add(z),E.add(b,tt)):tt.add(z)}}var E=a.vh;E===null&&(E=new be,y.changes.each(function(b){if(b.diagram!==null){var z=b.change;z===No?(b=b.object.panel)&&(z=b.data)&&x(z,b):(z===as||z===gs)&&(b=b.object,(z=b.itemArray)&&x(z,b))}}),a.vh=E)}function P1(a,y){for(var x=new Fe,E=0;E<a.nodeDataArray.length;E++){var b=a.nodeDataArray[E];K0(a,y,b,b,x)}return x}function K0(a,y,x,E,b){if(Array.isArray(x))for(var z=0;z<x.length;z++){var tt=x[z];if(tt===y)return b.add(E),!0;if(K0(a,y,tt,E,b))return!0}else if(qe(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(tt=x[z],tt===y)return b.add(E),!0;if(K0(a,y,tt,E,b))return!0}return!1}Tt.Pv=function(a,y){var x=this,E=!1,b=new Fe,z=new Fe,tt=new Fe,rt=this.vh;a.changes.each(function(ut){ut.model===x&&(ut.modelChange==="nodeDataArray"?ut.change===as?b.add(ut.newValue):ut.change===gs&&tt.add(ut.oldValue):x.lb(ut.object)?z.add(ut.object):ut.change!==No||x.modelData!==ut.object&&ut.propertyName!=="modelData"?ut.object!==null&&(rt&&rt.contains(ut.object)?rt.get(ut.object).each(function(ft){x.lb(ft)&&z.add(ft)}):ut.object instanceof Bi||x.ri()&&x.Jc(ut.object)||P1(x,ut.object).each(function(ft){z.add(ft)})):E=!0)});var ot=this.il;ot.clear(),b.each(function(ut){ot.add(x.wa(ut)),y||z.add(ut)});var lt=this.kl;return lt.clear(),tt.each(function(ut){lt.add(x.wa(ut)),y&&z.add(ut)}),a="",E&&(a+=`,
"modelData": `+Fv(this,this.modelData)),0<ot.count&&(a+=(y?this.Yv:this.Wv)+ld(this,ot.Fa(),!0)),0<z.count&&(a+=this.jy+ld(this,z.Fa(),!0)),0<lt.count&&(a+=(y?this.Wv:this.Yv)+ld(this,lt.Fa(),!0)),lt.clear(),ot.clear(),a},Tt.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)&&le("applyIncrementalJson cannot change Model properties"),B1(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,E=new be;if(Array.isArray(x))for(var b=0;b<x.length;b++){var z=x[b],tt=this.wa(z);tt!=null&&E.set(tt,z)}if(Array.isArray(y))for(b=y.length,z=0;z<b;z++){tt=y[z];var rt=this.hc(tt);rt===null&&(rt=(rt=E.get(tt))?rt:this.copyNodeData({}),this.km(rt,tt),this.xf(rt))}if(Array.isArray(x)){for(y=x.length,E=0;E<y;E++)if(b=x[E],z=this.wa(b),z=this.hc(z),z!==null){for(var ot in b)ot==="__gohashid"||ot===this.nodeKeyProperty||this.Wj()&&ot===this.nodeIsGroupProperty||this.setDataProperty(z,ot,b[ot]);this.lm(b,z)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,ot=0;ot<x;ot++)y=this.hc(a[ot]),y!==null&&this.cm(y)},Tt.$x=function(a,y){a.change!==oa&&le("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof bs?(y===void 0&&(y=Ep(this,this)),C1(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 }'},Tt.yA=function(a,y){return this.$x(a,y)},Tt.np=function(a){return a===void 0&&(a=Ep(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},Tt.toJSON=function(a){return this.np(a)},Tt.Zw=function(a){var y=null;if(typeof a=="string")try{y=se.JSON.parse(a)}catch(E){}else typeof a=="object"?y=a:le("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&le("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},Tt.Ky=function(a){return this.Zw(a)},Bi.constructGraphLinksModel=function(){return new Bi},Tt=Bi.prototype,Tt.dm=function(a){if(ei(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];if(qe(E)){var b=x;E=this.dm(E),Array.isArray(a)?a[b]=E:le("Cannot replace an object in an HTMLCollection or NodeList at "+b)}}else if(qe(a)){for(y in a)if(x=a[y],qe(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(b=x.length%2===0,E=0;E<x.length;E++)if(typeof x[E]!="number"){b=!1;break}if(b){for(b=new ne,E=0;E<x.length/2;E++)b.add(new Qt(x[2*E],x[2*E+1]));b.freeze(),a[y]=b}}return Ow(a)}return a},Tt.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()):ei(a)?ld(this,a):qe(a)?Fv(this,a):typeof a=="function"?"null":a.toString()};function ld(a,y,x){x===void 0&&(x=!1);var E=y.length;if(0>=E)return"[]";var b=new hr;b.add("["),x&&1<E&&b.add(`
`);for(var z=0;z<E;z++){var tt=y[z];tt!==void 0&&(0<z&&(b.add(","),x&&b.add(`
`)),b.add(a.sm(tt)))}return x&&1<E&&b.add(`
`),b.add("]"),b.toString()}function F1(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function qa(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function Fv(a,y){var x=y;if(x instanceof Qt)y={class:"go.Point",x:qa(x.x),y:qa(x.y)};else if(x instanceof on)y={class:"go.Size",width:qa(x.width),height:qa(x.height)};else if(x instanceof Ue)y={class:"go.Rect",x:qa(x.x),y:qa(x.y),width:qa(x.width),height:qa(x.height)};else if(x instanceof sr)y={class:"go.Margin",top:qa(x.top),right:qa(x.right),bottom:qa(x.bottom),left:qa(x.left)};else if(x instanceof di)x.sb()?y={class:"go.Spot",x:qa(x.x),y:qa(x.y),offsetX:qa(x.offsetX),offsetY:qa(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof lo){if(y={class:"go.Brush",type:x.type.name},x.type===Hr?y.color=x.color:(x.type===cr||x.type===Cr)&&(y.start=x.start,y.end=x.end,x.type===Cr&&(x.startRadius!==0&&(y.startRadius=qa(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=qa(x.endRadius)))),x.colorStops!==null){var E={};for(x=x.colorStops.iterator;x.next();)E[x.key]=x.value;y.colorStops=E}}else x instanceof bn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=qa(x.startX)),x.startY!==0&&(y.startY=qa(x.startY)),x.endX!==0&&(y.endX=qa(x.endX)),x.endY!==0&&(y.endY=qa(x.endY)),x.spot1.D(br)||(y.spot1=x.spot1),x.spot2.D(gr)||(y.spot2=x.spot2),x.type===bn.o&&(y.path=bn.ia(x))):x instanceof Oe&&(y={class:"go.EnumValue",classType:Ep(a,x.classType),name:x.name});E="{",x=!0;for(var b in y){var z=xs(y,b);if(!F1(b,z))if(x?x=!1:E+=",",E+=a.quote(b)+":",b==="points"&&z instanceof ne){var tt="[";for(z=z.iterator;z.next();){var rt=z.value;1<tt.length&&(tt+=","),tt+=a.sm(rt.x),tt+=",",tt+=a.sm(rt.y)}tt+="]",E+=tt}else E+=a.sm(z)}return E+"}"}function $a(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function Ow(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 Qt($a(a.x),$a(a.y));else if(y==="Size")x=new on($a(a.width),$a(a.height));else if(y==="Rect")x=new Ue($a(a.x),$a(a.y),$a(a.width),$a(a.height));else if(y==="Margin")x=new sr($a(a.top),$a(a.right),$a(a.bottom),$a(a.left));else if(y==="Spot")typeof a.enum=="string"?x=Uo(a.enum):x=new di($a(a.x),$a(a.y),$a(a.offsetX),$a(a.offsetY));else if(y==="Brush"){if(x=new lo,x.type=Ui(lo,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof di&&(x.start=a.start),a.end instanceof di&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=$a(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=$a(a.endRadius)),a=a.colorStops,qe(a))for(var E in a)x.addColorStop(parseFloat(E),a[E])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=bn.parse(a.path):x=new bn,x.type=Ui(bn,a.type),typeof a.startX=="number"&&(x.startX=$a(a.startX)),typeof a.startY=="number"&&(x.startY=$a(a.startY)),typeof a.endX=="number"&&(x.endX=$a(a.endX)),typeof a.endY=="number"&&(x.endY=$a(a.endY)),a.spot1 instanceof di&&(x.spot1=a.spot1),a.spot2 instanceof di&&(x.spot2=a.spot2)):y==="EnumValue"&&(E=a.classType,E.indexOf("go.")===0&&(E=E.substr(3)),E=Lv(E),typeof E=="function"&&(x=Ui(E,a.name)));return x}Tt.Pe=function(a){return this.Lt.add(a),this},Tt.ik=function(a){this.Lt.remove(a)},Tt.ds=function(a){this.skipsUndoManager||this.undoManager.Tu(a);for(var y=this.Lt,x=y.length,E=0;E<x;E++)y.M(E)(a)},Tt.cb=function(a,y,x,E,b,z,tt){Is(this,"",a,y,x,E,b,z,tt)},Tt.g=function(a,y,x,E,b){Is(this,"",No,a,this,y,x,E,b)},Tt.Fs=function(a,y,x,E,b,z){Is(this,"",No,y,a,x,E,b,z)};function Is(a,y,x,E,b,z,tt,rt,ot){rt===void 0&&(rt=null),ot===void 0&&(ot=null);var lt=new Qo;lt.model=a,lt.change=x,lt.modelChange=y,lt.propertyName=E,lt.object=b,lt.oldValue=z,lt.oldParam=rt,lt.newValue=tt,lt.newParam=ot,a.ds(lt)}Bi.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===No){var x=a.object,E=a.propertyName,b=a.I(y);E===this.nodeKeyProperty&&this.lb(x)&&(y=a.I(!y),y!==void 0&&this.kb.remove(y),b!==void 0&&this.kb.add(b,x)),Ro(x,E,b)}else a.change===as?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,qe(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]===a&&Vi(this.Tc,x),E!==void 0&&this.kb.remove(E)):(this.Tc[x]!==a&&ki(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)))):a.modelChange===""?((E=a.object)&&!ei(E)&&a.propertyName&&(E=xs(a.object,a.propertyName)),ei(E)&&typeof x=="number"&&(a=a.newValue,y?Vi(E,x):ki(E,x,a))):le("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===gs?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,qe(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]!==a&&ki(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)):(this.Tc[x]===a&&Vi(this.Tc,x),E!==void 0&&this.kb.remove(E)))):a.modelChange===""?((E=a.object)&&!ei(E)&&a.propertyName&&(E=xs(a.object,a.propertyName)),ei(E)&&typeof x=="number"&&(a=a.oldValue,y?ki(E,x,a):Vi(E,x))):le("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==oa&&le("unknown ChangedEvent: "+a.toString())},Bi.prototype.Ea=function(a){return this.undoManager.Ea(a)},Bi.prototype.eb=function(a){return this.undoManager.eb(a)},Bi.prototype.Kf=function(){return this.undoManager.Kf()},Bi.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Tt=Bi.prototype,Tt.La=function(a,y){y===void 0&&(y=""),Is(this,"SourceChanged",oa,y,a,null,null)},Tt.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=xs(a,y),y!==void 0)){if(ud(y))return y;le("Key value for node data "+a+" is not a number or a string: "+y)}}},Tt.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var E=xs(a,x);E!==y&&this.hc(y)===null&&(Ro(a,x,y),E!==void 0&&this.kb.remove(E),this.kb.add(y,a),Is(this,"nodeKey",No,x,a,E,y),typeof x=="string"&&this.La(a,x),this.jp(E,y))}else Ro(a,x,y)}};function ud(a){return typeof a=="number"||typeof a=="string"}Tt.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},Tt.hc=function(a){return a===null&&le("Model.findNodeDataForKey:key must not be null"),a!==void 0&&ud(a)?this.kb.I(a):null},Tt.$u=function(a){if(a!==null){var y=this.Th;if(y!==""){var x=this.wa(a);if(x===void 0||this.kb.contains(x)){var E=this.bl;if(E!==null&&(x=E(this,a),x!=null&&!this.kb.contains(x))){Ro(a,y,x);return}if(typeof x=="string"){for(E=2;this.kb.contains(x+E);)E++;Ro(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;Ro(a,y,x)}}}}},Tt.xf=function(a){a!==null&&(Jn(a),this.lb(a)||E1(this,a,!0))};function E1(a,y,x){var E=a.wa(y);(E===void 0||a.kb.I(E)!==y)&&(a.$u(y),E=a.wa(y),E===void 0&&le("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(E,y),E=null,x&&(E=a.Tc.length,ki(a.Tc,E,y)),Is(a,"nodeDataArray",as,"nodeDataArray",a,null,y,null,E),a.fm(y),a.em(y))}Tt.Fy=function(a){if(ei(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)},Tt.cm=function(a){a!==null&&L1(this,a,!0)};function L1(a,y,x){var E=a.wa(y);if(E!==void 0&&a.kb.remove(E),E=null,x){t:if(x=a.Tc,Array.isArray(x))E=x.indexOf(y);else{E=x.length;for(var b=0;b<E;b++)if(x[b]===y){E=b;break t}E=-1}if(0>E)return;Vi(a.Tc,E)}Is(a,"nodeDataArray",gs,"nodeDataArray",a,y,null,E,null),a.qp(y)}Tt.nA=function(a){if(ei(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)},Tt.$z=function(a){if(a!==this.nodeDataArray&&ei(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var E=a.length,b=0;b<E;b++){var z=a[b],tt=this.wa(z);if(tt!==void 0){x.add(tt);var rt=this.hc(tt);rt!==z&&(rt!==null?(this.Do(rt,z),this.lm(z,rt)):(z=this.cloneDeep(z),this.km(z,tt),this.xf(z)))}else tt=this.cloneDeep(z),this.xf(tt),x.add(this.wa(tt))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.hc(E))&&this.cm(E);y.clear(),x.clear()}},Tt.jp=function(a,y){y!==void 0&&(a=Fp(this,a),a instanceof Fe&&this.Vf.add(y,a))},Tt.Lv=function(){},Tt.fm=function(){},Tt.em=function(){},Tt.qp=function(){};function oA(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E===null&&(E=new Fe,a.Vf.add(y,E)),E.add(x)}}function sA(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E instanceof Fe&&(x==null?a.Vf.remove(y):(E.remove(x),E.count===0&&a.Vf.remove(y)))}}function Fp(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof Fe?a:null)}Tt.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},Bi.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):G0(this,a,!0),qe(a)&&an(a),a};function G0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var E=[];for(x=0;x<y.length;x++){var b=G0(a,y[x],a.copiesArrayObjects);E.push(b)}return an(E),E}if(x&&qe(y)){x=(x=y.constructor)?new x:{},b=a.copiesKey||typeof a.nodeKeyProperty!="string"?null:a.nodeKeyProperty;for(E in y)if(E==="__gohashid")x.__gohashid=void 0;else if(E===b)x[b]=void 0;else{var z=xs(y,E),tt=Ep(a,z);tt==="GraphObject"||tt==="Diagram"||tt==="Layer"||tt==="RowColumnDefinition"||tt==="AnimationManager"||tt==="Tool"||tt==="CommandHandler"||tt==="Layout"||tt==="InputEvent"||tt==="DiagramEvent"||z instanceof Bi||z instanceof Ko||z instanceof bs||z instanceof Qo||(z=G0(a,z,!1)),Ro(x,E,z)}return an(x),x}return y instanceof Qt||y instanceof on||y instanceof Ue||y instanceof di||y instanceof sr?y.copy():y}Bi.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!M1&&a instanceof Be&&(M1=!0,On('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),On(" Is that really your intent?"));var E=xs(a,y);E!==x&&(Ro(a,y,x),this.Fs(a,y,E,x))},Tt=Bi.prototype,Tt.set=function(a,y,x){this.setDataProperty(a,y,x)},Tt.Do=function(a,y){if(y){var x=this.lb(a),E;for(E in y)E==="__gohashid"||x&&E===this.nodeKeyProperty||this.setDataProperty(a,E,y[E])}},Tt.Ay=function(a,y){this.ts(a,-1,y)},Tt.ts=function(a,y,x){0>y&&(y=a.length),ki(a,y,x),Is(this,"",as,"",a,null,x,null,y)},Tt.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&le("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];Vi(a,y),Is(this,"",gs,"",a,x,null,y,null)},Tt.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=xs(a,y),y===void 0))return"";if(typeof y=="string")return y;le("getCategoryForNodeData found a non-string category for "+a+": "+y)},Tt.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var E=xs(a,x);E===void 0&&(E=""),E!==y&&(Ro(a,x,y),Is(this,"nodeCategory",No,x,a,E,y))}else Ro(a,x,y)}},Tt.lm=function(a,y){this.jm(y,this.Ro(a))},Tt.Tl=function(){return!1},Tt.Wj=function(){return!1},Tt.ri=function(){return!1},Tt.xs=function(){return!1},Tt.Xj=function(){return!1};function Ev(){return new Bi}function Ep(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 Ep(a,y.constructor);return typeof y}function Lv(a){return Ku[a]?Ku[a]:se.go!==void 0&&se.go[a]?se.go[a]:null}function xs(a,y){if(!a||!y)return null;try{if(typeof y=="function")var x=y(a);else typeof a.getAttribute=="function"?(x=a.getAttribute(y),x===null&&(x=void 0)):x=a[y]}catch(E){}return x}function Ro(a,y,x){if(a&&y)try{typeof y=="function"?y(a,x):typeof a.setAttribute=="function"?a.setAttribute(y,x):a[y]=x}catch(E){}}Sn.Object.defineProperties(Bi.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===""&&le("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&le("Cannot set Model.nodeKeyProperty when there is existing node data"),this.Th=a,this.g("nodeKeyProperty",y,a))}},makeUniqueKeyFunction:{get:function(){return this.bl},set:function(a){var y=this.bl;y!==a&&(this.bl=a,this.g("makeUniqueKeyFunction",y,a))}},nodeDataArray:{get:function(){return this.Tc},set:function(a){var y=this.Tc;if(y!==a){this.kb.clear(),this.Lv();for(var x=a.length,E=0;E<x;E++){var b=a[E];qe(b)||le("Model.nodeDataArray must only contain Objects, not: "+b),Jn(b)}for(this.Tc=a,E=new ne,b=0;b<x;b++){var z=a[b],tt=this.wa(z);tt===void 0||this.kb.I(tt)!==null?E.add(z):this.kb.add(tt,z)}for(E=E.iterator;E.next();)b=E.value,this.$u(b),z=this.wa(b),z!==void 0&&this.kb.add(z,b);for(Is(this,"nodeDataArray",No,"nodeDataArray",this,y,a),y=0;y<x;y++)E=a[y],this.fm(E),this.em(E);Array.isArray(a)||(this.isReadOnly=!0)}}},copyNodeDataFunction:{get:function(){return this.Bk},set:function(a){var y=this.Bk;y!==a&&(this.Bk=a,this.g("copyNodeDataFunction",y,a))}},copiesArrays:{get:function(){return this.Km},set:function(a){var y=this.Km;y!==a&&(this.Km=a,this.g("copiesArrays",y,a))}},copiesArrayObjects:{get:function(){return this.Jm},set:function(a){var y=this.Jm;y!==a&&(this.Jm=a,this.g("copiesArrayObjects",y,a))}},copiesKey:{get:function(){return this.Mm},set:function(a){var y=this.Mm;y!==a&&(this.Mm=a,this.g("copiesKey",y,a))}},afterCopyFunction:{get:function(){return this.xm},set:function(a){var y=this.xm;y!==a&&(this.xm=a,this.g("afterCopyFunction",y,a))}},nodeCategoryProperty:{get:function(){return this.lj},set:function(a){var y=this.lj;y!==a&&(this.lj=a,this.g("nodeCategoryProperty",y,a))}},type:{get:function(){return"Model"}}}),Bi.prototype.setCategoryForNodeData=Bi.prototype.jm,Bi.prototype.getCategoryForNodeData=Bi.prototype.Ro,Bi.prototype.removeArrayItem=Bi.prototype.ov,Bi.prototype.insertArrayItem=Bi.prototype.ts,Bi.prototype.addArrayItem=Bi.prototype.Ay,Bi.prototype.assignAllDataProperties=Bi.prototype.Do,Bi.prototype.set=Bi.prototype.set,Bi.prototype.clearUnresolvedReferences=Bi.prototype.Qy,Bi.prototype.mergeNodeDataArray=Bi.prototype.$z,Bi.prototype.removeNodeDataCollection=Bi.prototype.nA,Bi.prototype.removeNodeData=Bi.prototype.cm,Bi.prototype.addNodeDataCollection=Bi.prototype.Fy,Bi.prototype.addNodeData=Bi.prototype.xf,Bi.prototype.makeNodeDataKeyUnique=Bi.prototype.$u,Bi.prototype.findNodeDataForKey=Bi.prototype.hc,Bi.prototype.containsNodeData=Bi.prototype.lb,Bi.prototype.setKeyForNodeData=Bi.prototype.km,Bi.prototype.getKeyForNodeData=Bi.prototype.wa,Bi.prototype.updateTargetBindings=Bi.prototype.La,Bi.prototype.commit=Bi.prototype.commit,Bi.prototype.rollbackTransaction=Bi.prototype.Kf,Bi.prototype.commitTransaction=Bi.prototype.eb,Bi.prototype.startTransaction=Bi.prototype.Ea,Bi.prototype.raiseDataChanged=Bi.prototype.Fs,Bi.prototype.raiseChanged=Bi.prototype.g,Bi.prototype.raiseChangedEvent=Bi.prototype.cb,Bi.prototype.removeChangedListener=Bi.prototype.ik,Bi.prototype.addChangedListener=Bi.prototype.Pe,Bi.prototype.writeJsonValue=Bi.prototype.sm,Bi.prototype.replaceJsonObjects=Bi.prototype.dm,Bi.prototype.applyIncrementalJSON=Bi.prototype.Ky,Bi.prototype.applyIncrementalJson=Bi.prototype.Zw,Bi.prototype.toJSON=Bi.prototype.toJSON,Bi.prototype.toJson=Bi.prototype.np,Bi.prototype.toIncrementalJSON=Bi.prototype.yA,Bi.prototype.toIncrementalJson=Bi.prototype.$x,Bi.prototype.toIncrementalData=Bi.prototype.xA,Bi.prototype.clear=Bi.prototype.clear;var M1=!1,Ku={};Bi.className="Model",Bi.fromJSON=Bi.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=se.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:le("Unable to construct a Model from: "+a);if(y===null){a=null;var E=x.class;if(typeof E=="string")try{var b=null;E.indexOf("go.")===0?(E=E.substr(3),b=Lv(E)):(b=Lv(E),b===null&&(b=se[E])),typeof b=="function"&&(a=new b)}catch(z){}a===null||a instanceof Bi?y=a:le("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=Bi.constructGraphLinksModel()),y.gp(x),y.kv(x),y},Bi.safePropertyValue=xs,Bi.safePropertySet=Ro,Ku.Brush=lo,Ku.ChangedEvent=Qo,Ku.Geometry=bn,Ku.Margin=sr,Ku.Panel=Bn,Ku.Point=Qt,Ku.Rect=Ue,Ku.Size=on,Ku.Spot=di,Ku.Transaction=bs,Ku.UndoManager=Ko;function Ls(a,y,x,E){an(this),this._isFrozen=!1,a===void 0&&(a=""),y===void 0&&(y=a),x===void 0&&(x=null),this.j=-1,this.xd=null,this.xl=a,this.wl=this.to=0,this.Cr=null,this.wn=!1,this.sl=y,this.Im=x,E===void 0?(this.el=b1,this.wk=null):(this.el=Lp,this.wk=E),this.st=new Fe}Ls.prototype.copy=function(){var a=new Ls;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},Tt=Ls.prototype,Tt.qb=function(a){a.classType===Ls&&(this.mode=a)},Tt.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return this._isFrozen=!1,this},Tt.Kx=function(a){return a===void 0&&(a=null),this.mode=Lp,this.backConverter=a,this},Tt.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},Tt.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function k1(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}Tt.Mv=function(a,y,x){var E=this.sl;if(x===void 0||E===""||E===x){x=this.xl;var b=this.Im;if(b===null&&x==="")On("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(E!==""&&(z=xs(y,E)),z!==void 0)if(b===null)x!==""&&Ro(a,x,z);else try{if(x!==""){var tt=b(z,a);Ro(a,x,tt)}else b(z,a)}catch(rt){}}}},Tt.sp=function(a,y,x,E){if(this.el===Lp){var b=this.xl;if(x===void 0||b===x){x=this.sl;var z=this.wk,tt=a;if(b!==""&&(tt=xs(a,b)),tt!==void 0&&!this.st.contains(a))try{this.st.add(a);var rt=E!==null?E.diagram:null,ot=rt!==null?rt.model:null;if(z===null){if(x!=="")ot!==null?ot.setDataProperty(y,x,tt):Ro(y,x,tt);else if(ot!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var lt=E.itemIndex,ut=E.panel.itemArray;ot.ov(ut,lt),ot.ts(ut,lt,tt)}}else try{if(x!==""){var ft=z(tt,y,ot);ot!==null?ot.setDataProperty(y,x,ft):Ro(y,x,ft)}else{var yt=z(tt,y,ot);if(yt!==void 0&&ot!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var Mt=E.itemIndex,bt=E.panel.itemArray;ot.ov(bt,Mt),ot.ts(bt,Mt,yt)}}}catch(Dt){}}finally{this.st.remove(a)}}}},Sn.Object.defineProperties(Ls.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&De(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&De(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&De(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&De(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&De(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&De(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&De(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&De(this),this.el=a}}}),Ls.prototype.updateSource=Ls.prototype.sp,Ls.prototype.updateTarget=Ls.prototype.Mv,Ls.prototype.ofModel=Ls.prototype.dA,Ls.prototype.ofObject=Ls.prototype.cp,Ls.prototype.makeTwoWay=Ls.prototype.Kx;var Hw="Binding",b1=new Oe(Ls,"OneWay",1),Lp=new Oe(Ls,"TwoWay",2);Ls.className="Binding",Ls.parseEnum=function(a,y){return function(x){return x=Ui(a,x),x===null?y:x}},Ls.toString=mi,Ls.OneWay=b1,Ls.TwoWay=Lp;function Kr(a,y,x){Bi.call(this),this.Vv=`,
"insertedLinkKeys": `,this.iy=`,
"modifiedLinkData": `,this.Xv=`,
"removedLinkKeys": `,this.md=[],this.$f=new Fe,this.wb=new be,this.Jh="",this.Ri=this.Ak=this.cl=null,this.lf="from",this.mf="to",this.fj=this.ej="",this.dj="category",this.je="",this.jl="isGroup",this.Je="group",this.Lm=!1,y!==void 0&&(this.linkDataArray=y),a!==void 0&&(ei(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}We(Kr,Bi),Kr.constructGraphLinksModel=Bi.constructGraphLinksModel,Kr.prototype.cloneProtected=function(a){Bi.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},Tt=Kr.prototype,Tt.clear=function(){Bi.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},Tt.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" GraphLinksModel";if(0<a){y+=`
node data:`,a=this.nodeDataArray;var x=a.length,E;for(E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+mi(b)}for(y+=`
link data:`,a=this.linkDataArray,x=a.length,E=0;E<x;E++)b=a[E],y+=" "+$l(this,b,!0)+"-->"+$l(this,b,!1)}return y},Tt.Qv=function(a,y){this.linkKeyProperty===""&&le("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=Bi.prototype.Qv.call(this,a,y),E=this,b=new Fe,z=new Fe,tt=new Fe,rt=this.vh;a.changes.each(function(ut){ut.model===E&&(ut.modelChange==="linkDataArray"?ut.change===as?b.add(ut.newValue):ut.change===gs&&tt.add(ut.oldValue):E.Jc(ut.object)?z.add(ut.object):ut.object!==null&&(ut.object!==null&&rt&&rt.contains(ut.object)?rt.get(ut.object).each(function(ft){E.Jc(ft)&&z.add(ft)}):ut.object instanceof Bi||E.lb(ut.object)||T1(E,ut.object).each(function(ft){z.add(ft)})))});var ot=this.il;ot.clear(),b.each(function(ut){ot.add(E.Ac(ut)),y||z.add(ut)});var lt=this.kl;return lt.clear(),tt.each(function(ut){lt.add(E.Ac(ut)),y&&z.add(ut)}),a=E.cloneDeep(z.Fa()),0<ot.count&&(x===null&&(x={}),y?x.removedLinkKeys=ot.Fa():x.insertedLinkKeys=ot.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<lt.count&&(x===null&&(x={}),y?x.insertedLinkKeys=lt.Fa():x.removedLinkKeys=lt.Fa()),lt.clear(),ot.clear(),x},Tt.rm=function(){var a=Bi.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},Tt.gp=function(a){Bi.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)},Tt.Rv=function(){var a=Bi.prototype.Rv.call(this),y=`,
"linkDataArray": `+ld(this,this.linkDataArray,!0);return a+y},Tt.kv=function(a){Bi.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function T1(a,y){for(var x=new Fe,E=0;E<a.linkDataArray.length;E++){var b=a.linkDataArray[E];K0(a,y,b,b,x)}return x}Tt.Pv=function(a,y){this.linkKeyProperty===""&&le("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=Bi.prototype.Pv.call(this,a,y),E=this,b=new Fe,z=new Fe,tt=new Fe,rt=this.vh;a.changes.each(function(ut){ut.model===E&&(ut.modelChange==="linkDataArray"?ut.change===as?b.add(ut.newValue):ut.change===gs&&tt.add(ut.oldValue):E.Jc(ut.object)?z.add(ut.object):ut.object!==null&&(ut.object!==null&&rt&&rt.contains(ut.object)?rt.get(ut.object).each(function(ft){E.Jc(ft)&&z.add(ft)}):ut.object instanceof Bi||E.lb(ut.object)||T1(E,ut.object).each(function(ft){z.add(ft)})))});var ot=this.il;ot.clear(),b.each(function(ut){ot.add(E.Ac(ut)),y||z.add(ut)});var lt=this.kl;return lt.clear(),tt.each(function(ut){lt.add(E.Ac(ut)),y&&z.add(ut)}),a=x,0<ot.count&&(a+=(y?this.Xv:this.Vv)+ld(this,ot.Fa(),!0)),0<z.count&&(a+=this.iy+ld(this,z.Fa(),!0)),0<lt.count&&(a+=(y?this.Vv:this.Xv)+ld(this,lt.Fa(),!0)),lt.clear(),ot.clear(),a},Tt.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)&&le("applyIncrementalJson cannot change Model properties"),Bi.prototype.fp.call(this,a);var y=a.insertedLinkKeys;if(Array.isArray(y))for(var x=y.length,E=0;E<x;E++){var b=y[E],z=this.jh(b);z===null&&(z=this.Jo({}),this.Ks(z,b),this.fi(z))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,E=0;E<x;E++)if(b=y[E],z=this.Ac(b),z=this.jh(z),z!==null){for(var tt in b)tt!=="__gohashid"&&tt!==this.linkKeyProperty&&this.setDataProperty(z,tt,b[tt]);I1(this,b,z)}}if(a=a.removedLinkKeys,Array.isArray(a))for(tt=a.length,y=0;y<tt;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},Kr.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===No){var x=a.object,E=a.propertyName;if(E===this.linkKeyProperty&&this.Jc(x)){var b=a.I(y);y=a.I(!y),y!==void 0&&this.wb.remove(y),b!==void 0&&this.wb.add(b,x),Ro(x,E,b);return}}else if(a.change===as){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,qe(a)&&typeof x=="number"&&(E=this.Ac(a),y?(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),E!==void 0&&this.wb.remove(E)):(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),E!==void 0&&this.wb.add(E,a)));return}if(a.modelChange==="linkLabelKeys"){E=this.Ef(a.object),Array.isArray(E)&&typeof x=="number"&&(y?(x=E.indexOf(a.newValue),0<=x&&E.splice(x,1)):0>E.indexOf(a.newValue)&&E.splice(x,0,a.newValue));return}}else if(a.change===gs){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,qe(a)&&typeof x=="number"&&(E=this.Ac(a),y?(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),E!==void 0&&this.wb.add(E,a)):(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),E!==void 0&&this.wb.remove(E)));return}if(a.modelChange==="linkLabelKeys"){E=this.Ef(a.object),Array.isArray(E)&&typeof x=="number"&&(y?0>E.indexOf(a.newValue)&&E.splice(x,0,a.newValue):(x=E.indexOf(a.newValue),0<=x&&E.splice(x,1)));return}}Bi.prototype.changeState.call(this,a,y)}},Tt=Kr.prototype,Tt.Vl=function(a){if(a!==void 0){var y=this.Ri;if(y!==null){var x=this.hc(a);x===null&&(x=this.copyNodeData(y),Ro(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Tt.yx=function(a){return $l(this,a,!0)},Tt.wv=function(a,y){Tg(this,a,y,!0)},Tt.Bx=function(a){return $l(this,a,!1)},Tt.Bv=function(a,y){Tg(this,a,y,!1)};function $l(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=xs(y,a),a!==void 0))){if(ud(a))return a;le((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Tg(a,y,x,E){if(x===null&&(x=void 0),y!==null){var b=E?a.lf:a.mf;if(b!=="")if(x=a.Vl(x),a.Jc(y)){var z=xs(y,b);z!==x&&(sA(a,z,y),Ro(y,b,x),a.hc(x)===null&&oA(a,x,y),Is(a,E?"linkFromKey":"linkToKey",No,b,y,z,x),typeof b=="string"&&a.La(y,b))}else Ro(y,b,x)}}Tt.zx=function(a){return z0(this,a,!0)},Tt.xv=function(a,y){Ng(this,a,y,!0)},Tt.Cx=function(a){return z0(this,a,!1)},Tt.Cv=function(a,y){Ng(this,a,y,!1)};function z0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=xs(y,a),y===void 0?"":y)}function Ng(a,y,x,E){if(y!==null){var b=E?a.ej:a.fj;if(b!=="")if(a.Jc(y)){var z=xs(y,b);z===void 0&&(z=""),z!==x&&(Ro(y,b,x),Is(a,E?"linkFromPortId":"linkToPortId",No,b,y,z,x),typeof b=="string"&&a.La(y,b))}else Ro(y,b,x)}}Tt.Ef=function(a){if(a===null)return j0;var y=this.je;return y===""?j0:(a=xs(a,y),a===void 0?j0:a)},Tt.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var E=xs(a,x);if(E===void 0&&(E=j0),E!==y){if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)sA(this,E[z],a);for(Ro(a,x,y),b=y.length,z=0;z<b;z++){var tt=y[z];this.hc(tt)===null&&oA(this,tt,a)}Is(this,"linkLabelKeys",No,x,a,E,y),typeof x=="string"&&this.La(a,x)}}else Ro(a,x,y)}},Tt.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=xs(a,x);if(E===void 0)x=[],x.push(y),this.Ls(a,x);else if(Array.isArray(E)){var b=E.indexOf(y);0<=b||(b=E.length,E.push(y),this.Jc(a)&&(this.hc(y)===null&&oA(this,y,a),Is(this,"linkLabelKeys",as,x,a,null,y,null,b)))}else le(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},Tt.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=xs(a,x);if(Array.isArray(E)){var b=E.indexOf(y);0>b||(E.splice(b,1),this.Jc(a)&&(sA(this,y,a),Is(this,"linkLabelKeys",gs,x,a,y,null,b,null)))}else E!==void 0&&le(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Tt.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=xs(a,y),y!==void 0)){if(ud(y))return y;le("Key value for link data "+a+" is not a number or a string: "+y)}}},Tt.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var E=xs(a,x);E!==y&&this.jh(y)===null&&(Ro(a,x,y),E!==void 0&&this.wb.remove(E),this.wb.add(y,a),Is(this,"linkKey",No,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Ro(a,x,y)}},Tt.jh=function(a){return a===null&&le("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&ud(a)?this.wb.I(a):null},Tt.Bs=function(a){if(a!==null){var y=this.Jh;if(y!==""){var x=this.Ac(a);if(x===void 0||this.wb.contains(x)){var E=this.cl;if(E!==null&&(x=E(this,a),x!=null&&!this.wb.contains(x))){Ro(a,y,x);return}if(typeof x=="string"){for(E=2;this.wb.contains(x+E);)E++;Ro(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;Ro(a,y,x)}}}}},Tt.Jc=function(a){return a===null?!1:this.$f.contains(a)},Tt.fi=function(a){a!==null&&(Jn(a),this.Jc(a)||N1(this,a,!0))};function N1(a,y,x){if(a.linkKeyProperty!==""){var E=a.Ac(y);if(E!==void 0&&a.wb.I(E)===y)return;a.Bs(y),E=a.Ac(y),E===void 0&&le("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(E,y)}a.$f.add(y),E=null,x&&(E=a.md.length,a.md.splice(E,0,y)),Is(a,"linkDataArray",as,"linkDataArray",a,null,y,null,E),Mv(a,y)}Tt.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)},Tt.bm=function(a){a!==null&&D1(this,a,!0)};function D1(a,y,x){a.$f.remove(y);var E=a.Ac(y);if(E!==void 0&&a.wb.remove(E),E=null,x){if(E=a.md.indexOf(y),0>E)return;a.md.splice(E,1)}if(Is(a,"linkDataArray",gs,"linkDataArray",a,y,null,E,null),x=$l(a,y,!0),sA(a,x,y),x=$l(a,y,!1),sA(a,x,y),E=a.Ef(y),Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],sA(a,x,y)}Tt.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)},Tt.Zz=function(a){if(this.linkKeyProperty===""&&le("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&ei(a)){var y=this.kl;y.clear(),y.addAll(this.wb.iteratorKeys);var x=this.il;x.clear();for(var E=a.length,b=0;b<E;b++){var z=a[b],tt=this.Ac(z);if(tt!==void 0){x.add(tt);var rt=this.jh(tt);rt!==z&&(rt!==null?(this.Do(rt,z),I1(this,z,rt)):(z=this.cloneDeep(z),this.Ks(z,tt),this.fi(z)))}else tt=this.cloneDeep(z),this.fi(tt),x.add(this.Ac(tt))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.jh(E))&&this.bm(E);y.clear(),x.clear()}};function Mv(a,y){var x=$l(a,y,!0);x=a.Vl(x),a.hc(x)===null&&oA(a,x,y),x=$l(a,y,!1),x=a.Vl(x),a.hc(x)===null&&oA(a,x,y);var E=a.Ef(y);if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],a.hc(x)===null&&oA(a,x,y)}Tt.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):G0(this,a,!0),qe(a)&&(an(a),this.lf!==""&&Ro(a,this.lf,void 0),this.mf!==""&&Ro(a,this.mf,void 0),this.je!==""&&Ro(a,this.je,[])),a},Tt.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!xs(a,y)},Tt.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=xs(a,y),y!==void 0)){if(ud(y))return y;le("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},Tt.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var E=xs(a,x);E!==y&&(sA(this,E,a),Ro(a,x,y),this.hc(y)===null&&oA(this,y,a),Is(this,"nodeGroupKey",No,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Ro(a,x,y)}},Kr.prototype.copyNodeData=function(a){return a===null?null:(a=Bi.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||xs(a,this.Je)===void 0||Ro(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){Tg(this,a,x,!0);return}if(y===this.linkToKeyProperty){Tg(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Ng(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Ng(this,a,x,!1);return}if(y===this.linkKeyProperty){this.Ks(a,x);return}if(y===this.linkCategoryProperty){this.lp(a,x);return}if(y===this.linkLabelKeysProperty){this.Ls(a,x);return}}var E=xs(a,y);E!==x&&(Ro(a,y,x),this.Fs(a,y,E,x))},Tt=Kr.prototype,Tt.Do=function(a,y){if(y){var x=this.lb(a),E=this.Jc(a),b;for(b in y)b==="__gohashid"||x&&b===this.nodeKeyProperty||x&&b===this.nodeIsGroupProperty&&xs(a,b)===y[b]||E&&b===this.linkKeyProperty||this.setDataProperty(a,b,y[b])}},Tt.jp=function(a,y){Bi.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y);for(x=this.$f.iterator;x.next();){var E=x.value,b=a,z=y;if($l(this,E,!0)===b){var tt=this.lf;Ro(E,tt,z),Is(this,"linkFromKey",No,tt,E,b,z),typeof tt=="string"&&this.La(E,tt)}if($l(this,E,!1)===b&&(tt=this.mf,Ro(E,tt,z),Is(this,"linkToKey",No,tt,E,b,z),typeof tt=="string"&&this.La(E,tt)),tt=this.Ef(E),Array.isArray(tt))for(var rt=tt.length,ot=this.je,lt=0;lt<rt;lt++)tt[lt]===b&&(tt[lt]=z,Is(this,"linkLabelKeys",as,ot,E,b,z,lt,lt))}},Tt.qv=function(a,y,x){if(this.lh(a)===y){var E=this.Je;Ro(a,E,x),Is(this,"nodeGroupKey",No,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Tt.Lv=function(){Bi.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)Mv(this,a[x])},Tt.fm=function(a){Bi.prototype.fm.call(this,a),a=this.wa(a);var y=Fp(this,a);if(y!==null){var x=rn();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)){if(this.lh(E)===a){var b=this.Je;Is(this,"nodeGroupKey",No,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}else if($l(this,E,!0)===a&&(b=this.lf,Is(this,"linkFromKey",No,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),$l(this,E,!1)===a&&(b=this.mf,Is(this,"linkToKey",No,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),b=this.Ef(E),Array.isArray(b))for(var z=b.length,tt=this.je,rt=0;rt<z;rt++)b[rt]===a&&(Is(this,"linkLabelKeys",as,tt,E,a,a,rt,rt),x.push(E))}for(y=0;y<x.length;y++)sA(this,a,x[y]);Ve(x)}},Tt.em=function(a){Bi.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&oA(this,y,a)},Tt.qp=function(a){Bi.prototype.qp.call(this,a);var y=this.lh(a);sA(this,y,a)},Tt.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=xs(a,y),y===void 0))return"";if(typeof y=="string")return y;le("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 E=xs(a,x);E===void 0&&(E=""),E!==y&&(Ro(a,x,y),Is(this,"linkCategory",No,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Ro(a,x,y)}},Kr.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Tt=Kr.prototype,Tt.lm=function(a,y){Bi.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function I1(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))}Tt.Wj=function(){return!0},Tt.ri=function(){return!0},Tt.xs=function(){return!0},Tt.Xj=function(){return!0},Sn.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,E=0;E<x;E++){var b=a[E];qe(b)||le("GraphLinksModel.linkDataArray must only contain Objects, not: "+b),Jn(b)}if(this.md=a,this.linkKeyProperty!==""){for(E=new ne,b=0;b<x;b++){var z=a[b],tt=this.Ac(z);tt===void 0||this.wb.I(tt)!==null?E.add(z):this.wb.add(tt,z)}for(E=E.iterator;E.next();)b=E.value,this.Bs(b),z=this.Ac(b),z!==void 0&&this.wb.add(z,b)}for(E=new Fe,b=0;b<x;b++)E.add(a[b]);for(this.$f=E,Is(this,"linkDataArray",No,"linkDataArray",this,y,a),y=0;y<x;y++)Mv(this,a[y])}}},linkKeyProperty:{get:function(){return this.Jh},set:function(a){var y=this.Jh;if(y!==a){this.Jh=a,this.wb.clear();for(var x=this.linkDataArray.length,E=0;E<x;E++){var b=this.linkDataArray[E],z=this.Ac(b);z===void 0&&(this.Bs(b),z=this.Ac(b)),z!==void 0&&this.wb.add(z,b)}this.g("linkKeyProperty",y,a)}}},makeUniqueLinkKeyFunction:{get:function(){return this.cl},set:function(a){var y=this.cl;y!==a&&(this.cl=a,this.g("makeUniqueLinkKeyFunction",y,a))}},copyLinkDataFunction:{get:function(){return this.Ak},set:function(a){var y=this.Ak;y!==a&&(this.Ak=a,this.g("copyLinkDataFunction",y,a))}},nodeIsGroupProperty:{get:function(){return this.jl},set:function(a){var y=this.jl;y!==a&&(this.jl=a,this.g("nodeIsGroupProperty",y,a))}},nodeGroupKeyProperty:{get:function(){return this.Je},set:function(a){var y=this.Je;y!==a&&(this.Je=a,this.g("nodeGroupKeyProperty",y,a))}},Ij:{get:function(){return this.Lm},set:function(a){this.Lm!==a&&(this.Lm=a)}},linkCategoryProperty:{get:function(){return this.dj},set:function(a){var y=this.dj;y!==a&&(this.dj=a,this.g("linkCategoryProperty",y,a))}},type:{get:function(){return"GraphLinksModel"}}}),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 j0=Object.freeze([]);Kr.className="GraphLinksModel",Ku.GraphLinksModel=Kr,Bi.constructGraphLinksModel=Bi.constructGraphLinksModel=function(){return new Kr},Bi.initDiagramModel=Ev=function(){return new Kr};function tl(a,y){Bi.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(ei(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}We(tl,Bi),tl.constructGraphLinksModel=Bi.constructGraphLinksModel,tl.prototype.cloneProtected=function(a){Bi.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Tt=tl.prototype,Tt.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" TreeModel";if(0<a){y+=`
node data:`,a=this.nodeDataArray;for(var x=a.length,E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+mi(b)}}return y},Tt.rm=function(){var a=Bi.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},Tt.gp=function(a){Bi.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Tt.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&le("applyIncrementalJson cannot change Model properties"),Bi.prototype.fp.call(this,a)},Tt.Vl=function(a){return a},Tt.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=xs(a,y),y!==void 0)){if(ud(y))return y;le("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},Tt.qe=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Ke;if(x!=="")if(y=this.Vl(y),this.lb(a)){var E=xs(a,x);E!==y&&(sA(this,E,a),Ro(a,x,y),this.hc(y)===null&&oA(this,y,a),Is(this,"nodeParentKey",No,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Ro(a,x,y)}},Tt.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=xs(a,y),y===void 0)?"":typeof y=="string"?y:(le("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},tl.prototype.getLinkCategoryForData=function(a){return this.ss(a)},tl.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var E=xs(a,x);E===void 0&&(E=""),E!==y&&(Ro(a,x,y),Is(this,"parentLinkCategory",No,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Ro(a,x,y)}},tl.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},tl.prototype.copyNodeData=function(a){return a===null?null:(a=Bi.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||xs(a,this.Ke)===void 0||Ro(a,this.Ke,void 0),a)},tl.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeParentKeyProperty){this.qe(a,x);return}}var E=xs(a,y);E!==x&&(Ro(a,y,x),this.Fs(a,y,E,x))},Tt=tl.prototype,Tt.jp=function(a,y){Bi.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},Tt.qv=function(a,y,x){if(this.mh(a)===y){var E=this.Ke;Ro(a,E,x),Is(this,"nodeParentKey",No,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Tt.fm=function(a){Bi.prototype.fm.call(this,a),a=this.wa(a);var y=Fp(this,a);if(y!==null){var x=rn();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)&&this.mh(E)===a){var b=this.Ke;Is(this,"nodeParentKey",No,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}for(y=0;y<x.length;y++)sA(this,a,x[y]);Ve(x)}},Tt.em=function(a){Bi.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&oA(this,y,a)},Tt.qp=function(a){Bi.prototype.qp.call(this,a);var y=this.mh(a);sA(this,y,a)},Tt.lm=function(a,y){Bi.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},Tt.Tl=function(){return!0},Tt.xs=function(){return!0},Sn.Object.defineProperties(tl.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"}}}),tl.prototype.setParentLinkCategoryForNodeData=tl.prototype.Ms,tl.prototype.getParentLinkCategoryForNodeData=tl.prototype.ss,tl.prototype.setParentKeyForNodeData=tl.prototype.qe,tl.prototype.getParentKeyForNodeData=tl.prototype.mh,tl.className="TreeModel",Ku.TreeModel=tl;function ts(a){zo.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=Gu,this.Ti=0,this.Zv=new Qt,this.Jp=this.me=0,this.Xr=new Tp,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=Gu,this.K=el,this.nd=Ig,this.hd=xv,this.tf=6,this.Nn=q0,a&&Object.assign(this,a)}We(ts,zo),ts.prototype.cloneProtected=function(a){zo.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},ts.prototype.qb=function(a){a.classType===ts?a===X0||a===J0||a===W0||a===Y0||a===Ig?this.sorting=a:a===nf||a===Dg||a===el||a===hd?this.direction=a:a===Pc||a===Ad||a===Gu||a===zu?this.arrangement=a:(a===Vf||a===q0)&&(this.nodeDiameterFormula=a):zo.prototype.qb.call(this,a)},ts.prototype.createNetwork=function(){return new Ug(this)},ts.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 ne;y.addAll(a.iterator),a=new ne;var x=new ne,E=this.sort(y),b,z,tt=this.Jp,rt=this.arrangement,ot=this.nodeDiameterFormula,lt=this.radius;(!isFinite(lt)||0>=lt)&&(lt=NaN);var ut=this.aspectRatio;(!isFinite(ut)||0>=ut)&&(ut=1);var ft=this.startAngle;isFinite(ft)||(ft=0);var yt=this.sweepAngle;if((!isFinite(yt)||360<yt||1>yt)&&(yt=360),y=this.spacing,isFinite(y)||(y=NaN),rt===zu&&ot===Vf?rt=Gu:rt===zu&&ot!==Vf&&(rt=this.arrangement),(this.direction===nf||this.direction===Dg)&&this.sorting!==Ig){for(ot=0;!(ot>=E.length)&&(a.add(E.M(ot)),!(ot+1>=E.length));ot+=2)x.add(E.M(ot+1));this.direction===nf?(this.arrangement===zu&&a.reverse(),E=new ne,E.addAll(a),E.addAll(x)):(this.arrangement===zu&&x.reverse(),E=new ne,E.addAll(x),E.addAll(a))}ot=E.length;for(var Mt=z=b=0;Mt<E.length;Mt++){var bt=ft+yt*z*(this.direction===el?1:-1)/ot,Dt=E.M(Mt).diameter;isNaN(Dt)&&(Dt=cd(E.M(Mt),bt)),360>yt&&(Mt===0||Mt===E.length-1)&&(Dt/=2),b+=Dt,z++}if(isNaN(lt)||rt===zu){if(isNaN(y)&&(y=6),rt!==Gu&&rt!==zu){for(z=-1/0,tt=0;tt<ot;tt++)Mt=E.M(tt),b=E.M(tt===ot-1?0:tt+1),isNaN(Mt.diameter)&&cd(Mt,0),isNaN(b.diameter)&&cd(b,0),z=Math.max(z,(Mt.diameter+b.diameter)/2);tt=z+y,rt===Pc?lt=(z+y)/(2*Math.PI/ot):lt=V0(this,tt*(360<=yt?ot:ot-1),ut,ft*Math.PI/180,yt*Math.PI/180)}else lt=V0(this,b+(360<=yt?ot:ot-1)*(rt!==zu?y:1.6*y),ut,ft*Math.PI/180,yt*Math.PI/180);z=lt*ut}else if(z=lt*ut,Mt=kv(this,lt,z,ft*Math.PI/180,yt*Math.PI/180),isNaN(y))(rt===Gu||rt===zu)&&(y=(Mt-b)/(360<=yt?ot:ot-1));else if(rt===Gu||rt===zu)Mt=(Mt-b)/(360<=yt?ot:ot-1),Mt<y?(lt=V0(this,b+y*(360<=yt?ot:ot-1),ut,ft*Math.PI/180,yt*Math.PI/180),z=lt*ut):y=Mt;else{for(tt=-1/0,b=0;b<ot;b++)bt=E.M(b),Dt=E.M(b===ot-1?0:b+1),isNaN(bt.diameter)&&cd(bt,0),isNaN(Dt.diameter)&&cd(Dt,0),tt=Math.max(tt,(bt.diameter+Dt.diameter)/2);tt+=y,b=V0(this,tt*(360<=yt?ot:ot-1),ut,ft*Math.PI/180,yt*Math.PI/180),b>lt?(lt=b,z=lt*ut):tt=Mt/(360<=yt?ot:ot-1)}if(this.kw=rt,this.lc=lt,this.Zm=ut,this.lw=ft,this.Wp=yt,this.Ti=y,this.me=z,this.Jp=tt,y=E,E=this.kw,rt=this.lc,lt=this.lw,ut=this.Wp,ft=this.Ti,yt=this.me,ot=this.Jp,this.direction!==nf&&this.direction!==Dg||E!==zu)if(this.direction===nf||this.direction===Dg){switch(tt=0,E){case Ad:tt=180*Z0(this,rt,yt,lt,ot)/Math.PI;break;case Gu:ot=y=0,tt=a.first(),tt!==null&&(y=cd(tt,Math.PI/2)),tt=x.first(),tt!==null&&(ot=cd(tt,Math.PI/2)),tt=180*Z0(this,rt,yt,lt,ft+(y+ot)/2)/Math.PI;break;case Pc:tt=ut/y.length}if(this.direction===nf){switch(E){case Ad:bp(this,a,lt,hd);break;case Gu:kp(this,a,lt,hd);break;case Pc:Mp(this,a,ut/2,lt,hd)}switch(E){case Ad:bp(this,x,lt+tt,el);break;case Gu:kp(this,x,lt+tt,el);break;case Pc:Mp(this,x,ut/2,lt+tt,el)}}else{switch(E){case Ad:bp(this,x,lt,hd);break;case Gu:kp(this,x,lt,hd);break;case Pc:Mp(this,x,ut/2,lt,hd)}switch(E){case Ad:bp(this,a,lt+tt,el);break;case Gu:kp(this,a,lt+tt,el);break;case Pc:Mp(this,a,ut/2,lt+tt,el)}}}else switch(E){case Ad:bp(this,y,lt,this.direction);break;case Gu:kp(this,y,lt,this.direction);break;case Pc:Mp(this,y,ut,lt,this.direction);break;case zu:U1(this,y,ut,lt,this.direction)}else U1(this,y,ut,lt-ut/2,el)}this.updateParts(),this.network=null,this.isValidLayout=!0};function Mp(a,y,x,E,b){var z=a.Wp,tt=a.lc;a=a.me,E=E*Math.PI/180,x=x*Math.PI/180;for(var rt=y.length,ot=0;ot<rt;ot++){var lt=E+(b===el?ot*x/(360<=z?rt:rt-1):-(ot*x)/rt),ut=y.M(ot),ft=tt*Math.tan(lt)/a;ft=Math.sqrt((tt*tt+a*a*ft*ft)/(1+ft*ft)),ut.centerX=ft*Math.cos(lt),ut.centerY=ft*Math.sin(lt),ut.actualAngle=180*lt/Math.PI}}function kp(a,y,x,E){var b=a.lc,z=a.me,tt=a.Ti;x=x*Math.PI/180;for(var rt=y.length,ot=0;ot<rt;ot++){var lt=y.M(ot),ut=y.M(ot===rt-1?0:ot+1),ft=z*Math.sin(x);lt.centerX=b*Math.cos(x),lt.centerY=ft,lt.actualAngle=180*x/Math.PI,isNaN(lt.diameter)&&cd(lt,0),isNaN(ut.diameter)&&cd(ut,0),lt=Z0(a,b,z,E===el?x:-x,(lt.diameter+ut.diameter)/2+tt),x+=E===el?lt:-lt}}function bp(a,y,x,E){var b=a.lc,z=a.me,tt=a.Jp;x=x*Math.PI/180;for(var rt=y.length,ot=0;ot<rt;ot++){var lt=y.M(ot);lt.centerX=b*Math.cos(x),lt.centerY=z*Math.sin(x),lt.actualAngle=180*x/Math.PI,lt=Z0(a,b,z,E===el?x:-x,tt),x+=E===el?lt:-lt}}function U1(a,y,x,E,b){var z=a.Wp;if(a.mj=0,a.Xr=new Tp,360>x){for(z=E+(b===el?z:-z);0>z;)z+=360;z%=360,180<z&&(z-=360),z*=Math.PI/180,a.gt=z,O1(a,y,x,E,b)}else Q1(a,y,x,E,b);a.Xr.commit(y)}function Q1(a,y,x,E,b){var z=a.lc,tt=a.Ti,rt=a.Zm,ot=z*Math.cos(E*Math.PI/180),lt=a.me*Math.sin(E*Math.PI/180),ut=y.Fa();if(ut.length===3)ut[0].centerX=z,ut[0].centerY=0,ut[1].centerX=ut[0].centerX-ut[0].width/2-ut[1].width/2-tt,ut[1].y=ut[0].y,ut[2].centerX=(ut[0].centerX+ut[1].centerX)/2,ut[2].y=ut[0].y-ut[2].height-tt;else if(ut.length===4)ut[0].centerX=z,ut[0].centerY=0,ut[2].centerX=-ut[0].centerX,ut[2].centerY=ut[0].centerY,ut[1].centerX=0,ut[1].y=Math.min(ut[0].y,ut[2].y)-ut[1].height-tt,ut[3].centerX=0,ut[3].y=Math.max(ut[0].y+ut[0].height+tt,ut[2].y+ut[2].height+tt);else{z=Qt.alloc();for(var ft=0;ft<ut.length&&(ut[ft].centerX=ot,ut[ft].centerY=lt,!(ft>=ut.length-1));ft++)H1(a,ot,lt,ut,ft,b,z)||R1(a,ot,lt,ut,ft,b,z),ot=z.x,lt=z.y;if(Qt.free(z),a.mj++,!(23<a.mj)){ot=ut[0].centerX,lt=ut[0].centerY,z=ut[ut.length-1].centerX,ft=ut[ut.length-1].centerY;var yt=Math.abs(ot-z)-((ut[0].width+ut[ut.length-1].width)/2+tt),Mt=Math.abs(lt-ft)-((ut[0].height+ut[ut.length-1].height)/2+tt);tt=0,1>Math.abs(Mt)?Math.abs(ot-z)<(ut[0].width+ut[ut.length-1].width)/2&&(tt=0):tt=0<Mt?Mt:1>Math.abs(yt)?0:yt,ot=Math.abs(z)>Math.abs(ft)?0<z!=lt>ft:0<ft!=ot<z,(ot=b===el?ot:!ot)&&(tt=-Math.abs(tt),tt=Math.min(tt,-ut[ut.length-1].width),tt=Math.min(tt,-ut[ut.length-1].height)),a.Xr.compare(tt,ut),1<Math.abs(tt)&&(a.lc=8>a.mj?a.lc-tt/(2*Math.PI):5>ut.length&&10<tt?a.lc/2:a.lc-(0<tt?1.7:-2.3),a.me=a.lc*rt,Q1(a,y,x,E,b))}}}function O1(a,y,x,E,b){for(var z=a.lc,tt=a.me,rt=a.Zm,ot=z*Math.cos(E*Math.PI/180),lt=tt*Math.sin(E*Math.PI/180),ut=Qt.alloc(),ft=y.Fa(),yt=0;yt<ft.length&&(ft[yt].centerX=ot,ft[yt].centerY=lt,!(yt>=ft.length-1));yt++)H1(a,ot,lt,ft,yt,b,ut)||R1(a,ot,lt,ft,yt,b,ut),ot=ut.x,lt=ut.y;if(Qt.free(ut),a.mj++,!(23<a.mj)){if(ot=Math.atan2(lt,ot),ot=b===el?a.gt-ot:ot-a.gt,ot=Math.abs(ot)<Math.abs(ot-2*Math.PI)?ot:ot-2*Math.PI,z=ot*(z+tt)/2,tt=a.Xr,Math.abs(z)<Math.abs(tt.Pl))for(tt.Pl=z,tt.mk=[],tt.tm=[],ot=0;ot<ft.length;ot++)tt.mk[ot]=ft[ot].bounds.x,tt.tm[ot]=ft[ot].bounds.y;1<Math.abs(z)&&(a.lc=8>a.mj?a.lc-z/(2*Math.PI):a.lc-(0<z?1.7:-2.3),a.me=a.lc*rt,O1(a,y,x,E,b))}}function H1(a,y,x,E,b,z,tt){var rt=a.lc,ot=a.me,lt=0;a=(E[b].width+E[b+1].width)/2+a.Ti;var ut=!1;if(0<=x!=(z===el)){if(z=y+a,z>rt){if(z=y-a,z<-rt)return tt.x=z,tt.y=lt,!1;ut=!0}}else if(z=y-a,z<-rt){if(z=y+a,z>rt)return tt.x=z,tt.y=lt,!1;ut=!0}return lt=Math.sqrt(1-Math.min(1,z*z/(rt*rt)))*ot,0>x!==ut&&(lt=-lt),Math.abs(x-lt)>(E[b].height+E[b+1].height)/2?(tt.x=z,tt.y=lt,!1):(tt.x=z,tt.y=lt,!0)}function R1(a,y,x,E,b,z,tt){var rt=a.lc,ot=a.me,lt=0;if(a=(E[b].height+E[b+1].height)/2+a.Ti,E=!1,0<=y!=(z===el)){if(z=x-a,z<-ot){if(z=x+a,z>ot){tt.x=lt,tt.y=z;return}E=!0}}else if(z=x+a,z>ot){if(z=x-a,z<-ot){tt.x=lt,tt.y=z;return}E=!0}lt=Math.sqrt(1-Math.min(1,z*z/(ot*ot)))*rt,0>y!==E&&(lt=-lt),tt.x=lt,tt.y=z}ts.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},ts.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 Qt(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var E=this.network.vertexes.iterator;E.next();){var b=E.value;b.x+=x.x,b.y+=x.y,b.commit()}a&&(this.group.Va(),a=this.group.position.copy(),x=this.group.location.copy(),y=y.re(x.re(a)),this.group.move(y),this.Zv=y.re(a))},ts.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function kv(a,y,x,E,b){var z=a.ty;if(.001>Math.abs(a.Zm-1))return E!==void 0&&b!==void 0?b*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var tt=0,rt=E!==void 0&&b!==void 0?b/(z+1):Math.PI/(2*(z+1)),ot=0,lt=0;lt<=z;lt++){E!==void 0&&b!==void 0?ot=E+lt*b/z:ot=lt*Math.PI/(2*z);var ut=Math.sin(ot);tt+=Math.sqrt(1-a*a*ut*ut)*rt}return E!==void 0&&b!==void 0?(y>x?y:x)*tt:4*(y>x?y:x)*tt}function V0(a,y,x,E,b){return y/(E!==void 0&&b!==void 0?kv(a,1,x,E,b):kv(a,1,x))}function Z0(a,y,x,E,b){if(.001>Math.abs(a.Zm-1))return b/y;var z=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,tt=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(E+=Math.PI/2);for(var rt=0;;rt++){var ot=Math.sin(E+rt*a);if(tt+=(y>x?y:x)*Math.sqrt(1-z*z*ot*ot)*a,tt>=b)return rt*a}}ts.prototype.sort=function(a){switch(this.sorting){case W0:break;case Y0:a.reverse();break;case X0:a.sort(this.comparer);break;case J0:a.sort(this.comparer),a.reverse();break;case Ig:return this.ak(Rw(a));default:le("Invalid sorting type.")}return a};function Rw(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new ne;for(var E=0;E<a.length;E++){var b=-1,z=-1;if(E===0)for(var tt=0;tt<a.length;tt++){var rt=a.M(tt).edgesCount;rt>b&&(b=rt,z=tt)}else for(tt=0;tt<a.length;tt++)rt=y[tt],rt>b&&(b=rt,z=tt);for(x.add(a.M(z)),y[z]=-1,z=a.M(z),tt=z.sourceEdges;tt.next();)b=a.indexOf(tt.value.fromVertex),0>b||0<=y[b]&&y[b]++;for(z=z.destinationEdges;z.next();)b=a.indexOf(z.value.toVertex),0>b||0<=y[b]&&y[b]++}return x}ts.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var E=a.M(x);y[x]=[];for(var b,z=E.destinationEdges;z.next();)b=a.indexOf(z.value.toVertex),b!==x&&0>y[x].indexOf(b)&&y[x].push(b);for(E=E.sourceEdges;E.next();)b=a.indexOf(E.value.fromVertex),b!==x&&0>y[x].indexOf(b)&&y[x].push(b)}for(z=[],x=0;x<y.length;x++)z[x]=0;x=[];var tt=[],rt=[];E=[],b=new ne;for(var ot=0,lt=0;lt<y.length;lt++){var ut=y[lt].length;if(ut===1)E.push(lt);else if(ut===0)b.add(a.M(lt));else{if(ot===0)x.push(lt);else{for(var ft=ut=1/0,yt=-1,Mt=[],bt=0;bt<x.length;bt++)0>y[x[bt]].indexOf(x[bt===x.length-1?0:bt+1])&&Mt.push(bt===x.length-1?0:bt+1);if(Mt.length===0)for(bt=0;bt<x.length;bt++)Mt.push(bt);for(bt=0;bt<Mt.length;bt++){for(var Dt=Mt[bt],qt=y[lt],Vt=0,oe=0;oe<tt.length;oe++){var ce=z[tt[oe]],ge=z[rt[oe]];if(ce<ge){var Se=ce;ce=ge}else Se=ge;if(Se<Dt&&Dt<=ce)for(ge=0;ge<qt.length;ge++){var Re=qt[ge];0>x.indexOf(Re)||Se<z[Re]&&z[Re]<ce||Se===z[Re]||ce===z[Re]||Vt++}else for(ge=0;ge<qt.length;ge++)Re=qt[ge],0>x.indexOf(Re)||Se<z[Re]&&z[Re]<ce&&Se!==z[Re]&&ce!==z[Re]&&Vt++}for(qt=Vt,oe=Vt=0;oe<y[lt].length;oe++)Se=x.indexOf(y[lt][oe]),0<=Se&&(Se=Math.abs(Dt-(Se>=Dt?Se+1:Se)),Vt+=Se<x.length+1-Se?Se:x.length+1-Se);for(oe=0;oe<tt.length;oe++)Se=z[tt[oe]],ce=z[rt[oe]],Se>=Dt&&Se++,ce>=Dt&&ce++,Se>ce&&(ge=ce,ce=Se,Se=ge),ce-Se<(x.length+2)/2==(Se<Dt&&Dt<=ce)&&Vt++;(qt<ut||qt===ut&&Vt<ft)&&(ut=qt,ft=Vt,yt=Dt)}for(x.splice(yt,0,lt),ut=0;ut<x.length;ut++)z[x[ut]]=ut;for(ut=0;ut<y[lt].length;ut++)ft=y[lt][ut],0<=x.indexOf(ft)&&(tt.push(lt),rt.push(ft))}ot++}}for(tt=x.length;;){for(z=!0,rt=0;rt<E.length;rt++)if(ot=E[rt],lt=y[ot][0],ut=x.indexOf(lt),0<=ut){for(yt=ft=0;yt<y[lt].length;yt++)Mt=x.indexOf(y[lt][yt]),0>Mt||Mt===ut||(bt=Mt>ut?Mt-ut:ut-Mt,ft+=Mt<ut!=bt>tt-bt?1:-1);x.splice(0>ft?ut:ut+1,0,ot),E.splice(rt,1),rt--}else z=!1;if(z)break;x.push(E[0]),E.splice(0,1)}for(y=0;y<x.length;y++)b.add(a.M(x[y]));return b},Sn.Object.defineProperties(ts.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!==zu&&a!==Gu&&a!==Ad&&a!==Pc||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==el&&a!==hd&&a!==nf&&a!==Dg||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==W0&&a!==Y0&&a!==X0&&!J0&&a!==Ig||(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!==q0&&a!==Vf||(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 Gu=new Oe(ts,"ConstantSpacing",0),Ad=new Oe(ts,"ConstantDistance",1),Pc=new Oe(ts,"ConstantAngle",2),zu=new Oe(ts,"Packed",3),el=new Oe(ts,"Clockwise",4),hd=new Oe(ts,"Counterclockwise",5),nf=new Oe(ts,"BidirectionalLeft",6),Dg=new Oe(ts,"BidirectionalRight",7),W0=new Oe(ts,"Forwards",8),Y0=new Oe(ts,"Reverse",9),X0=new Oe(ts,"Ascending",10),J0=new Oe(ts,"Descending",11),Ig=new Oe(ts,"Optimized",12),q0=new Oe(ts,"Pythagorean",13),Vf=new Oe(ts,"Circular",14);ts.className="CircularLayout",ts.ConstantSpacing=Gu,ts.ConstantDistance=Ad,ts.ConstantAngle=Pc,ts.Packed=zu,ts.Clockwise=el,ts.Counterclockwise=hd,ts.BidirectionalLeft=nf,ts.BidirectionalRight=Dg,ts.Forwards=W0,ts.Reverse=Y0,ts.Ascending=X0,ts.Descending=J0,ts.Optimized=Ig,ts.Pythagorean=q0,ts.Circular=Vf;function Tp(){this.Pl=-1/0,this.tm=this.mk=null}Tp.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},Tp.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]}},Tp.className="VertexArrangement";function Ug(a){Eo.call(this,a)}We(Ug,Eo),Ug.prototype.createVertex=function(){return new Np(this)},Ug.prototype.createEdge=function(){return new $0(this)},Ug.className="CircularNetwork";function Np(a){Gs.call(this,a),this.u=this.Si=NaN}We(Np,Gs);function cd(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===zu)if(x.nodeDiameterFormula===Vf)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===Vf?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}Sn.Object.defineProperties(Np.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)}}}),Np.className="CircularVertex";function $0(a){Ql.call(this,a)}We($0,Ql),$0.className="CircularEdge";function Ca(a){zo.call(this),this.ah=null,this.An=0,this.$d=new on(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)}We(Ca,zo),Ca.prototype.cloneProtected=function(a){zo.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},Ca.prototype.createNetwork=function(){return new Zf(this)},Ca.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),a=this.maxIterations,0<this.network.vertexes.count){this.network.Ko();for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;x.charge=this.electricalCharge(x),x.mass=this.gravitationalMass(x)}for(y=this.network.edges.iterator;y.next();)x=y.value,x.stiffness=this.springStiffness(x),x.length=this.springLength(x);if(this.Cu(),this.An=0,this.needsClusterLayout()){y=this.network,x=y.Zx();for(var E=x.iterator;E.next();){this.network=E.value;for(var b=this.network.vertexes.iterator;b.next();){var z=b.value;z.Vd=z.vertexes.count,z.sh=1,z.Hj=null,z.We=null}_1(this,0,a)}this.network=y;var tt=E=x.iterator;E=this.arrangementSpacing;var rt=tt.count,ot=!0;z=b=0;for(var lt=rn(),ut=0;ut<rt+y.vertexes.count+2;ut++)lt[ut]=null;rt=0,tt.reset();for(var ft=Ue.alloc();tt.next();)if(ut=tt.value,this.computeBounds(ut,ft),ot)ot=!1,b=ft.x+ft.width/2,z=ft.y+ft.height/2,lt[0]=new Qt(ft.x+ft.width+E.width,ft.y),lt[1]=new Qt(ft.x,ft.y+ft.height+E.height),rt=2;else{var yt=K1(lt,rt,b,z,ft.width,ft.height,E),Mt=lt[yt],bt=new Qt(Mt.x+ft.width+E.width,Mt.y),Dt=new Qt(Mt.x,Mt.y+ft.height+E.height);for(yt+1<rt&&lt.splice(yt+1,0,null),lt[yt]=bt,lt[yt+1]=Dt,rt++,yt=Mt.x-ft.x,Mt=Mt.y-ft.y,ut=ut.vertexes.iterator;ut.next();)bt=ut.value,bt.centerX+=yt,bt.centerY+=Mt}for(Ue.free(ft),ut=y.vertexes.iterator;ut.next();)tt=ut.value,yt=tt.bounds,2>rt?(b=yt.x+yt.width/2,z=yt.y+yt.height/2,lt[0]=new Qt(yt.x+yt.width+E.width,yt.y),lt[1]=new Qt(yt.x,yt.y+yt.height+E.height),rt=2):(ot=K1(lt,rt,b,z,yt.width,yt.height,E),ft=lt[ot],Mt=new Qt(ft.x+yt.width+E.width,ft.y),yt=new Qt(ft.x,ft.y+yt.height+E.height),ot+1<rt&&lt.splice(ot+1,0,null),lt[ot]=Mt,lt[ot+1]=yt,rt++,tt.centerX=ft.x+tt.width/2,tt.centerY=ft.y+tt.height/2);for(Ve(lt),E=x.iterator;E.next();){for(x=E.value,b=x.vertexes.iterator;b.next();)y.dh(b.value);for(x=x.edges.iterator;x.next();)y.Bo(x.value)}}z1(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},Ca.prototype.needsClusterLayout=function(){if(3>this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,E=this.network.vertexes.iterator;E.next();){if(E.value.bounds.Yc(x)&&(a++,2<a))return!0;if(10<y)break;y++}return!1},Ca.prototype.computeBounds=function(a,y){var x=!0;for(a=a.vertexes.iterator;a.next();){var E=a.value;x?(x=!1,y.set(E.bounds)):y.ed(E.bounds)}return y};function _1(a,y,x){if(_w(a,y)){var E=a.Zf;a.Zf*=1+1/(y+1);var b=Kw(a,y),z=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=z,_1(a,y+1,x),z1(a,z),Gw(a,b),y=b.vertexes.Fa(),y.sort(function(tt,rt){return tt===null||rt===null||tt===rt?0:rt.Vd-tt.Vd}),x=0;x<y.length;x++)zw(a,y[x]);a.Zf=E}}function _w(a,y){if(10<y||3>a.network.vertexes.count)return!1;for(a.ah=a.network.vertexes.Fa(),a=a.ah,a.sort(function(x,E){return x===null||E===null||x===E?0:E.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1<a.length-y}function Kw(a,y){for(var x=a.network,E=new Zf(a),b=0;b<a.ah.length;b++){var z=a.ah[b];if(1<z.Vd){E.dh(z);var tt=new j1;tt.Rs=z.Vd,tt.Ss=z.width,tt.Qs=z.height,tt.Sv=z.focus.x,tt.Tv=z.focus.y,z.We===null&&(z.We=new ne),z.We.add(tt),z.sv=z.We.count-1}else break}for(z=x.edges.iterator;z.next();){var rt=z.value;b=rt.fromVertex,tt=rt.toVertex,b.network===E&&tt.network===E?E.Bo(rt):b.network===E?(rt=b.Hj,rt===null&&(rt=new ne,b.Hj=rt),rt.add(tt),b.Vd--,b.sh+=tt.sh):tt.network===E&&(rt=tt.Hj,rt===null&&(rt=new ne,tt.Hj=rt),rt.add(b),tt.Vd--,tt.sh+=b.sh)}for(b=E.edges.iterator;b.next();)z=b.value,z.length*=Math.max(1,Ce.sqrt((z.fromVertex.sh+z.toVertex.sh)/(4*y+1)));for(y=E.vertexes.iterator;y.next();){b=y.value;var ot=b.Hj;if(ot!==null&&0<ot.count&&(tt=b.We.M(b.We.count-1).Rs-b.Vd,!(0>=tt))){for(var lt=rt=0,ut=ot.count-tt;ut<ot.count;ut++){var ft=ot.M(ut),yt=null;for(z=ft.edges.iterator;z.next();){var Mt=z.value;if(Mt.Ax(ft)===b){yt=Mt;break}}yt!==null&&(lt+=yt.length,rt+=ft.width*ft.height)}z=b.centerX,ot=b.centerY,ut=b.width,ft=b.height,yt=b.focus,Mt=ut*ft,1>Mt&&(Mt=1),rt=Ce.sqrt((rt+Mt+lt*lt*4/(tt*tt))/Mt),tt=(rt-1)*ut/2,rt=(rt-1)*ft/2,b.bounds=new Ue(z-yt.x-tt,ot-yt.y-rt,ut+2*tt,ft+2*rt),b.focus=new Qt(yt.x+tt,yt.y+rt)}}return a.network=E,x}function Gw(a,y){for(var x=a.network.vertexes.iterator;x.next();){var E=x.value;if(E.network=y,E.We!==null){var b=E.We.M(E.sv);E.Vd=b.Rs;var z=b.Sv,tt=b.Tv;E.bounds=new Ue(E.centerX-z,E.centerY-tt,b.Ss,b.Qs),E.focus=new Qt(z,tt),E.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function zw(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var E=y.centerX,b=y.centerY,z=y.width,tt=y.height;y.We!==null&&0<y.We.count&&(tt=y.We.M(0),z=tt.Ss,tt=tt.Qs),z=Ce.sqrt(z*z+tt*tt)/2;for(var rt=!1,ot=tt=0,lt=0,ut=y.vertexes.iterator;ut.next();){var ft=ut.value;1>=ft.Vd?ot++:(rt=!0,lt++,tt+=Math.atan2(y.centerY-ft.centerY,y.centerX-ft.centerX))}if(ot!==0){for(0<lt&&(tt/=lt),lt=y=0,y=rt?2*Math.PI/(ot+1):2*Math.PI/ot,ot%2===0&&(lt=y/2),1<x.count&&x.sort(function(Mt,bt){return Mt===null||bt===null||Mt===bt?0:bt.width*bt.height-Mt.width*Mt.height}),rt=ot%2===0?0:1,x=x.iterator;x.next();)if(ot=x.value,!(1<ot.Vd||a.isFixed(ot))){for(ut=null,ft=ot.edges.iterator;ft.next();){ut=ft.value;break}ft=ot.width;var yt=ot.height;ft=Ce.sqrt(ft*ft+yt*yt)/2,ut=z+ut.length+ft,ft=tt+(y*(rt/2>>1)+lt)*(rt%2===0?1:-1),ot.centerX=E+ut*Math.cos(ft),ot.centerY=b+ut*Math.sin(ft),rt++}}}}function K1(a,y,x,E,b,z,tt){var rt=9e19,ot=-1,lt=0;t:for(;lt<y;lt++){var ut=a[lt],ft=ut.x-x,yt=ut.y-E;if(ft=ft*ft+yt*yt,ft<rt){for(yt=lt-1;0<=yt;yt--)if(a[yt].y>ut.y&&a[yt].x-ut.x<b+tt.width)continue t;for(yt=lt+1;yt<y;yt++)if(a[yt].x>ut.x&&a[yt].y-ut.y<z+tt.height)continue t;ot=lt,rt=ft}}return ot}Ca.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Ca.prototype.addComments=function(a){var y=a.node;if(y!==null)for(y=y.Mu();y.next();){var x=y.value;if(x.category==="Comment"&&x.isVisible()){var E=this.network.ki(x);E===null&&(E=this.network.Bl(x)),E.charge=this.defaultCommentElectricalCharge,x=null;for(var b=E.destinationEdges;b.next();){var z=b.value;if(z.toVertex===a){x=z;break}}if(x===null){for(b=E.sourceEdges;b.next();)if(z=b.value,z.fromVertex===a){x=z;break}}x===null&&(x=this.network.Zj(a,E,null)),x.length=this.defaultCommentSpringLength}}};function G1(a,y){var x=a.bounds,E=x.x;a=x.y;var b=x.width;x=x.height;var z=y.bounds,tt=z.x;y=z.y;var rt=z.width;return z=z.height,E+b<tt?a>y+z?(x=E+b-tt,a=a-y-z,Ce.sqrt(x*x+a*a)):a+x<y?(E=E+b-tt,a=a+x-y,Ce.sqrt(E*E+a*a)):tt-(E+b):E>tt+rt?a>y+z?(x=E-tt-rt,a=a-y-z,Ce.sqrt(x*x+a*a)):a+x<y?(E=E-tt-rt,a=a+x-y,Ce.sqrt(E*E+a*a)):E-(tt+rt):a>y+z?a-(y+z):a+x<y?y-(a+x):.1}function z1(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,jw(a)););a.ah=null}function jw(a){a.ah===null&&(a.ah=a.network.vertexes.Fa());var y=a.ah;if(0>=y.length)return!1;var x=y[0];x.forceX=0,x.forceY=0;for(var E=x.centerX,b=E,z=x=x.centerY,tt=1;tt<y.length;tt++){var rt=y[tt];rt.forceX=0,rt.forceY=0;var ot=rt.centerX;rt=rt.centerY,E=Math.min(E,ot),b=Math.max(b,ot),x=Math.min(x,rt),z=Math.max(z,rt)}(b=b-E>z-x)?y.sort(function(Dt,qt){return Dt===null||qt===null||Dt===qt?0:Dt.centerX-qt.centerX}):y.sort(function(Dt,qt){return Dt===null||qt===null||Dt===qt?0:Dt.centerY-qt.centerY}),x=a.Zf;var lt=E=rt=0;for(z=0;z<y.length;z++){tt=y[z],E=tt.bounds,rt=tt.focus,ot=E.x+rt.x;var ut=E.y+rt.y;E=tt.charge*a.electricalFieldX(ot,ut),lt=tt.charge*a.electricalFieldY(ot,ut),E+=tt.mass*a.gravitationalFieldX(ot,ut),lt+=tt.mass*a.gravitationalFieldY(ot,ut),tt.forceX+=E,tt.forceY+=lt;for(var ft=z+1;ft<y.length;ft++){var yt=y[ft];if(yt!==tt){E=yt.bounds,rt=yt.focus,lt=E.x+rt.x;var Mt=E.y+rt.y;if(ot-lt>x||lt-ot>x){if(b)break}else if(ut-Mt>x||Mt-ut>x){if(!b)break}else{var bt=G1(tt,yt);1>bt?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new tm),bt=E.random(),rt=E.random(),ot>lt?(E=Math.abs(yt.bounds.right-tt.bounds.x),E=(1+E)*bt):ot<lt?(E=Math.abs(yt.bounds.x-tt.bounds.right),E=-(1+E)*bt):(E=Math.max(yt.width,tt.width),E=(1+E)*bt-E/2),ut>Mt?(lt=Math.abs(yt.bounds.bottom-tt.bounds.y),lt=(1+lt)*rt):ot<lt?(lt=Math.abs(yt.bounds.y-tt.bounds.bottom),lt=-(1+lt)*rt):(lt=Math.max(yt.height,tt.height),lt=(1+lt)*rt-lt/2)):(rt=-(tt.charge*yt.charge)/(bt*bt),E=(lt-ot)/bt*rt,lt=(Mt-ut)/bt*rt),tt.forceX+=E,tt.forceY+=lt,yt.forceX-=E,yt.forceY-=lt}}}}for(b=a.network.edges.iterator;b.next();)rt=b.value,x=rt.fromVertex,z=rt.toVertex,tt=x.bounds,ot=x.focus,E=tt.x+ot.x,tt=tt.y+ot.y,ut=z.bounds,ft=z.focus,ot=ut.x+ft.x,ut=ut.y+ft.y,ft=G1(x,z),1>ft?(ft=a.randomNumberGenerator,ft===null&&(a.randomNumberGenerator=ft=new tm),rt=ft.random(),ft=ft.random(),E=(E>ot?1:-1)*(1+(z.width>x.width?z.width:x.width))*rt,lt=(tt>ut?1:-1)*(1+(z.height>x.height?z.height:x.height))*ft):(rt=rt.stiffness*(ft-rt.length),E=(ot-E)/ft*rt,lt=(ut-tt)/ft*rt),x.forceX+=E,x.forceY+=lt,z.forceX-=E,z.forceY-=lt;for(b=E=0;b<y.length;b++)x=y[b],a.isFixed(x)?a.moveFixedVertex(x):E=Math.max(E,a.moveVertex(x)||0);return E>a.epsilonDistance*a.epsilonDistance}Ca.prototype.moveVertex=function(a){var y=a.forceX,x=a.forceY,E=this.moveLimit;return y<-E?y=-E:y>E&&(y=E),x<-E?x=-E:x>E&&(x=E),a.centerX+=y,a.centerY+=x,y*y+x*x},Ca.prototype.moveFixedVertex=function(){},Ca.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Ca.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=es,y.toSpot=es)}},Ca.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=Ue.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,Ue.free(x)}x=Ue.alloc();for(var E=this.network.vertexes.iterator;E.next();){var b=E.value;(a!==0||y!==0)&&(x.assign(b.bounds),x.x+=a,x.y+=y,b.bounds=x),b.commit()}Ue.free(x)},Ca.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Ca.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Ca.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Ca.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Ca.prototype.electricalFieldX=function(){return 0},Ca.prototype.electricalFieldY=function(){return 0},Ca.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Ca.prototype.gravitationalFieldX=function(){return 0},Ca.prototype.gravitationalFieldY=function(){return 0},Ca.prototype.isFixed=function(a){return a.isFixed},Sn.Object.defineProperties(Ca.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"&&le('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())}}}),Ca.className="ForceDirectedLayout";function j1(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}j1.className="ForceDirectedSubnet";function Zf(a){Eo.call(this,a)}We(Zf,Eo),Zf.prototype.createVertex=function(){return new Dp(this)},Zf.prototype.createEdge=function(){return new Ip(this)},Zf.className="ForceDirectedNetwork";function Dp(a){Gs.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}We(Dp,Gs),Sn.Object.defineProperties(Dp.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)}}}),Dp.className="ForceDirectedVertex";function Ip(a){Ql.call(this,a),this.j=this.o=NaN}We(Ip,Ql),Sn.Object.defineProperties(Ip.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)}}}),Ip.className="ForceDirectedEdge";function tm(){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()}tm.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},tm.className="RandomNumberGenerator";function fo(a){zo.call(this),this.kc=this.ie=25,this.K=0,this.Dk=om,this.Zk=sm,this.Qk=am,this.bj=4,this.rk=lm,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 Qt,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}We(fo,zo),fo.prototype.cloneProtected=function(a){zo.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},fo.prototype.qb=function(a){a.classType===fo?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:le("Unknown enum value: "+a):zo.prototype.qb.call(this,a)},fo.prototype.createNetwork=function(){return new Og(this)},fo.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!==Qp&&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===Qp&&this.removeCycles(),a=this.network;for(var y=[],x=a.edges.iterator;x.next();){var E=x.value;E.valid=!1,y.push(E)}for(x=0;x<y.length;x++){E=y[x];var b=E.fromVertex,z=E.toVertex;if(!(E.valid||(b.node===null&&b.data===null||z.node===null&&z.data===null)&&b.layer===z.layer)){var tt=0,rt=0,ot=0,lt=0;if(E.link!==null){if(rt=E.link,rt===null)continue;var ut=b.node;if(tt=z.node,ut===null||tt===null)continue;var ft=rt.fromNode;ot=rt.toNode;for(var yt=rt.fromPort;yt!==null&&!yt.Ed();)yt=yt.panel;for(rt=rt.toPort;rt!==null&&!rt.Ed();)rt=rt.panel;if(E.rev){lt=ft;var Mt=yt;ft=ot,yt=rt,ot=lt,rt=Mt}var bt=b.focus;lt=z.focus;var Dt=E.rev?z.bounds:b.bounds;Mt=Qt.alloc(),ut!==ft?Dt.w()&&ft.isVisible()?ft.actualBounds.w()?(wc(ft,yt,rr,Mt),Mt.x+=ft.actualBounds.x-Dt.x,Mt.y+=ft.actualBounds.y-Dt.y):(wc(ft,yt,rr,Mt),Mt.w()||Mt.assign(bt)):Mt.assign(bt):Dt.w()?(wc(ft,yt,rr,Mt),Mt.w()||Mt.assign(bt)):Mt.assign(bt),ft=E.rev?b.bounds:z.bounds,ut=Qt.alloc(),tt!==ot?ft.w()&&ot.isVisible()?ot.actualBounds.w()?(wc(ot,rt,rr,ut),ut.x+=ot.actualBounds.x-ft.x,ut.y+=ot.actualBounds.y-ft.y):(wc(ot,rt,rr,ut),ut.w()||ut.assign(lt)):ut.assign(lt):ft.w()?(wc(ot,rt,rr,ut),ut.w()||ut.assign(lt)):ut.assign(lt),this.K===90||this.K===270?(tt=Math.round((Mt.x-bt.x)/this.kc),ot=Mt.x,rt=Math.round((ut.x-lt.x)/this.kc),lt=ut.x):(tt=Math.round((Mt.y-bt.y)/this.kc),ot=Mt.y,rt=Math.round((ut.y-lt.y)/this.kc),lt=ut.y),Qt.free(Mt),Qt.free(ut),E.portFromColOffset=tt,E.portFromPos=ot,E.portToColOffset=rt,E.portToPos=lt}else E.portFromColOffset=0,E.portFromPos=0,E.portToColOffset=0,E.portToPos=0;if(Mt=b.layer,ut=z.layer,ft=0,Dt=E.link,Dt!==null){var qt=Dt.fromPort,Vt=Dt.toPort;if(qt!==null&&Vt!==null){var oe=Dt.fromNode;if(yt=Dt.toNode,oe!==null&&yt!==null){var ce=rm(this,!0),ge=rm(this,!1),Se=this.setsPortSpots?ce:Dt.computeSpot(!0,qt);bt=this.setsPortSpots?ge:Dt.computeSpot(!1,Vt);var Re=Dt.isOrthogonal;Se.$c()&&Se.Hf(ge)&&bt.$c()&&bt.Hf(ce)?ft=0:(ce=Dt.getLinkPoint(oe,qt,Se,!0,Re,yt,Vt,Qt.alloc()),ge=Dt.getLinkDirection(oe,qt,ce,Se,!0,Re,yt,Vt),Qt.free(ce),Se.ys()||ge!==tw(this,E,!0)?this.setsPortSpots&&oe!==null&&oe.ports.count===1&&E.rev&&(ft+=1):ft+=1,Se=Dt.getLinkPoint(yt,Vt,bt,!1,Re,oe,qt,Qt.alloc()),Dt=Dt.getLinkDirection(yt,Vt,Se,bt,!1,Re,oe,qt),Qt.free(Se),bt.ys()||Dt!==tw(this,E,!1)?this.setsPortSpots&&yt!==null&&yt.ports.count===1&&E.rev&&(ft+=2):ft+=2)}}}if(yt=ft,ft=yt===1||yt===3,(yt=yt===2||yt===3)&&(bt=a.createVertex(),bt.node=null,bt.Dj=1,bt.layer=Mt,bt.near=b,a.dh(bt),b=a.Zj(b,bt,E.link),b.valid=!1,b.rev=E.rev,b.portFromColOffset=tt,b.portToColOffset=0,b.portFromPos=ot,b.portToPos=0,b=bt),Dt=1,ft&&Dt--,Mt-ut>Dt&&0<Mt){for(E.valid=!1,bt=a.createVertex(),bt.node=null,bt.Dj=2,bt.layer=Mt-1,a.dh(bt),b=a.Zj(b,bt,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=yt?0:tt,b.portToColOffset=0,b.portFromPos=yt?0:ot,b.portToPos=0,b=bt,Mt--;Mt-ut>Dt&&0<Mt;)bt=a.createVertex(),bt.node=null,bt.Dj=3,bt.layer=Mt-1,a.dh(bt),b=a.Zj(b,bt,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=0,b.portFromPos=0,b.portToPos=0,b=bt,Mt--;b=a.Zj(bt,z,E.link),b.valid=!ft,ft&&(bt.near=z),b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=rt,b.portFromPos=0,b.portToPos=lt}else E.valid=!0}}for(a=this.tc=[],y=0;y<=this.Ia;y++)a[y]=0;for(y=this.network.vertexes.iterator;y.next();)y.value.index=-1;for(this.initializeIndices(),this.Iq=-1,x=this.Md=this.Hn=0;x<=this.Ia;x++)a[x]>a[this.Md]&&(this.Iq=a[x]-1,this.Md=x),a[x]<a[this.Hn]&&(this.Hn=x);for(this.fl=[],x=0;x<a.length;x++)this.fl[x]=[];for(y.reset();y.next();)a=y.value,this.fl[a.layer][a.index]=a;for(this.Ra=-1,a=0;a<=this.Ia;a++){for(y=dd(this,a),x=0,E=this.tc[a],z=0;z<E;z++)b=y[z],x+=this.nodeMinColumnSpace(b,!0),b.column=x,x+=1,x+=this.nodeMinColumnSpace(b,!1);this.Ra=Math.max(this.Ra,x-1),fd(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},fo.prototype.linkMinLength=function(){return 1};function bv(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}fo.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},fo.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 fl(a){a.kj===null&&(a.kj=[]);for(var y=0,x=a.network.vertexes.iterator;x.next();){var E=x.value;a.kj[y]=E.layer,y++,a.kj[y]=E.column,y++,a.kj[y]=E.index,y++}return a.kj}function lu(a,y){var x=0;for(a=a.network.vertexes.iterator;a.next();){var E=a.value;E.layer=y[x],x++,E.column=y[x],x++,E.index=y[x],x++}}function V1(a,y,x){var E=dd(a,y),b=a.tc[y];(a.Jn===null||a.Jn.length<b*b)&&(a.Jn=[]);for(var z=a.Jn,tt=0;tt<b;tt++){var rt=0,ot=E[tt],lt=ot.near;if(lt!==null&&lt.layer===ot.layer)if(ot=lt.index,ot>tt)for(var ut=tt+1;ut<ot;ut++){var ft=E[ut];ft.near===lt&&ft.Dj===lt.Dj||rt++}else for(ut=tt-1;ut>ot;ut--)ft=E[ut],ft.near===lt&&ft.Dj===lt.Dj||rt++;var yt;if(0<=x)for(ot=E[tt].sourceEdgesArrayAccess,lt=0;lt<ot.length;lt++){var Mt=ot[lt];if(Mt.valid&&Mt.fromVertex.layer!==y)for(ft=Mt.fromVertex.index,ut=Mt.portToPos,Mt=Mt.portFromPos,yt=lt+1;yt<ot.length;yt++){var bt=ot[yt];if(bt.valid&&bt.fromVertex.layer!==y){var Dt=bt.fromVertex.index,qt=bt.portToPos;bt=bt.portFromPos,ut<qt&&(ft>Dt||ft===Dt&&Mt>bt)&&rt++,qt<ut&&(Dt>ft||Dt===ft&&bt>Mt)&&rt++}}}if(0>=x){for(ot=E[tt].destinationEdgesArrayAccess,lt=0;lt<ot.length;lt++)if(Mt=ot[lt],Mt.valid&&Mt.toVertex.layer!==y)for(ft=Mt.toVertex.index,ut=Mt.portToPos,Mt=Mt.portFromPos,yt=lt+1;yt<ot.length;yt++)bt=ot[yt],bt.valid&&bt.toVertex.layer!==y&&(Dt=bt.toVertex.index,qt=bt.portToPos,bt=bt.portFromPos,Mt<bt&&(ft>Dt||ft===Dt&&ut>qt)&&rt++,bt<Mt&&(Dt>ft||Dt===ft&&qt>ut)&&rt++)}for(z[tt*b+tt]=rt,ot=tt+1;ot<b;ot++){var Vt=0,oe=0;if(0<=x){rt=E[tt].sourceEdgesArrayAccess;var ce=E[ot].sourceEdgesArrayAccess;for(lt=0;lt<rt.length;lt++)if(Mt=rt[lt],Mt.valid&&Mt.fromVertex.layer!==y)for(ft=Mt.fromVertex.index,Mt=Mt.portFromPos,yt=0;yt<ce.length;yt++)bt=ce[yt],bt.valid&&bt.fromVertex.layer!==y&&(Dt=bt.fromVertex.index,bt=bt.portFromPos,(ft<Dt||ft===Dt&&Mt<bt)&&oe++,(Dt<ft||Dt===ft&&bt<Mt)&&Vt++)}if(0>=x){for(rt=E[tt].destinationEdgesArrayAccess,ce=E[ot].destinationEdgesArrayAccess,lt=0;lt<rt.length;lt++)if(Mt=rt[lt],Mt.valid&&Mt.toVertex.layer!==y)for(ft=Mt.toVertex.index,ut=Mt.portToPos,yt=0;yt<ce.length;yt++)bt=ce[yt],bt.valid&&bt.toVertex.layer!==y&&(Dt=bt.toVertex.index,qt=bt.portToPos,(ft<Dt||ft===Dt&&ut<qt)&&oe++,(Dt<ft||Dt===ft&&qt<ut)&&Vt++)}z[tt*b+ot]=Vt,z[ot*b+tt]=oe}}return fd(a,y,E),z}fo.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=V1(this,y,1),E=this.tc[y],b=0;b<E;b++)for(var z=b;z<E;z++)a+=x[b*E+z];return a};function em(a){for(var y=0,x=0;x<=a.Ia;x++){for(var E=a,b=x,z=dd(E,b),tt=E.tc[b],rt=0,ot=0;ot<tt;ot++){var lt=z[ot].destinationEdgesArrayAccess;if(lt!==null)for(var ut=0;ut<lt.length;ut++){var ft=lt[ut];if(ft.valid&&ft.toVertex.layer!==b){var yt=ft.fromVertex.column+ft.portFromColOffset,Mt=ft.toVertex.column+ft.portToColOffset;rt+=(Math.abs(yt-Mt)+1)*bv(ft)}}}fd(E,b,z),y+=rt}return y}fo.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 Tv(a,y,x){for(var E=dd(a,y),b=a.tc[y],z=[],tt=0;tt<b;tt++){var rt=E[tt],ot=null;0>=x&&(ot=rt.sourceEdgesArrayAccess);var lt=null;0<=x&&(lt=rt.destinationEdgesArrayAccess);var ut=0,ft=0,yt=rt.near;if(yt!==null&&yt.layer===rt.layer&&(ut+=yt.column-1,ft++),ot!==null)for(yt=0;yt<ot.length;yt++){rt=ot[yt];var Mt=rt.fromVertex;rt.valid&&!rt.rev&&Mt.layer!==y&&(ut+=Mt.column,ft++)}if(lt!==null)for(ot=0;ot<lt.length;ot++)rt=lt[ot],yt=rt.toVertex,rt.valid&&!rt.rev&&yt.layer!==y&&(ut+=yt.column,ft++);z[tt]=ft===0?-1:ut/ft}return fd(a,y,E),z}function Z1(a,y,x){for(var E=dd(a,y),b=a.tc[y],z=[],tt=0;tt<b;tt++){var rt=E[tt],ot=null;0>=x&&(ot=rt.sourceEdgesArrayAccess);var lt=null;0<=x&&(lt=rt.destinationEdgesArrayAccess);var ut=0,ft=[],yt=rt.near;if(yt!==null&&yt.layer===rt.layer&&(ft[ut]=yt.column-1,ut++),rt=void 0,ot!==null)for(yt=0;yt<ot.length;yt++){rt=ot[yt];var Mt=rt.fromVertex;rt.valid&&!rt.rev&&Mt.layer!==y&&(ft[ut]=Mt.column+rt.portFromColOffset,ut++)}if(lt!==null)for(ot=0;ot<lt.length;ot++)rt=lt[ot],yt=rt.toVertex,rt.valid&&!rt.rev&&yt.layer!==y&&(ft[ut]=yt.column+rt.portToColOffset,ut++);ut===0?z[tt]=-1:(ft.sort(function(bt,Dt){return bt-Dt}),lt=ut>>1,z[tt]=ut&1?ft[lt]:ft[lt-1]+ft[lt]>>1)}return fd(a,y,E),z}function Up(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var tt=y.destinationEdges;tt.next();){var rt=tt.value,ot=rt.toVertex,lt=y.layer-ot.layer;rt=a.linkMinLength(rt),lt===rt&&Up(a,ot,x,E,b,z)}if(z)for(tt=y.sourceEdges;tt.next();)rt=tt.value,ot=rt.fromVertex,lt=ot.layer-y.layer,rt=a.linkMinLength(rt),lt===rt&&Up(a,ot,x,E,b,z)}}function Nv(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var tt=y.destinationEdges;tt.next();)Nv(a,tt.value.toVertex,x,E,b,z);if(z)for(y=y.sourceEdges;y.next();)Nv(a,y.value.fromVertex,x,E,b,z)}}fo.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case Uv:a=this.network;var y=0,x=a.vertexes.count-1,E=[];E.length=x+1;for(var b=a.vertexes.iterator;b.next();)b.value.valid=!0;for(;Vw(a)!==null;){for(b=W1(a);b!==null;)E[x]=b,x--,b.valid=!1,b=W1(a);for(b=Y1(a);b!==null;)E[y]=b,y++,b.valid=!1,b=Y1(a);b=null;for(var z=0,tt=this.network.vertexes.iterator;tt.next();){var rt=tt.value;if(rt.valid){for(var ot=0,lt=rt.destinationEdges;lt.next();)lt.value.toVertex.valid&&ot++;lt=0;for(var ut=rt.sourceEdges;ut.next();)ut.value.fromVertex.valid&&lt++;(b===null||z<ot-lt)&&(b=rt,z=ot-lt)}}b!==null&&(E[y]=b,y++,b.valid=!1)}for(y=0;y<a.vertexes.count;y++)E[y].index=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case om:for(E=this.network.vertexes.iterator;E.next();)a=E.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,E.reset();E.next();)y=E.value,y.sourceEdges.count===0&&Dv(this,y);for(E.reset();E.next();)y=E.value,y.Ll===-1&&Dv(this,y);for(a.reset();a.next();)E=a.value,E.forest||(y=E.fromVertex,x=y.finish,b=E.toVertex,z=b.finish,b.Ll<y.Ll&&x<z&&(this.network.gm(E),E.rev=!0));break;case Qp:for(a=this.network,y=a.vertexes.iterator,E=1/0;y.next();)E=Math.min(E,y.value.layer);if(1/0>E){if(0>E)for(y.reset();y.next();)y.value.layer-=E;for(E=[],y.reset();y.next();)x=y.value,b=E[x.layer],b===void 0?E[x.layer]=[x]:b.push(x);for(x=y=0;x<E.length;x++)if(b=E[x],!b||b.length===0)y++;else if(0<x)for(z=0;z<b.length;z++)b[z].layer-=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.layer<y.toVertex.layer&&(a.gm(y),y.rev=!0)}}};function Vw(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function W1(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,E=y.destinationEdges;E.next();)if(E.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function Y1(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,E=y.sourceEdges;E.next();)if(E.value.fromVertex.valid){x=!1;break}if(x)return y}}return null}function Dv(a,y){y.Ll=a.Kn,a.Kn++;for(var x=y.destinationEdges;x.next();){var E=x.value,b=E.toVertex;b.Ll===-1&&(E.forest=!0,Dv(a,b))}y.finish=a.Kn,a.Kn++}fo.prototype.assignLayers=function(){switch(this.Zk){case Qv:X1(this);break;case Ov:for(var a,y=this.network.vertexes.iterator;y.next();)a=q1(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 sm:for(X1(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&$1(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 X1(a){for(var y=a.network.vertexes.iterator;y.next();){var x=J1(a,y.value);a.Ia=Math.max(x,a.Ia)}}function J1(a,y){var x=0;if(y.layer===-1){for(var E=y.destinationEdges;E.next();){var b=E.value,z=b.toVertex;b=a.linkMinLength(b),x=Math.max(x,J1(a,z)+b)}y.layer=x}else x=y.layer;return x}function q1(a,y){var x=0;if(y.layer===-1){for(var E=y.sourceEdges;E.next();){var b=E.value,z=b.fromVertex;b=a.linkMinLength(b),x=Math.max(x,q1(a,z)+b)}y.layer=x}else x=y.layer;return x}function $1(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)$1(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var E=y.sourceEdgesArrayAccess,b=E.length,z=0;z<b;z++){var tt=E[z],rt=tt.fromVertex,ot=tt.toVertex;tt=a.linkMinLength(tt),rt.layer-ot.layer>tt&&Up(a,rt,0,-1,!0,!1)}for(Up(a,y,1,-1,!0,!0);y.component!==0;){for(z=0,E=1/0,rt=0,ot=null,tt=a.network.vertexes.iterator;tt.next();){var lt=tt.value;if(lt.component===1){var ut=0,ft=!1,yt=lt.sourceEdgesArrayAccess;b=yt.length;for(var Mt=0;Mt<b;Mt++){var bt=yt[Mt],Dt=bt.fromVertex;ut+=1,Dt.component!==1&&(z+=1,Dt=Dt.layer-lt.layer,bt=a.linkMinLength(bt),E=Math.min(E,Dt-bt))}for(yt=lt.destinationEdgesArrayAccess,b=yt.length,Mt=0;Mt<b;Mt++)bt=yt[Mt].toVertex,--ut,bt.component!==1?--z:ft=!0;(ot===null||ut<rt)&&!ft&&(ot=lt,rt=ut)}}if(0<z){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer+=E);y.component=0}else ot.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(Up(a,y,1,-1,!0,!1);y.component!==0;){for(E=0,b=1/0,z=0,rt=null,ot=a.network.vertexes.iterator;ot.next();)if(tt=ot.value,tt.component===1){for(lt=0,ut=!1,yt=tt.sourceEdgesArrayAccess,ft=yt.length,Mt=0;Mt<ft;Mt++)bt=yt[Mt].fromVertex,lt+=1,bt.component!==1?E+=1:ut=!0;for(yt=tt.destinationEdgesArrayAccess,ft=yt.length,Mt=0;Mt<ft;Mt++)bt=yt[Mt],Dt=bt.toVertex,--lt,Dt.component!==1&&(--E,Dt=tt.layer-Dt.layer,bt=a.linkMinLength(bt),b=Math.min(b,Dt-bt));(rt===null||lt>z)&&!ut&&(rt=tt,z=lt)}if(0>E){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer-=b);y.component=0}else rt.component=0}}}function tw(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}fo.prototype.initializeIndices=function(){switch(this.Qk){default:case Rv: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 am: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&&ew(this,x);break;case Hv: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&&nw(this,x)}};function ew(a,y){var x=y.layer;for(y.index=a.tc[x],a.tc[x]++,y=y.destinationEdgesArrayAccess,x=!0;x;){x=!1;for(var E=0;E<y.length-1;E++){var b=y[E],z=y[E+1];b.portFromColOffset>z.portFromColOffset&&(x=!0,y[E]=z,y[E+1]=b)}}for(x=0;x<y.length;x++)E=y[x],E.valid&&(E=E.toVertex,E.index===-1&&ew(a,E))}function nw(a,y){var x=y.layer;y.index=a.tc[x],a.tc[x]++,y=y.sourceEdgesArrayAccess;for(var E=!0;E;)for(E=!1,x=0;x<y.length-1;x++){var b=y[x],z=y[x+1];b.portToColOffset>z.portToColOffset&&(E=!0,y[x]=z,y[x+1]=b)}for(x=0;x<y.length;x++)E=y[x],E.valid&&(E=E.fromVertex,E.index===-1&&nw(a,E))}fo.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=fl(this),x,E;for(x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)nm(this,E,1),wu(this,E,1);var b=this.countCrossings();for(b<a&&(a=b,y=fl(this)),E=this.Ia;0<=E;E--)nm(this,E,-1),wu(this,E,-1);b=this.countCrossings(),b<a&&(a=b,y=fl(this))}for(lu(this,y),x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)nm(this,E,0),wu(this,E,0);for(b=this.countCrossings(),b<a&&(a=b,y=fl(this)),E=this.Ia;0<=E;E--)nm(this,E,0),wu(this,E,0);b=this.countCrossings(),b<a&&(a=b,y=fl(this))}lu(this,y);var z,tt,rt;switch(this.rk){case _v:break;case Kv:for(rt=a+1;(E=this.countCrossings())<rt;)for(rt=E,x=this.Ia;0<=x;x--)for(tt=0;tt<=x;tt++){for(z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=wu(this,E,-1)||z;for(b=this.countCrossings(),b>=a?lu(this,y):(a=b,y=fl(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=wu(this,E,1)||z;for(b=this.countCrossings(),b>=a?lu(this,y):(a=b,y=fl(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=wu(this,E,1)||z;for(b>=a?lu(this,y):(a=b,y=fl(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=wu(this,E,-1)||z;for(b>=a?lu(this,y):(a=b,y=fl(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=wu(this,E,0)||z;for(b>=a?lu(this,y):(a=b,y=fl(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=wu(this,E,0)||z;b>=a?lu(this,y):(a=b,y=fl(this))}break;default:case lm:for(x=this.Ia,tt=0,rt=a+1;(E=this.countCrossings())<rt;){for(rt=E,z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=wu(this,E,-1)||z;for(b=this.countCrossings(),b>=a?lu(this,y):(a=b,y=fl(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=wu(this,E,1)||z;for(b=this.countCrossings(),b>=a?lu(this,y):(a=b,y=fl(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=wu(this,E,1)||z;for(b>=a?lu(this,y):(a=b,y=fl(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=wu(this,E,-1)||z;for(b>=a?lu(this,y):(a=b,y=fl(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=wu(this,E,0)||z;for(b>=a?lu(this,y):(a=b,y=fl(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=wu(this,E,0)||z;b>=a?lu(this,y):(a=b,y=fl(this))}}lu(this,y)};function nm(a,y,x){var E=dd(a,y),b=a.tc[y],z=Z1(a,y,x),tt=Tv(a,y,x);for(x=0;x<b;x++)tt[x]===-1&&(tt[x]=E[x].column),z[x]===-1&&(z[x]=E[x].column);for(var rt=!0,ot;rt;)for(rt=!1,x=0;x<b-1;x++)(z[x+1]<z[x]||z[x+1]===z[x]&&tt[x+1]<tt[x])&&(rt=!0,ot=z[x],z[x]=z[x+1],z[x+1]=ot,ot=tt[x],tt[x]=tt[x+1],tt[x+1]=ot,ot=E[x],E[x]=E[x+1],E[x+1]=ot);for(x=z=0;x<b;x++)ot=E[x],ot.index=x,z+=a.nodeMinColumnSpace(ot,!0),ot.column=z,z+=1,z+=a.nodeMinColumnSpace(ot,!1);fd(a,y,E)}function wu(a,y,x){var E=dd(a,y),b=a.tc[y];x=V1(a,y,x);var z,tt=[];for(z=0;z<b;z++)tt[z]=-1;var rt=[];for(z=0;z<b;z++)rt[z]=-1;for(var ot=!1,lt=!0;lt;)for(lt=!1,z=0;z<b-1;z++){var ut=x[E[z].index*b+E[z+1].index],ft=x[E[z+1].index*b+E[z].index],yt=0,Mt=0,bt=E[z].column,Dt=E[z+1].column,qt=a.nodeMinColumnSpace(E[z],!0),Vt=a.nodeMinColumnSpace(E[z],!1),oe=a.nodeMinColumnSpace(E[z+1],!0),ce=a.nodeMinColumnSpace(E[z+1],!1);qt=bt-qt+oe,Vt=Dt-Vt+ce;var ge=E[z].sourceEdges.iterator;for(ge.reset();ge.next();)if(oe=ge.value,ce=oe.fromVertex,oe.valid&&ce.layer===y){for(oe=0;E[oe]!==ce;)oe++;oe<z&&(yt+=2*(z-oe),Mt+=2*(z+1-oe)),oe===z+1&&(yt+=1),oe>z+1&&(yt+=4*(oe-z),Mt+=4*(oe-(z+1)))}for(ge=E[z].destinationEdges.iterator,ge.reset();ge.next();)if(oe=ge.value,ce=oe.toVertex,oe.valid&&ce.layer===y){for(oe=0;E[oe]!==ce;)oe++;oe===z+1&&(Mt+=1)}for(ge=E[z+1].sourceEdges.iterator,ge.reset();ge.next();)if(oe=ge.value,ce=oe.fromVertex,oe.valid&&ce.layer===y){for(oe=0;E[oe]!==ce;)oe++;oe<z&&(yt+=2*(z+1-oe),Mt+=2*(z-oe)),oe===z&&(Mt+=1),oe>z+1&&(yt+=4*(oe-(z+1)),Mt+=4*(oe-z))}for(ge=E[z+1].destinationEdges.iterator,ge.reset();ge.next();)if(oe=ge.value,ce=oe.toVertex,oe.valid&&ce.layer===y){for(oe=0;E[oe]!==ce;)oe++;oe===z&&(yt+=1)}oe=ce=0,ge=tt[E[z].index];var Se=rt[E[z].index],Re=tt[E[z+1].index],qn=rt[E[z+1].index];ge!==-1&&(ce+=Math.abs(ge-bt),oe+=Math.abs(ge-Vt)),Se!==-1&&(ce+=Math.abs(Se-bt),oe+=Math.abs(Se-Vt)),Re!==-1&&(ce+=Math.abs(Re-Dt),oe+=Math.abs(Re-qt)),qn!==-1&&(ce+=Math.abs(qn-Dt),oe+=Math.abs(qn-qt)),(Mt<yt-.5||Mt===yt&&ft<ut-.5||Mt===yt&&ft===ut&&oe<ce-.5)&&(lt=ot=!0,E[z].column=Vt,E[z+1].column=qt,ut=E[z],E[z]=E[z+1],E[z+1]=ut)}for(z=0;z<b;z++)E[z].index=z;return fd(a,y,E),ot}fo.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&tx)!==0;if(1e3<this.network.edges.count&&y&&(a=!1),a){var x=[];for(y=0;y<=this.Ia;y++)x[y]=0;for(var E,b=this.network.vertexes.iterator;b.next();){var z=b.value;y=z.layer,E=z.column,z=this.nodeMinColumnSpace(z,!1),x[y]=Math.max(x[y],E+z)}for(b.reset();b.next();)z=b.value,y=z.layer,E=z.column,z.column=(8*(this.Ra-x[y])>>1)+8*E;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=Qg(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Qg(this,y,-1)||x;x=Qg(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)Iv(this,y,1);for(y=this.Md-1;0<=y;y--)Iv(this,y,-1);Iv(this,this.Md,0)}if(a&&(iw(this,-1),iw(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Qg(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Qg(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Qg(this,y,0)||x}}else Xw(this)};function Qg(a,y,x){for(var E=!1;Zw(a,y,x);)E=!0;return E}function Zw(a,y,x){var E,b=dd(a,y),z=a.tc[y],tt=Tv(a,y,-1);if(0<x)for(E=0;E<z;E++)tt[E]=-1;var rt=Tv(a,y,1);if(0>x)for(E=0;E<z;E++)rt[E]=-1;for(var ot=!1,lt=!0;lt;)for(lt=!1,E=0;E<z;E++){var ut=b[E].column,ft=a.nodeMinColumnSpace(b[E],!0),yt=a.nodeMinColumnSpace(b[E],!1),Mt=0;0>E-1||ut-b[E-1].column-1>ft+a.nodeMinColumnSpace(b[E-1],!1)?Mt=ut-1:Mt=ut,ft=E+1>=z||b[E+1].column-ut-1>yt+a.nodeMinColumnSpace(b[E+1],!0)?ut+1:ut;var bt=yt=0,Dt=0;if(0>=x)for(var qt=b[E].sourceEdges.iterator;qt.next();){var Vt=qt.value,oe=Vt.fromVertex;if(Vt.valid&&oe.layer!==y){var ce=bv(Vt),ge=Vt.portFromColOffset;Vt=Vt.portToColOffset,oe=oe.column,yt+=(Math.abs(ut+Vt-(oe+ge))+1)*ce,bt+=(Math.abs(Mt+Vt-(oe+ge))+1)*ce,Dt+=(Math.abs(ft+Vt-(oe+ge))+1)*ce}}if(0<=x)for(qt=b[E].destinationEdges.iterator;qt.next();)Vt=qt.value,oe=Vt.toVertex,Vt.valid&&oe.layer!==y&&(ce=bv(Vt),ge=Vt.portFromColOffset,Vt=Vt.portToColOffset,oe=oe.column,yt+=(Math.abs(ut+ge-(oe+Vt))+1)*ce,bt+=(Math.abs(Mt+ge-(oe+Vt))+1)*ce,Dt+=(Math.abs(ft+ge-(oe+Vt))+1)*ce);Vt=ge=ce=0,qt=tt[b[E].index],oe=rt[b[E].index],qt!==-1&&(ce+=Math.abs(qt-ut),ge+=Math.abs(qt-Mt),Vt+=Math.abs(qt-ft)),oe!==-1&&(ce+=Math.abs(oe-ut),ge+=Math.abs(oe-Mt),Vt+=Math.abs(oe-ft)),bt<yt||bt===yt&&ge<ce?(lt=ot=!0,b[E].column=Mt):(Dt<yt||Dt===yt&&Vt<ce)&&(lt=ot=!0,b[E].column=ft)}return fd(a,y,b),a.normalize(),ot}function Iv(a,y,x){var E=dd(a,y),b=a.tc[y],z=Z1(a,y,x),tt=[];for(x=0;x<b;x++)tt[x]=z[x];for(z=!0;z;)for(z=!1,x=0;x<b;x++){var rt=E[x].column,ot=a.nodeMinColumnSpace(E[x],!0),lt=a.nodeMinColumnSpace(E[x],!1),ut=0;if(tt[x]===-1)if(x===0&&x===b-1)ut=rt;else if(x===0){var ft=E[x+1].column;ft-rt===lt+a.nodeMinColumnSpace(E[x+1],!0)?ut=rt-1:ut=rt}else x===b-1?(ft=E[x-1].column,ut=rt-ft===ot+a.nodeMinColumnSpace(E[x-1],!1)?rt+1:rt):(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,ft=E[x+1].column,lt=ft-a.nodeMinColumnSpace(E[x+1],!0)-lt-1,ut=(ot+lt)/2|0);else x===0&&x===b-1?ut=tt[x]:x===0?(ft=E[x+1].column,lt=ft-a.nodeMinColumnSpace(E[x+1],!0)-lt-1,ut=Math.min(tt[x],lt)):x===b-1?(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,ut=Math.max(tt[x],ot)):(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,ft=E[x+1].column,lt=ft-a.nodeMinColumnSpace(E[x+1],!0)-lt-1,ot<tt[x]&&tt[x]<lt?ut=tt[x]:ot>=tt[x]?ut=ot:lt<=tt[x]&&(ut=lt));ut!==rt&&(z=!0,E[x].column=ut)}fd(a,y,E),a.normalize()}function Ww(a,y){for(var x=!0,E=a.network.vertexes.iterator;E.next();){var b=E.value,z=a.nodeMinColumnSpace(b,!0),tt=a.nodeMinColumnSpace(b,!1);if(b.column-z<=y&&b.column+tt>=y){x=!1;break}}if(a=!1,x)for(E.reset();E.next();)x=E.value,x.column>y&&(--x.column,a=!0);return a}function Yw(a,y){var x=y+1,E,b=[],z=[];for(E=0;E<=a.Ia;E++)b[E]=!1,z[E]=!1;for(var tt=a.network.vertexes.iterator;tt.next();){E=tt.value;var rt=E.column-a.nodeMinColumnSpace(E,!0),ot=E.column+a.nodeMinColumnSpace(E,!1);rt<=y&&ot>=y&&(b[E.layer]=!0),rt<=x&&ot>=x&&(z[E.layer]=!0)}for(rt=!0,x=!1,E=0;E<=a.Ia;E++)rt=rt&&!(b[E]&&z[E]);if(rt)for(tt.reset();tt.next();)a=tt.value,a.column>y&&(--a.column,x=!0);return x}function iw(a,y){for(var x=0;x<=a.Ra;x++)for(;Ww(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Yw(a,x););a.normalize();var E;if(0<y)for(x=0;x<=a.Ra;x++){var b=fl(a),z=em(a);for(E=z+1;z<E;){E=z,rw(a,x,1);var tt=em(a);tt>z?lu(a,b):tt<z&&(z=tt,b=fl(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(b=fl(a),z=em(a),E=z+1;z<E;)E=z,rw(a,x,-1),tt=em(a),tt>z?lu(a,b):tt<z&&(z=tt,b=fl(a));a.normalize()}function rw(a,y,x){a.le=0;for(var E=a.network.vertexes.iterator;E.next();)E.value.component=-1;if(0<x)for(E.reset();E.next();){var b=E.value;b.column-a.nodeMinColumnSpace(b,!0)<=y&&(b.component=a.le)}if(0>x)for(E.reset();E.next();)b=E.value,b.column+a.nodeMinColumnSpace(b,!1)>=y&&(b.component=a.le);for(a.le++,E.reset();E.next();)y=E.value,y.component===-1&&(Nv(a,y,a.le,-1,!0,!0),a.le++);var z;for(y=[],z=0;z<a.le*a.le;z++)y[z]=!1;for(b=[],z=0;z<(a.Ia+1)*(a.Ra+1);z++)b[z]=-1;for(E.reset();E.next();){z=E.value;for(var tt=z.layer,rt=Math.max(0,z.column-a.nodeMinColumnSpace(z,!0)),ot=Math.min(a.Ra,z.column+a.nodeMinColumnSpace(z,!1));rt<=ot;rt++)b[tt*(a.Ra+1)+rt]=z.component}for(z=0;z<=a.Ia;z++){if(0<x)for(tt=0;tt<a.Ra;tt++)b[z*(a.Ra+1)+tt]!==-1&&b[z*(a.Ra+1)+tt+1]!==-1&&b[z*(a.Ra+1)+tt]!==b[z*(a.Ra+1)+tt+1]&&(y[b[z*(a.Ra+1)+tt]*a.le+b[z*(a.Ra+1)+tt+1]]=!0);if(0>x)for(tt=a.Ra;0<tt;tt--)b[z*(a.Ra+1)+tt]!==-1&&b[z*(a.Ra+1)+tt-1]!==-1&&b[z*(a.Ra+1)+tt]!==b[z*(a.Ra+1)+tt-1]&&(y[b[z*(a.Ra+1)+tt]*a.le+b[z*(a.Ra+1)+tt-1]]=!0)}for(b=[],z=0;z<a.le;z++)b[z]=!0;for(tt=[],tt.push(0);tt.length!==0;)if(ot=tt[tt.length-1],tt.pop(),b[ot])for(b[ot]=!1,z=0;z<a.le;z++)y[ot*a.le+z]&&tt.splice(0,0,z);if(0<x)for(E.reset();E.next();)a=E.value,b[a.component]&&--a.column;if(0>x)for(E.reset();E.next();)x=E.value,b[x.component]&&(x.column+=1)}function Xw(a){for(var y=rn(),x=a.fl.length,E=0;E<=x;E++)y[E]=[];for(E=a.network.vertexes.iterator;E.next();){var b=E.value;y[x-b.layer][b.index]=b}x=new Fe,Jw(y,x);var z=null,tt=null,rt=null,ot=null,lt=(a.ve&1)!==0,ut=(a.ve&2)!==0,ft=(a.ve&4)!==0,yt=(a.ve&8)!==0;for(lt&&(a.verticalAlignment(y,x,!0),z=im(a,y,!0,!1)),y.reverse(),ft&&(a.verticalAlignment(y,x,!1),rt=im(a,y,!1,!1)),E=Zi(y),b=E.next();!b.done;b=E.next())b.value.reverse();yt&&(a.verticalAlignment(y,x,!1),ot=im(a,y,!1,!0)),y.reverse(),ut&&(a.verticalAlignment(y,x,!0),tt=im(a,y,!0,!0)),Ve(y),a.u(z,tt,rt,ot),a.network.vertexes.each(function(Mt){var bt=rn();lt&&bt.push(z.get(Mt)),ut&&bt.push(tt.get(Mt)),ft&&bt.push(rt.get(Mt)),yt&&bt.push(ot.get(Mt)),bt.sort(function(qt,Vt){return qt-Vt});var Dt=bt.length;Dt=(bt[Math.floor((Dt-1)/2)]+bt[Math.ceil((Dt-1)/2)])/2,Ve(bt),Mt.zc=Dt})}function Jw(a,y){for(var x=a.length,E=1;E<x-1;E++)for(var b=0,z=0,tt=a[E],rt=a[E+1],ot=0;z<rt.length;ot++){var lt=rt[ot];t:{if(lt.node===null){var ut=Gv(lt);if(0<ut.length){ut=ut[0].node===null;break t}}ut=!1}var ft=ut;if(ot===rt.length-1||ft){for(ut=tt.length-1,ft&&(ut=Gv(lt)[0].index);z<=ot;){if(lt=rt[z],!lt.bo){ft=[];for(var yt=Zi(lt.sourceEdgesArrayAccess),Mt=yt.next();!Mt.done;Mt=yt.next())Mt=Mt.value,Mt.valid&&ft.push(Mt);lt.bo=ft}for(lt=Zi(lt.bo),ft=lt.next();!ft.done;ft=lt.next())ft=ft.value,yt=ft.fromVertex.index,(yt<b||yt>ut)&&y.add(ft);z++}b=ut}}}fo.prototype.verticalAlignment=function(a,y,x){qw(a),a=Zi(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=Zi(E.value);for(var z=E.next();!z.done;z=E.next()){z=z.value;var tt=x?Gv(z):ex(z),rt=tt.length;if(0<rt){tt.sort(function(ft,yt){return ft.vi-yt.vi});var ot=(rt-1)/2;for(rt=Math.floor(ot),ot=Math.ceil(ot);rt<=ot;rt++)if(z.align===z){var lt=tt[rt],ut=void 0;ut=x?um(lt,z):um(z,lt),!y.contains(ut)&&b<lt.vi&&(lt.align=z,z.root=lt.root,z.align=lt.root,b=lt.vi)}}}}};function qw(a){for(var y=0;y<a.length;y++)for(var x=a[y],E=0;E<x.length;E++){var b=x[E];b.root=b,b.align=b,b.Tz=y,b.vi=E}}function im(a,y,x,E){for(var b=a.K===90||a.K===270,z=Zi(y),tt=z.next();!tt.done;tt=z.next()){var rt=Zi(tt.value);for(tt=rt.next();!tt.done;tt=rt.next())tt=tt.value,tt.sd=tt,tt.shift=1/0,tt.zc=NaN,tt.qg=0}for(tt=a.K===90||a.K===270,z=Zi(y),rt=z.next();!rt.done;rt=z.next()){rt=Zi(rt.value);for(var ot=rt.next();!ot.done;ot=rt.next())if(ot=ot.value,ot.root===ot){for(var lt=0,ut=ot;ut.align!==ot;){var ft=ut.align,yt=tt?ut.width:ut.height,Mt=tt?ft.width:ft.height;if(x){var bt=um(ut,ft),Dt=bt.portFromPos,qt=bt.portToPos;bt.link!==null&&(ut.node&&ut.node!==bt.link.fromNode&&(Dt=tt?ut.focusX:ut.focusY),ft.node&&ft.node!==bt.link.toNode&&(qt=tt?ft.focusX:ft.focusY))}else bt=um(ft,ut),Dt=bt.portToPos,qt=bt.portFromPos,bt.link!==null&&(ut.node&&ut.node!==bt.link.toNode&&(Dt=tt?ut.focusX:ut.focusY),ft.node&&ft.node!==bt.link.fromNode&&(qt=tt?ft.focusX:ft.focusY));yt=E?ut.qg+(yt-Dt)-(Mt-qt):ut.qg+Dt-qt,ft.qg=yt,lt=Math.min(lt,yt),ut=ut.align}ut=ot;do ut.qg=ut.qg-lt,ut=ut.align;while(ut!==ot)}}for(x=Zi(y),tt=x.next();!tt.done;tt=x.next())for(z=Zi(tt.value),tt=z.next();!tt.done;tt=z.next())tt=tt.value,tt.root===tt&&ow(a,tt,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(tt=y[x][0],tt.sd===tt)){tt.sd.shift===1/0&&(tt.sd.shift=0),tt=x,rt=0;do{for(z=y[tt][rt];z.align!==z.root;)z=z.align,tt++,0<z.vi&&(rt=sw(z,y),rt.sd.shift=Math.min(rt.sd.shift,z.sd.shift+z.zc+z.qg-(rt.zc+rt.qg+(b?rt.width:rt.height)+a.columnSpacing)));rt=z.vi+1}while(tt<y.length&&rt<y[tt].length&&z.sd===y[tt][rt].sd)}for(a=new be,y=Zi(y),tt=y.next();!tt.done;tt=y.next())for(x=Zi(tt.value),tt=x.next();!tt.done;tt=x.next())tt=tt.value,tt.zc=tt.zc+tt.sd.shift+tt.qg,z=b?tt.width:tt.height,a.add(tt,E?-tt.zc-z:tt.zc);return a}function ow(a,y,x){if(isNaN(y.zc)){y.zc=0;var E=y;do{if(0<E.vi){var b=sw(E,x),z=b.root;ow(a,z,x),y.sd===y&&(y.sd=z.sd);var tt=a.K===90||a.K===270?b.width:b.height;y.sd===z.sd&&(y.zc=Math.max(y.zc,z.zc+b.qg+tt-E.qg+a.columnSpacing))}E=E.align}while(E!==y);for(;E.align!==y;)E=E.align,E.zc=y.zc,E.sd=y.sd}}function sw(a,y){var x=a.Tz;return a=a.vi,1>a&&le("Could not determine previous vertex in layer"),y[x][a-1]}fo.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var E=rn(),b=rn(),z=1/0,tt=0;4>tt;tt++)if(y[tt]){var rt=$w(this,y[tt],E,b,tt);rt<z&&(x=tt,z=rt)}for(z={},tt=0;4>tt;z={delta:z.delta},tt++)y[tt]&&(z.delta=tt===0||tt===2?E[x]-E[tt]:b[x]-b[tt],z.delta!==0&&y[tt].each(function(ot){return function(lt){lt.value+=ot.delta}}(z)));Ve(E),Ve(b)};function $w(a,y,x,E,b){if(!y||y.count===0)return x[b]=0,E[b]=0,1/0;var z=1/0,tt=-1/0;return y.each(function(rt){var ot=rt.key;rt=rt.value,ot=a.K===90||a.K===270?ot.width:ot.height,rt<z&&(z=rt),rt+ot>tt&&(tt=rt+ot)}),x[b]=z,E[b]=tt,tt-z}fo.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=rm(this,!0),y=rm(this,!1),x=this.network.edges.iterator;x.next();){var E=x.value.link;E!==null&&(E.fromSpot=a,E.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function rm(a,y){return a.K===270?y?Bs:Us:a.K===90?y?Us:Bs:a.K===180?y?Yo:As:y?As:Yo}fo.prototype.commitNodes=function(){this.he=[],this.Ld=[],this.Kd=[],this.Ta=[];for(var a=0;a<=this.Ia;a++)this.he[a]=0,this.Ld[a]=0,this.Kd[a]=0,this.Ta[a]=0;for(a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;this.he[x]=Math.max(this.he[x],this.nodeMinLayerSpace(y,!0)),this.Ld[x]=Math.max(this.Ld[x],this.nodeMinLayerSpace(y,!1))}y=0,x=this.ie;for(var E=0;E<=this.Ia;E++){var b=x;0>=this.he[E]+this.Ld[E]&&(b=0),0<E&&(y+=b/2),this.K===90||this.K===0?(y+=this.Ld[E],this.Kd[E]=y,y+=this.he[E]):(y+=this.he[E],this.Kd[E]=y,y+=this.Ld[E]),E<this.Ia&&(y+=b/2),this.Ta[E]=y}for(x=y,y=this.arrangementOrigin,E=0;E<=this.Ia;E++)this.K===270?this.Kd[E]=y.y+this.Kd[E]:this.K===90?(this.Kd[E]=y.y+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]):this.K===180?this.Kd[E]=y.x+this.Kd[E]:(this.Kd[E]=y.x+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]);x=this.ve!==0,a.reset(),E=this.K===270||this.K===90;for(var z=1/0,tt=b=1/0,rt=-1/0;a.next();){var ot=a.value,lt=ot.layer,ut=ot.column|0;E?(tt=y.x+this.kc*ut,lt=this.Kd[lt]):(tt=this.Kd[lt],lt=y.y+this.kc*ut),ot.centerX=tt,ot.centerY=lt,x&&isFinite(ot.zc)&&(E?ot.node?ot.x=y.x+ot.zc:ot.centerX=y.x+ot.zc:ot.node?ot.y=y.y+ot.zc:ot.centerY=y.y+ot.zc),z=Math.min(ot.x,z),b=Math.min(ot.y,b),E?(tt=z,rt=Math.max(rt,ot.bounds.right)):(tt=b,rt=Math.max(rt,ot.bounds.bottom))}for(this.xw=rt-tt,z=y.x-z,y=y.y-b,this.Rf=new Qt(x&&E?0:z,x&&!E?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},fo.prototype.Gu=function(){for(var a=0,y=this.ie,x=0;x<=this.Ia;x++)a+=this.he[x],a+=this.Ld[x];a+=this.Ia*y,y=[],x=this.ve!==0?this.xw:this.kc*this.Ra;for(var E=this.maxLayer;0<=E;E--)this.K===270?E===0?y.push(new Ue(0,0,x,Math.abs(this.Ta[0]))):y.push(new Ue(0,this.Ta[E-1],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===90?E===0?y.push(new Ue(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new Ue(0,this.Ta[E],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===180?E===0?y.push(new Ue(0,0,Math.abs(this.Ta[0]),x)):y.push(new Ue(this.Ta[E-1],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x)):E===0?y.push(new Ue(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new Ue(this.Ta[E],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x));this.commitLayers(y,this.Rf)},fo.prototype.commitLayers=function(){},fo.prototype.commitLinks=function(){for(var a=this.network.edges.iterator,y;a.next();)y=a.value.link,y!==null&&(y.uh(),y.Fj(),y.zf());for(a.reset();a.next();)y=a.value.link,y!==null&&y.vg();for(a.reset();a.next();){var x=a.value;if(y=x.link,y!==null){y.uh();var E=y,b=E.fromNode,z=E.toNode,tt=E.fromPort,rt=E.toPort;if(b!==null){var ot=b.findVisibleNode();ot!==null&&ot!==b&&(b=ot,tt=ot.port)}z!==null&&(ot=z.findVisibleNode(),ot!==null&&ot!==z&&(z=ot,rt=ot.port));var lt=y.computeSpot(!0,tt);ot=y.computeSpot(!1,rt);var ut=x.fromVertex,ft=x.toVertex;if(x.valid)y.curve===ql&&y.pointsCount===4&&(ut.column===ft.column&&this.alignOption===0?(x=y.getLinkPoint(b,tt,lt,!0,!1,z,rt),rt=y.getLinkPoint(z,rt,ot,!1,!1,b,tt),x.w()||x.set(b.actualBounds.center),rt.w()||rt.set(z.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+rt.x)/3,(2*x.y+rt.y)/3),y.yf((x.x+2*rt.x)/3,(x.y+2*rt.y)/3),y.yf(rt.x,rt.y)):(x=E=!1,tt!==null&&lt===Ar&&(E=!0),rt!==null&&ot===Ar&&(x=!0),(E||x)&&(ot=null,E&&(ot=y.getLinkPointFromPoint(b,tt,tt.ga(rr),y.i(3),!0),ot.w()||ot.set(b.actualBounds.center),y.L(0,ot.x,ot.y)),b=null,x&&(b=y.getLinkPointFromPoint(z,rt,rt.ga(rr),y.i(0),!1),b.w()||b.set(z.actualBounds.center),y.L(3,b.x,b.y)),ot&&(z=y.i(2),y.L(1,(2*ot.x+z.x)/3,(2*ot.y+z.y)/3)),b&&(z=y.i(1),y.L(2,(2*b.x+z.x)/3,(2*b.y+z.y)/3))))),y.zf();else if(ut.layer===ft.layer)y.zf();else{var yt=!1,Mt=!1,bt=this.ie,Dt=y.firstPickIndex+1;if(y.isOrthogonal){Mt=!0;var qt=y.pointsCount;4<qt&&y.points.removeRange(2,qt-3)}else if(y.curve===ql)yt=!0,qt=y.pointsCount,4<qt&&y.points.removeRange(2,qt-3),qt===4&&(Dt=2);else{qt=y.pointsCount;var Vt=lt===Ar,oe=ot===Ar;2<qt&&Vt&&oe?y.points.removeRange(1,qt-2):3<qt&&Vt&&!oe?y.points.removeRange(1,qt-3):3<qt&&!Vt&&oe?y.points.removeRange(2,qt-2):4<qt&&!Vt&&!oe&&y.points.removeRange(2,qt-3)}if(x.rev){for(;ft!==null&&ut!==ft;){var ce=qt=null;for(Vt=ft.sourceEdges.iterator;Vt.next()&&(oe=Vt.value,oe.link!==x.link||(qt=oe.fromVertex,ce=oe.toVertex,qt.node!==null)););if(qt===null)break;if(qt!==ut){Vt=y.i(Dt-1).x,oe=y.i(Dt-1).y;var ge=qt.centerX,Se=qt.centerY;if(Mt)this.K===180||this.K===0?Dt===y.firstPickIndex+1?(y.m(Dt++,Vt,oe),y.m(Dt++,Vt,Se)):(ce!==null?ce.centerY:oe)!==Se&&(ce=this.Ta[qt.layer-1]+this.Rf.x,y.m(Dt++,ce,oe),y.m(Dt++,ce,Se)):Dt===y.firstPickIndex+1?(y.m(Dt++,Vt,oe),y.m(Dt++,ge,oe)):(ce!==null?ce.centerX:Vt)!==ge&&(ce=this.Ta[qt.layer-1]+this.Rf.y,y.m(Dt++,Vt,ce),y.m(Dt++,ge,ce));else if(Dt===y.firstPickIndex+1){ce=Math.max(10,this.he[ft.layer]);var Re=Math.max(10,this.Ld[ft.layer]);if(yt)this.K===180?ge<=ft.bounds.x?(ft=ft.bounds.x,y.m(Dt++,ft-ce,Se),y.m(Dt++,ft,Se),y.m(Dt++,ft+Re,Se)):(y.m(Dt++,ge-ce,Se),y.m(Dt++,ge,Se),y.m(Dt++,ge+Re,Se)):this.K===90?Se>=ft.bounds.bottom?(ft=ft.bounds.y+ft.bounds.height,y.m(Dt++,ge,ft+Re),y.m(Dt++,ge,ft),y.m(Dt++,ge,ft-ce)):(y.m(Dt++,ge,Se+Re),y.m(Dt++,ge,Se),y.m(Dt++,ge,Se-ce)):this.K===270?Se<=ft.bounds.y?(ft=ft.bounds.y,y.m(Dt++,ge,ft-ce),y.m(Dt++,ge,ft),y.m(Dt++,ge,ft+Re)):(y.m(Dt++,ge,Se-ce),y.m(Dt++,ge,Se),y.m(Dt++,ge,Se+Re)):this.K===0&&(ge>=ft.bounds.right?(ft=ft.bounds.x+ft.bounds.width,y.m(Dt++,ft+Re,Se),y.m(Dt++,ft,Se),y.m(Dt++,ft-ce,Se)):(y.m(Dt++,ge+Re,Se),y.m(Dt++,ge,Se),y.m(Dt++,ge-ce,Se)));else{y.m(Dt++,Vt,oe);var qn=0;this.K===180||this.K===0?((this.K===180?ge>=ft.bounds.right:ge<=ft.bounds.x)&&(qn=(this.K===0?-ce:Re)/2),y.m(Dt++,Vt+qn,Se)):((this.K===270?Se>=ft.bounds.bottom:Se<=ft.bounds.y)&&(qn=(this.K===90?-ce:Re)/2),y.m(Dt++,ge,oe+qn)),y.m(Dt++,ge,Se)}}else ce=Math.max(10,this.he[qt.layer]),Re=Math.max(10,this.Ld[qt.layer]),yt?this.K===180?(y.m(Dt++,ge-ce-bt,Se),y.m(Dt++,Math.min(ge-ce+bt/2,ge),Se),y.m(Dt++,ge,Se),y.m(Dt++,ge,Se),y.m(Dt++,Math.max(ge+Re-bt/2,ge),Se),y.m(Dt++,ge+Re+bt,Se)):this.K===90?(y.m(Dt++,ge,Se+Re+bt),y.m(Dt++,ge,Math.max(Se+Re-bt/2,Se)),y.m(Dt++,ge,Se),y.m(Dt++,ge,Se),y.m(Dt++,ge,Math.min(Se-ce+bt/2,Se)),y.m(Dt++,ge,Se-ce-bt)):this.K===270?(y.m(Dt++,ge,Se-ce-bt),y.m(Dt++,ge,Math.min(Se-ce+bt/2,Se)),y.m(Dt++,ge,Se),y.m(Dt++,ge,Se),y.m(Dt++,ge,Math.max(Se+Re-bt/2,Se)),y.m(Dt++,ge,Se+Re+bt)):(y.m(Dt++,ge+Re+bt,Se),y.m(Dt++,Math.max(ge+Re-bt/2,ge),Se),y.m(Dt++,ge,Se),y.m(Dt++,ge,Se),y.m(Dt++,Math.min(ge-ce+bt/2,ge),Se),y.m(Dt++,ge-ce-bt,Se)):y.m(Dt++,ge,Se)}ft=qt}(rt===null||lt!==Ar||Mt)&&(Vt=y.i(Dt-1).x,oe=y.i(Dt-1).y,ge=y.i(Dt).x,Se=y.i(Dt).y,Mt?(bt=this.Ld[ut.layer],this.K===180||this.K===0?(Mt=oe,Mt>=ut.bounds.y&&Mt<=ut.bounds.bottom&&(this.K===180?ge>=ut.bounds.x:ge<=ut.bounds.right)&&(ft=ut.centerX+(this.K===180?-bt:bt),Mt<ut.bounds.y+ut.bounds.height/2?Mt=ut.bounds.y-this.kc/2:Mt=ut.bounds.bottom+this.kc/2,y.m(Dt++,ft,oe),y.m(Dt++,ft,Mt)),y.m(Dt++,ge,Mt)):(Mt=Vt,Mt>=ut.bounds.x&&Mt<=ut.bounds.right&&(this.K===270?Se>=ut.bounds.y:Se<=ut.bounds.bottom)&&(ft=ut.centerY+(this.K===270?-bt:bt),Mt<ut.bounds.x+ut.bounds.width/2?Mt=ut.bounds.x-this.kc/2:Mt=ut.bounds.right+this.kc/2,y.m(Dt++,Vt,ft),y.m(Dt++,Mt,ft)),y.m(Dt++,Mt,Se)),y.m(Dt++,ge,Se)):yt?(ce=Math.max(10,this.he[ut.layer]),Re=Math.max(10,this.Ld[ut.layer]),this.K===180&&ge>=ut.bounds.x?(ft=ut.bounds.x+ut.bounds.width,y.L(Dt-2,ft,oe),y.L(Dt-1,ft+Re,oe)):this.K===90&&Se<=ut.bounds.bottom?(ft=ut.bounds.y,y.L(Dt-2,Vt,ft),y.L(Dt-1,Vt,ft-ce)):this.K===270&&Se>=ut.bounds.y?(ft=ut.bounds.y+ut.bounds.height,y.L(Dt-2,Vt,ft),y.L(Dt-1,Vt,ft+Re)):this.K===0&&ge<=ut.bounds.right&&(ft=ut.bounds.x,y.L(Dt-2,ft,oe),y.L(Dt-1,ft-ce,oe))):(ce=Math.max(10,this.he[ut.layer]),Re=Math.max(10,this.Ld[ut.layer]),Mt=0,this.K===180||this.K===0?((this.K===180?ge<=ut.bounds.x:ge>=ut.bounds.right)&&(Mt=(this.K===0?Re:-ce)/2),y.m(Dt++,ge+Mt,oe)):((this.K===270?Se<=ut.bounds.y:Se>=ut.bounds.bottom)&&(Mt=(this.K===90?Re:-ce)/2),y.m(Dt++,Vt,Se+Mt)),y.m(Dt++,ge,Se)))}else{for(;ut!==null&&ut!==ft;){for(ce=qt=null,ut=ut.destinationEdges.iterator;ut.next()&&(Vt=ut.value,Vt.link!==x.link||(qt=Vt.toVertex,ce=Vt.fromVertex,ce.node!==null&&(ce=null),qt.node!==null)););if(qt===null)break;qt!==ft&&(Vt=y.i(Dt-1).x,oe=y.i(Dt-1).y,ge=qt.centerX,Se=qt.centerY,Mt?this.K===180||this.K===0?(ce!==null?ce.centerY:oe)!==Se&&(ce=this.Ta[qt.layer]+this.Rf.x,Dt===y.firstPickIndex+1&&(ce=this.K===0?Math.max(ce,Vt):Math.min(ce,Vt)),y.m(Dt++,ce,oe),y.m(Dt++,ce,Se)):(ce!==null?ce.centerX:Vt)!==ge&&(ce=this.Ta[qt.layer]+this.Rf.y,Dt===y.firstPickIndex+1&&(ce=this.K===90?Math.max(ce,oe):Math.min(ce,oe)),y.m(Dt++,Vt,ce),y.m(Dt++,ge,ce)):(ce=Math.max(10,this.he[qt.layer]),Re=Math.max(10,this.Ld[qt.layer]),yt?this.K===180?(y.m(Dt++,ge+Re+bt,Se),y.m(Dt++,Math.max(ge+Re-bt/2,ge),Se),y.m(Dt++,ge,Se),y.m(Dt++,ge,Se),y.m(Dt++,Math.min(ge-ce+bt/2,ge),Se),y.m(Dt++,ge-ce-bt,Se)):this.K===90?(y.m(Dt++,ge,Se-ce-bt),y.m(Dt++,ge,Math.min(Se-ce+bt/2,Se)),y.m(Dt++,ge,Se),y.m(Dt++,ge,Se),y.m(Dt++,ge,Math.max(Se+Re-bt/2,Se)),y.m(Dt++,ge,Se+Re+bt)):this.K===270?(y.m(Dt++,ge,Se+Re+bt),y.m(Dt++,ge,Math.max(Se+Re-bt/2,Se)),y.m(Dt++,ge,Se),y.m(Dt++,ge,Se),y.m(Dt++,ge,Math.min(Se-ce+bt/2,Se)),y.m(Dt++,ge,Se-ce-bt)):(y.m(Dt++,ge-ce-bt,Se),y.m(Dt++,Math.min(ge-ce+bt/2,ge),Se),y.m(Dt++,ge,Se),y.m(Dt++,ge,Se),y.m(Dt++,Math.max(ge+Re-bt/2,ge),Se),y.m(Dt++,ge+Re+bt,Se)):this.K===180?(y.m(Dt++,ge+Re,Se),y.m(Dt++,ge-ce,Se)):this.K===90?(y.m(Dt++,ge,Se-ce),y.m(Dt++,ge,Se+Re)):this.K===270?(y.m(Dt++,ge,Se+Re),y.m(Dt++,ge,Se-ce)):(y.m(Dt++,ge-ce,Se),y.m(Dt++,ge+Re,Se)))),ut=qt}Mt&&(Vt=y.i(Dt-1).x,oe=y.i(Dt-1).y,ge=y.i(Dt).x,Se=y.i(Dt).y,this.K===180||this.K===0?oe!==Se&&(ce=this.K===0?Math.min(Math.max((ge+Vt)/2,this.Ta[ft.layer]+this.Rf.x),ge):Math.max(Math.min((ge+Vt)/2,this.Ta[ft.layer]+this.Rf.x),ge),y.m(Dt++,ce,oe),y.m(Dt++,ce,Se)):Vt!==ge&&(ce=this.K===90?Math.min(Math.max((Se+oe)/2,this.Ta[ft.layer]+this.Rf.y),Se):Math.max(Math.min((Se+oe)/2,this.Ta[ft.layer]+this.Rf.y),Se),y.m(Dt++,Vt,ce),y.m(Dt++,ge,ce)))}E!==null&&yt&&4<=y.pointsCount&&(tt!==null&&(tt=lt===Ar?y.getLinkPointFromPoint(b,tt,tt.ga(rr),y.i(3),!0):y.i(0),lt===Ar&&(lt=y.i(2),E=y.i(3),this.direction===90||this.direction===270?(y.L(1,(tt.x+lt.x)/2,lt.y),y.L(2,E.x,(lt.y+E.y)/2)):(y.L(1,lt.x,(tt.y+lt.y)/2),y.L(2,(lt.x+E.x)/2,E.y))),tt.w()||tt.set(b.actualBounds.center),y.L(0,tt.x,tt.y)),rt!==null&&(b=ot===Ar?y.getLinkPointFromPoint(z,rt,rt.ga(rr),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),ot===Ar&&(rt=y.i(y.pointsCount-3),ot=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(b.x+rt.x)/2,rt.y),y.L(y.pointsCount-2,ot.x,(rt.y+ot.y)/2)):(y.L(y.pointsCount-2,rt.x,(b.y+rt.y)/2),y.L(y.pointsCount-3,(rt.x+ot.x)/2,ot.y))),b.w()||b.set(z.actualBounds.center),y.L(y.pointsCount-1,b.x,b.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},fo.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new ne,y=this.network.edges.iterator;y.next();){var x=y.value.link;x!==null&&x.isOrthogonal&&!a.contains(x)&&a.add(x)}if(0<a.count)if(this.K===90||this.K===270){for(y=0,x=[],a=a.iterator;a.next();){var E=a.value;if(E!==null&&E.isOrthogonal)for(var b=2;b<E.pointsCount-3;b++){var z=E.i(b),tt=E.i(b+1);if(this.B(z.y,tt.y)&&!this.B(z.x,tt.x)){var rt=new gd;rt.layer=Math.floor(z.y/2);var ot=E.i(0),lt=E.i(E.pointsCount-1);if(rt.first=ot.x*ot.x+ot.y,rt.jc=lt.x*lt.x+lt.y,rt.rd=Math.min(z.x,tt.x),rt.Ic=Math.max(z.x,tt.x),rt.index=b,rt.link=E,b+2<E.pointsCount){ot=E.i(b-1),lt=E.i(b+2);var ut=0;ot.y<z.y?ut=lt.y<z.y?3:z.x<tt.x?2:1:ot.y>z.y&&(ut=lt.y>z.y?0:tt.x<z.x?2:1),rt.j=ut}x.push(rt)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(tt=x[z].Ic,b=a+1;b<E&&x[b].rd<tt;)tt=Math.max(tt,x[b].Ic),b++;if(tt=b-z,1<tt){for(this.zi(x,this.Js,z,z+tt),ut=1,rt=x[z].jc,ot=z;ot<b;ot++)lt=x[ot],lt.jc!==rt&&(ut++,rt=lt.jc);this.zi(x,this.Ux,z,z+tt);var ft=1;for(rt=x[z].first,ot=z;ot<b;ot++)lt=x[ot],lt.first!==rt&&(ft++,rt=lt.first);for(ot=!0,lt=ft,ut<ft?(ot=!1,lt=ut,rt=x[z].jc,this.zi(x,this.Js,z,z+tt)):rt=x[z].first,ut=0,ft=z;ft<b;ft++){var yt=x[ft];(ot?yt.first:yt.jc)!==rt&&(ut++,rt=ot?yt.first:yt.jc);var Mt=yt.link;z=Mt.i(yt.index),tt=Mt.i(yt.index+1);var bt=this.linkSpacing*(ut-(lt-1)/2);y++,Mt.uh(),Mt.L(yt.index,z.x,z.y+bt),Mt.L(yt.index+1,tt.x,tt.y+bt),Mt.zf()}}z=b}a=E}}else{for(y=0,x=[],a=a.iterator;a.next();)if(E=a.value,E!==null&&E.isOrthogonal)for(b=2;b<E.pointsCount-3;b++)z=E.i(b),tt=E.i(b+1),this.B(z.x,tt.x)&&!this.B(z.y,tt.y)&&(rt=new gd,rt.layer=Math.floor(z.x/2),ot=E.i(0),lt=E.i(E.pointsCount-1),rt.first=ot.x+ot.y*ot.y,rt.jc=lt.x+lt.y*lt.y,rt.rd=Math.min(z.y,tt.y),rt.Ic=Math.max(z.y,tt.y),rt.index=b,rt.link=E,b+2<E.pointsCount&&(ot=E.i(b-1),lt=E.i(b+2),ut=0,ot.x<z.x?ut=lt.x<z.x?3:z.y<tt.y?2:1:ot.x>z.x&&(ut=lt.x>z.x?0:tt.y<z.y?2:1),rt.j=ut),x.push(rt));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(tt=x[z].Ic,b=a+1;b<E&&x[b].rd<tt;)tt=Math.max(tt,x[b].Ic),b++;if(tt=b-z,1<tt){for(this.zi(x,this.Js,z,z+tt),ut=1,rt=x[z].jc,ot=z;ot<b;ot++)lt=x[ot],lt.jc!==rt&&(ut++,rt=lt.jc);for(this.zi(x,this.Ux,z,z+tt),ft=1,rt=x[z].first,ot=z;ot<b;ot++)lt=x[ot],lt.first!==rt&&(ft++,rt=lt.first);for(ot=!0,lt=ft,ut<ft?(ot=!1,lt=ut,rt=x[z].jc,this.zi(x,this.Js,z,z+tt)):rt=x[z].first,ut=0,ft=z;ft<b;ft++)yt=x[ft],(ot?yt.first:yt.jc)!==rt&&(ut++,rt=ot?yt.first:yt.jc),Mt=yt.link,z=Mt.i(yt.index),tt=Mt.i(yt.index+1),bt=this.linkSpacing*(ut-(lt-1)/2),y++,Mt.uh(),Mt.L(yt.index,z.x+bt,z.y),Mt.L(yt.index+1,tt.x+bt,tt.y),Mt.zf()}z=b}a=E}}}},Tt=fo.prototype,Tt.Vx=function(a,y){return a instanceof gd&&y instanceof gd&&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},Tt.Ux=function(a,y){return a instanceof gd&&y instanceof gd&&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},Tt.Js=function(a,y){return a instanceof gd&&y instanceof gd&&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},Tt.B=function(a,y){return a-=y,-1<a&&1>a},Tt.zi=function(a,y,x,E){var b=a.length,z=E-x;if(!(1>=z))if((0>x||x>=b-1)&&le("not in range 0 <= from < length: "+x),z===2)E=a[x],b=a[x+1],0<y(E,b)&&(a[x]=b,a[x+1]=E);else if(x===0)if(E>=b)a.sort(y);else for(x=a.slice(0,E),x.sort(y),y=0;y<E;y++)a[y]=x[y];else if(E>=b)for(E=a.slice(x),E.sort(y),y=x;y<b;y++)a[y]=E[y-x];else for(b=a.slice(x,E),b.sort(y),y=x;y<E;y++)a[y]=b[y-x]};function dd(a,y){var x=a.tc[y];if(x>=a.He.length){for(var E=[],b=0;b<a.He.length;b++)E[b]=a.He[b];a.He=E}for(a.He[x]===void 0||a.He[x]===null?E=[]:(E=a.He[x],a.He[x]=null),a=a.fl[y],y=0;y<a.length;y++)x=a[y],E[x.index]=x;return E}function fd(a,y,x){a.He[a.tc[y]]=x}Sn.Object.defineProperties(fo.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()):le("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==Uv&&a!==om&&a!==Qp||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==sm&&a!==Qv&&a!==Ov||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==am&&a!==Hv&&a!==Rv||(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!==_v&&a!==lm&&a!==Kv||(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 om=new Oe(fo,"CycleDepthFirst",0),Uv=new Oe(fo,"CycleGreedy",1),Qp=new Oe(fo,"CycleFromLayers",2),sm=new Oe(fo,"LayerOptimalLinkLength",0),Qv=new Oe(fo,"LayerLongestPathSink",1),Ov=new Oe(fo,"LayerLongestPathSource",2),am=new Oe(fo,"InitDepthFirstOut",0),Hv=new Oe(fo,"InitDepthFirstIn",1),Rv=new Oe(fo,"InitNaive",2),_v=new Oe(fo,"AggressiveNone",0),lm=new Oe(fo,"AggressiveLess",1),Kv=new Oe(fo,"AggressiveMore",2),tx=8;fo.className="LayeredDigraphLayout",fo.CycleDepthFirst=om,fo.CycleGreedy=Uv,fo.CycleFromLayers=Qp,fo.LayerOptimalLinkLength=sm,fo.LayerLongestPathSink=Qv,fo.LayerLongestPathSource=Ov,fo.InitDepthFirstOut=am,fo.InitDepthFirstIn=Hv,fo.InitNaive=Rv,fo.AggressiveNone=_v,fo.AggressiveLess=lm,fo.AggressiveMore=Kv,fo.PackNone=0,fo.PackExpand=1,fo.PackStraighten=2,fo.PackMedian=4,fo.PackAll=15,fo.AlignNone=0,fo.AlignUpperLeft=1,fo.AlignUpperRight=2,fo.AlignLowerLeft=4,fo.AlignLowerRight=8,fo.AlignAll=15;function gd(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}gd.className="SegInfo";function Og(a){Eo.call(this,a)}We(Og,Eo),Og.prototype.createVertex=function(){return new uu(this)},Og.prototype.createEdge=function(){return new Op(this)},Og.className="LayeredDigraphNetwork";function uu(a){Gs.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}We(uu,Gs);function aw(a,y){return a.index-y.index}function um(a,y){if(!a.$n){for(var x=[],E=Zi(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=Zi(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;le("Unable to find destination edge to given vertex")}function Gv(a){if(!a.co){for(var y=[],x=Zi(a.sourceEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.fromVertex);y.sort(aw),a.co=y}return a.co}function ex(a){if(!a.ao){for(var y=[],x=Zi(a.destinationEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.toVertex);y.sort(aw),a.ao=y}return a.ao}uu.prototype.Cl=function(a){Gs.prototype.Cl.call(this,a),this.bo=this.co=null},uu.prototype.Kl=function(a){Gs.prototype.Kl.call(this,a),this.bo=this.co=null},uu.prototype.zl=function(a){Gs.prototype.zl.call(this,a),this.$n=this.ao=null},uu.prototype.Jl=function(a){Gs.prototype.Jl.call(this,a),this.$n=this.ao=null},Sn.Object.defineProperties(uu.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)}}}),uu.prototype.deleteDestinationEdge=uu.prototype.Jl,uu.prototype.addDestinationEdge=uu.prototype.zl,uu.prototype.deleteSourceEdge=uu.prototype.Kl,uu.prototype.addSourceEdge=uu.prototype.Cl,uu.className="LayeredDigraphVertex";function Op(a){Ql.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}We(Op,Ql),Sn.Object.defineProperties(Op.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)}}}),Op.className="LayeredDigraphEdge";function Ur(a){zo.call(this),this.Ub=new Fe,this.Wn=dm,this.ud=oh,this.vo=gm,this.Bq=ty,this.$v=[],this.td=!0,this.Rb=pm,this.$d=new on(10,10).freeze();var y=new Jf(this);this.W=new xu(y),this.Y=new xu(y),this.ru=[],a&&Object.assign(this,a)}We(Ur,zo),Ur.prototype.cloneProtected=function(a){zo.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)},Ur.prototype.qb=function(a){a.classType===Ur?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:le("Unknown enum value: "+a):zo.prototype.qb.call(this,a)},Ur.prototype.createNetwork=function(){return new Jf(this)},Ur.prototype.makeNetwork=function(a){function y(E){if(E instanceof ri)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof Rn){var b=E.fromNode;return b===null||b.isLinkLabel||b.category==="Comment"?!1:(E=E.toNode,!(E===null||E.isLinkLabel||E.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof He?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof lr?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Ur.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==mm&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof He&&(y=a),this.path===dm&&y!==null?this.ud=y.isTreePathToChildren?oh:Yf:this.ud=this.path===dm?oh: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 Fe,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof ri?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof xu&&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,zv(this,y));for(y=this.network.vertexes,a=null;a=nx(y),0<a.count;)y=lw(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,zv(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof xu&&Aw(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof xu&&hw(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof xu&&cw(this,y);if(this.Cu(),this.layerStyle===vm){for(a=[],y=this.network.vertexes.iterator;y.next();){x=y.value;var E=x.parent;E===null&&(E=x),E=E.angle===0||E.angle===180;var b=a[x.level];b===void 0&&(b=0),a[x.level]=Math.max(b,E?x.width:x.height)}for(y=0;y<a.length;y++)a[y]===void 0&&(a[y]=0);for(this.$v=a,y=this.network.vertexes.iterator;y.next();)x=y.value,E=x.parent,E===null&&(E=x),E.angle===0||E.angle===180?(E.angle===180&&(x.focusX+=a[x.level]-x.width),x.width=a[x.level]):(E.angle===270&&(x.focusY+=a[x.level]-x.height),x.height=a[x.level])}else if(this.layerStyle===ey)for(a=this.network.vertexes.iterator;a.next();){for(y=a.value,x=y.angle===0||y.angle===180,E=-1,b=0;b<y.children.length;b++){var z=y.children[b];E=Math.max(E,x?z.width:z.height)}if(0<=E)for(b=0;b<y.children.length;b++)z=y.children[b],x?(y.angle===180&&(z.focusX+=E-z.width),z.width=E):(y.angle===270&&(z.focusY+=E-z.height),z.height=E)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof xu&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new Fe,this.isValidLayout=!0};function nx(a){var y=new Fe;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Ur.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case oh:x.sourceEdges.count===0&&this.Ub.add(x);break;case Yf:x.destinationEdges.count===0&&this.Ub.add(x);break;default:le("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=lw(this,a),a!==null&&this.Ub.add(a))};function lw(a,y){var x=999999,E=null;for(y=y.iterator;y.next();){var b=y.value;switch(a.ud){case oh:b.sourceEdges.count<x&&(x=b.sourceEdges.count,E=b);break;case Yf:b.destinationEdges.count<x&&(x=b.destinationEdges.count,E=b);break;default:le("Unhandled path value "+a.ud.toString())}}return E}function zv(a,y){if(y!==null){switch(a.ud){case oh:if(0<y.destinationEdges.count){for(var x=new ne,E=y.destinationVertexes;E.next();){var b=E.value;uw(a,y,b)&&x.add(b)}0<x.count&&(y.children=x.Fa())}break;case Yf:if(0<y.sourceEdges.count){for(x=new ne,E=y.sourceVertexes;E.next();)b=E.value,uw(a,y,b)&&x.add(b);0<x.count&&(y.children=x.Fa())}break;default:le("Unhandled path value"+a.ud.toString())}for(x=y.children,E=x.length,b=0;b<E;b++){var z=x[b];z.initialized=!0,z.level=y.level+1,z.parent=y,a.Ub.remove(z)}for(y=0;y<E;y++)zv(a,x[y])}}function uw(a,y,x){if(x.initialized){if(y===null)var E=!1;else{for(E=y.parent;E!==null&&E!==x;)E=E.parent;E=E===x}if(E||x.level>y.level)return!1;a.removeChild(x.parent,x)}return!0}Ur.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,E=0,b=0;b<x.length;b++)x[b]===y&&E++;if(0<E){E=Array(x.length-E);for(var z=b=0;z<x.length;z++)x[z]!==y&&(E[b++]=x[z]);a.children=E}}};function Aw(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===lh&&a.sortTreeVertexChildren(y);for(var x=0,E=y.childrenCount,b=0,z=y.children,tt=z.length,rt=0;rt<tt;rt++){var ot=z[rt];Aw(a,ot),x+=ot.descendantCount+1,E=Math.max(E,ot.maxChildrenCount),b=Math.max(b,ot.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=E,y.maxGenerationCount=0<E?b+1:0}}function ix(a,y){switch(a.vo){default:case gm:return y.parent!==null?y.parent:a.W;case qv:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Jv:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Xv:var x=!0;if(y.childrenCount===0)x=!1;else for(var E=y.children,b=E.length,z=0;z<b;z++)if(0<E[z].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}Ur.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(ix(this,a)),a.parent!==null&&a.parent.alignment===lh){for(var y=a.angle,x=a.parent.children,E=0;E<x.length&&a!==x[E];)E++;E%2===0?E!==x.length-1&&(y=y===90?180:y===180?270:y===270?180:270):y=y===90?0:y===180?90:y===270?0:90,a.angle=y}a.initialized=!0};function hw(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,E=0;E<x;E++)hw(a,y[E])}}Ur.prototype.assignTreeVertexValues=function(){};function cw(a,y){if(y!==null){y.alignment!==lh&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,E=0;E<x;E++)cw(a,y[E])}}Ur.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Hg:break;case Rp:a.children.reverse();break;case _p:a.children.sort(a.comparer);break;case Kp:a.children.sort(a.comparer),a.children.reverse();break;default:le("Unhandled sorting value "+a.sorting.toString())}},Ur.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Ur.prototype.addComments=function(a){var y=a.angle,x=a.parent,E=0,b=!1;x!==null&&(E=x.angle,b=x.alignment,b=pd(b)),y=y===90||y===270,E=E===90||E===270,x=a.childrenCount===0;var z=0,tt=0,rt=0,ot=a.commentSpacing;if(a.node!==null)for(var lt=a.node.Mu();lt.next();){var ut=lt.value;ut.category==="Comment"&&ut.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(ut),ut.Va(),ut=ut.measuredBounds,y&&!x||!b&&!E&&x||b&&E&&x?(z=Math.max(z,ut.width),tt+=ut.height+Math.abs(rt)):(z+=ut.width+Math.abs(rt),tt=Math.max(tt,ut.height)),rt=ot)}a.comments!==null&&(y&&!x||!b&&!E&&x||b&&E&&x?(z+=Math.abs(a.commentMargin),tt=Math.max(0,tt-a.height)):(tt+=Math.abs(a.commentMargin),z=Math.max(0,z-a.width)),b=Ue.allocAt(0,0,a.bounds.width+z,a.bounds.height+tt),a.bounds=b,Ue.free(b))};function pd(a){return a===Fc||a===lh||a===Ec||a===bh}function Hp(a){return a===Fc||a===lh}function jv(a){var y=a.parent;if(y!==null){var x=y.alignment;if(pd(x)){if(Hp(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===Ec)return!0}}return!1}Ur.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,E=a.angle,b=0,z=!1;x!==null&&(b=x.angle,z=x.alignment,z=pd(z)),E=E===90||E===270,x=b===90||b===270;for(var tt=a.childrenCount===0,rt=jv(a),ot=0,lt=a.comments,ut=lt.length,ft=Qt.alloc(),yt=0;yt<ut;yt++){var Mt=lt[yt],bt=Mt.measuredBounds;if(E&&!tt||!z&&!x&&tt||z&&x&&tt){if(135<b&&!z||x&&rt)if(0<=a.commentMargin)for(ft.h(a.bounds.x-a.commentMargin-bt.width,a.bounds.y+ot),Mt.move(ft),Mt=Mt.Sd();Mt.next();){var Dt=Mt.value;Dt.fromSpot=Yo,Dt.toSpot=As}else for(ft.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+ot),Mt.move(ft),Mt=Mt.Sd();Mt.next();)Dt=Mt.value,Dt.fromSpot=As,Dt.toSpot=Yo;else if(0<=a.commentMargin)for(ft.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+ot),Mt.move(ft),Mt=Mt.Sd();Mt.next();)Dt=Mt.value,Dt.fromSpot=As,Dt.toSpot=Yo;else for(ft.h(a.bounds.x+a.commentMargin-bt.width,a.bounds.y+ot),Mt.move(ft),Mt=Mt.Sd();Mt.next();)Dt=Mt.value,Dt.fromSpot=Yo,Dt.toSpot=As;ot=0<=a.commentSpacing?ot+(bt.height+a.commentSpacing):ot+(a.commentSpacing-bt.height)}else{if(135<b&&!z||!x&&rt)if(0<=a.commentMargin)for(ft.h(a.bounds.x+ot,a.bounds.y-a.commentMargin-bt.height),Mt.move(ft),Mt=Mt.Sd();Mt.next();)Dt=Mt.value,Dt.fromSpot=Bs,Dt.toSpot=Us;else for(ft.h(a.bounds.x+ot,a.bounds.y+2*a.focus.y-a.commentMargin),Mt.move(ft),Mt=Mt.Sd();Mt.next();)Dt=Mt.value,Dt.fromSpot=Us,Dt.toSpot=Bs;else if(0<=a.commentMargin)for(ft.h(a.bounds.x+ot,a.bounds.y+2*a.focus.y+a.commentMargin),Mt.move(ft),Mt=Mt.Sd();Mt.next();)Dt=Mt.value,Dt.fromSpot=Us,Dt.toSpot=Bs;else for(ft.h(a.bounds.x+ot,a.bounds.y+a.commentMargin-bt.height),Mt.move(ft),Mt=Mt.Sd();Mt.next();)Dt=Mt.value,Dt.fromSpot=Bs,Dt.toSpot=Us;ot=0<=a.commentSpacing?ot+(bt.width+a.commentSpacing):ot+(a.commentSpacing-bt.width)}}if(Qt.free(ft),y=ot-a.commentSpacing-(E?y.height:y.width),this.ud===oh)for(a=a.destinationEdges;a.next();)b=a.value.link,b===null||b.isAvoiding||(b.fromEndSegmentLength=0<y?y:NaN);else for(a=a.sourceEdges;a.next();)b=a.value.link,b===null||b.isAvoiding||(b.toEndSegmentLength=0<y?y:NaN)}},Ur.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,E=0;E<x;E++)this.layoutTree(y[E]);switch(a.compaction){case fm:dw(this,a);break;case Gp:if(a.alignment===lh)dw(this,a);else if(a.childrenCount===0)E=a.parent,x=!1,y=0,E!==null&&(y=E.angle,x=E.alignment,x=pd(x)),E=jv(a),a.S.h(0,0),a.Da.h(a.width,a.height),a.parent===null||a.comments===null||(y!==180&&y!==270||x)&&!E?a.la.h(0,0):y===180&&!x||(y===90||y===270)&&E?a.la.h(a.width-2*a.focus.x,0):a.la.h(0,a.height-2*a.focus.y),a.Yo=null,a.kp=null;else{var b=ju(a);y=b===90||b===270;var z=0,tt=a.children,rt=tt.length;for(x=0;x<rt;x++)E=tt[x],z=Math.max(z,y?E.Da.width:E.Da.height);var ot=a.alignment;E=ot===sh;var lt=ot===ah,ut=pd(ot),ft=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var yt=a.nodeSpacing,Mt=this.computeNodeIndent(a),bt=a.rowSpacing,Dt=0;(E||lt||a.hm||a.im&&a.maxGenerationCount===1)&&(Dt=Math.max(0,a.rowIndent)),E=a.width;var qt=a.height,Vt=0,oe=0,ce=0,ge=null,Se=null,Re=0,qn=0,gi=0,ui=0,Qn=0,pn=0,ar=0,Ji=0;if(ut&&!Hp(ot)&&135<b&&tt.reverse(),Hp(ot))if(1<rt)for(var to=0;to<rt;to++)to%2===0&&to!==rt-1&&(Ji=Math.max(Ji,y?tt[to].Da.width:tt[to].Da.height));else rt===1&&(Ji=y?tt[0].Da.width:tt[0].Da.height);if(ut){switch(ot){case Fc:oe=135>b?fw(this,a,tt,Ji,Vt,oe):gw(this,a,tt,Ji,Vt,oe),Ji=oe.x,Vt=oe.width,oe=oe.height;break;case Ec:for(ge=0;ge<rt;ge++)Se=tt[ge],ft=Se.Da,ce=pn===0?0:bt,y?(Se.S.h(z-ft.width,ui+ce),Vt=Math.max(Vt,ft.width),oe=Math.max(oe,ui+ce+ft.height),ui+=ce+ft.height):(Se.S.h(gi+ce,z-ft.height),Vt=Math.max(Vt,gi+ce+ft.width),oe=Math.max(oe,ft.height),gi+=ce+ft.width),pn++;break;case bh:for(ge=0;ge<rt;ge++)Se=tt[ge],z=Se.Da,ft=pn===0?0:bt,y?(Se.S.h(yt/2+a.focus.x,ui+ft),Vt=Math.max(Vt,z.width),oe=Math.max(oe,ui+ft+z.height),ui+=ft+z.height):(Se.S.h(gi+ft,yt/2+a.focus.y),Vt=Math.max(Vt,gi+ft+z.width),oe=Math.max(oe,z.height),gi+=ft+z.width),pn++}ge=Bl(this,2),Se=Bl(this,2),y?(ge[0].h(0,0),ge[1].h(0,oe),Se[0].h(Vt,0)):(ge[0].h(0,0),ge[1].h(Vt,0),Se[0].h(0,oe)),Se[1].h(Vt,oe)}else for(to=0;to<rt;to++){var So=tt[to],Js=So.Da;if(y){0<ft&&0<pn&&gi+yt+Js.width>ft&&(gi<z&&rf(a,ot,z-gi,0,ar,to-1),Qn++,pn=0,ar=to,ce=oe,gi=0,ui=135<b?-oe-bt:oe+bt),hm(this,So,0,ui);var ea=0;if(pn===0)ge=So.Yo,Se=So.kp,Re=Js.width,qn=Js.height,(ge===null||Se===null||b!==ju(So))&&(ge=Bl(this,2),Se=Bl(this,2),ge[0].h(0,0),ge[1].h(0,qn),Se[0].h(Re,0),Se[1].h(Re,qn));else{var za=rn();qn=pw(this,a,So,ge,Se,Re,qn,za),ea=qn.x,ge=za[0],Se=za[1],Re=qn.width,qn=qn.height,Ve(za),gi<Js.width&&0>ea&&(Wf(a,-ea,0,ar,to-1),cm(ge,-ea,0),cm(Se,-ea,0),ea=0)}So.S.h(ea,ui),Vt=Math.max(Vt,Re),oe=Math.max(oe,ce+(Qn===0?0:bt)+Js.height),gi=Re}else 0<ft&&0<pn&&ui+yt+Js.height>ft&&(ui<z&&rf(a,ot,0,z-ui,ar,to-1),Qn++,pn=0,ar=to,ce=Vt,ui=0,gi=135<b?-Vt-bt:Vt+bt),hm(this,So,gi,0),ea=0,pn===0?(ge=So.Yo,Se=So.kp,Re=Js.width,qn=Js.height,(ge===null||Se===null||b!==ju(So))&&(ge=Bl(this,2),Se=Bl(this,2),ge[0].h(0,0),ge[1].h(Re,0),Se[0].h(0,qn),Se[1].h(Re,qn))):(za=rn(),qn=pw(this,a,So,ge,Se,Re,qn,za),ea=qn.x,ge=za[0],Se=za[1],Re=qn.width,qn=qn.height,Ve(za),ui<Js.height&&0>ea&&(Wf(a,0,-ea,ar,to-1),cm(ge,0,-ea),cm(Se,0,-ea),ea=0)),So.S.h(gi,ea),oe=Math.max(oe,qn),Vt=Math.max(Vt,ce+(Qn===0?0:bt)+Js.width),ui=qn;pn++}switch(0<Qn&&(y?(oe+=Math.max(0,x),gi<Vt&&rf(a,ot,Vt-gi,0,ar,rt-1),0<Dt&&(lt||Wf(a,Dt,0,0,rt-1),Vt+=Dt)):(Vt+=Math.max(0,x),ui<oe&&rf(a,ot,0,oe-ui,ar,rt-1),0<Dt&&(lt||Wf(a,0,Dt,0,rt-1),oe+=Dt))),Dt=lt=0,ot){case Rg:y?lt+=Vt/2-a.focus.x-Mt/2:Dt+=oe/2-a.focus.y-Mt/2;break;case Xf:0<Qn?y?lt+=Vt/2-a.focus.x-Mt/2:Dt+=oe/2-a.focus.y-Mt/2:y?(Ji=tt[0].S.x+tt[0].la.x,lt+=Ji+(tt[rt-1].S.x+tt[rt-1].la.x+2*tt[rt-1].focus.x-Ji)/2-a.focus.x-Mt/2):(Ji=tt[0].S.y+tt[0].la.y,Dt+=Ji+(tt[rt-1].S.y+tt[rt-1].la.y+2*tt[rt-1].focus.y-Ji)/2-a.focus.y-Mt/2);break;case sh:y?(lt-=Mt,Vt+=Mt):(Dt-=Mt,oe+=Mt);break;case ah:y?(lt+=Vt-a.width+Mt,Vt+=Mt):(Dt+=oe-a.height+Mt,oe+=Mt);break;case Fc:y?1<rt?lt+=Ji+yt/2-a.focus.x:lt+=tt[0].focus.x-a.focus.x+tt[0].la.x:1<rt?Dt+=Ji+yt/2-a.focus.y:Dt+=tt[0].focus.y-a.focus.y+tt[0].la.y;break;case Ec:y?lt+=Vt+yt/2-a.focus.x:Dt+=oe+yt/2-a.focus.y;break;case bh:break;default:oe=this.customAlignment(a,lt,Dt,Vt,oe),lt=oe[0],Dt=oe[1],Vt=oe[2],oe=oe[3]}for(Mt=0;Mt<rt;Mt++)Ji=tt[Mt],y?Ji.S.h(Ji.S.x+Ji.la.x-lt,Ji.S.y+(135<b?(ut?-oe:-Ji.Da.height)+Ji.la.y-x:qt+x+Ji.la.y)):Ji.S.h(Ji.S.x+(135<b?(ut?-Vt:-Ji.Da.width)+Ji.la.x-x:E+x+Ji.la.x),Ji.S.y+Ji.la.y-Dt);if(rt=tt=0,ut?y?(Vt=Vv(a,Vt,lt),0>lt&&(lt=0),135<b&&(Dt+=oe+x),oe+=qt+x,ot===bh&&(tt+=yt/2+a.focus.x),rt+=qt+x):(135<b&&(lt+=Vt+x),Vt+=E+x,oe=Zv(a,oe,Dt),0>Dt&&(Dt=0),ot===bh&&(rt+=yt/2+a.focus.y),tt+=E+x):y?(a.comments===null?E>Vt&&(Vt=Wv(ot,E-Vt,0),tt=Vt.x,rt=Vt.y,Vt=E,lt=0):Vt=Vv(a,Vt,lt),0>lt&&(tt-=lt,lt=0),135<b&&(Dt+=oe+x),oe=Math.max(Math.max(oe,qt),oe+qt+x),rt+=qt+x):(135<b&&(lt+=Vt+x),Vt=Math.max(Math.max(Vt,E),Vt+E+x),a.comments===null?qt>oe&&(oe=Wv(ot,0,qt-oe),tt=oe.x,rt=oe.y,oe=qt,Dt=0):oe=Zv(a,oe,Dt),0>Dt&&(rt-=Dt,Dt=0),tt+=E+x),0<Qn)b=Bl(this,4),Qn=Bl(this,4),y?(b[2].h(0,qt+x),b[3].h(b[2].x,oe),Qn[2].h(Vt,b[2].y),Qn[3].h(Qn[2].x,b[3].y)):(b[2].h(E+x,0),b[3].h(Vt,b[2].y),Qn[2].h(b[2].x,oe),Qn[3].h(b[3].x,Qn[2].y));else{for(b=Bl(this,ge.length+2),Qn=Bl(this,Se.length+2),ot=0;ot<ge.length;ot++)ut=ge[ot],b[ot+2].h(ut.x+tt,ut.y+rt);for(ot=0;ot<Se.length;ot++)ut=Se[ot],Qn[ot+2].h(ut.x+tt,ut.y+rt)}y?(b[0].h(lt,0),b[1].h(b[0].x,qt),b[2].y<b[1].y&&(b[2].x>b[0].x?b[2].assign(b[1]):b[1].assign(b[2])),b[3].y<b[2].y&&(b[3].x>b[0].x?b[3].assign(b[2]):b[2].assign(b[3])),Qn[0].h(lt+E,0),Qn[1].h(Qn[0].x,qt),Qn[2].y<Qn[1].y&&(Qn[2].x<Qn[0].x?Qn[2].assign(Qn[1]):Qn[1].assign(Qn[2])),Qn[3].y<Qn[2].y&&(Qn[3].x<Qn[0].x?Qn[3].assign(Qn[2]):Qn[2].assign(Qn[3])),b[2].y-=x/2,Qn[2].y-=x/2):(b[0].h(0,Dt),b[1].h(E,b[0].y),b[2].x<b[1].x&&(b[2].y>b[0].y?b[2].assign(b[1]):b[1].assign(b[2])),b[3].x<b[2].x&&(b[3].y>b[0].y?b[3].assign(b[2]):b[2].assign(b[3])),Qn[0].h(0,Dt+qt),Qn[1].h(E,Qn[0].y),Qn[2].x<Qn[1].x&&(Qn[2].y<Qn[0].y?Qn[2].assign(Qn[1]):Qn[1].assign(Qn[2])),Qn[3].x<Qn[2].x&&(Qn[3].y<Qn[0].y?Qn[3].assign(Qn[2]):Qn[2].assign(Qn[3])),b[2].x-=x/2,Qn[2].x-=x/2),aA(this,ge),aA(this,Se),a.Yo=b,a.kp=Qn,a.la.h(lt,Dt),a.Da.h(Vt,oe)}break;default:le("Unhandled compaction value "+a.compaction.toString())}}};function dw(a,y){if(y.childrenCount===0){var x=!1,E=0;y.parent!==null&&(E=y.parent.angle,x=y.parent.alignment,x=pd(x));var b=jv(y);y.S.h(0,0),y.Da.h(y.width,y.height),y.parent===null||y.comments===null||(E!==180&&E!==270||x)&&!b?y.la.h(0,0):E===180&&!x||(E===90||E===270)&&b?y.la.h(y.width-2*y.focus.x,0):y.la.h(0,y.height-2*y.focus.y)}else{E=ju(y),x=E===90||E===270;var z=0;b=y.children;for(var tt=b.length,rt=0;rt<tt;rt++){var ot=b[rt];z=Math.max(z,x?ot.Da.width:ot.Da.height)}var lt=y.alignment,ut=lt===sh,ft=lt===ah;rt=pd(lt);var yt=Math.max(0,y.breadthLimit);ot=a.computeLayerSpacing(y);var Mt=y.nodeSpacing,bt=a.computeNodeIndent(y),Dt=ut||ft?0:bt/2,qt=y.rowSpacing,Vt=0;(ut||ft||y.hm||y.im&&y.maxGenerationCount===1)&&(Vt=Math.max(0,y.rowIndent)),ut=y.width;var oe=y.height,ce=0,ge=0,Se=0,Re=0,qn=0,gi=0,ui=0,Qn=0,pn=0,ar=0;if(rt&&!Hp(lt)&&135<E&&b.reverse(),Hp(lt))if(1<tt)for(var Ji=0;Ji<tt;Ji++){var to=b[Ji],So=to.Da;Ji%2===0&&Ji!==tt-1?pn=Math.max(pn,(x?So.width:So.height)+a.computeBusNodeSpacing(to)-Mt):Ji%2!==0&&(ar=Math.max(ar,(x?So.width:So.height)+a.computeBusNodeSpacing(to)-Mt))}else tt===1&&(pn=x?b[0].Da.width:b[0].Da.height);if(rt)switch(lt){case Fc:case lh:ge=135>E?fw(a,y,b,pn,ce,ge):gw(a,y,b,pn,ce,ge),pn=ge.x,ce=ge.width,ge=ge.height;break;case Ec:for(yt=0;yt<tt;yt++)Dt=b[yt],Se=Dt.Da,ar=ui===0?0:qt,x?(Dt.S.h(z-Se.width,qn+ar),ce=Math.max(ce,Se.width),ge=Math.max(ge,qn+ar+Se.height),qn+=ar+Se.height):(Dt.S.h(Re+ar,z-Se.height),ce=Math.max(ce,Re+ar+Se.width),ge=Math.max(ge,Se.height),Re+=ar+Se.width),ui++;break;case bh:for(z=0;z<tt;z++)yt=b[z],Dt=yt.Da,Se=ui===0?0:qt,x?(yt.S.h(Mt/2+y.focus.x,qn+Se),ce=Math.max(ce,Dt.width),ge=Math.max(ge,qn+Se+Dt.height),qn+=Se+Dt.height):(yt.S.h(Re+Se,Mt/2+y.focus.y),ce=Math.max(ce,Re+Se+Dt.width),ge=Math.max(ge,Dt.height),Re+=Se+Dt.width),ui++}else for(ar=0;ar<tt;ar++)Ji=b[ar],to=Ji.Da,x?(0<yt&&0<ui&&Re+Mt+to.width>yt&&(Re<z&&rf(y,lt,z-Re,0,Qn,ar-1),gi++,ui=0,Qn=ar,Se=ge,Re=0,qn=135<E?-ge-qt:ge+qt),So=ui===0?Dt:Mt,hm(a,Ji,0,qn),Ji.S.h(Re+So,qn),ce=Math.max(ce,Re+So+to.width),ge=Math.max(ge,Se+(gi===0?0:qt)+to.height),Re+=So+to.width):(0<yt&&0<ui&&qn+Mt+to.height>yt&&(qn<z&&rf(y,lt,0,z-qn,Qn,ar-1),gi++,ui=0,Qn=ar,Se=ce,qn=0,Re=135<E?-ce-qt:ce+qt),So=ui===0?Dt:Mt,hm(a,Ji,Re,0),Ji.S.h(Re,qn+So),ge=Math.max(ge,qn+So+to.height),ce=Math.max(ce,Se+(gi===0?0:qt)+to.width),qn+=So+to.height),ui++;switch(0<gi&&(x?(ge+=Math.max(0,ot),Re<ce&&rf(y,lt,ce-Re,0,Qn,tt-1),0<Vt&&(ft||Wf(y,Vt,0,0,tt-1),ce+=Vt)):(ce+=Math.max(0,ot),qn<ge&&rf(y,lt,0,ge-qn,Qn,tt-1),0<Vt&&(ft||Wf(y,0,Vt,0,tt-1),ge+=Vt))),Vt=ft=0,lt){case Rg:x?ft+=ce/2-y.focus.x-bt/2:Vt+=ge/2-y.focus.y-bt/2;break;case Xf:0<gi?x?ft+=ce/2-y.focus.x-bt/2:Vt+=ge/2-y.focus.y-bt/2:x?(a=b[0].S.x+b[0].la.x,ft+=a+(b[tt-1].S.x+b[tt-1].la.x+2*b[tt-1].focus.x-a)/2-y.focus.x-bt/2):(a=b[0].S.y+b[0].la.y,Vt+=a+(b[tt-1].S.y+b[tt-1].la.y+2*b[tt-1].focus.y-a)/2-y.focus.y-bt/2);break;case sh:x?(ft-=bt,ce+=bt):(Vt-=bt,ge+=bt);break;case ah:x?(ft+=ce-y.width+bt,ce+=bt):(Vt+=ge-y.height+bt,ge+=bt);break;case Fc:case lh:x?1<tt?ft+=pn+Mt/2-y.focus.x:ft+=b[0].focus.x-y.focus.x+b[0].la.x:1<tt?Vt+=pn+Mt/2-y.focus.y:Vt+=b[0].focus.y-y.focus.y+b[0].la.y;break;case Ec:x?ft+=ce+Mt/2-y.focus.x:Vt+=ge+Mt/2-y.focus.y;break;case bh:break;default:a=a.customAlignment(y,ft,Vt,ce,ge),ft=a[0],Vt=a[1],ce=a[2],ge=a[3]}for(a=0;a<tt;a++)bt=b[a],x?bt.S.h(bt.S.x+bt.la.x-ft,bt.S.y+(135<E?(rt?-ge:-bt.Da.height)+bt.la.y-ot:oe+ot+bt.la.y)):bt.S.h(bt.S.x+(135<E?(rt?-ce:-bt.Da.width)+bt.la.x-ot:ut+ot+bt.la.x),bt.S.y+bt.la.y-Vt);x?(ce=Vv(y,ce,ft),0>ft&&(ft=0),135<E&&(Vt+=ge+ot),ge=Math.max(Math.max(ge,oe),ge+oe+ot)):(135<E&&(ft+=ce+ot),ce=Math.max(Math.max(ce,ut),ce+ut+ot),ge=Zv(y,ge,Vt),0>Vt&&(Vt=0)),y.la.h(ft,Vt),y.Da.h(ce,ge)}}Ur.prototype.customAlignment=function(a,y,x,E,b){return[y,x,E,b]};function fw(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new Ue(E,0,b,z);if(tt===1)return y=x[0],b=y.Da.width,z=y.Da.height,new Ue(E,0,b,z);for(var rt=y.nodeSpacing,ot=y.rowSpacing,lt=ju(y)===90,ut=0,ft=0,yt=0,Mt=0;Mt<tt;Mt++)if(!(Mt%2!==0||1<tt&&Mt===tt-1)){var bt=x[Mt],Dt=bt.Da,qt=ut===0?0:ot;if(lt){var Vt=a.computeBusNodeSpacing(bt)-rt;bt.S.h(E-(Dt.width+Vt),yt+qt),b=Math.max(b,Dt.width+Vt),z=Math.max(z,yt+qt+Dt.height),yt+=qt+Dt.height}else Vt=a.computeBusNodeSpacing(bt)-rt,bt.S.h(ft+qt,E-(Dt.height+Vt)),z=Math.max(z,Dt.height+Vt),b=Math.max(b,ft+qt+Dt.width),ft+=qt+Dt.width;ut++}for(ut=0,bt=ft,Mt=yt,lt?(ft=E+rt,yt=0):(ft=0,yt=E+rt),Dt=0;Dt<tt;Dt++)if(Dt%2!==0){qt=x[Dt],Vt=qt.Da;var oe=ut===0?0:ot;if(lt){var ce=a.computeBusNodeSpacing(qt)-rt;qt.S.h(ft+ce,yt+oe),b=Math.max(b,ft+Vt.width+ce),z=Math.max(z,yt+oe+Vt.height),yt+=oe+Vt.height}else ce=a.computeBusNodeSpacing(qt)-rt,qt.S.h(ft+oe,yt+ce),b=Math.max(b,ft+oe+Vt.width),z=Math.max(z,yt+Vt.height+ce),ft+=oe+Vt.width;ut++}return 1<tt&&tt%2===1&&(x=x[tt-1],tt=x.Da,a=a.computeBusLastRowSpacing(x,lt?Math.max(Math.abs(Mt),Math.abs(yt)):Math.max(Math.abs(bt),Math.abs(ft))),lt?(x.S.h(E+rt/2-x.focus.x-x.la.x,z+a),lt=E+rt/2-x.focus.x-x.la.x,b=Math.max(b,lt+tt.width),0>lt&&(b-=lt),z=Math.max(z,Math.max(Mt,yt)+a+tt.height),0>x.S.x&&(E=Am(y,x.S.x,!1,E,rt))):(x.S.h(b+a,E+rt/2-x.focus.y-x.la.y),b=Math.max(b,Math.max(bt,ft)+a+tt.width),yt=E+rt/2-x.focus.y-x.la.y,z=Math.max(z,yt+tt.height),0>yt&&(z-=yt),0>x.S.y&&(E=Am(y,x.S.y,!0,E,rt)))),new Ue(E,0,b,z)}function gw(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new Ue(E,0,b,z);if(tt===1)return x=x[0],b=x.Da.width,z=x.Da.height,new Ue(E,0,b,z);for(var rt=y.nodeSpacing,ot=y.rowSpacing,lt=ju(y)===270,ut=0,ft=0,yt=0,Mt=0;Mt<tt;Mt++)if(!(Mt%2!==0||1<tt&&Mt===tt-1)){var bt=x[Mt],Dt=bt.Da,qt=ut===0?0:ot;if(lt){var Vt=a.computeBusNodeSpacing(bt)-rt;yt-=qt+Dt.height,bt.S.h(E-(Dt.width+Vt),yt),b=Math.max(b,Dt.width+Vt),z=Math.max(z,Math.abs(yt))}else Vt=a.computeBusNodeSpacing(bt)-rt,ft-=qt+Dt.width,bt.S.h(ft,E-(Dt.height+Vt)),z=Math.max(z,Dt.height+Vt),b=Math.max(b,Math.abs(ft));ut++}for(ut=0,bt=ft,Mt=yt,lt?(ft=E+rt,yt=0):(ft=0,yt=E+rt),Dt=0;Dt<tt;Dt++)if(Dt%2!==0){qt=x[Dt],Vt=qt.Da;var oe=ut===0?0:ot;if(lt){var ce=a.computeBusNodeSpacing(qt)-rt;yt-=oe+Vt.height,qt.S.h(ft+ce,yt),b=Math.max(b,ft+Vt.width+ce),z=Math.max(z,Math.abs(yt))}else ce=a.computeBusNodeSpacing(qt)-rt,ft-=oe+Vt.width,qt.S.h(ft,yt+ce),z=Math.max(z,yt+Vt.height+ce),b=Math.max(b,Math.abs(ft));ut++}for(1<tt&&tt%2===1&&(ot=x[tt-1],ut=ot.Da,a=a.computeBusLastRowSpacing(ot,lt?Math.max(Math.abs(Mt),Math.abs(yt)):Math.max(Math.abs(bt),Math.abs(ft))),lt?(ot.S.h(E+rt/2-ot.focus.x-ot.la.x,-z-ut.height-a),ft=E+rt/2-ot.focus.x-ot.la.x,b=Math.max(b,ft+ut.width),0>ft&&(b-=ft),z=Math.max(z,Math.abs(Math.min(Mt,yt))+a+ut.height),0>ot.S.x&&(E=Am(y,ot.S.x,!1,E,rt))):(ot.S.h(-b-ut.width-a,E+rt/2-ot.focus.y-ot.la.y),b=Math.max(b,Math.abs(Math.min(bt,ft))+a+ut.width),yt=E+rt/2-ot.focus.y-ot.la.y,z=Math.max(z,yt+ut.height),0>yt&&(z-=yt),0>ot.S.y&&(E=Am(y,ot.S.y,!0,E,rt)))),y=0;y<tt;y++)rt=x[y],lt?rt.S.h(rt.S.x,rt.S.y+z):rt.S.h(rt.S.x+b,rt.S.y);return new Ue(E,0,b,z)}Ur.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Ur.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function Am(a,y,x,E,b){a=a.children;for(var z=a.length,tt=0;tt<z;tt++)x?a[tt].S.h(a[tt].S.x,a[tt].S.y-y):a[tt].S.h(a[tt].S.x-y,a[tt].S.y);return y=a[z-1],Math.max(E,x?y.la.y+y.focus.y-b/2:y.la.x+y.focus.x-b/2)}function Vv(a,y,x){switch(a.alignment){case Xf:case Rg:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case sh:return a.width>y?a.width:y;case ah:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Fc:case lh:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case Ec:return a.width-a.focus.x+a.nodeSpacing/2+y;case bh:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Zv(a,y,x){switch(a.alignment){case Xf:case Rg:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case sh:return a.height>y?a.height:y;case ah:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Fc:case lh:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case Ec:return a.height-a.focus.y+a.nodeSpacing/2+y;case bh:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Wv(a,y,x){switch(a){case Rg:y/=2,x/=2;break;case Xf:y/=2,x/=2;break;case sh:x=y=0;break;case ah:break;default:le("Unhandled alignment value "+a.toString())}return new Qt(y,x)}function rf(a,y,x,E,b,z){y=Wv(y,x,E),Wf(a,y.x,y.y,b,z)}function Wf(a,y,x,E,b){if(y!==0||x!==0)for(a=a.children;E<=b;E++){var z=a[E].S;z.x+=y,z.y+=x}}function hm(a,y,x,E){var b=y.parent;switch(a.ud){case oh:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===b&&y.relativePoint.h(x,E);break;case Yf:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===b&&y.relativePoint.h(x,E);break;default:le("Unhandled path value "+a.ud.toString())}}function cm(a,y,x){for(var E=0;E<a.length;E++){var b=a[E];b.x+=y,b.y+=x}}function pw(a,y,x,E,b,z,tt,rt){var ot=ju(y),lt=ot===90||ot===270,ut=y.nodeSpacing;y=E;var ft=b;E=z;var yt=tt,Mt=x.Yo,bt=x.kp;tt=x.Da;var Dt=lt?Math.max(yt,tt.height):Math.max(E,tt.width);if((Mt===null||ot!==ju(x))&&(Mt=Bl(a,2),bt=Bl(a,2),lt?(Mt[0].h(0,0),Mt[1].h(0,tt.height),bt[0].h(tt.width,0),bt[1].h(bt[0].x,Mt[1].y)):(Mt[0].h(0,0),Mt[1].h(tt.width,0),bt[0].h(0,tt.height),bt[1].h(Mt[1].x,bt[0].y))),lt){if(yt=9999999,!(ft===null||2>ft.length||Mt===null||2>Mt.length))for(b=x=0;x<ft.length&&b<Mt.length;){z=ft[x];var qt=Mt[b];ot=qt.x,lt=qt.y,ot+=E;var Vt=z;x+1<ft.length&&(Vt=ft[x+1]);var oe=qt;qt=oe.x,oe=oe.y,b+1<Mt.length&&(oe=Mt[b+1],qt=oe.x,oe=oe.y,qt+=E);var ce=yt;z.y===lt?ce=ot-z.x:z.y>lt&&z.y<oe?ce=ot+(z.y-lt)/(oe-lt)*(qt-ot)-z.x:lt>z.y&&lt<Vt.y&&(ce=ot-(z.x+(lt-z.y)/(Vt.y-z.y)*(Vt.x-z.x))),ce<yt&&(yt=ce),Vt.y<=z.y?x++:oe<=lt?b++:(Vt.y<=oe&&x++,oe<=Vt.y&&b++)}if(yt=E-yt,yt+=ut,x=Mt,b=yt,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ut=Bl(a,y.length+x.length),E=z=ot=0;z<x.length&&x[z].y<y[0].y;)lt=x[z++],ut[E++].h(lt.x+b,lt.y);for(;ot<y.length;)lt=y[ot++],ut[E++].h(lt.x,lt.y);for(ot=y[y.length-1].y;z<x.length&&x[z].y<=ot;)z++;for(;z<x.length&&x[z].y>ot;)lt=x[z++],ut[E++].h(lt.x+b,lt.y);for(x=Bl(a,E),ot=0;ot<E;ot++)x[ot].assign(ut[ot]);aA(a,ut),E=x}if(z=bt,ot=yt,ft===null||2>ft.length||z===null||2>z.length)b=null;else{for(ut=Bl(a,ft.length+z.length),b=lt=x=0;x<ft.length&&ft[x].y<z[0].y;)Vt=ft[x++],ut[b++].h(Vt.x,Vt.y);for(;lt<z.length;)Vt=z[lt++],ut[b++].h(Vt.x+ot,Vt.y);for(z=z[z.length-1].y;x<ft.length&&ft[x].y<=z;)x++;for(;x<ft.length&&ft[x].y>z;)ot=ft[x++],ut[b++].h(ot.x,ot.y);for(z=Bl(a,b),x=0;x<b;x++)z[x].assign(ut[x]);aA(a,ut),b=z}return z=Math.max(0,yt)+tt.width,tt=Dt,aA(a,y),aA(a,Mt),aA(a,ft),aA(a,bt),rt[0]=E,rt[1]=b,new Ue(yt,0,z,tt)}if(E=9999999,!(ft===null||2>ft.length||Mt===null||2>Mt.length))for(b=x=0;x<ft.length&&b<Mt.length;)z=ft[x],qt=Mt[b],ot=qt.x,lt=qt.y,lt+=yt,Vt=z,x+1<ft.length&&(Vt=ft[x+1]),oe=qt,qt=oe.x,oe=oe.y,b+1<Mt.length&&(oe=Mt[b+1],qt=oe.x,oe=oe.y,oe+=yt),ce=E,z.x===ot?ce=lt-z.y:z.x>ot&&z.x<qt?ce=lt+(z.x-ot)/(qt-ot)*(oe-lt)-z.y:ot>z.x&&ot<Vt.x&&(ce=lt-(z.y+(ot-z.x)/(Vt.x-z.x)*(Vt.y-z.y))),ce<E&&(E=ce),Vt.x<=z.x?x++:qt<=ot?b++:(Vt.x<=qt&&x++,qt<=Vt.x&&b++);if(yt-=E,yt+=ut,x=Mt,b=yt,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ut=Bl(a,y.length+x.length),E=z=ot=0;z<x.length&&x[z].x<y[0].x;)lt=x[z++],ut[E++].h(lt.x,lt.y+b);for(;ot<y.length;)lt=y[ot++],ut[E++].h(lt.x,lt.y);for(ot=y[y.length-1].x;z<x.length&&x[z].x<=ot;)z++;for(;z<x.length&&x[z].x>ot;)lt=x[z++],ut[E++].h(lt.x,lt.y+b);for(x=Bl(a,E),ot=0;ot<E;ot++)x[ot].assign(ut[ot]);aA(a,ut),E=x}if(z=bt,ot=yt,ft===null||2>ft.length||z===null||2>z.length)b=null;else{for(ut=Bl(a,ft.length+z.length),b=lt=x=0;x<ft.length&&ft[x].x<z[0].x;)Vt=ft[x++],ut[b++].h(Vt.x,Vt.y);for(;lt<z.length;)Vt=z[lt++],ut[b++].h(Vt.x,Vt.y+ot);for(z=z[z.length-1].x;x<ft.length&&ft[x].x<=z;)x++;for(;x<ft.length&&ft[x].x>z;)ot=ft[x++],ut[b++].h(ot.x,ot.y);for(z=Bl(a,b),x=0;x<b;x++)z[x].assign(ut[x]);aA(a,ut),b=z}return z=Dt,tt=Math.max(0,yt)+tt.height,aA(a,y),aA(a,Mt),aA(a,ft),aA(a,bt),rt[0]=E,rt[1]=b,new Ue(yt,0,z,tt)}function Bl(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 Qt;return a}function aA(a,y){var x=y.length,E=a.ru[x];E===void 0&&(E=[],a.ru[x]=E),E.push(y)}Ur.prototype.arrangeTrees=function(){if(this.Rb===mm)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof xu){var x=y.node;if(x!==null){var E=x.position;x=E.x,E=E.y,isFinite(x)||(x=0),isFinite(E)||(E=0),Yv(this,y,x,E)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof xu&&a.push(x);switch(this.sorting){case Hg:break;case Rp:a.reverse();break;case _p:a.sort(this.comparer);break;case Kp:a.sort(this.comparer),a.reverse();break;default:le("Unhandled sorting value "+this.sorting.toString())}for(x=this.arrangementOrigin,y=x.x,x=x.y,E=0;E<a.length;E++){var b=a[E];switch(Yv(this,b,y+b.la.x,x+b.la.y),this.Rb){case pm:x+=b.Da.height+this.$d.height;break;case $v:y+=b.Da.width+this.$d.width;break;default:le("Unhandled arrangement value "+this.Rb.toString())}}}};function Yv(a,y,x,E){if(y!==null){y.x=x,y.y=E,y=y.children;for(var b=y.length,z=0;z<b;z++){var tt=y[z];Yv(a,tt,x+tt.S.x,E+tt.S.y)}}}Ur.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Ur.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Ur.prototype.Gu=function(){if(this.layerStyle===vm){for(var a=this.$v,y=[],x=null,E=this.network.vertexes.iterator;E.next();){var b=E.value;x===null?x=b.bounds.copy():x.ed(b.bounds);var z=y[b.level];z===void 0?z=this.computeLayerSpacing(b):z=Math.max(z,this.computeLayerSpacing(b)),y[b.level]=z}for(E=0;E<y.length;E++)y[E]===void 0&&(y[E]=0);if(this.angle===90||this.angle===270?(x.Bc(this.nodeSpacing/2,this.layerSpacing),E=new Qt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),E=new Qt(-this.layerSpacing/2,-this.nodeSpacing/2)),b=[],x=this.angle===90||this.angle===270?x.width:x.height,z=0,this.angle===180||this.angle===270)for(var tt=0;tt<a.length;tt++)z+=a[tt]+y[tt];for(tt=0;tt<a.length;tt++){var rt=a[tt]+y[tt];this.angle===270?(z-=rt,b.push(new Ue(0,z,x,rt))):this.angle===90?(b.push(new Ue(0,z,x,rt)),z+=rt):this.angle===180?(z-=rt,b.push(new Ue(z,0,rt,x))):(b.push(new Ue(z,0,rt,x)),z+=rt)}this.commitLayers(b,E)}},Ur.prototype.commitLayers=function(){},Ur.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Ur.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof xu&&mw(this,y)}};function mw(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,E=0;E<x;E++)mw(a,y[E])}}Ur.prototype.setPortSpots=function(a){var y=a.alignment;if(pd(y)){var x=this.ud===oh,E=ju(a);switch(E){case 0:var b=As;break;case 90:b=Us;break;case 180:b=Yo;break;default:b=Bs}var z=a.children,tt=z.length;switch(y){case Fc:case lh:for(y=0;y<tt;y++){var rt=z[y];if(rt=(x?rt.sourceEdges:rt.destinationEdges).first(),rt!==null&&(rt=rt.link,rt!==null)){var ot=E===90||E===270?Yo:Bs;if(tt===1||y===tt-1&&tt%2===1)switch(E){case 0:ot=Yo;break;case 90:ot=Bs;break;case 180:ot=As;break;default:ot=Us}else y%2===0&&(ot=E===90||E===270?As:Us);x?(a.setsPortSpot&&(rt.fromSpot=b),a.setsChildPortSpot&&(rt.toSpot=ot)):(a.setsPortSpot&&(rt.fromSpot=ot),a.setsChildPortSpot&&(rt.toSpot=b))}}break;case Ec:for(E=E===90||E===270?As:Us,z=x?a.destinationEdges:a.sourceEdges;z.next();)tt=z.value.link,tt!==null&&(x?(a.setsPortSpot&&(tt.fromSpot=b),a.setsChildPortSpot&&(tt.toSpot=E)):(a.setsPortSpot&&(tt.fromSpot=E),a.setsChildPortSpot&&(tt.toSpot=b)));break;case bh:for(E=E===90||E===270?Yo:Bs,z=x?a.destinationEdges:a.sourceEdges;z.next();)tt=z.value.link,tt!==null&&(x?(a.setsPortSpot&&(tt.fromSpot=b),a.setsChildPortSpot&&(tt.toSpot=E)):(a.setsPortSpot&&(tt.fromSpot=E),a.setsChildPortSpot&&(tt.toSpot=b)))}}else if(x=ju(a),this.ud===oh){for(b=a.destinationEdges;b.next();)if(E=b.value.link,E!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:E.fromSpot=As;break;case 90:E.fromSpot=Us;break;case 180:E.fromSpot=Yo;break;default:E.fromSpot=Bs}else E.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.toSpot=Yo;break;case 90:E.toSpot=Bs;break;case 180:E.toSpot=As;break;default:E.toSpot=Us}else E.toSpot=a.childPortSpot}}else for(b=a.sourceEdges;b.next();)if(E=b.value.link,E!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:E.toSpot=As;break;case 90:E.toSpot=Us;break;case 180:E.toSpot=Yo;break;default:E.toSpot=Bs}else E.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.fromSpot=Yo;break;case 90:E.fromSpot=Bs;break;case 180:E.fromSpot=As;break;default:E.fromSpot=Us}else E.fromSpot=a.childPortSpot}};function ju(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}Ur.prototype.computeLayerSpacing=function(a){var y=ju(a);y=y===90||y===270;var x=a.layerSpacing;if(0<a.layerSpacingParentOverlap){var E=Math.min(1,a.layerSpacingParentOverlap);x-=y?a.height*E:a.width*E}return x<(y?-a.height:-a.width)&&(x=y?-a.height:-a.width),x},Ur.prototype.computeNodeIndent=function(a){var y=ju(a),x=a.nodeIndent;if(0<a.nodeIndentPastParent){var E=Math.min(1,a.nodeIndentPastParent);x+=y===90||y===270?a.width*E:a.height*E}return x=Math.max(0,x)},Sn.Object.defineProperties(Ur.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!==gm&&a!==Jv&&a!==Xv&&a!==qv||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==ty&&a!==ey&&a!==vm||(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!==pm&&a!==$v&&a!==mm||(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!==Hg&&a!==Rp&&a!==_p&&!Kp||(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()):le("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!==fm&&a!==Gp||(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!==Hg&&a!==Rp&&a!==_p&&!Kp||(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!==fm&&a!==Gp||(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 dm=new Oe(Ur,"PathDefault",-1),oh=new Oe(Ur,"PathDestination",0),Yf=new Oe(Ur,"PathSource",1),Hg=new Oe(Ur,"SortingForwards",10),Rp=new Oe(Ur,"SortingReverse",11),_p=new Oe(Ur,"SortingAscending",12),Kp=new Oe(Ur,"SortingDescending",13),Rg=new Oe(Ur,"AlignmentCenterSubtrees",20),Xf=new Oe(Ur,"AlignmentCenterChildren",21),sh=new Oe(Ur,"AlignmentStart",22),ah=new Oe(Ur,"AlignmentEnd",23),Fc=new Oe(Ur,"AlignmentBus",24),lh=new Oe(Ur,"AlignmentBusBranching",25),Ec=new Oe(Ur,"AlignmentTopLeftBus",26),bh=new Oe(Ur,"AlignmentBottomRightBus",27),fm=new Oe(Ur,"CompactionNone",30),Gp=new Oe(Ur,"CompactionBlock",31),gm=new Oe(Ur,"StyleLayered",40),Xv=new Oe(Ur,"StyleLastParents",41),Jv=new Oe(Ur,"StyleAlternating",42),qv=new Oe(Ur,"StyleRootOnly",43),pm=new Oe(Ur,"ArrangementVertical",50),$v=new Oe(Ur,"ArrangementHorizontal",51),mm=new Oe(Ur,"ArrangementFixedRoots",52),ty=new Oe(Ur,"LayerIndividual",60),ey=new Oe(Ur,"LayerSiblings",61),vm=new Oe(Ur,"LayerUniform",62);Ur.className="TreeLayout",Ur.PathDefault=dm,Ur.PathDestination=oh,Ur.PathSource=Yf,Ur.SortingForwards=Hg,Ur.SortingReverse=Rp,Ur.SortingAscending=_p,Ur.SortingDescending=Kp,Ur.AlignmentCenterSubtrees=Rg,Ur.AlignmentCenterChildren=Xf,Ur.AlignmentStart=sh,Ur.AlignmentEnd=ah,Ur.AlignmentBus=Fc,Ur.AlignmentBusBranching=lh,Ur.AlignmentTopLeftBus=Ec,Ur.AlignmentBottomRightBus=bh,Ur.CompactionNone=fm,Ur.CompactionBlock=Gp,Ur.StyleLayered=gm,Ur.StyleLastParents=Xv,Ur.StyleAlternating=Jv,Ur.StyleRootOnly=qv,Ur.ArrangementVertical=pm,Ur.ArrangementHorizontal=$v,Ur.ArrangementFixedRoots=mm,Ur.LayerIndividual=ty,Ur.LayerSiblings=ey,Ur.LayerUniform=vm;function Jf(a){Eo.call(this,a)}We(Jf,Eo),Jf.prototype.createVertex=function(){return new xu(this)},Jf.prototype.createEdge=function(){return new _g(this)},Jf.className="TreeNetwork";function xu(a){Gs.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 Qt(0,0),this.Da=new on(0,0),this.la=new Qt(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Hg,this.hd=xv,this.Kb=0,this.Jb=Xf,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Gp,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=es,this.wr=!0,this.Dp=es}We(xu,Gs),xu.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)},Sn.Object.defineProperties(xu.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)}}}),xu.className="TreeVertex";function _g(a){Ql.call(this,a),this.$t=new Qt(0,0)}We(_g,Ql),_g.prototype.commit=function(){var a=this.link;if(a!==null&&!a.isAvoiding){var y=this.network.layout,x=null,E=null;switch(y.ud){case oh:x=this.fromVertex,E=this.toVertex;break;case Yf:x=this.toVertex,E=this.fromVertex;break;default:le("Unhandled path value "+y.ud.toString())}if(x!==null&&E!==null){var b=this.$t;if(b.x!==0||b.y!==0||x.qA){E=x.bounds;var z=ju(x),tt=y.computeLayerSpacing(x),rt=x.rowSpacing;a.vg();var ot=a.curve===ql,lt=a.isOrthogonal,ut;if(a.uh(),lt||ot){for(ut=2;4<a.pointsCount;)a.pv(2);var ft=a.i(1),yt=a.i(2)}else{for(ut=1;3<a.pointsCount;)a.pv(1);ft=a.i(0),yt=a.i(a.pointsCount-1)}var Mt=a.i(a.pointsCount-1);z===0?(x.alignment===ah?(z=E.bottom+b.y,b.y===0&&ft.y>Mt.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===sh?(z=E.top+b.y,b.y===0&&ft.y<Mt.y-x.rowIndent&&(z=Math.max(z,Math.min(ft.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,ot?(a.m(ut,ft.x,z),ut++,a.m(ut,E.right+tt,z),ut++,a.m(ut,E.right+tt+(b.x-rt)/3,z),ut++,a.m(ut,E.right+tt+2*(b.x-rt)/3,z),ut++,a.m(ut,E.right+tt+(b.x-rt),z),ut++,a.m(ut,yt.x,z)):(lt&&(a.m(ut,E.right+tt/2,ft.y),ut++),a.m(ut,E.right+tt/2,z),ut++,a.m(ut,E.right+tt+b.x-(lt?rt/2:rt),z),ut++,lt&&a.m(ut,a.i(ut-1).x,yt.y))):z===90?(x.alignment===ah?(z=E.right+b.x,b.x===0&&ft.x>Mt.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===sh?(z=E.left+b.x,b.x===0&&ft.x<Mt.x-x.rowIndent&&(z=Math.max(z,Math.min(ft.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,ot?(a.m(ut,z,ft.y),ut++,a.m(ut,z,E.bottom+tt),ut++,a.m(ut,z,E.bottom+tt+(b.y-rt)/3),ut++,a.m(ut,z,E.bottom+tt+2*(b.y-rt)/3),ut++,a.m(ut,z,E.bottom+tt+(b.y-rt)),ut++,a.m(ut,z,yt.y)):(lt&&(a.m(ut,ft.x,E.bottom+tt/2),ut++),a.m(ut,z,E.bottom+tt/2),ut++,a.m(ut,z,E.bottom+tt+b.y-(lt?rt/2:rt)),ut++,lt&&a.m(ut,yt.x,a.i(ut-1).y))):z===180?(x.alignment===ah?(z=E.bottom+b.y,b.y===0&&ft.y>Mt.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===sh?(z=E.top+b.y,b.y===0&&ft.y<Mt.y-x.rowIndent&&(z=Math.max(z,Math.min(ft.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,ot?(a.m(ut,ft.x,z),ut++,a.m(ut,E.left-tt,z),ut++,a.m(ut,E.left-tt+(b.x+rt)/3,z),ut++,a.m(ut,E.left-tt+2*(b.x+rt)/3,z),ut++,a.m(ut,E.left-tt+(b.x+rt),z),ut++,a.m(ut,yt.x,z)):(lt&&(a.m(ut,E.left-tt/2,ft.y),ut++),a.m(ut,E.left-tt/2,z),ut++,a.m(ut,E.left-tt+b.x+(lt?rt/2:rt),z),ut++,lt&&a.m(ut,a.i(ut-1).x,yt.y))):z===270?(x.alignment===ah?(z=E.right+b.x,b.x===0&&ft.x>Mt.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===sh?(z=E.left+b.x,b.x===0&&ft.x<Mt.x-x.rowIndent&&(z=Math.max(z,Math.min(ft.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,ot?(a.m(ut,z,ft.y),ut++,a.m(ut,z,E.top-tt),ut++,a.m(ut,z,E.top-tt+(b.y+rt)/3),ut++,a.m(ut,z,E.top-tt+2*(b.y+rt)/3),ut++,a.m(ut,z,E.top-tt+(b.y+rt)),ut++,a.m(ut,z,yt.y)):(lt&&(a.m(ut,ft.x,E.top-tt/2),ut++),a.m(ut,z,E.top-tt/2),ut++,a.m(ut,z,E.top-tt+b.y+(lt?rt/2:rt)),ut++,lt&&a.m(ut,yt.x,a.i(ut-1).y))):le("Invalid angle "+z),a.zf()}else b=E,a=this.link,E=this.network.layout,y=ju(x),y!==ju(b)&&(tt=E.computeLayerSpacing(x),rt=x.bounds,x=b.bounds,y===0&&x.left-rt.right<tt+1||y===90&&x.top-rt.bottom<tt+1||y===180&&rt.left-x.right<tt+1||y===270&&rt.top-x.bottom<tt+1||(a.vg(),x=a.curve===ql,b=a.isOrthogonal,E=pd(this.fromVertex.alignment),a.uh(),y===0?(y=rt.right+tt/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y-20,a.i(1).y),a.m(2,y-20,x),a.m(3,y,x),a.m(4,y+20,x),a.L(5,a.i(5).x,x)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===90?(y=rt.bottom+tt/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y-20),a.m(2,x,y-20),a.m(3,x,y),a.m(4,x,y+20),a.L(5,x,a.i(5).y)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)):y===180?(y=rt.left-tt/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y+20,a.i(1).y),a.m(2,y+20,x),a.m(3,y,x),a.m(4,y-20,x),a.L(5,a.i(5).x,x)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===270&&(y=rt.top-tt/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y+20),a.m(2,x,y+20),a.m(3,x,y),a.m(4,x,y-20),a.L(5,x,a.i(5).y)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)),a.zf()))}}},Sn.Object.defineProperties(_g.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)}}}),_g.className="TreeEdge",Co.prototype.initializeStandardTools=function(){this.gb("Action",new jl,this.mouseDownTools),this.gb("Relinking",new pl,this.mouseDownTools),this.gb("LinkReshaping",new ps,this.mouseDownTools),this.gb("Rotating",new Na,this.mouseDownTools),this.gb("Resizing",new fa,this.mouseDownTools),this.gb("Linking",new da,this.mouseMoveTools),this.gb("Dragging",new Ho,this.mouseMoveTools),this.gb("DragSelecting",new bl,this.mouseMoveTools),this.gb("Panning",new aa,this.mouseMoveTools),this.gb("ContextMenu",new Da,this.mouseUpTools),this.gb("TextEditing",new Mo,this.mouseUpTools),this.gb("ClickCreating",new QA,this.mouseUpTools),this.gb("ClickSelecting",new gh,this.mouseUpTools)},FA("Horizontal",new To),FA("Spot",new hs),FA("Table",new Ma),FA("Viewbox",new Ks),FA("TableRow",new Dl),FA("TableColumn",new Jl),FA("Graduated",new PA),FA("Grid",new Ga),Gd.add("GraphLinksModel",ta),Gd.add("TreeModel",au);var ym=se.go,ny={get licenseKey(){return He.licenseKey},set licenseKey(a){He.licenseKey=a},get version(){return He.version},Group:lr,EnumValue:Oe,List:ne,Set:Fe,Map:be,Point:Qt,Size:on,Rect:Ue,Margin:sr,Spot:di,Geometry:bn,PathFigure:Cs,PathSegment:Vr,InputEvent:Ys,DiagramEvent:Wu,ChangedEvent:Qo,Model:Bi,GraphLinksModel:Kr,TreeModel:tl,Binding:Ls,Transaction:bs,UndoManager:Ko,CommandHandler:Jt,Tool:zr,DraggingTool:Ho,DraggingInfo:eA,DraggingOptions:st,LinkingBaseTool:ls,LinkingTool:da,RelinkingTool:pl,LinkReshapingTool:ps,ResizingTool:fa,RotatingTool:Na,ClickSelectingTool:gh,ActionTool:jl,ClickCreatingTool:QA,HTMLInfo:Mu,ContextMenuTool:Da,DragSelectingTool:bl,PanningTool:aa,TextEditingTool:Mo,ToolManager:Co,Animation:la,AnimationManager:al,AnimationTrigger:iu,Layer:Vs,Diagram:He,Palette:ct,Overview:pt,Brush:lo,GraphObject:Be,Panel:Bn,RowColumnDefinition:Ds,Shape:vr,TextBlock:Fo,Picture:cl,Part:Ti,Adornment:Jr,Node:ri,Link:Rn,Placeholder:Xa,Layout:zo,LayoutNetwork:Eo,LayoutVertex:Gs,LayoutEdge:Ql,GridLayout:Aa,PanelLayout:uo,CircularLayout:ts,CircularNetwork:Ug,CircularVertex:Np,CircularEdge:$0,ForceDirectedLayout:Ca,ForceDirectedNetwork:Zf,ForceDirectedVertex:Dp,ForceDirectedEdge:Ip,LayeredDigraphLayout:fo,LayeredDigraphNetwork:Og,LayeredDigraphVertex:uu,LayeredDigraphEdge:Op,TreeLayout:Ur,TreeNetwork:Jf,TreeVertex:xu,TreeEdge:_g};typeof ym=="object"&&ym.version&&On("WARNING: a `go` object on the root object is already defined. "+("Debug"in ym?"debug ":"")+"version: "+ym.version+", replaced with version: "+ny.version),He.prototype.go=ny,se.go=ny,typeof mn.exports=="object"&&(mn.exports=typeof Ut.g!="undefined"?Ut.g.go:self.go)}();var St=typeof Ut.g!="undefined"?Ut.g.go:self.go;const Xt=typeof Ut.g!="undefined"?Ut.g.go:self.go,Ae=Xt.Group,xe=Xt.EnumValue,fe=Xt.List,Rt=Xt.Set,ie=Xt.Map,ae=Xt.Point,de=Xt.Size,zt=Xt.Rect,Ie=Xt.Margin,Yt=Xt.Spot,Me=Xt.Geometry,It=Xt.PathFigure,nt=Xt.PathSegment,et=Xt.InputEvent,At=Xt.DiagramEvent,at=Xt.ChangedEvent,dt=Xt.Model,gt=Xt.GraphLinksModel,xt=Xt.TreeModel,kt=Xt.Binding,Ht=Xt.Transaction,Ot=Xt.UndoManager,Zt=Xt.CommandHandler,Wt=Xt.Tool,te=Xt.DraggingTool,we=Xt.DraggingInfo,pe=Xt.LinkingBaseTool,Ke=Xt.LinkingTool,_e=Xt.RelinkingTool,en=Xt.LinkReshapingTool,dn=Xt.ResizingTool,yn=Xt.RotatingTool,Nn=Xt.ClickSelectingTool,Kn=Xt.ActionTool,me=Xt.ClickCreatingTool,ee=Xt.HTMLInfo,gn=Xt.ContextMenuTool,$n=Xt.DragSelectingTool,Yn=Xt.PanningTool,nn=Xt.TextEditingTool,Tn=Xt.ToolManager,Gn=Xt.Animation,yi=Xt.AnimationManager,Je=Xt.AnimationTrigger,Le=Xt.Layer,tn=Xt.Diagram,ti=Xt.Palette,jn=Xt.Overview,Gt=Xt.Brush,Ft=Xt.GraphObject,mt=Xt.Panel,vt=Xt.RowColumnDefinition,Lt=Xt.Shape,Ct=Xt.TextBlock,_t=Xt.TextBlockMetrics,Pe=Xt.Picture,ze=Xt.Part,wn=Xt.Adornment,Ge=Xt.Node,Te=Xt.Link,Ze=Xt.Placeholder,hn=Xt.Layout,In=Xt.LayoutNetwork,si=Xt.LayoutVertex,Dn=Xt.LayoutEdge,Oi=Xt.GridLayout,ai=Xt.PanelLayout,Ai=Xt.CircularLayout,pi=Xt.CircularNetwork,ur=Xt.CircularVertex,Fi=Xt.CircularEdge,zi=Xt.ForceDirectedLayout,Xi=Xt.ForceDirectedNetwork,Lr=Xt.ForceDirectedVertex,wi=Xt.ForceDirectedEdge,Nr=Xt.LayeredDigraphLayout,Br=Xt.LayeredDigraphNetwork,jr=Xt.LayeredDigraphVertex,Wi=Xt.LayeredDigraphEdge,po=Xt.TreeLayout,mo=Xt.TreeNetwork,no=Xt.TreeVertex,ir=Xt.TreeEdge,so=Xt.version},64270:function(mn){(function(je,Ut){mn.exports=Ut()})(this,function(){"use strict";var je=function(Bt,wt){return je=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Et,Pt){Et.__proto__=Pt}||function(Et,Pt){for(var jt in Pt)Object.prototype.hasOwnProperty.call(Pt,jt)&&(Et[jt]=Pt[jt])},je(Bt,wt)};function Ut(Bt,wt){if(typeof wt!="function"&&wt!==null)throw new TypeError("Class extends value "+String(wt)+" is not a constructor or null");je(Bt,wt);function Et(){this.constructor=Bt}Bt.prototype=wt===null?Object.create(wt):(Et.prototype=wt.prototype,new Et)}var St=function(){return St=Object.assign||function(wt){for(var Et,Pt=1,jt=arguments.length;Pt<jt;Pt++){Et=arguments[Pt];for(var ue in Et)Object.prototype.hasOwnProperty.call(Et,ue)&&(wt[ue]=Et[ue])}return wt},St.apply(this,arguments)};function Xt(Bt,wt,Et,Pt){function jt(ue){return ue instanceof Et?ue:new Et(function(Ee){Ee(ue)})}return new(Et||(Et=Promise))(function(ue,Ee){function Ye(Un){try{En(Pt.next(Un))}catch(oi){Ee(oi)}}function Ne(Un){try{En(Pt.throw(Un))}catch(oi){Ee(oi)}}function En(Un){Un.done?ue(Un.value):jt(Un.value).then(Ye,Ne)}En((Pt=Pt.apply(Bt,wt||[])).next())})}function Ae(Bt,wt){var Et={label:0,sent:function(){if(ue[0]&1)throw ue[1];return ue[1]},trys:[],ops:[]},Pt,jt,ue,Ee;return Ee={next:Ye(0),throw:Ye(1),return:Ye(2)},typeof Symbol=="function"&&(Ee[Symbol.iterator]=function(){return this}),Ee;function Ye(En){return function(Un){return Ne([En,Un])}}function Ne(En){if(Pt)throw new TypeError("Generator is already executing.");for(;Et;)try{if(Pt=1,jt&&(ue=En[0]&2?jt.return:En[0]?jt.throw||((ue=jt.return)&&ue.call(jt),0):jt.next)&&!(ue=ue.call(jt,En[1])).done)return ue;switch(jt=0,ue&&(En=[En[0]&2,ue.value]),En[0]){case 0:case 1:ue=En;break;case 4:return Et.label++,{value:En[1],done:!1};case 5:Et.label++,jt=En[1],En=[0];continue;case 7:En=Et.ops.pop(),Et.trys.pop();continue;default:if(ue=Et.trys,!(ue=ue.length>0&&ue[ue.length-1])&&(En[0]===6||En[0]===2)){Et=0;continue}if(En[0]===3&&(!ue||En[1]>ue[0]&&En[1]<ue[3])){Et.label=En[1];break}if(En[0]===6&&Et.label<ue[1]){Et.label=ue[1],ue=En;break}if(ue&&Et.label<ue[2]){Et.label=ue[2],Et.ops.push(En);break}ue[2]&&Et.ops.pop(),Et.trys.pop();continue}En=wt.call(Bt,Et)}catch(Un){En=[6,Un],jt=0}finally{Pt=ue=0}if(En[0]&5)throw En[1];return{value:En[0]?En[1]:void 0,done:!0}}}function xe(Bt,wt,Et){if(Et||arguments.length===2)for(var Pt=0,jt=wt.length,ue;Pt<jt;Pt++)(ue||!(Pt in wt))&&(ue||(ue=Array.prototype.slice.call(wt,0,Pt)),ue[Pt]=wt[Pt]);return Bt.concat(ue||wt)}for(var fe=function(){function Bt(wt,Et,Pt,jt){this.left=wt,this.top=Et,this.width=Pt,this.height=jt}return Bt.prototype.add=function(wt,Et,Pt,jt){return new Bt(this.left+wt,this.top+Et,this.width+Pt,this.height+jt)},Bt.fromClientRect=function(wt,Et){return new Bt(Et.left+wt.windowBounds.left,Et.top+wt.windowBounds.top,Et.width,Et.height)},Bt.fromDOMRectList=function(wt,Et){var Pt=Array.from(Et).find(function(jt){return jt.width!==0});return Pt?new Bt(Pt.left+wt.windowBounds.left,Pt.top+wt.windowBounds.top,Pt.width,Pt.height):Bt.EMPTY},Bt.EMPTY=new Bt(0,0,0,0),Bt}(),Rt=function(Bt,wt){return fe.fromClientRect(Bt,wt.getBoundingClientRect())},ie=function(Bt){var wt=Bt.body,Et=Bt.documentElement;if(!wt||!Et)throw new Error("Unable to get document size");var Pt=Math.max(Math.max(wt.scrollWidth,Et.scrollWidth),Math.max(wt.offsetWidth,Et.offsetWidth),Math.max(wt.clientWidth,Et.clientWidth)),jt=Math.max(Math.max(wt.scrollHeight,Et.scrollHeight),Math.max(wt.offsetHeight,Et.offsetHeight),Math.max(wt.clientHeight,Et.clientHeight));return new fe(0,0,Pt,jt)},ae=function(Bt){for(var wt=[],Et=0,Pt=Bt.length;Et<Pt;){var jt=Bt.charCodeAt(Et++);if(jt>=55296&&jt<=56319&&Et<Pt){var ue=Bt.charCodeAt(Et++);(ue&64512)===56320?wt.push(((jt&1023)<<10)+(ue&1023)+65536):(wt.push(jt),Et--)}else wt.push(jt)}return wt},de=function(){for(var Bt=[],wt=0;wt<arguments.length;wt++)Bt[wt]=arguments[wt];if(String.fromCodePoint)return String.fromCodePoint.apply(String,Bt);var Et=Bt.length;if(!Et)return"";for(var Pt=[],jt=-1,ue="";++jt<Et;){var Ee=Bt[jt];Ee<=65535?Pt.push(Ee):(Ee-=65536,Pt.push((Ee>>10)+55296,Ee%1024+56320)),(jt+1===Et||Pt.length>16384)&&(ue+=String.fromCharCode.apply(String,Pt),Pt.length=0)}return ue},zt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ie=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Yt=0;Yt<zt.length;Yt++)Ie[zt.charCodeAt(Yt)]=Yt;for(var Me="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",It=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),nt=0;nt<Me.length;nt++)It[Me.charCodeAt(nt)]=nt;for(var et=function(Bt){var wt=Bt.length*.75,Et=Bt.length,Pt,jt=0,ue,Ee,Ye,Ne;Bt[Bt.length-1]==="="&&(wt--,Bt[Bt.length-2]==="="&&wt--);var En=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(wt):new Array(wt),Un=Array.isArray(En)?En:new Uint8Array(En);for(Pt=0;Pt<Et;Pt+=4)ue=It[Bt.charCodeAt(Pt)],Ee=It[Bt.charCodeAt(Pt+1)],Ye=It[Bt.charCodeAt(Pt+2)],Ne=It[Bt.charCodeAt(Pt+3)],Un[jt++]=ue<<2|Ee>>4,Un[jt++]=(Ee&15)<<4|Ye>>2,Un[jt++]=(Ye&3)<<6|Ne&63;return En},At=function(Bt){for(var wt=Bt.length,Et=[],Pt=0;Pt<wt;Pt+=2)Et.push(Bt[Pt+1]<<8|Bt[Pt]);return Et},at=function(Bt){for(var wt=Bt.length,Et=[],Pt=0;Pt<wt;Pt+=4)Et.push(Bt[Pt+3]<<24|Bt[Pt+2]<<16|Bt[Pt+1]<<8|Bt[Pt]);return Et},dt=5,gt=11,xt=2,kt=gt-dt,Ht=65536>>dt,Ot=1<<dt,Zt=Ot-1,Wt=1024>>dt,te=Ht+Wt,we=te,pe=32,Ke=we+pe,_e=65536>>gt,en=1<<kt,dn=en-1,yn=function(Bt,wt,Et){return Bt.slice?Bt.slice(wt,Et):new Uint16Array(Array.prototype.slice.call(Bt,wt,Et))},Nn=function(Bt,wt,Et){return Bt.slice?Bt.slice(wt,Et):new Uint32Array(Array.prototype.slice.call(Bt,wt,Et))},Kn=function(Bt,wt){var Et=et(Bt),Pt=Array.isArray(Et)?at(Et):new Uint32Array(Et),jt=Array.isArray(Et)?At(Et):new Uint16Array(Et),ue=24,Ee=yn(jt,ue/2,Pt[4]/2),Ye=Pt[5]===2?yn(jt,(ue+Pt[4])/2):Nn(Pt,Math.ceil((ue+Pt[4])/4));return new me(Pt[0],Pt[1],Pt[2],Pt[3],Ee,Ye)},me=function(){function Bt(wt,Et,Pt,jt,ue,Ee){this.initialValue=wt,this.errorValue=Et,this.highStart=Pt,this.highValueIndex=jt,this.index=ue,this.data=Ee}return Bt.prototype.get=function(wt){var Et;if(wt>=0){if(wt<55296||wt>56319&&wt<=65535)return Et=this.index[wt>>dt],Et=(Et<<xt)+(wt&Zt),this.data[Et];if(wt<=65535)return Et=this.index[Ht+(wt-55296>>dt)],Et=(Et<<xt)+(wt&Zt),this.data[Et];if(wt<this.highStart)return Et=Ke-_e+(wt>>gt),Et=this.index[Et],Et+=wt>>dt&dn,Et=this.index[Et],Et=(Et<<xt)+(wt&Zt),this.data[Et];if(wt<=1114111)return this.data[this.highValueIndex]}return this.errorValue},Bt}(),ee="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gn=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),$n=0;$n<ee.length;$n++)gn[ee.charCodeAt($n)]=$n;var Yn="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",nn=50,Tn=1,Gn=2,yi=3,Je=4,Le=5,tn=7,ti=8,jn=9,Gt=10,Ft=11,mt=12,vt=13,Lt=14,Ct=15,_t=16,Pe=17,ze=18,wn=19,Ge=20,Te=21,Ze=22,hn=23,In=24,si=25,Dn=26,Oi=27,ai=28,Ai=29,pi=30,ur=31,Fi=32,zi=33,Xi=34,Lr=35,wi=36,Nr=37,Br=38,jr=39,Wi=40,po=41,mo=42,no=43,ir=[9001,65288],so="!",Tt="\xD7",Pr="\xF7",Zi=Kn(Yn),xi=[pi,wi],Hi=[Tn,Gn,yi,Le],ji=[Gt,ti],tr=[Oi,Dn],qr=Hi.concat(ji),un=[Br,jr,Wi,Xi,Lr],ln=[Ct,vt],We=function(Bt,wt){wt===void 0&&(wt="strict");var Et=[],Pt=[],jt=[];return Bt.forEach(function(ue,Ee){var Ye=Zi.get(ue);if(Ye>nn?(jt.push(!0),Ye-=nn):jt.push(!1),["normal","auto","loose"].indexOf(wt)!==-1&&[8208,8211,12316,12448].indexOf(ue)!==-1)return Pt.push(Ee),Et.push(_t);if(Ye===Je||Ye===Ft){if(Ee===0)return Pt.push(Ee),Et.push(pi);var Ne=Et[Ee-1];return qr.indexOf(Ne)===-1?(Pt.push(Pt[Ee-1]),Et.push(Ne)):(Pt.push(Ee),Et.push(pi))}if(Pt.push(Ee),Ye===ur)return Et.push(wt==="strict"?Te:Nr);if(Ye===mo||Ye===Ai)return Et.push(pi);if(Ye===no)return ue>=131072&&ue<=196605||ue>=196608&&ue<=262141?Et.push(Nr):Et.push(pi);Et.push(Ye)}),[Pt,Et,jt]},Sn=function(Bt,wt,Et,Pt){var jt=Pt[Et];if(Array.isArray(Bt)?Bt.indexOf(jt)!==-1:Bt===jt)for(var ue=Et;ue<=Pt.length;){ue++;var Ee=Pt[ue];if(Ee===wt)return!0;if(Ee!==Gt)break}if(jt===Gt)for(var ue=Et;ue>0;){ue--;var Ye=Pt[ue];if(Array.isArray(Bt)?Bt.indexOf(Ye)!==-1:Bt===Ye)for(var Ne=Et;Ne<=Pt.length;){Ne++;var Ee=Pt[Ne];if(Ee===wt)return!0;if(Ee!==Gt)break}if(Ye!==Gt)break}return!1},Ki=function(Bt,wt){for(var Et=Bt;Et>=0;){var Pt=wt[Et];if(Pt===Gt)Et--;else return Pt}return 0},Li=function(Bt,wt,Et,Pt,jt){if(Et[Pt]===0)return Tt;var ue=Pt-1;if(Array.isArray(jt)&&jt[ue]===!0)return Tt;var Ee=ue-1,Ye=ue+1,Ne=wt[ue],En=Ee>=0?wt[Ee]:0,Un=wt[Ye];if(Ne===Gn&&Un===yi)return Tt;if(Hi.indexOf(Ne)!==-1)return so;if(Hi.indexOf(Un)!==-1||ji.indexOf(Un)!==-1)return Tt;if(Ki(ue,wt)===ti)return Pr;if(Zi.get(Bt[ue])===Ft||(Ne===Fi||Ne===zi)&&Zi.get(Bt[Ye])===Ft||Ne===tn||Un===tn||Ne===jn||[Gt,vt,Ct].indexOf(Ne)===-1&&Un===jn||[Pe,ze,wn,In,ai].indexOf(Un)!==-1||Ki(ue,wt)===Ze||Sn(hn,Ze,ue,wt)||Sn([Pe,ze],Te,ue,wt)||Sn(mt,mt,ue,wt))return Tt;if(Ne===Gt)return Pr;if(Ne===hn||Un===hn)return Tt;if(Un===_t||Ne===_t)return Pr;if([vt,Ct,Te].indexOf(Un)!==-1||Ne===Lt||En===wi&&ln.indexOf(Ne)!==-1||Ne===ai&&Un===wi||Un===Ge||xi.indexOf(Un)!==-1&&Ne===si||xi.indexOf(Ne)!==-1&&Un===si||Ne===Oi&&[Nr,Fi,zi].indexOf(Un)!==-1||[Nr,Fi,zi].indexOf(Ne)!==-1&&Un===Dn||xi.indexOf(Ne)!==-1&&tr.indexOf(Un)!==-1||tr.indexOf(Ne)!==-1&&xi.indexOf(Un)!==-1||[Oi,Dn].indexOf(Ne)!==-1&&(Un===si||[Ze,Ct].indexOf(Un)!==-1&&wt[Ye+1]===si)||[Ze,Ct].indexOf(Ne)!==-1&&Un===si||Ne===si&&[si,ai,In].indexOf(Un)!==-1)return Tt;if([si,ai,In,Pe,ze].indexOf(Un)!==-1)for(var oi=ue;oi>=0;){var bi=wt[oi];if(bi===si)return Tt;if([ai,In].indexOf(bi)!==-1)oi--;else break}if([Oi,Dn].indexOf(Un)!==-1)for(var oi=[Pe,ze].indexOf(Ne)!==-1?Ee:ue;oi>=0;){var bi=wt[oi];if(bi===si)return Tt;if([ai,In].indexOf(bi)!==-1)oi--;else break}if(Br===Ne&&[Br,jr,Xi,Lr].indexOf(Un)!==-1||[jr,Xi].indexOf(Ne)!==-1&&[jr,Wi].indexOf(Un)!==-1||[Wi,Lr].indexOf(Ne)!==-1&&Un===Wi||un.indexOf(Ne)!==-1&&[Ge,Dn].indexOf(Un)!==-1||un.indexOf(Un)!==-1&&Ne===Oi||xi.indexOf(Ne)!==-1&&xi.indexOf(Un)!==-1||Ne===In&&xi.indexOf(Un)!==-1||xi.concat(si).indexOf(Ne)!==-1&&Un===Ze&&ir.indexOf(Bt[Ye])===-1||xi.concat(si).indexOf(Un)!==-1&&Ne===ze)return Tt;if(Ne===po&&Un===po){for(var Hr=Et[ue],cr=1;Hr>0&&(Hr--,wt[Hr]===po);)cr++;if(cr%2!==0)return Tt}return Ne===Fi&&Un===zi?Tt:Pr},dr=function(Bt,wt){wt||(wt={lineBreak:"normal",wordBreak:"normal"});var Et=We(Bt,wt.lineBreak),Pt=Et[0],jt=Et[1],ue=Et[2];(wt.wordBreak==="break-all"||wt.wordBreak==="break-word")&&(jt=jt.map(function(Ye){return[si,pi,mo].indexOf(Ye)!==-1?Nr:Ye}));var Ee=wt.wordBreak==="keep-all"?ue.map(function(Ye,Ne){return Ye&&Bt[Ne]>=19968&&Bt[Ne]<=40959}):void 0;return[Pt,jt,Ee]},se=function(){function Bt(wt,Et,Pt,jt){this.codePoints=wt,this.required=Et===so,this.start=Pt,this.end=jt}return Bt.prototype.slice=function(){return de.apply(void 0,this.codePoints.slice(this.start,this.end))},Bt}(),Mn=function(Bt,wt){var Et=ae(Bt),Pt=dr(Et,wt),jt=Pt[0],ue=Pt[1],Ee=Pt[2],Ye=Et.length,Ne=0,En=0;return{next:function(){if(En>=Ye)return{done:!0,value:null};for(var Un=Tt;En<Ye&&(Un=Li(Et,ue,jt,++En,Ee))===Tt;);if(Un!==Tt||En===Ye){var oi=new se(Et,Un,Ne,En);return Ne=En,{value:oi,done:!1}}return{done:!0,value:null}}}},Di=1,pr=2,Vn=4,le=8,De=10,Xn=47,On=92,qe=9,ei=32,fi=34,ki=61,Vi=35,rn=36,Ve=37,fn=39,mi=40,Pi=41,Pn=95,ni=45,Gi=33,er=60,Or=62,Oe=64,Ui=91,hr=93,Si=61,Qr=123,xr=63,Ri=125,qi=124,re=126,he=128,ne=65533,Xe=42,Fe=43,an=44,Jn=58,ii=59,Mi=46,hi=0,Zn=8,ci=11,ke=14,An=31,be=127,Qt=-1,ye=48,_n=97,li=101,Wn=102,Hn=117,cn=122,kn=65,Ln=69,Qe=70,sn=85,vn=90,Cn=function(Bt){return Bt>=ye&&Bt<=57},zn=function(Bt){return Bt>=55296&&Bt<=57343},on=function(Bt){return Cn(Bt)||Bt>=kn&&Bt<=Qe||Bt>=_n&&Bt<=Wn},Ei=function(Bt){return Bt>=_n&&Bt<=cn},Ii=function(Bt){return Bt>=kn&&Bt<=vn},nr=function(Bt){return Ei(Bt)||Ii(Bt)},Ni=function(Bt){return Bt>=he},Mr=function(Bt){return Bt===De||Bt===qe||Bt===ei},yr=function(Bt){return nr(Bt)||Ni(Bt)||Bt===Pn},Zr=function(Bt){return yr(Bt)||Cn(Bt)||Bt===ni},Dr=function(Bt){return Bt>=hi&&Bt<=Zn||Bt===ci||Bt>=ke&&Bt<=An||Bt===be},Gr=function(Bt,wt){return Bt!==On?!1:wt!==De},$r=function(Bt,wt,Et){return Bt===ni?yr(wt)||Gr(wt,Et):yr(Bt)?!0:!!(Bt===On&&Gr(Bt,wt))},Ue=function(Bt,wt,Et){return Bt===Fe||Bt===ni?Cn(wt)?!0:wt===Mi&&Cn(Et):Cn(Bt===Mi?wt:Bt)},Fr=function(Bt){var wt=0,Et=1;(Bt[wt]===Fe||Bt[wt]===ni)&&(Bt[wt]===ni&&(Et=-1),wt++);for(var Pt=[];Cn(Bt[wt]);)Pt.push(Bt[wt++]);var jt=Pt.length?parseInt(de.apply(void 0,Pt),10):0;Bt[wt]===Mi&&wt++;for(var ue=[];Cn(Bt[wt]);)ue.push(Bt[wt++]);var Ee=ue.length,Ye=Ee?parseInt(de.apply(void 0,ue),10):0;(Bt[wt]===Ln||Bt[wt]===li)&&wt++;var Ne=1;(Bt[wt]===Fe||Bt[wt]===ni)&&(Bt[wt]===ni&&(Ne=-1),wt++);for(var En=[];Cn(Bt[wt]);)En.push(Bt[wt++]);var Un=En.length?parseInt(de.apply(void 0,En),10):0;return Et*(jt+Ye*Math.pow(10,-Ee))*Math.pow(10,Ne*Un)},Er={type:2},fr={type:3},$i={type:4},Rr={type:13},ro={type:8},eo={type:21},kr={type:9},Ao={type:10},$o={type:11},Zs={type:12},ka={type:14},zs={type:23},sr={type:1},os={type:25},ns={type:24},js={type:26},us={type:27},ys={type:28},di={type:29},Ar={type:31},br={type:32},Xr=function(){function Bt(){this._value=[]}return Bt.prototype.write=function(wt){this._value=this._value.concat(ae(wt))},Bt.prototype.read=function(){for(var wt=[],Et=this.consumeToken();Et!==br;)wt.push(Et),Et=this.consumeToken();return wt},Bt.prototype.consumeToken=function(){var wt=this.consumeCodePoint();switch(wt){case fi:return this.consumeStringToken(fi);case Vi:var Et=this.peekCodePoint(0),Pt=this.peekCodePoint(1),jt=this.peekCodePoint(2);if(Zr(Et)||Gr(Pt,jt)){var ue=$r(Et,Pt,jt)?pr:Di,Ee=this.consumeName();return{type:5,value:Ee,flags:ue}}break;case rn:if(this.peekCodePoint(0)===ki)return this.consumeCodePoint(),Rr;break;case fn:return this.consumeStringToken(fn);case mi:return Er;case Pi:return fr;case Xe:if(this.peekCodePoint(0)===ki)return this.consumeCodePoint(),ka;break;case Fe:if(Ue(wt,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(wt),this.consumeNumericToken();break;case an:return $i;case ni:var Ye=wt,Ne=this.peekCodePoint(0),En=this.peekCodePoint(1);if(Ue(Ye,Ne,En))return this.reconsumeCodePoint(wt),this.consumeNumericToken();if($r(Ye,Ne,En))return this.reconsumeCodePoint(wt),this.consumeIdentLikeToken();if(Ne===ni&&En===Or)return this.consumeCodePoint(),this.consumeCodePoint(),ns;break;case Mi:if(Ue(wt,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(wt),this.consumeNumericToken();break;case Xn:if(this.peekCodePoint(0)===Xe)for(this.consumeCodePoint();;){var Un=this.consumeCodePoint();if(Un===Xe&&(Un=this.consumeCodePoint(),Un===Xn))return this.consumeToken();if(Un===Qt)return this.consumeToken()}break;case Jn:return js;case ii:return us;case er:if(this.peekCodePoint(0)===Gi&&this.peekCodePoint(1)===ni&&this.peekCodePoint(2)===ni)return this.consumeCodePoint(),this.consumeCodePoint(),os;break;case Oe:var oi=this.peekCodePoint(0),bi=this.peekCodePoint(1),Hr=this.peekCodePoint(2);if($r(oi,bi,Hr)){var Ee=this.consumeName();return{type:7,value:Ee}}break;case Ui:return ys;case On:if(Gr(wt,this.peekCodePoint(0)))return this.reconsumeCodePoint(wt),this.consumeIdentLikeToken();break;case hr:return di;case Si:if(this.peekCodePoint(0)===ki)return this.consumeCodePoint(),ro;break;case Qr:return $o;case Ri:return Zs;case Hn:case sn:var cr=this.peekCodePoint(0),Cr=this.peekCodePoint(1);return cr===Fe&&(on(Cr)||Cr===xr)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(wt),this.consumeIdentLikeToken();case qi:if(this.peekCodePoint(0)===ki)return this.consumeCodePoint(),kr;if(this.peekCodePoint(0)===qi)return this.consumeCodePoint(),eo;break;case re:if(this.peekCodePoint(0)===ki)return this.consumeCodePoint(),Ao;break;case Qt:return br}return Mr(wt)?(this.consumeWhiteSpace(),Ar):Cn(wt)?(this.reconsumeCodePoint(wt),this.consumeNumericToken()):yr(wt)?(this.reconsumeCodePoint(wt),this.consumeIdentLikeToken()):{type:6,value:de(wt)}},Bt.prototype.consumeCodePoint=function(){var wt=this._value.shift();return typeof wt=="undefined"?-1:wt},Bt.prototype.reconsumeCodePoint=function(wt){this._value.unshift(wt)},Bt.prototype.peekCodePoint=function(wt){return wt>=this._value.length?-1:this._value[wt]},Bt.prototype.consumeUnicodeRangeToken=function(){for(var wt=[],Et=this.consumeCodePoint();on(Et)&&wt.length<6;)wt.push(Et),Et=this.consumeCodePoint();for(var Pt=!1;Et===xr&&wt.length<6;)wt.push(Et),Et=this.consumeCodePoint(),Pt=!0;if(Pt){var jt=parseInt(de.apply(void 0,wt.map(function(Ne){return Ne===xr?ye:Ne})),16),ue=parseInt(de.apply(void 0,wt.map(function(Ne){return Ne===xr?Qe:Ne})),16);return{type:30,start:jt,end:ue}}var Ee=parseInt(de.apply(void 0,wt),16);if(this.peekCodePoint(0)===ni&&on(this.peekCodePoint(1))){this.consumeCodePoint(),Et=this.consumeCodePoint();for(var Ye=[];on(Et)&&Ye.length<6;)Ye.push(Et),Et=this.consumeCodePoint();var ue=parseInt(de.apply(void 0,Ye),16);return{type:30,start:Ee,end:ue}}else return{type:30,start:Ee,end:Ee}},Bt.prototype.consumeIdentLikeToken=function(){var wt=this.consumeName();return wt.toLowerCase()==="url"&&this.peekCodePoint(0)===mi?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===mi?(this.consumeCodePoint(),{type:19,value:wt}):{type:20,value:wt}},Bt.prototype.consumeUrlToken=function(){var wt=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Qt)return{type:22,value:""};var Et=this.peekCodePoint(0);if(Et===fn||Et===fi){var Pt=this.consumeStringToken(this.consumeCodePoint());return Pt.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Qt||this.peekCodePoint(0)===Pi)?(this.consumeCodePoint(),{type:22,value:Pt.value}):(this.consumeBadUrlRemnants(),zs)}for(;;){var jt=this.consumeCodePoint();if(jt===Qt||jt===Pi)return{type:22,value:de.apply(void 0,wt)};if(Mr(jt))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Qt||this.peekCodePoint(0)===Pi?(this.consumeCodePoint(),{type:22,value:de.apply(void 0,wt)}):(this.consumeBadUrlRemnants(),zs);if(jt===fi||jt===fn||jt===mi||Dr(jt))return this.consumeBadUrlRemnants(),zs;if(jt===On)if(Gr(jt,this.peekCodePoint(0)))wt.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),zs;else wt.push(jt)}},Bt.prototype.consumeWhiteSpace=function(){for(;Mr(this.peekCodePoint(0));)this.consumeCodePoint()},Bt.prototype.consumeBadUrlRemnants=function(){for(;;){var wt=this.consumeCodePoint();if(wt===Pi||wt===Qt)return;Gr(wt,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},Bt.prototype.consumeStringSlice=function(wt){for(var Et=5e4,Pt="";wt>0;){var jt=Math.min(Et,wt);Pt+=de.apply(void 0,this._value.splice(0,jt)),wt-=jt}return this._value.shift(),Pt},Bt.prototype.consumeStringToken=function(wt){var Et="",Pt=0;do{var jt=this._value[Pt];if(jt===Qt||jt===void 0||jt===wt)return Et+=this.consumeStringSlice(Pt),{type:0,value:Et};if(jt===De)return this._value.splice(0,Pt),sr;if(jt===On){var ue=this._value[Pt+1];ue!==Qt&&ue!==void 0&&(ue===De?(Et+=this.consumeStringSlice(Pt),Pt=-1,this._value.shift()):Gr(jt,ue)&&(Et+=this.consumeStringSlice(Pt),Et+=de(this.consumeEscapedCodePoint()),Pt=-1))}Pt++}while(!0)},Bt.prototype.consumeNumber=function(){var wt=[],Et=Vn,Pt=this.peekCodePoint(0);for((Pt===Fe||Pt===ni)&&wt.push(this.consumeCodePoint());Cn(this.peekCodePoint(0));)wt.push(this.consumeCodePoint());Pt=this.peekCodePoint(0);var jt=this.peekCodePoint(1);if(Pt===Mi&&Cn(jt))for(wt.push(this.consumeCodePoint(),this.consumeCodePoint()),Et=le;Cn(this.peekCodePoint(0));)wt.push(this.consumeCodePoint());Pt=this.peekCodePoint(0),jt=this.peekCodePoint(1);var ue=this.peekCodePoint(2);if((Pt===Ln||Pt===li)&&((jt===Fe||jt===ni)&&Cn(ue)||Cn(jt)))for(wt.push(this.consumeCodePoint(),this.consumeCodePoint()),Et=le;Cn(this.peekCodePoint(0));)wt.push(this.consumeCodePoint());return[Fr(wt),Et]},Bt.prototype.consumeNumericToken=function(){var wt=this.consumeNumber(),Et=wt[0],Pt=wt[1],jt=this.peekCodePoint(0),ue=this.peekCodePoint(1),Ee=this.peekCodePoint(2);if($r(jt,ue,Ee)){var Ye=this.consumeName();return{type:15,number:Et,flags:Pt,unit:Ye}}return jt===Ve?(this.consumeCodePoint(),{type:16,number:Et,flags:Pt}):{type:17,number:Et,flags:Pt}},Bt.prototype.consumeEscapedCodePoint=function(){var wt=this.consumeCodePoint();if(on(wt)){for(var Et=de(wt);on(this.peekCodePoint(0))&&Et.length<6;)Et+=de(this.consumeCodePoint());Mr(this.peekCodePoint(0))&&this.consumeCodePoint();var Pt=parseInt(Et,16);return Pt===0||zn(Pt)||Pt>1114111?ne:Pt}return wt===Qt?ne:wt},Bt.prototype.consumeName=function(){for(var wt="";;){var Et=this.consumeCodePoint();if(Zr(Et))wt+=de(Et);else if(Gr(Et,this.peekCodePoint(0)))wt+=de(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(Et),wt}},Bt}(),io=function(){function Bt(wt){this._tokens=wt}return Bt.create=function(wt){var Et=new Xr;return Et.write(wt),new Bt(Et.read())},Bt.parseValue=function(wt){return Bt.create(wt).parseComponentValue()},Bt.parseValues=function(wt){return Bt.create(wt).parseComponentValues()},Bt.prototype.parseComponentValue=function(){for(var wt=this.consumeToken();wt.type===31;)wt=this.consumeToken();if(wt.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(wt);var Et=this.consumeComponentValue();do wt=this.consumeToken();while(wt.type===31);if(wt.type===32)return Et;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},Bt.prototype.parseComponentValues=function(){for(var wt=[];;){var Et=this.consumeComponentValue();if(Et.type===32)return wt;wt.push(Et),wt.push()}},Bt.prototype.consumeComponentValue=function(){var wt=this.consumeToken();switch(wt.type){case 11:case 28:case 2:return this.consumeSimpleBlock(wt.type);case 19:return this.consumeFunction(wt)}return wt},Bt.prototype.consumeSimpleBlock=function(wt){for(var Et={type:wt,values:[]},Pt=this.consumeToken();;){if(Pt.type===32||Lo(Pt,wt))return Et;this.reconsumeToken(Pt),Et.values.push(this.consumeComponentValue()),Pt=this.consumeToken()}},Bt.prototype.consumeFunction=function(wt){for(var Et={name:wt.value,values:[],type:18};;){var Pt=this.consumeToken();if(Pt.type===32||Pt.type===3)return Et;this.reconsumeToken(Pt),Et.values.push(this.consumeComponentValue())}},Bt.prototype.consumeToken=function(){var wt=this._tokens.shift();return typeof wt=="undefined"?br:wt},Bt.prototype.reconsumeToken=function(wt){this._tokens.unshift(wt)},Bt}(),yo=function(Bt){return Bt.type===15},rr=function(Bt){return Bt.type===17},Bo=function(Bt){return Bt.type===20},Qi=function(Bt){return Bt.type===0},Tr=function(Bt,wt){return Bo(Bt)&&Bt.value===wt},gr=function(Bt){return Bt.type!==31},Wo=function(Bt){return Bt.type!==31&&Bt.type!==4},is=function(Bt){var wt=[],Et=[];return Bt.forEach(function(Pt){if(Pt.type===4){if(Et.length===0)throw new Error("Error parsing function args, zero tokens for arg");wt.push(Et),Et=[];return}Pt.type!==31&&Et.push(Pt)}),Et.length&&wt.push(Et),wt},Lo=function(Bt,wt){return wt===11&&Bt.type===12||wt===28&&Bt.type===29?!0:wt===2&&Bt.type===3},Ss=function(Bt){return Bt.type===17||Bt.type===15},jo=function(Bt){return Bt.type===16||Ss(Bt)},Pa=function(Bt){return Bt.length>1?[Bt[0],Bt[1]]:[Bt[0]]},Io={type:17,number:0,flags:Vn},rl={type:16,number:50,flags:Vn},bo={type:16,number:100,flags:Vn},ma=function(Bt,wt,Et){var Pt=Bt[0],jt=Bt[1];return[_o(Pt,wt),_o(typeof jt!="undefined"?jt:Pt,Et)]},_o=function(Bt,wt){if(Bt.type===16)return Bt.number/100*wt;if(yo(Bt))switch(Bt.unit){case"rem":case"em":return 16*Bt.number;case"px":default:return Bt.number}return Bt.number},Ns="deg",Ws="grad",hu="rad",Ll="turn",es={name:"angle",parse:function(Bt,wt){if(wt.type===15)switch(wt.unit){case Ns:return Math.PI*wt.number/180;case Ws:return Math.PI/200*wt.number;case hu:return wt.number;case Ll:return Math.PI*2*wt.number}throw new Error("Unsupported angle type")}},Ml=function(Bt){return Bt.type===15&&(Bt.unit===Ns||Bt.unit===Ws||Bt.unit===hu||Bt.unit===Ll)},ca=function(Bt){var wt=Bt.filter(Bo).map(function(Et){return Et.value}).join(" ");switch(wt){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Io,Io];case"to top":case"bottom":return ds(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Io,bo];case"to right":case"left":return ds(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[bo,bo];case"to bottom":case"top":return ds(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[bo,Io];case"to left":case"right":return ds(270)}return 0},ds=function(Bt){return Math.PI*Bt/180},Oa={name:"color",parse:function(Bt,wt){if(wt.type===18){var Et=Uo[wt.name];if(typeof Et=="undefined")throw new Error('Attempting to parse an unsupported color function "'+wt.name+'"');return Et(Bt,wt.values)}if(wt.type===5){if(wt.value.length===3){var Pt=wt.value.substring(0,1),jt=wt.value.substring(1,2),ue=wt.value.substring(2,3);return As(parseInt(Pt+Pt,16),parseInt(jt+jt,16),parseInt(ue+ue,16),1)}if(wt.value.length===4){var Pt=wt.value.substring(0,1),jt=wt.value.substring(1,2),ue=wt.value.substring(2,3),Ee=wt.value.substring(3,4);return As(parseInt(Pt+Pt,16),parseInt(jt+jt,16),parseInt(ue+ue,16),parseInt(Ee+Ee,16)/255)}if(wt.value.length===6){var Pt=wt.value.substring(0,2),jt=wt.value.substring(2,4),ue=wt.value.substring(4,6);return As(parseInt(Pt,16),parseInt(jt,16),parseInt(ue,16),1)}if(wt.value.length===8){var Pt=wt.value.substring(0,2),jt=wt.value.substring(2,4),ue=wt.value.substring(4,6),Ee=wt.value.substring(6,8);return As(parseInt(Pt,16),parseInt(jt,16),parseInt(ue,16),parseInt(Ee,16)/255)}}if(wt.type===20){var Ye=fs[wt.value.toUpperCase()];if(typeof Ye!="undefined")return Ye}return fs.TRANSPARENT}},Bs=function(Bt){return(255&Bt)===0},Yo=function(Bt){var wt=255&Bt,Et=255&Bt>>8,Pt=255&Bt>>16,jt=255&Bt>>24;return wt<255?"rgba("+jt+","+Pt+","+Et+","+wt/255+")":"rgb("+jt+","+Pt+","+Et+")"},As=function(Bt,wt,Et,Pt){return(Bt<<24|wt<<16|Et<<8|Math.round(Pt*255)<<0)>>>0},Us=function(Bt,wt){if(Bt.type===17)return Bt.number;if(Bt.type===16){var Et=wt===3?1:255;return wt===3?Bt.number/100*Et:Math.round(Bt.number/100*Et)}return 0},cu=function(Bt,wt){var Et=wt.filter(Wo);if(Et.length===3){var Pt=Et.map(Us),jt=Pt[0],ue=Pt[1],Ee=Pt[2];return As(jt,ue,Ee,1)}if(Et.length===4){var Ye=Et.map(Us),jt=Ye[0],ue=Ye[1],Ee=Ye[2],Ne=Ye[3];return As(jt,ue,Ee,Ne)}return 0};function va(Bt,wt,Et){return Et<0&&(Et+=1),Et>=1&&(Et-=1),Et<1/6?(wt-Bt)*Et*6+Bt:Et<1/2?wt:Et<2/3?(wt-Bt)*6*(2/3-Et)+Bt:Bt}var Vo=function(Bt,wt){var Et=wt.filter(Wo),Pt=Et[0],jt=Et[1],ue=Et[2],Ee=Et[3],Ye=(Pt.type===17?ds(Pt.number):es.parse(Bt,Pt))/(Math.PI*2),Ne=jo(jt)?jt.number/100:0,En=jo(ue)?ue.number/100:0,Un=typeof Ee!="undefined"&&jo(Ee)?_o(Ee,1):1;if(Ne===0)return As(En*255,En*255,En*255,1);var oi=En<=.5?En*(Ne+1):En+Ne-En*Ne,bi=En*2-oi,Hr=va(bi,oi,Ye+1/3),cr=va(bi,oi,Ye),Cr=va(bi,oi,Ye-1/3);return As(Hr*255,cr*255,Cr*255,Un)},Uo={hsl:Vo,hsla:Vo,rgb:cu,rgba:cu},wo=function(Bt,wt){return Oa.parse(Bt,io.create(wt).parseComponentValue())},fs={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Yi={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(Bt,wt){return wt.map(function(Et){if(Bo(Et))switch(Et.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},na={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Ce=function(Bt,wt){var Et=Oa.parse(Bt,wt[0]),Pt=wt[1];return Pt&&jo(Pt)?{color:Et,stop:Pt}:{color:Et,stop:null}},bn=function(Bt,wt){var Et=Bt[0],Pt=Bt[Bt.length-1];Et.stop===null&&(Et.stop=Io),Pt.stop===null&&(Pt.stop=bo);for(var jt=[],ue=0,Ee=0;Ee<Bt.length;Ee++){var Ye=Bt[Ee].stop;if(Ye!==null){var Ne=_o(Ye,wt);Ne>ue?jt.push(Ne):jt.push(ue),ue=Ne}else jt.push(null)}for(var En=null,Ee=0;Ee<jt.length;Ee++){var Un=jt[Ee];if(Un===null)En===null&&(En=Ee);else if(En!==null){for(var oi=Ee-En,bi=jt[En-1],Hr=(Un-bi)/(oi+1),cr=1;cr<=oi;cr++)jt[En+cr-1]=Hr*cr;En=null}}return Bt.map(function(Cr,Go){var oo=Cr.color;return{color:oo,stop:Math.max(Math.min(1,jt[Go]/wt),0)}})},kl=function(Bt,wt,Et){var Pt=wt/2,jt=Et/2,ue=_o(Bt[0],wt)-Pt,Ee=jt-_o(Bt[1],Et);return(Math.atan2(Ee,ue)+Math.PI*2)%(Math.PI*2)},du=function(Bt,wt,Et){var Pt=typeof Bt=="number"?Bt:kl(Bt,wt,Et),jt=Math.abs(wt*Math.sin(Pt))+Math.abs(Et*Math.cos(Pt)),ue=wt/2,Ee=Et/2,Ye=jt/2,Ne=Math.sin(Pt-Math.PI/2)*Ye,En=Math.cos(Pt-Math.PI/2)*Ye;return[jt,ue-En,ue+En,Ee-Ne,Ee+Ne]},rs=function(Bt,wt){return Math.sqrt(Bt*Bt+wt*wt)},ra=function(Bt,wt,Et,Pt,jt){var ue=[[0,0],[0,wt],[Bt,0],[Bt,wt]];return ue.reduce(function(Ee,Ye){var Ne=Ye[0],En=Ye[1],Un=rs(Et-Ne,Pt-En);return(jt?Un<Ee.optimumDistance:Un>Ee.optimumDistance)?{optimumCorner:Ye,optimumDistance:Un}:Ee},{optimumDistance:jt?1/0:-1/0,optimumCorner:null}).optimumCorner},gl=function(Bt,wt,Et,Pt,jt){var ue=0,Ee=0;switch(Bt.size){case 0:Bt.shape===0?ue=Ee=Math.min(Math.abs(wt),Math.abs(wt-Pt),Math.abs(Et),Math.abs(Et-jt)):Bt.shape===1&&(ue=Math.min(Math.abs(wt),Math.abs(wt-Pt)),Ee=Math.min(Math.abs(Et),Math.abs(Et-jt)));break;case 2:if(Bt.shape===0)ue=Ee=Math.min(rs(wt,Et),rs(wt,Et-jt),rs(wt-Pt,Et),rs(wt-Pt,Et-jt));else if(Bt.shape===1){var Ye=Math.min(Math.abs(Et),Math.abs(Et-jt))/Math.min(Math.abs(wt),Math.abs(wt-Pt)),Ne=ra(Pt,jt,wt,Et,!0),En=Ne[0],Un=Ne[1];ue=rs(En-wt,(Un-Et)/Ye),Ee=Ye*ue}break;case 1:Bt.shape===0?ue=Ee=Math.max(Math.abs(wt),Math.abs(wt-Pt),Math.abs(Et),Math.abs(Et-jt)):Bt.shape===1&&(ue=Math.max(Math.abs(wt),Math.abs(wt-Pt)),Ee=Math.max(Math.abs(Et),Math.abs(Et-jt)));break;case 3:if(Bt.shape===0)ue=Ee=Math.max(rs(wt,Et),rs(wt,Et-jt),rs(wt-Pt,Et),rs(wt-Pt,Et-jt));else if(Bt.shape===1){var Ye=Math.max(Math.abs(Et),Math.abs(Et-jt))/Math.max(Math.abs(wt),Math.abs(wt-Pt)),oi=ra(Pt,jt,wt,Et,!1),En=oi[0],Un=oi[1];ue=rs(En-wt,(Un-Et)/Ye),Ee=Ye*ue}break}return Array.isArray(Bt.size)&&(ue=_o(Bt.size[0],Pt),Ee=Bt.size.length===2?_o(Bt.size[1],jt):ue),[ue,Ee]},Kl=function(Bt,wt){var Et=ds(180),Pt=[];return is(wt).forEach(function(jt,ue){if(ue===0){var Ee=jt[0];if(Ee.type===20&&Ee.value==="to"){Et=ca(jt);return}else if(Ml(Ee)){Et=es.parse(Bt,Ee);return}}var Ye=Ce(Bt,jt);Pt.push(Ye)}),{angle:Et,stops:Pt,type:1}},fu=function(Bt,wt){var Et=ds(180),Pt=[];return is(wt).forEach(function(jt,ue){if(ue===0){var Ee=jt[0];if(Ee.type===20&&["top","left","right","bottom"].indexOf(Ee.value)!==-1){Et=ca(jt);return}else if(Ml(Ee)){Et=(es.parse(Bt,Ee)+ds(270))%ds(360);return}}var Ye=Ce(Bt,jt);Pt.push(Ye)}),{angle:Et,stops:Pt,type:1}},Cs=function(Bt,wt){var Et=ds(180),Pt=[],jt=1,ue=0,Ee=3,Ye=[];return is(wt).forEach(function(Ne,En){var Un=Ne[0];if(En===0){if(Bo(Un)&&Un.value==="linear"){jt=1;return}else if(Bo(Un)&&Un.value==="radial"){jt=2;return}}if(Un.type===18){if(Un.name==="from"){var oi=Oa.parse(Bt,Un.values[0]);Pt.push({stop:Io,color:oi})}else if(Un.name==="to"){var oi=Oa.parse(Bt,Un.values[0]);Pt.push({stop:bo,color:oi})}else if(Un.name==="color-stop"){var bi=Un.values.filter(Wo);if(bi.length===2){var oi=Oa.parse(Bt,bi[1]),Hr=bi[0];rr(Hr)&&Pt.push({stop:{type:16,number:Hr.number*100,flags:Hr.flags},color:oi})}}}}),jt===1?{angle:(Et+ds(180))%ds(360),stops:Pt,type:jt}:{size:Ee,shape:ue,stops:Pt,position:Ye,type:jt}},Vr="closest-side",Fa="farthest-side",ol="closest-corner",ws="farthest-corner",vo="circle",Ps="ellipse",Ha="cover",ss="contain",sl=function(Bt,wt){var Et=0,Pt=3,jt=[],ue=[];return is(wt).forEach(function(Ee,Ye){var Ne=!0;if(Ye===0){var En=!1;Ne=Ee.reduce(function(oi,bi){if(En)if(Bo(bi))switch(bi.value){case"center":return ue.push(rl),oi;case"top":case"left":return ue.push(Io),oi;case"right":case"bottom":return ue.push(bo),oi}else(jo(bi)||Ss(bi))&&ue.push(bi);else if(Bo(bi))switch(bi.value){case vo:return Et=0,!1;case Ps:return Et=1,!1;case"at":return En=!0,!1;case Vr:return Pt=0,!1;case Ha:case Fa:return Pt=1,!1;case ss:case ol:return Pt=2,!1;case ws:return Pt=3,!1}else if(Ss(bi)||jo(bi))return Array.isArray(Pt)||(Pt=[]),Pt.push(bi),!1;return oi},Ne)}if(Ne){var Un=Ce(Bt,Ee);jt.push(Un)}}),{size:Pt,shape:Et,stops:jt,position:ue,type:2}},Ys=function(Bt,wt){var Et=0,Pt=3,jt=[],ue=[];return is(wt).forEach(function(Ee,Ye){var Ne=!0;if(Ye===0?Ne=Ee.reduce(function(Un,oi){if(Bo(oi))switch(oi.value){case"center":return ue.push(rl),!1;case"top":case"left":return ue.push(Io),!1;case"right":case"bottom":return ue.push(bo),!1}else if(jo(oi)||Ss(oi))return ue.push(oi),!1;return Un},Ne):Ye===1&&(Ne=Ee.reduce(function(Un,oi){if(Bo(oi))switch(oi.value){case vo:return Et=0,!1;case Ps:return Et=1,!1;case ss:case Vr:return Pt=0,!1;case Fa:return Pt=1,!1;case ol:return Pt=2,!1;case Ha:case ws:return Pt=3,!1}else if(Ss(oi)||jo(oi))return Array.isArray(Pt)||(Pt=[]),Pt.push(oi),!1;return Un},Ne)),Ne){var En=Ce(Bt,Ee);jt.push(En)}}),{size:Pt,shape:Et,stops:jt,position:ue,type:2}},Wu=function(Bt){return Bt.type===1},Qo=function(Bt){return Bt.type===2},oa={name:"image",parse:function(Bt,wt){if(wt.type===22){var Et={url:wt.value,type:0};return Bt.cache.addImage(wt.value),Et}if(wt.type===18){var Pt=as[wt.name];if(typeof Pt=="undefined")throw new Error('Attempting to parse an unsupported image function "'+wt.name+'"');return Pt(Bt,wt.values)}throw new Error("Unsupported image type "+wt.type)}};function No(Bt){return!(Bt.type===20&&Bt.value==="none")&&(Bt.type!==18||!!as[Bt.name])}var as={"linear-gradient":Kl,"-moz-linear-gradient":fu,"-ms-linear-gradient":fu,"-o-linear-gradient":fu,"-webkit-linear-gradient":fu,"radial-gradient":sl,"-moz-radial-gradient":Ys,"-ms-radial-gradient":Ys,"-o-radial-gradient":Ys,"-webkit-radial-gradient":Ys,"-webkit-gradient":Cs},gs={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(Bt,wt){if(wt.length===0)return[];var Et=wt[0];return Et.type===20&&Et.value==="none"?[]:wt.filter(function(Pt){return Wo(Pt)&&No(Pt)}).map(function(Pt){return oa.parse(Bt,Pt)})}},bs={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(Bt,wt){return wt.map(function(Et){if(Bo(Et))switch(Et.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Ko={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(Bt,wt){return is(wt).map(function(Et){return Et.filter(jo)}).map(Pa)}},dA={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(Bt,wt){return is(wt).map(function(Et){return Et.filter(Bo).map(function(Pt){return Pt.value}).join(" ")}).map(zr)}},zr=function(Bt){switch(Bt){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},Yu;(function(Bt){Bt.AUTO="auto",Bt.CONTAIN="contain",Bt.COVER="cover"})(Yu||(Yu={}));var Co={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(Bt,wt){return is(wt).map(function(Et){return Et.filter(Oh)})}},Oh=function(Bt){return Bo(Bt)||jo(Bt)},eu=function(Bt){return{name:"border-"+Bt+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},TA=eu("top"),Hh=eu("right"),ch=eu("bottom"),gu=eu("left"),pu=function(Bt){return{name:"border-radius-"+Bt,initialValue:"0 0",prefix:!1,type:1,parse:function(wt,Et){return Pa(Et.filter(jo))}}},Ho=pu("top-left"),Gl=pu("top-right"),dh=pu("bottom-right"),Pu=pu("bottom-left"),fA=function(Bt){return{name:"border-"+Bt+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(wt,Et){switch(Et){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Fu=fA("top"),xo=fA("right"),Oo=fA("bottom"),Qs=fA("left"),sa=function(Bt){return{name:"border-"+Bt+"-width",initialValue:"0",type:0,prefix:!1,parse:function(wt,Et){return yo(Et)?Et.number:0}}},ya=sa("top"),Xu=sa("right"),Eu=sa("bottom"),Ju=sa("left"),zl={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},mu={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"rtl":return 1;case"ltr":default:return 0}}},qg={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(Bt,wt){return wt.filter(Bo).reduce(function(Et,Pt){return Et|$g(Pt.value)},0)}},$g=function(Bt){switch(Bt){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},tp={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},sg={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(Bt,wt){return wt.type===20&&wt.value==="normal"?0:wt.type===17||wt.type===15?wt.number:0}},Os;(function(Bt){Bt.NORMAL="normal",Bt.STRICT="strict"})(Os||(Os={}));var NA={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"strict":return Os.STRICT;case"normal":default:return Os.NORMAL}}},ls={name:"line-height",initialValue:"normal",prefix:!1,type:4},wa=function(Bt,wt){return Bo(Bt)&&Bt.value==="normal"?1.2*wt:Bt.type===17?wt*Bt.number:jo(Bt)?_o(Bt,wt):wt},ba={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(Bt,wt){return wt.type===20&&wt.value==="none"?null:oa.parse(Bt,wt)}},Ta={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"inside":return 0;case"outside":default:return 1}}},DA={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},da=function(Bt){return{name:"margin-"+Bt,initialValue:"0",prefix:!1,type:4}},fh=da("top"),ag=da("right"),lg=da("bottom"),pl=da("left"),Fd={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(Bt,wt){return wt.filter(Bo).map(function(Et){switch(Et.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},ps={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"break-word":return"break-word";case"normal":default:return"normal"}}},Lu=function(Bt){return{name:"padding-"+Bt,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},cf=Lu("top"),IA=Lu("right"),UA=Lu("bottom"),Ed=Lu("left"),fa={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},Na={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},gh={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(Bt,wt){return wt.length===1&&Tr(wt[0],"none")?[]:is(wt).map(function(Et){for(var Pt={color:fs.TRANSPARENT,offsetX:Io,offsetY:Io,blur:Io},jt=0,ue=0;ue<Et.length;ue++){var Ee=Et[ue];Ss(Ee)?(jt===0?Pt.offsetX=Ee:jt===1?Pt.offsetY=Ee:Pt.blur=Ee,jt++):Pt.color=Oa.parse(Bt,Ee)}return Pt})}},jl={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},QA={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(Bt,wt){if(wt.type===20&&wt.value==="none")return null;if(wt.type===18){var Et=Mu[wt.name];if(typeof Et=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+wt.name+'"');return Et(wt.values)}return null}},bl=function(Bt){var wt=Bt.filter(function(Et){return Et.type===17}).map(function(Et){return Et.number});return wt.length===6?wt:null},aa=function(Bt){var wt=Bt.filter(function(Ne){return Ne.type===17}).map(function(Ne){return Ne.number}),Et=wt[0],Pt=wt[1];wt[2],wt[3];var jt=wt[4],ue=wt[5];wt[6],wt[7],wt[8],wt[9],wt[10],wt[11];var Ee=wt[12],Ye=wt[13];return wt[14],wt[15],wt.length===16?[Et,Pt,jt,ue,Ee,Ye]:null},Mu={matrix:bl,matrix3d:aa},Tl={type:16,number:50,flags:Vn},Da=[Tl,Tl],nu={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(Bt,wt){var Et=wt.filter(jo);return Et.length!==2?Da:[Et[0],Et[1]]}},ms={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},ml;(function(Bt){Bt.NORMAL="normal",Bt.BREAK_ALL="break-all",Bt.KEEP_ALL="keep-all"})(ml||(ml={}));for(var gA={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"break-all":return ml.BREAK_ALL;case"keep-all":return ml.KEEP_ALL;case"normal":default:return ml.NORMAL}}},OA={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(Bt,wt){if(wt.type===20)return{auto:!0,order:0};if(rr(wt))return{auto:!1,order:wt.number};throw new Error("Invalid z-index number parsed")}},HA={name:"time",parse:function(Bt,wt){if(wt.type===15)switch(wt.unit.toLowerCase()){case"s":return 1e3*wt.number;case"ms":return wt.number}throw new Error("Unsupported time type")}},Qc={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(Bt,wt){return rr(wt)?wt.number:1}},Rh={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Oc={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(Bt,wt){return wt.filter(Bo).map(function(Et){switch(Et.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(Et){return Et!==0})}},Mo={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(Bt,wt){var Et=[],Pt=[];return wt.forEach(function(jt){switch(jt.type){case 20:case 0:Et.push(jt.value);break;case 17:Et.push(jt.number.toString());break;case 4:Pt.push(Et.join(" ")),Et.length=0;break}}),Et.length&&Pt.push(Et.join(" ")),Pt.map(function(jt){return jt.indexOf(" ")===-1?jt:"'"+jt+"'"})}},Hc={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},df={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(Bt,wt){if(rr(wt))return wt.number;if(Bo(wt))switch(wt.value){case"bold":return 700;case"normal":default:return 400}return 400}},Ld={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(Bt,wt){return wt.filter(Bo).map(function(Et){return Et.value})}},ku={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},xa=function(Bt,wt){return(Bt&wt)!==0},Rc={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(Bt,wt){if(wt.length===0)return[];var Et=wt[0];return Et.type===20&&Et.value==="none"?[]:wt}},ep={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(Bt,wt){if(wt.length===0)return null;var Et=wt[0];if(Et.type===20&&Et.value==="none")return null;for(var Pt=[],jt=wt.filter(gr),ue=0;ue<jt.length;ue++){var Ee=jt[ue],Ye=jt[ue+1];if(Ee.type===20){var Ne=Ye&&rr(Ye)?Ye.number:1;Pt.push({counter:Ee.value,increment:Ne})}}return Pt}},_h={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(Bt,wt){if(wt.length===0)return[];for(var Et=[],Pt=wt.filter(gr),jt=0;jt<Pt.length;jt++){var ue=Pt[jt],Ee=Pt[jt+1];if(Bo(ue)&&ue.value!=="none"){var Ye=Ee&&rr(Ee)?Ee.number:0;Et.push({counter:ue.value,reset:Ye})}}return Et}},Md={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(Bt,wt){return wt.filter(yo).map(function(Et){return HA.parse(Bt,Et)})}},Kh={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(Bt,wt){if(wt.length===0)return null;var Et=wt[0];if(Et.type===20&&Et.value==="none")return null;var Pt=[],jt=wt.filter(Qi);if(jt.length%2!==0)return null;for(var ue=0;ue<jt.length;ue+=2){var Ee=jt[ue].value,Ye=jt[ue+1].value;Pt.push({open:Ee,close:Ye})}return Pt}},Gh=function(Bt,wt,Et){if(!Bt)return"";var Pt=Bt[Math.min(wt,Bt.length-1)];return Pt?Et?Pt.open:Pt.close:""},_c={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(Bt,wt){return wt.length===1&&Tr(wt[0],"none")?[]:is(wt).map(function(Et){for(var Pt={color:255,offsetX:Io,offsetY:Io,blur:Io,spread:Io,inset:!1},jt=0,ue=0;ue<Et.length;ue++){var Ee=Et[ue];Tr(Ee,"inset")?Pt.inset=!0:Ss(Ee)?(jt===0?Pt.offsetX=Ee:jt===1?Pt.offsetY=Ee:jt===2?Pt.blur=Ee:Pt.spread=Ee,jt++):Pt.color=Oa.parse(Bt,Ee)}return Pt})}},ff={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(Bt,wt){var Et=[0,1,2],Pt=[];return wt.filter(Bo).forEach(function(jt){switch(jt.value){case"stroke":Pt.push(1);break;case"fill":Pt.push(0);break;case"markers":Pt.push(2);break}}),Et.forEach(function(jt){Pt.indexOf(jt)===-1&&Pt.push(jt)}),Pt}},Kc={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},zh={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(Bt,wt){return yo(wt)?wt.number:0}},RA=function(){function Bt(wt,Et){var Pt,jt;this.animationDuration=Wr(wt,Md,Et.animationDuration),this.backgroundClip=Wr(wt,Yi,Et.backgroundClip),this.backgroundColor=Wr(wt,na,Et.backgroundColor),this.backgroundImage=Wr(wt,gs,Et.backgroundImage),this.backgroundOrigin=Wr(wt,bs,Et.backgroundOrigin),this.backgroundPosition=Wr(wt,Ko,Et.backgroundPosition),this.backgroundRepeat=Wr(wt,dA,Et.backgroundRepeat),this.backgroundSize=Wr(wt,Co,Et.backgroundSize),this.borderTopColor=Wr(wt,TA,Et.borderTopColor),this.borderRightColor=Wr(wt,Hh,Et.borderRightColor),this.borderBottomColor=Wr(wt,ch,Et.borderBottomColor),this.borderLeftColor=Wr(wt,gu,Et.borderLeftColor),this.borderTopLeftRadius=Wr(wt,Ho,Et.borderTopLeftRadius),this.borderTopRightRadius=Wr(wt,Gl,Et.borderTopRightRadius),this.borderBottomRightRadius=Wr(wt,dh,Et.borderBottomRightRadius),this.borderBottomLeftRadius=Wr(wt,Pu,Et.borderBottomLeftRadius),this.borderTopStyle=Wr(wt,Fu,Et.borderTopStyle),this.borderRightStyle=Wr(wt,xo,Et.borderRightStyle),this.borderBottomStyle=Wr(wt,Oo,Et.borderBottomStyle),this.borderLeftStyle=Wr(wt,Qs,Et.borderLeftStyle),this.borderTopWidth=Wr(wt,ya,Et.borderTopWidth),this.borderRightWidth=Wr(wt,Xu,Et.borderRightWidth),this.borderBottomWidth=Wr(wt,Eu,Et.borderBottomWidth),this.borderLeftWidth=Wr(wt,Ju,Et.borderLeftWidth),this.boxShadow=Wr(wt,_c,Et.boxShadow),this.color=Wr(wt,zl,Et.color),this.direction=Wr(wt,mu,Et.direction),this.display=Wr(wt,qg,Et.display),this.float=Wr(wt,tp,Et.cssFloat),this.fontFamily=Wr(wt,Mo,Et.fontFamily),this.fontSize=Wr(wt,Hc,Et.fontSize),this.fontStyle=Wr(wt,ku,Et.fontStyle),this.fontVariant=Wr(wt,Ld,Et.fontVariant),this.fontWeight=Wr(wt,df,Et.fontWeight),this.letterSpacing=Wr(wt,sg,Et.letterSpacing),this.lineBreak=Wr(wt,NA,Et.lineBreak),this.lineHeight=Wr(wt,ls,Et.lineHeight),this.listStyleImage=Wr(wt,ba,Et.listStyleImage),this.listStylePosition=Wr(wt,Ta,Et.listStylePosition),this.listStyleType=Wr(wt,DA,Et.listStyleType),this.marginTop=Wr(wt,fh,Et.marginTop),this.marginRight=Wr(wt,ag,Et.marginRight),this.marginBottom=Wr(wt,lg,Et.marginBottom),this.marginLeft=Wr(wt,pl,Et.marginLeft),this.opacity=Wr(wt,Qc,Et.opacity);var ue=Wr(wt,Fd,Et.overflow);this.overflowX=ue[0],this.overflowY=ue[ue.length>1?1:0],this.overflowWrap=Wr(wt,ps,Et.overflowWrap),this.paddingTop=Wr(wt,cf,Et.paddingTop),this.paddingRight=Wr(wt,IA,Et.paddingRight),this.paddingBottom=Wr(wt,UA,Et.paddingBottom),this.paddingLeft=Wr(wt,Ed,Et.paddingLeft),this.paintOrder=Wr(wt,ff,Et.paintOrder),this.position=Wr(wt,Na,Et.position),this.textAlign=Wr(wt,fa,Et.textAlign),this.textDecorationColor=Wr(wt,Rh,(Pt=Et.textDecorationColor)!==null&&Pt!==void 0?Pt:Et.color),this.textDecorationLine=Wr(wt,Oc,(jt=Et.textDecorationLine)!==null&&jt!==void 0?jt:Et.textDecoration),this.textShadow=Wr(wt,gh,Et.textShadow),this.textTransform=Wr(wt,jl,Et.textTransform),this.transform=Wr(wt,QA,Et.transform),this.transformOrigin=Wr(wt,nu,Et.transformOrigin),this.visibility=Wr(wt,ms,Et.visibility),this.webkitTextStrokeColor=Wr(wt,Kc,Et.webkitTextStrokeColor),this.webkitTextStrokeWidth=Wr(wt,zh,Et.webkitTextStrokeWidth),this.wordBreak=Wr(wt,gA,Et.wordBreak),this.zIndex=Wr(wt,OA,Et.zIndex)}return Bt.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},Bt.prototype.isTransparent=function(){return Bs(this.backgroundColor)},Bt.prototype.isTransformed=function(){return this.transform!==null},Bt.prototype.isPositioned=function(){return this.position!==0},Bt.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},Bt.prototype.isFloating=function(){return this.float!==0},Bt.prototype.isInlineLevel=function(){return xa(this.display,4)||xa(this.display,33554432)||xa(this.display,268435456)||xa(this.display,536870912)||xa(this.display,67108864)||xa(this.display,134217728)},Bt}(),al=function(){function Bt(wt,Et){this.content=Wr(wt,Rc,Et.content),this.quotes=Wr(wt,Kh,Et.quotes)}return Bt}(),bu=function(){function Bt(wt,Et){this.counterIncrement=Wr(wt,ep,Et.counterIncrement),this.counterReset=Wr(wt,_h,Et.counterReset)}return Bt}(),Wr=function(Bt,wt,Et){var Pt=new Xr,jt=Et!==null&&typeof Et!="undefined"?Et.toString():wt.initialValue;Pt.write(jt);var ue=new io(Pt.read());switch(wt.type){case 2:var Ee=ue.parseComponentValue();return wt.parse(Bt,Bo(Ee)?Ee.value:wt.initialValue);case 0:return wt.parse(Bt,ue.parseComponentValue());case 1:return wt.parse(Bt,ue.parseComponentValues());case 4:return ue.parseComponentValue();case 3:switch(wt.format){case"angle":return es.parse(Bt,ue.parseComponentValue());case"color":return Oa.parse(Bt,ue.parseComponentValue());case"image":return oa.parse(Bt,ue.parseComponentValue());case"length":var Ye=ue.parseComponentValue();return Ss(Ye)?Ye:Io;case"length-percentage":var Ne=ue.parseComponentValue();return jo(Ne)?Ne:Io;case"time":return HA.parse(Bt,ue.parseComponentValue())}break}},pA="data-html2canvas-debug",kd=function(Bt){var wt=Bt.getAttribute(pA);switch(wt){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},jh=function(Bt,wt){var Et=kd(Bt);return Et===1||wt===Et},Tu=function(){function Bt(wt,Et){if(this.context=wt,this.textNodes=[],this.elements=[],this.flags=0,jh(Et,3))debugger;this.styles=new RA(wt,window.getComputedStyle(Et,null)),oc(Et)&&(this.styles.animationDuration.some(function(Pt){return Pt>0})&&(Et.style.animationDuration="0s"),this.styles.transform!==null&&(Et.style.transform="none")),this.bounds=Rt(this.context,Et),jh(Et,4)&&(this.flags|=16)}return Bt}(),_A="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",KA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Vh=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),ph=0;ph<KA.length;ph++)Vh[KA.charCodeAt(ph)]=ph;for(var Za=function(Bt){var wt=Bt.length*.75,Et=Bt.length,Pt,jt=0,ue,Ee,Ye,Ne;Bt[Bt.length-1]==="="&&(wt--,Bt[Bt.length-2]==="="&&wt--);var En=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(wt):new Array(wt),Un=Array.isArray(En)?En:new Uint8Array(En);for(Pt=0;Pt<Et;Pt+=4)ue=Vh[Bt.charCodeAt(Pt)],Ee=Vh[Bt.charCodeAt(Pt+1)],Ye=Vh[Bt.charCodeAt(Pt+2)],Ne=Vh[Bt.charCodeAt(Pt+3)],Un[jt++]=ue<<2|Ee>>4,Un[jt++]=(Ee&15)<<4|Ye>>2,Un[jt++]=(Ye&3)<<6|Ne&63;return En},mh=function(Bt){for(var wt=Bt.length,Et=[],Pt=0;Pt<wt;Pt+=2)Et.push(Bt[Pt+1]<<8|Bt[Pt]);return Et},gf=function(Bt){for(var wt=Bt.length,Et=[],Pt=0;Pt<wt;Pt+=4)Et.push(Bt[Pt+3]<<24|Bt[Pt+2]<<16|Bt[Pt+1]<<8|Bt[Pt]);return Et},Nu=5,vh=11,Du=2,Gc=vh-Nu,bd=65536>>Nu,la=1<<Nu,yh=la-1,GA=1024>>Nu,wh=bd+GA,zc=wh,pf=32,Zh=zc+pf,ug=65536>>vh,xh=1<<Gc,iu=xh-1,mf=function(Bt,wt,Et){return Bt.slice?Bt.slice(wt,Et):new Uint16Array(Array.prototype.slice.call(Bt,wt,Et))},vf=function(Bt,wt,Et){return Bt.slice?Bt.slice(wt,Et):new Uint32Array(Array.prototype.slice.call(Bt,wt,Et))},Sh=function(Bt,wt){var Et=Za(Bt),Pt=Array.isArray(Et)?gf(Et):new Uint32Array(Et),jt=Array.isArray(Et)?mh(Et):new Uint16Array(Et),ue=24,Ee=mf(jt,ue/2,Pt[4]/2),Ye=Pt[5]===2?mf(jt,(ue+Pt[4])/2):vf(Pt,Math.ceil((ue+Pt[4])/4));return new Wh(Pt[0],Pt[1],Pt[2],Pt[3],Ee,Ye)},Wh=function(){function Bt(wt,Et,Pt,jt,ue,Ee){this.initialValue=wt,this.errorValue=Et,this.highStart=Pt,this.highValueIndex=jt,this.index=ue,this.data=Ee}return Bt.prototype.get=function(wt){var Et;if(wt>=0){if(wt<55296||wt>56319&&wt<=65535)return Et=this.index[wt>>Nu],Et=(Et<<Du)+(wt&yh),this.data[Et];if(wt<=65535)return Et=this.index[bd+(wt-55296>>Nu)],Et=(Et<<Du)+(wt&yh),this.data[Et];if(wt<this.highStart)return Et=Zh-ug+(wt>>vh),Et=this.index[Et],Et+=wt>>Nu&iu,Et=this.index[Et],Et=(Et<<Du)+(wt&yh),this.data[Et];if(wt<=1114111)return this.data[this.highValueIndex]}return this.errorValue},Bt}(),Vs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",mA=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),jc=0;jc<Vs.length;jc++)mA[Vs.charCodeAt(jc)]=jc;var Td=1,Nd=2,He=3,zA=4,Iu=5,Ag=7,Dd=8,Id=9,Vc=10,hg=11,Ia=12,Yh=13,Ud=14,Qd=15,cg=function(Bt){for(var wt=[],Et=0,Pt=Bt.length;Et<Pt;){var jt=Bt.charCodeAt(Et++);if(jt>=55296&&jt<=56319&&Et<Pt){var ue=Bt.charCodeAt(Et++);(ue&64512)===56320?wt.push(((jt&1023)<<10)+(ue&1023)+65536):(wt.push(jt),Et--)}else wt.push(jt)}return wt},dg=function(){for(var Bt=[],wt=0;wt<arguments.length;wt++)Bt[wt]=arguments[wt];if(String.fromCodePoint)return String.fromCodePoint.apply(String,Bt);var Et=Bt.length;if(!Et)return"";for(var Pt=[],jt=-1,ue="";++jt<Et;){var Ee=Bt[jt];Ee<=65535?Pt.push(Ee):(Ee-=65536,Pt.push((Ee>>10)+55296,Ee%1024+56320)),(jt+1===Et||Pt.length>16384)&&(ue+=String.fromCharCode.apply(String,Pt),Pt.length=0)}return ue},fg=Sh(_A),Vl="\xD7",vl="\xF7",Xh=function(Bt){return fg.get(Bt)},yf=function(Bt,wt,Et){var Pt=Et-2,jt=wt[Pt],ue=wt[Et-1],Ee=wt[Et];if(ue===Nd&&Ee===He)return Vl;if(ue===Nd||ue===He||ue===zA||Ee===Nd||Ee===He||Ee===zA)return vl;if(ue===Dd&&[Dd,Id,hg,Ia].indexOf(Ee)!==-1||(ue===hg||ue===Id)&&(Ee===Id||Ee===Vc)||(ue===Ia||ue===Vc)&&Ee===Vc||Ee===Yh||Ee===Iu||Ee===Ag||ue===Td)return Vl;if(ue===Yh&&Ee===Ud){for(;jt===Iu;)jt=wt[--Pt];if(jt===Ud)return Vl}if(ue===Qd&&Ee===Qd){for(var Ye=0;jt===Qd;)Ye++,jt=wt[--Pt];if(Ye%2===0)return Vl}return vl},qu=function(Bt){var wt=cg(Bt),Et=wt.length,Pt=0,jt=0,ue=wt.map(Xh);return{next:function(){if(Pt>=Et)return{done:!0,value:null};for(var Ee=Vl;Pt<Et&&(Ee=yf(wt,ue,++Pt))===Vl;);if(Ee!==Vl||Pt===Et){var Ye=dg.apply(null,wt.slice(jt,Pt));return jt=Pt,{value:Ye,done:!1}}return{done:!0,value:null}}}},Zc=function(Bt){for(var wt=qu(Bt),Et=[],Pt;!(Pt=wt.next()).done;)Pt.value&&Et.push(Pt.value.slice());return Et},Od=function(Bt){var wt=123;if(Bt.createRange){var Et=Bt.createRange();if(Et.getBoundingClientRect){var Pt=Bt.createElement("boundtest");Pt.style.height=wt+"px",Pt.style.display="block",Bt.body.appendChild(Pt),Et.selectNode(Pt);var jt=Et.getBoundingClientRect(),ue=Math.round(jt.height);if(Bt.body.removeChild(Pt),ue===wt)return!0}}return!1},Wc=function(Bt){var wt=Bt.createElement("boundtest");wt.style.width="50px",wt.style.display="block",wt.style.fontSize="12px",wt.style.letterSpacing="0px",wt.style.wordSpacing="0px",Bt.body.appendChild(wt);var Et=Bt.createRange();wt.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var Pt=wt.firstChild,jt=ae(Pt.data).map(function(Ne){return de(Ne)}),ue=0,Ee={},Ye=jt.every(function(Ne,En){Et.setStart(Pt,ue),Et.setEnd(Pt,ue+Ne.length);var Un=Et.getBoundingClientRect();ue+=Ne.length;var oi=Un.x>Ee.x||Un.y>Ee.y;return Ee=Un,En===0?!0:oi});return Bt.body.removeChild(wt),Ye},Nl=function(){return typeof new Image().crossOrigin!="undefined"},wf=function(){return typeof new XMLHttpRequest().responseType=="string"},xf=function(Bt){var wt=new Image,Et=Bt.createElement("canvas"),Pt=Et.getContext("2d");if(!Pt)return!1;wt.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{Pt.drawImage(wt,0,0),Et.toDataURL()}catch(jt){return!1}return!0},Zl=function(Bt){return Bt[0]===0&&Bt[1]===255&&Bt[2]===0&&Bt[3]===255},Jh=function(Bt){var wt=Bt.createElement("canvas"),Et=100;wt.width=Et,wt.height=Et;var Pt=wt.getContext("2d");if(!Pt)return Promise.reject(!1);Pt.fillStyle="rgb(0, 255, 0)",Pt.fillRect(0,0,Et,Et);var jt=new Image,ue=wt.toDataURL();jt.src=ue;var Ee=Yc(Et,Et,0,0,jt);return Pt.fillStyle="red",Pt.fillRect(0,0,Et,Et),Sf(Ee).then(function(Ye){Pt.drawImage(Ye,0,0);var Ne=Pt.getImageData(0,0,Et,Et).data;Pt.fillStyle="red",Pt.fillRect(0,0,Et,Et);var En=Bt.createElement("div");return En.style.backgroundImage="url("+ue+")",En.style.height=Et+"px",Zl(Ne)?Sf(Yc(Et,Et,0,0,En)):Promise.reject(!1)}).then(function(Ye){return Pt.drawImage(Ye,0,0),Zl(Pt.getImageData(0,0,Et,Et).data)}).catch(function(){return!1})},Yc=function(Bt,wt,Et,Pt,jt){var ue="http://www.w3.org/2000/svg",Ee=document.createElementNS(ue,"svg"),Ye=document.createElementNS(ue,"foreignObject");return Ee.setAttributeNS(null,"width",Bt.toString()),Ee.setAttributeNS(null,"height",wt.toString()),Ye.setAttributeNS(null,"width","100%"),Ye.setAttributeNS(null,"height","100%"),Ye.setAttributeNS(null,"x",Et.toString()),Ye.setAttributeNS(null,"y",Pt.toString()),Ye.setAttributeNS(null,"externalResourcesRequired","true"),Ee.appendChild(Ye),Ye.appendChild(jt),Ee},Sf=function(Bt){return new Promise(function(wt,Et){var Pt=new Image;Pt.onload=function(){return wt(Pt)},Pt.onerror=Et,Pt.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(Bt))})},ga={get SUPPORT_RANGE_BOUNDS(){var Bt=Od(document);return Object.defineProperty(ga,"SUPPORT_RANGE_BOUNDS",{value:Bt}),Bt},get SUPPORT_WORD_BREAKING(){var Bt=ga.SUPPORT_RANGE_BOUNDS&&Wc(document);return Object.defineProperty(ga,"SUPPORT_WORD_BREAKING",{value:Bt}),Bt},get SUPPORT_SVG_DRAWING(){var Bt=xf(document);return Object.defineProperty(ga,"SUPPORT_SVG_DRAWING",{value:Bt}),Bt},get SUPPORT_FOREIGNOBJECT_DRAWING(){var Bt=typeof Array.from=="function"&&typeof window.fetch=="function"?Jh(document):Promise.resolve(!1);return Object.defineProperty(ga,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:Bt}),Bt},get SUPPORT_CORS_IMAGES(){var Bt=Nl();return Object.defineProperty(ga,"SUPPORT_CORS_IMAGES",{value:Bt}),Bt},get SUPPORT_RESPONSE_TYPE(){var Bt=wf();return Object.defineProperty(ga,"SUPPORT_RESPONSE_TYPE",{value:Bt}),Bt},get SUPPORT_CORS_XHR(){var Bt="withCredentials"in new XMLHttpRequest;return Object.defineProperty(ga,"SUPPORT_CORS_XHR",{value:Bt}),Bt},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var Bt=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(ga,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:Bt}),Bt}},Ra=function(){function Bt(wt,Et){this.text=wt,this.bounds=Et}return Bt}(),Bf=function(Bt,wt,Et,Pt){var jt=tc(wt,Et),ue=[],Ee=0;return jt.forEach(function(Ye){if(Et.textDecorationLine.length||Ye.trim().length>0)if(ga.SUPPORT_RANGE_BOUNDS){var Ne=qh(Pt,Ee,Ye.length).getClientRects();if(Ne.length>1){var En=$h(Ye),Un=0;En.forEach(function(bi){ue.push(new Ra(bi,fe.fromDOMRectList(Bt,qh(Pt,Un+Ee,bi.length).getClientRects()))),Un+=bi.length})}else ue.push(new Ra(Ye,fe.fromDOMRectList(Bt,Ne)))}else{var oi=Pt.splitText(Ye.length);ue.push(new Ra(Ye,ua(Bt,Pt))),Pt=oi}else ga.SUPPORT_RANGE_BOUNDS||(Pt=Pt.splitText(Ye.length));Ee+=Ye.length}),ue},ua=function(Bt,wt){var Et=wt.ownerDocument;if(Et){var Pt=Et.createElement("html2canvaswrapper");Pt.appendChild(wt.cloneNode(!0));var jt=wt.parentNode;if(jt){jt.replaceChild(Pt,wt);var ue=Rt(Bt,Pt);return Pt.firstChild&&jt.replaceChild(Pt.firstChild,Pt),ue}}return fe.EMPTY},qh=function(Bt,wt,Et){var Pt=Bt.ownerDocument;if(!Pt)throw new Error("Node has no owner document");var jt=Pt.createRange();return jt.setStart(Bt,wt),jt.setEnd(Bt,wt+Et),jt},$h=function(Bt){if(ga.SUPPORT_NATIVE_TEXT_SEGMENTATION){var wt=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(wt.segment(Bt)).map(function(Et){return Et.segment})}return Zc(Bt)},jA=function(Bt,wt){if(ga.SUPPORT_NATIVE_TEXT_SEGMENTATION){var Et=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(Et.segment(Bt)).map(function(Pt){return Pt.segment})}return Cf(Bt,wt)},tc=function(Bt,wt){return wt.letterSpacing!==0?$h(Bt):jA(Bt,wt)},ec=[32,160,4961,65792,65793,4153,4241],Cf=function(Bt,wt){for(var Et=Mn(Bt,{lineBreak:wt.lineBreak,wordBreak:wt.overflowWrap==="break-word"?"break-word":wt.wordBreak}),Pt=[],jt,ue=function(){if(jt.value){var Ee=jt.value.slice(),Ye=ae(Ee),Ne="";Ye.forEach(function(En){ec.indexOf(En)===-1?Ne+=de(En):(Ne.length&&Pt.push(Ne),Pt.push(de(En)),Ne="")}),Ne.length&&Pt.push(Ne)}};!(jt=Et.next()).done;)ue();return Pt},nc=function(){function Bt(wt,Et,Pt){this.text=Pf(Et.data,Pt.textTransform),this.textBounds=Bf(wt,this.text,Pt,Et)}return Bt}(),Pf=function(Bt,wt){switch(wt){case 1:return Bt.toLowerCase();case 3:return Bt.replace($u,Bh);case 2:return Bt.toUpperCase();default:return Bt}},$u=/(^|\s|:|-|\(|\))([a-z])/g,Bh=function(Bt,wt,Et){return Bt.length>0?wt+Et.toUpperCase():Bt},Xc=function(Bt){Ut(wt,Bt);function wt(Et,Pt){var jt=Bt.call(this,Et,Pt)||this;return jt.src=Pt.currentSrc||Pt.src,jt.intrinsicWidth=Pt.naturalWidth,jt.intrinsicHeight=Pt.naturalHeight,jt.context.cache.addImage(jt.src),jt}return wt}(Tu),Jc=function(Bt){Ut(wt,Bt);function wt(Et,Pt){var jt=Bt.call(this,Et,Pt)||this;return jt.canvas=Pt,jt.intrinsicWidth=Pt.width,jt.intrinsicHeight=Pt.height,jt}return wt}(Tu),qc=function(Bt){Ut(wt,Bt);function wt(Et,Pt){var jt=Bt.call(this,Et,Pt)||this,ue=new XMLSerializer,Ee=Rt(Et,Pt);return Pt.setAttribute("width",Ee.width+"px"),Pt.setAttribute("height",Ee.height+"px"),jt.svg="data:image/svg+xml,"+encodeURIComponent(ue.serializeToString(Pt)),jt.intrinsicWidth=Pt.width.baseVal.value,jt.intrinsicHeight=Pt.height.baseVal.value,jt.context.cache.addImage(jt.svg),jt}return wt}(Tu),VA=function(Bt){Ut(wt,Bt);function wt(Et,Pt){var jt=Bt.call(this,Et,Pt)||this;return jt.value=Pt.value,jt}return wt}(Tu),$c=function(Bt){Ut(wt,Bt);function wt(Et,Pt){var jt=Bt.call(this,Et,Pt)||this;return jt.start=Pt.start,jt.reversed=typeof Pt.reversed=="boolean"&&Pt.reversed===!0,jt}return wt}(Tu),Ff=[{type:15,flags:0,unit:"px",number:3}],Ef=[{type:16,flags:0,number:50}],Uu=function(Bt){return Bt.width>Bt.height?new fe(Bt.left+(Bt.width-Bt.height)/2,Bt.top,Bt.height,Bt.height):Bt.width<Bt.height?new fe(Bt.left,Bt.top+(Bt.height-Bt.width)/2,Bt.width,Bt.width):Bt},gg=function(Bt){var wt=Bt.type===Ch?new Array(Bt.value.length+1).join("\u2022"):Bt.value;return wt.length===0?Bt.placeholder||"":wt},ic="checkbox",vA="radio",Ch="password",Hd=707406591,ru=function(Bt){Ut(wt,Bt);function wt(Et,Pt){var jt=Bt.call(this,Et,Pt)||this;switch(jt.type=Pt.type.toLowerCase(),jt.checked=Pt.checked,jt.value=gg(Pt),(jt.type===ic||jt.type===vA)&&(jt.styles.backgroundColor=3739148031,jt.styles.borderTopColor=jt.styles.borderRightColor=jt.styles.borderBottomColor=jt.styles.borderLeftColor=2779096575,jt.styles.borderTopWidth=jt.styles.borderRightWidth=jt.styles.borderBottomWidth=jt.styles.borderLeftWidth=1,jt.styles.borderTopStyle=jt.styles.borderRightStyle=jt.styles.borderBottomStyle=jt.styles.borderLeftStyle=1,jt.styles.backgroundClip=[0],jt.styles.backgroundOrigin=[0],jt.bounds=Uu(jt.bounds)),jt.type){case ic:jt.styles.borderTopRightRadius=jt.styles.borderTopLeftRadius=jt.styles.borderBottomRightRadius=jt.styles.borderBottomLeftRadius=Ff;break;case vA:jt.styles.borderTopRightRadius=jt.styles.borderTopLeftRadius=jt.styles.borderBottomRightRadius=jt.styles.borderBottomLeftRadius=Ef;break}return jt}return wt}(Tu),Rd=function(Bt){Ut(wt,Bt);function wt(Et,Pt){var jt=Bt.call(this,Et,Pt)||this,ue=Pt.options[Pt.selectedIndex||0];return jt.value=ue&&ue.text||"",jt}return wt}(Tu),td=function(Bt){Ut(wt,Bt);function wt(Et,Pt){var jt=Bt.call(this,Et,Pt)||this;return jt.value=Pt.value,jt}return wt}(Tu),Lf=function(Bt){Ut(wt,Bt);function wt(Et,Pt){var jt=Bt.call(this,Et,Pt)||this;jt.src=Pt.src,jt.width=parseInt(Pt.width,10)||0,jt.height=parseInt(Pt.height,10)||0,jt.backgroundColor=jt.styles.backgroundColor;try{if(Pt.contentWindow&&Pt.contentWindow.document&&Pt.contentWindow.document.documentElement){jt.tree=kf(Et,Pt.contentWindow.document.documentElement);var ue=Pt.contentWindow.document.documentElement?wo(Et,getComputedStyle(Pt.contentWindow.document.documentElement).backgroundColor):fs.TRANSPARENT,Ee=Pt.contentWindow.document.body?wo(Et,getComputedStyle(Pt.contentWindow.document.body).backgroundColor):fs.TRANSPARENT;jt.backgroundColor=Bs(ue)?Bs(Ee)?jt.styles.backgroundColor:Ee:ue}}catch(Ye){}return jt}return wt}(Tu),Mf=["OL","UL","MENU"],rc=function(Bt,wt,Et,Pt){for(var jt=wt.firstChild,ue=void 0;jt;jt=ue)if(ue=jt.nextSibling,ed(jt)&&jt.data.trim().length>0)Et.textNodes.push(new nc(Bt,jt,Et.styles));else if(Ph(jt))if(zd(jt)&&jt.assignedNodes)jt.assignedNodes().forEach(function(Ye){return rc(Bt,Ye,Et,Pt)});else{var Ee=pg(Bt,jt);Ee.styles.isVisible()&&(_d(jt,Ee,Pt)?Ee.flags|=4:Kd(Ee.styles)&&(Ee.flags|=2),Mf.indexOf(jt.tagName)!==-1&&(Ee.flags|=8),Et.elements.push(Ee),jt.slot,jt.shadowRoot?rc(Bt,jt.shadowRoot,Ee,Pt):!sc(jt)&&!Tf(jt)&&!ac(jt)&&rc(Bt,jt,Ee,Pt))}},pg=function(Bt,wt){return pa(wt)?new Xc(Bt,wt):Fh(wt)?new Jc(Bt,wt):Tf(wt)?new qc(Bt,wt):bf(wt)?new VA(Bt,wt):nd(wt)?new $c(Bt,wt):mg(wt)?new ru(Bt,wt):ac(wt)?new Rd(Bt,wt):sc(wt)?new td(Bt,wt):ll(wt)?new Lf(Bt,wt):new Tu(Bt,wt)},kf=function(Bt,wt){var Et=pg(Bt,wt);return Et.flags|=4,rc(Bt,wt,Et,Et),Et},_d=function(Bt,wt,Et){return wt.styles.isPositionedWithZIndex()||wt.styles.opacity<1||wt.styles.isTransformed()||Xo(Bt)&&Et.styles.isTransparent()},Kd=function(Bt){return Bt.isPositioned()||Bt.isFloating()},ed=function(Bt){return Bt.nodeType===Node.TEXT_NODE},Ph=function(Bt){return Bt.nodeType===Node.ELEMENT_NODE},oc=function(Bt){return Ph(Bt)&&typeof Bt.style!="undefined"&&!Qu(Bt)},Qu=function(Bt){return typeof Bt.className=="object"},bf=function(Bt){return Bt.tagName==="LI"},nd=function(Bt){return Bt.tagName==="OL"},mg=function(Bt){return Bt.tagName==="INPUT"},Gd=function(Bt){return Bt.tagName==="HTML"},Tf=function(Bt){return Bt.tagName==="svg"},Xo=function(Bt){return Bt.tagName==="BODY"},Fh=function(Bt){return Bt.tagName==="CANVAS"},ZA=function(Bt){return Bt.tagName==="VIDEO"},pa=function(Bt){return Bt.tagName==="IMG"},ll=function(Bt){return Bt.tagName==="IFRAME"},WA=function(Bt){return Bt.tagName==="STYLE"},id=function(Bt){return Bt.tagName==="SCRIPT"},sc=function(Bt){return Bt.tagName==="TEXTAREA"},ac=function(Bt){return Bt.tagName==="SELECT"},zd=function(Bt){return Bt.tagName==="SLOT"},jd=function(Bt){return Bt.tagName.indexOf("-")>0},Nf=function(){function Bt(){this.counters={}}return Bt.prototype.getCounterValue=function(wt){var Et=this.counters[wt];return Et&&Et.length?Et[Et.length-1]:1},Bt.prototype.getCounterValues=function(wt){var Et=this.counters[wt];return Et||[]},Bt.prototype.pop=function(wt){var Et=this;wt.forEach(function(Pt){return Et.counters[Pt].pop()})},Bt.prototype.parse=function(wt){var Et=this,Pt=wt.counterIncrement,jt=wt.counterReset,ue=!0;Pt!==null&&Pt.forEach(function(Ye){var Ne=Et.counters[Ye.counter];Ne&&Ye.increment!==0&&(ue=!1,Ne.length||Ne.push(1),Ne[Math.max(0,Ne.length-1)]+=Ye.increment)});var Ee=[];return ue&&jt.forEach(function(Ye){var Ne=Et.counters[Ye.counter];Ee.push(Ye.counter),Ne||(Ne=Et.counters[Ye.counter]=[]),Ne.push(Ye.reset)}),Ee},Bt}(),yA={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},lc={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},YA={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},Fs={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},wA=function(Bt,wt,Et,Pt,jt,ue){return Bt<wt||Bt>Et?ct(Bt,jt,ue.length>0):Pt.integers.reduce(function(Ee,Ye,Ne){for(;Bt>=Ye;)Bt-=Ye,Ee+=Pt.values[Ne];return Ee},"")+ue},Vd=function(Bt,wt,Et,Pt){var jt="";do Et||Bt--,jt=Pt(Bt)+jt,Bt/=wt;while(Bt*wt>=wt);return jt},$s=function(Bt,wt,Et,Pt,jt){var ue=Et-wt+1;return(Bt<0?"-":"")+(Vd(Math.abs(Bt),ue,Pt,function(Ee){return de(Math.floor(Ee%ue)+wt)})+jt)},vu=function(Bt,wt,Et){Et===void 0&&(Et=". ");var Pt=wt.length;return Vd(Math.abs(Bt),Pt,!1,function(jt){return wt[Math.floor(jt%Pt)]})+Et},tA=1,xA=2,Hs=4,uc=8,Wl=function(Bt,wt,Et,Pt,jt,ue){if(Bt<-9999||Bt>9999)return ct(Bt,4,jt.length>0);var Ee=Math.abs(Bt),Ye=jt;if(Ee===0)return wt[0]+Ye;for(var Ne=0;Ee>0&&Ne<=4;Ne++){var En=Ee%10;En===0&&xa(ue,tA)&&Ye!==""?Ye=wt[En]+Ye:En>1||En===1&&Ne===0||En===1&&Ne===1&&xa(ue,xA)||En===1&&Ne===1&&xa(ue,Hs)&&Bt>100||En===1&&Ne>1&&xa(ue,uc)?Ye=wt[En]+(Ne>0?Et[Ne-1]:"")+Ye:En===1&&Ne>0&&(Ye=Et[Ne-1]+Ye),Ee=Math.floor(Ee/10)}return(Bt<0?Pt:"")+Ye},eA="\u5341\u767E\u5343\u842C",Ac="\u62FE\u4F70\u4EDF\u842C",it="\u30DE\u30A4\u30CA\u30B9",st="\uB9C8\uC774\uB108\uC2A4",ct=function(Bt,wt,Et){var Pt=Et?". ":"",jt=Et?"\u3001":"",ue=Et?", ":"",Ee=Et?" ":"";switch(wt){case 0:return"\u2022"+Ee;case 1:return"\u25E6"+Ee;case 2:return"\u25FE"+Ee;case 5:var Ye=$s(Bt,48,57,!0,Pt);return Ye.length<4?"0"+Ye:Ye;case 4:return vu(Bt,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",jt);case 6:return wA(Bt,1,3999,yA,3,Pt).toLowerCase();case 7:return wA(Bt,1,3999,yA,3,Pt);case 8:return $s(Bt,945,969,!1,Pt);case 9:return $s(Bt,97,122,!1,Pt);case 10:return $s(Bt,65,90,!1,Pt);case 11:return $s(Bt,1632,1641,!0,Pt);case 12:case 49:return wA(Bt,1,9999,lc,3,Pt);case 35:return wA(Bt,1,9999,lc,3,Pt).toLowerCase();case 13:return $s(Bt,2534,2543,!0,Pt);case 14:case 30:return $s(Bt,6112,6121,!0,Pt);case 15:return vu(Bt,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",jt);case 16:return vu(Bt,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",jt);case 17:case 48:return Wl(Bt,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",eA,"\u8CA0",jt,xA|Hs|uc);case 47:return Wl(Bt,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",Ac,"\u8CA0",jt,tA|xA|Hs|uc);case 42:return Wl(Bt,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",eA,"\u8D1F",jt,xA|Hs|uc);case 41:return Wl(Bt,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",Ac,"\u8D1F",jt,tA|xA|Hs|uc);case 26:return Wl(Bt,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",it,jt,0);case 25:return Wl(Bt,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",it,jt,tA|xA|Hs);case 31:return Wl(Bt,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",st,ue,tA|xA|Hs);case 33:return Wl(Bt,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",st,ue,0);case 32:return Wl(Bt,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",st,ue,tA|xA|Hs);case 18:return $s(Bt,2406,2415,!0,Pt);case 20:return wA(Bt,1,19999,Fs,3,Pt);case 21:return $s(Bt,2790,2799,!0,Pt);case 22:return $s(Bt,2662,2671,!0,Pt);case 22:return wA(Bt,1,10999,YA,3,Pt);case 23:return vu(Bt,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return vu(Bt,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return $s(Bt,3302,3311,!0,Pt);case 28:return vu(Bt,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",jt);case 29:return vu(Bt,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",jt);case 34:return $s(Bt,3792,3801,!0,Pt);case 37:return $s(Bt,6160,6169,!0,Pt);case 38:return $s(Bt,4160,4169,!0,Pt);case 39:return $s(Bt,2918,2927,!0,Pt);case 40:return $s(Bt,1776,1785,!0,Pt);case 43:return $s(Bt,3046,3055,!0,Pt);case 44:return $s(Bt,3174,3183,!0,Pt);case 45:return $s(Bt,3664,3673,!0,Pt);case 46:return $s(Bt,3872,3881,!0,Pt);case 3:default:return $s(Bt,48,57,!0,Pt)}},ht="data-html2canvas-ignore",pt=function(){function Bt(wt,Et,Pt){if(this.context=wt,this.options=Pt,this.scrolledElements=[],this.referenceElement=Et,this.counters=new Nf,this.quoteDepth=0,!Et.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(Et.ownerDocument.documentElement,!1)}return Bt.prototype.toIFrame=function(wt,Et){var Pt=this,jt=Kt(wt,Et);if(!jt.contentWindow)return Promise.reject("Unable to find iframe window");var ue=wt.defaultView.pageXOffset,Ee=wt.defaultView.pageYOffset,Ye=jt.contentWindow,Ne=Ye.document,En=ve(jt).then(function(){return Xt(Pt,void 0,void 0,function(){var Un,oi;return Ae(this,function(bi){switch(bi.label){case 0:return this.scrolledElements.forEach(vi),Ye&&(Ye.scrollTo(Et.left,Et.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(Ye.scrollY!==Et.top||Ye.scrollX!==Et.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(Ye.scrollX-Et.left,Ye.scrollY-Et.top,0,0))),Un=this.options.onclone,oi=this.clonedReferenceElement,typeof oi=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:Ne.fonts&&Ne.fonts.ready?[4,Ne.fonts.ready]:[3,2];case 1:bi.sent(),bi.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Jt(Ne)]:[3,4];case 3:bi.sent(),bi.label=4;case 4:return typeof Un=="function"?[2,Promise.resolve().then(function(){return Un(Ne,oi)}).then(function(){return jt})]:[2,jt]}})})});return Ne.open(),Ne.write(Fn(document.doctype)+"<html></html>"),xn(this.referenceElement.ownerDocument,ue,Ee),Ne.replaceChild(Ne.adoptNode(this.documentElement),Ne.documentElement),Ne.close(),En},Bt.prototype.createElementClone=function(wt){if(jh(wt,2))debugger;if(Fh(wt))return this.createCanvasClone(wt);if(ZA(wt))return this.createVideoClone(wt);if(WA(wt))return this.createStyleClone(wt);var Et=wt.cloneNode(!1);return pa(Et)&&(pa(wt)&&wt.currentSrc&&wt.currentSrc!==wt.src&&(Et.src=wt.currentSrc,Et.srcset=""),Et.loading==="lazy"&&(Et.loading="eager")),jd(Et)?this.createCustomElementClone(Et):Et},Bt.prototype.createCustomElementClone=function(wt){var Et=document.createElement("html2canvascustomelement");return Be(wt.style,Et),Et},Bt.prototype.createStyleClone=function(wt){try{var Et=wt.sheet;if(Et&&Et.cssRules){var Pt=[].slice.call(Et.cssRules,0).reduce(function(ue,Ee){return Ee&&typeof Ee.cssText=="string"?ue+Ee.cssText:ue},""),jt=wt.cloneNode(!1);return jt.textContent=Pt,jt}}catch(ue){if(this.context.logger.error("Unable to access cssRules property",ue),ue.name!=="SecurityError")throw ue}return wt.cloneNode(!1)},Bt.prototype.createCanvasClone=function(wt){var Et;if(this.options.inlineImages&&wt.ownerDocument){var Pt=wt.ownerDocument.createElement("img");try{return Pt.src=wt.toDataURL(),Pt}catch(En){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",wt)}}var jt=wt.cloneNode(!1);try{jt.width=wt.width,jt.height=wt.height;var ue=wt.getContext("2d"),Ee=jt.getContext("2d");if(Ee)if(!this.options.allowTaint&&ue)Ee.putImageData(ue.getImageData(0,0,wt.width,wt.height),0,0);else{var Ye=(Et=wt.getContext("webgl2"))!==null&&Et!==void 0?Et:wt.getContext("webgl");if(Ye){var Ne=Ye.getContextAttributes();(Ne==null?void 0:Ne.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",wt)}Ee.drawImage(wt,0,0)}return jt}catch(En){this.context.logger.info("Unable to clone canvas as it is tainted",wt)}return jt},Bt.prototype.createVideoClone=function(wt){var Et=wt.ownerDocument.createElement("canvas");Et.width=wt.offsetWidth,Et.height=wt.offsetHeight;var Pt=Et.getContext("2d");try{return Pt&&(Pt.drawImage(wt,0,0,Et.width,Et.height),this.options.allowTaint||Pt.getImageData(0,0,Et.width,Et.height)),Et}catch(ue){this.context.logger.info("Unable to clone video as it is tainted",wt)}var jt=wt.ownerDocument.createElement("canvas");return jt.width=wt.offsetWidth,jt.height=wt.offsetHeight,jt},Bt.prototype.appendChildNode=function(wt,Et,Pt){(!Ph(Et)||!id(Et)&&!Et.hasAttribute(ht)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(Et)))&&(!this.options.copyStyles||!Ph(Et)||!WA(Et))&&wt.appendChild(this.cloneNode(Et,Pt))},Bt.prototype.cloneChildNodes=function(wt,Et,Pt){for(var jt=this,ue=wt.shadowRoot?wt.shadowRoot.firstChild:wt.firstChild;ue;ue=ue.nextSibling)if(Ph(ue)&&zd(ue)&&typeof ue.assignedNodes=="function"){var Ee=ue.assignedNodes();Ee.length&&Ee.forEach(function(Ye){return jt.appendChildNode(Et,Ye,Pt)})}else this.appendChildNode(Et,ue,Pt)},Bt.prototype.cloneNode=function(wt,Et){if(ed(wt))return document.createTextNode(wt.data);if(!wt.ownerDocument)return wt.cloneNode(!1);var Pt=wt.ownerDocument.defaultView;if(Pt&&Ph(wt)&&(oc(wt)||Qu(wt))){var jt=this.createElementClone(wt);jt.style.transitionProperty="none";var ue=Pt.getComputedStyle(wt),Ee=Pt.getComputedStyle(wt,":before"),Ye=Pt.getComputedStyle(wt,":after");this.referenceElement===wt&&oc(jt)&&(this.clonedReferenceElement=jt),Xo(jt)&&_r(jt);var Ne=this.counters.parse(new bu(this.context,ue)),En=this.resolvePseudoContent(wt,jt,Ee,Nt.BEFORE);jd(wt)&&(Et=!0),ZA(wt)||this.cloneChildNodes(wt,jt,Et),En&&jt.insertBefore(En,jt.firstChild);var Un=this.resolvePseudoContent(wt,jt,Ye,Nt.AFTER);return Un&&jt.appendChild(Un),this.counters.pop(Ne),(ue&&(this.options.copyStyles||Qu(wt))&&!ll(wt)||Et)&&Be(ue,jt),(wt.scrollTop!==0||wt.scrollLeft!==0)&&this.scrolledElements.push([jt,wt.scrollLeft,wt.scrollTop]),(sc(wt)||ac(wt))&&(sc(jt)||ac(jt))&&(jt.value=wt.value),jt}return wt.cloneNode(!1)},Bt.prototype.resolvePseudoContent=function(wt,Et,Pt,jt){var ue=this;if(Pt){var Ee=Pt.content,Ye=Et.ownerDocument;if(!(!Ye||!Ee||Ee==="none"||Ee==="-moz-alt-content"||Pt.display==="none")){this.counters.parse(new bu(this.context,Pt));var Ne=new al(this.context,Pt),En=Ye.createElement("html2canvaspseudoelement");Be(Pt,En),Ne.content.forEach(function(oi){if(oi.type===0)En.appendChild(Ye.createTextNode(oi.value));else if(oi.type===22){var bi=Ye.createElement("img");bi.src=oi.value,bi.style.opacity="1",En.appendChild(bi)}else if(oi.type===18){if(oi.name==="attr"){var Hr=oi.values.filter(Bo);Hr.length&&En.appendChild(Ye.createTextNode(wt.getAttribute(Hr[0].value)||""))}else if(oi.name==="counter"){var cr=oi.values.filter(Wo),Cr=cr[0],Go=cr[1];if(Cr&&Bo(Cr)){var oo=ue.counters.getCounterValue(Cr.value),ao=Go&&Bo(Go)?DA.parse(ue.context,Go.value):3;En.appendChild(Ye.createTextNode(ct(oo,ao,!1)))}}else if(oi.name==="counters"){var uo=oi.values.filter(Wo),Cr=uo[0],qo=uo[1],Go=uo[2];if(Cr&&Bo(Cr)){var To=ue.counters.getCounterValues(Cr.value),Yr=Go&&Bo(Go)?DA.parse(ue.context,Go.value):3,hs=qo&&qo.type===0?qo.value:"",vs=To.map(function(Dl){return ct(Dl,Yr,!1)}).join(hs);En.appendChild(Ye.createTextNode(vs))}}}else if(oi.type===20)switch(oi.value){case"open-quote":En.appendChild(Ye.createTextNode(Gh(Ne.quotes,ue.quoteDepth++,!0)));break;case"close-quote":En.appendChild(Ye.createTextNode(Gh(Ne.quotes,--ue.quoteDepth,!1)));break;default:En.appendChild(Ye.createTextNode(oi.value))}}),En.className=or+" "+Ir;var Un=jt===Nt.BEFORE?" "+or:" "+Ir;return Qu(Et)?Et.className.baseValue+=Un:Et.className+=Un,En}}},Bt.destroy=function(wt){return wt.parentNode?(wt.parentNode.removeChild(wt),!0):!1},Bt}(),Nt;(function(Bt){Bt[Bt.BEFORE=0]="BEFORE",Bt[Bt.AFTER=1]="AFTER"})(Nt||(Nt={}));var Kt=function(Bt,wt){var Et=Bt.createElement("iframe");return Et.className="html2canvas-container",Et.style.visibility="hidden",Et.style.position="fixed",Et.style.left="-10000px",Et.style.top="0px",Et.style.border="0",Et.width=wt.width.toString(),Et.height=wt.height.toString(),Et.scrolling="no",Et.setAttribute(ht,"true"),Bt.body.appendChild(Et),Et},$t=function(Bt){return new Promise(function(wt){if(Bt.complete){wt();return}if(!Bt.src){wt();return}Bt.onload=wt,Bt.onerror=wt})},Jt=function(Bt){return Promise.all([].slice.call(Bt.images,0).map($t))},ve=function(Bt){return new Promise(function(wt,Et){var Pt=Bt.contentWindow;if(!Pt)return Et("No window assigned for iframe");var jt=Pt.document;Pt.onload=Bt.onload=function(){Pt.onload=Bt.onload=null;var ue=setInterval(function(){jt.body.childNodes.length>0&&jt.readyState==="complete"&&(clearInterval(ue),wt(Bt))},50)}})},$e=["all","d","content"],Be=function(Bt,wt){for(var Et=Bt.length-1;Et>=0;Et--){var Pt=Bt.item(Et);$e.indexOf(Pt)===-1&&wt.style.setProperty(Pt,Bt.getPropertyValue(Pt))}return wt},Fn=function(Bt){var wt="";return Bt&&(wt+="<!DOCTYPE ",Bt.name&&(wt+=Bt.name),Bt.internalSubset&&(wt+=Bt.internalSubset),Bt.publicId&&(wt+='"'+Bt.publicId+'"'),Bt.systemId&&(wt+='"'+Bt.systemId+'"'),wt+=">"),wt},xn=function(Bt,wt,Et){Bt&&Bt.defaultView&&(wt!==Bt.defaultView.pageXOffset||Et!==Bt.defaultView.pageYOffset)&&Bt.defaultView.scrollTo(wt,Et)},vi=function(Bt){var wt=Bt[0],Et=Bt[1],Pt=Bt[2];wt.scrollLeft=Et,wt.scrollTop=Pt},Ci=":before",_i=":after",or="___html2canvas___pseudoelement_before",Ir="___html2canvas___pseudoelement_after",Sr=`{
content: "" !important;
display: none !important;
}`,_r=function(Bt){ho(Bt,"."+or+Ci+Sr+`
.`+Ir+_i+Sr)},ho=function(Bt,wt){var Et=Bt.ownerDocument;if(Et){var Pt=Et.createElement("style");Pt.textContent=wt,Bt.appendChild(Pt)}},wr=function(){function Bt(){}return Bt.getOrigin=function(wt){var Et=Bt._link;return Et?(Et.href=wt,Et.href=Et.href,Et.protocol+Et.hostname+Et.port):"about:blank"},Bt.isSameOrigin=function(wt){return Bt.getOrigin(wt)===Bt._origin},Bt.setContext=function(wt){Bt._link=wt.document.createElement("a"),Bt._origin=Bt.getOrigin(wt.location.href)},Bt._origin="about:blank",Bt}(),ko=function(){function Bt(wt,Et){this.context=wt,this._options=Et,this._cache={}}return Bt.prototype.addImage=function(wt){var Et=Promise.resolve();return this.has(wt)||(ul(wt)||yl(wt))&&(this._cache[wt]=this.loadImage(wt)).catch(function(){}),Et},Bt.prototype.match=function(wt){return this._cache[wt]},Bt.prototype.loadImage=function(wt){return Xt(this,void 0,void 0,function(){var Et,Pt,jt,ue,Ee=this;return Ae(this,function(Ye){switch(Ye.label){case 0:return Et=wr.isSameOrigin(wt),Pt=!Ua(wt)&&this._options.useCORS===!0&&ga.SUPPORT_CORS_IMAGES&&!Et,jt=!Ua(wt)&&!Et&&!ul(wt)&&typeof this._options.proxy=="string"&&ga.SUPPORT_CORS_XHR&&!Pt,!Et&&this._options.allowTaint===!1&&!Ua(wt)&&!ul(wt)&&!jt&&!Pt?[2]:(ue=wt,jt?[4,this.proxy(ue)]:[3,2]);case 1:ue=Ye.sent(),Ye.label=2;case 2:return this.context.logger.debug("Added image "+wt.substring(0,256)),[4,new Promise(function(Ne,En){var Un=new Image;Un.onload=function(){return Ne(Un)},Un.onerror=En,(Sa(ue)||Pt)&&(Un.crossOrigin="anonymous"),Un.src=ue,Un.complete===!0&&setTimeout(function(){return Ne(Un)},500),Ee._options.imageTimeout>0&&setTimeout(function(){return En("Timed out ("+Ee._options.imageTimeout+"ms) loading image")},Ee._options.imageTimeout)})];case 3:return[2,Ye.sent()]}})})},Bt.prototype.has=function(wt){return typeof this._cache[wt]!="undefined"},Bt.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},Bt.prototype.proxy=function(wt){var Et=this,Pt=this._options.proxy;if(!Pt)throw new Error("No proxy defined");var jt=wt.substring(0,256);return new Promise(function(ue,Ee){var Ye=ga.SUPPORT_RESPONSE_TYPE?"blob":"text",Ne=new XMLHttpRequest;Ne.onload=function(){if(Ne.status===200)if(Ye==="text")ue(Ne.response);else{var oi=new FileReader;oi.addEventListener("load",function(){return ue(oi.result)},!1),oi.addEventListener("error",function(bi){return Ee(bi)},!1),oi.readAsDataURL(Ne.response)}else Ee("Failed to proxy resource "+jt+" with status code "+Ne.status)},Ne.onerror=Ee;var En=Pt.indexOf("?")>-1?"&":"?";if(Ne.open("GET",""+Pt+En+"url="+encodeURIComponent(wt)+"&responseType="+Ye),Ye!=="text"&&Ne instanceof XMLHttpRequest&&(Ne.responseType=Ye),Et._options.imageTimeout){var Un=Et._options.imageTimeout;Ne.timeout=Un,Ne.ontimeout=function(){return Ee("Timed out ("+Un+"ms) proxying "+jt)}}Ne.send()})},Bt}(),Rs=/^data:image\/svg\+xml/i,Ea=/^data:image\/.*;base64,/i,Xs=/^data:image\/.*/i,yl=function(Bt){return ga.SUPPORT_SVG_DRAWING||!_a(Bt)},Ua=function(Bt){return Xs.test(Bt)},Sa=function(Bt){return Ea.test(Bt)},ul=function(Bt){return Bt.substr(0,4)==="blob"},_a=function(Bt){return Bt.substr(-3).toLowerCase()==="svg"||Rs.test(Bt)},mr=function(){function Bt(wt,Et){this.type=0,this.x=wt,this.y=Et}return Bt.prototype.add=function(wt,Et){return new Bt(this.x+wt,this.y+Et)},Bt}(),Zo=function(Bt,wt,Et){return new mr(Bt.x+(wt.x-Bt.x)*Et,Bt.y+(wt.y-Bt.y)*Et)},_s=function(){function Bt(wt,Et,Pt,jt){this.type=1,this.start=wt,this.startControl=Et,this.endControl=Pt,this.end=jt}return Bt.prototype.subdivide=function(wt,Et){var Pt=Zo(this.start,this.startControl,wt),jt=Zo(this.startControl,this.endControl,wt),ue=Zo(this.endControl,this.end,wt),Ee=Zo(Pt,jt,wt),Ye=Zo(jt,ue,wt),Ne=Zo(Ee,Ye,wt);return Et?new Bt(this.start,Pt,Ee,Ne):new Bt(Ne,Ye,ue,this.end)},Bt.prototype.add=function(wt,Et){return new Bt(this.start.add(wt,Et),this.startControl.add(wt,Et),this.endControl.add(wt,Et),this.end.add(wt,Et))},Bt.prototype.reverse=function(){return new Bt(this.end,this.endControl,this.startControl,this.start)},Bt}(),Ts=function(Bt){return Bt.type===1},Ka=function(){function Bt(wt){var Et=wt.styles,Pt=wt.bounds,jt=ma(Et.borderTopLeftRadius,Pt.width,Pt.height),ue=jt[0],Ee=jt[1],Ye=ma(Et.borderTopRightRadius,Pt.width,Pt.height),Ne=Ye[0],En=Ye[1],Un=ma(Et.borderBottomRightRadius,Pt.width,Pt.height),oi=Un[0],bi=Un[1],Hr=ma(Et.borderBottomLeftRadius,Pt.width,Pt.height),cr=Hr[0],Cr=Hr[1],Go=[];Go.push((ue+Ne)/Pt.width),Go.push((cr+oi)/Pt.width),Go.push((Ee+Cr)/Pt.height),Go.push((En+bi)/Pt.height);var oo=Math.max.apply(Math,Go);oo>1&&(ue/=oo,Ee/=oo,Ne/=oo,En/=oo,oi/=oo,bi/=oo,cr/=oo,Cr/=oo);var ao=Pt.width-Ne,uo=Pt.height-bi,qo=Pt.width-oi,To=Pt.height-Cr,Yr=Et.borderTopWidth,hs=Et.borderRightWidth,vs=Et.borderBottomWidth,Do=Et.borderLeftWidth,Ma=_o(Et.paddingTop,wt.bounds.width),Dl=_o(Et.paddingRight,wt.bounds.width),Jl=_o(Et.paddingBottom,wt.bounds.width),Ks=_o(Et.paddingLeft,wt.bounds.width);this.topLeftBorderDoubleOuterBox=ue>0||Ee>0?Po(Pt.left+Do/3,Pt.top+Yr/3,ue-Do/3,Ee-Yr/3,Jo.TOP_LEFT):new mr(Pt.left+Do/3,Pt.top+Yr/3),this.topRightBorderDoubleOuterBox=ue>0||Ee>0?Po(Pt.left+ao,Pt.top+Yr/3,Ne-hs/3,En-Yr/3,Jo.TOP_RIGHT):new mr(Pt.left+Pt.width-hs/3,Pt.top+Yr/3),this.bottomRightBorderDoubleOuterBox=oi>0||bi>0?Po(Pt.left+qo,Pt.top+uo,oi-hs/3,bi-vs/3,Jo.BOTTOM_RIGHT):new mr(Pt.left+Pt.width-hs/3,Pt.top+Pt.height-vs/3),this.bottomLeftBorderDoubleOuterBox=cr>0||Cr>0?Po(Pt.left+Do/3,Pt.top+To,cr-Do/3,Cr-vs/3,Jo.BOTTOM_LEFT):new mr(Pt.left+Do/3,Pt.top+Pt.height-vs/3),this.topLeftBorderDoubleInnerBox=ue>0||Ee>0?Po(Pt.left+Do*2/3,Pt.top+Yr*2/3,ue-Do*2/3,Ee-Yr*2/3,Jo.TOP_LEFT):new mr(Pt.left+Do*2/3,Pt.top+Yr*2/3),this.topRightBorderDoubleInnerBox=ue>0||Ee>0?Po(Pt.left+ao,Pt.top+Yr*2/3,Ne-hs*2/3,En-Yr*2/3,Jo.TOP_RIGHT):new mr(Pt.left+Pt.width-hs*2/3,Pt.top+Yr*2/3),this.bottomRightBorderDoubleInnerBox=oi>0||bi>0?Po(Pt.left+qo,Pt.top+uo,oi-hs*2/3,bi-vs*2/3,Jo.BOTTOM_RIGHT):new mr(Pt.left+Pt.width-hs*2/3,Pt.top+Pt.height-vs*2/3),this.bottomLeftBorderDoubleInnerBox=cr>0||Cr>0?Po(Pt.left+Do*2/3,Pt.top+To,cr-Do*2/3,Cr-vs*2/3,Jo.BOTTOM_LEFT):new mr(Pt.left+Do*2/3,Pt.top+Pt.height-vs*2/3),this.topLeftBorderStroke=ue>0||Ee>0?Po(Pt.left+Do/2,Pt.top+Yr/2,ue-Do/2,Ee-Yr/2,Jo.TOP_LEFT):new mr(Pt.left+Do/2,Pt.top+Yr/2),this.topRightBorderStroke=ue>0||Ee>0?Po(Pt.left+ao,Pt.top+Yr/2,Ne-hs/2,En-Yr/2,Jo.TOP_RIGHT):new mr(Pt.left+Pt.width-hs/2,Pt.top+Yr/2),this.bottomRightBorderStroke=oi>0||bi>0?Po(Pt.left+qo,Pt.top+uo,oi-hs/2,bi-vs/2,Jo.BOTTOM_RIGHT):new mr(Pt.left+Pt.width-hs/2,Pt.top+Pt.height-vs/2),this.bottomLeftBorderStroke=cr>0||Cr>0?Po(Pt.left+Do/2,Pt.top+To,cr-Do/2,Cr-vs/2,Jo.BOTTOM_LEFT):new mr(Pt.left+Do/2,Pt.top+Pt.height-vs/2),this.topLeftBorderBox=ue>0||Ee>0?Po(Pt.left,Pt.top,ue,Ee,Jo.TOP_LEFT):new mr(Pt.left,Pt.top),this.topRightBorderBox=Ne>0||En>0?Po(Pt.left+ao,Pt.top,Ne,En,Jo.TOP_RIGHT):new mr(Pt.left+Pt.width,Pt.top),this.bottomRightBorderBox=oi>0||bi>0?Po(Pt.left+qo,Pt.top+uo,oi,bi,Jo.BOTTOM_RIGHT):new mr(Pt.left+Pt.width,Pt.top+Pt.height),this.bottomLeftBorderBox=cr>0||Cr>0?Po(Pt.left,Pt.top+To,cr,Cr,Jo.BOTTOM_LEFT):new mr(Pt.left,Pt.top+Pt.height),this.topLeftPaddingBox=ue>0||Ee>0?Po(Pt.left+Do,Pt.top+Yr,Math.max(0,ue-Do),Math.max(0,Ee-Yr),Jo.TOP_LEFT):new mr(Pt.left+Do,Pt.top+Yr),this.topRightPaddingBox=Ne>0||En>0?Po(Pt.left+Math.min(ao,Pt.width-hs),Pt.top+Yr,ao>Pt.width+hs?0:Math.max(0,Ne-hs),Math.max(0,En-Yr),Jo.TOP_RIGHT):new mr(Pt.left+Pt.width-hs,Pt.top+Yr),this.bottomRightPaddingBox=oi>0||bi>0?Po(Pt.left+Math.min(qo,Pt.width-Do),Pt.top+Math.min(uo,Pt.height-vs),Math.max(0,oi-hs),Math.max(0,bi-vs),Jo.BOTTOM_RIGHT):new mr(Pt.left+Pt.width-hs,Pt.top+Pt.height-vs),this.bottomLeftPaddingBox=cr>0||Cr>0?Po(Pt.left+Do,Pt.top+Math.min(To,Pt.height-vs),Math.max(0,cr-Do),Math.max(0,Cr-vs),Jo.BOTTOM_LEFT):new mr(Pt.left+Do,Pt.top+Pt.height-vs),this.topLeftContentBox=ue>0||Ee>0?Po(Pt.left+Do+Ks,Pt.top+Yr+Ma,Math.max(0,ue-(Do+Ks)),Math.max(0,Ee-(Yr+Ma)),Jo.TOP_LEFT):new mr(Pt.left+Do+Ks,Pt.top+Yr+Ma),this.topRightContentBox=Ne>0||En>0?Po(Pt.left+Math.min(ao,Pt.width+Do+Ks),Pt.top+Yr+Ma,ao>Pt.width+Do+Ks?0:Ne-Do+Ks,En-(Yr+Ma),Jo.TOP_RIGHT):new mr(Pt.left+Pt.width-(hs+Dl),Pt.top+Yr+Ma),this.bottomRightContentBox=oi>0||bi>0?Po(Pt.left+Math.min(qo,Pt.width-(Do+Ks)),Pt.top+Math.min(uo,Pt.height+Yr+Ma),Math.max(0,oi-(hs+Dl)),bi-(vs+Jl),Jo.BOTTOM_RIGHT):new mr(Pt.left+Pt.width-(hs+Dl),Pt.top+Pt.height-(vs+Jl)),this.bottomLeftContentBox=cr>0||Cr>0?Po(Pt.left+Do+Ks,Pt.top+To,Math.max(0,cr-(Do+Ks)),Cr-(vs+Jl),Jo.BOTTOM_LEFT):new mr(Pt.left+Do+Ks,Pt.top+Pt.height-(vs+Jl))}return Bt}(),Jo;(function(Bt){Bt[Bt.TOP_LEFT=0]="TOP_LEFT",Bt[Bt.TOP_RIGHT=1]="TOP_RIGHT",Bt[Bt.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",Bt[Bt.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Jo||(Jo={}));var Po=function(Bt,wt,Et,Pt,jt){var ue=4*((Math.sqrt(2)-1)/3),Ee=Et*ue,Ye=Pt*ue,Ne=Bt+Et,En=wt+Pt;switch(jt){case Jo.TOP_LEFT:return new _s(new mr(Bt,En),new mr(Bt,En-Ye),new mr(Ne-Ee,wt),new mr(Ne,wt));case Jo.TOP_RIGHT:return new _s(new mr(Bt,wt),new mr(Bt+Ee,wt),new mr(Ne,En-Ye),new mr(Ne,En));case Jo.BOTTOM_RIGHT:return new _s(new mr(Ne,wt),new mr(Ne,wt+Ye),new mr(Bt+Ee,En),new mr(Bt,En));case Jo.BOTTOM_LEFT:default:return new _s(new mr(Ne,En),new mr(Ne-Ee,En),new mr(Bt,wt+Ye),new mr(Bt,wt))}},wl=function(Bt){return[Bt.topLeftBorderBox,Bt.topRightBorderBox,Bt.bottomRightBorderBox,Bt.bottomLeftBorderBox]},ia=function(Bt){return[Bt.topLeftContentBox,Bt.topRightContentBox,Bt.bottomRightContentBox,Bt.bottomLeftContentBox]},XA=function(Bt){return[Bt.topLeftPaddingBox,Bt.topRightPaddingBox,Bt.bottomRightPaddingBox,Bt.bottomLeftPaddingBox]},Yl=function(){function Bt(wt,Et,Pt){this.offsetX=wt,this.offsetY=Et,this.matrix=Pt,this.type=0,this.target=6}return Bt}(),Wa=function(){function Bt(wt,Et){this.path=wt,this.target=Et,this.type=1}return Bt}(),xl=function(){function Bt(wt){this.opacity=wt,this.type=2,this.target=6}return Bt}(),Es=function(Bt){return Bt.type===0},La=function(Bt){return Bt.type===1},nA=function(Bt){return Bt.type===2},Eh=function(Bt,wt){return Bt.length===wt.length?Bt.some(function(Et,Pt){return Et===wt[Pt]}):!1},qp=function(Bt,wt,Et,Pt,jt){return Bt.map(function(ue,Ee){switch(Ee){case 0:return ue.add(wt,Et);case 1:return ue.add(wt+Pt,Et);case 2:return ue.add(wt+Pt,Et+jt);case 3:return ue.add(wt,Et+jt)}return ue})},Sl=function(){function Bt(wt){this.element=wt,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return Bt}(),vg=function(){function Bt(wt,Et){if(this.container=wt,this.parent=Et,this.effects=[],this.curves=new Ka(this.container),this.container.styles.opacity<1&&this.effects.push(new xl(this.container.styles.opacity)),this.container.styles.transform!==null){var Pt=this.container.bounds.left+this.container.styles.transformOrigin[0].number,jt=this.container.bounds.top+this.container.styles.transformOrigin[1].number,ue=this.container.styles.transform;this.effects.push(new Yl(Pt,jt,ue))}if(this.container.styles.overflowX!==0){var Ee=wl(this.curves),Ye=XA(this.curves);Eh(Ee,Ye)?this.effects.push(new Wa(Ee,6)):(this.effects.push(new Wa(Ee,2)),this.effects.push(new Wa(Ye,4)))}}return Bt.prototype.getEffects=function(wt){for(var Et=[2,3].indexOf(this.container.styles.position)===-1,Pt=this.parent,jt=this.effects.slice(0);Pt;){var ue=Pt.effects.filter(function(Ne){return!La(Ne)});if(Et||Pt.container.styles.position!==0||!Pt.parent){if(jt.unshift.apply(jt,ue),Et=[2,3].indexOf(Pt.container.styles.position)===-1,Pt.container.styles.overflowX!==0){var Ee=wl(Pt.curves),Ye=XA(Pt.curves);Eh(Ee,Ye)||jt.unshift(new Wa(Ye,6))}}else jt.unshift.apply(jt,ue);Pt=Pt.parent}return jt.filter(function(Ne){return xa(Ne.target,wt)})},Bt}(),iA=function(Bt,wt,Et,Pt){Bt.container.elements.forEach(function(jt){var ue=xa(jt.flags,4),Ee=xa(jt.flags,2),Ye=new vg(jt,Bt);xa(jt.styles.display,2048)&&Pt.push(Ye);var Ne=xa(jt.flags,8)?[]:Pt;if(ue||Ee){var En=ue||jt.styles.isPositioned()?Et:wt,Un=new Sl(Ye);if(jt.styles.isPositioned()||jt.styles.opacity<1||jt.styles.isTransformed()){var oi=jt.styles.zIndex.order;if(oi<0){var bi=0;En.negativeZIndex.some(function(cr,Cr){return oi>cr.element.container.styles.zIndex.order?(bi=Cr,!1):bi>0}),En.negativeZIndex.splice(bi,0,Un)}else if(oi>0){var Hr=0;En.positiveZIndex.some(function(cr,Cr){return oi>=cr.element.container.styles.zIndex.order?(Hr=Cr+1,!1):Hr>0}),En.positiveZIndex.splice(Hr,0,Un)}else En.zeroOrAutoZIndexOrTransformedOrOpacity.push(Un)}else jt.styles.isFloating()?En.nonPositionedFloats.push(Un):En.nonPositionedInlineLevel.push(Un);iA(Ye,Un,ue?Un:Et,Ne)}else jt.styles.isInlineLevel()?wt.inlineLevel.push(Ye):wt.nonInlineLevel.push(Ye),iA(Ye,wt,Et,Ne);xa(jt.flags,8)&&Df(jt,Ne)})},Df=function(Bt,wt){for(var Et=Bt instanceof $c?Bt.start:1,Pt=Bt instanceof $c?Bt.reversed:!1,jt=0;jt<wt.length;jt++){var ue=wt[jt];ue.container instanceof VA&&typeof ue.container.value=="number"&&ue.container.value!==0&&(Et=ue.container.value),ue.listValue=ct(Et,ue.container.styles.listStyleType,!0),Et+=Pt?-1:1}},Zd=function(Bt){var wt=new vg(Bt,null),Et=new Sl(wt),Pt=[];return iA(wt,Et,Et,Pt),Df(wt.container,Pt),Et},hc=function(Bt,wt){switch(wt){case 0:return Ba(Bt.topLeftBorderBox,Bt.topLeftPaddingBox,Bt.topRightBorderBox,Bt.topRightPaddingBox);case 1:return Ba(Bt.topRightBorderBox,Bt.topRightPaddingBox,Bt.bottomRightBorderBox,Bt.bottomRightPaddingBox);case 2:return Ba(Bt.bottomRightBorderBox,Bt.bottomRightPaddingBox,Bt.bottomLeftBorderBox,Bt.bottomLeftPaddingBox);case 3:default:return Ba(Bt.bottomLeftBorderBox,Bt.bottomLeftPaddingBox,Bt.topLeftBorderBox,Bt.topLeftPaddingBox)}},Lh=function(Bt,wt){switch(wt){case 0:return Ba(Bt.topLeftBorderBox,Bt.topLeftBorderDoubleOuterBox,Bt.topRightBorderBox,Bt.topRightBorderDoubleOuterBox);case 1:return Ba(Bt.topRightBorderBox,Bt.topRightBorderDoubleOuterBox,Bt.bottomRightBorderBox,Bt.bottomRightBorderDoubleOuterBox);case 2:return Ba(Bt.bottomRightBorderBox,Bt.bottomRightBorderDoubleOuterBox,Bt.bottomLeftBorderBox,Bt.bottomLeftBorderDoubleOuterBox);case 3:default:return Ba(Bt.bottomLeftBorderBox,Bt.bottomLeftBorderDoubleOuterBox,Bt.topLeftBorderBox,Bt.topLeftBorderDoubleOuterBox)}},If=function(Bt,wt){switch(wt){case 0:return Ba(Bt.topLeftBorderDoubleInnerBox,Bt.topLeftPaddingBox,Bt.topRightBorderDoubleInnerBox,Bt.topRightPaddingBox);case 1:return Ba(Bt.topRightBorderDoubleInnerBox,Bt.topRightPaddingBox,Bt.bottomRightBorderDoubleInnerBox,Bt.bottomRightPaddingBox);case 2:return Ba(Bt.bottomRightBorderDoubleInnerBox,Bt.bottomRightPaddingBox,Bt.bottomLeftBorderDoubleInnerBox,Bt.bottomLeftPaddingBox);case 3:default:return Ba(Bt.bottomLeftBorderDoubleInnerBox,Bt.bottomLeftPaddingBox,Bt.topLeftBorderDoubleInnerBox,Bt.topLeftPaddingBox)}},cc=function(Bt,wt){switch(wt){case 0:return JA(Bt.topLeftBorderStroke,Bt.topRightBorderStroke);case 1:return JA(Bt.topRightBorderStroke,Bt.bottomRightBorderStroke);case 2:return JA(Bt.bottomRightBorderStroke,Bt.bottomLeftBorderStroke);case 3:default:return JA(Bt.bottomLeftBorderStroke,Bt.topLeftBorderStroke)}},JA=function(Bt,wt){var Et=[];return Ts(Bt)?Et.push(Bt.subdivide(.5,!1)):Et.push(Bt),Ts(wt)?Et.push(wt.subdivide(.5,!0)):Et.push(wt),Et},Ba=function(Bt,wt,Et,Pt){var jt=[];return Ts(Bt)?jt.push(Bt.subdivide(.5,!1)):jt.push(Bt),Ts(Et)?jt.push(Et.subdivide(.5,!0)):jt.push(Et),Ts(Pt)?jt.push(Pt.subdivide(.5,!0).reverse()):jt.push(Pt),Ts(wt)?jt.push(wt.subdivide(.5,!1).reverse()):jt.push(wt),jt},Ya=function(Bt){var wt=Bt.bounds,Et=Bt.styles;return wt.add(Et.borderLeftWidth,Et.borderTopWidth,-(Et.borderRightWidth+Et.borderLeftWidth),-(Et.borderTopWidth+Et.borderBottomWidth))},Uf=function(Bt){var wt=Bt.styles,Et=Bt.bounds,Pt=_o(wt.paddingLeft,Et.width),jt=_o(wt.paddingRight,Et.width),ue=_o(wt.paddingTop,Et.width),Ee=_o(wt.paddingBottom,Et.width);return Et.add(Pt+wt.borderLeftWidth,ue+wt.borderTopWidth,-(wt.borderRightWidth+wt.borderLeftWidth+Pt+jt),-(wt.borderTopWidth+wt.borderBottomWidth+ue+Ee))},$p=function(Bt,wt){return Bt===0?wt.bounds:Bt===2?Uf(wt):Ya(wt)},t0=function(Bt,wt){return Bt===0?wt.bounds:Bt===2?Uf(wt):Ya(wt)},dc=function(Bt,wt,Et){var Pt=$p(gc(Bt.styles.backgroundOrigin,wt),Bt),jt=t0(gc(Bt.styles.backgroundClip,wt),Bt),ue=e0(gc(Bt.styles.backgroundSize,wt),Et,Pt),Ee=ue[0],Ye=ue[1],Ne=ma(gc(Bt.styles.backgroundPosition,wt),Pt.width-Ee,Pt.height-Ye),En=Of(gc(Bt.styles.backgroundRepeat,wt),Ne,ue,Pt,jt),Un=Math.round(Pt.left+Ne[0]),oi=Math.round(Pt.top+Ne[1]);return[En,Un,oi,Ee,Ye]},fc=function(Bt){return Bo(Bt)&&Bt.value===Yu.AUTO},Qf=function(Bt){return typeof Bt=="number"},e0=function(Bt,wt,Et){var Pt=wt[0],jt=wt[1],ue=wt[2],Ee=Bt[0],Ye=Bt[1];if(!Ee)return[0,0];if(jo(Ee)&&Ye&&jo(Ye))return[_o(Ee,Et.width),_o(Ye,Et.height)];var Ne=Qf(ue);if(Bo(Ee)&&(Ee.value===Yu.CONTAIN||Ee.value===Yu.COVER)){if(Qf(ue)){var En=Et.width/Et.height;return En<ue!=(Ee.value===Yu.COVER)?[Et.width,Et.width/ue]:[Et.height*ue,Et.height]}return[Et.width,Et.height]}var Un=Qf(Pt),oi=Qf(jt),bi=Un||oi;if(fc(Ee)&&(!Ye||fc(Ye))){if(Un&&oi)return[Pt,jt];if(!Ne&&!bi)return[Et.width,Et.height];if(bi&&Ne){var Hr=Un?Pt:jt*ue,cr=oi?jt:Pt/ue;return[Hr,cr]}var Cr=Un?Pt:Et.width,Go=oi?jt:Et.height;return[Cr,Go]}if(Ne){var oo=0,ao=0;return jo(Ee)?oo=_o(Ee,Et.width):jo(Ye)&&(ao=_o(Ye,Et.height)),fc(Ee)?oo=ao*ue:(!Ye||fc(Ye))&&(ao=oo/ue),[oo,ao]}var uo=null,qo=null;if(jo(Ee)?uo=_o(Ee,Et.width):Ye&&jo(Ye)&&(qo=_o(Ye,Et.height)),uo!==null&&(!Ye||fc(Ye))&&(qo=Un&&oi?uo/Pt*jt:Et.height),qo!==null&&fc(Ee)&&(uo=Un&&oi?qo/jt*Pt:Et.width),uo!==null&&qo!==null)return[uo,qo];throw new Error("Unable to calculate background-size for element")},gc=function(Bt,wt){var Et=Bt[wt];return typeof Et=="undefined"?Bt[0]:Et},Of=function(Bt,wt,Et,Pt,jt){var ue=wt[0],Ee=wt[1],Ye=Et[0],Ne=Et[1];switch(Bt){case 2:return[new mr(Math.round(Pt.left),Math.round(Pt.top+Ee)),new mr(Math.round(Pt.left+Pt.width),Math.round(Pt.top+Ee)),new mr(Math.round(Pt.left+Pt.width),Math.round(Ne+Pt.top+Ee)),new mr(Math.round(Pt.left),Math.round(Ne+Pt.top+Ee))];case 3:return[new mr(Math.round(Pt.left+ue),Math.round(Pt.top)),new mr(Math.round(Pt.left+ue+Ye),Math.round(Pt.top)),new mr(Math.round(Pt.left+ue+Ye),Math.round(Pt.height+Pt.top)),new mr(Math.round(Pt.left+ue),Math.round(Pt.height+Pt.top))];case 1:return[new mr(Math.round(Pt.left+ue),Math.round(Pt.top+Ee)),new mr(Math.round(Pt.left+ue+Ye),Math.round(Pt.top+Ee)),new mr(Math.round(Pt.left+ue+Ye),Math.round(Pt.top+Ee+Ne)),new mr(Math.round(Pt.left+ue),Math.round(Pt.top+Ee+Ne))];default:return[new mr(Math.round(jt.left),Math.round(jt.top)),new mr(Math.round(jt.left+jt.width),Math.round(jt.top)),new mr(Math.round(jt.left+jt.width),Math.round(jt.height+jt.top)),new mr(Math.round(jt.left),Math.round(jt.height+jt.top))]}},yg="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Ou="Hidden Text",SA=function(){function Bt(wt){this._data={},this._document=wt}return Bt.prototype.parseMetrics=function(wt,Et){var Pt=this._document.createElement("div"),jt=this._document.createElement("img"),ue=this._document.createElement("span"),Ee=this._document.body;Pt.style.visibility="hidden",Pt.style.fontFamily=wt,Pt.style.fontSize=Et,Pt.style.margin="0",Pt.style.padding="0",Pt.style.whiteSpace="nowrap",Ee.appendChild(Pt),jt.src=yg,jt.width=1,jt.height=1,jt.style.margin="0",jt.style.padding="0",jt.style.verticalAlign="baseline",ue.style.fontFamily=wt,ue.style.fontSize=Et,ue.style.margin="0",ue.style.padding="0",ue.appendChild(this._document.createTextNode(Ou)),Pt.appendChild(ue),Pt.appendChild(jt);var Ye=jt.offsetTop-ue.offsetTop+2;Pt.removeChild(ue),Pt.appendChild(this._document.createTextNode(Ou)),Pt.style.lineHeight="normal",jt.style.verticalAlign="super";var Ne=jt.offsetTop-Pt.offsetTop+2;return Ee.removeChild(Pt),{baseline:Ye,middle:Ne}},Bt.prototype.getMetrics=function(wt,Et){var Pt=wt+" "+Et;return typeof this._data[Pt]=="undefined"&&(this._data[Pt]=this.parseMetrics(wt,Et)),this._data[Pt]},Bt}(),Hf=function(){function Bt(wt,Et){this.context=wt,this.options=Et}return Bt}(),Xl=1e4,pc=function(Bt){Ut(wt,Bt);function wt(Et,Pt){var jt=Bt.call(this,Et,Pt)||this;return jt._activeEffects=[],jt.canvas=Pt.canvas?Pt.canvas:document.createElement("canvas"),jt.ctx=jt.canvas.getContext("2d"),Pt.canvas||(jt.canvas.width=Math.floor(Pt.width*Pt.scale),jt.canvas.height=Math.floor(Pt.height*Pt.scale),jt.canvas.style.width=Pt.width+"px",jt.canvas.style.height=Pt.height+"px"),jt.fontMetrics=new SA(document),jt.ctx.scale(jt.options.scale,jt.options.scale),jt.ctx.translate(-Pt.x,-Pt.y),jt.ctx.textBaseline="bottom",jt._activeEffects=[],jt.context.logger.debug("Canvas renderer initialized ("+Pt.width+"x"+Pt.height+") with scale "+Pt.scale),jt}return wt.prototype.applyEffects=function(Et){for(var Pt=this;this._activeEffects.length;)this.popEffect();Et.forEach(function(jt){return Pt.applyEffect(jt)})},wt.prototype.applyEffect=function(Et){this.ctx.save(),nA(Et)&&(this.ctx.globalAlpha=Et.opacity),Es(Et)&&(this.ctx.translate(Et.offsetX,Et.offsetY),this.ctx.transform(Et.matrix[0],Et.matrix[1],Et.matrix[2],Et.matrix[3],Et.matrix[4],Et.matrix[5]),this.ctx.translate(-Et.offsetX,-Et.offsetY)),La(Et)&&(this.path(Et.path),this.ctx.clip()),this._activeEffects.push(Et)},wt.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},wt.prototype.renderStack=function(Et){return Xt(this,void 0,void 0,function(){var Pt;return Ae(this,function(jt){switch(jt.label){case 0:return Pt=Et.element.container.styles,Pt.isVisible()?[4,this.renderStackContent(Et)]:[3,2];case 1:jt.sent(),jt.label=2;case 2:return[2]}})})},wt.prototype.renderNode=function(Et){return Xt(this,void 0,void 0,function(){return Ae(this,function(Pt){switch(Pt.label){case 0:if(xa(Et.container.flags,16))debugger;return Et.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(Et)]:[3,3];case 1:return Pt.sent(),[4,this.renderNodeContent(Et)];case 2:Pt.sent(),Pt.label=3;case 3:return[2]}})})},wt.prototype.renderTextWithLetterSpacing=function(Et,Pt,jt){var ue=this;if(Pt===0)this.ctx.fillText(Et.text,Et.bounds.left,Et.bounds.top+jt);else{var Ee=$h(Et.text);Ee.reduce(function(Ye,Ne){return ue.ctx.fillText(Ne,Ye,Et.bounds.top+jt),Ye+ue.ctx.measureText(Ne).width},Et.bounds.left)}},wt.prototype.createFontStyle=function(Et){var Pt=Et.fontVariant.filter(function(Ee){return Ee==="normal"||Ee==="small-caps"}).join(""),jt=i0(Et.fontFamily).join(", "),ue=yo(Et.fontSize)?""+Et.fontSize.number+Et.fontSize.unit:Et.fontSize.number+"px";return[[Et.fontStyle,Pt,Et.fontWeight,ue,jt].join(" "),jt,ue]},wt.prototype.renderTextNode=function(Et,Pt){return Xt(this,void 0,void 0,function(){var jt,ue,Ee,Ye,Ne,En,Un,oi,bi=this;return Ae(this,function(Hr){return jt=this.createFontStyle(Pt),ue=jt[0],Ee=jt[1],Ye=jt[2],this.ctx.font=ue,this.ctx.direction=Pt.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",Ne=this.fontMetrics.getMetrics(Ee,Ye),En=Ne.baseline,Un=Ne.middle,oi=Pt.paintOrder,Et.textBounds.forEach(function(cr){oi.forEach(function(Cr){switch(Cr){case 0:bi.ctx.fillStyle=Yo(Pt.color),bi.renderTextWithLetterSpacing(cr,Pt.letterSpacing,En);var Go=Pt.textShadow;Go.length&&cr.text.trim().length&&(Go.slice(0).reverse().forEach(function(oo){bi.ctx.shadowColor=Yo(oo.color),bi.ctx.shadowOffsetX=oo.offsetX.number*bi.options.scale,bi.ctx.shadowOffsetY=oo.offsetY.number*bi.options.scale,bi.ctx.shadowBlur=oo.blur.number,bi.renderTextWithLetterSpacing(cr,Pt.letterSpacing,En)}),bi.ctx.shadowColor="",bi.ctx.shadowOffsetX=0,bi.ctx.shadowOffsetY=0,bi.ctx.shadowBlur=0),Pt.textDecorationLine.length&&(bi.ctx.fillStyle=Yo(Pt.textDecorationColor||Pt.color),Pt.textDecorationLine.forEach(function(oo){switch(oo){case 1:bi.ctx.fillRect(cr.bounds.left,Math.round(cr.bounds.top+En),cr.bounds.width,1);break;case 2:bi.ctx.fillRect(cr.bounds.left,Math.round(cr.bounds.top),cr.bounds.width,1);break;case 3:bi.ctx.fillRect(cr.bounds.left,Math.ceil(cr.bounds.top+Un),cr.bounds.width,1);break}}));break;case 1:Pt.webkitTextStrokeWidth&&cr.text.trim().length&&(bi.ctx.strokeStyle=Yo(Pt.webkitTextStrokeColor),bi.ctx.lineWidth=Pt.webkitTextStrokeWidth,bi.ctx.lineJoin=window.chrome?"miter":"round",bi.ctx.strokeText(cr.text,cr.bounds.left,cr.bounds.top+En)),bi.ctx.strokeStyle="",bi.ctx.lineWidth=0,bi.ctx.lineJoin="miter";break}})}),[2]})})},wt.prototype.renderReplacedElement=function(Et,Pt,jt){if(jt&&Et.intrinsicWidth>0&&Et.intrinsicHeight>0){var ue=Uf(Et),Ee=XA(Pt);this.path(Ee),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(jt,0,0,Et.intrinsicWidth,Et.intrinsicHeight,ue.left,ue.top,ue.width,ue.height),this.ctx.restore()}},wt.prototype.renderNodeContent=function(Et){return Xt(this,void 0,void 0,function(){var Pt,jt,ue,Ee,Ye,Ne,ao,ao,En,Un,oi,bi,qo,Hr,cr,To,Cr,Go,oo,ao,uo,qo,To;return Ae(this,function(Yr){switch(Yr.label){case 0:this.applyEffects(Et.getEffects(4)),Pt=Et.container,jt=Et.curves,ue=Pt.styles,Ee=0,Ye=Pt.textNodes,Yr.label=1;case 1:return Ee<Ye.length?(Ne=Ye[Ee],[4,this.renderTextNode(Ne,ue)]):[3,4];case 2:Yr.sent(),Yr.label=3;case 3:return Ee++,[3,1];case 4:if(!(Pt instanceof Xc))return[3,8];Yr.label=5;case 5:return Yr.trys.push([5,7,,8]),[4,this.context.cache.match(Pt.src)];case 6:return ao=Yr.sent(),this.renderReplacedElement(Pt,jt,ao),[3,8];case 7:return Yr.sent(),this.context.logger.error("Error loading image "+Pt.src),[3,8];case 8:if(Pt instanceof Jc&&this.renderReplacedElement(Pt,jt,Pt.canvas),!(Pt instanceof qc))return[3,12];Yr.label=9;case 9:return Yr.trys.push([9,11,,12]),[4,this.context.cache.match(Pt.svg)];case 10:return ao=Yr.sent(),this.renderReplacedElement(Pt,jt,ao),[3,12];case 11:return Yr.sent(),this.context.logger.error("Error loading svg "+Pt.svg.substring(0,255)),[3,12];case 12:return Pt instanceof Lf&&Pt.tree?(En=new wt(this.context,{scale:this.options.scale,backgroundColor:Pt.backgroundColor,x:0,y:0,width:Pt.width,height:Pt.height}),[4,En.render(Pt.tree)]):[3,14];case 13:Un=Yr.sent(),Pt.width&&Pt.height&&this.ctx.drawImage(Un,0,0,Pt.width,Pt.height,Pt.bounds.left,Pt.bounds.top,Pt.bounds.width,Pt.bounds.height),Yr.label=14;case 14:if(Pt instanceof ru&&(oi=Math.min(Pt.bounds.width,Pt.bounds.height),Pt.type===ic?Pt.checked&&(this.ctx.save(),this.path([new mr(Pt.bounds.left+oi*.39363,Pt.bounds.top+oi*.79),new mr(Pt.bounds.left+oi*.16,Pt.bounds.top+oi*.5549),new mr(Pt.bounds.left+oi*.27347,Pt.bounds.top+oi*.44071),new mr(Pt.bounds.left+oi*.39694,Pt.bounds.top+oi*.5649),new mr(Pt.bounds.left+oi*.72983,Pt.bounds.top+oi*.23),new mr(Pt.bounds.left+oi*.84,Pt.bounds.top+oi*.34085),new mr(Pt.bounds.left+oi*.39363,Pt.bounds.top+oi*.79)]),this.ctx.fillStyle=Yo(Hd),this.ctx.fill(),this.ctx.restore()):Pt.type===vA&&Pt.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(Pt.bounds.left+oi/2,Pt.bounds.top+oi/2,oi/4,0,Math.PI*2,!0),this.ctx.fillStyle=Yo(Hd),this.ctx.fill(),this.ctx.restore())),Tm(Pt)&&Pt.value.length){switch(bi=this.createFontStyle(ue),qo=bi[0],Hr=bi[1],cr=this.fontMetrics.getMetrics(qo,Hr).baseline,this.ctx.font=qo,this.ctx.fillStyle=Yo(ue.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=lo(Pt.styles.textAlign),To=Uf(Pt),Cr=0,Pt.styles.textAlign){case 1:Cr+=To.width/2;break;case 2:Cr+=To.width;break}Go=To.add(Cr,0,0,-To.height/2+1),this.ctx.save(),this.path([new mr(To.left,To.top),new mr(To.left+To.width,To.top),new mr(To.left+To.width,To.top+To.height),new mr(To.left,To.top+To.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Ra(Pt.value,Go),ue.letterSpacing,cr),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!xa(Pt.styles.display,2048))return[3,20];if(Pt.styles.listStyleImage===null)return[3,19];if(oo=Pt.styles.listStyleImage,oo.type!==0)return[3,18];ao=void 0,uo=oo.url,Yr.label=15;case 15:return Yr.trys.push([15,17,,18]),[4,this.context.cache.match(uo)];case 16:return ao=Yr.sent(),this.ctx.drawImage(ao,Pt.bounds.left-(ao.width+10),Pt.bounds.top),[3,18];case 17:return Yr.sent(),this.context.logger.error("Error loading list-style-image "+uo),[3,18];case 18:return[3,20];case 19:Et.listValue&&Pt.styles.listStyleType!==-1&&(qo=this.createFontStyle(ue)[0],this.ctx.font=qo,this.ctx.fillStyle=Yo(ue.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",To=new fe(Pt.bounds.left,Pt.bounds.top+_o(Pt.styles.paddingTop,Pt.bounds.width),Pt.bounds.width,wa(ue.lineHeight,ue.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Ra(Et.listValue,To),ue.letterSpacing,wa(ue.lineHeight,ue.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),Yr.label=20;case 20:return[2]}})})},wt.prototype.renderStackContent=function(Et){return Xt(this,void 0,void 0,function(){var Pt,jt,oo,ue,Ee,oo,Ye,Ne,oo,En,Un,oo,oi,bi,oo,Hr,cr,oo,Cr,Go,oo;return Ae(this,function(ao){switch(ao.label){case 0:if(xa(Et.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(Et.element)];case 1:ao.sent(),Pt=0,jt=Et.negativeZIndex,ao.label=2;case 2:return Pt<jt.length?(oo=jt[Pt],[4,this.renderStack(oo)]):[3,5];case 3:ao.sent(),ao.label=4;case 4:return Pt++,[3,2];case 5:return[4,this.renderNodeContent(Et.element)];case 6:ao.sent(),ue=0,Ee=Et.nonInlineLevel,ao.label=7;case 7:return ue<Ee.length?(oo=Ee[ue],[4,this.renderNode(oo)]):[3,10];case 8:ao.sent(),ao.label=9;case 9:return ue++,[3,7];case 10:Ye=0,Ne=Et.nonPositionedFloats,ao.label=11;case 11:return Ye<Ne.length?(oo=Ne[Ye],[4,this.renderStack(oo)]):[3,14];case 12:ao.sent(),ao.label=13;case 13:return Ye++,[3,11];case 14:En=0,Un=Et.nonPositionedInlineLevel,ao.label=15;case 15:return En<Un.length?(oo=Un[En],[4,this.renderStack(oo)]):[3,18];case 16:ao.sent(),ao.label=17;case 17:return En++,[3,15];case 18:oi=0,bi=Et.inlineLevel,ao.label=19;case 19:return oi<bi.length?(oo=bi[oi],[4,this.renderNode(oo)]):[3,22];case 20:ao.sent(),ao.label=21;case 21:return oi++,[3,19];case 22:Hr=0,cr=Et.zeroOrAutoZIndexOrTransformedOrOpacity,ao.label=23;case 23:return Hr<cr.length?(oo=cr[Hr],[4,this.renderStack(oo)]):[3,26];case 24:ao.sent(),ao.label=25;case 25:return Hr++,[3,23];case 26:Cr=0,Go=Et.positiveZIndex,ao.label=27;case 27:return Cr<Go.length?(oo=Go[Cr],[4,this.renderStack(oo)]):[3,30];case 28:ao.sent(),ao.label=29;case 29:return Cr++,[3,27];case 30:return[2]}})})},wt.prototype.mask=function(Et){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(Et.slice(0).reverse()),this.ctx.closePath()},wt.prototype.path=function(Et){this.ctx.beginPath(),this.formatPath(Et),this.ctx.closePath()},wt.prototype.formatPath=function(Et){var Pt=this;Et.forEach(function(jt,ue){var Ee=Ts(jt)?jt.start:jt;ue===0?Pt.ctx.moveTo(Ee.x,Ee.y):Pt.ctx.lineTo(Ee.x,Ee.y),Ts(jt)&&Pt.ctx.bezierCurveTo(jt.startControl.x,jt.startControl.y,jt.endControl.x,jt.endControl.y,jt.end.x,jt.end.y)})},wt.prototype.renderRepeat=function(Et,Pt,jt,ue){this.path(Et),this.ctx.fillStyle=Pt,this.ctx.translate(jt,ue),this.ctx.fill(),this.ctx.translate(-jt,-ue)},wt.prototype.resizeImage=function(Et,Pt,jt){var ue;if(Et.width===Pt&&Et.height===jt)return Et;var Ee=(ue=this.canvas.ownerDocument)!==null&&ue!==void 0?ue:document,Ye=Ee.createElement("canvas");Ye.width=Math.max(1,Pt),Ye.height=Math.max(1,jt);var Ne=Ye.getContext("2d");return Ne.drawImage(Et,0,0,Et.width,Et.height,0,0,Pt,jt),Ye},wt.prototype.renderBackgroundImage=function(Et){return Xt(this,void 0,void 0,function(){var Pt,jt,ue,Ee,Ye,Ne;return Ae(this,function(En){switch(En.label){case 0:Pt=Et.styles.backgroundImage.length-1,jt=function(Un){var oi,bi,Hr,Ma,Il,ou,Ks,Ga,vs,cr,Ma,Il,ou,Ks,Ga,Cr,Go,oo,ao,uo,qo,To,Yr,hs,vs,Do,Ma,Dl,Jl,Ks,Ga,CA,Il,ou,PA,Bn,qA,mc,$A,th,Mh,Al;return Ae(this,function(Hu){switch(Hu.label){case 0:if(Un.type!==0)return[3,5];oi=void 0,bi=Un.url,Hu.label=1;case 1:return Hu.trys.push([1,3,,4]),[4,ue.context.cache.match(bi)];case 2:return oi=Hu.sent(),[3,4];case 3:return Hu.sent(),ue.context.logger.error("Error loading background-image "+bi),[3,4];case 4:return oi&&(Hr=dc(Et,Pt,[oi.width,oi.height,oi.width/oi.height]),Ma=Hr[0],Il=Hr[1],ou=Hr[2],Ks=Hr[3],Ga=Hr[4],vs=ue.ctx.createPattern(ue.resizeImage(oi,Ks,Ga),"repeat"),ue.renderRepeat(Ma,vs,Il,ou)),[3,6];case 5:Wu(Un)?(cr=dc(Et,Pt,[null,null,null]),Ma=cr[0],Il=cr[1],ou=cr[2],Ks=cr[3],Ga=cr[4],Cr=du(Un.angle,Ks,Ga),Go=Cr[0],oo=Cr[1],ao=Cr[2],uo=Cr[3],qo=Cr[4],To=document.createElement("canvas"),To.width=Ks,To.height=Ga,Yr=To.getContext("2d"),hs=Yr.createLinearGradient(oo,uo,ao,qo),bn(Un.stops,Go).forEach(function(Xd){return hs.addColorStop(Xd.stop,Yo(Xd.color))}),Yr.fillStyle=hs,Yr.fillRect(0,0,Ks,Ga),Ks>0&&Ga>0&&(vs=ue.ctx.createPattern(To,"repeat"),ue.renderRepeat(Ma,vs,Il,ou))):Qo(Un)&&(Do=dc(Et,Pt,[null,null,null]),Ma=Do[0],Dl=Do[1],Jl=Do[2],Ks=Do[3],Ga=Do[4],CA=Un.position.length===0?[rl]:Un.position,Il=_o(CA[0],Ks),ou=_o(CA[CA.length-1],Ga),PA=gl(Un,Il,ou,Ks,Ga),Bn=PA[0],qA=PA[1],Bn>0&&qA>0&&(mc=ue.ctx.createRadialGradient(Dl+Il,Jl+ou,0,Dl+Il,Jl+ou,Bn),bn(Un.stops,Bn*2).forEach(function(Xd){return mc.addColorStop(Xd.stop,Yo(Xd.color))}),ue.path(Ma),ue.ctx.fillStyle=mc,Bn!==qA?($A=Et.bounds.left+.5*Et.bounds.width,th=Et.bounds.top+.5*Et.bounds.height,Mh=qA/Bn,Al=1/Mh,ue.ctx.save(),ue.ctx.translate($A,th),ue.ctx.transform(1,0,0,Mh,0,0),ue.ctx.translate(-$A,-th),ue.ctx.fillRect(Dl,Al*(Jl-th)+th,Ks,Ga*Al),ue.ctx.restore()):ue.ctx.fill())),Hu.label=6;case 6:return Pt--,[2]}})},ue=this,Ee=0,Ye=Et.styles.backgroundImage.slice(0).reverse(),En.label=1;case 1:return Ee<Ye.length?(Ne=Ye[Ee],[5,jt(Ne)]):[3,4];case 2:En.sent(),En.label=3;case 3:return Ee++,[3,1];case 4:return[2]}})})},wt.prototype.renderSolidBorder=function(Et,Pt,jt){return Xt(this,void 0,void 0,function(){return Ae(this,function(ue){return this.path(hc(jt,Pt)),this.ctx.fillStyle=Yo(Et),this.ctx.fill(),[2]})})},wt.prototype.renderDoubleBorder=function(Et,Pt,jt,ue){return Xt(this,void 0,void 0,function(){var Ee,Ye;return Ae(this,function(Ne){switch(Ne.label){case 0:return Pt<3?[4,this.renderSolidBorder(Et,jt,ue)]:[3,2];case 1:return Ne.sent(),[2];case 2:return Ee=Lh(ue,jt),this.path(Ee),this.ctx.fillStyle=Yo(Et),this.ctx.fill(),Ye=If(ue,jt),this.path(Ye),this.ctx.fill(),[2]}})})},wt.prototype.renderNodeBackgroundAndBorders=function(Et){return Xt(this,void 0,void 0,function(){var Pt,jt,ue,Ee,Ye,Ne,En,Un,oi=this;return Ae(this,function(bi){switch(bi.label){case 0:return this.applyEffects(Et.getEffects(2)),Pt=Et.container.styles,jt=!Bs(Pt.backgroundColor)||Pt.backgroundImage.length,ue=[{style:Pt.borderTopStyle,color:Pt.borderTopColor,width:Pt.borderTopWidth},{style:Pt.borderRightStyle,color:Pt.borderRightColor,width:Pt.borderRightWidth},{style:Pt.borderBottomStyle,color:Pt.borderBottomColor,width:Pt.borderBottomWidth},{style:Pt.borderLeftStyle,color:Pt.borderLeftColor,width:Pt.borderLeftWidth}],Ee=Rf(gc(Pt.backgroundClip,0),Et.curves),jt||Pt.boxShadow.length?(this.ctx.save(),this.path(Ee),this.ctx.clip(),Bs(Pt.backgroundColor)||(this.ctx.fillStyle=Yo(Pt.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(Et.container)]):[3,2];case 1:bi.sent(),this.ctx.restore(),Pt.boxShadow.slice(0).reverse().forEach(function(Hr){oi.ctx.save();var cr=wl(Et.curves),Cr=Hr.inset?0:Xl,Go=qp(cr,-Cr+(Hr.inset?1:-1)*Hr.spread.number,(Hr.inset?1:-1)*Hr.spread.number,Hr.spread.number*(Hr.inset?-2:2),Hr.spread.number*(Hr.inset?-2:2));Hr.inset?(oi.path(cr),oi.ctx.clip(),oi.mask(Go)):(oi.mask(cr),oi.ctx.clip(),oi.path(Go)),oi.ctx.shadowOffsetX=Hr.offsetX.number+Cr,oi.ctx.shadowOffsetY=Hr.offsetY.number,oi.ctx.shadowColor=Yo(Hr.color),oi.ctx.shadowBlur=Hr.blur.number,oi.ctx.fillStyle=Hr.inset?Yo(Hr.color):"rgba(0,0,0,1)",oi.ctx.fill(),oi.ctx.restore()}),bi.label=2;case 2:Ye=0,Ne=0,En=ue,bi.label=3;case 3:return Ne<En.length?(Un=En[Ne],Un.style!==0&&!Bs(Un.color)&&Un.width>0?Un.style!==2?[3,5]:[4,this.renderDashedDottedBorder(Un.color,Un.width,Ye,Et.curves,2)]:[3,11]):[3,13];case 4:return bi.sent(),[3,11];case 5:return Un.style!==3?[3,7]:[4,this.renderDashedDottedBorder(Un.color,Un.width,Ye,Et.curves,3)];case 6:return bi.sent(),[3,11];case 7:return Un.style!==4?[3,9]:[4,this.renderDoubleBorder(Un.color,Un.width,Ye,Et.curves)];case 8:return bi.sent(),[3,11];case 9:return[4,this.renderSolidBorder(Un.color,Ye,Et.curves)];case 10:bi.sent(),bi.label=11;case 11:Ye++,bi.label=12;case 12:return Ne++,[3,3];case 13:return[2]}})})},wt.prototype.renderDashedDottedBorder=function(Et,Pt,jt,ue,Ee){return Xt(this,void 0,void 0,function(){var Ye,Ne,En,Un,oi,bi,Hr,cr,Cr,Go,oo,ao,uo,qo,To,Yr,To,Yr;return Ae(this,function(hs){return this.ctx.save(),Ye=cc(ue,jt),Ne=hc(ue,jt),Ee===2&&(this.path(Ne),this.ctx.clip()),Ts(Ne[0])?(En=Ne[0].start.x,Un=Ne[0].start.y):(En=Ne[0].x,Un=Ne[0].y),Ts(Ne[1])?(oi=Ne[1].end.x,bi=Ne[1].end.y):(oi=Ne[1].x,bi=Ne[1].y),jt===0||jt===2?Hr=Math.abs(En-oi):Hr=Math.abs(Un-bi),this.ctx.beginPath(),Ee===3?this.formatPath(Ye):this.formatPath(Ne.slice(0,2)),cr=Pt<3?Pt*3:Pt*2,Cr=Pt<3?Pt*2:Pt,Ee===3&&(cr=Pt,Cr=Pt),Go=!0,Hr<=cr*2?Go=!1:Hr<=cr*2+Cr?(oo=Hr/(2*cr+Cr),cr*=oo,Cr*=oo):(ao=Math.floor((Hr+Cr)/(cr+Cr)),uo=(Hr-ao*cr)/(ao-1),qo=(Hr-(ao+1)*cr)/ao,Cr=qo<=0||Math.abs(Cr-uo)<Math.abs(Cr-qo)?uo:qo),Go&&(Ee===3?this.ctx.setLineDash([0,cr+Cr]):this.ctx.setLineDash([cr,Cr])),Ee===3?(this.ctx.lineCap="round",this.ctx.lineWidth=Pt):this.ctx.lineWidth=Pt*2+1.1,this.ctx.strokeStyle=Yo(Et),this.ctx.stroke(),this.ctx.setLineDash([]),Ee===2&&(Ts(Ne[0])&&(To=Ne[3],Yr=Ne[0],this.ctx.beginPath(),this.formatPath([new mr(To.end.x,To.end.y),new mr(Yr.start.x,Yr.start.y)]),this.ctx.stroke()),Ts(Ne[1])&&(To=Ne[1],Yr=Ne[2],this.ctx.beginPath(),this.formatPath([new mr(To.end.x,To.end.y),new mr(Yr.start.x,Yr.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},wt.prototype.render=function(Et){return Xt(this,void 0,void 0,function(){var Pt;return Ae(this,function(jt){switch(jt.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Yo(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),Pt=Zd(Et),[4,this.renderStack(Pt)];case 1:return jt.sent(),this.applyEffects([]),[2,this.canvas]}})})},wt}(Hf),Tm=function(Bt){return Bt instanceof td||Bt instanceof Rd?!0:Bt instanceof ru&&Bt.type!==vA&&Bt.type!==ic},Rf=function(Bt,wt){switch(Bt){case 0:return wl(wt);case 2:return ia(wt);case 1:default:return XA(wt)}},lo=function(Bt){switch(Bt){case 1:return"center";case 2:return"right";case 0:default:return"left"}},n0=["-apple-system","system-ui"],i0=function(Bt){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?Bt.filter(function(wt){return n0.indexOf(wt)===-1}):Bt},np=function(Bt){Ut(wt,Bt);function wt(Et,Pt){var jt=Bt.call(this,Et,Pt)||this;return jt.canvas=Pt.canvas?Pt.canvas:document.createElement("canvas"),jt.ctx=jt.canvas.getContext("2d"),jt.options=Pt,jt.canvas.width=Math.floor(Pt.width*Pt.scale),jt.canvas.height=Math.floor(Pt.height*Pt.scale),jt.canvas.style.width=Pt.width+"px",jt.canvas.style.height=Pt.height+"px",jt.ctx.scale(jt.options.scale,jt.options.scale),jt.ctx.translate(-Pt.x,-Pt.y),jt.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+Pt.width+"x"+Pt.height+" at "+Pt.x+","+Pt.y+") with scale "+Pt.scale),jt}return wt.prototype.render=function(Et){return Xt(this,void 0,void 0,function(){var Pt,jt;return Ae(this,function(ue){switch(ue.label){case 0:return Pt=Yc(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,Et),[4,Wd(Pt)];case 1:return jt=ue.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Yo(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(jt,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},wt}(Hf),Wd=function(Bt){return new Promise(function(wt,Et){var Pt=new Image;Pt.onload=function(){wt(Pt)},Pt.onerror=Et,Pt.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(Bt))})},Yd=function(){function Bt(wt){var Et=wt.id,Pt=wt.enabled;this.id=Et,this.enabled=Pt,this.start=Date.now()}return Bt.prototype.debug=function(){for(var wt=[],Et=0;Et<arguments.length;Et++)wt[Et]=arguments[Et];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,xe([this.id,this.getTime()+"ms"],wt)):this.info.apply(this,wt))},Bt.prototype.getTime=function(){return Date.now()-this.start},Bt.prototype.info=function(){for(var wt=[],Et=0;Et<arguments.length;Et++)wt[Et]=arguments[Et];this.enabled&&typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,xe([this.id,this.getTime()+"ms"],wt))},Bt.prototype.warn=function(){for(var wt=[],Et=0;Et<arguments.length;Et++)wt[Et]=arguments[Et];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,xe([this.id,this.getTime()+"ms"],wt)):this.info.apply(this,wt))},Bt.prototype.error=function(){for(var wt=[],Et=0;Et<arguments.length;Et++)wt[Et]=arguments[Et];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,xe([this.id,this.getTime()+"ms"],wt)):this.info.apply(this,wt))},Bt.instances={},Bt}(),BA=function(){function Bt(wt,Et){var Pt;this.windowBounds=Et,this.instanceName="#"+Bt.instanceCount++,this.logger=new Yd({id:this.instanceName,enabled:wt.logging}),this.cache=(Pt=wt.cache)!==null&&Pt!==void 0?Pt:new ko(this,wt)}return Bt.instanceCount=1,Bt}(),ip=function(Bt,wt){return wt===void 0&&(wt={}),rp(Bt,wt)};typeof window!="undefined"&&wr.setContext(window);var rp=function(Bt,wt){return Xt(void 0,void 0,void 0,function(){var Et,Pt,jt,ue,Ee,Ye,Ne,En,Un,oi,bi,Hr,cr,Cr,Go,oo,ao,uo,qo,To,hs,Yr,hs,vs,Do,Ma,Dl,Jl,Ks,Ga,CA,Il,ou,PA,Bn,qA,mc,$A,th,Mh;return Ae(this,function(Al){switch(Al.label){case 0:if(!Bt||typeof Bt!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(Et=Bt.ownerDocument,!Et)throw new Error("Element is not attached to a Document");if(Pt=Et.defaultView,!Pt)throw new Error("Document is not attached to a Window");return jt={allowTaint:(vs=wt.allowTaint)!==null&&vs!==void 0?vs:!1,imageTimeout:(Do=wt.imageTimeout)!==null&&Do!==void 0?Do:15e3,proxy:wt.proxy,useCORS:(Ma=wt.useCORS)!==null&&Ma!==void 0?Ma:!1},ue=St({logging:(Dl=wt.logging)!==null&&Dl!==void 0?Dl:!0,cache:wt.cache},jt),Ee={windowWidth:(Jl=wt.windowWidth)!==null&&Jl!==void 0?Jl:Pt.innerWidth,windowHeight:(Ks=wt.windowHeight)!==null&&Ks!==void 0?Ks:Pt.innerHeight,scrollX:(Ga=wt.scrollX)!==null&&Ga!==void 0?Ga:Pt.pageXOffset,scrollY:(CA=wt.scrollY)!==null&&CA!==void 0?CA:Pt.pageYOffset},Ye=new fe(Ee.scrollX,Ee.scrollY,Ee.windowWidth,Ee.windowHeight),Ne=new BA(ue,Ye),En=(Il=wt.foreignObjectRendering)!==null&&Il!==void 0?Il:!1,Un={allowTaint:(ou=wt.allowTaint)!==null&&ou!==void 0?ou:!1,onclone:wt.onclone,ignoreElements:wt.ignoreElements,inlineImages:En,copyStyles:En},Ne.logger.debug("Starting document clone with size "+Ye.width+"x"+Ye.height+" scrolled to "+-Ye.left+","+-Ye.top),oi=new pt(Ne,Bt,Un),bi=oi.clonedReferenceElement,bi?[4,oi.toIFrame(Et,Ye)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return Hr=Al.sent(),cr=Xo(bi)||Gd(bi)?ie(bi.ownerDocument):Rt(Ne,bi),Cr=cr.width,Go=cr.height,oo=cr.left,ao=cr.top,uo=op(Ne,bi,wt.backgroundColor),qo={canvas:wt.canvas,backgroundColor:uo,scale:(Bn=(PA=wt.scale)!==null&&PA!==void 0?PA:Pt.devicePixelRatio)!==null&&Bn!==void 0?Bn:1,x:((qA=wt.x)!==null&&qA!==void 0?qA:0)+oo,y:((mc=wt.y)!==null&&mc!==void 0?mc:0)+ao,width:($A=wt.width)!==null&&$A!==void 0?$A:Math.ceil(Cr),height:(th=wt.height)!==null&&th!==void 0?th:Math.ceil(Go)},En?(Ne.logger.debug("Document cloned, using foreign object rendering"),hs=new np(Ne,qo),[4,hs.render(bi)]):[3,3];case 2:return To=Al.sent(),[3,5];case 3:return Ne.logger.debug("Document cloned, element located at "+oo+","+ao+" with size "+Cr+"x"+Go+" using computed rendering"),Ne.logger.debug("Starting DOM parsing"),Yr=kf(Ne,bi),uo===Yr.styles.backgroundColor&&(Yr.styles.backgroundColor=fs.TRANSPARENT),Ne.logger.debug("Starting renderer for element at "+qo.x+","+qo.y+" with size "+qo.width+"x"+qo.height),hs=new pc(Ne,qo),[4,hs.render(Yr)];case 4:To=Al.sent(),Al.label=5;case 5:return(!((Mh=wt.removeContainer)!==null&&Mh!==void 0)||Mh)&&(pt.destroy(Hr)||Ne.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),Ne.logger.debug("Finished rendering"),[2,To]}})})},op=function(Bt,wt,Et){var Pt=wt.ownerDocument,jt=Pt.documentElement?wo(Bt,getComputedStyle(Pt.documentElement).backgroundColor):fs.TRANSPARENT,ue=Pt.body?wo(Bt,getComputedStyle(Pt.body).backgroundColor):fs.TRANSPARENT,Ee=typeof Et=="string"?wo(Bt,Et):Et===null?fs.TRANSPARENT:4294967295;return wt===Pt.documentElement?Bs(jt)?Bs(ue)?Ee:ue:jt:Ee};return ip})},67467:function(mn,je){je.read=function(Ut,St,Xt,Ae,xe){var fe,Rt,ie=xe*8-Ae-1,ae=(1<<ie)-1,de=ae>>1,zt=-7,Ie=Xt?xe-1:0,Yt=Xt?-1:1,Me=Ut[St+Ie];for(Ie+=Yt,fe=Me&(1<<-zt)-1,Me>>=-zt,zt+=ie;zt>0;fe=fe*256+Ut[St+Ie],Ie+=Yt,zt-=8);for(Rt=fe&(1<<-zt)-1,fe>>=-zt,zt+=Ae;zt>0;Rt=Rt*256+Ut[St+Ie],Ie+=Yt,zt-=8);if(fe===0)fe=1-de;else{if(fe===ae)return Rt?NaN:(Me?-1:1)*(1/0);Rt=Rt+Math.pow(2,Ae),fe=fe-de}return(Me?-1:1)*Rt*Math.pow(2,fe-Ae)},je.write=function(Ut,St,Xt,Ae,xe,fe){var Rt,ie,ae,de=fe*8-xe-1,zt=(1<<de)-1,Ie=zt>>1,Yt=xe===23?Math.pow(2,-24)-Math.pow(2,-77):0,Me=Ae?0:fe-1,It=Ae?1:-1,nt=St<0||St===0&&1/St<0?1:0;for(St=Math.abs(St),isNaN(St)||St===1/0?(ie=isNaN(St)?1:0,Rt=zt):(Rt=Math.floor(Math.log(St)/Math.LN2),St*(ae=Math.pow(2,-Rt))<1&&(Rt--,ae*=2),Rt+Ie>=1?St+=Yt/ae:St+=Yt*Math.pow(2,1-Ie),St*ae>=2&&(Rt++,ae/=2),Rt+Ie>=zt?(ie=0,Rt=zt):Rt+Ie>=1?(ie=(St*ae-1)*Math.pow(2,xe),Rt=Rt+Ie):(ie=St*Math.pow(2,Ie-1)*Math.pow(2,xe),Rt=0));xe>=8;Ut[Xt+Me]=ie&255,Me+=It,ie/=256,xe-=8);for(Rt=Rt<<xe|ie,de+=xe;de>0;Ut[Xt+Me]=Rt&255,Me+=It,Rt/=256,de-=8);Ut[Xt+Me-It]|=nt*128}},2859:function(mn,je,Ut){"use strict";Ut.d(je,{hP:function(){return jn}});var St=function(Gt,Ft){return(St=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(mt,vt){mt.__proto__=vt}||function(mt,vt){for(var Lt in vt)Object.prototype.hasOwnProperty.call(vt,Lt)&&(mt[Lt]=vt[Lt])})(Gt,Ft)};function Xt(Gt,Ft){function mt(){this.constructor=Gt}St(Gt,Ft),Gt.prototype=Ft===null?Object.create(Ft):(mt.prototype=Ft.prototype,new mt)}function Ae(Gt,Ft,mt,vt){return new(mt||(mt=Promise))(function(Lt,Ct){function _t(wn){try{ze(vt.next(wn))}catch(Ge){Ct(Ge)}}function Pe(wn){try{ze(vt.throw(wn))}catch(Ge){Ct(Ge)}}function ze(wn){var Ge;wn.done?Lt(wn.value):(Ge=wn.value,Ge instanceof mt?Ge:new mt(function(Te){Te(Ge)})).then(_t,Pe)}ze((vt=vt.apply(Gt,Ft||[])).next())})}function xe(Gt,Ft){var mt,vt,Lt,Ct,_t={label:0,sent:function(){if(1&Lt[0])throw Lt[1];return Lt[1]},trys:[],ops:[]};return Ct={next:Pe(0),throw:Pe(1),return:Pe(2)},typeof Symbol=="function"&&(Ct[Symbol.iterator]=function(){return this}),Ct;function Pe(ze){return function(wn){return function(Ge){if(mt)throw new TypeError("Generator is already executing.");for(;_t;)try{if(mt=1,vt&&(Lt=2&Ge[0]?vt.return:Ge[0]?vt.throw||((Lt=vt.return)&&Lt.call(vt),0):vt.next)&&!(Lt=Lt.call(vt,Ge[1])).done)return Lt;switch(vt=0,Lt&&(Ge=[2&Ge[0],Lt.value]),Ge[0]){case 0:case 1:Lt=Ge;break;case 4:return _t.label++,{value:Ge[1],done:!1};case 5:_t.label++,vt=Ge[1],Ge=[0];continue;case 7:Ge=_t.ops.pop(),_t.trys.pop();continue;default:if(Lt=_t.trys,!((Lt=Lt.length>0&&Lt[Lt.length-1])||Ge[0]!==6&&Ge[0]!==2)){_t=0;continue}if(Ge[0]===3&&(!Lt||Ge[1]>Lt[0]&&Ge[1]<Lt[3])){_t.label=Ge[1];break}if(Ge[0]===6&&_t.label<Lt[1]){_t.label=Lt[1],Lt=Ge;break}if(Lt&&_t.label<Lt[2]){_t.label=Lt[2],_t.ops.push(Ge);break}Lt[2]&&_t.ops.pop(),_t.trys.pop();continue}Ge=Ft.call(Gt,_t)}catch(Te){Ge=[6,Te],vt=0}finally{mt=Lt=0}if(5&Ge[0])throw Ge[1];return{value:Ge[0]?Ge[1]:void 0,done:!0}}([ze,wn])}}}function fe(){for(var Gt=0,Ft=0,mt=arguments.length;Ft<mt;Ft++)Gt+=arguments[Ft].length;var vt=Array(Gt),Lt=0;for(Ft=0;Ft<mt;Ft++)for(var Ct=arguments[Ft],_t=0,Pe=Ct.length;_t<Pe;_t++,Lt++)vt[Lt]=Ct[_t];return vt}var Rt=function(){function Gt(){}return Gt.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Gt.setAttributes=function(Ft,mt){for(var vt=0,Lt=mt;vt<Lt.length;vt++){var Ct=Lt[vt],_t=Ct[0],Pe=Ct[1];Ft.setAttribute(_t,Pe)}},Gt.createRect=function(Ft,mt,vt){var Lt=document.createElementNS("http://www.w3.org/2000/svg","rect");return Lt.setAttribute("width",Ft.toString()),Lt.setAttribute("height",mt.toString()),vt&&Gt.setAttributes(Lt,vt),Lt},Gt.createLine=function(Ft,mt,vt,Lt,Ct){var _t=document.createElementNS("http://www.w3.org/2000/svg","line");return _t.setAttribute("x1",Ft.toString()),_t.setAttribute("y1",mt.toString()),_t.setAttribute("x2",vt.toString()),_t.setAttribute("y2",Lt.toString()),Ct&&Gt.setAttributes(_t,Ct),_t},Gt.createPolygon=function(Ft,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","polygon");return vt.setAttribute("points",Ft),mt&&Gt.setAttributes(vt,mt),vt},Gt.createCircle=function(Ft,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","circle");return vt.setAttribute("cx",(Ft/2).toString()),vt.setAttribute("cy",(Ft/2).toString()),vt.setAttribute("r",Ft.toString()),mt&&Gt.setAttributes(vt,mt),vt},Gt.createEllipse=function(Ft,mt,vt){var Lt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Lt.setAttribute("cx",(Ft/2).toString()),Lt.setAttribute("cy",(mt/2).toString()),Lt.setAttribute("rx",(Ft/2).toString()),Lt.setAttribute("ry",(mt/2).toString()),vt&&Gt.setAttributes(Lt,vt),Lt},Gt.createGroup=function(Ft){var mt=document.createElementNS("http://www.w3.org/2000/svg","g");return Ft&&Gt.setAttributes(mt,Ft),mt},Gt.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Gt.createMarker=function(Ft,mt,vt,Lt,Ct,_t,Pe){var ze=document.createElementNS("http://www.w3.org/2000/svg","marker");return Gt.setAttributes(ze,[["id",Ft],["orient",mt],["markerWidth",vt.toString()],["markerHeight",Lt.toString()],["refX",Ct.toString()],["refY",_t.toString()]]),ze.appendChild(Pe),ze},Gt.createText=function(Ft){var mt=document.createElementNS("http://www.w3.org/2000/svg","text");return mt.setAttribute("x","0"),mt.setAttribute("y","0"),Ft&&Gt.setAttributes(mt,Ft),mt},Gt.createTSpan=function(Ft,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","tspan");return vt.textContent=Ft,mt&&Gt.setAttributes(vt,mt),vt},Gt.createImage=function(Ft){var mt=document.createElementNS("http://www.w3.org/2000/svg","image");return Ft&&Gt.setAttributes(mt,Ft),mt},Gt.createPoint=function(Ft,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return vt.x=Ft,vt.y=mt,vt},Gt.createPath=function(Ft,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","path");return vt.setAttribute("d",Ft),mt&&Gt.setAttributes(vt,mt),vt},Gt}(),ie=function(){function Gt(){}return Gt.addKey=function(Ft){Gt.key=Ft},Object.defineProperty(Gt,"isLicensed",{get:function(){return!!Gt.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Gt.key)},enumerable:!1,configurable:!0}),Gt}(),ae=function(){function Gt(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Gt.prototype.rasterize=function(Ft,mt,vt){var Lt=this;return new Promise(function(Ct){var _t=vt!==void 0?vt:document.createElement("canvas");Ft===null&&(Lt.markersOnly=!0,Lt.naturalSize=!1);var Pe=document.createElementNS("http://www.w3.org/2000/svg","svg");Pe.setAttribute("xmlns","http://www.w3.org/2000/svg"),Pe.setAttribute("width",mt.width.baseVal.valueAsString),Pe.setAttribute("height",mt.height.baseVal.valueAsString),Pe.setAttribute("viewBox","0 0 "+mt.viewBox.baseVal.width.toString()+" "+mt.viewBox.baseVal.height.toString()),Pe.innerHTML=mt.innerHTML,Lt.naturalSize===!0?(Pe.width.baseVal.value=Ft.naturalWidth,Pe.height.baseVal.value=Ft.naturalHeight):Lt.width!==void 0&&Lt.height!==void 0&&(Pe.width.baseVal.value=Lt.width,Pe.height.baseVal.value=Lt.height),_t.width=Pe.width.baseVal.value,_t.height=Pe.height.baseVal.value;var ze=Pe.outerHTML,wn=_t.getContext("2d");Lt.markersOnly!==!0&&wn.drawImage(Ft,0,0,_t.width,_t.height);var Ge=window.URL,Te=new Image(_t.width,_t.height);Te.setAttribute("crossOrigin","anonymous");var Ze=new Blob([ze],{type:"image/svg+xml"}),hn=Ge.createObjectURL(Ze);Te.onload=function(){wn.drawImage(Te,0,0),Ge.revokeObjectURL(hn);var In=_t.toDataURL(Lt.imageType,Lt.imageQuality);Ct(In)},Te.src=hn})},Gt}(),de=function(){},zt=function(){function Gt(Ft){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Ft+"_"}return Object.defineProperty(Gt.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Gt.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Gt.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(Gt.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Gt.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Gt.prototype.addClass=function(Ft){return this.styleSheet===void 0&&this.addStyleSheet(),Ft.name=""+this.classNamePrefix+Ft.localName,this.classes.push(Ft),this.styleSheet.sheet.insertRule("."+Ft.name+" {"+Ft.style+"}",this.styleSheet.sheet.cssRules.length),Ft},Gt.prototype.addRule=function(Ft){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Ft),this.styleSheet.sheet.insertRule(Ft.selector+" {"+Ft.style+"}",this.styleSheet.sheet.cssRules.length)},Gt.prototype.addStyleSheet=function(){var Ft;this.styleSheet=document.createElement("style"),((Ft=this.styleSheetRoot)!==null&&Ft!==void 0?Ft:document.head).appendChild(this.styleSheet),this.addRule(new Ie("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ie("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Ie("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Yt("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Yt("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},Gt.prototype.removeStyleSheet=function(){var Ft;this.styleSheet&&(((Ft=this.styleSheetRoot)!==null&&Ft!==void 0?Ft:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Gt}(),Ie=function(Gt,Ft){this.selector=Gt,this.style=Ft},Yt=function(Gt,Ft){this.localName=Gt,this.style=Ft},Me=function(){function Gt(Ft,mt,vt,Lt,Ct){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Ft,this.displayMode=mt,this.markerItems=vt,this.uiStyleSettings=Lt,this.styles=Ct,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Gt.prototype.show=function(Ft){var mt=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Ft,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var vt=document.createElement("div");vt.className=this.toolbarBlockStyleClass.name,vt.style.whiteSpace="nowrap",this.uiContainer.appendChild(vt),this.addActionButton(vt,'<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(vt,'<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(vt,'<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(vt,'<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(vt,'<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(vt,'<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(vt,'<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(vt,'<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(Ct){var _t=document.createElement("div");_t.className=""+mt.toolbarButtonStyleClass.name,_t.setAttribute("data-type-name",Ct.typeName),_t.innerHTML=Ct.icon,_t.addEventListener("click",function(){mt.markerToolbarButtonClicked(_t,Ct)}),mt.buttons.push(_t),mt.markerButtons.push(_t)}),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 Lt=document.createElement("div");Lt.className=this.toolbarBlockStyleClass.name,Lt.style.whiteSpace="nowrap",Lt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Lt),this.addActionButton(Lt,'<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(Lt,'<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()},Gt.prototype.addButtonClickListener=function(Ft){this.buttonClickListeners.push(Ft)},Gt.prototype.removeButtonClickListener=function(Ft){this.buttonClickListeners.indexOf(Ft)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Ft),1)},Gt.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Gt.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Ft=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var mt=0;mt<this.markerButtons.length;mt++)mt<Ft||mt===Ft&&this.markerButtons.length-1===Ft?this.markerButtonBlock.appendChild(this.markerButtons[mt]):(mt===Ft&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[mt]))}},Gt.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")},Gt.prototype.resetButtonStyles=function(){var Ft=this;this.buttons.forEach(function(mt){mt.className=mt.className.replace(Ft.uiStyleSettings.toolbarButtonStyleColorsClassName?Ft.uiStyleSettings.toolbarButtonStyleColorsClassName:Ft.toolbarButtonStyleColorsClass.name,"").trim(),mt.className=mt.className.replace(Ft.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Ft.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Ft.toolbarActiveButtonStyleColorsClass.name,"").trim(),mt.className+=" "+(Ft.uiStyleSettings.toolbarButtonStyleColorsClassName?Ft.uiStyleSettings.toolbarButtonStyleColorsClassName:Ft.toolbarButtonStyleColorsClass.name)})},Gt.prototype.addActionButton=function(Ft,mt,vt){var Lt=this,Ct=document.createElement("div");switch(Ct.className=""+this.toolbarButtonStyleClass.name,Ct.innerHTML=mt,Ct.setAttribute("data-action",vt),Ct.addEventListener("click",function(){Lt.actionToolbarButtonClicked(Ct,vt)}),vt){case"select":Ct.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Ct.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Ct.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Ct.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Ct.style.fill=this.uiStyleSettings.closeButtonColor}Ft.appendChild(Ct),this.buttons.push(Ct)},Gt.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Yt("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 Yt("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Yt("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Yt("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 Yt("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var Ft=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Yt("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Ft)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Ft)+`px;
padding: `+Ft+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Yt("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Yt("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ie("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Ie("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},Gt.prototype.markerToolbarButtonClicked=function(Ft,mt){this.setActiveButton(Ft),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(vt){return vt("marker",mt)}),this.markerButtonOverflowBlock.style.display="none"},Gt.prototype.actionToolbarButtonClicked=function(Ft,mt){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(vt){return vt("action",mt)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Gt.prototype.setActiveButton=function(Ft){this.resetButtonStyles(),Ft.className=Ft.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Ft.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Gt.prototype.setActiveMarkerButton=function(Ft){var mt=this.markerButtons.find(function(vt){return vt.getAttribute("data-type-name")===Ft});mt&&this.setActiveButton(mt)},Gt.prototype.setCurrentMarker=function(Ft){var mt=this;this.currentMarker=Ft,this.buttons.filter(function(vt){return/delete|notes/.test(vt.getAttribute("data-action"))}).forEach(function(vt){mt.currentMarker===void 0?(vt.style.fillOpacity="0.4",vt.style.pointerEvents="none"):(vt.style.fillOpacity="1",vt.style.pointerEvents="all")})},Gt}(),It=function(){function Gt(Ft,mt,vt,Lt){this.panels=[],this.panelButtons=[],this.markerjsContainer=Ft,this.displayMode=mt,this.uiStyleSettings=vt,this.styles=Lt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Gt.prototype.addStyles=function(){var Ft;this.toolboxStyleClass=this.styles.addClass(new Yt("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 Yt("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var mt=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Yt("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Yt("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Yt("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 Yt("toolbox-panel-row_colors",`
background-color: `+((Ft=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Ft!==void 0?Ft:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Yt("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*mt)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*mt)+`px;
padding: `+mt+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Yt("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Yt("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Ie("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ie("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},Gt.prototype.show=function(Ft){var mt;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Ft,this.uiContainer.className=this.toolboxStyleClass.name+" "+((mt=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&mt!==void 0?mt:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Gt.prototype.setPanelButtons=function(Ft){var mt,vt,Lt=this;this.panels=Ft,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((mt=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&mt!==void 0?mt:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((vt=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&vt!==void 0?vt:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Ct){var _t;Ct.uiStyleSettings=Lt.uiStyleSettings;var Pe=document.createElement("div");Pe.className=Lt.toolboxButtonStyleClass.name+" "+((_t=Lt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&_t!==void 0?_t:Lt.toolboxButtonStyleColorsClass.name),Pe.innerHTML=Ct.icon,Pe.title=Ct.title,Pe.addEventListener("click",function(){Lt.panelButtonClick(Ct)}),Lt.panelButtons.push(Pe),Lt.buttonRow.appendChild(Pe)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Gt.prototype.panelButtonClick=function(Ft){var mt=this,vt=-1;if(Ft!==this.activePanel){vt=this.panels.indexOf(Ft),this.panelRow.innerHTML="";var Lt=Ft.getUi();Lt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Lt),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=Ft}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){mt.displayMode==="inline"?mt.panelRow.style.display="none":mt.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Ct,_t){var Pe,ze;Ct.className=mt.toolboxButtonStyleClass.name+" "+(_t===vt?""+((Pe=mt.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Pe!==void 0?Pe:mt.toolboxActiveButtonStyleColorsClass.name):""+((ze=mt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ze!==void 0?ze:mt.toolboxButtonStyleColorsClass.name))})},Gt}(),nt=function(Gt,Ft){this.title=Gt,this.icon=Ft},et=function(Gt){function Ft(mt,vt,Lt,Ct){var _t=Gt.call(this,mt,Ct||'<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 _t.colors=[],_t.addTransparent=!1,_t.colorBoxes=[],_t.colors=vt,_t.currentColor=Lt,_t.setCurrentColor=_t.setCurrentColor.bind(_t),_t.getColorBox=_t.getColorBox.bind(_t),_t}return Xt(Ft,Gt),Ft.prototype.getUi=function(){var mt=this,vt=document.createElement("div");return vt.style.overflow="hidden",vt.style.whiteSpace="nowrap",this.colors.forEach(function(Lt){var Ct=mt.getColorBox(Lt);vt.appendChild(Ct),mt.colorBoxes.push(Ct)}),vt},Ft.prototype.getColorBox=function(mt){var vt=this,Lt=this.uiStyleSettings.toolbarHeight/4,Ct=this.uiStyleSettings.toolbarHeight-Lt,_t=document.createElement("div");_t.style.display="inline-block",_t.style.boxSizing="content-box",_t.style.width=Ct-2+"px",_t.style.height=Ct-2+"px",_t.style.padding="1px",_t.style.marginRight="2px",_t.style.marginBottom="2px",_t.style.borderWidth="2px",_t.style.borderStyle="solid",_t.style.borderRadius=(Ct+2)/2+"px",_t.style.borderColor=mt===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",_t.addEventListener("click",function(){vt.setCurrentColor(mt,_t)});var Pe=document.createElement("div");return Pe.style.display="inline-block",Pe.style.width=Ct-2+"px",Pe.style.height=Ct-2+"px",Pe.style.backgroundColor=mt,Pe.style.borderRadius=Ct/2+"px",mt==="transparent"&&(Pe.style.fill=this.uiStyleSettings.toolboxAccentColor,Pe.innerHTML=`<svg viewBox="0 0 24 24">
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
</svg>`),_t.appendChild(Pe),_t},Ft.prototype.setCurrentColor=function(mt,vt){var Lt=this;this.currentColor=mt,this.colorBoxes.forEach(function(Ct){Ct.style.borderColor=Ct===vt?Lt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(mt)},Ft}(nt),At=function(){function Gt(Ft,mt,vt){this._state="new",this._isSelected=!1,this._container=Ft,this._overlayContainer=mt,this.globalSettings=vt,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Gt.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Gt.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Gt.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Gt.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Gt.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Gt.prototype.ownsTarget=function(Ft){return!1},Object.defineProperty(Gt.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Gt.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Gt.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Gt.prototype.pointerDown=function(Ft,mt){},Gt.prototype.dblClick=function(Ft,mt){},Gt.prototype.manipulate=function(Ft){},Gt.prototype.pointerUp=function(Ft){this.stateChanged()},Gt.prototype.dispose=function(){},Gt.prototype.addMarkerVisualToContainer=function(Ft){this.container.childNodes.length>0?this.container.insertBefore(Ft,this.container.childNodes[0]):this.container.appendChild(Ft)},Gt.prototype.getState=function(){return{typeName:Gt.typeName,state:this.state,notes:this.notes}},Gt.prototype.restoreState=function(Ft){this._state=Ft.state,this.notes=Ft.notes},Gt.prototype.scale=function(Ft,mt){},Gt.prototype.colorChanged=function(Ft){this.onColorChanged&&this.onColorChanged(Ft),this.stateChanged()},Gt.prototype.fillColorChanged=function(Ft){this.onFillColorChanged&&this.onFillColorChanged(Ft),this.stateChanged()},Gt.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Ft=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Ft.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Ft)&&this.onStateChanged(this)}},Gt.typeName="MarkerBase",Gt}(),at=function(){function Gt(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Gt.prototype.findGripByVisual=function(Ft){return this.topLeft.ownsTarget(Ft)?this.topLeft:this.topCenter.ownsTarget(Ft)?this.topCenter:this.topRight.ownsTarget(Ft)?this.topRight:this.centerLeft.ownsTarget(Ft)?this.centerLeft:this.centerRight.ownsTarget(Ft)?this.centerRight:this.bottomLeft.ownsTarget(Ft)?this.bottomLeft:this.bottomCenter.ownsTarget(Ft)?this.bottomCenter:this.bottomRight.ownsTarget(Ft)?this.bottomRight:void 0},Gt}(),dt=function(){function Gt(){this.GRIP_SIZE=10,this.visual=Rt.createGroup(),this.visual.appendChild(Rt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Rt.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Gt.prototype.ownsTarget=function(Ft){return Ft===this.visual||Ft===this.visual.childNodes[0]||Ft===this.visual.childNodes[1]},Gt}(),gt=function(){function Gt(){}return Gt.toITransformMatrix=function(Ft){return{a:Ft.a,b:Ft.b,c:Ft.c,d:Ft.d,e:Ft.e,f:Ft.f}},Gt.toSVGMatrix=function(Ft,mt){return Ft.a=mt.a,Ft.b=mt.b,Ft.c=mt.c,Ft.d=mt.d,Ft.e=mt.e,Ft.f=mt.f,Ft},Gt}(),xt=function(Gt){function Ft(mt,vt,Lt){var Ct=Gt.call(this,mt,vt,Lt)||this;return Ct.left=0,Ct.top=0,Ct.width=0,Ct.height=0,Ct.defaultSize={x:50,y:20},Ct.offsetX=0,Ct.offsetY=0,Ct.rotationAngle=0,Ct.CB_DISTANCE=10,Ct._suppressMarkerCreateEvent=!1,Ct.container.transform.baseVal.appendItem(Rt.createTransform()),Ct.setupControlBox(),Ct}return Xt(Ft,Gt),Object.defineProperty(Ft.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Ft.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Ft.prototype,"visual",{get:function(){return this._visual},set:function(mt){this._visual=mt;var vt=Rt.createTransform();this._visual.transform.baseVal.appendItem(vt)},enumerable:!1,configurable:!0}),Ft.prototype.ownsTarget=function(mt){return!!Gt.prototype.ownsTarget.call(this,mt)||!!(this.controlGrips.findGripByVisual(mt)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(mt))},Ft.prototype.pointerDown=function(mt,vt){Gt.prototype.pointerDown.call(this,mt,vt),this.state==="new"&&(this.left=mt.x,this.top=mt.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Lt=this.unrotatePoint(mt);if(this.manipulationStartX=Lt.x,this.manipulationStartY=Lt.y,this.offsetX=Lt.x-this.left,this.offsetY=Lt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(vt),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(vt)){this.activeGrip=this.rotatorGrip;var Ct=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Ct.x-this.width/2,this.top=Ct.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var _t=this.container.transform.baseVal.getItem(0);_t.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(_t,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Ft.prototype.pointerUp=function(mt){var vt=this.state;Gt.prototype.pointerUp.call(this,mt),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(mt),this._state="select",vt==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Ft.prototype.moveVisual=function(mt){this.visual.style.transform="translate("+mt.x+"px, "+mt.y+"px)"},Ft.prototype.manipulate=function(mt){var vt=this.unrotatePoint(mt);this.state==="creating"?this.resize(mt):this.state==="move"?(this.left=this.manipulationStartLeft+(vt.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(vt.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(vt):this.state==="rotate"&&this.rotate(mt)},Ft.prototype.resize=function(mt){var vt=this.manipulationStartLeft,Lt=this.manipulationStartWidth,Ct=this.manipulationStartTop,_t=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:vt=this.manipulationStartLeft+mt.x-this.manipulationStartX,Lt=this.manipulationStartWidth+this.manipulationStartLeft-vt;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Lt=this.manipulationStartWidth+mt.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Ct=this.manipulationStartTop+mt.y-this.manipulationStartY,_t=this.manipulationStartHeight+this.manipulationStartTop-Ct;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:_t=this.manipulationStartHeight+mt.y-this.manipulationStartY}Lt>=0?(this.left=vt,this.width=Lt):(this.left=vt+Lt,this.width=-Lt),_t>=0?(this.top=Ct,this.height=_t):(this.top=Ct+_t,this.height=-_t),this.setSize()},Ft.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Ft.prototype.rotate=function(mt){if(Math.abs(mt.x-this.centerX)>.1){var vt=Math.sign(mt.x-this.centerX);this.rotationAngle=180*Math.atan((mt.y-this.centerY)/(mt.x-this.centerX))/Math.PI+90*vt,this.applyRotation()}},Ft.prototype.applyRotation=function(){var mt=this.container.transform.baseVal.getItem(0);mt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(mt,0)},Ft.prototype.rotatePoint=function(mt){if(this.rotationAngle===0)return mt;var vt=this.container.getCTM(),Lt=Rt.createPoint(mt.x,mt.y);return{x:(Lt=Lt.matrixTransform(vt)).x,y:Lt.y}},Ft.prototype.unrotatePoint=function(mt){if(this.rotationAngle===0)return mt;var vt=this.container.getCTM();vt=vt.inverse();var Lt=Rt.createPoint(mt.x,mt.y);return{x:(Lt=Lt.matrixTransform(vt)).x,y:Lt.y}},Ft.prototype.select=function(){Gt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Ft.prototype.deselect=function(){Gt.prototype.deselect.call(this),this.controlBox.style.display="none"},Ft.prototype.setupControlBox=function(){this.controlBox=Rt.createGroup();var mt=Rt.createTransform();mt.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(mt),this.container.appendChild(this.controlBox),this.controlRect=Rt.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=Rt.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 at,this.addControlGrips(),this.controlBox.style.display="none"},Ft.prototype.adjustControlBox=function(){var mt=this.controlBox.transform.baseVal.getItem(0);mt.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(mt,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()},Ft.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()},Ft.prototype.createGrip=function(){var mt=new dt;return mt.visual.transform.baseVal.appendItem(Rt.createTransform()),this.controlBox.appendChild(mt.visual),mt},Ft.prototype.positionGrips=function(){var mt=this.controlGrips.topLeft.GRIP_SIZE,vt=-mt/2,Lt=vt,Ct=(this.width+this.CB_DISTANCE)/2-mt/2,_t=(this.height+this.CB_DISTANCE)/2-mt/2,Pe=this.height+this.CB_DISTANCE-mt/2,ze=this.width+this.CB_DISTANCE-mt/2;this.positionGrip(this.controlGrips.topLeft.visual,vt,Lt),this.positionGrip(this.controlGrips.topCenter.visual,Ct,Lt),this.positionGrip(this.controlGrips.topRight.visual,ze,Lt),this.positionGrip(this.controlGrips.centerLeft.visual,vt,_t),this.positionGrip(this.controlGrips.centerRight.visual,ze,_t),this.positionGrip(this.controlGrips.bottomLeft.visual,vt,Pe),this.positionGrip(this.controlGrips.bottomCenter.visual,Ct,Pe),this.positionGrip(this.controlGrips.bottomRight.visual,ze,Pe),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Ct,Lt-3*this.CB_DISTANCE)},Ft.prototype.positionGrip=function(mt,vt,Lt){var Ct=mt.transform.baseVal.getItem(0);Ct.setTranslate(vt,Lt),mt.transform.baseVal.replaceItem(Ct,0)},Ft.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Ft.prototype.showControlBox=function(){this.controlBox.style.display=""},Ft.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:gt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:gt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Gt.prototype.getState.call(this))},Ft.prototype.restoreState=function(mt){Gt.prototype.restoreState.call(this,mt);var vt=mt;this.left=vt.left,this.top=vt.top,this.width=vt.width,this.height=vt.height,this.rotationAngle=vt.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(gt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,vt.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(gt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,vt.containerTransformMatrix))},Ft.prototype.scale=function(mt,vt){Gt.prototype.scale.call(this,mt,vt);var Lt=this.rotatePoint({x:this.left,y:this.top}),Ct=this.unrotatePoint({x:Lt.x*mt,y:Lt.y*vt});this.left=Ct.x,this.top=Ct.y,this.width=this.width*mt,this.height=this.height*vt,this.adjustControlBox()},Ft}(At),kt=function(Gt){function Ft(mt,vt,Lt){var Ct=Gt.call(this,mt,vt,Lt)||this;return Ct.fillColor="transparent",Ct.strokeColor="transparent",Ct.strokeWidth=0,Ct.strokeDasharray="",Ct.opacity=1,Ct.setStrokeColor=Ct.setStrokeColor.bind(Ct),Ct.setFillColor=Ct.setFillColor.bind(Ct),Ct.setStrokeWidth=Ct.setStrokeWidth.bind(Ct),Ct.setStrokeDasharray=Ct.setStrokeDasharray.bind(Ct),Ct.createVisual=Ct.createVisual.bind(Ct),Ct}return Xt(Ft,Gt),Ft.prototype.ownsTarget=function(mt){return!(!Gt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual)},Ft.prototype.createVisual=function(){this.visual=Rt.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)},Ft.prototype.pointerDown=function(mt,vt){Gt.prototype.pointerDown.call(this,mt,vt),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},Ft.prototype.manipulate=function(mt){Gt.prototype.manipulate.call(this,mt)},Ft.prototype.resize=function(mt){Gt.prototype.resize.call(this,mt),this.setSize()},Ft.prototype.setSize=function(){Gt.prototype.setSize.call(this),Rt.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Ft.prototype.pointerUp=function(mt){Gt.prototype.pointerUp.call(this,mt),this.setSize()},Ft.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.visual&&Rt.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},Ft.prototype.setFillColor=function(mt){this.fillColor=mt,this.visual&&Rt.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Ft.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.visual&&Rt.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ft.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.visual&&Rt.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Ft.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Gt.prototype.getState.call(this))},Ft.prototype.restoreState=function(mt){var vt=mt;this.fillColor=vt.fillColor,this.strokeColor=vt.strokeColor,this.strokeWidth=vt.strokeWidth,this.strokeDasharray=vt.strokeDasharray,this.opacity=vt.opacity,this.createVisual(),Gt.prototype.restoreState.call(this,mt),this.setSize()},Ft.prototype.scale=function(mt,vt){Gt.prototype.scale.call(this,mt,vt),this.setSize()},Ft.title="Rectangle marker",Ft}(xt),Ht=function(Gt){function Ft(mt,vt,Lt,Ct){var _t=Gt.call(this,mt,Ct||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return _t.widths=[],_t.widthBoxes=[],_t.widths=vt,_t.currentWidth=Lt,_t.setCurrentWidth=_t.setCurrentWidth.bind(_t),_t}return Xt(Ft,Gt),Ft.prototype.getUi=function(){var mt=this,vt=document.createElement("div");return vt.style.display="flex",vt.style.overflow="hidden",vt.style.flexGrow="2",this.widths.forEach(function(Lt){var Ct=document.createElement("div");Ct.style.display="flex",Ct.style.flexGrow="2",Ct.style.alignItems="center",Ct.style.justifyContent="space-between",Ct.style.padding="5px",Ct.style.borderWidth="2px",Ct.style.borderStyle="solid",Ct.style.borderColor=Lt===mt.currentWidth?mt.uiStyleSettings.toolboxAccentColor:"transparent",Ct.addEventListener("click",function(){mt.setCurrentWidth(Lt,Ct)}),vt.appendChild(Ct);var _t=document.createElement("div");_t.innerText=Lt.toString(),_t.style.marginRight="5px",Ct.appendChild(_t);var Pe=document.createElement("div");Pe.style.minHeight="20px",Pe.style.flexGrow="2",Pe.style.display="flex",Pe.style.alignItems="center";var ze=document.createElement("hr");ze.style.minWidth="20px",ze.style.border="0px",ze.style.borderTop=Lt+"px solid "+mt.uiStyleSettings.toolboxColor,ze.style.flexGrow="2",Pe.appendChild(ze),Ct.appendChild(Pe),mt.widthBoxes.push(Ct)}),vt},Ft.prototype.setCurrentWidth=function(mt,vt){var Lt=this;this.currentWidth=mt,this.widthBoxes.forEach(function(Ct){Ct.style.borderColor=Ct===vt?Lt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Ft}(nt),Ot=function(Gt){function Ft(mt,vt,Lt,Ct){var _t=Gt.call(this,mt,Ct||'<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 _t.styles=[],_t.styleBoxes=[],_t.styles=vt,_t.currentStyle=Lt,_t.setCurrentStyle=_t.setCurrentStyle.bind(_t),_t}return Xt(Ft,Gt),Ft.prototype.getUi=function(){var mt=this,vt=document.createElement("div");return vt.style.display="flex",vt.style.overflow="hidden",vt.style.flexGrow="2",this.styles.forEach(function(Lt){var Ct=document.createElement("div");Ct.style.display="flex",Ct.style.alignItems="center",Ct.style.justifyContent="space-between",Ct.style.padding="5px",Ct.style.borderWidth="2px",Ct.style.borderStyle="solid",Ct.style.overflow="hidden",Ct.style.maxWidth=100/mt.styles.length-5+"%",Ct.style.borderColor=Lt===mt.currentStyle?mt.uiStyleSettings.toolboxAccentColor:"transparent",Ct.addEventListener("click",function(){mt.setCurrentStyle(Lt,Ct)}),vt.appendChild(Ct);var _t=document.createElement("div");_t.style.minHeight="20px",_t.style.flexGrow="2",_t.style.overflow="hidden";var Pe=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+mt.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Lt!==""?'stroke-dasharray="'+Lt+'"':"")+` />
</svg>`;_t.innerHTML=Pe,Ct.appendChild(_t),mt.styleBoxes.push(Ct)}),vt},Ft.prototype.setCurrentStyle=function(mt,vt){var Lt=this;this.currentStyle=mt,this.styleBoxes.forEach(function(Ct){Ct.style.borderColor=Ct===vt?Lt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Ft}(nt),Zt=function(Gt){function Ft(mt,vt,Lt){var Ct=Gt.call(this,mt,vt,Lt)||this;return Ct.strokeColor=Lt.defaultColor,Ct.strokeWidth=Lt.defaultStrokeWidth,Ct.strokeDasharray=Lt.defaultStrokeDasharray,Ct.strokePanel=new et("Line color",Lt.defaultColorSet,Lt.defaultColor),Ct.strokePanel.onColorChanged=Ct.setStrokeColor,Ct.strokeWidthPanel=new Ht("Line width",Lt.defaultStrokeWidths,Lt.defaultStrokeWidth),Ct.strokeWidthPanel.onWidthChanged=Ct.setStrokeWidth,Ct.strokeStylePanel=new Ot("Line style",Lt.defaultStrokeDasharrays,Lt.defaultStrokeDasharray),Ct.strokeStylePanel.onStyleChanged=Ct.setStrokeDasharray,Ct}return Xt(Ft,Gt),Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ft.prototype.getState=function(){var mt=Gt.prototype.getState.call(this);return mt.typeName=Ft.typeName,mt},Ft.typeName="FrameMarker",Ft.title="Frame marker",Ft.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Ft}(kt),Wt=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"},te=function(Gt){function Ft(mt,vt,Lt){var Ct=Gt.call(this,mt,vt,Lt)||this;return Ct.x1=0,Ct.y1=0,Ct.x2=0,Ct.y2=0,Ct.defaultLength=50,Ct.manipulationStartX=0,Ct.manipulationStartY=0,Ct.manipulationStartX1=0,Ct.manipulationStartY1=0,Ct.manipulationStartX2=0,Ct.manipulationStartY2=0,Ct.setupControlBox(),Ct}return Xt(Ft,Gt),Ft.prototype.ownsTarget=function(mt){return!!Gt.prototype.ownsTarget.call(this,mt)||!(!this.grip1.ownsTarget(mt)&&!this.grip2.ownsTarget(mt))},Ft.prototype.pointerDown=function(mt,vt){Gt.prototype.pointerDown.call(this,mt,vt),this.manipulationStartX=mt.x,this.manipulationStartY=mt.y,this.state==="new"&&(this.x1=mt.x,this.y1=mt.y,this.x2=mt.x,this.y2=mt.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(vt)?this.activeGrip=this.grip1:this.grip2.ownsTarget(vt)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Ft.prototype.pointerUp=function(mt){var vt=this.state;Gt.prototype.pointerUp.call(this,mt),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(mt),this._state="select",vt==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Ft.prototype.adjustVisual=function(){},Ft.prototype.manipulate=function(mt){this.state==="creating"?this.resize(mt):this.state==="move"?(this.x1=this.manipulationStartX1+mt.x-this.manipulationStartX,this.y1=this.manipulationStartY1+mt.y-this.manipulationStartY,this.x2=this.manipulationStartX2+mt.x-this.manipulationStartX,this.y2=this.manipulationStartY2+mt.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(mt)},Ft.prototype.resize=function(mt){switch(this.activeGrip){case this.grip1:this.x1=mt.x,this.y1=mt.y;break;case this.grip2:case void 0:this.x2=mt.x,this.y2=mt.y}this.adjustVisual(),this.adjustControlBox()},Ft.prototype.select=function(){Gt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Ft.prototype.deselect=function(){Gt.prototype.deselect.call(this),this.controlBox.style.display="none"},Ft.prototype.setupControlBox=function(){this.controlBox=Rt.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Ft.prototype.adjustControlBox=function(){this.positionGrips()},Ft.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Ft.prototype.createGrip=function(){var mt=new dt;return mt.visual.transform.baseVal.appendItem(Rt.createTransform()),this.controlBox.appendChild(mt.visual),mt},Ft.prototype.positionGrips=function(){var mt=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-mt/2,this.y1-mt/2),this.positionGrip(this.grip2.visual,this.x2-mt/2,this.y2-mt/2)},Ft.prototype.positionGrip=function(mt,vt,Lt){var Ct=mt.transform.baseVal.getItem(0);Ct.setTranslate(vt,Lt),mt.transform.baseVal.replaceItem(Ct,0)},Ft.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Gt.prototype.getState.call(this))},Ft.prototype.restoreState=function(mt){Gt.prototype.restoreState.call(this,mt);var vt=mt;this.x1=vt.x1,this.y1=vt.y1,this.x2=vt.x2,this.y2=vt.y2},Ft.prototype.scale=function(mt,vt){Gt.prototype.scale.call(this,mt,vt),this.x1=this.x1*mt,this.y1=this.y1*vt,this.x2=this.x2*mt,this.y2=this.y2*vt,this.adjustVisual(),this.adjustControlBox()},Ft}(At),we=function(Gt){function Ft(mt,vt,Lt){var Ct=Gt.call(this,mt,vt,Lt)||this;return Ct.strokeColor="transparent",Ct.strokeWidth=0,Ct.strokeDasharray="",Ct.setStrokeColor=Ct.setStrokeColor.bind(Ct),Ct.setStrokeWidth=Ct.setStrokeWidth.bind(Ct),Ct.setStrokeDasharray=Ct.setStrokeDasharray.bind(Ct),Ct.strokeColor=Lt.defaultColor,Ct.strokeWidth=Lt.defaultStrokeWidth,Ct.strokeDasharray=Lt.defaultStrokeDasharray,Ct.strokePanel=new et("Line color",Lt.defaultColorSet,Lt.defaultColor),Ct.strokePanel.onColorChanged=Ct.setStrokeColor,Ct.strokeWidthPanel=new Ht("Line width",Lt.defaultStrokeWidths,Lt.defaultStrokeWidth),Ct.strokeWidthPanel.onWidthChanged=Ct.setStrokeWidth,Ct.strokeStylePanel=new Ot("Line style",Lt.defaultStrokeDasharrays,Lt.defaultStrokeDasharray),Ct.strokeStylePanel.onStyleChanged=Ct.setStrokeDasharray,Ct}return Xt(Ft,Gt),Ft.prototype.ownsTarget=function(mt){return!(!Gt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.selectorLine&&mt!==this.visibleLine)},Ft.prototype.createVisual=function(){this.visual=Rt.createGroup(),this.selectorLine=Rt.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Rt.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)},Ft.prototype.pointerDown=function(mt,vt){Gt.prototype.pointerDown.call(this,mt,vt),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Ft.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()),Rt.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Rt.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Rt.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Ft.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.adjustVisual(),this.colorChanged(mt)},Ft.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.adjustVisual()},Ft.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ft.prototype.getState=function(){var mt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Gt.prototype.getState.call(this));return mt.typeName=Ft.typeName,mt},Ft.prototype.restoreState=function(mt){Gt.prototype.restoreState.call(this,mt);var vt=mt;this.strokeColor=vt.strokeColor,this.strokeWidth=vt.strokeWidth,this.strokeDasharray=vt.strokeDasharray,this.createVisual(),this.adjustVisual()},Ft.typeName="LineMarker",Ft.title="Line marker",Ft.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Ft}(te),pe=function(Gt){function Ft(mt,vt,Lt,Ct){var _t=Gt.call(this,mt,Ct||'<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 _t.fonts=[],_t.fontBoxes=[],_t.fonts=vt,_t.currentFont=Lt,_t.setCurrentFont=_t.setCurrentFont.bind(_t),_t}return Xt(Ft,Gt),Ft.prototype.getUi=function(){var mt=this,vt=document.createElement("div");return vt.style.overflow="hidden",vt.style.flexGrow="2",this.fonts.forEach(function(Lt){var Ct=document.createElement("div");Ct.style.display="inline-block",Ct.style.alignItems="center",Ct.style.justifyContent="space-between",Ct.style.padding="5px",Ct.style.borderWidth="2px",Ct.style.borderStyle="solid",Ct.style.overflow="hidden",Ct.style.maxWidth=100/mt.fonts.length-5+"%",Ct.style.borderColor=Lt===mt.currentFont?mt.uiStyleSettings.toolboxAccentColor:"transparent",Ct.addEventListener("click",function(){mt.setCurrentFont(Lt,Ct)}),vt.appendChild(Ct);var _t=document.createElement("div");_t.style.display="flex",_t.style.minHeight="20px",_t.style.flexGrow="2",_t.style.fontFamily=Lt,_t.style.overflow="hidden";var Pe=document.createElement("div");Pe.style.whiteSpace="nowrap",Pe.style.overflow="hidden",Pe.style.textOverflow="ellipsis",Pe.innerHTML="The quick brown fox jumps over the lazy dog",_t.appendChild(Pe),Ct.appendChild(_t),mt.fontBoxes.push(Ct)}),vt},Ft.prototype.setCurrentFont=function(mt,vt){var Lt=this;this.currentFont=mt,this.fontBoxes.forEach(function(Ct){Ct.style.borderColor=Ct===vt?Lt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Ft}(nt),Ke=function(Gt){function Ft(mt,vt,Lt){var Ct=Gt.call(this,mt,vt,Lt)||this;return Ct.color="transparent",Ct.padding=5,Ct.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Ct.text=Ct.DEFAULT_TEXT,Ct.isMoved=!1,Ct.color=Lt.defaultColor,Ct.fontFamily=Lt.defaultFontFamily,Ct.defaultSize={x:100,y:30},Ct.setColor=Ct.setColor.bind(Ct),Ct.setFont=Ct.setFont.bind(Ct),Ct.renderText=Ct.renderText.bind(Ct),Ct.sizeText=Ct.sizeText.bind(Ct),Ct.textEditDivClicked=Ct.textEditDivClicked.bind(Ct),Ct.showTextEditor=Ct.showTextEditor.bind(Ct),Ct.setSize=Ct.setSize.bind(Ct),Ct.positionTextEditor=Ct.positionTextEditor.bind(Ct),Ct.colorPanel=new et("Color",Lt.defaultColorSet,Lt.defaultColor),Ct.colorPanel.onColorChanged=Ct.setColor,Ct.fontFamilyPanel=new pe("Font",Lt.defaultFontFamilies,Lt.defaultFontFamily),Ct.fontFamilyPanel.onFontChanged=Ct.setFont,Ct}return Xt(Ft,Gt),Ft.prototype.ownsTarget=function(mt){if(Gt.prototype.ownsTarget.call(this,mt)||mt===this.visual||mt===this.textElement||mt===this.bgRectangle)return!0;var vt=!1;return this.textElement.childNodes.forEach(function(Lt){Lt===mt&&(vt=!0)}),vt},Ft.prototype.createVisual=function(){this.visual=Rt.createGroup(),this.bgRectangle=Rt.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Rt.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Rt.createTransform()),this.textElement.transform.baseVal.appendItem(Rt.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Ft.prototype.pointerDown=function(mt,vt){Gt.prototype.pointerDown.call(this,mt,vt),this.isMoved=!1,this.pointerDownPoint=mt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},Ft.prototype.renderText=function(){var mt=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(vt){mt.textElement.appendChild(Rt.createTSpan(vt.trim()===""?" ":vt.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Ft.prototype.getTextScale=function(){var mt=this.textElement.getBBox(),vt=1;if(mt.width>0&&mt.height>0){var Lt=(1*this.width-this.width*this.padding*2/100)/mt.width,Ct=(1*this.height-this.height*this.padding*2/100)/mt.height;vt=Math.min(Lt,Ct)}return vt},Ft.prototype.getTextPosition=function(mt){var vt=this.textElement.getBBox(),Lt=0,Ct=0;return vt.width>0&&vt.height>0&&(Lt=(this.width-vt.width*mt)/2,Ct=this.height/2-vt.height*mt/2),{x:Lt,y:Ct}},Ft.prototype.sizeText=function(){var mt=this.textElement.getBBox(),vt=this.getTextScale(),Lt=this.getTextPosition(vt);Lt.y-=mt.y*vt,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Lt.x+"px, "+Lt.y+"px) scale("+vt+", "+vt+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Lt.x,Lt.y),this.textElement.transform.baseVal.getItem(1).setScale(vt,vt))},Ft.prototype.manipulate=function(mt){Gt.prototype.manipulate.call(this,mt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(mt.x-this.pointerDownPoint.x)>5||Math.abs(mt.y-this.pointerDownPoint.y)>5)},Ft.prototype.resize=function(mt){Gt.prototype.resize.call(this,mt),this.isMoved=!0,this.setSize(),this.sizeText()},Ft.prototype.setSize=function(){Gt.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Rt.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Rt.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Ft.prototype.pointerUp=function(mt){var vt=this.state;vt==="creating"&&(this._suppressMarkerCreateEvent=!0),Gt.prototype.pointerUp.call(this,mt),this.setSize(),(vt==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Ft.prototype.showTextEditor=function(){var mt=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(vt){vt.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var vt=Number.parseFloat(mt.textEditor.style.fontSize);mt.textEditor.clientWidth>=Number.parseInt(mt.textEditor.style.maxWidth)&&vt>.9;)vt-=.1,mt.textEditor.style.fontSize=Math.max(vt,.9)+"em"}),this.textEditor.addEventListener("keyup",function(vt){vt.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(vt){if(vt.clipboardData){var Lt=vt.clipboardData.getData("text"),Ct=window.getSelection();if(!Ct.rangeCount)return!1;Ct.deleteFromDocument(),Ct.getRangeAt(0).insertNode(document.createTextNode(Lt)),vt.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){mt.textEditDivClicked(mt.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},Ft.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var mt=this.getTextScale(),vt=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Lt=this.textElement.getBBox(),Ct={x:Lt.width*mt,y:Lt.height*mt};vt.x-=Ct.x/2,vt.y-=Ct.y/2,this.textEditor.style.top=vt.y+"px",this.textEditor.style.left=vt.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-vt.x+"px",this.textEditor.style.fontSize=Math.max(16*mt,12)+"px",this.textElement.style.display="none"}},Ft.prototype.textEditDivClicked=function(mt){this.text=mt.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Ft.prototype.select=function(){Gt.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Ft.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Gt.prototype.deselect.call(this)},Ft.prototype.dblClick=function(mt,vt){Gt.prototype.dblClick.call(this,mt,vt),this.showTextEditor()},Ft.prototype.setColor=function(mt){this.textElement&&Rt.setAttributes(this.textElement,[["fill",mt]]),this.color=mt,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(mt)},Ft.prototype.setFont=function(mt){this.textElement&&Rt.setAttributes(this.textElement,[["font-family",mt]]),this.fontFamily=mt,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Ft.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Ft.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Ft.prototype.getState=function(){var mt=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Gt.prototype.getState.call(this));return mt.typeName=Ft.typeName,mt},Ft.prototype.restoreState=function(mt){var vt=mt;this.color=vt.color,this.fontFamily=vt.fontFamily,this.padding=vt.padding,this.text=vt.text,this.createVisual(),Gt.prototype.restoreState.call(this,mt),this.setSize()},Ft.prototype.scale=function(mt,vt){Gt.prototype.scale.call(this,mt,vt),this.setSize(),this.sizeText(),this.positionTextEditor()},Ft.typeName="TextMarker",Ft.title="Text marker",Ft.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>',Ft}(xt),_e=function(Gt){function Ft(mt,vt,Lt){var Ct=Gt.call(this,mt,vt,Lt)||this;return Ct.color="transparent",Ct.lineWidth=3,Ct.drawing=!1,Ct.pixelRatio=1,Ct.color=Lt.defaultColor,Ct.lineWidth=Lt.defaultStrokeWidth,Ct.pixelRatio=Lt.freehandPixelRatio,Ct.setColor=Ct.setColor.bind(Ct),Ct.addCanvas=Ct.addCanvas.bind(Ct),Ct.finishCreation=Ct.finishCreation.bind(Ct),Ct.setLineWidth=Ct.setLineWidth.bind(Ct),Ct.colorPanel=new et("Color",Lt.defaultColorSet,Lt.defaultColor),Ct.colorPanel.onColorChanged=Ct.setColor,Ct.lineWidthPanel=new Ht("Line width",Lt.defaultStrokeWidths,Lt.defaultStrokeWidth),Ct.lineWidthPanel.onWidthChanged=Ct.setLineWidth,Ct}return Xt(Ft,Gt),Ft.prototype.ownsTarget=function(mt){return!(!Gt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.drawingImage)},Ft.prototype.createVisual=function(){this.visual=Rt.createGroup(),this.drawingImage=Rt.createImage(),this.visual.appendChild(this.drawingImage);var mt=Rt.createTransform();this.visual.transform.baseVal.appendItem(mt),this.addMarkerVisualToContainer(this.visual)},Ft.prototype.pointerDown=function(mt,vt){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(mt.x,mt.y),this.drawing=!0):Gt.prototype.pointerDown.call(this,mt,vt)},Ft.prototype.manipulate=function(mt){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(mt.x,mt.y),this.canvasContext.stroke()):Gt.prototype.manipulate.call(this,mt)},Ft.prototype.resize=function(mt){Gt.prototype.resize.call(this,mt),Rt.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Rt.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Ft.prototype.pointerUp=function(mt){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Gt.prototype.pointerUp.call(this,mt)},Ft.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)},Ft.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Gt.prototype.select.call(this)},Ft.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Gt.prototype.deselect.call(this)},Ft.prototype.finishCreation=function(){for(var mt=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),vt=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Lt=vt[0],Ct=vt[1],_t=vt[2],Pe=vt[3],ze=!1,wn=0;wn<this.canvasElement.height;wn++)for(var Ge=0;Ge<this.canvasElement.width;Ge++)mt.data[wn*this.canvasElement.width*4+4*Ge+3]>0&&(ze=!0,wn<Ct&&(Ct=wn),Ge<Lt&&(Lt=Ge),wn>Pe&&(Pe=wn),Ge>_t&&(_t=Ge));if(ze){this.left=Lt/this.pixelRatio,this.top=Ct/this.pixelRatio,this.width=(_t-Lt)/this.pixelRatio,this.height=(Pe-Ct)/this.pixelRatio;var Te=document.createElement("canvas");Te.width=_t-Lt,Te.height=Pe-Ct,Te.getContext("2d").putImageData(this.canvasContext.getImageData(Lt,Ct,_t-Lt,Pe-Ct),0,0),this.drawingImgUrl=Te.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Ft.prototype.setDrawingImage=function(){Rt.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Rt.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Ft.prototype.setColor=function(mt){this.color=mt,this.colorChanged(mt)},Ft.prototype.setLineWidth=function(mt){this.lineWidth=mt},Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Ft.prototype.getState=function(){var mt=Object.assign({drawingImgUrl:this.drawingImgUrl},Gt.prototype.getState.call(this));return mt.typeName=Ft.typeName,mt},Ft.prototype.restoreState=function(mt){this.createVisual(),Gt.prototype.restoreState.call(this,mt),this.drawingImgUrl=mt.drawingImgUrl,this.setDrawingImage()},Ft.prototype.scale=function(mt,vt){Gt.prototype.scale.call(this,mt,vt),this.setDrawingImage()},Ft.typeName="FreehandMarker",Ft.title="Freehand marker",Ft.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>',Ft}(xt),en=function(Gt){function Ft(mt,vt,Lt){var Ct=Gt.call(this,mt,Lt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Ct.typeBoxes=[],Ct.currentType=vt,Ct.setCurrentType=Ct.setCurrentType.bind(Ct),Ct}return Xt(Ft,Gt),Ft.prototype.getUi=function(){var mt=this,vt=document.createElement("div");vt.style.display="flex",vt.style.overflow="hidden",vt.style.flexGrow="2";for(var Lt=function(Pe){var ze="both";switch(Pe){case 0:ze="both";break;case 1:ze="start";break;case 2:ze="end";break;case 3:ze="none"}var wn=document.createElement("div");if(wn.style.display="flex",wn.style.flexGrow="2",wn.style.alignItems="center",wn.style.justifyContent="space-between",wn.style.padding="5px",wn.style.borderWidth="2px",wn.style.borderStyle="solid",wn.style.borderColor=ze===Ct.currentType?Ct.uiStyleSettings.toolboxAccentColor:"transparent",wn.addEventListener("click",function(){mt.setCurrentType(ze,wn)}),vt.appendChild(wn),ze==="both"||ze==="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="`+(Ct.uiStyleSettings!==void 0?Ct.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Ge.style.marginLeft="5px",wn.appendChild(Ge)}var Te=document.createElement("div");Te.style.display="flex",Te.style.alignItems="center",Te.style.minHeight="20px",Te.style.flexGrow="2";var Ze=document.createElement("hr");if(Ze.style.minWidth="20px",Ze.style.border="0px",Ze.style.borderTop="3px solid "+(Ct.uiStyleSettings!==void 0?Ct.uiStyleSettings.toolboxColor:"#eeeeee"),Ze.style.flexGrow="2",Te.appendChild(Ze),wn.appendChild(Te),ze==="both"||ze==="end"){var hn=document.createElement("div");hn.style.display="flex",hn.style.alignItems="center",hn.style.minHeight="20px",hn.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="`+(Ct.uiStyleSettings!==void 0?Ct.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,hn.style.marginRight="5px",wn.appendChild(hn)}Ct.typeBoxes.push(wn)},Ct=this,_t=0;_t<4;_t++)Lt(_t);return vt},Ft.prototype.setCurrentType=function(mt,vt){var Lt=this;this.currentType=mt,this.typeBoxes.forEach(function(Ct){Ct.style.borderColor=Ct===vt?Lt.uiStyleSettings!==void 0?Lt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Ft}(nt),dn=function(Gt){function Ft(mt,vt,Lt){var Ct=Gt.call(this,mt,vt,Lt)||this;return Ct.arrowType="end",Ct.arrowBaseHeight=10,Ct.arrowBaseWidth=10,Ct.getArrowPoints=Ct.getArrowPoints.bind(Ct),Ct.setArrowType=Ct.setArrowType.bind(Ct),Ct.arrowTypePanel=new en("Arrow type","end"),Ct.arrowTypePanel.onArrowTypeChanged=Ct.setArrowType,Ct}return Xt(Ft,Gt),Ft.prototype.ownsTarget=function(mt){return!(!Gt.prototype.ownsTarget.call(this,mt)&&mt!==this.arrow1&&mt!==this.arrow2)},Ft.prototype.getArrowPoints=function(mt,vt){var Lt=this.arrowBaseWidth+2*this.strokeWidth,Ct=this.arrowBaseHeight+2*this.strokeWidth;return mt-Lt/2+","+(vt+Ct/2)+" "+mt+","+(vt-Ct/2)+" "+(mt+Lt/2)+","+(vt+Ct/2)},Ft.prototype.createTips=function(){this.arrow1=Rt.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Rt.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Rt.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Rt.createTransform()),this.visual.appendChild(this.arrow2)},Ft.prototype.pointerDown=function(mt,vt){Gt.prototype.pointerDown.call(this,mt,vt),this.state==="creating"&&this.createTips()},Ft.prototype.adjustVisual=function(){if(Gt.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",Rt.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Rt.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var mt=0;Math.abs(this.x1-this.x2)>.1&&(mt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var vt=this.arrow1.transform.baseVal.getItem(0);vt.setRotate(mt,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(vt,0);var Lt=this.arrow2.transform.baseVal.getItem(0);Lt.setRotate(mt+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Lt,0)}},Ft.prototype.setArrowType=function(mt){this.arrowType=mt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Ft.prototype.getState=function(){var mt=Object.assign({arrowType:this.arrowType},Gt.prototype.getState.call(this));return mt.typeName=Ft.typeName,mt},Ft.prototype.restoreState=function(mt){Gt.prototype.restoreState.call(this,mt);var vt=mt;this.arrowType=vt.arrowType,this.createTips(),this.adjustVisual()},Ft.typeName="ArrowMarker",Ft.title="Arrow marker",Ft.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Ft}(we),yn=function(Gt){function Ft(mt,vt,Lt){var Ct=Gt.call(this,mt,vt,Lt)||this;return Ct.fillColor=Lt.defaultFillColor,Ct.strokeWidth=0,Ct.fillPanel=new et("Color",Lt.defaultColorSet,Lt.defaultFillColor),Ct.fillPanel.onColorChanged=Ct.setFillColor,Ct}return Xt(Ft,Gt),Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Ft.prototype.getState=function(){var mt=Gt.prototype.getState.call(this);return mt.typeName=Ft.typeName,mt},Ft.typeName="CoverMarker",Ft.title="Cover marker",Ft.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Ft}(kt),Nn=function(Gt){function Ft(mt,vt,Lt,Ct){var _t=Gt.call(this,mt,Ct||'<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 _t.opacities=[],_t.opacityBoxes=[],_t.opacities=vt,_t.currentOpacity=Lt,_t.setCurrentOpacity=_t.setCurrentOpacity.bind(_t),_t}return Xt(Ft,Gt),Ft.prototype.getUi=function(){var mt=this,vt=document.createElement("div");return vt.style.display="flex",vt.style.overflow="hidden",vt.style.flexGrow="2",vt.style.justifyContent="space-between",this.opacities.forEach(function(Lt){var Ct=document.createElement("div");Ct.style.display="flex",Ct.style.alignItems="center",Ct.style.justifyContent="center",Ct.style.padding="5px",Ct.style.borderWidth="2px",Ct.style.borderStyle="solid",Ct.style.borderColor=Lt===mt.currentOpacity?mt.uiStyleSettings.toolboxAccentColor:"transparent",Ct.addEventListener("click",function(){mt.setCurrentOpacity(Lt,Ct)}),vt.appendChild(Ct);var _t=document.createElement("div");_t.innerText=100*Lt+"%",Ct.appendChild(_t),mt.opacityBoxes.push(Ct)}),vt},Ft.prototype.setCurrentOpacity=function(mt,vt){var Lt=this;this.currentOpacity=mt,this.opacityBoxes.forEach(function(Ct){Ct.style.borderColor=Ct===vt?Lt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Ft}(nt),Kn=function(Gt){function Ft(mt,vt,Lt){var Ct=Gt.call(this,mt,vt,Lt)||this;return Ct.setOpacity=Ct.setOpacity.bind(Ct),Ct.fillColor=Lt.defaultHighlightColor,Ct.strokeWidth=0,Ct.opacity=Lt.defaultHighlightOpacity,Ct.fillPanel=new et("Color",Lt.defaultColorSet,Ct.fillColor),Ct.fillPanel.onColorChanged=Ct.setFillColor,Ct.opacityPanel=new Nn("Opacity",Lt.defaultOpacitySteps,Ct.opacity),Ct.opacityPanel.onOpacityChanged=Ct.setOpacity,Ct}return Xt(Ft,Gt),Ft.prototype.setOpacity=function(mt){this.opacity=mt,this.visual&&Rt.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Ft.prototype.getState=function(){var mt=Gt.prototype.getState.call(this);return mt.typeName=Ft.typeName,mt},Ft.typeName="HighlightMarker",Ft.title="Highlight marker",Ft.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>',Ft}(yn),me='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',ee='<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>',gn=function(Gt){function Ft(mt,vt,Lt){var Ct=Gt.call(this,mt,vt,Lt)||this;return Ct.bgColor="transparent",Ct.tipPosition={x:0,y:0},Ct.tipBase1Position={x:0,y:0},Ct.tipBase2Position={x:0,y:0},Ct.tipMoving=!1,Ct.color=Lt.defaultStrokeColor,Ct.bgColor=Lt.defaultFillColor,Ct.fontFamily=Lt.defaultFontFamily,Ct.defaultSize={x:100,y:30},Ct.setBgColor=Ct.setBgColor.bind(Ct),Ct.getTipPoints=Ct.getTipPoints.bind(Ct),Ct.positionTip=Ct.positionTip.bind(Ct),Ct.setTipPoints=Ct.setTipPoints.bind(Ct),Ct.colorPanel=new et("Text color",Lt.defaultColorSet,Ct.color,me),Ct.colorPanel.onColorChanged=Ct.setColor,Ct.bgColorPanel=new et("Fill color",Lt.defaultColorSet,Ct.bgColor,ee),Ct.bgColorPanel.onColorChanged=Ct.setBgColor,Ct.fontFamilyPanel=new pe("Font",Lt.defaultFontFamilies,Lt.defaultFontFamily),Ct.fontFamilyPanel.onFontChanged=Ct.setFont,Ct.tipGrip=new dt,Ct.tipGrip.visual.transform.baseVal.appendItem(Rt.createTransform()),Ct.controlBox.appendChild(Ct.tipGrip.visual),Ct}return Xt(Ft,Gt),Ft.prototype.ownsTarget=function(mt){return Gt.prototype.ownsTarget.call(this,mt)||this.tipGrip.ownsTarget(mt)||this.tip===mt},Ft.prototype.createTip=function(){Rt.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Rt.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Ft.prototype.pointerDown=function(mt,vt){this.state==="new"&&Gt.prototype.pointerDown.call(this,mt,vt),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(vt)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Gt.prototype.pointerDown.call(this,mt,vt)},Ft.prototype.pointerUp=function(mt){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Gt.prototype.pointerUp.call(this,mt);else{var vt=this.state==="creating";Gt.prototype.pointerUp.call(this,mt),this.setTipPoints(vt),this.positionTip()}},Ft.prototype.manipulate=function(mt){if(this.tipMoving){var vt=this.unrotatePoint(mt);this.tipPosition={x:vt.x-this.manipulationStartLeft,y:vt.y-this.manipulationStartTop},this.positionTip()}else Gt.prototype.manipulate.call(this,mt)},Ft.prototype.setBgColor=function(mt){this.bgRectangle&&this.tip&&(Rt.setAttributes(this.bgRectangle,[["fill",mt]]),Rt.setAttributes(this.tip,[["fill",mt]])),this.bgColor=mt,this.fillColorChanged(mt)},Ft.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},Ft.prototype.setTipPoints=function(mt){mt===void 0&&(mt=!1);var vt=Math.min(this.height/2,15),Lt=this.height/5;mt&&(this.tipPosition={x:vt+Lt/2,y:this.height+20});var Ct=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Ct<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Lt=this.width/5,vt=Math.min(this.width/2,15),this.tipBase1Position={x:vt,y:0},this.tipBase2Position={x:vt+Lt,y:0}):(this.tipBase1Position={x:0,y:vt},this.tipBase2Position={x:0,y:vt+Lt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Ct<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Lt=this.width/5,vt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-vt-Lt,y:0},this.tipBase2Position={x:this.width-vt,y:0}):(this.tipBase1Position={x:this.width,y:vt},this.tipBase2Position={x:this.width,y:vt+Lt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Ct<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Lt=this.width/5,vt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-vt-Lt,y:this.height},this.tipBase2Position={x:this.width-vt,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-vt-Lt},this.tipBase2Position={x:this.width,y:this.height-vt}):Ct<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Lt=this.width/5,vt=Math.min(this.width/2,15),this.tipBase1Position={x:vt,y:this.height},this.tipBase2Position={x:vt+Lt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-vt},this.tipBase2Position={x:0,y:this.height-vt-Lt})},Ft.prototype.resize=function(mt){Gt.prototype.resize.call(this,mt),this.positionTip()},Ft.prototype.positionTip=function(){Rt.setAttributes(this.tip,[["points",this.getTipPoints()]]);var mt=this.tipGrip.visual.transform.baseVal.getItem(0);mt.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(mt,0)},Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Ft.prototype.select=function(){this.positionTip(),Gt.prototype.select.call(this)},Ft.prototype.getState=function(){var mt=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Gt.prototype.getState.call(this));return mt.typeName=Ft.typeName,mt},Ft.prototype.restoreState=function(mt){var vt=mt;this.bgColor=vt.bgColor,this.tipPosition=vt.tipPosition,Gt.prototype.restoreState.call(this,mt),this.createTip(),this.setTipPoints()},Ft.prototype.scale=function(mt,vt){Gt.prototype.scale.call(this,mt,vt),this.tipPosition={x:this.tipPosition.x*mt,y:this.tipPosition.y*vt},this.positionTip()},Ft.typeName="CalloutMarker",Ft.title="Callout marker",Ft.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>',Ft}(Ke),$n=function(Gt){function Ft(mt,vt,Lt){var Ct=Gt.call(this,mt,vt,Lt)||this;return Ct.fillColor="transparent",Ct.strokeColor="transparent",Ct.strokeWidth=0,Ct.strokeDasharray="",Ct.opacity=1,Ct.strokeColor=Lt.defaultColor,Ct.strokeWidth=Lt.defaultStrokeWidth,Ct.strokeDasharray=Lt.defaultStrokeDasharray,Ct.fillColor=Lt.defaultFillColor,Ct.setStrokeColor=Ct.setStrokeColor.bind(Ct),Ct.setFillColor=Ct.setFillColor.bind(Ct),Ct.setStrokeWidth=Ct.setStrokeWidth.bind(Ct),Ct.setStrokeDasharray=Ct.setStrokeDasharray.bind(Ct),Ct.setOpacity=Ct.setOpacity.bind(Ct),Ct.createVisual=Ct.createVisual.bind(Ct),Ct.strokePanel=new et("Line color",fe(Lt.defaultColorSet,["transparent"]),Lt.defaultColor),Ct.strokePanel.onColorChanged=Ct.setStrokeColor,Ct.fillPanel=new et("Fill color",fe(Lt.defaultColorSet,["transparent"]),Ct.fillColor,ee),Ct.fillPanel.onColorChanged=Ct.setFillColor,Ct.strokeWidthPanel=new Ht("Line width",Lt.defaultStrokeWidths,Lt.defaultStrokeWidth),Ct.strokeWidthPanel.onWidthChanged=Ct.setStrokeWidth,Ct.strokeStylePanel=new Ot("Line style",Lt.defaultStrokeDasharrays,Lt.defaultStrokeDasharray),Ct.strokeStylePanel.onStyleChanged=Ct.setStrokeDasharray,Ct.opacityPanel=new Nn("Opacity",Lt.defaultOpacitySteps,Ct.opacity),Ct.opacityPanel.onOpacityChanged=Ct.setOpacity,Ct}return Xt(Ft,Gt),Ft.prototype.ownsTarget=function(mt){return!(!Gt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual)},Ft.prototype.createVisual=function(){this.visual=Rt.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)},Ft.prototype.pointerDown=function(mt,vt){Gt.prototype.pointerDown.call(this,mt,vt),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},Ft.prototype.manipulate=function(mt){Gt.prototype.manipulate.call(this,mt)},Ft.prototype.resize=function(mt){Gt.prototype.resize.call(this,mt),this.setSize()},Ft.prototype.setSize=function(){Gt.prototype.setSize.call(this),Rt.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},Ft.prototype.pointerUp=function(mt){Gt.prototype.pointerUp.call(this,mt),this.setSize()},Ft.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.visual&&Rt.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},Ft.prototype.setFillColor=function(mt){this.fillColor=mt,this.visual&&Rt.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(mt),this.stateChanged()},Ft.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.visual&&Rt.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ft.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.visual&&Rt.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Ft.prototype.setOpacity=function(mt){this.opacity=mt,this.visual&&Rt.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Ft.prototype.getState=function(){var mt=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Gt.prototype.getState.call(this));return mt.typeName=Ft.typeName,mt},Ft.prototype.restoreState=function(mt){var vt=mt;this.fillColor=vt.fillColor,this.strokeColor=vt.strokeColor,this.strokeWidth=vt.strokeWidth,this.strokeDasharray=vt.strokeDasharray,this.opacity=vt.opacity,this.createVisual(),Gt.prototype.restoreState.call(this,mt),this.setSize()},Ft.prototype.scale=function(mt,vt){Gt.prototype.scale.call(this,mt,vt),this.setSize()},Ft.typeName="EllipseMarker",Ft.title="Ellipse marker",Ft.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>',Ft}(xt),Yn=function(Gt){function Ft(mt,vt,Lt){return Gt.call(this,mt,vt,Lt)||this}return Xt(Ft,Gt),Object.defineProperty(Ft.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Ft.prototype.ownsTarget=function(mt){return!(!Gt.prototype.ownsTarget.call(this,mt)&&mt!==this.tip1&&mt!==this.tip2)},Ft.prototype.createTips=function(){this.tip1=Rt.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(Rt.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Rt.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(Rt.createTransform()),this.visual.appendChild(this.tip2)},Ft.prototype.pointerDown=function(mt,vt){Gt.prototype.pointerDown.call(this,mt,vt),this.state==="creating"&&this.createTips()},Ft.prototype.adjustVisual=function(){if(Gt.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Rt.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()]]),Rt.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 mt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),vt=this.tip1.transform.baseVal.getItem(0);vt.setRotate(mt,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(vt,0);var Lt=this.tip2.transform.baseVal.getItem(0);Lt.setRotate(mt+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Lt,0)}},Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ft.prototype.getState=function(){var mt=Gt.prototype.getState.call(this);return mt.typeName=Ft.typeName,mt},Ft.prototype.restoreState=function(mt){Gt.prototype.restoreState.call(this,mt),this.createTips(),this.adjustVisual()},Ft.typeName="MeasurementMarker",Ft.title="Measurement marker",Ft.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>',Ft}(we),nn=function(Gt){function Ft(mt,vt,Lt){var Ct=Gt.call(this,mt,vt,Lt)||this;return Ct.strokePanel.colors=Lt.defaultColorSet,Ct.fillColor="transparent",Ct}return Xt(Ft,Gt),Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ft.prototype.getState=function(){var mt=Gt.prototype.getState.call(this);return mt.typeName=Ft.typeName,mt},Ft.typeName="EllipseFrameMarker",Ft.title="Ellipse frame marker",Ft.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>',Ft}($n),Tn=function(){function Gt(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Gt.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Gt.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Gt.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Gt.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Gt.prototype.addUndoStep=function(Ft){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Ft)||(this.undoStack.push(Ft),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Ft)&&this.redoStack.splice(0,this.redoStack.length))},Gt.prototype.replaceLastUndoStep=function(Ft){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Ft)},Gt.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Gt.prototype.undo=function(){if(this.undoStack.length>1){var Ft=this.undoStack.pop();return Ft!==void 0&&this.redoStack.push(Ft),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Gt.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Gt}(),Gn=function(Gt){function Ft(mt,vt,Lt){var Ct=Gt.call(this,mt,vt,Lt)||this;return Ct.strokeColor="transparent",Ct.strokeWidth=0,Ct.strokeDasharray="",Ct.curveX=0,Ct.curveY=0,Ct.manipulationStartCurveX=0,Ct.manipulationStartCurveY=0,Ct.setStrokeColor=Ct.setStrokeColor.bind(Ct),Ct.setStrokeWidth=Ct.setStrokeWidth.bind(Ct),Ct.setStrokeDasharray=Ct.setStrokeDasharray.bind(Ct),Ct.positionGrips=Ct.positionGrips.bind(Ct),Ct.addControlGrips=Ct.addControlGrips.bind(Ct),Ct.adjustVisual=Ct.adjustVisual.bind(Ct),Ct.setupControlBox=Ct.setupControlBox.bind(Ct),Ct.resize=Ct.resize.bind(Ct),Ct.strokeColor=Lt.defaultColor,Ct.strokeWidth=Lt.defaultStrokeWidth,Ct.strokeDasharray=Lt.defaultStrokeDasharray,Ct.strokePanel=new et("Line color",Lt.defaultColorSet,Lt.defaultColor),Ct.strokePanel.onColorChanged=Ct.setStrokeColor,Ct.strokeWidthPanel=new Ht("Line width",Lt.defaultStrokeWidths,Lt.defaultStrokeWidth),Ct.strokeWidthPanel.onWidthChanged=Ct.setStrokeWidth,Ct.strokeStylePanel=new Ot("Line style",Lt.defaultStrokeDasharrays,Lt.defaultStrokeDasharray),Ct.strokeStylePanel.onStyleChanged=Ct.setStrokeDasharray,Ct}return Xt(Ft,Gt),Ft.prototype.ownsTarget=function(mt){return!(!Gt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.selectorCurve&&mt!==this.visibleCurve&&!this.curveGrip.ownsTarget(mt))},Ft.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Ft.prototype.createVisual=function(){this.visual=Rt.createGroup(),this.selectorCurve=Rt.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Rt.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)},Ft.prototype.pointerDown=function(mt,vt){Gt.prototype.pointerDown.call(this,mt,vt),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=mt.x,this.curveY=mt.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(vt)&&(this.activeGrip=this.curveGrip,this._state="resize")},Ft.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Rt.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Rt.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Rt.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Ft.prototype.setupControlBox=function(){Gt.prototype.setupControlBox.call(this),this.curveControlLine1=Rt.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Rt.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)},Ft.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Gt.prototype.addControlGrips.call(this)},Ft.prototype.positionGrips=function(){Gt.prototype.positionGrips.call(this);var mt=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-mt/2,this.curveY-mt/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()))},Ft.prototype.manipulate=function(mt){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+mt.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+mt.y-this.manipulationStartY),Gt.prototype.manipulate.call(this,mt)},Ft.prototype.resize=function(mt){this.activeGrip===this.curveGrip&&(this.curveX=mt.x,this.curveY=mt.y),Gt.prototype.resize.call(this,mt),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},Ft.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.adjustVisual(),this.colorChanged(mt)},Ft.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.adjustVisual()},Ft.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.adjustVisual()},Ft.prototype.scale=function(mt,vt){this.curveX=this.curveX*mt,this.curveY=this.curveY*vt,Gt.prototype.scale.call(this,mt,vt)},Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ft.prototype.getState=function(){var mt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Gt.prototype.getState.call(this));return mt.typeName=Ft.typeName,mt},Ft.prototype.restoreState=function(mt){Gt.prototype.restoreState.call(this,mt);var vt=mt;this.strokeColor=vt.strokeColor,this.strokeWidth=vt.strokeWidth,this.strokeDasharray=vt.strokeDasharray,this.curveX=vt.curveX,this.curveY=vt.curveY,this.createVisual(),this.adjustVisual()},Ft.typeName="CurveMarker",Ft.title="Curve marker",Ft.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>',Ft}(te),yi=function(Gt){function Ft(mt,vt,Lt){var Ct=Gt.call(this,mt,vt,Lt)||this;return Ct.fillColor="transparent",Ct.strokeColor="transparent",Ct.strokeWidth=0,Ct.strokeDasharray="",Ct.textColor="transparent",Ct.fontSize="1rem",Ct.isMoved=!1,Ct.captionText="Caption",Ct.PADDING=5,Ct.captionBoxWidth=0,Ct.captionBoxHeight=0,Ct.strokeColor=Lt.defaultColor,Ct.strokeWidth=Lt.defaultStrokeWidth,Ct.strokeDasharray=Lt.defaultStrokeDasharray,Ct.fillColor=Lt.defaultFillColor,Ct.textColor=Lt.defaultStrokeColor,Ct.fontFamily=Lt.defaultFontFamily,Ct.fontSize=Lt.defaultCaptionFontSize,Ct.captionText=Lt.defaultCaptionText,Ct.setStrokeColor=Ct.setStrokeColor.bind(Ct),Ct.setFillColor=Ct.setFillColor.bind(Ct),Ct.setStrokeWidth=Ct.setStrokeWidth.bind(Ct),Ct.setStrokeDasharray=Ct.setStrokeDasharray.bind(Ct),Ct.createVisual=Ct.createVisual.bind(Ct),Ct.sizeCaption=Ct.sizeCaption.bind(Ct),Ct.setCaptionText=Ct.setCaptionText.bind(Ct),Ct.showTextEditor=Ct.showTextEditor.bind(Ct),Ct.positionTextEditor=Ct.positionTextEditor.bind(Ct),Ct.finishTextEditing=Ct.finishTextEditing.bind(Ct),Ct.setFont=Ct.setFont.bind(Ct),Ct.setTextColor=Ct.setTextColor.bind(Ct),Ct.strokePanel=new et("Line color",fe(Lt.defaultColorSet,["transparent"]),Ct.strokeColor),Ct.strokePanel.onColorChanged=Ct.setStrokeColor,Ct.fillPanel=new et("Fill color",fe(Lt.defaultColorSet,["transparent"]),Ct.fillColor,ee),Ct.fillPanel.onColorChanged=Ct.setFillColor,Ct.strokeWidthPanel=new Ht("Line width",Lt.defaultStrokeWidths,Lt.defaultStrokeWidth),Ct.strokeWidthPanel.onWidthChanged=Ct.setStrokeWidth,Ct.strokeStylePanel=new Ot("Line style",Lt.defaultStrokeDasharrays,Lt.defaultStrokeDasharray),Ct.strokeStylePanel.onStyleChanged=Ct.setStrokeDasharray,Ct.fontFamilyPanel=new pe("Font",Lt.defaultFontFamilies,Lt.defaultFontFamily),Ct.fontFamilyPanel.onFontChanged=Ct.setFont,Ct.textColorPanel=new et("Text color",Lt.defaultColorSet,Ct.textColor,me),Ct.textColorPanel.onColorChanged=Ct.setTextColor,Ct}return Xt(Ft,Gt),Ft.prototype.ownsTarget=function(mt){return!(!Gt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.frame&&mt!==this.captionBg&&mt!==this.captionElement)},Ft.prototype.createVisual=function(){this.visual=Rt.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Rt.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Rt.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=Rt.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()},Ft.prototype.setCaptionText=function(mt){this.captionText=mt,this.captionElement.textContent=this.captionText,this.sizeCaption()},Ft.prototype.pointerDown=function(mt,vt){Gt.prototype.pointerDown.call(this,mt,vt),this.isMoved=!1,this.pointerDownPoint=mt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},Ft.prototype.manipulate=function(mt){Gt.prototype.manipulate.call(this,mt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(mt.x-this.pointerDownPoint.x)>5||Math.abs(mt.y-this.pointerDownPoint.y)>5)},Ft.prototype.resize=function(mt){Gt.prototype.resize.call(this,mt),this.setSize()},Ft.prototype.sizeCaption=function(){var mt=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=mt.width+2*this.PADDING,this.captionBoxHeight=mt.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Rt.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')"]]),Rt.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')"]])},Ft.prototype.showTextEditor=function(){var mt=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(vt){vt.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(vt){vt.key==="Enter"&&mt.finishTextEditing(mt.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(vt){vt.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){mt.finishTextEditing(mt.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){mt.finishTextEditing(mt.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},Ft.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"))},Ft.prototype.finishTextEditing=function(mt){this.setCaptionText(mt.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Ft.prototype.setFont=function(mt){this.captionElement&&Rt.setAttributes(this.captionElement,[["font-family",mt]]),this.fontFamily=mt,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Ft.prototype.setTextColor=function(mt){this.captionElement&&Rt.setAttributes(this.captionElement,[["fill",mt]]),this.textColor=mt,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Ft.prototype.setSize=function(){Gt.prototype.setSize.call(this),Rt.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Ft.prototype.pointerUp=function(mt){Gt.prototype.pointerUp.call(this,mt),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Ft.prototype.dblClick=function(mt,vt){Gt.prototype.dblClick.call(this,mt,vt),this.showTextEditor()},Ft.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.frame&&Rt.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},Ft.prototype.setFillColor=function(mt){this.fillColor=mt,this.captionBg&&Rt.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(mt),this.stateChanged()},Ft.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.frame&&Rt.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ft.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.frame&&Rt.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Ft.prototype.getState=function(){var mt=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},Gt.prototype.getState.call(this));return mt.typeName=this.typeName,mt},Ft.prototype.restoreState=function(mt){var vt=mt;this.fillColor=vt.fillColor,this.strokeColor=vt.strokeColor,this.strokeWidth=vt.strokeWidth,this.strokeDasharray=vt.strokeDasharray,this.textColor=vt.textColor,this.fontFamily=vt.fontFamily,this.captionText=vt.captionText,this.fontSize=vt.fontSize,this.createVisual(),Gt.prototype.restoreState.call(this,mt),this.setSize()},Ft.prototype.scale=function(mt,vt){Gt.prototype.scale.call(this,mt,vt),this.setSize()},Ft.typeName="CaptionFrameMarker",Ft.title="Caption frame marker",Ft.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>',Ft}(xt),Je=function(){function Gt(Ft,mt){mt===void 0&&(mt=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Ft,this.cancelable=mt}return Object.defineProperty(Gt.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Gt.prototype.preventDefault=function(){this._defaultPrevented=!0},Gt}(),Le=function(Gt){function Ft(mt,vt,Lt){var Ct=Gt.call(this,mt,!1)||this;return Ct.dataUrl=vt,Ct.state=Lt,Ct}return Xt(Ft,Gt),Ft}(Je),tn=function(Gt){function Ft(mt,vt,Lt){Lt===void 0&&(Lt=!1);var Ct=Gt.call(this,mt,Lt)||this;return Ct.marker=vt,Ct}return Xt(Ft,Gt),Ft}(Je),ti=function(){function Gt(){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 Gt.prototype.addEventListener=function(Ft,mt){this[Ft].push(mt)},Gt.prototype.removeEventListener=function(Ft,mt){var vt=this[Ft].indexOf(mt);vt>-1&&this[Ft].splice(vt,1)},Gt}(),jn=function(){function Gt(Ft){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Wt,this._isOpen=!1,this.undoRedoManager=new Tn,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 ti,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Gt.instanceCounter++,this.styles=new zt(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Ft,this.targetRoot=document.body,this.width=Ft.clientWidth,this.height=Ft.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(Gt.prototype,"ALL_MARKER_TYPES",{get:function(){return[Zt,_e,dn,Ke,nn,$n,Kn,gn,Yn,yn,we,Gn,yi]},enumerable:!1,configurable:!0}),Object.defineProperty(Gt.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Zt,_e,dn,Ke,$n,Kn,gn]},enumerable:!1,configurable:!0}),Object.defineProperty(Gt.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Zt,_e,dn,Ke,Kn]},enumerable:!1,configurable:!0}),Object.defineProperty(Gt.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Ft){var mt=this;this._availableMarkerTypes.splice(0),Ft.forEach(function(vt){if(typeof vt=="string"){var Lt=mt.ALL_MARKER_TYPES.find(function(Ct){return Ct.typeName===vt});Lt!==void 0&&mt._availableMarkerTypes.push(Lt)}else mt._availableMarkerTypes.push(vt)})},enumerable:!1,configurable:!0}),Object.defineProperty(Gt.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Gt.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Gt.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Gt.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Gt.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Ft){this._zoomLevel=Ft,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(Gt.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Gt.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ie.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Gt.prototype.show=function(){var Ft=this;this.styles.styleSheetRoot===void 0&&de.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=de.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(mt){return mt(new Je(Ft))})},Gt.prototype.render=function(){return Ae(this,void 0,void 0,function(){var Ft;return xe(this,function(mt){switch(mt.label){case 0:return this.setCurrentMarker(),(Ft=new ae).naturalSize=this.renderAtNaturalSize,Ft.imageType=this.renderImageType,Ft.imageQuality=this.renderImageQuality,Ft.markersOnly=this.renderMarkersOnly,Ft.width=this.renderWidth,Ft.height=this.renderHeight,[4,Ft.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return mt.sent(),[4,Ft.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,mt.sent()]}})})},Gt.prototype.close=function(Ft){var mt=this;if(Ft===void 0&&(Ft=!1),this.isOpen){var vt=!1;Ft||this.eventListeners.beforeclose.forEach(function(Lt){var Ct=new Je(mt,!0);Lt(Ct),Ct.defaultPrevented&&(vt=!0)}),vt||(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(Lt){return Lt(new Je(mt))}),this.detachEvents(),this._isOpen=!1)}},Gt.prototype.addMarkersToToolbar=function(){for(var Ft,mt=[],vt=0;vt<arguments.length;vt++)mt[vt]=arguments[vt];(Ft=this._availableMarkerTypes).push.apply(Ft,mt)},Gt.prototype.addRenderEventListener=function(Ft){this.addEventListener("render",function(mt){Ft(mt.dataUrl,mt.state)})},Gt.prototype.removeRenderEventListener=function(Ft){},Gt.prototype.addCloseEventListener=function(Ft){this.addEventListener("close",function(){Ft()})},Gt.prototype.removeCloseEventListener=function(Ft){},Gt.prototype.setupResizeObserver=function(){var Ft=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Ft.resize(Ft.target.clientWidth,Ft.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Ft.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Gt.prototype.onPopupTargetResize=function(){var Ft=1*this.target.clientWidth/this.target.clientHeight,mt=this.editorCanvas.clientWidth/Ft>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Ft:this.editorCanvas.clientWidth,vt=mt<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Ft;this.resize(mt,vt)},Gt.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Gt.prototype.resize=function(Ft,mt){this._isResizing=!0;var vt=Ft/this.imageWidth,Lt=mt/this.imageHeight;this.imageWidth=Math.round(Ft),this.imageHeight=Math.round(mt),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(vt,Lt),this._isResizing=!1},Gt.prototype.scaleMarkers=function(Ft,mt){var vt,Lt=this;this._currentMarker&&this._currentMarker instanceof Ke?this._currentMarker.scale(Ft,mt):(vt=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Ct){Ct!==Lt._currentMarker&&Ct.scale(Ft,mt)}),vt!==void 0&&this.setCurrentMarker(vt)},Gt.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"},Gt.prototype.setTopLeft=function(){var Ft=this.editingTarget.getBoundingClientRect(),mt=this.editorCanvas.getBoundingClientRect();this.left=Ft.left-mt.left,this.top=Ft.top-mt.top},Gt.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)},Gt.prototype.addDefs=function(){for(var Ft,mt=[],vt=0;vt<arguments.length;vt++)mt[vt]=arguments[vt];this.defs=Rt.createDefs(),this.addDefsToImage(),(Ft=this.defs).append.apply(Ft,mt)},Gt.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Gt.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)},Gt.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Gt.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Gt.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)},Gt.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Gt.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)},Gt.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 Ft=document.createElement("a");Ft.href="https://markerjs.com/",Ft.target="_blank",Ft.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>',Ft.title="Powered by marker.js",Ft.style.display="grid",Ft.style.alignItems="center",Ft.style.justifyItems="center",Ft.style.padding="3px",Ft.style.width="20px",Ft.style.height="20px",this.logoUI.appendChild(Ft),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Gt.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")},Gt.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"},Gt.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Gt.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 Ft=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=Ft+"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 Me(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 It(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Gt.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Gt.prototype.removeMarker=function(Ft){this.markerImage.removeChild(Ft.container),this.markers.indexOf(Ft)>-1&&this.markers.splice(this.markers.indexOf(Ft),1),Ft.dispose()},Gt.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())},Gt.prototype.toolbarButtonClicked=function(Ft,mt){if(Ft==="marker"&&mt!==void 0)this.createNewMarker(mt);else if(Ft==="action")switch(mt){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()}},Gt.prototype.deleteSelectedMarker=function(){var Ft=this;if(this._currentMarker!==void 0){var mt=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Lt){var Ct=new tn(Ft,Ft._currentMarker,!0);Lt(Ct),Ct.defaultPrevented&&(mt=!0)}),!mt){var vt=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(Lt){return Lt(new tn(Ft,vt))})}}},Gt.prototype.clear=function(){var Ft=this,mt=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(_t){var Pe=new tn(Ft,void 0,!0);_t(Pe),Pe.defaultPrevented&&(mt=!0)}),!mt)){this.setCurrentMarker();for(var vt=function(_t){var Pe=Lt.markers[_t];Lt.setCurrentMarker(Lt.markers[_t]),Lt._currentMarker.dispose(),Lt.markerImage.removeChild(Lt._currentMarker.container),Lt.markers.splice(Lt.markers.indexOf(Lt._currentMarker),1),Lt.eventListeners.markerdelete.forEach(function(ze){return ze(new tn(Ft,Pe))})},Lt=this,Ct=this.markers.length-1;Ct>=0;Ct--)vt(Ct);this.addUndoStep()}},Object.defineProperty(Gt.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Gt.prototype.showNotesEditor=function(){var Ft;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=(Ft=this._currentMarker.notes)!==null&&Ft!==void 0?Ft:"",this.overlayContainer.appendChild(this.notesArea))},Gt.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)},Gt.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Gt.prototype.addUndoStep=function(){var Ft=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var mt=this.getState(),vt=this.undoRedoManager.getLastUndoStep();if(!vt||vt.width===mt.width&&vt.height===mt.height){var Lt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(mt),Lt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Ct){return Ct(new Je(Ft))})}else this.undoRedoManager.replaceLastUndoStep(mt),this.eventListeners.statechange.forEach(function(Ct){return Ct(new Je(Ft))})}},Gt.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Gt.prototype.undoStep=function(){var Ft=this,mt=this.undoRedoManager.undo();mt!==void 0&&(this.restoreState(mt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(vt){return vt(new Je(Ft))}))},Gt.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Gt.prototype.redoStep=function(){var Ft=this,mt=this.undoRedoManager.redo();mt!==void 0&&(this.restoreState(mt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(vt){return vt(new Je(Ft))}))},Gt.prototype.stepZoom=function(){var Ft=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Ft<this.zoomSteps.length-1?this.zoomSteps[Ft+1]:this.zoomSteps[0]},Gt.prototype.panTo=function(Ft){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Ft.x,top:this.prevPanPoint.y-Ft.y}),this.prevPanPoint=Ft},Gt.prototype.startRenderAndClose=function(){return Ae(this,void 0,void 0,function(){var Ft,mt,vt=this;return xe(this,function(Lt){switch(Lt.label){case 0:return[4,this.render()];case 1:return Ft=Lt.sent(),mt=this.getState(),this.eventListeners.render.forEach(function(Ct){return Ct(new Le(vt,Ft,mt))}),this.close(!0),[2]}})})},Gt.prototype.getState=function(Ft){Ft===!0&&this.setCurrentMarker();var mt={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(vt){return mt.markers.push(vt.getState())}),mt},Gt.prototype.restoreState=function(Ft){var mt=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Ft.markers.forEach(function(vt){var Lt=mt._availableMarkerTypes.find(function(_t){return _t.typeName===vt.typeName});if(Lt!==void 0){var Ct=mt.addNewMarker(Lt);Ct.restoreState(vt),mt.markers.push(Ct)}}),Ft.width&&Ft.height&&(Ft.width!==this.imageWidth||Ft.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Ft.width,this.imageHeight/Ft.height),this.eventListeners.restorestate.forEach(function(vt){return vt(new Je(mt))})},Gt.prototype.addNewMarker=function(Ft){var mt=Rt.createGroup();return this.markerImage.appendChild(mt),new Ft(mt,this.overlayContainer,this.settings)},Gt.prototype.createNewMarker=function(Ft){var mt,vt=this;(mt=typeof Ft=="string"?this._availableMarkerTypes.find(function(Lt){return Lt.typeName===Ft}):Ft)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(mt),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(mt.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Lt){return Lt(new tn(vt,vt._currentMarker))}))},Gt.prototype.markerCreated=function(Ft){var mt=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Ft),this.setCurrentMarker(Ft),Ft instanceof _e&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(_e):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(vt){return vt(new tn(mt,mt._currentMarker))})},Gt.prototype.colorChanged=function(Ft){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Ft,this.settings.defaultStrokeColor=Ft)},Gt.prototype.fillColorChanged=function(Ft){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Ft)},Gt.prototype.markerStateChanged=function(Ft){var mt=this;this.eventListeners.markerchange.forEach(function(vt){return vt(new tn(mt,Ft))})},Gt.prototype.setCurrentMarker=function(Ft){var mt=this;this._currentMarker!==Ft&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(vt){return vt(new tn(mt,mt._currentMarker))})),this._currentMarker=Ft,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(vt){return vt(new tn(mt,mt._currentMarker))}))},Gt.prototype.onPointerDown=function(Ft){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Ft.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var mt=this.markers.find(function(vt){return vt.ownsTarget(Ft.target)});mt!==void 0?(this.setCurrentMarker(mt),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Ft.clientX,Ft.clientY),Ft.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Ft.clientX,y:Ft.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Ft.clientX,Ft.clientY))},Gt.prototype.onDblClick=function(Ft){if(this._isFocused||this.focus(),this.mode==="select"){var mt=this.markers.find(function(vt){return vt.ownsTarget(Ft.target)});mt!==void 0&&mt!==this._currentMarker&&this.setCurrentMarker(mt),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Ft.clientX,Ft.clientY),Ft.target):this.setCurrentMarker()}},Gt.prototype.onPointerMove=function(Ft){this.touchPoints!==1&&Ft.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Ft.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Ft.clientX,Ft.clientY)):this.zoomLevel>1&&this.panTo({x:Ft.clientX,y:Ft.clientY}))},Gt.prototype.onPointerUp=function(Ft){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Ft.clientX,Ft.clientY)),this.isDragging=!1,this.addUndoStep()},Gt.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Gt.prototype.onKeyUp=function(Ft){this._currentMarker===void 0||this.notesArea!==void 0||Ft.key!=="Delete"&&Ft.key!=="Backspace"||this.deleteSelectedMarker()},Gt.prototype.clientToLocalCoordinates=function(Ft,mt){var vt=this.markerImage.getBoundingClientRect();return{x:(Ft-vt.left)/this.zoomLevel,y:(mt-vt.top)/this.zoomLevel}},Gt.prototype.onWindowResize=function(){this.positionUI()},Gt.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Ft=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Ft+"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()},Gt.prototype.addLicenseKey=function(Ft){ie.addKey(Ft)},Gt.prototype.addEventListener=function(Ft,mt){this.eventListeners.addEventListener(Ft,mt)},Gt.prototype.removeEventListener=function(Ft,mt){this.eventListeners.removeEventListener(Ft,mt)},Gt.prototype.renderState=function(Ft){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Ft),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Gt.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Gt.prototype.focus=function(){var Ft=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(mt){return mt(new Je(Ft))}))},Gt.prototype.blur=function(){var Ft=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(mt){return mt(new Je(Ft))}))},Gt.instanceCounter=0,Gt}()},23425:function(mn,je,Ut){"use strict";Ut.d(je,{Z:function(){return Ot}});var St=Ut(4635),Xt=Ut(14809),Ae=Ut(93664),xe=Ut(20439),fe=Ut(50298),Rt=Ut(92310),ie=Ut.n(Rt),ae=Ut(18929),de=Ut(10228),zt=Ut(26112),Ie=Ut(48736),Yt=Ut(59301),Me=Ut(17119),It=[10,20,50,100],nt=function(Wt){var te=Wt.pageSizeOptions,we=te===void 0?It:te,pe=Wt.locale,Ke=Wt.changeSize,_e=Wt.pageSize,en=Wt.goButton,dn=Wt.quickGo,yn=Wt.rootPrefixCls,Nn=Wt.disabled,Kn=Wt.buildOptionText,me=Wt.showSizeChanger,ee=Wt.sizeChangerRender,gn=Yt.useState(""),$n=(0,fe.Z)(gn,2),Yn=$n[0],nn=$n[1],Tn=function(){return!Yn||Number.isNaN(Yn)?void 0:Number(Yn)},Gn=typeof Kn=="function"?Kn:function(mt){return"".concat(mt," ").concat(pe.items_per_page)},yi=function(vt){nn(vt.target.value)},Je=function(vt){en||Yn===""||(nn(""),!(vt.relatedTarget&&(vt.relatedTarget.className.indexOf("".concat(yn,"-item-link"))>=0||vt.relatedTarget.className.indexOf("".concat(yn,"-item"))>=0))&&(dn==null||dn(Tn())))},Le=function(vt){Yn!==""&&(vt.keyCode===de.Z.ENTER||vt.type==="click")&&(nn(""),dn==null||dn(Tn()))},tn=function(){return we.some(function(vt){return vt.toString()===_e.toString()})?we:we.concat([_e]).sort(function(vt,Lt){var Ct=Number.isNaN(Number(vt))?0:Number(vt),_t=Number.isNaN(Number(Lt))?0:Number(Lt);return Ct-_t})},ti="".concat(yn,"-options");if(!me&&!dn)return null;var jn=null,Gt=null,Ft=null;return me&&ee&&(jn=ee({disabled:Nn,size:_e,onSizeChange:function(vt){Ke==null||Ke(Number(vt))},"aria-label":pe.page_size,className:"".concat(ti,"-size-changer"),options:tn().map(function(mt){return{label:Gn(mt),value:mt}})})),dn&&(en&&(Ft=typeof en=="boolean"?Yt.createElement("button",{type:"button",onClick:Le,onKeyUp:Le,disabled:Nn,className:"".concat(ti,"-quick-jumper-button")},pe.jump_to_confirm):Yt.createElement("span",{onClick:Le,onKeyUp:Le},en)),Gt=Yt.createElement("div",{className:"".concat(ti,"-quick-jumper")},pe.jump_to,Yt.createElement("input",{disabled:Nn,type:"text",value:Yn,onChange:yi,onKeyUp:Le,onBlur:Je,"aria-label":pe.page}),pe.page,Ft)),Yt.createElement("li",{className:ti},jn,Gt)},et=nt,At=function(Wt){var te=Wt.rootPrefixCls,we=Wt.page,pe=Wt.active,Ke=Wt.className,_e=Wt.showTitle,en=Wt.onClick,dn=Wt.onKeyPress,yn=Wt.itemRender,Nn="".concat(te,"-item"),Kn=ie()(Nn,"".concat(Nn,"-").concat(we),(0,St.Z)((0,St.Z)({},"".concat(Nn,"-active"),pe),"".concat(Nn,"-disabled"),!we),Ke),me=function(){en(we)},ee=function(Yn){dn(Yn,en,we)},gn=yn(we,"page",Yt.createElement("a",{rel:"nofollow"},we));return gn?Yt.createElement("li",{title:_e?String(we):null,className:Kn,onClick:me,onKeyDown:ee,tabIndex:0},gn):null},at=At,dt=function(Wt,te,we){return we};function gt(){}function xt(Zt){var Wt=Number(Zt);return typeof Wt=="number"&&!Number.isNaN(Wt)&&isFinite(Wt)&&Math.floor(Wt)===Wt}function kt(Zt,Wt,te){var we=typeof Zt=="undefined"?Wt:Zt;return Math.floor((te-1)/we)+1}var Ht=function(Wt){var te=Wt.prefixCls,we=te===void 0?"rc-pagination":te,pe=Wt.selectPrefixCls,Ke=pe===void 0?"rc-select":pe,_e=Wt.className,en=Wt.current,dn=Wt.defaultCurrent,yn=dn===void 0?1:dn,Nn=Wt.total,Kn=Nn===void 0?0:Nn,me=Wt.pageSize,ee=Wt.defaultPageSize,gn=ee===void 0?10:ee,$n=Wt.onChange,Yn=$n===void 0?gt:$n,nn=Wt.hideOnSinglePage,Tn=Wt.align,Gn=Wt.showPrevNextJumpers,yi=Gn===void 0?!0:Gn,Je=Wt.showQuickJumper,Le=Wt.showLessItems,tn=Wt.showTitle,ti=tn===void 0?!0:tn,jn=Wt.onShowSizeChange,Gt=jn===void 0?gt:jn,Ft=Wt.locale,mt=Ft===void 0?Me.Z:Ft,vt=Wt.style,Lt=Wt.totalBoundaryShowSizeChanger,Ct=Lt===void 0?50:Lt,_t=Wt.disabled,Pe=Wt.simple,ze=Wt.showTotal,wn=Wt.showSizeChanger,Ge=wn===void 0?Kn>Ct:wn,Te=Wt.sizeChangerRender,Ze=Wt.pageSizeOptions,hn=Wt.itemRender,In=hn===void 0?dt:hn,si=Wt.jumpPrevIcon,Dn=Wt.jumpNextIcon,Oi=Wt.prevIcon,ai=Wt.nextIcon,Ai=Yt.useRef(null),pi=(0,ae.Z)(10,{value:me,defaultValue:gn}),ur=(0,fe.Z)(pi,2),Fi=ur[0],zi=ur[1],Xi=(0,ae.Z)(1,{value:en,defaultValue:yn,postState:function(Jn){return Math.max(1,Math.min(Jn,kt(void 0,Fi,Kn)))}}),Lr=(0,fe.Z)(Xi,2),wi=Lr[0],Nr=Lr[1],Br=Yt.useState(wi),jr=(0,fe.Z)(Br,2),Wi=jr[0],po=jr[1];(0,Yt.useEffect)(function(){po(wi)},[wi]);var mo=Yn!==gt,no="current"in Wt,ir=Math.max(1,wi-(Le?3:5)),so=Math.min(kt(void 0,Fi,Kn),wi+(Le?3:5));function Tt(an,Jn){var ii=an||Yt.createElement("button",{type:"button","aria-label":Jn,className:"".concat(we,"-item-link")});return typeof an=="function"&&(ii=Yt.createElement(an,(0,xe.Z)({},Wt))),ii}function Pr(an){var Jn=an.target.value,ii=kt(void 0,Fi,Kn),Mi;return Jn===""?Mi=Jn:Number.isNaN(Number(Jn))?Mi=Wi:Jn>=ii?Mi=ii:Mi=Number(Jn),Mi}function Zi(an){return xt(an)&&an!==wi&&xt(Kn)&&Kn>0}var xi=Kn>Fi?Je:!1;function Hi(an){(an.keyCode===de.Z.UP||an.keyCode===de.Z.DOWN)&&an.preventDefault()}function ji(an){var Jn=Pr(an);switch(Jn!==Wi&&po(Jn),an.keyCode){case de.Z.ENTER:un(Jn);break;case de.Z.UP:un(Jn-1);break;case de.Z.DOWN:un(Jn+1);break;default:break}}function tr(an){un(Pr(an))}function qr(an){var Jn=kt(an,Fi,Kn),ii=wi>Jn&&Jn!==0?Jn:wi;zi(an),po(ii),Gt==null||Gt(wi,an),Nr(ii),Yn==null||Yn(ii,an)}function un(an){if(Zi(an)&&!_t){var Jn=kt(void 0,Fi,Kn),ii=an;return an>Jn?ii=Jn:an<1&&(ii=1),ii!==Wi&&po(ii),Nr(ii),Yn==null||Yn(ii,Fi),ii}return wi}var ln=wi>1,We=wi<kt(void 0,Fi,Kn);function Sn(){ln&&un(wi-1)}function Ki(){We&&un(wi+1)}function Li(){un(ir)}function dr(){un(so)}function se(an,Jn){if(an.key==="Enter"||an.charCode===de.Z.ENTER||an.keyCode===de.Z.ENTER){for(var ii=arguments.length,Mi=new Array(ii>2?ii-2:0),hi=2;hi<ii;hi++)Mi[hi-2]=arguments[hi];Jn.apply(void 0,Mi)}}function Mn(an){se(an,Sn)}function Di(an){se(an,Ki)}function pr(an){se(an,Li)}function Vn(an){se(an,dr)}function le(an){var Jn=In(an,"prev",Tt(Oi,"prev page"));return Yt.isValidElement(Jn)?Yt.cloneElement(Jn,{disabled:!ln}):Jn}function De(an){var Jn=In(an,"next",Tt(ai,"next page"));return Yt.isValidElement(Jn)?Yt.cloneElement(Jn,{disabled:!We}):Jn}function Xn(an){(an.type==="click"||an.keyCode===de.Z.ENTER)&&un(Wi)}var On=null,qe=(0,zt.Z)(Wt,{aria:!0,data:!0}),ei=ze&&Yt.createElement("li",{className:"".concat(we,"-total-text")},ze(Kn,[Kn===0?0:(wi-1)*Fi+1,wi*Fi>Kn?Kn:wi*Fi])),fi=null,ki=kt(void 0,Fi,Kn);if(nn&&Kn<=Fi)return null;var Vi=[],rn={rootPrefixCls:we,onClick:un,onKeyPress:se,showTitle:ti,itemRender:In,page:-1},Ve=wi-1>0?wi-1:0,fn=wi+1<ki?wi+1:ki,mi=Je&&Je.goButton,Pi=(0,Ae.Z)(Pe)==="object"?Pe.readOnly:!Pe,Pn=mi,ni=null;Pe&&(mi&&(typeof mi=="boolean"?Pn=Yt.createElement("button",{type:"button",onClick:Xn,onKeyUp:Xn},mt.jump_to_confirm):Pn=Yt.createElement("span",{onClick:Xn,onKeyUp:Xn},mi),Pn=Yt.createElement("li",{title:ti?"".concat(mt.jump_to).concat(wi,"/").concat(ki):null,className:"".concat(we,"-simple-pager")},Pn)),ni=Yt.createElement("li",{title:ti?"".concat(wi,"/").concat(ki):null,className:"".concat(we,"-simple-pager")},Pi?Wi:Yt.createElement("input",{type:"text","aria-label":mt.jump_to,value:Wi,disabled:_t,onKeyDown:Hi,onKeyUp:ji,onChange:ji,onBlur:tr,size:3}),Yt.createElement("span",{className:"".concat(we,"-slash")},"/"),ki));var Gi=Le?1:2;if(ki<=3+Gi*2){ki||Vi.push(Yt.createElement(at,(0,Xt.Z)({},rn,{key:"noPager",page:1,className:"".concat(we,"-item-disabled")})));for(var er=1;er<=ki;er+=1)Vi.push(Yt.createElement(at,(0,Xt.Z)({},rn,{key:er,page:er,active:wi===er})))}else{var Or=Le?mt.prev_3:mt.prev_5,Oe=Le?mt.next_3:mt.next_5,Ui=In(ir,"jump-prev",Tt(si,"prev page")),hr=In(so,"jump-next",Tt(Dn,"next page"));yi&&(On=Ui?Yt.createElement("li",{title:ti?Or:null,key:"prev",onClick:Li,tabIndex:0,onKeyDown:pr,className:ie()("".concat(we,"-jump-prev"),(0,St.Z)({},"".concat(we,"-jump-prev-custom-icon"),!!si))},Ui):null,fi=hr?Yt.createElement("li",{title:ti?Oe:null,key:"next",onClick:dr,tabIndex:0,onKeyDown:Vn,className:ie()("".concat(we,"-jump-next"),(0,St.Z)({},"".concat(we,"-jump-next-custom-icon"),!!Dn))},hr):null);var Si=Math.max(1,wi-Gi),Qr=Math.min(wi+Gi,ki);wi-1<=Gi&&(Qr=1+Gi*2),ki-wi<=Gi&&(Si=ki-Gi*2);for(var xr=Si;xr<=Qr;xr+=1)Vi.push(Yt.createElement(at,(0,Xt.Z)({},rn,{key:xr,page:xr,active:wi===xr})));if(wi-1>=Gi*2&&wi!==3&&(Vi[0]=Yt.cloneElement(Vi[0],{className:ie()("".concat(we,"-item-after-jump-prev"),Vi[0].props.className)}),Vi.unshift(On)),ki-wi>=Gi*2&&wi!==ki-2){var Ri=Vi[Vi.length-1];Vi[Vi.length-1]=Yt.cloneElement(Ri,{className:ie()("".concat(we,"-item-before-jump-next"),Ri.props.className)}),Vi.push(fi)}Si!==1&&Vi.unshift(Yt.createElement(at,(0,Xt.Z)({},rn,{key:1,page:1}))),Qr!==ki&&Vi.push(Yt.createElement(at,(0,Xt.Z)({},rn,{key:ki,page:ki})))}var qi=le(Ve);if(qi){var re=!ln||!ki;qi=Yt.createElement("li",{title:ti?mt.prev_page:null,onClick:Sn,tabIndex:re?null:0,onKeyDown:Mn,className:ie()("".concat(we,"-prev"),(0,St.Z)({},"".concat(we,"-disabled"),re)),"aria-disabled":re},qi)}var he=De(fn);if(he){var ne,Xe;Pe?(ne=!We,Xe=ln?0:null):(ne=!We||!ki,Xe=ne?null:0),he=Yt.createElement("li",{title:ti?mt.next_page:null,onClick:Ki,tabIndex:Xe,onKeyDown:Di,className:ie()("".concat(we,"-next"),(0,St.Z)({},"".concat(we,"-disabled"),ne)),"aria-disabled":ne},he)}var Fe=ie()(we,_e,(0,St.Z)((0,St.Z)((0,St.Z)((0,St.Z)((0,St.Z)({},"".concat(we,"-start"),Tn==="start"),"".concat(we,"-center"),Tn==="center"),"".concat(we,"-end"),Tn==="end"),"".concat(we,"-simple"),Pe),"".concat(we,"-disabled"),_t));return Yt.createElement("ul",(0,Xt.Z)({className:Fe,style:vt,ref:Ai},qe),ei,qi,Pe?ni:Vi,he,Yt.createElement(et,{locale:mt,rootPrefixCls:we,disabled:_t,selectPrefixCls:Ke,changeSize:qr,pageSize:Fi,pageSizeOptions:Ze,quickGo:xi?un:null,goButton:Pn,showSizeChanger:Ge,sizeChangerRender:Te}))},Ot=Ht},25930:function(mn,je,Ut){"use strict";Ut.d(je,{Cd:function(){return we}});var St=Ut(14809),Xt=Ut(20439),Ae=Ut(62646),xe=Ut(59301),fe=Ut(92310),Rt=Ut.n(fe),ie={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},ae=function(){var _e=(0,xe.useRef)([]),en=(0,xe.useRef)(null);return(0,xe.useEffect)(function(){var dn=Date.now(),yn=!1;_e.current.forEach(function(Nn){if(Nn){yn=!0;var Kn=Nn.style;Kn.transitionDuration=".3s, .3s, .3s, .06s",en.current&&dn-en.current<100&&(Kn.transitionDuration="0s, 0s")}}),yn&&(en.current=Date.now())}),_e.current},de=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],zt=function(_e){var en=(0,Xt.Z)((0,Xt.Z)({},ie),_e),dn=en.className,yn=en.percent,Nn=en.prefixCls,Kn=en.strokeColor,me=en.strokeLinecap,ee=en.strokeWidth,gn=en.style,$n=en.trailColor,Yn=en.trailWidth,nn=en.transition,Tn=(0,Ae.Z)(en,de);delete Tn.gapPosition;var Gn=Array.isArray(yn)?yn:[yn],yi=Array.isArray(Kn)?Kn:[Kn],Je=ae(),Le=ee/2,tn=100-ee/2,ti="M ".concat(me==="round"?Le:0,",").concat(Le,`
L `).concat(me==="round"?tn:100,",").concat(Le),jn="0 0 100 ".concat(ee),Gt=0;return xe.createElement("svg",(0,St.Z)({className:Rt()("".concat(Nn,"-line"),dn),viewBox:jn,preserveAspectRatio:"none",style:gn},Tn),xe.createElement("path",{className:"".concat(Nn,"-line-trail"),d:ti,strokeLinecap:me,stroke:$n,strokeWidth:Yn||ee,fillOpacity:"0"}),Gn.map(function(Ft,mt){var vt=1;switch(me){case"round":vt=1-ee/100;break;case"square":vt=1-ee/2/100;break;default:vt=1;break}var Lt={strokeDasharray:"".concat(Ft*vt,"px, 100px"),strokeDashoffset:"-".concat(Gt,"px"),transition:nn||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Ct=yi[mt]||yi[yi.length-1];return Gt+=Ft,xe.createElement("path",{key:mt,className:"".concat(Nn,"-line-path"),d:ti,strokeLinecap:me,stroke:Ct,strokeWidth:ee,fillOpacity:"0",ref:function(Pe){Je[mt]=Pe},style:Lt})}))},Ie=zt,Yt=Ut(93664),Me=Ut(50298),It=Ut(47273),nt=0,et=(0,It.Z)();function At(){var Ke;return et?(Ke=nt,nt+=1):Ke="TEST_OR_SSR",Ke}var at=function(Ke){var _e=xe.useState(),en=(0,Me.Z)(_e,2),dn=en[0],yn=en[1];return xe.useEffect(function(){yn("rc_progress_".concat(At()))},[]),Ke||dn},dt=function(_e){var en=_e.bg,dn=_e.children;return xe.createElement("div",{style:{width:"100%",height:"100%",background:en}},dn)};function gt(Ke,_e){return Object.keys(Ke).map(function(en){var dn=parseFloat(en),yn="".concat(Math.floor(dn*_e),"%");return"".concat(Ke[en]," ").concat(yn)})}var xt=xe.forwardRef(function(Ke,_e){var en=Ke.prefixCls,dn=Ke.color,yn=Ke.gradientId,Nn=Ke.radius,Kn=Ke.style,me=Ke.ptg,ee=Ke.strokeLinecap,gn=Ke.strokeWidth,$n=Ke.size,Yn=Ke.gapDegree,nn=dn&&(0,Yt.Z)(dn)==="object",Tn=nn?"#FFF":void 0,Gn=$n/2,yi=xe.createElement("circle",{className:"".concat(en,"-circle-path"),r:Nn,cx:Gn,cy:Gn,stroke:Tn,strokeLinecap:ee,strokeWidth:gn,opacity:me===0?0:1,style:Kn,ref:_e});if(!nn)return yi;var Je="".concat(yn,"-conic"),Le=Yn?"".concat(180+Yn/2,"deg"):"0deg",tn=gt(dn,(360-Yn)/360),ti=gt(dn,1),jn="conic-gradient(from ".concat(Le,", ").concat(tn.join(", "),")"),Gt="linear-gradient(to ".concat(Yn?"bottom":"top",", ").concat(ti.join(", "),")");return xe.createElement(xe.Fragment,null,xe.createElement("mask",{id:Je},yi),xe.createElement("foreignObject",{x:0,y:0,width:$n,height:$n,mask:"url(#".concat(Je,")")},xe.createElement(dt,{bg:Gt},xe.createElement(dt,{bg:jn}))))}),kt=xt,Ht=100,Ot=function(_e,en,dn,yn,Nn,Kn,me,ee,gn,$n){var Yn=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,nn=dn/100*360*((360-Kn)/360),Tn=Kn===0?0:{bottom:0,top:180,left:90,right:-90}[me],Gn=(100-yn)/100*en;gn==="round"&&yn!==100&&(Gn+=$n/2,Gn>=en&&(Gn=en-.01));var yi=Ht/2;return{stroke:typeof ee=="string"?ee:void 0,strokeDasharray:"".concat(en,"px ").concat(_e),strokeDashoffset:Gn+Yn,transform:"rotate(".concat(Nn+nn+Tn,"deg)"),transformOrigin:"".concat(yi,"px ").concat(yi,"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}},Zt=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Wt(Ke){var _e=Ke!=null?Ke:[];return Array.isArray(_e)?_e:[_e]}var te=function(_e){var en=(0,Xt.Z)((0,Xt.Z)({},ie),_e),dn=en.id,yn=en.prefixCls,Nn=en.steps,Kn=en.strokeWidth,me=en.trailWidth,ee=en.gapDegree,gn=ee===void 0?0:ee,$n=en.gapPosition,Yn=en.trailColor,nn=en.strokeLinecap,Tn=en.style,Gn=en.className,yi=en.strokeColor,Je=en.percent,Le=(0,Ae.Z)(en,Zt),tn=Ht/2,ti=at(dn),jn="".concat(ti,"-gradient"),Gt=tn-Kn/2,Ft=Math.PI*2*Gt,mt=gn>0?90+gn/2:-90,vt=Ft*((360-gn)/360),Lt=(0,Yt.Z)(Nn)==="object"?Nn:{count:Nn,gap:2},Ct=Lt.count,_t=Lt.gap,Pe=Wt(Je),ze=Wt(yi),wn=ze.find(function(Dn){return Dn&&(0,Yt.Z)(Dn)==="object"}),Ge=wn&&(0,Yt.Z)(wn)==="object",Te=Ge?"butt":nn,Ze=Ot(Ft,vt,0,100,mt,gn,$n,Yn,Te,Kn),hn=ae(),In=function(){var Oi=0;return Pe.map(function(ai,Ai){var pi=ze[Ai]||ze[ze.length-1],ur=Ot(Ft,vt,Oi,ai,mt,gn,$n,pi,Te,Kn);return Oi+=ai,xe.createElement(kt,{key:Ai,color:pi,ptg:ai,radius:Gt,prefixCls:yn,gradientId:jn,style:ur,strokeLinecap:Te,strokeWidth:Kn,gapDegree:gn,ref:function(zi){hn[Ai]=zi},size:Ht})}).reverse()},si=function(){var Oi=Math.round(Ct*(Pe[0]/100)),ai=100/Ct,Ai=0;return new Array(Ct).fill(null).map(function(pi,ur){var Fi=ur<=Oi-1?ze[0]:Yn,zi=Fi&&(0,Yt.Z)(Fi)==="object"?"url(#".concat(jn,")"):void 0,Xi=Ot(Ft,vt,Ai,ai,mt,gn,$n,Fi,"butt",Kn,_t);return Ai+=(vt-Xi.strokeDashoffset+_t)*100/vt,xe.createElement("circle",{key:ur,className:"".concat(yn,"-circle-path"),r:Gt,cx:tn,cy:tn,stroke:zi,strokeWidth:Kn,opacity:1,style:Xi,ref:function(wi){hn[ur]=wi}})})};return xe.createElement("svg",(0,St.Z)({className:Rt()("".concat(yn,"-circle"),Gn),viewBox:"0 0 ".concat(Ht," ").concat(Ht),style:Tn,id:dn,role:"presentation"},Le),!Ct&&xe.createElement("circle",{className:"".concat(yn,"-circle-trail"),r:Gt,cx:tn,cy:tn,stroke:Yn,strokeLinecap:Te,strokeWidth:me||Kn,style:Ze}),Ct?si():In())},we=te,pe={Line:Ie,Circle:we}},738:function(mn,je,Ut){"use strict";Ut.d(je,{Z:function(){return gt}});var St=Ut(14809),Xt=Ut(4635),Ae=Ut(50298),xe=Ut(62646),fe=Ut(92310),Rt=Ut.n(fe),ie=Ut(18929),ae=Ut(10228),de=Ut(26112),zt=Ut(59301);function Ie(xt,kt){var Ht=xt.disabled,Ot=xt.prefixCls,Zt=xt.character,Wt=xt.characterRender,te=xt.index,we=xt.count,pe=xt.value,Ke=xt.allowHalf,_e=xt.focused,en=xt.onHover,dn=xt.onClick,yn=function(nn){en(nn,te)},Nn=function(nn){dn(nn,te)},Kn=function(nn){nn.keyCode===ae.Z.ENTER&&dn(nn,te)},me=te+1,ee=new Set([Ot]);pe===0&&te===0&&_e?ee.add("".concat(Ot,"-focused")):Ke&&pe+.5>=me&&pe<me?(ee.add("".concat(Ot,"-half")),ee.add("".concat(Ot,"-active")),_e&&ee.add("".concat(Ot,"-focused"))):(me<=pe?ee.add("".concat(Ot,"-full")):ee.add("".concat(Ot,"-zero")),me===pe&&_e&&ee.add("".concat(Ot,"-focused")));var gn=typeof Zt=="function"?Zt(xt):Zt,$n=zt.createElement("li",{className:Rt()(Array.from(ee)),ref:kt},zt.createElement("div",{onClick:Ht?null:Nn,onKeyDown:Ht?null:Kn,onMouseMove:Ht?null:yn,role:"radio","aria-checked":pe>te?"true":"false","aria-posinset":te+1,"aria-setsize":we,tabIndex:Ht?-1:0},zt.createElement("div",{className:"".concat(Ot,"-first")},gn),zt.createElement("div",{className:"".concat(Ot,"-second")},gn)));return Wt&&($n=Wt($n,xt)),$n}var Yt=zt.forwardRef(Ie);function Me(){var xt=zt.useRef({});function kt(Ot){return xt.current[Ot]}function Ht(Ot){return function(Zt){xt.current[Ot]=Zt}}return[kt,Ht]}function It(xt){var kt=xt.pageXOffset,Ht="scrollLeft";if(typeof kt!="number"){var Ot=xt.document;kt=Ot.documentElement[Ht],typeof kt!="number"&&(kt=Ot.body[Ht])}return kt}function nt(xt){var kt,Ht,Ot=xt.ownerDocument,Zt=Ot.body,Wt=Ot&&Ot.documentElement,te=xt.getBoundingClientRect();return kt=te.left,Ht=te.top,kt-=Wt.clientLeft||Zt.clientLeft||0,Ht-=Wt.clientTop||Zt.clientTop||0,{left:kt,top:Ht}}function et(xt){var kt=nt(xt),Ht=xt.ownerDocument,Ot=Ht.defaultView||Ht.parentWindow;return kt.left+=It(Ot),kt.left}var At=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function at(xt,kt){var Ht=xt.prefixCls,Ot=Ht===void 0?"rc-rate":Ht,Zt=xt.className,Wt=xt.defaultValue,te=xt.value,we=xt.count,pe=we===void 0?5:we,Ke=xt.allowHalf,_e=Ke===void 0?!1:Ke,en=xt.allowClear,dn=en===void 0?!0:en,yn=xt.keyboard,Nn=yn===void 0?!0:yn,Kn=xt.character,me=Kn===void 0?"\u2605":Kn,ee=xt.characterRender,gn=xt.disabled,$n=xt.direction,Yn=$n===void 0?"ltr":$n,nn=xt.tabIndex,Tn=nn===void 0?0:nn,Gn=xt.autoFocus,yi=xt.onHoverChange,Je=xt.onChange,Le=xt.onFocus,tn=xt.onBlur,ti=xt.onKeyDown,jn=xt.onMouseLeave,Gt=(0,xe.Z)(xt,At),Ft=Me(),mt=(0,Ae.Z)(Ft,2),vt=mt[0],Lt=mt[1],Ct=zt.useRef(null),_t=function(){if(!gn){var ir;(ir=Ct.current)===null||ir===void 0||ir.focus()}};zt.useImperativeHandle(kt,function(){return{focus:_t,blur:function(){if(!gn){var ir;(ir=Ct.current)===null||ir===void 0||ir.blur()}}}});var Pe=(0,ie.Z)(Wt||0,{value:te}),ze=(0,Ae.Z)(Pe,2),wn=ze[0],Ge=ze[1],Te=(0,ie.Z)(null),Ze=(0,Ae.Z)(Te,2),hn=Ze[0],In=Ze[1],si=function(ir,so){var Tt=Yn==="rtl",Pr=ir+1;if(_e){var Zi=vt(ir),xi=et(Zi),Hi=Zi.clientWidth;(Tt&&so-xi>Hi/2||!Tt&&so-xi<Hi/2)&&(Pr-=.5)}return Pr},Dn=function(ir){Ge(ir),Je==null||Je(ir)},Oi=zt.useState(!1),ai=(0,Ae.Z)(Oi,2),Ai=ai[0],pi=ai[1],ur=function(){pi(!0),Le==null||Le()},Fi=function(){pi(!1),tn==null||tn()},zi=zt.useState(null),Xi=(0,Ae.Z)(zi,2),Lr=Xi[0],wi=Xi[1],Nr=function(ir,so){var Tt=si(so,ir.pageX);Tt!==hn&&(wi(Tt),In(null)),yi==null||yi(Tt)},Br=function(ir){gn||(wi(null),In(null),yi==null||yi(void 0)),ir&&(jn==null||jn(ir))},jr=function(ir,so){var Tt=si(so,ir.pageX),Pr=!1;dn&&(Pr=Tt===wn),Br(),Dn(Pr?0:Tt),In(Pr?Tt:null)},Wi=function(ir){var so=ir.keyCode,Tt=Yn==="rtl",Pr=_e?.5:1;Nn&&(so===ae.Z.RIGHT&&wn<pe&&!Tt?(Dn(wn+Pr),ir.preventDefault()):so===ae.Z.LEFT&&wn>0&&!Tt||so===ae.Z.RIGHT&&wn>0&&Tt?(Dn(wn-Pr),ir.preventDefault()):so===ae.Z.LEFT&&wn<pe&&Tt&&(Dn(wn+Pr),ir.preventDefault())),ti==null||ti(ir)};zt.useEffect(function(){Gn&&!gn&&_t()},[]);var po=new Array(pe).fill(0).map(function(no,ir){return zt.createElement(Yt,{ref:Lt(ir),index:ir,count:pe,disabled:gn,prefixCls:"".concat(Ot,"-star"),allowHalf:_e,value:Lr===null?wn:Lr,onClick:jr,onHover:Nr,key:no||ir,character:me,characterRender:ee,focused:Ai})}),mo=Rt()(Ot,Zt,(0,Xt.Z)((0,Xt.Z)({},"".concat(Ot,"-disabled"),gn),"".concat(Ot,"-rtl"),Yn==="rtl"));return zt.createElement("ul",(0,St.Z)({className:mo,onMouseLeave:Br,tabIndex:gn?-1:Tn,onFocus:gn?null:ur,onBlur:gn?null:Fi,onKeyDown:gn?null:Wi,ref:Ct},(0,de.Z)(Gt,{aria:!0,data:!0,attr:!0})),po)}var dt=zt.forwardRef(at),gt=dt},6551:function(mn,je,Ut){"use strict";Ut.d(je,{ZP:function(){return ie}});var St=Ut(50298),Xt=Ut(59301),Ae=Ut(47273),xe=0,fe=(0,Ae.Z)();function Rt(){var ae;return fe?(ae=xe,xe+=1):ae="TEST_OR_SSR",ae}function ie(ae){var de=Xt.useState(),zt=(0,St.Z)(de,2),Ie=zt[0],Yt=zt[1];return Xt.useEffect(function(){Yt("rc_select_".concat(Rt()))},[]),ae||Ie}},37463:function(mn,je,Ut){"use strict";Ut.d(je,{Ac:function(){return pi},Xo:function(){return Fi},Wx:function(){return Xi},ZP:function(){return Vn},lk:function(){return gt}});var St=Ut(14809),Xt=Ut(95190),Ae=Ut(4635),xe=Ut(20439),fe=Ut(50298),Rt=Ut(62646),ie=Ut(93664),ae=Ut(18929),de=Ut(48736),zt=Ut(59301),Ie=Ut(92310),Yt=Ut.n(Ie),Me=Ut(34280),It=Ut(49658),nt=Ut(8654),et=function(De){var Xn=De.className,On=De.customizeIcon,qe=De.customizeIconProps,ei=De.children,fi=De.onMouseDown,ki=De.onClick,Vi=typeof On=="function"?On(qe):On;return zt.createElement("span",{className:Xn,onMouseDown:function(Ve){Ve.preventDefault(),fi==null||fi(Ve)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:ki,"aria-hidden":!0},Vi!==void 0?Vi:zt.createElement("span",{className:Yt()(Xn.split(/\s+/).map(function(rn){return"".concat(rn,"-icon")}))},ei))},At=et,at=function(De,Xn,On,qe,ei){var fi=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,ki=arguments.length>6?arguments[6]:void 0,Vi=arguments.length>7?arguments[7]:void 0,rn=zt.useMemo(function(){if((0,ie.Z)(qe)==="object")return qe.clearIcon;if(ei)return ei},[qe,ei]),Ve=zt.useMemo(function(){return!!(!fi&&qe&&(On.length||ki)&&!(Vi==="combobox"&&ki===""))},[qe,fi,On.length,ki,Vi]);return{allowClear:Ve,clearIcon:zt.createElement(At,{className:"".concat(De,"-clear"),onMouseDown:Xn,customizeIcon:rn},"\xD7")}},dt=zt.createContext(null);function gt(){return zt.useContext(dt)}function xt(){var le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,De=zt.useState(!1),Xn=(0,fe.Z)(De,2),On=Xn[0],qe=Xn[1],ei=zt.useRef(null),fi=function(){window.clearTimeout(ei.current)};zt.useEffect(function(){return fi},[]);var ki=function(rn,Ve){fi(),ei.current=window.setTimeout(function(){qe(rn),Ve&&Ve()},le)};return[On,ki,fi]}function kt(){var le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,De=zt.useRef(null),Xn=zt.useRef(null);zt.useEffect(function(){return function(){window.clearTimeout(Xn.current)}},[]);function On(qe){(qe||De.current===null)&&(De.current=qe),window.clearTimeout(Xn.current),Xn.current=window.setTimeout(function(){De.current=null},le)}return[function(){return De.current},On]}function Ht(le,De,Xn,On){var qe=zt.useRef(null);qe.current={open:De,triggerOpen:Xn,customizedTrigger:On},zt.useEffect(function(){function ei(fi){var ki;if(!((ki=qe.current)!==null&&ki!==void 0&&ki.customizedTrigger)){var Vi=fi.target;Vi.shadowRoot&&fi.composed&&(Vi=fi.composedPath()[0]||Vi),qe.current.open&&le().filter(function(rn){return rn}).every(function(rn){return!rn.contains(Vi)&&rn!==Vi})&&qe.current.triggerOpen(!1)}}return window.addEventListener("mousedown",ei),function(){return window.removeEventListener("mousedown",ei)}},[])}var Ot=Ut(10228);function Zt(le){return le&&![Ot.Z.ESC,Ot.Z.SHIFT,Ot.Z.BACKSPACE,Ot.Z.TAB,Ot.Z.WIN_KEY,Ot.Z.ALT,Ot.Z.META,Ot.Z.WIN_KEY_RIGHT,Ot.Z.CTRL,Ot.Z.SEMICOLON,Ot.Z.EQUALS,Ot.Z.CAPS_LOCK,Ot.Z.CONTEXT_MENU,Ot.Z.F1,Ot.Z.F2,Ot.Z.F3,Ot.Z.F4,Ot.Z.F5,Ot.Z.F6,Ot.Z.F7,Ot.Z.F8,Ot.Z.F9,Ot.Z.F10,Ot.Z.F11,Ot.Z.F12].includes(le)}var Wt=Ut(26112),te=Ut(11780);function we(le,De,Xn){var On=(0,xe.Z)((0,xe.Z)({},le),Xn?De:{});return Object.keys(De).forEach(function(qe){var ei=De[qe];typeof ei=="function"&&(On[qe]=function(){for(var fi,ki=arguments.length,Vi=new Array(ki),rn=0;rn<ki;rn++)Vi[rn]=arguments[rn];return ei.apply(void 0,Vi),(fi=le[qe])===null||fi===void 0?void 0:fi.call.apply(fi,[le].concat(Vi))})}),On}var pe=we,Ke=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],_e=function(De,Xn){var On=De.prefixCls,qe=De.id,ei=De.inputElement,fi=De.autoFocus,ki=De.autoComplete,Vi=De.editable,rn=De.activeDescendantId,Ve=De.value,fn=De.open,mi=De.attrs,Pi=(0,Rt.Z)(De,Ke),Pn=ei||zt.createElement("input",null),ni=Pn,Gi=ni.ref,er=ni.props;return(0,de.Kp)(!("maxLength"in Pn.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Pn=zt.cloneElement(Pn,(0,xe.Z)((0,xe.Z)((0,xe.Z)({type:"search"},pe(Pi,er,!0)),{},{id:qe,ref:(0,nt.sQ)(Xn,Gi),autoComplete:ki||"off",autoFocus:fi,className:Yt()("".concat(On,"-selection-search-input"),er==null?void 0:er.className),role:"combobox","aria-expanded":fn||!1,"aria-haspopup":"listbox","aria-owns":"".concat(qe,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(qe,"_list"),"aria-activedescendant":fn?rn:void 0},mi),{},{value:Vi?Ve:"",readOnly:!Vi,unselectable:Vi?null:"on",style:(0,xe.Z)((0,xe.Z)({},er.style),{},{opacity:Vi?null:0})})),Pn},en=zt.forwardRef(_e),dn=en;function yn(le){return Array.isArray(le)?le:le!==void 0?[le]:[]}var Nn=typeof window!="undefined"&&window.document&&window.document.documentElement,Kn=Nn;function me(le){return le!=null}function ee(le){return!le&&le!==0}function gn(le){return["string","number"].includes((0,ie.Z)(le))}function $n(le){var De=void 0;return le&&(gn(le.title)?De=le.title.toString():gn(le.label)&&(De=le.label.toString())),De}function Yn(le,De){Kn?zt.useLayoutEffect(le,De):zt.useEffect(le,De)}function nn(le){var De;return(De=le.key)!==null&&De!==void 0?De:le.value}var Tn=function(De){De.preventDefault(),De.stopPropagation()},Gn=function(De){var Xn=De.id,On=De.prefixCls,qe=De.values,ei=De.open,fi=De.searchValue,ki=De.autoClearSearchValue,Vi=De.inputRef,rn=De.placeholder,Ve=De.disabled,fn=De.mode,mi=De.showSearch,Pi=De.autoFocus,Pn=De.autoComplete,ni=De.activeDescendantId,Gi=De.tabIndex,er=De.removeIcon,Or=De.maxTagCount,Oe=De.maxTagTextLength,Ui=De.maxTagPlaceholder,hr=Ui===void 0?function(Ln){return"+ ".concat(Ln.length," ...")}:Ui,Si=De.tagRender,Qr=De.onToggleOpen,xr=De.onRemove,Ri=De.onInputChange,qi=De.onInputPaste,re=De.onInputKeyDown,he=De.onInputMouseDown,ne=De.onInputCompositionStart,Xe=De.onInputCompositionEnd,Fe=De.onInputBlur,an=zt.useRef(null),Jn=(0,zt.useState)(0),ii=(0,fe.Z)(Jn,2),Mi=ii[0],hi=ii[1],Zn=(0,zt.useState)(!1),ci=(0,fe.Z)(Zn,2),ke=ci[0],An=ci[1],be="".concat(On,"-selection"),Qt=ei||fn==="multiple"&&ki===!1||fn==="tags"?fi:"",ye=fn==="tags"||fn==="multiple"&&ki===!1||mi&&(ei||ke);Yn(function(){hi(an.current.scrollWidth)},[Qt]);var _n=function(Qe,sn,vn,Cn,zn){return zt.createElement("span",{title:$n(Qe),className:Yt()("".concat(be,"-item"),(0,Ae.Z)({},"".concat(be,"-item-disabled"),vn))},zt.createElement("span",{className:"".concat(be,"-item-content")},sn),Cn&&zt.createElement(At,{className:"".concat(be,"-item-remove"),onMouseDown:Tn,onClick:zn,customizeIcon:er},"\xD7"))},li=function(Qe,sn,vn,Cn,zn,on){var Ei=function(nr){Tn(nr),Qr(!ei)};return zt.createElement("span",{onMouseDown:Ei},Si({label:sn,value:Qe,disabled:vn,closable:Cn,onClose:zn,isMaxTag:!!on}))},Wn=function(Qe){var sn=Qe.disabled,vn=Qe.label,Cn=Qe.value,zn=!Ve&&!sn,on=vn;if(typeof Oe=="number"&&(typeof vn=="string"||typeof vn=="number")){var Ei=String(on);Ei.length>Oe&&(on="".concat(Ei.slice(0,Oe),"..."))}var Ii=function(Ni){Ni&&Ni.stopPropagation(),xr(Qe)};return typeof Si=="function"?li(Cn,on,sn,zn,Ii):_n(Qe,on,sn,zn,Ii)},Hn=function(Qe){if(!qe.length)return null;var sn=typeof hr=="function"?hr(Qe):hr;return typeof Si=="function"?li(void 0,sn,!1,!1,void 0,!0):_n({title:sn},sn,!1)},cn=zt.createElement("div",{className:"".concat(be,"-search"),style:{width:Mi},onFocus:function(){An(!0)},onBlur:function(){An(!1)}},zt.createElement(dn,{ref:Vi,open:ei,prefixCls:On,id:Xn,inputElement:null,disabled:Ve,autoFocus:Pi,autoComplete:Pn,editable:ye,activeDescendantId:ni,value:Qt,onKeyDown:re,onMouseDown:he,onChange:Ri,onPaste:qi,onCompositionStart:ne,onCompositionEnd:Xe,onBlur:Fe,tabIndex:Gi,attrs:(0,Wt.Z)(De,!0)}),zt.createElement("span",{ref:an,className:"".concat(be,"-search-mirror"),"aria-hidden":!0},Qt,"\xA0")),kn=zt.createElement(te.Z,{prefixCls:"".concat(be,"-overflow"),data:qe,renderItem:Wn,renderRest:Hn,suffix:cn,itemKey:nn,maxCount:Or});return zt.createElement("span",{className:"".concat(be,"-wrap")},kn,!qe.length&&!Qt&&zt.createElement("span",{className:"".concat(be,"-placeholder")},rn))},yi=Gn,Je=function(De){var Xn=De.inputElement,On=De.prefixCls,qe=De.id,ei=De.inputRef,fi=De.disabled,ki=De.autoFocus,Vi=De.autoComplete,rn=De.activeDescendantId,Ve=De.mode,fn=De.open,mi=De.values,Pi=De.placeholder,Pn=De.tabIndex,ni=De.showSearch,Gi=De.searchValue,er=De.activeValue,Or=De.maxLength,Oe=De.onInputKeyDown,Ui=De.onInputMouseDown,hr=De.onInputChange,Si=De.onInputPaste,Qr=De.onInputCompositionStart,xr=De.onInputCompositionEnd,Ri=De.onInputBlur,qi=De.title,re=zt.useState(!1),he=(0,fe.Z)(re,2),ne=he[0],Xe=he[1],Fe=Ve==="combobox",an=Fe||ni,Jn=mi[0],ii=Gi||"";Fe&&er&&!ne&&(ii=er),zt.useEffect(function(){Fe&&Xe(!1)},[Fe,er]);var Mi=Ve!=="combobox"&&!fn&&!ni?!1:!!ii,hi=qi===void 0?$n(Jn):qi,Zn=zt.useMemo(function(){return Jn?null:zt.createElement("span",{className:"".concat(On,"-selection-placeholder"),style:Mi?{visibility:"hidden"}:void 0},Pi)},[Jn,Mi,Pi,On]);return zt.createElement("span",{className:"".concat(On,"-selection-wrap")},zt.createElement("span",{className:"".concat(On,"-selection-search")},zt.createElement(dn,{ref:ei,prefixCls:On,id:qe,open:fn,inputElement:Xn,disabled:fi,autoFocus:ki,autoComplete:Vi,editable:an,activeDescendantId:rn,value:ii,onKeyDown:Oe,onMouseDown:Ui,onChange:function(ke){Xe(!0),hr(ke)},onPaste:Si,onCompositionStart:Qr,onCompositionEnd:xr,onBlur:Ri,tabIndex:Pn,attrs:(0,Wt.Z)(De,!0),maxLength:Fe?Or:void 0})),!Fe&&Jn?zt.createElement("span",{className:"".concat(On,"-selection-item"),title:hi,style:Mi?{visibility:"hidden"}:void 0},Jn.label):null,Zn)},Le=Je,tn=function(De,Xn){var On=(0,zt.useRef)(null),qe=(0,zt.useRef)(!1),ei=De.prefixCls,fi=De.open,ki=De.mode,Vi=De.showSearch,rn=De.tokenWithEnter,Ve=De.disabled,fn=De.prefix,mi=De.autoClearSearchValue,Pi=De.onSearch,Pn=De.onSearchSubmit,ni=De.onToggleOpen,Gi=De.onInputKeyDown,er=De.onInputBlur,Or=De.domRef;zt.useImperativeHandle(Xn,function(){return{focus:function(hi){On.current.focus(hi)},blur:function(){On.current.blur()}}});var Oe=kt(0),Ui=(0,fe.Z)(Oe,2),hr=Ui[0],Si=Ui[1],Qr=function(hi){var Zn=hi.which,ci=On.current instanceof HTMLTextAreaElement;!ci&&fi&&(Zn===Ot.Z.UP||Zn===Ot.Z.DOWN)&&hi.preventDefault(),Gi&&Gi(hi),Zn===Ot.Z.ENTER&&ki==="tags"&&!qe.current&&!fi&&(Pn==null||Pn(hi.target.value)),!(ci&&!fi&&~[Ot.Z.UP,Ot.Z.DOWN,Ot.Z.LEFT,Ot.Z.RIGHT].indexOf(Zn))&&Zt(Zn)&&ni(!0)},xr=function(){Si(!0)},Ri=(0,zt.useRef)(null),qi=function(hi){Pi(hi,!0,qe.current)!==!1&&ni(!0)},re=function(){qe.current=!0},he=function(hi){qe.current=!1,ki!=="combobox"&&qi(hi.target.value)},ne=function(hi){var Zn=hi.target.value;if(rn&&Ri.current&&/[\r\n]/.test(Ri.current)){var ci=Ri.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Zn=Zn.replace(ci,Ri.current)}Ri.current=null,qi(Zn)},Xe=function(hi){var Zn=hi.clipboardData,ci=Zn==null?void 0:Zn.getData("text");Ri.current=ci||""},Fe=function(hi){var Zn=hi.target;if(Zn!==On.current){var ci=document.body.style.msTouchAction!==void 0;ci?setTimeout(function(){On.current.focus()}):On.current.focus()}},an=function(hi){var Zn=hr();hi.target!==On.current&&!Zn&&!(ki==="combobox"&&Ve)&&hi.preventDefault(),(ki!=="combobox"&&(!Vi||!Zn)||!fi)&&(fi&&mi!==!1&&Pi("",!0,!1),ni())},Jn={inputRef:On,onInputKeyDown:Qr,onInputMouseDown:xr,onInputChange:ne,onInputPaste:Xe,onInputCompositionStart:re,onInputCompositionEnd:he,onInputBlur:er},ii=ki==="multiple"||ki==="tags"?zt.createElement(yi,(0,St.Z)({},De,Jn)):zt.createElement(Le,(0,St.Z)({},De,Jn));return zt.createElement("div",{ref:Or,className:"".concat(ei,"-selector"),onClick:Fe,onMouseDown:an},fn&&zt.createElement("div",{className:"".concat(ei,"-prefix")},fn),ii)},ti=zt.forwardRef(tn),jn=ti,Gt=Ut(65030),Ft=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],mt=function(De){var Xn=De===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Xn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Xn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Xn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Xn,adjustY:1},htmlRegion:"scroll"}}},vt=function(De,Xn){var On=De.prefixCls,qe=De.disabled,ei=De.visible,fi=De.children,ki=De.popupElement,Vi=De.animation,rn=De.transitionName,Ve=De.dropdownStyle,fn=De.dropdownClassName,mi=De.direction,Pi=mi===void 0?"ltr":mi,Pn=De.placement,ni=De.builtinPlacements,Gi=De.dropdownMatchSelectWidth,er=De.dropdownRender,Or=De.dropdownAlign,Oe=De.getPopupContainer,Ui=De.empty,hr=De.getTriggerDOMNode,Si=De.onPopupVisibleChange,Qr=De.onPopupMouseEnter,xr=(0,Rt.Z)(De,Ft),Ri="".concat(On,"-dropdown"),qi=ki;er&&(qi=er(ki));var re=zt.useMemo(function(){return ni||mt(Gi)},[ni,Gi]),he=Vi?"".concat(Ri,"-").concat(Vi):rn,ne=typeof Gi=="number",Xe=zt.useMemo(function(){return ne?null:Gi===!1?"minWidth":"width"},[Gi,ne]),Fe=Ve;ne&&(Fe=(0,xe.Z)((0,xe.Z)({},Fe),{},{width:Gi}));var an=zt.useRef(null);return zt.useImperativeHandle(Xn,function(){return{getPopupElement:function(){var ii;return(ii=an.current)===null||ii===void 0?void 0:ii.popupElement}}}),zt.createElement(Gt.Z,(0,St.Z)({},xr,{showAction:Si?["click"]:[],hideAction:Si?["click"]:[],popupPlacement:Pn||(Pi==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:re,prefixCls:Ri,popupTransitionName:he,popup:zt.createElement("div",{onMouseEnter:Qr},qi),ref:an,stretch:Xe,popupAlign:Or,popupVisible:ei,getPopupContainer:Oe,popupClassName:Yt()(fn,(0,Ae.Z)({},"".concat(Ri,"-empty"),Ui)),popupStyle:Fe,getTriggerDOMNode:hr,onPopupVisibleChange:Si}),fi)},Lt=zt.forwardRef(vt),Ct=Lt,_t=Ut(21696);function Pe(le,De){var Xn=le.key,On;return"value"in le&&(On=le.value),Xn!=null?Xn:On!==void 0?On:"rc-index-key-".concat(De)}function ze(le){return typeof le!="undefined"&&!Number.isNaN(le)}function wn(le,De){var Xn=le||{},On=Xn.label,qe=Xn.value,ei=Xn.options,fi=Xn.groupLabel,ki=On||(De?"children":"label");return{label:ki,value:qe||"value",options:ei||"options",groupLabel:fi||ki}}function Ge(le){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Xn=De.fieldNames,On=De.childrenAsData,qe=[],ei=wn(Xn,!1),fi=ei.label,ki=ei.value,Vi=ei.options,rn=ei.groupLabel;function Ve(fn,mi){Array.isArray(fn)&&fn.forEach(function(Pi){if(mi||!(Vi in Pi)){var Pn=Pi[ki];qe.push({key:Pe(Pi,qe.length),groupOption:mi,data:Pi,label:Pi[fi],value:Pn})}else{var ni=Pi[rn];ni===void 0&&On&&(ni=Pi.label),qe.push({key:Pe(Pi,qe.length),group:!0,data:Pi,label:ni}),Ve(Pi[Vi],!0)}})}return Ve(le,!1),qe}function Te(le){var De=(0,xe.Z)({},le);return"props"in De||Object.defineProperty(De,"props",{get:function(){return(0,de.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),De}}),De}var Ze=function(De,Xn,On){if(!Xn||!Xn.length)return null;var qe=!1,ei=function ki(Vi,rn){var Ve=(0,_t.Z)(rn),fn=Ve[0],mi=Ve.slice(1);if(!fn)return[Vi];var Pi=Vi.split(fn);return qe=qe||Pi.length>1,Pi.reduce(function(Pn,ni){return[].concat((0,Xt.Z)(Pn),(0,Xt.Z)(ki(ni,mi)))},[]).filter(Boolean)},fi=ei(De,Xn);return qe?typeof On!="undefined"?fi.slice(0,On):fi:null},hn=zt.createContext(null),In=hn;function si(le){var De=le.visible,Xn=le.values;if(!De)return null;var On=50;return zt.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Xn.slice(0,On).map(function(qe){var ei=qe.label,fi=qe.value;return["number","string"].includes((0,ie.Z)(ei))?ei:fi}).join(", ")),Xn.length>On?", ...":null)}var Dn=["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"],Oi=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],ai=function(De){return De==="tags"||De==="multiple"},Ai=zt.forwardRef(function(le,De){var Xn,On=le.id,qe=le.prefixCls,ei=le.className,fi=le.showSearch,ki=le.tagRender,Vi=le.direction,rn=le.omitDomProps,Ve=le.displayValues,fn=le.onDisplayValuesChange,mi=le.emptyOptions,Pi=le.notFoundContent,Pn=Pi===void 0?"Not Found":Pi,ni=le.onClear,Gi=le.mode,er=le.disabled,Or=le.loading,Oe=le.getInputElement,Ui=le.getRawInputElement,hr=le.open,Si=le.defaultOpen,Qr=le.onDropdownVisibleChange,xr=le.activeValue,Ri=le.onActiveValueChange,qi=le.activeDescendantId,re=le.searchValue,he=le.autoClearSearchValue,ne=le.onSearch,Xe=le.onSearchSplit,Fe=le.tokenSeparators,an=le.allowClear,Jn=le.prefix,ii=le.suffixIcon,Mi=le.clearIcon,hi=le.OptionList,Zn=le.animation,ci=le.transitionName,ke=le.dropdownStyle,An=le.dropdownClassName,be=le.dropdownMatchSelectWidth,Qt=le.dropdownRender,ye=le.dropdownAlign,_n=le.placement,li=le.builtinPlacements,Wn=le.getPopupContainer,Hn=le.showAction,cn=Hn===void 0?[]:Hn,kn=le.onFocus,Ln=le.onBlur,Qe=le.onKeyUp,sn=le.onKeyDown,vn=le.onMouseDown,Cn=(0,Rt.Z)(le,Dn),zn=ai(Gi),on=(fi!==void 0?fi:zn)||Gi==="combobox",Ei=(0,xe.Z)({},Cn);Oi.forEach(function(Uo){delete Ei[Uo]}),rn==null||rn.forEach(function(Uo){delete Ei[Uo]});var Ii=zt.useState(!1),nr=(0,fe.Z)(Ii,2),Ni=nr[0],Mr=nr[1];zt.useEffect(function(){Mr((0,It.Z)())},[]);var yr=zt.useRef(null),Zr=zt.useRef(null),Dr=zt.useRef(null),Gr=zt.useRef(null),$r=zt.useRef(null),Ue=zt.useRef(!1),Fr=xt(),Er=(0,fe.Z)(Fr,3),fr=Er[0],$i=Er[1],Rr=Er[2];zt.useImperativeHandle(De,function(){var Uo,wo;return{focus:(Uo=Gr.current)===null||Uo===void 0?void 0:Uo.focus,blur:(wo=Gr.current)===null||wo===void 0?void 0:wo.blur,scrollTo:function(Yi){var na;return(na=$r.current)===null||na===void 0?void 0:na.scrollTo(Yi)},nativeElement:yr.current||Zr.current}});var ro=zt.useMemo(function(){var Uo;if(Gi!=="combobox")return re;var wo=(Uo=Ve[0])===null||Uo===void 0?void 0:Uo.value;return typeof wo=="string"||typeof wo=="number"?String(wo):""},[re,Gi,Ve]),eo=Gi==="combobox"&&typeof Oe=="function"&&Oe()||null,kr=typeof Ui=="function"&&Ui(),Ao=(0,nt.x1)(Zr,kr==null||(Xn=kr.props)===null||Xn===void 0?void 0:Xn.ref),$o=zt.useState(!1),Zs=(0,fe.Z)($o,2),ka=Zs[0],zs=Zs[1];(0,Me.Z)(function(){zs(!0)},[]);var sr=(0,ae.Z)(!1,{defaultValue:Si,value:hr}),os=(0,fe.Z)(sr,2),ns=os[0],js=os[1],us=ka?ns:!1,ys=!Pn&&mi;(er||ys&&us&&Gi==="combobox")&&(us=!1);var di=ys?!1:us,Ar=zt.useCallback(function(Uo){var wo=Uo!==void 0?Uo:!us;er||(js(wo),us!==wo&&(Qr==null||Qr(wo)))},[er,us,js,Qr]),br=zt.useMemo(function(){return(Fe||[]).some(function(Uo){return[`
`,`\r
`].includes(Uo)})},[Fe]),Xr=zt.useContext(In)||{},io=Xr.maxCount,yo=Xr.rawValues,rr=function(wo,fs,Yi){if(!(zn&&ze(io)&&(yo==null?void 0:yo.size)>=io)){var na=!0,Ce=wo;Ri==null||Ri(null);var bn=Ze(wo,Fe,ze(io)?io-yo.size:void 0),kl=Yi?null:bn;return Gi!=="combobox"&&kl&&(Ce="",Xe==null||Xe(kl),Ar(!1),na=!1),ne&&ro!==Ce&&ne(Ce,{source:fs?"typing":"effect"}),na}},Bo=function(wo){!wo||!wo.trim()||ne(wo,{source:"submit"})};zt.useEffect(function(){!us&&!zn&&Gi!=="combobox"&&rr("",!1,!1)},[us]),zt.useEffect(function(){ns&&er&&js(!1),er&&!Ue.current&&$i(!1)},[er]);var Qi=kt(),Tr=(0,fe.Z)(Qi,2),gr=Tr[0],Wo=Tr[1],is=zt.useRef(!1),Lo=function(wo){var fs=gr(),Yi=wo.key,na=Yi==="Enter";if(na&&(Gi!=="combobox"&&wo.preventDefault(),us||Ar(!0)),Wo(!!ro),Yi==="Backspace"&&!fs&&zn&&!ro&&Ve.length){for(var Ce=(0,Xt.Z)(Ve),bn=null,kl=Ce.length-1;kl>=0;kl-=1){var du=Ce[kl];if(!du.disabled){Ce.splice(kl,1),bn=du;break}}bn&&fn(Ce,{type:"remove",values:[bn]})}for(var rs=arguments.length,ra=new Array(rs>1?rs-1:0),gl=1;gl<rs;gl++)ra[gl-1]=arguments[gl];if(us&&(!na||!is.current)){var Kl;na&&(is.current=!0),(Kl=$r.current)===null||Kl===void 0||Kl.onKeyDown.apply(Kl,[wo].concat(ra))}sn==null||sn.apply(void 0,[wo].concat(ra))},Ss=function(wo){for(var fs=arguments.length,Yi=new Array(fs>1?fs-1:0),na=1;na<fs;na++)Yi[na-1]=arguments[na];if(us){var Ce;(Ce=$r.current)===null||Ce===void 0||Ce.onKeyUp.apply(Ce,[wo].concat(Yi))}wo.key==="Enter"&&(is.current=!1),Qe==null||Qe.apply(void 0,[wo].concat(Yi))},jo=function(wo){var fs=Ve.filter(function(Yi){return Yi!==wo});fn(fs,{type:"remove",values:[wo]})},Pa=function(){is.current=!1},Io=zt.useRef(!1),rl=function(){$i(!0),er||(kn&&!Io.current&&kn.apply(void 0,arguments),cn.includes("focus")&&Ar(!0)),Io.current=!0},bo=function(){Ue.current=!0,$i(!1,function(){Io.current=!1,Ue.current=!1,Ar(!1)}),!er&&(ro&&(Gi==="tags"?ne(ro,{source:"submit"}):Gi==="multiple"&&ne("",{source:"blur"})),Ln&&Ln.apply(void 0,arguments))},ma=[];zt.useEffect(function(){return function(){ma.forEach(function(Uo){return clearTimeout(Uo)}),ma.splice(0,ma.length)}},[]);var _o=function(wo){var fs,Yi=wo.target,na=(fs=Dr.current)===null||fs===void 0?void 0:fs.getPopupElement();if(na&&na.contains(Yi)){var Ce=setTimeout(function(){var rs=ma.indexOf(Ce);if(rs!==-1&&ma.splice(rs,1),Rr(),!Ni&&!na.contains(document.activeElement)){var ra;(ra=Gr.current)===null||ra===void 0||ra.focus()}});ma.push(Ce)}for(var bn=arguments.length,kl=new Array(bn>1?bn-1:0),du=1;du<bn;du++)kl[du-1]=arguments[du];vn==null||vn.apply(void 0,[wo].concat(kl))},Ns=zt.useState({}),Ws=(0,fe.Z)(Ns,2),hu=Ws[1];function Ll(){hu({})}var es;kr&&(es=function(wo){Ar(wo)}),Ht(function(){var Uo;return[yr.current,(Uo=Dr.current)===null||Uo===void 0?void 0:Uo.getPopupElement()]},di,Ar,!!kr);var Ml=zt.useMemo(function(){return(0,xe.Z)((0,xe.Z)({},le),{},{notFoundContent:Pn,open:us,triggerOpen:di,id:On,showSearch:on,multiple:zn,toggleOpen:Ar})},[le,Pn,di,us,On,on,zn,Ar]),ca=!!ii||Or,ds;ca&&(ds=zt.createElement(At,{className:Yt()("".concat(qe,"-arrow"),(0,Ae.Z)({},"".concat(qe,"-arrow-loading"),Or)),customizeIcon:ii,customizeIconProps:{loading:Or,searchValue:ro,open:us,focused:fr,showSearch:on}}));var Oa=function(){var wo;ni==null||ni(),(wo=Gr.current)===null||wo===void 0||wo.focus(),fn([],{type:"clear",values:Ve}),rr("",!1,!1)},Bs=at(qe,Oa,Ve,an,Mi,er,ro,Gi),Yo=Bs.allowClear,As=Bs.clearIcon,Us=zt.createElement(hi,{ref:$r}),cu=Yt()(qe,ei,(0,Ae.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({},"".concat(qe,"-focused"),fr),"".concat(qe,"-multiple"),zn),"".concat(qe,"-single"),!zn),"".concat(qe,"-allow-clear"),an),"".concat(qe,"-show-arrow"),ca),"".concat(qe,"-disabled"),er),"".concat(qe,"-loading"),Or),"".concat(qe,"-open"),us),"".concat(qe,"-customize-input"),eo),"".concat(qe,"-show-search"),on)),va=zt.createElement(Ct,{ref:Dr,disabled:er,prefixCls:qe,visible:di,popupElement:Us,animation:Zn,transitionName:ci,dropdownStyle:ke,dropdownClassName:An,direction:Vi,dropdownMatchSelectWidth:be,dropdownRender:Qt,dropdownAlign:ye,placement:_n,builtinPlacements:li,getPopupContainer:Wn,empty:mi,getTriggerDOMNode:function(wo){return Zr.current||wo},onPopupVisibleChange:es,onPopupMouseEnter:Ll},kr?zt.cloneElement(kr,{ref:Ao}):zt.createElement(jn,(0,St.Z)({},le,{domRef:Zr,prefixCls:qe,inputElement:eo,ref:Gr,id:On,prefix:Jn,showSearch:on,autoClearSearchValue:he,mode:Gi,activeDescendantId:qi,tagRender:ki,values:Ve,open:us,onToggleOpen:Ar,activeValue:xr,searchValue:ro,onSearch:rr,onSearchSubmit:Bo,onRemove:jo,tokenWithEnter:br,onInputBlur:Pa}))),Vo;return kr?Vo=va:Vo=zt.createElement("div",(0,St.Z)({className:cu},Ei,{ref:yr,onMouseDown:_o,onKeyDown:Lo,onKeyUp:Ss,onFocus:rl,onBlur:bo}),zt.createElement(si,{visible:fr&&!us,values:Ve}),va,ds,Yo&&As),zt.createElement(dt.Provider,{value:Ml},Vo)}),pi=Ai,ur=function(){return null};ur.isSelectOptGroup=!0;var Fi=ur,zi=function(){return null};zi.isSelectOption=!0;var Xi=zi,Lr=Ut(80547),wi=Ut(2738),Nr=Ut(6790);function Br(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var jr=["disabled","title","children","style","className"];function Wi(le){return typeof le=="string"||typeof le=="number"}var po=function(De,Xn){var On=gt(),qe=On.prefixCls,ei=On.id,fi=On.open,ki=On.multiple,Vi=On.mode,rn=On.searchValue,Ve=On.toggleOpen,fn=On.notFoundContent,mi=On.onPopupScroll,Pi=zt.useContext(In),Pn=Pi.maxCount,ni=Pi.flattenOptions,Gi=Pi.onActiveValue,er=Pi.defaultActiveFirstOption,Or=Pi.onSelect,Oe=Pi.menuItemSelectedIcon,Ui=Pi.rawValues,hr=Pi.fieldNames,Si=Pi.virtual,Qr=Pi.direction,xr=Pi.listHeight,Ri=Pi.listItemHeight,qi=Pi.optionRender,re="".concat(qe,"-item"),he=(0,Lr.Z)(function(){return ni},[fi,ni],function(Hn,cn){return cn[0]&&Hn[1]!==cn[1]}),ne=zt.useRef(null),Xe=zt.useMemo(function(){return ki&&ze(Pn)&&(Ui==null?void 0:Ui.size)>=Pn},[ki,Pn,Ui==null?void 0:Ui.size]),Fe=function(cn){cn.preventDefault()},an=function(cn){var kn;(kn=ne.current)===null||kn===void 0||kn.scrollTo(typeof cn=="number"?{index:cn}:cn)},Jn=zt.useCallback(function(Hn){return Vi==="combobox"?!1:Ui.has(Hn)},[Vi,(0,Xt.Z)(Ui).toString(),Ui.size]),ii=function(cn){for(var kn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ln=he.length,Qe=0;Qe<Ln;Qe+=1){var sn=(cn+Qe*kn+Ln)%Ln,vn=he[sn]||{},Cn=vn.group,zn=vn.data;if(!Cn&&!(zn!=null&&zn.disabled)&&(Jn(zn.value)||!Xe))return sn}return-1},Mi=zt.useState(function(){return ii(0)}),hi=(0,fe.Z)(Mi,2),Zn=hi[0],ci=hi[1],ke=function(cn){var kn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;ci(cn);var Ln={source:kn?"keyboard":"mouse"},Qe=he[cn];if(!Qe){Gi(null,-1,Ln);return}Gi(Qe.value,cn,Ln)};(0,zt.useEffect)(function(){ke(er!==!1?ii(0):-1)},[he.length,rn]);var An=zt.useCallback(function(Hn){return Vi==="combobox"?String(Hn).toLowerCase()===rn.toLowerCase():Ui.has(Hn)},[Vi,rn,(0,Xt.Z)(Ui).toString(),Ui.size]);(0,zt.useEffect)(function(){var Hn=setTimeout(function(){if(!ki&&fi&&Ui.size===1){var kn=Array.from(Ui)[0],Ln=he.findIndex(function(Qe){var sn=Qe.data;return rn?String(sn.value).startsWith(rn):sn.value===kn});Ln!==-1&&(ke(Ln),an(Ln))}});if(fi){var cn;(cn=ne.current)===null||cn===void 0||cn.scrollTo(void 0)}return function(){return clearTimeout(Hn)}},[fi,rn]);var be=function(cn){cn!==void 0&&Or(cn,{selected:!Ui.has(cn)}),ki||Ve(!1)};if(zt.useImperativeHandle(Xn,function(){return{onKeyDown:function(cn){var kn=cn.which,Ln=cn.ctrlKey;switch(kn){case Ot.Z.N:case Ot.Z.P:case Ot.Z.UP:case Ot.Z.DOWN:{var Qe=0;if(kn===Ot.Z.UP?Qe=-1:kn===Ot.Z.DOWN?Qe=1:Br()&&Ln&&(kn===Ot.Z.N?Qe=1:kn===Ot.Z.P&&(Qe=-1)),Qe!==0){var sn=ii(Zn+Qe,Qe);an(sn),ke(sn,!0)}break}case Ot.Z.TAB:case Ot.Z.ENTER:{var vn,Cn=he[Zn];Cn&&!(Cn!=null&&(vn=Cn.data)!==null&&vn!==void 0&&vn.disabled)&&!Xe?be(Cn.value):be(void 0),fi&&cn.preventDefault();break}case Ot.Z.ESC:Ve(!1),fi&&cn.stopPropagation()}},onKeyUp:function(){},scrollTo:function(cn){an(cn)}}}),he.length===0)return zt.createElement("div",{role:"listbox",id:"".concat(ei,"_list"),className:"".concat(re,"-empty"),onMouseDown:Fe},fn);var Qt=Object.keys(hr).map(function(Hn){return hr[Hn]}),ye=function(cn){return cn.label};function _n(Hn,cn){var kn=Hn.group;return{role:kn?"presentation":"option",id:"".concat(ei,"_list_").concat(cn)}}var li=function(cn){var kn=he[cn];if(!kn)return null;var Ln=kn.data||{},Qe=Ln.value,sn=kn.group,vn=(0,Wt.Z)(Ln,!0),Cn=ye(kn);return kn?zt.createElement("div",(0,St.Z)({"aria-label":typeof Cn=="string"&&!sn?Cn:null},vn,{key:cn},_n(kn,cn),{"aria-selected":An(Qe)}),Qe):null},Wn={role:"listbox",id:"".concat(ei,"_list")};return zt.createElement(zt.Fragment,null,Si&&zt.createElement("div",(0,St.Z)({},Wn,{style:{height:0,width:0,overflow:"hidden"}}),li(Zn-1),li(Zn),li(Zn+1)),zt.createElement(Nr.Z,{itemKey:"key",ref:ne,data:he,height:xr,itemHeight:Ri,fullHeight:!1,onMouseDown:Fe,onScroll:mi,virtual:Si,direction:Qr,innerProps:Si?null:Wn},function(Hn,cn){var kn=Hn.group,Ln=Hn.groupOption,Qe=Hn.data,sn=Hn.label,vn=Hn.value,Cn=Qe.key;if(kn){var zn,on=(zn=Qe.title)!==null&&zn!==void 0?zn:Wi(sn)?sn.toString():void 0;return zt.createElement("div",{className:Yt()(re,"".concat(re,"-group"),Qe.className),title:on},sn!==void 0?sn:Cn)}var Ei=Qe.disabled,Ii=Qe.title,nr=Qe.children,Ni=Qe.style,Mr=Qe.className,yr=(0,Rt.Z)(Qe,jr),Zr=(0,wi.Z)(yr,Qt),Dr=Jn(vn),Gr=Ei||!Dr&&Xe,$r="".concat(re,"-option"),Ue=Yt()(re,$r,Mr,(0,Ae.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({},"".concat($r,"-grouped"),Ln),"".concat($r,"-active"),Zn===cn&&!Gr),"".concat($r,"-disabled"),Gr),"".concat($r,"-selected"),Dr)),Fr=ye(Hn),Er=!Oe||typeof Oe=="function"||Dr,fr=typeof Fr=="number"?Fr:Fr||vn,$i=Wi(fr)?fr.toString():void 0;return Ii!==void 0&&($i=Ii),zt.createElement("div",(0,St.Z)({},(0,Wt.Z)(Zr),Si?{}:_n(Hn,cn),{"aria-selected":An(vn),className:Ue,title:$i,onMouseMove:function(){Zn===cn||Gr||ke(cn)},onClick:function(){Gr||be(vn)},style:Ni}),zt.createElement("div",{className:"".concat($r,"-content")},typeof qi=="function"?qi(Hn,{index:cn}):fr),zt.isValidElement(Oe)||Dr,Er&&zt.createElement(At,{className:"".concat(re,"-option-state"),customizeIcon:Oe,customizeIconProps:{value:vn,disabled:Gr,isSelected:Dr}},Dr?"\u2713":null))}))},mo=zt.forwardRef(po),no=mo,ir=function(le,De){var Xn=zt.useRef({values:new Map,options:new Map}),On=zt.useMemo(function(){var ei=Xn.current,fi=ei.values,ki=ei.options,Vi=le.map(function(fn){if(fn.label===void 0){var mi;return(0,xe.Z)((0,xe.Z)({},fn),{},{label:(mi=fi.get(fn.value))===null||mi===void 0?void 0:mi.label})}return fn}),rn=new Map,Ve=new Map;return Vi.forEach(function(fn){rn.set(fn.value,fn),Ve.set(fn.value,De.get(fn.value)||ki.get(fn.value))}),Xn.current.values=rn,Xn.current.options=Ve,Vi},[le,De]),qe=zt.useCallback(function(ei){return De.get(ei)||Xn.current.options.get(ei)},[De]);return[On,qe]};function so(le,De){return yn(le).join("").toUpperCase().includes(De)}var Tt=function(le,De,Xn,On,qe){return zt.useMemo(function(){if(!Xn||On===!1)return le;var ei=De.options,fi=De.label,ki=De.value,Vi=[],rn=typeof On=="function",Ve=Xn.toUpperCase(),fn=rn?On:function(Pi,Pn){return qe?so(Pn[qe],Ve):Pn[ei]?so(Pn[fi!=="children"?fi:"label"],Ve):so(Pn[ki],Ve)},mi=rn?function(Pi){return Te(Pi)}:function(Pi){return Pi};return le.forEach(function(Pi){if(Pi[ei]){var Pn=fn(Xn,mi(Pi));if(Pn)Vi.push(Pi);else{var ni=Pi[ei].filter(function(Gi){return fn(Xn,mi(Gi))});ni.length&&Vi.push((0,xe.Z)((0,xe.Z)({},Pi),{},(0,Ae.Z)({},ei,ni)))}return}fn(Xn,mi(Pi))&&Vi.push(Pi)}),Vi},[le,On,qe,Xn,De])},Pr=Ut(6551),Zi=Ut(11592),xi=["children","value"],Hi=["children"];function ji(le){var De=le,Xn=De.key,On=De.props,qe=On.children,ei=On.value,fi=(0,Rt.Z)(On,xi);return(0,xe.Z)({key:Xn,value:ei!==void 0?ei:Xn,children:qe},fi)}function tr(le){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Zi.Z)(le).map(function(Xn,On){if(!zt.isValidElement(Xn)||!Xn.type)return null;var qe=Xn,ei=qe.type.isSelectOptGroup,fi=qe.key,ki=qe.props,Vi=ki.children,rn=(0,Rt.Z)(ki,Hi);return De||!ei?ji(Xn):(0,xe.Z)((0,xe.Z)({key:"__RC_SELECT_GRP__".concat(fi===null?On:fi,"__"),label:fi},rn),{},{options:tr(Vi)})}).filter(function(Xn){return Xn})}var qr=function(De,Xn,On,qe,ei){return zt.useMemo(function(){var fi=De,ki=!De;ki&&(fi=tr(Xn));var Vi=new Map,rn=new Map,Ve=function(Pi,Pn,ni){ni&&typeof ni=="string"&&Pi.set(Pn[ni],Pn)},fn=function mi(Pi){for(var Pn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ni=0;ni<Pi.length;ni+=1){var Gi=Pi[ni];!Gi[On.options]||Pn?(Vi.set(Gi[On.value],Gi),Ve(rn,Gi,On.label),Ve(rn,Gi,qe),Ve(rn,Gi,ei)):mi(Gi[On.options],!0)}};return fn(fi),{options:fi,valueOptions:Vi,labelOptions:rn}},[De,Xn,On,qe,ei])},un=qr;function ln(le){var De=zt.useRef();De.current=le;var Xn=zt.useCallback(function(){return De.current.apply(De,arguments)},[]);return Xn}function We(le){var De=le.mode,Xn=le.options,On=le.children,qe=le.backfill,ei=le.allowClear,fi=le.placeholder,ki=le.getInputElement,Vi=le.showSearch,rn=le.onSearch,Ve=le.defaultOpen,fn=le.autoFocus,mi=le.labelInValue,Pi=le.value,Pn=le.inputValue,ni=le.optionLabelProp,Gi=isMultiple(De),er=Vi!==void 0?Vi:Gi||De==="combobox",Or=Xn||convertChildrenToData(On);if(warning(De!=="tags"||Or.every(function(Si){return!Si.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),De==="tags"||De==="combobox"){var Oe=Or.some(function(Si){return Si.options?Si.options.some(function(Qr){return typeof("value"in Qr?Qr.value:Qr.key)=="number"}):typeof("value"in Si?Si.value:Si.key)=="number"});warning(!Oe,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(De!=="combobox"||!ni,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(De==="combobox"||!qe,"`backfill` only works with `combobox` mode."),warning(De==="combobox"||!ki,"`getInputElement` only work with `combobox` mode."),noteOnce(De!=="combobox"||!ki||!ei||!fi,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),rn&&!er&&De!=="combobox"&&De!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Ve||fn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Pi!=null){var Ui=toArray(Pi);warning(!mi||Ui.every(function(Si){return _typeof(Si)==="object"&&("key"in Si||"value"in Si)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Gi||Array.isArray(Pi),"`value` should be array when `mode` is `multiple` or `tags`")}if(On){var hr=null;toNodeArray(On).some(function(Si){if(!React.isValidElement(Si)||!Si.type)return!1;var Qr=Si,xr=Qr.type;if(xr.isSelectOption)return!1;if(xr.isSelectOptGroup){var Ri=toNodeArray(Si.props.children).every(function(qi){return!React.isValidElement(qi)||!Si.type||qi.type.isSelectOption?!0:(hr=qi.type,!1)});return!Ri}return hr=xr,!0}),hr&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(hr.displayName||hr.name||hr,"`.")),warning(Pn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Sn(le,De){if(le){var Xn=function On(qe){for(var ei=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,fi=0;fi<qe.length;fi++){var ki=qe[fi];if(ki[De==null?void 0:De.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!ei&&Array.isArray(ki[De==null?void 0:De.options])&&On(ki[De==null?void 0:De.options],!0))break}};Xn(le)}}var Ki=null,Li=["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"],dr=["inputValue"];function se(le){return!le||(0,ie.Z)(le)!=="object"}var Mn=zt.forwardRef(function(le,De){var Xn=le.id,On=le.mode,qe=le.prefixCls,ei=qe===void 0?"rc-select":qe,fi=le.backfill,ki=le.fieldNames,Vi=le.inputValue,rn=le.searchValue,Ve=le.onSearch,fn=le.autoClearSearchValue,mi=fn===void 0?!0:fn,Pi=le.onSelect,Pn=le.onDeselect,ni=le.dropdownMatchSelectWidth,Gi=ni===void 0?!0:ni,er=le.filterOption,Or=le.filterSort,Oe=le.optionFilterProp,Ui=le.optionLabelProp,hr=le.options,Si=le.optionRender,Qr=le.children,xr=le.defaultActiveFirstOption,Ri=le.menuItemSelectedIcon,qi=le.virtual,re=le.direction,he=le.listHeight,ne=he===void 0?200:he,Xe=le.listItemHeight,Fe=Xe===void 0?20:Xe,an=le.labelRender,Jn=le.value,ii=le.defaultValue,Mi=le.labelInValue,hi=le.onChange,Zn=le.maxCount,ci=(0,Rt.Z)(le,Li),ke=(0,Pr.ZP)(Xn),An=ai(On),be=!!(!hr&&Qr),Qt=zt.useMemo(function(){return er===void 0&&On==="combobox"?!1:er},[er,On]),ye=zt.useMemo(function(){return wn(ki,be)},[JSON.stringify(ki),be]),_n=(0,ae.Z)("",{value:rn!==void 0?rn:Vi,postState:function(br){return br||""}}),li=(0,fe.Z)(_n,2),Wn=li[0],Hn=li[1],cn=un(hr,Qr,ye,Oe,Ui),kn=cn.valueOptions,Ln=cn.labelOptions,Qe=cn.options,sn=zt.useCallback(function(Ar){var br=yn(Ar);return br.map(function(Xr){var io,yo,rr,Bo,Qi;if(se(Xr))io=Xr;else{var Tr;rr=Xr.key,yo=Xr.label,io=(Tr=Xr.value)!==null&&Tr!==void 0?Tr:rr}var gr=kn.get(io);if(gr){var Wo;if(yo===void 0&&(yo=gr==null?void 0:gr[Ui||ye.label]),rr===void 0&&(rr=(Wo=gr==null?void 0:gr.key)!==null&&Wo!==void 0?Wo:io),Bo=gr==null?void 0:gr.disabled,Qi=gr==null?void 0:gr.title,0)var is}return{label:yo,value:io,key:rr,disabled:Bo,title:Qi}})},[ye,Ui,kn]),vn=(0,ae.Z)(ii,{value:Jn}),Cn=(0,fe.Z)(vn,2),zn=Cn[0],on=Cn[1],Ei=zt.useMemo(function(){var Ar,br=An&&zn===null?[]:zn,Xr=sn(br);return On==="combobox"&&ee((Ar=Xr[0])===null||Ar===void 0?void 0:Ar.value)?[]:Xr},[zn,sn,On,An]),Ii=ir(Ei,kn),nr=(0,fe.Z)(Ii,2),Ni=nr[0],Mr=nr[1],yr=zt.useMemo(function(){if(!On&&Ni.length===1){var Ar=Ni[0];if(Ar.value===null&&(Ar.label===null||Ar.label===void 0))return[]}return Ni.map(function(br){var Xr;return(0,xe.Z)((0,xe.Z)({},br),{},{label:(Xr=typeof an=="function"?an(br):br.label)!==null&&Xr!==void 0?Xr:br.value})})},[On,Ni,an]),Zr=zt.useMemo(function(){return new Set(Ni.map(function(Ar){return Ar.value}))},[Ni]);zt.useEffect(function(){if(On==="combobox"){var Ar,br=(Ar=Ni[0])===null||Ar===void 0?void 0:Ar.value;Hn(me(br)?String(br):"")}},[Ni]);var Dr=ln(function(Ar,br){var Xr=br!=null?br:Ar;return(0,Ae.Z)((0,Ae.Z)({},ye.value,Ar),ye.label,Xr)}),Gr=zt.useMemo(function(){if(On!=="tags")return Qe;var Ar=(0,Xt.Z)(Qe),br=function(io){return kn.has(io)};return(0,Xt.Z)(Ni).sort(function(Xr,io){return Xr.value<io.value?-1:1}).forEach(function(Xr){var io=Xr.value;br(io)||Ar.push(Dr(io,Xr.label))}),Ar},[Dr,Qe,kn,Ni,On]),$r=Tt(Gr,ye,Wn,Qt,Oe),Ue=zt.useMemo(function(){return On!=="tags"||!Wn||$r.some(function(Ar){return Ar[Oe||"value"]===Wn})||$r.some(function(Ar){return Ar[ye.value]===Wn})?$r:[Dr(Wn)].concat((0,Xt.Z)($r))},[Dr,Oe,On,$r,Wn,ye]),Fr=function Ar(br){var Xr=(0,Xt.Z)(br).sort(function(io,yo){return Or(io,yo,{searchValue:Wn})});return Xr.map(function(io){return Array.isArray(io.options)?(0,xe.Z)((0,xe.Z)({},io),{},{options:io.options.length>0?Ar(io.options):io.options}):io})},Er=zt.useMemo(function(){return Or?Fr(Ue):Ue},[Ue,Or,Wn]),fr=zt.useMemo(function(){return Ge(Er,{fieldNames:ye,childrenAsData:be})},[Er,ye,be]),$i=function(br){var Xr=sn(br);if(on(Xr),hi&&(Xr.length!==Ni.length||Xr.some(function(rr,Bo){var Qi;return((Qi=Ni[Bo])===null||Qi===void 0?void 0:Qi.value)!==(rr==null?void 0:rr.value)}))){var io=Mi?Xr:Xr.map(function(rr){return rr.value}),yo=Xr.map(function(rr){return Te(Mr(rr.value))});hi(An?io:io[0],An?yo:yo[0])}},Rr=zt.useState(null),ro=(0,fe.Z)(Rr,2),eo=ro[0],kr=ro[1],Ao=zt.useState(0),$o=(0,fe.Z)(Ao,2),Zs=$o[0],ka=$o[1],zs=xr!==void 0?xr:On!=="combobox",sr=zt.useCallback(function(Ar,br){var Xr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},io=Xr.source,yo=io===void 0?"keyboard":io;ka(br),fi&&On==="combobox"&&Ar!==null&&yo==="keyboard"&&kr(String(Ar))},[fi,On]),os=function(br,Xr,io){var yo=function(){var jo,Pa=Mr(br);return[Mi?{label:Pa==null?void 0:Pa[ye.label],value:br,key:(jo=Pa==null?void 0:Pa.key)!==null&&jo!==void 0?jo:br}:br,Te(Pa)]};if(Xr&&Pi){var rr=yo(),Bo=(0,fe.Z)(rr,2),Qi=Bo[0],Tr=Bo[1];Pi(Qi,Tr)}else if(!Xr&&Pn&&io!=="clear"){var gr=yo(),Wo=(0,fe.Z)(gr,2),is=Wo[0],Lo=Wo[1];Pn(is,Lo)}},ns=ln(function(Ar,br){var Xr,io=An?br.selected:!0;io?Xr=An?[].concat((0,Xt.Z)(Ni),[Ar]):[Ar]:Xr=Ni.filter(function(yo){return yo.value!==Ar}),$i(Xr),os(Ar,io),On==="combobox"?kr(""):(!ai||mi)&&(Hn(""),kr(""))}),js=function(br,Xr){$i(br);var io=Xr.type,yo=Xr.values;(io==="remove"||io==="clear")&&yo.forEach(function(rr){os(rr.value,!1,io)})},us=function(br,Xr){if(Hn(br),kr(null),Xr.source==="submit"){var io=(br||"").trim();if(io){var yo=Array.from(new Set([].concat((0,Xt.Z)(Zr),[io])));$i(yo),os(io,!0),Hn("")}return}Xr.source!=="blur"&&(On==="combobox"&&$i(br),Ve==null||Ve(br))},ys=function(br){var Xr=br;On!=="tags"&&(Xr=br.map(function(yo){var rr=Ln.get(yo);return rr==null?void 0:rr.value}).filter(function(yo){return yo!==void 0}));var io=Array.from(new Set([].concat((0,Xt.Z)(Zr),(0,Xt.Z)(Xr))));$i(io),io.forEach(function(yo){os(yo,!0)})},di=zt.useMemo(function(){var Ar=qi!==!1&&Gi!==!1;return(0,xe.Z)((0,xe.Z)({},cn),{},{flattenOptions:fr,onActiveValue:sr,defaultActiveFirstOption:zs,onSelect:ns,menuItemSelectedIcon:Ri,rawValues:Zr,fieldNames:ye,virtual:Ar,direction:re,listHeight:ne,listItemHeight:Fe,childrenAsData:be,maxCount:Zn,optionRender:Si})},[Zn,cn,fr,sr,zs,ns,Ri,Zr,ye,qi,Gi,re,ne,Fe,be,Si]);return zt.createElement(In.Provider,{value:di},zt.createElement(pi,(0,St.Z)({},ci,{id:ke,prefixCls:ei,ref:De,omitDomProps:dr,mode:On,displayValues:yr,onDisplayValuesChange:js,direction:re,searchValue:Wn,onSearch:us,autoClearSearchValue:mi,onSearchSplit:ys,dropdownMatchSelectWidth:Gi,OptionList:no,emptyOptions:!fr.length,activeValue:eo,activeDescendantId:"".concat(ke,"_list_").concat(Zs)})))}),Di=Mn;Di.Option=Xi,Di.OptGroup=Fi;var pr=Di,Vn=pr},63158:function(mn,je,Ut){"use strict";var St=Ut(14809),Xt=Ut(4635),Ae=Ut(50298),xe=Ut(62646),fe=Ut(59301),Rt=Ut(92310),ie=Ut.n(Rt),ae=Ut(18929),de=Ut(10228),zt=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Ie=fe.forwardRef(function(Yt,Me){var It,nt=Yt.prefixCls,et=nt===void 0?"rc-switch":nt,At=Yt.className,at=Yt.checked,dt=Yt.defaultChecked,gt=Yt.disabled,xt=Yt.loadingIcon,kt=Yt.checkedChildren,Ht=Yt.unCheckedChildren,Ot=Yt.onClick,Zt=Yt.onChange,Wt=Yt.onKeyDown,te=(0,xe.Z)(Yt,zt),we=(0,ae.Z)(!1,{value:at,defaultValue:dt}),pe=(0,Ae.Z)(we,2),Ke=pe[0],_e=pe[1];function en(Kn,me){var ee=Ke;return gt||(ee=Kn,_e(ee),Zt==null||Zt(ee,me)),ee}function dn(Kn){Kn.which===de.Z.LEFT?en(!1,Kn):Kn.which===de.Z.RIGHT&&en(!0,Kn),Wt==null||Wt(Kn)}function yn(Kn){var me=en(!Ke,Kn);Ot==null||Ot(me,Kn)}var Nn=ie()(et,At,(It={},(0,Xt.Z)(It,"".concat(et,"-checked"),Ke),(0,Xt.Z)(It,"".concat(et,"-disabled"),gt),It));return fe.createElement("button",(0,St.Z)({},te,{type:"button",role:"switch","aria-checked":Ke,disabled:gt,className:Nn,ref:Me,onKeyDown:dn,onClick:yn}),xt,fe.createElement("span",{className:"".concat(et,"-inner")},fe.createElement("span",{className:"".concat(et,"-inner-checked")},kt),fe.createElement("span",{className:"".concat(et,"-inner-unchecked")},Ht)))});Ie.displayName="Switch",je.Z=Ie},86351:function(mn,je,Ut){"use strict";Ut.d(je,{R:function(){return Xt},w:function(){return St}});var St={},Xt="rc-table-internal-hook"},97347:function(mn,je,Ut){"use strict";Ut.d(je,{L:function(){return et},Z:function(){return xt}});var St=Ut(50298),Xt=Ut(4635),Ae=Ut(95190),xe=Ut(93664),fe=Ut(20439),Rt=Ut(62646),ie=Ut(11592),ae=Ut(48736),de=Ut(59301),zt=Ut(86351),Ie=Ut(54451);function Yt(kt){var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof Ht=="number"?Ht:Ht.endsWith("%")?kt*parseFloat(Ht)/100:null}function Me(kt,Ht,Ot){return de.useMemo(function(){if(Ht&&Ht>0){var Zt=0,Wt=0;kt.forEach(function(yn){var Nn=Yt(Ht,yn.width);Nn?Zt+=Nn:Wt+=1});var te=Math.max(Ht,Ot),we=Math.max(te-Zt,Wt),pe=Wt,Ke=we/Wt,_e=0,en=kt.map(function(yn){var Nn=(0,fe.Z)({},yn),Kn=Yt(Ht,Nn.width);if(Kn)Nn.width=Kn;else{var me=Math.floor(Ke);Nn.width=pe===1?we:me,we-=me,pe-=1}return _e+=Nn.width,Nn});if(_e<te){var dn=te/_e;we=te,en.forEach(function(yn,Nn){var Kn=Math.floor(yn.width*dn);yn.width=Nn===en.length-1?we:Kn,we-=Kn})}return[en,Math.max(_e,te)]}return[kt,Ht]},[kt,Ht,Ot])}var It=["children"],nt=["fixed"];function et(kt){return(0,ie.Z)(kt).filter(function(Ht){return de.isValidElement(Ht)}).map(function(Ht){var Ot=Ht.key,Zt=Ht.props,Wt=Zt.children,te=(0,Rt.Z)(Zt,It),we=(0,fe.Z)({key:Ot},te);return Wt&&(we.children=et(Wt)),we})}function At(kt){return kt.filter(function(Ht){return Ht&&(0,xe.Z)(Ht)==="object"&&!Ht.hidden}).map(function(Ht){var Ot=Ht.children;return Ot&&Ot.length>0?(0,fe.Z)((0,fe.Z)({},Ht),{},{children:At(Ot)}):Ht})}function at(kt){var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return kt.filter(function(Ot){return Ot&&(0,xe.Z)(Ot)==="object"}).reduce(function(Ot,Zt,Wt){var te=Zt.fixed,we=te===!0?"left":te,pe="".concat(Ht,"-").concat(Wt),Ke=Zt.children;return Ke&&Ke.length>0?[].concat((0,Ae.Z)(Ot),(0,Ae.Z)(at(Ke,pe).map(function(_e){return(0,fe.Z)({fixed:we},_e)}))):[].concat((0,Ae.Z)(Ot),[(0,fe.Z)((0,fe.Z)({key:pe},Zt),{},{fixed:we})])},[])}function dt(kt){return kt.map(function(Ht){var Ot=Ht.fixed,Zt=(0,Rt.Z)(Ht,nt),Wt=Ot;return Ot==="left"?Wt="right":Ot==="right"&&(Wt="left"),(0,fe.Z)({fixed:Wt},Zt)})}function gt(kt,Ht){var Ot=kt.prefixCls,Zt=kt.columns,Wt=kt.children,te=kt.expandable,we=kt.expandedKeys,pe=kt.columnTitle,Ke=kt.getRowKey,_e=kt.onTriggerExpand,en=kt.expandIcon,dn=kt.rowExpandable,yn=kt.expandIconColumnIndex,Nn=kt.direction,Kn=kt.expandRowByClick,me=kt.columnWidth,ee=kt.fixed,gn=kt.scrollWidth,$n=kt.clientWidth,Yn=de.useMemo(function(){var jn=Zt||et(Wt)||[];return At(jn.slice())},[Zt,Wt]),nn=de.useMemo(function(){if(te){var jn=Yn.slice();if(!jn.includes(zt.w)){var Gt=yn||0;Gt>=0&&(Gt||ee==="left"||!ee)&&jn.splice(Gt,0,zt.w),ee==="right"&&jn.splice(Yn.length,0,zt.w)}var Ft=jn.indexOf(zt.w);jn=jn.filter(function(Ct,_t){return Ct!==zt.w||_t===Ft});var mt=Yn[Ft],vt;ee?vt=ee:vt=mt?mt.fixed:null;var Lt=(0,Xt.Z)((0,Xt.Z)((0,Xt.Z)((0,Xt.Z)((0,Xt.Z)((0,Xt.Z)({},Ie.v,{className:"".concat(Ot,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",pe),"fixed",vt),"className","".concat(Ot,"-row-expand-icon-cell")),"width",me),"render",function(_t,Pe,ze){var wn=Ke(Pe,ze),Ge=we.has(wn),Te=dn?dn(Pe):!0,Ze=en({prefixCls:Ot,expanded:Ge,expandable:Te,record:Pe,onExpand:_e});return Kn?de.createElement("span",{onClick:function(In){return In.stopPropagation()}},Ze):Ze});return jn.map(function(Ct){return Ct===zt.w?Lt:Ct})}return Yn.filter(function(Ct){return Ct!==zt.w})},[te,Yn,Ke,we,en,Nn]),Tn=de.useMemo(function(){var jn=nn;return Ht&&(jn=Ht(jn)),jn.length||(jn=[{render:function(){return null}}]),jn},[Ht,nn,Nn]),Gn=de.useMemo(function(){return Nn==="rtl"?dt(at(Tn)):at(Tn)},[Tn,Nn,gn]),yi=de.useMemo(function(){for(var jn=-1,Gt=Gn.length-1;Gt>=0;Gt-=1){var Ft=Gn[Gt].fixed;if(Ft==="left"||Ft===!0){jn=Gt;break}}if(jn>=0)for(var mt=0;mt<=jn;mt+=1){var vt=Gn[mt].fixed;if(vt!=="left"&&vt!==!0)return!0}var Lt=Gn.findIndex(function(Pe){var ze=Pe.fixed;return ze==="right"});if(Lt>=0)for(var Ct=Lt;Ct<Gn.length;Ct+=1){var _t=Gn[Ct].fixed;if(_t!=="right")return!0}return!1},[Gn]),Je=Me(Gn,gn,$n),Le=(0,St.Z)(Je,2),tn=Le[0],ti=Le[1];return[Tn,tn,ti,yi]}var xt=gt},4030:function(mn,je,Ut){"use strict";Ut.d(je,{w2:function(){return St.w},vP:function(){return Wi.v},RQ:function(){return St.R},ER:function(){return wn},Q$:function(){return er},TN:function(){return hi}});var St=Ut(86351),Xt=Ut(50298),Ae=Ut(6089),xe=Ut(34280),fe=Ut(13697),Rt=Ut(59301),ie=Ut(4676);function ae(ke){var An=Rt.createContext(void 0),be=function(ye){var _n=ye.value,li=ye.children,Wn=Rt.useRef(_n);Wn.current=_n;var Hn=Rt.useState(function(){return{getValue:function(){return Wn.current},listeners:new Set}}),cn=(0,Xt.Z)(Hn,1),kn=cn[0];return(0,xe.Z)(function(){(0,ie.unstable_batchedUpdates)(function(){kn.listeners.forEach(function(Ln){Ln(_n)})})},[_n]),Rt.createElement(An.Provider,{value:kn},li)};return{Context:An,Provider:be,defaultValue:ke}}function de(ke,An){var be=(0,Ae.Z)(typeof An=="function"?An:function(Ln){if(An===void 0)return Ln;if(!Array.isArray(An))return Ln[An];var Qe={};return An.forEach(function(sn){Qe[sn]=Ln[sn]}),Qe}),Qt=Rt.useContext(ke==null?void 0:ke.Context),ye=Qt||{},_n=ye.listeners,li=ye.getValue,Wn=Rt.useRef();Wn.current=be(Qt?li():ke==null?void 0:ke.defaultValue);var Hn=Rt.useState({}),cn=(0,Xt.Z)(Hn,2),kn=cn[1];return(0,xe.Z)(function(){if(!Qt)return;function Ln(Qe){var sn=be(Qe);(0,fe.Z)(Wn.current,sn,!0)||kn({})}return _n.add(Ln),function(){_n.delete(Ln)}},[Qt]),Wn.current}var zt=Ut(14809),Ie=Ut(8654);function Yt(){var ke=Rt.createContext(null);function An(){return Rt.useContext(ke)}function be(ye,_n){var li=(0,Ie.Yr)(ye),Wn=function(cn,kn){var Ln=li?{ref:kn}:{},Qe=Rt.useRef(0),sn=Rt.useRef(cn),vn=An();return vn!==null?Rt.createElement(ye,(0,zt.Z)({},cn,Ln)):((!_n||_n(sn.current,cn))&&(Qe.current+=1),sn.current=cn,Rt.createElement(ke.Provider,{value:Qe.current},Rt.createElement(ye,(0,zt.Z)({},cn,Ln))))};return li?Rt.forwardRef(Wn):Wn}function Qt(ye,_n){var li=(0,Ie.Yr)(ye),Wn=function(cn,kn){var Ln=li?{ref:kn}:{};return An(),Rt.createElement(ye,(0,zt.Z)({},cn,Ln))};return li?Rt.memo(Rt.forwardRef(Wn),_n):Rt.memo(Wn,_n)}return{makeImmutable:be,responseImmutable:Qt,useImmutableMark:An}}var Me=Yt(),It=Me.makeImmutable,nt=Me.responseImmutable,et=Me.useImmutableMark,At=Yt(),at=At.makeImmutable,dt=At.responseImmutable,gt=At.useImmutableMark,xt=ae(),kt=xt;function Ht(ke,An){var be=React.useRef(0);be.current+=1;var Qt=React.useRef(ke),ye=[];Object.keys(ke||{}).map(function(li){var Wn;(ke==null?void 0:ke[li])!==((Wn=Qt.current)===null||Wn===void 0?void 0:Wn[li])&&ye.push(li)}),Qt.current=ke;var _n=React.useRef([]);return ye.length&&(_n.current=ye),React.useDebugValue(be.current),React.useDebugValue(_n.current.join(", ")),An&&console.log("".concat(An,":"),be.current,_n.current),be.current}var Ot=null,Zt=null,Wt=Ut(93664),te=Ut(20439),we=Ut(4635),pe=Ut(92310),Ke=Ut.n(pe),_e=Ut(80547),en=Ut(97938),dn=Ut(48736),yn=Rt.createContext({renderWithProps:!1}),Nn=yn,Kn="RC_TABLE_KEY";function me(ke){return ke==null?[]:Array.isArray(ke)?ke:[ke]}function ee(ke){var An=[],be={};return ke.forEach(function(Qt){for(var ye=Qt||{},_n=ye.key,li=ye.dataIndex,Wn=_n||me(li).join("-")||Kn;be[Wn];)Wn="".concat(Wn,"_next");be[Wn]=!0,An.push(Wn)}),An}function gn(ke){return ke!=null}function $n(ke){return typeof ke=="number"&&!Number.isNaN(ke)}function Yn(ke){return ke&&(0,Wt.Z)(ke)==="object"&&!Array.isArray(ke)&&!Rt.isValidElement(ke)}function nn(ke,An,be,Qt,ye,_n){var li=Rt.useContext(Nn),Wn=gt(),Hn=(0,_e.Z)(function(){if(gn(Qt))return[Qt];var cn=An==null||An===""?[]:Array.isArray(An)?An:[An],kn=(0,en.Z)(ke,cn),Ln=kn,Qe=void 0;if(ye){var sn=ye(kn,ke,be);Yn(sn)?(Ln=sn.children,Qe=sn.props,li.renderWithProps=!0):Ln=sn}return[Ln,Qe]},[Wn,ke,Qt,An,ye,be],function(cn,kn){if(_n){var Ln=(0,Xt.Z)(cn,2),Qe=Ln[1],sn=(0,Xt.Z)(kn,2),vn=sn[1];return _n(vn,Qe)}return li.renderWithProps?!0:!(0,fe.Z)(cn,kn,!0)});return Hn}function Tn(ke,An,be,Qt){var ye=ke+An-1;return ke<=Qt&&ye>=be}function Gn(ke,An){return de(kt,function(be){var Qt=Tn(ke,An||1,be.hoverStartRow,be.hoverEndRow);return[Qt,be.onHover]})}var yi=Ut(70425),Je=function(An){var be=An.ellipsis,Qt=An.rowType,ye=An.children,_n,li=be===!0?{showTitle:!0}:be;return li&&(li.showTitle||Qt==="header")&&(typeof ye=="string"||typeof ye=="number"?_n=ye.toString():Rt.isValidElement(ye)&&typeof ye.props.children=="string"&&(_n=ye.props.children)),_n};function Le(ke){var An,be,Qt,ye,_n,li,Wn,Hn,cn=ke.component,kn=ke.children,Ln=ke.ellipsis,Qe=ke.scope,sn=ke.prefixCls,vn=ke.className,Cn=ke.align,zn=ke.record,on=ke.render,Ei=ke.dataIndex,Ii=ke.renderIndex,nr=ke.shouldCellUpdate,Ni=ke.index,Mr=ke.rowType,yr=ke.colSpan,Zr=ke.rowSpan,Dr=ke.fixLeft,Gr=ke.fixRight,$r=ke.firstFixLeft,Ue=ke.lastFixLeft,Fr=ke.firstFixRight,Er=ke.lastFixRight,fr=ke.appendNode,$i=ke.additionalProps,Rr=$i===void 0?{}:$i,ro=ke.isSticky,eo="".concat(sn,"-cell"),kr=de(kt,["supportSticky","allColumnsFixedLeft","rowHoverable"]),Ao=kr.supportSticky,$o=kr.allColumnsFixedLeft,Zs=kr.rowHoverable,ka=nn(zn,Ei,Ii,kn,on,nr),zs=(0,Xt.Z)(ka,2),sr=zs[0],os=zs[1],ns={},js=typeof Dr=="number"&&Ao,us=typeof Gr=="number"&&Ao;js&&(ns.position="sticky",ns.left=Dr),us&&(ns.position="sticky",ns.right=Gr);var ys=(An=(be=(Qt=os==null?void 0:os.colSpan)!==null&&Qt!==void 0?Qt:Rr.colSpan)!==null&&be!==void 0?be:yr)!==null&&An!==void 0?An:1,di=(ye=(_n=(li=os==null?void 0:os.rowSpan)!==null&&li!==void 0?li:Rr.rowSpan)!==null&&_n!==void 0?_n:Zr)!==null&&ye!==void 0?ye:1,Ar=Gn(Ni,di),br=(0,Xt.Z)(Ar,2),Xr=br[0],io=br[1],yo=(0,yi.zX)(function(is){var Lo;zn&&io(Ni,Ni+di-1),Rr==null||(Lo=Rr.onMouseEnter)===null||Lo===void 0||Lo.call(Rr,is)}),rr=(0,yi.zX)(function(is){var Lo;zn&&io(-1,-1),Rr==null||(Lo=Rr.onMouseLeave)===null||Lo===void 0||Lo.call(Rr,is)});if(ys===0||di===0)return null;var Bo=(Wn=Rr.title)!==null&&Wn!==void 0?Wn:Je({rowType:Mr,ellipsis:Ln,children:sr}),Qi=Ke()(eo,vn,(Hn={},(0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)(Hn,"".concat(eo,"-fix-left"),js&&Ao),"".concat(eo,"-fix-left-first"),$r&&Ao),"".concat(eo,"-fix-left-last"),Ue&&Ao),"".concat(eo,"-fix-left-all"),Ue&&$o&&Ao),"".concat(eo,"-fix-right"),us&&Ao),"".concat(eo,"-fix-right-first"),Fr&&Ao),"".concat(eo,"-fix-right-last"),Er&&Ao),"".concat(eo,"-ellipsis"),Ln),"".concat(eo,"-with-append"),fr),"".concat(eo,"-fix-sticky"),(js||us)&&ro&&Ao),(0,we.Z)(Hn,"".concat(eo,"-row-hover"),!os&&Xr)),Rr.className,os==null?void 0:os.className),Tr={};Cn&&(Tr.textAlign=Cn);var gr=(0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)({},os==null?void 0:os.style),ns),Tr),Rr.style),Wo=sr;return(0,Wt.Z)(Wo)==="object"&&!Array.isArray(Wo)&&!Rt.isValidElement(Wo)&&(Wo=null),Ln&&(Ue||Fr)&&(Wo=Rt.createElement("span",{className:"".concat(eo,"-content")},Wo)),Rt.createElement(cn,(0,zt.Z)({},os,Rr,{className:Qi,style:gr,title:Bo,scope:Qe,onMouseEnter:Zs?yo:void 0,onMouseLeave:Zs?rr:void 0,colSpan:ys!==1?ys:null,rowSpan:di!==1?di:null}),fr,Wo)}var tn=Rt.memo(Le);function ti(ke,An,be,Qt,ye){var _n=be[ke]||{},li=be[An]||{},Wn,Hn;_n.fixed==="left"?Wn=Qt.left[ye==="rtl"?An:ke]:li.fixed==="right"&&(Hn=Qt.right[ye==="rtl"?ke:An]);var cn=!1,kn=!1,Ln=!1,Qe=!1,sn=be[An+1],vn=be[ke-1],Cn=sn&&!sn.fixed||vn&&!vn.fixed||be.every(function(nr){return nr.fixed==="left"});if(ye==="rtl"){if(Wn!==void 0){var zn=vn&&vn.fixed==="left";Qe=!zn&&Cn}else if(Hn!==void 0){var on=sn&&sn.fixed==="right";Ln=!on&&Cn}}else if(Wn!==void 0){var Ei=sn&&sn.fixed==="left";cn=!Ei&&Cn}else if(Hn!==void 0){var Ii=vn&&vn.fixed==="right";kn=!Ii&&Cn}return{fixLeft:Wn,fixRight:Hn,lastFixLeft:cn,firstFixRight:kn,lastFixRight:Ln,firstFixLeft:Qe,isSticky:Qt.isSticky}}var jn=Rt.createContext({}),Gt=jn;function Ft(ke){var An=ke.className,be=ke.index,Qt=ke.children,ye=ke.colSpan,_n=ye===void 0?1:ye,li=ke.rowSpan,Wn=ke.align,Hn=de(kt,["prefixCls","direction"]),cn=Hn.prefixCls,kn=Hn.direction,Ln=Rt.useContext(Gt),Qe=Ln.scrollColumnIndex,sn=Ln.stickyOffsets,vn=Ln.flattenColumns,Cn=be+_n-1,zn=Cn+1===Qe?_n+1:_n,on=ti(be,be+zn-1,vn,sn,kn);return Rt.createElement(tn,(0,zt.Z)({className:An,index:be,component:"td",prefixCls:cn,record:null,dataIndex:null,align:Wn,colSpan:zn,rowSpan:li,render:function(){return Qt}},on))}var mt=Ut(62646),vt=["children"];function Lt(ke){var An=ke.children,be=(0,mt.Z)(ke,vt);return Rt.createElement("tr",be,An)}function Ct(ke){var An=ke.children;return An}Ct.Row=Lt,Ct.Cell=Ft;var _t=Ct;function Pe(ke){var An=ke.children,be=ke.stickyOffsets,Qt=ke.flattenColumns,ye=de(kt,"prefixCls"),_n=Qt.length-1,li=Qt[_n],Wn=Rt.useMemo(function(){return{stickyOffsets:be,flattenColumns:Qt,scrollColumnIndex:li!=null&&li.scrollbar?_n:null}},[li,Qt,_n,be]);return Rt.createElement(Gt.Provider,{value:Wn},Rt.createElement("tfoot",{className:"".concat(ye,"-summary")},An))}var ze=dt(Pe),wn=_t,Ge=Ut(29301),Te=Ut(24514),Ze=Ut(75152),hn=Ut(26112);function In(ke,An,be,Qt,ye,_n,li){ke.push({record:An,indent:be,index:li});var Wn=_n(An),Hn=ye==null?void 0:ye.has(Wn);if(An&&Array.isArray(An[Qt])&&Hn)for(var cn=0;cn<An[Qt].length;cn+=1)In(ke,An[Qt][cn],be+1,Qt,ye,_n,cn)}function si(ke,An,be,Qt){var ye=Rt.useMemo(function(){if(be!=null&&be.size){for(var _n=[],li=0;li<(ke==null?void 0:ke.length);li+=1){var Wn=ke[li];In(_n,Wn,0,An,be,Qt,li)}return _n}return ke==null?void 0:ke.map(function(Hn,cn){return{record:Hn,indent:0,index:cn}})},[ke,An,be,Qt]);return ye}function Dn(ke,An,be,Qt){var ye=de(kt,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),_n=ye.flattenColumns,li=ye.expandableType,Wn=ye.expandedKeys,Hn=ye.childrenColumnName,cn=ye.onTriggerExpand,kn=ye.rowExpandable,Ln=ye.onRow,Qe=ye.expandRowByClick,sn=ye.rowClassName,vn=li==="nest",Cn=li==="row"&&(!kn||kn(ke)),zn=Cn||vn,on=Wn&&Wn.has(An),Ei=Hn&&ke&&ke[Hn],Ii=(0,yi.zX)(cn),nr=Ln==null?void 0:Ln(ke,be),Ni=nr==null?void 0:nr.onClick,Mr=function(Gr){Qe&&zn&&cn(ke,Gr);for(var $r=arguments.length,Ue=new Array($r>1?$r-1:0),Fr=1;Fr<$r;Fr++)Ue[Fr-1]=arguments[Fr];Ni==null||Ni.apply(void 0,[Gr].concat(Ue))},yr;typeof sn=="string"?yr=sn:typeof sn=="function"&&(yr=sn(ke,be,Qt));var Zr=ee(_n);return(0,te.Z)((0,te.Z)({},ye),{},{columnsKey:Zr,nestExpandable:vn,expanded:on,hasNestChildren:Ei,record:ke,onTriggerExpand:Ii,rowSupportExpand:Cn,expandable:zn,rowProps:(0,te.Z)((0,te.Z)({},nr),{},{className:Ke()(yr,nr==null?void 0:nr.className),onClick:Mr})})}function Oi(ke){var An=ke.prefixCls,be=ke.children,Qt=ke.component,ye=ke.cellComponent,_n=ke.className,li=ke.expanded,Wn=ke.colSpan,Hn=ke.isEmpty,cn=de(kt,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),kn=cn.scrollbarSize,Ln=cn.fixHeader,Qe=cn.fixColumn,sn=cn.componentWidth,vn=cn.horizonScroll,Cn=be;return(Hn?vn&&sn:Qe)&&(Cn=Rt.createElement("div",{style:{width:sn-(Ln&&!Hn?kn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(An,"-expanded-row-fixed")},Cn)),Rt.createElement(Qt,{className:_n,style:{display:li?null:"none"}},Rt.createElement(tn,{component:ye,prefixCls:An,colSpan:Wn},Cn))}var ai=Oi;function Ai(ke){var An=ke.prefixCls,be=ke.record,Qt=ke.onExpand,ye=ke.expanded,_n=ke.expandable,li="".concat(An,"-row-expand-icon");if(!_n)return Rt.createElement("span",{className:Ke()(li,"".concat(An,"-row-spaced"))});var Wn=function(cn){Qt(be,cn),cn.stopPropagation()};return Rt.createElement("span",{className:Ke()(li,(0,we.Z)((0,we.Z)({},"".concat(An,"-row-expanded"),ye),"".concat(An,"-row-collapsed"),!ye)),onClick:Wn})}function pi(ke,An,be){var Qt=[];function ye(_n){(_n||[]).forEach(function(li,Wn){Qt.push(An(li,Wn)),ye(li[be])})}return ye(ke),Qt}function ur(ke,An,be,Qt){return typeof ke=="string"?ke:typeof ke=="function"?ke(An,be,Qt):""}function Fi(ke,An,be,Qt,ye){var _n=ke.record,li=ke.prefixCls,Wn=ke.columnsKey,Hn=ke.fixedInfoList,cn=ke.expandIconColumnIndex,kn=ke.nestExpandable,Ln=ke.indentSize,Qe=ke.expandIcon,sn=ke.expanded,vn=ke.hasNestChildren,Cn=ke.onTriggerExpand,zn=Wn[be],on=Hn[be],Ei;be===(cn||0)&&kn&&(Ei=Rt.createElement(Rt.Fragment,null,Rt.createElement("span",{style:{paddingLeft:"".concat(Ln*Qt,"px")},className:"".concat(li,"-row-indent indent-level-").concat(Qt)}),Qe({prefixCls:li,expanded:sn,expandable:vn,record:_n,onExpand:Cn})));var Ii;return An.onCell&&(Ii=An.onCell(_n,ye)),{key:zn,fixedInfo:on,appendCellNode:Ei,additionalCellProps:Ii||{}}}function zi(ke){var An=ke.className,be=ke.style,Qt=ke.record,ye=ke.index,_n=ke.renderIndex,li=ke.rowKey,Wn=ke.indent,Hn=Wn===void 0?0:Wn,cn=ke.rowComponent,kn=ke.cellComponent,Ln=ke.scopeCellComponent,Qe=Dn(Qt,li,ye,Hn),sn=Qe.prefixCls,vn=Qe.flattenColumns,Cn=Qe.expandedRowClassName,zn=Qe.expandedRowRender,on=Qe.rowProps,Ei=Qe.expanded,Ii=Qe.rowSupportExpand,nr=Rt.useRef(!1);nr.current||(nr.current=Ei);var Ni=ur(Cn,Qt,ye,Hn),Mr=Rt.createElement(cn,(0,zt.Z)({},on,{"data-row-key":li,className:Ke()(An,"".concat(sn,"-row"),"".concat(sn,"-row-level-").concat(Hn),on==null?void 0:on.className,(0,we.Z)({},Ni,Hn>=1)),style:(0,te.Z)((0,te.Z)({},be),on==null?void 0:on.style)}),vn.map(function(Dr,Gr){var $r=Dr.render,Ue=Dr.dataIndex,Fr=Dr.className,Er=Fi(Qe,Dr,Gr,Hn,ye),fr=Er.key,$i=Er.fixedInfo,Rr=Er.appendCellNode,ro=Er.additionalCellProps;return Rt.createElement(tn,(0,zt.Z)({className:Fr,ellipsis:Dr.ellipsis,align:Dr.align,scope:Dr.rowScope,component:Dr.rowScope?Ln:kn,prefixCls:sn,key:fr,record:Qt,index:ye,renderIndex:_n,dataIndex:Ue,render:$r,shouldCellUpdate:Dr.shouldCellUpdate},$i,{appendNode:Rr,additionalProps:ro}))})),yr;if(Ii&&(nr.current||Ei)){var Zr=zn(Qt,ye,Hn+1,Ei);yr=Rt.createElement(ai,{expanded:Ei,className:Ke()("".concat(sn,"-expanded-row"),"".concat(sn,"-expanded-row-level-").concat(Hn+1),Ni),prefixCls:sn,component:cn,cellComponent:kn,colSpan:vn.length,isEmpty:!1},Zr)}return Rt.createElement(Rt.Fragment,null,Mr,yr)}var Xi=dt(zi);function Lr(ke){var An=ke.columnKey,be=ke.onColumnResize,Qt=Rt.useRef();return(0,xe.Z)(function(){Qt.current&&be(An,Qt.current.offsetWidth)},[]),Rt.createElement(Ge.Z,{data:An},Rt.createElement("td",{ref:Qt,style:{padding:0,border:0,height:0}},Rt.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}var wi=Ut(29194);function Nr(ke){var An=ke.prefixCls,be=ke.columnsKey,Qt=ke.onColumnResize,ye=Rt.useRef(null);return Rt.createElement("tr",{"aria-hidden":"true",className:"".concat(An,"-measure-row"),style:{height:0,fontSize:0},ref:ye},Rt.createElement(Ge.Z.Collection,{onBatchResize:function(li){(0,wi.Z)(ye.current)&&li.forEach(function(Wn){var Hn=Wn.data,cn=Wn.size;Qt(Hn,cn.offsetWidth)})}},be.map(function(_n){return Rt.createElement(Lr,{key:_n,columnKey:_n,onColumnResize:Qt})})))}function Br(ke){var An=ke.data,be=ke.measureColumnWidth,Qt=de(kt,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),ye=Qt.prefixCls,_n=Qt.getComponent,li=Qt.onColumnResize,Wn=Qt.flattenColumns,Hn=Qt.getRowKey,cn=Qt.expandedKeys,kn=Qt.childrenColumnName,Ln=Qt.emptyNode,Qe=si(An,kn,cn,Hn),sn=Rt.useRef({renderWithProps:!1}),vn=_n(["body","wrapper"],"tbody"),Cn=_n(["body","row"],"tr"),zn=_n(["body","cell"],"td"),on=_n(["body","cell"],"th"),Ei;An.length?Ei=Qe.map(function(nr,Ni){var Mr=nr.record,yr=nr.indent,Zr=nr.index,Dr=Hn(Mr,Ni);return Rt.createElement(Xi,{key:Dr,rowKey:Dr,record:Mr,index:Ni,renderIndex:Zr,rowComponent:Cn,cellComponent:zn,scopeCellComponent:on,indent:yr})}):Ei=Rt.createElement(ai,{expanded:!0,className:"".concat(ye,"-placeholder"),prefixCls:ye,component:Cn,cellComponent:zn,colSpan:Wn.length,isEmpty:!0},Ln);var Ii=ee(Wn);return Rt.createElement(Nn.Provider,{value:sn.current},Rt.createElement(vn,{className:"".concat(ye,"-tbody")},be&&Rt.createElement(Nr,{prefixCls:ye,columnsKey:Ii,onColumnResize:li}),Ei))}var jr=dt(Br),Wi=Ut(54451),po=["columnType"];function mo(ke){for(var An=ke.colWidths,be=ke.columns,Qt=ke.columCount,ye=de(kt,["tableLayout"]),_n=ye.tableLayout,li=[],Wn=Qt||be.length,Hn=!1,cn=Wn-1;cn>=0;cn-=1){var kn=An[cn],Ln=be&&be[cn],Qe=void 0,sn=void 0;if(Ln&&(Qe=Ln[Wi.v],_n==="auto"&&(sn=Ln.minWidth)),kn||sn||Qe||Hn){var vn=Qe||{},Cn=vn.columnType,zn=(0,mt.Z)(vn,po);li.unshift(Rt.createElement("col",(0,zt.Z)({key:cn,style:{width:kn,minWidth:sn}},zn))),Hn=!0}}return Rt.createElement("colgroup",null,li)}var no=mo,ir=Ut(95190),so=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Tt(ke,An){return(0,Rt.useMemo)(function(){for(var be=[],Qt=0;Qt<An;Qt+=1){var ye=ke[Qt];if(ye!==void 0)be[Qt]=ye;else return null}return be},[ke.join("_"),An])}var Pr=Rt.forwardRef(function(ke,An){var be=ke.className,Qt=ke.noData,ye=ke.columns,_n=ke.flattenColumns,li=ke.colWidths,Wn=ke.columCount,Hn=ke.stickyOffsets,cn=ke.direction,kn=ke.fixHeader,Ln=ke.stickyTopOffset,Qe=ke.stickyBottomOffset,sn=ke.stickyClassName,vn=ke.onScroll,Cn=ke.maxContentScroll,zn=ke.children,on=(0,mt.Z)(ke,so),Ei=de(kt,["prefixCls","scrollbarSize","isSticky","getComponent"]),Ii=Ei.prefixCls,nr=Ei.scrollbarSize,Ni=Ei.isSticky,Mr=Ei.getComponent,yr=Mr(["header","table"],"table"),Zr=Ni&&!kn?0:nr,Dr=Rt.useRef(null),Gr=Rt.useCallback(function(ro){(0,Ie.mH)(An,ro),(0,Ie.mH)(Dr,ro)},[]);Rt.useEffect(function(){var ro;function eo(kr){var Ao=kr,$o=Ao.currentTarget,Zs=Ao.deltaX;Zs&&(vn({currentTarget:$o,scrollLeft:$o.scrollLeft+Zs}),kr.preventDefault())}return(ro=Dr.current)===null||ro===void 0||ro.addEventListener("wheel",eo,{passive:!1}),function(){var kr;(kr=Dr.current)===null||kr===void 0||kr.removeEventListener("wheel",eo)}},[]);var $r=Rt.useMemo(function(){return _n.every(function(ro){return ro.width})},[_n]),Ue=_n[_n.length-1],Fr={fixed:Ue?Ue.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Ii,"-cell-scrollbar")}}},Er=(0,Rt.useMemo)(function(){return Zr?[].concat((0,ir.Z)(ye),[Fr]):ye},[Zr,ye]),fr=(0,Rt.useMemo)(function(){return Zr?[].concat((0,ir.Z)(_n),[Fr]):_n},[Zr,_n]),$i=(0,Rt.useMemo)(function(){var ro=Hn.right,eo=Hn.left;return(0,te.Z)((0,te.Z)({},Hn),{},{left:cn==="rtl"?[].concat((0,ir.Z)(eo.map(function(kr){return kr+Zr})),[0]):eo,right:cn==="rtl"?ro:[].concat((0,ir.Z)(ro.map(function(kr){return kr+Zr})),[0]),isSticky:Ni})},[Zr,Hn,Ni]),Rr=Tt(li,Wn);return Rt.createElement("div",{style:(0,te.Z)({overflow:"hidden"},Ni?{top:Ln,bottom:Qe}:{}),ref:Gr,className:Ke()(be,(0,we.Z)({},sn,!!sn))},Rt.createElement(yr,{style:{tableLayout:"fixed",visibility:Qt||Rr?null:"hidden"}},(!Qt||!Cn||$r)&&Rt.createElement(no,{colWidths:Rr?[].concat((0,ir.Z)(Rr),[Zr]):[],columCount:Wn+1,columns:fr}),zn((0,te.Z)((0,te.Z)({},on),{},{stickyOffsets:$i,columns:Er,flattenColumns:fr}))))}),Zi=Rt.memo(Pr),xi=function(An){var be=An.cells,Qt=An.stickyOffsets,ye=An.flattenColumns,_n=An.rowComponent,li=An.cellComponent,Wn=An.onHeaderRow,Hn=An.index,cn=de(kt,["prefixCls","direction"]),kn=cn.prefixCls,Ln=cn.direction,Qe;Wn&&(Qe=Wn(be.map(function(vn){return vn.column}),Hn));var sn=ee(be.map(function(vn){return vn.column}));return Rt.createElement(_n,Qe,be.map(function(vn,Cn){var zn=vn.column,on=ti(vn.colStart,vn.colEnd,ye,Qt,Ln),Ei;return zn&&zn.onHeaderCell&&(Ei=vn.column.onHeaderCell(zn)),Rt.createElement(tn,(0,zt.Z)({},vn,{scope:zn.title?vn.colSpan>1?"colgroup":"col":null,ellipsis:zn.ellipsis,align:zn.align,component:li,prefixCls:kn,key:sn[Cn]},on,{additionalProps:Ei,rowType:"header"}))}))},Hi=xi;function ji(ke){var An=[];function be(li,Wn){var Hn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;An[Hn]=An[Hn]||[];var cn=Wn,kn=li.filter(Boolean).map(function(Ln){var Qe={key:Ln.key,className:Ln.className||"",children:Ln.title,column:Ln,colStart:cn},sn=1,vn=Ln.children;return vn&&vn.length>0&&(sn=be(vn,cn,Hn+1).reduce(function(Cn,zn){return Cn+zn},0),Qe.hasSubColumns=!0),"colSpan"in Ln&&(sn=Ln.colSpan),"rowSpan"in Ln&&(Qe.rowSpan=Ln.rowSpan),Qe.colSpan=sn,Qe.colEnd=Qe.colStart+sn-1,An[Hn].push(Qe),cn+=sn,sn});return kn}be(ke,0);for(var Qt=An.length,ye=function(Wn){An[Wn].forEach(function(Hn){!("rowSpan"in Hn)&&!Hn.hasSubColumns&&(Hn.rowSpan=Qt-Wn)})},_n=0;_n<Qt;_n+=1)ye(_n);return An}var tr=function(An){var be=An.stickyOffsets,Qt=An.columns,ye=An.flattenColumns,_n=An.onHeaderRow,li=de(kt,["prefixCls","getComponent"]),Wn=li.prefixCls,Hn=li.getComponent,cn=Rt.useMemo(function(){return ji(Qt)},[Qt]),kn=Hn(["header","wrapper"],"thead"),Ln=Hn(["header","row"],"tr"),Qe=Hn(["header","cell"],"th");return Rt.createElement(kn,{className:"".concat(Wn,"-thead")},cn.map(function(sn,vn){var Cn=Rt.createElement(Hi,{key:vn,flattenColumns:ye,cells:sn,stickyOffsets:be,rowComponent:Ln,cellComponent:Qe,onHeaderRow:_n,index:vn});return Cn}))},qr=dt(tr),un=Ut(97347);function ln(ke,An,be){var Qt=(0,Wi.g)(ke),ye=Qt.expandIcon,_n=Qt.expandedRowKeys,li=Qt.defaultExpandedRowKeys,Wn=Qt.defaultExpandAllRows,Hn=Qt.expandedRowRender,cn=Qt.onExpand,kn=Qt.onExpandedRowsChange,Ln=Qt.childrenColumnName,Qe=ye||Ai,sn=Ln||"children",vn=Rt.useMemo(function(){return Hn?"row":ke.expandable&&ke.internalHooks===St.R&&ke.expandable.__PARENT_RENDER_ICON__||An.some(function(Ni){return Ni&&(0,Wt.Z)(Ni)==="object"&&Ni[sn]})?"nest":!1},[!!Hn,An]),Cn=Rt.useState(function(){return li||(Wn?pi(An,be,sn):[])}),zn=(0,Xt.Z)(Cn,2),on=zn[0],Ei=zn[1],Ii=Rt.useMemo(function(){return new Set(_n||on||[])},[_n,on]),nr=Rt.useCallback(function(Ni){var Mr=be(Ni,An.indexOf(Ni)),yr,Zr=Ii.has(Mr);Zr?(Ii.delete(Mr),yr=(0,ir.Z)(Ii)):yr=[].concat((0,ir.Z)(Ii),[Mr]),Ei(yr),cn&&cn(!Zr,Ni),kn&&kn(yr)},[be,Ii,An,cn,kn]);return[Qt,vn,Ii,Qe,sn,nr]}function We(ke,An,be){var Qt=ke.map(function(ye,_n){return ti(_n,_n,ke,An,be)});return(0,_e.Z)(function(){return Qt},[Qt],function(ye,_n){return!(0,fe.Z)(ye,_n)})}function Sn(ke){var An=(0,Rt.useRef)(ke),be=(0,Rt.useState)({}),Qt=(0,Xt.Z)(be,2),ye=Qt[1],_n=(0,Rt.useRef)(null),li=(0,Rt.useRef)([]);function Wn(Hn){li.current.push(Hn);var cn=Promise.resolve();_n.current=cn,cn.then(function(){if(_n.current===cn){var kn=li.current,Ln=An.current;li.current=[],kn.forEach(function(Qe){An.current=Qe(An.current)}),_n.current=null,Ln!==An.current&&ye({})}})}return(0,Rt.useEffect)(function(){return function(){_n.current=null}},[]),[An.current,Wn]}function Ki(ke){var An=(0,Rt.useRef)(ke||null),be=(0,Rt.useRef)();function Qt(){window.clearTimeout(be.current)}function ye(li){An.current=li,Qt(),be.current=window.setTimeout(function(){An.current=null,be.current=void 0},100)}function _n(){return An.current}return(0,Rt.useEffect)(function(){return Qt},[]),[ye,_n]}function Li(){var ke=Rt.useState(-1),An=(0,Xt.Z)(ke,2),be=An[0],Qt=An[1],ye=Rt.useState(-1),_n=(0,Xt.Z)(ye,2),li=_n[0],Wn=_n[1],Hn=Rt.useCallback(function(cn,kn){Qt(cn),Wn(kn)},[]);return[be,li,Hn]}var dr=Ut(47273),se=(0,dr.Z)()?window:null;function Mn(ke,An){var be=(0,Wt.Z)(ke)==="object"?ke:{},Qt=be.offsetHeader,ye=Qt===void 0?0:Qt,_n=be.offsetSummary,li=_n===void 0?0:_n,Wn=be.offsetScroll,Hn=Wn===void 0?0:Wn,cn=be.getContainer,kn=cn===void 0?function(){return se}:cn,Ln=kn()||se,Qe=!!ke;return Rt.useMemo(function(){return{isSticky:Qe,stickyClassName:Qe?"".concat(An,"-sticky-holder"):"",offsetHeader:ye,offsetSummary:li,offsetScroll:Hn,container:Ln}},[Qe,Hn,ye,li,An,Ln])}function Di(ke,An,be){var Qt=(0,Rt.useMemo)(function(){var ye=An.length,_n=function(cn,kn,Ln){for(var Qe=[],sn=0,vn=cn;vn!==kn;vn+=Ln)Qe.push(sn),An[vn].fixed&&(sn+=ke[vn]||0);return Qe},li=_n(0,ye,1),Wn=_n(ye-1,-1,-1).reverse();return be==="rtl"?{left:Wn,right:li}:{left:li,right:Wn}},[ke,An,be]);return Qt}var pr=Di;function Vn(ke){var An=ke.className,be=ke.children;return Rt.createElement("div",{className:An},be)}var le=Vn,De=Ut(8224),Xn=Ut(16089),On=Ut(76846);function qe(ke){var An=(0,On.bn)(ke),be=An.getBoundingClientRect(),Qt=document.documentElement;return{left:be.left+(window.pageXOffset||Qt.scrollLeft)-(Qt.clientLeft||document.body.clientLeft||0),top:be.top+(window.pageYOffset||Qt.scrollTop)-(Qt.clientTop||document.body.clientTop||0)}}var ei=function(An,be){var Qt,ye,_n=An.scrollBodyRef,li=An.onScroll,Wn=An.offsetScroll,Hn=An.container,cn=An.direction,kn=de(kt,"prefixCls"),Ln=((Qt=_n.current)===null||Qt===void 0?void 0:Qt.scrollWidth)||0,Qe=((ye=_n.current)===null||ye===void 0?void 0:ye.clientWidth)||0,sn=Ln&&Qe*(Qe/Ln),vn=Rt.useRef(),Cn=Sn({scrollLeft:0,isHiddenScrollBar:!0}),zn=(0,Xt.Z)(Cn,2),on=zn[0],Ei=zn[1],Ii=Rt.useRef({delta:0,x:0}),nr=Rt.useState(!1),Ni=(0,Xt.Z)(nr,2),Mr=Ni[0],yr=Ni[1],Zr=Rt.useRef(null);Rt.useEffect(function(){return function(){Xn.Z.cancel(Zr.current)}},[]);var Dr=function(){yr(!1)},Gr=function(fr){fr.persist(),Ii.current.delta=fr.pageX-on.scrollLeft,Ii.current.x=0,yr(!0),fr.preventDefault()},$r=function(fr){var $i,Rr=fr||(($i=window)===null||$i===void 0?void 0:$i.event),ro=Rr.buttons;if(!Mr||ro===0){Mr&&yr(!1);return}var eo=Ii.current.x+fr.pageX-Ii.current.x-Ii.current.delta,kr=cn==="rtl";eo=Math.max(kr?sn-Qe:0,Math.min(kr?0:Qe-sn,eo));var Ao=!kr||Math.abs(eo)+Math.abs(sn)<Qe;Ao&&(li({scrollLeft:eo/Qe*(Ln+2)}),Ii.current.x=fr.pageX)},Ue=function(){Xn.Z.cancel(Zr.current),Zr.current=(0,Xn.Z)(function(){if(_n.current){var fr=qe(_n.current).top,$i=fr+_n.current.offsetHeight,Rr=Hn===window?document.documentElement.scrollTop+window.innerHeight:qe(Hn).top+Hn.clientHeight;$i-(0,Ze.Z)()<=Rr||fr>=Rr-Wn?Ei(function(ro){return(0,te.Z)((0,te.Z)({},ro),{},{isHiddenScrollBar:!0})}):Ei(function(ro){return(0,te.Z)((0,te.Z)({},ro),{},{isHiddenScrollBar:!1})})}})},Fr=function(fr){Ei(function($i){return(0,te.Z)((0,te.Z)({},$i),{},{scrollLeft:fr/Ln*Qe||0})})};return Rt.useImperativeHandle(be,function(){return{setScrollLeft:Fr,checkScrollBarVisible:Ue}}),Rt.useEffect(function(){var Er=(0,De.Z)(document.body,"mouseup",Dr,!1),fr=(0,De.Z)(document.body,"mousemove",$r,!1);return Ue(),function(){Er.remove(),fr.remove()}},[sn,Mr]),Rt.useEffect(function(){if(_n.current){for(var Er=[],fr=(0,On.bn)(_n.current);fr;)Er.push(fr),fr=fr.parentElement;return Er.forEach(function($i){return $i.addEventListener("scroll",Ue,!1)}),window.addEventListener("resize",Ue,!1),window.addEventListener("scroll",Ue,!1),Hn.addEventListener("scroll",Ue,!1),function(){Er.forEach(function($i){return $i.removeEventListener("scroll",Ue)}),window.removeEventListener("resize",Ue),window.removeEventListener("scroll",Ue),Hn.removeEventListener("scroll",Ue)}}},[Hn]),Rt.useEffect(function(){on.isHiddenScrollBar||Ei(function(Er){var fr=_n.current;return fr?(0,te.Z)((0,te.Z)({},Er),{},{scrollLeft:fr.scrollLeft/fr.scrollWidth*fr.clientWidth}):Er})},[on.isHiddenScrollBar]),Ln<=Qe||!sn||on.isHiddenScrollBar?null:Rt.createElement("div",{style:{height:(0,Ze.Z)(),width:Qe,bottom:Wn},className:"".concat(kn,"-sticky-scroll")},Rt.createElement("div",{onMouseDown:Gr,ref:vn,className:Ke()("".concat(kn,"-sticky-scroll-bar"),(0,we.Z)({},"".concat(kn,"-sticky-scroll-bar-active"),Mr)),style:{width:"".concat(sn,"px"),transform:"translate3d(".concat(on.scrollLeft,"px, 0, 0)")}}))},fi=Rt.forwardRef(ei);function ki(ke){return null}var Vi=ki;function rn(ke){return null}var Ve=rn,fn="rc-table",mi=[],Pi={};function Pn(){return"No Data"}function ni(ke,An){var be=(0,te.Z)({rowKey:"key",prefixCls:fn,emptyText:Pn},ke),Qt=be.prefixCls,ye=be.className,_n=be.rowClassName,li=be.style,Wn=be.data,Hn=be.rowKey,cn=be.scroll,kn=be.tableLayout,Ln=be.direction,Qe=be.title,sn=be.footer,vn=be.summary,Cn=be.caption,zn=be.id,on=be.showHeader,Ei=be.components,Ii=be.emptyText,nr=be.onRow,Ni=be.onHeaderRow,Mr=be.onScroll,yr=be.internalHooks,Zr=be.transformColumns,Dr=be.internalRefs,Gr=be.tailor,$r=be.getContainerWidth,Ue=be.sticky,Fr=be.rowHoverable,Er=Fr===void 0?!0:Fr,fr=Wn||mi,$i=!!fr.length,Rr=yr===St.R,ro=Rt.useCallback(function(xo,Oo){return(0,en.Z)(Ei,xo)||Oo},[Ei]),eo=Rt.useMemo(function(){return typeof Hn=="function"?Hn:function(xo){var Oo=xo&&xo[Hn];return Oo}},[Hn]),kr=ro(["body"]),Ao=Li(),$o=(0,Xt.Z)(Ao,3),Zs=$o[0],ka=$o[1],zs=$o[2],sr=ln(be,fr,eo),os=(0,Xt.Z)(sr,6),ns=os[0],js=os[1],us=os[2],ys=os[3],di=os[4],Ar=os[5],br=cn==null?void 0:cn.x,Xr=Rt.useState(0),io=(0,Xt.Z)(Xr,2),yo=io[0],rr=io[1],Bo=(0,un.Z)((0,te.Z)((0,te.Z)((0,te.Z)({},be),ns),{},{expandable:!!ns.expandedRowRender,columnTitle:ns.columnTitle,expandedKeys:us,getRowKey:eo,onTriggerExpand:Ar,expandIcon:ys,expandIconColumnIndex:ns.expandIconColumnIndex,direction:Ln,scrollWidth:Rr&&Gr&&typeof br=="number"?br:null,clientWidth:yo}),Rr?Zr:null),Qi=(0,Xt.Z)(Bo,4),Tr=Qi[0],gr=Qi[1],Wo=Qi[2],is=Qi[3],Lo=Wo!=null?Wo:br,Ss=Rt.useMemo(function(){return{columns:Tr,flattenColumns:gr}},[Tr,gr]),jo=Rt.useRef(),Pa=Rt.useRef(),Io=Rt.useRef(),rl=Rt.useRef();Rt.useImperativeHandle(An,function(){return{nativeElement:jo.current,scrollTo:function(Oo){var Qs;if(Io.current instanceof HTMLElement){var sa=Oo.index,ya=Oo.top,Xu=Oo.key;if($n(ya)){var Eu;(Eu=Io.current)===null||Eu===void 0||Eu.scrollTo({top:ya})}else{var Ju,zl=Xu!=null?Xu:eo(fr[sa]);(Ju=Io.current.querySelector('[data-row-key="'.concat(zl,'"]')))===null||Ju===void 0||Ju.scrollIntoView()}}else(Qs=Io.current)!==null&&Qs!==void 0&&Qs.scrollTo&&Io.current.scrollTo(Oo)}}});var bo=Rt.useRef(),ma=Rt.useState(!1),_o=(0,Xt.Z)(ma,2),Ns=_o[0],Ws=_o[1],hu=Rt.useState(!1),Ll=(0,Xt.Z)(hu,2),es=Ll[0],Ml=Ll[1],ca=Rt.useState(new Map),ds=(0,Xt.Z)(ca,2),Oa=ds[0],Bs=ds[1],Yo=ee(gr),As=Yo.map(function(xo){return Oa.get(xo)}),Us=Rt.useMemo(function(){return As},[As.join("_")]),cu=pr(Us,gr,Ln),va=cn&&gn(cn.y),Vo=cn&&gn(Lo)||!!ns.fixed,Uo=Vo&&gr.some(function(xo){var Oo=xo.fixed;return Oo}),wo=Rt.useRef(),fs=Mn(Ue,Qt),Yi=fs.isSticky,na=fs.offsetHeader,Ce=fs.offsetSummary,bn=fs.offsetScroll,kl=fs.stickyClassName,du=fs.container,rs=Rt.useMemo(function(){return vn==null?void 0:vn(fr)},[vn,fr]),ra=(va||Yi)&&Rt.isValidElement(rs)&&rs.type===_t&&rs.props.fixed,gl,Kl,fu;va&&(Kl={overflowY:$i?"scroll":"auto",maxHeight:cn.y}),Vo&&(gl={overflowX:"auto"},va||(Kl={overflowY:"hidden"}),fu={width:Lo===!0?"auto":Lo,minWidth:"100%"});var Cs=Rt.useCallback(function(xo,Oo){Bs(function(Qs){if(Qs.get(xo)!==Oo){var sa=new Map(Qs);return sa.set(xo,Oo),sa}return Qs})},[]),Vr=Ki(null),Fa=(0,Xt.Z)(Vr,2),ol=Fa[0],ws=Fa[1];function vo(xo,Oo){Oo&&(typeof Oo=="function"?Oo(xo):Oo.scrollLeft!==xo&&(Oo.scrollLeft=xo,Oo.scrollLeft!==xo&&setTimeout(function(){Oo.scrollLeft=xo},0)))}var Ps=(0,Ae.Z)(function(xo){var Oo=xo.currentTarget,Qs=xo.scrollLeft,sa=Ln==="rtl",ya=typeof Qs=="number"?Qs:Oo.scrollLeft,Xu=Oo||Pi;if(!ws()||ws()===Xu){var Eu;ol(Xu),vo(ya,Pa.current),vo(ya,Io.current),vo(ya,bo.current),vo(ya,(Eu=wo.current)===null||Eu===void 0?void 0:Eu.setScrollLeft)}var Ju=Oo||Pa.current;if(Ju){var zl=Rr&&Gr&&typeof Lo=="number"?Lo:Ju.scrollWidth,mu=Ju.clientWidth;if(zl===mu){Ws(!1),Ml(!1);return}sa?(Ws(-ya<zl-mu),Ml(-ya>0)):(Ws(ya>0),Ml(ya<zl-mu))}}),Ha=(0,Ae.Z)(function(xo){Ps(xo),Mr==null||Mr(xo)}),ss=function(){if(Vo&&Io.current){var Oo;Ps({currentTarget:(0,On.bn)(Io.current),scrollLeft:(Oo=Io.current)===null||Oo===void 0?void 0:Oo.scrollLeft})}else Ws(!1),Ml(!1)},sl=function(Oo){var Qs,sa=Oo.width;(Qs=wo.current)===null||Qs===void 0||Qs.checkScrollBarVisible();var ya=jo.current?jo.current.offsetWidth:sa;Rr&&$r&&jo.current&&(ya=$r(jo.current,ya)||ya),ya!==yo&&(ss(),rr(ya))},Ys=Rt.useRef(!1);Rt.useEffect(function(){Ys.current&&ss()},[Vo,Wn,Tr.length]),Rt.useEffect(function(){Ys.current=!0},[]);var Wu=Rt.useState(0),Qo=(0,Xt.Z)(Wu,2),oa=Qo[0],No=Qo[1],as=Rt.useState(!0),gs=(0,Xt.Z)(as,2),bs=gs[0],Ko=gs[1];(0,xe.Z)(function(){(!Gr||!Rr)&&(Io.current instanceof Element?No((0,Ze.o)(Io.current).width):No((0,Ze.o)(rl.current).width)),Ko((0,Te.G)("position","sticky"))},[]),Rt.useEffect(function(){Rr&&Dr&&(Dr.body.current=Io.current)});var dA=Rt.useCallback(function(xo){return Rt.createElement(Rt.Fragment,null,Rt.createElement(qr,xo),ra==="top"&&Rt.createElement(ze,xo,rs))},[ra,rs]),zr=Rt.useCallback(function(xo){return Rt.createElement(ze,xo,rs)},[rs]),Yu=ro(["table"],"table"),Co=Rt.useMemo(function(){return kn||(Uo?Lo==="max-content"?"auto":"fixed":va||Yi||gr.some(function(xo){var Oo=xo.ellipsis;return Oo})?"fixed":"auto")},[va,Uo,gr,kn,Yi]),Oh,eu={colWidths:Us,columCount:gr.length,stickyOffsets:cu,onHeaderRow:Ni,fixHeader:va,scroll:cn},TA=Rt.useMemo(function(){return $i?null:typeof Ii=="function"?Ii():Ii},[$i,Ii]),Hh=Rt.createElement(jr,{data:fr,measureColumnWidth:va||Vo||Yi}),ch=Rt.createElement(no,{colWidths:gr.map(function(xo){var Oo=xo.width;return Oo}),columns:gr}),gu=Cn!=null?Rt.createElement("caption",{className:"".concat(Qt,"-caption")},Cn):void 0,pu=(0,hn.Z)(be,{data:!0}),Ho=(0,hn.Z)(be,{aria:!0});if(va||Yi){var Gl;typeof kr=="function"?(Gl=kr(fr,{scrollbarSize:oa,ref:Io,onScroll:Ps}),eu.colWidths=gr.map(function(xo,Oo){var Qs=xo.width,sa=Oo===gr.length-1?Qs-oa:Qs;return typeof sa=="number"&&!Number.isNaN(sa)?sa:0})):Gl=Rt.createElement("div",{style:(0,te.Z)((0,te.Z)({},gl),Kl),onScroll:Ha,ref:Io,className:Ke()("".concat(Qt,"-body"))},Rt.createElement(Yu,(0,zt.Z)({style:(0,te.Z)((0,te.Z)({},fu),{},{tableLayout:Co})},Ho),gu,ch,Hh,!ra&&rs&&Rt.createElement(ze,{stickyOffsets:cu,flattenColumns:gr},rs)));var dh=(0,te.Z)((0,te.Z)((0,te.Z)({noData:!fr.length,maxContentScroll:Vo&&Lo==="max-content"},eu),Ss),{},{direction:Ln,stickyClassName:kl,onScroll:Ps});Oh=Rt.createElement(Rt.Fragment,null,on!==!1&&Rt.createElement(Zi,(0,zt.Z)({},dh,{stickyTopOffset:na,className:"".concat(Qt,"-header"),ref:Pa}),dA),Gl,ra&&ra!=="top"&&Rt.createElement(Zi,(0,zt.Z)({},dh,{stickyBottomOffset:Ce,className:"".concat(Qt,"-summary"),ref:bo}),zr),Yi&&Io.current&&Io.current instanceof Element&&Rt.createElement(fi,{ref:wo,offsetScroll:bn,scrollBodyRef:Io,onScroll:Ps,container:du,direction:Ln}))}else Oh=Rt.createElement("div",{style:(0,te.Z)((0,te.Z)({},gl),Kl),className:Ke()("".concat(Qt,"-content")),onScroll:Ps,ref:Io},Rt.createElement(Yu,(0,zt.Z)({style:(0,te.Z)((0,te.Z)({},fu),{},{tableLayout:Co})},Ho),gu,ch,on!==!1&&Rt.createElement(qr,(0,zt.Z)({},eu,Ss)),Hh,rs&&Rt.createElement(ze,{stickyOffsets:cu,flattenColumns:gr},rs)));var Pu=Rt.createElement("div",(0,zt.Z)({className:Ke()(Qt,ye,(0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)({},"".concat(Qt,"-rtl"),Ln==="rtl"),"".concat(Qt,"-ping-left"),Ns),"".concat(Qt,"-ping-right"),es),"".concat(Qt,"-layout-fixed"),kn==="fixed"),"".concat(Qt,"-fixed-header"),va),"".concat(Qt,"-fixed-column"),Uo),"".concat(Qt,"-fixed-column-gapped"),Uo&&is),"".concat(Qt,"-scroll-horizontal"),Vo),"".concat(Qt,"-has-fix-left"),gr[0]&&gr[0].fixed),"".concat(Qt,"-has-fix-right"),gr[gr.length-1]&&gr[gr.length-1].fixed==="right")),style:li,id:zn,ref:jo},pu),Qe&&Rt.createElement(le,{className:"".concat(Qt,"-title")},Qe(fr)),Rt.createElement("div",{ref:rl,className:"".concat(Qt,"-container")},Oh),sn&&Rt.createElement(le,{className:"".concat(Qt,"-footer")},sn(fr)));Vo&&(Pu=Rt.createElement(Ge.Z,{onResize:sl},Pu));var fA=We(gr,cu,Ln),Fu=Rt.useMemo(function(){return{scrollX:Lo,prefixCls:Qt,getComponent:ro,scrollbarSize:oa,direction:Ln,fixedInfoList:fA,isSticky:Yi,supportSticky:bs,componentWidth:yo,fixHeader:va,fixColumn:Uo,horizonScroll:Vo,tableLayout:Co,rowClassName:_n,expandedRowClassName:ns.expandedRowClassName,expandIcon:ys,expandableType:js,expandRowByClick:ns.expandRowByClick,expandedRowRender:ns.expandedRowRender,onTriggerExpand:Ar,expandIconColumnIndex:ns.expandIconColumnIndex,indentSize:ns.indentSize,allColumnsFixedLeft:gr.every(function(xo){return xo.fixed==="left"}),emptyNode:TA,columns:Tr,flattenColumns:gr,onColumnResize:Cs,hoverStartRow:Zs,hoverEndRow:ka,onHover:zs,rowExpandable:ns.rowExpandable,onRow:nr,getRowKey:eo,expandedKeys:us,childrenColumnName:di,rowHoverable:Er}},[Lo,Qt,ro,oa,Ln,fA,Yi,bs,yo,va,Uo,Vo,Co,_n,ns.expandedRowClassName,ys,js,ns.expandRowByClick,ns.expandedRowRender,Ar,ns.expandIconColumnIndex,ns.indentSize,TA,Tr,gr,Cs,Zs,ka,zs,ns.rowExpandable,nr,eo,us,di,Er]);return Rt.createElement(kt.Provider,{value:Fu},Pu)}var Gi=Rt.forwardRef(ni);function er(ke){return at(Gi,ke)}var Or=er();Or.EXPAND_COLUMN=St.w,Or.INTERNAL_HOOKS=St.R,Or.Column=Vi,Or.ColumnGroup=Ve,Or.Summary=wn;var Oe=Or,Ui=Ut(6790),hr=ae(null),Si=ae(null);function Qr(ke,An,be){var Qt=An||1;return be[ke+Qt]-(be[ke]||0)}function xr(ke){var An=ke.rowInfo,be=ke.column,Qt=ke.colIndex,ye=ke.indent,_n=ke.index,li=ke.component,Wn=ke.renderIndex,Hn=ke.record,cn=ke.style,kn=ke.className,Ln=ke.inverse,Qe=ke.getHeight,sn=be.render,vn=be.dataIndex,Cn=be.className,zn=be.width,on=de(Si,["columnsOffset"]),Ei=on.columnsOffset,Ii=Fi(An,be,Qt,ye,_n),nr=Ii.key,Ni=Ii.fixedInfo,Mr=Ii.appendCellNode,yr=Ii.additionalCellProps,Zr=yr.style,Dr=yr.colSpan,Gr=Dr===void 0?1:Dr,$r=yr.rowSpan,Ue=$r===void 0?1:$r,Fr=Qt-1,Er=Qr(Fr,Gr,Ei),fr=Gr>1?zn-Er:0,$i=(0,te.Z)((0,te.Z)((0,te.Z)({},Zr),cn),{},{flex:"0 0 ".concat(Er,"px"),width:"".concat(Er,"px"),marginRight:fr,pointerEvents:"auto"}),Rr=Rt.useMemo(function(){return Ln?Ue<=1:Gr===0||Ue===0||Ue>1},[Ue,Gr,Ln]);Rr?$i.visibility="hidden":Ln&&($i.height=Qe==null?void 0:Qe(Ue));var ro=Rr?function(){return null}:sn,eo={};return(Ue===0||Gr===0)&&(eo.rowSpan=1,eo.colSpan=1),Rt.createElement(tn,(0,zt.Z)({className:Ke()(Cn,kn),ellipsis:be.ellipsis,align:be.align,scope:be.rowScope,component:li,prefixCls:An.prefixCls,key:nr,record:Hn,index:_n,renderIndex:Wn,dataIndex:vn,render:ro,shouldCellUpdate:be.shouldCellUpdate},Ni,{appendNode:Mr,additionalProps:(0,te.Z)((0,te.Z)({},yr),{},{style:$i},eo)}))}var Ri=xr,qi=["data","index","className","rowKey","style","extra","getHeight"],re=Rt.forwardRef(function(ke,An){var be=ke.data,Qt=ke.index,ye=ke.className,_n=ke.rowKey,li=ke.style,Wn=ke.extra,Hn=ke.getHeight,cn=(0,mt.Z)(ke,qi),kn=be.record,Ln=be.indent,Qe=be.index,sn=de(kt,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),vn=sn.scrollX,Cn=sn.flattenColumns,zn=sn.prefixCls,on=sn.fixColumn,Ei=sn.componentWidth,Ii=de(hr,["getComponent"]),nr=Ii.getComponent,Ni=Dn(kn,_n,Qt,Ln),Mr=nr(["body","row"],"div"),yr=nr(["body","cell"],"div"),Zr=Ni.rowSupportExpand,Dr=Ni.expanded,Gr=Ni.rowProps,$r=Ni.expandedRowRender,Ue=Ni.expandedRowClassName,Fr;if(Zr&&Dr){var Er=$r(kn,Qt,Ln+1,Dr),fr=ur(Ue,kn,Qt,Ln),$i={};on&&($i={style:(0,we.Z)({},"--virtual-width","".concat(Ei,"px"))});var Rr="".concat(zn,"-expanded-row-cell");Fr=Rt.createElement(Mr,{className:Ke()("".concat(zn,"-expanded-row"),"".concat(zn,"-expanded-row-level-").concat(Ln+1),fr)},Rt.createElement(tn,{component:yr,prefixCls:zn,className:Ke()(Rr,(0,we.Z)({},"".concat(Rr,"-fixed"),on)),additionalProps:$i},Er))}var ro=(0,te.Z)((0,te.Z)({},li),{},{width:vn});Wn&&(ro.position="absolute",ro.pointerEvents="none");var eo=Rt.createElement(Mr,(0,zt.Z)({},Gr,cn,{"data-row-key":_n,ref:Zr?null:An,className:Ke()(ye,"".concat(zn,"-row"),Gr==null?void 0:Gr.className,(0,we.Z)({},"".concat(zn,"-row-extra"),Wn)),style:(0,te.Z)((0,te.Z)({},ro),Gr==null?void 0:Gr.style)}),Cn.map(function(kr,Ao){return Rt.createElement(Ri,{key:Ao,component:yr,rowInfo:Ni,column:kr,colIndex:Ao,indent:Ln,index:Qt,renderIndex:Qe,record:kn,inverse:Wn,getHeight:Hn})}));return Zr?Rt.createElement("div",{ref:An},eo,Fr):eo}),he=dt(re),ne=he,Xe=Rt.forwardRef(function(ke,An){var be=ke.data,Qt=ke.onScroll,ye=de(kt,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),_n=ye.flattenColumns,li=ye.onColumnResize,Wn=ye.getRowKey,Hn=ye.expandedKeys,cn=ye.prefixCls,kn=ye.childrenColumnName,Ln=ye.scrollX,Qe=ye.direction,sn=de(hr),vn=sn.sticky,Cn=sn.scrollY,zn=sn.listItemHeight,on=sn.getComponent,Ei=sn.onScroll,Ii=Rt.useRef(),nr=si(be,kn,Hn,Wn),Ni=Rt.useMemo(function(){var Fr=0;return _n.map(function(Er){var fr=Er.width,$i=Er.key;return Fr+=fr,[$i,fr,Fr]})},[_n]),Mr=Rt.useMemo(function(){return Ni.map(function(Fr){return Fr[2]})},[Ni]);Rt.useEffect(function(){Ni.forEach(function(Fr){var Er=(0,Xt.Z)(Fr,2),fr=Er[0],$i=Er[1];li(fr,$i)})},[Ni]),Rt.useImperativeHandle(An,function(){var Fr,Er={scrollTo:function($i){var Rr;(Rr=Ii.current)===null||Rr===void 0||Rr.scrollTo($i)},nativeElement:(Fr=Ii.current)===null||Fr===void 0?void 0:Fr.nativeElement};return Object.defineProperty(Er,"scrollLeft",{get:function(){var $i;return(($i=Ii.current)===null||$i===void 0?void 0:$i.getScrollInfo().x)||0},set:function($i){var Rr;(Rr=Ii.current)===null||Rr===void 0||Rr.scrollTo({left:$i})}}),Er});var yr=function(Er,fr){var $i,Rr=($i=nr[fr])===null||$i===void 0?void 0:$i.record,ro=Er.onCell;if(ro){var eo,kr=ro(Rr,fr);return(eo=kr==null?void 0:kr.rowSpan)!==null&&eo!==void 0?eo:1}return 1},Zr=function(Er){var fr=Er.start,$i=Er.end,Rr=Er.getSize,ro=Er.offsetY;if($i<0)return null;for(var eo=_n.filter(function(ys){return yr(ys,fr)===0}),kr=fr,Ao=function(di){if(eo=eo.filter(function(Ar){return yr(Ar,di)===0}),!eo.length)return kr=di,1},$o=fr;$o>=0&&!Ao($o);$o-=1);for(var Zs=_n.filter(function(ys){return yr(ys,$i)!==1}),ka=$i,zs=function(di){if(Zs=Zs.filter(function(Ar){return yr(Ar,di)!==1}),!Zs.length)return ka=Math.max(di-1,$i),1},sr=$i;sr<nr.length&&!zs(sr);sr+=1);for(var os=[],ns=function(di){var Ar=nr[di];if(!Ar)return 1;_n.some(function(br){return yr(br,di)>1})&&os.push(di)},js=kr;js<=ka;js+=1)ns(js);var us=os.map(function(ys){var di=nr[ys],Ar=Wn(di.record,ys),br=function(yo){var rr=ys+yo-1,Bo=Wn(nr[rr].record,rr),Qi=Rr(Ar,Bo);return Qi.bottom-Qi.top},Xr=Rr(Ar);return Rt.createElement(ne,{key:ys,data:di,rowKey:Ar,index:ys,style:{top:-ro+Xr.top},extra:!0,getHeight:br})});return us},Dr=Rt.useMemo(function(){return{columnsOffset:Mr}},[Mr]),Gr="".concat(cn,"-tbody"),$r=on(["body","wrapper"]),Ue={};return vn&&(Ue.position="sticky",Ue.bottom=0,(0,Wt.Z)(vn)==="object"&&vn.offsetScroll&&(Ue.bottom=vn.offsetScroll)),Rt.createElement(Si.Provider,{value:Dr},Rt.createElement(Ui.Z,{fullHeight:!1,ref:Ii,prefixCls:"".concat(Gr,"-virtual"),styles:{horizontalScrollBar:Ue},className:Gr,height:Cn,itemHeight:zn||24,data:nr,itemKey:function(Er){return Wn(Er.record)},component:$r,scrollWidth:Ln,direction:Qe,onVirtualScroll:function(Er){var fr,$i=Er.x;Qt({currentTarget:(fr=Ii.current)===null||fr===void 0?void 0:fr.nativeElement,scrollLeft:$i})},onScroll:Ei,extraRender:Zr},function(Fr,Er,fr){var $i=Wn(Fr.record,Er);return Rt.createElement(ne,{data:Fr,rowKey:$i,index:Er,style:fr.style})}))}),Fe=dt(Xe),an=Fe,Jn=function(An,be){var Qt=be.ref,ye=be.onScroll;return Rt.createElement(an,{ref:Qt,data:An,onScroll:ye})};function ii(ke,An){var be=ke.data,Qt=ke.columns,ye=ke.scroll,_n=ke.sticky,li=ke.prefixCls,Wn=li===void 0?fn:li,Hn=ke.className,cn=ke.listItemHeight,kn=ke.components,Ln=ke.onScroll,Qe=ye||{},sn=Qe.x,vn=Qe.y;typeof sn!="number"&&(sn=1),typeof vn!="number"&&(vn=500);var Cn=(0,yi.zX)(function(Ei,Ii){return(0,en.Z)(kn,Ei)||Ii}),zn=(0,yi.zX)(Ln),on=Rt.useMemo(function(){return{sticky:_n,scrollY:vn,listItemHeight:cn,getComponent:Cn,onScroll:zn}},[_n,vn,cn,Cn,zn]);return Rt.createElement(hr.Provider,{value:on},Rt.createElement(Oe,(0,zt.Z)({},ke,{className:Ke()(Hn,"".concat(Wn,"-virtual")),scroll:(0,te.Z)((0,te.Z)({},ye),{},{x:sn}),components:(0,te.Z)((0,te.Z)({},kn),{},{body:be!=null&&be.length?Jn:void 0}),columns:Qt,internalHooks:St.R,tailor:!0,ref:An})))}var Mi=Rt.forwardRef(ii);function hi(ke){return at(Mi,ke)}var Zn=hi(),ci=null},54451:function(mn,je,Ut){"use strict";Ut.d(je,{g:function(){return Rt},v:function(){return fe}});var St=Ut(20439),Xt=Ut(62646),Ae=Ut(48736),xe=["expandable"],fe="RC_TABLE_INTERNAL_COL_DEFINE";function Rt(ie){var ae=ie.expandable,de=(0,Xt.Z)(ie,xe),zt;return"expandable"in ie?zt=(0,St.Z)((0,St.Z)({},de),ae):zt=de,zt.showExpandColumn===!1&&(zt.expandIconColumnIndex=-1),zt}},22711:function(mn,je,Ut){"use strict";Ut.r(je),Ut.d(je,{ResizableTextArea:function(){return pe},default:function(){return dn}});var St=Ut(14809),Xt=Ut(4635),Ae=Ut(20439),xe=Ut(95190),fe=Ut(50298),Rt=Ut(62646),ie=Ut(92310),ae=Ut.n(ie),de=Ut(36901),zt=Ut(66003),Ie=Ut(30292),Yt=Ut(18929),Me=Ut(59301),It=Ut(93664),nt=Ut(29301),et=Ut(34280),At=Ut(16089),at=`
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;
`,dt=["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"],gt={},xt;function kt(yn){var Nn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Kn=yn.getAttribute("id")||yn.getAttribute("data-reactid")||yn.getAttribute("name");if(Nn&&gt[Kn])return gt[Kn];var me=window.getComputedStyle(yn),ee=me.getPropertyValue("box-sizing")||me.getPropertyValue("-moz-box-sizing")||me.getPropertyValue("-webkit-box-sizing"),gn=parseFloat(me.getPropertyValue("padding-bottom"))+parseFloat(me.getPropertyValue("padding-top")),$n=parseFloat(me.getPropertyValue("border-bottom-width"))+parseFloat(me.getPropertyValue("border-top-width")),Yn=dt.map(function(Tn){return"".concat(Tn,":").concat(me.getPropertyValue(Tn))}).join(";"),nn={sizingStyle:Yn,paddingSize:gn,borderSize:$n,boxSizing:ee};return Nn&&Kn&&(gt[Kn]=nn),nn}function Ht(yn){var Nn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Kn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,me=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;xt||(xt=document.createElement("textarea"),xt.setAttribute("tab-index","-1"),xt.setAttribute("aria-hidden","true"),xt.setAttribute("name","hiddenTextarea"),document.body.appendChild(xt)),yn.getAttribute("wrap")?xt.setAttribute("wrap",yn.getAttribute("wrap")):xt.removeAttribute("wrap");var ee=kt(yn,Nn),gn=ee.paddingSize,$n=ee.borderSize,Yn=ee.boxSizing,nn=ee.sizingStyle;xt.setAttribute("style","".concat(nn,";").concat(at)),xt.value=yn.value||yn.placeholder||"";var Tn=void 0,Gn=void 0,yi,Je=xt.scrollHeight;if(Yn==="border-box"?Je+=$n:Yn==="content-box"&&(Je-=gn),Kn!==null||me!==null){xt.value=" ";var Le=xt.scrollHeight-gn;Kn!==null&&(Tn=Le*Kn,Yn==="border-box"&&(Tn=Tn+gn+$n),Je=Math.max(Tn,Je)),me!==null&&(Gn=Le*me,Yn==="border-box"&&(Gn=Gn+gn+$n),yi=Je>Gn?"":"hidden",Je=Math.min(Gn,Je))}var tn={height:Je,overflowY:yi,resize:"none"};return Tn&&(tn.minHeight=Tn),Gn&&(tn.maxHeight=Gn),tn}var Ot=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Zt=0,Wt=1,te=2,we=Me.forwardRef(function(yn,Nn){var Kn=yn,me=Kn.prefixCls,ee=Kn.defaultValue,gn=Kn.value,$n=Kn.autoSize,Yn=Kn.onResize,nn=Kn.className,Tn=Kn.style,Gn=Kn.disabled,yi=Kn.onChange,Je=Kn.onInternalAutoSize,Le=(0,Rt.Z)(Kn,Ot),tn=(0,Yt.Z)(ee,{value:gn,postState:function(Xi){return Xi!=null?Xi:""}}),ti=(0,fe.Z)(tn,2),jn=ti[0],Gt=ti[1],Ft=function(Xi){Gt(Xi.target.value),yi==null||yi(Xi)},mt=Me.useRef();Me.useImperativeHandle(Nn,function(){return{textArea:mt.current}});var vt=Me.useMemo(function(){return $n&&(0,It.Z)($n)==="object"?[$n.minRows,$n.maxRows]:[]},[$n]),Lt=(0,fe.Z)(vt,2),Ct=Lt[0],_t=Lt[1],Pe=!!$n,ze=function(){try{if(document.activeElement===mt.current){var Xi=mt.current,Lr=Xi.selectionStart,wi=Xi.selectionEnd,Nr=Xi.scrollTop;mt.current.setSelectionRange(Lr,wi),mt.current.scrollTop=Nr}}catch(Br){}},wn=Me.useState(te),Ge=(0,fe.Z)(wn,2),Te=Ge[0],Ze=Ge[1],hn=Me.useState(),In=(0,fe.Z)(hn,2),si=In[0],Dn=In[1],Oi=function(){Ze(Zt)};(0,et.Z)(function(){Pe&&Oi()},[gn,Ct,_t,Pe]),(0,et.Z)(function(){if(Te===Zt)Ze(Wt);else if(Te===Wt){var zi=Ht(mt.current,!1,Ct,_t);Ze(te),Dn(zi)}else ze()},[Te]);var ai=Me.useRef(),Ai=function(){At.Z.cancel(ai.current)},pi=function(Xi){Te===te&&(Yn==null||Yn(Xi),$n&&(Ai(),ai.current=(0,At.Z)(function(){Oi()})))};Me.useEffect(function(){return Ai},[]);var ur=Pe?si:null,Fi=(0,Ae.Z)((0,Ae.Z)({},Tn),ur);return(Te===Zt||Te===Wt)&&(Fi.overflowY="hidden",Fi.overflowX="hidden"),Me.createElement(nt.Z,{onResize:pi,disabled:!($n||Yn)},Me.createElement("textarea",(0,St.Z)({},Le,{ref:mt,style:Fi,className:ae()(me,nn,(0,Xt.Z)({},"".concat(me,"-disabled"),Gn)),disabled:Gn,value:jn,onChange:Ft})))}),pe=we,Ke=["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"],_e=Me.forwardRef(function(yn,Nn){var Kn,me=yn.defaultValue,ee=yn.value,gn=yn.onFocus,$n=yn.onBlur,Yn=yn.onChange,nn=yn.allowClear,Tn=yn.maxLength,Gn=yn.onCompositionStart,yi=yn.onCompositionEnd,Je=yn.suffix,Le=yn.prefixCls,tn=Le===void 0?"rc-textarea":Le,ti=yn.showCount,jn=yn.count,Gt=yn.className,Ft=yn.style,mt=yn.disabled,vt=yn.hidden,Lt=yn.classNames,Ct=yn.styles,_t=yn.onResize,Pe=yn.onClear,ze=yn.onPressEnter,wn=yn.readOnly,Ge=yn.autoSize,Te=yn.onKeyDown,Ze=(0,Rt.Z)(yn,Ke),hn=(0,Yt.Z)(me,{value:ee,defaultValue:me}),In=(0,fe.Z)(hn,2),si=In[0],Dn=In[1],Oi=si==null?"":String(si),ai=Me.useState(!1),Ai=(0,fe.Z)(ai,2),pi=Ai[0],ur=Ai[1],Fi=Me.useRef(!1),zi=Me.useState(null),Xi=(0,fe.Z)(zi,2),Lr=Xi[0],wi=Xi[1],Nr=(0,Me.useRef)(null),Br=(0,Me.useRef)(null),jr=function(){var Di;return(Di=Br.current)===null||Di===void 0?void 0:Di.textArea},Wi=function(){jr().focus()};(0,Me.useImperativeHandle)(Nn,function(){var Mn;return{resizableTextArea:Br.current,focus:Wi,blur:function(){jr().blur()},nativeElement:((Mn=Nr.current)===null||Mn===void 0?void 0:Mn.nativeElement)||jr()}}),(0,Me.useEffect)(function(){ur(function(Mn){return!mt&&Mn})},[mt]);var po=Me.useState(null),mo=(0,fe.Z)(po,2),no=mo[0],ir=mo[1];Me.useEffect(function(){if(no){var Mn;(Mn=jr()).setSelectionRange.apply(Mn,(0,xe.Z)(no))}},[no]);var so=(0,zt.Z)(jn,ti),Tt=(Kn=so.max)!==null&&Kn!==void 0?Kn:Tn,Pr=Number(Tt)>0,Zi=so.strategy(Oi),xi=!!Tt&&Zi>Tt,Hi=function(Di,pr){var Vn=pr;!Fi.current&&so.exceedFormatter&&so.max&&so.strategy(pr)>so.max&&(Vn=so.exceedFormatter(pr,{max:so.max}),pr!==Vn&&ir([jr().selectionStart||0,jr().selectionEnd||0])),Dn(Vn),(0,Ie.rJ)(Di.currentTarget,Di,Yn,Vn)},ji=function(Di){Fi.current=!0,Gn==null||Gn(Di)},tr=function(Di){Fi.current=!1,Hi(Di,Di.currentTarget.value),yi==null||yi(Di)},qr=function(Di){Hi(Di,Di.target.value)},un=function(Di){Di.key==="Enter"&&ze&&ze(Di),Te==null||Te(Di)},ln=function(Di){ur(!0),gn==null||gn(Di)},We=function(Di){ur(!1),$n==null||$n(Di)},Sn=function(Di){Dn(""),Wi(),(0,Ie.rJ)(jr(),Di,Yn)},Ki=Je,Li;so.show&&(so.showFormatter?Li=so.showFormatter({value:Oi,count:Zi,maxLength:Tt}):Li="".concat(Zi).concat(Pr?" / ".concat(Tt):""),Ki=Me.createElement(Me.Fragment,null,Ki,Me.createElement("span",{className:ae()("".concat(tn,"-data-count"),Lt==null?void 0:Lt.count),style:Ct==null?void 0:Ct.count},Li)));var dr=function(Di){var pr;_t==null||_t(Di),(pr=jr())!==null&&pr!==void 0&&pr.style.height&&wi(!0)},se=!Ge&&!ti&&!nn;return Me.createElement(de.BaseInput,{ref:Nr,value:Oi,allowClear:nn,handleReset:Sn,suffix:Ki,prefixCls:tn,classNames:(0,Ae.Z)((0,Ae.Z)({},Lt),{},{affixWrapper:ae()(Lt==null?void 0:Lt.affixWrapper,(0,Xt.Z)((0,Xt.Z)({},"".concat(tn,"-show-count"),ti),"".concat(tn,"-textarea-allow-clear"),nn))}),disabled:mt,focused:pi,className:ae()(Gt,xi&&"".concat(tn,"-out-of-range")),style:(0,Ae.Z)((0,Ae.Z)({},Ft),Lr&&!se?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Li=="string"?Li:void 0}},hidden:vt,readOnly:wn,onClear:Pe},Me.createElement(pe,(0,St.Z)({},Ze,{autoSize:Ge,maxLength:Tn,onKeyDown:un,onChange:qr,onFocus:ln,onBlur:We,onCompositionStart:ji,onCompositionEnd:tr,className:ae()(Lt==null?void 0:Lt.textarea),style:(0,Ae.Z)((0,Ae.Z)({},Ct==null?void 0:Ct.textarea),{},{resize:Ft==null?void 0:Ft.resize}),disabled:mt,prefixCls:tn,onResize:dr,ref:Br,readOnly:wn})))}),en=_e,dn=en},639:function(mn,je,Ut){"use strict";Ut.d(je,{Z:function(){return gt}});var St=Ut(14809),Xt=Ut(4635),Ae=Ut(20439),xe=Ut(50298),fe=Ut(62646),Rt=Ut(59301),ie=Ut(92310),ae=Ut.n(ie),de=Ut(26112),zt=Ut(30699),Ie=function(kt){for(var Ht=kt.prefixCls,Ot=kt.level,Zt=kt.isStart,Wt=kt.isEnd,te="".concat(Ht,"-indent-unit"),we=[],pe=0;pe<Ot;pe+=1)we.push(Rt.createElement("span",{key:pe,className:ae()(te,(0,Xt.Z)((0,Xt.Z)({},"".concat(te,"-start"),Zt[pe]),"".concat(te,"-end"),Wt[pe]))}));return Rt.createElement("span",{"aria-hidden":"true",className:"".concat(Ht,"-indent")},we)},Yt=Rt.memo(Ie),Me=Ut(65065),It=Ut(34061),nt=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],et="open",At="close",at="---",dt=function(kt){var Ht,Ot,Zt,Wt=kt.eventKey,te=kt.className,we=kt.style,pe=kt.dragOver,Ke=kt.dragOverGapTop,_e=kt.dragOverGapBottom,en=kt.isLeaf,dn=kt.isStart,yn=kt.isEnd,Nn=kt.expanded,Kn=kt.selected,me=kt.checked,ee=kt.halfChecked,gn=kt.loading,$n=kt.domRef,Yn=kt.active,nn=kt.data,Tn=kt.onMouseMove,Gn=kt.selectable,yi=(0,fe.Z)(kt,nt),Je=Rt.useContext(zt.k),Le=Rt.useContext(zt.y),tn=Rt.useRef(null),ti=Rt.useState(!1),jn=(0,xe.Z)(ti,2),Gt=jn[0],Ft=jn[1],mt=!!(Je.disabled||kt.disabled||(Ht=Le.nodeDisabled)!==null&&Ht!==void 0&&Ht.call(Le,nn)),vt=Rt.useMemo(function(){return!Je.checkable||kt.checkable===!1?!1:Je.checkable},[Je.checkable,kt.checkable]),Lt=function(Zi){mt||Je.onNodeSelect(Zi,(0,It.F)(kt))},Ct=function(Zi){mt||!vt||kt.disableCheckbox||Je.onNodeCheck(Zi,(0,It.F)(kt),!me)},_t=Rt.useMemo(function(){return typeof Gn=="boolean"?Gn:Je.selectable},[Gn,Je.selectable]),Pe=function(Zi){Je.onNodeClick(Zi,(0,It.F)(kt)),_t?Lt(Zi):Ct(Zi)},ze=function(Zi){Je.onNodeDoubleClick(Zi,(0,It.F)(kt))},wn=function(Zi){Je.onNodeMouseEnter(Zi,(0,It.F)(kt))},Ge=function(Zi){Je.onNodeMouseLeave(Zi,(0,It.F)(kt))},Te=function(Zi){Je.onNodeContextMenu(Zi,(0,It.F)(kt))},Ze=Rt.useMemo(function(){return!!(Je.draggable&&(!Je.draggable.nodeDraggable||Je.draggable.nodeDraggable(nn)))},[Je.draggable,nn]),hn=function(Zi){Zi.stopPropagation(),Ft(!0),Je.onNodeDragStart(Zi,kt);try{Zi.dataTransfer.setData("text/plain","")}catch(xi){}},In=function(Zi){Zi.preventDefault(),Zi.stopPropagation(),Je.onNodeDragEnter(Zi,kt)},si=function(Zi){Zi.preventDefault(),Zi.stopPropagation(),Je.onNodeDragOver(Zi,kt)},Dn=function(Zi){Zi.stopPropagation(),Je.onNodeDragLeave(Zi,kt)},Oi=function(Zi){Zi.stopPropagation(),Ft(!1),Je.onNodeDragEnd(Zi,kt)},ai=function(Zi){Zi.preventDefault(),Zi.stopPropagation(),Ft(!1),Je.onNodeDrop(Zi,kt)},Ai=function(Zi){gn||Je.onNodeExpand(Zi,(0,It.F)(kt))},pi=Rt.useMemo(function(){var Pr=(0,Me.Z)(Je.keyEntities,Wt)||{},Zi=Pr.children;return!!(Zi||[]).length},[Je.keyEntities,Wt]),ur=Rt.useMemo(function(){return en===!1?!1:en||!Je.loadData&&!pi||Je.loadData&&kt.loaded&&!pi},[en,Je.loadData,pi,kt.loaded]);Rt.useEffect(function(){gn||typeof Je.loadData=="function"&&Nn&&!ur&&!kt.loaded&&Je.onNodeLoad((0,It.F)(kt))},[gn,Je.loadData,Je.onNodeLoad,Nn,ur,kt]);var Fi=Rt.useMemo(function(){var Pr;return(Pr=Je.draggable)!==null&&Pr!==void 0&&Pr.icon?Rt.createElement("span",{className:"".concat(Je.prefixCls,"-draggable-icon")},Je.draggable.icon):null},[Je.draggable]),zi=function(Zi){var xi=kt.switcherIcon||Je.switcherIcon;return typeof xi=="function"?xi((0,Ae.Z)((0,Ae.Z)({},kt),{},{isLeaf:Zi})):xi},Xi=function(){if(ur){var Zi=zi(!0);return Zi!==!1?Rt.createElement("span",{className:ae()("".concat(Je.prefixCls,"-switcher"),"".concat(Je.prefixCls,"-switcher-noop"))},Zi):null}var xi=zi(!1);return xi!==!1?Rt.createElement("span",{onClick:Ai,className:ae()("".concat(Je.prefixCls,"-switcher"),"".concat(Je.prefixCls,"-switcher_").concat(Nn?et:At))},xi):null},Lr=Rt.useMemo(function(){if(!vt)return null;var Pr=typeof vt!="boolean"?vt:null;return Rt.createElement("span",{className:ae()("".concat(Je.prefixCls,"-checkbox"),(0,Xt.Z)((0,Xt.Z)((0,Xt.Z)({},"".concat(Je.prefixCls,"-checkbox-checked"),me),"".concat(Je.prefixCls,"-checkbox-indeterminate"),!me&&ee),"".concat(Je.prefixCls,"-checkbox-disabled"),mt||kt.disableCheckbox)),onClick:Ct,role:"checkbox","aria-checked":ee?"mixed":me,"aria-disabled":mt||kt.disableCheckbox,"aria-label":"Select ".concat(typeof kt.title=="string"?kt.title:"tree node")},Pr)},[vt,me,ee,mt,kt.disableCheckbox,kt.title]),wi=Rt.useMemo(function(){return ur?null:Nn?et:At},[ur,Nn]),Nr=Rt.useMemo(function(){return Rt.createElement("span",{className:ae()("".concat(Je.prefixCls,"-iconEle"),"".concat(Je.prefixCls,"-icon__").concat(wi||"docu"),(0,Xt.Z)({},"".concat(Je.prefixCls,"-icon_loading"),gn))})},[Je.prefixCls,wi,gn]),Br=Rt.useMemo(function(){var Pr=!!Je.draggable,Zi=!kt.disabled&&Pr&&Je.dragOverNodeKey===Wt;return Zi?Je.dropIndicatorRender({dropPosition:Je.dropPosition,dropLevelOffset:Je.dropLevelOffset,indent:Je.indent,prefixCls:Je.prefixCls,direction:Je.direction}):null},[Je.dropPosition,Je.dropLevelOffset,Je.indent,Je.prefixCls,Je.direction,Je.draggable,Je.dragOverNodeKey,Je.dropIndicatorRender]),jr=Rt.useMemo(function(){var Pr=kt.title,Zi=Pr===void 0?at:Pr,xi="".concat(Je.prefixCls,"-node-content-wrapper"),Hi;if(Je.showIcon){var ji=kt.icon||Je.icon;Hi=ji?Rt.createElement("span",{className:ae()("".concat(Je.prefixCls,"-iconEle"),"".concat(Je.prefixCls,"-icon__customize"))},typeof ji=="function"?ji(kt):ji):Nr}else Je.loadData&&gn&&(Hi=Nr);var tr;return typeof Zi=="function"?tr=Zi(nn):Je.titleRender?tr=Je.titleRender(nn):tr=Zi,Rt.createElement("span",{ref:tn,title:typeof Zi=="string"?Zi:"",className:ae()(xi,"".concat(xi,"-").concat(wi||"normal"),(0,Xt.Z)({},"".concat(Je.prefixCls,"-node-selected"),!mt&&(Kn||Gt))),onMouseEnter:wn,onMouseLeave:Ge,onContextMenu:Te,onClick:Pe,onDoubleClick:ze},Hi,Rt.createElement("span",{className:"".concat(Je.prefixCls,"-title")},tr),Br)},[Je.prefixCls,Je.showIcon,kt,Je.icon,Nr,Je.titleRender,nn,wi,wn,Ge,Te,Pe,ze]),Wi=(0,de.Z)(yi,{aria:!0,data:!0}),po=(0,Me.Z)(Je.keyEntities,Wt)||{},mo=po.level,no=yn[yn.length-1],ir=!mt&&Ze,so=Je.draggingNodeKey===Wt,Tt=Gn!==void 0?{"aria-selected":!!Gn}:void 0;return Rt.createElement("div",(0,St.Z)({ref:$n,role:"treeitem","aria-expanded":en?void 0:Nn,className:ae()(te,"".concat(Je.prefixCls,"-treenode"),(Zt={},(0,Xt.Z)((0,Xt.Z)((0,Xt.Z)((0,Xt.Z)((0,Xt.Z)((0,Xt.Z)((0,Xt.Z)((0,Xt.Z)((0,Xt.Z)((0,Xt.Z)(Zt,"".concat(Je.prefixCls,"-treenode-disabled"),mt),"".concat(Je.prefixCls,"-treenode-switcher-").concat(Nn?"open":"close"),!en),"".concat(Je.prefixCls,"-treenode-checkbox-checked"),me),"".concat(Je.prefixCls,"-treenode-checkbox-indeterminate"),ee),"".concat(Je.prefixCls,"-treenode-selected"),Kn),"".concat(Je.prefixCls,"-treenode-loading"),gn),"".concat(Je.prefixCls,"-treenode-active"),Yn),"".concat(Je.prefixCls,"-treenode-leaf-last"),no),"".concat(Je.prefixCls,"-treenode-draggable"),Ze),"dragging",so),(0,Xt.Z)((0,Xt.Z)((0,Xt.Z)((0,Xt.Z)((0,Xt.Z)((0,Xt.Z)((0,Xt.Z)(Zt,"drop-target",Je.dropTargetKey===Wt),"drop-container",Je.dropContainerKey===Wt),"drag-over",!mt&&pe),"drag-over-gap-top",!mt&&Ke),"drag-over-gap-bottom",!mt&&_e),"filter-node",(Ot=Je.filterTreeNode)===null||Ot===void 0?void 0:Ot.call(Je,(0,It.F)(kt))),"".concat(Je.prefixCls,"-treenode-leaf"),ur))),style:we,draggable:ir,onDragStart:ir?hn:void 0,onDragEnter:Ze?In:void 0,onDragOver:Ze?si:void 0,onDragLeave:Ze?Dn:void 0,onDrop:Ze?ai:void 0,onDragEnd:Ze?Oi:void 0,onMouseMove:Tn},Tt,Wi),Rt.createElement(Yt,{prefixCls:Je.prefixCls,level:mo,isStart:dn,isEnd:yn}),Fi,Xi(),Lr,jr)};dt.isTreeNode=1;var gt=dt},30699:function(mn,je,Ut){"use strict";Ut.d(je,{k:function(){return Xt},y:function(){return Ae}});var St=Ut(59301),Xt=St.createContext(null),Ae=St.createContext({})},29530:function(mn,je,Ut){"use strict";Ut.d(je,{OF:function(){return Wt.Z},y6:function(){return At.y},ZP:function(){return mt}});var St=Ut(14809),Xt=Ut(93664),Ae=Ut(20439),xe=Ut(95190),fe=Ut(99153),Rt=Ut(84851),ie=Ut(13028),ae=Ut(19257),de=Ut(93046),zt=Ut(4635),Ie=Ut(92310),Yt=Ut.n(Ie),Me=Ut(10228),It=Ut(26112),nt=Ut(48736),et=Ut(59301),At=Ut(30699),at=function(Lt){var Ct=Lt.dropPosition,_t=Lt.dropLevelOffset,Pe=Lt.indent,ze={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Ct){case-1:ze.top=0,ze.left=-_t*Pe;break;case 1:ze.bottom=0,ze.left=-_t*Pe;break;case 0:ze.bottom=0,ze.left=Pe;break}return et.createElement("div",{style:ze})},dt=at;function gt(vt){if(vt==null)throw new TypeError("Cannot destructure "+vt)}var xt=Ut(50298),kt=Ut(62646),Ht=Ut(34280),Ot=Ut(6790),Zt=Ut(77900),Wt=Ut(639);function te(vt,Lt){var Ct=et.useState(!1),_t=(0,xt.Z)(Ct,2),Pe=_t[0],ze=_t[1];(0,Ht.Z)(function(){if(Pe)return vt(),function(){Lt()}},[Pe]),(0,Ht.Z)(function(){return ze(!0),function(){ze(!1)}},[])}var we=te,pe=Ut(34061),Ke=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],_e=et.forwardRef(function(vt,Lt){var Ct=vt.className,_t=vt.style,Pe=vt.motion,ze=vt.motionNodes,wn=vt.motionType,Ge=vt.onMotionStart,Te=vt.onMotionEnd,Ze=vt.active,hn=vt.treeNodeRequiredProps,In=(0,kt.Z)(vt,Ke),si=et.useState(!0),Dn=(0,xt.Z)(si,2),Oi=Dn[0],ai=Dn[1],Ai=et.useContext(At.k),pi=Ai.prefixCls,ur=ze&&wn!=="hide";(0,Ht.Z)(function(){ze&&ur!==Oi&&ai(ur)},[ze]);var Fi=function(){ze&&Ge()},zi=et.useRef(!1),Xi=function(){ze&&!zi.current&&(zi.current=!0,Te())};we(Fi,Xi);var Lr=function(Nr){ur===Nr&&Xi()};return ze?et.createElement(Zt.default,(0,St.Z)({ref:Lt,visible:Oi},Pe,{motionAppear:wn==="show",onVisibleChanged:Lr}),function(wi,Nr){var Br=wi.className,jr=wi.style;return et.createElement("div",{ref:Nr,className:Yt()("".concat(pi,"-treenode-motion"),Br),style:jr},ze.map(function(Wi){var po=Object.assign({},(gt(Wi.data),Wi.data)),mo=Wi.title,no=Wi.key,ir=Wi.isStart,so=Wi.isEnd;delete po.children;var Tt=(0,pe.H8)(no,hn);return et.createElement(Wt.Z,(0,St.Z)({},po,Tt,{title:mo,active:Ze,data:Wi.data,key:no,isStart:ir,isEnd:so}))}))}):et.createElement(Wt.Z,(0,St.Z)({domRef:Lt,className:Ct,style:_t},In,{active:Ze}))}),en=_e;function dn(){var vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ct=vt.length,_t=Lt.length;if(Math.abs(Ct-_t)!==1)return{add:!1,key:null};function Pe(ze,wn){var Ge=new Map;ze.forEach(function(Ze){Ge.set(Ze,!0)});var Te=wn.filter(function(Ze){return!Ge.has(Ze)});return Te.length===1?Te[0]:null}return Ct<_t?{add:!0,key:Pe(vt,Lt)}:{add:!1,key:Pe(Lt,vt)}}function yn(vt,Lt,Ct){var _t=vt.findIndex(function(Ge){return Ge.key===Ct}),Pe=vt[_t+1],ze=Lt.findIndex(function(Ge){return Ge.key===Ct});if(Pe){var wn=Lt.findIndex(function(Ge){return Ge.key===Pe.key});return Lt.slice(ze+1,wn)}return Lt.slice(ze+1)}var Nn=["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"],Kn={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},me=function(){},ee="RC_TREE_MOTION_".concat(Math.random()),gn={key:ee},$n={key:ee,level:0,index:0,pos:"0",node:gn,nodes:[gn]},Yn={parent:null,children:[],pos:$n.pos,data:gn,title:null,key:ee,isStart:[],isEnd:[]};function nn(vt,Lt,Ct,_t){return Lt===!1||!Ct?vt:vt.slice(0,Math.ceil(Ct/_t)+1)}function Tn(vt){var Lt=vt.key,Ct=vt.pos;return(0,pe.km)(Lt,Ct)}function Gn(vt){for(var Lt=String(vt.data.key),Ct=vt;Ct.parent;)Ct=Ct.parent,Lt="".concat(Ct.data.key," > ").concat(Lt);return Lt}var yi=et.forwardRef(function(vt,Lt){var Ct=vt.prefixCls,_t=vt.data,Pe=vt.selectable,ze=vt.checkable,wn=vt.expandedKeys,Ge=vt.selectedKeys,Te=vt.checkedKeys,Ze=vt.loadedKeys,hn=vt.loadingKeys,In=vt.halfCheckedKeys,si=vt.keyEntities,Dn=vt.disabled,Oi=vt.dragging,ai=vt.dragOverNodeKey,Ai=vt.dropPosition,pi=vt.motion,ur=vt.height,Fi=vt.itemHeight,zi=vt.virtual,Xi=vt.scrollWidth,Lr=vt.focusable,wi=vt.activeItem,Nr=vt.focused,Br=vt.tabIndex,jr=vt.onKeyDown,Wi=vt.onFocus,po=vt.onBlur,mo=vt.onActiveChange,no=vt.onListChangeStart,ir=vt.onListChangeEnd,so=(0,kt.Z)(vt,Nn),Tt=et.useRef(null),Pr=et.useRef(null);et.useImperativeHandle(Lt,function(){return{scrollTo:function(ki){Tt.current.scrollTo(ki)},getIndentWidth:function(){return Pr.current.offsetWidth}}});var Zi=et.useState(wn),xi=(0,xt.Z)(Zi,2),Hi=xi[0],ji=xi[1],tr=et.useState(_t),qr=(0,xt.Z)(tr,2),un=qr[0],ln=qr[1],We=et.useState(_t),Sn=(0,xt.Z)(We,2),Ki=Sn[0],Li=Sn[1],dr=et.useState([]),se=(0,xt.Z)(dr,2),Mn=se[0],Di=se[1],pr=et.useState(null),Vn=(0,xt.Z)(pr,2),le=Vn[0],De=Vn[1],Xn=et.useRef(_t);Xn.current=_t;function On(){var fi=Xn.current;ln(fi),Li(fi),Di([]),De(null),ir()}(0,Ht.Z)(function(){ji(wn);var fi=dn(Hi,wn);if(fi.key!==null)if(fi.add){var ki=un.findIndex(function(Pi){var Pn=Pi.key;return Pn===fi.key}),Vi=nn(yn(un,_t,fi.key),zi,ur,Fi),rn=un.slice();rn.splice(ki+1,0,Yn),Li(rn),Di(Vi),De("show")}else{var Ve=_t.findIndex(function(Pi){var Pn=Pi.key;return Pn===fi.key}),fn=nn(yn(_t,un,fi.key),zi,ur,Fi),mi=_t.slice();mi.splice(Ve+1,0,Yn),Li(mi),Di(fn),De("hide")}else un!==_t&&(ln(_t),Li(_t))},[wn,_t]),et.useEffect(function(){Oi||On()},[Oi]);var qe=pi?Ki:_t,ei={expandedKeys:wn,selectedKeys:Ge,loadedKeys:Ze,loadingKeys:hn,checkedKeys:Te,halfCheckedKeys:In,dragOverNodeKey:ai,dropPosition:Ai,keyEntities:si};return et.createElement(et.Fragment,null,Nr&&wi&&et.createElement("span",{style:Kn,"aria-live":"assertive"},Gn(wi)),et.createElement("div",null,et.createElement("input",{style:Kn,disabled:Lr===!1||Dn,tabIndex:Lr!==!1?Br:null,onKeyDown:jr,onFocus:Wi,onBlur:po,value:"",onChange:me,"aria-label":"for screen reader"})),et.createElement("div",{className:"".concat(Ct,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},et.createElement("div",{className:"".concat(Ct,"-indent")},et.createElement("div",{ref:Pr,className:"".concat(Ct,"-indent-unit")}))),et.createElement(Ot.Z,(0,St.Z)({},so,{data:qe,itemKey:Tn,height:ur,fullHeight:!1,virtual:zi,itemHeight:Fi,scrollWidth:Xi,prefixCls:"".concat(Ct,"-list"),ref:Tt,role:"tree",onVisibleChange:function(ki){ki.every(function(Vi){return Tn(Vi)!==ee})&&On()}}),function(fi){var ki=fi.pos,Vi=Object.assign({},(gt(fi.data),fi.data)),rn=fi.title,Ve=fi.key,fn=fi.isStart,mi=fi.isEnd,Pi=(0,pe.km)(Ve,ki);delete Vi.key,delete Vi.children;var Pn=(0,pe.H8)(Pi,ei);return et.createElement(en,(0,St.Z)({},Vi,Pn,{title:rn,active:!!wi&&Ve===wi.key,pos:ki,data:fi.data,isStart:fn,isEnd:mi,motion:pi,motionNodes:Ve===ee?Mn:null,motionType:le,onMotionStart:no,onMotionEnd:On,treeNodeRequiredProps:ei,onMouseMove:function(){mo(null)}}))}))}),Je=yi,Le=Ut(82661),tn=Ut(34643),ti=Ut(65065),jn=10,Gt=function(vt){(0,ae.Z)(Ct,vt);var Lt=(0,de.Z)(Ct);function Ct(){var _t;(0,fe.Z)(this,Ct);for(var Pe=arguments.length,ze=new Array(Pe),wn=0;wn<Pe;wn++)ze[wn]=arguments[wn];return _t=Lt.call.apply(Lt,[this].concat(ze)),(0,zt.Z)((0,ie.Z)(_t),"destroyed",!1),(0,zt.Z)((0,ie.Z)(_t),"delayedDragEnterLogic",void 0),(0,zt.Z)((0,ie.Z)(_t),"loadingRetryTimes",{}),(0,zt.Z)((0,ie.Z)(_t),"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,pe.w$)()}),(0,zt.Z)((0,ie.Z)(_t),"dragStartMousePosition",null),(0,zt.Z)((0,ie.Z)(_t),"dragNodeProps",null),(0,zt.Z)((0,ie.Z)(_t),"currentMouseOverDroppableNodeKey",null),(0,zt.Z)((0,ie.Z)(_t),"listRef",et.createRef()),(0,zt.Z)((0,ie.Z)(_t),"onNodeDragStart",function(Ge,Te){var Ze=_t.state,hn=Ze.expandedKeys,In=Ze.keyEntities,si=_t.props.onDragStart,Dn=Te.eventKey;_t.dragNodeProps=Te,_t.dragStartMousePosition={x:Ge.clientX,y:Ge.clientY};var Oi=(0,Le._5)(hn,Dn);_t.setState({draggingNodeKey:Dn,dragChildrenKeys:(0,Le.wA)(Dn,In),indent:_t.listRef.current.getIndentWidth()}),_t.setExpandedKeys(Oi),window.addEventListener("dragend",_t.onWindowDragEnd),si==null||si({event:Ge,node:(0,pe.F)(Te)})}),(0,zt.Z)((0,ie.Z)(_t),"onNodeDragEnter",function(Ge,Te){var Ze=_t.state,hn=Ze.expandedKeys,In=Ze.keyEntities,si=Ze.dragChildrenKeys,Dn=Ze.flattenNodes,Oi=Ze.indent,ai=_t.props,Ai=ai.onDragEnter,pi=ai.onExpand,ur=ai.allowDrop,Fi=ai.direction,zi=Te.pos,Xi=Te.eventKey;if(_t.currentMouseOverDroppableNodeKey!==Xi&&(_t.currentMouseOverDroppableNodeKey=Xi),!_t.dragNodeProps){_t.resetDragState();return}var Lr=(0,Le.OM)(Ge,_t.dragNodeProps,Te,Oi,_t.dragStartMousePosition,ur,Dn,In,hn,Fi),wi=Lr.dropPosition,Nr=Lr.dropLevelOffset,Br=Lr.dropTargetKey,jr=Lr.dropContainerKey,Wi=Lr.dropTargetPos,po=Lr.dropAllowed,mo=Lr.dragOverNodeKey;if(si.includes(Br)||!po){_t.resetDragState();return}if(_t.delayedDragEnterLogic||(_t.delayedDragEnterLogic={}),Object.keys(_t.delayedDragEnterLogic).forEach(function(no){clearTimeout(_t.delayedDragEnterLogic[no])}),_t.dragNodeProps.eventKey!==Te.eventKey&&(Ge.persist(),_t.delayedDragEnterLogic[zi]=window.setTimeout(function(){if(_t.state.draggingNodeKey!==null){var no=(0,xe.Z)(hn),ir=(0,ti.Z)(In,Te.eventKey);ir&&(ir.children||[]).length&&(no=(0,Le.L0)(hn,Te.eventKey)),_t.props.hasOwnProperty("expandedKeys")||_t.setExpandedKeys(no),pi==null||pi(no,{node:(0,pe.F)(Te),expanded:!0,nativeEvent:Ge.nativeEvent})}},800)),_t.dragNodeProps.eventKey===Br&&Nr===0){_t.resetDragState();return}_t.setState({dragOverNodeKey:mo,dropPosition:wi,dropLevelOffset:Nr,dropTargetKey:Br,dropContainerKey:jr,dropTargetPos:Wi,dropAllowed:po}),Ai==null||Ai({event:Ge,node:(0,pe.F)(Te),expandedKeys:hn})}),(0,zt.Z)((0,ie.Z)(_t),"onNodeDragOver",function(Ge,Te){var Ze=_t.state,hn=Ze.dragChildrenKeys,In=Ze.flattenNodes,si=Ze.keyEntities,Dn=Ze.expandedKeys,Oi=Ze.indent,ai=_t.props,Ai=ai.onDragOver,pi=ai.allowDrop,ur=ai.direction;if(_t.dragNodeProps){var Fi=(0,Le.OM)(Ge,_t.dragNodeProps,Te,Oi,_t.dragStartMousePosition,pi,In,si,Dn,ur),zi=Fi.dropPosition,Xi=Fi.dropLevelOffset,Lr=Fi.dropTargetKey,wi=Fi.dropContainerKey,Nr=Fi.dropTargetPos,Br=Fi.dropAllowed,jr=Fi.dragOverNodeKey;hn.includes(Lr)||!Br||(_t.dragNodeProps.eventKey===Lr&&Xi===0?_t.state.dropPosition===null&&_t.state.dropLevelOffset===null&&_t.state.dropTargetKey===null&&_t.state.dropContainerKey===null&&_t.state.dropTargetPos===null&&_t.state.dropAllowed===!1&&_t.state.dragOverNodeKey===null||_t.resetDragState():zi===_t.state.dropPosition&&Xi===_t.state.dropLevelOffset&&Lr===_t.state.dropTargetKey&&wi===_t.state.dropContainerKey&&Nr===_t.state.dropTargetPos&&Br===_t.state.dropAllowed&&jr===_t.state.dragOverNodeKey||_t.setState({dropPosition:zi,dropLevelOffset:Xi,dropTargetKey:Lr,dropContainerKey:wi,dropTargetPos:Nr,dropAllowed:Br,dragOverNodeKey:jr}),Ai==null||Ai({event:Ge,node:(0,pe.F)(Te)}))}}),(0,zt.Z)((0,ie.Z)(_t),"onNodeDragLeave",function(Ge,Te){_t.currentMouseOverDroppableNodeKey===Te.eventKey&&!Ge.currentTarget.contains(Ge.relatedTarget)&&(_t.resetDragState(),_t.currentMouseOverDroppableNodeKey=null);var Ze=_t.props.onDragLeave;Ze==null||Ze({event:Ge,node:(0,pe.F)(Te)})}),(0,zt.Z)((0,ie.Z)(_t),"onWindowDragEnd",function(Ge){_t.onNodeDragEnd(Ge,null,!0),window.removeEventListener("dragend",_t.onWindowDragEnd)}),(0,zt.Z)((0,ie.Z)(_t),"onNodeDragEnd",function(Ge,Te){var Ze=_t.props.onDragEnd;_t.setState({dragOverNodeKey:null}),_t.cleanDragState(),Ze==null||Ze({event:Ge,node:(0,pe.F)(Te)}),_t.dragNodeProps=null,window.removeEventListener("dragend",_t.onWindowDragEnd)}),(0,zt.Z)((0,ie.Z)(_t),"onNodeDrop",function(Ge,Te){var Ze,hn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,In=_t.state,si=In.dragChildrenKeys,Dn=In.dropPosition,Oi=In.dropTargetKey,ai=In.dropTargetPos,Ai=In.dropAllowed;if(Ai){var pi=_t.props.onDrop;if(_t.setState({dragOverNodeKey:null}),_t.cleanDragState(),Oi!==null){var ur=(0,Ae.Z)((0,Ae.Z)({},(0,pe.H8)(Oi,_t.getTreeNodeRequiredProps())),{},{active:((Ze=_t.getActiveItem())===null||Ze===void 0?void 0:Ze.key)===Oi,data:(0,ti.Z)(_t.state.keyEntities,Oi).node}),Fi=si.includes(Oi);(0,nt.ZP)(!Fi,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var zi=(0,Le.yx)(ai),Xi={event:Ge,node:(0,pe.F)(ur),dragNode:_t.dragNodeProps?(0,pe.F)(_t.dragNodeProps):null,dragNodesKeys:[_t.dragNodeProps.eventKey].concat(si),dropToGap:Dn!==0,dropPosition:Dn+Number(zi[zi.length-1])};hn||pi==null||pi(Xi),_t.dragNodeProps=null}}}),(0,zt.Z)((0,ie.Z)(_t),"cleanDragState",function(){var Ge=_t.state.draggingNodeKey;Ge!==null&&_t.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),_t.dragStartMousePosition=null,_t.currentMouseOverDroppableNodeKey=null}),(0,zt.Z)((0,ie.Z)(_t),"triggerExpandActionExpand",function(Ge,Te){var Ze=_t.state,hn=Ze.expandedKeys,In=Ze.flattenNodes,si=Te.expanded,Dn=Te.key,Oi=Te.isLeaf;if(!(Oi||Ge.shiftKey||Ge.metaKey||Ge.ctrlKey)){var ai=In.filter(function(pi){return pi.key===Dn})[0],Ai=(0,pe.F)((0,Ae.Z)((0,Ae.Z)({},(0,pe.H8)(Dn,_t.getTreeNodeRequiredProps())),{},{data:ai.data}));_t.setExpandedKeys(si?(0,Le._5)(hn,Dn):(0,Le.L0)(hn,Dn)),_t.onNodeExpand(Ge,Ai)}}),(0,zt.Z)((0,ie.Z)(_t),"onNodeClick",function(Ge,Te){var Ze=_t.props,hn=Ze.onClick,In=Ze.expandAction;In==="click"&&_t.triggerExpandActionExpand(Ge,Te),hn==null||hn(Ge,Te)}),(0,zt.Z)((0,ie.Z)(_t),"onNodeDoubleClick",function(Ge,Te){var Ze=_t.props,hn=Ze.onDoubleClick,In=Ze.expandAction;In==="doubleClick"&&_t.triggerExpandActionExpand(Ge,Te),hn==null||hn(Ge,Te)}),(0,zt.Z)((0,ie.Z)(_t),"onNodeSelect",function(Ge,Te){var Ze=_t.state.selectedKeys,hn=_t.state,In=hn.keyEntities,si=hn.fieldNames,Dn=_t.props,Oi=Dn.onSelect,ai=Dn.multiple,Ai=Te.selected,pi=Te[si.key],ur=!Ai;ur?ai?Ze=(0,Le.L0)(Ze,pi):Ze=[pi]:Ze=(0,Le._5)(Ze,pi);var Fi=Ze.map(function(zi){var Xi=(0,ti.Z)(In,zi);return Xi?Xi.node:null}).filter(Boolean);_t.setUncontrolledState({selectedKeys:Ze}),Oi==null||Oi(Ze,{event:"select",selected:ur,node:Te,selectedNodes:Fi,nativeEvent:Ge.nativeEvent})}),(0,zt.Z)((0,ie.Z)(_t),"onNodeCheck",function(Ge,Te,Ze){var hn=_t.state,In=hn.keyEntities,si=hn.checkedKeys,Dn=hn.halfCheckedKeys,Oi=_t.props,ai=Oi.checkStrictly,Ai=Oi.onCheck,pi=Te.key,ur,Fi={event:"check",node:Te,checked:Ze,nativeEvent:Ge.nativeEvent};if(ai){var zi=Ze?(0,Le.L0)(si,pi):(0,Le._5)(si,pi),Xi=(0,Le._5)(Dn,pi);ur={checked:zi,halfChecked:Xi},Fi.checkedNodes=zi.map(function(Wi){return(0,ti.Z)(In,Wi)}).filter(Boolean).map(function(Wi){return Wi.node}),_t.setUncontrolledState({checkedKeys:zi})}else{var Lr=(0,tn.S)([].concat((0,xe.Z)(si),[pi]),!0,In),wi=Lr.checkedKeys,Nr=Lr.halfCheckedKeys;if(!Ze){var Br=new Set(wi);Br.delete(pi);var jr=(0,tn.S)(Array.from(Br),{checked:!1,halfCheckedKeys:Nr},In);wi=jr.checkedKeys,Nr=jr.halfCheckedKeys}ur=wi,Fi.checkedNodes=[],Fi.checkedNodesPositions=[],Fi.halfCheckedKeys=Nr,wi.forEach(function(Wi){var po=(0,ti.Z)(In,Wi);if(po){var mo=po.node,no=po.pos;Fi.checkedNodes.push(mo),Fi.checkedNodesPositions.push({node:mo,pos:no})}}),_t.setUncontrolledState({checkedKeys:wi},!1,{halfCheckedKeys:Nr})}Ai==null||Ai(ur,Fi)}),(0,zt.Z)((0,ie.Z)(_t),"onNodeLoad",function(Ge){var Te,Ze=Ge.key,hn=_t.state.keyEntities,In=(0,ti.Z)(hn,Ze);if(!(In!=null&&(Te=In.children)!==null&&Te!==void 0&&Te.length)){var si=new Promise(function(Dn,Oi){_t.setState(function(ai){var Ai=ai.loadedKeys,pi=Ai===void 0?[]:Ai,ur=ai.loadingKeys,Fi=ur===void 0?[]:ur,zi=_t.props,Xi=zi.loadData,Lr=zi.onLoad;if(!Xi||pi.includes(Ze)||Fi.includes(Ze))return null;var wi=Xi(Ge);return wi.then(function(){var Nr=_t.state.loadedKeys,Br=(0,Le.L0)(Nr,Ze);Lr==null||Lr(Br,{event:"load",node:Ge}),_t.setUncontrolledState({loadedKeys:Br}),_t.setState(function(jr){return{loadingKeys:(0,Le._5)(jr.loadingKeys,Ze)}}),Dn()}).catch(function(Nr){if(_t.setState(function(jr){return{loadingKeys:(0,Le._5)(jr.loadingKeys,Ze)}}),_t.loadingRetryTimes[Ze]=(_t.loadingRetryTimes[Ze]||0)+1,_t.loadingRetryTimes[Ze]>=jn){var Br=_t.state.loadedKeys;(0,nt.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),_t.setUncontrolledState({loadedKeys:(0,Le.L0)(Br,Ze)}),Dn()}Oi(Nr)}),{loadingKeys:(0,Le.L0)(Fi,Ze)}})});return si.catch(function(){}),si}}),(0,zt.Z)((0,ie.Z)(_t),"onNodeMouseEnter",function(Ge,Te){var Ze=_t.props.onMouseEnter;Ze==null||Ze({event:Ge,node:Te})}),(0,zt.Z)((0,ie.Z)(_t),"onNodeMouseLeave",function(Ge,Te){var Ze=_t.props.onMouseLeave;Ze==null||Ze({event:Ge,node:Te})}),(0,zt.Z)((0,ie.Z)(_t),"onNodeContextMenu",function(Ge,Te){var Ze=_t.props.onRightClick;Ze&&(Ge.preventDefault(),Ze({event:Ge,node:Te}))}),(0,zt.Z)((0,ie.Z)(_t),"onFocus",function(){var Ge=_t.props.onFocus;_t.setState({focused:!0});for(var Te=arguments.length,Ze=new Array(Te),hn=0;hn<Te;hn++)Ze[hn]=arguments[hn];Ge==null||Ge.apply(void 0,Ze)}),(0,zt.Z)((0,ie.Z)(_t),"onBlur",function(){var Ge=_t.props.onBlur;_t.setState({focused:!1}),_t.onActiveChange(null);for(var Te=arguments.length,Ze=new Array(Te),hn=0;hn<Te;hn++)Ze[hn]=arguments[hn];Ge==null||Ge.apply(void 0,Ze)}),(0,zt.Z)((0,ie.Z)(_t),"getTreeNodeRequiredProps",function(){var Ge=_t.state,Te=Ge.expandedKeys,Ze=Ge.selectedKeys,hn=Ge.loadedKeys,In=Ge.loadingKeys,si=Ge.checkedKeys,Dn=Ge.halfCheckedKeys,Oi=Ge.dragOverNodeKey,ai=Ge.dropPosition,Ai=Ge.keyEntities;return{expandedKeys:Te||[],selectedKeys:Ze||[],loadedKeys:hn||[],loadingKeys:In||[],checkedKeys:si||[],halfCheckedKeys:Dn||[],dragOverNodeKey:Oi,dropPosition:ai,keyEntities:Ai}}),(0,zt.Z)((0,ie.Z)(_t),"setExpandedKeys",function(Ge){var Te=_t.state,Ze=Te.treeData,hn=Te.fieldNames,In=(0,pe.oH)(Ze,Ge,hn);_t.setUncontrolledState({expandedKeys:Ge,flattenNodes:In},!0)}),(0,zt.Z)((0,ie.Z)(_t),"onNodeExpand",function(Ge,Te){var Ze=_t.state.expandedKeys,hn=_t.state,In=hn.listChanging,si=hn.fieldNames,Dn=_t.props,Oi=Dn.onExpand,ai=Dn.loadData,Ai=Te.expanded,pi=Te[si.key];if(!In){var ur=Ze.includes(pi),Fi=!Ai;if((0,nt.ZP)(Ai&&ur||!Ai&&!ur,"Expand state not sync with index check"),Ze=Fi?(0,Le.L0)(Ze,pi):(0,Le._5)(Ze,pi),_t.setExpandedKeys(Ze),Oi==null||Oi(Ze,{node:Te,expanded:Fi,nativeEvent:Ge.nativeEvent}),Fi&&ai){var zi=_t.onNodeLoad(Te);zi&&zi.then(function(){var Xi=(0,pe.oH)(_t.state.treeData,Ze,si);_t.setUncontrolledState({flattenNodes:Xi})}).catch(function(){var Xi=_t.state.expandedKeys,Lr=(0,Le._5)(Xi,pi);_t.setExpandedKeys(Lr)})}}}),(0,zt.Z)((0,ie.Z)(_t),"onListChangeStart",function(){_t.setUncontrolledState({listChanging:!0})}),(0,zt.Z)((0,ie.Z)(_t),"onListChangeEnd",function(){setTimeout(function(){_t.setUncontrolledState({listChanging:!1})})}),(0,zt.Z)((0,ie.Z)(_t),"onActiveChange",function(Ge){var Te=_t.state.activeKey,Ze=_t.props,hn=Ze.onActiveChange,In=Ze.itemScrollOffset,si=In===void 0?0:In;Te!==Ge&&(_t.setState({activeKey:Ge}),Ge!==null&&_t.scrollTo({key:Ge,offset:si}),hn==null||hn(Ge))}),(0,zt.Z)((0,ie.Z)(_t),"getActiveItem",function(){var Ge=_t.state,Te=Ge.activeKey,Ze=Ge.flattenNodes;return Te===null?null:Ze.find(function(hn){var In=hn.key;return In===Te})||null}),(0,zt.Z)((0,ie.Z)(_t),"offsetActiveKey",function(Ge){var Te=_t.state,Ze=Te.flattenNodes,hn=Te.activeKey,In=Ze.findIndex(function(Oi){var ai=Oi.key;return ai===hn});In===-1&&Ge<0&&(In=Ze.length),In=(In+Ge+Ze.length)%Ze.length;var si=Ze[In];if(si){var Dn=si.key;_t.onActiveChange(Dn)}else _t.onActiveChange(null)}),(0,zt.Z)((0,ie.Z)(_t),"onKeyDown",function(Ge){var Te=_t.state,Ze=Te.activeKey,hn=Te.expandedKeys,In=Te.checkedKeys,si=Te.fieldNames,Dn=_t.props,Oi=Dn.onKeyDown,ai=Dn.checkable,Ai=Dn.selectable;switch(Ge.which){case Me.Z.UP:{_t.offsetActiveKey(-1),Ge.preventDefault();break}case Me.Z.DOWN:{_t.offsetActiveKey(1),Ge.preventDefault();break}}var pi=_t.getActiveItem();if(pi&&pi.data){var ur=_t.getTreeNodeRequiredProps(),Fi=pi.data.isLeaf===!1||!!(pi.data[si.children]||[]).length,zi=(0,pe.F)((0,Ae.Z)((0,Ae.Z)({},(0,pe.H8)(Ze,ur)),{},{data:pi.data,active:!0}));switch(Ge.which){case Me.Z.LEFT:{Fi&&hn.includes(Ze)?_t.onNodeExpand({},zi):pi.parent&&_t.onActiveChange(pi.parent.key),Ge.preventDefault();break}case Me.Z.RIGHT:{Fi&&!hn.includes(Ze)?_t.onNodeExpand({},zi):pi.children&&pi.children.length&&_t.onActiveChange(pi.children[0].key),Ge.preventDefault();break}case Me.Z.ENTER:case Me.Z.SPACE:{ai&&!zi.disabled&&zi.checkable!==!1&&!zi.disableCheckbox?_t.onNodeCheck({},zi,!In.includes(Ze)):!ai&&Ai&&!zi.disabled&&zi.selectable!==!1&&_t.onNodeSelect({},zi);break}}}Oi==null||Oi(Ge)}),(0,zt.Z)((0,ie.Z)(_t),"setUncontrolledState",function(Ge){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ze=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!_t.destroyed){var hn=!1,In=!0,si={};Object.keys(Ge).forEach(function(Dn){if(_t.props.hasOwnProperty(Dn)){In=!1;return}hn=!0,si[Dn]=Ge[Dn]}),hn&&(!Te||In)&&_t.setState((0,Ae.Z)((0,Ae.Z)({},si),Ze))}}),(0,zt.Z)((0,ie.Z)(_t),"scrollTo",function(Ge){_t.listRef.current.scrollTo(Ge)}),_t}return(0,Rt.Z)(Ct,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Pe=this.props,ze=Pe.activeKey,wn=Pe.itemScrollOffset,Ge=wn===void 0?0:wn;ze!==void 0&&ze!==this.state.activeKey&&(this.setState({activeKey:ze}),ze!==null&&this.scrollTo({key:ze,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 Pe=this.state,ze=Pe.focused,wn=Pe.flattenNodes,Ge=Pe.keyEntities,Te=Pe.draggingNodeKey,Ze=Pe.activeKey,hn=Pe.dropLevelOffset,In=Pe.dropContainerKey,si=Pe.dropTargetKey,Dn=Pe.dropPosition,Oi=Pe.dragOverNodeKey,ai=Pe.indent,Ai=this.props,pi=Ai.prefixCls,ur=Ai.className,Fi=Ai.style,zi=Ai.showLine,Xi=Ai.focusable,Lr=Ai.tabIndex,wi=Lr===void 0?0:Lr,Nr=Ai.selectable,Br=Ai.showIcon,jr=Ai.icon,Wi=Ai.switcherIcon,po=Ai.draggable,mo=Ai.checkable,no=Ai.checkStrictly,ir=Ai.disabled,so=Ai.motion,Tt=Ai.loadData,Pr=Ai.filterTreeNode,Zi=Ai.height,xi=Ai.itemHeight,Hi=Ai.scrollWidth,ji=Ai.virtual,tr=Ai.titleRender,qr=Ai.dropIndicatorRender,un=Ai.onContextMenu,ln=Ai.onScroll,We=Ai.direction,Sn=Ai.rootClassName,Ki=Ai.rootStyle,Li=(0,It.Z)(this.props,{aria:!0,data:!0}),dr;po&&((0,Xt.Z)(po)==="object"?dr=po:typeof po=="function"?dr={nodeDraggable:po}:dr={});var se={prefixCls:pi,selectable:Nr,showIcon:Br,icon:jr,switcherIcon:Wi,draggable:dr,draggingNodeKey:Te,checkable:mo,checkStrictly:no,disabled:ir,keyEntities:Ge,dropLevelOffset:hn,dropContainerKey:In,dropTargetKey:si,dropPosition:Dn,dragOverNodeKey:Oi,indent:ai,direction:We,dropIndicatorRender:qr,loadData:Tt,filterTreeNode:Pr,titleRender:tr,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return et.createElement(At.k.Provider,{value:se},et.createElement("div",{className:Yt()(pi,ur,Sn,(0,zt.Z)((0,zt.Z)((0,zt.Z)({},"".concat(pi,"-show-line"),zi),"".concat(pi,"-focused"),ze),"".concat(pi,"-active-focused"),Ze!==null)),style:Ki},et.createElement(Je,(0,St.Z)({ref:this.listRef,prefixCls:pi,style:Fi,data:wn,disabled:ir,selectable:Nr,checkable:!!mo,motion:so,dragging:Te!==null,height:Zi,itemHeight:xi,virtual:ji,focusable:Xi,focused:ze,tabIndex:wi,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:un,onScroll:ln,scrollWidth:Hi},this.getTreeNodeRequiredProps(),Li))))}}],[{key:"getDerivedStateFromProps",value:function(Pe,ze){var wn=ze.prevProps,Ge={prevProps:Pe};function Te(wi){return!wn&&Pe.hasOwnProperty(wi)||wn&&wn[wi]!==Pe[wi]}var Ze,hn=ze.fieldNames;if(Te("fieldNames")&&(hn=(0,pe.w$)(Pe.fieldNames),Ge.fieldNames=hn),Te("treeData")?Ze=Pe.treeData:Te("children")&&((0,nt.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Ze=(0,pe.zn)(Pe.children)),Ze){Ge.treeData=Ze;var In=(0,pe.I8)(Ze,{fieldNames:hn});Ge.keyEntities=(0,Ae.Z)((0,zt.Z)({},ee,$n),In.keyEntities)}var si=Ge.keyEntities||ze.keyEntities;if(Te("expandedKeys")||wn&&Te("autoExpandParent"))Ge.expandedKeys=Pe.autoExpandParent||!wn&&Pe.defaultExpandParent?(0,Le.r7)(Pe.expandedKeys,si):Pe.expandedKeys;else if(!wn&&Pe.defaultExpandAll){var Dn=(0,Ae.Z)({},si);delete Dn[ee];var Oi=[];Object.keys(Dn).forEach(function(wi){var Nr=Dn[wi];Nr.children&&Nr.children.length&&Oi.push(Nr.key)}),Ge.expandedKeys=Oi}else!wn&&Pe.defaultExpandedKeys&&(Ge.expandedKeys=Pe.autoExpandParent||Pe.defaultExpandParent?(0,Le.r7)(Pe.defaultExpandedKeys,si):Pe.defaultExpandedKeys);if(Ge.expandedKeys||delete Ge.expandedKeys,Ze||Ge.expandedKeys){var ai=(0,pe.oH)(Ze||ze.treeData,Ge.expandedKeys||ze.expandedKeys,hn);Ge.flattenNodes=ai}if(Pe.selectable&&(Te("selectedKeys")?Ge.selectedKeys=(0,Le.BT)(Pe.selectedKeys,Pe):!wn&&Pe.defaultSelectedKeys&&(Ge.selectedKeys=(0,Le.BT)(Pe.defaultSelectedKeys,Pe))),Pe.checkable){var Ai;if(Te("checkedKeys")?Ai=(0,Le.E6)(Pe.checkedKeys)||{}:!wn&&Pe.defaultCheckedKeys?Ai=(0,Le.E6)(Pe.defaultCheckedKeys)||{}:Ze&&(Ai=(0,Le.E6)(Pe.checkedKeys)||{checkedKeys:ze.checkedKeys,halfCheckedKeys:ze.halfCheckedKeys}),Ai){var pi=Ai,ur=pi.checkedKeys,Fi=ur===void 0?[]:ur,zi=pi.halfCheckedKeys,Xi=zi===void 0?[]:zi;if(!Pe.checkStrictly){var Lr=(0,tn.S)(Fi,!0,si);Fi=Lr.checkedKeys,Xi=Lr.halfCheckedKeys}Ge.checkedKeys=Fi,Ge.halfCheckedKeys=Xi}}return Te("loadedKeys")&&(Ge.loadedKeys=Pe.loadedKeys),Ge}}]),Ct}(et.Component);(0,zt.Z)(Gt,"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:dt,allowDrop:function(){return!0},expandAction:!1}),(0,zt.Z)(Gt,"TreeNode",Wt.Z);var Ft=Gt,mt=Ft},82661:function(mn,je,Ut){"use strict";Ut.d(je,{BT:function(){return et},E6:function(){return dt},L0:function(){return zt},OM:function(){return nt},_5:function(){return de},r7:function(){return gt},wA:function(){return Yt},yx:function(){return Ie}});var St=Ut(95190),Xt=Ut(93664),Ae=Ut(48736),xe=Ut(59301),fe=Ut(639),Rt=Ut(65065),ie=Ut(34061),ae=null;function de(xt,kt){if(!xt)return[];var Ht=xt.slice(),Ot=Ht.indexOf(kt);return Ot>=0&&Ht.splice(Ot,1),Ht}function zt(xt,kt){var Ht=(xt||[]).slice();return Ht.indexOf(kt)===-1&&Ht.push(kt),Ht}function Ie(xt){return xt.split("-")}function Yt(xt,kt){var Ht=[],Ot=(0,Rt.Z)(kt,xt);function Zt(){var Wt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Wt.forEach(function(te){var we=te.key,pe=te.children;Ht.push(we),Zt(pe)})}return Zt(Ot.children),Ht}function Me(xt){if(xt.parent){var kt=Ie(xt.pos);return Number(kt[kt.length-1])===xt.parent.children.length-1}return!1}function It(xt){var kt=Ie(xt.pos);return Number(kt[kt.length-1])===0}function nt(xt,kt,Ht,Ot,Zt,Wt,te,we,pe,Ke){var _e,en=xt.clientX,dn=xt.clientY,yn=xt.target.getBoundingClientRect(),Nn=yn.top,Kn=yn.height,me=(Ke==="rtl"?-1:1)*(((Zt==null?void 0:Zt.x)||0)-en),ee=(me-12)/Ot,gn=pe.filter(function(mt){var vt;return(vt=we[mt])===null||vt===void 0||(vt=vt.children)===null||vt===void 0?void 0:vt.length}),$n=(0,Rt.Z)(we,Ht.eventKey);if(dn<Nn+Kn/2){var Yn=te.findIndex(function(mt){return mt.key===$n.key}),nn=Yn<=0?0:Yn-1,Tn=te[nn].key;$n=(0,Rt.Z)(we,Tn)}var Gn=$n.key,yi=$n,Je=$n.key,Le=0,tn=0;if(!gn.includes(Gn))for(var ti=0;ti<ee&&Me($n);ti+=1)$n=$n.parent,tn+=1;var jn=kt.data,Gt=$n.node,Ft=!0;return It($n)&&$n.level===0&&dn<Nn+Kn/2&&Wt({dragNode:jn,dropNode:Gt,dropPosition:-1})&&$n.key===Ht.eventKey?Le=-1:(yi.children||[]).length&&gn.includes(Je)?Wt({dragNode:jn,dropNode:Gt,dropPosition:0})?Le=0:Ft=!1:tn===0?ee>-1.5?Wt({dragNode:jn,dropNode:Gt,dropPosition:1})?Le=1:Ft=!1:Wt({dragNode:jn,dropNode:Gt,dropPosition:0})?Le=0:Wt({dragNode:jn,dropNode:Gt,dropPosition:1})?Le=1:Ft=!1:Wt({dragNode:jn,dropNode:Gt,dropPosition:1})?Le=1:Ft=!1,{dropPosition:Le,dropLevelOffset:tn,dropTargetKey:$n.key,dropTargetPos:$n.pos,dragOverNodeKey:Je,dropContainerKey:Le===0?null:((_e=$n.parent)===null||_e===void 0?void 0:_e.key)||null,dropAllowed:Ft}}function et(xt,kt){if(xt){var Ht=kt.multiple;return Ht?xt.slice():xt.length?[xt[0]]:xt}}var At=function(kt){return kt};function at(xt,kt){if(!xt)return[];var Ht=kt||{},Ot=Ht.processProps,Zt=Ot===void 0?At:Ot,Wt=Array.isArray(xt)?xt:[xt];return Wt.map(function(te){var we=te.children,pe=_objectWithoutProperties(te,ae),Ke=at(we,kt);return React.createElement(TreeNode,_extends({key:pe.key},Zt(pe)),Ke)})}function dt(xt){if(!xt)return null;var kt;if(Array.isArray(xt))kt={checkedKeys:xt,halfCheckedKeys:void 0};else if((0,Xt.Z)(xt)==="object")kt={checkedKeys:xt.checked||void 0,halfCheckedKeys:xt.halfChecked||void 0};else return(0,Ae.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return kt}function gt(xt,kt){var Ht=new Set;function Ot(Zt){if(!Ht.has(Zt)){var Wt=(0,Rt.Z)(kt,Zt);if(Wt){Ht.add(Zt);var te=Wt.parent,we=Wt.node;we.disabled||te&&Ot(te.key)}}}return(xt||[]).forEach(function(Zt){Ot(Zt)}),(0,St.Z)(Ht)}},34643:function(mn,je,Ut){"use strict";Ut.d(je,{S:function(){return ie}});var St=Ut(48736),Xt=Ut(65065);function Ae(ae,de){var zt=new Set;return ae.forEach(function(Ie){de.has(Ie)||zt.add(Ie)}),zt}function xe(ae){var de=ae||{},zt=de.disabled,Ie=de.disableCheckbox,Yt=de.checkable;return!!(zt||Ie)||Yt===!1}function fe(ae,de,zt,Ie){for(var Yt=new Set(ae),Me=new Set,It=0;It<=zt;It+=1){var nt=de.get(It)||new Set;nt.forEach(function(dt){var gt=dt.key,xt=dt.node,kt=dt.children,Ht=kt===void 0?[]:kt;Yt.has(gt)&&!Ie(xt)&&Ht.filter(function(Ot){return!Ie(Ot.node)}).forEach(function(Ot){Yt.add(Ot.key)})})}for(var et=new Set,At=zt;At>=0;At-=1){var at=de.get(At)||new Set;at.forEach(function(dt){var gt=dt.parent,xt=dt.node;if(!(Ie(xt)||!dt.parent||et.has(dt.parent.key))){if(Ie(dt.parent.node)){et.add(gt.key);return}var kt=!0,Ht=!1;(gt.children||[]).filter(function(Ot){return!Ie(Ot.node)}).forEach(function(Ot){var Zt=Ot.key,Wt=Yt.has(Zt);kt&&!Wt&&(kt=!1),!Ht&&(Wt||Me.has(Zt))&&(Ht=!0)}),kt&&Yt.add(gt.key),Ht&&Me.add(gt.key),et.add(gt.key)}})}return{checkedKeys:Array.from(Yt),halfCheckedKeys:Array.from(Ae(Me,Yt))}}function Rt(ae,de,zt,Ie,Yt){for(var Me=new Set(ae),It=new Set(de),nt=0;nt<=Ie;nt+=1){var et=zt.get(nt)||new Set;et.forEach(function(gt){var xt=gt.key,kt=gt.node,Ht=gt.children,Ot=Ht===void 0?[]:Ht;!Me.has(xt)&&!It.has(xt)&&!Yt(kt)&&Ot.filter(function(Zt){return!Yt(Zt.node)}).forEach(function(Zt){Me.delete(Zt.key)})})}It=new Set;for(var At=new Set,at=Ie;at>=0;at-=1){var dt=zt.get(at)||new Set;dt.forEach(function(gt){var xt=gt.parent,kt=gt.node;if(!(Yt(kt)||!gt.parent||At.has(gt.parent.key))){if(Yt(gt.parent.node)){At.add(xt.key);return}var Ht=!0,Ot=!1;(xt.children||[]).filter(function(Zt){return!Yt(Zt.node)}).forEach(function(Zt){var Wt=Zt.key,te=Me.has(Wt);Ht&&!te&&(Ht=!1),!Ot&&(te||It.has(Wt))&&(Ot=!0)}),Ht||Me.delete(xt.key),Ot&&It.add(xt.key),At.add(xt.key)}})}return{checkedKeys:Array.from(Me),halfCheckedKeys:Array.from(Ae(It,Me))}}function ie(ae,de,zt,Ie){var Yt=[],Me;Ie?Me=Ie:Me=xe;var It=new Set(ae.filter(function(at){var dt=!!(0,Xt.Z)(zt,at);return dt||Yt.push(at),dt})),nt=new Map,et=0;Object.keys(zt).forEach(function(at){var dt=zt[at],gt=dt.level,xt=nt.get(gt);xt||(xt=new Set,nt.set(gt,xt)),xt.add(dt),et=Math.max(et,gt)}),(0,St.ZP)(!Yt.length,"Tree missing follow keys: ".concat(Yt.slice(0,100).map(function(at){return"'".concat(at,"'")}).join(", ")));var At;return de===!0?At=fe(It,nt,et,Me):At=Rt(It,de.halfCheckedKeys,nt,et,Me),At}},65065:function(mn,je,Ut){"use strict";Ut.d(je,{Z:function(){return St}});function St(Xt,Ae){return Xt[Ae]}},34061:function(mn,je,Ut){"use strict";Ut.d(je,{F:function(){return gt},H8:function(){return dt},I8:function(){return at},km:function(){return Yt},oH:function(){return et},w$:function(){return Me},zn:function(){return nt}});var St=Ut(93664),Xt=Ut(95190),Ae=Ut(20439),xe=Ut(62646),fe=Ut(11592),Rt=Ut(2738),ie=Ut(48736),ae=Ut(65065),de=["children"];function zt(xt,kt){return"".concat(xt,"-").concat(kt)}function Ie(xt){return xt&&xt.type&&xt.type.isTreeNode}function Yt(xt,kt){return xt!=null?xt:kt}function Me(xt){var kt=xt||{},Ht=kt.title,Ot=kt._title,Zt=kt.key,Wt=kt.children,te=Ht||"title";return{title:te,_title:Ot||[te],key:Zt||"key",children:Wt||"children"}}function It(xt,kt){var Ht=new Map;function Ot(Zt){var Wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Zt||[]).forEach(function(te){var we=te[kt.key],pe=te[kt.children];warning(we!=null,"Tree node must have a certain key: [".concat(Wt).concat(we,"]"));var Ke=String(we);warning(!Ht.has(Ke)||we===null||we===void 0,"Same 'key' exist in the Tree: ".concat(Ke)),Ht.set(Ke,!0),Ot(pe,"".concat(Wt).concat(Ke," > "))})}Ot(xt)}function nt(xt){function kt(Ht){var Ot=(0,fe.Z)(Ht);return Ot.map(function(Zt){if(!Ie(Zt))return(0,ie.ZP)(!Zt,"Tree/TreeNode can only accept TreeNode as children."),null;var Wt=Zt.key,te=Zt.props,we=te.children,pe=(0,xe.Z)(te,de),Ke=(0,Ae.Z)({key:Wt},pe),_e=kt(we);return _e.length&&(Ke.children=_e),Ke}).filter(function(Zt){return Zt})}return kt(xt)}function et(xt,kt,Ht){var Ot=Me(Ht),Zt=Ot._title,Wt=Ot.key,te=Ot.children,we=new Set(kt===!0?[]:kt),pe=[];function Ke(_e){var en=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return _e.map(function(dn,yn){for(var Nn=zt(en?en.pos:"0",yn),Kn=Yt(dn[Wt],Nn),me,ee=0;ee<Zt.length;ee+=1){var gn=Zt[ee];if(dn[gn]!==void 0){me=dn[gn];break}}var $n=Object.assign((0,Rt.Z)(dn,[].concat((0,Xt.Z)(Zt),[Wt,te])),{title:me,key:Kn,parent:en,pos:Nn,children:null,data:dn,isStart:[].concat((0,Xt.Z)(en?en.isStart:[]),[yn===0]),isEnd:[].concat((0,Xt.Z)(en?en.isEnd:[]),[yn===_e.length-1])});return pe.push($n),kt===!0||we.has(Kn)?$n.children=Ke(dn[te]||[],$n):$n.children=[],$n})}return Ke(xt),pe}function At(xt,kt,Ht){var Ot={};(0,St.Z)(Ht)==="object"?Ot=Ht:Ot={externalGetKey:Ht},Ot=Ot||{};var Zt=Ot,Wt=Zt.childrenPropName,te=Zt.externalGetKey,we=Zt.fieldNames,pe=Me(we),Ke=pe.key,_e=pe.children,en=Wt||_e,dn;te?typeof te=="string"?dn=function(Kn){return Kn[te]}:typeof te=="function"&&(dn=function(Kn){return te(Kn)}):dn=function(Kn,me){return Yt(Kn[Ke],me)};function yn(Nn,Kn,me,ee){var gn=Nn?Nn[en]:xt,$n=Nn?zt(me.pos,Kn):"0",Yn=Nn?[].concat((0,Xt.Z)(ee),[Nn]):[];if(Nn){var nn=dn(Nn,$n),Tn={node:Nn,index:Kn,pos:$n,key:nn,parentPos:me.node?me.pos:null,level:me.level+1,nodes:Yn};kt(Tn)}gn&&gn.forEach(function(Gn,yi){yn(Gn,yi,{node:Nn,pos:$n,level:me?me.level+1:-1},Yn)})}yn(null)}function at(xt){var kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ht=kt.initWrapper,Ot=kt.processEntity,Zt=kt.onProcessFinished,Wt=kt.externalGetKey,te=kt.childrenPropName,we=kt.fieldNames,pe=arguments.length>2?arguments[2]:void 0,Ke=Wt||pe,_e={},en={},dn={posEntities:_e,keyEntities:en};return Ht&&(dn=Ht(dn)||dn),At(xt,function(yn){var Nn=yn.node,Kn=yn.index,me=yn.pos,ee=yn.key,gn=yn.parentPos,$n=yn.level,Yn=yn.nodes,nn={node:Nn,nodes:Yn,index:Kn,key:ee,pos:me,level:$n},Tn=Yt(ee,me);_e[me]=nn,en[Tn]=nn,nn.parent=_e[gn],nn.parent&&(nn.parent.children=nn.parent.children||[],nn.parent.children.push(nn)),Ot&&Ot(nn,dn)},{externalGetKey:Ke,childrenPropName:te,fieldNames:we}),Zt&&Zt(dn),dn}function dt(xt,kt){var Ht=kt.expandedKeys,Ot=kt.selectedKeys,Zt=kt.loadedKeys,Wt=kt.loadingKeys,te=kt.checkedKeys,we=kt.halfCheckedKeys,pe=kt.dragOverNodeKey,Ke=kt.dropPosition,_e=kt.keyEntities,en=(0,ae.Z)(_e,xt),dn={eventKey:xt,expanded:Ht.indexOf(xt)!==-1,selected:Ot.indexOf(xt)!==-1,loaded:Zt.indexOf(xt)!==-1,loading:Wt.indexOf(xt)!==-1,checked:te.indexOf(xt)!==-1,halfChecked:we.indexOf(xt)!==-1,pos:String(en?en.pos:""),dragOver:pe===xt&&Ke===0,dragOverGapTop:pe===xt&&Ke===-1,dragOverGapBottom:pe===xt&&Ke===1};return dn}function gt(xt){var kt=xt.data,Ht=xt.expanded,Ot=xt.selected,Zt=xt.checked,Wt=xt.loaded,te=xt.loading,we=xt.halfChecked,pe=xt.dragOver,Ke=xt.dragOverGapTop,_e=xt.dragOverGapBottom,en=xt.pos,dn=xt.active,yn=xt.eventKey,Nn=(0,Ae.Z)((0,Ae.Z)({},kt),{},{expanded:Ht,selected:Ot,checked:Zt,loaded:Wt,loading:te,halfChecked:we,dragOver:pe,dragOverGapTop:Ke,dragOverGapBottom:_e,pos:en,active:dn,key:yn});return"props"in Nn||Object.defineProperty(Nn,"props",{get:function(){return(0,ie.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),xt}}),Nn}},8224:function(mn,je,Ut){"use strict";Ut.d(je,{Z:function(){return Xt}});var St=Ut(4676);function Xt(Ae,xe,fe,Rt){var ie=St.unstable_batchedUpdates?function(de){St.unstable_batchedUpdates(fe,de)}:fe;return Ae!=null&&Ae.addEventListener&&Ae.addEventListener(xe,ie,Rt),{remove:function(){Ae!=null&&Ae.removeEventListener&&Ae.removeEventListener(xe,ie,Rt)}}}},24514:function(mn,je,Ut){"use strict";Ut.d(je,{G:function(){return xe}});var St=Ut(47273),Xt=function(Rt){if((0,St.Z)()&&window.document.documentElement){var ie=Array.isArray(Rt)?Rt:[Rt],ae=window.document.documentElement;return ie.some(function(de){return de in ae.style})}return!1},Ae=function(Rt,ie){if(!Xt(Rt))return!1;var ae=document.createElement("div"),de=ae.style[Rt];return ae.style[Rt]=ie,ae.style[Rt]!==de};function xe(fe,Rt){return!Array.isArray(fe)&&Rt!==void 0?Ae(fe,Rt):Xt(fe)}},6790:function(mn,je,Ut){"use strict";Ut.d(je,{Z:function(){return jn}});var St=Ut(14809),Xt=Ut(93664),Ae=Ut(20439),xe=Ut(4635),fe=Ut(50298),Rt=Ut(62646),ie=Ut(92310),ae=Ut.n(ie),de=Ut(29301),zt=Ut(70425),Ie=Ut(34280),Yt=Ut(59301),Me=Ut(4676),It=Yt.forwardRef(function(Gt,Ft){var mt=Gt.height,vt=Gt.offsetY,Lt=Gt.offsetX,Ct=Gt.children,_t=Gt.prefixCls,Pe=Gt.onInnerResize,ze=Gt.innerProps,wn=Gt.rtl,Ge=Gt.extra,Te={},Ze={display:"flex",flexDirection:"column"};return vt!==void 0&&(Te={height:mt,position:"relative",overflow:"hidden"},Ze=(0,Ae.Z)((0,Ae.Z)({},Ze),{},(0,xe.Z)((0,xe.Z)((0,xe.Z)((0,xe.Z)((0,xe.Z)({transform:"translateY(".concat(vt,"px)")},wn?"marginRight":"marginLeft",-Lt),"position","absolute"),"left",0),"right",0),"top",0))),Yt.createElement("div",{style:Te},Yt.createElement(de.Z,{onResize:function(In){var si=In.offsetHeight;si&&Pe&&Pe()}},Yt.createElement("div",(0,St.Z)({style:Ze,className:ae()((0,xe.Z)({},"".concat(_t,"-holder-inner"),_t)),ref:Ft},ze),Ct,Ge)))});It.displayName="Filler";var nt=It;function et(Gt){var Ft=Gt.children,mt=Gt.setRef,vt=Yt.useCallback(function(Lt){mt(Lt)},[]);return Yt.cloneElement(Ft,{ref:vt})}function At(Gt,Ft,mt,vt,Lt,Ct,_t,Pe){var ze=Pe.getKey;return Gt.slice(Ft,mt+1).map(function(wn,Ge){var Te=Ft+Ge,Ze=_t(wn,Te,{style:{width:vt},offsetX:Lt}),hn=ze(wn);return Yt.createElement(et,{key:hn,setRef:function(si){return Ct(wn,si)}},Ze)})}function at(Gt,Ft,mt,vt){var Lt=mt-Gt,Ct=Ft-mt,_t=Math.min(Lt,Ct)*2;if(vt<=_t){var Pe=Math.floor(vt/2);return vt%2?mt+Pe+1:mt-Pe}return Lt>Ct?mt-(vt-Ct):mt+(vt-Lt)}function dt(Gt,Ft,mt){var vt=Gt.length,Lt=Ft.length,Ct,_t;if(vt===0&&Lt===0)return null;vt<Lt?(Ct=Gt,_t=Ft):(Ct=Ft,_t=Gt);var Pe={__EMPTY_ITEM__:!0};function ze(In){return In!==void 0?mt(In):Pe}for(var wn=null,Ge=Math.abs(vt-Lt)!==1,Te=0;Te<_t.length;Te+=1){var Ze=ze(Ct[Te]),hn=ze(_t[Te]);if(Ze!==hn){wn=Te,Ge=Ge||Ze!==ze(_t[Te+1]);break}}return wn===null?null:{index:wn,multiple:Ge}}function gt(Gt,Ft,mt){var vt=Yt.useState(Gt),Lt=(0,fe.Z)(vt,2),Ct=Lt[0],_t=Lt[1],Pe=Yt.useState(null),ze=(0,fe.Z)(Pe,2),wn=ze[0],Ge=ze[1];return Yt.useEffect(function(){var Te=dt(Ct||[],Gt||[],Ft);(Te==null?void 0:Te.index)!==void 0&&(mt==null||mt(Te.index),Ge(Gt[Te.index])),_t(Gt)},[Gt]),[wn]}var xt=Ut(16089),kt=(typeof navigator=="undefined"?"undefined":(0,Xt.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Ht=kt,Ot=function(Gt,Ft,mt,vt){var Lt=(0,Yt.useRef)(!1),Ct=(0,Yt.useRef)(null);function _t(){clearTimeout(Ct.current),Lt.current=!0,Ct.current=setTimeout(function(){Lt.current=!1},50)}var Pe=(0,Yt.useRef)({top:Gt,bottom:Ft,left:mt,right:vt});return Pe.current.top=Gt,Pe.current.bottom=Ft,Pe.current.left=mt,Pe.current.right=vt,function(ze,wn){var Ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Te=ze?wn<0&&Pe.current.left||wn>0&&Pe.current.right:wn<0&&Pe.current.top||wn>0&&Pe.current.bottom;return Ge&&Te?(clearTimeout(Ct.current),Lt.current=!1):(!Te||Lt.current)&&_t(),!Lt.current&&Te}};function Zt(Gt,Ft,mt,vt,Lt,Ct,_t){var Pe=(0,Yt.useRef)(0),ze=(0,Yt.useRef)(null),wn=(0,Yt.useRef)(null),Ge=(0,Yt.useRef)(!1),Te=Ot(Ft,mt,vt,Lt);function Ze(ai,Ai){if(xt.Z.cancel(ze.current),!Te(!1,Ai)){var pi=ai;if(!pi._virtualHandled)pi._virtualHandled=!0;else return;Pe.current+=Ai,wn.current=Ai,Ht||pi.preventDefault(),ze.current=(0,xt.Z)(function(){var ur=Ge.current?10:1;_t(Pe.current*ur,!1),Pe.current=0})}}function hn(ai,Ai){_t(Ai,!0),Ht||ai.preventDefault()}var In=(0,Yt.useRef)(null),si=(0,Yt.useRef)(null);function Dn(ai){if(Gt){xt.Z.cancel(si.current),si.current=(0,xt.Z)(function(){In.current=null},2);var Ai=ai.deltaX,pi=ai.deltaY,ur=ai.shiftKey,Fi=Ai,zi=pi;(In.current==="sx"||!In.current&&ur&&pi&&!Ai)&&(Fi=pi,zi=0,In.current="sx");var Xi=Math.abs(Fi),Lr=Math.abs(zi);In.current===null&&(In.current=Ct&&Xi>Lr?"x":"y"),In.current==="y"?Ze(ai,zi):hn(ai,Fi)}}function Oi(ai){Gt&&(Ge.current=ai.detail===wn.current)}return[Dn,Oi]}function Wt(Gt,Ft,mt,vt){var Lt=Yt.useMemo(function(){return[new Map,[]]},[Gt,mt.id,vt]),Ct=(0,fe.Z)(Lt,2),_t=Ct[0],Pe=Ct[1],ze=function(Ge){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ge,Ze=_t.get(Ge),hn=_t.get(Te);if(Ze===void 0||hn===void 0)for(var In=Gt.length,si=Pe.length;si<In;si+=1){var Dn,Oi=Gt[si],ai=Ft(Oi);_t.set(ai,si);var Ai=(Dn=mt.get(ai))!==null&&Dn!==void 0?Dn:vt;if(Pe[si]=(Pe[si-1]||0)+Ai,ai===Ge&&(Ze=si),ai===Te&&(hn=si),Ze!==void 0&&hn!==void 0)break}return{top:Pe[Ze-1]||0,bottom:Pe[hn]}};return ze}var te=Ut(99153),we=Ut(84851),pe=function(){function Gt(){(0,te.Z)(this,Gt),(0,xe.Z)(this,"maps",void 0),(0,xe.Z)(this,"id",0),(0,xe.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,we.Z)(Gt,[{key:"set",value:function(mt,vt){this.diffRecords.set(mt,this.maps[mt]),this.maps[mt]=vt,this.id+=1}},{key:"get",value:function(mt){return this.maps[mt]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),Gt}(),Ke=pe;function _e(Gt){var Ft=parseFloat(Gt);return isNaN(Ft)?0:Ft}function en(Gt,Ft,mt){var vt=Yt.useState(0),Lt=(0,fe.Z)(vt,2),Ct=Lt[0],_t=Lt[1],Pe=(0,Yt.useRef)(new Map),ze=(0,Yt.useRef)(new Ke),wn=(0,Yt.useRef)(0);function Ge(){wn.current+=1}function Te(){var hn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Ge();var In=function(){var Oi=!1;Pe.current.forEach(function(ai,Ai){if(ai&&ai.offsetParent){var pi=ai.offsetHeight,ur=getComputedStyle(ai),Fi=ur.marginTop,zi=ur.marginBottom,Xi=_e(Fi),Lr=_e(zi),wi=pi+Xi+Lr;ze.current.get(Ai)!==wi&&(ze.current.set(Ai,wi),Oi=!0)}}),Oi&&_t(function(ai){return ai+1})};if(hn)In();else{wn.current+=1;var si=wn.current;Promise.resolve().then(function(){si===wn.current&&In()})}}function Ze(hn,In){var si=Gt(hn),Dn=Pe.current.get(si);In?(Pe.current.set(si,In),Te()):Pe.current.delete(si),!Dn!=!In&&(In?Ft==null||Ft(hn):mt==null||mt(hn))}return(0,Yt.useEffect)(function(){return Ge},[]),[Ze,Te,ze.current,Ct]}var dn=14/15;function yn(Gt,Ft,mt){var vt=(0,Yt.useRef)(!1),Lt=(0,Yt.useRef)(0),Ct=(0,Yt.useRef)(0),_t=(0,Yt.useRef)(null),Pe=(0,Yt.useRef)(null),ze,wn=function(hn){if(vt.current){var In=Math.ceil(hn.touches[0].pageX),si=Math.ceil(hn.touches[0].pageY),Dn=Lt.current-In,Oi=Ct.current-si,ai=Math.abs(Dn)>Math.abs(Oi);ai?Lt.current=In:Ct.current=si;var Ai=mt(ai,ai?Dn:Oi,!1,hn);Ai&&hn.preventDefault(),clearInterval(Pe.current),Ai&&(Pe.current=setInterval(function(){ai?Dn*=dn:Oi*=dn;var pi=Math.floor(ai?Dn:Oi);(!mt(ai,pi,!0)||Math.abs(pi)<=.1)&&clearInterval(Pe.current)},16))}},Ge=function(){vt.current=!1,ze()},Te=function(hn){ze(),hn.touches.length===1&&!vt.current&&(vt.current=!0,Lt.current=Math.ceil(hn.touches[0].pageX),Ct.current=Math.ceil(hn.touches[0].pageY),_t.current=hn.target,_t.current.addEventListener("touchmove",wn,{passive:!1}),_t.current.addEventListener("touchend",Ge,{passive:!0}))};ze=function(){_t.current&&(_t.current.removeEventListener("touchmove",wn),_t.current.removeEventListener("touchend",Ge))},(0,Ie.Z)(function(){return Gt&&Ft.current.addEventListener("touchstart",Te,{passive:!0}),function(){var Ze;(Ze=Ft.current)===null||Ze===void 0||Ze.removeEventListener("touchstart",Te),ze(),clearInterval(Pe.current)}},[Gt])}function Nn(Gt){return Math.floor(Math.pow(Gt,.5))}function Kn(Gt,Ft){var mt="touches"in Gt?Gt.touches[0]:Gt;return mt[Ft?"pageX":"pageY"]-window[Ft?"scrollX":"scrollY"]}function me(Gt,Ft,mt){Yt.useEffect(function(){var vt=Ft.current;if(Gt&&vt){var Lt=!1,Ct,_t,Pe=function(){xt.Z.cancel(Ct)},ze=function Ze(){Pe(),Ct=(0,xt.Z)(function(){mt(_t),Ze()})},wn=function(hn){if(!(hn.target.draggable||hn.button!==0)){var In=hn;In._virtualHandled||(In._virtualHandled=!0,Lt=!0)}},Ge=function(){Lt=!1,Pe()},Te=function(hn){if(Lt){var In=Kn(hn,!1),si=vt.getBoundingClientRect(),Dn=si.top,Oi=si.bottom;if(In<=Dn){var ai=Dn-In;_t=-Nn(ai),ze()}else if(In>=Oi){var Ai=In-Oi;_t=Nn(Ai),ze()}else Pe()}};return vt.addEventListener("mousedown",wn),vt.ownerDocument.addEventListener("mouseup",Ge),vt.ownerDocument.addEventListener("mousemove",Te),function(){vt.removeEventListener("mousedown",wn),vt.ownerDocument.removeEventListener("mouseup",Ge),vt.ownerDocument.removeEventListener("mousemove",Te),Pe()}}},[Gt])}var ee=10;function gn(Gt,Ft,mt,vt,Lt,Ct,_t,Pe){var ze=Yt.useRef(),wn=Yt.useState(null),Ge=(0,fe.Z)(wn,2),Te=Ge[0],Ze=Ge[1];return(0,Ie.Z)(function(){if(Te&&Te.times<ee){if(!Gt.current){Ze(function(so){return(0,Ae.Z)({},so)});return}Ct();var hn=Te.targetAlign,In=Te.originAlign,si=Te.index,Dn=Te.offset,Oi=Gt.current.clientHeight,ai=!1,Ai=hn,pi=null;if(Oi){for(var ur=hn||In,Fi=0,zi=0,Xi=0,Lr=Math.min(Ft.length-1,si),wi=0;wi<=Lr;wi+=1){var Nr=Lt(Ft[wi]);zi=Fi;var Br=mt.get(Nr);Xi=zi+(Br===void 0?vt:Br),Fi=Xi}for(var jr=ur==="top"?Dn:Oi-Dn,Wi=Lr;Wi>=0;Wi-=1){var po=Lt(Ft[Wi]),mo=mt.get(po);if(mo===void 0){ai=!0;break}if(jr-=mo,jr<=0)break}switch(ur){case"top":pi=zi-Dn;break;case"bottom":pi=Xi-Oi+Dn;break;default:{var no=Gt.current.scrollTop,ir=no+Oi;zi<no?Ai="top":Xi>ir&&(Ai="bottom")}}pi!==null&&_t(pi),pi!==Te.lastTop&&(ai=!0)}ai&&Ze((0,Ae.Z)((0,Ae.Z)({},Te),{},{times:Te.times+1,targetAlign:Ai,lastTop:pi}))}},[Te,Gt.current]),function(hn){if(hn==null){Pe();return}if(xt.Z.cancel(ze.current),typeof hn=="number")_t(hn);else if(hn&&(0,Xt.Z)(hn)==="object"){var In,si=hn.align;"index"in hn?In=hn.index:In=Ft.findIndex(function(ai){return Lt(ai)===hn.key});var Dn=hn.offset,Oi=Dn===void 0?0:Dn;Ze({times:0,index:In,offset:Oi,originAlign:si})}}}var $n=Yt.forwardRef(function(Gt,Ft){var mt=Gt.prefixCls,vt=Gt.rtl,Lt=Gt.scrollOffset,Ct=Gt.scrollRange,_t=Gt.onStartMove,Pe=Gt.onStopMove,ze=Gt.onScroll,wn=Gt.horizontal,Ge=Gt.spinSize,Te=Gt.containerSize,Ze=Gt.style,hn=Gt.thumbStyle,In=Gt.showScrollBar,si=Yt.useState(!1),Dn=(0,fe.Z)(si,2),Oi=Dn[0],ai=Dn[1],Ai=Yt.useState(null),pi=(0,fe.Z)(Ai,2),ur=pi[0],Fi=pi[1],zi=Yt.useState(null),Xi=(0,fe.Z)(zi,2),Lr=Xi[0],wi=Xi[1],Nr=!vt,Br=Yt.useRef(),jr=Yt.useRef(),Wi=Yt.useState(In),po=(0,fe.Z)(Wi,2),mo=po[0],no=po[1],ir=Yt.useRef(),so=function(){In===!0||In===!1||(clearTimeout(ir.current),no(!0),ir.current=setTimeout(function(){no(!1)},3e3))},Tt=Ct-Te||0,Pr=Te-Ge||0,Zi=Yt.useMemo(function(){if(Lt===0||Tt===0)return 0;var Sn=Lt/Tt;return Sn*Pr},[Lt,Tt,Pr]),xi=function(Ki){Ki.stopPropagation(),Ki.preventDefault()},Hi=Yt.useRef({top:Zi,dragging:Oi,pageY:ur,startTop:Lr});Hi.current={top:Zi,dragging:Oi,pageY:ur,startTop:Lr};var ji=function(Ki){ai(!0),Fi(Kn(Ki,wn)),wi(Hi.current.top),_t(),Ki.stopPropagation(),Ki.preventDefault()};Yt.useEffect(function(){var Sn=function(se){se.preventDefault()},Ki=Br.current,Li=jr.current;return Ki.addEventListener("touchstart",Sn,{passive:!1}),Li.addEventListener("touchstart",ji,{passive:!1}),function(){Ki.removeEventListener("touchstart",Sn),Li.removeEventListener("touchstart",ji)}},[]);var tr=Yt.useRef();tr.current=Tt;var qr=Yt.useRef();qr.current=Pr,Yt.useEffect(function(){if(Oi){var Sn,Ki=function(se){var Mn=Hi.current,Di=Mn.dragging,pr=Mn.pageY,Vn=Mn.startTop;xt.Z.cancel(Sn);var le=Br.current.getBoundingClientRect(),De=Te/(wn?le.width:le.height);if(Di){var Xn=(Kn(se,wn)-pr)*De,On=Vn;!Nr&&wn?On-=Xn:On+=Xn;var qe=tr.current,ei=qr.current,fi=ei?On/ei:0,ki=Math.ceil(fi*qe);ki=Math.max(ki,0),ki=Math.min(ki,qe),Sn=(0,xt.Z)(function(){ze(ki,wn)})}},Li=function(){ai(!1),Pe()};return window.addEventListener("mousemove",Ki,{passive:!0}),window.addEventListener("touchmove",Ki,{passive:!0}),window.addEventListener("mouseup",Li,{passive:!0}),window.addEventListener("touchend",Li,{passive:!0}),function(){window.removeEventListener("mousemove",Ki),window.removeEventListener("touchmove",Ki),window.removeEventListener("mouseup",Li),window.removeEventListener("touchend",Li),xt.Z.cancel(Sn)}}},[Oi]),Yt.useEffect(function(){return so(),function(){clearTimeout(ir.current)}},[Lt]),Yt.useImperativeHandle(Ft,function(){return{delayHidden:so}});var un="".concat(mt,"-scrollbar"),ln={position:"absolute",visibility:mo?null:"hidden"},We={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return wn?(Object.assign(ln,{height:8,left:0,right:0,bottom:0}),Object.assign(We,(0,xe.Z)({height:"100%",width:Ge},Nr?"left":"right",Zi))):(Object.assign(ln,(0,xe.Z)({width:8,top:0,bottom:0},Nr?"right":"left",0)),Object.assign(We,{width:"100%",height:Ge,top:Zi})),Yt.createElement("div",{ref:Br,className:ae()(un,(0,xe.Z)((0,xe.Z)((0,xe.Z)({},"".concat(un,"-horizontal"),wn),"".concat(un,"-vertical"),!wn),"".concat(un,"-visible"),mo)),style:(0,Ae.Z)((0,Ae.Z)({},ln),Ze),onMouseDown:xi,onMouseMove:so},Yt.createElement("div",{ref:jr,className:ae()("".concat(un,"-thumb"),(0,xe.Z)({},"".concat(un,"-thumb-moving"),Oi)),style:(0,Ae.Z)((0,Ae.Z)({},We),hn),onMouseDown:ji}))}),Yn=$n,nn=20;function Tn(){var Gt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,mt=Gt/Ft*Gt;return isNaN(mt)&&(mt=0),mt=Math.max(mt,nn),Math.floor(mt)}var Gn=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],yi=[],Je={overflowY:"auto",overflowAnchor:"none"};function Le(Gt,Ft){var mt=Gt.prefixCls,vt=mt===void 0?"rc-virtual-list":mt,Lt=Gt.className,Ct=Gt.height,_t=Gt.itemHeight,Pe=Gt.fullHeight,ze=Pe===void 0?!0:Pe,wn=Gt.style,Ge=Gt.data,Te=Gt.children,Ze=Gt.itemKey,hn=Gt.virtual,In=Gt.direction,si=Gt.scrollWidth,Dn=Gt.component,Oi=Dn===void 0?"div":Dn,ai=Gt.onScroll,Ai=Gt.onVirtualScroll,pi=Gt.onVisibleChange,ur=Gt.innerProps,Fi=Gt.extraRender,zi=Gt.styles,Xi=Gt.showScrollBar,Lr=Xi===void 0?"optional":Xi,wi=(0,Rt.Z)(Gt,Gn),Nr=Yt.useCallback(function(cn){return typeof Ze=="function"?Ze(cn):cn==null?void 0:cn[Ze]},[Ze]),Br=en(Nr,null,null),jr=(0,fe.Z)(Br,4),Wi=jr[0],po=jr[1],mo=jr[2],no=jr[3],ir=!!(hn!==!1&&Ct&&_t),so=Yt.useMemo(function(){return Object.values(mo.maps).reduce(function(cn,kn){return cn+kn},0)},[mo.id,mo.maps]),Tt=ir&&Ge&&(Math.max(_t*Ge.length,so)>Ct||!!si),Pr=In==="rtl",Zi=ae()(vt,(0,xe.Z)({},"".concat(vt,"-rtl"),Pr),Lt),xi=Ge||yi,Hi=(0,Yt.useRef)(),ji=(0,Yt.useRef)(),tr=(0,Yt.useRef)(),qr=(0,Yt.useState)(0),un=(0,fe.Z)(qr,2),ln=un[0],We=un[1],Sn=(0,Yt.useState)(0),Ki=(0,fe.Z)(Sn,2),Li=Ki[0],dr=Ki[1],se=(0,Yt.useState)(!1),Mn=(0,fe.Z)(se,2),Di=Mn[0],pr=Mn[1],Vn=function(){pr(!0)},le=function(){pr(!1)},De={getKey:Nr};function Xn(cn){We(function(kn){var Ln;typeof cn=="function"?Ln=cn(kn):Ln=cn;var Qe=xr(Ln);return Hi.current.scrollTop=Qe,Qe})}var On=(0,Yt.useRef)({start:0,end:xi.length}),qe=(0,Yt.useRef)(),ei=gt(xi,Nr),fi=(0,fe.Z)(ei,1),ki=fi[0];qe.current=ki;var Vi=Yt.useMemo(function(){if(!ir)return{scrollHeight:void 0,start:0,end:xi.length-1,offset:void 0};if(!Tt){var cn;return{scrollHeight:((cn=ji.current)===null||cn===void 0?void 0:cn.offsetHeight)||0,start:0,end:xi.length-1,offset:void 0}}for(var kn=0,Ln,Qe,sn,vn=xi.length,Cn=0;Cn<vn;Cn+=1){var zn=xi[Cn],on=Nr(zn),Ei=mo.get(on),Ii=kn+(Ei===void 0?_t:Ei);Ii>=ln&&Ln===void 0&&(Ln=Cn,Qe=kn),Ii>ln+Ct&&sn===void 0&&(sn=Cn),kn=Ii}return Ln===void 0&&(Ln=0,Qe=0,sn=Math.ceil(Ct/_t)),sn===void 0&&(sn=xi.length-1),sn=Math.min(sn+1,xi.length-1),{scrollHeight:kn,start:Ln,end:sn,offset:Qe}},[Tt,ir,ln,xi,no,Ct]),rn=Vi.scrollHeight,Ve=Vi.start,fn=Vi.end,mi=Vi.offset;On.current.start=Ve,On.current.end=fn,Yt.useLayoutEffect(function(){var cn=mo.getRecord();if(cn.size===1){var kn=Array.from(cn.keys())[0],Ln=cn.get(kn),Qe=xi[Ve];if(Qe&&Ln===void 0){var sn=Nr(Qe);if(sn===kn){var vn=mo.get(kn),Cn=vn-_t;Xn(function(zn){return zn+Cn})}}}mo.resetRecord()},[rn]);var Pi=Yt.useState({width:0,height:Ct}),Pn=(0,fe.Z)(Pi,2),ni=Pn[0],Gi=Pn[1],er=function(kn){Gi({width:kn.offsetWidth,height:kn.offsetHeight})},Or=(0,Yt.useRef)(),Oe=(0,Yt.useRef)(),Ui=Yt.useMemo(function(){return Tn(ni.width,si)},[ni.width,si]),hr=Yt.useMemo(function(){return Tn(ni.height,rn)},[ni.height,rn]),Si=rn-Ct,Qr=(0,Yt.useRef)(Si);Qr.current=Si;function xr(cn){var kn=cn;return Number.isNaN(Qr.current)||(kn=Math.min(kn,Qr.current)),kn=Math.max(kn,0),kn}var Ri=ln<=0,qi=ln>=Si,re=Li<=0,he=Li>=si,ne=Ot(Ri,qi,re,he),Xe=function(){return{x:Pr?-Li:Li,y:ln}},Fe=(0,Yt.useRef)(Xe()),an=(0,zt.zX)(function(cn){if(Ai){var kn=(0,Ae.Z)((0,Ae.Z)({},Xe()),cn);(Fe.current.x!==kn.x||Fe.current.y!==kn.y)&&(Ai(kn),Fe.current=kn)}});function Jn(cn,kn){var Ln=cn;kn?((0,Me.flushSync)(function(){dr(Ln)}),an()):Xn(Ln)}function ii(cn){var kn=cn.currentTarget.scrollTop;kn!==ln&&Xn(kn),ai==null||ai(cn),an()}var Mi=function(kn){var Ln=kn,Qe=si?si-ni.width:0;return Ln=Math.max(Ln,0),Ln=Math.min(Ln,Qe),Ln},hi=(0,zt.zX)(function(cn,kn){kn?((0,Me.flushSync)(function(){dr(function(Ln){var Qe=Ln+(Pr?-cn:cn);return Mi(Qe)})}),an()):Xn(function(Ln){var Qe=Ln+cn;return Qe})}),Zn=Zt(ir,Ri,qi,re,he,!!si,hi),ci=(0,fe.Z)(Zn,2),ke=ci[0],An=ci[1];yn(ir,Hi,function(cn,kn,Ln,Qe){var sn=Qe;return ne(cn,kn,Ln)?!1:!sn||!sn._virtualHandled?(sn&&(sn._virtualHandled=!0),ke({preventDefault:function(){},deltaX:cn?kn:0,deltaY:cn?0:kn}),!0):!1}),me(Tt,Hi,function(cn){Xn(function(kn){return kn+cn})}),(0,Ie.Z)(function(){function cn(Ln){var Qe=Ri&&Ln.detail<0,sn=qi&&Ln.detail>0;ir&&!Qe&&!sn&&Ln.preventDefault()}var kn=Hi.current;return kn.addEventListener("wheel",ke,{passive:!1}),kn.addEventListener("DOMMouseScroll",An,{passive:!0}),kn.addEventListener("MozMousePixelScroll",cn,{passive:!1}),function(){kn.removeEventListener("wheel",ke),kn.removeEventListener("DOMMouseScroll",An),kn.removeEventListener("MozMousePixelScroll",cn)}},[ir,Ri,qi]),(0,Ie.Z)(function(){if(si){var cn=Mi(Li);dr(cn),an({x:cn})}},[ni.width,si]);var be=function(){var kn,Ln;(kn=Or.current)===null||kn===void 0||kn.delayHidden(),(Ln=Oe.current)===null||Ln===void 0||Ln.delayHidden()},Qt=gn(Hi,xi,mo,_t,Nr,function(){return po(!0)},Xn,be);Yt.useImperativeHandle(Ft,function(){return{nativeElement:tr.current,getScrollInfo:Xe,scrollTo:function(kn){function Ln(Qe){return Qe&&(0,Xt.Z)(Qe)==="object"&&("left"in Qe||"top"in Qe)}Ln(kn)?(kn.left!==void 0&&dr(Mi(kn.left)),Qt(kn.top)):Qt(kn)}}}),(0,Ie.Z)(function(){if(pi){var cn=xi.slice(Ve,fn+1);pi(cn,xi)}},[Ve,fn,xi]);var ye=Wt(xi,Nr,mo,_t),_n=Fi==null?void 0:Fi({start:Ve,end:fn,virtual:Tt,offsetX:Li,offsetY:mi,rtl:Pr,getSize:ye}),li=At(xi,Ve,fn,si,Li,Wi,Te,De),Wn=null;Ct&&(Wn=(0,Ae.Z)((0,xe.Z)({},ze?"height":"maxHeight",Ct),Je),ir&&(Wn.overflowY="hidden",si&&(Wn.overflowX="hidden"),Di&&(Wn.pointerEvents="none")));var Hn={};return Pr&&(Hn.dir="rtl"),Yt.createElement("div",(0,St.Z)({ref:tr,style:(0,Ae.Z)((0,Ae.Z)({},wn),{},{position:"relative"}),className:Zi},Hn,wi),Yt.createElement(de.Z,{onResize:er},Yt.createElement(Oi,{className:"".concat(vt,"-holder"),style:Wn,ref:Hi,onScroll:ii,onMouseEnter:be},Yt.createElement(nt,{prefixCls:vt,height:rn,offsetX:Li,offsetY:mi,scrollWidth:si,onInnerResize:po,ref:ji,innerProps:ur,rtl:Pr,extra:_n},li))),Tt&&rn>Ct&&Yt.createElement(Yn,{ref:Or,prefixCls:vt,scrollOffset:ln,scrollRange:rn,rtl:Pr,onScroll:Jn,onStartMove:Vn,onStopMove:le,spinSize:hr,containerSize:ni.height,style:zi==null?void 0:zi.verticalScrollBar,thumbStyle:zi==null?void 0:zi.verticalScrollBarThumb,showScrollBar:Lr}),Tt&&si>ni.width&&Yt.createElement(Yn,{ref:Oe,prefixCls:vt,scrollOffset:Li,scrollRange:si,rtl:Pr,onScroll:Jn,onStartMove:Vn,onStopMove:le,spinSize:Ui,containerSize:ni.width,horizontal:!0,style:zi==null?void 0:zi.horizontalScrollBar,thumbStyle:zi==null?void 0:zi.horizontalScrollBarThumb,showScrollBar:Lr}))}var tn=Yt.forwardRef(Le);tn.displayName="List";var ti=tn,jn=ti},51353:function(mn,je,Ut){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),Object.defineProperty(je,"DraggableCore",{enumerable:!0,get:function(){return ae.default}}),je.default=void 0;var St=Ie(Ut(59301)),Xt=zt(Ut(12708)),Ae=zt(Ut(4676)),xe=Ut(14625),fe=Ut(77026),Rt=Ut(22013),ie=Ut(80217),ae=zt(Ut(68555)),de=zt(Ut(97510));function zt(At){return At&&At.__esModule?At:{default:At}}function Ie(At,at){if(typeof WeakMap=="function")var dt=new WeakMap,gt=new WeakMap;return(Ie=function(xt,kt){if(!kt&&xt&&xt.__esModule)return xt;var Ht,Ot,Zt={__proto__:null,default:xt};if(xt===null||typeof xt!="object"&&typeof xt!="function")return Zt;if(Ht=kt?gt:dt){if(Ht.has(xt))return Ht.get(xt);Ht.set(xt,Zt)}for(const Wt in xt)Wt!=="default"&&{}.hasOwnProperty.call(xt,Wt)&&((Ot=(Ht=Object.defineProperty)&&Object.getOwnPropertyDescriptor(xt,Wt))&&(Ot.get||Ot.set)?Ht(Zt,Wt,Ot):Zt[Wt]=xt[Wt]);return Zt})(At,at)}function Yt(){return Yt=Object.assign?Object.assign.bind():function(At){for(var at=1;at<arguments.length;at++){var dt=arguments[at];for(var gt in dt)({}).hasOwnProperty.call(dt,gt)&&(At[gt]=dt[gt])}return At},Yt.apply(null,arguments)}function Me(At,at,dt){return(at=It(at))in At?Object.defineProperty(At,at,{value:dt,enumerable:!0,configurable:!0,writable:!0}):At[at]=dt,At}function It(At){var at=nt(At,"string");return typeof at=="symbol"?at:at+""}function nt(At,at){if(typeof At!="object"||!At)return At;var dt=At[Symbol.toPrimitive];if(dt!==void 0){var gt=dt.call(At,at||"default");if(typeof gt!="object")return gt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(at==="string"?String:Number)(At)}class et extends St.Component{static getDerivedStateFromProps(at,dt){let{position:gt}=at,{prevPropsPosition:xt}=dt;return gt&&(!xt||gt.x!==xt.x||gt.y!==xt.y)?((0,de.default)("Draggable: getDerivedStateFromProps %j",{position:gt,prevPropsPosition:xt}),{x:gt.x,y:gt.y,prevPropsPosition:Pd({},gt)}):null}constructor(at){super(at),Me(this,"onDragStart",(dt,gt)=>{if((0,de.default)("Draggable: onDragStart: %j",gt),this.props.onStart(dt,(0,Rt.createDraggableData)(this,gt))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),Me(this,"onDrag",(dt,gt)=>{if(!this.state.dragging)return!1;(0,de.default)("Draggable: onDrag: %j",gt);const xt=(0,Rt.createDraggableData)(this,gt),kt={x:xt.x,y:xt.y,slackX:0,slackY:0};if(this.props.bounds){const{x:Ot,y:Zt}=kt;kt.x+=this.state.slackX,kt.y+=this.state.slackY;const[Wt,te]=(0,Rt.getBoundPosition)(this,kt.x,kt.y);kt.x=Wt,kt.y=te,kt.slackX=this.state.slackX+(Ot-kt.x),kt.slackY=this.state.slackY+(Zt-kt.y),xt.x=kt.x,xt.y=kt.y,xt.deltaX=kt.x-this.state.x,xt.deltaY=kt.y-this.state.y}if(this.props.onDrag(dt,xt)===!1)return!1;this.setState(kt)}),Me(this,"onDragStop",(dt,gt)=>{if(!this.state.dragging||this.props.onStop(dt,(0,Rt.createDraggableData)(this,gt))===!1)return!1;(0,de.default)("Draggable: onDragStop: %j",gt);const kt={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:Ot,y:Zt}=this.props.position;kt.x=Ot,kt.y=Zt}this.setState(kt)}),this.state={dragging:!1,dragged:!1,x:at.position?at.position.x:at.defaultPosition.x,y:at.position?at.position.y:at.defaultPosition.y,prevPropsPosition:Pd({},at.position),slackX:0,slackY:0,isElementSVG:!1},at.position&&!(at.onDrag||at.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement!="undefined"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){var at,dt,gt;return(gt=(dt=(at=this.props)==null?void 0:at.nodeRef)==null?void 0:dt.current)!=null?gt:Ae.default.findDOMNode(this)}render(){const Kn=this.props,{axis:at,bounds:dt,children:gt,defaultPosition:xt,defaultClassName:kt,defaultClassNameDragging:Ht,defaultClassNameDragged:Ot,position:Zt,positionOffset:Wt,scale:te}=Kn,we=Sw(Kn,["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"]);let pe={},Ke=null;const en=!!!Zt||this.state.dragging,dn=Zt||xt,yn={x:(0,Rt.canDragX)(this)&&en?this.state.x:dn.x,y:(0,Rt.canDragY)(this)&&en?this.state.y:dn.y};this.state.isElementSVG?Ke=(0,fe.createSVGTransform)(yn,Wt):pe=(0,fe.createCSSTransform)(yn,Wt);const Nn=(0,xe.clsx)(gt.props.className||"",kt,{[Ht]:this.state.dragging,[Ot]:this.state.dragged});return St.createElement(ae.default,Yt({},we,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),St.cloneElement(St.Children.only(gt),{className:Nn,style:Pd(Pd({},gt.props.style),pe),transform:Ke}))}}je.default=et,Me(et,"displayName","Draggable"),Me(et,"propTypes",Ay(Pd({},ae.default.propTypes),{axis:Xt.default.oneOf(["both","x","y","none"]),bounds:Xt.default.oneOfType([Xt.default.shape({left:Xt.default.number,right:Xt.default.number,top:Xt.default.number,bottom:Xt.default.number}),Xt.default.string,Xt.default.oneOf([!1])]),defaultClassName:Xt.default.string,defaultClassNameDragging:Xt.default.string,defaultClassNameDragged:Xt.default.string,defaultPosition:Xt.default.shape({x:Xt.default.number,y:Xt.default.number}),positionOffset:Xt.default.shape({x:Xt.default.oneOfType([Xt.default.number,Xt.default.string]),y:Xt.default.oneOfType([Xt.default.number,Xt.default.string])}),position:Xt.default.shape({x:Xt.default.number,y:Xt.default.number}),className:ie.dontSetMe,style:ie.dontSetMe,transform:ie.dontSetMe})),Me(et,"defaultProps",Ay(Pd({},ae.default.defaultProps),{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))},68555:function(mn,je,Ut){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.default=void 0;var St=de(Ut(59301)),Xt=ae(Ut(12708)),Ae=ae(Ut(4676)),xe=Ut(77026),fe=Ut(22013),Rt=Ut(80217),ie=ae(Ut(97510));function ae(et){return et&&et.__esModule?et:{default:et}}function de(et,At){if(typeof WeakMap=="function")var at=new WeakMap,dt=new WeakMap;return(de=function(gt,xt){if(!xt&&gt&&gt.__esModule)return gt;var kt,Ht,Ot={__proto__:null,default:gt};if(gt===null||typeof gt!="object"&&typeof gt!="function")return Ot;if(kt=xt?dt:at){if(kt.has(gt))return kt.get(gt);kt.set(gt,Ot)}for(const Zt in gt)Zt!=="default"&&{}.hasOwnProperty.call(gt,Zt)&&((Ht=(kt=Object.defineProperty)&&Object.getOwnPropertyDescriptor(gt,Zt))&&(Ht.get||Ht.set)?kt(Ot,Zt,Ht):Ot[Zt]=gt[Zt]);return Ot})(et,At)}function zt(et,At,at){return(At=Ie(At))in et?Object.defineProperty(et,At,{value:at,enumerable:!0,configurable:!0,writable:!0}):et[At]=at,et}function Ie(et){var At=Yt(et,"string");return typeof At=="symbol"?At:At+""}function Yt(et,At){if(typeof et!="object"||!et)return et;var at=et[Symbol.toPrimitive];if(at!==void 0){var dt=at.call(et,At||"default");if(typeof dt!="object")return dt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(At==="string"?String:Number)(et)}const Me={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let It=Me.mouse;class nt extends St.Component{constructor(){super(...arguments),zt(this,"dragging",!1),zt(this,"lastX",NaN),zt(this,"lastY",NaN),zt(this,"touchIdentifier",null),zt(this,"mounted",!1),zt(this,"handleDragStart",At=>{if(this.props.onMouseDown(At),!this.props.allowAnyClick&&typeof At.button=="number"&&At.button!==0)return!1;const at=this.findDOMNode();if(!at||!at.ownerDocument||!at.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:dt}=at;if(this.props.disabled||!(At.target instanceof dt.defaultView.Node)||this.props.handle&&!(0,xe.matchesSelectorAndParentsTo)(At.target,this.props.handle,at)||this.props.cancel&&(0,xe.matchesSelectorAndParentsTo)(At.target,this.props.cancel,at))return;At.type==="touchstart"&&!this.props.allowMobileScroll&&At.preventDefault();const gt=(0,xe.getTouchIdentifier)(At);this.touchIdentifier=gt;const xt=(0,fe.getControlPosition)(At,gt,this);if(xt==null)return;const{x:kt,y:Ht}=xt,Ot=(0,fe.createCoreData)(this,kt,Ht);(0,ie.default)("DraggableCore: handleDragStart: %j",Ot),(0,ie.default)("calling",this.props.onStart),!(this.props.onStart(At,Ot)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,xe.addUserSelectStyles)(dt),this.dragging=!0,this.lastX=kt,this.lastY=Ht,(0,xe.addEvent)(dt,It.move,this.handleDrag),(0,xe.addEvent)(dt,It.stop,this.handleDragStop))}),zt(this,"handleDrag",At=>{const at=(0,fe.getControlPosition)(At,this.touchIdentifier,this);if(at==null)return;let{x:dt,y:gt}=at;if(Array.isArray(this.props.grid)){let Ht=dt-this.lastX,Ot=gt-this.lastY;if([Ht,Ot]=(0,fe.snapToGrid)(this.props.grid,Ht,Ot),!Ht&&!Ot)return;dt=this.lastX+Ht,gt=this.lastY+Ot}const xt=(0,fe.createCoreData)(this,dt,gt);if((0,ie.default)("DraggableCore: handleDrag: %j",xt),this.props.onDrag(At,xt)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch(Ht){const Ot=document.createEvent("MouseEvents");Ot.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(Ot)}return}this.lastX=dt,this.lastY=gt}),zt(this,"handleDragStop",At=>{if(!this.dragging)return;const at=(0,fe.getControlPosition)(At,this.touchIdentifier,this);if(at==null)return;let{x:dt,y:gt}=at;if(Array.isArray(this.props.grid)){let Ot=dt-this.lastX||0,Zt=gt-this.lastY||0;[Ot,Zt]=(0,fe.snapToGrid)(this.props.grid,Ot,Zt),dt=this.lastX+Ot,gt=this.lastY+Zt}const xt=(0,fe.createCoreData)(this,dt,gt);if(this.props.onStop(At,xt)===!1||this.mounted===!1)return!1;const Ht=this.findDOMNode();Ht&&this.props.enableUserSelectHack&&(0,xe.scheduleRemoveUserSelectStyles)(Ht.ownerDocument),(0,ie.default)("DraggableCore: handleDragStop: %j",xt),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,Ht&&((0,ie.default)("DraggableCore: Removing handlers"),(0,xe.removeEvent)(Ht.ownerDocument,It.move,this.handleDrag),(0,xe.removeEvent)(Ht.ownerDocument,It.stop,this.handleDragStop))}),zt(this,"onMouseDown",At=>(It=Me.mouse,this.handleDragStart(At))),zt(this,"onMouseUp",At=>(It=Me.mouse,this.handleDragStop(At))),zt(this,"onTouchStart",At=>(It=Me.touch,this.handleDragStart(At))),zt(this,"onTouchEnd",At=>(It=Me.touch,this.handleDragStop(At)))}componentDidMount(){this.mounted=!0;const At=this.findDOMNode();At&&(0,xe.addEvent)(At,Me.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const At=this.findDOMNode();if(At){const{ownerDocument:at}=At;(0,xe.removeEvent)(at,Me.mouse.move,this.handleDrag),(0,xe.removeEvent)(at,Me.touch.move,this.handleDrag),(0,xe.removeEvent)(at,Me.mouse.stop,this.handleDragStop),(0,xe.removeEvent)(at,Me.touch.stop,this.handleDragStop),(0,xe.removeEvent)(At,Me.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,xe.scheduleRemoveUserSelectStyles)(at)}}findDOMNode(){var At,at,dt;return(At=this.props)!=null&&At.nodeRef?(dt=(at=this.props)==null?void 0:at.nodeRef)==null?void 0:dt.current:Ae.default.findDOMNode(this)}render(){return St.cloneElement(St.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}je.default=nt,zt(nt,"displayName","DraggableCore"),zt(nt,"propTypes",{allowAnyClick:Xt.default.bool,allowMobileScroll:Xt.default.bool,children:Xt.default.node.isRequired,disabled:Xt.default.bool,enableUserSelectHack:Xt.default.bool,offsetParent:function(et,At){if(et[At]&&et[At].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:Xt.default.arrayOf(Xt.default.number),handle:Xt.default.string,cancel:Xt.default.string,nodeRef:Xt.default.object,onStart:Xt.default.func,onDrag:Xt.default.func,onStop:Xt.default.func,onMouseDown:Xt.default.func,scale:Xt.default.number,className:Rt.dontSetMe,style:Rt.dontSetMe,transform:Rt.dontSetMe}),zt(nt,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},96249:function(mn,je,Ut){"use strict";const{default:St,DraggableCore:Xt}=Ut(51353);mn.exports=St,mn.exports.default=St,mn.exports.DraggableCore=Xt},77026:function(mn,je,Ut){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.addClassName=kt,je.addEvent=ie,je.addUserSelectStyles=dt,je.createCSSTransform=It,je.createSVGTransform=nt,je.getTouch=At,je.getTouchIdentifier=at,je.getTranslation=et,je.innerHeight=Ie,je.innerWidth=Yt,je.matchesSelector=fe,je.matchesSelectorAndParentsTo=Rt,je.offsetXYFromParent=Me,je.outerHeight=de,je.outerWidth=zt,je.removeClassName=Ht,je.removeEvent=ae,je.scheduleRemoveUserSelectStyles=gt;var St=Ut(80217),Xt=Ae(Ut(76172));function Ae(Ot,Zt){if(typeof WeakMap=="function")var Wt=new WeakMap,te=new WeakMap;return(Ae=function(we,pe){if(!pe&&we&&we.__esModule)return we;var Ke,_e,en={__proto__:null,default:we};if(we===null||typeof we!="object"&&typeof we!="function")return en;if(Ke=pe?te:Wt){if(Ke.has(we))return Ke.get(we);Ke.set(we,en)}for(const dn in we)dn!=="default"&&{}.hasOwnProperty.call(we,dn)&&((_e=(Ke=Object.defineProperty)&&Object.getOwnPropertyDescriptor(we,dn))&&(_e.get||_e.set)?Ke(en,dn,_e):en[dn]=we[dn]);return en})(Ot,Zt)}let xe="";function fe(Ot,Zt){return xe||(xe=(0,St.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(Wt){return(0,St.isFunction)(Ot[Wt])})),(0,St.isFunction)(Ot[xe])?Ot[xe](Zt):!1}function Rt(Ot,Zt,Wt){let te=Ot;do{if(fe(te,Zt))return!0;if(te===Wt)return!1;te=te.parentNode}while(te);return!1}function ie(Ot,Zt,Wt,te){if(!Ot)return;const we=Pd({capture:!0},te);Ot.addEventListener?Ot.addEventListener(Zt,Wt,we):Ot.attachEvent?Ot.attachEvent("on"+Zt,Wt):Ot["on"+Zt]=Wt}function ae(Ot,Zt,Wt,te){if(!Ot)return;const we=Pd({capture:!0},te);Ot.removeEventListener?Ot.removeEventListener(Zt,Wt,we):Ot.detachEvent?Ot.detachEvent("on"+Zt,Wt):Ot["on"+Zt]=null}function de(Ot){let Zt=Ot.clientHeight;const Wt=Ot.ownerDocument.defaultView.getComputedStyle(Ot);return Zt+=(0,St.int)(Wt.borderTopWidth),Zt+=(0,St.int)(Wt.borderBottomWidth),Zt}function zt(Ot){let Zt=Ot.clientWidth;const Wt=Ot.ownerDocument.defaultView.getComputedStyle(Ot);return Zt+=(0,St.int)(Wt.borderLeftWidth),Zt+=(0,St.int)(Wt.borderRightWidth),Zt}function Ie(Ot){let Zt=Ot.clientHeight;const Wt=Ot.ownerDocument.defaultView.getComputedStyle(Ot);return Zt-=(0,St.int)(Wt.paddingTop),Zt-=(0,St.int)(Wt.paddingBottom),Zt}function Yt(Ot){let Zt=Ot.clientWidth;const Wt=Ot.ownerDocument.defaultView.getComputedStyle(Ot);return Zt-=(0,St.int)(Wt.paddingLeft),Zt-=(0,St.int)(Wt.paddingRight),Zt}function Me(Ot,Zt,Wt){const we=Zt===Zt.ownerDocument.body?{left:0,top:0}:Zt.getBoundingClientRect(),pe=(Ot.clientX+Zt.scrollLeft-we.left)/Wt,Ke=(Ot.clientY+Zt.scrollTop-we.top)/Wt;return{x:pe,y:Ke}}function It(Ot,Zt){const Wt=et(Ot,Zt,"px");return{[(0,Xt.browserPrefixToKey)("transform",Xt.default)]:Wt}}function nt(Ot,Zt){return et(Ot,Zt,"")}function et(Ot,Zt,Wt){let{x:te,y:we}=Ot,pe=`translate(${te}${Wt},${we}${Wt})`;if(Zt){const Ke=`${typeof Zt.x=="string"?Zt.x:Zt.x+Wt}`,_e=`${typeof Zt.y=="string"?Zt.y:Zt.y+Wt}`;pe=`translate(${Ke}, ${_e})`+pe}return pe}function At(Ot,Zt){return Ot.targetTouches&&(0,St.findInArray)(Ot.targetTouches,Wt=>Zt===Wt.identifier)||Ot.changedTouches&&(0,St.findInArray)(Ot.changedTouches,Wt=>Zt===Wt.identifier)}function at(Ot){if(Ot.targetTouches&&Ot.targetTouches[0])return Ot.targetTouches[0].identifier;if(Ot.changedTouches&&Ot.changedTouches[0])return Ot.changedTouches[0].identifier}function dt(Ot){if(!Ot)return;let Zt=Ot.getElementById("react-draggable-style-el");Zt||(Zt=Ot.createElement("style"),Zt.type="text/css",Zt.id="react-draggable-style-el",Zt.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
`,Zt.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
`,Ot.getElementsByTagName("head")[0].appendChild(Zt)),Ot.body&&kt(Ot.body,"react-draggable-transparent-selection")}function gt(Ot){window.requestAnimationFrame?window.requestAnimationFrame(()=>{xt(Ot)}):xt(Ot)}function xt(Ot){if(Ot)try{if(Ot.body&&Ht(Ot.body,"react-draggable-transparent-selection"),Ot.selection)Ot.selection.empty();else{const Zt=(Ot.defaultView||window).getSelection();Zt&&Zt.type!=="Caret"&&Zt.removeAllRanges()}}catch(Zt){}}function kt(Ot,Zt){Ot.classList?Ot.classList.add(Zt):Ot.className.match(new RegExp(`(?:^|\\s)${Zt}(?!\\S)`))||(Ot.className+=` ${Zt}`)}function Ht(Ot,Zt){Ot.classList?Ot.classList.remove(Zt):Ot.className=Ot.className.replace(new RegExp(`(?:^|\\s)${Zt}(?!\\S)`,"g"),"")}},76172:function(mn,je){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.browserPrefixToKey=Xt,je.browserPrefixToStyle=Ae,je.default=void 0,je.getPrefix=St;const Ut=["Moz","Webkit","O","ms"];function St(){var ae,de;let Rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window=="undefined")return"";const ie=(de=(ae=window.document)==null?void 0:ae.documentElement)==null?void 0:de.style;if(!ie||Rt in ie)return"";for(let zt=0;zt<Ut.length;zt++)if(Xt(Rt,Ut[zt])in ie)return Ut[zt];return""}function Xt(Rt,ie){return ie?`${ie}${xe(Rt)}`:Rt}function Ae(Rt,ie){return ie?`-${ie.toLowerCase()}-${Rt}`:Rt}function xe(Rt){let ie="",ae=!0;for(let de=0;de<Rt.length;de++)ae?(ie+=Rt[de].toUpperCase(),ae=!1):Rt[de]==="-"?ae=!0:ie+=Rt[de];return ie}var fe=je.default=St()},97510:function(mn,je){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.default=Ut;function Ut(){}},22013:function(mn,je,Ut){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.canDragX=fe,je.canDragY=Rt,je.createCoreData=ae,je.createDraggableData=de,je.getBoundPosition=Ae,je.getControlPosition=ie,je.snapToGrid=xe;var St=Ut(80217),Xt=Ut(77026);function Ae(Yt,Me,It){if(!Yt.props.bounds)return[Me,It];let{bounds:nt}=Yt.props;nt=typeof nt=="string"?nt:zt(nt);const et=Ie(Yt);if(typeof nt=="string"){const{ownerDocument:At}=et,at=At.defaultView;let dt;if(nt==="parent"?dt=et.parentNode:dt=et.getRootNode().querySelector(nt),!(dt instanceof at.HTMLElement))throw new Error('Bounds selector "'+nt+'" could not find an element.');const gt=dt,xt=at.getComputedStyle(et),kt=at.getComputedStyle(gt);nt={left:-et.offsetLeft+(0,St.int)(kt.paddingLeft)+(0,St.int)(xt.marginLeft),top:-et.offsetTop+(0,St.int)(kt.paddingTop)+(0,St.int)(xt.marginTop),right:(0,Xt.innerWidth)(gt)-(0,Xt.outerWidth)(et)-et.offsetLeft+(0,St.int)(kt.paddingRight)-(0,St.int)(xt.marginRight),bottom:(0,Xt.innerHeight)(gt)-(0,Xt.outerHeight)(et)-et.offsetTop+(0,St.int)(kt.paddingBottom)-(0,St.int)(xt.marginBottom)}}return(0,St.isNum)(nt.right)&&(Me=Math.min(Me,nt.right)),(0,St.isNum)(nt.bottom)&&(It=Math.min(It,nt.bottom)),(0,St.isNum)(nt.left)&&(Me=Math.max(Me,nt.left)),(0,St.isNum)(nt.top)&&(It=Math.max(It,nt.top)),[Me,It]}function xe(Yt,Me,It){const nt=Math.round(Me/Yt[0])*Yt[0],et=Math.round(It/Yt[1])*Yt[1];return[nt,et]}function fe(Yt){return Yt.props.axis==="both"||Yt.props.axis==="x"}function Rt(Yt){return Yt.props.axis==="both"||Yt.props.axis==="y"}function ie(Yt,Me,It){const nt=typeof Me=="number"?(0,Xt.getTouch)(Yt,Me):null;if(typeof Me=="number"&&!nt)return null;const et=Ie(It),At=It.props.offsetParent||et.offsetParent||et.ownerDocument.body;return(0,Xt.offsetXYFromParent)(nt||Yt,At,It.props.scale)}function ae(Yt,Me,It){const nt=!(0,St.isNum)(Yt.lastX),et=Ie(Yt);return nt?{node:et,deltaX:0,deltaY:0,lastX:Me,lastY:It,x:Me,y:It}:{node:et,deltaX:Me-Yt.lastX,deltaY:It-Yt.lastY,lastX:Yt.lastX,lastY:Yt.lastY,x:Me,y:It}}function de(Yt,Me){const It=Yt.props.scale;return{node:Me.node,x:Yt.state.x+Me.deltaX/It,y:Yt.state.y+Me.deltaY/It,deltaX:Me.deltaX/It,deltaY:Me.deltaY/It,lastX:Yt.state.x,lastY:Yt.state.y}}function zt(Yt){return{left:Yt.left,top:Yt.top,right:Yt.right,bottom:Yt.bottom}}function Ie(Yt){const Me=Yt.findDOMNode();if(!Me)throw new Error("<DraggableCore>: Unmounted during event!");return Me}},80217:function(mn,je){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.dontSetMe=xe,je.findInArray=Ut,je.int=Ae,je.isFunction=St,je.isNum=Xt;function Ut(fe,Rt){for(let ie=0,ae=fe.length;ie<ae;ie++)if(Rt.apply(Rt,[fe[ie],ie,fe]))return fe[ie]}function St(fe){return typeof fe=="function"||Object.prototype.toString.call(fe)==="[object Function]"}function Xt(fe){return typeof fe=="number"&&!isNaN(fe)}function Ae(fe){return parseInt(fe,10)}function xe(fe,Rt,ie){if(fe[Rt])return new Error(`Invalid prop ${Rt} passed to ${ie} - do not set this, set it on the child.`)}},27774:function(mn,je){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.SizeSensorId=je.SensorTabIndex=je.SensorClassName=void 0;var Ut="size-sensor-id";je.SizeSensorId=Ut;var St="size-sensor-object";je.SensorClassName=St;var Xt="-1";je.SensorTabIndex=Xt},79301:function(mn,je){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.default=void 0;var Ut=function(Xt){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,xe=null;return function(){for(var fe=this,Rt=arguments.length,ie=new Array(Rt),ae=0;ae<Rt;ae++)ie[ae]=arguments[ae];clearTimeout(xe),xe=setTimeout(function(){Xt.apply(fe,ie)},Ae)}};je.default=Ut},79789:function(mn,je){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.default=void 0;var Ut=1,St=function(){return"".concat(Ut++)};je.default=St},47242:function(mn,je,Ut){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.ver=je.clear=je.bind=void 0;var St=Ut(95270),Xt=function(Rt,ie){var ae=(0,St.getSensor)(Rt);return ae.bind(ie),function(){ae.unbind(ie)}};je.bind=Xt;var Ae=function(Rt){var ie=(0,St.getSensor)(Rt);(0,St.removeSensor)(ie)};je.clear=Ae;var xe="1.0.2";je.ver=xe},95270:function(mn,je,Ut){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.removeSensor=je.getSensor=je.Sensors=void 0;var St=xe(Ut(79789)),Xt=Ut(57829),Ae=Ut(27774);function xe(de){return de&&de.__esModule?de:{default:de}}var fe={};je.Sensors=fe;function Rt(de){de&&fe[de]&&delete fe[de]}var ie=function(zt){var Ie=zt.getAttribute(Ae.SizeSensorId);if(Ie&&fe[Ie])return fe[Ie];var Yt=(0,St.default)();zt.setAttribute(Ae.SizeSensorId,Yt);var Me=(0,Xt.createSensor)(zt,function(){return Rt(Yt)});return fe[Yt]=Me,Me};je.getSensor=ie;var ae=function(zt){var Ie=zt.element.getAttribute(Ae.SizeSensorId);zt.destroy(),Rt(Ie)};je.removeSensor=ae},57829:function(mn,je,Ut){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.createSensor=void 0;var St=Ut(20953),Xt=Ut(55202),Ae=typeof ResizeObserver!="undefined"?Xt.createSensor:St.createSensor;je.createSensor=Ae},20953:function(mn,je,Ut){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.createSensor=void 0;var St=Ae(Ut(79301)),Xt=Ut(27774);function Ae(fe){return fe&&fe.__esModule?fe:{default:fe}}var xe=function(Rt,ie){var ae=void 0,de=[],zt=function(){getComputedStyle(Rt).position==="static"&&(Rt.style.position="relative");var et=document.createElement("object");return et.onload=function(){et.contentDocument.defaultView.addEventListener("resize",Ie),Ie()},et.style.display="block",et.style.position="absolute",et.style.top="0",et.style.left="0",et.style.height="100%",et.style.width="100%",et.style.overflow="hidden",et.style.pointerEvents="none",et.style.zIndex="-1",et.style.opacity="0",et.setAttribute("class",Xt.SensorClassName),et.setAttribute("tabindex",Xt.SensorTabIndex),et.type="text/html",Rt.appendChild(et),et.data="about:blank",et},Ie=(0,St.default)(function(){de.forEach(function(nt){nt(Rt)})}),Yt=function(et){ae||(ae=zt()),de.indexOf(et)===-1&&de.push(et)},Me=function(){ae&&ae.parentNode&&(ae.contentDocument&&ae.contentDocument.defaultView.removeEventListener("resize",Ie),ae.parentNode.removeChild(ae),Rt.removeAttribute(Xt.SizeSensorId),ae=void 0,de=[],ie&&ie())},It=function(et){var At=de.indexOf(et);At!==-1&&de.splice(At,1),de.length===0&&ae&&Me()};return{element:Rt,bind:Yt,destroy:Me,unbind:It}};je.createSensor=xe},55202:function(mn,je,Ut){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.createSensor=void 0;var St=Ut(27774),Xt=Ae(Ut(79301));function Ae(fe){return fe&&fe.__esModule?fe:{default:fe}}var xe=function(Rt,ie){var ae=void 0,de=[],zt=(0,Xt.default)(function(){de.forEach(function(nt){nt(Rt)})}),Ie=function(){var et=new ResizeObserver(zt);return et.observe(Rt),zt(),et},Yt=function(et){ae||(ae=Ie()),de.indexOf(et)===-1&&de.push(et)},Me=function(){ae.disconnect(),de=[],ae=void 0,Rt.removeAttribute(St.SizeSensorId),ie&&ie()},It=function(et){var At=de.indexOf(et);At!==-1&&de.splice(At,1),de.length===0&&ae&&Me()};return{element:Rt,bind:Yt,destroy:Me,unbind:It}};je.createSensor=xe},93314:function(mn){"use strict";mn.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(mn){"use strict";mn.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(mn){"use strict";mn.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(mn){"use strict";mn.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(mn,je,Ut){"use strict";Ut.d(je,{Z:function(){return ae}});const St=de=>typeof de=="object"&&de!=null&&de.nodeType===1,Xt=(de,zt)=>(!zt||de!=="hidden")&&de!=="visible"&&de!=="clip",Ae=(de,zt)=>{if(de.clientHeight<de.scrollHeight||de.clientWidth<de.scrollWidth){const Ie=getComputedStyle(de,null);return Xt(Ie.overflowY,zt)||Xt(Ie.overflowX,zt)||(Yt=>{const Me=(It=>{if(!It.ownerDocument||!It.ownerDocument.defaultView)return null;try{return It.ownerDocument.defaultView.frameElement}catch(nt){return null}})(Yt);return!!Me&&(Me.clientHeight<Yt.scrollHeight||Me.clientWidth<Yt.scrollWidth)})(de)}return!1},xe=(de,zt,Ie,Yt,Me,It,nt,et)=>It<de&&nt>zt||It>de&&nt<zt?0:It<=de&&et<=Ie||nt>=zt&&et>=Ie?It-de-Yt:nt>zt&&et<Ie||It<de&&et>Ie?nt-zt+Me:0,fe=de=>{const zt=de.parentElement;return zt==null?de.getRootNode().host||null:zt},Rt=(de,zt)=>{var Ie,Yt,Me,It;if(typeof document=="undefined")return[];const{scrollMode:nt,block:et,inline:At,boundary:at,skipOverflowHiddenElements:dt}=zt,gt=typeof at=="function"?at:Yn=>Yn!==at;if(!St(de))throw new TypeError("Invalid target");const xt=document.scrollingElement||document.documentElement,kt=[];let Ht=de;for(;St(Ht)&&gt(Ht);){if(Ht=fe(Ht),Ht===xt){kt.push(Ht);break}Ht!=null&&Ht===document.body&&Ae(Ht)&&!Ae(document.documentElement)||Ht!=null&&Ae(Ht,dt)&&kt.push(Ht)}const Ot=(Yt=(Ie=window.visualViewport)==null?void 0:Ie.width)!=null?Yt:innerWidth,Zt=(It=(Me=window.visualViewport)==null?void 0:Me.height)!=null?It:innerHeight,{scrollX:Wt,scrollY:te}=window,{height:we,width:pe,top:Ke,right:_e,bottom:en,left:dn}=de.getBoundingClientRect(),{top:yn,right:Nn,bottom:Kn,left:me}=(Yn=>{const nn=window.getComputedStyle(Yn);return{top:parseFloat(nn.scrollMarginTop)||0,right:parseFloat(nn.scrollMarginRight)||0,bottom:parseFloat(nn.scrollMarginBottom)||0,left:parseFloat(nn.scrollMarginLeft)||0}})(de);let ee=et==="start"||et==="nearest"?Ke-yn:et==="end"?en+Kn:Ke+we/2-yn+Kn,gn=At==="center"?dn+pe/2-me+Nn:At==="end"?_e+Nn:dn-me;const $n=[];for(let Yn=0;Yn<kt.length;Yn++){const nn=kt[Yn],{height:Tn,width:Gn,top:yi,right:Je,bottom:Le,left:tn}=nn.getBoundingClientRect();if(nt==="if-needed"&&Ke>=0&&dn>=0&&en<=Zt&&_e<=Ot&&(nn===xt&&!Ae(nn)||Ke>=yi&&en<=Le&&dn>=tn&&_e<=Je))return $n;const ti=getComputedStyle(nn),jn=parseInt(ti.borderLeftWidth,10),Gt=parseInt(ti.borderTopWidth,10),Ft=parseInt(ti.borderRightWidth,10),mt=parseInt(ti.borderBottomWidth,10);let vt=0,Lt=0;const Ct="offsetWidth"in nn?nn.offsetWidth-nn.clientWidth-jn-Ft:0,_t="offsetHeight"in nn?nn.offsetHeight-nn.clientHeight-Gt-mt:0,Pe="offsetWidth"in nn?nn.offsetWidth===0?0:Gn/nn.offsetWidth:0,ze="offsetHeight"in nn?nn.offsetHeight===0?0:Tn/nn.offsetHeight:0;if(xt===nn)vt=et==="start"?ee:et==="end"?ee-Zt:et==="nearest"?xe(te,te+Zt,Zt,Gt,mt,te+ee,te+ee+we,we):ee-Zt/2,Lt=At==="start"?gn:At==="center"?gn-Ot/2:At==="end"?gn-Ot:xe(Wt,Wt+Ot,Ot,jn,Ft,Wt+gn,Wt+gn+pe,pe),vt=Math.max(0,vt+te),Lt=Math.max(0,Lt+Wt);else{vt=et==="start"?ee-yi-Gt:et==="end"?ee-Le+mt+_t:et==="nearest"?xe(yi,Le,Tn,Gt,mt+_t,ee,ee+we,we):ee-(yi+Tn/2)+_t/2,Lt=At==="start"?gn-tn-jn:At==="center"?gn-(tn+Gn/2)+Ct/2:At==="end"?gn-Je+Ft+Ct:xe(tn,Je,Gn,jn,Ft+Ct,gn,gn+pe,pe);const{scrollLeft:wn,scrollTop:Ge}=nn;vt=ze===0?0:Math.max(0,Math.min(Ge+vt/ze,nn.scrollHeight-Tn/ze+_t)),Lt=Pe===0?0:Math.max(0,Math.min(wn+Lt/Pe,nn.scrollWidth-Gn/Pe+Ct)),ee+=Ge-vt,gn+=wn-Lt}$n.push({el:nn,top:vt,left:Lt})}return $n},ie=de=>de===!1?{block:"end",inline:"nearest"}:(zt=>zt===Object(zt)&&Object.keys(zt).length!==0)(de)?de:{block:"start",inline:"nearest"};function ae(de,zt){if(!de.isConnected||!(Me=>{let It=Me;for(;It&&It.parentNode;){if(It.parentNode===document)return!0;It=It.parentNode instanceof ShadowRoot?It.parentNode.host:It.parentNode}return!1})(de))return;const Ie=(Me=>{const It=window.getComputedStyle(Me);return{top:parseFloat(It.scrollMarginTop)||0,right:parseFloat(It.scrollMarginRight)||0,bottom:parseFloat(It.scrollMarginBottom)||0,left:parseFloat(It.scrollMarginLeft)||0}})(de);if((Me=>typeof Me=="object"&&typeof Me.behavior=="function")(zt))return zt.behavior(Rt(de,zt));const Yt=typeof zt=="boolean"||zt==null?void 0:zt.behavior;for(const{el:Me,top:It,left:nt}of Rt(de,ie(zt))){const et=It-Ie.top+Ie.bottom,At=nt-Ie.left+Ie.right;Me.scroll({top:et,left:At,behavior:Yt})}}}}]);
}());