|
|
!(function(){var sx=Object.defineProperty,ax=Object.defineProperties;var lx=Object.getOwnPropertyDescriptors;var km=Object.getOwnPropertySymbols;var ww=Object.prototype.hasOwnProperty,xw=Object.prototype.propertyIsEnumerable;var yw=(Bn,Ve,Ot)=>Ve in Bn?sx(Bn,Ve,{enumerable:!0,configurable:!0,writable:!0,value:Ot}):Bn[Ve]=Ot,Pd=(Bn,Ve)=>{for(var Ot in Ve||(Ve={}))ww.call(Ve,Ot)&&yw(Bn,Ot,Ve[Ot]);if(km)for(var Ot of km(Ve))xw.call(Ve,Ot)&&yw(Bn,Ot,Ve[Ot]);return Bn},Ay=(Bn,Ve)=>ax(Bn,lx(Ve));var Sw=(Bn,Ve)=>{var Ot={};for(var Pt in Bn)ww.call(Bn,Pt)&&Ve.indexOf(Pt)<0&&(Ot[Pt]=Bn[Pt]);if(Bn!=null&&km)for(var Pt of km(Bn))Ve.indexOf(Pt)<0&&xw.call(Bn,Pt)&&(Ot[Pt]=Bn[Pt]);return Ot};(self.webpackChunk=self.webpackChunk||[]).push([[342],{95869:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{Z:function(){return ue}});var Pt=Ot(72308),te=Ot(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"},Ce=Ae,de=Ot(7657),Rt=function(Wt,Ne){return te.createElement(de.Z,(0,Pt.Z)({},Wt,{ref:Ne,icon:Ce}))},ne=te.forwardRef(Rt),ue=ne},37036:function(){"use strict"},95625:function(){"use strict"},88010:function(Bn,Ve){"use strict";Ve.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},74413:function(){"use strict";function Bn(Ut,nt,et,At){et===void 0&&(et=0),At===void 0&&(At=1/0),this._name=Ut,this._defaultValue=nt,this._minimum=et,this._maximum=At}Object.defineProperty(Bn.prototype,"name",{get:function(){return this._name},set:function(Ut){if(typeof Ut!="string"||Ut==="")throw new Error("Shape name must be a valid string.");this._name=Ut}}),Object.defineProperty(Bn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Ut){if(typeof Ut!="number"||isNaN(Ut))throw new Error("The default value must be a real number, not: "+Ut);this._defaultValue=Ut}}),Object.defineProperty(Bn.prototype,"minimum",{get:function(){return this._minimum},set:function(Ut){if(typeof Ut!="number"||isNaN(Ut))throw new Error("Minimum must be a real number, not: "+Ut);this._minimum=Ut}}),Object.defineProperty(Bn.prototype,"maximum",{get:function(){return this._maximum},set:function(Ut){if(typeof Ut!="number"||isNaN(Ut))throw new Error("Maximum must be a real number, not: "+Ut);this._maximum=Ut}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Ut,nt){var et=go.Shape._FigureParameters[Ut];return et?et[nt]:null},go.Shape.setFigureParameter=function(Ut,nt,et){if(!(et instanceof Bn))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[Ut];At||(At=[],go.Shape._FigureParameters[Ut]=At),At[nt]=et};var Ve=[];function Ot(Ut,nt){var et=Ve.pop();return et===void 0?new go.Point(Ut,nt):(et.x=Ut,et.y=nt,et)}function Pt(){var Ut=Ve.pop();return Ut===void 0?new go.Point:Ut}function te(Ut){Ve.push(Ut)}function Ae(Ut,nt,et,At,at,ct,pt,xt,Mt){Mt||(Mt=new go.Point);var _t=Ut-et,Qt=at-pt,Vt=NaN,Zt=NaN;if(_t===0)if(Qt===0)Ut===et&&(Vt=Ut,Zt=nt);else{var $t=(ct-xt)/Qt,Pe=ct-$t*at;Vt=Ut,Zt=$t*Vt+Pe}else if(Qt===0){var me=(nt-At)/_t,$e=nt-me*Ut;Vt=at,Zt=me*Vt+$e}else{var me=(nt-At)/_t,$t=(ct-xt)/Qt,$e=nt-me*Ut,Pe=ct-$t*at;Vt=(Pe-$e)/(me-$t),Zt=me*Vt+$e}return Mt.x=Vt,Mt.y=Zt,Mt}function Ce(Ut,nt,et,At,at,ct,pt,xt,Mt,_t,Qt,Vt,Zt,$t){var Pe=1-Mt,me=Mt,$e=Ut*Pe+et*me,tn=nt*Pe+At*me,Cn=et*Pe+at*me,Tn=At*Pe+ct*me,In=at*Pe+pt*me,$n=ct*Pe+xt*me,Ln=$e*Pe+Cn*me,be=tn*Pe+Tn*me,re=Cn*Pe+In*me,Pn=Tn*Pe+$n*me,li=Ln*Pe+re*me,Jn=be*Pe+Pn*me;_t.x=$e,_t.y=tn,Qt.x=Ln,Qt.y=be,Vt.x=li,Vt.y=Jn,Zt.x=re,Zt.y=Pn,$t.x=In,$t.y=$n}var de=new go.Spot(.156,.156),Rt=new go.Spot(.844,.844),ne=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Bn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;(isNaN(At)||At<0)&&(At=5),At=Math.min(At,nt/3),At=Math.min(At,et/3);var at=At*ne,ct=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&&(ct.spot1=new go.Spot(0,0,at,at),ct.spot2=new go.Spot(1,1,-at,-at)),ct}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(Ut,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(Ut,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(Ut,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(Ut,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(Ut,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(Ut,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(Ut,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(Ut,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(Ut,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(Ut,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(Ut,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(Ut,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(Ut,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(Ut,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(Ut,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=de,at.spot2=Rt,at.defaultStretch=go.GraphObject.Uniform,at}),go.Shape.defineFigureGenerator("Line1",function(Ut,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(Ut,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(Ut,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,nt,et,ne*nt,0,nt,(1-ne)*et)))}),go.Shape.defineFigureGenerator("Curve2",function(Ut,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,nt,et,0,ne*et,(1-ne)*nt,et)))}),go.Shape.defineFigureGenerator("Curve3",function(Ut,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,ne*et,ne*nt,et)))}),go.Shape.defineFigureGenerator("Curve4",function(Ut,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,et,(1-ne)*nt,0,0,(1-ne)*et)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Ut,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(Ut,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(Ut,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(Ut,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 Bn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;isNaN(At)?At=.1:At<-1?At=-1:At>1&&(At=1);var at=Math.abs(At)*nt;if(At===0){var ct=new go.Geometry(go.Geometry.Rectangle);return ct.startX=0,ct.startY=0,ct.endX=nt,ct.endY=et,ct}else{var ct=new go.Geometry;return At>0?ct.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())):ct.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&&ct.setSpots(at/nt,0,(nt-at)/nt,1),ct}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new Bn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;isNaN(At)?At=10:At<-nt?At=-nt:At>nt&&(At=nt);var at=Math.abs(At);if(At===0){var ct=new go.Geometry(go.Geometry.Rectangle);return ct.startX=0,ct.startY=0,ct.endX=nt,ct.endY=et,ct}else{var ct=new go.Geometry;return At>0?ct.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())):ct.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&&ct.setSpots(at/nt,0,(nt-at)/nt,1),ct}}),go.Shape.setFigureParameter("Trapezoid1",0,new Bn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;isNaN(At)?At=.2:At<.5?At=-.5:At>.5&&(At=.5);var at=Math.abs(At)*nt;if(At===0){var ct=new go.Geometry(go.Geometry.Rectangle);return ct.startX=0,ct.startY=0,ct.endX=nt,ct.endY=et,ct}else{var ct=new go.Geometry;return At>0?ct.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())):ct.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&&ct.setSpots(at/nt,0,(nt-at)/nt,1),ct}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new Bn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(Ut,nt,et){var At=Ut?Ut.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 ct=new go.Geometry(go.Geometry.Rectangle);return ct.startX=0,ct.startY=0,ct.endX=nt,ct.endY=et,ct}else{var ct=new go.Geometry;return At>0?ct.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())):ct.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&&ct.setSpots(at/nt,0,(nt-at)/nt,1),ct}}),go.Shape.setFigureParameter("ManualOperation",0,new Bn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(Ut,nt,et){var At=Ut?Ut.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 ct=new go.Geometry(go.Geometry.Rectangle);return ct.startX=0,ct.startY=0,ct.endX=nt,ct.endY=et,ct}else{var ct=new go.Geometry;return At>0?ct.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())):ct.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&&ct.setSpots(at/nt,0,(nt-at)/nt,1),ct}});var ue=[];function ce(){var Ut=ue.pop();return Ut===void 0?[]:Ut}function Wt(Ut){Ut.length=0,ue.push(Ut)}function Ne(Ut){for(var nt=ce(),et=.5,At=.5,at=Math.PI*1.5,ct=0,pt=0;pt<Ut;pt++)ct=2*Math.PI/Ut*pt+at,nt[pt]=new go.Point(At+et*Math.cos(ct),At+et*Math.sin(ct));return nt.push(nt[0]),nt}function qt(Ut){var nt=Le(Ut),et=ce();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 Wt(nt),et}function Le(Ut){for(var nt=Ne(Ut),et=ce(),At=Math.floor(nt.length/2),at=nt.length-1,ct=Ut%2===0?2:1,pt=0;pt<at;pt++){var xt=nt[pt],Mt=nt[pt+1],_t=nt[(At+pt-1)%at],Qt=nt[(At+pt+ct)%at];et[pt*2]=xt,et[pt*2+1]=Ae(xt.x,xt.y,_t.x,_t.y,Mt.x,Mt.y,Qt.x,Qt.y,new go.Point)}return et[et.length]=et[0],Wt(nt),et}go.Shape.defineFigureGenerator("Pentagon",function(Ut,nt,et){var At=Ne(5),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<5;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.2,.22),at.spot2=new go.Spot(.8,.9),at}),go.Shape.defineFigureGenerator("Hexagon",function(Ut,nt,et){var At=Ne(6),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<6;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.07,.25),at.spot2=new go.Spot(.93,.75),at}),go.Shape.defineFigureGenerator("Heptagon",function(Ut,nt,et){var At=Ne(7),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<7;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.2,.15),at.spot2=new go.Spot(.8,.85),at}),go.Shape.defineFigureGenerator("Octagon",function(Ut,nt,et){var At=Ne(8),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<8;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.15,.15),at.spot2=new go.Spot(.85,.85),at}),go.Shape.defineFigureGenerator("Nonagon",function(Ut,nt,et){var At=Ne(9),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<9;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.17,.13),at.spot2=new go.Spot(.82,.82),at}),go.Shape.defineFigureGenerator("Decagon",function(Ut,nt,et){var At=Ne(10),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<10;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.16,.16),at.spot2=new go.Spot(.84,.84),at}),go.Shape.defineFigureGenerator("Dodecagon",function(Ut,nt,et){var At=Ne(12),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<12;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.16,.16),at.spot2=new go.Spot(.84,.84),at}),go.Shape.defineFigureGenerator("FivePointedStar",function(Ut,nt,et){var At=Le(5),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<10;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.266,.333),at.spot2=new go.Spot(.733,.733),at}),go.Shape.defineFigureGenerator("SixPointedStar",function(Ut,nt,et){var At=Le(6),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<12;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.17,.25),at.spot2=new go.Spot(.83,.75),at}),go.Shape.defineFigureGenerator("SevenPointedStar",function(Ut,nt,et){var At=Le(7),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<14;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.222,.277),at.spot2=new go.Spot(.777,.666),at}),go.Shape.defineFigureGenerator("EightPointedStar",function(Ut,nt,et){var At=Le(8),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<16;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.25,.25),at.spot2=new go.Spot(.75,.75),at}),go.Shape.defineFigureGenerator("NinePointedStar",function(Ut,nt,et){var At=Le(9),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<18;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.222,.277),at.spot2=new go.Spot(.777,.666),at}),go.Shape.defineFigureGenerator("TenPointedStar",function(Ut,nt,et){var At=Le(10),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<20;pt++)ct.add(new go.PathSegment(go.PathSegment.Line,At[pt].x*nt,At[pt].y*et));return ct.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Wt(At),at.spot1=new go.Spot(.281,.261),at.spot2=new go.Spot(.723,.748),at}),go.Shape.defineFigureGenerator("FivePointedBurst",function(Ut,nt,et){var At=qt(5),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<At.length;pt+=3)ct.add(new go.PathSegment(go.PathSegment.Bezier,At[pt+2].x*nt,At[pt+2].y*et,At[pt].x*nt,At[pt].y*et,At[pt+1].x*nt,At[pt+1].y*et));return ct.segments.last().close(),Wt(At),at.spot1=new go.Spot(.222,.277),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("SixPointedBurst",function(Ut,nt,et){var At=qt(6),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<At.length;pt+=3)ct.add(new go.PathSegment(go.PathSegment.Bezier,At[pt+2].x*nt,At[pt+2].y*et,At[pt].x*nt,At[pt].y*et,At[pt+1].x*nt,At[pt+1].y*et));return ct.segments.last().close(),Wt(At),at.spot1=new go.Spot(.17,.222),at.spot2=new go.Spot(.833,.777),at}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(Ut,nt,et){var At=qt(7),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<At.length;pt+=3)ct.add(new go.PathSegment(go.PathSegment.Bezier,At[pt+2].x*nt,At[pt+2].y*et,At[pt].x*nt,At[pt].y*et,At[pt+1].x*nt,At[pt+1].y*et));return ct.segments.last().close(),Wt(At),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("EightPointedBurst",function(Ut,nt,et){var At=qt(8),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<At.length;pt+=3)ct.add(new go.PathSegment(go.PathSegment.Bezier,At[pt+2].x*nt,At[pt+2].y*et,At[pt].x*nt,At[pt].y*et,At[pt+1].x*nt,At[pt+1].y*et));return ct.segments.last().close(),Wt(At),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("NinePointedBurst",function(Ut,nt,et){var At=qt(9),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<At.length;pt+=3)ct.add(new go.PathSegment(go.PathSegment.Bezier,At[pt+2].x*nt,At[pt+2].y*et,At[pt].x*nt,At[pt].y*et,At[pt+1].x*nt,At[pt+1].y*et));return ct.segments.last().close(),Wt(At),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("TenPointedBurst",function(Ut,nt,et){var At=qt(10),at=new go.Geometry,ct=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(ct);for(var pt=1;pt<At.length;pt+=3)ct.add(new go.PathSegment(go.PathSegment.Bezier,At[pt+2].x*nt,At[pt+2].y*et,At[pt].x*nt,At[pt].y*et,At[pt+1].x*nt,At[pt+1].y*et));return ct.segments.last().close(),Wt(At),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.setFigureParameter("FramedRectangle",0,new Bn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new Bn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN,at=Ut?Ut.parameter2:NaN;isNaN(At)&&(At=8),isNaN(at)&&(at=8);var ct=new go.Geometry,pt=new go.PathFigure(0,0,!0);return ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At<nt/2&&at<et/2&&(pt.add(new go.PathSegment(go.PathSegment.Move,At,at)),pt.add(new go.PathSegment(go.PathSegment.Line,At,et-at)),pt.add(new go.PathSegment(go.PathSegment.Line,nt-At,et-at)),pt.add(new go.PathSegment(go.PathSegment.Line,nt-At,at).close())),ct.setSpots(0,0,1,1,At,at,-At,-at),ct}),go.Shape.setFigureParameter("Ring",0,new Bn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;(isNaN(At)||At<0)&&(At=8);var at=nt/2,ct=new go.Geometry,pt=new go.PathFigure(nt,nt/2,!0);ct.add(pt),pt.add(new go.PathSegment(go.PathSegment.Arc,0,360,at,at,at,at).close());var xt=Math.max(at-At,0);return xt>0&&(pt.add(new go.PathSegment(go.PathSegment.Move,nt/2+xt,nt/2)),pt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,at,at,xt,xt).close())),ct.spot1=de,ct.spot2=Rt,ct.defaultStretch=go.GraphObject.Uniform,ct}),go.Shape.defineFigureGenerator("Cloud",function(Ut,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(Ut,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 Bn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Bn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN,at=Ut?Ut.parameter2:NaN;isNaN(At)&&(At=0),isNaN(at)&&(at=315);var ct=At%360;ct<0&&(ct+=360);var pt=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,ct,pt,xt,xt,xt,xt).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Ut,nt,et){var At=ne/Math.SQRT2*.5,at=Math.SQRT2/2,ct=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(nt,et,!0).add(new go.PathSegment(go.PathSegment.Bezier,at*nt,ct*et,nt,(1-At)*et,(at+At)*nt,(ct+At)*et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close()))}),go.Shape.setFigureParameter("ThickCross",0,new Bn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;(isNaN(At)||At<0)&&(At=30);var at=Math.min(At,nt)/2,ct=nt/2,pt=et/2;return new go.Geometry().add(new go.PathFigure(ct-at,0,!0).add(new go.PathSegment(go.PathSegment.Line,ct+at,0)).add(new go.PathSegment(go.PathSegment.Line,ct+at,pt-at)).add(new go.PathSegment(go.PathSegment.Line,nt,pt-at)).add(new go.PathSegment(go.PathSegment.Line,nt,pt+at)).add(new go.PathSegment(go.PathSegment.Line,ct+at,pt+at)).add(new go.PathSegment(go.PathSegment.Line,ct+at,et)).add(new go.PathSegment(go.PathSegment.Line,ct-at,et)).add(new go.PathSegment(go.PathSegment.Line,ct-at,pt+at)).add(new go.PathSegment(go.PathSegment.Line,0,pt+at)).add(new go.PathSegment(go.PathSegment.Line,0,pt-at)).add(new go.PathSegment(go.PathSegment.Line,ct-at,pt-at).close()))}),go.Shape.setFigureParameter("ThinCross",0,new Bn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;(isNaN(At)||At<0)&&(At=10);var at=Math.min(At,nt)/2,ct=nt/2,pt=et/2;return new go.Geometry().add(new go.PathFigure(ct-at,0,!0).add(new go.PathSegment(go.PathSegment.Line,ct+at,0)).add(new go.PathSegment(go.PathSegment.Line,ct+at,pt-at)).add(new go.PathSegment(go.PathSegment.Line,nt,pt-at)).add(new go.PathSegment(go.PathSegment.Line,nt,pt+at)).add(new go.PathSegment(go.PathSegment.Line,ct+at,pt+at)).add(new go.PathSegment(go.PathSegment.Line,ct+at,et)).add(new go.PathSegment(go.PathSegment.Line,ct-at,et)).add(new go.PathSegment(go.PathSegment.Line,ct-at,pt+at)).add(new go.PathSegment(go.PathSegment.Line,0,pt+at)).add(new go.PathSegment(go.PathSegment.Line,0,pt-at)).add(new go.PathSegment(go.PathSegment.Line,ct-at,pt-at).close()))}),go.Shape.setFigureParameter("ThickX",0,new Bn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Ut,nt,et){var At=Ut?Ut.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 ct=nt/2,pt=et/2,xt=Math.atan2(et,nt),Mt=At-Math.min(Math.cos(xt)*At/2,ct),_t=At-Math.min(Math.sin(xt)*At/2,pt),at=new go.Geometry,Qt=new go.PathFigure(Mt,0,!0);return at.add(Qt),Qt.add(new go.PathSegment(go.PathSegment.Line,ct,.2*et)),Qt.add(new go.PathSegment(go.PathSegment.Line,nt-Mt,0)),Qt.add(new go.PathSegment(go.PathSegment.Line,nt,_t)),Qt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,pt)),Qt.add(new go.PathSegment(go.PathSegment.Line,nt,et-_t)),Qt.add(new go.PathSegment(go.PathSegment.Line,nt-Mt,et)),Qt.add(new go.PathSegment(go.PathSegment.Line,ct,.8*et)),Qt.add(new go.PathSegment(go.PathSegment.Line,Mt,et)),Qt.add(new go.PathSegment(go.PathSegment.Line,0,et-_t)),Qt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,pt)),Qt.add(new go.PathSegment(go.PathSegment.Line,0,_t).close()),at}}),go.Shape.setFigureParameter("ThinX",0,new Bn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;(isNaN(At)||At<0)&&(At=10);var at=new go.Geometry,ct=new go.PathFigure(.1*nt,0,!0);return at.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,.1*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.5*et)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,.9*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.5*et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,.1*et).close()),at}),go.Shape.setFigureParameter("SquareIBeam",0,new Bn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;isNaN(At)&&(At=.2);var at=new go.Geometry,ct=new go.PathFigure(0,0,!0);return at.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,At*et)),ct.add(new go.PathSegment(go.PathSegment.Line,(.5+At/2)*nt,At*et)),ct.add(new go.PathSegment(go.PathSegment.Line,(.5+At/2)*nt,(1-At)*et)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,(1-At)*et)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,(1-At)*et)),ct.add(new go.PathSegment(go.PathSegment.Line,(.5-At/2)*nt,(1-At)*et)),ct.add(new go.PathSegment(go.PathSegment.Line,(.5-At/2)*nt,At*et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,At*et).close()),at}),go.Shape.setFigureParameter("RoundedIBeam",0,new Bn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;isNaN(At)&&(At=.5);var at=new go.Geometry,ct=new go.PathFigure(0,0,!0);return at.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.add(new go.PathSegment(go.PathSegment.Bezier,nt,et,Math.abs(1-At)*nt,.25*et,Math.abs(1-At)*nt,.75*et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,0,0,At*nt,.75*et,At*nt,.25*et).close()),at}),go.Shape.defineFigureGenerator("HalfEllipse",function(Ut,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,ne*nt,0,nt,(.5-ne/2)*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,(.5+ne/2)*et,ne*nt,et).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Ut,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(Ut,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(Ut,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(Ut,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 ct=.2,pt=.3,xt=0,Mt=ct*ne;return at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*nt,(.5+ct+xt)*et,(.5-ct+pt)*nt,(.5+Mt+xt)*et,(.5-Mt+pt)*nt,(.5+ct+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ct+pt)*nt,(.5+xt)*et,(.5+Mt+pt)*nt,(.5+ct+xt)*et,(.5+ct+pt)*nt,(.5+Mt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*nt,(.5-ct+xt)*et,(1-.5+ct+pt)*nt,(.5-Mt+xt)*et,(.5+Mt+pt)*nt,(.5-ct+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.65*nt,.36771243*et,(.5-Mt+pt)*nt,(.5-ct+xt)*et,(.5-ct+pt+.05)*nt,(.5-Mt+xt-.02)*et)),ct=.2,pt=0,xt=-.3,Mt=ct*ne,at.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ct+pt)*nt,(.5+xt)*et,(.5+Mt+pt)*nt,(.5+ct+xt)*et,(.5+ct+pt)*nt,(.5+Mt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*nt,(.5-ct+xt)*et,(1-.5+ct+pt)*nt,(.5-Mt+xt)*et,(.5+Mt+pt)*nt,(.5-ct+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ct+pt)*nt,(.5+xt)*et,(.5-Mt+pt)*nt,(.5-ct+xt)*et,(.5-ct+pt)*nt,(.5-Mt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Mt+pt)*nt,(.5+ct+xt)*et,(.5-ct+pt)*nt,(.5+Mt+xt)*et,(.5-Mt+pt)*nt,(.5+ct+xt)*et)),ct=.2,pt=-.3,xt=0,Mt=ct*ne,at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*nt,(.5-ct+xt)*et,(1-.5+ct+pt-.05)*nt,(.5-Mt+xt-.02)*et,(.5+Mt+pt)*nt,(.5-ct+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ct+pt)*nt,(.5+xt)*et,(.5-Mt+pt)*nt,(.5-ct+xt)*et,(.5-ct+pt)*nt,(.5-Mt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*nt,(.5+ct+xt)*et,(.5-ct+pt)*nt,(.5+Mt+xt)*et,(.5-Mt+pt)*nt,(.5+ct+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,.6*et,(.5+Mt+pt)*nt,(.5+ct+xt)*et,(.5+ct+pt)*nt,(.5+Mt+xt)*et).close()),At.setSpots(.06,.33,.93,.68),At}),go.Shape.defineFigureGenerator("YinYang",function(Ut,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 ct=.1,pt=.5,xt=.25;return at.add(new go.PathSegment(go.PathSegment.Move,(pt+ct)*nt,xt*et)),at.add(new go.PathSegment(go.PathSegment.Arc,0,-360,nt*pt,et*xt,ct*nt,ct*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((pt+ct)*nt,xt*et,!0),At.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,0,360,nt*pt,et*xt,ct*nt,ct*nt).close()),At.defaultStretch=go.GraphObject.Uniform,At}),go.Shape.defineFigureGenerator("Peace",function(Ut,nt,et){var At=.8535533905932737,at=.5*nt,ct=.5*et;return new go.Geometry().add(new go.PathFigure(at,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,at,ct,at,ct)).add(new go.PathSegment(go.PathSegment.Line,at,et)).add(new go.PathSegment(go.PathSegment.Move,at,ct)).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,At*et)).add(new go.PathSegment(go.PathSegment.Move,at,ct)).add(new go.PathSegment(go.PathSegment.Line,At*nt,At*et)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Ut,nt,et){var At=new go.Geometry,at=ne*.5,ct=.5,pt=.5,xt=.5,Mt=new go.PathFigure(pt*nt,(xt-ct)*et);At.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ct)*nt,xt*et,(pt-at)*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+ct)*et,(pt-ct)*nt,(xt+at)*et,(pt-at)*nt,(xt+ct)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,xt*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-ct)*et,(pt+ct)*nt,(xt-at)*et,(pt+at)*nt,(xt-ct)*et)),ct=.4,at=ne*.4;var _t=Pt(),Qt=Pt(),Vt=Pt(),Zt=Pt();Ce(pt,xt-ct,pt+at,xt-ct,pt+ct,xt-at,pt+ct,xt,.42,_t,Qt,Vt,Zt,Zt);var $t=Pt(),Pe=Pt(),me=Pt();Ce(pt,xt-ct,pt+at,xt-ct,pt+ct,xt-at,pt+ct,xt,.58,Zt,Zt,me,$t,Pe);var $e=Pt(),tn=Pt(),Cn=Pt();Ce(pt,xt+ct,pt-at,xt+ct,pt-ct,xt+at,pt-ct,xt,.42,$e,tn,Cn,Zt,Zt);var Tn=Pt(),In=Pt(),$n=Pt();return Ce(pt,xt+ct,pt-at,xt+ct,pt-ct,xt+at,pt-ct,xt,.58,Zt,Zt,$n,Tn,In),Mt.add(new go.PathSegment(go.PathSegment.Move,$n.x*nt,$n.y*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ct)*nt,xt*et,Tn.x*nt,Tn.y*et,In.x*nt,In.y*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,Vt.x*nt,Vt.y*et,_t.x*nt,_t.y*et,Qt.x*nt,Qt.y*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,$n.x*nt,$n.y*et).close()),Mt.add(new go.PathSegment(go.PathSegment.Move,Cn.x*nt,Cn.y*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,me.x*nt,me.y*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,xt*et,$t.x*nt,$t.y*et,Pe.x*nt,Pe.y*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,Cn.x*nt,Cn.y*et,$e.x*nt,$e.y*et,tn.x*nt,tn.y*et).close()),te(_t),te(Qt),te(Vt),te(Zt),te($t),te(Pe),te(me),te($e),te(tn),te(Cn),te(Tn),te(In),te($n),At.defaultStretch=go.GraphObject.Uniform,At}),go.Shape.defineFigureGenerator("Fragile",function(Ut,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 Bn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;(isNaN(At)||At<0)&&(At=30),At>nt&&(At=nt);var at=(nt-At)/2,ct=at+At;return new go.Geometry().add(new go.PathFigure(ct,.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(Ut,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(Ut,nt,et){var At=new go.Geometry,at=ne*.4,ct=.4,pt=.5,xt=.5,Mt=Pt(),_t=Pt(),Qt=Pt(),Vt=Pt(),Zt=new go.PathFigure((pt-ct)*nt,xt*et,!1);At.add(Zt),Zt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et)),Ce(pt,xt-ct,pt+at,xt-ct,pt+ct,xt-at,pt+ct,xt,.44,Qt,Vt,_t,Mt,Mt),Zt.add(new go.PathSegment(go.PathSegment.Bezier,_t.x*nt,_t.y*et,Qt.x*nt,Qt.y*et,Vt.x*nt,Vt.y*et));var $t=Ot(_t.x,_t.y);Ce(pt,xt-ct,pt+at,xt-ct,pt+ct,xt-at,pt+ct,xt,.56,Mt,Mt,_t,Qt,Vt);var Pe=Ot(_t.x,_t.y);Zt.add(new go.PathSegment(go.PathSegment.Line,($t.x*.1+.95*.9)*nt,$t.y*.1*et)),Zt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,$t.y*.1*et)),Zt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,0)),Zt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),Zt.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),Zt.add(new go.PathSegment(go.PathSegment.Line,(Pe.x*.1+.9)*nt,.15*et)),Zt.add(new go.PathSegment(go.PathSegment.Line,(Pe.x*.1+.9)*nt,(Pe.y*.1+.05*.9)*et)),Zt.add(new go.PathSegment(go.PathSegment.Line,Pe.x*nt,Pe.y*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,xt*et,Qt.x*nt,Qt.y*et,Vt.x*nt,Vt.y*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ct)*nt,xt*et,(pt-at)*nt,(xt+ct)*et,(pt-ct)*nt,(xt+at)*et)),ct=.35,at=ne*.35;var me=new go.PathFigure(pt*nt,(xt-ct)*et,!1);At.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ct)*nt,xt*et,(pt-at)*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et)),me.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+ct)*et,(pt-ct)*nt,(xt+at)*et,(pt-at)*nt,(xt+ct)*et)),me.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,xt*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),me.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-ct)*et,(pt+ct)*nt,(xt-at)*et,(pt+at)*nt,(xt-ct)*et));var $e=new go.PathFigure((pt-ct)*nt,xt*et,!1);return At.add($e),te(Mt),te(_t),te(Qt),te(Vt),te($t),te(Pe),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(Ut,nt,et){var At=new go.Geometry,at=.375,ct=0,pt=-.125,xt=at*ne,Mt=new go.PathFigure((.525+ct)*nt,(.5+at+pt)*et,!1);At.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+at+ct)*nt,(.5+pt)*et,(.5+xt+ct)*nt,(.5+at+pt)*et,(.5+at+ct)*nt,(.5+xt+pt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ct)*nt,(.5-at+pt)*et,(1-.5+at+ct)*nt,(.5-xt+pt)*et,(.5+xt+ct)*nt,(.5-at+pt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-at+ct)*nt,(.5+pt)*et,(.5-xt+ct)*nt,(.5-at+pt)*et,(.5-at+ct)*nt,(.5-xt+pt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(.475+ct)*nt,(.5+at+pt)*et,(.5-at+ct)*nt,(.5+xt+pt)*et,(.5-xt+ct)*nt,(.5+at+pt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,.85*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.85*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.9*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,.9*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.9*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.9*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.85*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.85*et).close()),at=.325,ct=0,pt=-.125,xt=at*ne;var Mt=new go.PathFigure((1-.5+at+ct)*nt,(.5+pt)*et,!1);At.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ct)*nt,(.5+at+pt)*et,(.5+at+ct)*nt,(.5+xt+pt)*et,(.5+xt+ct)*nt,(.5+at+pt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-at+ct)*nt,(.5+pt)*et,(.5-xt+ct)*nt,(.5+at+pt)*et,(.5-at+ct)*nt,(.5+xt+pt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ct)*nt,(.5-at+pt)*et,(.5-at+ct)*nt,(.5-xt+pt)*et,(.5-xt+ct)*nt,(.5-at+pt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+at+ct)*nt,(.5+pt)*et,(.5+xt+ct)*nt,(.5-at+pt)*et,(1-.5+at+ct)*nt,(.5-xt+pt)*et));var Mt=new go.PathFigure((.525+ct)*nt,(.5+at+pt)*et,!1);return At.add(Mt),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(Ut,nt,et){var At=Ut?Ut.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(Ut,nt,et){var At=Ut?Ut.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(Ut,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(Ut,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(Ut,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(Ut,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(Ut,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(Ut,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(Ut,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(Ut,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(Ut,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(Ut,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(Ut,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 Bn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Bn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;isNaN(At)&&(At=.3);var at=Ut?Ut.parameter2:NaN;isNaN(at)&&(at=.3);var ct=(1-At)*nt,pt=(.5-at/2)*et,xt=(.5+at/2)*et,Mt=new go.Geometry,_t=new go.PathFigure(0,pt,!0);Mt.add(_t),_t.add(new go.PathSegment(go.PathSegment.Line,ct,pt)),_t.add(new go.PathSegment(go.PathSegment.Line,ct,0)),_t.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),_t.add(new go.PathSegment(go.PathSegment.Line,ct,et)),_t.add(new go.PathSegment(go.PathSegment.Line,ct,xt)),_t.add(new go.PathSegment(go.PathSegment.Line,0,xt).close()),Mt.spot1=new go.Spot(0,pt/et);var Qt=Ae(0,xt/et,1,xt/et,ct/nt,1,1,.5,Pt());return Mt.spot2=new go.Spot(Qt.x,Qt.y),te(Qt),Mt}),go.Shape.setFigureParameter("Arrow2",0,new Bn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Bn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;isNaN(At)&&(At=30),At>nt&&(At=nt);var at=Ut?Ut.parameter2:NaN;isNaN(at)&&(at=30),at=Math.min(at,et/2);var ct=nt-At,pt=(et-at)/2,xt=pt+at,Mt=new go.Geometry,_t=new go.PathFigure(0,pt,!0);Mt.add(_t),_t.add(new go.PathSegment(go.PathSegment.Line,ct,pt)),_t.add(new go.PathSegment(go.PathSegment.Line,ct,0)),_t.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),_t.add(new go.PathSegment(go.PathSegment.Line,ct,et)),_t.add(new go.PathSegment(go.PathSegment.Line,ct,xt)),_t.add(new go.PathSegment(go.PathSegment.Line,0,xt).close()),Mt.spot1=new go.Spot(0,pt/et);var Qt=Ae(0,xt/et,1,xt/et,ct/nt,1,1,.5,Pt());return Mt.spot2=new go.Spot(Qt.x,Qt.y),te(Qt),Mt}),go.Shape.defineFigureGenerator("Chevron",function(Ut,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(Ut,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 Bn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;isNaN(At)&&(At=.3);var at=(.5-At/2)*et,ct=(.5+At/2)*et,pt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);pt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ct)),xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,ct)),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 Mt=Ae(0,.5,.3,0,0,at/et,.1,at/et,Pt());return pt.spot1=new go.Spot(Mt.x,Mt.y),Mt=Ae(.7,1,1,.5,0,ct/et,1,ct/et,Mt),pt.spot2=new go.Spot(Mt.x,Mt.y),te(Mt),pt}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Bn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Bn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;isNaN(At)&&(At=40);var at=Ut?Ut.parameter2:NaN;isNaN(at)&&(at=100);var ct=(et-At)/2,pt=ct+At,xt=(et-at)/2,Mt=xt+at;(At>et||at>et)&&(at>At?(At=At*et/at,ct=(et-At)/2,pt=ct+At,xt=0,Mt=et):(ct=0,pt=et,xt=0,Mt=et));var _t=new go.Geometry,Qt=new go.PathFigure(nt,.5*et,!0);_t.add(Qt),Qt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,Mt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,pt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,pt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,Mt)),Qt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),Qt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,xt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,ct)),Qt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ct)),Qt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,xt).close());var Vt=Ae(0,.5,.3,xt/et,0,ct/et,1,ct/et,Pt());return _t.spot1=new go.Spot(Vt.x,Vt.y),Vt=Ae(.7,Mt/et,1,.5,0,pt/et,1,pt/et,Vt),_t.spot2=new go.Spot(Vt.x,Vt.y),te(Vt),_t}),go.Shape.setFigureParameter("IBeamArrow",0,new Bn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;isNaN(At)&&(At=.3);var at=(.5-At/2)*et,ct=(.5+At/2)*et,pt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);pt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ct)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,ct)),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()),pt.spot1=new go.Spot(0,at/et);var Mt=Ae(.7,1,1,.5,0,ct/et,1,ct/et,Pt());return pt.spot2=new go.Spot(Mt.x,Mt.y),te(Mt),pt}),go.Shape.setFigureParameter("IBeamArrow2",0,new Bn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Bn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;isNaN(At)&&(At=40);var at=Ut?Ut.parameter2:NaN;isNaN(at)&&(at=100);var ct=(et-At)/2,pt=ct+At,xt=(et-at)/2,Mt=xt+at;(At>et||at>et)&&(at>At?(At=At*et/at,ct=(et-At)/2,pt=ct+At,xt=0,Mt=et):(ct=0,pt=et,xt=0,Mt=et));var _t=new go.Geometry,Qt=new go.PathFigure(nt,.5*et,!0);_t.add(Qt),Qt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,Mt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,pt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,pt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,Mt)),Qt.add(new go.PathSegment(go.PathSegment.Line,0,Mt)),Qt.add(new go.PathSegment(go.PathSegment.Line,0,xt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,xt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,ct)),Qt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ct)),Qt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,xt).close()),_t.spot1=new go.Spot(0,ct/et);var Vt=Ae(.7,Mt/et,1,.5,0,pt/et,1,pt/et,Pt());return _t.spot2=new go.Spot(Vt.x,Vt.y),te(Vt),_t}),go.Shape.setFigureParameter("Pointer",0,new Bn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;isNaN(At)&&(At=.1);var at=new go.Geometry,ct=new go.PathFigure(nt,.5*et,!0);at.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,0,et)),ct.add(new go.PathSegment(go.PathSegment.Line,At*nt,.5*et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),at.spot1=new go.Spot(At,.35);var pt=Ae(.2,.65,1,.65,0,1,1,.5,Pt());return at.spot2=new go.Spot(pt.x,pt.y),te(pt),at}),go.Shape.setFigureParameter("RoundedPointer",0,new Bn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;isNaN(At)&&(At=.3);var at=new go.Geometry,ct=new go.PathFigure(nt,.5*et,!0);at.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,0,et)),ct.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 pt=Ae(0,.65,1,.65,0,1,1,.5,Pt());return at.spot2=new go.Spot(pt.x,pt.y),te(pt),at}),go.Shape.setFigureParameter("SplitEndArrow",0,new Bn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;isNaN(At)&&(At=.4);var at=(.5-At/2)*et,ct=(.5+At/2)*et,pt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);pt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ct)),xt.add(new go.PathSegment(go.PathSegment.Line,0,ct)),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()),pt.spot1=new go.Spot(.2,.3);var Mt=Ae(.7,1,1,.5,0,ct/et,1,ct/et,Pt());return pt.spot2=new go.Spot(Mt.x,Mt.y),te(Mt),pt}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Bn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;isNaN(At)&&(At=50);var at=(et-At)/2,ct=at+At;At>et&&(at=0,ct=et);var pt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);pt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ct)),xt.add(new go.PathSegment(go.PathSegment.Line,0,ct)),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()),pt.spot1=new go.Spot(.2,at/et);var Mt=Ae(.7,1,1,.5,0,ct/et,1,ct/et,Pt());return pt.spot2=new go.Spot(Mt.x,Mt.y),te(Mt),pt}),go.Shape.setFigureParameter("SquareArrow",0,new Bn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;isNaN(At)&&(At=.7);var at=new go.Geometry,ct=new go.PathFigure(nt,.5*et,!0);return at.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,At*nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,0)),ct.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(Ut,nt,et){var At=new go.Geometry,at=ne*.5,ct=ne*.1,pt=new go.PathFigure(0,.9*et,!0);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+ct)*et,(.5+at)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-at)*nt,et,0,(.9+ct)*et).close()),At.spot1=new go.Spot(.25,.5),At.spot2=new go.Spot(.75,.97),At}),go.Shape.defineFigureGenerator("Cone2",function(Ut,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 ct=new go.PathFigure(0,.9*et,!1);return At.add(ct),ct.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(Ut,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 ct=new go.PathFigure(.5*nt,et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.3*et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,.15*et)),ct.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.3*et)),ct.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(Ut,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 ct=new go.PathFigure(0,.3*et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.3*et)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.add(new go.PathSegment(go.PathSegment.Move,.7*nt,.3*et)),ct.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(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;isNaN(At)&&(At=5),At=Math.min(At,et/3);var at=new go.Geometry,ct=ne*.5,pt=new go.PathFigure(0,At,!0);at.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,ne*At,(.5-ct)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,1*nt,At,(.5+ct)*nt,0,1*nt,ne*At)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et-At)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,1*et,1*nt,et-ne*At,(.5+ct)*nt,1*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-At,(.5-ct)*nt,1*et,0,et-ne*At)),pt.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-ne*At,(.5+ct)*nt,2*At)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,At,(.5-ct)*nt,2*At,0,2*At-ne*At)),at.spot1=new go.Spot(0,0,0,2*At),at.spot2=new go.Spot(1,1),at}),go.Shape.defineFigureGenerator("Cylinder2",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;isNaN(At)&&(At=5),At=Math.min(At,et/3);var at=new go.Geometry,ct=ne*.5,pt=new go.PathFigure(0,et-At,!0);at.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,0,At)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,ne*At,(.5-ct)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,At,(.5+ct)*nt,0,nt,ne*At)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et-At)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,et-ne*At,(.5+ct)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-At,(.5-ct)*nt,et,0,et-ne*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-ne*At,(.5-ct)*nt,et-2*At)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt,et-At,(.5+ct)*nt,et-2*At,nt,et-At-ne*At)),at.spot1=new go.Spot(0,0),at.spot2=new go.Spot(1,1,0,-2*At),at}),go.Shape.defineFigureGenerator("Cylinder3",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;isNaN(At)&&(At=5),At=Math.min(At,nt/3);var at=new go.Geometry,ct=ne*.5,pt=new go.PathFigure(At,0,!0);at.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt-At,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,nt-ne*At,0,nt,(.5-ct)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt-At,et,nt,(.5+ct)*et,nt-ne*At,et)),pt.add(new go.PathSegment(go.PathSegment.Line,At,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,ne*At,et,0,(.5+ct)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,At,0,0,(.5-ct)*et,ne*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+ne*At,0,2*At,(.5-ct)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,At,et,2*At,(.5+ct)*et,At+ne*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(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;isNaN(At)&&(At=5),At=Math.min(At,nt/3);var at=new go.Geometry,ct=ne*.5,pt=new go.PathFigure(nt-At,0,!0);at.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,nt-ne*At,0,nt,(.5-ct)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt-At,et,nt,(.5+ct)*et,nt-ne*At,et)),pt.add(new go.PathSegment(go.PathSegment.Line,At,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,ne*At,et,0,(.5+ct)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,At,0,0,(.5-ct)*et,ne*At,0)),pt.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-ne*At,0,nt-2*At,(.5-ct)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt-At,et,nt-2*At,(.5+ct)*et,nt-At-ne*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(Ut,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 ct=new go.PathFigure(.25*nt,.25*et,!1);return At.add(ct),ct.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(Ut,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 ct=new go.PathFigure(0,et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),ct.add(new go.PathSegment(go.PathSegment.Move,0,.25*et)),ct.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(Ut,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 ct=new go.PathFigure(.5*nt,0,!1);return At.add(ct),ct.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(Ut,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 ct=new go.PathFigure(.5*nt,0,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.7*et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,.85*et)),ct.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.7*et)),ct.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(Ut,nt,et){var At=new go.Geometry,at=.2,ct=.1,pt=ne*at,xt=ne*ct,Mt=.5,_t=.1,Qt=new go.PathFigure(Mt*nt,(_t+ct)*et,!0);At.add(Qt),Qt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-at)*nt,_t*et,(Mt-pt)*nt,(_t+ct)*et,(Mt-at)*nt,(_t+xt)*et)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(_t-ct)*et,(Mt-at)*nt,(_t-xt)*et,(Mt-pt)*nt,(_t-ct)*et)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+at)*nt,_t*et,(Mt+pt)*nt,(_t-ct)*et,(Mt+at)*nt,(_t-xt)*et)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(_t+ct)*et,(Mt+at)*nt,(_t+xt)*et,(Mt+pt)*nt,(_t+ct)*et));var Vt=.05,Zt=ne*Vt;Mt=.05,_t=.25;var $t=new go.PathFigure(.5*nt,.2*et,!0);return At.add($t),$t.add(new go.PathSegment(go.PathSegment.Line,.95*nt,.2*et)),Mt=.95,_t=.25,$t.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+Vt)*nt,_t*et,(Mt+Zt)*nt,(_t-Vt)*et,(Mt+Vt)*nt,(_t-Zt)*et)),$t.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.35*et)),Vt=.025,Zt=ne*Vt,Mt=.825,_t=.35,$t.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(_t-Vt)*et,(Mt+Vt)*nt,(_t-Zt)*et,(Mt+Zt)*nt,(_t-Vt)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-Vt)*nt,_t*et,(Mt-Zt)*nt,(_t-Vt)*et,(Mt-Vt)*nt,(_t-Zt)*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),$t.add(new go.PathSegment(go.PathSegment.Line,.55*nt,et)),$t.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.7*et)),Vt=.05,Zt=ne*Vt,Mt=.5,_t=.7,$t.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(_t-Vt)*et,(Mt+Vt)*nt,(_t-Zt)*et,(Mt+Zt)*nt,(_t-Vt)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-Vt)*nt,_t*et,(Mt-Zt)*nt,(_t-Vt)*et,(Mt-Vt)*nt,(_t-Zt)*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.45*nt,et)),$t.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),$t.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.35*et)),Vt=.025,Zt=ne*Vt,Mt=.175,_t=.35,$t.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(_t-Vt)*et,(Mt+Vt)*nt,(_t-Zt)*et,(Mt+Zt)*nt,(_t-Vt)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-Vt)*nt,_t*et,(Mt-Zt)*nt,(_t-Vt)*et,(Mt-Vt)*nt,(_t-Zt)*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et)),$t.add(new go.PathSegment(go.PathSegment.Line,0,.6*et)),$t.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),Vt=.05,Zt=ne*Vt,Mt=.05,_t=.25,$t.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(_t-Vt)*et,(Mt-Vt)*nt,(_t-Zt)*et,(Mt-Zt)*nt,(_t-Vt)*et)),$t.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 Bn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;isNaN(At)&&(At=.2);var at=new go.Geometry,ct=new go.PathFigure(nt,0,!0);return at.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,At*et)),ct.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(Ut,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 ct=new go.PathFigure(.5*nt,.5*et,!0);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et)),ct.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(Ut,nt,et){var At=new go.Geometry,at=Ut?Ut.parameter1:NaN;isNaN(at)&&(at=.1);var ct=new go.PathFigure(0,0,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var pt=new go.PathFigure(0,at*et,!1);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,at*et)),pt.add(new go.PathSegment(go.PathSegment.Move,0,(1-at)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,(1-at)*et)),At}),go.Shape.defineFigureGenerator("Database",function(Ut,nt,et){var At=new go.Geometry,at=ne*.5,ct=ne*.1,pt=new go.PathFigure(nt,.1*et,!0);At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+ct)*et,(.5+at)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-at)*nt,et,0,(.9+ct)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,(.1-ct)*et,(.5-at)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,(.5+at)*nt,0,nt,(.1-ct)*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+ct)*et,(.5+at)*nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*et,(.5-at)*nt,.2*et,0,(.1+ct)*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+ct)*et,(.5+at)*nt,.3*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*et,(.5-at)*nt,.3*et,0,(.2+ct)*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+ct)*et,(.5+at)*nt,.4*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*et,(.5-at)*nt,.4*et,0,(.3+ct)*et)),At.spot1=new go.Spot(0,.4),At.spot2=new go.Spot(1,.9),At}),go.Shape.defineFigureGenerator("DataStorage",function(Ut,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(Ut,nt,et){var At=new go.Geometry,at=ne*.5,ct=ne*.1,pt=new go.PathFigure(nt,.1*et,!0);At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+ct)*et,(.5+at)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-at)*nt,et,0,(.9+ct)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,(.1-ct)*et,(.5-at)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,(.5+at)*nt,0,nt,(.1-ct)*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+ct)*et,(.5+at)*nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*et,(.5-at)*nt,.2*et,0,(.1+ct)*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+ct)*et,(.5+at)*nt,.3*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*et,(.5-at)*nt,.3*et,0,(.2+ct)*et)),At.spot1=new go.Spot(0,.3),At.spot2=new go.Spot(1,.9),At}),go.Shape.defineFigureGenerator("Display",function(Ut,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(Ut,nt,et){var At=new go.Geometry,at=Ut?Ut.parameter1:NaN;isNaN(at)?at=.2:at<.15&&(at=.15);var ct=ne*.2,pt=new go.PathFigure(0,.2*et,!0);At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,0,(.2-ct)*et,(.2-ct)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.2*et,(.8+ct)*nt,0,nt,(.2-ct)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,et,nt,(.8+ct)*et,(.8+ct)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*et,(.2-ct)*nt,et,0,(.8+ct)*et)),pt.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(Ut,nt,et){var At=new go.Geometry,at=Ut?Ut.parameter1:NaN;(isNaN(at)||at<.1)&&(at=.1);var ct=new go.PathFigure(0,0,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var pt=new go.PathFigure(0,at*et,!1);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,at*et)),At}),go.Shape.defineFigureGenerator("Document",function(Ut,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(Ut,nt,et){var At=new go.Geometry,at=Ut?Ut.parameter1:NaN;(isNaN(at)||at<.2)&&(at=.2);var ct=new go.PathFigure(0,0,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var pt=new go.PathFigure(at*nt,0,!1);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,0,at*et)),pt.add(new go.PathSegment(go.PathSegment.Move,nt,at*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(1-at)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Move,0,(1-at)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Move,(1-at)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,(1-at)*et)),At}),go.Shape.defineFigureGenerator("ExternalProcess",function(Ut,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 ct=new go.PathFigure(.1*nt,.4*et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.6*et)),ct.add(new go.PathSegment(go.PathSegment.Move,.9*nt,.6*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),ct.add(new go.PathSegment(go.PathSegment.Move,.6*nt,.1*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.1*et)),ct.add(new go.PathSegment(go.PathSegment.Move,.4*nt,.9*et)),ct.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(Ut,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 ct=new go.PathFigure(.75*nt,0,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.25*et)),ct.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(Ut,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 ct=new go.PathFigure(nt,.5*et,!1);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et));var pt=new go.PathFigure(nt,.5*et,!1);return At.add(pt),pt.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(Ut,nt,et){var At=new go.Geometry,at=Ut?Ut.parameter1:NaN,ct=Ut?Ut.parameter2:NaN;isNaN(at)&&(at=.1),isNaN(ct)&&(ct=.1);var pt=new go.PathFigure(0,0,!0);At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),pt.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,ct*et)),xt.add(new go.PathSegment(go.PathSegment.Line,nt,ct*et)),At}),go.Shape.defineFigureGenerator("Junction",function(Ut,nt,et){var At=new go.Geometry,at=1/Math.SQRT2,ct=(1-1/Math.SQRT2)/2,pt=ne*.5,xt=.5,Mt=new go.PathFigure(nt,xt*et,!0);At.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,xt*nt,et,nt,(xt+pt)*et,(xt+pt)*nt,et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,0,xt*et,(xt-pt)*nt,et,0,(xt+pt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,xt*nt,0,0,(xt-pt)*et,(xt-pt)*nt,0)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,xt*et,(xt+pt)*nt,0,nt,(xt-pt)*et));var _t=new go.PathFigure((ct+at)*nt,(ct+at)*et,!1);return At.add(_t),_t.add(new go.PathSegment(go.PathSegment.Line,ct*nt,ct*et)),_t.add(new go.PathSegment(go.PathSegment.Move,ct*nt,(ct+at)*et)),_t.add(new go.PathSegment(go.PathSegment.Line,(ct+at)*nt,ct*et)),At}),go.Shape.defineFigureGenerator("LinedDocument",function(Ut,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 ct=new go.PathFigure(.1*nt,0,!1);return At.add(ct),ct.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(Ut,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(Ut,nt,et){var At=new go.Geometry,at=ne*.5,ct=.5,pt=new go.PathFigure(.5*nt,et,!0);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,ct*et,(ct-at)*nt,et,0,(ct+at)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,ct*nt,0,0,(ct-at)*et,(ct-at)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,ct*et,(ct+at)*nt,0,nt,(ct-at)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,(ct+.1)*nt,.9*et,nt,(ct+at)*et,(ct+at)*nt,.9*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),pt.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(Ut,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(Ut,nt,et){var At=new go.Geometry,at=Ut?Ut.parameter1:NaN;isNaN(at)&&(at=.7);var ct=new go.PathFigure(0,0,!0);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,at*nt,.5*et)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At.spot1=go.Spot.TopLeft,At}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Ut,nt,et){var At=new go.Geometry,at=Ut?Ut.parameter1:NaN;isNaN(at)&&(at=.25);var ct=new go.PathFigure(0,0,!0);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,at*et)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,(1-at)*et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At}),go.Shape.defineFigureGenerator("MicroformRecording",function(Ut,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(Ut,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 ct=new go.PathFigure(.1*nt,.2*et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.54*et)),ct.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.1*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.1*et)),ct.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(Ut,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 ct=new go.PathFigure(.2*nt,.1*et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.1*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),ct.add(new go.PathSegment(go.PathSegment.Move,.1*nt,.2*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),ct.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(Ut,nt,et){var At=new go.Geometry,at=Ut?Ut.parameter1:NaN;isNaN(at)&&(at=.1);var ct=1-at,pt=new go.PathFigure(0,0,!0);At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),pt.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(Ut,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(Ut,nt,et){var At=new go.Geometry,at=ne*.5,ct=.5,pt=new go.PathFigure(nt,ct*et,!0);At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,ct*nt,et,nt,(ct+at)*et,(ct+at)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,ct*et,(ct-at)*nt,et,0,(ct+at)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,ct*nt,0,0,(ct-at)*et,(ct-at)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,ct*et,(ct+at)*nt,0,nt,(ct-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(Ut,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(Ut,nt,et){var At=new go.Geometry,at=Ut?Ut.parameter1:NaN,ct=Ut?Ut.parameter2:NaN;isNaN(at)&&(at=.1),isNaN(ct)&&(ct=.3);var pt=new go.PathFigure(0,0,!0);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,(1-ct)*nt,.5*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Ut,nt,et){var At=new go.Geometry,at=Ut?Ut.parameter1:NaN,ct=Ut?Ut.parameter2:NaN;isNaN(at)&&(at=.1),isNaN(ct)&&(ct=.3);var pt=new go.PathFigure(0,0,!0);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,(1-ct)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(1-ct)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At}),go.Shape.defineFigureGenerator("Procedure",function(Ut,nt,et){var At=new go.Geometry,at=Ut?Ut.parameter1:NaN;isNaN(at)&&(at=.1);var ct=new go.PathFigure(0,0,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var pt=new go.PathFigure((1-at)*nt,0,!1);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,(1-at)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Move,at*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),At}),go.Shape.defineFigureGenerator("Process",function(Ut,nt,et){var At=new go.Geometry,at=Ut?Ut.parameter1:NaN;isNaN(at)&&(at=.1);var ct=new go.PathFigure(0,0,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var pt=new go.PathFigure(at*nt,0,!1);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),At.spot2=go.Spot.BottomRight,At}),go.Shape.defineFigureGenerator("Sort",function(Ut,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 ct=new go.PathFigure(0,.5*et,!1);return At.add(ct),ct.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(Ut,nt,et){var At=new go.Geometry,at=Ut?Ut.parameter1:NaN;isNaN(at)&&(at=.25);var ct=new go.PathFigure(at*nt,0,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*nt,.5*et,.25*nt,.5*et)),ct.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*nt,.5*et,.25*nt,.5*et));var pt=new go.PathFigure(at*nt,0,!1);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Move,(1-at)*nt,0)),pt.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(Ut,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(Ut,nt,et){var At=new go.Geometry,at=Ut?Ut.parameter1:NaN;isNaN(at)&&(at=.1);var ct=new go.PathFigure(0,0,!0);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,.75*nt,(1-at)*et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,(1-at)*et).close()),At.spot1=go.Spot.TopLeft,At}),go.Shape.defineFigureGenerator("AndGate",function(Ut,nt,et){var At=new go.Geometry,at=ne*.5,ct=new go.PathFigure(0,0,!0);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),ct.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(.5+at)*nt,0,nt,(.5-at)*et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.5+at)*et,(.5+at)*nt,et)),ct.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(Ut,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(Ut,nt,et){var At=new go.Geometry,at=ne*.5,ct=.5,pt=new go.PathFigure(nt,ct*et,!0);At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,ct*nt,et,nt,(ct+at)*et,(ct+at)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,ct*et,(ct-at)*nt,et,0,(ct+at)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,ct*nt,0,0,(ct-at)*et,(ct-at)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,ct*et,(ct+at)*nt,0,nt,(ct-at)*et));var xt=new go.PathFigure(nt,ct*et,!1);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt,ct*et));var Mt=new go.PathFigure(.8*nt,.75*et,!1);return At.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.25*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.25*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.75*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.75*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.25*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.25*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.75*et)),At}),go.Shape.defineFigureGenerator("Ground",function(Ut,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(Ut,nt,et){var At=new go.Geometry,at=ne*.1,ct=.1,pt=.9,xt=.5,Mt=new go.PathFigure(.8*nt,.5*et,!0);At.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Line,0,et)),Mt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Mt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et));var _t=new go.PathFigure((pt+ct)*nt,xt*et,!0);return At.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ct)*nt,xt*et,(pt-at)*nt,(xt+ct)*et,(pt-ct)*nt,(xt+at)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,xt*et,(pt+at)*nt,(xt-ct)*et,(pt+ct)*nt,(xt-at)*et)),At.spot1=new go.Spot(0,.25),At.spot2=new go.Spot(.4,.75),At}),go.Shape.defineFigureGenerator("NandGate",function(Ut,nt,et){var At=new go.Geometry,at=ne*.5,ct=ne*.4,pt=ne*.1,xt=.1,Mt=.9,_t=.5,Qt=new go.PathFigure(.8*nt,.5*et,!0);At.add(Qt),Qt.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,et,.8*nt,(.5+ct)*et,(.4+at)*nt,et)),Qt.add(new go.PathSegment(go.PathSegment.Line,0,et)),Qt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Qt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(.4+at)*nt,0,.8*nt,(.5-ct)*et));var Vt=new go.PathFigure((Mt+xt)*nt,_t*et,!0);return At.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(_t+xt)*et,(Mt+xt)*nt,(_t+pt)*et,(Mt+pt)*nt,(_t+xt)*et)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-xt)*nt,_t*et,(Mt-pt)*nt,(_t+xt)*et,(Mt-xt)*nt,(_t+pt)*et)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(_t-xt)*et,(Mt-xt)*nt,(_t-pt)*et,(Mt-pt)*nt,(_t-xt)*et)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+xt)*nt,_t*et,(Mt+pt)*nt,(_t-xt)*et,(Mt+xt)*nt,(_t-pt)*et)),At.spot1=new go.Spot(0,.05),At.spot2=new go.Spot(.55,.95),At}),go.Shape.defineFigureGenerator("NorGate",function(Ut,nt,et){var At=new go.Geometry,at=.5,ct=ne*at,pt=0,xt=.5,Mt=new go.PathFigure(.8*nt,.5*et,!0);At.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.7*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.75*et,.25*nt,.25*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(pt+ct)*nt,(xt-at)*et,.7*nt,(xt-ct)*et)),at=.1,ct=ne*.1,pt=.9,xt=.5;var _t=new go.PathFigure((pt-at)*nt,xt*et,!0);return At.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at)*nt,xt*et,(pt+ct)*nt,(xt-at)*et,(pt+at)*nt,(xt-ct)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(pt-at)*nt,xt*et,(pt-ct)*nt,(xt+at)*et,(pt-at)*nt,(xt+ct)*et)),At.spot1=new go.Spot(.2,.25),At.spot2=new go.Spot(.6,.75),At}),go.Shape.defineFigureGenerator("OrGate",function(Ut,nt,et){var At=new go.Geometry,at=.5,ct=ne*at,pt=0,xt=.5,Mt=new go.PathFigure(0,0,!0);return At.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(pt+ct+ct)*nt,(xt-at)*et,.8*nt,(xt-ct)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.8*nt,(xt+ct)*et,(pt+ct+ct)*nt,(xt+at)*et)),Mt.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(Ut,nt,et){var At=new go.Geometry,at=.5,ct=ne*at,pt=.2,xt=.5,Mt=new go.PathFigure(.1*nt,0,!1);At.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,et,.35*nt,.25*et,.35*nt,.75*et));var _t=new go.PathFigure(.8*nt,.5*et,!0);At.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,et,.7*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,.45*nt,.75*et,.45*nt,.25*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(pt+ct)*nt,(xt-at)*et,.7*nt,(xt-ct)*et)),at=.1,ct=ne*.1,pt=.9,xt=.5;var Qt=new go.PathFigure((pt-at)*nt,xt*et,!0);return At.add(Qt),Qt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at)*nt,xt*et,(pt+ct)*nt,(xt-at)*et,(pt+at)*nt,(xt-ct)*et)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-at)*nt,xt*et,(pt-ct)*nt,(xt+at)*et,(pt-at)*nt,(xt+ct)*et)),At.spot1=new go.Spot(.4,.25),At.spot2=new go.Spot(.65,.75),At}),go.Shape.defineFigureGenerator("XorGate",function(Ut,nt,et){var At=new go.Geometry,at=.5,ct=ne*at,pt=.2,xt=.5,Mt=new go.PathFigure(.1*nt,0,!1);At.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,et,.35*nt,.25*et,.35*nt,.75*et));var _t=new go.PathFigure(.2*nt,0,!0);return At.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(pt+ct)*nt,(xt-at)*et,.9*nt,(xt-ct)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,et,.9*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),_t.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(Ut,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(Ut,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(Ut,nt,et){var At=new go.Geometry,at=ne*.1,ct=.1,pt=.1,xt=.5,Mt=new go.PathFigure((pt-at*.5)*nt,et,!1);return At.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,0,(pt-at)*nt,et,(pt-ct)*nt,0)),pt=.3,Mt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,et,(pt+ct)*nt,0,(pt+at)*nt,et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,0,(pt-at)*nt,et,(pt-ct)*nt,0)),pt=.5,Mt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,et,(pt+ct)*nt,0,(pt+at)*nt,et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,0,(pt-at)*nt,et,(pt-ct)*nt,0)),pt=.7,Mt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,et,(pt+ct)*nt,0,(pt+at)*nt,et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,0,(pt-at)*nt,et,(pt-ct)*nt,0)),pt=.9,Mt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at*.5)*nt,et,(pt+ct)*nt,0,(pt+at)*nt,et)),At}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Ut,nt,et){var At=new go.Geometry,at=ne*.5,ct=.5,pt=.5,xt=.5,Mt=new go.PathFigure((pt-ct)*nt,xt*et,!1);return At.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,xt*et,(pt+at)*nt,(xt-ct)*et,(pt+ct)*nt,(xt-at)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ct)*nt,xt*et,(pt-at)*nt,(xt+ct)*et,(pt-ct)*nt,(xt+at)*et)),Mt.add(new go.PathSegment(go.PathSegment.Move,(pt-ct+.1)*nt,xt*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct-.1)*nt,xt*et,pt*nt,(xt-ct)*et,pt*nt,(xt+ct)*et)),At}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Ut,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(Ut,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(Ut,nt,et){var At=new go.Geometry,at=nt,ct=et;nt=nt*.38,et=et*.6;var pt=ne*.8,xt=.8,Mt=0,_t=.5,Qt=(at-nt)/2,Vt=(ct-et)/2,Zt=new go.PathFigure(Mt*nt+Qt,(_t+xt)*et+Vt,!0);At.add(Zt),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-xt)*nt+Qt,_t*et+Vt,(Mt-pt)*nt+Qt,(_t+xt)*et+Vt,(Mt-xt)*nt+Qt,(_t+pt)*et+Vt)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Qt,(_t-xt)*et+Vt,(Mt-xt)*nt+Qt,(_t-pt)*et+Vt,(Mt-pt)*nt+Qt,(_t-xt)*et+Vt)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-xt+pt*.5)*nt+Qt,_t*et+Vt,Mt*nt+Qt,(_t-xt)*et+Vt,(Mt-xt+pt*.5)*nt+Qt,(_t-pt)*et+Vt)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Qt,(_t+xt)*et+Vt,(Mt-xt+pt*.5)*nt+Qt,(_t+pt)*et+Vt,Mt*nt+Qt,(_t+xt)*et+Vt).close()),pt=ne*.4,xt=.4,Mt=.2,_t=.5;var $t=new go.PathFigure(Mt*nt+Qt,(_t+xt)*et+Vt,!0);At.add($t),$t.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-xt)*nt+Qt,_t*et+Vt,(Mt-pt)*nt+Qt,(_t+xt)*et+Vt,(Mt-xt)*nt+Qt,(_t+pt)*et+Vt)),$t.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Qt,(_t-xt)*et+Vt,(Mt-xt)*nt+Qt,(_t-pt)*et+Vt,(Mt-pt)*nt+Qt,(_t-xt)*et+Vt)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-xt+pt*.5)*nt+Qt,_t*et+Vt,Mt*nt+Qt,(_t-xt)*et+Vt,(Mt-xt+pt*.5)*nt+Qt,(_t-pt)*et+Vt)),$t.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Qt,(_t+xt)*et+Vt,(Mt-xt+pt*.5)*nt+Qt,(_t+pt)*et+Vt,Mt*nt+Qt,(_t+xt)*et+Vt).close()),pt=ne*.2,xt=.2,Mt=.5,_t=.5;var Pe=new go.PathFigure((Mt-xt)*nt+Qt,_t*et+Vt,!0);At.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Qt,(_t-xt)*et+Vt,(Mt-xt)*nt+Qt,(_t-pt)*et+Vt,(Mt-pt)*nt+Qt,(_t-xt)*et+Vt)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+xt)*nt+Qt,_t*et+Vt,(Mt+pt)*nt+Qt,(_t-xt)*et+Vt,(Mt+xt)*nt+Qt,(_t-pt)*et+Vt)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Qt,(_t+xt)*et+Vt,(Mt+xt)*nt+Qt,(_t+pt)*et+Vt,(Mt+pt)*nt+Qt,(_t+xt)*et+Vt)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-xt)*nt+Qt,_t*et+Vt,(Mt-pt)*nt+Qt,(_t+xt)*et+Vt,(Mt-xt)*nt+Qt,(_t+pt)*et+Vt)),pt=ne*.4,xt=.4,Mt=.8,_t=.5;var me=new go.PathFigure(Mt*nt+Qt,(_t-xt)*et+Vt,!0);At.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+xt)*nt+Qt,_t*et+Vt,(Mt+pt)*nt+Qt,(_t-xt)*et+Vt,(Mt+xt)*nt+Qt,(_t-pt)*et+Vt)),me.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Qt,(_t+xt)*et+Vt,(Mt+xt)*nt+Qt,(_t+pt)*et+Vt,(Mt+pt)*nt+Qt,(_t+xt)*et+Vt)),me.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+xt-pt*.5)*nt+Qt,_t*et+Vt,Mt*nt+Qt,(_t+xt)*et+Vt,(Mt+xt-pt*.5)*nt+Qt,(_t+pt)*et+Vt)),me.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Qt,(_t-xt)*et+Vt,(Mt+xt-pt*.5)*nt+Qt,(_t-pt)*et+Vt,Mt*nt+Qt,(_t-xt)*et+Vt).close()),pt=ne*.8,xt=.8,Mt=1,_t=.5;var $e=new go.PathFigure(Mt*nt+Qt,(_t-xt)*et+Vt,!0);return At.add($e),$e.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+xt)*nt+Qt,_t*et+Vt,(Mt+pt)*nt+Qt,(_t-xt)*et+Vt,(Mt+xt)*nt+Qt,(_t-pt)*et+Vt)),$e.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Qt,(_t+xt)*et+Vt,(Mt+xt)*nt+Qt,(_t+pt)*et+Vt,(Mt+pt)*nt+Qt,(_t+xt)*et+Vt)),$e.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+xt-pt*.5)*nt+Qt,_t*et+Vt,Mt*nt+Qt,(_t+xt)*et+Vt,(Mt+xt-pt*.5)*nt+Qt,(_t+pt)*et+Vt)),$e.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Qt,(_t-xt)*et+Vt,(Mt+xt-pt*.5)*nt+Qt,(_t-pt)*et+Vt,Mt*nt+Qt,(_t-xt)*et+Vt).close()),At}),go.Shape.defineFigureGenerator("Email",function(Ut,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 ct=new go.PathFigure(0,0,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ct.add(new go.PathSegment(go.PathSegment.Move,0,et)),ct.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.54*et)),ct.add(new go.PathSegment(go.PathSegment.Move,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.54*et)),At}),go.Shape.defineFigureGenerator("Ethernet",function(Ut,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 ct=new go.PathFigure(.1*nt,et,!0,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.6*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.6*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et).close());var pt=new go.PathFigure(.6*nt,et,!0,!0);At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.6*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.6*et)),pt.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(Ut,nt,et){var At=new go.Geometry,at=ne*.4,ct=.4,pt=.5,xt=.5,Mt=Pt(),_t=Pt(),Qt=Pt(),Vt=Pt();Ce(pt,xt-ct,pt+at,xt-ct,pt+ct,xt-at,pt+ct,xt,.5,Mt,Mt,_t,Qt,Vt);var Zt=Ot(_t.x,_t.y),$t=new go.PathFigure(_t.x*nt,_t.y*et,!0);At.add($t),$t.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,xt*et,Qt.x*nt,Qt.y*et,Vt.x*nt,Vt.y*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ct)*nt,xt*et,(pt-at)*nt,(xt+ct)*et,(pt-ct)*nt,(xt+at)*et)),Ce(pt-ct,xt,pt-ct,xt-at,pt-at,xt-ct,pt,xt-ct,.5,Qt,Vt,_t,Mt,Mt),$t.add(new go.PathSegment(go.PathSegment.Bezier,_t.x*nt,_t.y*et,Qt.x*nt,Qt.y*et,Vt.x*nt,Vt.y*et)),at=ne*.3,ct=.3,Ce(pt-ct,xt,pt-ct,xt-at,pt-at,xt-ct,pt,xt-ct,.5,Qt,Vt,_t,Mt,Mt),$t.add(new go.PathSegment(go.PathSegment.Line,_t.x*nt,_t.y*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ct)*nt,xt*et,Vt.x*nt,Vt.y*et,Qt.x*nt,Qt.y*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+ct)*et,(pt-ct)*nt,(xt+at)*et,(pt-at)*nt,(xt+ct)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,xt*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),Ce(pt,xt-ct,pt+at,xt-ct,pt+ct,xt-at,pt+ct,xt,.5,Mt,Mt,_t,Qt,Vt),$t.add(new go.PathSegment(go.PathSegment.Bezier,_t.x*nt,_t.y*et,Vt.x*nt,Vt.y*et,Qt.x*nt,Qt.y*et).close());var $t=new go.PathFigure(.45*nt,0,!0);return At.add($t),$t.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.5*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.5*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.55*nt,0).close()),te(Mt),te(_t),te(Qt),te(Vt),te(Zt),At.spot1=new go.Spot(.25,.45),At.spot2=new go.Spot(.75,.8),At}),go.Shape.defineFigureGenerator("Fallout",function(Ut,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 ct(pt,xt,Mt){pt.add(new go.PathSegment(go.PathSegment.Move,(.3+xt)*nt,(.8+Mt)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(.5+xt)*nt,(.5+Mt)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(.1+xt)*nt,(.5+Mt)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(.3+xt)*nt,(.8+Mt)*et).close())}return ct(at,0,0),ct(at,.4,0),ct(at,.2,-.3),At}),go.Shape.defineFigureGenerator("IrritationHazard",function(Ut,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(Ut,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(Ut,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(Ut,nt,et){var At=new go.Geometry,at=.5,ct=0,pt=0,xt=at*ne,Mt=.4*Math.SQRT2/2+.5,_t=.5-.5*Math.SQRT2/2,Qt=1,Vt=.5,Zt=.5,$t=0,Pe=new go.PathFigure(Mt*nt,(1-_t)*et,!1);return At.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Qt*nt,Vt*et,Qt*nt,.7*et,Qt*nt,Vt*et)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(Zt+ct)*nt,($t+ct)*et,(.5+at+ct)*nt,(.5-xt+ct)*et,(.5+xt+ct)*nt,(.5-at+ct)*et)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-at+ct)*nt,(.5+pt)*et,(.5-xt+ct)*nt,(.5-at+pt)*et,(.5-at+ct)*nt,(.5-xt+pt)*et)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.35+ct)*nt,.9*et,(.5-at+ct)*nt,(.5+xt+pt)*et,(.5-xt+ct)*nt,.9*et)),Pe.add(new go.PathSegment(go.PathSegment.Move,(.25+ct)*nt,.8*et)),Pe.add(new go.PathSegment(go.PathSegment.Line,(.35+ct)*nt,.9*et)),Pe.add(new go.PathSegment(go.PathSegment.Line,(.2+ct)*nt,.95*et)),At}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Ut,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(Ut,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(Ut,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);At.add(at);var ct=new go.PathFigure(nt,et,!1);At.add(ct);var pt=new go.PathFigure(0,.5*et,!1);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.5*et,.2*nt,.35*et,.3*nt,.35*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.7*nt,.65*et,.8*nt,.65*et)),At}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Ut,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(Ut,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(Ut,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 ct=new go.PathFigure(.45*nt,.73*et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.73*et)),ct.add(new go.PathSegment(go.PathSegment.Move,.38*nt,.5*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.63*nt,.5*et)),ct.add(new go.PathSegment(go.PathSegment.Move,.31*nt,.27*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.56*nt,.27*et)),At}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Ut,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);At.add(at);var ct=new go.PathFigure(.335*nt,(1-.555)*et,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.335*nt,(1-.405)*et)),ct.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.405)*et)),ct.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.555)*et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,nt,.68*et,(1-.12)*nt,.46*et,(1-.02)*nt,.54*et)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,.68*et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,.335*nt,(1-.555)*et,.02*nt,.54*et,.12*nt,.46*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.365*nt,(1-.595)*et));var pt=.5-.285,xt=.5,Mt=pt,_t=Math.PI/4,Qt=4*(1-Math.cos(_t))/(3*Math.sin(_t)),Vt=Qt*.5,Zt=pt,$t=pt,Pe=Qt*Zt,me=Qt*$t;ct.add(new go.PathSegment(go.PathSegment.Bezier,(xt-Zt)*nt,Mt*et,(xt-(Pe+Zt)/2)*nt,(Mt+($t+me)/2)*et,(xt-Zt)*nt,(Mt+me)*et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,xt*nt,(Mt-$t)*et,(xt-Zt)*nt,(Mt-me)*et,(xt-Pe)*nt,(Mt-$t)*et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,(xt+Zt)*nt,Mt*et,(xt+Pe)*nt,(Mt-$t)*et,(xt+Zt)*nt,(Mt-me)*et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*nt,(1-.595)*et,(xt+Zt)*nt,(Mt+me)*et,(xt+(Pe+Zt)/2)*nt,(Mt+($t+me)/2)*et)),ct.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*nt,(1-.595)*et)),ct.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.555)*et)),ct.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.405)*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.335*nt,(1-.405)*et));var $e=new go.PathFigure(.2*nt,et,!1);At.add($e),$e.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.8*et));var tn=new go.PathFigure(.8*nt,et,!1);return At.add(tn),tn.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.8*et)),At}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Ut,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 ct=new go.PathFigure(.2*nt,.2*et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),ct.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),ct.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.6*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.6*et)),ct.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.8*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.8*et)),At}),go.Shape.defineFigureGenerator("BpmnEventError",function(Ut,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(Ut,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);At.add(at);var ct=new go.PathFigure(nt,et,!1);At.add(ct);var pt=new go.PathFigure(.1*nt,et,!0);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et).close()),At}),go.Shape.defineFigureGenerator("Caution",function(Ut,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 ct=.05;return at.add(new go.PathSegment(go.PathSegment.Move,(.5-ct)*nt,.875*et)),at.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*nt,.875*et,ct*nt,ct*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(Ut,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 ct=new go.PathFigure(.475*nt,.2*et,!1);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.4*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.225*nt,.3*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.275*nt,.175*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.325*nt,.05*et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,.05*et,.35*nt,0,.375*nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.375*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.4*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.475*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.315*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.32*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.05*et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,.575*nt,0,.65*nt,.05*et,.625*nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,.38*nt,.0105*et));var pt=new go.PathFigure(.675*nt,.575*et,!1);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.875*nt,.525*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.775*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,.85*nt,.95*et,nt,.8*et,nt,.85*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.95*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.85*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.725*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.775*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.775*et)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.775*et)),pt.add(new go.PathSegment(go.PathSegment.Move,.675*nt,.575*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.775*nt,.775*et)),At}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Ut,nt,et){var At=new go.Geometry,at=.5,ct=ne*.5,pt=new go.PathFigure(nt,at*et,!0);At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Bezier,at*nt,et,nt,(at+ct)*et,(at+ct)*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,at*et,(at-ct)*nt,et,0,(at+ct)*et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,at*nt,0,0,(at-ct)*et,(at-ct)*nt,0)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt,at*et,(at+ct)*nt,0,nt,(at-ct)*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(Ut,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 ct=new go.PathFigure(0,.15*et,!0);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,0,0)),ct.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),ct.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(Ut,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 ct=new go.PathFigure(0,.2*et,!1);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et).close());var pt=new go.PathFigure(0,.5*et,!1);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et).close()),At}),go.Shape.defineFigureGenerator("Component",function(Ut,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 ct=new go.PathFigure(0,.2*et,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.2*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.4*et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,.4*et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,.2*et).close());var pt=new go.PathFigure(0,.6*et,!0);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.6*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.8*et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),pt.add(new go.PathSegment(go.PathSegment.Line,0,.6*et).close()),At}),go.Shape.defineFigureGenerator("Boat Shipment",function(Ut,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 ct=new go.PathFigure(.15*nt,.6*et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),At}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Ut,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(Ut,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(Ut,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(Ut,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 ct=new go.PathFigure(nt,.8*et,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.4*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.8*et)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et).close());var pt=.1,xt=ne*.1,Mt=.2,_t=.9,Qt=new go.PathFigure((Mt-pt)*nt,_t*et,!0);At.add(Qt),Qt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(_t-pt)*et,(Mt-pt)*nt,(_t-xt)*et,(Mt-xt)*nt,(_t-pt)*et)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+pt)*nt,_t*et,(Mt+xt)*nt,(_t-pt)*et,(Mt+pt)*nt,(_t-xt)*et)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(_t+pt)*et,(Mt+pt)*nt,(_t+xt)*et,(Mt+xt)*nt,(_t+pt)*et)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-pt)*nt,_t*et,(Mt-xt)*nt,(_t+pt)*et,(Mt-pt)*nt,(_t+xt)*et).close()),pt=.1,xt=ne*.1,Mt=.8,_t=.9;var Vt=new go.PathFigure((Mt-pt)*nt,_t*et,!0);return At.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(_t-pt)*et,(Mt-pt)*nt,(_t-xt)*et,(Mt-xt)*nt,(_t-pt)*et)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+pt)*nt,_t*et,(Mt+xt)*nt,(_t-pt)*et,(Mt+pt)*nt,(_t-xt)*et)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(_t+pt)*et,(Mt+pt)*nt,(_t+xt)*et,(Mt+xt)*nt,(_t+pt)*et)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-pt)*nt,_t*et,(Mt-xt)*nt,(_t+pt)*et,(Mt-pt)*nt,(_t+xt)*et).close()),At}),go.Shape.defineFigureGenerator("KanbanPost",function(Ut,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(Ut,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 ct=new go.PathFigure(0,.5*et,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.8*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),ct.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var pt=new go.PathFigure(.5*nt,.8*et,!0);At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.1*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.1*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.8*et)),pt.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 Mt=.1,_t=ne*.1,Qt=.1,Vt=.9,Zt=new go.PathFigure((Qt-Mt)*nt,Vt*et,!0);At.add(Zt),Zt.add(new go.PathSegment(go.PathSegment.Bezier,Qt*nt,(Vt-Mt)*et,(Qt-Mt)*nt,(Vt-_t)*et,(Qt-_t)*nt,(Vt-Mt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(Qt+Mt)*nt,Vt*et,(Qt+_t)*nt,(Vt-Mt)*et,(Qt+Mt)*nt,(Vt-_t)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,Qt*nt,(Vt+Mt)*et,(Qt+Mt)*nt,(Vt+_t)*et,(Qt+_t)*nt,(Vt+Mt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(Qt-Mt)*nt,Vt*et,(Qt-_t)*nt,(Vt+Mt)*et,(Qt-Mt)*nt,(Vt+_t)*et)),Mt=.1,_t=ne*.1,Qt=.4,Vt=.9;var $t=new go.PathFigure((Qt-Mt)*nt,Vt*et,!0);return At.add($t),$t.add(new go.PathSegment(go.PathSegment.Bezier,Qt*nt,(Vt-Mt)*et,(Qt-Mt)*nt,(Vt-_t)*et,(Qt-_t)*nt,(Vt-Mt)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(Qt+Mt)*nt,Vt*et,(Qt+_t)*nt,(Vt-Mt)*et,(Qt+Mt)*nt,(Vt-_t)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,Qt*nt,(Vt+Mt)*et,(Qt+Mt)*nt,(Vt+_t)*et,(Qt+_t)*nt,(Vt+Mt)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(Qt-Mt)*nt,Vt*et,(Qt-_t)*nt,(Vt+Mt)*et,(Qt-Mt)*nt,(Vt+_t)*et)),At}),go.Shape.defineFigureGenerator("RailShipment",function(Ut,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 ct=new go.PathFigure(.45*nt,.7*et,!1);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.7*et));var pt=new go.PathFigure(.55*nt,.4*et,!0);At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.9*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.9*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.4*et).close());var Qt=.05,Vt=ne*.05,Zt=.175,$t=.95,xt=new go.PathFigure((Zt-Qt)*nt,$t*et,!0);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,Zt*nt,($t-Qt)*et,(Zt-Qt)*nt,($t-Vt)*et,(Zt-Vt)*nt,($t-Qt)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,(Zt+Qt)*nt,$t*et,(Zt+Vt)*nt,($t-Qt)*et,(Zt+Qt)*nt,($t-Vt)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,Zt*nt,($t+Qt)*et,(Zt+Qt)*nt,($t+Vt)*et,(Zt+Vt)*nt,($t+Qt)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,(Zt-Qt)*nt,$t*et,(Zt-Vt)*nt,($t+Qt)*et,(Zt-Qt)*nt,($t+Vt)*et));var Qt=.05,Vt=ne*.05,Zt=.375,$t=.95,Mt=new go.PathFigure((Zt-Qt)*nt,$t*et,!0);At.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,Zt*nt,($t-Qt)*et,(Zt-Qt)*nt,($t-Vt)*et,(Zt-Vt)*nt,($t-Qt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(Zt+Qt)*nt,$t*et,(Zt+Vt)*nt,($t-Qt)*et,(Zt+Qt)*nt,($t-Vt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,Zt*nt,($t+Qt)*et,(Zt+Qt)*nt,($t+Vt)*et,(Zt+Vt)*nt,($t+Qt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(Zt-Qt)*nt,$t*et,(Zt-Vt)*nt,($t+Qt)*et,(Zt-Qt)*nt,($t+Vt)*et));var Qt=.05,Vt=ne*.05,Zt=.625,$t=.95,_t=new go.PathFigure((Zt-Qt)*nt,$t*et,!0);At.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,Zt*nt,($t-Qt)*et,(Zt-Qt)*nt,($t-Vt)*et,(Zt-Vt)*nt,($t-Qt)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(Zt+Qt)*nt,$t*et,(Zt+Vt)*nt,($t-Qt)*et,(Zt+Qt)*nt,($t-Vt)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,Zt*nt,($t+Qt)*et,(Zt+Qt)*nt,($t+Vt)*et,(Zt+Vt)*nt,($t+Qt)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(Zt-Qt)*nt,$t*et,(Zt-Vt)*nt,($t+Qt)*et,(Zt-Qt)*nt,($t+Vt)*et));var Qt=.05,Vt=ne*.05,Zt=.825,$t=.95,Pe=new go.PathFigure((Zt-Qt)*nt,$t*et,!0);At.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Zt*nt,($t-Qt)*et,(Zt-Qt)*nt,($t-Vt)*et,(Zt-Vt)*nt,($t-Qt)*et)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(Zt+Qt)*nt,$t*et,(Zt+Vt)*nt,($t-Qt)*et,(Zt+Qt)*nt,($t-Vt)*et)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Zt*nt,($t+Qt)*et,(Zt+Qt)*nt,($t+Vt)*et,(Zt+Vt)*nt,($t+Qt)*et)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(Zt-Qt)*nt,$t*et,(Zt-Vt)*nt,($t+Qt)*et,(Zt-Qt)*nt,($t+Vt)*et).close());var me=new go.PathFigure(0,et,!1);return At.add(me),me.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),At}),go.Shape.defineFigureGenerator("Warehouse",function(Ut,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 ct=new go.PathFigure(0,.2*et,!1);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et).close());var pt=new go.PathFigure(.15*nt,et,!0);At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.5*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.5*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),pt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et).close());var xt=.05,Mt=ne*.05,_t=.35,Qt=.775,Vt=new go.PathFigure((_t-xt)*nt,Qt*et,!0);return At.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,_t*nt,(Qt-xt)*et,(_t-xt)*nt,(Qt-Mt)*et,(_t-Mt)*nt,(Qt-xt)*et)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(_t+xt)*nt,Qt*et,(_t+Mt)*nt,(Qt-xt)*et,(_t+xt)*nt,(Qt-Mt)*et)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,_t*nt,(Qt+xt)*et,(_t+xt)*nt,(Qt+Mt)*et,(_t+Mt)*nt,(Qt+xt)*et)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(_t-xt)*nt,Qt*et,(_t-Mt)*nt,(Qt+xt)*et,(_t-xt)*nt,(Qt+Mt)*et).close()),At}),go.Shape.defineFigureGenerator("ControlCenter",function(Ut,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(Ut,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(Ut,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(Ut,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(Ut,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(Ut,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(Ut,nt,et){var At=new go.Geometry,at=.3,ct=ne*.3,pt=.5,xt=.7,Mt=new go.PathFigure((pt-at)*nt,xt*et,!0);At.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at)*nt,xt*et,(pt+ct)*nt,(xt-at)*et,(pt+at)*nt,(xt-ct)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-at)*nt,xt*et,(pt-ct)*nt,(xt+at)*et,(pt-at)*nt,(xt+ct)*et));var _t=new go.PathFigure(0,.7*et,!1);return At.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,nt,.7*et,0,0,nt,0)),At}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Ut,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(Ut,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(Ut,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 ct=new go.PathFigure(0,.6*et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Move,0,.4*et)),ct.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),At}),go.Shape.defineFigureGenerator("Delete",function(Ut,nt,et){var At=new go.Geometry,at=.5,ct=ne*.5,pt=.5,xt=.5,Mt=new go.PathFigure((pt-at)*nt,xt*et,!0);At.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at)*nt,xt*et,(pt+ct)*nt,(xt-at)*et,(pt+at)*nt,(xt-ct)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-at)*nt,xt*et,(pt-ct)*nt,(xt+at)*et,(pt-at)*nt,(xt+ct)*et));var _t=new go.PathFigure(.15*nt,.5*et,!1);return At.add(_t),_t.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.5*et)),At}),go.Shape.defineFigureGenerator("Flag",function(Ut,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(Ut,nt,et){var At=new go.Geometry,at=.5,ct=ne*.5,pt=.5,xt=.5,Mt=new go.PathFigure((pt-at)*nt,xt*et,!1);At.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at)*nt,xt*et,(pt+ct)*nt,(xt-at)*et,(pt+at)*nt,(xt-ct)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-at)*nt,xt*et,(pt-ct)*nt,(xt+at)*et,(pt-at)*nt,(xt+ct)*et).close()),at=.05,ct=ne*.05,pt=.5,xt=.8;var _t=new go.PathFigure((pt-at)*nt,xt*et,!1);return At.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at)*nt,xt*et,(pt+ct)*nt,(xt-at)*et,(pt+at)*nt,(xt-ct)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(pt-at)*nt,xt*et,(pt-ct)*nt,(xt+at)*et,(pt-at)*nt,(xt+ct)*et).close()),_t.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.7*et)),_t.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),_t.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,.75*nt,.475*et,.75*nt,.225*et)),_t.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(Ut,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(Ut,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 ct=new go.PathFigure(.2*nt,.5*et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.5*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.3*et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.3*et,.25*nt,0,.75*nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.3*et)),At}),go.Shape.defineFigureGenerator("Unlocked",function(Ut,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 ct=new go.PathFigure(.2*nt,.5*et,!1);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.5*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.3*et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.3*et,.25*nt,0,.75*nt,0)),ct.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.35*et)),At}),go.Shape.defineFigureGenerator("Gear",function(Ut,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(Ut,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(Ut,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(Ut,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 ct=new go.PathFigure(0,et*.6,!0);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0).close()),At}),go.Shape.defineFigureGenerator("Pencil",function(Ut,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(Ut,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 ct=new go.PathFigure(.126*nt,.85*et,!1);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,.126*nt,.45*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.322*nt,.45*et)),ct.add(new go.PathSegment(go.PathSegment.Line,.322*nt,.85*et).close());var pt=new go.PathFigure(.402*nt,.85*et,!1);At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,.402*nt,.45*et)),pt.add(new go.PathSegment(go.PathSegment.Line,.598*nt,.45*et)),pt.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 Mt=new go.PathFigure(.5*nt,.1*et,!1);return At.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*nt,.3*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*nt,.3*et).close()),At}),go.Shape.defineFigureGenerator("Staircase",function(Ut,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(Ut,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 ct=new go.PathFigure(nt*.204,et,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.204,et*(1-.184))),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.388,et*(1-.184*2))),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.388,et*1).close());var pt=new go.PathFigure(nt*.408,et,!0);At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.408,et*(1-.184*2))),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.592,et*(1-.184*3))),pt.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 Mt=new go.PathFigure(nt*.816,et,!0);return At.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*.816,et*(1-.184*4))),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-.184*5))),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1).close()),At}),go.Shape.defineFigureGenerator("PC",function(Ut,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 ct=new go.PathFigure(nt*.055,.07*et,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.07)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.1)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.1).close());var pt=new go.PathFigure(nt*.055,.13*et,!0);At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.13)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.16)),pt.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 Mt=new go.PathFigure(nt*1,0,!0);return At.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,0)),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.65)),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.65).close()),At}),go.Shape.defineFigureGenerator("Plane",function(Ut,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(Ut,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(Ut,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 ct=new go.PathFigure(0,0,!1);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*0)),ct.add(new go.PathSegment(go.PathSegment.Arc,270,-180,nt*1,nt*.3,nt*.055)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1));var pt=new go.PathFigure(nt*.11,et*.1,!1);At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*0),et*.1)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*0),et*.8)),pt.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 Mt=new go.PathFigure(nt*(.11+.24133333*2+.028*2),et*.1,!1);return At.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*3+.028*2),et*.1)),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*3+.028*2),et*.8)),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*2),et*.8).close()),At}),go.Shape.defineFigureGenerator("FloppyDisk",function(Ut,nt,et){var At=new go.Geometry,at=8,ct=at*ne,pt=new go.PathFigure(at,0,!1);At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.86,0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.14)),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et-at)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt-at,et,nt,et-ct,nt-ct,et)),pt.add(new go.PathSegment(go.PathSegment.Line,at,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-at,ct,et,0,et-ct)),pt.add(new go.PathSegment(go.PathSegment.Line,0,at)),pt.add(new go.PathSegment(go.PathSegment.Bezier,at,0,0,ct,ct,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 Mt=new go.PathFigure(nt*.83,et*1,!1);At.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*.83,et*.5)),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*.5)),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*1).close());var _t=new go.PathFigure(nt*.78,et*.05,!1);return At.add(_t),_t.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.05)),_t.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.25)),_t.add(new go.PathSegment(go.PathSegment.Line,nt*.78,et*.25).close()),At}),go.Shape.defineFigureGenerator("SpeechBubble",function(Ut,nt,et){var At=Ut?Ut.parameter1:NaN;(isNaN(At)||At<0)&&(At=15),At=Math.min(At,nt/3),At=Math.min(At,et/3);var at=At*ne,ct=et*.8,pt=new go.Geometry,xt=new go.PathFigure(At,0,!0);return pt.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,ct-At)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt-At,ct,nt,ct-at,nt-at,ct)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,ct)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,ct)),xt.add(new go.PathSegment(go.PathSegment.Line,At,ct)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,ct-At,at,ct,0,ct-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?(pt.spot1=new go.Spot(0,0,at,at),pt.spot2=new go.Spot(1,.8,-at,-at)):(pt.spot1=go.Spot.TopLeft,pt.spot2=new go.Spot(1,.8)),pt}),go.Shape.defineFigureGenerator("Repeat",function(Ut,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 ct=new go.PathFigure(nt*1,et*.55,!0);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*1)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.55)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*.55)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*.1)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.1)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*0)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.55).close()),At}),go.Shape.defineFigureGenerator("Windows",function(Ut,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(Ut,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 ct=new go.PathFigure(nt*.1,et*.2,!0);At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.25)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.22,et*.285)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.32)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.37)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.275,et*.32)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.275,et*.25).close());var pt=new go.PathFigure(nt*.28,et*.37,!0);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.37)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.41)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.28,et*.41).close()),At}),go.Shape.defineFigureGenerator("Beaker",function(Ut,nt,et){var At=new go.Geometry,at=15,ct=at*ne,pt=new go.PathFigure(nt*.62,et*.475,!0);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt,et-at)),pt.add(new go.PathSegment(go.PathSegment.Bezier,nt-at,et,nt,et-ct,nt-ct,et)),pt.add(new go.PathSegment(go.PathSegment.Line,at,et)),pt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-at,ct,et,0,et-ct)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.38,et*.475)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.38,et*.03)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*0)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.62,et*.03).close()),ct>1?(At.spot1=new go.Spot(0,0,ct,ct),At.spot2=new go.Spot(1,1,-ct,-ct)):(At.spot1=go.Spot.TopLeft,At.spot2=go.Spot.BottomRight),At}),go.Shape.defineFigureGenerator("Download",function(Ut,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*0,et*1,!0);At.add(at);var ct=.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-ct))),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-ct))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-ct))),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-ct))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-ct))),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-ct)).close());var pt=new go.PathFigure(nt*.4,et*0,!0);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.44)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.26,et*.44)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.66)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.26),et*.44)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.44)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*0).close()),At}),go.Shape.defineFigureGenerator("Bin",function(Ut,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*0,et*1,!0);At.add(at);var ct=.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-ct))),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-ct))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-ct))),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-ct))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-ct))),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-ct)).close()),At}),go.Shape.defineFigureGenerator("Upload",function(Ut,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*0,et*1,!0);At.add(at);var ct=.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-ct))),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-ct))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-ct))),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-ct))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-ct))),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-ct)).close());var pt=new go.PathFigure(nt*.5,et*0,!0);return At.add(pt),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.26,et*.25)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.25)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.63)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.63)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.25)),pt.add(new go.PathSegment(go.PathSegment.Line,nt*.74,et*.25).close()),At}),go.Shape.defineFigureGenerator("EmptyDrink",function(Ut,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(Ut,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 ct=new go.PathFigure(nt*.235,et*.28,!0);return At.add(ct),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.765,et*.28)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.655,et*.97)),ct.add(new go.PathSegment(go.PathSegment.Line,nt*.345,et*.97).close()),At}),go.Shape.defineFigureGenerator("4Arrows",function(Ut,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")},80727: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 Bn={},Ve="5.0",Ot={},Pt=null,te=!1,Ae=!1,Ce=null,de=!1,Rt=null,ne=null,ue=0;ue<arguments.length;ue++){var ce=arguments[ue];if(ce!==null)switch(typeof ce){case"number":Ve=ce.toFixed(1);break;case"string":ce.match(new RegExp("^[0-9]\\.[0-9]+$"))?Ve=ce:Ce=ce;break;case"object":typeof ce.is3D!="undefined"?Pt=ce:Ot=ce;break;case"boolean":te=ce,Ae=!0;break}}Pt===null&&(Pt={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},Ot.material_id!==void 0&&!Ae&&(te=!0)),Ce!==null&&Ot.id===void 0&&(Ot.id=Ce);var Wt="",Ne="",qt=!1,Le=null,Ut=null,nt=null,et=!1,At=null,at=null,ct=null,pt=null,xt=null;Ot.height!==void 0&&(Ot.height=Math.round(Ot.height)),Ot.width!==void 0&&(Ot.width=Math.round(Ot.width));var Mt=function(un){return parseFloat(un)>4?parseFloat(un):5};Bn.setHTML5Codebase=function(un,Yn){ne=un,Pn(un,Yn)},Bn.setJavaCodebase=Bn.setJavaCodebaseVersion=Bn.isCompiledInstalled=Bn.setPreCompiledScriptPath=Bn.setPreCompiledResourcePath=function(){},Bn.setHTML5CodebaseVersion=function(un,Yn){var si=parseFloat(un);if(si!==NaN&&si<5){console.log("The GeoGebra HTML5 codebase version "+si+" is deprecated. Using version latest instead.");return}Rt=un,re(un,Yn)},Bn.getHTML5CodebaseVersion=function(){return Ut},Bn.getParameters=function(){return Ot},Bn.setFontsCSSURL=function(un){pt=un},Bn.setGiacJSURL=function(un){},Bn.setJNLPFile=function(un){Wt=un},Bn.setJNLPBaseDir=function(un){},Bn.inject=function(){function un(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Yn="auto",si=Ot.id,Fi,sn=!1,oi=0;oi<arguments.length;oi++){var Ee=arguments[oi];typeof Ee=="string"?(Ee=Ee.toLowerCase(),Ee.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Yn=Ee:si=arguments[oi]):typeof Ee=="boolean"?sn=Ee:Ee instanceof HTMLElement&&(Fi=Ee)}ci();function ci(){if(!de){setTimeout(ci,200);return}Yn=Ln(Yn);var Pi=Fi||document.getElementById(si);if(!Pi){console.log("possibly bug on ajax loading? ");return}if(Bn.removeExistingApplet(Pi,!1),Ot.width===void 0&&Pi.clientWidth&&(Ot.width=Pi.clientWidth),Ot.height===void 0&&Pi.clientHeight&&(Ot.height=Pi.clientHeight),!(Ot.width&&Ot.height)&&Yn==="html5"&&(delete Ot.width,delete Ot.height),Le=Yn,Yn==="screenshot")tn(Pi,Ot);else{var Ht=!1;Ot.hasOwnProperty("playButton")&&Ot.playButton||Ot.hasOwnProperty("clickToLoad")&&Ot.clickToLoad?Ht=!0:Ot.hasOwnProperty("playButtonAutoDecide")&&Ot.playButtonAutoDecide&&(Ht=(!_t()||un())&&Qt()),Ht?(Le="screenshot",Tn(Pi,Ot,sn,Yn)):$e(Pi,Ot,sn)}}};function _t(){try{return window.self!==window.top}catch(un){return!0}}function Qt(){return Ot.hasOwnProperty("screenshotGenerator")&&Ot.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Bn.getViews=function(){return Pt},Bn.isJavaInstalled=function(){return!1};var Vt=function(un){var Yn=function(oi){var Ee=JSON.parse(oi),ci=function(kt){return kt.type=="G"||kt.type=="E"},Pi=Ee.elements?Ee.elements.filter(ci)[0]:Ee;if(!Pi||!Pi.url){si();return}Ot.fileName=Pi.url,Zt(Pi.settings||{}),Pt.is3D=!0;var Ht="https://www.geogebra.org/images/";Bn.setPreviewImage(At||Pi.previewUrl,Ht+"GeoGebra_loading.png",Ht+"applet_play.png"),un()},si=function(){Ot.onError&&Ot.onError(),li("Error: Fetching material (id "+Ot.material_id+") failed.",Ot)},Fi=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",sn="/materials/"+Ot.material_id+"?scope=basic";$t("https://"+Fi+"/api/proxy.php?path="+encodeURIComponent(sn),Yn,si)};function Zt(un){var Yn=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(si){un[si]=!!un[si]}),Yn.forEach(function(si){Ot[si]===void 0&&un[si]!==void 0&&(Ot[si]=un[si])}),Ot.showToolBarHelp===void 0&&(Ot.showToolBarHelp=Ot.showToolBar)}function $t(un,Yn,si){var Fi=new XMLHttpRequest;Fi.open("GET",un),Fi.onload=function(){Yn(Fi.responseText)},Fi.onerror=si,Fi.send()}Bn.isHTML5Installed=function(){return!0},Bn.getLoadedAppletType=function(){return Le},Bn.setPreviewImage=function(un,Yn,si){At=un,at=Yn,ct=si},Bn.removeExistingApplet=function(un,Yn){var si;typeof un=="string"&&(un=document.getElementById(un)),Le=null;var Fi=null;for(si=0;si<un.childNodes.length;si++){var sn=un.childNodes[si],oi=sn.className;oi==="applet_screenshot"?Yn?(sn.style.display="block",Le="screenshot"):sn.style.display="none":oi!=="applet_scaler prerender"&&(un.removeChild(sn),Fi=oi&&oi.indexOf("appletParameters")!=-1?sn.id:null,si--)}var Ee=Ot.id!==void 0?Ot.id:Fi,ci=window[Ee];ci&&typeof ci.getBase64=="function"&&(ci.remove(),window[Ee]=null)},Bn.refreshHitPoints=function(){if(Mt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var un=Bn.getAppletObject();return un&&typeof un.recalculateEnvironments=="function"?(un.recalculateEnvironments(),!0):!1},Bn.startAnimation=function(){var un=Bn.getAppletObject();return un&&typeof un.startAnimation=="function"?(un.startAnimation(),!0):!1},Bn.stopAnimation=function(){var un=Bn.getAppletObject();return un&&typeof un.stopAnimation=="function"?(un.stopAnimation(),!0):!1},Bn.getAppletObject=function(){var un=Ot.id!==void 0?Ot.id:"ggbApplet";return window[un]},Bn.resize=function(){};var Pe=function(un,Yn,si){var Fi=document.createElement("param");Fi.setAttribute("name",Yn),Fi.setAttribute("value",si),un.appendChild(Fi)},me=function(un){return un&&un!=="false"},$e=function(un,Yn,si){Mt(Ut)<=4.2&&(si=!0);var Fi=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Ut||ggbHTML5LoadedCodebaseIsWebSimple&&!et)&&(Fi=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var sn=document.createElement("div");sn.classList.add("appletParameters","notranslate");var oi=Yn.width,Ee=Yn.height;if(Yn.disableAutoScale=Yn.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Yn.disableAutoScale,Yn.width!==void 0)if(Mt(Ut)<=4.4)me(Yn.showToolBar)&&(Yn.height-=7),me(Yn.showAlgebraInput)&&(Yn.height-=37),Yn.width<605&&me(Yn.showToolBar)&&(Yn.width=605,oi=605);else{var ci=100;(me(Yn.showToolBar)||me(Yn.showMenuBar))&&(Yn.hasOwnProperty("customToolBar")&&(Yn.customToolbar=Yn.customToolBar),ci=me(Yn.showMenuBar)?245:155),oi<ci&&(Yn.width=ci,oi=ci)}sn.style.border="none",sn.style.display="inline-block";for(var Pi in Yn)Yn.hasOwnProperty(Pi)&&Pi!=="appletOnLoad"&&sn.setAttribute("data-param-"+Pi,Yn[Pi]);pt&&sn.setAttribute("data-param-fontscssurl",pt),Bn.resize=function(){GGBAppletUtils.responsiveResize(un,Yn)},window.addEventListener("resize",function(De){Bn.resize()});var Ht=typeof Yn.appletOnLoad=="function"?Yn.appletOnLoad:function(){};if(!si&&Yn.width!==void 0){Yn.hasOwnProperty("showSplash")||sn.setAttribute("data-param-showSplash","false");var kt=un.querySelector(".applet_scaler.prerender"),mt=kt!==null;if(mt)var vt=kt.querySelector(".ggb_preview");else{var vt=$n(oi,Ee,Yn.borderColor,!1);kt=document.createElement("div"),kt.className="applet_scaler",kt.style.position="relative",kt.style.display="block",kt.style.width=oi+"px",kt.style.height=Ee+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(kt,"66%"),Mt(Ut)>=5?(Yn.appletOnLoad=function(De){var nn=un.querySelector(".ggb_preview");nn&&nn.parentNode.removeChild(nn),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(kt),window.GGBT_wsf_view&&$(window).trigger("resize"),Ht(De)},mt||kt.appendChild(vt)):sn.appendChild(vt),kt.appendChild(sn),mt||un.appendChild(kt),setTimeout(function(){Bn.resize()},1)}else{var Lt=document.createElement("div");Lt.className="applet_scaler",Lt.style.position="relative",Lt.style.display="block",Lt.appendChild(sn),un.appendChild(Lt),Yn.appletOnLoad=function(De){Bn.resize(),Ht(De)}}function Bt(De,nn){nn&&typeof nn.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(De,nn.appletOnLoad):renderGGBElement(De),li("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",nn)}function Kt(De,nn){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:De,params:nn}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(kn){Bt(kn.article,kn.params)}),html5AppletsToProcess=null)},Mt(Ut)<5&&(De.className+=" geogebraweb")):Bt(De,nn)}if(Fi){scriptLoadStarted=!0;for(var ge=0;ge<sn.childNodes.length;ge++){var ke=sn.childNodes[ge].tagName;ke==="TABLE"&&(sn.removeChild(sn.childNodes[ge]),ge--)}if(ggbHTML5LoadedScript!==null){var Je=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Je!=null&&Je.parentNode.removeChild(Je)}var ve=document.createElement("script"),ze=function(){Kt(sn,Yn)};ve.src=Ne+nt,ggbHTML5LoadedCodebaseIsWebSimple=et,ggbHTML5LoadedCodebaseVersion=Ut,ggbHTML5LoadedScript=ve.src,li("GeoGebra HTML5 codebase loaded: '"+Ne+"'.",Yn),!ne&&(!Rt||Rt=="5.0")?(et?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),ze()):Ne.requirejs?__webpack_require__.e(4184).then(function(){var De=[__webpack_require__(74620)];ze.apply(null,De)}.bind(this)).catch(__webpack_require__.oe):(ve.onload=ze,un.appendChild(ve))}else Kt(sn,Yn);Yn.height=Ee,Yn.width=oi},tn=function(un,Yn,si){var Fi=$n(Yn.width,Yn.height,Yn.borderColor,si),sn=document.createElement("div");sn.style.position="relative",sn.style.display="block",sn.style.width=Yn.width+"px",sn.style.height=Yn.height+"px",sn.className="applet_screenshot applet_scaler"+(si?" applet_screenshot_play":""),sn.appendChild(Fi);var oi=GGBAppletUtils.getScale(Yn,un,si);si?(un.appendChild(In()),window.GGBT_wsf_view||(un.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(sn,"66%"),un.appendChild(sn),oi!==1&&!isNaN(oi)&&(GGBAppletUtils.scaleElement(sn,oi),sn.style.width=Yn.width+"px",sn.style.height=Yn.height+"px",sn.parentNode.style.width=Yn.width*oi+"px",sn.parentNode.style.height=Yn.height*oi+"px"),Bn.resize=function(){Cn(un,Fi,sn,si)},window.addEventListener("resize",function(Ee){Bn.resize()}),Bn.resize()};function Cn(un,Yn,si,Fi){if(un.contains(Yn)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(un.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(un)}var sn=GGBAppletUtils.getScale(Ot,un,Fi);si.parentNode!==null&&(!isNaN(sn)&&sn!==1?(GGBAppletUtils.scaleElement(si,sn),si.parentNode.style.width=Ot.width*sn+"px",si.parentNode.style.height=Ot.height*sn+"px"):(GGBAppletUtils.scaleElement(si,1),si.parentNode.style.width=Ot.width+"px",si.parentNode.style.height=Ot.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(un),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Bn.onExitFullscreen=function(un,Yn){Yn.appendChild(un)};var Tn=function(un,Yn,si,Fi){tn(un,Yn,!0);for(var sn=function(){var ci=[];for(Ee=0;Ee<un.childNodes.length;Ee++)ci.push(un.childNodes[Ee]);if(window.GGBT_wsf_view){var Pi=window.GGBT_wsf_view.renderFullScreen(un,Yn.id),Ht=document.getElementById("fullscreencontainer"),kt=jQuery(un).find(".fullscreencontent");kt.length>0?(Pi.remove(),kt.attr("id","fullscreencontent").show(),jQuery(Ht).append(kt),window.dispatchEvent(new Event("resize"))):$e(Pi,Yn,!1),window.GGBT_wsf_view.launchFullScreen(Ht)}else Le=Fi,$e(un,Yn,!1);if(!window.GGBT_wsf_view)for(Ee=0;Ee<ci.length;Ee++)un.removeChild(ci[Ee])},oi=un.getElementsByClassName("ggb_preview_play"),Ee=0;Ee<oi.length;Ee++)oi[Ee].addEventListener("click",sn,!1),oi[Ee].addEventListener("ontouchstart",sn,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(un),Qt()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},In=function(){var un=document.createElement("div");if(un.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Yn='.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");}',si=document.createElement("style");si.styleSheet?si.styleSheet.cssText=Yn:si.appendChild(document.createTextNode(Yn)),document.getElementsByTagName("head")[0].appendChild(si)}return un},$n=function(un,Yn,si,Fi){var sn=document.createElement("div");sn.className="ggb_preview",sn.style.position="absolute",sn.style.zIndex="90",sn.style.width=un-2+"px",sn.style.height=Yn-2+"px",sn.style.top="0px",sn.style.left="0px",sn.style.overflow="hidden",sn.style.backgroundColor="white";var oi="lightgrey";si!==void 0&&(si==="none"?oi="transparent":oi=si),sn.style.border="1px solid "+oi;var Ee=document.createElement("img");if(Ee.style.position="relative",Ee.style.zIndex="1000",Ee.style.top="-1px",Ee.style.left="-1px",At!==null&&Ee.setAttribute("src",At),Ee.style.opacity=.7,at!==null){var ci,Pi,Ht;if(!Fi){ci=document.createElement("img"),ci.style.position="absolute",ci.style.zIndex="1001",ci.style.opacity=1,Ee.style.opacity=.3,Pi=360,Pi>un/4*3&&(Pi=un/4*3),Ht=Pi/5.8,ci.setAttribute("src",at),ci.setAttribute("width",Pi),ci.setAttribute("height",Ht);var kt=(un-Pi)/2,mt=(Yn-Ht)/2;ci.style.left=kt+"px",ci.style.top=mt+"px",sn.appendChild(ci)}}return sn.appendChild(Ee),sn},Ln=function(un){return un=un.toLowerCase(),un==="html5"||un==="screenshot"?un:"html5"},be=["web","webSimple","web3d","tablet","tablet3d","phone"],re=function(un,Yn){if(Ut=un,Yn){Pn(Ut,!0);return}var si=!te;if(si){var Fi=Mt(Ut);!isNaN(Fi)&&Fi<4.4&&(si=!1)}var sn,oi;window.location.protocol.substr(0,4)==="http"?sn=window.location.protocol:sn="http:";var Ee=Ut.indexOf("//");Ee>0?oi=Ut:Ee===0?oi=sn+Ut:oi="https://www.geogebra.org/apps/5.2.814.0/";for(var ci in be)if(Ut.slice(be[ci].length*-1)===be[ci]||Ut.slice((be[ci].length+1)*-1)===be[ci]+"/"){Pn(oi,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&si&&!Pt.is3D&&!Pt.AV&&!Pt.SV&&!Pt.CV&&!Pt.EV2&&!Pt.CP&&!Pt.PC&&!Pt.DA&&!Pt.FI&&!Pt.PV&&!me(Ot.showToolBar)&&!me(Ot.showMenuBar)&&!me(Ot.showAlgebraInput)&&!me(Ot.enableRightClick)&&(!Ot.appName||Ot.appName=="classic")?oi+="webSimple/":oi+="web3d/",Pn(oi,!1)},Pn=function(un,Yn){if(un.requirejs){Ne=un;return}un.slice(-1)!=="/"&&(un+="/"),Ne=un,Yn===null&&(Yn=un.indexOf("http")===-1),qt=Yn,nt="web.nocache.js",et=!1;var si=Ne.split("/");si.length>1&&(!Yn&&si[si.length-2]==="webSimple"?(nt="webSimple.nocache.js",et=!0):be.indexOf(si[si.length-2])>=0&&(nt=si[si.length-2]+".nocache.js")),si=un.split("/"),Ut=si[si.length-3],Ut.substr(0,4)==="test"?Ut=Ut.substr(4,1)+"."+Ut.substr(5,1):(Ut.substr(0,3)==="war"||Ut.substr(0,4)==="beta")&&(Ut="5.0");var Fi=parseFloat(Ut);Fi!==NaN&&Fi<5&&un.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Fi+" is deprecated. Using version latest instead."),re("5.0",Yn))},li=function(un,Yn){window.console&&window.console.log&&(!Yn||typeof Yn.showLogging=="undefined"||Yn.showLogging&&Yn.showLogging!=="false")&&console.log(un)};Ot.material_id!==void 0?Vt(Jn):Jn();function Jn(){var un=Ve;Rt!==null?un=Rt:parseFloat(un)<5&&(un="5.0"),re(un,!1),ne!==null&&Pn(ne,qt),de=!0}return Bn},GGBAppletUtils=function(){"use strict";function Bn(){return window.GGBT_wsf_edit!==void 0}function Ve(de,Rt){Rt!=1?(de.style.transformOrigin="0% 0% 0px",de.style.webkitTransformOrigin="0% 0% 0px",de.style.transform="scale("+Rt+","+Rt+")",de.style.webkitTransform="scale("+Rt+","+Rt+")",de.style.maxWidth="initial",de.querySelector(".ggb_preview")!==null&&(de.querySelector(".ggb_preview").style.maxWidth="initial"),de.querySelectorAll(".ggb_preview img")[0]!==void 0&&(de.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),de.querySelectorAll(".ggb_preview img")[1]!==void 0&&(de.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(de.style.transform="none",de.style.webkitTransform="none")}function Ot(de,Rt,ne,ue,ce,Wt){var Ne=null;if(Wt!=null&&Wt!="")for(var qt=de.parentNode;qt!=null;)if((" "+qt.className+" ").indexOf(" "+Wt+" ")>-1){Ne=qt;break}else qt=qt.parentNode;var Le=0,Ut=0,nt=0,et=0,At=0,at=0,ct=0;if(Ne)Le=Ne.offsetWidth,Ut=Math.max(ue?Ne.offsetWidth:0,Ne.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(Le=Math.min(window.innerWidth,document.documentElement.clientWidth),Ut=Math.min(window.innerHeight,document.documentElement.clientHeight),nt=Le):(Le=window.innerWidth,Ut=window.innerHeight,nt=window.innerWidth),de){var pt=de.getBoundingClientRect();pt.left>0&&pt.left<=Le&&(ce===void 0||!ce)&&(document.dir==="rtl"?(At=Le-pt.width-pt.left,at=nt<=480?10:30):(at=pt.left,At=nt<=480?10:30),et=at+At)}if(de&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var xt=de.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(et=40,ct=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(et=0,ct=40)}}return de&&((ne===void 0||!ne)&&Rt>0&&Rt+et<Le?Le=Rt:Le-=et,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ne===void 0||!ne)&&(Ut-=ct)),{width:Le,height:Ut}}function Pt(de,Rt,ne,ue,ce){if(de.isScreenshoGenerator)return 1;var Wt=ue!==void 0&&ue,Ne=de.noScaleMargin!=null&&de.noScaleMargin,qt=function(xt){return xt&&xt!=="false"},Le=qt(de.autoHeight),Ut=Ot(Rt,de.width,ne,Le,Wt&&window.GGBT_wsf_view||Ne,ce),nt=parseInt(Ut.width),et=de.width,At=de.height;if(et===void 0){var at=Rt.querySelector(".appletParameters");at&&(et=at.offsetWidth,At=at.offsetHeight)}var ct=nt/et,pt=Wt?1:Ut.height/At;return ne!==void 0&&!ne&&(ct=Math.min(1,ct),pt=Math.min(1,pt)),Math.min(ct,pt)}function te(de,Rt,ne){var ue=1,ce,Wt=!1;if(de.hasOwnProperty("allowUpscale")&&(Wt=de.allowUpscale),de.hasOwnProperty("scale")&&(ue=parseFloat(de.scale),(isNaN(ue)||ue===null||ue===0)&&(ue=1),ue>1&&(Wt=!0)),Rt&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Wt=!0),!(de.hasOwnProperty("disableAutoScale")&&de.disableAutoScale))ce=Pt(de,Rt,Wt,ne,de.scaleContainerClass);else return ue;return Wt&&(!de.hasOwnProperty("scale")||ue===1)?ce:Math.min(ue,ce)}function Ae(de){var Rt=Math.min(window.innerWidth,document.documentElement.clientWidth),ne=Math.min(window.innerHeight,document.documentElement.clientHeight),ue=de.getBoundingClientRect(),ce=(Rt-ue.width)/2,Wt=(ne-ue.height)/2;Wt<0&&(Wt=0),de.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ce<40?de.style.left="40px":de.style.left=ce+"px",de.style.top=Wt+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Wt<40?de.style.top="40px":de.style.top=Wt+"px",de.style.left=ce+"px")}function Ce(de,Rt){var ne=de.querySelector(".appletParameters");if(ne){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Rt.id!==ne.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(de)}if(ne.parentElement&&/fullscreen/.test(ne.parentElement.className))return;var ue=te(Rt,de);Bn()&&ne.setAttribute("data-param-scale",ue);for(var ce=null,Wt=0;Wt<de.childNodes.length;Wt++)if(de.childNodes[Wt].className!==void 0&&de.childNodes[Wt].className.match(/^applet_scaler/)){ce=de.childNodes[Wt];break}if(ce!==null&&ce.querySelector(".noscale")!==null)return;var Ne=Rt.id!==void 0?Rt.id:"ggbApplet",qt=window[Ne];(qt==null||!qt.recalculateEnvironments)&&ce!==null&&!ce.className.match(/fullscreen/)&&(ce.parentNode.style.transform="",!isNaN(ue)&&ue!==1?(ce.parentNode.style.width=Rt.width*ue+"px",ce.parentNode.style.height=Rt.height*ue+"px",Ve(ce,ue)):(Ve(ce,1),ce.parentNode.style.width=Rt.width+"px",ce.parentNode.style.height=Rt.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Ae(de),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(ne).parents(".content-added-content"))}}return{responsiveResize:Ce,isFlexibleWorksheetEditor:Bn,positionCenter:Ae,getScale:te,scaleElement:Ve}}();__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 Bn=n.location.search;return Bn.indexOf(J)!=-1||Bn.indexOf(K)!=-1}function q(Bn,Ve){}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(Bn){var Ve=s[L].bindings;s[L].bindings=function(){for(var Ot=Ve?Ve():{},Pt=Bn[webModule.__softPermutationId],te=O;te<Pt.length;te++){var Ae=Pt[te];Ot[Ae[O]]=Ae[P]}return Ot}};var t;function u(){return v(),t}function v(){if(!t){var Bn=o.createElement(Q);if(Bn.id=L,Bn.style.cssText=R+S,Bn.tabIndex=-1,o.body.appendChild(Bn),t=Bn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Ve=document.compatMode==U?V:W;t.write(Ve+X),t.close()}}}function w(Bn){function Ve(Pt){function te(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Ae=te();if(Ae){Pt();return}function Ce(){if(!Ae){if(!te())return;Ae=!0,Pt(),o.removeEventListener&&o.removeEventListener(Z,Ce,!1),de&&clearInterval(de)}}o.addEventListener&&o.addEventListener(Z,Ce,!1);var de=setInterval(function(){Ce()},$)}function Ot(Pt){var te=u(),Ae=te.body,Ce=te.createElement(_);Ce.language=ab,Ce.crossOrigin=W,Ce.src=Pt,webModule.__errFn&&(Ce.onerror=function(){webModule.__errFn(L,new Error(bb+Pt))}),Ae.appendChild(Ce)}Ve(function(){Ot(Bn)})}webModule.__startLoadingFragment=function(Bn){return C(Bn)},webModule.__installRunAsyncCode=function(Bn){var Ve=u(),Ot=Ve.body,Pt=Ve.createElement(_);Pt.language=ab,Pt.text=Bn,Ot.appendChild(Pt),Ot.removeChild(Pt)};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(Bn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Bn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Bn){var Ve=c[Bn];return Ve==null?null:Ve},r=d,webModule.__errFn=e}function B(){function Bn(de){var Rt=de.lastIndexOf(rb);Rt==-1&&(Rt=de.length);var ne=de.indexOf(sb);ne==-1&&(ne=de.length);var ue=de.lastIndexOf(tb,Math.min(ne,Rt));return ue>=O?de.substring(O,ue+P):W}function Ve(de){if(!de.match(/^\w+:\/\//)){var Rt=o.createElement(ub);Rt.src=de+vb,de=Bn(Rt.src)}return de}function Ot(){var de=__gwt_getMetaProperty(wb);return de!=null?de:W}function Pt(){for(var de=o.getElementsByTagName(_),Rt=O;Rt<de.length;++Rt)if(de[Rt].src.indexOf(xb)!=-1)return Bn(de[Rt].src);return W}function te(){var de=o.getElementsByTagName(yb);return de.length>O?de[de.length-P].href:W}function Ae(){var de=o.location;return de.href==de.protocol+zb+de.host+de.pathname+de.search+de.hash}var Ce=Ot();return Ce==W&&(Ce=Pt()),Ce==W&&(Ce=te()),Ce==W&&Ae()&&(Ce=Bn(o.location.href)),Ce=Ve(Ce),Ce}function C(Bn){return Bn.match(/^\//)||Bn.match(/^[a-zA-Z]+:\/\//)?Bn:webModule.__moduleBase+Bn}function D(){var Bn=[],Ve=O,Ot=[],Pt=[];function te(de){var Rt=Pt[de](),ne=Ot[de];if(Rt in ne)return Rt;var ue=[];for(var ce in ne)ue[ne[ce]]=ce;throw r&&r(de,ue,Rt),null}if(__gwt_isKnownPropertyValue=function(de,Rt){return Rt in Ot[de]},webModule.__getPropMap=function(){var de={};for(var Rt in Ot)Ot.hasOwnProperty(Rt)&&(de[Rt]=te(Rt));return de},webModule.__computePropValue=te,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Ae;try{Ae=Cb;var Ce=Ae.indexOf(Db);Ce!=-1&&(Ve=parseInt(Ae.substring(Ce+P),$),Ae=Ae.substring(O,Ce))}catch(de){}return webModule.__softPermutationId=Ve,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})()},77903:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{Ax:function(){return Ce},Ds:function(){return de},KI:function(){return ne},SI:function(){return Ae},f1:function(){return te}});var Pt=Ot(3294);function te(ue){let ce=!0;if(ue.length>0){for(let Wt=0;Wt<ue.length;Wt++)if(ue[Wt].compile_success==0||!ue[Wt].compile_success){ce=!1;break}}else ce=!1;return ce}function Ae(ue,ce=""){let Wt=[];for(let Ne=0;Ne<ue.length;Ne++){let qt=ue[Ne],Le=ce?`${ce}/${qt.name}`:`${qt.name}`;Wt.push({title:qt.name,type:qt.type,isLeaf:qt.type!=="tree",key:Le})}return Wt}function Ce(ue,ce,Wt){for(let Ne=0;Ne<ue.length;Ne++){let qt=ue[Ne];if(qt.key===ce){qt.children=Wt;break}qt.children&&Ce(qt.children,ce,Wt)}return ue}function de(ue,ce,Wt){let Ne;return function(){let qt=this,Le=arguments,Ut=function(){Ne=null,Wt||ue.apply(qt,Le)},nt=Wt&&!Ne;clearTimeout(Ne),Ne=setTimeout(Ut,ce),nt&&ue.apply(qt,Le)}}const Rt=!0,ne=Pt.Z.API_SERVER},41069:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{ij:function(){return ct},_s:function(){return at},Uf:function(){return At},ZP:function(){return xt}});var Pt=Ot(59301),te={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=Ot(92310),Ce=Ot.n(Ae),de=Ot(42441),Rt=Ot(25399),ne=Ot(458),ue=Ot(29787),ce=Ot(8797),Wt=Ot(3294),Ne=Object.defineProperty,qt=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,Ut=Object.prototype.propertyIsEnumerable,nt=(Mt,_t,Qt)=>_t in Mt?Ne(Mt,_t,{enumerable:!0,configurable:!0,writable:!0,value:Qt}):Mt[_t]=Qt,et=(Mt,_t)=>{for(var Qt in _t||(_t={}))Le.call(_t,Qt)&&nt(Mt,Qt,_t[Qt]);if(qt)for(var Qt of qt(_t))Ut.call(_t,Qt)&&nt(Mt,Qt,_t[Qt]);return Mt};const At=(Mt={})=>{var _t,Qt,Vt,Zt;let $t=(_t=Mt==null?void 0:Mt.emotion)==null?void 0:_t.map(tn=>et({value:tn==null?void 0:tn.rate},tn)),Pe=(Qt=Mt==null?void 0:Mt.focus)==null?void 0:Qt.map(tn=>et({value:tn==null?void 0:tn.rate},tn)),me=(Vt=Mt==null?void 0:Mt.action)==null?void 0:Vt.map(tn=>et({value:tn==null?void 0:tn.rate},tn)),$e=(Zt=Mt==null?void 0:Mt.intention)==null?void 0:Zt.map(tn=>et({value:tn==null?void 0:tn.rate},tn));return[{title:"\u8868\u60C5\u5360\u6BD4",color:["#f7ca2e","#4ccf71","#3791ee","#f9ac95","#4f74ee","#f0e999"],data:$t||[]},{title:"\u4E13\u6CE8\u5EA6\u5360\u6BD4",color:["#4f74ee","#f9ac95","#9cb5fe","#eaa170","#3791ee","#a39bed"],data:Pe||[]},{title:"\u884C\u4E3A\u5360\u6BD4\u60C5\u51B5",color:["#5eca9c","#a39bed","#f68238","#f0e999","#eaa170","#f9ac95"],data:me||[]},{title:"\u610F\u56FE\u5360\u6BD4\u60C5\u51B5",color:["#eaa170","#739fcb","#f0e999","#f9ac95","#4f74ee","#5eca9c"],data:$e||[]}]},at=({className:Mt,dataSource:_t=[],col:Qt=4,right:Vt,bottom:Zt=23,precision:$t=0,wrapWidth:Pe=1200})=>{const me=(tn="",Cn,Tn="--")=>tn?(tn==null?void 0:tn.length)>Cn?(tn==null?void 0:tn.slice(0,Cn-1))+"...":tn:Tn,$e=Math.floor((Pe-(Qt-1)*Vt)/Qt);return Pt.createElement("div",{className:Ce()(te.list,Mt)},!!(_t!=null&&_t.length)&&(_t==null?void 0:_t.map((tn,Cn)=>{const{cover_pic:Tn,created_at:In,emotion:$n,action:Ln,intention:be,focus:re}=tn;return Pt.createElement("div",{key:Cn,className:te.wrap,style:{width:$e,marginRight:(1+Cn)%Qt===0?0:Vt+$t,marginBottom:Zt}},Pt.createElement("div",{className:te.img},Pt.createElement("img",{src:`${Wt.Z.API_SERVER}${Tn}`}),Pt.createElement("div",{className:te.tips},Pt.createElement("div",null,Pt.createElement("i",{className:"iconfont icon-paisheshijian mr5 font14"})," \u62CD\u6444\u65F6\u95F4"),Pt.createElement("span",null,In))),Pt.createElement("div",{className:te.footer},Pt.createElement("ul",null,Pt.createElement("li",null,Pt.createElement("i",{className:"iconfont icon-biaoqing"}),Pt.createElement("span",null,"\u8868\u60C5\uFF1A",Pt.createElement(Rt.Z,{title:$n},Pt.createElement("span",{className:"c-grey-333"},me($n,4))))),Pt.createElement("li",null,Pt.createElement("i",{className:"iconfont icon-hangwei"}),Pt.createElement("span",null,"\u884C\u4E3A\uFF1A",Pt.createElement(Rt.Z,{title:Ln},Pt.createElement("span",{className:"c-grey-333"},me(Ln,4)))))),Pt.createElement("ul",null,Pt.createElement("li",null,Pt.createElement("i",{className:"iconfont icon-yitu"}),Pt.createElement("span",null,"\u610F\u56FE\uFF1A",Pt.createElement(Rt.Z,{title:be},Pt.createElement("span",{className:"c-grey-333"},me(be,4))))),Pt.createElement("li",null,Pt.createElement("i",{className:"iconfont icon-zhuangtai"}),Pt.createElement("span",null,"\u4E13\u6CE8\u5EA6\uFF1A",Pt.createElement(Rt.Z,{title:re},Pt.createElement("span",{className:"c-grey-333"},me(re,3))))))))})))},ct=({className:Mt,style:_t,title:Qt,hideBar:Vt=!1,children:Zt,customText:$t="",noDataText:Pe="",emptyData:me=[],loading:$e,actionAnalysis:tn})=>{var Cn,Tn;const In=((Cn=me==null?void 0:me[0])==null?void 0:Cn.every(Ln=>{var be;return!((be=Ln==null?void 0:Ln.data)!=null&&be.length)}))&&!((Tn=me==null?void 0:me[1])!=null&&Tn.length)||!tn,$n=tn?Pe:$t;return Pt.createElement(ne.Z,{loading:$e,active:!0},In&&Pt.createElement("div",{className:Ce()(te.noData,Mt),style:_t},!!Qt&&Pt.createElement("div",{className:te.title},!Vt&&Pt.createElement("b",null),Pt.createElement("span",null,Qt)),Pt.createElement("div",{className:te.itemWrap},Pt.createElement(ce.Z,{customText:$n}))),!In&&Zt)};var xt=({className:Mt,style:_t,data:Qt=[],title:Vt,hideBar:Zt=!1,loading:$t=!1})=>Pt.createElement("div",{className:Ce()(te.analysis,Mt),style:_t},!!Vt&&Pt.createElement("div",{className:te.title},!Zt&&Pt.createElement("b",null),Pt.createElement("span",null,Vt)),Pt.createElement(ue.Z,{spinning:$t},Pt.createElement("div",{className:te.itemWrap},Qt==null?void 0:Qt.map((Pe,me)=>Pt.createElement("div",{className:te.item,key:me},Pt.createElement(de.Z,{option:{tooltip:{trigger:"item",formatter:"{a} <br/>{b}: {c}%"},title:{left:"center",bottom:15,text:Pe==null?void 0:Pe.title},legend:{top:10,right:10,orient:"vertical",show:!0,align:"left",icon:"circle",itemWidth:10,itemHeight:10,formatter:function($e){for(let tn in Pe==null?void 0:Pe.data)if($e==(Pe==null?void 0:Pe.data[tn].name))return $e+" "+(Pe==null?void 0:Pe.data[tn].value)+"%"},textStyle:{color:"#767676",fontSize:12}},color:Pe==null?void 0:Pe.color,series:[{type:"pie",radius:["20%","35%"],center:["20%","40%"],avoidLabelOverlap:!1,label:{show:!1},labelLine:{show:!1},data:Pe==null?void 0:Pe.data}]},style:{height:145}}))))))},24544:function(Bn,Ve,Ot){"use strict";var Pt=Ot(86204),te=Ot.n(Pt),Ae=Object.defineProperty,Ce=(ue,ce,Wt)=>ce in ue?Ae(ue,ce,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):ue[ce]=Wt,de=(ue,ce,Wt)=>Ce(ue,typeof ce!="symbol"?ce+"":ce,Wt),Rt=(ue,ce,Wt)=>new Promise((Ne,qt)=>{var Le=et=>{try{nt(Wt.next(et))}catch(At){qt(At)}},Ut=et=>{try{nt(Wt.throw(et))}catch(At){qt(At)}},nt=et=>et.done?Ne(et.value):Promise.resolve(et.value).then(Le,Ut);nt((Wt=Wt.apply(ue,ce)).next())});class ne extends Pt.EventEmitter{constructor(ce,Wt){super(),de(this,"url"),de(this,"body"),de(this,"fullContent",""),de(this,"controller",null),de(this,"buffer",""),this.url=ce,this.body=Wt}startStream(){return Rt(this,null,function*(){this.controller=new AbortController;const{signal:ce}=this.controller;try{const Wt=yield fetch(this.url,{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},credentials:"include",body:JSON.stringify(this.body),signal:ce});if(!Wt.ok)throw new Error(`\u8BF7\u6C42\u5931\u8D25: ${Wt.status}`);const Ne=Wt.headers.get("content-type");if(!Ne)throw new Error("\u54CD\u5E94\u5934\u7F3A\u5C11 content-type");if(Ne.includes("application/json")){const Ut=yield Wt.json();this.emit("error",Ut);return}if(!Ne.includes("text/event-stream"))throw new Error("\u54CD\u5E94\u6570\u636E\u683C\u5F0F\u9519\u8BEF");const qt=Wt.body.getReader(),Le=new TextDecoder("utf-8");for(;;){const{done:Ut,value:nt}=yield qt.read();if(Ut)break;const et=Le.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 ct=at.slice(5).trim();if(ct==="[DONE]")break;try{const pt=JSON.parse(ct);pt.data&&this.handleData(pt.data)}catch(pt){this.buffer=at+`
|
|
|
`+this.buffer,console.error("\u89E3\u6790 JSON \u5931\u8D25:",pt)}}}this.emit("done",this.fullContent)}catch(Wt){Wt.name==="AbortError"?this.emit("cancelled",this.fullContent):this.emit("error",Wt.message)}})}handleData(ce){ce.content&&(this.fullContent+=ce.content,this.emit("data",{chunk:ce,full:this.fullContent}))}cancelRequest(){var ce;(ce=this.controller)==null||ce.abort()}}Ve.Z=ne},73524:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{Z:function(){return Ne}});var Pt=Ot(59301),te={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Ae=Ot(92310),Ce=Ot.n(Ae),de=Ot(29787),Rt=Ot(2859),ne=Ot(99064),ue=Ot(955),ce=(qt,Le,Ut)=>new Promise((nt,et)=>{var At=pt=>{try{ct(Ut.next(pt))}catch(xt){et(xt)}},at=pt=>{try{ct(Ut.throw(pt))}catch(xt){et(xt)}},ct=pt=>pt.done?nt(pt.value):Promise.resolve(pt.value).then(At,at);ct((Ut=Ut.apply(qt,Le)).next())}),Ne=({data:qt,className:Le,fullWidth:Ut,style:nt={},onClose:et,onOk:At,showFullTools:at,noAssociationId:ct})=>{const pt=(0,Pt.useRef)(null),xt=(0,Pt.useRef)(null),Mt=(0,Pt.useRef)(null),_t=(0,Pt.useRef)(null),[Qt,Vt]=(0,Pt.useState)(!1),[Zt,$t]=(0,Pt.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,Pt.useEffect)(()=>(Mt.current||(Mt.current=document.createElement("style"),document.head.appendChild(Mt.current)),qt!=null&&qt.visible?(document.body.setAttribute("data-custom","y-hidden"),Mt.current.innerHTML=" html { overflow-y: hidden; }",qt!=null&&qt.src&&Pe()):(document.body.removeAttribute("data-custom"),Mt.current&&(document.head.removeChild(Mt.current),Mt.current=null)),()=>{document.body.removeAttribute("data-custom"),Mt.current&&(document.head.removeChild(Mt.current),Mt.current=null)}),[qt==null?void 0:qt.visible]);const Pe=()=>ce(void 0,null,function*(){Vt(!0),$t("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Cn=yield(0,ue.ZJ)(qt==null?void 0:qt.src);pt.current.src="",pt.current.src=Cn,pt.current.onload=function(){tn()},Vt(!1),$t("")}),me=Cn=>ce(void 0,null,function*(){Vt(!0),$t("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Tn=yield(0,ne.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:qt.title,file:Cn.dataUrl}});Tn!=null&&Tn.id&&!ct?(yield(0,ne.ZP)(`/api/attachments/${qt.id}/add_subitem.json`,{method:"post",body:{subitem_id:Tn==null?void 0:Tn.id,settings:JSON.stringify(Cn.state)}})).status===0&&At():Tn!=null&&Tn.id&&At(Tn),Vt(!1),$t("")}),$e=()=>{const Cn=document.querySelector('a[href="https://markerjs.com/"]');Cn&&Cn.parentNode&&(Cn.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(In=>{const $n=document.querySelector(In.name);$n&&$n.setAttribute("title",In.title)})},tn=()=>{xt.current=new Rt.hP(pt.current),xt.current.targetRoot=_t.current,xt.current.addEventListener("render",me),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(),qt!=null&&qt.snapshotData&&xt.current.restoreState(qt.snapshotData),setTimeout(()=>{window.scrollTo(0,0),$e()},300)};return Pt.createElement(Pt.Fragment,null,(qt==null?void 0:qt.visible)&&Pt.createElement(de.Z,{spinning:Qt,tip:Zt,style:{position:"absolute",width:"100vw"}},Pt.createElement("div",{ref:_t,className:Ce()(te.imageDimensions,Le,Ut?te.fullWidth:""),style:nt},Pt.createElement("img",{className:te.img,ref:pt}))))}},41588:function(Bn,Ve,Ot){"use strict";var Pt=Ot(59301),te=Ot(77019),Ae=Ot(5269),Ce=Ot(20554),de=Ot(99571),Rt=Ot(85149),ne=Ot(88010),ue=Ot(48136),ce=Ot(59301);const Wt=(0,Pt.forwardRef)(({callback:Ne,showSaveButton:qt,value:Le=""},Ut)=>{const nt=(0,Pt.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+" ")},ct=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:ce.createElement(te.Z,{className:ne.Z.lists,gutter:[10,10]},et.map((xt,Mt)=>ce.createElement(Ae.Z,{flex:"110px",className:ne.Z.item},ce.createElement("div",null,ce.createElement(Rt.Z,{value:`$$${xt.value}$$`}),xt.name),ce.createElement("div",{className:ne.Z.children},xt.children.map((_t,Qt)=>ce.createElement("div",{key:Qt},ce.createElement("h1",null,_t.name),ce.createElement(te.Z,{gutter:[10,10]},_t.data.map((Vt,Zt)=>ce.createElement(Ae.Z,{key:Zt,onClick:()=>at(Vt),className:ne.Z.diamond},ce.createElement(Rt.Z,{value:"`$$"+Vt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ce.createElement(te.Z,{className:ne.Z.lists,gutter:[10,10]},At.map((xt,Mt)=>ce.createElement(Ae.Z,{flex:"110px",className:ne.Z.item},ce.createElement("div",null,ce.createElement(Rt.Z,{value:"`$$"+xt.value+"$$`"}),xt.name),ce.createElement("div",{className:ne.Z.children},xt.children.map((_t,Qt)=>ce.createElement("div",{key:Qt},_t.name&&ce.createElement("h1",null,_t.name),ce.createElement(te.Z,{gutter:[10,10]},_t.data.map((Vt,Zt)=>ce.createElement(Ae.Z,{key:Zt,onClick:()=>at(Vt),className:ne.Z.diamond},ce.createElement(Rt.Z,{value:"`$$"+Vt.value+"$$`"}))))))))))}],pt=()=>{var xt=document.createElement("div");xt.innerHTML=nt.current.getValue();var Mt=xt.innerText;return Ne&&Ne(Mt),Mt};return(0,Pt.useImperativeHandle)(Ut,()=>({getData:pt})),ce.createElement("div",{className:ne.Z.mathWrap},ce.createElement(Ce.default,{defaultActiveKey:"1",items:ct}),ce.createElement("math-field",{locale:"zh_cn",className:ne.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:nt,style:{width:800,marginTop:30,fontSize:18}},Le||""),qt&&ce.createElement("div",{className:ne.Z.button},ce.createElement(de.ZP,{size:"large",onClick:pt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Ve.Z=Wt},8797:function(Bn,Ve,Ot){"use strict";var Pt=Ot(59301),te=Ot(93314),Ae=Ot(99571),Ce=Object.defineProperty,de=Object.defineProperties,Rt=Object.getOwnPropertyDescriptors,ne=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable,Wt=(Ut,nt,et)=>nt in Ut?Ce(Ut,nt,{enumerable:!0,configurable:!0,writable:!0,value:et}):Ut[nt]=et,Ne=(Ut,nt)=>{for(var et in nt||(nt={}))ue.call(nt,et)&&Wt(Ut,et,nt[et]);if(ne)for(var et of ne(nt))ce.call(nt,et)&&Wt(Ut,et,nt[et]);return Ut},qt=(Ut,nt)=>de(Ut,Rt(nt));const Le=({img:Ut,buttonProps:nt={},styles:et={},customText:At,ButtonText:at,ButtonClick:ct,Buttonclass:pt,ButtonTwo:xt,imgStyles:Mt,loading:_t=!1,className:Qt=""})=>Pt.createElement("section",{className:`tc animated fadeIn ${Qt}`,style:Ne({color:"#999",margin:"100px auto",visibility:_t?"hidden":"visible"},et)},Pt.createElement("img",{src:Ut||te,style:qt(Ne({},Mt),{pointerEvents:"none",userSelect:"none"})}),Pt.createElement("p",{className:"mt20 font14"},At||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),at&&Pt.createElement(Ae.ZP,Ne({className:pt,onClick:ct},nt),at),xt&&xt);Ve.Z=Le},23210:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{Z:function(){return pt}});var Pt=Ot(59301),te={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Ae=Ot(99571),Ce=Ot(70557),de=Ot(23954),Rt=Ot(25399),ne=Ot(955),ue=Ot(94941),ce=Ot(8797),Wt=Ot(3294),Ne=Ot(19381),qt=Ot(59301),Le=Object.defineProperty,Ut=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,At=(xt,Mt,_t)=>Mt in xt?Le(xt,Mt,{enumerable:!0,configurable:!0,writable:!0,value:_t}):xt[Mt]=_t,at=(xt,Mt)=>{for(var _t in Mt||(Mt={}))nt.call(Mt,_t)&&At(xt,_t,Mt[_t]);if(Ut)for(var _t of Ut(Mt))et.call(Mt,_t)&&At(xt,_t,Mt[_t]);return xt},ct=(xt,Mt,_t)=>new Promise((Qt,Vt)=>{var Zt=me=>{try{Pe(_t.next(me))}catch($e){Vt($e)}},$t=me=>{try{Pe(_t.throw(me))}catch($e){Vt($e)}},Pe=me=>me.done?Qt(me.value):Promise.resolve(me.value).then(Zt,$t);Pe((_t=_t.apply(xt,Mt)).next())}),pt=({editOffice:xt="view",data:Mt,theme:_t,type:Qt,filename:Vt,monacoEditor:Zt,className:$t,style:Pe,close:me,onClose:$e,hasMask:tn,disabledDownload:Cn,onImgDimensions:Tn,showNodata:In,recordInfo:$n})=>{const[Ln,be]=(0,Pt.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[re,Pn]=(0,Pt.useState)(""),[li,Jn]=(0,Pt.useState)(),un=window.ENV==="build"?"/react/build":"",Yn=location.host.startsWith("localhost")?Wt.Z.PROXY_SERVER:Wt.Z.API_SERVER,Fi=10*(1024*1024),sn=(0,Pt.useRef)();Mt!=null&&Mt.startsWith("/api")&&Qt!=="txt"&&(Mt=Wt.Z.API_SERVER+Mt);const oi=Ht=>Ht.substring(Ht.lastIndexOf("/")+1).split(".").pop();Vt&&Zt&&(Zt.filename=Vt),(0,Pt.useEffect)(()=>{var Ht,kt;const mt=(kt=(Ht=document.cookie)==null?void 0:Ht.replace(/\s/g,""))==null?void 0:kt.split(";");mt==null||mt.map(vt=>{let Lt=vt.split("=");Lt[0]==="_educoder_session"&&Pn(Lt[1])})},[]),(0,Pt.useEffect)(()=>{Qt==="office"&&(Mt.indexOf("bigfilescdn.")>-1||Mt.indexOf("bigfiles1")>-1?Jn({url:Mt,fileType:oi(Mt),model:Mt.indexOf("model=edit")?"edit":"view"}):Ee())},[Qt,Mt]);const Ee=()=>ct(void 0,null,function*(){console.log("data:",Mt);let Ht=Mt;Mt.startsWith("http")||(Ht=location.origin+Ht);let kt=new URL(Ht).pathname.split("/").pop();const mt=yield(0,ue.gJ)({attachment_id:kt});mt.url=Yn+mt.url,Jn(mt)}),ci=()=>{if(Mt.startsWith("http")||Mt.startsWith("blob:")){Pi();return}(0,ne.Sv)(Vt||"educoder",Mt,Vt)},Pi=()=>{$n&&(0,Ne.fc)({id:$n==null?void 0:$n.id,watch_type:1,course_id:$n==null?void 0:$n.course_id}),(0,ne.Nd)(Vt||"educoder",decodeURIComponent(Mt))};return qt.createElement("div",{style:at({},Pe||{}),className:`${tn&&te.bgBlack} ${Qt?te.wrp:"hide"}`},me&&qt.createElement("div",{className:te.close,ref:sn},!!Tn&&qt.createElement(Rt.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>sn.current},qt.createElement("span",{onClick:()=>{$e(),Tn()}},qt.createElement("i",{className:"icon-yulanpizhu"}))),!Cn&&qt.createElement(Rt.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>sn.current},qt.createElement("span",{onClick:Pi},qt.createElement("i",{className:"icon-quxiaozhiding"}))),qt.createElement(Rt.Z,{title:"\u5173\u95ED",getPopupContainer:()=>sn.current},qt.createElement("span",{className:"",onClick:$e},qt.createElement("i",{className:"icon-guanbi1"})))),qt.createElement("div",{className:`${te[$t]} ${$t} ${te.monaco} ${Qt==="txt"?"show":"hide"}`},Qt==="txt"&&qt.createElement(qt.Fragment,null,qt.createElement(de.ZP,at({},Zt)))),Qt==="audio"&&qt.createElement("audio",{src:`${(Mt==null?void 0:Mt.indexOf("http://"))>-1||(Mt==null?void 0:Mt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Mt}`,autoPlay:!0}),Qt==="video"&&qt.createElement(qt.Fragment,null,(Mt==null?void 0:Mt.indexOf("http"))>-1?qt.createElement("video",{controls:!0,src:`${Mt}`,autoPlay:!0}):qt.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Mt}`,autoPlay:!0})),Qt==="office"&&li&&qt.createElement("iframe",{src:`${un}/office.html?key=${li.key}&url=${btoa(li.url)}&callbackUrl=${Yn+(li.callbackUrl||"")}&fileType=${li.fileType}&title=${li.title||""}&model=${xt}&officeServer=${Wt.Z.ONLYOFFICE}&disabledDownload=${!!Cn}`}),Qt==="html"&&qt.createElement("iframe",{src:Mt+"&disposition=inline"}),Qt==="pdf"&&qt.createElement("iframe",{src:`${un}/js/pdfview/index.html?filename=${Vt||"educoder.pdf"}&url=${encodeURIComponent(Mt)}&disabledDownload=${!!Cn}`}),Qt==="image"&&qt.createElement("img",{src:`${(Mt==null?void 0:Mt.indexOf("http://"))>-1||(Mt==null?void 0:Mt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Mt}`}),(Qt==="other"||Qt==="download")&&qt.createElement(qt.Fragment,null,In?qt.createElement(ce.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:qt.createElement(Ae.ZP,{icon:qt.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:ci,disabled:Cn},"\u4E0B\u8F7D")}):qt.createElement(Ae.ZP,{type:"primary",size:"middle",onClick:ci,disabled:Cn},qt.createElement(Ce.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},85149:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{z:function(){return Qt},Z:function(){return Vt}});var Pt=Ot(59301),te=Ot(50304),Ae=Ot(24768),Ce=Ot(64018),de=Ot(79710),Rt=Ot(3294),ne=Ot(955),ue=Ot(15342),ce=Ot(1012),Wt=Ot(23210),Ne=Ot(59301),Le=({html:Zt})=>{const $t=(0,Pt.useRef)(null),Pe=(0,Pt.useRef)(null),me=`.markdown-body p {
|
|
|
margin: 0 0 16px 0 !important;
|
|
|
line-height: 28px;
|
|
|
white-space: pre-wrap;
|
|
|
}
|
|
|
|
|
|
ol,
|
|
|
ul,
|
|
|
li {
|
|
|
list-style-type: none
|
|
|
}
|
|
|
|
|
|
ol,
|
|
|
ul,
|
|
|
dl {
|
|
|
margin-bottom: 0px;
|
|
|
}
|
|
|
|
|
|
.markdown-body {
|
|
|
-ms-text-size-adjust: 100%;
|
|
|
-webkit-text-size-adjust: 100%;
|
|
|
color: #333;
|
|
|
overflow: hidden;
|
|
|
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
|
|
|
word-break: break-word;
|
|
|
font-size: 16px;
|
|
|
line-height: 1.6;
|
|
|
white-space: normal;
|
|
|
word-wrap: break-word;
|
|
|
position: relative;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul>li {
|
|
|
list-style-type: disc;
|
|
|
}
|
|
|
|
|
|
.markdown-body ol>li {
|
|
|
list-style-type: decimal;
|
|
|
}
|
|
|
|
|
|
.markdown-body a {
|
|
|
background: transparent;
|
|
|
}
|
|
|
|
|
|
.markdown-body a:active,
|
|
|
.markdown-body a:hover {
|
|
|
outline: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body strong {
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 {
|
|
|
font-size: 2em;
|
|
|
margin: 0.67em 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body img {
|
|
|
border: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body hr {
|
|
|
-moz-box-sizing: content-box;
|
|
|
box-sizing: content-box;
|
|
|
height: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre {
|
|
|
overflow: auto;
|
|
|
}
|
|
|
|
|
|
.markdown-body code,
|
|
|
.markdown-body kbd,
|
|
|
.markdown-body pre {
|
|
|
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
|
|
|
font-size: 1em;
|
|
|
}
|
|
|
|
|
|
.markdown-body input {
|
|
|
color: inherit;
|
|
|
font: inherit;
|
|
|
margin: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body html input[disabled] {
|
|
|
cursor: default;
|
|
|
}
|
|
|
|
|
|
.markdown-body input {
|
|
|
line-height: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body input[type="checkbox"] {
|
|
|
-moz-box-sizing: border-box;
|
|
|
box-sizing: border-box;
|
|
|
padding: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body table {
|
|
|
border-collapse: collapse;
|
|
|
border-spacing: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body td,
|
|
|
.markdown-body th {
|
|
|
padding: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body * {
|
|
|
-moz-box-sizing: border-box;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
.markdown-body input {
|
|
|
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
|
|
|
}
|
|
|
|
|
|
.markdown-body a {
|
|
|
color: #4183c4;
|
|
|
text-decoration: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body a:hover,
|
|
|
.markdown-body a:active {
|
|
|
text-decoration: underline;
|
|
|
}
|
|
|
|
|
|
.markdown-body hr {
|
|
|
height: 0;
|
|
|
margin: 15px 0;
|
|
|
overflow: hidden;
|
|
|
background: transparent;
|
|
|
border: 0;
|
|
|
border-bottom: 1px solid #ddd;
|
|
|
}
|
|
|
|
|
|
.markdown-body hr:before {
|
|
|
display: table;
|
|
|
content: "";
|
|
|
}
|
|
|
|
|
|
.markdown-body hr:after {
|
|
|
display: table;
|
|
|
clear: both;
|
|
|
content: "";
|
|
|
}
|
|
|
|
|
|
.markdown-body h1,
|
|
|
.markdown-body h2,
|
|
|
.markdown-body h3,
|
|
|
.markdown-body h4,
|
|
|
.markdown-body h5,
|
|
|
.markdown-body h6 {
|
|
|
margin-top: 15px;
|
|
|
margin-bottom: 15px;
|
|
|
line-height: 1.1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 {
|
|
|
font-size: 30px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h2 {
|
|
|
font-size: 21px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h3 {
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h4 {
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h5 {
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h6 {
|
|
|
font-size: 11px;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote {
|
|
|
margin: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol {
|
|
|
padding: 0;
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
|
|
|
ul.linenums,
|
|
|
ol.linenums {
|
|
|
padding: 16px 0 0 36px !important;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol {
|
|
|
padding-left: 2em;
|
|
|
}
|
|
|
|
|
|
|
|
|
.markdown-body ol ol,
|
|
|
.markdown-body ul ol {
|
|
|
list-style-type: lower-roman;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul ul ol,
|
|
|
.markdown-body ul ol ol,
|
|
|
.markdown-body ol ul ol,
|
|
|
.markdown-body ol ol ol {
|
|
|
list-style-type: lower-alpha;
|
|
|
}
|
|
|
|
|
|
.markdown-body dd {
|
|
|
margin-left: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body code {
|
|
|
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0;
|
|
|
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
|
}
|
|
|
|
|
|
.markdown-body .octicon {
|
|
|
font: normal normal 16px octicons-anchor;
|
|
|
line-height: 1;
|
|
|
display: inline-block;
|
|
|
text-decoration: none;
|
|
|
-webkit-font-smoothing: antialiased;
|
|
|
-moz-osx-font-smoothing: grayscale;
|
|
|
-webkit-user-select: none;
|
|
|
-moz-user-select: none;
|
|
|
-ms-user-select: none;
|
|
|
user-select: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body .octicon-link:before {
|
|
|
content: '\f05c';
|
|
|
}
|
|
|
|
|
|
.markdown-body>*:first-child {
|
|
|
margin-top: 0 !important;
|
|
|
}
|
|
|
|
|
|
.markdown-body>*:last-child {
|
|
|
margin-bottom: 0 !important;
|
|
|
}
|
|
|
|
|
|
.markdown-body .anchor {
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
display: block;
|
|
|
padding-right: 6px;
|
|
|
padding-left: 30px;
|
|
|
margin-left: -30px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .anchor:focus {
|
|
|
outline: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1,
|
|
|
.markdown-body h2,
|
|
|
.markdown-body h3,
|
|
|
.markdown-body h4,
|
|
|
.markdown-body h5,
|
|
|
.markdown-body h6 {
|
|
|
position: relative;
|
|
|
margin-top: 1em;
|
|
|
margin-bottom: 16px;
|
|
|
font-weight: bold;
|
|
|
line-height: 1.4;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 .octicon-link,
|
|
|
.markdown-body h2 .octicon-link,
|
|
|
.markdown-body h3 .octicon-link,
|
|
|
.markdown-body h4 .octicon-link,
|
|
|
.markdown-body h5 .octicon-link,
|
|
|
.markdown-body h6 .octicon-link {
|
|
|
display: none;
|
|
|
color: #000;
|
|
|
vertical-align: middle;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1:hover .anchor,
|
|
|
.markdown-body h2:hover .anchor,
|
|
|
.markdown-body h3:hover .anchor,
|
|
|
.markdown-body h4:hover .anchor,
|
|
|
.markdown-body h5:hover .anchor,
|
|
|
.markdown-body h6:hover .anchor {
|
|
|
padding-left: 8px;
|
|
|
margin-left: -30px;
|
|
|
text-decoration: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1:hover .anchor .octicon-link,
|
|
|
.markdown-body h2:hover .anchor .octicon-link,
|
|
|
.markdown-body h3:hover .anchor .octicon-link,
|
|
|
.markdown-body h4:hover .anchor .octicon-link,
|
|
|
.markdown-body h5:hover .anchor .octicon-link,
|
|
|
.markdown-body h6:hover .anchor .octicon-link {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 {
|
|
|
padding-bottom: 0.3em;
|
|
|
font-size: 2.25em;
|
|
|
line-height: 1.2;
|
|
|
border-bottom: 1px solid #eee;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 .anchor {
|
|
|
line-height: 1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h2 {
|
|
|
padding-bottom: 0.3em;
|
|
|
font-size: 1.75em;
|
|
|
line-height: 1.225;
|
|
|
border-bottom: 1px solid #eee;
|
|
|
}
|
|
|
|
|
|
.markdown-body h2 .anchor {
|
|
|
line-height: 1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h3 {
|
|
|
font-size: 1.5em;
|
|
|
line-height: 1.43;
|
|
|
}
|
|
|
|
|
|
.markdown-body h3 .anchor {
|
|
|
line-height: 1.2;
|
|
|
}
|
|
|
|
|
|
.markdown-body h4 {
|
|
|
font-size: 1.25em;
|
|
|
}
|
|
|
|
|
|
.markdown-body h4 .anchor {
|
|
|
line-height: 1.2;
|
|
|
}
|
|
|
|
|
|
.markdown-body h5 {
|
|
|
font-size: 1em;
|
|
|
}
|
|
|
|
|
|
.markdown-body h5 .anchor {
|
|
|
line-height: 1.1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h6 {
|
|
|
font-size: 1em;
|
|
|
color: #777;
|
|
|
}
|
|
|
|
|
|
.markdown-body h6 .anchor {
|
|
|
line-height: 1.1;
|
|
|
}
|
|
|
|
|
|
.markdown-body p,
|
|
|
.markdown-body blockquote,
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol,
|
|
|
.markdown-body dl,
|
|
|
.markdown-body table,
|
|
|
.markdown-body pre {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul ul,
|
|
|
.markdown-body ul ol,
|
|
|
.markdown-body ol ol,
|
|
|
.markdown-body ol ul {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body li>p {
|
|
|
margin-top: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body dl {
|
|
|
padding: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body dl dt {
|
|
|
padding: 0;
|
|
|
margin-top: 16px;
|
|
|
font-size: 1em;
|
|
|
font-style: italic;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body dl dd {
|
|
|
padding: 0 16px;
|
|
|
margin-bottom: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote {
|
|
|
padding: 0 15px;
|
|
|
color: #777;
|
|
|
border-left: 4px solid #ddd;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote> :first-child {
|
|
|
margin-top: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote> :last-child {
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body table {
|
|
|
display: block;
|
|
|
width: 100%;
|
|
|
overflow: auto;
|
|
|
word-break: normal;
|
|
|
word-break: keep-all;
|
|
|
}
|
|
|
|
|
|
.markdown-body table th {
|
|
|
font-weight: bold;
|
|
|
text-align: revert;
|
|
|
}
|
|
|
|
|
|
.markdown-body table th,
|
|
|
.markdown-body table td {
|
|
|
padding: 6px 13px;
|
|
|
border: 1px solid #ddd;
|
|
|
}
|
|
|
|
|
|
.markdown-body table tr {
|
|
|
background-color: #fff;
|
|
|
border-top: 1px solid #ccc;
|
|
|
}
|
|
|
|
|
|
.markdown-body table tr:nth-child(2n) {
|
|
|
background-color: #f8f8f8;
|
|
|
}
|
|
|
|
|
|
.markdown-body img {
|
|
|
max-width: 100%;
|
|
|
-moz-box-sizing: border-box;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
.markdown-body code {
|
|
|
padding: 0;
|
|
|
padding-top: 0.2em;
|
|
|
padding-bottom: 0.2em;
|
|
|
margin: 0;
|
|
|
font-size: 85%;
|
|
|
background-color: rgba(0, 0, 0, 0.04);
|
|
|
border-radius: 3px;
|
|
|
}
|
|
|
|
|
|
.markdown-body code:has(.katex) {
|
|
|
background-color: transparent;
|
|
|
}
|
|
|
|
|
|
.markdown-body code:before,
|
|
|
.markdown-body code:after {
|
|
|
letter-spacing: -0.2em;
|
|
|
content: "\\00a0";
|
|
|
}
|
|
|
|
|
|
.markdown-body pre>code {
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
font-size: 100%;
|
|
|
word-break: normal;
|
|
|
white-space: pre;
|
|
|
background: transparent;
|
|
|
border: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body .highlight {
|
|
|
margin-bottom: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .highlight pre,
|
|
|
.markdown-body pre {
|
|
|
padding: 16px;
|
|
|
overflow: auto;
|
|
|
font-size: 85%;
|
|
|
line-height: 1.45;
|
|
|
background-color: #f7f7f7;
|
|
|
border-radius: 3px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .highlight pre {
|
|
|
margin-bottom: 0;
|
|
|
word-break: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre {
|
|
|
word-wrap: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre code {
|
|
|
display: inline;
|
|
|
max-width: initial;
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
overflow: initial;
|
|
|
line-height: inherit;
|
|
|
word-wrap: normal;
|
|
|
background-color: transparent;
|
|
|
border: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre code:before,
|
|
|
.markdown-body pre code:after {
|
|
|
content: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body kbd {
|
|
|
display: inline-block;
|
|
|
padding: 3px 5px;
|
|
|
font-size: 11px;
|
|
|
line-height: 10px;
|
|
|
color: #555;
|
|
|
vertical-align: middle;
|
|
|
background-color: #fcfcfc;
|
|
|
border: solid 1px #ccc;
|
|
|
border-bottom-color: #bbb;
|
|
|
border-radius: 3px;
|
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-c {
|
|
|
color: #969896;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-c1,
|
|
|
.markdown-body .pl-mdh,
|
|
|
.markdown-body .pl-mm,
|
|
|
.markdown-body .pl-mp,
|
|
|
.markdown-body .pl-mr,
|
|
|
.markdown-body .pl-s1 .pl-v,
|
|
|
.markdown-body .pl-s3,
|
|
|
.markdown-body .pl-sc,
|
|
|
.markdown-body .pl-sv {
|
|
|
color: #0086b3;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-e,
|
|
|
.markdown-body .pl-en {
|
|
|
color: #795da3;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-s1 .pl-s2,
|
|
|
.markdown-body .pl-smi,
|
|
|
.markdown-body .pl-smp,
|
|
|
.markdown-body .pl-stj,
|
|
|
.markdown-body .pl-vo,
|
|
|
.markdown-body .pl-vpf {
|
|
|
color: #333;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-ent {
|
|
|
color: #63a35c;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-k,
|
|
|
.markdown-body .pl-s,
|
|
|
.markdown-body .pl-st {
|
|
|
color: #a71d5d;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-pds,
|
|
|
.markdown-body .pl-s1,
|
|
|
.markdown-body .pl-s1 .pl-pse .pl-s2,
|
|
|
.markdown-body .pl-sr,
|
|
|
.markdown-body .pl-sr .pl-cce,
|
|
|
.markdown-body .pl-sr .pl-sra,
|
|
|
.markdown-body .pl-sr .pl-sre,
|
|
|
.markdown-body .pl-src {
|
|
|
color: #df5000;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mo,
|
|
|
.markdown-body .pl-v {
|
|
|
color: #1d3e81;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-id {
|
|
|
color: #b52a1d;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-ii {
|
|
|
background-color: #b52a1d;
|
|
|
color: #f8f8f8;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-sr .pl-cce {
|
|
|
color: #63a35c;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-ml {
|
|
|
color: #693a17;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mh,
|
|
|
.markdown-body .pl-mh .pl-en,
|
|
|
.markdown-body .pl-ms {
|
|
|
color: #1d3e81;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mq {
|
|
|
color: #008080;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mi {
|
|
|
color: #333;
|
|
|
font-style: italic;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mb {
|
|
|
color: #333;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-md,
|
|
|
.markdown-body .pl-mdhf {
|
|
|
background-color: #ffecec;
|
|
|
color: #bd2c00;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mdht,
|
|
|
.markdown-body .pl-mi1 {
|
|
|
background-color: #eaffea;
|
|
|
color: #55a532;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mdr {
|
|
|
color: #795da3;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body kbd {
|
|
|
display: inline-block;
|
|
|
padding: 3px 5px;
|
|
|
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
|
line-height: 10px;
|
|
|
color: #555;
|
|
|
vertical-align: middle;
|
|
|
background-color: #fcfcfc;
|
|
|
border: solid 1px #ccc;
|
|
|
border-bottom-color: #bbb;
|
|
|
border-radius: 3px;
|
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
|
}
|
|
|
|
|
|
.markdown-body .task-list-item {
|
|
|
list-style-type: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body .task-list-item+.task-list-item {
|
|
|
margin-top: 3px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .task-list-item input {
|
|
|
float: left;
|
|
|
margin: 0.3em 0 0.25em -1.6em;
|
|
|
vertical-align: middle;
|
|
|
}
|
|
|
|
|
|
.markdown-body :checked+.radio-label {
|
|
|
z-index: 1;
|
|
|
position: relative;
|
|
|
border-color: #4183c4;
|
|
|
}
|
|
|
|
|
|
|
|
|
/*! Pretty printing styles. Used with prettify.js. */
|
|
|
/* SPAN elements with the classes below are added by prettyprint. */
|
|
|
.pln {
|
|
|
color: #000
|
|
|
}
|
|
|
|
|
|
/* plain text */
|
|
|
|
|
|
@media screen {
|
|
|
.str {
|
|
|
color: #080
|
|
|
}
|
|
|
|
|
|
/* string content */
|
|
|
.kwd {
|
|
|
color: #008
|
|
|
}
|
|
|
|
|
|
/* a keyword */
|
|
|
.com {
|
|
|
color: #800
|
|
|
}
|
|
|
|
|
|
/* a comment */
|
|
|
.typ {
|
|
|
color: #606
|
|
|
}
|
|
|
|
|
|
/* a type name */
|
|
|
.lit {
|
|
|
color: #066
|
|
|
}
|
|
|
|
|
|
/* a literal value */
|
|
|
/* punctuation, lisp open bracket, lisp close bracket */
|
|
|
.pun,
|
|
|
.opn,
|
|
|
.clo {
|
|
|
color: #660
|
|
|
}
|
|
|
|
|
|
.tag {
|
|
|
color: #008
|
|
|
}
|
|
|
|
|
|
/* a markup tag name */
|
|
|
.atn {
|
|
|
color: #606
|
|
|
}
|
|
|
|
|
|
/* a markup attribute name */
|
|
|
.atv {
|
|
|
color: #080
|
|
|
}
|
|
|
|
|
|
/* a markup attribute value */
|
|
|
.dec,
|
|
|
.var {
|
|
|
color: #606
|
|
|
}
|
|
|
|
|
|
/* a declaration; a variable name */
|
|
|
.fun {
|
|
|
color: red
|
|
|
}
|
|
|
|
|
|
/* a function name */
|
|
|
}
|
|
|
|
|
|
/* Use higher contrast and text-weight for printable form. */
|
|
|
@media print,
|
|
|
projection {
|
|
|
.str {
|
|
|
color: #060
|
|
|
}
|
|
|
|
|
|
.kwd {
|
|
|
color: #006;
|
|
|
font-weight: bold
|
|
|
}
|
|
|
|
|
|
.com {
|
|
|
color: #600;
|
|
|
font-style: italic
|
|
|
}
|
|
|
|
|
|
.typ {
|
|
|
color: #404;
|
|
|
font-weight: bold
|
|
|
}
|
|
|
|
|
|
.lit {
|
|
|
color: #044
|
|
|
}
|
|
|
|
|
|
.pun,
|
|
|
.opn,
|
|
|
.clo {
|
|
|
color: #440
|
|
|
}
|
|
|
|
|
|
.tag {
|
|
|
color: #006;
|
|
|
font-weight: bold
|
|
|
}
|
|
|
|
|
|
.atn {
|
|
|
color: #404
|
|
|
}
|
|
|
|
|
|
.atv {
|
|
|
color: #060
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/* Put a border around prettyprinted code snippets. */
|
|
|
pre.prettyprint {
|
|
|
padding: 2px;
|
|
|
/* border: 1px solid #888 */
|
|
|
}
|
|
|
|
|
|
/* Specify class=linenums on a pre to get line numbering */
|
|
|
ol.linenums {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0
|
|
|
}
|
|
|
|
|
|
/* IE indents via margin-left */
|
|
|
li.L0,
|
|
|
li.L1,
|
|
|
li.L2,
|
|
|
li.L3,
|
|
|
li.L5,
|
|
|
li.L6,
|
|
|
li.L7,
|
|
|
li.L8 {
|
|
|
list-style-type: none
|
|
|
}
|
|
|
|
|
|
/* Alternate shading for lines */
|
|
|
li.L1,
|
|
|
li.L3,
|
|
|
li.L5,
|
|
|
li.L7,
|
|
|
li.L9 {
|
|
|
background: #eee
|
|
|
}
|
|
|
|
|
|
.markdown-body p,
|
|
|
.markdown-body blockquote,
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol,
|
|
|
.markdown-body dl,
|
|
|
.markdown-body table,
|
|
|
.markdown-body pre {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 16px;
|
|
|
}`;return(0,Pt.useEffect)(()=>{const $e=$t.current.attachShadow({mode:"open"});Pe.current=document.createElement("div"),Pe.current.className="markdown-body",Pe.current.innerHTML=Zt,$e.appendChild(Pe.current);const tn=document.createElement("style");return tn.textContent=me,$e.appendChild(tn),()=>{$e.innerHTML=""}},[]),(0,Pt.useEffect)(()=>{Pe.current&&(Pe.current.innerHTML=Zt)},[Zt]),Ne.createElement("div",{ref:$t})},Ut=Object.defineProperty,nt=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable,at=(Zt,$t,Pe)=>$t in Zt?Ut(Zt,$t,{enumerable:!0,configurable:!0,writable:!0,value:Pe}):Zt[$t]=Pe,ct=(Zt,$t)=>{for(var Pe in $t||($t={}))et.call($t,Pe)&&at(Zt,Pe,$t[Pe]);if(nt)for(var Pe of nt($t))At.call($t,Pe)&&at(Zt,Pe,$t[Pe]);return Zt};const pt="@\u2581\u2581@",xt="@\u2581@",Mt=/<pre[^>]*>/g;function _t(Zt){let $t=document.createElement("div");return $t.innerHTML=Zt,$t.childNodes.length===0?"":$t.childNodes[0].nodeValue}const Qt=(Zt,$t)=>{Zt=Zt||"";const Pe=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,me=/\"(?: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,tn=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return $t?Zt.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Pe,(Cn,Tn,In,$n,Ln,be,re)=>{const Pn=Tn||$n||be,li=In||Ln||re||"?";return Rt.Z.API_SERVER+"/api/attachments/"+Pn+li+"&t="+(0,ne.Jn)(Pn,Date.now())+(Cn.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Zt=Zt.replace(tn,(Cn,Tn,In,$n,Ln,be,re)=>{const Pn=Tn||$n||be,li=In||Ln||re||"?";return Rt.Z.API_SERVER+"/attachments/download/"+Pn+li+"&t="+(0,ne.Jn)(Pn,Date.now())+(Cn.indexOf(")")>-1?")":"&")}).replace(Pe,(Cn,Tn,In,$n,Ln,be,re)=>{const Pn=Tn||$n||be,li=In||Ln||re||"?";return Rt.Z.API_SERVER+"/api/attachments/"+Pn+li+"&t="+(0,ne.Jn)(Pn,Date.now())+(Cn.indexOf(")")>-1?")":"&")}).replace(me,(Cn,Tn,In,$n,Ln)=>{const be=Tn||$n,re=In||Ln||"";return'"'+Rt.Z.API_SERVER+"/api/attachments/"+be+re+be+re+"&t="+(0,ne.Jn)(be,Date.now())}).replace($e,(Cn,Tn,In,$n,Ln)=>{const be=Tn||$n,re=In||Ln||"";return"("+Rt.Z.API_SERVER+"/files/uploads/"+be+re+be+re+"&t="+(0,ne.Jn)(be,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,`
|
|
|
`),Zt)};var Vt=({value:Zt="",className:$t,showTextOnly:Pe,showLines:me,style:$e={},stylesPrev:tn={},highlightKeywords:Cn,showProgramFill:Tn,isProgramFill:In,disabledFill:$n=!1,programFillValue:Ln,onFillChange:be=li=>{},onFillBlur:re=()=>{},onFillFocus:Pn=()=>{}})=>{let li=String(Zt);const[Jn,un]=(0,Pt.useState)(""),[Yn,si]=(0,Pt.useState)("office"),[Fi,sn]=(0,Pt.useState)([]),oi=(0,Pt.useRef)("a"+(0,ce.Z)()),Ee={},ci=(ve,ze,De)=>{const nn=document.createElement(ve===xt?"input":"textarea");nn.style.width="100%",nn.style.height=ve===xt?"40px":"151px",nn.rows=5,nn.spellcheck=!1,nn.name="edu-program-fill",nn.placeholder="\u8BF7\u8F93\u5165",nn.dataset.id=ze;const kn=Object.keys(Ee).length;return Ee[kn]=nn,`<span class="edu-program-fill-wrap ${ve===xt?"":"show"}" style="width:${ve===xt?"400px":"100%"}" title=${De||""}><span>${nn.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Pi(ve){return ve=ve.replace(/!\[.*?\]\(.*?\)/g,""),ve=ve.replace(/\[.*?\]\(.*?\)/g,""),ve=ve.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),ve=ve.replace(/<embed.*?>/g,""),ve=ve.replace(/<img.*?>/g,""),ve=ve.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),ve=ve.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),ve=ve.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),ve=ve.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),ve}const Ht=ve=>ve.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(ze,De){let nn=De.replace(/(\n|\r)/g,"").split("}"),kn=[];return nn.map(Gn=>{Gn!=""&&kn.push(`.${oi.current} ${Gn}`)}),`<style>${kn.join("}")}</style>`}),kt=(0,Pt.useMemo)(()=>{try{const nn=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,kn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Gn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,gn=/\(\/attachments\/download\//g;li=li.replace(gn,"("+Rt.Z.API_SERVER+"/attachments/download/").replace(nn,"("+Rt.Z.API_SERVER+"/api/attachments/").replace(kn,'"'+Rt.Z.API_SERVER+"/api/attachments/").replace(Gn,'"'+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(nn){}if(Tn){let nn=-1;return li=li.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(kn,Gn,gn){var Ri;return++nn,ci(kn,nn,(Ri=Ln==null?void 0:Ln[nn])==null?void 0:Ri.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${Ht(li||"")}</pre>`}let ve=Ht(li);ve=(0,Ae.ZP)(ve);const ze=(0,Ae.ez)();li.match(/\[TOC\]/)&&(ve=ve.replace("<p>[TOC]</p>",(0,Ae.Qv)()),(0,Ae.Iy)()),ve=ve.replace(/(__special_katext_id_\d+__)/g,(nn,kn)=>{const{type:Gn,expression:gn}=ze[kn];return(0,ue.renderToString)(_t(gn)||"",{displayMode:Gn==="block",throwOnError:!1,output:"html"})}),ve=ve.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ae.AL)();const De=document.createElement("div");if(De.innerHTML=ve,Pe)return De.innerText;if(Cn){const nn=Cn.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Bt(De,nn),De.innerHTML}return setTimeout(()=>ke(),500),De.innerHTML},[li,Cn]);(0,Pt.useEffect)(()=>{Kt.current&&Kt.current.querySelectorAll(["input","textarea"]).forEach(ze=>{ze.oninput=mt,ze.onblur=vt,ze.onfocus=Lt})},[Fi]),(0,Pt.useEffect)(()=>{var ve,ze,De,nn,kn;if(Ln!=null&&Ln.length)try{const Gn=Kt.current.querySelectorAll(".edu-program-fill-score"),gn=Kt.current.querySelectorAll('[name="edu-program-fill"]');for(const[Ri,di]of gn.entries())di.value=((ve=Ln==null?void 0:Ln[Ri])==null?void 0:ve.value)||"",((ze=Ln==null?void 0:Ln[Ri])==null?void 0:ze.type)==="warning"?di.className="program-fill-warning":((De=Ln==null?void 0:Ln[Ri])==null?void 0:De.type)==="success"?di.className="program-fill-success":di.className="";for(const[Ri,di]of Gn.entries())di.innerHTML=(nn=Ln==null?void 0:Ln[Ri])!=null&&nn.score?`${(kn=Ln==null?void 0:Ln[Ri])==null?void 0:kn.score}\u5206`:"";sn(Ln)}catch(Gn){console.log(Gn,"error")}},[Ln]);const mt=ve=>{Fi[ve.target.dataset.id]=Fi[ve.target.dataset.id]||{},Fi[ve.target.dataset.id].value=ve.target.value,sn([...Fi]),be(Fi,ve.target.dataset.id)},vt=ve=>{Fi[ve.target.dataset.id]=Fi[ve.target.dataset.id]||{},Fi[ve.target.dataset.id].value=ve.target.value,sn([...Fi]),re(Fi,ve.target.dataset.id)},Lt=ve=>{Fi[ve.target.dataset.id]=Fi[ve.target.dataset.id]||{},Fi[ve.target.dataset.id].value=ve.target.value,sn([...Fi]),Pn(Fi,ve.target.dataset.id)};function Bt(ve,ze){return ve.childNodes.forEach(De=>{var nn;if(De.childNodes.length>0)Bt(De,ze);else if(De.nodeName!=="IMG")if(De.innerHTML)De.innerHTML=(nn=De.innerHTML)==null?void 0:nn.replace(new RegExp(ze,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const kn=document.createElement("span");kn.innerHTML=De.textContent.replace(new RegExp(ze,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),De.replaceWith(kn)}})}const Kt=(0,Pt.useRef)();Ae.jb.WebkitLineClamp=me,me&&($e=ct(ct({},$e),Ae.jb));function ge(ve){let ze=ve.target;if(ze.tagName.toUpperCase()==="A"){let De=ze.getAttribute("href");if(De.indexOf("office")>-1)ve.preventDefault(),un(De),si("office");else if(De.indexOf("application/pdf")>-1)ve.preventDefault(),un(De),si("pdf");else if(De.indexOf("text/html")>-1)ve.preventDefault(),un(De),si("html");else if(De.startsWith("#")){ve.preventDefault();let nn=document.getElementById(De.replace("#",""));nn&&nn.scrollIntoView(!0)}}}const ke=()=>{var ve;const ze=(ve=Kt.current)==null?void 0:ve.querySelectorAll("video");ze==null||ze.forEach(De=>{if(De.oncontextmenu=()=>!1,De.src.indexOf(".m3u8")>-1&&!De.canPlayType("application/vnd.apple.mpegurl")){if(de.ZP.isSupported()){var nn=new de.ZP;nn.loadSource(De.src),nn.attachMedia(De)}}})};(0,Pt.useEffect)(()=>{if(Kt.current&&kt&&kt.match(Mt)&&window.PR.prettyPrint(),Kt.current)return Kt.current.addEventListener("click",ge),()=>{var ve;(ve=Kt.current)==null||ve.removeEventListener("click",ge),(0,Ae.AL)(),(0,Ae.Iy)()}},[kt,Kt.current,ge]),(0,Pt.useEffect)(()=>{var ve;const ze=De=>{De.preventDefault(),De.clipboardData.setData("text",window.getSelection().toString())};return(ve=Kt.current)==null||ve.addEventListener("copy",ze),()=>{var De;(De=Kt.current)==null||De.removeEventListener("copy",ze)}},[Kt.current]);const Je=ve=>/<style[\s\S]*?>/i.test(ve||"");return Pt.createElement(Pt.Fragment,null,Pe&&Pt.createElement("div",{ref:Kt},kt),!Pe&&!Je(kt)&&Pt.createElement("div",{ref:Kt,style:ct({},$e),className:`${$t||""} ${$n?"disabled-fill":""} markdown-body ${oi.current}`,dangerouslySetInnerHTML:{__html:kt}}),!Pe&&Je(kt)&&Pt.createElement(Le,{html:kt}),Pt.createElement(Wt.Z,{close:!0,data:Jn,type:Jn!=null&&Jn.length?Yn:"",style:ct({},tn),onClose:()=>un("")}))}},30917:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{Z:function(){return $e}});var Pt=Ot(59301),te=Ot(89070),Ae=Ot(62957),Ce=Ot(28284),de=Ot(6767),Rt=Ot(29787),ne=Ot(18287),ue=Ot(77019),ce=Ot(5269),Wt=Ot(25399),Ne=Ot(37568),qt={currentPrimary:"currentPrimary___NPWiR",currentDelete:"currentDelete___UEfhf",DirectoryTree:"DirectoryTree___xPxCY",EditDom:"EditDom___seNxC"},Le=Ot(83312),Ut=Ot(24780),nt=Ot(8797),et=Ot(85057),At=Object.defineProperty,at=Object.defineProperties,ct=Object.getOwnPropertyDescriptors,pt=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,Mt=Object.prototype.propertyIsEnumerable,_t=(tn,Cn,Tn)=>Cn in tn?At(tn,Cn,{enumerable:!0,configurable:!0,writable:!0,value:Tn}):tn[Cn]=Tn,Qt=(tn,Cn)=>{for(var Tn in Cn||(Cn={}))xt.call(Cn,Tn)&&_t(tn,Tn,Cn[Tn]);if(pt)for(var Tn of pt(Cn))Mt.call(Cn,Tn)&&_t(tn,Tn,Cn[Tn]);return tn},Vt=(tn,Cn)=>at(tn,ct(Cn)),Zt=(tn,Cn)=>{var Tn={};for(var In in tn)xt.call(tn,In)&&Cn.indexOf(In)<0&&(Tn[In]=tn[In]);if(tn!=null&&pt)for(var In of pt(tn))Cn.indexOf(In)<0&&Mt.call(tn,In)&&(Tn[In]=tn[In]);return Tn},$t=(tn,Cn,Tn)=>new Promise((In,$n)=>{var Ln=Pn=>{try{re(Tn.next(Pn))}catch(li){$n(li)}},be=Pn=>{try{re(Tn.throw(Pn))}catch(li){$n(li)}},re=Pn=>Pn.done?In(Pn.value):Promise.resolve(Pn.value).then(Ln,be);re((Tn=Tn.apply(tn,Cn)).next())});const Pe=(tn=[])=>tn==null?void 0:tn.map(Cn=>Vt(Qt({},Cn),{title:(Cn==null?void 0:Cn.value)||"",key:Cn==null?void 0:Cn.id,isLeaf:!0})),me=tn=>{var Cn=tn,{user:Tn,children:In,isShowComponent:$n=!0,ModalProps:Ln={},onDataSelect:be}=Cn,re=Zt(Cn,["user","children","isShowComponent","ModalProps","onDataSelect"]);const[Pn,li]=Ae.default.useModal(),[Jn]=Ce.default.useForm(),[un,Yn]=(0,Pt.useState)([]),[si,Fi]=(0,Pt.useState)(!1),[sn,oi]=(0,Pt.useState)(!1),[,Ee,ci,Pi]=(0,Le.U)(Ut.qE,{page:1,limit:9999}),[,,Ht]=(0,Le.U)(Ut.V8,{}),[,,kt]=(0,Le.U)(Ut.B$,{}),[,,mt]=(0,Le.U)(Ut.DH,{}),[,,vt]=(0,Le.U)(Ut.bJ,{}),Lt=()=>{Fi(!1),Jn.resetFields(),oi(!1)},Bt=ge=>$t(void 0,null,function*(){const{node:ke,dragNode:Je,event:ve}=ge,ze=ge.node.pos.split("-"),De=ge.dropPosition-Number(ze[ze.length-1]);if(De==0){de.ZP.warning("\u65E0\u6CD5\u79FB\u52A8\u5230\u5185\u90E8\u4F4D\u7F6E");return}if(De==1&&(Je==null?void 0:Je.item_index)==(ke==null?void 0:ke.item_index)+1){de.ZP.warning("\u672A\u79FB\u52A8\u4F4D\u7F6E");return}const nn=yield vt({id:Je==null?void 0:Je.key,position:De==-1?1:(Je==null?void 0:Je.item_index)>(ke==null?void 0:ke.item_index)?(ke==null?void 0:ke.item_index)+1:ke==null?void 0:ke.item_index});(nn==null?void 0:nn.status)===0&&(de.ZP.success("\u79FB\u52A8\u6210\u529F"),ci({},!0))}),Kt=ge=>$t(void 0,null,function*(){let ke={};sn?ke=yield kt(Qt({},ge)):ke=yield mt(Qt({},ge)),(ke==null?void 0:ke.status)==0&&(de.ZP.success((ke==null?void 0:ke.message)||(sn?"\u6DFB\u52A0\u6210\u529F":"\u66F4\u65B0\u6210\u529F")),ci({},!0),Lt())});return(0,Pt.useEffect)(()=>{Ln!=null&&Ln.open&&ci({},!0)},[Ln==null?void 0:Ln.open]),(0,Pt.useEffect)(()=>{var ge;Yn(Pe((ge=Pi==null?void 0:Pi.data)==null?void 0:ge.list))},[Pi]),$n?Pt.createElement(Pt.Fragment,null,li,In,Pt.createElement(Ae.default,Qt({},Qt({title:"\u5E38\u7528\u8BC4\u8BED",width:640,centered:!0,footer:null,bodyStyle:{padding:"10px 5px 25px"}},Ln)),Pt.createElement(Rt.Z,{spinning:Ee},(un==null?void 0:un.length)>0?Pt.createElement(Pt.Fragment,null,Pt.createElement(ne.default.DirectoryTree,{height:500,className:qt.DirectoryTree,multiple:!0,draggable:{icon:!1},defaultExpandAll:!0,switcherIcon:!1,showIcon:!1,onSelect:be,treeData:un,onDrop:Bt,titleRender:ge=>Pt.createElement(Pt.Fragment,null,Pt.createElement("span",{className:"multi_ellipsis1",style:{flex:1,marginRight:"32px"}},ge==null?void 0:ge.title),Pt.createElement("div",{className:`${qt.EditDom}`},Pt.createElement(ue.Z,{wrap:!1,align:"middle",gutter:16},Pt.createElement(ce.Z,null,Pt.createElement(Wt.Z,{title:"\u957F\u6309\u53EF\u8FDB\u884C\u62D6\u62FD\u6392\u5E8F"},Pt.createElement("i",{className:`iconfont icon-tuodong1 font12 ${qt.currentPrimary}`}))),Pt.createElement(ce.Z,null,Pt.createElement(Wt.Z,{title:"\u7F16\u8F91"},Pt.createElement("i",{className:`iconfont icon-bianji11 font12 ${qt.currentPrimary}`,onClick:ke=>{ke.stopPropagation(),Jn.setFieldsValue(Qt({},ge)),Fi(!0)}}))),Pt.createElement(ce.Z,null,Pt.createElement(Wt.Z,{title:"\u5220\u9664"},Pt.createElement("i",{className:`iconfont icon-shanchu14 font12 ${qt.currentDelete}`,onClick:ke=>{ke.stopPropagation(),Pn.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:()=>$t(void 0,null,function*(){const Je=yield Ht({id:ge==null?void 0:ge.key});(Je==null?void 0:Je.status)==0&&(de.ZP.success((Je==null?void 0:Je.message)||"\u5220\u9664\u6210\u529F"),ci({},!0))})})}}))))))}),Pt.createElement(et.op,{className:"ml20 mt20",icon:Pt.createElement("i",{className:"iconfont icon-xiaojiahao"}),style:{borderRadius:"4px"},onClick:()=>{oi(!0),Fi(!0)}},"\u6DFB\u52A0\u5E38\u7528\u8BC4\u8BED")):Pt.createElement(nt.Z,{styles:{margin:"30px auto"},customText:Pt.createElement("span",null,"\u6682\u65E0\u5E38\u7528\u8BC4\u8BED\uFF0C\u4F60\u53EF\u4EE5",Pt.createElement("a",{onClick:()=>{oi(!0),Fi(!0)}},"\u6DFB\u52A0\u5E38\u7528\u8BC4\u8BED"))}))),Pt.createElement(Ae.default,{title:sn?"\u6DFB\u52A0\u5E38\u7528\u8BC4\u8BED":"\u7F16\u8F91\u5E38\u7528\u8BC4\u8BED",open:si,okText:sn?"\u6DFB\u52A0":"\u786E\u5B9A",onCancel:()=>{Lt()},onOk:()=>{Jn.submit()}},Pt.createElement(Ce.default,{form:Jn,onFinish:Kt},sn&&Pt.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"),Pt.createElement(Ce.default.Item,{hidden:!0,name:"id"}),Pt.createElement(Ce.default.Item,{className:"mt10",name:"value"},Pt.createElement(Ne.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 $e=(0,te.connect)(({loading:tn,user:Cn})=>({user:Cn,loading:tn.effects}))(me)},97692:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{h:function(){return xt}});var Pt=Ot(59301),te=Ot(82326),Ae=Ot(28284),Ce=Ot(99571),de=Ot(89780),Rt=Ot.n(de),ne=Ot(37036),ue=Ot(95625),ce=Object.defineProperty,Wt=Object.defineProperties,Ne=Object.getOwnPropertyDescriptors,qt=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,Ut=Object.prototype.propertyIsEnumerable,nt=(Mt,_t,Qt)=>_t in Mt?ce(Mt,_t,{enumerable:!0,configurable:!0,writable:!0,value:Qt}):Mt[_t]=Qt,et=(Mt,_t)=>{for(var Qt in _t||(_t={}))Le.call(_t,Qt)&&nt(Mt,Qt,_t[Qt]);if(qt)for(var Qt of qt(_t))Ut.call(_t,Qt)&&nt(Mt,Qt,_t[Qt]);return Mt},At=(Mt,_t)=>Wt(Mt,Ne(_t));const at=te.default.Option,ct={labelCol:{span:4},wrapperCol:{span:20}},pt={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"]};Ve.Z=({callback:Mt,onCancel:_t})=>{const[Qt,Vt]=(0,Pt.useState)("python");function Zt(Pe){Vt(pt[Pe][1])}function $t(Pe){Mt(Pe)}return Pt.createElement(Ae.default,At(et({},ct),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:$t,style:{width:500}}),Pt.createElement(Ae.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},Pt.createElement(te.default,{getPopupContainer:Pe=>Pe.parentNode,onChange:Zt},Object.keys(pt).map(Pe=>Pt.createElement(at,{key:Pe,value:Pe},pt[Pe][0])))),Pt.createElement(Ae.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},Pt.createElement(xt,{mode:Qt})),Pt.createElement("div",{className:"flex-container flex-end"},Pt.createElement(Ce.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Pt.createElement(Ce.ZP,{type:"ghost",onClick:_t},"\u53D6\u6D88")))};function xt({value:Mt,onChange:_t,mode:Qt,options:Vt={}}){const Zt=(0,Pt.useRef)(),[$t,Pe]=(0,Pt.useState)();return(0,Pt.useEffect)(()=>{if($t){let me=function($e){const tn=$e.getValue();_t&&_t(tn)};return $t.on("change",me),()=>{$t.off("change",me)}}},[$t,_t]),(0,Pt.useEffect)(()=>{$t&&$t.setOption("mode",Qt)},[$t,Qt]),(0,Pt.useEffect)(()=>{$t&&(Mt!==$t.getValue()||Mt==="")&&setTimeout(()=>{$t.setValue(Mt||"")},300)},[$t,Mt]),(0,Pt.useEffect)(()=>{if(Zt.current&&!$t){const me=Rt().fromTextArea(Zt.current,et({mode:Qt,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Vt));Pe(me)}},[Zt.current,$t]),Pt.createElement("div",{className:"my-codemirror-container"},Pt.createElement("textarea",{ref:Zt}))}},12290:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{Z:function(){return wi}});var Pt=Ot(59301),te=Ot(89780),Ae=Ot.n(te),Ce=Ot(76374),de=Ot(37036),Rt=Ot(6313),ne=Ot(25717),ue=Ot(99498),ce=Ot(25419),Wt=Ot(67549),Ne=Ot(85149),qt=({value:je="",className:He,showTextOnly:Ue,showLines:fi,style:Se={}})=>{const _i=(0,Pt.useMemo)(()=>"",[je]);return Pt.createElement(Pt.Fragment,null,Pt.createElement("div",{dangerouslySetInnerHTML:{__html:_i}}))},Le=Ot(59301),Ut=Object.defineProperty,nt=Object.defineProperties,et=Object.getOwnPropertyDescriptors,At=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,pt=(je,He,Ue)=>He in je?Ut(je,He,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):je[He]=Ue,xt=(je,He)=>{for(var Ue in He||(He={}))at.call(He,Ue)&&pt(je,Ue,He[Ue]);if(At)for(var Ue of At(He))ct.call(He,Ue)&&pt(je,Ue,He[Ue]);return je},Mt=(je,He)=>nt(je,et(He));let _t=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u56FE\u50CF",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"iconfont icon-jisuan1",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function Qt({onActionCallback:je,title:He,icon:Ue,actionName:fi,className:Se="",children:_i}){function Un(){je(fi)}return Le.createElement("a",{title:He,className:Se,onClick:Un},Le.createElement("i",{className:`${Ue}`}),_i)}var Vt=({watch:je,showNullButton:He,showNullProgramButton:Ue,onActionCallback:fi,fullScreen:Se,insertTemp:_i,hidetoolBar:Un,extraUse:Ai})=>{const We=[..._t,{title:`${je?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${je?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return Le.createElement("ul",{className:"markdown-toolbar-container"},!Un&&We.map((Ke,ui)=>Le.createElement("li",{key:ui},Ke.actionName?Le.createElement(Qt,Mt(xt({},Ke),{onActionCallback:fi})):Le.createElement("span",{className:"v-line"}))),He?Le.createElement("li",null,Le.createElement(Qt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:fi},Le.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ue?Le.createElement(Le.Fragment,null,Le.createElement("li",null,Le.createElement(Qt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:fi},Le.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),Le.createElement("li",null,Le.createElement(Qt,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:fi},Le.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,_i&&Le.createElement("li",null,Le.createElement(Qt,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${_i}`,onActionCallback:fi},Le.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Ai&&Le.createElement("li",null,Ai),Le.createElement("li",{className:"btn-full-screen"},Le.createElement(Qt,{icon:`${Se?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Se?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:fi})))},Zt=Ot(79346),$t=Ot(28284),Pe=Ot(37568),me=Ot(99571),$e=Object.defineProperty,tn=Object.defineProperties,Cn=Object.getOwnPropertyDescriptors,Tn=Object.getOwnPropertySymbols,In=Object.prototype.hasOwnProperty,$n=Object.prototype.propertyIsEnumerable,Ln=(je,He,Ue)=>He in je?$e(je,He,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):je[He]=Ue,be=(je,He)=>{for(var Ue in He||(He={}))In.call(He,Ue)&&Ln(je,Ue,He[Ue]);if(Tn)for(var Ue of Tn(He))$n.call(He,Ue)&&Ln(je,Ue,He[Ue]);return je},re=(je,He)=>tn(je,Cn(He));const Pn={labelCol:{span:4},wrapperCol:{span:20}};var li=({callback:je,onCancel:He})=>{function Ue(fi){je(fi)}return Pt.createElement($t.default,re(be({},Pn),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ue,style:{width:500}}),Pt.createElement($t.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},Pt.createElement(Pe.default,null)),Pt.createElement($t.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},Pt.createElement(Pe.default,null)),Pt.createElement("div",{className:"flex-container flex-end"},Pt.createElement(me.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Pt.createElement(me.ZP,{type:"ghost",onClick:He},"\u53D6\u6D88")))},Jn=Ot(97692),un=Ot(28451),Yn=Ot(62957),si=Ot(77019),Fi=Ot(73524),sn=Ot(59301),oi=({callback:je,onCancel:He})=>{const Ue=document.createElement("canvas"),fi=Ue.getContext("2d");Ue.width=1e3,Ue.height=800,fi.fillStyle="#ffffff",fi.fillRect(0,0,Ue.width,Ue.height);const Se=Ue.toDataURL("image/png");return sn.createElement(Yn.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},sn.createElement(si.Z,{style:{height:"100vh"}},sn.createElement(Fi.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Se,visible:!0,title:String(Date.now())},onOk:_i=>{je({src:_i.url})},onClose:He})))},Ee=Ot(12378);function ci(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(ci,go.CommandHandler),ci.prototype.canAlignSelection=function(){var je=this.diagram;return!(je===null||je.isReadOnly||je.isModelReadOnly||je.selection.count<2)},ci.prototype.alignLeft=function(){var je=this.diagram;je.startTransaction("aligning left");var He=1/0;je.selection.each(function(Ue){Ue instanceof go.Link||(He=Math.min(Ue.position.x,He))}),je.selection.each(function(Ue){Ue instanceof go.Link||Ue.move(new go.Point(He,Ue.position.y))}),je.commitTransaction("aligning left")},ci.prototype.alignRight=function(){var je=this.diagram;je.startTransaction("aligning right");var He=-1/0;je.selection.each(function(Ue){if(!(Ue instanceof go.Link)){var fi=Ue.actualBounds.x+Ue.actualBounds.width;He=Math.max(fi,He)}}),je.selection.each(function(Ue){Ue instanceof go.Link||Ue.move(new go.Point(He-Ue.actualBounds.width,Ue.position.y))}),je.commitTransaction("aligning right")},ci.prototype.alignTop=function(){var je=this.diagram;je.startTransaction("alignTop");var He=1/0;je.selection.each(function(Ue){Ue instanceof go.Link||(He=Math.min(Ue.position.y,He))}),je.selection.each(function(Ue){Ue instanceof go.Link||Ue.move(new go.Point(Ue.position.x,He))}),je.commitTransaction("alignTop")},ci.prototype.alignBottom=function(){var je=this.diagram;je.startTransaction("aligning bottom");var He=-1/0;je.selection.each(function(Ue){if(!(Ue instanceof go.Link)){var fi=Ue.actualBounds.y+Ue.actualBounds.height;He=Math.max(fi,He)}}),je.selection.each(function(Ue){Ue instanceof go.Link||Ue.move(new go.Point(Ue.actualBounds.x,He-Ue.actualBounds.height))}),je.commitTransaction("aligning bottom")},ci.prototype.alignCenterX=function(){var je=this.diagram,He=je.selection.first();if(He){je.startTransaction("aligning Center X");var Ue=He.actualBounds.x+He.actualBounds.width/2;je.selection.each(function(fi){fi instanceof go.Link||fi.move(new go.Point(Ue-fi.actualBounds.width/2,fi.actualBounds.y))}),je.commitTransaction("aligning Center X")}},ci.prototype.alignCenterY=function(){var je=this.diagram,He=je.selection.first();if(He){je.startTransaction("aligning Center Y");var Ue=He.actualBounds.y+He.actualBounds.height/2;je.selection.each(function(fi){fi instanceof go.Link||fi.move(new go.Point(fi.actualBounds.x,Ue-fi.actualBounds.height/2))}),je.commitTransaction("aligning Center Y")}},ci.prototype.alignColumn=function(je){var He=this.diagram;He.startTransaction("align Column"),je===void 0&&(je=0),je=parseFloat(je);var Ue=new Array;He.selection.each(function(Ai){Ai instanceof go.Link||Ue.push(Ai)});for(var fi=0;fi<Ue.length-1;fi++){var Se=Ue[fi],_i=Se.actualBounds.y+Se.actualBounds.height+je,Un=Ue[fi+1];Un.move(new go.Point(Se.actualBounds.x,_i))}He.commitTransaction("align Column")},ci.prototype.alignRow=function(je){je===void 0&&(je=0),je=parseFloat(je);var He=this.diagram;He.startTransaction("align Row");var Ue=new Array;He.selection.each(function(Ai){Ai instanceof go.Link||Ue.push(Ai)});for(var fi=0;fi<Ue.length-1;fi++){var Se=Ue[fi],_i=Se.actualBounds.x+Se.actualBounds.width+je,Un=Ue[fi+1];Un.move(new go.Point(_i,Se.actualBounds.y))}He.commitTransaction("align Row")},ci.prototype.canRotate=function(je){var He=this.diagram;return!(He===null||He.isReadOnly||He.isModelReadOnly||He.selection.count<1)},ci.prototype.rotate=function(je){je===void 0&&(je=90);var He=this.diagram;He.startTransaction("rotate "+je.toString());var He=this.diagram;He.selection.each(function(Ue){Ue instanceof go.Link||Ue instanceof go.Group||(Ue.angle+=je)}),He.commitTransaction("rotate "+je.toString())},ci.prototype.pullToFront=function(){var je=this.diagram;je.startTransaction("pullToFront");var He=new go.Map;je.selection.each(function(Ue){He.set(Ue.layer,0)}),He.iteratorKeys.each(function(Ue){var fi=0;Ue.parts.each(function(Se){if(!Se.isSelected){var _i=Se.zOrder;isNaN(_i)?Se.zOrder=0:fi=Math.max(fi,_i)}}),He.set(Ue,fi)}),je.selection.each(function(Ue){ci._assignZOrder(Ue,He.get(Ue.layer)+1)}),je.commitTransaction("pullToFront")},ci.prototype.pushToBack=function(){var je=this.diagram;je.startTransaction("pushToBack");var He=new go.Map;je.selection.each(function(Ue){He.set(Ue.layer,0)}),He.iteratorKeys.each(function(Ue){var fi=0;Ue.parts.each(function(Se){if(!Se.isSelected){var _i=Se.zOrder;isNaN(_i)?Se.zOrder=0:fi=Math.min(fi,_i)}}),He.set(Ue,fi)}),je.selection.each(function(Ue){ci._assignZOrder(Ue,He.get(Ue.layer)-1-ci._findGroupDepth(Ue))}),je.commitTransaction("pushToBack")},ci._assignZOrder=function(je,He,Ue){Ue===void 0&&(Ue=je),je.layer===Ue.layer&&(je.zOrder=He),je instanceof go.Group&&je.memberParts.each(function(fi){ci._assignZOrder(fi,He+1,Ue)})},ci._findGroupDepth=function(je){if(je instanceof go.Group){var He=0;return je.memberParts.each(function(Ue){He=Math.max(He,ci._findGroupDepth(Ue))}),He+1}else return 0},ci.prototype.doKeyDown=function(){var je=this.diagram;if(je!==null){var He=je.lastInput;if(He.key==="Up"||He.key==="Down"||He.key==="Left"||He.key==="Right"){var Ue=this.arrowKeyBehavior;if(Ue==="none")return;if(Ue==="select"){this._arrowKeySelect();return}else if(Ue==="move"){this._arrowKeyMove();return}else if(Ue==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},ci.prototype._getAllParts=function(){var je=new Array;return this.diagram.nodes.each(function(He){je.push(He)}),this.diagram.parts.each(function(He){je.push(He)}),je},ci.prototype._arrowKeyMove=function(){var je=this.diagram,He=je.lastInput,Ue=0,fi=0;if(He.control||He.meta)Ue=1,fi=1;else if(je.grid!==null){var Se=je.grid.gridCellSize;fi=Se.width,Ue=Se.height}je.startTransaction("arrowKeyMove"),je.selection.each(function(_i){He.key==="Up"?_i.move(new go.Point(_i.actualBounds.x,_i.actualBounds.y-Ue)):He.key==="Down"?_i.move(new go.Point(_i.actualBounds.x,_i.actualBounds.y+Ue)):He.key==="Left"?_i.move(new go.Point(_i.actualBounds.x-fi,_i.actualBounds.y)):He.key==="Right"&&_i.move(new go.Point(_i.actualBounds.x+fi,_i.actualBounds.y))}),je.commitTransaction("arrowKeyMove")},ci.prototype._arrowKeySelect=function(){var je=this.diagram,He=je.lastInput,Ue=null;He.key==="Up"?Ue=this._findNearestPartTowards(270):He.key==="Down"?Ue=this._findNearestPartTowards(90):He.key==="Left"?Ue=this._findNearestPartTowards(180):He.key==="Right"&&(Ue=this._findNearestPartTowards(0)),Ue!==null&&(He.shift?Ue.isSelected=!0:He.control||He.meta?Ue.isSelected=!Ue.isSelected:je.select(Ue))},ci.prototype._findNearestPartTowards=function(je){var He=this.diagram.selection.first();if(He===null)return null;for(var Ue=He.actualBounds.center,fi=this._getAllParts(),Se=1/0,_i=He,Un=0;Un<fi.length;Un++){var Ai=fi[Un];if(Ai!==He&&Ai.canSelect()){var We=Ai.actualBounds.center,Ke=Ue.directionPoint(We),ui=this._angleCloseness(Ke,je);if(ui<=45){var he=Ue.distanceSquaredPoint(We);he*=1+Math.sin(ui*Math.PI/180),he<Se&&(Se=he,_i=Ai)}}}return _i},ci.prototype._angleCloseness=function(je,He){return Math.min(Math.abs(He-je),Math.min(Math.abs(He+360-je),Math.abs(He-360-je)))},ci.prototype._arrowKeyTree=function(){var je=this.diagram,He=je.selection.first();if(He instanceof go.Node){var Ue=je.lastInput;if(Ue.key==="Right"){if(!He.isTreeLeaf)if(!He.isTreeExpanded)je.commandHandler.canExpandTree(He)&&je.commandHandler.expandTree(He);else{var fi=this._sortTreeChildrenByY(He).first();fi!==null&&je.select(fi)}}else if(Ue.key==="Left")if(!He.isTreeLeaf&&He.isTreeExpanded)je.commandHandler.canCollapseTree(He)&&je.commandHandler.collapseTree(He);else{var Se=He.findTreeParentNode();Se!==null&&je.select(Se)}else if(Ue.key==="Up"){var Se=He.findTreeParentNode();if(Se!==null){var _i=this._sortTreeChildrenByY(Se),Un=_i.indexOf(He);if(Un>0){for(var Ai=_i.elt(Un-1);Ai!==null&&Ai.isTreeExpanded&&!Ai.isTreeLeaf;){var We=this._sortTreeChildrenByY(Ai);Ai=We.last()}Ai!==null&&je.select(Ai)}else je.select(Se)}}else if(Ue.key==="Down")if(He.isTreeExpanded&&!He.isTreeLeaf){var fi=this._sortTreeChildrenByY(He).first();fi!==null&&je.select(fi)}else for(;He!==null;){var Se=He.findTreeParentNode();if(Se===null)break;var _i=this._sortTreeChildrenByY(Se),Un=_i.indexOf(He);if(Un<_i.length-1){je.select(_i.elt(Un+1));break}else He=Se}var Ke=je.selection.first();Ke!==null&&je.scrollToRect(Ke.actualBounds)}},ci.prototype._sortTreeChildrenByY=function(je){var He=new go.List().addAll(je.findTreeChildrenNodes());return He.sort(function(Ue,fi){var Se=Ue.location,_i=fi.location;return Se.y<_i.y?-1:Se.y>_i.y?1:Se.x<_i.x?-1:Se.x>_i.x?1:0}),He},ci.prototype.copyToClipboard=function(je){go.CommandHandler.prototype.copyToClipboard.call(this,je),this._lastPasteOffset.set(this.pasteOffset)},ci.prototype.pasteFromClipboard=function(){var je=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(je,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),je},Object.defineProperty(ci.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(je){if(je!=="move"&&je!=="select"&&je!=="scroll"&&je!=="tree"&&je!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+je);this._arrowKeyBehavior=je}}),Object.defineProperty(ci.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(je){if(!(je instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+je);this._pasteOffset.set(je)}});var Pi=ci,Ht=Ot(74413),kt=Ot(5269),mt=Ot(99064),vt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Lt=Ot(24065),Bt=Ot(59301),Kt=(je,He,Ue)=>new Promise((fi,Se)=>{var _i=We=>{try{Ai(Ue.next(We))}catch(Ke){Se(Ke)}},Un=We=>{try{Ai(Ue.throw(We))}catch(Ke){Se(Ke)}},Ai=We=>We.done?fi(We.value):Promise.resolve(We.value).then(_i,Un);Ai((Ue=Ue.apply(je,He)).next())});function ge({onCancel:je,callback:He}){let Ue=(0,Pt.useRef)(),fi=(0,Pt.useRef)(),Se=(0,Pt.useRef)(),_i=(0,Pt.useRef)(!1);const Un=(0,Pt.useRef)(!1),[Ai,We]=(0,Pt.useState)(0);function Ke(){const he=Ee.bx.make,rn={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"};Ue.current=new Ee.S0(fi.current,{padding:20,grid:he(Ee.s_,"Grid",he(Ee.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),he(Ee.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:ni=>{var Bi=ni.diagram.commandHandler.addTopLevelParts(ni.diagram.selection,!0);Bi||ni.diagram.currentTool.doCancel()},commandHandler:he(Pi),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:ni=>{var Bi=ni.subject;Bi.location=Bi.location.copy().snapToGridPoint(ni.diagram.grid.gridOrigin,ni.diagram.grid.gridCellSize),setTimeout(()=>{ni.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:ni=>{var Bi=ni.subject;setTimeout(()=>{ni.diagram.commandHandler.editTextBlock()})},LinkRelinked:ni=>{var Bi=ni.parameter.part;Bi.invalidateConnectedLinks();var Hi=ni.subject;ni.diagram.toolManager.linkingTool.isForwards?Hi.toNode.invalidateConnectedLinks():Hi.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Ue.current.nodeTemplate=he(Ee.NB,"Auto",{locationSpot:Ee.z6.Center,locationObjectName:"SHAPE",desiredSize:new Ee.$u(120,60),minSize:new Ee.$u(40,40),resizable:!0,resizeCellSize:new Ee.$u(10,10),rotatable:!0},new Ee.KX("location","loc",Ee.E9.parse).makeTwoWay(Ee.E9.stringify),new Ee.KX("desiredSize","size",Ee.$u.parse).makeTwoWay(Ee.$u.stringify),he(Ee.bn,{name:"SHAPE",fill:rn.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Ee.z6.AllSides,toSpot:Ee.z6.AllSides},new Ee.KX("figure"),new Ee.KX("fill"),new Ee.KX("stroke","borderColor"),new Ee.KX("strokeWidth","thickness"),new Ee.KX("strokeDashArray","dash")),he(Ee.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),he(Ee.al,{margin:1,textAlign:"center",overflow:Ee.al.OverflowEllipsis,editable:!0},new Ee.KX("text").makeTwoWay(),new Ee.KX("stroke","color"))),Ue.current.nodeTemplate.toolTip=he("ToolTip",he(Ee.s_,"Vertical",{maxSize:new Ee.$u(200,NaN)},he(Ee.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Ee.KX("text")),he(Ee.al,{font:"10pt sans-serif",textAlign:"center"},new Ee.KX("text","details"))));function Wn(ni,Bi){var Hi=(vi,ki)=>{vi.handled=!0,vi.diagram.model.commit(er=>{var lr=ki.part.adornedPart,oe=new Ee.E9().setRectSpot(lr.actualBounds,ni);oe.subtract(lr.location),oe.scale(2,2),oe.x+=Math.sign(oe.x)*130,oe.y+=Math.sign(oe.y)*130,oe.add(lr.location),oe.snapToGridPoint(vi.diagram.grid.gridOrigin,vi.diagram.grid.gridCellSize);var ae=er.copyNodeData(lr.data);er.setGroupKeyForNodeData(ae,er.getGroupKeyForNodeData(lr.data)),er.addNodeData(ae);var ee={from:lr.key,to:er.getKeyForNodeData(ae)};er.addLinkData(ee);var Ye=vi.diagram.findNodeForData(ae);Ye.location=oe,vi.diagram.select(Ye),setTimeout(()=>{vi.diagram.commandHandler.editTextBlock()},20)})};return he(Ee.bn,{figure:Bi,alignment:ni,alignmentFocus:ni.opposite(),width:ni.equals(Ee.z6.Top)||ni.equals(Ee.z6.Bottom)?25:18,height:ni.equals(Ee.z6.Top)||ni.equals(Ee.z6.Bottom)?18:25,fill:"orange",stroke:rn.white,strokeWidth:4,mouseEnter:(vi,ki)=>ki.fill="dodgerblue",mouseLeave:(vi,ki)=>ki.fill="orange",isActionable:!0,click:Hi,contextClick:Hi})}function pi(ni){return he(Ee.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:(Bi,Hi)=>Hi.fill="dodgerblue",mouseLeave:(Bi,Hi)=>Hi.fill="orange",click:(Bi,Hi)=>{Bi.diagram.commandHandler.showContextMenu(Hi.part.adornedPart)}},ni||{})}Ue.current.nodeTemplate.selectionAdornmentTemplate=he(Ee.uz,"Spot",he(Ee.Vm,{padding:10}),Wn(Ee.z6.Top,"TriangleUp"),Wn(Ee.z6.Left,"TriangleLeft"),Wn(Ee.z6.Right,"TriangleRight"),Wn(Ee.z6.Bottom,"TriangleDown"),pi({alignment:new Ee.z6(.75,0)}));function on(ni,Bi){return(Hi,vi)=>{Hi.handled=!0,Hi.diagram.model.commit(ki=>{ki.set(vi.part.adornedPart.data,ni,Bi)})}}function yn(ni,Bi){return Bi||(Bi="color"),he(Ee.bn,{width:16,height:16,stroke:"lightgray",fill:ni,margin:1,background:"transparent",mouseEnter:(Hi,vi)=>vi.stroke="dodgerblue",mouseLeave:(Hi,vi)=>vi.stroke="lightgray",click:on(Bi,ni),contextClick:on(Bi,ni)})}function ii(){return[he("ContextMenuButton",he(Ee.s_,"Horizontal",yn(rn.white,"fill"),yn(rn.beige,"fill"),yn(rn.extralightblue,"fill"),yn(rn.extralightred,"fill"))),he("ContextMenuButton",he(Ee.s_,"Horizontal",yn(rn.lightgray,"fill"),yn(rn.lightgreen,"fill"),yn(rn.lightblue,"fill"),yn(rn.lightred,"fill")))]}function hn(){return[he("ContextMenuButton",he(Ee.s_,"Horizontal",yn(rn.black),yn(rn.green),yn(rn.blue),yn(rn.red))),he("ContextMenuButton",he(Ee.s_,"Horizontal",yn(rn.white),yn(rn.magenta),yn(rn.purple),yn(rn.orange)))]}function An(ni,Bi){return Bi||(Bi="thickness"),he(Ee.bn,"LineH",{width:16,height:16,strokeWidth:ni,margin:1,background:"transparent",mouseEnter:(Hi,vi)=>vi.background="dodgerblue",mouseLeave:(Hi,vi)=>vi.background="transparent",click:on(Bi,ni),contextClick:on(Bi,ni)})}function xn(ni,Bi){return Bi||(Bi="dash"),he(Ee.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:ni,margin:1,background:"transparent",mouseEnter:(Hi,vi)=>vi.background="dodgerblue",mouseLeave:(Hi,vi)=>vi.background="transparent",click:on(Bi,ni),contextClick:on(Bi,ni)})}function Nn(){return[he("ContextMenuButton",he(Ee.s_,"Horizontal",An(1),An(2),An(3),An(4))),he("ContextMenuButton",he(Ee.s_,"Horizontal",xn(null),xn([2,4]),xn([4,4])))]}function ai(ni,Bi){return Bi||(Bi="figure"),he(Ee.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:ni,margin:1,background:"transparent",mouseEnter:(Hi,vi)=>vi.fill="dodgerblue",mouseLeave:(Hi,vi)=>vi.fill="lightgray",click:on(Bi,ni),contextClick:on(Bi,ni)})}Ue.current.nodeTemplate.contextMenu=he("ContextMenu",he("ContextMenuButton",he(Ee.s_,"Horizontal",ai("Rectangle"),ai("RoundedRectangle"),ai("Ellipse"),ai("Diamond"))),he("ContextMenuButton",he(Ee.s_,"Horizontal",ai("Parallelogram2"),ai("ManualOperation"),ai("Procedure"),ai("Cylinder1"))),he("ContextMenuButton",he(Ee.s_,"Horizontal",ai("Terminator"),ai("CreateRequest"),ai("Document"),ai("TriangleDown"))),ii(),hn(),Nn()),Ue.current.groupTemplate=he(Ee.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Ee.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(ni,Bi)=>{var Hi=Bi.addMembers(Bi.diagram.selection,!0);Hi||Bi.diagram.currentTool.doCancel()},avoidable:!1},new Ee.KX("location","loc",Ee.E9.parse).makeTwoWay(Ee.E9.stringify),he(Ee.s_,"Auto",{name:"BODY"},he(Ee.bn,{parameter1:10,fill:rn.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Ee.z6.AllSides,toSpot:Ee.z6.AllSides},new Ee.KX("fill"),new Ee.KX("stroke","color"),new Ee.KX("strokeWidth","thickness"),new Ee.KX("strokeDashArray","dash")),he(Ee.Vm,{background:"transparent",margin:20})),he(Ee.al,{alignment:Ee.z6.Top,alignmentFocus:Ee.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new Ee.KX("text"),new Ee.KX("stroke","color"))),Ue.current.groupTemplate.selectionAdornmentTemplate=he(Ee.uz,"Spot",he(Ee.s_,"Auto",he(Ee.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),he(Ee.Vm,{margin:1.5})),pi({alignment:Ee.z6.TopRight,alignmentFocus:Ee.z6.BottomRight})),Ue.current.groupTemplate.contextMenu=he("ContextMenu",ii(),hn(),Nn()),Ue.current.linkTemplate=he(Ee.rU,{layerName:"Foreground",routing:Ee.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new Ee.KX("fromSpot","fromSpot",Ee.z6.parse),new Ee.KX("toSpot","toSpot",Ee.z6.parse),new Ee.KX("fromShortLength","dir",ni=>ni>=1?10:0),new Ee.KX("toShortLength","dir",ni=>ni>=1?10:0),new Ee.KX("points").makeTwoWay(),he(Ee.bn,{strokeWidth:2},new Ee.KX("stroke","color"),new Ee.KX("strokeWidth","thickness"),new Ee.KX("strokeDashArray","dash")),he(Ee.bn,{segmentIndex:0,segmentOffset:new Ee.E9(15,0),segmentOrientation:Ee.rU.OrientAlong,alignmentFocus:Ee.z6.Right,figure:"circle",width:10,strokeWidth:0},new Ee.KX("fill","color"),new Ee.KX("visible","dir",ni=>ni===1)),he(Ee.bn,{segmentIndex:-1,segmentOffset:new Ee.E9(-10,6),segmentOrientation:Ee.rU.OrientPlus90,alignmentFocus:Ee.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Ee.KX("fill","color"),new Ee.KX("visible","dir",ni=>ni>=1),new Ee.KX("width","thickness",ni=>7+3*ni),new Ee.KX("height","thickness",ni=>7+3*ni),new Ee.KX("segmentOffset","thickness",ni=>new Ee.E9(-15,4+1.5*ni))),he(Ee.bn,{segmentIndex:0,segmentOffset:new Ee.E9(15,-6),segmentOrientation:Ee.rU.OrientMinus90,alignmentFocus:Ee.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Ee.KX("fill","color"),new Ee.KX("visible","dir",ni=>ni===2),new Ee.KX("width","thickness",ni=>7+3*ni),new Ee.KX("height","thickness",ni=>7+3*ni),new Ee.KX("segmentOffset","thickness",ni=>new Ee.E9(-15,4+1.5*ni))),he(Ee.al,{alignmentFocus:new Ee.z6(0,1,-4,0),editable:!0},new Ee.KX("text").makeTwoWay(),new Ee.KX("stroke","color"))),Ue.current.linkTemplate.selectionAdornmentTemplate=he(Ee.uz,he(Ee.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Ki(2)},new Ee.KX("pathPattern","thickness",Ki)),pi({alignmentFocus:new Ee.z6(0,0,-6,-4)}));function Ki(ni){return he(Ee.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(ni+4).toString()+" H3"})}function Ni(ni){var Bi="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return ni===0?Bi="M0 0 M16 16 M0 8 L16 8":ni===2&&(Bi="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),he(Ee.bn,{geometryString:Bi,margin:2,background:"transparent",mouseEnter:(Hi,vi)=>vi.background="dodgerblue",mouseLeave:(Hi,vi)=>vi.background="transparent",click:on("dir",ni),contextClick:on("dir",ni)})}function Ti(ni){var Bi=(Hi,vi)=>{Hi.handled=!0,Hi.diagram.model.commit(ki=>{var er=vi.part.adornedPart;ki.set(er.data,ni?"toSpot":"fromSpot",Ee.z6.stringify(Ee.z6.AllSides)),(ni?er.toNode:er.fromNode).invalidateConnectedLinks()})};return he(Ee.bn,{width:12,height:12,fill:"transparent",mouseEnter:(Hi,vi)=>vi.background="dodgerblue",mouseLeave:(Hi,vi)=>vi.background="transparent",click:Bi,contextClick:Bi})}function en(ni,Bi){var Hi=0,vi=Ee.z6.RightSide;ni.equals(Ee.z6.Top)?(Hi=270,vi=Ee.z6.TopSide):ni.equals(Ee.z6.Left)?(Hi=180,vi=Ee.z6.LeftSide):ni.equals(Ee.z6.Bottom)&&(Hi=90,vi=Ee.z6.BottomSide),Bi||(Hi-=180);var ki=(er,lr)=>{er.handled=!0,er.diagram.model.commit(oe=>{var ae=lr.part.adornedPart;oe.set(ae.data,Bi?"toSpot":"fromSpot",Ee.z6.stringify(vi)),(Bi?ae.toNode:ae.fromNode).invalidateConnectedLinks()})};return he(Ee.bn,{alignment:ni,alignmentFocus:ni.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:Hi,background:"transparent",mouseEnter:(er,lr)=>lr.background="dodgerblue",mouseLeave:(er,lr)=>lr.background="transparent",click:ki,contextClick:ki})}Ue.current.linkTemplate.contextMenu=he("ContextMenu",hn(),Nn(),he("ContextMenuButton",he(Ee.s_,"Horizontal",Ni(0),Ni(1),Ni(2))),he("ContextMenuButton",he(Ee.s_,"Horizontal",he(Ee.s_,"Spot",Ti(!1),en(Ee.z6.Top,!1),en(Ee.z6.Left,!1),en(Ee.z6.Right,!1),en(Ee.z6.Bottom,!1)),he(Ee.s_,"Spot",{margin:new Ee.Zt(0,0,0,2)},Ti(!0),en(Ee.z6.Top,!0),en(Ee.z6.Left,!0),en(Ee.z6.Right,!0),en(Ee.z6.Bottom,!0)))));const br=`{ "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 cr=["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 Kr(ni){return console.log("shapeName:",ni),cr.indexOf(ni)>=0}var Ze=new Ee.YI(Se.current,{maxSelectionCount:1,linkTemplate:he(Ee.rU,{locationSpot:Ee.z6.Center,selectionAdornmentTemplate:he(Ee.uz,"Link",{locationSpot:Ee.z6.Center},he(Ee.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),he(Ee.bn,{toArrow:"Standard",stroke:null}))},{routing:Ee.rU.AvoidsNodes,curve:Ee.rU.JumpOver,corner:5,toShortLength:4},new Ee.KX("points"),he(Ee.bn,{isPanelMain:!0,strokeWidth:2}),he(Ee.bn,{toArrow:"Standard",stroke:null})),model:new Ee.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...Ee.bn.getFigureGenerators().toArray().map(ni=>({text:"\u672A\u547D\u540D",size:"100 100",figure:ni.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Ue.current.addDiagramListener("TextEdited",function(ni){var Bi;const Hi=ni.subject.part;var vi=(Bi=document.activeElement)==null?void 0:Bi.value;typeof vi=="string"&&vi.trim()===""&&Ue.current.model.commit(function(ki){ki.set(Hi.data,"text","\u672A\u547D\u540D"),Ue.current.commandHandler.stopCommand()},"increment")}),Ze.nodeTemplate=he(Ee.NB,"Auto",{locationSpot:Ee.z6.Center},new Ee.KX("location","location",Ee.E9.parse).makeTwoWay(Ee.E9.stringify),he(Ee.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 Ee.KX("stroke").makeTwoWay(),new Ee.KX("fill").makeTwoWay(),new Ee.KX("figure")),he(Ee.al,{margin:new Ee.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new Ee.$u(16,16),maxSize:new Ee.$u(10,NaN),textAlign:"center",editable:!0},new Ee.KX("key").makeTwoWay())),setTimeout(()=>{Ue.current.grid=he(Ee.s_,"Grid",he(Ee.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),he(Ee.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Ue.current.grid.visible=!0,Ue.current.grid.gridCellStroke="darkgray",Ue.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Ue.current,Ue.current}const ui=()=>Kt(this,null,function*(){var he,rn=Ue.current.makeImage();const Wn=yield(0,mt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:rn.src,file_data:JSON.stringify({login:(he=(0,Lt.eY)())==null?void 0:he.login,data:JSON.parse(Ue.current.model.toJson())})}});He({src:Wn.url})});return(0,Pt.useEffect)(()=>(setTimeout(()=>{Ke()},500),We(Ai+1),()=>{Ue.current=null}),[]),Bt.createElement("div",{ref:Un,className:_i.current?`${vt.maxH60} body-overflow-initial`:"body-overflow-initial"},Bt.createElement(Yn.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!Ai,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Bt.createElement(si.Z,null,Bt.createElement(kt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Bt.createElement(kt.Z,{onClick:()=>{var he,rn,Wn=Ue.current.selection.first();if(_i.current=!_i.current,document.activeElement&&Wn){let pi=(rn=(he=document.activeElement)==null?void 0:he.value)==null?void 0:rn.trim();typeof pi=="string"&&Ue.current.model.commit(function(on){on.set(Wn.data,"text",pi||"\u672A\u547D\u540D"),Ue.current.commandHandler.stopCommand()},"increment")}We(Ai+1)}},Bt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:je},Bt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:vt.flowChartWrp},Bt.createElement("div",{style:{display:"flex",height:"100%"}},Bt.createElement("div",{style:{width:"300px",height:"100%"}},Bt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Bt.createElement("div",{style:{height:"calc(100% - 50px)"},className:vt.myPaletteDiv,ref:Se})),Bt.createElement("div",{style:{flex:1,position:"relative"}},Bt.createElement("div",{ref:fi,style:{height:"80vh"}}))),Bt.createElement("div",{className:"tr"},Bt.createElement(me.ZP,{size:"large",onClick:ui,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var ke=ge,Je=Ot(47889),ve=Ot(71051);const ze=Je.ZP.Group,De={margin:"0 8px"};var nn=({callback:je,onCancel:He})=>{function Ue(fi){je(fi)}return Pt.createElement($t.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ue},Pt.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},Pt.createElement("span",{style:De},"\u5355\u5143\u683C\u6570\uFF1A"),Pt.createElement("span",{style:De},"\u884C\u6570"),Pt.createElement($t.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},Pt.createElement(ve.Z,null)),Pt.createElement("span",{style:De},"\u5217\u6570"),Pt.createElement($t.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},Pt.createElement(ve.Z,null))),Pt.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},Pt.createElement("span",{style:De},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),Pt.createElement($t.default.Item,{name:"align"},Pt.createElement(ze,null,Pt.createElement(Je.ZP,{value:"default"},Pt.createElement("i",{className:"fa fa-align-justify"})),Pt.createElement(Je.ZP,{value:"left"},Pt.createElement("i",{className:"fa fa-align-left"})),Pt.createElement(Je.ZP,{value:"center"},Pt.createElement("i",{className:"fa fa-align-center"})),Pt.createElement(Je.ZP,{value:"right"},Pt.createElement("i",{className:"fa fa-align-right"}))))),Pt.createElement("div",{className:"flex-container flex-end"},Pt.createElement(me.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Pt.createElement(me.ZP,{type:"ghost",onClick:He},"\u53D6\u6D88")))},kn=Ot(71411),Gn=Ot(80727),gn=Ot.n(Gn),di=(0,Pt.forwardRef)(({use3d:je,width:He,height:Ue,callback:fi,showSaveButton:Se},_i)=>{const Un=(0,Pt.useRef)(),Ai=(0,Pt.useRef)(),[We,Ke]=(0,Pt.useState)(!1),ui=(0,Pt.useRef)({id:Un,appName:"graphing",width:He||1e3,height:Ue||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,Pt.useEffect)(()=>{Ai.current=new(gn())(ui.current,!0),window.onload=function(){Ai.current.inject("applet_container")}},[]);const he=()=>{var rn=window.ggbApplet.getPNGBase64(1,!0,72);return fi&&fi(rn),rn};return(0,Pt.useEffect)(()=>{ui.current.appName=We?"3D":"graphing",Ai.current.inject("applet_container")},[We]),(0,Pt.useEffect)(()=>{Ke(je)},[je]),(0,Pt.useImperativeHandle)(_i,()=>({getImgData:he})),Pt.createElement(Pt.Fragment,null,Pt.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Un}),Pt.createElement(si.Z,{align:"middle"},Pt.createElement(kt.Z,{flex:1},Pt.createElement(kn.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:We,onChange:rn=>Ke(rn)})),Pt.createElement(kt.Z,null,Pt.createElement(me.ZP,{size:"large",onClick:he,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),xi=Ot(41588),Ei=Ot(6767);const ar="link",Qi="upload-image",Oi="add-flowchart",Yi="draw-image",Hr="add-flowchart",Xi="code-block",Fr="add-table",mr="------------",Yr={default:mr,left:`:${mr}`,center:`:${mr}:`,right:`${mr}:`};var ji=Ot(58856);function co(){}let fo=0;const Xr=1e4,Er="\u2581",Zr="@\u2581\u2581@",bt="@\u2581@",Br=`
|
|
|
**\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`,Vi=["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 Vr(je){return/^\d+$/.test(je)?`${je}px`:je}const bo=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",$o={[bo+"-B"]:"bold",[bo+"-I"]:"italic"},Zi={[ar]:"\u6DFB\u52A0\u94FE\u63A5",[Xi]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Qi]:"\u6DFB\u52A0\u56FE\u7247",[Yi]:"\u6DFB\u52A0\u753B\u56FE",[Oi]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Fr]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var wi=({defaultValue:je="",onChange:He,width:Ue="100%",height:fi=400,miniToolbar:Se=!1,isFocus:_i=!1,watch:Un,insertTemp:Ai,mode:We="markdown",id:Ke="markdown-editor-id",showResizeBar:ui=!1,noStorage:he=!1,showNullButton:rn=!1,showNullProgramButton:Wn=!1,hidetoolBar:pi=!1,fullScreen:on=!1,onBlur:yn,onCMBeforeChange:ii,onFullScreen:hn,className:An="",disablePaste:xn=!1,disabled:Nn=!1,disabledFill:ai=!1,placeholder:Ki="",values:Ni="",extraUse:Ti})=>{const[en,br]=(0,Pt.useState)(null),[cr,Kr]=(0,Pt.useState)(je),[Ze,ni]=(0,Pt.useState)(Un),[Bi,Hi]=(0,Pt.useState)(on),[vi,ki]=(0,Pt.useState)(""),[er,lr]=(0,Pt.useState)(0),[oe,ae]=(0,Pt.useState)(fi),[ee,Ye]=(0,Pt.useState)(!1),[Be,ln]=(0,Pt.useState)(0),[Dn,Zn]=(0,Pt.useState)(0),Li=(0,Pt.useRef)(),Mi=(0,Pt.useRef)(),Te=(0,Pt.useRef)(),yi=(0,Pt.useRef)();(0,Pt.useEffect)(()=>{const Vn=window.scrollY||window.pageYOffset;Kr(Ni),en==null||en.setValue(Ni),window.scrollTo(0,Vn)},[Ni]),(0,Pt.useEffect)(()=>{hn==null||hn(Bi)},[Bi]),(0,Pt.useEffect)(()=>{if(Li.current){let Vn=function(cn,ri){var Ui;if(xn){ri.preventDefault();return}const nr=ri.clipboardData;if(nr){const Ji=nr.types.toString(),fr=nr.items;if(Ji==="Files"||nr.types.indexOf("Files")>-1){if(ri.preventDefault(),We=="stex")return;try{let dr=fr[1];((Ui=fr[0])==null?void 0:Ui.kind)==="file"&&(dr=fr[0]);const Pr=dr.getAsFile(),Gr=Pr.name.split(".").pop();(0,un.I)(Pr,Tr=>{var ro,Oe,gr;Tr.id?((ro=Pr==null?void 0:Pr.type)==null?void 0:ro.indexOf("image"))>-1?qn.replaceSelection(`<img width="100%" src="/api/attachments/${Tr.id}?type=${Tr.content_type})" alt="" />`):((Oe=Pr==null?void 0:Pr.type)==null?void 0:Oe.indexOf("video"))>-1?qn.replaceSelection(`<video width="100%" controls src="/api/attachments/${Tr.id}"></video>`):((gr=Pr==null?void 0:Pr.type)==null?void 0:gr.indexOf("pdf"))>-1?qn.replaceSelection(`<a href="/api/attachments/${Tr.id}?type=${Pr.type}&disposition=inline" target="_blank">${Pr.name}</a>`):Vi.includes(Gr)?qn.replaceSelection(`<a href="/api/attachments/${Tr.id}?type=office&disposition=inline" target="_blank">${Pr.name}</a>`):qn.replaceSelection(`[${Pr.name}](/api/attachments/${Tr.id}?type=${Tr.content_type})`):(Tr==null?void 0:Tr.status)===401&&(document.location.href="/user/login")})}catch(dr){Ei.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const qn=Ae().fromTextArea(Li.current,{mode:We,lineNumbers:!Se,lineWrapping:!0,value:je,autoCloseTags:!0,autoCloseBrackets:!0});return qn.on("keyup",function(cn,ri){ri.keyCode===8&&(cn.getValue()==""?qn.setOption("placeholder",Ki):qn.setOption("placeholder",null))}),qn.on("keydown",function(cn,ri){if(ri.keyCode===8){var Ui=an(cn);Ui&&ri.preventDefault()}}),_i&&qn.focus(),qn.on("paste",Vn),Nn&&qn.on("beforeChange",function(cn,ri){(ri.origin==="paste"||ri.origin==="+input")&&ri.cancel()}),br(qn),()=>{qn.off("paste",Vn)}}},[]);const Me=(0,Pt.useCallback)(()=>{if(Mi.current)try{}catch(Vn){console.log(Vn,"---- to set md editor body height")}},[oe,Mi,Bi]);(0,Pt.useEffect)(()=>{function Vn(){let qn=new Ce.Z(cn=>{for(let ri of cn)(ri.target.offsetHeight>0||ri.target.offsetWidth>0)&&(Me(),en.setSize("100%","100%"),en.refresh())});return qn.observe(Li.current.parentElement),qn}if(en){const qn=Vn();return()=>{var cn,ri;(cn=Li.current)!=null&&cn.parentElement&&qn.unobserve((ri=Li.current)==null?void 0:ri.parentElement)}}},[en,Me]),(0,Pt.useEffect)(()=>{if(en){let Vn=[];for(const[qn,cn]of Object.entries($o)){let ri={[qn]:()=>{Qe(cn)}};Vn.push(ri),en.addKeyMap(ri)}return()=>{for(let qn of Vn)en.removeKeyMap(qn)}}},[en]),(0,Pt.useEffect)(()=>{on!==Bi&&Hi(on)},[on]),(0,ji.Z)(()=>{if(!he&&er>0){let Vn=new Date().getTime(),qn=window.sessionStorage.getItem(Ke);Vn>=er+Xr&&(!qn||qn!==cr)&&(window.sessionStorage.setItem(Ke,cr),Ye(!0))}},Xr),(0,Pt.useEffect)(()=>{ni(Un)},[en,Un]),(0,Pt.useEffect)(()=>{en&&_i&&en.focus()},[en,_i]),(0,Pt.useEffect)(()=>{if(Ze&&en){let Vn=function(cn){let ri=cn.target;if(yi.current){let Ui=ri.scrollTop/ri.scrollHeight;yi.current.scrollTop=yi.current.scrollHeight*Ui}};const qn=en.getScrollerElement();return qn.addEventListener("scroll",Vn),()=>{qn.removeEventListener("scroll",Vn)}}},[en,Ze]),(0,Pt.useEffect)(()=>{if(en&&ii){let Vn=function(qn,cn){ii(qn,cn)};return en.on("beforeChange",Vn),()=>{en.off("beforeChange",Vn)}}},[en,ii]),(0,Pt.useEffect)(()=>{if(en&&yn){let Vn=function(){yn(en.getValue())};return en.on("blur",Vn),()=>{en.off("blur",Vn)}}},[en,yn]);function an(Vn,qn){var cn=Vn.getDoc(),ri=cn.getCursor(),Ui=cn.getLine(ri.line),nr=Ui.charAt(ri.ch-1),Ji=Ui.lastIndexOf("@\u2581@",ri.ch),fr=Ui.lastIndexOf("@\u2581\u2581@",ri.ch),dr=Ji>fr?Ji:fr,Pr=Ji>fr?3:4;if(Zr.indexOf(nr)===-1)return null;if(console.log("change1:",qn,Vn,Ui,ri,dr,Ji,fr,nr),dr>=0&&ri.ch-dr<5){var Gr=dr+Pr;return cn.replaceRange("",{line:ri.line,ch:dr},{line:ri.line,ch:Gr}),{line:ri.line,ch:Gr}}return null}(0,Pt.useEffect)(()=>{if(en){let Vn=function(qn,cn){const ri=qn.getValue();Kr(ri),lr(new Date().getTime()),qn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),He&&(Wn?He(ri,fn(ri)):He(ri))};return en.on("change",Vn),()=>{en.off("change",Vn)}}},[en,He]),(0,Pt.useEffect)(()=>{if(en)if(je==null)en.setValue(""),Kr("");else{const Vn=window.scrollY||window.pageYOffset;je!==en.getValue()&&(en.setValue(je),Kr(je),en.setCursor(Nn?1:en.lineCount(),0),window.scrollTo(0,Vn))}},[en,je]);const Qe=(0,Pt.useCallback)(Vn=>{const qn=en.getCursor(),cn=en.getSelection();let ri=cn.split(`
|
|
|
`);switch(Vn){case"bold":return en.replaceSelection("**"+cn+"**"),cn===""&&en.setCursor(qn.line,qn.ch+2),en.focus();case"italic":return en.replaceSelection("*"+cn+"*"),cn===""&&en.setCursor(qn.line,qn.ch+1),en.focus();case"code":return en.replaceSelection("`"+cn+"`"),cn===""&&en.setCursor(qn.line,qn.ch+1),en.focus();case"inline-latex":return ki("inline-latex"),en.focus();case"latex":return en.replaceSelection("```latex\n"+cn+"\n```"),en.setCursor(qn.line+1,cn.length+1),en.focus();case"line-break":return en.replaceSelection(`<br/>
|
|
|
`),en.focus();case"list-ul":return cn===""?en.replaceSelection("- "+cn):en.replaceSelection(ri.map(Ui=>Ui===""?"":`- ${Ui}`).join(`
|
|
|
`)),en.focus();case"list-ol":return cn===""?en.replaceSelection("1. "+cn):en.replaceSelection(ri.map((Ui,nr)=>Ui===""?"":`${nr+1}. ${Ui}`).join(`
|
|
|
`)),en.focus();case"add-null-ch":return cn===""&&en.setCursor(qn.line,qn.ch),en.replaceSelection(Er),en.focus();case"add-signal":return cn===""&&en.setCursor(qn.line,qn.ch),en.replaceSelection(bt),en.focus();case"add-multiple":return cn===""&&en.setCursor(qn.line,qn.ch),en.replaceSelection(Zr),en.focus();case"inster-template-1":return cn===""&&en.setCursor(qn.line,qn.ch),en.replaceSelection(Br),en.focus();case"eraser":return en.setValue(""),en.focus();case"trigger-watch":return ni(!Ze),en.focus();case"trigger-full-screen":return Hi(!Bi),en.focus();case ar:ki(ar);return;case Xi:ki(Xi);return;case Qi:ki(Qi);return;case Yi:ki(Yi);return;case"maths-latex":ki("maths-latex");return;case Oi:ki(Oi);return;case Fr:ki(Fr);return;default:throw new Error}},[en,Ze,Bi]),It=(0,Pt.useCallback)((Vn,qn)=>{var cn,ri,Ui,nr,Ji,fr;switch(ki(""),vi){case ar:const{title:ro,link:Oe}=Vn;return en.replaceSelection(`[${ro}](${Oe})`),en.focus();case Xi:const{language:gr,content:Dr}=Vn;return en.replaceSelection(["```"+gr,Dr,"```"].join(`
|
|
|
`)),en.focus();case"maths-latex":for(var dr=atob(Vn),Pr=new Uint8Array(dr.length),Gr=0;Gr<dr.length;Gr++)Pr[Gr]=dr.charCodeAt(Gr);var Tr=new Blob([Pr],{type:"image/png"});(0,un.I)(Tr,ls=>{ls.id?en.replaceSelection(``):(ls==null?void 0:ls.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":en.replaceSelection("`$$"+Vn+"$$`");break;case Qi:case Yi:case Hr:const{src:tr,alt:Ur}=Vn,or=qn,vo=(Ui=(ri=(cn=or==null?void 0:or.name)==null?void 0:cn.split("."))==null?void 0:ri.pop)==null?void 0:Ui.call(ri);return((nr=or==null?void 0:or.type)==null?void 0:nr.indexOf("image"))>-1||!(or!=null&&or.type)?or!=null&&or.align||or!=null&&or.width?en.replaceSelection(`<p style="text-align:${or.align||"initial"}"><img width="${or.width?or.width+"%":"initial"}" src="${tr}" alt="${Ur||""}" /></p>`):en.replaceSelection(`<img width="100%" src="${tr}" alt="${Ur||""}" />`):((Ji=or==null?void 0:or.type)==null?void 0:Ji.indexOf("video"))>-1?en.replaceSelection(`<video width="100%" controls src="${tr}"></video>`):((fr=or==null?void 0:or.type)==null?void 0:fr.indexOf("pdf"))>-1?en.replaceSelection(`<a href="${tr}?type=${or.type}&disposition=inline" target="_blank">${or.name}</a>`):Vi.includes(vo)?en.replaceSelection(`<a href="${tr}?type=office&disposition=inline" target="_blank">${or.name}</a>`):en.replaceSelection(`[${or.name}](${tr})`),en.focus();case Fr:const{row:qr,col:Nr,align:ho}=Vn;let ks=`
|
|
|
`;for(let ls=0;ls<qr;ls++){let la=[],Is=[];for(let sr=0;sr<Nr;sr++)ls===1&&Is.push(Yr[ho]),la.push(" ");ls===1&&(ks+=`| ${Is.join(" | ")} |
|
|
|
`),ks+=`| ${la.join(Nr===1?"":" | ")} |
|
|
|
`}return en.replaceSelection(ks+`
|
|
|
`),en.focus();default:throw new Error}},[en,vi]),vn=(0,Pt.useMemo)(()=>{switch(vi){case ar:return Pt.createElement(li,{callback:It,onCancel:pn});case Xi:return Pt.createElement(Jn.Z,{callback:It,onCancel:pn});case Qi:return Pt.createElement(un.Z,{callback:It,onCancel:pn});case Oi:return Pt.createElement(ke,{callback:It,onCancel:pn});case Fr:return Pt.createElement(nn,{callback:It,onCancel:pn});case"maths-latex":return Pt.createElement(di,{showSaveButton:!0,callback:It});case"inline-latex":return Pt.createElement(xi.Z,{showSaveButton:!0,callback:It});default:return null}},[vi]);function pn(){ki("")}(0,Pt.useEffect)(()=>{if(Te.current){let Vn=function(Ji){Ui=!0,nr=Ji.pageY},qn=function(){Ui=!1},cn=function(Ji){if(Ui){let fr=Ji.pageY-nr;fr<0&&(fr=0),fr>300&&(fr=300);let dr=fi+fr+"px";ae(dr)}},ri=Te.current,Ui=!1,nr=0;return ri.addEventListener("mousedown",Vn),document.addEventListener("mousemove",cn),document.addEventListener("mouseup",qn),()=>{ri.removeEventListener("mousedown",Vn),document.removeEventListener("mousemove",cn),document.removeEventListener("mouseup",qn)}}},[en,Te]),(0,Pt.useEffect)(()=>{ae(fi)},[fi]);const Qn=Vr(Ue),zn=Vr(oe),jn={width:Qn,height:zn},Ge=(0,Pt.useMemo)(()=>{if(er){let Vn=new Date(er),qn=Vn.getHours(),cn=Vn.getMinutes(),ri=Vn.getSeconds();return qn=qn<10?"0"+qn:qn,cn=cn<10?"0"+cn:cn,ri=ri<10?"0"+ri:ri,`${qn}:${cn}:${ri}`}return 0},[er]),fn=Vn=>{const qn=[];if(Wn){let cn=-1;Vn=Vn.replace(/(@▁▁@|@▁@)/g,function(ri,Ui,nr){qn.push({multiLine:ri!==bt})})}return qn};function Fn(){window.sessionStorage.removeItem(Ke),Ye(!1),lr(0)}function Sn(){Ye(!1),lr(0),en.setValue(window.sessionStorage.getItem(Ke))}(0,Pt.useEffect)(()=>{Zi[vi]&&vi!==Yi&&vi!==Oi&&setTimeout(()=>{const Vn=document.getElementsByClassName("markdown-popup-form")[0],qn=window.innerWidth/2-Vn.offsetWidth/2,cn=window.innerHeight/2-Vn.offsetHeight/2;ln(qn),Zn(cn)},0)},[vi]);const dn=Vn=>{Vn.preventDefault();const qn=Vn.clientX-Be,cn=Vn.clientY-Dn;document.body.onmousemove=ri=>{let Ui=ri.clientX-qn,nr=ri.clientY-cn;const Ji=document.getElementsByClassName("markdown-popup-form")[0],fr=window.innerWidth-Ji.offsetWidth,dr=window.innerHeight-Ji.offsetHeight;Ui=Math.max(0,Math.min(Ui,fr)),nr=Math.max(0,Math.min(nr,dr)),gi(ri.clientX,ri.clientY,qn,cn)&&(ln(Ui),Zn(nr))},document.body.onmouseup=function(){document.body.onmousemove=null}},gi=(Vn,qn,cn,ri)=>{const Ui=document.body.clientHeight,nr=document.body.clientWidth;return Vn<20&&cn>Vn||Vn>nr-20&&cn<Vn||qn<20&&ri>qn||qn>Ui-20&&ri<qn?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return Pt.createElement(Pt.Fragment,null,Pt.createElement("div",{className:"markdown-editor-wrapper",ref:Mi},Pt.createElement("div",{className:`markdown-editor-container ${An} ${Ze?"on-preview":""} ${Se?"mini":""} ${Bi?"full-screen":""}`,style:jn},Pt.createElement(Vt,{insertTemp:Ai,watch:Ze,fullScreen:Bi,showNullButton:rn,showNullProgramButton:Wn,onActionCallback:Qe,hidetoolBar:pi,extraUse:Ti}),Pt.createElement("div",{className:"markdown-editor-body"},Pt.createElement("div",{className:"codemirror-container"},Pt.createElement("textarea",{ref:Li,placeholder:Ki})),Ze?Pt.createElement("div",{ref:yi,className:"preview-container"},We==="stex"&&Pt.createElement(qt,{value:cr}),We!=="stex"&&Pt.createElement(Ne.Z,{disabledFill:ai,showProgramFill:Wn,value:cr})):null))),ui?Pt.createElement("a",{ref:Te,className:"editor-resize"}):null,vi===Yi&&Pt.createElement(oi,{callback:It,onCancel:pn}),vi===Oi&&Pt.createElement(ke,{callback:It,onCancel:pn}),Pt.createElement(Zt.Z,null,Zi[vi]&&vi!==Yi&&vi!==Oi?Pt.createElement(Yn.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Be,top:Dn},title:Pt.createElement("div",{style:{cursor:"move"},onMouseDown:dn},Zi[vi]),open:!0,onCancel:pn,footer:null,destroyOnClose:!0,width:vi===Oi?"1200px":null,height:vi===Oi?"80vh":null,className:"markdown-popup-form"},vn):null))}},28451:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{Z:function(){return _t},I:function(){return Vt}});var Pt=Ot(28284),te=Ot(6767),Ae=Ot(37568),Ce=Ot(77736),de=Ot(71051),Rt=Ot(47889),ne=Ot(99571),ue=Ot(77903),ce=Ot(59301),Wt=Ot(59301),Ne=Object.defineProperty,qt=Object.defineProperties,Le=Object.getOwnPropertyDescriptors,Ut=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,At=(Zt,$t,Pe)=>$t in Zt?Ne(Zt,$t,{enumerable:!0,configurable:!0,writable:!0,value:Pe}):Zt[$t]=Pe,at=(Zt,$t)=>{for(var Pe in $t||($t={}))nt.call($t,Pe)&&At(Zt,Pe,$t[Pe]);if(Ut)for(var Pe of Ut($t))et.call($t,Pe)&&At(Zt,Pe,$t[Pe]);return Zt},ct=(Zt,$t)=>qt(Zt,Le($t));const{useForm:pt}=Pt.default,xt={width:280,marginRight:10},Mt={labelCol:{span:5},wrapperCol:{span:19}};var _t=({callback:Zt,onCancel:$t})=>{const[Pe]=pt();let me=(0,ce.useRef)();function $e(Tn){me.current.width=Pe.getFieldValue("width"),me.current.align=Pe.getFieldValue("align"),Zt(Tn,me.current)}function tn(Tn,In){if(Tn.status===-1){te.ZP.error(Tn.message);return}Pe.setFieldsValue({src:`/api/attachments/${Tn.id}`,type:In.type})}function Cn(Tn){let In=Tn.target.files[0];me.current=In,Vt(In,tn)}return Wt.createElement(Pt.default,ct(at({form:Pe},Mt),{className:"upload-image-panel",onFinish:$e,style:{width:470,overflow:"hidden"}}),Wt.createElement(Pt.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Wt.createElement("div",{className:"flex-container"},Wt.createElement(Pt.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Wt.createElement(Ae.default,{style:xt})),Wt.createElement(Qt,{onFileChange:Cn}))),Wt.createElement(Pt.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Wt.createElement(Ae.default,{style:{width:264}})),Wt.createElement(Pt.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},Wt.createElement(Ce.Z,null,Wt.createElement(Pt.default.Item,{name:"width",style:{margin:0}},Wt.createElement(de.Z,{style:{width:264}})),Wt.createElement("span",{className:"ml8"},"%"))),Wt.createElement(Pt.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},Wt.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"}]})),Wt.createElement("aside",null,Wt.createElement(Pt.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},Wt.createElement(ne.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Wt.createElement(ne.ZP,{type:"default",onClick:$t},"\u53D6\u6D88"))))};function Qt({onFileChange:Zt}){return Wt.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Wt.createElement("input",{type:"file",onChange:Zt}))}function Vt(Zt,$t){if(!Zt)throw new String("\u6CA1\u6709\u6587\u4EF6");let Pe=new FormData;Pe.append("editormd-image-file",Zt),Pe.append("file_param_name","editormd-image-file"),Pe.append("byxhr","true");var me=new window.XMLHttpRequest;me.withCredentials=!0,me.addEventListener("load",function($e){$t(JSON.parse($e.target.responseText),Zt)},!1),me.addEventListener("error",function($e){console.error($e)},!1),me.open("POST",`${ue.KI}/api/attachments.json`),me.send(Pe)}},79346:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{Z:function(){return Ae}});var Pt=Ot(59301),te=Ot(4676);class Ae extends Pt.Component{constructor(de){super(de);const Rt=window.document;this.node=Rt.createElement("div"),Rt.body.appendChild(this.node)}render(){const{children:de}=this.props;return(0,te.createPortal)(de,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},23954:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{SV:function(){return Kt},ZP:function(){return Bt}});var Pt=Ot(59301),te=Ot(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"]},Ce={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"]},de={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(`
|
|
|
`)}]},ne={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 ue=Ot(53184),ce=Ot.n(ue),Wt=Object.defineProperty,Ne=Object.defineProperties,qt=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,Ut=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,et=(ge,ke,Je)=>ke in ge?Wt(ge,ke,{enumerable:!0,configurable:!0,writable:!0,value:Je}):ge[ke]=Je,At=(ge,ke)=>{for(var Je in ke||(ke={}))Ut.call(ke,Je)&&et(ge,Je,ke[Je]);if(Le)for(var Je of Le(ke))nt.call(ke,Je)&&et(ge,Je,ke[Je]);return ge},at=(ge,ke)=>Ne(ge,qt(ke)),ct=(ge,ke,Je)=>new Promise((ve,ze)=>{var De=Gn=>{try{kn(Je.next(Gn))}catch(gn){ze(gn)}},nn=Gn=>{try{kn(Je.throw(Gn))}catch(gn){ze(gn)}},kn=Gn=>Gn.done?ve(Gn.value):Promise.resolve(Gn.value).then(De,nn);kn((Je=Je.apply(ge,ke)).next())});const pt={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"]}},xt=(ge,ke)=>ke.map(Je=>({label:Je,kind:ge.languages.CompletionItemKind.Keyword,insertText:Je})),Mt=ge=>Object.keys(pt.tables).map(ke=>({label:ke,kind:ge.languages.CompletionItemKind.Variable,insertText:ke})),_t=(ge,ke)=>{const Je=pt.tables[ge];return Je?Je.map(ve=>({label:ve,kind:ke.languages.CompletionItemKind.Field,insertText:ve})):[]};function Qt(ge,ke,Je,ve,ze){let De=ke.getWordUntilPosition(Je),nn={startLineNumber:Je.lineNumber,endLineNumber:Je.lineNumber,startColumn:De.startColumn,endColumn:De.endColumn},kn=ve.map(Gn=>({label:Gn,kind:ge.languages.CompletionItemKind.Keyword,insertText:Gn,insertTextRules:ge.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:nn}));return ze.map(Gn=>{kn.push(at(At({},Gn),{range:nn}))}),kn}var Vt=ge=>{pt.languages.map(ze=>(ge.languages.registerDocumentFormattingEditProvider(ze,{provideDocumentFormattingEdits(De,nn,kn){return ct(this,null,function*(){const Gn=ce()(De.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:De.getFullModelRange(),text:Gn}]})}}),ze));const ke=de.quickKey.map(ze=>({label:ze.label,kind:ge.languages.CompletionItemKind.Method,insertText:ze.content,insertTextRules:ge.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Je=Rt.quickKey.map(ze=>({label:ze.label,kind:ge.languages.CompletionItemKind.Method,insertText:ze.content,insertTextRules:ge.languages.CompletionItemInsertTextRule.InsertAsSnippet})),ve=Ce.quickKey.map(ze=>({label:ze.label,kind:ge.languages.CompletionItemKind.Method,insertText:ze.content,insertTextRules:ge.languages.CompletionItemInsertTextRule.InsertAsSnippet}));ge.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(ze,De){var nn=ze.getWordUntilPosition(De),kn={startLineNumber:De.lineNumber,endLineNumber:De.lineNumber,startColumn:nn.startColumn,endColumn:nn.endColumn},Gn=ze.getLineContent(De.lineNumber).substring(nn.startColumn-2,nn.endColumn);return{suggestions:[...de.keywords.map(gn=>({label:gn,kind:ge.languages.CompletionItemKind.Function,documentation:gn,insertText:gn,insertTextRules:ge.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:kn})),...de.quickKey.map(gn=>({label:gn.label,kind:ge.languages.CompletionItemKind.Function,documentation:gn.content,insertText:Gn.startsWith("#")?gn.content.replace(/#/,""):gn.content,insertTextRules:ge.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:kn}))]}}}),ge.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(ze,De){var nn=ze.getWordUntilPosition(De),kn={startLineNumber:De.lineNumber,endLineNumber:De.lineNumber,startColumn:nn.startColumn,endColumn:nn.endColumn};return{suggestions:[...Ae.keywords.map(Gn=>({label:Gn,kind:ge.languages.CompletionItemKind.Function,documentation:Gn,insertText:Gn,insertTextRules:ge.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:kn}))]}}}),ge.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(ze,De){var nn=ze.getWordUntilPosition(De),kn={startLineNumber:De.lineNumber,endLineNumber:De.lineNumber,startColumn:nn.startColumn,endColumn:nn.endColumn},Gn=ze.getLineContent(De.lineNumber).substring(nn.startColumn-2,nn.endColumn);return{suggestions:[...Ce.keywords.map(gn=>({label:gn,kind:ge.languages.CompletionItemKind.Function,documentation:gn,insertText:gn,insertTextRules:ge.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:kn})),...Ce.quickKey.map(gn=>({label:gn.label,kind:ge.languages.CompletionItemKind.Function,documentation:gn.content,insertText:Gn.startsWith("#")?gn.content.replace(/#/,""):gn.content,insertTextRules:ge.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:kn}))]}}}),ge.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(ze,De){var nn=ze.getWordUntilPosition(De),kn={startLineNumber:De.lineNumber,endLineNumber:De.lineNumber,startColumn:nn.startColumn,endColumn:nn.endColumn},Gn=ze.getLineContent(De.lineNumber).substring(nn.startColumn-2,nn.endColumn);return{suggestions:[...ne.keywords.map(gn=>({label:gn,kind:ge.languages.CompletionItemKind.Function,documentation:gn,insertText:gn,insertTextRules:ge.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:kn})),...ne.quickKey.map(gn=>({label:gn.label,kind:ge.languages.CompletionItemKind.Function,documentation:gn.content,insertText:Gn.startsWith("#")?gn.content.replace(/#/,""):gn.content,insertTextRules:ge.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:kn}))]}}}),ge.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(ze,De){var nn=ze.getWordUntilPosition(De),kn={startLineNumber:De.lineNumber,endLineNumber:De.lineNumber,startColumn:nn.startColumn,endColumn:nn.endColumn},Gn=ze.getLineContent(De.lineNumber).substring(nn.startColumn-2,nn.endColumn);return{suggestions:[...Rt.keywords.map(gn=>({label:gn,kind:ge.languages.CompletionItemKind.Function,documentation:gn,insertText:gn,insertTextRules:ge.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:kn})),...Rt.quickKey.map(gn=>({label:gn.label,kind:ge.languages.CompletionItemKind.Function,documentation:gn.content,insertText:Gn.startsWith("#")?gn.content.replace(/#/,""):gn.content,insertTextRules:ge.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:kn}))]}}})};const Zt="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var $t=Object.defineProperty,Pe=(ge,ke,Je)=>ke in ge?$t(ge,ke,{enumerable:!0,configurable:!0,writable:!0,value:Je}):ge[ke]=Je,me=(ge,ke,Je)=>Pe(ge,typeof ke!="symbol"?ke+"":ke,Je);const $e=class Bw{constructor(ke,Je,ve){this.placeholder=ke,this.editor=Je,this.monaco=ve,Je.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)}};me($e,"ID","editor.widget.placeholderHint");var Cn=$e,Tn=Ot(96236),In=Ot(6767),$n=Ot(25399),Ln=Ot(89392),be=Ot(34604),re=Ot(56102),Pn=Object.defineProperty,li=Object.defineProperties,Jn=Object.getOwnPropertyDescriptors,un=Object.getOwnPropertySymbols,Yn=Object.prototype.hasOwnProperty,si=Object.prototype.propertyIsEnumerable,Fi=(ge,ke,Je)=>ke in ge?Pn(ge,ke,{enumerable:!0,configurable:!0,writable:!0,value:Je}):ge[ke]=Je,sn=(ge,ke)=>{for(var Je in ke||(ke={}))Yn.call(ke,Je)&&Fi(ge,Je,ke[Je]);if(un)for(var Je of un(ke))si.call(ke,Je)&&Fi(ge,Je,ke[Je]);return ge},oi=(ge,ke)=>li(ge,Jn(ke)),Ee=(ge,ke)=>{var Je={};for(var ve in ge)Yn.call(ge,ve)&&ke.indexOf(ve)<0&&(Je[ve]=ge[ve]);if(ge!=null&&un)for(var ve of un(ge))ke.indexOf(ve)<0&&si.call(ge,ve)&&(Je[ve]=ge[ve]);return Je},ci=(ge,ke,Je)=>new Promise((ve,ze)=>{var De=Gn=>{try{kn(Je.next(Gn))}catch(gn){ze(gn)}},nn=Gn=>{try{kn(Je.throw(Gn))}catch(gn){ze(gn)}},kn=Gn=>Gn.done?ve(Gn.value):Promise.resolve(Gn.value).then(De,nn);kn((Je=Je.apply(ge,ke)).next())});function Pi(ge){return/^\d+$/.test(ge)?`${ge}px`:ge}function Ht(){}let kt=!1;const mt={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function vt(ge=[]){let ke=ge;if(Array.isArray(ge)){for(let Je=0;Je<ge.length;Je++){let ve=mt[ge[Je]];if(ve)return ve}return ke[0]}return mt[ke]||ke}let Lt=null;var Bt=ge=>{var ke=ge,{width:Je="100%",height:ve="100%",value:ze,language:De="javascript",style:nn={},options:kn={},overrideServices:Gn={},theme:gn="vs-dark",onEditBlur:Ri,isCopy:di=!1,onSave:xi,autoHeight:Ei=!1,forbidCopy:ar=!1,onChange:Qi=Ht,editorDidMount:Oi=Ht,onFocus:Yi=Ht,onBreakPoint:Hr=Ht,breakPointValue:Xi=[],filename:Fr="educoder.txt",errorLine:mr,errorContent:Yr="",highlightLine:ji,openBreakPoint:co=!1,placeholder:fo="",showMiniMap:Xr=!0}=ke,Er=Ee(ke,["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 Zr=(0,Pt.useRef)(),bt=(0,Pt.useRef)({}),Br=(0,Pt.useRef)(),Vi=(0,Pt.useRef)(),Vr=(0,Pt.useRef)([]),Do=(0,Pt.useRef)(!1),bo=(0,Pt.useRef)(),$o=(0,Pt.useRef)(),Zi=(0,Pt.useRef)(!1),[wi,je]=(0,Pt.useState)(!1);function He(){let yn;return Zr.current&&(yn=new te.Z(ii=>{for(let hn of ii)(hn.target.offsetHeight>0||hn.target.offsetWidth>0)&&bt.current.instance.layout()}),yn.observe(Zr.current)),yn}function Ue(){In.ZP.warning({content:decodeURIComponent(Zt),key:"monaco-editor-tip"})}const fi=()=>{let yn=bt.current.instance;if(ze!=null&&yn&&wi){const ii=yn.getModel();ii&&ze!==ii.getValue()&&(kt=!0,ii.setValue(ze),yn.layout(),kt=!1)}};(0,Pt.useEffect)(()=>{const yn=be.Z.subscribe("formatDocument",ii=>{var hn;let An=bt.current.instance;(hn=An==null?void 0:An.getAction)==null||hn.call(An,"editor.action.formatDocument").run()});return window.updateMonacoValue=ii=>{Qi(ii)},yn},[]),(0,Pt.useEffect)(()=>{var yn;let ii=bt.current.instance;Vi.current&&clearTimeout(Vi.current),Vi.current=setTimeout(()=>{fi()},500),ze&&(ze!=null&&ze.length)&&((yn=ii==null?void 0:ii.updateOptions)==null||yn.call(ii,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(ze.split(/\r\n|\r|\n/g).length))+3,5)}))},[ze,wi,bt.current]),(0,Pt.useEffect)(()=>{if(mr&&bt.current&&bt.current.instance){let ii=bt.current.instance;ii.changeViewZones(function(hn){var An=document.createElement("div");An.style.padding="10px 20px",An.style.width="calc(100% - 20px)",An.className="my-error-line-wrp",An.innerHTML=Yr,hn.addZone({afterLineNumber:mr||11,heightInLines:3,domNode:An})});var yn={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}};ii.addOverlayWidget(yn),ii.revealPositionInCenter({lineNumber:20,column:1})}},[mr,bt.current,wi]);const Se=(yn="",ii)=>{if(!yn||yn.trim()==="")return!0;const An=bt.current.instance.getModel().getLineTokens(ii);let xn=!1;for(let Nn=0;Nn<2;Nn++)An.getStandardTokenType(Nn)===1&&(xn=!0);return xn};(0,Pt.useEffect)(()=>{var yn;const ii=(yn=bt.current)==null?void 0:yn.instance;if(ii&&wi&&ar){const hn=ii.onDidBlurEditorWidget(()=>{Zi.current=!1}),An=ii.onDidFocusEditorText(()=>{Zi.current=!0});return()=>{hn.dispose(),An.dispose()}}},[bt.current,wi,ar]),(0,Pt.useEffect)(()=>{var yn;if((yn=bt.current)!=null&&yn.instance&&wi&&co){let ii=bt.current.instance,hn=ii.getModel();if(!hn)return;(()=>{var Ze;let ni=[],Bi=[];const Hi=hn.getAllDecorations();for(let ki of Hi)ki.options.className==="highlighted-line"&&(ni.push((Ze=ki==null?void 0:ki.range)==null?void 0:Ze.startLineNumber),Bi.push(ki==null?void 0:ki.id));if(ji===ni[0])return;hn.deltaDecorations(Bi,[]);const vi=hn.getLineCount();ji&&ji<=vi&&(ii.deltaDecorations([],[{range:new Lt.Range(ji,1,ji,hn.getLineMaxColumn(ji)),options:{isWholeLine:!0,className:"highlighted-line"}}]),ii.revealLineInCenter(ji))})();const xn=(Ze=!1)=>{var ni;let Bi=[],Hi=[];const vi=hn.getAllDecorations();for(let ki of vi)ki.options.linesDecorationsClassName==="breakpoints-select"&&(Bi.push((ni=ki==null?void 0:ki.range)==null?void 0:ni.startLineNumber),Hi.push(ki==null?void 0:ki.id));if(Ze)return{lines:Bi,ids:Hi};Hr(Bi)},Nn=Ze=>ci(void 0,null,function*(){let ni={range:new Lt.Range(Ze,1,Ze,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield hn.deltaDecorations([],[ni]),xn()}),ai=Ze=>ci(void 0,null,function*(){let ni=[];const Bi=ii.getLineDecorations(Ze);for(let Hi of Bi)Hi.options.linesDecorationsClassName==="breakpoints-select"&&ni.push(Hi.id);yield hn.deltaDecorations(ni,[]),xn()}),Ki=Ze=>{let ni=ii.getLineDecorations(Ze);for(let Bi of ni)if(Bi.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Ln.isEqual)(Xi,xn(!0).lines)){hn.deltaDecorations(xn(!0).ids,[]);const Ze=Xi.map(ni=>({range:new Lt.Range(ni,1,ni,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));hn.deltaDecorations([],Ze)}const Ni=ii.onDidChangeModelContent(Ze=>{let ni=ii.getPosition();if(ni){let Bi=ni.lineNumber;clearTimeout($o.current),$o.current=setTimeout(()=>{Se(hn.getLineContent(Bi),Bi)?ai(Bi):Ki(Bi)?(ai(Bi),Nn(Bi)):xn()},100)}}),Ti=ii.onMouseDown(Ze=>{var ni,Bi,Hi;if(Ze.target.detail&&((Hi=(Bi=(ni=Ze.target)==null?void 0:ni.element)==null?void 0:Bi.className)!=null&&Hi.includes("line-numbers"))){let vi=Ze.target.position.lineNumber;if(Se(hn.getLineContent(vi),vi))return;Ki(vi)?ai(vi):Nn(vi)}}),en=Ze=>{let ni={range:new Lt.Range(Ze,1,Ze,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Vr.current=ii.deltaDecorations(Vr.current,[ni])},br=()=>{Vr.current=ii.deltaDecorations(Vr.current,[])},cr=ii.onMouseMove(Ze=>{var ni,Bi,Hi;if(br(),Ze.target.detail&&((Hi=(Bi=(ni=Ze.target)==null?void 0:ni.element)==null?void 0:Bi.className)!=null&&Hi.includes("line-numbers"))){let vi=Ze.target.position.lineNumber;if(Se(hn.getLineContent(vi),vi))return;en(vi)}}),Kr=ii.onMouseLeave(()=>{br()});return()=>{Ni.dispose(),Ti.dispose(),cr.dispose(),Kr.dispose()}}},[bt.current,wi,Xi,ji,co,De]),(0,Pt.useEffect)(()=>{var yn;(yn=bt.current)!=null&&yn.instance&&co&&bt.current.instance.setPosition({lineNumber:0,column:0})},[ji]);function _i(){let yn=bt.current.instance;if(yn){const ii=yn.getSelection(),hn=bt.current.pastePos||{},An=new Lt.Range(hn.startLineNumber||ii.endLineNumber,hn.startColumn||ii.endColumn,hn.endLineNumber||ii.endLineNumber,hn.endColumn||ii.endColumn);setTimeout(()=>{yn.executeEdits("",[{range:An,text:""}])},300)}}function Un(yn){(window.navigator.platform.match("Mac")?yn.metaKey:yn.ctrlKey)&&yn.keyCode==83&&(yn.preventDefault(),xi())}const Ai=()=>{if(Ei&&bt.current.instance){const yn=bt.current.instance.getContentHeight();pi(yn<ve?ve:yn)}else pi(ve)};function We(yn){var ii=document.createEvent("MouseEvents");ii.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),yn.dispatchEvent(ii)}const Ke=yn=>{if(!Zi.current)return;const{keyCode:ii,ctrlKey:hn,metaKey:An,target:xn,type:Nn}=yn;return(Nn==="paste"||(ii===67||ii===86)&&(An||hn))&&xn.nodeName==="TEXTAREA"&&(Ue(),yn.preventDefault()),!1};function ui(yn,ii){var hn=window.URL||window.webkitURL||window,An=new Blob([ii]),xn=document.createElementNS("http://www.w3.org/1999/xhtml","a");xn.href=hn.createObjectURL(An),xn.download=yn,We(xn)}(0,Pt.useEffect)(()=>{Ai()},[Ai]),(0,Pt.useEffect)(()=>{Zr.current&&!wi&&Promise.all([Ot.e(8909),Ot.e(3267)]).then(Ot.bind(Ot,71448)).then(yn=>{try{Lt=yn,bt.current.instance=Lt.editor.create(Zr.current,{value:ze,language:vt(De),theme:gn,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Xr||!1}},Gn);const ii=bt.current.instance;let xn=[...Tn.BH._menuItems].find(Ni=>Ni[0]._debugName=="EditorContext")[1],Nn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],ai=(Ni,Ti)=>{var en,br;let cr=Ni._first;do Ti.includes((br=(en=cr.element)==null?void 0:en.command)==null?void 0:br.id)&&Ni._remove(cr);while(cr=cr.next)};if(Oi(ii,Lt),setTimeout(()=>{Ai(),bt.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{ui(Fr||"educoder.txt",ii.getValue())}})},500),bt.current.subscription=ii.onDidChangeModelContent(Ni=>{Do.current?clearTimeout(bo.current):(Ai(),Qi(ii.getValue(),Ni)),bo.current=setTimeout(()=>{Do.current=!1},500)}),window.Monaco||Vt(Lt,vt(De)),ar&&(ai(xn,Nn),Zr.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Ke),window.removeEventListener("paste",Ke),window.addEventListener("keydown",Ke),window.addEventListener("paste",Ke)),window.Monaco=Lt,Ri&&ii.onDidBlurEditorWidget(()=>{Ri(ii.getValue())}),Yi&&ii.onDidFocusEditorText(()=>{Yi(ii.getValue())}),ar)try{ii.onDidPaste(Ni=>{const Ti=ii.getSelection(),en=bt.current.pastePos||{},br=new Lt.Range(en.startLineNumber||Ti.endLineNumber,en.startColumn||Ti.endColumn,en.endLineNumber||Ti.endLineNumber,en.endColumn||Ti.endColumn);ii.executeEdits("",[{range:Ni.range,text:""}])})}catch(Ni){}let Ki=He();return fo&&typeof fo=="string"&&new Cn(fo,ii,Lt),je(!0),()=>{const Ni=bt.current.instance;Ni.dispose();const Ti=Ni.getModel();Ti&&Ti.dispose(),bt.current.subscription&&bt.current.subscription.dispose(),Ki.unobserve(Zr.current)}}catch(ii){}})},[]),(0,Pt.useEffect)(()=>{if(bt.current.instance&&wi)return document.addEventListener("keydown",Un,!1),()=>{document.removeEventListener("keydown",Un)}},[xi,wi]),(0,Pt.useEffect)(()=>{let yn=bt.current.instance;if(yn&&wi){let ii=vt(De);Lt.editor.setModelLanguage(yn.getModel(),ii)}},[De,wi]),(0,Pt.useEffect)(()=>{bt.current.instance&&wi&&Lt.editor.setTheme(gn)},[gn,wi]),(0,Pt.useEffect)(()=>{let yn=bt.current.instance;Br.current=kn,yn&&wi&&(yn.updateOptions(sn({},kn)),setTimeout(()=>{yn.getModel().updateOptions(sn({},kn))},200))},[JSON.stringify(kn),wi]),(0,Pt.useEffect)(()=>{let yn=bt.current.instance;yn&&wi&&yn.layout()},[Je,ve,wi]);const[he,rn]=(0,Pt.useState)(Pi(Je)),[Wn,pi]=(0,Pt.useState)(Pi(ve)),on=oi(sn({},nn),{width:he,height:Wn,position:"relative"});return Pt.createElement("div",{className:"my-monaco-editor",ref:Zr,style:on},di&&Pt.createElement(re.CopyToClipboard,{text:ze,onCopy:()=>In.ZP.success("\u590D\u5236\u6210\u529F")},Pt.createElement($n.Z,{title:"\u590D\u5236\u4EE3\u7801"},Pt.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},Pt.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Kt({width:ge="100%",height:ke="100%",original:Je,modified:ve,language:ze,options:De={}}){const nn=(0,Pt.useRef)(),[kn,Gn]=(0,Pt.useState)(null);function gn(Ei){let ar;return nn.current&&(ar=new te.Z(Qi=>{for(let Oi of Qi)(Oi.target.offsetHeight>0||Oi.target.offsetWidth>0)&&Ei.layout()}),ar.observe(nn.current)),ar}(0,Pt.useEffect)(()=>(nn.current&&Promise.all([Ot.e(8909),Ot.e(9404)]).then(Ot.bind(Ot,2550)).then(Ei=>{Lt=Ei;const ar=Lt.editor.createDiffEditor(nn.current,oi(sn({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},De),{wordWrap:!0}));Gn(ar);let Qi=gn(ar);return()=>{ar.dispose();const Oi=ar.getModel();Oi&&Oi.dispose(),Qi.unobserve(nn.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,Pt.useEffect)(()=>{kn&&kn.setModel({original:Lt.editor.createModel(Je,ze),modified:Lt.editor.createModel(ve,ze)})},[Je,ve,ze,kn]);const Ri=Pi(ge),di=Pi(ke),xi={width:Ri,height:di};return Pt.createElement("div",{className:"my-diff-editor",ref:nn,style:xi})}},85057:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{jL:function(){return de},w9:function(){return Yn},QD:function(){return Qi},cQ:function(){return re},op:function(){return gn},O5:function(){return $o},_b:function(){return mr},t7:function(){return at},Gi:function(){return ci},YG:function(){return oi},qp:function(){return Ne},vr:function(){return Hr},qE:function(){return xi},Je:function(){return xt},wb:function(){return Tn},cq:function(){return Lt},tp:function(){return Ut}});var Pt=Ot(59301),te={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==",de=({dataSource:Zi=[],img:wi,imgWidth:je=346,title:He,sunTitle:Ue,bannerExtraContent:fi})=>Pt.createElement("div",{className:te.banner},Pt.createElement("div",{className:te.content},Pt.createElement("aside",null,Pt.createElement("p",null,Pt.createElement("b",null,He),Pt.createElement("span",null,Ue)),Zi.length>0&&Pt.createElement("div",{className:te.btns},Zi.map((Se,_i)=>Pt.createElement("div",{key:_i,onClick:Se.click},Se.name,Se.sign?Pt.createElement("img",{src:Ae,width:39}):null))),fi),wi&&Pt.createElement("img",{style:{marginTop:33,marginRight:38},src:wi,width:je}))),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"},ne=Ot(92310),ue=Ot.n(ne),ce=Ot(89392),Ne=({dataSource:Zi=[],value:wi,onChange:je,onTitleChange:He,className:Ue,title:fi,titleWidth:Se=41,style:_i={},fontColor:Un="#6A7283",showCount:Ai})=>{const[We,Ke]=(0,Pt.useState)(0),[ui,he]=(0,Pt.useState)(!1),rn=(0,Pt.useRef)(null),Wn=(0,Pt.useRef)(null);return(0,Pt.useEffect)(()=>{var pi;Zi.length!==0&&(((pi=rn==null?void 0:rn.current)==null?void 0:pi.clientHeight)>97?Ke(1):Ke(0)),Zi.length===0&&Ke(0),he(!1)},[Zi]),Pt.createElement("div",{className:ue()(Rt.row,Ue),style:_i},Pt.createElement("div",{onClick:(0,ce.throttle)(()=>He==null?void 0:He(),2e3),style:{width:Se,marginTop:ui?12:4},className:`${Rt.title} ${He?"current":""}`},fi),Pt.createElement("div",{className:ui?`${Rt.tagsWrap} ${Rt.tagsBorderWrap}`:Rt.tagsWrap},Pt.createElement("div",{className:Rt.bar,ref:Wn,style:We>0?{height:We===1?97:"auto",overflow:We===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},Pt.createElement("div",{className:Rt.tag,ref:rn},Zi==null?void 0:Zi.map(pi=>Pt.createElement("span",{onClick:()=>je(pi.id),key:pi.id,style:{color:Un},className:wi===pi.id?Rt.active:""},Pt.createElement("span",{title:pi.name,className:Rt.name},pi.name),!!Ai&&Pt.createElement("span",{className:Rt.num},pi.count))))),!!We&&Pt.createElement(Pt.Fragment,null,We===1?Pt.createElement("div",{onClick:()=>{var pi;Ke(2),((pi=rn==null?void 0:rn.current)==null?void 0:pi.clientHeight)>245?he(!0):he(!1)},className:Rt.action},"\u5C55\u5F00",Pt.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):Pt.createElement("div",{onClick:()=>{Wn.current.scrollTop=0,Ke(1),he(!1)},className:Rt.action},"\u6536\u8D77",Pt.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},qt={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"},Ut=({dataSource:Zi=[],value:wi,onChange:je,className:He,style:Ue={}})=>Pt.createElement("div",{style:Ue,className:ue()(qt.tabs,He)},Zi.map(fi=>Pt.createElement("span",{onClick:()=>je(fi.id),className:wi===fi.id?qt.active:"",key:fi.id},fi.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=Ot(37568),at=({dataSource:Zi=[],value:wi="",onChange:je,onInputChange:He=()=>{},className:Ue,style:fi={},placeholder:Se,allowClear:_i=!1})=>{var Un;const[Ai,We]=(0,Pt.useState)(""),[Ke,ui]=(0,Pt.useState)("");(0,Pt.useEffect)(()=>{var Wn;let pi=wi;(Wn=JSON.stringify(wi))!=null&&Wn.includes("{")&&(We(wi.id),pi=wi.value||"");try{ui(decodeURIComponent(pi||""))}catch(on){ui(decodeURIComponent(pi||""))}},[wi]);const he=()=>{je(encodeURIComponent(Ke),Ai||null)},rn=Wn=>{Wn!==Ai&&(We(Wn),je(encodeURIComponent(Ke),Wn))};return Pt.createElement("div",{className:ue()(nt.input,Ue),style:fi},!!Zi.length&&Pt.createElement("div",{className:nt.dropdown},Pt.createElement("div",{className:nt.text},(Un=Zi.find(Wn=>Wn.id===Ai))==null?void 0:Un.name,Pt.createElement("i",{className:"iconfont icon-zhankai4"}),Pt.createElement("b",{className:nt.b1}),Pt.createElement("b",{className:nt.b2})),Pt.createElement("div",{className:nt.menu},Zi.map((Wn,pi)=>Pt.createElement("div",{key:pi,onClick:()=>rn(Wn.id)},Wn.name)))),Pt.createElement(et.default,{onPressEnter:he,value:Ke,onChange:Wn=>{ui(Wn.target.value),He(encodeURIComponent(Wn.target.value),Ai||null)},bordered:!1,placeholder:Se}),Pt.createElement("i",{onClick:he,className:"iconfont icon-sousuo9 font14 pl10 current"}))},ct={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:Zi,onChange:wi,className:je,total:He,pageSize:Ue,style:fi={}})=>{const Se=Zi<2,_i=Zi>=Math.ceil(He/Ue);return He<=Ue?Pt.createElement(Pt.Fragment,null):Pt.createElement("div",{className:ue()(ct.quickPager,je),style:fi},Pt.createElement("div",{onClick:()=>{Se||wi(Zi-1,"prev")},className:Se?ct.disabled:""},"\u4E0A\u4E00\u9875"),Pt.createElement("div",{onClick:()=>{_i||wi(Zi+1,"next")},className:_i?ct.disabled:""},"\u4E0B\u4E00\u9875"))},Mt={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"},_t=Ot(29787),Qt=Ot(25399),Vt=Ot(58018),Zt=Ot(3294),$t=Ot(955),Pe=Ot(96908),me=Ot(57177),$e=Ot(81378),tn=Ot(8797),Tn=({className:Zi,dataSource:wi=[],col:je=4,right:He,bottom:Ue=23,precision:fi=0,wrapWidth:Se=1200,trackEventItems:_i,loading:Un})=>{const Ai=Math.floor((Se-(je-1)*He)/je);return Pt.createElement(_t.Z,{spinning:Un},Pt.createElement("div",{className:ue()(Mt.list,Zi)},!!wi.length&&wi.map((We,Ke)=>{const{name:ui,id:he,identifier:rn,power:Wn,cover_image_id:pi,pic:on}=We;return Pt.createElement("div",{className:Mt.wrap,key:he,style:{width:Ai,marginRight:(1+Ke)%je===0?0:He+fi,marginBottom:Ue}},Pt.createElement("a",{target:"_blank",href:`/shixuns/${rn}/challenges`,className:Mt.li,onClick:yn=>{yn.preventDefault(),_i&&(0,$t.L9)([_i]),Wn&&(0,$t.xg)(`/shixuns/${rn}/challenges`)}},Pt.createElement("div",{className:Mt.img},Pt.createElement("img",{className:Mt.cover,src:`${on}`}),We.is_jupyter&&Pt.createElement("img",{className:Mt.sign,src:Pe}),We.is_jupyter_lab&&Pt.createElement("img",{className:Mt.sign,src:me}),We.is_unity_3d&&Pt.createElement("img",{className:Mt.sign,src:$e})),Pt.createElement("div",{className:Mt.name},Pt.createElement(Qt.Z,{title:ui||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},Pt.createElement("span",{className:Mt.e},ui||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),Pt.createElement("div",{className:Mt.tags},Pt.createElement(Qt.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},Pt.createElement("span",null,Pt.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),Pt.createElement("span",null,We.challenges_count))),!!We.myshixuns_count&&Pt.createElement(Qt.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},Pt.createElement("span",null,Pt.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),Pt.createElement("span",null,We.myshixuns_count))),Pt.createElement(Qt.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},Pt.createElement("span",null,Pt.createElement("span",null,We.level))),Pt.createElement("div",{className:Mt.rate},Pt.createElement(Vt.Z,{allowHalf:!0,disabled:!0,defaultValue:We.score_info}),Pt.createElement("span",null,"\xA0",We.score_info?`${We.score_info}\u5206`:"5\u5206")))),!Wn&&Pt.createElement("div",{className:Mt.lockWrap},Pt.createElement("img",{src:`${Zt.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),Pt.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!wi.length&&Pt.createElement(tn.Z,null)))},In={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"},$n=Ot(24065),Ln=Ot(59301),re=({className:Zi,dataSource:wi=[],col:je=4,right:He,bottom:Ue=23,precision:fi=0,wrapWidth:Se=1200,trackEventItems:_i,loading:Un,onRemove:Ai=()=>{},isCurrent:We=!0,showAlias:Ke=!1})=>{const ui=Math.floor((Se-(je-1)*He)/je),he=[{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 Ln.createElement(_t.Z,{spinning:Un},Ln.createElement("div",{className:ue()(In.list,Zi)},!!(wi!=null&&wi.length)&&(wi==null?void 0:wi.map((rn,Wn)=>{var pi;const{name:on,id:yn,identifier:ii,featured:hn,school_name:An,image_url:xn,excellent:Nn,is_plan:ai}=rn;return Ln.createElement("div",{key:yn,className:In.wrap,style:{width:ui,marginRight:(1+Wn)%je===0?0:He+fi,marginBottom:Ue}},Ln.createElement("a",{className:In.li,onClick:Ki=>{Ki.preventDefault(),Ki.stopPropagation(),_i&&(0,$t.L9)([_i]),(0,$t.xg)(`/paths/${ii}`)}},Ln.createElement("div",{className:In.img},Ln.createElement("img",{className:In.cover,src:`${xn}`}),We&&(0,$n.bg)()&&(rn==null?void 0:rn.studying)&&Ln.createElement("div",{className:`${In.movebq} user-path-items`,onClick:Ki=>{Ki.stopPropagation(),Ai(rn)}},Ln.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),Ln.createElement("span",{className:"c-red"},"\u79FB\u9664")),(pi=rn==null?void 0:rn.subject_tags)==null?void 0:pi.map((Ki,Ni)=>{var Ti,en;if(Ni===0){const cr=(Ti=he.find(Kr=>Kr.name==Ki))==null?void 0:Ti.swimg;return Ln.createElement("img",{className:In.sign,src:cr,style:{left:"-4px"}})}const br=(en=he.find(cr=>cr.name==Ki))==null?void 0:en.ptimg;return Ln.createElement("img",{className:In.sign,src:br,style:{left:`${48+52*(Ni-1)+2*Ni}px`}})}),Ln.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(rn==null?void 0:rn.excellent)&&Ln.createElement("div",{className:In.bq},"\u5F00\u653E\u8BFE\u7A0B"))),Ln.createElement("div",{className:In.name},Ln.createElement(Qt.Z,{title:Ke&&(rn!=null&&rn.excellent_alias_name)?Ln.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${on}`,Ln.createElement("br",null),Ln.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${rn==null?void 0:rn.excellent_alias_name}`)):on},Ln.createElement("span",{className:In.e},Ke&&(rn==null?void 0:rn.excellent_alias_name)||on))),Ln.createElement(Qt.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${An}`},Ln.createElement("div",{className:In.unit},Ln.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),An)),Ln.createElement("div",{className:In.tags},Ln.createElement("div",null,Ln.createElement(Qt.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},Ln.createElement("span",null,Ln.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),Ln.createElement("span",null,rn.stages_count))),Ln.createElement(Qt.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},Ln.createElement("span",null,Ln.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),Ln.createElement("span",null,rn.members_count)))))))})),!wi.length&&Ln.createElement(tn.Z,null)))},Pn={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"},li="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",Jn=Ot(59301),Yn=({className:Zi,dataSource:wi=[],col:je=4,right:He,bottom:Ue=23,precision:fi=0,wrapWidth:Se=1200,trackEventItems:_i,loading:Un,handleVery:Ai=()=>!0})=>{const We=Math.floor((Se-(je-1)*He)/je);return Jn.createElement(_t.Z,{spinning:Un},Jn.createElement("div",{className:ue()(Pn.list,Zi)},!!wi.length&&wi.map((Ke,ui)=>{const{subject_identifier:he,id:rn,identifier:Wn,power:pi}=Ke,on=Ke.is_public!=0&&Ke.is_public;return Jn.createElement("div",{className:Pn.wrap,key:rn,style:{width:We,marginRight:(1+ui)%je===0?0:He+fi,marginBottom:Ue}},Jn.createElement("a",{className:Pn.li,onClick:yn=>{yn.preventDefault(),Ai(Ke==null?void 0:Ke.first_category_url)&&(_i&&(0,$t.L9)([_i]),(0,$t.xg)(Ke.first_category_url))}},Jn.createElement("div",{className:Pn.top},Jn.createElement(Qt.Z,{title:Ke.name},Jn.createElement("div",{className:Pn.name},Ke.name)),Jn.createElement("img",{className:Pn.img,src:Zt.Z.IMG_SERVER+"/images/"+Ke.avatar_url}),Jn.createElement("div",{className:Pn.text,title:Ke.creator},Ke.creator),he&&Jn.createElement("div",{className:Pn.btns},Jn.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),Jn.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),on&&Jn.createElement("div",{className:Pn.sign},"\u516C\u5F00")),Jn.createElement("div",{className:Pn.bottom},Ke.visits>0&&Jn.createElement(Qt.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},Jn.createElement("span",null,Jn.createElement("i",{className:"iconfont icon-liulanyan"}),Jn.createElement("span",null,Ke.visits))),Ke.course_members_count>0&&Jn.createElement(Qt.Z,{title:"\u6210\u5458",placement:"bottom"},Jn.createElement("span",null,Jn.createElement("i",{className:"iconfont icon-chengyuan"}),Ke.course_members_count)),Ke.tasks_count>0&&Jn.createElement(Qt.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},Jn.createElement("span",null,Jn.createElement("i",{className:"iconfont icon-zuoye"}),Ke.tasks_count)),Ke.is_end?Jn.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):Jn.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!Ke.is_accessible&&Jn.createElement("div",{className:Pn.lockWrap},Jn.createElement("img",{src:`${Zt.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),Jn.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!wi.length&&Jn.createElement(tn.Z,null)))},si={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"},Fi=Ot(89070),oi=({dataSource:Zi=[],value:wi,onChange:je,className:He,style:Ue={},tabBarExtraContent:fi})=>Pt.createElement("div",{className:ue()(si.tabs,He),style:Ue},Pt.createElement("div",{className:si.tabsWrap},Zi.map((Se,_i)=>!(Se!=null&&Se.hide)&&Pt.createElement("aside",{className:si.tab,onClick:()=>{je(Se.id),Se.link&&Fi.history.push(Se.link)},key:_i},Pt.createElement("div",{className:wi===Se.id?si.active:""},Se.name),(Se==null?void 0:Se.resetCount)==null&&(Se==null?void 0:Se.total)!==void 0&&Pt.createElement("span",null,"\uFF08",Se==null?void 0:Se.total,"\uFF09"),(Se==null?void 0:Se.resetCount)!==void 0&&(Se==null?void 0:Se.total)!==void 0&&Pt.createElement(Qt.Z,{title:(Se==null?void 0:Se.tip)!=null?Se==null?void 0:Se.tip:""},Pt.createElement("span",{style:{color:"#9096A3"}},"\uFF08",Pt.createElement("span",{style:{color:"#000"}},Se==null?void 0:Se.resetCount),"/",Pt.createElement("span",null,Se==null?void 0:Se.total),"\uFF09"))))),Pt.createElement("div",{className:si.tabBar},fi)),ci=({className:Zi,style:wi={},children:je})=>Pt.createElement("div",{className:ue()(Zi),style:wi},je),Pi={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"},Ht=Ot(75727),kt=Ot(93041);const mt=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var Lt=({sortValue:Zi,dropValue:wi,className:je,onSort:He,onDrop:Ue,dataSource:fi=mt})=>{var Se;return Pt.createElement("div",{className:ue()(Pi.orderWrap,je)},Pt.createElement(Ht.Z,{dropdownRender:()=>Pt.createElement(kt.default,null,fi.map((_i,Un)=>Pt.createElement(kt.default.Item,{key:Un,onClick:()=>Ue(_i.id)},_i.name)))},Pt.createElement("span",{className:Pi.orderTextWrap},(Se=fi.find(_i=>wi===_i.id))==null?void 0:Se.name)),Pt.createElement("span",{className:Pi.orderIconWrap},Pt.createElement("span",{className:Pi.orderAsc},Pt.createElement("i",{className:Zi==="asc"?`iconfont icon-sanjiaoxing-up font12 ${Pi.cursorPointer} ${Pi.active}`:`iconfont icon-sanjiaoxing-up font12 ${Pi.cursorPointer}`,onClick:()=>He(Zi==="asc"?"desc":"asc")})),Pt.createElement("span",{className:Pi.orderDesc},Pt.createElement("i",{className:Zi==="desc"?`iconfont icon-sanjiaoxing-down font12 ${Pi.cursorPointer} ${Pi.active}`:`iconfont icon-sanjiaoxing-down font12 ${Pi.cursorPointer}`,onClick:()=>He(Zi==="asc"?"desc":"asc")}))))},Bt={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"},Kt=Ot(99571),ge=Object.defineProperty,ke=Object.getOwnPropertySymbols,Je=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,ze=(Zi,wi,je)=>wi in Zi?ge(Zi,wi,{enumerable:!0,configurable:!0,writable:!0,value:je}):Zi[wi]=je,De=(Zi,wi)=>{for(var je in wi||(wi={}))Je.call(wi,je)&&ze(Zi,je,wi[je]);if(ke)for(var je of ke(wi))ve.call(wi,je)&&ze(Zi,je,wi[je]);return Zi},nn=(Zi,wi)=>{var je={};for(var He in Zi)Je.call(Zi,He)&&wi.indexOf(He)<0&&(je[He]=Zi[He]);if(Zi!=null&&ke)for(var He of ke(Zi))wi.indexOf(He)<0&&ve.call(Zi,He)&&(je[He]=Zi[He]);return je},kn=(Zi,wi,je)=>new Promise((He,Ue)=>{var fi=Un=>{try{_i(je.next(Un))}catch(Ai){Ue(Ai)}},Se=Un=>{try{_i(je.throw(Un))}catch(Ai){Ue(Ai)}},_i=Un=>Un.done?He(Un.value):Promise.resolve(Un.value).then(fi,Se);_i((je=je.apply(Zi,wi)).next())}),gn=Zi=>{var wi=Zi,{className:je,style:He,children:Ue,loading:fi=!1,openLoading:Se,onClick:_i=()=>{},size:Un="middle",shape:Ai="round"}=wi,We=nn(wi,["className","style","children","loading","openLoading","onClick","size","shape"]);const[Ke,ui]=(0,Pt.useState)(!1);return Pt.createElement(Kt.ZP,De({onClick:(0,ce.throttle)(he=>kn(void 0,null,function*(){Se&&ui(!0);try{yield _i(he)}catch(rn){console.log("error",rn)}Se&&ui(!1)}),2e3,{leading:!0,trailing:!1}),className:ue()(Bt.btn,Bt[`${Un}-${Ai}`],je),style:He,size:Un,shape:Ai,loading:Ke||fi},We),Ue)},Ri={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"},xi=({className:Zi,style:wi,children:je=null,onClick:He,title:Ue})=>Pt.createElement("div",{className:ue()(Ri.head,Zi),style:wi},Pt.createElement("span",{className:"primary-hover",onClick:He},Pt.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),Pt.createElement("b",{title:Ue},Ue),Pt.createElement("div",{className:Ri.node},je)),Ei={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"},Qi=({confirmShow:Zi=!0,confirmTitle:wi,confirmClick:je,cancelShow:He=!0,cancelTitle:Ue,cancelClick:fi,className:Se,style:_i,confirmLoading:Un=!1})=>Pt.createElement("div",{className:ue()(Ei.btns,Se),style:_i},Zi&&Pt.createElement(Kt.ZP,{loading:Un,onClick:je,type:"primary",className:Ei.confirm},wi),He&&Pt.createElement(Kt.ZP,{onClick:fi,className:Ei.cancel},Ue)),Oi={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"},Hr=({className:Zi,style:wi={},LeftContent:je,children:He,RightContent:Ue})=>Pt.createElement("div",{className:ue()(Oi.fixedBottom,Zi),style:wi},Pt.createElement("div",{className:Oi.wrap},Pt.createElement("div",{className:Oi.left},je),Pt.createElement("div",{className:Oi.center},He),Pt.createElement("div",{className:Oi.right},Ue))),Xi={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"},mr=({className:Zi,style:wi={},dataSource:je=[]})=>Pt.createElement("div",{className:ue()(Xi.crumbs,Zi),style:wi},je.map((He,Ue)=>Ue<je.length-1?Pt.createElement(Pt.Fragment,{key:Ue},He.path||He.onClick?Pt.createElement("span",{className:Xi.hover,onClick:He!=null&&He.onClick?He.onClick:()=>Fi.history.push(He.path)},He.name):Pt.createElement("span",null,He.name),Pt.createElement("span",null,"\xA0",">","\xA0")):Pt.createElement("span",{key:Ue,style:{color:"#5F6368"}},He.name))),Yr=Ot(11938),ji=Object.defineProperty,co=Object.defineProperties,fo=Object.getOwnPropertyDescriptors,Xr=Object.getOwnPropertySymbols,Er=Object.prototype.hasOwnProperty,Zr=Object.prototype.propertyIsEnumerable,bt=(Zi,wi,je)=>wi in Zi?ji(Zi,wi,{enumerable:!0,configurable:!0,writable:!0,value:je}):Zi[wi]=je,Br=(Zi,wi)=>{for(var je in wi||(wi={}))Er.call(wi,je)&&bt(Zi,je,wi[je]);if(Xr)for(var je of Xr(wi))Zr.call(wi,je)&&bt(Zi,je,wi[je]);return Zi},Vi=(Zi,wi)=>co(Zi,fo(wi)),Vr=(Zi,wi)=>{var je={};for(var He in Zi)Er.call(Zi,He)&&wi.indexOf(He)<0&&(je[He]=Zi[He]);if(Zi!=null&&Xr)for(var He of Xr(Zi))wi.indexOf(He)<0&&Zr.call(Zi,He)&&(je[He]=Zi[He]);return je};const{Countdown:Do}=Yr.default;var $o=Zi=>{var wi=Zi,{onChange:je}=wi,He=Vr(wi,["onChange"]);const[Ue,fi]=(0,Pt.useState)(null);(0,Pt.useEffect)(()=>{typeof Ue=="number"&&Ue>=0&&je(Ue)},[Ue]);const Se=_i=>{const Un=Math.floor(_i/1e3);fi(Un)};return Pt.createElement(Do,Vi(Br({},He),{onChange:Se}))}},58856:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{Z:function(){return te}});var Pt=Ot(59301);function te(Ae,Ce){const de=(0,Pt.useRef)();(0,Pt.useEffect)(()=>{de.current=Ae}),(0,Pt.useEffect)(()=>{function Rt(){de.current()}if(Ce!==null){let ne=setInterval(Rt,Ce);return()=>clearInterval(ne)}},[Ce])}},12383:function(Bn,Ve,Ot){"use strict";Ot.r(Ve),Ot.d(Ve,{default:function(){return ii}});var Pt=Ot(59301),te=Ot(61186),Ae=Ot.n(te),Ce=Ot(86129),de=Ot.n(Ce),Rt=Ot(99064),ne=Ot(89070),ue=Ot(62957),ce=Ot(6767),Wt=Ot(458),Ne=Ot(91882),qt=Ot(77019),Le=Ot(5269),Ut=Ot(99571),nt=Ot(25399),et=Ot(37285),At=Ot(37568),at=Ot(54172),ct=Ot(82326),pt=Ot(13747),xt=Ot(27812),Mt=Ot(95869),_t=Ot(87169),Qt=Ot(26227),Vt=Ot(3294),Zt=Ot(24065),$t=Ot(955),Pe=Ot(42441),me={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"},$e={normal:{opacity:.8,shadowBlur:10,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",color:"#2e65ad"}};const tn=({shixunHomeworks:hn,data:An,globalSetting:xn,loading:Nn,dispatch:ai})=>{var Ki;const{shixunWorkReport:Ni}=hn;let Ti=((Ki=An==null?void 0:An.efficiency_list)==null?void 0:Ki.length)-parseInt(An==null?void 0:An.myself_eff[0]);const en=()=>({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(cr){return cr.name===Ni.username?"\u59D3\u540D\uFF1A"+Ni.username+"<br/>\u5B66\u53F7\uFF1A "+Ni.user_id+"<br/>\u6548\u7387\uFF1A"+(An==null?void 0:An.myself_eff[1]):cr.name+":"+cr.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:An==null?void 0:An.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:Ti,yAxis:An==null?void 0:An.myself_eff[1],value:An==null?void 0:An.myself_eff[1]}],itemStyle:{normal:{color:"#c23531"}}},markLine:{lineStyle:{normal:{type:"solid",color:"#ff6800"}},data:[{type:"average",name:"\u4E2D\u4F4D\u503C"}]}}]}),br=()=>({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(cr){var Kr=cr.value;if(cr.name===Ni.username)return"\u59D3\u540D\uFF1A"+Ni.username+"<br/>\u5B66\u53F7\uFF1A "+Ni.user_id+"<br/>\u5F97\u5206\uFF1A"+(An==null?void 0:An.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:$e,data:An==null?void 0:An.consume_list,symbolSize:function(cr){return Math.round(cr[2])},markPoint:{data:[{name:Ni.username,xAxis:An==null?void 0:An.myself_object[0],yAxis:An==null?void 0:An.myself_object[1],value:An==null?void 0:An.myself_object[1]}],itemStyle:{normal:{color:"#c23531"}}}}]});return Pt.createElement(Pt.Fragment,null,Pt.createElement("aside",{className:"ml60 pr30"},Pt.createElement(qt.Z,null,Pt.createElement(Le.Z,{flex:"800px"},Pt.createElement(Pe.Z,{style:{width:750,height:580},option:en()})),Pt.createElement(Le.Z,{flex:"1"},Pt.createElement("aside",{className:me.rightInfo},Pt.createElement("ul",null,Pt.createElement("li",null,Pt.createElement("span",null,"\u59D3\u540D")," ",Pt.createElement("span",{className:"ml30"},Ni.username)),Pt.createElement("li",null,Pt.createElement("span",null,"\u5B66\u53F7")," ",Pt.createElement("span",{className:"ml30"},Ni.student_id||"--")),Pt.createElement("li",null,Pt.createElement("span",null,"\u5B66\u4E60\u6548\u7387")," ",Pt.createElement("span",{className:"ml30 c-orange"},An==null?void 0:An.myself_eff[1])),Pt.createElement("li",null,Pt.createElement("span",null,"\u5F53\u524D\u6392\u540D")," ",Pt.createElement("span",{className:"ml30 c-orange"},An==null?void 0:An.myself_eff[0]))),Pt.createElement("p",null,"1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387",Pt.createElement("br",null),"\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387\u503C",Pt.createElement("br",null),"\u5C0F\u5706\u70B9\u8D8A\u9AD8\uFF0C\u5B66\u4E60\u6548\u7387\u8D8A\u9AD8",Pt.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"))))),Pt.createElement("aside",{className:"ml60 pr30"},Pt.createElement(qt.Z,null,Pt.createElement(Le.Z,{flex:"800px"},Pt.createElement(Pe.Z,{style:{width:750,height:580},option:br()})),Pt.createElement(Le.Z,{flex:"1"},Pt.createElement("aside",{className:me.rightInfo},Pt.createElement("ul",null,Pt.createElement("li",null,Pt.createElement("span",null,"\u59D3\u540D")," ",Pt.createElement("span",{className:"ml30"},Ni.username)),Pt.createElement("li",null,Pt.createElement("span",null,"\u5B66\u53F7")," ",Pt.createElement("span",{className:"ml30"},Ni.student_id||"--")),Pt.createElement("li",null,Pt.createElement("span",null,"\u80FD\u529B")," ",Pt.createElement("span",{className:"ml30 c-orange"},An==null?void 0:An.myself_object[1]))),Pt.createElement("p",null,"1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u80FD\u529B\u503C",Pt.createElement("br",null),"\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u80FD\u529B\u503C",Pt.createElement("br",null),"\u5C0F\u5706\u5708\u8D8A\u5927\uFF0C\u8BC4\u6D4B\u6B21\u6570\u8D8A\u5C11",Pt.createElement("br",null)))))))};var Cn=(0,ne.connect)(({shixunHomeworks:hn,loading:An,globalSetting:xn})=>({shixunHomeworks:hn,globalSetting:xn,loading:An.effects}))(tn),Tn=Ot(23954),In=Ot(71051),$n=({defaultValue:hn,onBlur:An,max:xn,className:Nn="game-score"})=>{const[ai,Ki]=(0,Pt.useState)(hn);(0,Pt.useEffect)(()=>{Ki(hn)},[hn]);function Ni(en){Ki(en)}function Ti(){ai!==hn&&An(ai>xn?xn:ai)}return Pt.createElement(In.Z,{max:xn,min:0,className:Nn,value:ai,onChange:Ni,onBlur:Ti})},Ln=Ot(12290),be={md:"md___TEmcT"},re=Ot(59301),Pn=Object.defineProperty,li=Object.defineProperties,Jn=Object.getOwnPropertyDescriptors,un=Object.getOwnPropertySymbols,Yn=Object.prototype.hasOwnProperty,si=Object.prototype.propertyIsEnumerable,Fi=(hn,An,xn)=>An in hn?Pn(hn,An,{enumerable:!0,configurable:!0,writable:!0,value:xn}):hn[An]=xn,sn=(hn,An)=>{for(var xn in An||(An={}))Yn.call(An,xn)&&Fi(hn,xn,An[xn]);if(un)for(var xn of un(An))si.call(An,xn)&&Fi(hn,xn,An[xn]);return hn},oi=(hn,An)=>li(hn,Jn(An));const Ee=ct.default.Option,ci={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,enableSplitViewResizing:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1};var Pi=(hn=>(hn[hn.SET_PATH=0]="SET_PATH",hn[hn.GET_PASSED_CONTENT=1]="GET_PASSED_CONTENT",hn))(Pi||{});function Ht(hn,An){switch(An.type){case 0:return oi(sn({},hn),{selectedPath:An.payload});case 1:return oi(sn({},hn),{passedContent:An.payload});default:throw new Error}}var kt=({path:hn,game_id:An,onPathChange:xn,autoHeight:Nn,diff_code_count:ai,data:Ki,game_codes_cn:Ni})=>{var Ti,en,br,cr;const Kr=hn.split("\uFF1B").filter(er=>!!er),[Ze,ni]=(0,Pt.useReducer)(Ht,{selectedPath:Kr[0],passedContent:{language:"python",content:""}}),{selectedPath:Bi,passedContent:Hi}=Ze;function vi(er){ni({type:0,payload:er})}const ki={\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 re.createElement(re.Fragment,null,re.createElement("h2",null," ",re.createElement("span",null,Ni,re.createElement(nt.Z,{title:re.createElement("div",null,re.createElement("div",null,"\u4EE3\u7801\u5C55\u793A\u89C4\u5219\uFF1A"),re.createElement("div",null,"1.\u5C55\u793A\u5B66\u5458\u5728\u4F5C\u4E1A\u622A\u6B62\u524D\u5F97\u5206\u6700\u9AD8\u7684\u4EE3\u7801\u7248\u672C\u3002"),re.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"),re.createElement("div",null," 3.\u4F5C\u4E1A\u622A\u6B62\u540E\u63D0\u4EA4\u7684\u4EE3\u7801\u5C06\u4E0D\u4E88\u5C55\u793A\u3002"))},re.createElement("i",{style:{marginLeft:10,color:"#3061D0",fontSize:16},className:"iconfont icon-tishixiaowenhao"}))),ai&&re.createElement("span",{style:{marginLeft:"50px"}},"\u4EE3\u7801\u4FEE\u6539\u884C\u6570 ",ai),re.createElement("span",null,re.createElement(ct.default,{style:{width:200},value:Bi,onChange:vi}," ",Kr.map(er=>re.createElement(Ee,{key:er,value:er},er))," "))," "),(Bi==null?void 0:Bi.split(".")[1])==="md"&&re.createElement(Ln.Z,{height:300,autoHeight:Nn,defaultValue:((en=(Ti=Ki==null?void 0:Ki.filter(er=>er.path===Bi))==null?void 0:Ti[0])==null?void 0:en.content)||"",className:be.md}),(Bi==null?void 0:Bi.split(".")[1])!=="md"&&re.createElement(Tn.ZP,{height:300,language:Hi.language,value:((cr=(br=Ki==null?void 0:Ki.filter(er=>er.path===Bi))==null?void 0:br[0])==null?void 0:cr.content)||"",autoHeight:Nn,theme:"default",isCopy:!0,options:ci}))},mt=Ot(92365),vt=Ot(12911),Lt=Ot.n(vt),Bt=Object.defineProperty,Kt=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable,Je=(hn,An,xn)=>An in hn?Bt(hn,An,{enumerable:!0,configurable:!0,writable:!0,value:xn}):hn[An]=xn,ve=(hn,An)=>{for(var xn in An||(An={}))ge.call(An,xn)&&Je(hn,xn,An[xn]);if(Kt)for(var xn of Kt(An))ke.call(An,xn)&&Je(hn,xn,An[xn]);return hn};const ze=hn=>React.createElement("svg",ve({className:"scai_svg__icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:16,height:16},hn),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 De="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxwYXRoIGQ9Ik01MTIgMzI3LjY4YzI0NS43NiAwIDQ0NS40NCAxNTMuNiA0NDUuNDQgMzQ4LjE2Qzk1Ny40NCA4NzAuNCA3NTcuNzYgMTAyNCA1MTIgMTAyNGMtMjQ1Ljc2LTUuMTItNDQ1LjQ0LTE1My42LTQ0NS40NC0zNDguMTYgMC0xOTQuNTYgMTk5LjY4LTM0OC4xNiA0NDUuNDQtMzQ4LjE2eiIgZmlsbD0iI0RCRENGRiIvPjxwYXRoIGQ9Ik02NDUuMTIgOTQ3LjJjMTE3Ljc2LTEwLjI0IDE1OC43Mi0xNDMuMzYgMTYzLjg0LTI2Ni4yNCAwLTEyOC0xMjgtMTc0LjA4LTI5MS44NC0xNzQuMDgtMTYzLjg0IDAtMjkxLjg0IDQ2LjA4LTI5MS44NCAxNzQuMDggMCAxMTIuNjQgMzUuODQgMjQwLjY0IDE0My4zNiAyNjEuMTIgMzAuNzIgNS4xMiAyNjEuMTIgMTAuMjQgMjc2LjQ4IDUuMTJ6IiBmaWxsPSIjMTExQUNDIi8+PHBhdGggZD0iTTQwNC40OCA2ODYuMDhjMTUuMzYgMCAyNS42IDEwLjI0IDI1LjYgMjUuNnY2MS40NGMwIDE1LjM2LTEwLjI0IDI1LjYtMjUuNiAyNS42LTE1LjM2IDAtMjUuNi0xMC4yNC0yNS42LTI1LjZ2LTYxLjQ0Yy01LjEyLTEwLjI0IDEwLjI0LTI1LjYgMjUuNi0yNS42em0yMjAuMTYgMGMxNS4zNiAwIDI1LjYgMTAuMjQgMjUuNiAyNS42djYxLjQ0YzAgMTUuMzYtMTAuMjQgMjUuNi0yNS42IDI1LjYtMTUuMzYgMC0yNS42LTEwLjI0LTI1LjYtMjUuNnYtNjEuNDRjMC0xMC4yNCAxMC4yNC0yNS42IDI1LjYtMjUuNnoiIGZpbGw9IiNGRkYiLz48cGF0aCBkPSJNOTE2LjQ4IDUyNy4zNmM1Ni4zMiAwIDEwNy41MiA3MS42OCAxMDcuNTIgMTUzLjYgMCA4Ny4wNC02MS40NCAxNTMuNi0xMTcuNzYgMTUzLjYgMCAwIDUxLjItNzYuOCA1MS4yLTE1OC43MnMtNDAuOTYtMTQ4LjQ4LTQwLjk2LTE0OC40OHptLTgwOC45NiA1LjEyLTUuMTIgNS4xMmMtMTAuMjQgMjAuNDgtMzUuODQgNzYuOC0zNS44NCAxMzguMjQgMCA3Ni44IDM1Ljg0IDEzOC4yNCA1MS4yIDE1OC43MkM2MS40NCA4MzQuNTYgMCA3NjggMCA2ODAuOTZjMC04MS45MiA1MS4yLTE0OC40OCAxMDcuNTItMTQ4LjQ4eiIgZmlsbD0iIzgxODdGRiIvPjxwYXRoIGQ9Ik01MTIgMGMyMC40OCAwIDMwLjcyIDE1LjM2IDMwLjcyIDMwLjcydjIyMC4xNmMwIDIwLjQ4LTE1LjM2IDMwLjcyLTMwLjcyIDMwLjcycy0zMC43Mi0xMC4yNC0zMC43Mi0zMC43MlYzMC43MkM0ODEuMjggMTUuMzYgNDk2LjY0IDAgNTEyIDB6IiBmaWxsPSIjNzAxQ0RDIi8+PHBhdGggZD0iTTM4NCA0Ni4wOGMyMC40OCAwIDMwLjcyIDE1LjM2IDMwLjcyIDMwLjcydjEzMy4xMmMwIDIwLjQ4LTE1LjM2IDMwLjcyLTMwLjcyIDMwLjcycy0zNS44NC0xNS4zNi0zNS44NC0zMC43MlY3Ni44YzAtMjAuNDggMTUuMzYtMzAuNzIgMzUuODQtMzAuNzJ6IiBmaWxsPSIjMzcxQ0RDIi8+PHBhdGggZD0iTTY0NS4xMiA0Ni4wOGMyMC40OCAwIDMwLjcyIDE1LjM2IDMwLjcyIDMwLjcydjEzMy4xMmMwIDIwLjQ4LTE1LjM2IDMwLjcyLTMwLjcyIDMwLjcycy0zMC43Mi0xNS4zNi0zMC43Mi0zMC43MlY3Ni44YzAtMjAuNDggMTUuMzYtMzAuNzIgMzAuNzItMzAuNzJ6IiBmaWxsPSIjQUIyRkYwIi8+PHBhdGggZD0iTTI1MC44OCA4Ny4wNGMyMC40OCAwIDMwLjcyIDE1LjM2IDMwLjcyIDMwLjcydjQ2LjA4YzAgMjAuNDgtMTUuMzYgMzAuNzItMzAuNzIgMzAuNzJzLTM1Ljg0LTEwLjI0LTM1Ljg0LTMwLjcydi00MC45NmMwLTIwLjQ4IDE1LjM2LTM1Ljg0IDM1Ljg0LTM1Ljg0eiIgZmlsbD0iIzZENTdGMiIvPjxwYXRoIGQ9Ik03NzguMjQgODcuMDRjMjAuNDggMCAzMC43MiAxNS4zNiAzMC43MiAzMC43MnY0Ni4wOGMwIDIwLjQ4LTE1LjM2IDMwLjcyLTMwLjcyIDMwLjcycy0zMC43Mi0xNS4zNi0zMC43Mi0zMC43MnYtNDAuOTZjMC0yMC40OCAxNS4zNi0zNS44NCAzMC43Mi0zNS44NHoiIGZpbGw9IiNDODZGRkEiLz48L3N2Zz4=",nn=Ot(24544),kn=Ot(85149),Gn=Object.defineProperty,gn=Object.defineProperties,Ri=Object.getOwnPropertyDescriptors,di=Object.getOwnPropertySymbols,xi=Object.prototype.hasOwnProperty,Ei=Object.prototype.propertyIsEnumerable,ar=(hn,An,xn)=>An in hn?Gn(hn,An,{enumerable:!0,configurable:!0,writable:!0,value:xn}):hn[An]=xn,Qi=(hn,An)=>{for(var xn in An||(An={}))xi.call(An,xn)&&ar(hn,xn,An[xn]);if(di)for(var xn of di(An))Ei.call(An,xn)&&ar(hn,xn,An[xn]);return hn},Oi=(hn,An)=>gn(hn,Ri(An)),Yi=(hn,An,xn)=>new Promise((Nn,ai)=>{var Ki=en=>{try{Ti(xn.next(en))}catch(br){ai(br)}},Ni=en=>{try{Ti(xn.throw(en))}catch(br){ai(br)}},Ti=en=>en.done?Nn(en.value):Promise.resolve(en.value).then(Ki,Ni);Ti((xn=xn.apply(hn,An)).next())});const Hr=({shixunHomeworks:hn,autoHeight:An,classroomList:xn,dispatch:Nn})=>{var ai,Ki,Ni,Ti,en,br,cr,Kr;const{shixunWorkReport:Ze}=hn,{stage_list:ni,work_id:Bi}=Ze,[Hi,vi]=(0,Pt.useState)(!1),[ki,er]=(0,Pt.useState)(!0),[lr,oe]=(0,Pt.useState)({left:0,top:0,bottom:0,right:0}),ae=(0,Pt.useRef)(null),[ee,Ye]=(0,Pt.useState)(!1),[Be,ln]=(0,Pt.useState)(""),Dn=(0,Pt.useRef)(null),Zn=(Ge,fn)=>{var Fn;const{clientWidth:Sn,clientHeight:dn}=window.document.documentElement,gi=(Fn=ae.current)==null?void 0:Fn.getBoundingClientRect();gi&&oe({left:-gi.left+fn.x,right:Sn-(gi.right-fn.x),top:-gi.top+fn.y,bottom:dn-(gi.bottom-fn.y)})},Li=(0,ne.useParams)(),Mi=(0,Zt.GJ)(),Te={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1};(0,Pt.useEffect)(()=>{console.log(Li)},[]);const yi=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"position",width:"100px"},{title:"\u8BE6\u7EC6\u4FE1\u606F",dataIndex:"output_detail",render:(Ge,fn,Fn)=>Pt.createElement("div",null,Ge,fn.is_work_end_evaluate&&Pt.createElement($t.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:Ge=>Ae()(Ge).format("YYYY-MM-DD HH:mm")},{title:"\u64CD\u4F5C",width:"80px",dataIndex:"query_index",render:(Ge,fn)=>Pt.createElement("span",{className:"c-blue current",onClick:()=>Yi(void 0,null,function*(){var Fn,Sn;const dn=yield(0,mt.Lk)(fn.game_identifier,{path:(Sn=(Fn=fn.path)==null?void 0:Fn.replace(/\;/g,";"))==null?void 0:Sn.split(";")[0],query_index:fn.query_index,homework_common_id:Li.categoryId});(dn==null?void 0:dn.status)===0&&(Ye(dn),vi(!0))})},fn.query_index?"\u67E5\u770B\u4EE3\u7801":"")}],Me=[{title:"\u8C03\u5206\u7528\u6237",dataIndex:["user","name"],width:350,render:(Ge,fn)=>{var Fn;return Pt.createElement("span",null,Pt.createElement("img",{width:30,height:30,style:{borderRadius:"50%",marginRight:"10px"},src:Vt.Z.IMG_SERVER+"/images/"+((Fn=fn==null?void 0:fn.user)==null?void 0:Fn.image_url)}),Ge)}},{title:"\u8C03\u5206\u524D",dataIndex:"old_score",width:270,render:Ge=>Pt.createElement("span",null,"\u4FEE\u6B63\u524D\u5206\u6570\uFF1A",Ge,"\u5206")},{title:"\u8C03\u5206\u540E",dataIndex:"score",width:270,render:Ge=>Pt.createElement("span",null,"\u4FEE\u6B63\u540E\u5206\u6570\uFF1A",Ge,"\u5206")},{title:"\u8C03\u5206\u65F6\u95F4",dataIndex:"created_at",align:"right",render:Ge=>Pt.createElement("span",null,"\u4FEE\u6B63\u65F6\u95F4\uFF1A",Ge?Ae()(Ge).format("YYYY-MM-DD HH:mm"):"--")}];function an(Ge,fn){return Yi(this,null,function*(){const{challenge_id:Fn}=ni[Ge],Sn=yield Nn({type:"shixunHomeworks/changeScore",payload:{categoryId:Li.homeworkId,type:"report",score:fn,challenge_id:Fn}});yield Nn({type:"shixunHomeworks/getShixunWorkReport",payload:Qi({},Li)}),Sn.status===0&&ce.ZP.success("\u64CD\u4F5C\u6210\u529F")})}function Qe(Ge,fn){return(0,Rt.U2)(`student_works/${Bi}/rep_passed_content.json`,{path:fn,game_id:Ge})}const[It,vn]=(0,Pt.useState)((ai=Ze==null?void 0:Ze.shixun_detail)==null?void 0:ai.map(Ge=>Oi(Qi({},Ge),{commentEdit:!1}))),pn=Ge=>Ge.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,"`$&`"),[Qn,zn]=(0,Pt.useState)(!1),jn=(Ge,fn)=>Yi(void 0,null,function*(){var Fn,Sn;zn(!0),Dn.current=new nn.Z(Vt.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:"",shixun_id:Ze==null?void 0:Ze.myshixun_identifier,game_id:Ge==null?void 0:Ge.id,source:"shixun",is_chat:!1,type:9,description:Ge==null?void 0:Ge.challenge_description,query:(Sn=(Fn=Ge==null?void 0:Ge.game_codes)==null?void 0:Fn[0])==null?void 0:Sn.content,homework_common_id:Li.categoryId}),yield new Promise((dn,gi)=>{Dn.current.on("data",Vn=>{const qn=[...It];qn[fn].comment=pn(Vn==null?void 0:Vn.full),vn(qn)}),Dn.current.on("done",()=>Yi(void 0,null,function*(){var Vn;zn(!1);const qn=[...It],cn=yield(0,Rt.ZP)(`/api/student_works/${Li==null?void 0:Li.homeworkId}/challenge_comment`,{method:"put",body:{challenge_id:Ge==null?void 0:Ge.challenge_id,comment:qn[fn].comment}});if((cn==null?void 0:cn.status)==0){ce.ZP.success("\u8BC4\u4EF7\u6210\u529F");const ri=[...It];ri[fn].comment_updated_at=(Vn=cn==null?void 0:cn.data)==null?void 0:Vn.comment_updated_at,vn(ri)}})),Dn.current.startStream()})});return Pt.createElement(Pt.Fragment,null,It==null?void 0:It.map(function(Ge,fn){var Fn,Sn;return Pt.createElement("div",{key:fn},Pt.createElement("aside",{className:"pl30 pr30",key:fn},Pt.createElement("div",{className:`${me.shixunTitle} mt10`},Pt.createElement("div",null,Pt.createElement("span",{className:"fa fa-code "}),Pt.createElement("strong",{className:"c-black"},"\u7B2C",fn+1,"\u5173 ",Pt.createElement(ne.Link,{className:"c-black",target:"_blank",to:`/tasks/${Li.coursesId}/${Li.categoryId}/${Ge.game_identifier}`},Ge.subject))),Mi?Pt.createElement("span",null,"\u8C03\u5206\uFF1A",Pt.createElement($n,{className:"game-score",max:ni[fn].game_score_full,defaultValue:ni[fn].game_score,onBlur:dn=>{var gi;if((0,Zt.Rm)()&&!((gi=xn.AssistantObject.practice)!=null&&gi.can_appraise)){ce.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}an(fn,dn)}})):null),Pt.createElement("div",{className:"font16 mt10"},Ge.st===0&&(Ge.path?typeof(Ge==null?void 0:Ge.game_codes_cn)=="string"?Pt.createElement("aside",{className:me.shixunWrp},Pt.createElement(kt,{game_codes_cn:Ge==null?void 0:Ge.game_codes_cn,autoHeight:An,path:Ge.path,game_id:Ge.id,data:Ge.game_codes,diff_code_count:Ge.diff_code_count,onPathChange:Qe})):Pt.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"),Ge.st===1&&(Ge.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")),Pt.createElement("aside",{className:"mt10 font16"},(Fn=Ge.outputs)!=null&&Fn.length?Pt.createElement(at.default,{columns:yi,pagination:{hideOnSinglePage:!0},dataSource:Ge.outputs.map(dn=>Qi(Qi({},Ge),dn))}):"\u672C\u5173\u65E0\u8BC4\u6D4B\u8BB0\u5F55"),Pt.createElement("aside",{className:"mt10"},Pt.createElement("div",null,Pt.createElement("div",{style:{display:"flex",alignItems:"center"}},Pt.createElement("strong",{className:"c-black font14"},"\u4EE3\u7801\u8BC4\u4EF7"),!(Ge!=null&&Ge.commentEdit)&&!(0,Zt.dE)()&&(Ge!=null&&Ge.comment?Pt.createElement(Pt.Fragment,null,Pt.createElement("div",{style:{color:"#666666",fontSize:"12px",marginLeft:"auto"}},"\u6700\u65B0\u8BC4\u4EF7\u65F6\u95F4\uFF1A",Ge!=null&&Ge.comment_updated_at?Ae()(Ge==null?void 0:Ge.comment_updated_at).format("YYYY-MM-DD HH:mm:ss"):"--"),Pt.createElement("div",{style:{color:"#3061D0",fontSize:"14px",marginLeft:"40px",cursor:"pointer"},onClick:()=>Yi(this,null,function*(){Qn?ce.ZP.warning("\u6B63\u5728\u751F\u6210\u8BC4\u8BBA\u4E2D\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):ue.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:()=>Yi(this,null,function*(){jn(Ge,fn)})})})},Pt.createElement("i",{className:"iconfont icon-zhongxinshengcheng1 mr8 font14"}),"\u91CD\u65B0\u751F\u6210")):Pt.createElement("div",{style:{color:"#3061D0",fontSize:"14px",marginLeft:"auto",cursor:"pointer"},onClick:()=>Yi(this,null,function*(){Qn?ce.ZP.warning("\u6B63\u5728\u751F\u6210\u8BC4\u8BBA\u4E2D\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):jn(Ge,fn)})},Pt.createElement("img",{src:De,className:"mr8"}),"\u4E00\u952EAI\u751F\u6210")),!(Ge!=null&&Ge.commentEdit)&&!(0,Zt.dE)()&&Pt.createElement("div",{style:{color:"#3061D0",fontSize:"14px",marginLeft:"20px",cursor:"pointer"},onClick:()=>{const dn=[...It];dn[fn].commentEdit=!0,vn(dn),ln(Ge==null?void 0:Ge.comment)}},Pt.createElement("i",{className:"iconfont icon-bianji-moren mr8 font14"}),"\u7F16\u8F91"),(Ge==null?void 0:Ge.commentEdit)&&Pt.createElement(Pt.Fragment,null,Pt.createElement("div",{className:me.pj_close,onClick:()=>{const dn=[...It];dn[fn].commentEdit=!1,vn(dn)}},"\u53D6\u6D88"),Pt.createElement("div",{className:me.pj_save,onClick:()=>Yi(this,null,function*(){var dn;const gi=yield(0,Rt.ZP)(`/api/student_works/${Li==null?void 0:Li.homeworkId}/challenge_comment`,{method:"put",body:{challenge_id:Ge==null?void 0:Ge.challenge_id,comment:Be}});if((gi==null?void 0:gi.status)==0){ce.ZP.success("\u8BC4\u4EF7\u6210\u529F");const Vn=[...It];Vn[fn].commentEdit=!1,Vn[fn].comment=Be,Vn[fn].comment_updated_at=(dn=gi==null?void 0:gi.data)==null?void 0:dn.comment_updated_at,vn(Vn)}})},"\u4FDD\u5B58"))),!(Ge!=null&&Ge.commentEdit)&&Pt.createElement("div",{className:me.pingjia},Ge!=null&&Ge.comment?Pt.createElement(kn.Z,{value:Ge==null?void 0:Ge.comment,style:{fontSize:"14px"}}):"\u6682\u65E0\u8BC4\u4EF7~"),(Ge==null?void 0:Ge.commentEdit)&&Pt.createElement(At.default.TextArea,{defaultValue:Be,style:{borderRadius:"5px",marginTop:"10px"},rows:5,onChange:dn=>ln(dn.target.value)}))),Pt.createElement("aside",{className:"mt10 font16"},((Sn=Ge==null?void 0:Ge.adjust_review_score_list)==null?void 0:Sn.length)>0&&(0,Zt.GJ)()&&Pt.createElement("div",null,Pt.createElement("strong",{className:"c-black font14"},"\u8C03\u5206\u8BB0\u5F55"),Pt.createElement(at.default,{columns:Me,pagination:{hideOnSinglePage:!0},dataSource:Ge.adjust_review_score_list,showHeader:!1})))))}),Pt.createElement(ue.default,{open:Hi,width:900,okText:"\u5173\u95ED",cancelButtonProps:{style:{display:"none"}},onOk:()=>{Ye({}),vi(!1)},onCancel:()=>{Ye({}),vi(!1)},title:Pt.createElement("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>{ki&&er(!1)},onMouseOut:()=>{er(!0)},onFocus:()=>{},onBlur:()=>{}},"\u4EE3\u7801\u5185\u5BB9"),modalRender:Ge=>Pt.createElement(Lt(),{disabled:ki,bounds:lr,nodeRef:ae,onStart:(fn,Fn)=>Zn(fn,Fn)},Pt.createElement("div",{ref:ae},Ge))},Pt.createElement("div",{style:{background:"#F6F7F9",padding:"30px 20px",marginBottom:20}},Pt.createElement("div",{style:{display:"flex",alignItems:"center"}},((Ki=ee==null?void 0:ee.data)==null?void 0:Ki.output_detail)==="\u8BC4\u6D4B\u901A\u8FC7"?Pt.createElement("i",{style:{color:"#0B9953",fontSize:18,marginRight:10},className:"iconfont icon-duigou1"}):Pt.createElement("i",{style:{color:"#E21010",fontSize:18,marginRight:10},className:"iconfont icon-jinggao1"}),Pt.createElement("div",{style:{color:((Ni=ee==null?void 0:ee.data)==null?void 0:Ni.output_detail)==="\u8BC4\u6D4B\u901A\u8FC7"?"#0B9953":"#E21010",fontSize:16,fontWeight:600}},(Ti=ee==null?void 0:ee.data)==null?void 0:Ti.output_detail)),Pt.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginTop:20}},Pt.createElement("div",null,Pt.createElement("span",{style:{color:"#6A7283"}},"\u8BC4\u6D4B\u65F6\u95F4"),Pt.createElement("span",{style:{marginLeft:8,color:"#232B40"}},Ae()((en=ee==null?void 0:ee.data)==null?void 0:en.created_at).format("YYYY-MM-DD HH:mm:ss"))),Pt.createElement("div",null,Pt.createElement("span",{style:{color:"#6A7283"}},"\u7528\u65F6"),Pt.createElement("span",{style:{marginLeft:8,color:"#232B40"}},(br=ee==null?void 0:ee.data)==null?void 0:br.ts_time,"s")),Pt.createElement("div",null,Pt.createElement("span",{style:{color:"#6A7283"}},"\u5185\u5B58"),Pt.createElement("span",{style:{marginLeft:8,color:"#232B40"}},(cr=ee==null?void 0:ee.data)==null?void 0:cr.ts_mem,"mb")),Pt.createElement("div",null,Pt.createElement("span",{style:{color:"#6A7283"}},"\u7528\u4F8B\u901A\u8FC7\u7387"),Pt.createElement("span",{style:{marginLeft:8,color:"#232B40"}},((Kr=ee==null?void 0:ee.data)==null?void 0:Kr.test_set_passed_rate)*100,"%")))),Pt.createElement(Tn.ZP,{height:500,autoHeight:An,language:"python",theme:"default",isCopy:!0,value:decodeURIComponent(escape(window.atob((ee==null?void 0:ee.content)||""))),options:Te})))};var Xi=(0,ne.connect)(({shixunHomeworks:hn,loading:An,globalSetting:xn,classroomList:Nn})=>({shixunHomeworks:hn,globalSetting:xn,loading:An.effects,classroomList:Nn}))(Hr),Fr=Ot(28284),mr={greyText:"greyText___nOpNq",info:"info___nBB3c",label:"label___P6my8",blackContent:"blackContent___O4HnS",orangeContent:"orangeContent___JBF44",inputLabel:"inputLabel___B2GAs",tableTitle:"tableTitle___IqAxM",scoreTable:"scoreTable___RJvpU"},Yr=Ot(30917),ji=Ot(59301),co=Object.defineProperty,fo=Object.getOwnPropertySymbols,Xr=Object.prototype.hasOwnProperty,Er=Object.prototype.propertyIsEnumerable,Zr=(hn,An,xn)=>An in hn?co(hn,An,{enumerable:!0,configurable:!0,writable:!0,value:xn}):hn[An]=xn,bt=(hn,An)=>{for(var xn in An||(An={}))Xr.call(An,xn)&&Zr(hn,xn,An[xn]);if(fo)for(var xn of fo(An))Er.call(An,xn)&&Zr(hn,xn,An[xn]);return hn},Br=(hn,An,xn)=>new Promise((Nn,ai)=>{var Ki=en=>{try{Ti(xn.next(en))}catch(br){ai(br)}},Ni=en=>{try{Ti(xn.throw(en))}catch(br){ai(br)}},Ti=en=>en.done?Nn(en.value):Promise.resolve(en.value).then(Ki,Ni);Ti((xn=xn.apply(hn,An)).next())});const Vi=({shixunHomeworks:hn,dispatch:An,classroomList:xn})=>{const{shixunWorkReport:Nn}=hn,ai=(0,ne.useParams)(),[Ki,Ni]=(0,Pt.useState)(!1),[Ti]=Fr.default.useForm(),[en,br]=ue.default.useModal(),[cr,Kr]=(0,Pt.useState)(!1),[Ze,ni]=(0,Pt.useState)(!1);(0,Pt.useEffect)(()=>{var vi,ki,er,lr;hn.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4"&&Ti.setFieldsValue({comment:(ki=(vi=hn.actionTabs.selectArrs)==null?void 0:vi.data)==null?void 0:ki.work_comment,hidden_comment:(lr=(er=hn.actionTabs.selectArrs)==null?void 0:er.data)==null?void 0:lr.work_comment_hidden})},[hn.actionTabs.key]);const Bi=()=>Br(void 0,null,function*(){const vi=Ti.getFieldsValue();(yield(0,Rt.ZP)(`/api/student_works/${ai.homeworkId}/shixun_work_comment.json`,{method:"post",body:{hidden_comment:vi.hidden_comment,comment:vi.comment}})).status===0&&(ce.ZP.success("\u8BC4\u9605\u6210\u529F"),Ti.resetFields(),An({type:"shixunHomeworks/setActionTabs",payload:{}}),An({type:"shixunHomeworks/getShixunWorkReport",payload:bt({},ai)}))}),Hi=[{title:"\u5173\u5361",dataIndex:"name",render:(vi,ki,er)=>er+1},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",render:(vi,ki,er)=>ji.createElement("div",null,vi,ki.complete_status===4&&ji.createElement($t.vA,{status:ki.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:vi=>vi?"\u662F":"\u5426"},{title:"\u5173\u5361\u5F97\u5206",dataIndex:"game_score",align:"center",render:(vi,ki)=>ji.createElement("div",null,ji.createElement("span",{style:{color:parseFloat(ki.game_score_full)!==parseFloat(vi)?"#E30000":"#53C41B"}},vi),"/",ki.game_score_full)},{title:"\u8C03\u5206",dataIndex:"game_score",align:"center",fixed:"right",render:(vi,ki)=>(0,Zt.GJ)()?ji.createElement($n,{max:ki.game_score_full,defaultValue:parseFloat(vi),onBlur:er=>Br(void 0,null,function*(){var lr,oe;if((0,Zt.Rm)()&&!((lr=xn.AssistantObject.practice)!=null&&lr.can_appraise)){ce.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 ae=yield An({type:"shixunHomeworks/changeScore",payload:{categoryId:ai.homeworkId,type:"report",score:er,challenge_id:ki.challenge_id}});(oe=hn==null?void 0:hn.actionTabs)==null||oe.fn(),yield An({type:"shixunHomeworks/getShixunWorkReport",payload:bt({},ai)}),ae.status===0&&ce.ZP.success("\u64CD\u4F5C\u6210\u529F")})}):vi}];return ji.createElement(ji.Fragment,null,br,ji.createElement(ue.default,{centered:!0,width:1080,title:"\u70B9\u8BC4\u4F5C\u4E1A",open:hn.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>Br(void 0,null,function*(){var vi;if((0,Zt.Rm)()&&!((vi=xn.AssistantObject.practice)!=null&&vi.can_appraise)){ce.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 ki=Ti.getFieldsValue();JSON.stringify(ki)==="{}"||ki.hidden_comment===""&&ki.comment===""?Ni(!0):Bi()}),onCancel:()=>{An({type:"shixunHomeworks/setActionTabs",payload:{}})}},ji.createElement(qt.Z,{justify:"space-between",className:mr.info},ji.createElement(Le.Z,null,ji.createElement("span",{className:`${mr.label} ${mr.greyText}`},"\u59D3\u540D"),ji.createElement("span",{className:mr.blackContent},Nn==null?void 0:Nn.username)),ji.createElement(Le.Z,null,ji.createElement("span",{className:`${mr.label} ${mr.greyText}`},"\u5B66\u53F7"),ji.createElement("span",{className:mr.blackContent},(Nn==null?void 0:Nn.student_id)||"--")),ji.createElement(Le.Z,null,ji.createElement("span",{className:`${mr.label} ${mr.greyText}`},"\u73ED\u7EA7"),ji.createElement("span",{className:mr.blackContent},(Nn==null?void 0:Nn.group_name)||"--")),ji.createElement(Le.Z,null,ji.createElement("span",{className:`${mr.label} ${mr.greyText}`},"\u5173\u5361\u5F97\u5206"),ji.createElement("span",{className:mr.orangeContent},(Nn==null?void 0:Nn.challenge_score)||"--")),ji.createElement(Le.Z,null,ji.createElement("span",{className:`${mr.label} ${mr.greyText}`},"\u6548\u7387\u5206"),ji.createElement("span",{className:mr.orangeContent},(Nn==null?void 0:Nn.eff_score)||"--")),ji.createElement(Le.Z,null,ji.createElement("span",{className:`${mr.label} ${mr.greyText}`},"\u8865\u4EA4\u6263\u5206"),ji.createElement("span",{className:mr.orangeContent},(Nn==null?void 0:Nn.late_penalty)||"--")),ji.createElement(Le.Z,null,ji.createElement("span",{className:`${mr.label} ${mr.greyText}`},"\u6700\u7EC8\u6210\u7EE9"),ji.createElement("span",{className:mr.orangeContent},(Nn==null?void 0:Nn.work_score)||"--"))),ji.createElement(Fr.default,{form:Ti,onChange:()=>{Ki&&Ni(!1)}},ji.createElement(qt.Z,{wrap:!1,align:"middle",justify:"space-between"},ji.createElement(Le.Z,null,ji.createElement("div",{className:`${mr.inputLabel} ${mr.greyText}`},"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1")),ji.createElement(Le.Z,null,ji.createElement(Yr.Z,{isShowComponent:(0,Zt.G5)(),ModalProps:{open:cr,onCancel:()=>{Kr(!1)}},onDataSelect:(vi,ki)=>Br(void 0,[vi,ki],function*(er,{node:lr}){const oe=()=>{Ti.setFieldsValue({comment:lr==null?void 0:lr.value}),Kr(!1)};if(Ti.getFieldValue("comment")){en.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:oe});return}oe()})},ji.createElement(Ut.ZP,{style:{padding:0,height:"auto"},icon:ji.createElement("i",{className:"iconfont icon-changyongpingyu"}),type:"link",onClick:vi=>{Kr(!0)}},"\u5E38\u7528\u8BC4\u8BED")))),ji.createElement(Fr.default.Item,{name:"comment"},ji.createElement(At.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:3})),ji.createElement(qt.Z,{wrap:!1,align:"middle",justify:"space-between"},ji.createElement(Le.Z,null,ji.createElement("div",{className:`${mr.inputLabel} ${mr.greyText}`},"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1")),ji.createElement(Le.Z,null,ji.createElement(Yr.Z,{isShowComponent:(0,Zt.G5)(),ModalProps:{open:Ze,onCancel:()=>{ni(!1)}},onDataSelect:(vi,ki)=>Br(void 0,[vi,ki],function*(er,{node:lr}){const oe=()=>{Ti.setFieldsValue({hidden_comment:lr==null?void 0:lr.value}),ni(!1)};if(Ti.getFieldValue("hidden_comment")){en.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:oe});return}oe()})},ji.createElement(Ut.ZP,{style:{padding:0,height:"auto"},icon:ji.createElement("i",{className:"iconfont icon-changyongpingyu"}),type:"link",onClick:vi=>{ni(!0)}},"\u5E38\u7528\u8BC4\u8BED")))),ji.createElement(Fr.default.Item,{name:"hidden_comment"},ji.createElement(At.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:3}))),Ki&&ji.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A"),ji.createElement("div",{className:mr.tableTitle},"\u5173\u5361\u6210\u7EE9"),ji.createElement(at.default,{className:mr.scoreTable,dataSource:Nn.stage_list,rowKey:"challenge_id",pagination:!1,columns:Hi,scroll:{x:"max-content"}})))};var Vr=(0,ne.connect)(({shixunHomeworks:hn,classroomList:An})=>({shixunHomeworks:hn,classroomList:An}))(Vi),Do=Ot(68971),bo=Ot(36708),$o=Ot(44164),Zi=Ot.n($o),wi={wrap:"wrap___LZOi9",line:"line___oju0L"},je=Ot(41069),Ue=({detailData:hn})=>{var An;return Pt.createElement("div",{className:wi.wrap},Pt.createElement(je.ij,{hideBar:!0,actionAnalysis:!0,loading:!1,emptyData:[(0,je.Uf)(hn),(hn==null?void 0:hn.photos)||[]],title:"\u5B9E\u8BAD\u5B66\u4E60\u5206\u6790",noDataText:"\u8BE5\u5B66\u751F\u65E0\u5B66\u4E60\u884C\u4E3A\u5206\u6790\u6570\u636E"},Pt.createElement(je.ZP,{hideBar:!0,title:"\u5B9E\u8BAD\u5B66\u4E60\u5206\u6790",data:(0,je.Uf)(hn)}),!!((An=hn==null?void 0:hn.photos)!=null&&An.length)&&Pt.createElement(Pt.Fragment,null,Pt.createElement("div",{className:wi.line}),Pt.createElement(je._s,{dataSource:hn==null?void 0:hn.photos,right:21,col:4,wrapWidth:1140}))))},fi=Ot(78297),Se=Ot(59301),_i=Object.defineProperty,Un=Object.defineProperties,Ai=Object.getOwnPropertyDescriptors,We=Object.getOwnPropertySymbols,Ke=Object.prototype.hasOwnProperty,ui=Object.prototype.propertyIsEnumerable,he=(hn,An,xn)=>An in hn?_i(hn,An,{enumerable:!0,configurable:!0,writable:!0,value:xn}):hn[An]=xn,rn=(hn,An)=>{for(var xn in An||(An={}))Ke.call(An,xn)&&he(hn,xn,An[xn]);if(We)for(var xn of We(An))ui.call(An,xn)&&he(hn,xn,An[xn]);return hn},Wn=(hn,An)=>Un(hn,Ai(An)),pi=(hn,An)=>{var xn={};for(var Nn in hn)Ke.call(hn,Nn)&&An.indexOf(Nn)<0&&(xn[Nn]=hn[Nn]);if(hn!=null&&We)for(var Nn of We(hn))An.indexOf(Nn)<0&&ui.call(hn,Nn)&&(xn[Nn]=hn[Nn]);return xn},on=(hn,An,xn)=>new Promise((Nn,ai)=>{var Ki=en=>{try{Ti(xn.next(en))}catch(br){ai(br)}},Ni=en=>{try{Ti(xn.throw(en))}catch(br){ai(br)}},Ti=en=>en.done?Nn(en.value):Promise.resolve(en.value).then(Ki,Ni);Ti((xn=xn.apply(hn,An)).next())});const yn=hn=>{var An=hn,{shixunHomeworks:xn,classroomList:Nn,globalSetting:ai,loading:Ki,user:Ni,dispatch:Ti}=An,en=pi(An,["shixunHomeworks","classroomList","globalSetting","loading","user","dispatch"]),br,cr,Kr;const[Ze,ni]=(0,Pt.useState)(rn({},(0,ne.useParams)())),Bi=(0,ne.useParams)(),[Hi,vi]=(0,Pt.useState)({page:1,page_size:10}),ki=(0,ne.useLocation)(),[]=(0,Pt.useState)([]),[er,lr]=(0,Pt.useState)(),oe=(0,Pt.useRef)(),ae=(0,Pt.useRef)(),[ee,Ye]=(0,Pt.useState)(!1),[Be,ln]=(0,Pt.useState)(!0),[Dn,Zn]=(0,Pt.useState)(!1),[Li,Mi]=(0,Pt.useState)(!1),{shixunWorkReport:Te}=xn,[yi,Me]=(0,Pt.useState)(),[an,Qe]=(0,Pt.useState)([]),[It,vn]=(0,Pt.useState)(),[pn,Qn]=(0,Pt.useState)("all"),zn=(0,Zt.GJ)(),[jn,Ge]=(0,Pt.useState)(new(de())),[fn,Fn]=(0,Pt.useState)(0),[Sn,dn]=(0,Pt.useState)(!1),[gi,Vn]=(0,Pt.useState)(!1),[qn,cn]=(0,Pt.useState)(!1),[ri,Ui]=(0,Pt.useState)(""),[nr,Ji]=(0,Pt.useState)(!1),[fr,dr]=(0,Pt.useState)(!0),[Pr,Gr]=(0,Pt.useState)(0),Tr=(0,Pt.useRef)(JSON.parse(sessionStorage.all_student_works_params||"{}")),ro=(0,Pt.useRef)(),Oe=()=>on(void 0,null,function*(){(Ni.userInfo.is_teacher||Ni.userInfo.admin)&&(Ji(!0),dr(!1))});(0,Pt.useEffect)(()=>{var Gi;(0,Zt.Rm)()&&Nn.AssistantObject.practice&&!((Gi=Nn.AssistantObject.practice)!=null&&Gi.can_view)&&ne.history.replace("/403")},[(br=Nn.AssistantObject.practice)==null?void 0:br.can_view]),(0,Pt.useEffect)(()=>{Oe(),console.log("\u6253\u5370\u7684------",Te),ro.current=Te==null?void 0:Te.next_student_work_id,Ui(Te.repeat_minus_score)},[Te,Ni]),(0,Pt.useEffect)(()=>{console.log("\u89E6\u53D1\u8FD9",Te.work_score),Gr(Te.work_score)},[Te.work_score,ri]),(0,Pt.useEffect)(()=>(Ti({type:"globalSetting/footerToggle",payload:!1}),()=>{Ti({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,Pt.useEffect)(()=>{var Gi;if(Te){let Wi=[];(Gi=Te==null?void 0:Te.target_test_sets)==null||Gi.map((ir,Kn)=>{var Ar;(Ar=ir==null?void 0:ir.targets)==null||Ar.map((kr,xo)=>{var Ts;kr.name=ir==null?void 0:ir.name,kr.total_target_score=ir==null?void 0:ir.total_target_score,kr.actual_target_score=ir==null?void 0:ir.actual_target_score,kr.rowSpan=xo===0?(Ts=ir==null?void 0:ir.targets)==null?void 0:Ts.length:0,kr.order=Kn+1,Wi.push(kr)})}),Me(Wi),(0,Zt.Rm)()&&Ti({type:"classroomList/getAssistantPermissions",payload:{course_id:Ze.coursesId}})}},[Te]),(0,Pt.useEffect)(()=>{xn.actionTabs.key==="\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"&&(Te==null?void 0:Te.students_count)>0&&!Be&&setTimeout(()=>{Nr("all")},800)},[Te==null?void 0:Te.homework_common_id,Be]),(0,Pt.useEffect)(()=>{ni(rn({},Bi))},[ki.pathname]);const gr=()=>{document.body.scrollIntoView()},Dr=Gi=>{Hi.page=Gi,vi(rn({},Hi)),tr(Hi,pn)},tr=(Gi,Wi)=>on(void 0,null,function*(){Zn(!0);const ir=yield(0,Rt.ZP)(`/api/student_works/${Ze==null?void 0:Ze.homeworkId}/adjust_review_score_histories.json`,{method:"get",params:Wn(rn({},Gi),{challenge_id:Wi=="all"?null:Wi})});(ir==null?void 0:ir.status)===0&&(Qe(ir==null?void 0:ir.list),vn(ir==null?void 0:ir.count)),Zn(!1)});function Ur(){return on(this,null,function*(){Tr.current=JSON.parse(sessionStorage.all_student_works_params||"{}")})}const or=()=>{document.querySelectorAll("canvas").forEach(Gi=>{(!Gi.clientWidth||!Gi.clientHeight)&&Gi.remove()})},vo=()=>{oe.current.offsetHeight>62e3?Mi(!1):Mi(!0)},qr=Gi=>on(void 0,null,function*(){const Wi=yield(0,bo.t1)({homeworkId:Gi||Ze.homeworkId});lr(Wi==null?void 0:Wi.data)}),Nr=Gi=>on(void 0,null,function*(){var Wi,ir,Kn,Ar;let kr=0,xo;xo=ue.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"},kr+1),"/",Gi!=="all"?1:Te==null?void 0:Te.students_count,Se.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"),maskClosable:!1,className:me.modal,onOk:()=>{}});const Ts={margin:[0,0],filename:`${Te!=null&&Te.student_id&&(Te==null?void 0:Te.student_id)!="--"?Te==null?void 0:Te.student_id:""}${Te.username}.pdf`,html2canvas:{useCORS:!0,letterRendering:!0},jsPDF:{unit:"mm",format:"a4",orientation:"landscape"}},ps=jn.folder(Te==null?void 0:Te.shixun_name);function Cr(to){return on(this,null,function*(){yield qr(to||ro.current);const oo=yield Ti({type:"shixunHomeworks/getShixunWorkReport",payload:rn({homeworkId:to||ro.current},Tr.current||{})});ro.current=oo==null?void 0:oo.next_student_work_id,gr(),kr++,setTimeout(()=>on(this,null,function*(){var ts,yo,Vo,zo;or();const ys=ps.folder(`${oo==null?void 0:oo.group_name}`).folder(`${oo!=null&&oo.student_id&&(oo==null?void 0:oo.student_id)!="--"?oo.student_id+"+":""}${oo==null?void 0:oo.username}`),Wo=document.querySelector("#export-all").children;let Fl=Zi()();for(let ao=0;ao<Wo.length;ao++)yield Fl.set(Ts).from(Wo[ao]).toContainer().toCanvas().toPdf().get("pdf").then(da=>on(this,null,function*(){ao<Wo.length-1&&(yield da.addPage())}));if(ys.file(`${oo!=null&&oo.student_id&&(oo==null?void 0:oo.student_id)!="--"?oo.student_id+"+":""}${oo==null?void 0:oo.username}.pdf`,Fl.output("blob")),((ts=oo==null?void 0:oo.shixun_detail)==null?void 0:ts.length)>0&&((Vo=(yo=oo==null?void 0:oo.shixun_detail)==null?void 0:yo.filter(ao=>{var da;return((da=ao==null?void 0:ao.game_codes)==null?void 0:da.length)>0}))==null?void 0:Vo.length)>0){const ao=ys.folder("\u4EE3\u7801\u6587\u4EF6");(zo=oo==null?void 0:oo.shixun_detail)==null||zo.map((da,_a)=>{var hl,Zo;if(((hl=da==null?void 0:da.game_codes)==null?void 0:hl.length)>0){const Ta=ao.folder(`\u7B2C${_a+1}\u5173-${da.subject}-${da.id}`);(Zo=da==null?void 0:da.game_codes)==null||Zo.map($a=>{Ta.file(`${$a.filename}.txt`,$a==null?void 0:$a.content)})}})}xo.update({content:Se.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",Se.createElement("span",{className:"c-blue"},kr),"/",oo==null?void 0:oo.students_count,Se.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3")}),kr==(oo==null?void 0:oo.students_count)?(xo.destroy(),ho()):Cr()}),2200)})}if(Gi!=="all"||(Te==null?void 0:Te.students_count)<2){or(),gr();const to=ae.current.children;let oo=Zi()();const yo=ps.folder(`${Te==null?void 0:Te.group_name}`).folder(`${Te!=null&&Te.student_id&&(Te==null?void 0:Te.student_id)!="--"?(Te==null?void 0:Te.student_id)+"+":""}${Te==null?void 0:Te.username}`);for(let Vo=0;Vo<to.length;Vo++)yield oo.set(Ts).from(to[Vo]).toContainer().toCanvas().toPdf().get("pdf").then(zo=>on(void 0,null,function*(){Vo<to.length-1&&(yield zo.addPage())}));if(Ye(!1),yo.file(`${Te!=null&&Te.student_id&&(Te==null?void 0:Te.student_id)!="--"?(Te==null?void 0:Te.student_id)+"+":""}${Te.username}.pdf`,oo.output("blob"),{base64:!1}),((Wi=Te==null?void 0:Te.shixun_detail)==null?void 0:Wi.length)>0&&((Kn=(ir=Te==null?void 0:Te.shixun_detail)==null?void 0:ir.filter(Vo=>{var zo;return((zo=Vo==null?void 0:Vo.game_codes)==null?void 0:zo.length)>0}))==null?void 0:Kn.length)>0){const Vo=yo.folder("\u4EE3\u7801\u6587\u4EF6");(Ar=Te==null?void 0:Te.shixun_detail)==null||Ar.map((zo,Io)=>{var ys,Wo;if(((ys=zo==null?void 0:zo.game_codes)==null?void 0:ys.length)>0){const Fl=Vo.folder(`\u7B2C${Io+1}\u5173-${zo.subject}-${zo.id}`);(Wo=zo==null?void 0:zo.game_codes)==null||Wo.map(ao=>{Fl.file(`${ao.filename}.txt`,ao==null?void 0:ao.content)})}})}xo.destroy(),ho();return}else Cr(Te==null?void 0:Te.first_student_work_id)}),ho=()=>{jn.generateAsync({type:"blob"}).then(function(Gi){console.log(Te,"shixunWorkReport");const Wi=document.createElement("a");Wi.href=window.URL.createObjectURL(Gi),Wi.download=(Te==null?void 0:Te.shixun_name)+".zip",document.body.appendChild(Wi);const ir=document.createEvent("MouseEvents");ir.initEvent("click",!1,!1),Wi.dispatchEvent(ir),document.body.removeChild(Wi),Ge(new(de()))}),Mi(!1)};(0,Pt.useEffect)(()=>{ks()},[Ze.homeworkId]);const ks=()=>on(void 0,null,function*(){ln(!0),yield Ti({type:"shixunHomeworks/getShixunWorkReport",payload:rn(rn({},Ze),Tr.current||{})}),qr(),(0,Zt.GJ)()&&Ur(),ln(!1)}),ls=[{title:"\u5173\u5361",dataIndex:"name",render:(Gi,Wi,ir)=>ir+1},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",render:(Gi,Wi,ir)=>Se.createElement("div",null,Gi,Wi.complete_status===4&&Se.createElement($t.vA,{status:Wi.complete_status}))},{title:"\u5F00\u542F\u65F6\u95F4",dataIndex:"open_time"},{title:"\u4EE3\u7801\u4FEE\u6539\u884C\u6570",dataIndex:"diff_code_count",render:(Gi,Wi,ir)=>Gi||"- -"},{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:Gi=>Gi?"\u662F":"\u5426"},{title:"\u7ECF\u9A8C\u503C",dataIndex:"experience",render:(Gi,Wi)=>Se.createElement("div",null,Se.createElement("span",{style:{color:parseFloat(Wi.myself_experience)!==parseFloat(Gi)?"red":"green"}},Wi.myself_experience),"/",Gi)},{title:"\u5173\u5361\u5F97\u5206",dataIndex:"game_score",render:(Gi,Wi)=>Se.createElement("div",null,Se.createElement("span",{style:{color:parseFloat(Wi.game_score_full)!==parseFloat(Gi)?"red":"green"}},Gi),"/",Wi.game_score_full)},{title:"\u8C03\u5206",dataIndex:"game_score",render:(Gi,Wi)=>zn?Se.createElement($n,{max:Wi.game_score_full,defaultValue:parseFloat(Gi),onBlur:ir=>on(void 0,null,function*(){var Kn;if((0,Zt.Rm)()&&!((Kn=Nn.AssistantObject.practice)!=null&&Kn.can_appraise)){ce.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 Ar=yield Ti({type:"shixunHomeworks/changeScore",payload:{categoryId:Ze.homeworkId,type:"report",score:ir,challenge_id:Wi.challenge_id}});tr({page:1,page_size:10},"all"),yield Ti({type:"shixunHomeworks/getShixunWorkReport",payload:rn(rn({},Ze),Tr.current||{})}),Ar.status===0&&ce.ZP.success("\u64CD\u4F5C\u6210\u529F")})}):Gi}];let la=[{title:"\u5173\u5361",dataIndex:"order",key:"order",render:(Gi,Wi,ir)=>({children:Gi,props:{rowSpan:Wi.rowSpan}})},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",key:"name",render:(Gi,Wi,ir)=>({children:Gi,props:{rowSpan:Wi.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:(Gi,Wi,ir)=>Se.createElement("div",null,Se.createElement("span",{style:{color:parseFloat(Wi.actual_test_score)!==parseFloat(Gi)?"red":"green"}},Wi.actual_test_score),"/",Gi)},{title:"\u6307\u6807\u603B\u5206",render:(Gi,Wi,ir)=>({children:Se.createElement("div",null,Se.createElement("span",{style:{color:parseFloat(Wi.actual_target_score)!==parseFloat(Gi)?"red":"green"}},Wi.actual_target_score),"/",Gi),props:{rowSpan:Wi.rowSpan}}),dataIndex:"total_target_score",key:"total_target_score"}];const Is=[{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:Gi=>Se.createElement("span",null,Gi?Ae()(Gi).format("YYYY-MM-DD HH:mm"):"--")}],sr=Gi=>{Ti({type:"shixunHomeworks/setActionTabs",payload:{key:"",type:2}}),setTimeout(()=>{Gi==="next"?ne.history.push(`/classrooms/${Ze.coursesId}/shixun_homework/${Ze.categoryId}/${Te==null?void 0:Te.next_student_work_id}/comment`):ne.history.push(`/classrooms/${Ze.coursesId}/shixun_homework/${Ze.categoryId}/${Te==null?void 0:Te.pre_student_work_id}/comment`)},200)},Eo=Gi=>{Ui(""),Gi.target.value&&(console.log("\u8FDB\u6765",Te),Gi.target.value=Gi.target.value>Te.repeat_setting_score?Te.repeat_setting_score:Gi.target.value,Ui(Gi.target.value))},os=()=>on(void 0,null,function*(){const Gi=yield(0,Rt.ZP)(`/api/student_works/${Te==null?void 0:Te.work_id}/update_repeat_score`,{method:"put",body:{score:ri}});yield Ti({type:"shixunHomeworks/getShixunWorkReport",payload:rn(rn({},Ze),Tr.current||{})}),Gi.status===0&&ce.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(Wt.Z,{loading:Ki["shixunHomeworks/getShixunWorkReport"],active:!0,avatar:{size:40},paragraph:{rows:5}},Se.createElement("div",{className:"edu-container"},Te.course_id&&Se.createElement("section",{className:"animated fadeIn"},Se.createElement("aside",{className:""},Te.category&&Se.createElement(Ne.Z,{separator:">"},Se.createElement(Ne.Z.Item,null,Se.createElement(ne.Link,{to:`/classrooms/${Te.course_id}/shixun_homework`},Te.course_name)),Se.createElement(Ne.Z.Item,null,Se.createElement(ne.Link,{to:`/classrooms/${Te.course_id}/shixun_homework/${Te.category.main?"":Te.category.category_id}`},Te.category.category_name)),Se.createElement(Ne.Z.Item,null,Se.createElement(ne.Link,{to:`/classrooms/${Te.course_id}/shixun_homework/${Te.homework_common_id}/detail${(0,Zt.dE)()?"?tabs=1":""}`},"\u4F5C\u4E1A\u8BE6\u60C5")),Se.createElement(Ne.Z.Item,null,Te.username))),Se.createElement("aside",{className:[me.title1,"mt20"].join(" ")},Se.createElement(qt.Z,{align:"middle"},Se.createElement(Le.Z,{flex:1},Se.createElement(ne.Link,{to:`/classrooms/${Te.course_id}/shixun_homework/${Te.homework_common_id}/detail`},Se.createElement(xt.Z,{className:"font16 c-black"})),Se.createElement("strong",{className:"font20 ml5"},Te==null?void 0:Te.homework_name),Se.createElement($t.VV,{temporary:!0,status:Te.homework_status})),Se.createElement(Le.Z,{className:me.title1_right},Te.view_tpi&&Se.createElement(Ut.ZP,{onClick:()=>{var Gi,Wi;(0,$t.xg)(`/tasks/${Te==null?void 0:Te.course_id}/${Te==null?void 0:Te.homework_common_id}/${(Wi=(Gi=Te==null?void 0:Te.shixun_detail)==null?void 0:Gi[0])==null?void 0:Wi.game_identifier}`)}},Se.createElement("span",{className:"iconfont icon-yijiandianping mr5"}),"\u67E5\u770B\u5B66\u5458\u5B9E\u8BAD"),(0,Zt.GJ)()&&Te.homework_end===!1&&!!Te.myshixun_id&&Se.createElement(Ut.ZP,{className:"ml10",onClick:()=>on(void 0,null,function*(){yield Ti({type:"shixunHomeworks/setActionTabs",payload:{key:"\u6253\u56DE\u91CD\u505A",selectArrs:{myshixun_identifier:Te.myshixun_identifier},homework_common_id:Bi.categoryId}})})},Se.createElement("span",{className:"iconfont icon-dahuizhongzuo3x mr5"}),"\u6253\u56DE\u91CD\u505A"),Se.createElement(Ut.ZP,{className:"ml10",onClick:()=>{var Gi;if((0,Zt.Rm)()&&!((Gi=Nn.AssistantObject.practice)!=null&&Gi.can_download)){ce.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}Nr("")},loading:ee},Se.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"),(0,Zt.GJ)()&&(Te==null?void 0:Te.students_count)>1&&Se.createElement(Ut.ZP,{className:"ml10",onClick:()=>{var Gi;if((0,Zt.Rm)()&&!((Gi=Nn.AssistantObject.practice)!=null&&Gi.can_download)){ce.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}ue.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:()=>{Nr("all")},onCancel:()=>{},cancelButtonProps:{onClick:()=>{(0,fi.jj)({categoryId:Ze.categoryId,coursesId:Ze.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:oe},Se.createElement("div",{id:"export-all",ref:ae},Se.createElement("div",{id:"export-all-1"},Se.createElement("div",{className:me.title},Se.createElement("h1",null,"\u603B\u4F53\u8BC4\u4EF7"),Se.createElement("div",null,(0,Zt.GJ)()&&Se.createElement(Ut.ZP,{className:"mr20",type:"primary",onClick:()=>{Ti({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:Te.user_id,data:rn({},Te)},fn:()=>tr({page:1,page_size:10},"all")}})}},Se.createElement(Mt.Z,null),Te.has_shixun_work_comment?"\u66F4\u6539\u70B9\u8BC4":"\u70B9\u8BC4\u4F5C\u4E1A"))),Se.createElement(et.Z,{style:{marginTop:0}}),Se.createElement(qt.Z,{className:"pl30 pr30"},Se.createElement(Le.Z,null,Se.createElement("img",{className:me.userPic,src:`${Vt.Z.IMG_SERVER}/images/${Te.image_url}`,alt:Te.username})),Se.createElement(Le.Z,null,Se.createElement("span",{className:"font16 ml40"},Te.username),Se.createElement($t.vA,{status:Te.compelete_status}),Se.createElement("ul",{className:me.userInfo},Se.createElement("li",null,"\u5B66\u53F7\uFF1A",Te.student_id||"--"),Se.createElement("li",null,"\u5206\u73ED\uFF1A",Te.group_name||"--"),Se.createElement("br",null),Se.createElement("li",null,"\u622A\u6B62\u524D\u5B8C\u6210\u5173\u5361\uFF1A",Se.createElement("span",{className:"c-red"},Te.complete_count),"/",Se.createElement("span",{className:"c-red"},Te.challenges_count)),Se.createElement("li",null,"\u6700\u65B0\u5B8C\u6210\u5173\u5361\uFF1A",Se.createElement("span",{className:"c-red"},Te.current_complete_count||"-"),"/",Se.createElement("span",{className:"c-red"},Te.challenges_count)),Se.createElement("li",null,"\u5B8C\u6210\u6548\u7387\uFF1A",Te&&Te.efficiency===null?"--":Te&&Te.efficiency),Se.createElement("li",null,"\u8BFE\u5802\u6700\u9AD8\u5B8C\u6210\u6548\u7387\uFF1A",Te&&Te.max_efficiency===null?"--":Te&&Te.max_efficiency))),Se.createElement("ul",{className:[me.listItem,"mt10"].join(" ")},Se.createElement("li",null,Se.createElement("strong",null,"\u901A\u5173\u65F6\u95F4"),Se.createElement("div",{className:"c-light-black mt20"},Te&&Te.passed_time===null||Te&&Te.passed_time==="--"?"--":Ae()(Te&&Te.passed_time).format("YYYY-MM-DD HH:mm"))),Se.createElement("li",null,Se.createElement("strong",null,"\u8BA1\u65F6\u89C4\u5219",Se.createElement("i",{onClick:Gi=>{Gi.stopPropagation(),Gi.preventDefault(),dn(!0)},style:{marginLeft:4,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),Se.createElement("div",{className:"c-light-black mt20"},Te==null?void 0:Te.human_training_time_rules)),Se.createElement("li",null,Se.createElement("strong",null,"\u5B9E\u8BAD\u603B\u8017\u65F6",Se.createElement("i",{onClick:Gi=>{Gi.stopPropagation(),Gi.preventDefault(),Vn(!0)},style:{marginLeft:4,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),Se.createElement("div",{className:"c-light-black mt20"},Te.time_consuming)),Se.createElement("li",null,Se.createElement("strong",null,"\u8BC4\u6D4B\u6B21\u6570"),Se.createElement("div",{className:"mt20"},Te.evaluate_count)),(Te==null?void 0:Te.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"},Te.challenge_score),"/",Se.createElement("span",{className:"c-light-black"},Te.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"},Te.eff_score),"/",Se.createElement("span",{className:"c-light-black"},Te.eff_score_full)))),(Te==null?void 0:Te.have_repeat)&&(Te==null?void 0:Te.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"}},Te!=null&&Te.review_rate?Se.createElement("span",{style:{background:"#0152d9",borderRadius:"6px 6px 6px 0",cursor:"pointer"},onClick:()=>{if(Te!=null&&Te.review_id&&nr)localStorage.setItem("studentDetial",window.location.pathname),ne.history.push({pathname:`/classrooms/:coursesId/shixun_homework/${Ze.categoryId}/review_detail/${Te==null?void 0:Te.review_id}`});else return}},Te.review_rate.toFixed(1),"%"):Se.createElement("span",{style:{background:"#0152d9",borderRadius:"6px 6px 6px 0"}},"- -"))),nr?Se.createElement("div",{className:"mt20"},Se.createElement(At.default,{style:{width:"45px",height:"22px"},value:ri,onChange:Gi=>{Eo(Gi)},onBlur:os,disabled:fr})," / ",Te==null?void 0:Te.repeat_setting_score):Se.createElement("div",{className:"mt20"},Te==null?void 0:Te.repeat_minus_score," / ",Te==null?void 0:Te.repeat_setting_score)),console.log("sssssssssssssssssssssss",Te==null?void 0:Te.have_repeat,Te==null?void 0:Te.repeat_minus_score),(Te==null?void 0:Te.have_repeat)&&(Te==null?void 0:Te.repeat_minus_score)===0&&Se.createElement("li",null,Se.createElement("strong",null,"\u67E5\u91CD\u6263\u5206"),Se.createElement("div",{className:"mt20"}," - -")),!(Te!=null&&Te.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,Te.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"},Pr),"/",Se.createElement("span",{className:"c-light-black"},Te.all_work_score))),Se.createElement("li",null,Se.createElement("strong",null,"\u603B\u8BC4"),Se.createElement("div",{className:"mt20"},Se.createElement("span",{className:"c-orange"},Te.overall_appraisal))))),Se.createElement(et.Z,{style:{margin:0}}),(Te.work_comment_hidden||Te.work_comment)&&Se.createElement("div",null,Se.createElement(qt.Z,{align:"middle"},Se.createElement(Le.Z,{flex:1},Se.createElement("h1",{className:me.title},"\u70B9\u8BC4\u5185\u5BB9")),Se.createElement(Le.Z,{className:"pr30"},(0,Zt.GJ)()&&Se.createElement(Ut.ZP,{onClick:()=>on(void 0,null,function*(){ue.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:Se.createElement(_t.Z,null),content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",onOk(){return on(this,null,function*(){(yield(0,bo.gZ)({comment_id:Te.comment_id,homeworkId:Ze.homeworkId})).status===0&&(ce.ZP.success("\u5220\u9664\u6210\u529F"),Ti({type:"shixunHomeworks/getShixunWorkReport",payload:rn(rn({},Ze),Tr.current||{})}))})}})})},Se.createElement(Qt.Z,null),"\u5220\u9664"))),Se.createElement(et.Z,{style:{margin:0}}),Te.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(kn.Z,{value:Te.work_comment})),Te.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(kn.Z,{value:Te.work_comment_hidden}))),(Te==null?void 0:Te.action_analysis)&&Se.createElement(Ue,{detailData:Te}),Se.createElement("div",{className:me.score},Se.createElement("h1",{className:me.title},"\u9636\u6BB5\u6210\u7EE9"),(Te==null?void 0:Te.adjust_review_score_count)>0&&(0,Zt.GJ)()&&Se.createElement("div",{style:{color:"#0152d9",cursor:"pointer"},onClick:()=>{cn(!0),tr({page:1,page_size:10},"all")}},"\u6210\u7EE9\u8C03\u5206\u8BB0\u5F55\uFF08",Te==null?void 0:Te.adjust_review_score_count,"\u6B21\uFF09")),Se.createElement("aside",{className:"pl30 pr30"},Se.createElement(at.default,{dataSource:Te.stage_list,rowKey:Gi=>Gi==null?void 0:Gi.challenge_id,pagination:!1,columns:ls})),((cr=Te==null?void 0:Te.target_test_sets)==null?void 0:cr.length)>0&&Se.createElement("div",null,Se.createElement("h1",{className:me.title},"\u6307\u6807\u6210\u7EE9"),Se.createElement("aside",{className:"pl30 pr30"},Se.createElement(at.default,{dataSource:yi,rowKey:Gi=>Gi==null?void 0:Gi.challenge_id,pagination:!1,bordered:!0,columns:la}))),(Te==null?void 0:Te.work_description)&&Se.createElement(Se.Fragment,null,Se.createElement("h1",{className:me.title},"\u4E2A\u4EBA\u603B\u7ED3"),Se.createElement("aside",{className:"pl30 pr30"},Se.createElement(kn.Z,{value:Te==null?void 0:Te.work_description}))),Se.createElement("h1",{className:me.title},"\u56FE\u5F62\u7EDF\u8BA1"),Se.createElement(Cn,{data:er}),Se.createElement("h1",{className:me.title},"\u5B9E\u8BAD\u8BE6\u60C5")),Se.createElement(Xi,{autoHeight:Li}))),(0,Zt.GJ)()&&Se.createElement("aside",{className:`${me.footerBar} ${ee?me.footerBarStatic:""}`},Se.createElement("aside",{className:"edu-container"},Se.createElement(qt.Z,{align:"middle"},Se.createElement(Le.Z,{flex:"1"},Se.createElement(ne.Link,{className:me.exitComment,to:`/classrooms/${Ze.coursesId}/shixun_homework/${Ze.categoryId}/detail`},"\u8FD4\u56DE\u5217\u8868")),Se.createElement(Le.Z,{flex:"1",className:"tr"},Se.createElement(Ut.ZP,{type:"default",disabled:!(Te!=null&&Te.pre_student_work_id),onClick:()=>sr()},"\u4E0A\u4E00\u4E2A"),Se.createElement(Ut.ZP,{type:"default",style:{marginLeft:"20px",marginRight:"20px"},disabled:!(Te!=null&&Te.next_student_work_id),onClick:()=>sr("next")},"\u4E0B\u4E00\u4E2A"),(0,Zt.GJ)()&&Se.createElement(Ut.ZP,{type:"primary",onClick:()=>on(void 0,null,function*(){Ti({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:Te.user_id,data:rn({},Te)},fn:()=>tr({page:1,page_size:10},"all")}})})},"\u70B9\u8BC4\u4F5C\u4E1A"))))))),Se.createElement(Vr,null),Se.createElement(Do.Z,null),Se.createElement(ue.default,{open:Sn,width:860,centered:!0,onCancel:()=>{dn(!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(ue.default,{open:gi,title:"\u5B9E\u8BAD\u603B\u8017\u65F6\u8BF4\u660E",centered:!0,footer:null,onCancel:()=>{Vn(!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(ue.default,{open:qn,title:"\u6210\u7EE9\u8C03\u5206\u8BB0\u5F55",centered:!0,footer:null,onCancel:()=>{Qn("all"),cn(!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(ct.default,{style:{width:300},value:pn,placeholder:"\u8BF7\u9009\u62E9\u5173\u5361",defaultValue:"all",onChange:Gi=>on(void 0,null,function*(){Qn(Gi),tr({page:1,page_size:10},Gi)})},Se.createElement(ct.default.Option,{value:"all"}," \u5168\u90E8 "),(Kr=Te==null?void 0:Te.stage_list)==null?void 0:Kr.map((Gi,Wi)=>Se.createElement(ct.default.Option,{key:Wi,value:Gi==null?void 0:Gi.challenge_id},"\u7B2C",(0,$t.EM)(Wi+1),"\u5173")))),Se.createElement("div",{className:"mt20"},Se.createElement(at.default,{dataSource:an,rowKey:Gi=>Gi==null?void 0:Gi.id,pagination:!1,columns:Is,loading:Dn})),Se.createElement("div",{className:me.footer},Se.createElement("div",null,Se.createElement("span",{style:{color:"#656F87"}},"\u5171",Se.createElement("span",{className:"c-light-primary"},It),"\u6761\u6570\u636E")),Se.createElement(pt.Z,{defaultCurrent:1,defaultPageSize:10,current:(Hi==null?void 0:Hi.page)||1,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,total:It,onChange:Dr})))))};var ii=(0,ne.connect)(({shixunHomeworks:hn,classroomList:An,loading:xn,globalSetting:Nn,user:ai})=>({shixunHomeworks:hn,classroomList:An,globalSetting:Nn,loading:xn.effects,user:ai}))(yn)},68971:function(Bn,Ve,Ot){"use strict";var Pt=Ot(62957),te=Ot(6767),Ae=Ot(99064),Ce=Ot(89070),de=Ot(24065),Rt=Ot(59301),ne=(ce,Wt,Ne)=>new Promise((qt,Le)=>{var Ut=At=>{try{et(Ne.next(At))}catch(at){Le(at)}},nt=At=>{try{et(Ne.throw(At))}catch(at){Le(at)}},et=At=>At.done?qt(At.value):Promise.resolve(At.value).then(Ut,nt);et((Ne=Ne.apply(ce,Wt)).next())});const ue=({shixunHomeworks:ce,classroomList:Wt,dispatch:Ne})=>{const qt=(0,Ce.useParams)();return Rt.createElement(Pt.default,{centered:!0,title:"\u63D0\u793A",open:ce.actionTabs.key==="\u6253\u56DE\u91CD\u505A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>ne(void 0,null,function*(){var Le,Ut,nt,et;if((0,de.Rm)()&&!((Le=Wt.AssistantObject.practice)!=null&&Le.can_redo)){te.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/${ce.actionTabs.selectArrs.myshixun_identifier}/reset_my_game.json`,{method:"GET",params:{course_id:qt.coursesId,homework_common_id:ce.actionTabs.homework_common_id}});if(At.shixun_identifier){te.ZP.success("\u64CD\u4F5C\u6210\u529F"),Ne({type:"shixunHomeworks/setActionTabs",payload:{}});const at=(nt=(Ut=At==null?void 0:At.new_works)==null?void 0:Ut.find(ct=>`${ct.homework_common_id}`===qt.categoryId))==null?void 0:nt.id;if((0,de.Rm)()&&!((et=Wt.AssistantObject.practice)!=null&&et.can_view))return;Ce.history.replace(`/classrooms/${qt.coursesId}/shixun_homework/${qt.categoryId}/${at}/comment`)}}),onCancel:()=>{Ne({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?"))};Ve.Z=(0,Ce.connect)(({shixunHomeworks:ce,classroomList:Wt})=>({shixunHomeworks:ce,classroomList:Wt}))(ue)},78297:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{AD:function(){return Cn},D9:function(){return re},Hp:function(){return _t},IM:function(){return li},Iy:function(){return Vt},KM:function(){return Pi},MJ:function(){return Qt},Ne:function(){return Pn},ON:function(){return Fi},Uj:function(){return Ee},VY:function(){return Yn},YO:function(){return oi},YX:function(){return sn},Zn:function(){return nt},_g:function(){return pt},_k:function(){return Ln},c6:function(){return $e},cr:function(){return et},eV:function(){return tn},fi:function(){return At},gh:function(){return Pe},hS:function(){return Jn},iA:function(){return at},j6:function(){return xt},je:function(){return $n},jj:function(){return Mt},kS:function(){return si},o6:function(){return me},pO:function(){return ci},rQ:function(){return Tn},sA:function(){return $t},xm:function(){return be},xo:function(){return un},y8:function(){return In},yd:function(){return ct}});var Pt=Ot(92365),te=Ot(89070),Ae=Ot(955),Ce=Ot(6767),de=Ot(3294),Rt=Object.defineProperty,ne=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable,Wt=(Ht,kt,mt)=>kt in Ht?Rt(Ht,kt,{enumerable:!0,configurable:!0,writable:!0,value:mt}):Ht[kt]=mt,Ne=(Ht,kt)=>{for(var mt in kt||(kt={}))ue.call(kt,mt)&&Wt(Ht,mt,kt[mt]);if(ne)for(var mt of ne(kt))ce.call(kt,mt)&&Wt(Ht,mt,kt[mt]);return Ht},qt=(Ht,kt,mt)=>new Promise((vt,Lt)=>{var Bt=ke=>{try{ge(mt.next(ke))}catch(Je){Lt(Je)}},Kt=ke=>{try{ge(mt.throw(ke))}catch(Je){Lt(Je)}},ge=ke=>ke.done?vt(ke.value):Promise.resolve(ke.value).then(Bt,Kt);ge((mt=mt.apply(Ht,kt)).next())});const Le=()=>{(0,te.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u751F\u6210\u6587\u4EF6\uFF0C\u8BF7\u7A0D\u540E..."}})},Ut=()=>{(0,te.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}})},nt=Ht=>qt(void 0,null,function*(){Le(),(yield(0,Pt.YR)(Ne({},Ht))).status===0&&(yield(0,Ae.QH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/courses/${Ht.coursesId}/export_couser_info.json`,query:Ht}))),Ut()}),et=Ht=>qt(void 0,null,function*(){const kt=yield(0,Pt.yS)(Ne({},Ht));if(kt.status===0)Ce.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),te.history.push(`/classrooms/${Ht.coursesId}/exportlist/course_member_act_score`);else{if(kt.status===-2)return kt;kt.status===-3&&((0,te.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),te.history.push(`/classrooms/${Ht.coursesId}/exportlist/course_member_act_score`))}}),At=Ht=>qt(void 0,null,function*(){const kt=yield(0,Pt.W0)(Ne({},Ht));if(kt.status===0)Ce.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),te.history.push(`/classrooms/${Ht.coursesId}/exportlist/course_total_score`);else{if(kt.status===-4)return kt;kt.status===-3&&((0,te.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),te.history.push(`/classrooms/${Ht.coursesId}/exportlist/course_total_score`))}}),at=Ht=>qt(void 0,null,function*(){const kt=yield(0,Pt.Nl)(Ne({},Ht));if(kt.status===0)Ce.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),te.history.push(`/classrooms/${Ht.coursesId}/exportlist/course_total_exercise_and_other`);else{if(kt.status===-4)return kt;kt.status===-3&&((0,te.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),te.history.push(`/classrooms/${Ht.coursesId}/exportlist/course_total_exercise_and_other`))}}),ct=Ht=>qt(void 0,null,function*(){const kt=yield(0,Pt.IU)(Ne({},Ht));if(kt.status===0)Ce.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),te.history.push(`/classrooms/${Ht.coursesId}/exportlist/export_star_user`);else{if(kt.status===-4)return kt;kt.status===-3&&((0,te.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),te.history.push(`/classrooms/${Ht.coursesId}/exportlist/export_star_user`))}}),pt=Ht=>qt(void 0,null,function*(){const kt=yield(0,Pt.td)(Ne({},Ht));if(kt.status===0)Ce.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),te.history.push(`/classrooms/${Ht.coursesId}/exportlist/course_total_exercise_and_other`);else{if(kt.status===-2)return kt;if(kt.status===-3)(0,te.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),te.history.push(`/classrooms/${Ht.coursesId}/exportlist/course_total_exercise_and_other`);else if(kt.status===-4)return kt}}),xt=Ht=>qt(void 0,null,function*(){const kt=yield(0,Pt.QX)(Ne({},Ht));if(kt.status===0)Ce.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),te.history.push(`/classrooms/${Ht.coursesId}/exportlist/course_total_homework`);else{if(kt.status===-4)return kt;kt.status===-3&&((0,te.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),te.history.push(`/classrooms/${Ht.coursesId}/exportlist/course_total_homework`))}}),Mt=(Ht,kt)=>qt(void 0,null,function*(){const mt=yield(0,Pt.o_)(Ne({},Ht));mt.status===0?(Ce.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"),te.history.push(`/classrooms/${Ht.coursesId}/exportlist/${kt}`)):mt.status===-3&&((0,te.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),te.history.push(`/classrooms/${Ht.coursesId}/exportlist/${kt}`))}),_t=(Ht,kt)=>qt(void 0,null,function*(){const mt=yield(0,Pt.ZL)(Ne({},Ht));mt.status===0?(Ce.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"),te.history.push(`/classrooms/${Ht.coursesId}/exportlist/${kt}`)):mt.status===-3&&((0,te.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),te.history.push(`/classrooms/${Ht.coursesId}/exportlist/${kt}`))}),Qt=(Ht,kt)=>qt(void 0,null,function*(){const mt=yield(0,Pt.vV)(Ne({},Ht));mt.status===0?(Ce.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"),te.history.push(`/classrooms/${Ht.coursesId}/exportlist/${kt}`)):mt.status===-3&&((0,te.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),te.history.push(`/classrooms/${Ht.coursesId}/exportlist/${kt}`))}),Vt=(Ht,kt)=>qt(void 0,null,function*(){const mt=yield(0,Pt.aP)(Ne({},Ht));mt.status===0?(Ce.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),te.history.push(`/classrooms/${Ht.coursesId}/exportlist/${kt}`)):mt.status===-3&&((0,te.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),te.history.push(`/classrooms/${Ht.coursesId}/exportlist/${kt}`))}),Zt=Ht=>qt(void 0,null,function*(){Le(),(yield exportCourseWorkListAppendix(Ne({},Ht))).status===0&&(yield downLoadFileIframe("",setUrlQuery({url:ENV.API_SERVER+`/api/homework_commons/${Ht.categoryId}/works_list.zip`,query:Ht}))),Ut()}),$t=Ht=>qt(void 0,null,function*(){Le(),yield(0,Ae.QH)("",de.Z.API_SERVER+`/api/polls/${Ht.categoryId}/commit_result.xlsx`),Ut()}),Pe=Ht=>qt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/courses/${Ht.coursesId}/attendances/export_xlsx_data.xlsx`,query:Ht}))}),me=Ht=>qt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/courses/${Ht.coursesId}/video_study_statics.xlsx`,query:Ht}))}),$e=Ht=>qt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/courses/${Ht.coursesId}/export_video_study.xlsx`,query:Ht}))}),tn=Ht=>qt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/courses/${Ht.coursesId}/export_course_students_info.xlsx`,query:Ht}))}),Cn=Ht=>qt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+"/api/school_manages/students.xlsx",query:Ht}))}),Tn=Ht=>qt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+"/api/item_banks/export.xlsx",query:Ht}))}),In=Ht=>qt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+"/api/competitions/region_reports.xlsx",query:Ht}))}),$n=Ht=>qt(void 0,null,function*(){const kt=yield(0,Pt.Uy)(Ne({},Ht));kt.status===0?(Ce.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),te.history.push(`/classrooms/${Ht.coursesId}/exportlist/exercise_score,export_exercise_users`)):kt.status===-3&&((0,te.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),te.history.push(`/classrooms/${Ht.coursesId}/exportlist/exercise_score,export_exercise_users`))}),Ln=Ht=>qt(void 0,null,function*(){console.log("----------","\u8C03\u7528\u4E0B\u8F7D"),yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/export_records/${Ht.id}.xlsx`,query:Ht}))}),be=Ht=>qt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+"/api/ec_major_schools/0/ec_years.xlsx",query:Ht}))}),re=Ht=>qt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/courses/${Ht==null?void 0:Ht.coursesId}/${Ht.menuKey}_statistic.xlsx?${Ht.checkedList.map(kt=>`course_group_id[]=${kt}`).join("&")}`,query:Ht}))}),Pn=Ht=>qt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/ec_years/${Ht==null?void 0:Ht.ec_year_id}/ec_training_objectives.xlsx`,query:Ht}))}),li=Ht=>qt(void 0,null,function*(){yield(0,Ae.FH)(Ht==null?void 0:Ht.name,(0,Ae.NY)({url:de.Z.API_SERVER+"/api/attachments/get_ecs_attachment.docx",query:Ht}))}),Jn=Ht=>qt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/ec_years/${Ht==null?void 0:Ht.ec_year_id}/ec_courses.xlsx`,query:Ht}))}),un=Ht=>qt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/ec_years/${Ht==null?void 0:Ht.ec_year_id}/ec_graduation_requirements.xlsx`,query:Ht}))}),Yn=Ht=>qt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+"/api/courses/rank_list.xlsx",query:Ht}))}),si=Ht=>qt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+"/api/courses/question_rank_list.xlsx",query:Ht}))}),Fi=Ht=>qt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/examination_banks/${Ht.id}.json`,query:Ht}))}),sn=Ht=>qt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/exercises/${Ht.categoryId}.json`,query:Ht}))}),oi=Ht=>qt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/polls/${Ht==null?void 0:Ht.id}/commit_result.json`,query:Ht}))}),Ee=Ht=>qt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+"/api/paths/get_task_pass.json",query:Ht}))}),ci=(Ht,kt)=>qt(void 0,null,function*(){yield(0,Ae.FH)(kt||"",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/exercises/${Ht==null?void 0:Ht.exercise_id}/consult_exercise.json`,query:Ht}))}),Pi=Ht=>qt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/competitions/${Ht==null?void 0:Ht.identifier}/competition_commit_records/member_works.xlsx`,query:Ht}))})},83312:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{U:function(){return ce}});var Pt=Ot(59301),te=Object.defineProperty,Ae=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,Rt=(Wt,Ne,qt)=>Ne in Wt?te(Wt,Ne,{enumerable:!0,configurable:!0,writable:!0,value:qt}):Wt[Ne]=qt,ne=(Wt,Ne)=>{for(var qt in Ne||(Ne={}))Ce.call(Ne,qt)&&Rt(Wt,qt,Ne[qt]);if(Ae)for(var qt of Ae(Ne))de.call(Ne,qt)&&Rt(Wt,qt,Ne[qt]);return Wt},ue=(Wt,Ne,qt)=>new Promise((Le,Ut)=>{var nt=at=>{try{At(qt.next(at))}catch(ct){Ut(ct)}},et=at=>{try{At(qt.throw(at))}catch(ct){Ut(ct)}},At=at=>at.done?Le(at.value):Promise.resolve(at.value).then(nt,et);At((qt=qt.apply(Wt,Ne)).next())});function ce(Wt,Ne){const[qt,Le]=(0,Pt.useState)(Ne),[Ut,nt]=(0,Pt.useState)(!1),[et,At]=(0,Pt.useState)();return[qt,Ut,(ct,pt=!1)=>ue(this,null,function*(){const xt=pt?Ne:ne(ne({},qt),ct);nt(!0),Le(xt);const Mt=yield Wt(xt);return nt(!1),At(Mt),Mt}),et,At]}},24768:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{AL:function(){return xt},Iy:function(){return Ne},Qv:function(){return Ut},ez:function(){return pt},jb:function(){return qt}});var Pt=Ot(32834),te=Ot.n(Pt),Ae=Ot(11690),Ce=Ot.n(Ae);let de=1;function Rt(Zt,$t){const Pe=Zt.match(/^(\s+)(?:```)/);if(Pe===null)return $t;const me=Pe[1];return $t.split(`
|
|
|
`).map($e=>{const tn=$e.match(/^\s+/);if(tn===null)return $e;const[Cn]=tn;return Cn.length>=me.length?$e.slice(me.length):$e}).join(`
|
|
|
`)}let ne=[],ue=["<ul>"];const ce=new(te()).Renderer,Wt=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Ne(){ne.length=0,ue=["<ul>"]}const qt={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function Le(Zt,$t,Pe,me){if($t>=Zt.length||Zt[$t].level<=Pe)return $t;var $e=Zt[$t];me.push("<li><a href='#"+de+$e.anchor+"'>"+$e.text+"</a>"),$t++;var tn=[];return $t=Le(Zt,$t,$e.level,tn),tn.length>0&&(me.push("<ul>"),tn.forEach(function(Cn){me.push(Cn)}),me.push("</ul>")),me.push("</li>"),$t=Le(Zt,$t,Pe,me),$t}function Ut(){return Le(ne,0,0,ue),ue.push("</ul>"),ue.join("")}const nt={heading(Zt){const $t=Wt.exec(Zt);if(de+=1,$t)return{type:"heading",raw:$t[0],depth:$t[1].length,text:$t[2]}},fences(Zt){const $t=this.rules.block.fences.exec(Zt);if($t){const Pe=$t[0];let me=Rt(Pe,$t[3]||"");const $e=$t[2]?$t[2].trim():$t[2];if(["latex","katex","math"].indexOf($e)>=0){const tn=at(),Cn=me;me=tn,ct[tn]={type:"block",expression:Cn}}return{type:"code",raw:Pe,lang:$e,text:me}}}},et=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let At=0;const at=()=>`__special_katext_id_${At++}__`;let ct={};function pt(){return ct}function xt(){At=0,ct={}}function Mt(Zt){return Zt=Zt.replace(et,($t,Pe)=>{const me=at();return ct[me]={type:"inline",expression:Pe},me}),Zt}const _t=ce.listitem;ce.listitem=function(Zt){return _t(Mt(Zt))};const Qt=ce.paragraph;ce.paragraph=function(Zt){return Qt(Mt(Zt))};const Vt=ce.tablecell;ce.tablecell=function(Zt,$t){return Vt(Mt(Zt),$t)},ce.code=function(Zt,$t,Pe){const me=($t||"").match(/\S*/)[0];return me?["latex","katex","math"].indexOf(me)>=0?`<p class='editormd-tex'>${Zt}</p>`:`<pre class="prettyprint linenums"><code class="language-${$t}">${Pe?Zt:(0,Ae.escape)(Zt,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(Pe?Zt:(0,Ae.escape)(Zt,!0))+"</code></pre>"},ce.heading=function(Zt,$t,Pe){let me=this.options.headerPrefix+Pe.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ne.push({anchor:me,level:$t,text:Zt}),"<h"+$t+' id="'+de+me+'">'+Zt+"</h"+$t+">"},te().setOptions({silent:!0,gfm:!0,pedantic:!1}),te().use({tokenizer:nt,renderer:ce}),Ve.ZP=te()},86251:function(Bn,Ve){"use strict";Ve.byteLength=ne,Ve.toByteArray=ce,Ve.fromByteArray=qt;for(var Ot=[],Pt=[],te=typeof Uint8Array!="undefined"?Uint8Array:Array,Ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ce=0,de=Ae.length;Ce<de;++Ce)Ot[Ce]=Ae[Ce],Pt[Ae.charCodeAt(Ce)]=Ce;Pt[45]=62,Pt[95]=63;function Rt(Le){var Ut=Le.length;if(Ut%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var nt=Le.indexOf("=");nt===-1&&(nt=Ut);var et=nt===Ut?0:4-nt%4;return[nt,et]}function ne(Le){var Ut=Rt(Le),nt=Ut[0],et=Ut[1];return(nt+et)*3/4-et}function ue(Le,Ut,nt){return(Ut+nt)*3/4-nt}function ce(Le){var Ut,nt=Rt(Le),et=nt[0],At=nt[1],at=new te(ue(Le,et,At)),ct=0,pt=At>0?et-4:et,xt;for(xt=0;xt<pt;xt+=4)Ut=Pt[Le.charCodeAt(xt)]<<18|Pt[Le.charCodeAt(xt+1)]<<12|Pt[Le.charCodeAt(xt+2)]<<6|Pt[Le.charCodeAt(xt+3)],at[ct++]=Ut>>16&255,at[ct++]=Ut>>8&255,at[ct++]=Ut&255;return At===2&&(Ut=Pt[Le.charCodeAt(xt)]<<2|Pt[Le.charCodeAt(xt+1)]>>4,at[ct++]=Ut&255),At===1&&(Ut=Pt[Le.charCodeAt(xt)]<<10|Pt[Le.charCodeAt(xt+1)]<<4|Pt[Le.charCodeAt(xt+2)]>>2,at[ct++]=Ut>>8&255,at[ct++]=Ut&255),at}function Wt(Le){return Ot[Le>>18&63]+Ot[Le>>12&63]+Ot[Le>>6&63]+Ot[Le&63]}function Ne(Le,Ut,nt){for(var et,At=[],at=Ut;at<nt;at+=3)et=(Le[at]<<16&16711680)+(Le[at+1]<<8&65280)+(Le[at+2]&255),At.push(Wt(et));return At.join("")}function qt(Le){for(var Ut,nt=Le.length,et=nt%3,At=[],at=16383,ct=0,pt=nt-et;ct<pt;ct+=at)At.push(Ne(Le,ct,ct+at>pt?pt:ct+at));return et===1?(Ut=Le[nt-1],At.push(Ot[Ut>>2]+Ot[Ut<<4&63]+"==")):et===2&&(Ut=(Le[nt-2]<<8)+Le[nt-1],At.push(Ot[Ut>>10]+Ot[Ut>>4&63]+Ot[Ut<<2&63]+"=")),At.join("")}},19208:function(Bn,Ve,Ot){"use strict";var Pt;var te=Ot(86251),Ae=Ot(67467),Ce=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ve.lW=ue,Pt=ct,Ve.h2=50;var de=2147483647;Pt=de,ue.TYPED_ARRAY_SUPPORT=Rt(),!ue.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(ue.prototype,"parent",{enumerable:!0,get:function(){if(ue.isBuffer(this))return this.buffer}}),Object.defineProperty(ue.prototype,"offset",{enumerable:!0,get:function(){if(ue.isBuffer(this))return this.byteOffset}});function ne(mt){if(mt>de)throw new RangeError('The value "'+mt+'" is invalid for option "size"');var vt=new Uint8Array(mt);return Object.setPrototypeOf(vt,ue.prototype),vt}function ue(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 qt(mt)}return ce(mt,vt,Lt)}ue.poolSize=8192;function ce(mt,vt,Lt){if(typeof mt=="string")return Le(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(Pi(mt,ArrayBuffer)||mt&&Pi(mt.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Pi(mt,SharedArrayBuffer)||mt&&Pi(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 Bt=mt.valueOf&&mt.valueOf();if(Bt!=null&&Bt!==mt)return ue.from(Bt,vt,Lt);var Kt=At(mt);if(Kt)return Kt;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof mt[Symbol.toPrimitive]=="function")return ue.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)}ue.from=function(mt,vt,Lt){return ce(mt,vt,Lt)},Object.setPrototypeOf(ue.prototype,Uint8Array.prototype),Object.setPrototypeOf(ue,Uint8Array);function Wt(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 Ne(mt,vt,Lt){return Wt(mt),mt<=0?ne(mt):vt!==void 0?typeof Lt=="string"?ne(mt).fill(vt,Lt):ne(mt).fill(vt):ne(mt)}ue.alloc=function(mt,vt,Lt){return Ne(mt,vt,Lt)};function qt(mt){return Wt(mt),ne(mt<0?0:at(mt)|0)}ue.allocUnsafe=function(mt){return qt(mt)},ue.allocUnsafeSlow=function(mt){return qt(mt)};function Le(mt,vt){if((typeof vt!="string"||vt==="")&&(vt="utf8"),!ue.isEncoding(vt))throw new TypeError("Unknown encoding: "+vt);var Lt=pt(mt,vt)|0,Bt=ne(Lt),Kt=Bt.write(mt,vt);return Kt!==Lt&&(Bt=Bt.slice(0,Kt)),Bt}function Ut(mt){for(var vt=mt.length<0?0:at(mt.length)|0,Lt=ne(vt),Bt=0;Bt<vt;Bt+=1)Lt[Bt]=mt[Bt]&255;return Lt}function nt(mt){if(Pi(mt,Uint8Array)){var vt=new Uint8Array(mt);return et(vt.buffer,vt.byteOffset,vt.byteLength)}return Ut(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 Bt;return vt===void 0&&Lt===void 0?Bt=new Uint8Array(mt):Lt===void 0?Bt=new Uint8Array(mt,vt):Bt=new Uint8Array(mt,vt,Lt),Object.setPrototypeOf(Bt,ue.prototype),Bt}function At(mt){if(ue.isBuffer(mt)){var vt=at(mt.length)|0,Lt=ne(vt);return Lt.length===0||mt.copy(Lt,0,0,vt),Lt}if(mt.length!==void 0)return typeof mt.length!="number"||Ht(mt.length)?ne(0):Ut(mt);if(mt.type==="Buffer"&&Array.isArray(mt.data))return Ut(mt.data)}function at(mt){if(mt>=de)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+de.toString(16)+" bytes");return mt|0}function ct(mt){return+mt!=mt&&(mt=0),ue.alloc(+mt)}ue.isBuffer=function(vt){return vt!=null&&vt._isBuffer===!0&&vt!==ue.prototype},ue.compare=function(vt,Lt){if(Pi(vt,Uint8Array)&&(vt=ue.from(vt,vt.offset,vt.byteLength)),Pi(Lt,Uint8Array)&&(Lt=ue.from(Lt,Lt.offset,Lt.byteLength)),!ue.isBuffer(vt)||!ue.isBuffer(Lt))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(vt===Lt)return 0;for(var Bt=vt.length,Kt=Lt.length,ge=0,ke=Math.min(Bt,Kt);ge<ke;++ge)if(vt[ge]!==Lt[ge]){Bt=vt[ge],Kt=Lt[ge];break}return Bt<Kt?-1:Kt<Bt?1:0},ue.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}},ue.concat=function(vt,Lt){if(!Array.isArray(vt))throw new TypeError('"list" argument must be an Array of Buffers');if(vt.length===0)return ue.alloc(0);var Bt;if(Lt===void 0)for(Lt=0,Bt=0;Bt<vt.length;++Bt)Lt+=vt[Bt].length;var Kt=ue.allocUnsafe(Lt),ge=0;for(Bt=0;Bt<vt.length;++Bt){var ke=vt[Bt];if(Pi(ke,Uint8Array))ge+ke.length>Kt.length?ue.from(ke).copy(Kt,ge):Uint8Array.prototype.set.call(Kt,ke,ge);else if(ue.isBuffer(ke))ke.copy(Kt,ge);else throw new TypeError('"list" argument must be an Array of Buffers');ge+=ke.length}return Kt};function pt(mt,vt){if(ue.isBuffer(mt))return mt.length;if(ArrayBuffer.isView(mt)||Pi(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,Bt=arguments.length>2&&arguments[2]===!0;if(!Bt&&Lt===0)return 0;for(var Kt=!1;;)switch(vt){case"ascii":case"latin1":case"binary":return Lt;case"utf8":case"utf-8":return Fi(mt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Lt*2;case"hex":return Lt>>>1;case"base64":return Ee(mt).length;default:if(Kt)return Bt?-1:Fi(mt).length;vt=(""+vt).toLowerCase(),Kt=!0}}ue.byteLength=pt;function xt(mt,vt,Lt){var Bt=!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 Ln(this,vt,Lt);case"utf8":case"utf-8":return tn(this,vt,Lt);case"ascii":return In(this,vt,Lt);case"latin1":case"binary":return $n(this,vt,Lt);case"base64":return $e(this,vt,Lt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return be(this,vt,Lt);default:if(Bt)throw new TypeError("Unknown encoding: "+mt);mt=(mt+"").toLowerCase(),Bt=!0}}ue.prototype._isBuffer=!0;function Mt(mt,vt,Lt){var Bt=mt[vt];mt[vt]=mt[Lt],mt[Lt]=Bt}ue.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)Mt(this,Lt,Lt+1);return this},ue.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)Mt(this,Lt,Lt+3),Mt(this,Lt+1,Lt+2);return this},ue.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)Mt(this,Lt,Lt+7),Mt(this,Lt+1,Lt+6),Mt(this,Lt+2,Lt+5),Mt(this,Lt+3,Lt+4);return this},ue.prototype.toString=function(){var vt=this.length;return vt===0?"":arguments.length===0?tn(this,0,vt):xt.apply(this,arguments)},ue.prototype.toLocaleString=ue.prototype.toString,ue.prototype.equals=function(vt){if(!ue.isBuffer(vt))throw new TypeError("Argument must be a Buffer");return this===vt?!0:ue.compare(this,vt)===0},ue.prototype.inspect=function(){var vt="",Lt=Ve.h2;return vt=this.toString("hex",0,Lt).replace(/(.{2})/g,"$1 ").trim(),this.length>Lt&&(vt+=" ... "),"<Buffer "+vt+">"},Ce&&(ue.prototype[Ce]=ue.prototype.inspect),ue.prototype.compare=function(vt,Lt,Bt,Kt,ge){if(Pi(vt,Uint8Array)&&(vt=ue.from(vt,vt.offset,vt.byteLength)),!ue.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),Bt===void 0&&(Bt=vt?vt.length:0),Kt===void 0&&(Kt=0),ge===void 0&&(ge=this.length),Lt<0||Bt>vt.length||Kt<0||ge>this.length)throw new RangeError("out of range index");if(Kt>=ge&&Lt>=Bt)return 0;if(Kt>=ge)return-1;if(Lt>=Bt)return 1;if(Lt>>>=0,Bt>>>=0,Kt>>>=0,ge>>>=0,this===vt)return 0;for(var ke=ge-Kt,Je=Bt-Lt,ve=Math.min(ke,Je),ze=this.slice(Kt,ge),De=vt.slice(Lt,Bt),nn=0;nn<ve;++nn)if(ze[nn]!==De[nn]){ke=ze[nn],Je=De[nn];break}return ke<Je?-1:Je<ke?1:0};function _t(mt,vt,Lt,Bt,Kt){if(mt.length===0)return-1;if(typeof Lt=="string"?(Bt=Lt,Lt=0):Lt>2147483647?Lt=2147483647:Lt<-2147483648&&(Lt=-2147483648),Lt=+Lt,Ht(Lt)&&(Lt=Kt?0:mt.length-1),Lt<0&&(Lt=mt.length+Lt),Lt>=mt.length){if(Kt)return-1;Lt=mt.length-1}else if(Lt<0)if(Kt)Lt=0;else return-1;if(typeof vt=="string"&&(vt=ue.from(vt,Bt)),ue.isBuffer(vt))return vt.length===0?-1:Qt(mt,vt,Lt,Bt,Kt);if(typeof vt=="number")return vt=vt&255,typeof Uint8Array.prototype.indexOf=="function"?Kt?Uint8Array.prototype.indexOf.call(mt,vt,Lt):Uint8Array.prototype.lastIndexOf.call(mt,vt,Lt):Qt(mt,[vt],Lt,Bt,Kt);throw new TypeError("val must be string, number or Buffer")}function Qt(mt,vt,Lt,Bt,Kt){var ge=1,ke=mt.length,Je=vt.length;if(Bt!==void 0&&(Bt=String(Bt).toLowerCase(),Bt==="ucs2"||Bt==="ucs-2"||Bt==="utf16le"||Bt==="utf-16le")){if(mt.length<2||vt.length<2)return-1;ge=2,ke/=2,Je/=2,Lt/=2}function ve(Gn,gn){return ge===1?Gn[gn]:Gn.readUInt16BE(gn*ge)}var ze;if(Kt){var De=-1;for(ze=Lt;ze<ke;ze++)if(ve(mt,ze)===ve(vt,De===-1?0:ze-De)){if(De===-1&&(De=ze),ze-De+1===Je)return De*ge}else De!==-1&&(ze-=ze-De),De=-1}else for(Lt+Je>ke&&(Lt=ke-Je),ze=Lt;ze>=0;ze--){for(var nn=!0,kn=0;kn<Je;kn++)if(ve(mt,ze+kn)!==ve(vt,kn)){nn=!1;break}if(nn)return ze}return-1}ue.prototype.includes=function(vt,Lt,Bt){return this.indexOf(vt,Lt,Bt)!==-1},ue.prototype.indexOf=function(vt,Lt,Bt){return _t(this,vt,Lt,Bt,!0)},ue.prototype.lastIndexOf=function(vt,Lt,Bt){return _t(this,vt,Lt,Bt,!1)};function Vt(mt,vt,Lt,Bt){Lt=Number(Lt)||0;var Kt=mt.length-Lt;Bt?(Bt=Number(Bt),Bt>Kt&&(Bt=Kt)):Bt=Kt;var ge=vt.length;Bt>ge/2&&(Bt=ge/2);for(var ke=0;ke<Bt;++ke){var Je=parseInt(vt.substr(ke*2,2),16);if(Ht(Je))return ke;mt[Lt+ke]=Je}return ke}function Zt(mt,vt,Lt,Bt){return ci(Fi(vt,mt.length-Lt),mt,Lt,Bt)}function $t(mt,vt,Lt,Bt){return ci(sn(vt),mt,Lt,Bt)}function Pe(mt,vt,Lt,Bt){return ci(Ee(vt),mt,Lt,Bt)}function me(mt,vt,Lt,Bt){return ci(oi(vt,mt.length-Lt),mt,Lt,Bt)}ue.prototype.write=function(vt,Lt,Bt,Kt){if(Lt===void 0)Kt="utf8",Bt=this.length,Lt=0;else if(Bt===void 0&&typeof Lt=="string")Kt=Lt,Bt=this.length,Lt=0;else if(isFinite(Lt))Lt=Lt>>>0,isFinite(Bt)?(Bt=Bt>>>0,Kt===void 0&&(Kt="utf8")):(Kt=Bt,Bt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ge=this.length-Lt;if((Bt===void 0||Bt>ge)&&(Bt=ge),vt.length>0&&(Bt<0||Lt<0)||Lt>this.length)throw new RangeError("Attempt to write outside buffer bounds");Kt||(Kt="utf8");for(var ke=!1;;)switch(Kt){case"hex":return Vt(this,vt,Lt,Bt);case"utf8":case"utf-8":return Zt(this,vt,Lt,Bt);case"ascii":case"latin1":case"binary":return $t(this,vt,Lt,Bt);case"base64":return Pe(this,vt,Lt,Bt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return me(this,vt,Lt,Bt);default:if(ke)throw new TypeError("Unknown encoding: "+Kt);Kt=(""+Kt).toLowerCase(),ke=!0}},ue.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function $e(mt,vt,Lt){return vt===0&&Lt===mt.length?te.fromByteArray(mt):te.fromByteArray(mt.slice(vt,Lt))}function tn(mt,vt,Lt){Lt=Math.min(mt.length,Lt);for(var Bt=[],Kt=vt;Kt<Lt;){var ge=mt[Kt],ke=null,Je=ge>239?4:ge>223?3:ge>191?2:1;if(Kt+Je<=Lt){var ve,ze,De,nn;switch(Je){case 1:ge<128&&(ke=ge);break;case 2:ve=mt[Kt+1],(ve&192)===128&&(nn=(ge&31)<<6|ve&63,nn>127&&(ke=nn));break;case 3:ve=mt[Kt+1],ze=mt[Kt+2],(ve&192)===128&&(ze&192)===128&&(nn=(ge&15)<<12|(ve&63)<<6|ze&63,nn>2047&&(nn<55296||nn>57343)&&(ke=nn));break;case 4:ve=mt[Kt+1],ze=mt[Kt+2],De=mt[Kt+3],(ve&192)===128&&(ze&192)===128&&(De&192)===128&&(nn=(ge&15)<<18|(ve&63)<<12|(ze&63)<<6|De&63,nn>65535&&nn<1114112&&(ke=nn))}}ke===null?(ke=65533,Je=1):ke>65535&&(ke-=65536,Bt.push(ke>>>10&1023|55296),ke=56320|ke&1023),Bt.push(ke),Kt+=Je}return Tn(Bt)}var Cn=4096;function Tn(mt){var vt=mt.length;if(vt<=Cn)return String.fromCharCode.apply(String,mt);for(var Lt="",Bt=0;Bt<vt;)Lt+=String.fromCharCode.apply(String,mt.slice(Bt,Bt+=Cn));return Lt}function In(mt,vt,Lt){var Bt="";Lt=Math.min(mt.length,Lt);for(var Kt=vt;Kt<Lt;++Kt)Bt+=String.fromCharCode(mt[Kt]&127);return Bt}function $n(mt,vt,Lt){var Bt="";Lt=Math.min(mt.length,Lt);for(var Kt=vt;Kt<Lt;++Kt)Bt+=String.fromCharCode(mt[Kt]);return Bt}function Ln(mt,vt,Lt){var Bt=mt.length;(!vt||vt<0)&&(vt=0),(!Lt||Lt<0||Lt>Bt)&&(Lt=Bt);for(var Kt="",ge=vt;ge<Lt;++ge)Kt+=kt[mt[ge]];return Kt}function be(mt,vt,Lt){for(var Bt=mt.slice(vt,Lt),Kt="",ge=0;ge<Bt.length-1;ge+=2)Kt+=String.fromCharCode(Bt[ge]+Bt[ge+1]*256);return Kt}ue.prototype.slice=function(vt,Lt){var Bt=this.length;vt=~~vt,Lt=Lt===void 0?Bt:~~Lt,vt<0?(vt+=Bt,vt<0&&(vt=0)):vt>Bt&&(vt=Bt),Lt<0?(Lt+=Bt,Lt<0&&(Lt=0)):Lt>Bt&&(Lt=Bt),Lt<vt&&(Lt=vt);var Kt=this.subarray(vt,Lt);return Object.setPrototypeOf(Kt,ue.prototype),Kt};function re(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")}ue.prototype.readUintLE=ue.prototype.readUIntLE=function(vt,Lt,Bt){vt=vt>>>0,Lt=Lt>>>0,Bt||re(vt,Lt,this.length);for(var Kt=this[vt],ge=1,ke=0;++ke<Lt&&(ge*=256);)Kt+=this[vt+ke]*ge;return Kt},ue.prototype.readUintBE=ue.prototype.readUIntBE=function(vt,Lt,Bt){vt=vt>>>0,Lt=Lt>>>0,Bt||re(vt,Lt,this.length);for(var Kt=this[vt+--Lt],ge=1;Lt>0&&(ge*=256);)Kt+=this[vt+--Lt]*ge;return Kt},ue.prototype.readUint8=ue.prototype.readUInt8=function(vt,Lt){return vt=vt>>>0,Lt||re(vt,1,this.length),this[vt]},ue.prototype.readUint16LE=ue.prototype.readUInt16LE=function(vt,Lt){return vt=vt>>>0,Lt||re(vt,2,this.length),this[vt]|this[vt+1]<<8},ue.prototype.readUint16BE=ue.prototype.readUInt16BE=function(vt,Lt){return vt=vt>>>0,Lt||re(vt,2,this.length),this[vt]<<8|this[vt+1]},ue.prototype.readUint32LE=ue.prototype.readUInt32LE=function(vt,Lt){return vt=vt>>>0,Lt||re(vt,4,this.length),(this[vt]|this[vt+1]<<8|this[vt+2]<<16)+this[vt+3]*16777216},ue.prototype.readUint32BE=ue.prototype.readUInt32BE=function(vt,Lt){return vt=vt>>>0,Lt||re(vt,4,this.length),this[vt]*16777216+(this[vt+1]<<16|this[vt+2]<<8|this[vt+3])},ue.prototype.readIntLE=function(vt,Lt,Bt){vt=vt>>>0,Lt=Lt>>>0,Bt||re(vt,Lt,this.length);for(var Kt=this[vt],ge=1,ke=0;++ke<Lt&&(ge*=256);)Kt+=this[vt+ke]*ge;return ge*=128,Kt>=ge&&(Kt-=Math.pow(2,8*Lt)),Kt},ue.prototype.readIntBE=function(vt,Lt,Bt){vt=vt>>>0,Lt=Lt>>>0,Bt||re(vt,Lt,this.length);for(var Kt=Lt,ge=1,ke=this[vt+--Kt];Kt>0&&(ge*=256);)ke+=this[vt+--Kt]*ge;return ge*=128,ke>=ge&&(ke-=Math.pow(2,8*Lt)),ke},ue.prototype.readInt8=function(vt,Lt){return vt=vt>>>0,Lt||re(vt,1,this.length),this[vt]&128?(255-this[vt]+1)*-1:this[vt]},ue.prototype.readInt16LE=function(vt,Lt){vt=vt>>>0,Lt||re(vt,2,this.length);var Bt=this[vt]|this[vt+1]<<8;return Bt&32768?Bt|4294901760:Bt},ue.prototype.readInt16BE=function(vt,Lt){vt=vt>>>0,Lt||re(vt,2,this.length);var Bt=this[vt+1]|this[vt]<<8;return Bt&32768?Bt|4294901760:Bt},ue.prototype.readInt32LE=function(vt,Lt){return vt=vt>>>0,Lt||re(vt,4,this.length),this[vt]|this[vt+1]<<8|this[vt+2]<<16|this[vt+3]<<24},ue.prototype.readInt32BE=function(vt,Lt){return vt=vt>>>0,Lt||re(vt,4,this.length),this[vt]<<24|this[vt+1]<<16|this[vt+2]<<8|this[vt+3]},ue.prototype.readFloatLE=function(vt,Lt){return vt=vt>>>0,Lt||re(vt,4,this.length),Ae.read(this,vt,!0,23,4)},ue.prototype.readFloatBE=function(vt,Lt){return vt=vt>>>0,Lt||re(vt,4,this.length),Ae.read(this,vt,!1,23,4)},ue.prototype.readDoubleLE=function(vt,Lt){return vt=vt>>>0,Lt||re(vt,8,this.length),Ae.read(this,vt,!0,52,8)},ue.prototype.readDoubleBE=function(vt,Lt){return vt=vt>>>0,Lt||re(vt,8,this.length),Ae.read(this,vt,!1,52,8)};function Pn(mt,vt,Lt,Bt,Kt,ge){if(!ue.isBuffer(mt))throw new TypeError('"buffer" argument must be a Buffer instance');if(vt>Kt||vt<ge)throw new RangeError('"value" argument is out of bounds');if(Lt+Bt>mt.length)throw new RangeError("Index out of range")}ue.prototype.writeUintLE=ue.prototype.writeUIntLE=function(vt,Lt,Bt,Kt){if(vt=+vt,Lt=Lt>>>0,Bt=Bt>>>0,!Kt){var ge=Math.pow(2,8*Bt)-1;Pn(this,vt,Lt,Bt,ge,0)}var ke=1,Je=0;for(this[Lt]=vt&255;++Je<Bt&&(ke*=256);)this[Lt+Je]=vt/ke&255;return Lt+Bt},ue.prototype.writeUintBE=ue.prototype.writeUIntBE=function(vt,Lt,Bt,Kt){if(vt=+vt,Lt=Lt>>>0,Bt=Bt>>>0,!Kt){var ge=Math.pow(2,8*Bt)-1;Pn(this,vt,Lt,Bt,ge,0)}var ke=Bt-1,Je=1;for(this[Lt+ke]=vt&255;--ke>=0&&(Je*=256);)this[Lt+ke]=vt/Je&255;return Lt+Bt},ue.prototype.writeUint8=ue.prototype.writeUInt8=function(vt,Lt,Bt){return vt=+vt,Lt=Lt>>>0,Bt||Pn(this,vt,Lt,1,255,0),this[Lt]=vt&255,Lt+1},ue.prototype.writeUint16LE=ue.prototype.writeUInt16LE=function(vt,Lt,Bt){return vt=+vt,Lt=Lt>>>0,Bt||Pn(this,vt,Lt,2,65535,0),this[Lt]=vt&255,this[Lt+1]=vt>>>8,Lt+2},ue.prototype.writeUint16BE=ue.prototype.writeUInt16BE=function(vt,Lt,Bt){return vt=+vt,Lt=Lt>>>0,Bt||Pn(this,vt,Lt,2,65535,0),this[Lt]=vt>>>8,this[Lt+1]=vt&255,Lt+2},ue.prototype.writeUint32LE=ue.prototype.writeUInt32LE=function(vt,Lt,Bt){return vt=+vt,Lt=Lt>>>0,Bt||Pn(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},ue.prototype.writeUint32BE=ue.prototype.writeUInt32BE=function(vt,Lt,Bt){return vt=+vt,Lt=Lt>>>0,Bt||Pn(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},ue.prototype.writeIntLE=function(vt,Lt,Bt,Kt){if(vt=+vt,Lt=Lt>>>0,!Kt){var ge=Math.pow(2,8*Bt-1);Pn(this,vt,Lt,Bt,ge-1,-ge)}var ke=0,Je=1,ve=0;for(this[Lt]=vt&255;++ke<Bt&&(Je*=256);)vt<0&&ve===0&&this[Lt+ke-1]!==0&&(ve=1),this[Lt+ke]=(vt/Je>>0)-ve&255;return Lt+Bt},ue.prototype.writeIntBE=function(vt,Lt,Bt,Kt){if(vt=+vt,Lt=Lt>>>0,!Kt){var ge=Math.pow(2,8*Bt-1);Pn(this,vt,Lt,Bt,ge-1,-ge)}var ke=Bt-1,Je=1,ve=0;for(this[Lt+ke]=vt&255;--ke>=0&&(Je*=256);)vt<0&&ve===0&&this[Lt+ke+1]!==0&&(ve=1),this[Lt+ke]=(vt/Je>>0)-ve&255;return Lt+Bt},ue.prototype.writeInt8=function(vt,Lt,Bt){return vt=+vt,Lt=Lt>>>0,Bt||Pn(this,vt,Lt,1,127,-128),vt<0&&(vt=255+vt+1),this[Lt]=vt&255,Lt+1},ue.prototype.writeInt16LE=function(vt,Lt,Bt){return vt=+vt,Lt=Lt>>>0,Bt||Pn(this,vt,Lt,2,32767,-32768),this[Lt]=vt&255,this[Lt+1]=vt>>>8,Lt+2},ue.prototype.writeInt16BE=function(vt,Lt,Bt){return vt=+vt,Lt=Lt>>>0,Bt||Pn(this,vt,Lt,2,32767,-32768),this[Lt]=vt>>>8,this[Lt+1]=vt&255,Lt+2},ue.prototype.writeInt32LE=function(vt,Lt,Bt){return vt=+vt,Lt=Lt>>>0,Bt||Pn(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},ue.prototype.writeInt32BE=function(vt,Lt,Bt){return vt=+vt,Lt=Lt>>>0,Bt||Pn(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 li(mt,vt,Lt,Bt,Kt,ge){if(Lt+Bt>mt.length)throw new RangeError("Index out of range");if(Lt<0)throw new RangeError("Index out of range")}function Jn(mt,vt,Lt,Bt,Kt){return vt=+vt,Lt=Lt>>>0,Kt||li(mt,vt,Lt,4,34028234663852886e22,-34028234663852886e22),Ae.write(mt,vt,Lt,Bt,23,4),Lt+4}ue.prototype.writeFloatLE=function(vt,Lt,Bt){return Jn(this,vt,Lt,!0,Bt)},ue.prototype.writeFloatBE=function(vt,Lt,Bt){return Jn(this,vt,Lt,!1,Bt)};function un(mt,vt,Lt,Bt,Kt){return vt=+vt,Lt=Lt>>>0,Kt||li(mt,vt,Lt,8,17976931348623157e292,-17976931348623157e292),Ae.write(mt,vt,Lt,Bt,52,8),Lt+8}ue.prototype.writeDoubleLE=function(vt,Lt,Bt){return un(this,vt,Lt,!0,Bt)},ue.prototype.writeDoubleBE=function(vt,Lt,Bt){return un(this,vt,Lt,!1,Bt)},ue.prototype.copy=function(vt,Lt,Bt,Kt){if(!ue.isBuffer(vt))throw new TypeError("argument should be a Buffer");if(Bt||(Bt=0),!Kt&&Kt!==0&&(Kt=this.length),Lt>=vt.length&&(Lt=vt.length),Lt||(Lt=0),Kt>0&&Kt<Bt&&(Kt=Bt),Kt===Bt||vt.length===0||this.length===0)return 0;if(Lt<0)throw new RangeError("targetStart out of bounds");if(Bt<0||Bt>=this.length)throw new RangeError("Index out of range");if(Kt<0)throw new RangeError("sourceEnd out of bounds");Kt>this.length&&(Kt=this.length),vt.length-Lt<Kt-Bt&&(Kt=vt.length-Lt+Bt);var ge=Kt-Bt;return this===vt&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(Lt,Bt,Kt):Uint8Array.prototype.set.call(vt,this.subarray(Bt,Kt),Lt),ge},ue.prototype.fill=function(vt,Lt,Bt,Kt){if(typeof vt=="string"){if(typeof Lt=="string"?(Kt=Lt,Lt=0,Bt=this.length):typeof Bt=="string"&&(Kt=Bt,Bt=this.length),Kt!==void 0&&typeof Kt!="string")throw new TypeError("encoding must be a string");if(typeof Kt=="string"&&!ue.isEncoding(Kt))throw new TypeError("Unknown encoding: "+Kt);if(vt.length===1){var ge=vt.charCodeAt(0);(Kt==="utf8"&&ge<128||Kt==="latin1")&&(vt=ge)}}else typeof vt=="number"?vt=vt&255:typeof vt=="boolean"&&(vt=Number(vt));if(Lt<0||this.length<Lt||this.length<Bt)throw new RangeError("Out of range index");if(Bt<=Lt)return this;Lt=Lt>>>0,Bt=Bt===void 0?this.length:Bt>>>0,vt||(vt=0);var ke;if(typeof vt=="number")for(ke=Lt;ke<Bt;++ke)this[ke]=vt;else{var Je=ue.isBuffer(vt)?vt:ue.from(vt,Kt),ve=Je.length;if(ve===0)throw new TypeError('The value "'+vt+'" is invalid for argument "value"');for(ke=0;ke<Bt-Lt;++ke)this[ke+Lt]=Je[ke%ve]}return this};var Yn=/[^+/0-9A-Za-z-_]/g;function si(mt){if(mt=mt.split("=")[0],mt=mt.trim().replace(Yn,""),mt.length<2)return"";for(;mt.length%4!==0;)mt=mt+"=";return mt}function Fi(mt,vt){vt=vt||1/0;for(var Lt,Bt=mt.length,Kt=null,ge=[],ke=0;ke<Bt;++ke){if(Lt=mt.charCodeAt(ke),Lt>55295&&Lt<57344){if(!Kt){if(Lt>56319){(vt-=3)>-1&&ge.push(239,191,189);continue}else if(ke+1===Bt){(vt-=3)>-1&&ge.push(239,191,189);continue}Kt=Lt;continue}if(Lt<56320){(vt-=3)>-1&&ge.push(239,191,189),Kt=Lt;continue}Lt=(Kt-55296<<10|Lt-56320)+65536}else Kt&&(vt-=3)>-1&&ge.push(239,191,189);if(Kt=null,Lt<128){if((vt-=1)<0)break;ge.push(Lt)}else if(Lt<2048){if((vt-=2)<0)break;ge.push(Lt>>6|192,Lt&63|128)}else if(Lt<65536){if((vt-=3)<0)break;ge.push(Lt>>12|224,Lt>>6&63|128,Lt&63|128)}else if(Lt<1114112){if((vt-=4)<0)break;ge.push(Lt>>18|240,Lt>>12&63|128,Lt>>6&63|128,Lt&63|128)}else throw new Error("Invalid code point")}return ge}function sn(mt){for(var vt=[],Lt=0;Lt<mt.length;++Lt)vt.push(mt.charCodeAt(Lt)&255);return vt}function oi(mt,vt){for(var Lt,Bt,Kt,ge=[],ke=0;ke<mt.length&&!((vt-=2)<0);++ke)Lt=mt.charCodeAt(ke),Bt=Lt>>8,Kt=Lt%256,ge.push(Kt),ge.push(Bt);return ge}function Ee(mt){return te.toByteArray(si(mt))}function ci(mt,vt,Lt,Bt){for(var Kt=0;Kt<Bt&&!(Kt+Lt>=vt.length||Kt>=mt.length);++Kt)vt[Kt+Lt]=mt[Kt];return Kt}function Pi(mt,vt){return mt instanceof vt||mt!=null&&mt.constructor!=null&&mt.constructor.name!=null&&mt.constructor.name===vt.name}function Ht(mt){return mt!==mt}var kt=function(){for(var mt="0123456789abcdef",vt=new Array(256),Lt=0;Lt<16;++Lt)for(var Bt=Lt*16,Kt=0;Kt<16;++Kt)vt[Bt+Kt]=mt[Lt]+mt[Kt];return vt}()},57780:function(Bn,Ve,Ot){"use strict";Ot.r(Ve),Ot.d(Ve,{clsx:function(){return te}});function Pt(Ae){var Ce,de,Rt="";if(typeof Ae=="string"||typeof Ae=="number")Rt+=Ae;else if(typeof Ae=="object")if(Array.isArray(Ae))for(Ce=0;Ce<Ae.length;Ce++)Ae[Ce]&&(de=Pt(Ae[Ce]))&&(Rt&&(Rt+=" "),Rt+=de);else for(Ce in Ae)Ae[Ce]&&(Rt&&(Rt+=" "),Rt+=Ce);return Rt}function te(){for(var Ae,Ce,de=0,Rt="";de<arguments.length;)(Ae=arguments[de++])&&(Ce=Pt(Ae))&&(Rt&&(Rt+=" "),Rt+=Ce);return Rt}Ve.default=te},99498:function(Bn,Ve,Ot){(function(Pt){Pt(Ot(89780))})(function(Pt){Pt.defineOption("placeholder","",function(ue,ce,Wt){var Ne=Wt&&Wt!=Pt.Init;if(ce&&!Ne)ue.on("blur",de),ue.on("change",Rt),ue.on("swapDoc",Rt),Pt.on(ue.getInputField(),"compositionupdate",ue.state.placeholderCompose=function(){Ce(ue)}),Rt(ue);else if(!ce&&Ne){ue.off("blur",de),ue.off("change",Rt),ue.off("swapDoc",Rt),Pt.off(ue.getInputField(),"compositionupdate",ue.state.placeholderCompose),te(ue);var qt=ue.getWrapperElement();qt.className=qt.className.replace(" CodeMirror-empty","")}ce&&!ue.hasFocus()&&de(ue)});function te(ue){ue.state.placeholder&&(ue.state.placeholder.parentNode.removeChild(ue.state.placeholder),ue.state.placeholder=null)}function Ae(ue){te(ue);var ce=ue.state.placeholder=document.createElement("pre");ce.style.cssText="height: 0; overflow: visible",ce.style.direction=ue.getOption("direction"),ce.className="CodeMirror-placeholder CodeMirror-line-like";var Wt=ue.getOption("placeholder");typeof Wt=="string"&&(Wt=document.createTextNode(Wt)),ce.appendChild(Wt),ue.display.lineSpace.insertBefore(ce,ue.display.lineSpace.firstChild)}function Ce(ue){setTimeout(function(){var ce=!1,Wt=ue.getInputField();Wt.nodeName=="TEXTAREA"?ce=!Wt.value:ue.lineCount()==1&&(ce=!/[^\u200b]/.test(Wt.querySelector(".CodeMirror-line").textContent)),ce?Ae(ue):te(ue)},20)}function de(ue){ne(ue)&&Ae(ue)}function Rt(ue){var ce=ue.getWrapperElement(),Wt=ne(ue);ce.className=ce.className.replace(" CodeMirror-empty","")+(Wt?" CodeMirror-empty":""),Wt?Ae(ue):te(ue)}function ne(ue){return ue.lineCount()===1&&ue.getLine(0)===""}})},25717:function(Bn,Ve,Ot){(function(Pt){Pt(Ot(89780))})(function(Pt){var te={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Ae=Pt.Pos;Pt.defineOption("autoCloseBrackets",!1,function(nt,et,At){At&&At!=Pt.Init&&(nt.removeKeyMap(de),nt.state.closeBrackets=null),et&&(Rt(Ce(et,"pairs")),nt.state.closeBrackets=et,nt.addKeyMap(de))});function Ce(nt,et){return et=="pairs"&&typeof nt=="string"?nt:typeof nt=="object"&&nt[et]!=null?nt[et]:te[et]}var de={Backspace:ce,Enter:Wt};function Rt(nt){for(var et=0;et<nt.length;et++){var At=nt.charAt(et),at="'"+At+"'";de[at]||(de[at]=ne(At))}}Rt(te.pairs+"`");function ne(nt){return function(et){return qt(et,nt)}}function ue(nt){var et=nt.state.closeBrackets;if(!et||et.override)return et;var At=nt.getModeAt(nt.getCursor());return At.closeBrackets||et}function ce(nt){var et=ue(nt);if(!et||nt.getOption("disableInput"))return Pt.Pass;for(var At=Ce(et,"pairs"),at=nt.listSelections(),ct=0;ct<at.length;ct++){if(!at[ct].empty())return Pt.Pass;var pt=Le(nt,at[ct].head);if(!pt||At.indexOf(pt)%2!=0)return Pt.Pass}for(var ct=at.length-1;ct>=0;ct--){var xt=at[ct].head;nt.replaceRange("",Ae(xt.line,xt.ch-1),Ae(xt.line,xt.ch+1),"+delete")}}function Wt(nt){var et=ue(nt),At=et&&Ce(et,"explode");if(!At||nt.getOption("disableInput"))return Pt.Pass;for(var at=nt.listSelections(),ct=0;ct<at.length;ct++){if(!at[ct].empty())return Pt.Pass;var pt=Le(nt,at[ct].head);if(!pt||At.indexOf(pt)%2!=0)return Pt.Pass}nt.operation(function(){var xt=nt.lineSeparator()||`
|
|
|
`;nt.replaceSelection(xt+xt,null),nt.execCommand("goCharLeft"),at=nt.listSelections();for(var Mt=0;Mt<at.length;Mt++){var _t=at[Mt].head.line;nt.indentLine(_t,null,!0),nt.indentLine(_t+1,null,!0)}})}function Ne(nt){var et=Pt.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 qt(nt,et){var At=ue(nt);if(!At||nt.getOption("disableInput"))return Pt.Pass;var at=Ce(At,"pairs"),ct=at.indexOf(et);if(ct==-1)return Pt.Pass;for(var pt=Ce(At,"closeBefore"),xt=Ce(At,"triples"),Mt=at.charAt(ct+1)==et,_t=nt.listSelections(),Qt=ct%2==0,Vt,Zt=0;Zt<_t.length;Zt++){var $t=_t[Zt],Pe=$t.head,me,$e=nt.getRange(Pe,Ae(Pe.line,Pe.ch+1));if(Qt&&!$t.empty())me="surround";else if((Mt||!Qt)&&$e==et)Mt&&Ut(nt,Pe)?me="both":xt.indexOf(et)>=0&&nt.getRange(Pe,Ae(Pe.line,Pe.ch+3))==et+et+et?me="skipThree":me="skip";else if(Mt&&Pe.ch>1&&xt.indexOf(et)>=0&&nt.getRange(Ae(Pe.line,Pe.ch-2),Pe)==et+et){if(Pe.ch>2&&/\bstring/.test(nt.getTokenTypeAt(Ae(Pe.line,Pe.ch-2))))return Pt.Pass;me="addFour"}else if(Mt){var tn=Pe.ch==0?" ":nt.getRange(Ae(Pe.line,Pe.ch-1),Pe);if(!Pt.isWordChar($e)&&tn!=et&&!Pt.isWordChar(tn))me="both";else return Pt.Pass}else if(Qt&&($e.length===0||/\s/.test($e)||pt.indexOf($e)>-1))me="both";else return Pt.Pass;if(!Vt)Vt=me;else if(Vt!=me)return Pt.Pass}var Cn=ct%2?at.charAt(ct-1):et,Tn=ct%2?et:at.charAt(ct+1);nt.operation(function(){if(Vt=="skip")nt.execCommand("goCharRight");else if(Vt=="skipThree")for(var In=0;In<3;In++)nt.execCommand("goCharRight");else if(Vt=="surround"){for(var $n=nt.getSelections(),In=0;In<$n.length;In++)$n[In]=Cn+$n[In]+Tn;nt.replaceSelections($n,"around"),$n=nt.listSelections().slice();for(var In=0;In<$n.length;In++)$n[In]=Ne($n[In]);nt.setSelections($n)}else Vt=="both"?(nt.replaceSelection(Cn+Tn,null),nt.triggerElectric(Cn+Tn),nt.execCommand("goCharLeft")):Vt=="addFour"&&(nt.replaceSelection(Cn+Cn+Cn+Cn,"before"),nt.execCommand("goCharRight"))})}function Le(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 Ut(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(Bn,Ve,Ot){(function(Pt){Pt(Ot(89780),Ot(32855))})(function(Pt){Pt.defineOption("autoCloseTags",!1,function(ce,Wt,Ne){if(Ne!=Pt.Init&&Ne&&ce.removeKeyMap("autoCloseTags"),!!Wt){var qt={name:"autoCloseTags"};(typeof Wt!="object"||Wt.whenClosing!==!1)&&(qt["'/'"]=function(Le){return Rt(Le)}),(typeof Wt!="object"||Wt.whenOpening!==!1)&&(qt["'>'"]=function(Le){return Ce(Le)}),ce.addKeyMap(qt)}});var te=["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 Ce(ce){if(ce.getOption("disableInput"))return Pt.Pass;for(var Wt=ce.listSelections(),Ne=[],qt=ce.getOption("autoCloseTags"),Le=0;Le<Wt.length;Le++){if(!Wt[Le].empty())return Pt.Pass;var Ut=Wt[Le].head,nt=ce.getTokenAt(Ut),et=Pt.innerMode(ce.getMode(),nt.state),At=et.state,at=et.mode.xmlCurrentTag&&et.mode.xmlCurrentTag(At),ct=at&&at.name;if(!ct)return Pt.Pass;var pt=et.mode.configuration=="html",xt=typeof qt=="object"&&qt.dontCloseTags||pt&&te,Mt=typeof qt=="object"&&qt.indentTags||pt&&Ae;nt.end>Ut.ch&&(ct=ct.slice(0,ct.length-nt.end+Ut.ch));var _t=ct.toLowerCase();if(!ct||nt.type=="string"&&(nt.end!=Ut.ch||!/[\"\']/.test(nt.string.charAt(nt.string.length-1))||nt.string.length==1)||nt.type=="tag"&&at.close||nt.string.indexOf("/")==Ut.ch-nt.start-1||xt&&ne(xt,_t)>-1||ue(ce,et.mode.xmlCurrentContext&&et.mode.xmlCurrentContext(At)||[],ct,Ut,!0))return Pt.Pass;var Qt=typeof qt=="object"&&qt.emptyTags;if(Qt&&ne(Qt,ct)>-1){Ne[Le]={text:"/>",newPos:Pt.Pos(Ut.line,Ut.ch+2)};continue}var Vt=Mt&&ne(Mt,_t)>-1;Ne[Le]={indent:Vt,text:">"+(Vt?`
|
|
|
|
|
|
`:"")+"</"+ct+">",newPos:Vt?Pt.Pos(Ut.line+1,0):Pt.Pos(Ut.line,Ut.ch+1)}}for(var Zt=typeof qt=="object"&&qt.dontIndentOnAutoClose,Le=Wt.length-1;Le>=0;Le--){var $t=Ne[Le];ce.replaceRange($t.text,Wt[Le].head,Wt[Le].anchor,"+insert");var Pe=ce.listSelections().slice(0);Pe[Le]={head:$t.newPos,anchor:$t.newPos},ce.setSelections(Pe),!Zt&&$t.indent&&(ce.indentLine($t.newPos.line,null,!0),ce.indentLine($t.newPos.line+1,null,!0))}}function de(ce,Wt){for(var Ne=ce.listSelections(),qt=[],Le=Wt?"/":"</",Ut=ce.getOption("autoCloseTags"),nt=typeof Ut=="object"&&Ut.dontIndentOnSlash,et=0;et<Ne.length;et++){if(!Ne[et].empty())return Pt.Pass;var At=Ne[et].head,at=ce.getTokenAt(At),ct=Pt.innerMode(ce.getMode(),at.state),pt=ct.state;if(Wt&&(at.type=="string"||at.string.charAt(0)!="<"||at.start!=At.ch-1))return Pt.Pass;var xt,Mt=ct.mode.name!="xml"&&ce.getMode().name=="htmlmixed";if(Mt&&ct.mode.name=="javascript")xt=Le+"script";else if(Mt&&ct.mode.name=="css")xt=Le+"style";else{var _t=ct.mode.xmlCurrentContext&&ct.mode.xmlCurrentContext(pt);if(!_t||_t.length&&ue(ce,_t,_t[_t.length-1],At))return Pt.Pass;xt=Le+_t[_t.length-1]}ce.getLine(At.line).charAt(at.end)!=">"&&(xt+=">"),qt[et]=xt}if(ce.replaceSelections(qt),Ne=ce.listSelections(),!nt)for(var et=0;et<Ne.length;et++)(et==Ne.length-1||Ne[et].head.line<Ne[et+1].head.line)&&ce.indentLine(Ne[et].head.line)}function Rt(ce){return ce.getOption("disableInput")?Pt.Pass:de(ce,!0)}Pt.commands.closeTag=function(ce){return de(ce)};function ne(ce,Wt){if(ce.indexOf)return ce.indexOf(Wt);for(var Ne=0,qt=ce.length;Ne<qt;++Ne)if(ce[Ne]==Wt)return Ne;return-1}function ue(ce,Wt,Ne,qt,Le){if(!Pt.scanForClosingTag)return!1;var Ut=Math.min(ce.lastLine()+1,qt.line+500),nt=Pt.scanForClosingTag(ce,qt,null,Ut);if(!nt||nt.tag!=Ne)return!1;for(var et=Le?1:0,At=Wt.length-1;At>=0&&Wt[At]==Ne;At--)++et;qt=nt.to;for(var At=1;At<et;At++){var at=Pt.scanForClosingTag(ce,qt,null,Ut);if(!at||at.tag!=Ne)return!1;qt=at.to}return!0}})},32855:function(Bn,Ve,Ot){(function(Pt){Pt(Ot(89780))})(function(Pt){"use strict";var te=Pt.Pos;function Ae(At,at){return At.line-at.line||At.ch-at.ch}var Ce="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",de=Ce+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Rt=new RegExp("<(/?)(["+Ce+"]["+de+"]*)","g");function ne(At,at,ct,pt){this.line=at,this.ch=ct,this.cm=At,this.text=At.getLine(at),this.min=pt?Math.max(pt.from,At.firstLine()):At.firstLine(),this.max=pt?Math.min(pt.to-1,At.lastLine()):At.lastLine()}function ue(At,at){var ct=At.cm.getTokenTypeAt(te(At.line,at));return ct&&/\btag\b/.test(ct)}function ce(At){if(!(At.line>=At.max))return At.ch=0,At.text=At.cm.getLine(++At.line),!0}function Wt(At){if(!(At.line<=At.min))return At.text=At.cm.getLine(--At.line),At.ch=At.text.length,!0}function Ne(At){for(;;){var at=At.text.indexOf(">",At.ch);if(at==-1){if(ce(At))continue;return}if(!ue(At,at+1)){At.ch=at+1;continue}var ct=At.text.lastIndexOf("/",at),pt=ct>-1&&!/\S/.test(At.text.slice(ct+1,at));return At.ch=at+1,pt?"selfClose":"regular"}}function qt(At){for(;;){var at=At.ch?At.text.lastIndexOf("<",At.ch-1):-1;if(at==-1){if(Wt(At))continue;return}if(!ue(At,at+1)){At.ch=at;continue}Rt.lastIndex=at,At.ch=at;var ct=Rt.exec(At.text);if(ct&&ct.index==at)return ct}}function Le(At){for(;;){Rt.lastIndex=At.ch;var at=Rt.exec(At.text);if(!at){if(ce(At))continue;return}if(!ue(At,at.index+1)){At.ch=at.index+1;continue}return At.ch=at.index+at[0].length,at}}function Ut(At){for(;;){var at=At.ch?At.text.lastIndexOf(">",At.ch-1):-1;if(at==-1){if(Wt(At))continue;return}if(!ue(At,at+1)){At.ch=at;continue}var ct=At.text.lastIndexOf("/",at),pt=ct>-1&&!/\S/.test(At.text.slice(ct+1,at));return At.ch=at+1,pt?"selfClose":"regular"}}function nt(At,at){for(var ct=[];;){var pt=Le(At),xt,Mt=At.line,_t=At.ch-(pt?pt[0].length:0);if(!pt||!(xt=Ne(At)))return;if(xt!="selfClose")if(pt[1]){for(var Qt=ct.length-1;Qt>=0;--Qt)if(ct[Qt]==pt[2]){ct.length=Qt;break}if(Qt<0&&(!at||at==pt[2]))return{tag:pt[2],from:te(Mt,_t),to:te(At.line,At.ch)}}else ct.push(pt[2])}}function et(At,at){for(var ct=[];;){var pt=Ut(At);if(!pt)return;if(pt=="selfClose"){qt(At);continue}var xt=At.line,Mt=At.ch,_t=qt(At);if(!_t)return;if(_t[1])ct.push(_t[2]);else{for(var Qt=ct.length-1;Qt>=0;--Qt)if(ct[Qt]==_t[2]){ct.length=Qt;break}if(Qt<0&&(!at||at==_t[2]))return{tag:_t[2],from:te(At.line,At.ch),to:te(xt,Mt)}}}}Pt.registerHelper("fold","xml",function(At,at){for(var ct=new ne(At,at.line,0);;){var pt=Le(ct);if(!pt||ct.line!=at.line)return;var xt=Ne(ct);if(!xt)return;if(!pt[1]&&xt!="selfClose"){var Mt=te(ct.line,ct.ch),_t=nt(ct,pt[2]);return _t&&Ae(_t.from,Mt)>0?{from:Mt,to:_t.from}:null}}}),Pt.findMatchingTag=function(At,at,ct){var pt=new ne(At,at.line,at.ch,ct);if(!(pt.text.indexOf(">")==-1&&pt.text.indexOf("<")==-1)){var xt=Ne(pt),Mt=xt&&te(pt.line,pt.ch),_t=xt&&qt(pt);if(!(!xt||!_t||Ae(pt,at)>0)){var Qt={from:te(pt.line,pt.ch),to:Mt,tag:_t[2]};return xt=="selfClose"?{open:Qt,close:null,at:"open"}:_t[1]?{open:et(pt,_t[2]),close:Qt,at:"close"}:(pt=new ne(At,Mt.line,Mt.ch,ct),{open:Qt,close:nt(pt,_t[2]),at:"open"})}}},Pt.findEnclosingTag=function(At,at,ct,pt){for(var xt=new ne(At,at.line,at.ch,ct);;){var Mt=et(xt,pt);if(!Mt)break;var _t=new ne(At,at.line,at.ch,ct),Qt=nt(_t,Mt.tag);if(Qt)return{open:Mt,close:Qt}}},Pt.scanForClosingTag=function(At,at,ct,pt){var xt=new ne(At,at.line,at.ch,pt?{from:0,to:pt}:null);return nt(xt,ct)}})},89780:function(Bn){(function(Ve,Ot){Bn.exports=Ot()})(this,function(){"use strict";var Ve=navigator.userAgent,Ot=navigator.platform,Pt=/gecko\/\d/i.test(Ve),te=/MSIE \d/.test(Ve),Ae=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ve),Ce=/Edge\/(\d+)/.exec(Ve),de=te||Ae||Ce,Rt=de&&(te?document.documentMode||6:+(Ce||Ae)[1]),ne=!Ce&&/WebKit\//.test(Ve),ue=ne&&/Qt\/\d+\.\d+/.test(Ve),ce=!Ce&&/Chrome\//.test(Ve),Wt=/Opera\//.test(Ve),Ne=/Apple Computer/.test(navigator.vendor),qt=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Ve),Le=/PhantomJS/.test(Ve),Ut=!Ce&&/AppleWebKit/.test(Ve)&&/Mobile\/\w+/.test(Ve),nt=/Android/.test(Ve),et=Ut||nt||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Ve),At=Ut||/Mac/.test(Ot),at=/\bCrOS\b/.test(Ve),ct=/win/i.test(Ot),pt=Wt&&Ve.match(/Version\/(\d*\.\d*)/);pt&&(pt=Number(pt[1])),pt&&pt>=15&&(Wt=!1,ne=!0);var xt=At&&(ue||Wt&&(pt==null||pt<12.11)),Mt=Pt||de&&Rt>=9;function _t(it){return new RegExp("(^|\\s)"+it+"(?:$|\\s)\\s*")}var Qt=function(it,st){var dt=it.className,ht=_t(st).exec(dt);if(ht){var gt=dt.slice(ht.index+ht[0].length);it.className=dt.slice(0,ht.index)+(gt?ht[1]+gt:"")}};function Vt(it){for(var st=it.childNodes.length;st>0;--st)it.removeChild(it.firstChild);return it}function Zt(it,st){return Vt(it).appendChild(st)}function $t(it,st,dt,ht){var gt=document.createElement(it);if(dt&&(gt.className=dt),ht&&(gt.style.cssText=ht),typeof st=="string")gt.appendChild(document.createTextNode(st));else if(st)for(var Nt=0;Nt<st.length;++Nt)gt.appendChild(st[Nt]);return gt}function Pe(it,st,dt,ht){var gt=$t(it,st,dt,ht);return gt.setAttribute("role","presentation"),gt}var me;document.createRange?me=function(it,st,dt,ht){var gt=document.createRange();return gt.setEnd(ht||it,dt),gt.setStart(it,st),gt}:me=function(it,st,dt){var ht=document.body.createTextRange();try{ht.moveToElementText(it.parentNode)}catch(gt){return ht}return ht.collapse(!0),ht.moveEnd("character",dt),ht.moveStart("character",st),ht};function $e(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 tn(){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 Cn(it,st){var dt=it.className;_t(st).test(dt)||(it.className+=(dt?" ":"")+st)}function Tn(it,st){for(var dt=it.split(" "),ht=0;ht<dt.length;ht++)dt[ht]&&!_t(dt[ht]).test(st)&&(st+=" "+dt[ht]);return st}var In=function(it){it.select()};Ut?In=function(it){it.selectionStart=0,it.selectionEnd=it.value.length}:de&&(In=function(it){try{it.select()}catch(st){}});function $n(it){var st=Array.prototype.slice.call(arguments,1);return function(){return it.apply(null,st)}}function Ln(it,st,dt){st||(st={});for(var ht in it)it.hasOwnProperty(ht)&&(dt!==!1||!st.hasOwnProperty(ht))&&(st[ht]=it[ht]);return st}function be(it,st,dt,ht,gt){st==null&&(st=it.search(/[^\s\u00a0]/),st==-1&&(st=it.length));for(var Nt=ht||0,Gt=gt||0;;){var Jt=it.indexOf(" ",Nt);if(Jt<0||Jt>=st)return Gt+(st-Nt);Gt+=Jt-Nt,Gt+=dt-Gt%dt,Nt=Jt+1}}var re=function(){this.id=null,this.f=null,this.time=0,this.handler=$n(this.onTimeout,this)};re.prototype.onTimeout=function(it){it.id=0,it.time<=+new Date?it.f():setTimeout(it.handler,it.time-+new Date)},re.prototype.set=function(it,st){this.f=st;var dt=+new Date+it;(!this.id||dt<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,it),this.time=dt)};function Pn(it,st){for(var dt=0;dt<it.length;++dt)if(it[dt]==st)return dt;return-1}var li=50,Jn={toString:function(){return"CodeMirror.Pass"}},un={scroll:!1},Yn={origin:"*mouse"},si={origin:"+move"};function Fi(it,st,dt){for(var ht=0,gt=0;;){var Nt=it.indexOf(" ",ht);Nt==-1&&(Nt=it.length);var Gt=Nt-ht;if(Nt==it.length||gt+Gt>=st)return ht+Math.min(Gt,st-gt);if(gt+=Nt-ht,gt+=dt-gt%dt,ht=Nt+1,gt>=st)return ht}}var sn=[""];function oi(it){for(;sn.length<=it;)sn.push(Ee(sn)+" ");return sn[it]}function Ee(it){return it[it.length-1]}function ci(it,st){for(var dt=[],ht=0;ht<it.length;ht++)dt[ht]=st(it[ht],ht);return dt}function Pi(it,st,dt){for(var ht=0,gt=dt(st);ht<it.length&&dt(it[ht])<=gt;)ht++;it.splice(ht,0,st)}function Ht(){}function kt(it,st){var dt;return Object.create?dt=Object.create(it):(Ht.prototype=it,dt=new Ht),st&&Ln(st,dt),dt}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 Bt(it){for(var st in it)if(it.hasOwnProperty(st)&&it[st])return!1;return!0}var Kt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ge(it){return it.charCodeAt(0)>=768&&Kt.test(it)}function ke(it,st,dt){for(;(dt<0?st>0:st<it.length)&&ge(it.charAt(st));)st+=dt;return st}function Je(it,st,dt){for(var ht=st>dt?-1:1;;){if(st==dt)return st;var gt=(st+dt)/2,Nt=ht<0?Math.ceil(gt):Math.floor(gt);if(Nt==st)return it(Nt)?st:dt;it(Nt)?dt=Nt:st=Nt+ht}}function ve(it,st,dt,ht){if(!it)return ht(st,dt,"ltr",0);for(var gt=!1,Nt=0;Nt<it.length;++Nt){var Gt=it[Nt];(Gt.from<dt&&Gt.to>st||st==dt&&Gt.to==st)&&(ht(Math.max(Gt.from,st),Math.min(Gt.to,dt),Gt.level==1?"rtl":"ltr",Nt),gt=!0)}gt||ht(st,dt,"ltr")}var ze=null;function De(it,st,dt){var ht;ze=null;for(var gt=0;gt<it.length;++gt){var Nt=it[gt];if(Nt.from<st&&Nt.to>st)return gt;Nt.to==st&&(Nt.from!=Nt.to&&dt=="before"?ht=gt:ze=gt),Nt.from==st&&(Nt.from!=Nt.to&&dt!="before"?ht=gt:ze=gt)}return ht!=null?ht:ze}var nn=function(){var it="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",st="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function dt(pe){return pe<=247?it.charAt(pe):1424<=pe&&pe<=1524?"R":1536<=pe&&pe<=1785?st.charAt(pe-1536):1774<=pe&&pe<=2220?"r":8192<=pe&&pe<=8203?"w":pe==8204?"b":"L"}var ht=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,gt=/[stwN]/,Nt=/[LRr]/,Gt=/[Lb1n]/,Jt=/[1n]/;function Yt(pe,qe,we){this.level=pe,this.from=qe,this.to=we}return function(pe,qe){var we=qe=="ltr"?"L":"R";if(pe.length==0||qe=="ltr"&&!ht.test(pe))return!1;for(var Mn=pe.length,wn=[],Si=0;Si<Mn;++Si)wn.push(dt(pe.charCodeAt(Si)));for(var bi=0,zi=we;bi<Mn;++bi){var rr=wn[bi];rr=="m"?wn[bi]=zi:zi=rr}for(var Lr=0,xr=we;Lr<Mn;++Lr){var Qr=wn[Lr];Qr=="1"&&xr=="r"?wn[Lr]="n":Nt.test(Qr)&&(xr=Qr,Qr=="r"&&(wn[Lr]="R"))}for(var lo=1,wr=wn[0];lo<Mn-1;++lo){var Mo=wn[lo];Mo=="+"&&wr=="1"&&wn[lo+1]=="1"?wn[lo]="1":Mo==","&&wr==wn[lo+1]&&(wr=="1"||wr=="n")&&(wn[lo]=wr),wr=Mo}for(var Hs=0;Hs<Mn;++Hs){var Sa=wn[Hs];if(Sa==",")wn[Hs]="N";else if(Sa=="%"){var Ws=void 0;for(Ws=Hs+1;Ws<Mn&&wn[Ws]=="%";++Ws);for(var ml=Hs&&wn[Hs-1]=="!"||Ws<Mn&&wn[Ws]=="1"?"1":"N",ba=Hs;ba<Ws;++ba)wn[ba]=ml;Hs=Ws-1}}for(var ma=0,ol=we;ma<Mn;++ma){var Ia=wn[ma];ol=="L"&&Ia=="1"?wn[ma]="L":Nt.test(Ia)&&(ol=Ia)}for(var vr=0;vr<Mn;++vr)if(gt.test(wn[vr])){var jo=void 0;for(jo=vr+1;jo<Mn&>.test(wn[jo]);++jo);for(var Rs=(vr?wn[vr-1]:we)=="L",bs=(jo<Mn?wn[jo]:we)=="L",Ua=Rs==bs?Rs?"L":"R":we,Xo=vr;Xo<jo;++Xo)wn[Xo]=Ua;vr=jo-1}for(var Co=[],vl,ta=0;ta<Mn;)if(Gt.test(wn[ta])){var XA=ta;for(++ta;ta<Mn&&Gt.test(wn[ta]);++ta);Co.push(new Yt(0,XA,ta))}else{var zl=ta,Ga=Co.length,yl=qe=="rtl"?1:0;for(++ta;ta<Mn&&wn[ta]!="L";++ta);for(var Ps=zl;Ps<ta;)if(Jt.test(wn[Ps])){zl<Ps&&(Co.splice(Ga,0,new Yt(1,zl,Ps)),Ga+=yl);var Ba=Ps;for(++Ps;Ps<ta&&Jt.test(wn[Ps]);++Ps);Co.splice(Ga,0,new Yt(2,Ba,Ps)),Ga+=yl,zl=Ps}else++Ps;zl<ta&&Co.splice(Ga,0,new Yt(1,zl,ta))}return qe=="ltr"&&(Co[0].level==1&&(vl=pe.match(/^\s+/))&&(Co[0].from=vl[0].length,Co.unshift(new Yt(0,0,vl[0].length))),Ee(Co).level==1&&(vl=pe.match(/\s+$/))&&(Ee(Co).to-=vl[0].length,Co.push(new Yt(0,Mn-vl[0].length,Mn)))),qe=="rtl"?Co.reverse():Co}}();function kn(it,st){var dt=it.order;return dt==null&&(dt=it.order=nn(it.text,st)),dt}var Gn=[],gn=function(it,st,dt){if(it.addEventListener)it.addEventListener(st,dt,!1);else if(it.attachEvent)it.attachEvent("on"+st,dt);else{var ht=it._handlers||(it._handlers={});ht[st]=(ht[st]||Gn).concat(dt)}};function Ri(it,st){return it._handlers&&it._handlers[st]||Gn}function di(it,st,dt){if(it.removeEventListener)it.removeEventListener(st,dt,!1);else if(it.detachEvent)it.detachEvent("on"+st,dt);else{var ht=it._handlers,gt=ht&&ht[st];if(gt){var Nt=Pn(gt,dt);Nt>-1&&(ht[st]=gt.slice(0,Nt).concat(gt.slice(Nt+1)))}}}function xi(it,st){var dt=Ri(it,st);if(dt.length)for(var ht=Array.prototype.slice.call(arguments,2),gt=0;gt<dt.length;++gt)dt[gt].apply(null,ht)}function Ei(it,st,dt){return typeof st=="string"&&(st={type:st,preventDefault:function(){this.defaultPrevented=!0}}),xi(it,dt||st.type,it,st),Xi(st)||st.codemirrorIgnore}function ar(it){var st=it._handlers&&it._handlers.cursorActivity;if(st)for(var dt=it.curOp.cursorActivityHandlers||(it.curOp.cursorActivityHandlers=[]),ht=0;ht<st.length;++ht)Pn(dt,st[ht])==-1&&dt.push(st[ht])}function Qi(it,st){return Ri(it,st).length>0}function Oi(it){it.prototype.on=function(st,dt){gn(this,st,dt)},it.prototype.off=function(st,dt){di(this,st,dt)}}function Yi(it){it.preventDefault?it.preventDefault():it.returnValue=!1}function Hr(it){it.stopPropagation?it.stopPropagation():it.cancelBubble=!0}function Xi(it){return it.defaultPrevented!=null?it.defaultPrevented:it.returnValue==!1}function Fr(it){Yi(it),Hr(it)}function mr(it){return it.target||it.srcElement}function Yr(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 ji=function(){if(de&&Rt<9)return!1;var it=$t("div");return"draggable"in it||"dragDrop"in it}(),co;function fo(it){if(co==null){var st=$t("span","\u200B");Zt(it,$t("span",[st,document.createTextNode("x")])),it.firstChild.offsetHeight!=0&&(co=st.offsetWidth<=1&&st.offsetHeight>2&&!(de&&Rt<8))}var dt=co?$t("span","\u200B"):$t("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return dt.setAttribute("cm-text",""),dt}var Xr;function Er(it){if(Xr!=null)return Xr;var st=Zt(it,document.createTextNode("A\u062EA")),dt=me(st,0,1).getBoundingClientRect(),ht=me(st,1,2).getBoundingClientRect();return Vt(it),!dt||dt.left==dt.right?!1:Xr=ht.right-dt.right<3}var Zr=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(it){for(var st=0,dt=[],ht=it.length;st<=ht;){var gt=it.indexOf(`
|
|
|
`,st);gt==-1&&(gt=it.length);var Nt=it.slice(st,it.charAt(gt-1)=="\r"?gt-1:gt),Gt=Nt.indexOf("\r");Gt!=-1?(dt.push(Nt.slice(0,Gt)),st+=Gt+1):(dt.push(Nt),st=gt+1)}return dt}:function(it){return it.split(/\r\n?|\n/)},bt=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(dt){}return!st||st.parentElement()!=it?!1:st.compareEndPoints("StartToEnd",st)!=0},Br=function(){var it=$t("div");return"oncopy"in it?!0:(it.setAttribute("oncopy","return;"),typeof it.oncopy=="function")}(),Vi=null;function Vr(it){if(Vi!=null)return Vi;var st=Zt(it,$t("span","x")),dt=st.getBoundingClientRect(),ht=me(st,0,1).getBoundingClientRect();return Vi=Math.abs(dt.left-ht.left)>1}var Do={},bo={};function $o(it,st){arguments.length>2&&(st.dependencies=Array.prototype.slice.call(arguments,2)),Do[it]=st}function Zi(it,st){bo[it]=st}function wi(it){if(typeof it=="string"&&bo.hasOwnProperty(it))it=bo[it];else if(it&&typeof it.name=="string"&&bo.hasOwnProperty(it.name)){var st=bo[it.name];typeof st=="string"&&(st={name:st}),it=kt(st,it),it.name=st.name}else{if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(it))return wi("application/xml");if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(it))return wi("application/json")}return typeof it=="string"?{name:it}:it||{name:"null"}}function je(it,st){st=wi(st);var dt=Do[st.name];if(!dt)return je(it,"text/plain");var ht=dt(it,st);if(He.hasOwnProperty(st.name)){var gt=He[st.name];for(var Nt in gt)gt.hasOwnProperty(Nt)&&(ht.hasOwnProperty(Nt)&&(ht["_"+Nt]=ht[Nt]),ht[Nt]=gt[Nt])}if(ht.name=st.name,st.helperType&&(ht.helperType=st.helperType),st.modeProps)for(var Gt in st.modeProps)ht[Gt]=st.modeProps[Gt];return ht}var He={};function Ue(it,st){var dt=He.hasOwnProperty(it)?He[it]:He[it]={};Ln(st,dt)}function fi(it,st){if(st===!0)return st;if(it.copyState)return it.copyState(st);var dt={};for(var ht in st){var gt=st[ht];gt instanceof Array&&(gt=gt.concat([])),dt[ht]=gt}return dt}function Se(it,st){for(var dt;it.innerMode&&(dt=it.innerMode(st),!(!dt||dt.mode==it));)st=dt.state,it=dt.mode;return dt||{mode:it,state:st}}function _i(it,st,dt){return it.startState?it.startState(st,dt):!0}var Un=function(it,st,dt){this.pos=this.start=0,this.string=it,this.tabSize=st||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=dt};Un.prototype.eol=function(){return this.pos>=this.string.length},Un.prototype.sol=function(){return this.pos==this.lineStart},Un.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Un.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Un.prototype.eat=function(it){var st=this.string.charAt(this.pos),dt;if(typeof it=="string"?dt=st==it:dt=st&&(it.test?it.test(st):it(st)),dt)return++this.pos,st},Un.prototype.eatWhile=function(it){for(var st=this.pos;this.eat(it););return this.pos>st},Un.prototype.eatSpace=function(){for(var it=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>it},Un.prototype.skipToEnd=function(){this.pos=this.string.length},Un.prototype.skipTo=function(it){var st=this.string.indexOf(it,this.pos);if(st>-1)return this.pos=st,!0},Un.prototype.backUp=function(it){this.pos-=it},Un.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=be(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?be(this.string,this.lineStart,this.tabSize):0)},Un.prototype.indentation=function(){return be(this.string,null,this.tabSize)-(this.lineStart?be(this.string,this.lineStart,this.tabSize):0)},Un.prototype.match=function(it,st,dt){if(typeof it=="string"){var ht=function(Gt){return dt?Gt.toLowerCase():Gt},gt=this.string.substr(this.pos,it.length);if(ht(gt)==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)}},Un.prototype.current=function(){return this.string.slice(this.start,this.pos)},Un.prototype.hideFirstChars=function(it,st){this.lineStart+=it;try{return st()}finally{this.lineStart-=it}},Un.prototype.lookAhead=function(it){var st=this.lineOracle;return st&&st.lookAhead(it)},Un.prototype.baseToken=function(){var it=this.lineOracle;return it&&it.baseToken(this.pos)};function Ai(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 dt=it;!dt.lines;)for(var ht=0;;++ht){var gt=dt.children[ht],Nt=gt.chunkSize();if(st<Nt){dt=gt;break}st-=Nt}return dt.lines[st]}function We(it,st,dt){var ht=[],gt=st.line;return it.iter(st.line,dt.line+1,function(Nt){var Gt=Nt.text;gt==dt.line&&(Gt=Gt.slice(0,dt.ch)),gt==st.line&&(Gt=Gt.slice(st.ch)),ht.push(Gt),++gt}),ht}function Ke(it,st,dt){var ht=[];return it.iter(st,dt,function(gt){ht.push(gt.text)}),ht}function ui(it,st){var dt=st-it.height;if(dt)for(var ht=it;ht;ht=ht.parent)ht.height+=dt}function he(it){if(it.parent==null)return null;for(var st=it.parent,dt=Pn(st.lines,it),ht=st.parent;ht;st=ht,ht=ht.parent)for(var gt=0;ht.children[gt]!=st;++gt)dt+=ht.children[gt].chunkSize();return dt+st.first}function rn(it,st){var dt=it.first;t:do{for(var ht=0;ht<it.children.length;++ht){var gt=it.children[ht],Nt=gt.height;if(st<Nt){it=gt;continue t}st-=Nt,dt+=gt.chunkSize()}return dt}while(!it.lines);for(var Gt=0;Gt<it.lines.length;++Gt){var Jt=it.lines[Gt],Yt=Jt.height;if(st<Yt)break;st-=Yt}return dt+Gt}function Wn(it,st){return st>=it.first&&st<it.first+it.size}function pi(it,st){return String(it.lineNumberFormatter(st+it.firstLineNumber))}function on(it,st,dt){if(dt===void 0&&(dt=null),!(this instanceof on))return new on(it,st,dt);this.line=it,this.ch=st,this.sticky=dt}function yn(it,st){return it.line-st.line||it.ch-st.ch}function ii(it,st){return it.sticky==st.sticky&&yn(it,st)==0}function hn(it){return on(it.line,it.ch)}function An(it,st){return yn(it,st)<0?st:it}function xn(it,st){return yn(it,st)<0?it:st}function Nn(it,st){return Math.max(it.first,Math.min(st,it.first+it.size-1))}function ai(it,st){if(st.line<it.first)return on(it.first,0);var dt=it.first+it.size-1;return st.line>dt?on(dt,Ai(it,dt).text.length):Ki(st,Ai(it,st.line).text.length)}function Ki(it,st){var dt=it.ch;return dt==null||dt>st?on(it.line,st):dt<0?on(it.line,0):it}function Ni(it,st){for(var dt=[],ht=0;ht<st.length;ht++)dt[ht]=ai(it,st[ht]);return dt}var Ti=function(it,st){this.state=it,this.lookAhead=st},en=function(it,st,dt,ht){this.state=st,this.doc=it,this.line=dt,this.maxLookAhead=ht||0,this.baseTokens=null,this.baseTokenPos=1};en.prototype.lookAhead=function(it){var st=this.doc.getLine(this.line+it);return st!=null&&it>this.maxLookAhead&&(this.maxLookAhead=it),st},en.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}},en.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},en.fromSaved=function(it,st,dt){return st instanceof Ti?new en(it,fi(it.mode,st.state),dt,st.lookAhead):new en(it,fi(it.mode,st),dt)},en.prototype.save=function(it){var st=it!==!1?fi(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ti(st,this.maxLookAhead):st};function br(it,st,dt,ht){var gt=[it.state.modeGen],Nt={};er(it,st.text,it.doc.mode,dt,function(pe,qe){return gt.push(pe,qe)},Nt,ht);for(var Gt=dt.state,Jt=function(pe){dt.baseTokens=gt;var qe=it.state.overlays[pe],we=1,Mn=0;dt.state=!0,er(it,st.text,qe.mode,dt,function(wn,Si){for(var bi=we;Mn<wn;){var zi=gt[we];zi>wn&>.splice(we,1,wn,gt[we+1],zi),we+=2,Mn=Math.min(wn,zi)}if(Si)if(qe.opaque)gt.splice(bi,we-bi,wn,"overlay "+Si),we=bi+2;else for(;bi<we;bi+=2){var rr=gt[bi+1];gt[bi+1]=(rr?rr+" ":"")+"overlay "+Si}},Nt),dt.state=Gt,dt.baseTokens=null,dt.baseTokenPos=1},Yt=0;Yt<it.state.overlays.length;++Yt)Jt(Yt);return{styles:gt,classes:Nt.bgClass||Nt.textClass?Nt:null}}function cr(it,st,dt){if(!st.styles||st.styles[0]!=it.state.modeGen){var ht=Kr(it,he(st)),gt=st.text.length>it.options.maxHighlightLength&&fi(it.doc.mode,ht.state),Nt=br(it,st,ht);gt&&(ht.state=gt),st.stateAfter=ht.save(!gt),st.styles=Nt.styles,Nt.classes?st.styleClasses=Nt.classes:st.styleClasses&&(st.styleClasses=null),dt===it.doc.highlightFrontier&&(it.doc.modeFrontier=Math.max(it.doc.modeFrontier,++it.doc.highlightFrontier))}return st.styles}function Kr(it,st,dt){var ht=it.doc,gt=it.display;if(!ht.mode.startState)return new en(ht,!0,st);var Nt=lr(it,st,dt),Gt=Nt>ht.first&&Ai(ht,Nt-1).stateAfter,Jt=Gt?en.fromSaved(ht,Gt,Nt):new en(ht,_i(ht.mode),Nt);return ht.iter(Nt,st,function(Yt){Ze(it,Yt.text,Jt);var pe=Jt.line;Yt.stateAfter=pe==st-1||pe%5==0||pe>=gt.viewFrom&&pe<gt.viewTo?Jt.save():null,Jt.nextLine()}),dt&&(ht.modeFrontier=Jt.line),Jt}function Ze(it,st,dt,ht){var gt=it.doc.mode,Nt=new Un(st,it.options.tabSize,dt);for(Nt.start=Nt.pos=ht||0,st==""&&ni(gt,dt.state);!Nt.eol();)Bi(gt,Nt,dt.state),Nt.start=Nt.pos}function ni(it,st){if(it.blankLine)return it.blankLine(st);if(it.innerMode){var dt=Se(it,st);if(dt.mode.blankLine)return dt.mode.blankLine(dt.state)}}function Bi(it,st,dt,ht){for(var gt=0;gt<10;gt++){ht&&(ht[0]=Se(it,dt).mode);var Nt=it.token(st,dt);if(st.pos>st.start)return Nt}throw new Error("Mode "+it.name+" failed to advance stream.")}var Hi=function(it,st,dt){this.start=it.start,this.end=it.pos,this.string=it.current(),this.type=st||null,this.state=dt};function vi(it,st,dt,ht){var gt=it.doc,Nt=gt.mode,Gt;st=ai(gt,st);var Jt=Ai(gt,st.line),Yt=Kr(it,st.line,dt),pe=new Un(Jt.text,it.options.tabSize,Yt),qe;for(ht&&(qe=[]);(ht||pe.pos<st.ch)&&!pe.eol();)pe.start=pe.pos,Gt=Bi(Nt,pe,Yt.state),ht&&qe.push(new Hi(pe,Gt,fi(gt.mode,Yt.state)));return ht?qe:new Hi(pe,Gt,Yt.state)}function ki(it,st){if(it)for(;;){var dt=it.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!dt)break;it=it.slice(0,dt.index)+it.slice(dt.index+dt[0].length);var ht=dt[1]?"bgClass":"textClass";st[ht]==null?st[ht]=dt[2]:new RegExp("(?:^|\\s)"+dt[2]+"(?:$|\\s)").test(st[ht])||(st[ht]+=" "+dt[2])}return it}function er(it,st,dt,ht,gt,Nt,Gt){var Jt=dt.flattenSpans;Jt==null&&(Jt=it.options.flattenSpans);var Yt=0,pe=null,qe=new Un(st,it.options.tabSize,ht),we,Mn=it.options.addModeClass&&[null];for(st==""&&ki(ni(dt,ht.state),Nt);!qe.eol();){if(qe.pos>it.options.maxHighlightLength?(Jt=!1,Gt&&Ze(it,st,ht,qe.pos),qe.pos=st.length,we=null):we=ki(Bi(dt,qe,ht.state,Mn),Nt),Mn){var wn=Mn[0].name;wn&&(we="m-"+(we?wn+" "+we:wn))}if(!Jt||pe!=we){for(;Yt<qe.start;)Yt=Math.min(qe.start,Yt+5e3),gt(Yt,pe);pe=we}qe.start=qe.pos}for(;Yt<qe.pos;){var Si=Math.min(qe.pos,Yt+5e3);gt(Si,pe),Yt=Si}}function lr(it,st,dt){for(var ht,gt,Nt=it.doc,Gt=dt?-1:st-(it.doc.mode.innerMode?1e3:100),Jt=st;Jt>Gt;--Jt){if(Jt<=Nt.first)return Nt.first;var Yt=Ai(Nt,Jt-1),pe=Yt.stateAfter;if(pe&&(!dt||Jt+(pe instanceof Ti?pe.lookAhead:0)<=Nt.modeFrontier))return Jt;var qe=be(Yt.text,null,it.options.tabSize);(gt==null||ht>qe)&&(gt=Jt-1,ht=qe)}return gt}function oe(it,st){if(it.modeFrontier=Math.min(it.modeFrontier,st),!(it.highlightFrontier<st-10)){for(var dt=it.first,ht=st-1;ht>dt;ht--){var gt=Ai(it,ht).stateAfter;if(gt&&(!(gt instanceof Ti)||ht+gt.lookAhead<st)){dt=ht+1;break}}it.highlightFrontier=Math.min(it.highlightFrontier,dt)}}var ae=!1,ee=!1;function Ye(){ae=!0}function Be(){ee=!0}function ln(it,st,dt){this.marker=it,this.from=st,this.to=dt}function Dn(it,st){if(it)for(var dt=0;dt<it.length;++dt){var ht=it[dt];if(ht.marker==st)return ht}}function Zn(it,st){for(var dt,ht=0;ht<it.length;++ht)it[ht]!=st&&(dt||(dt=[])).push(it[ht]);return dt}function Li(it,st){it.markedSpans=it.markedSpans?it.markedSpans.concat([st]):[st],st.marker.attachLine(it)}function Mi(it,st,dt){var ht;if(it)for(var gt=0;gt<it.length;++gt){var Nt=it[gt],Gt=Nt.marker,Jt=Nt.from==null||(Gt.inclusiveLeft?Nt.from<=st:Nt.from<st);if(Jt||Nt.from==st&&Gt.type=="bookmark"&&(!dt||!Nt.marker.insertLeft)){var Yt=Nt.to==null||(Gt.inclusiveRight?Nt.to>=st:Nt.to>st);(ht||(ht=[])).push(new ln(Gt,Nt.from,Yt?null:Nt.to))}}return ht}function Te(it,st,dt){var ht;if(it)for(var gt=0;gt<it.length;++gt){var Nt=it[gt],Gt=Nt.marker,Jt=Nt.to==null||(Gt.inclusiveRight?Nt.to>=st:Nt.to>st);if(Jt||Nt.from==st&&Gt.type=="bookmark"&&(!dt||Nt.marker.insertLeft)){var Yt=Nt.from==null||(Gt.inclusiveLeft?Nt.from<=st:Nt.from<st);(ht||(ht=[])).push(new ln(Gt,Yt?null:Nt.from-st,Nt.to==null?null:Nt.to-st))}}return ht}function yi(it,st){if(st.full)return null;var dt=Wn(it,st.from.line)&&Ai(it,st.from.line).markedSpans,ht=Wn(it,st.to.line)&&Ai(it,st.to.line).markedSpans;if(!dt&&!ht)return null;var gt=st.from.ch,Nt=st.to.ch,Gt=yn(st.from,st.to)==0,Jt=Mi(dt,gt,Gt),Yt=Te(ht,Nt,Gt),pe=st.text.length==1,qe=Ee(st.text).length+(pe?gt:0);if(Jt)for(var we=0;we<Jt.length;++we){var Mn=Jt[we];if(Mn.to==null){var wn=Dn(Yt,Mn.marker);wn?pe&&(Mn.to=wn.to==null?null:wn.to+qe):Mn.to=gt}}if(Yt)for(var Si=0;Si<Yt.length;++Si){var bi=Yt[Si];if(bi.to!=null&&(bi.to+=qe),bi.from==null){var zi=Dn(Jt,bi.marker);zi||(bi.from=qe,pe&&(Jt||(Jt=[])).push(bi))}else bi.from+=qe,pe&&(Jt||(Jt=[])).push(bi)}Jt&&(Jt=Me(Jt)),Yt&&Yt!=Jt&&(Yt=Me(Yt));var rr=[Jt];if(!pe){var Lr=st.text.length-2,xr;if(Lr>0&&Jt)for(var Qr=0;Qr<Jt.length;++Qr)Jt[Qr].to==null&&(xr||(xr=[])).push(new ln(Jt[Qr].marker,null,null));for(var lo=0;lo<Lr;++lo)rr.push(xr);rr.push(Yt)}return rr}function Me(it){for(var st=0;st<it.length;++st){var dt=it[st];dt.from!=null&&dt.from==dt.to&&dt.marker.clearWhenEmpty!==!1&&it.splice(st--,1)}return it.length?it:null}function an(it,st,dt){var ht=null;if(it.iter(st.line,dt.line+1,function(wn){if(wn.markedSpans)for(var Si=0;Si<wn.markedSpans.length;++Si){var bi=wn.markedSpans[Si].marker;bi.readOnly&&(!ht||Pn(ht,bi)==-1)&&(ht||(ht=[])).push(bi)}}),!ht)return null;for(var gt=[{from:st,to:dt}],Nt=0;Nt<ht.length;++Nt)for(var Gt=ht[Nt],Jt=Gt.find(0),Yt=0;Yt<gt.length;++Yt){var pe=gt[Yt];if(!(yn(pe.to,Jt.from)<0||yn(pe.from,Jt.to)>0)){var qe=[Yt,1],we=yn(pe.from,Jt.from),Mn=yn(pe.to,Jt.to);(we<0||!Gt.inclusiveLeft&&!we)&&qe.push({from:pe.from,to:Jt.from}),(Mn>0||!Gt.inclusiveRight&&!Mn)&&qe.push({from:Jt.to,to:pe.to}),gt.splice.apply(gt,qe),Yt+=qe.length-3}}return gt}function Qe(it){var st=it.markedSpans;if(st){for(var dt=0;dt<st.length;++dt)st[dt].marker.detachLine(it);it.markedSpans=null}}function It(it,st){if(st){for(var dt=0;dt<st.length;++dt)st[dt].marker.attachLine(it);it.markedSpans=st}}function vn(it){return it.inclusiveLeft?-1:0}function pn(it){return it.inclusiveRight?1:0}function Qn(it,st){var dt=it.lines.length-st.lines.length;if(dt!=0)return dt;var ht=it.find(),gt=st.find(),Nt=yn(ht.from,gt.from)||vn(it)-vn(st);if(Nt)return-Nt;var Gt=yn(ht.to,gt.to)||pn(it)-pn(st);return Gt||st.id-it.id}function zn(it,st){var dt=ee&&it.markedSpans,ht;if(dt)for(var gt=void 0,Nt=0;Nt<dt.length;++Nt)gt=dt[Nt],gt.marker.collapsed&&(st?gt.from:gt.to)==null&&(!ht||Qn(ht,gt.marker)<0)&&(ht=gt.marker);return ht}function jn(it){return zn(it,!0)}function Ge(it){return zn(it,!1)}function fn(it,st){var dt=ee&&it.markedSpans,ht;if(dt)for(var gt=0;gt<dt.length;++gt){var Nt=dt[gt];Nt.marker.collapsed&&(Nt.from==null||Nt.from<st)&&(Nt.to==null||Nt.to>st)&&(!ht||Qn(ht,Nt.marker)<0)&&(ht=Nt.marker)}return ht}function Fn(it,st,dt,ht,gt){var Nt=Ai(it,st),Gt=ee&&Nt.markedSpans;if(Gt)for(var Jt=0;Jt<Gt.length;++Jt){var Yt=Gt[Jt];if(Yt.marker.collapsed){var pe=Yt.marker.find(0),qe=yn(pe.from,dt)||vn(Yt.marker)-vn(gt),we=yn(pe.to,ht)||pn(Yt.marker)-pn(gt);if(!(qe>=0&&we<=0||qe<=0&&we>=0)&&(qe<=0&&(Yt.marker.inclusiveRight&>.inclusiveLeft?yn(pe.to,dt)>=0:yn(pe.to,dt)>0)||qe>=0&&(Yt.marker.inclusiveRight&>.inclusiveLeft?yn(pe.from,ht)<=0:yn(pe.from,ht)<0)))return!0}}}function Sn(it){for(var st;st=jn(it);)it=st.find(-1,!0).line;return it}function dn(it){for(var st;st=Ge(it);)it=st.find(1,!0).line;return it}function gi(it){for(var st,dt;st=Ge(it);)it=st.find(1,!0).line,(dt||(dt=[])).push(it);return dt}function Vn(it,st){var dt=Ai(it,st),ht=Sn(dt);return dt==ht?st:he(ht)}function qn(it,st){if(st>it.lastLine())return st;var dt=Ai(it,st),ht;if(!cn(it,dt))return st;for(;ht=Ge(dt);)dt=ht.find(1,!0).line;return he(dt)+1}function cn(it,st){var dt=ee&&st.markedSpans;if(dt){for(var ht=void 0,gt=0;gt<dt.length;++gt)if(ht=dt[gt],!!ht.marker.collapsed){if(ht.from==null)return!0;if(!ht.marker.widgetNode&&ht.from==0&&ht.marker.inclusiveLeft&&ri(it,st,ht))return!0}}}function ri(it,st,dt){if(dt.to==null){var ht=dt.marker.find(1,!0);return ri(it,ht.line,Dn(ht.line.markedSpans,dt.marker))}if(dt.marker.inclusiveRight&&dt.to==st.text.length)return!0;for(var gt=void 0,Nt=0;Nt<st.markedSpans.length;++Nt)if(gt=st.markedSpans[Nt],gt.marker.collapsed&&!gt.marker.widgetNode&>.from==dt.to&&(gt.to==null||gt.to!=dt.from)&&(gt.marker.inclusiveLeft||dt.marker.inclusiveRight)&&ri(it,st,gt))return!0}function Ui(it){it=Sn(it);for(var st=0,dt=it.parent,ht=0;ht<dt.lines.length;++ht){var gt=dt.lines[ht];if(gt==it)break;st+=gt.height}for(var Nt=dt.parent;Nt;dt=Nt,Nt=dt.parent)for(var Gt=0;Gt<Nt.children.length;++Gt){var Jt=Nt.children[Gt];if(Jt==dt)break;st+=Jt.height}return st}function nr(it){if(it.height==0)return 0;for(var st=it.text.length,dt,ht=it;dt=jn(ht);){var gt=dt.find(0,!0);ht=gt.from.line,st+=gt.from.ch-gt.to.ch}for(ht=it;dt=Ge(ht);){var Nt=dt.find(0,!0);st-=ht.text.length-Nt.from.ch,ht=Nt.to.line,st+=ht.text.length-Nt.to.ch}return st}function Ji(it){var st=it.display,dt=it.doc;st.maxLine=Ai(dt,dt.first),st.maxLineLength=nr(st.maxLine),st.maxLineChanged=!0,dt.iter(function(ht){var gt=nr(ht);gt>st.maxLineLength&&(st.maxLineLength=gt,st.maxLine=ht)})}var fr=function(it,st,dt){this.text=it,It(this,st),this.height=dt?dt(this):1};fr.prototype.lineNo=function(){return he(this)},Oi(fr);function dr(it,st,dt,ht){it.text=st,it.stateAfter&&(it.stateAfter=null),it.styles&&(it.styles=null),it.order!=null&&(it.order=null),Qe(it),It(it,dt);var gt=ht?ht(it):1;gt!=it.height&&ui(it,gt)}function Pr(it){it.parent=null,Qe(it)}var Gr={},Tr={};function ro(it,st){if(!it||/^\s*$/.test(it))return null;var dt=st.addModeClass?Tr:Gr;return dt[it]||(dt[it]=it.replace(/\S+/g,"cm-$&"))}function Oe(it,st){var dt=Pe("span",null,null,ne?"padding-right: .1px":null),ht={pre:Pe("pre",[dt],"CodeMirror-line"),content:dt,col:0,pos:0,cm:it,trailingSpace:!1,splitSpaces:it.getOption("lineWrapping")};st.measure={};for(var gt=0;gt<=(st.rest?st.rest.length:0);gt++){var Nt=gt?st.rest[gt-1]:st.line,Gt=void 0;ht.pos=0,ht.addToken=Dr,Er(it.display.measure)&&(Gt=kn(Nt,it.doc.direction))&&(ht.addToken=Ur(ht.addToken,Gt)),ht.map=[];var Jt=st!=it.display.externalMeasured&&he(Nt);vo(Nt,ht,cr(it,Nt,Jt)),Nt.styleClasses&&(Nt.styleClasses.bgClass&&(ht.bgClass=Tn(Nt.styleClasses.bgClass,ht.bgClass||"")),Nt.styleClasses.textClass&&(ht.textClass=Tn(Nt.styleClasses.textClass,ht.textClass||""))),ht.map.length==0&&ht.map.push(0,0,ht.content.appendChild(fo(it.display.measure))),gt==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(ne){var Yt=ht.content.lastChild;(/\bcm-tab\b/.test(Yt.className)||Yt.querySelector&&Yt.querySelector(".cm-tab"))&&(ht.content.className="cm-tab-wrap-hack")}return xi(it,"renderLine",it,st.line,ht.pre),ht.pre.className&&(ht.textClass=Tn(ht.pre.className,ht.textClass||"")),ht}function gr(it){var st=$t("span","\u2022","cm-invalidchar");return st.title="\\u"+it.charCodeAt(0).toString(16),st.setAttribute("aria-label",st.title),st}function Dr(it,st,dt,ht,gt,Nt,Gt){if(st){var Jt=it.splitSpaces?tr(st,it.trailingSpace):st,Yt=it.cm.state.specialChars,pe=!1,qe;if(!Yt.test(st))it.col+=st.length,qe=document.createTextNode(Jt),it.map.push(it.pos,it.pos+st.length,qe),de&&Rt<9&&(pe=!0),it.pos+=st.length;else{qe=document.createDocumentFragment();for(var we=0;;){Yt.lastIndex=we;var Mn=Yt.exec(st),wn=Mn?Mn.index-we:st.length-we;if(wn){var Si=document.createTextNode(Jt.slice(we,we+wn));de&&Rt<9?qe.appendChild($t("span",[Si])):qe.appendChild(Si),it.map.push(it.pos,it.pos+wn,Si),it.col+=wn,it.pos+=wn}if(!Mn)break;we+=wn+1;var bi=void 0;if(Mn[0]==" "){var zi=it.cm.options.tabSize,rr=zi-it.col%zi;bi=qe.appendChild($t("span",oi(rr),"cm-tab")),bi.setAttribute("role","presentation"),bi.setAttribute("cm-text"," "),it.col+=rr}else Mn[0]=="\r"||Mn[0]==`
|
|
|
`?(bi=qe.appendChild($t("span",Mn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),bi.setAttribute("cm-text",Mn[0]),it.col+=1):(bi=it.cm.options.specialCharPlaceholder(Mn[0]),bi.setAttribute("cm-text",Mn[0]),de&&Rt<9?qe.appendChild($t("span",[bi])):qe.appendChild(bi),it.col+=1);it.map.push(it.pos,it.pos+1,bi),it.pos++}}if(it.trailingSpace=Jt.charCodeAt(st.length-1)==32,dt||ht||gt||pe||Nt||Gt){var Lr=dt||"";ht&&(Lr+=ht),gt&&(Lr+=gt);var xr=$t("span",[qe],Lr,Nt);if(Gt)for(var Qr in Gt)Gt.hasOwnProperty(Qr)&&Qr!="style"&&Qr!="class"&&xr.setAttribute(Qr,Gt[Qr]);return it.content.appendChild(xr)}it.content.appendChild(qe)}}function tr(it,st){if(it.length>1&&!/ /.test(it))return it;for(var dt=st,ht="",gt=0;gt<it.length;gt++){var Nt=it.charAt(gt);Nt==" "&&dt&&(gt==it.length-1||it.charCodeAt(gt+1)==32)&&(Nt="\xA0"),ht+=Nt,dt=Nt==" "}return ht}function Ur(it,st){return function(dt,ht,gt,Nt,Gt,Jt,Yt){gt=gt?gt+" cm-force-border":"cm-force-border";for(var pe=dt.pos,qe=pe+ht.length;;){for(var we=void 0,Mn=0;Mn<st.length&&(we=st[Mn],!(we.to>pe&&we.from<=pe));Mn++);if(we.to>=qe)return it(dt,ht,gt,Nt,Gt,Jt,Yt);it(dt,ht.slice(0,we.to-pe),gt,Nt,null,Jt,Yt),Nt=null,ht=ht.slice(we.to-pe),pe=we.to}}}function or(it,st,dt,ht){var gt=!ht&&dt.widgetNode;gt&&it.map.push(it.pos,it.pos+st,gt),!ht&&it.cm.display.input.needsContentAttribute&&(gt||(gt=it.content.appendChild(document.createElement("span"))),gt.setAttribute("cm-marker",dt.id)),gt&&(it.cm.display.input.setUneditable(gt),it.content.appendChild(gt)),it.pos+=st,it.trailingSpace=!1}function vo(it,st,dt){var ht=it.markedSpans,gt=it.text,Nt=0;if(!ht){for(var Gt=1;Gt<dt.length;Gt+=2)st.addToken(st,gt.slice(Nt,Nt=dt[Gt]),ro(dt[Gt+1],st.cm.options));return}for(var Jt=gt.length,Yt=0,pe=1,qe="",we,Mn,wn=0,Si,bi,zi,rr,Lr;;){if(wn==Yt){Si=bi=zi=Mn="",Lr=null,rr=null,wn=1/0;for(var xr=[],Qr=void 0,lo=0;lo<ht.length;++lo){var wr=ht[lo],Mo=wr.marker;if(Mo.type=="bookmark"&&wr.from==Yt&&Mo.widgetNode)xr.push(Mo);else if(wr.from<=Yt&&(wr.to==null||wr.to>Yt||Mo.collapsed&&wr.to==Yt&&wr.from==Yt)){if(wr.to!=null&&wr.to!=Yt&&wn>wr.to&&(wn=wr.to,bi=""),Mo.className&&(Si+=" "+Mo.className),Mo.css&&(Mn=(Mn?Mn+";":"")+Mo.css),Mo.startStyle&&wr.from==Yt&&(zi+=" "+Mo.startStyle),Mo.endStyle&&wr.to==wn&&(Qr||(Qr=[])).push(Mo.endStyle,wr.to),Mo.title&&((Lr||(Lr={})).title=Mo.title),Mo.attributes)for(var Hs in Mo.attributes)(Lr||(Lr={}))[Hs]=Mo.attributes[Hs];Mo.collapsed&&(!rr||Qn(rr.marker,Mo)<0)&&(rr=wr)}else wr.from>Yt&&wn>wr.from&&(wn=wr.from)}if(Qr)for(var Sa=0;Sa<Qr.length;Sa+=2)Qr[Sa+1]==wn&&(bi+=" "+Qr[Sa]);if(!rr||rr.from==Yt)for(var Ws=0;Ws<xr.length;++Ws)or(st,0,xr[Ws]);if(rr&&(rr.from||0)==Yt){if(or(st,(rr.to==null?Jt+1:rr.to)-Yt,rr.marker,rr.from==null),rr.to==null)return;rr.to==Yt&&(rr=!1)}}if(Yt>=Jt)break;for(var ml=Math.min(Jt,wn);;){if(qe){var ba=Yt+qe.length;if(!rr){var ma=ba>ml?qe.slice(0,ml-Yt):qe;st.addToken(st,ma,we?we+Si:Si,zi,Yt+ma.length==wn?bi:"",Mn,Lr)}if(ba>=ml){qe=qe.slice(ml-Yt),Yt=ml;break}Yt=ba,zi=""}qe=gt.slice(Nt,Nt=dt[pe++]),we=ro(dt[pe++],st.cm.options)}}}function qr(it,st,dt){this.line=st,this.rest=gi(st),this.size=this.rest?he(Ee(this.rest))-dt+1:1,this.node=this.text=null,this.hidden=cn(it,st)}function Nr(it,st,dt){for(var ht=[],gt,Nt=st;Nt<dt;Nt=gt){var Gt=new qr(it.doc,Ai(it.doc,Nt),Nt);gt=Nt+Gt.size,ht.push(Gt)}return ht}var ho=null;function ks(it){ho?ho.ops.push(it):it.ownsGroup=ho={ops:[it],delayedCallbacks:[]}}function ls(it){var st=it.delayedCallbacks,dt=0;do{for(;dt<st.length;dt++)st[dt].call(null);for(var ht=0;ht<it.ops.length;ht++){var gt=it.ops[ht];if(gt.cursorActivityHandlers)for(;gt.cursorActivityCalled<gt.cursorActivityHandlers.length;)gt.cursorActivityHandlers[gt.cursorActivityCalled++].call(null,gt.cm)}}while(dt<st.length)}function la(it,st){var dt=it.ownsGroup;if(dt)try{ls(dt)}finally{ho=null,st(dt)}}var Is=null;function sr(it,st){var dt=Ri(it,st);if(dt.length){var ht=Array.prototype.slice.call(arguments,2),gt;ho?gt=ho.delayedCallbacks:Is?gt=Is:(gt=Is=[],setTimeout(Eo,0));for(var Nt=function(Jt){gt.push(function(){return dt[Jt].apply(null,ht)})},Gt=0;Gt<dt.length;++Gt)Nt(Gt)}}function Eo(){var it=Is;Is=null;for(var st=0;st<it.length;++st)it[st]()}function os(it,st,dt,ht){for(var gt=0;gt<st.changes.length;gt++){var Nt=st.changes[gt];Nt=="text"?Kn(it,st):Nt=="gutter"?kr(it,st,dt,ht):Nt=="class"?Ar(it,st):Nt=="widget"&&xo(it,st,ht)}st.changes=null}function Gi(it){return it.node==it.text&&(it.node=$t("div",null,null,"position: relative"),it.text.parentNode&&it.text.parentNode.replaceChild(it.node,it.text),it.node.appendChild(it.text),de&&Rt<8&&(it.node.style.zIndex=2)),it.node}function Wi(it,st){var dt=st.bgClass?st.bgClass+" "+(st.line.bgClass||""):st.line.bgClass;if(dt&&(dt+=" CodeMirror-linebackground"),st.background)dt?st.background.className=dt:(st.background.parentNode.removeChild(st.background),st.background=null);else if(dt){var ht=Gi(st);st.background=ht.insertBefore($t("div",null,dt),ht.firstChild),it.display.input.setUneditable(st.background)}}function ir(it,st){var dt=it.display.externalMeasured;return dt&&dt.line==st.line?(it.display.externalMeasured=null,st.measure=dt.measure,dt.built):Oe(it,st)}function Kn(it,st){var dt=st.text.className,ht=ir(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)):dt&&(st.text.className=dt)}function Ar(it,st){Wi(it,st),st.line.wrapClass?Gi(st).className=st.line.wrapClass:st.node!=st.text&&(st.node.className="");var dt=st.textClass?st.textClass+" "+(st.line.textClass||""):st.line.textClass;st.text.className=dt||""}function kr(it,st,dt,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 gt=Gi(st);st.gutterBackground=$t("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),gt.insertBefore(st.gutterBackground,st.text)}var Nt=st.line.gutterMarkers;if(it.options.lineNumbers||Nt){var Gt=Gi(st),Jt=st.gutter=$t("div",null,"CodeMirror-gutter-wrapper","left: "+(it.options.fixedGutter?ht.fixedPos:-ht.gutterTotalWidth)+"px");if(it.display.input.setUneditable(Jt),Gt.insertBefore(Jt,st.text),st.line.gutterClass&&(Jt.className+=" "+st.line.gutterClass),it.options.lineNumbers&&(!Nt||!Nt["CodeMirror-linenumbers"])&&(st.lineNumber=Jt.appendChild($t("div",pi(it.options,dt),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+ht.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+it.display.lineNumInnerWidth+"px"))),Nt)for(var Yt=0;Yt<it.display.gutterSpecs.length;++Yt){var pe=it.display.gutterSpecs[Yt].className,qe=Nt.hasOwnProperty(pe)&&Nt[pe];qe&&Jt.appendChild($t("div",[qe],"CodeMirror-gutter-elt","left: "+ht.gutterLeft[pe]+"px; width: "+ht.gutterWidth[pe]+"px"))}}}function xo(it,st,dt){st.alignable&&(st.alignable=null);for(var ht=_t("CodeMirror-linewidget"),gt=st.node.firstChild,Nt=void 0;gt;gt=Nt)Nt=gt.nextSibling,ht.test(gt.className)&&st.node.removeChild(gt);ps(it,st,dt)}function Ts(it,st,dt,ht){var gt=ir(it,st);return st.text=st.node=gt.pre,gt.bgClass&&(st.bgClass=gt.bgClass),gt.textClass&&(st.textClass=gt.textClass),Ar(it,st),kr(it,st,dt,ht),ps(it,st,ht),st.node}function ps(it,st,dt){if(Cr(it,st.line,st,dt,!0),st.rest)for(var ht=0;ht<st.rest.length;ht++)Cr(it,st.rest[ht],st,dt,!1)}function Cr(it,st,dt,ht,gt){if(st.widgets)for(var Nt=Gi(dt),Gt=0,Jt=st.widgets;Gt<Jt.length;++Gt){var Yt=Jt[Gt],pe=$t("div",[Yt.node],"CodeMirror-linewidget"+(Yt.className?" "+Yt.className:""));Yt.handleMouseEvents||pe.setAttribute("cm-ignore-events","true"),to(Yt,pe,dt,ht),it.display.input.setUneditable(pe),gt&&Yt.above?Nt.insertBefore(pe,dt.gutter||dt.text):Nt.appendChild(pe),sr(Yt,"redraw")}}function to(it,st,dt,ht){if(it.noHScroll){(dt.alignable||(dt.alignable=[])).push(st);var gt=ht.wrapperWidth;st.style.left=ht.fixedPos+"px",it.coverGutter||(gt-=ht.gutterTotalWidth,st.style.paddingLeft=ht.gutterTotalWidth+"px"),st.style.width=gt+"px"}it.coverGutter&&(st.style.zIndex=5,st.style.position="relative",it.noHScroll||(st.style.marginLeft=-ht.gutterTotalWidth+"px"))}function oo(it){if(it.height!=null)return it.height;var st=it.doc.cm;if(!st)return 0;if(!$e(document.body,it.node)){var dt="position: relative;";it.coverGutter&&(dt+="margin-left: -"+st.display.gutters.offsetWidth+"px;"),it.noHScroll&&(dt+="width: "+st.display.wrapper.clientWidth+"px;"),Zt(st.display.measure,$t("div",[it.node],null,dt))}return it.height=it.node.parentNode.offsetHeight}function ts(it,st){for(var dt=mr(st);dt!=it.wrapper;dt=dt.parentNode)if(!dt||dt.nodeType==1&&dt.getAttribute("cm-ignore-events")=="true"||dt.parentNode==it.sizer&&dt!=it.mover)return!0}function yo(it){return it.lineSpace.offsetTop}function Vo(it){return it.mover.offsetHeight-it.lineSpace.offsetHeight}function zo(it){if(it.cachedPaddingH)return it.cachedPaddingH;var st=Zt(it.measure,$t("pre","x","CodeMirror-line-like")),dt=window.getComputedStyle?window.getComputedStyle(st):st.currentStyle,ht={left:parseInt(dt.paddingLeft),right:parseInt(dt.paddingRight)};return!isNaN(ht.left)&&!isNaN(ht.right)&&(it.cachedPaddingH=ht),ht}function Io(it){return li-it.display.nativeBarWidth}function ys(it){return it.display.scroller.clientWidth-Io(it)-it.display.barWidth}function Wo(it){return it.display.scroller.clientHeight-Io(it)-it.display.barHeight}function Fl(it,st,dt){var ht=it.options.lineWrapping,gt=ht&&ys(it);if(!st.measure.heights||ht&&st.measure.width!=gt){var Nt=st.measure.heights=[];if(ht){st.measure.width=gt;for(var Gt=st.text.firstChild.getClientRects(),Jt=0;Jt<Gt.length-1;Jt++){var Yt=Gt[Jt],pe=Gt[Jt+1];Math.abs(Yt.bottom-pe.bottom)>2&&Nt.push((Yt.bottom+pe.top)/2-dt.top)}}Nt.push(dt.bottom-dt.top)}}function ao(it,st,dt){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 gt=0;gt<it.rest.length;gt++)if(he(it.rest[gt])>dt)return{map:it.measure.maps[gt],cache:it.measure.caches[gt],before:!0}}function da(it,st){st=Sn(st);var dt=he(st),ht=it.display.externalMeasured=new qr(it.doc,st,dt);ht.lineN=dt;var gt=ht.built=Oe(it,ht);return ht.text=gt.pre,Zt(it.display.lineMeasure,gt.pre),ht}function _a(it,st,dt,ht){return Ta(it,Zo(it,st),dt,ht)}function hl(it,st){if(st>=it.display.viewFrom&&st<it.display.viewTo)return it.display.view[el(it,st)];var dt=it.display.externalMeasured;if(dt&&st>=dt.lineN&&st<dt.lineN+dt.size)return dt}function Zo(it,st){var dt=he(st),ht=hl(it,dt);ht&&!ht.text?ht=null:ht&&ht.changes&&(os(it,ht,dt,cA(it)),it.curOp.forceUpdate=!0),ht||(ht=da(it,st));var gt=ao(ht,st,dt);return{line:st,view:ht,rect:null,map:gt.map,cache:gt.cache,before:gt.before,hasHeights:!1}}function Ta(it,st,dt,ht,gt){st.before&&(dt=-1);var Nt=dt+(ht||""),Gt;return st.cache.hasOwnProperty(Nt)?Gt=st.cache[Nt]:(st.rect||(st.rect=st.view.text.getBoundingClientRect()),st.hasHeights||(Fl(it,st.view,st.rect),st.hasHeights=!0),Gt=ws(it,st,dt,ht),Gt.bogus||(st.cache[Nt]=Gt)),{left:Gt.left,right:Gt.right,top:gt?Gt.rtop:Gt.top,bottom:gt?Gt.rbottom:Gt.bottom}}var $a={left:0,right:0,top:0,bottom:0};function uA(it,st,dt){for(var ht,gt,Nt,Gt,Jt,Yt,pe=0;pe<it.length;pe+=3)if(Jt=it[pe],Yt=it[pe+1],st<Jt?(gt=0,Nt=1,Gt="left"):st<Yt?(gt=st-Jt,Nt=gt+1):(pe==it.length-3||st==Yt&&it[pe+3]>st)&&(Nt=Yt-Jt,gt=Nt-1,st>=Yt&&(Gt="right")),gt!=null){if(ht=it[pe+2],Jt==Yt&&dt==(ht.insertLeft?"left":"right")&&(Gt=dt),dt=="left"&>==0)for(;pe&&it[pe-2]==it[pe-3]&&it[pe-1].insertLeft;)ht=it[(pe-=3)+2],Gt="left";if(dt=="right"&>==Yt-Jt)for(;pe<it.length-3&&it[pe+3]==it[pe+4]&&!it[pe+5].insertLeft;)ht=it[(pe+=3)+2],Gt="right";break}return{node:ht,start:gt,end:Nt,collapse:Gt,coverStart:Jt,coverEnd:Yt}}function Ku(it,st){var dt=$a;if(st=="left")for(var ht=0;ht<it.length&&(dt=it[ht]).left==dt.right;ht++);else for(var gt=it.length-1;gt>=0&&(dt=it[gt]).left==dt.right;gt--);return dt}function ws(it,st,dt,ht){var gt=uA(st.map,dt,ht),Nt=gt.node,Gt=gt.start,Jt=gt.end,Yt=gt.collapse,pe;if(Nt.nodeType==3){for(var qe=0;qe<4;qe++){for(;Gt&&ge(st.line.text.charAt(gt.coverStart+Gt));)--Gt;for(;gt.coverStart+Jt<gt.coverEnd&&ge(st.line.text.charAt(gt.coverStart+Jt));)++Jt;if(de&&Rt<9&&Gt==0&&Jt==gt.coverEnd-gt.coverStart?pe=Nt.parentNode.getBoundingClientRect():pe=Ku(me(Nt,Gt,Jt).getClientRects(),ht),pe.left||pe.right||Gt==0)break;Jt=Gt,Gt=Gt-1,Yt="right"}de&&Rt<11&&(pe=Gu(it.display.measure,pe))}else{Gt>0&&(Yt=ht="right");var we;it.options.lineWrapping&&(we=Nt.getClientRects()).length>1?pe=we[ht=="right"?we.length-1:0]:pe=Nt.getBoundingClientRect()}if(de&&Rt<9&&!Gt&&(!pe||!pe.left&&!pe.right)){var Mn=Nt.parentNode.getClientRects()[0];Mn?pe={left:Mn.left,right:Mn.left+vu(it.display),top:Mn.top,bottom:Mn.bottom}:pe=$a}for(var wn=pe.top-st.rect.top,Si=pe.bottom-st.rect.top,bi=(wn+Si)/2,zi=st.view.measure.heights,rr=0;rr<zi.length-1&&!(bi<zi[rr]);rr++);var Lr=rr?zi[rr-1]:0,xr=zi[rr],Qr={left:(Yt=="right"?pe.right:pe.left)-st.rect.left,right:(Yt=="left"?pe.left:pe.right)-st.rect.left,top:Lr,bottom:xr};return!pe.left&&!pe.right&&(Qr.bogus=!0),it.options.singleCursorHeightPerLine||(Qr.rtop=wn,Qr.rbottom=Si),Qr}function Gu(it,st){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Vr(it))return st;var dt=screen.logicalXDPI/screen.deviceXDPI,ht=screen.logicalYDPI/screen.deviceYDPI;return{left:st.left*dt,right:st.right*dt,top:st.top*ht,bottom:st.bottom*ht}}function AA(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 wa(it){it.display.externalMeasure=null,Vt(it.display.lineMeasure);for(var st=0;st<it.display.view.length;st++)AA(it.display.view[st])}function tl(it){wa(it),it.display.cachedCharWidth=it.display.cachedTextHeight=it.display.cachedPaddingH=null,it.options.lineWrapping||(it.display.maxLineChanged=!0),it.display.lineNumChars=null}function Gs(){return ce&&nt?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function es(){return ce&&nt?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function hs(it){var st=0;if(it.widgets)for(var dt=0;dt<it.widgets.length;++dt)it.widgets[dt].above&&(st+=oo(it.widgets[dt]));return st}function js(it,st,dt,ht,gt){if(!gt){var Nt=hs(st);dt.top+=Nt,dt.bottom+=Nt}if(ht=="line")return dt;ht||(ht="local");var Gt=Ui(st);if(ht=="local"?Gt+=yo(it.display):Gt-=it.display.viewOffset,ht=="page"||ht=="window"){var Jt=it.display.lineSpace.getBoundingClientRect();Gt+=Jt.top+(ht=="window"?0:es());var Yt=Jt.left+(ht=="window"?0:Gs());dt.left+=Yt,dt.right+=Yt}return dt.top+=Gt,dt.bottom+=Gt,dt}function Oo(it,st,dt){if(dt=="div")return st;var ht=st.left,gt=st.top;if(dt=="page")ht-=Gs(),gt-=es();else if(dt=="local"||!dt){var Nt=it.display.sizer.getBoundingClientRect();ht+=Nt.left,gt+=Nt.top}var Gt=it.display.lineSpace.getBoundingClientRect();return{left:ht-Gt.left,top:gt-Gt.top}}function so(it,st,dt,ht,gt){return ht||(ht=Ai(it.doc,st.line)),js(it,ht,_a(it,ht,st.ch,gt),dt)}function mo(it,st,dt,ht,gt,Nt){ht=ht||Ai(it.doc,st.line),gt||(gt=Zo(it,ht));function Gt(Si,bi){var zi=Ta(it,gt,Si,bi?"right":"left",Nt);return bi?zi.left=zi.right:zi.right=zi.left,js(it,ht,zi,dt)}var Jt=kn(ht,it.doc.direction),Yt=st.ch,pe=st.sticky;if(Yt>=ht.text.length?(Yt=ht.text.length,pe="before"):Yt<=0&&(Yt=0,pe="after"),!Jt)return Gt(pe=="before"?Yt-1:Yt,pe=="before");function qe(Si,bi,zi){var rr=Jt[bi],Lr=rr.level==1;return Gt(zi?Si-1:Si,Lr!=zi)}var we=De(Jt,Yt,pe),Mn=ze,wn=qe(Yt,we,pe=="before");return Mn!=null&&(wn.other=qe(Yt,Mn,pe!="before")),wn}function Xs(it,st){var dt=0;st=ai(it.doc,st),it.options.lineWrapping||(dt=vu(it.display)*st.ch);var ht=Ai(it.doc,st.line),gt=Ui(ht)+yo(it.display);return{left:dt,right:dt,top:gt,bottom:gt+ht.height}}function xs(it,st,dt,ht,gt){var Nt=on(it,st,dt);return Nt.xRel=gt,ht&&(Nt.outside=ht),Nt}function ss(it,st,dt){var ht=it.doc;if(dt+=it.display.viewOffset,dt<0)return xs(ht.first,0,null,-1,-1);var gt=rn(ht,dt),Nt=ht.first+ht.size-1;if(gt>Nt)return xs(ht.first+ht.size-1,Ai(ht,Nt).text.length,null,1,1);st<0&&(st=0);for(var Gt=Ai(ht,gt);;){var Jt=On(it,Gt,gt,st,dt),Yt=fn(Gt,Jt.ch+(Jt.xRel>0||Jt.outside>0?1:0));if(!Yt)return Jt;var pe=Yt.find(1);if(pe.line==gt)return pe;Gt=Ai(ht,gt=pe.line)}}function $i(it,st,dt,ht){ht-=hs(st);var gt=st.text.length,Nt=Je(function(Gt){return Ta(it,dt,Gt-1).bottom<=ht},gt,0);return gt=Je(function(Gt){return Ta(it,dt,Gt).top>ht},Nt,gt),{begin:Nt,end:gt}}function cl(it,st,dt,ht){dt||(dt=Zo(it,st));var gt=js(it,st,Ta(it,dt,ht),"line").top;return $i(it,st,dt,gt)}function xe(it,st,dt,ht){return it.bottom<=dt?!1:it.top>dt?!0:(ht?it.left:it.right)>st}function On(it,st,dt,ht,gt){gt-=Ui(st);var Nt=Zo(it,st),Gt=hs(st),Jt=0,Yt=st.text.length,pe=!0,qe=kn(st,it.doc.direction);if(qe){var we=(it.options.lineWrapping?hA:su)(it,st,dt,Nt,qe,ht,gt);pe=we.level!=1,Jt=pe?we.from:we.to-1,Yt=pe?we.to:we.from-1}var Mn=null,wn=null,Si=Je(function(lo){var wr=Ta(it,Nt,lo);return wr.top+=Gt,wr.bottom+=Gt,xe(wr,ht,gt,!1)?(wr.top<=gt&&wr.left<=ht&&(Mn=lo,wn=wr),!0):!1},Jt,Yt),bi,zi,rr=!1;if(wn){var Lr=ht-wn.left<wn.right-ht,xr=Lr==pe;Si=Mn+(xr?0:1),zi=xr?"after":"before",bi=Lr?wn.left:wn.right}else{!pe&&(Si==Yt||Si==Jt)&&Si++,zi=Si==0?"after":Si==st.text.length?"before":Ta(it,Nt,Si-(pe?1:0)).bottom+Gt<=gt==pe?"after":"before";var Qr=mo(it,on(dt,Si,zi),"line",st,Nt);bi=Qr.left,rr=gt<Qr.top?-1:gt>=Qr.bottom?1:0}return Si=ke(st.text,Si,1),xs(dt,Si,zi,rr,ht-bi)}function su(it,st,dt,ht,gt,Nt,Gt){var Jt=Je(function(we){var Mn=gt[we],wn=Mn.level!=1;return xe(mo(it,on(dt,wn?Mn.to:Mn.from,wn?"before":"after"),"line",st,ht),Nt,Gt,!0)},0,gt.length-1),Yt=gt[Jt];if(Jt>0){var pe=Yt.level!=1,qe=mo(it,on(dt,pe?Yt.from:Yt.to,pe?"after":"before"),"line",st,ht);xe(qe,Nt,Gt,!0)&&qe.top>Gt&&(Yt=gt[Jt-1])}return Yt}function hA(it,st,dt,ht,gt,Nt,Gt){var Jt=$i(it,st,ht,Gt),Yt=Jt.begin,pe=Jt.end;/\s/.test(st.text.charAt(pe-1))&&pe--;for(var qe=null,we=null,Mn=0;Mn<gt.length;Mn++){var wn=gt[Mn];if(!(wn.from>=pe||wn.to<=Yt)){var Si=wn.level!=1,bi=Ta(it,ht,Si?Math.min(pe,wn.to)-1:Math.max(Yt,wn.from)).right,zi=bi<Nt?Nt-bi+1e9:bi-Nt;(!qe||we>zi)&&(qe=wn,we=zi)}}return qe||(qe=gt[gt.length-1]),qe.from<Yt&&(qe={from:Yt,to:qe.to,level:qe.level}),qe.to>pe&&(qe={from:qe.from,to:pe,level:qe.level}),qe}var as;function dl(it){if(it.cachedTextHeight!=null)return it.cachedTextHeight;if(as==null){as=$t("pre",null,"CodeMirror-line-like");for(var st=0;st<49;++st)as.appendChild(document.createTextNode("x")),as.appendChild($t("br"));as.appendChild(document.createTextNode("x"))}Zt(it.measure,as);var dt=as.offsetHeight/50;return dt>3&&(it.cachedTextHeight=dt),Vt(it.measure),dt||1}function vu(it){if(it.cachedCharWidth!=null)return it.cachedCharWidth;var st=$t("span","xxxxxxxxxx"),dt=$t("pre",[st],"CodeMirror-line-like");Zt(it.measure,dt);var ht=st.getBoundingClientRect(),gt=(ht.right-ht.left)/10;return gt>2&&(it.cachedCharWidth=gt),gt||10}function cA(it){for(var st=it.display,dt={},ht={},gt=st.gutters.clientLeft,Nt=st.gutters.firstChild,Gt=0;Nt;Nt=Nt.nextSibling,++Gt){var Jt=it.display.gutterSpecs[Gt].className;dt[Jt]=Nt.offsetLeft+Nt.clientLeft+gt,ht[Jt]=Nt.clientWidth}return{fixedPos:au(st),gutterTotalWidth:st.gutters.offsetWidth,gutterLeft:dt,gutterWidth:ht,wrapperWidth:st.wrapper.clientWidth}}function au(it){return it.scroller.getBoundingClientRect().left-it.sizer.getBoundingClientRect().left}function Ss(it){var st=dl(it.display),dt=it.options.lineWrapping,ht=dt&&Math.max(5,it.display.scroller.clientWidth/vu(it.display)-3);return function(gt){if(cn(it.doc,gt))return 0;var Nt=0;if(gt.widgets)for(var Gt=0;Gt<gt.widgets.length;Gt++)gt.widgets[Gt].height&&(Nt+=gt.widgets[Gt].height);return dt?Nt+(Math.ceil(gt.text.length/ht)||1)*st:Nt+st}}function _r(it){var st=it.doc,dt=Ss(it);st.iter(function(ht){var gt=dt(ht);gt!=ht.height&&ui(ht,gt)})}function xa(it,st,dt,ht){var gt=it.display;if(!dt&&mr(st).getAttribute("cm-not-content")=="true")return null;var Nt,Gt,Jt=gt.lineSpace.getBoundingClientRect();try{Nt=st.clientX-Jt.left,Gt=st.clientY-Jt.top}catch(we){return null}var Yt=ss(it,Nt,Gt),pe;if(ht&&Yt.xRel>0&&(pe=Ai(it.doc,Yt.line).text).length==Yt.ch){var qe=be(pe,pe.length,it.options.tabSize)-pe.length;Yt=on(Yt.line,Math.max(0,Math.round((Nt-zo(it.display).left)/vu(it.display))-qe))}return Yt}function el(it,st){if(st>=it.display.viewTo||(st-=it.display.viewFrom,st<0))return null;for(var dt=it.display.view,ht=0;ht<dt.length;ht++)if(st-=dt[ht].size,st<0)return ht}function ms(it,st,dt,ht){st==null&&(st=it.doc.first),dt==null&&(dt=it.doc.first+it.doc.size),ht||(ht=0);var gt=it.display;if(ht&&dt<gt.viewTo&&(gt.updateLineNumbers==null||gt.updateLineNumbers>st)&&(gt.updateLineNumbers=st),it.curOp.viewChanged=!0,st>=gt.viewTo)ee&&Vn(it.doc,st)<gt.viewTo&&Bs(it);else if(dt<=gt.viewFrom)ee&&qn(it.doc,dt+ht)>gt.viewFrom?Bs(it):(gt.viewFrom+=ht,gt.viewTo+=ht);else if(st<=gt.viewFrom&&dt>=gt.viewTo)Bs(it);else if(st<=gt.viewFrom){var Nt=Na(it,dt,dt+ht,1);Nt?(gt.view=gt.view.slice(Nt.index),gt.viewFrom=Nt.lineN,gt.viewTo+=ht):Bs(it)}else if(dt>=gt.viewTo){var Gt=Na(it,st,st,-1);Gt?(gt.view=gt.view.slice(0,Gt.index),gt.viewTo=Gt.lineN):Bs(it)}else{var Jt=Na(it,st,st,-1),Yt=Na(it,dt,dt+ht,1);Jt&&Yt?(gt.view=gt.view.slice(0,Jt.index).concat(Nr(it,Jt.lineN,Yt.lineN)).concat(gt.view.slice(Yt.index)),gt.viewTo+=ht):Bs(it)}var pe=gt.externalMeasured;pe&&(dt<pe.lineN?pe.lineN+=ht:st<pe.lineN+pe.size&&(gt.externalMeasured=null))}function po(it,st,dt){it.curOp.viewChanged=!0;var ht=it.display,gt=it.display.externalMeasured;if(gt&&st>=gt.lineN&&st<gt.lineN+gt.size&&(ht.externalMeasured=null),!(st<ht.viewFrom||st>=ht.viewTo)){var Nt=ht.view[el(it,st)];if(Nt.node!=null){var Gt=Nt.changes||(Nt.changes=[]);Pn(Gt,dt)==-1&&Gt.push(dt)}}}function Bs(it){it.display.viewFrom=it.display.viewTo=it.doc.first,it.display.view=[],it.display.viewOffset=0}function Na(it,st,dt,ht){var gt=el(it,st),Nt,Gt=it.display.view;if(!ee||dt==it.doc.first+it.doc.size)return{index:gt,lineN:dt};for(var Jt=it.display.viewFrom,Yt=0;Yt<gt;Yt++)Jt+=Gt[Yt].size;if(Jt!=st){if(ht>0){if(gt==Gt.length-1)return null;Nt=Jt+Gt[gt].size-st,gt++}else Nt=Jt-st;st+=Nt,dt+=Nt}for(;Vn(it.doc,dt)!=dt;){if(gt==(ht<0?0:Gt.length-1))return null;dt+=ht*Gt[gt-(ht<0?1:0)].size,gt+=ht}return{index:gt,lineN:dt}}function ns(it,st,dt){var ht=it.display,gt=ht.view;gt.length==0||st>=ht.viewTo||dt<=ht.viewFrom?(ht.view=Nr(it,st,dt),ht.viewFrom=st):(ht.viewFrom>st?ht.view=Nr(it,st,ht.viewFrom).concat(ht.view):ht.viewFrom<st&&(ht.view=ht.view.slice(el(it,st))),ht.viewFrom=st,ht.viewTo<dt?ht.view=ht.view.concat(Nr(it,ht.viewTo,dt)):ht.viewTo>dt&&(ht.view=ht.view.slice(0,el(it,dt)))),ht.viewTo=dt}function nl(it){for(var st=it.display.view,dt=0,ht=0;ht<st.length;ht++){var gt=st[ht];!gt.hidden&&(!gt.node||gt.changes)&&++dt}return dt}function Vs(it){it.display.input.showSelection(it.display.input.prepareSelection())}function zu(it,st){st===void 0&&(st=!0);for(var dt=it.doc,ht={},gt=ht.cursors=document.createDocumentFragment(),Nt=ht.selection=document.createDocumentFragment(),Gt=0;Gt<dt.sel.ranges.length;Gt++)if(!(!st&&Gt==dt.sel.primIndex)){var Jt=dt.sel.ranges[Gt];if(!(Jt.from().line>=it.display.viewTo||Jt.to().line<it.display.viewFrom)){var Yt=Jt.empty();(Yt||it.options.showCursorWhenSelecting)&&Uo(it,Jt.head,gt),Yt||To(it,Jt,Nt)}}return ht}function Uo(it,st,dt){var ht=mo(it,st,"div",null,null,!it.options.singleCursorHeightPerLine),gt=dt.appendChild($t("div","\xA0","CodeMirror-cursor"));if(gt.style.left=ht.left+"px",gt.style.top=ht.top+"px",gt.style.height=Math.max(0,ht.bottom-ht.top)*it.options.cursorHeight+"px",ht.other){var Nt=dt.appendChild($t("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 ea(it,st){return it.top-st.top||it.left-st.left}function To(it,st,dt){var ht=it.display,gt=it.doc,Nt=document.createDocumentFragment(),Gt=zo(it.display),Jt=Gt.left,Yt=Math.max(ht.sizerWidth,ys(it)-ht.sizer.offsetLeft)-Gt.right,pe=gt.direction=="ltr";function qe(xr,Qr,lo,wr){Qr<0&&(Qr=0),Qr=Math.round(Qr),wr=Math.round(wr),Nt.appendChild($t("div",null,"CodeMirror-selected","position: absolute; left: "+xr+`px;
|
|
|
top: `+Qr+"px; width: "+(lo==null?Yt-xr:lo)+`px;
|
|
|
height: `+(wr-Qr)+"px"))}function we(xr,Qr,lo){var wr=Ai(gt,xr),Mo=wr.text.length,Hs,Sa;function Ws(ma,ol){return so(it,on(xr,ma),"div",wr,ol)}function ml(ma,ol,Ia){var vr=cl(it,wr,null,ma),jo=ol=="ltr"==(Ia=="after")?"left":"right",Rs=Ia=="after"?vr.begin:vr.end-(/\s/.test(wr.text.charAt(vr.end-1))?2:1);return Ws(Rs,jo)[jo]}var ba=kn(wr,gt.direction);return ve(ba,Qr||0,lo==null?Mo:lo,function(ma,ol,Ia,vr){var jo=Ia=="ltr",Rs=Ws(ma,jo?"left":"right"),bs=Ws(ol-1,jo?"right":"left"),Ua=Qr==null&&ma==0,Xo=lo==null&&ol==Mo,Co=vr==0,vl=!ba||vr==ba.length-1;if(bs.top-Rs.top<=3){var ta=(pe?Ua:Xo)&&Co,XA=(pe?Xo:Ua)&&vl,zl=ta?Jt:(jo?Rs:bs).left,Ga=XA?Yt:(jo?bs:Rs).right;qe(zl,Rs.top,Ga-zl,Rs.bottom)}else{var yl,Ps,Ba,qu;jo?(yl=pe&&Ua&&Co?Jt:Rs.left,Ps=pe?Yt:ml(ma,Ia,"before"),Ba=pe?Jt:ml(ol,Ia,"after"),qu=pe&&Xo&&vl?Yt:bs.right):(yl=pe?ml(ma,Ia,"before"):Jt,Ps=!pe&&Ua&&Co?Yt:Rs.right,Ba=!pe&&Xo&&vl?Jt:bs.left,qu=pe?ml(ol,Ia,"after"):Yt),qe(yl,Rs.top,Ps-yl,Rs.bottom),Rs.bottom<bs.top&&qe(Jt,Rs.bottom,null,bs.top),qe(Ba,bs.top,qu-Ba,bs.bottom)}(!Hs||ea(Rs,Hs)<0)&&(Hs=Rs),ea(bs,Hs)<0&&(Hs=bs),(!Sa||ea(Rs,Sa)<0)&&(Sa=Rs),ea(bs,Sa)<0&&(Sa=bs)}),{start:Hs,end:Sa}}var Mn=st.from(),wn=st.to();if(Mn.line==wn.line)we(Mn.line,Mn.ch,wn.ch);else{var Si=Ai(gt,Mn.line),bi=Ai(gt,wn.line),zi=Sn(Si)==Sn(bi),rr=we(Mn.line,Mn.ch,zi?Si.text.length+1:null).end,Lr=we(wn.line,zi?0:null,wn.ch).start;zi&&(rr.top<Lr.top-2?(qe(rr.right,rr.top,null,rr.bottom),qe(Jt,Lr.top,Lr.left,Lr.bottom)):qe(rr.right,rr.top,Lr.left-rr.right,rr.bottom)),rr.bottom<Lr.top&&qe(Jt,rr.bottom,null,Lr.top)}dt.appendChild(Nt)}function is(it){if(it.state.focused){var st=it.display;clearInterval(st.blinker);var dt=!0;st.cursorDiv.style.visibility="",it.options.cursorBlinkRate>0?st.blinker=setInterval(function(){it.hasFocus()||dA(it),st.cursorDiv.style.visibility=(dt=!dt)?"":"hidden"},it.options.cursorBlinkRate):it.options.cursorBlinkRate<0&&(st.cursorDiv.style.visibility="hidden")}}function cs(it){it.state.focused||(it.display.input.focus(),_o(it))}function Ms(it){it.state.delayingBlurEvent=!0,setTimeout(function(){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1,dA(it))},100)}function _o(it,st){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1),it.options.readOnly!="nocursor"&&(it.state.focused||(xi(it,"focus",it,st),it.state.focused=!0,Cn(it.display.wrapper,"CodeMirror-focused"),!it.curOp&&it.display.selForContextMenu!=it.doc.sel&&(it.display.input.reset(),ne&&setTimeout(function(){return it.display.input.reset(!0)},20)),it.display.input.receivedFocus()),is(it))}function dA(it,st){it.state.delayingBlurEvent||(it.state.focused&&(xi(it,"blur",it,st),it.state.focused=!1,Qt(it.display.wrapper,"CodeMirror-focused")),clearInterval(it.display.blinker),setTimeout(function(){it.state.focused||(it.display.shift=!1)},150))}function Rr(it){for(var st=it.display,dt=st.lineDiv.offsetTop,ht=0;ht<st.view.length;ht++){var gt=st.view[ht],Nt=it.options.lineWrapping,Gt=void 0,Jt=0;if(!gt.hidden){if(de&&Rt<8){var Yt=gt.node.offsetTop+gt.node.offsetHeight;Gt=Yt-dt,dt=Yt}else{var pe=gt.node.getBoundingClientRect();Gt=pe.bottom-pe.top,!Nt&>.text.firstChild&&(Jt=gt.text.firstChild.getBoundingClientRect().right-pe.left-1)}var qe=gt.line.height-Gt;if((qe>.005||qe<-.005)&&(ui(gt.line,Gt),ju(gt.line),gt.rest))for(var we=0;we<gt.rest.length;we++)ju(gt.rest[we]);if(Jt>it.display.sizerWidth){var Mn=Math.ceil(Jt/vu(it.display));Mn>it.display.maxLineLength&&(it.display.maxLineLength=Mn,it.display.maxLine=gt.line,it.display.maxLineChanged=!0)}}}}function ju(it){if(it.widgets)for(var st=0;st<it.widgets.length;++st){var dt=it.widgets[st],ht=dt.node.parentNode;ht&&(dt.height=ht.offsetHeight)}}function Bo(it,st,dt){var ht=dt&&dt.top!=null?Math.max(0,dt.top):it.scroller.scrollTop;ht=Math.floor(ht-yo(it));var gt=dt&&dt.bottom!=null?dt.bottom:ht+it.wrapper.clientHeight,Nt=rn(st,ht),Gt=rn(st,gt);if(dt&&dt.ensure){var Jt=dt.ensure.from.line,Yt=dt.ensure.to.line;Jt<Nt?(Nt=Jt,Gt=rn(st,Ui(Ai(st,Jt))+it.wrapper.clientHeight)):Math.min(Yt,st.lastLine())>=Gt&&(Nt=rn(st,Ui(Ai(st,Yt))-it.wrapper.clientHeight),Gt=Yt)}return{from:Nt,to:Math.max(Gt,Nt+1)}}function Oh(it,st){if(!Ei(it,"scrollCursorIntoView")){var dt=it.display,ht=dt.sizer.getBoundingClientRect(),gt=null;if(st.top+ht.top<0?gt=!0:st.bottom+ht.top>(window.innerHeight||document.documentElement.clientHeight)&&(gt=!1),gt!=null&&!Le){var Nt=$t("div","\u200B",null,`position: absolute;
|
|
|
top: `+(st.top-dt.viewOffset-yo(it.display))+`px;
|
|
|
height: `+(st.bottom-st.top+Io(it)+dt.barHeight)+`px;
|
|
|
left: `+st.left+"px; width: "+Math.max(2,st.right-st.left)+"px;");it.display.lineSpace.appendChild(Nt),Nt.scrollIntoView(gt),it.display.lineSpace.removeChild(Nt)}}}function Xl(it,st,dt,ht){ht==null&&(ht=0);var gt;!it.options.lineWrapping&&st==dt&&(st=st.ch?on(st.line,st.sticky=="before"?st.ch-1:st.ch,"after"):st,dt=st.sticky=="before"?on(st.line,st.ch+1,"before"):st);for(var Nt=0;Nt<5;Nt++){var Gt=!1,Jt=mo(it,st),Yt=!dt||dt==st?Jt:mo(it,dt);gt={left:Math.min(Jt.left,Yt.left),top:Math.min(Jt.top,Yt.top)-ht,right:Math.max(Jt.left,Yt.left),bottom:Math.max(Jt.bottom,Yt.bottom)+ht};var pe=Hh(it,gt),qe=it.doc.scrollTop,we=it.doc.scrollLeft;if(pe.scrollTop!=null&&(yu(it,pe.scrollTop),Math.abs(it.doc.scrollTop-qe)>1&&(Gt=!0)),pe.scrollLeft!=null&&(wu(it,pe.scrollLeft),Math.abs(it.doc.scrollLeft-we)>1&&(Gt=!0)),!Gt)break}return gt}function TA(it,st){var dt=Hh(it,st);dt.scrollTop!=null&&yu(it,dt.scrollTop),dt.scrollLeft!=null&&wu(it,dt.scrollLeft)}function Hh(it,st){var dt=it.display,ht=dl(it.display);st.top<0&&(st.top=0);var gt=it.curOp&&it.curOp.scrollTop!=null?it.curOp.scrollTop:dt.scroller.scrollTop,Nt=Wo(it),Gt={};st.bottom-st.top>Nt&&(st.bottom=st.top+Nt);var Jt=it.doc.height+Vo(dt),Yt=st.top<ht,pe=st.bottom>Jt-ht;if(st.top<gt)Gt.scrollTop=Yt?0:st.top;else if(st.bottom>gt+Nt){var qe=Math.min(st.top,(pe?Jt:st.bottom)-Nt);qe!=gt&&(Gt.scrollTop=qe)}var we=it.options.fixedGutter?0:dt.gutters.offsetWidth,Mn=it.curOp&&it.curOp.scrollLeft!=null?it.curOp.scrollLeft:dt.scroller.scrollLeft-we,wn=ys(it)-dt.gutters.offsetWidth,Si=st.right-st.left>wn;return Si&&(st.right=st.left+wn),st.left<10?Gt.scrollLeft=0:st.left<Mn?Gt.scrollLeft=Math.max(0,st.left+we-(Si?0:10)):st.right>wn+Mn-3&&(Gt.scrollLeft=st.right+(Si?0:10)-wn),Gt}function ch(it,st){st!=null&&(Ol(it),it.curOp.scrollTop=(it.curOp.scrollTop==null?it.doc.scrollTop:it.curOp.scrollTop)+st)}function lu(it){Ol(it);var st=it.getCursor();it.curOp.scrollToPos={from:st,to:st,margin:it.options.cursorScrollMargin}}function uu(it,st,dt){(st!=null||dt!=null)&&Ol(it),st!=null&&(it.curOp.scrollLeft=st),dt!=null&&(it.curOp.scrollTop=dt)}function Ho(it,st){Ol(it),it.curOp.scrollToPos=st}function Ol(it){var st=it.curOp.scrollToPos;if(st){it.curOp.scrollToPos=null;var dt=Xs(it,st.from),ht=Xs(it,st.to);dh(it,dt,ht,st.margin)}}function dh(it,st,dt,ht){var gt=Hh(it,{left:Math.min(st.left,dt.left),top:Math.min(st.top,dt.top)-ht,right:Math.max(st.right,dt.right),bottom:Math.max(st.bottom,dt.bottom)+ht});uu(it,gt.scrollLeft,gt.scrollTop)}function yu(it,st){Math.abs(it.doc.scrollTop-st)<2||(Pt||Su(it,{top:st}),fA(it,st,!0),Pt&&Su(it),DA(it,100))}function fA(it,st,dt){st=Math.max(0,Math.min(it.display.scroller.scrollHeight-it.display.scroller.clientHeight,st)),!(it.display.scroller.scrollTop==st&&!dt)&&(it.doc.scrollTop=st,it.display.scrollbars.setScrollTop(st),it.display.scroller.scrollTop!=st&&(it.display.scroller.scrollTop=st))}function wu(it,st,dt,ht){st=Math.max(0,Math.min(st,it.display.scroller.scrollWidth-it.display.scroller.clientWidth)),!((dt?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 wo(it){var st=it.display,dt=st.gutters.offsetWidth,ht=Math.round(it.doc.height+Vo(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?dt:0,docHeight:ht,scrollHeight:ht+Io(it)+st.barHeight,nativeBarWidth:st.nativeBarWidth,gutterWidth:dt}}var Qo=function(it,st,dt){this.cm=dt;var ht=this.vert=$t("div",[$t("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),gt=this.horiz=$t("div",[$t("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");ht.tabIndex=gt.tabIndex=-1,it(ht),it(gt),gn(ht,"scroll",function(){ht.clientHeight&&st(ht.scrollTop,"vertical")}),gn(gt,"scroll",function(){gt.clientWidth&&st(gt.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,de&&Rt<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Qo.prototype.update=function(it){var st=it.scrollWidth>it.clientWidth+1,dt=it.scrollHeight>it.clientHeight+1,ht=it.nativeBarWidth;if(dt){this.vert.style.display="block",this.vert.style.bottom=st?ht+"px":"0";var gt=it.viewHeight-(st?ht:0);this.vert.firstChild.style.height=Math.max(0,it.scrollHeight-it.clientHeight+gt)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(st){this.horiz.style.display="block",this.horiz.style.right=dt?ht+"px":"0",this.horiz.style.left=it.barLeft+"px";var Nt=it.viewWidth-it.barLeft-(dt?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:dt?ht:0,bottom:st?ht:0}},Qo.prototype.setScrollLeft=function(it){this.horiz.scrollLeft!=it&&(this.horiz.scrollLeft=it),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Qo.prototype.setScrollTop=function(it){this.vert.scrollTop!=it&&(this.vert.scrollTop=it),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Qo.prototype.zeroWidthHack=function(){var it=At&&!qt?"12px":"18px";this.horiz.style.height=this.vert.style.width=it,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new re,this.disableVert=new re},Qo.prototype.enableZeroWidthBar=function(it,st,dt){it.style.pointerEvents="auto";function ht(){var gt=it.getBoundingClientRect(),Nt=dt=="vert"?document.elementFromPoint(gt.right-1,(gt.top+gt.bottom)/2):document.elementFromPoint((gt.right+gt.left)/2,gt.bottom-1);Nt!=it?it.style.pointerEvents="none":st.set(1e3,ht)}st.set(1e3,ht)},Qo.prototype.clear=function(){var it=this.horiz.parentNode;it.removeChild(this.horiz),it.removeChild(this.vert)};var Us=function(){};Us.prototype.update=function(){return{bottom:0,right:0}},Us.prototype.setScrollLeft=function(){},Us.prototype.setScrollTop=function(){},Us.prototype.clear=function(){};function na(it,st){st||(st=wo(it));var dt=it.display.barWidth,ht=it.display.barHeight;fa(it,st);for(var gt=0;gt<4&&dt!=it.display.barWidth||ht!=it.display.barHeight;gt++)dt!=it.display.barWidth&&it.options.lineWrapping&&Rr(it),fa(it,wo(it)),dt=it.display.barWidth,ht=it.display.barHeight}function fa(it,st){var dt=it.display,ht=dt.scrollbars.update(st);dt.sizer.style.paddingRight=(dt.barWidth=ht.right)+"px",dt.sizer.style.paddingBottom=(dt.barHeight=ht.bottom)+"px",dt.heightForcer.style.borderBottom=ht.bottom+"px solid transparent",ht.right&&ht.bottom?(dt.scrollbarFiller.style.display="block",dt.scrollbarFiller.style.height=ht.bottom+"px",dt.scrollbarFiller.style.width=ht.right+"px"):dt.scrollbarFiller.style.display="",ht.bottom&&it.options.coverGutterNextToScrollbar&&it.options.fixedGutter?(dt.gutterFiller.style.display="block",dt.gutterFiller.style.height=ht.bottom+"px",dt.gutterFiller.style.width=st.gutterWidth+"px"):dt.gutterFiller.style.display=""}var Vu={native:Qo,null:Us};function xu(it){it.display.scrollbars&&(it.display.scrollbars.clear(),it.display.scrollbars.addClass&&Qt(it.display.wrapper,it.display.scrollbars.addClass)),it.display.scrollbars=new Vu[it.options.scrollbarStyle](function(st){it.display.wrapper.insertBefore(st,it.display.scrollbarFiller),gn(st,"mousedown",function(){it.state.focused&&setTimeout(function(){return it.display.input.focus()},0)}),st.setAttribute("cm-not-content","true")},function(st,dt){dt=="horizontal"?wu(it,st):yu(it,st)},it),it.display.scrollbars.addClass&&Cn(it.display.wrapper,it.display.scrollbars.addClass)}var Wu=0;function Hl(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:++Wu},ks(it.curOp)}function Au(it){var st=it.curOp;st&&la(st,function(dt){for(var ht=0;ht<dt.ops.length;ht++)dt.ops[ht].cm.curOp=null;qg(dt)})}function qg(it){for(var st=it.ops,dt=0;dt<st.length;dt++)$g(st[dt]);for(var ht=0;ht<st.length;ht++)tp(st[ht]);for(var gt=0;gt<st.length;gt++)sg(st[gt]);for(var Nt=0;Nt<st.length;Nt++)Qs(st[Nt]);for(var Gt=0;Gt<st.length;Gt++)NA(st[Gt])}function $g(it){var st=it.cm,dt=st.display;ag(st),it.updateMaxLine&&Ji(st),it.mustUpdate=it.viewChanged||it.forceUpdate||it.scrollTop!=null||it.scrollToPos&&(it.scrollToPos.from.line<dt.viewFrom||it.scrollToPos.to.line>=dt.viewTo)||dt.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,dt=st.display;it.updatedDisplay&&Rr(st),it.barMeasure=wo(st),dt.maxLineChanged&&!st.options.lineWrapping&&(it.adjustWidthTo=_a(st,dt.maxLine,dt.maxLine.text.length).left+3,st.display.sizerWidth=it.adjustWidthTo,it.barMeasure.scrollWidth=Math.max(dt.scroller.clientWidth,dt.sizer.offsetLeft+it.adjustWidthTo+Io(st)+st.display.barWidth),it.maxScrollLeft=Math.max(0,dt.sizer.offsetLeft+it.adjustWidthTo-ys(st))),(it.updatedDisplay||it.selectionChanged)&&(it.preparedSelection=dt.input.prepareSelection())}function Qs(it){var st=it.cm;it.adjustWidthTo!=null&&(st.display.sizer.style.minWidth=it.adjustWidthTo+"px",it.maxScrollLeft<st.doc.scrollLeft&&wu(st,Math.min(st.display.scroller.scrollLeft,it.maxScrollLeft),!0),st.display.maxLineChanged=!1);var dt=it.focus&&it.focus==tn();it.preparedSelection&&st.display.input.showSelection(it.preparedSelection,dt),(it.updatedDisplay||it.startHeight!=st.doc.height)&&na(st,it.barMeasure),it.updatedDisplay&&UA(st,it.barMeasure),it.selectionChanged&&is(st),st.state.focused&&it.updateInput&&st.display.input.reset(it.typing),dt&&cs(it.cm)}function NA(it){var st=it.cm,dt=st.display,ht=st.doc;if(it.updatedDisplay&&ds(st,it.update),dt.wheelStartX!=null&&(it.scrollTop!=null||it.scrollLeft!=null||it.scrollToPos)&&(dt.wheelStartX=dt.wheelStartY=null),it.scrollTop!=null&&fA(st,it.scrollTop,it.forceScroll),it.scrollLeft!=null&&wu(st,it.scrollLeft,!0,!0),it.scrollToPos){var gt=Xl(st,ai(ht,it.scrollToPos.from),ai(ht,it.scrollToPos.to),it.scrollToPos.margin);Oh(st,gt)}var Nt=it.maybeHiddenMarkers,Gt=it.maybeUnhiddenMarkers;if(Nt)for(var Jt=0;Jt<Nt.length;++Jt)Nt[Jt].lines.length||xi(Nt[Jt],"hide");if(Gt)for(var Yt=0;Yt<Gt.length;++Yt)Gt[Yt].lines.length&&xi(Gt[Yt],"unhide");dt.wrapper.offsetHeight&&(ht.scrollTop=st.display.scroller.scrollTop),it.changeObjs&&xi(st,"changes",st,it.changeObjs),it.update&&it.update.finish()}function rs(it,st){if(it.curOp)return st();Hl(it);try{return st()}finally{Au(it)}}function ga(it,st){return function(){if(it.curOp)return st.apply(it,arguments);Hl(it);try{return st.apply(it,arguments)}finally{Au(it)}}}function Pa(it){return function(){if(this.curOp)return it.apply(this,arguments);Hl(this);try{return it.apply(this,arguments)}finally{Au(this)}}}function Fa(it){return function(){var st=this.cm;if(!st||st.curOp)return it.apply(this,arguments);Hl(st);try{return it.apply(this,arguments)}finally{Au(st)}}}function DA(it,st){it.doc.highlightFrontier<it.display.viewTo&&it.state.highlight.set(st,$n(ua,it))}function ua(it){var st=it.doc;if(!(st.highlightFrontier>=it.display.viewTo)){var dt=+new Date+it.options.workTime,ht=Kr(it,st.highlightFrontier),gt=[];st.iter(ht.line,Math.min(st.first+st.size,it.display.viewTo+500),function(Nt){if(ht.line>=it.display.viewFrom){var Gt=Nt.styles,Jt=Nt.text.length>it.options.maxHighlightLength?fi(st.mode,ht.state):null,Yt=br(it,Nt,ht,!0);Jt&&(ht.state=Jt),Nt.styles=Yt.styles;var pe=Nt.styleClasses,qe=Yt.classes;qe?Nt.styleClasses=qe:pe&&(Nt.styleClasses=null);for(var we=!Gt||Gt.length!=Nt.styles.length||pe!=qe&&(!pe||!qe||pe.bgClass!=qe.bgClass||pe.textClass!=qe.textClass),Mn=0;!we&&Mn<Gt.length;++Mn)we=Gt[Mn]!=Nt.styles[Mn];we&>.push(ht.line),Nt.stateAfter=ht.save(),ht.nextLine()}else Nt.text.length<=it.options.maxHighlightLength&&Ze(it,Nt.text,ht),Nt.stateAfter=ht.line%5==0?ht.save():null,ht.nextLine();if(+new Date>dt)return DA(it,it.options.workDelay),!0}),st.highlightFrontier=ht.line,st.modeFrontier=Math.max(st.modeFrontier,ht.line),gt.length&&rs(it,function(){for(var Nt=0;Nt<gt.length;Nt++)po(it,gt[Nt],"text")})}}var fh=function(it,st,dt){var ht=it.display;this.viewport=st,this.visible=Bo(ht,it.doc,st),this.editorIsHidden=!ht.wrapper.offsetWidth,this.wrapperHeight=ht.wrapper.clientHeight,this.wrapperWidth=ht.wrapper.clientWidth,this.oldDisplayWidth=ys(it),this.force=dt,this.dims=cA(it),this.events=[]};fh.prototype.signal=function(it,st){Qi(it,st)&&this.events.push(arguments)},fh.prototype.finish=function(){for(var it=0;it<this.events.length;it++)xi.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=Io(it)+"px",st.sizer.style.marginBottom=-st.nativeBarWidth+"px",st.sizer.style.borderRightWidth=Io(it)+"px",st.scrollbarsClipped=!0)}function lg(it){if(it.hasFocus())return null;var st=tn();if(!st||!$e(it.display.lineDiv,st))return null;var dt={activeElt:st};if(window.getSelection){var ht=window.getSelection();ht.anchorNode&&ht.extend&&$e(it.display.lineDiv,ht.anchorNode)&&(dt.anchorNode=ht.anchorNode,dt.anchorOffset=ht.anchorOffset,dt.focusNode=ht.focusNode,dt.focusOffset=ht.focusOffset)}return dt}function fl(it){if(!(!it||!it.activeElt||it.activeElt==tn())&&(it.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(it.activeElt.nodeName)&&it.anchorNode&&$e(document.body,it.anchorNode)&&$e(document.body,it.focusNode))){var st=window.getSelection(),dt=document.createRange();dt.setEnd(it.anchorNode,it.anchorOffset),dt.collapse(!1),st.removeAllRanges(),st.addRange(dt),st.extend(it.focusNode,it.focusOffset)}}function Fd(it,st){var dt=it.display,ht=it.doc;if(st.editorIsHidden)return Bs(it),!1;if(!st.force&&st.visible.from>=dt.viewFrom&&st.visible.to<=dt.viewTo&&(dt.updateLineNumbers==null||dt.updateLineNumbers>=dt.viewTo)&&dt.renderedView==dt.view&&nl(it)==0)return!1;Aa(it)&&(Bs(it),st.dims=cA(it));var gt=ht.first+ht.size,Nt=Math.max(st.visible.from-it.options.viewportMargin,ht.first),Gt=Math.min(gt,st.visible.to+it.options.viewportMargin);dt.viewFrom<Nt&&Nt-dt.viewFrom<20&&(Nt=Math.max(ht.first,dt.viewFrom)),dt.viewTo>Gt&&dt.viewTo-Gt<20&&(Gt=Math.min(gt,dt.viewTo)),ee&&(Nt=Vn(it.doc,Nt),Gt=qn(it.doc,Gt));var Jt=Nt!=dt.viewFrom||Gt!=dt.viewTo||dt.lastWrapHeight!=st.wrapperHeight||dt.lastWrapWidth!=st.wrapperWidth;ns(it,Nt,Gt),dt.viewOffset=Ui(Ai(it.doc,dt.viewFrom)),it.display.mover.style.top=dt.viewOffset+"px";var Yt=nl(it);if(!Jt&&Yt==0&&!st.force&&dt.renderedView==dt.view&&(dt.updateLineNumbers==null||dt.updateLineNumbers>=dt.viewTo))return!1;var pe=lg(it);return Yt>4&&(dt.lineDiv.style.display="none"),cf(it,dt.updateLineNumbers,st.dims),Yt>4&&(dt.lineDiv.style.display=""),dt.renderedView=dt.view,fl(pe),Vt(dt.cursorDiv),Vt(dt.selectionDiv),dt.gutters.style.height=dt.sizer.style.minHeight=0,Jt&&(dt.lastWrapHeight=st.wrapperHeight,dt.lastWrapWidth=st.wrapperWidth,DA(it,400)),dt.updateLineNumbers=null,!0}function ds(it,st){for(var dt=st.viewport,ht=!0;;ht=!1){if(!ht||!it.options.lineWrapping||st.oldDisplayWidth==ys(it)){if(dt&&dt.top!=null&&(dt={top:Math.min(it.doc.height+Vo(it.display)-Wo(it),dt.top)}),st.visible=Bo(it.display,it.doc,dt),st.visible.from>=it.display.viewFrom&&st.visible.to<=it.display.viewTo)break}else ht&&(st.visible=Bo(it.display,it.doc,dt));if(!Fd(it,st))break;Rr(it);var gt=wo(it);Vs(it),na(it,gt),UA(it,gt),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 Su(it,st){var dt=new fh(it,st);if(Fd(it,dt)){Rr(it),ds(it,dt);var ht=wo(it);Vs(it),na(it,ht),UA(it,ht),dt.finish()}}function cf(it,st,dt){var ht=it.display,gt=it.options.lineNumbers,Nt=ht.lineDiv,Gt=Nt.firstChild;function Jt(Si){var bi=Si.nextSibling;return ne&&At&&it.display.currentWheelTarget==Si?Si.style.display="none":Si.parentNode.removeChild(Si),bi}for(var Yt=ht.view,pe=ht.viewFrom,qe=0;qe<Yt.length;qe++){var we=Yt[qe];if(!we.hidden)if(!we.node||we.node.parentNode!=Nt){var Mn=Ts(it,we,pe,dt);Nt.insertBefore(Mn,Gt)}else{for(;Gt!=we.node;)Gt=Jt(Gt);var wn=gt&&st!=null&&st<=pe&&we.lineNumber;we.changes&&(Pn(we.changes,"gutter")>-1&&(wn=!1),os(it,we,pe,dt)),wn&&(Vt(we.lineNumber),we.lineNumber.appendChild(document.createTextNode(pi(it.options,pe)))),Gt=we.node.nextSibling}pe+=we.size}for(;Gt;)Gt=Jt(Gt)}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+Io(it)+"px"}function Ed(it){var st=it.display,dt=st.view;if(!(!st.alignWidgets&&(!st.gutters.firstChild||!it.options.fixedGutter))){for(var ht=au(st)-st.scroller.scrollLeft+it.doc.scrollLeft,gt=st.gutters.offsetWidth,Nt=ht+"px",Gt=0;Gt<dt.length;Gt++)if(!dt[Gt].hidden){it.options.fixedGutter&&(dt[Gt].gutter&&(dt[Gt].gutter.style.left=Nt),dt[Gt].gutterBackground&&(dt[Gt].gutterBackground.style.left=Nt));var Jt=dt[Gt].alignable;if(Jt)for(var Yt=0;Yt<Jt.length;Yt++)Jt[Yt].style.left=Nt}it.options.fixedGutter&&(st.gutters.style.left=ht+gt+"px")}}function Aa(it){if(!it.options.lineNumbers)return!1;var st=it.doc,dt=pi(it.options,st.first+st.size-1),ht=it.display;if(dt.length!=ht.lineNumChars){var gt=ht.measure.appendChild($t("div",[$t("div",dt)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Nt=gt.firstChild.offsetWidth,Gt=gt.offsetWidth-Nt;return ht.lineGutter.style.width="",ht.lineNumInnerWidth=Math.max(Nt,ht.lineGutter.offsetWidth-Gt)+1,ht.lineNumWidth=ht.lineNumInnerWidth+Gt,ht.lineNumChars=ht.lineNumInnerWidth?dt.length:-1,ht.lineGutter.style.width=ht.lineNumWidth+"px",IA(it.display),!0}return!1}function Ea(it,st){for(var dt=[],ht=!1,gt=0;gt<it.length;gt++){var Nt=it[gt],Gt=null;if(typeof Nt!="string"&&(Gt=Nt.style,Nt=Nt.className),Nt=="CodeMirror-linenumbers")if(st)ht=!0;else continue;dt.push({className:Nt,style:Gt})}return st&&!ht&&dt.push({className:"CodeMirror-linenumbers",style:null}),dt}function gh(it){var st=it.gutters,dt=it.gutterSpecs;Vt(st),it.lineGutter=null;for(var ht=0;ht<dt.length;++ht){var gt=dt[ht],Nt=gt.className,Gt=gt.style,Jt=st.appendChild($t("div",null,"CodeMirror-gutter "+Nt));Gt&&(Jt.style.cssText=Gt),Nt=="CodeMirror-linenumbers"&&(it.lineGutter=Jt,Jt.style.width=(it.lineNumWidth||1)+"px")}st.style.display=dt.length?"":"none",IA(it)}function Rl(it){gh(it.display),ms(it),Ed(it)}function QA(it,st,dt,ht){var gt=this;this.input=dt,gt.scrollbarFiller=$t("div",null,"CodeMirror-scrollbar-filler"),gt.scrollbarFiller.setAttribute("cm-not-content","true"),gt.gutterFiller=$t("div",null,"CodeMirror-gutter-filler"),gt.gutterFiller.setAttribute("cm-not-content","true"),gt.lineDiv=Pe("div",null,"CodeMirror-code"),gt.selectionDiv=$t("div",null,null,"position: relative; z-index: 1"),gt.cursorDiv=$t("div",null,"CodeMirror-cursors"),gt.measure=$t("div",null,"CodeMirror-measure"),gt.lineMeasure=$t("div",null,"CodeMirror-measure"),gt.lineSpace=Pe("div",[gt.measure,gt.lineMeasure,gt.selectionDiv,gt.cursorDiv,gt.lineDiv],null,"position: relative; outline: none");var Nt=Pe("div",[gt.lineSpace],"CodeMirror-lines");gt.mover=$t("div",[Nt],null,"position: relative"),gt.sizer=$t("div",[gt.mover],"CodeMirror-sizer"),gt.sizerWidth=null,gt.heightForcer=$t("div",null,null,"position: absolute; height: "+li+"px; width: 1px;"),gt.gutters=$t("div",null,"CodeMirror-gutters"),gt.lineGutter=null,gt.scroller=$t("div",[gt.sizer,gt.heightForcer,gt.gutters],"CodeMirror-scroll"),gt.scroller.setAttribute("tabIndex","-1"),gt.wrapper=$t("div",[gt.scrollbarFiller,gt.gutterFiller,gt.scroller],"CodeMirror"),de&&Rt<8&&(gt.gutters.style.zIndex=-1,gt.scroller.style.paddingRight=0),!ne&&!(Pt&&et)&&(gt.scroller.draggable=!0),it&&(it.appendChild?it.appendChild(gt.wrapper):it(gt.wrapper)),gt.viewFrom=gt.viewTo=st.first,gt.reportedViewFrom=gt.reportedViewTo=st.first,gt.view=[],gt.renderedView=null,gt.externalMeasured=null,gt.viewOffset=0,gt.lastWrapHeight=gt.lastWrapWidth=0,gt.updateLineNumbers=null,gt.nativeBarWidth=gt.barHeight=gt.barWidth=0,gt.scrollbarsClipped=!1,gt.lineNumWidth=gt.lineNumInnerWidth=gt.lineNumChars=null,gt.alignWidgets=!1,gt.cachedCharWidth=gt.cachedTextHeight=gt.cachedPaddingH=null,gt.maxLine=null,gt.maxLineLength=0,gt.maxLineChanged=!1,gt.wheelDX=gt.wheelDY=gt.wheelStartX=gt.wheelStartY=null,gt.shift=!1,gt.selForContextMenu=null,gt.activeTouch=null,gt.gutterSpecs=Ea(ht.gutters,ht.lineNumbers),gh(gt),dt.init(gt)}var El=0,ia=null;de?ia=-.53:Pt?ia=15:ce?ia=-.7:Ne&&(ia=-1/3);function Bu(it){var st=it.wheelDeltaX,dt=it.wheelDeltaY;return st==null&&it.detail&&it.axis==it.HORIZONTAL_AXIS&&(st=it.detail),dt==null&&it.detail&&it.axis==it.VERTICAL_AXIS?dt=it.detail:dt==null&&(dt=it.wheelDelta),{x:st,y:dt}}function Ll(it){var st=Bu(it);return st.x*=ia,st.y*=ia,st}function La(it,st){var dt=Bu(st),ht=dt.x,gt=dt.y,Nt=it.display,Gt=Nt.scroller,Jt=Gt.scrollWidth>Gt.clientWidth,Yt=Gt.scrollHeight>Gt.clientHeight;if(ht&&Jt||gt&&Yt){if(gt&&At&&ne){t:for(var pe=st.target,qe=Nt.view;pe!=Gt;pe=pe.parentNode)for(var we=0;we<qe.length;we++)if(qe[we].node==pe){it.display.currentWheelTarget=pe;break t}}if(ht&&!Pt&&!Wt&&ia!=null){gt&&Yt&&yu(it,Math.max(0,Gt.scrollTop+gt*ia)),wu(it,Math.max(0,Gt.scrollLeft+ht*ia)),(!gt||gt&&Yt)&&Yi(st),Nt.wheelStartX=null;return}if(gt&&ia!=null){var Mn=gt*ia,wn=it.doc.scrollTop,Si=wn+Nt.wrapper.clientHeight;Mn<0?wn=Math.max(0,wn+Mn-50):Si=Math.min(it.doc.height,Si+Mn+50),Su(it,{top:wn,bottom:Si})}El<20&&(Nt.wheelStartX==null?(Nt.wheelStartX=Gt.scrollLeft,Nt.wheelStartY=Gt.scrollTop,Nt.wheelDX=ht,Nt.wheelDY=gt,setTimeout(function(){if(Nt.wheelStartX!=null){var bi=Gt.scrollLeft-Nt.wheelStartX,zi=Gt.scrollTop-Nt.wheelStartY,rr=zi&&Nt.wheelDY&&zi/Nt.wheelDY||bi&&Nt.wheelDX&&bi/Nt.wheelDX;Nt.wheelStartX=Nt.wheelStartY=null,rr&&(ia=(ia*El+rr)/(El+1),++El)}},200)):(Nt.wheelDX+=ht,Nt.wheelDY+=gt))}}var Jl=function(it,st){this.ranges=it,this.primIndex=st};Jl.prototype.primary=function(){return this.ranges[this.primIndex]},Jl.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 dt=this.ranges[st],ht=it.ranges[st];if(!ii(dt.anchor,ht.anchor)||!ii(dt.head,ht.head))return!1}return!0},Jl.prototype.deepCopy=function(){for(var it=[],st=0;st<this.ranges.length;st++)it[st]=new fs(hn(this.ranges[st].anchor),hn(this.ranges[st].head));return new Jl(it,this.primIndex)},Jl.prototype.somethingSelected=function(){for(var it=0;it<this.ranges.length;it++)if(!this.ranges[it].empty())return!0;return!1},Jl.prototype.contains=function(it,st){st||(st=it);for(var dt=0;dt<this.ranges.length;dt++){var ht=this.ranges[dt];if(yn(st,ht.from())>=0&&yn(it,ht.to())<=0)return dt}return-1};var fs=function(it,st){this.anchor=it,this.head=st};fs.prototype.from=function(){return xn(this.anchor,this.head)},fs.prototype.to=function(){return An(this.anchor,this.head)},fs.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function gl(it,st,dt){var ht=it&&it.options.selectionsMayTouch,gt=st[dt];st.sort(function(Mn,wn){return yn(Mn.from(),wn.from())}),dt=Pn(st,gt);for(var Nt=1;Nt<st.length;Nt++){var Gt=st[Nt],Jt=st[Nt-1],Yt=yn(Jt.to(),Gt.from());if(ht&&!Gt.empty()?Yt>0:Yt>=0){var pe=xn(Jt.from(),Gt.from()),qe=An(Jt.to(),Gt.to()),we=Jt.empty()?Gt.from()==Gt.head:Jt.from()==Jt.head;Nt<=dt&&--dt,st.splice(--Nt,2,new fs(we?qe:pe,we?pe:qe))}}return new Jl(st,dt)}function gA(it,st){return new Jl([new fs(it,st||it)],0)}function OA(it){return it.text?on(it.from.line+it.text.length-1,Ee(it.text).length+(it.text.length==1?it.from.ch:0)):it.to}function HA(it,st){if(yn(it,st.from)<0)return it;if(yn(it,st.to)<=0)return OA(st);var dt=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),on(dt,ht)}function Qc(it,st){for(var dt=[],ht=0;ht<it.sel.ranges.length;ht++){var gt=it.sel.ranges[ht];dt.push(new fs(HA(gt.anchor,st),HA(gt.head,st)))}return gl(it.cm,dt,it.sel.primIndex)}function Rh(it,st,dt){return it.line==st.line?on(dt.line,it.ch-st.ch+dt.ch):on(dt.line+(it.line-st.line),it.ch)}function Oc(it,st,dt){for(var ht=[],gt=on(it.first,0),Nt=gt,Gt=0;Gt<st.length;Gt++){var Jt=st[Gt],Yt=Rh(Jt.from,gt,Nt),pe=Rh(OA(Jt),gt,Nt);if(gt=Jt.to,Nt=pe,dt=="around"){var qe=it.sel.ranges[Gt],we=yn(qe.head,qe.anchor)<0;ht[Gt]=new fs(we?pe:Yt,we?Yt:pe)}else ht[Gt]=new fs(Yt,Yt)}return new Jl(ht,it.sel.primIndex)}function Lo(it){it.doc.mode=je(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&&ms(it)}function df(it,st){return st.from.ch==0&&st.to.ch==0&&Ee(st.text)==""&&(!it.cm||it.cm.options.wholeLineUpdateBefore)}function Ld(it,st,dt,ht){function gt(Lr){return dt?dt[Lr]:null}function Nt(Lr,xr,Qr){dr(Lr,xr,Qr,ht),sr(Lr,"change",Lr,st)}function Gt(Lr,xr){for(var Qr=[],lo=Lr;lo<xr;++lo)Qr.push(new fr(pe[lo],gt(lo),ht));return Qr}var Jt=st.from,Yt=st.to,pe=st.text,qe=Ai(it,Jt.line),we=Ai(it,Yt.line),Mn=Ee(pe),wn=gt(pe.length-1),Si=Yt.line-Jt.line;if(st.full)it.insert(0,Gt(0,pe.length)),it.remove(pe.length,it.size-pe.length);else if(df(it,st)){var bi=Gt(0,pe.length-1);Nt(we,we.text,wn),Si&&it.remove(Jt.line,Si),bi.length&&it.insert(Jt.line,bi)}else if(qe==we)if(pe.length==1)Nt(qe,qe.text.slice(0,Jt.ch)+Mn+qe.text.slice(Yt.ch),wn);else{var zi=Gt(1,pe.length-1);zi.push(new fr(Mn+qe.text.slice(Yt.ch),wn,ht)),Nt(qe,qe.text.slice(0,Jt.ch)+pe[0],gt(0)),it.insert(Jt.line+1,zi)}else if(pe.length==1)Nt(qe,qe.text.slice(0,Jt.ch)+pe[0]+we.text.slice(Yt.ch),gt(0)),it.remove(Jt.line+1,Si);else{Nt(qe,qe.text.slice(0,Jt.ch)+pe[0],gt(0)),Nt(we,Mn+we.text.slice(Yt.ch),wn);var rr=Gt(1,pe.length-1);Si>1&&it.remove(Jt.line+1,Si-1),it.insert(Jt.line+1,rr)}sr(it,"change",it,st)}function Cu(it,st,dt){function ht(gt,Nt,Gt){if(gt.linked)for(var Jt=0;Jt<gt.linked.length;++Jt){var Yt=gt.linked[Jt];if(Yt.doc!=Nt){var pe=Gt&&Yt.sharedHist;dt&&!pe||(st(Yt.doc,pe),ht(Yt.doc,gt,pe))}}}ht(it,null,!0)}function pa(it,st){if(st.cm)throw new Error("This document is already in use.");it.doc=st,st.cm=it,_r(it),Lo(it),Rc(it),it.options.lineWrapping||Ji(it),it.options.mode=st.modeOption,ms(it)}function Rc(it){(it.doc.direction=="rtl"?Cn:Qt)(it.display.lineDiv,"CodeMirror-rtl")}function ep(it){rs(it,function(){Rc(it),ms(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 dt={from:hn(st.from),to:OA(st),text:We(it,st.from,st.to)};return RA(it,dt,st.from.line,st.to.line+1),Cu(it,function(ht){return RA(ht,dt,st.from.line,st.to.line+1)},!0),dt}function Kh(it){for(;it.length;){var st=Ee(it);if(st.ranges)it.pop();else break}}function Gh(it,st){if(st)return Kh(it.done),Ee(it.done);if(it.done.length&&!Ee(it.done).ranges)return Ee(it.done);if(it.done.length>1&&!it.done[it.done.length-2].ranges)return it.done.pop(),Ee(it.done)}function _c(it,st,dt,ht){var gt=it.history;gt.undone.length=0;var Nt=+new Date,Gt,Jt;if((gt.lastOp==ht||gt.lastOrigin==st.origin&&st.origin&&(st.origin.charAt(0)=="+"&>.lastModTime>Nt-(it.cm?it.cm.options.historyEventDelay:500)||st.origin.charAt(0)=="*"))&&(Gt=Gh(gt,gt.lastOp==ht)))Jt=Ee(Gt.changes),yn(st.from,st.to)==0&&yn(st.from,Jt.to)==0?Jt.to=OA(st):Gt.changes.push(Md(it,st));else{var Yt=Ee(gt.done);for((!Yt||!Yt.ranges)&&zh(it.sel,gt.done),Gt={changes:[Md(it,st)],generation:gt.generation},gt.done.push(Gt);gt.done.length>gt.undoDepth;)gt.done.shift(),gt.done[0].ranges||gt.done.shift()}gt.done.push(dt),gt.generation=++gt.maxGeneration,gt.lastModTime=gt.lastSelTime=Nt,gt.lastOp=gt.lastSelOp=ht,gt.lastOrigin=gt.lastSelOrigin=st.origin,Jt||xi(it,"historyAdded")}function ff(it,st,dt,ht){var gt=st.charAt(0);return gt=="*"||gt=="+"&&dt.ranges.length==ht.ranges.length&&dt.somethingSelected()==ht.somethingSelected()&&new Date-it.history.lastSelTime<=(it.cm?it.cm.options.historyEventDelay:500)}function Kc(it,st,dt,ht){var gt=it.history,Nt=ht&&ht.origin;dt==gt.lastSelOp||Nt&>.lastSelOrigin==Nt&&(gt.lastModTime==gt.lastSelTime&>.lastOrigin==Nt||ff(it,Nt,Ee(gt.done),st))?gt.done[gt.done.length-1]=st:zh(st,gt.done),gt.lastSelTime=+new Date,gt.lastSelOrigin=Nt,gt.lastSelOp=dt,ht&&ht.clearRedo!==!1&&Kh(gt.undone)}function zh(it,st){var dt=Ee(st);dt&&dt.ranges&&dt.equals(it)||st.push(it)}function RA(it,st,dt,ht){var gt=st["spans_"+it.id],Nt=0;it.iter(Math.max(it.first,dt),Math.min(it.first+it.size,ht),function(Gt){Gt.markedSpans&&((gt||(gt=st["spans_"+it.id]={}))[Nt]=Gt.markedSpans),++Nt})}function il(it){if(!it)return null;for(var st,dt=0;dt<it.length;++dt)it[dt].marker.explicitlyCleared?st||(st=it.slice(0,dt)):st&&st.push(it[dt]);return st?st.length?st:null:it}function Pu(it,st){var dt=st["spans_"+it.id];if(!dt)return null;for(var ht=[],gt=0;gt<st.text.length;++gt)ht.push(il(dt[gt]));return ht}function zr(it,st){var dt=Pu(it,st),ht=yi(it,st);if(!dt)return ht;if(!ht)return dt;for(var gt=0;gt<dt.length;++gt){var Nt=dt[gt],Gt=ht[gt];if(Nt&&Gt)t:for(var Jt=0;Jt<Gt.length;++Jt){for(var Yt=Gt[Jt],pe=0;pe<Nt.length;++pe)if(Nt[pe].marker==Yt.marker)continue t;Nt.push(Yt)}else Gt&&(dt[gt]=Gt)}return dt}function pA(it,st,dt){for(var ht=[],gt=0;gt<it.length;++gt){var Nt=it[gt];if(Nt.ranges){ht.push(dt?Jl.prototype.deepCopy.call(Nt):Nt);continue}var Gt=Nt.changes,Jt=[];ht.push({changes:Jt});for(var Yt=0;Yt<Gt.length;++Yt){var pe=Gt[Yt],qe=void 0;if(Jt.push({from:pe.from,to:pe.to,text:pe.text}),st)for(var we in pe)(qe=we.match(/^spans_(\d+)$/))&&Pn(st,Number(qe[1]))>-1&&(Ee(Jt)[we]=pe[we],delete pe[we])}}return ht}function bd(it,st,dt,ht){if(ht){var gt=it.anchor;if(dt){var Nt=yn(st,gt)<0;Nt!=yn(dt,gt)<0?(gt=st,st=dt):Nt!=yn(st,dt)<0&&(st=dt)}return new fs(gt,st)}else return new fs(dt||st,st)}function jh(it,st,dt,ht,gt){gt==null&&(gt=it.cm&&(it.cm.display.shift||it.extend)),Ka(it,new Jl([bd(it.sel.primary(),st,dt,gt)],0),ht)}function Fu(it,st,dt){for(var ht=[],gt=it.cm&&(it.cm.display.shift||it.extend),Nt=0;Nt<it.sel.ranges.length;Nt++)ht[Nt]=bd(it.sel.ranges[Nt],st[Nt],null,gt);var Gt=gl(it.cm,ht,it.sel.primIndex);Ka(it,Gt,dt)}function _A(it,st,dt,ht){var gt=it.sel.ranges.slice(0);gt[st]=dt,Ka(it,gl(it.cm,gt,it.sel.primIndex),ht)}function KA(it,st,dt,ht){Ka(it,gA(st,dt),ht)}function Vh(it,st,dt){var ht={ranges:st.ranges,update:function(gt){this.ranges=[];for(var Nt=0;Nt<gt.length;Nt++)this.ranges[Nt]=new fs(ai(it,gt[Nt].anchor),ai(it,gt[Nt].head))},origin:dt&&dt.origin};return xi(it,"beforeSelectionChange",it,ht),it.cm&&xi(it.cm,"beforeSelectionChange",it.cm,ht),ht.ranges!=st.ranges?gl(it.cm,ht.ranges,ht.ranges.length-1):st}function ph(it,st,dt){var ht=it.history.done,gt=Ee(ht);gt&>.ranges?(ht[ht.length-1]=st,mh(it,st,dt)):Ka(it,st,dt)}function Ka(it,st,dt){mh(it,st,dt),Kc(it,it.sel,it.cm?it.cm.curOp.id:NaN,dt)}function mh(it,st,dt){(Qi(it,"beforeSelectionChange")||it.cm&&Qi(it.cm,"beforeSelectionChange"))&&(st=Vh(it,st,dt));var ht=dt&&dt.bias||(yn(st.primary().head,it.sel.primary().head)<0?-1:1);gf(it,vh(it,st,ht,!0)),!(dt&&dt.scroll===!1)&&it.cm&&lu(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,ar(it.cm)),sr(it,"cursorActivity",it))}function Eu(it){gf(it,vh(it,it.sel,null,!1))}function vh(it,st,dt,ht){for(var gt,Nt=0;Nt<st.ranges.length;Nt++){var Gt=st.ranges[Nt],Jt=st.ranges.length==it.sel.ranges.length&&it.sel.ranges[Nt],Yt=Gc(it,Gt.anchor,Jt&&Jt.anchor,dt,ht),pe=Gc(it,Gt.head,Jt&&Jt.head,dt,ht);(gt||Yt!=Gt.anchor||pe!=Gt.head)&&(gt||(gt=st.ranges.slice(0,Nt)),gt[Nt]=new fs(Yt,pe))}return gt?gl(it.cm,gt,st.primIndex):st}function Lu(it,st,dt,ht,gt){var Nt=Ai(it,st.line);if(Nt.markedSpans)for(var Gt=0;Gt<Nt.markedSpans.length;++Gt){var Jt=Nt.markedSpans[Gt],Yt=Jt.marker,pe="selectLeft"in Yt?!Yt.selectLeft:Yt.inclusiveLeft,qe="selectRight"in Yt?!Yt.selectRight:Yt.inclusiveRight;if((Jt.from==null||(pe?Jt.from<=st.ch:Jt.from<st.ch))&&(Jt.to==null||(qe?Jt.to>=st.ch:Jt.to>st.ch))){if(gt&&(xi(Yt,"beforeCursorEnter"),Yt.explicitlyCleared))if(Nt.markedSpans){--Gt;continue}else break;if(!Yt.atomic)continue;if(dt){var we=Yt.find(ht<0?1:-1),Mn=void 0;if((ht<0?qe:pe)&&(we=kd(it,we,-ht,we&&we.line==st.line?Nt:null)),we&&we.line==st.line&&(Mn=yn(we,dt))&&(ht<0?Mn<0:Mn>0))return Lu(it,we,st,ht,gt)}var wn=Yt.find(ht<0?-1:1);return(ht<0?pe:qe)&&(wn=kd(it,wn,ht,wn.line==st.line?Nt:null)),wn?Lu(it,wn,st,ht,gt):null}}return st}function Gc(it,st,dt,ht,gt){var Nt=ht||1,Gt=Lu(it,st,dt,Nt,gt)||!gt&&Lu(it,st,dt,Nt,!0)||Lu(it,st,dt,-Nt,gt)||!gt&&Lu(it,st,dt,-Nt,!0);return Gt||(it.cantEdit=!0,on(it.first,0))}function kd(it,st,dt,ht){return dt<0&&st.ch==0?st.line>it.first?ai(it,on(st.line-1)):null:dt>0&&st.ch==(ht||Ai(it,st.line)).text.length?st.line<it.first+it.size-1?on(st.line+1,0):null:new on(st.line,st.ch+dt)}function ra(it){it.setSelection(on(it.firstLine(),0),on(it.lastLine()),un)}function yh(it,st,dt){var ht={canceled:!1,from:st.from,to:st.to,text:st.text,origin:st.origin,cancel:function(){return ht.canceled=!0}};return dt&&(ht.update=function(gt,Nt,Gt,Jt){gt&&(ht.from=ai(it,gt)),Nt&&(ht.to=ai(it,Nt)),Gt&&(ht.text=Gt),Jt!==void 0&&(ht.origin=Jt)}),xi(it,"beforeChange",it,ht),it.cm&&xi(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,dt){if(it.cm){if(!it.cm.curOp)return ga(it.cm,GA)(it,st,dt);if(it.cm.state.suppressEdits)return}if(!((Qi(it,"beforeChange")||it.cm&&Qi(it.cm,"beforeChange"))&&(st=yh(it,st,!0),!st))){var ht=ae&&!dt&&an(it,st.from,st.to);if(ht)for(var gt=ht.length-1;gt>=0;--gt)wh(it,{from:ht[gt].from,to:ht[gt].to,text:gt?[""]:st.text,origin:st.origin});else wh(it,st)}}function wh(it,st){if(!(st.text.length==1&&st.text[0]==""&&yn(st.from,st.to)==0)){var dt=Qc(it,st);_c(it,st,dt,it.cm?it.cm.curOp.id:NaN),Wh(it,st,dt,yi(it,st));var ht=[];Cu(it,function(gt,Nt){!Nt&&Pn(ht,gt.history)==-1&&(vf(gt.history,st),ht.push(gt.history)),Wh(gt,st,null,yi(gt,st))})}}function zc(it,st,dt){var ht=it.cm&&it.cm.state.suppressEdits;if(!(ht&&!dt)){for(var gt=it.history,Nt,Gt=it.sel,Jt=st=="undo"?gt.done:gt.undone,Yt=st=="undo"?gt.undone:gt.done,pe=0;pe<Jt.length&&(Nt=Jt[pe],!(dt?Nt.ranges&&!Nt.equals(it.sel):!Nt.ranges));pe++);if(pe!=Jt.length){for(gt.lastOrigin=gt.lastSelOrigin=null;;)if(Nt=Jt.pop(),Nt.ranges){if(zh(Nt,Yt),dt&&!Nt.equals(it.sel)){Ka(it,Nt,{clearRedo:!1});return}Gt=Nt}else if(ht){Jt.push(Nt);return}else break;var qe=[];zh(Gt,Yt),Yt.push({changes:qe,generation:gt.generation}),gt.generation=Nt.generation||++gt.maxGeneration;for(var we=Qi(it,"beforeChange")||it.cm&&Qi(it.cm,"beforeChange"),Mn=function(bi){var zi=Nt.changes[bi];if(zi.origin=st,we&&!yh(it,zi,!1))return Jt.length=0,{};qe.push(Md(it,zi));var rr=bi?Qc(it,zi):Ee(Jt);Wh(it,zi,rr,zr(it,zi)),!bi&&it.cm&&it.cm.scrollIntoView({from:zi.from,to:OA(zi)});var Lr=[];Cu(it,function(xr,Qr){!Qr&&Pn(Lr,xr.history)==-1&&(vf(xr.history,zi),Lr.push(xr.history)),Wh(xr,zi,null,zr(xr,zi))})},wn=Nt.changes.length-1;wn>=0;--wn){var Si=Mn(wn);if(Si)return Si.v}}}}function pf(it,st){if(st!=0&&(it.first+=st,it.sel=new Jl(ci(it.sel.ranges,function(gt){return new fs(on(gt.anchor.line+st,gt.anchor.ch),on(gt.head.line+st,gt.head.ch))}),it.sel.primIndex),it.cm)){ms(it.cm,it.first,it.first-st,st);for(var dt=it.cm.display,ht=dt.viewFrom;ht<dt.viewTo;ht++)po(it.cm,ht,"gutter")}}function Wh(it,st,dt,ht){if(it.cm&&!it.cm.curOp)return ga(it.cm,Wh)(it,st,dt,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 gt=st.text.length-1-(it.first-st.from.line);pf(it,gt),st={from:on(it.first,0),to:on(st.to.line+gt,st.to.ch),text:[Ee(st.text)],origin:st.origin}}var Nt=it.lastLine();st.to.line>Nt&&(st={from:st.from,to:on(Nt,Ai(it,Nt).text.length),text:[st.text[0]],origin:st.origin}),st.removed=We(it,st.from,st.to),dt||(dt=Qc(it,st)),it.cm?ug(it.cm,st,ht):Ld(it,st,ht),mh(it,dt,un),it.cantEdit&&Gc(it,on(it.firstLine(),0))&&(it.cantEdit=!1)}}function ug(it,st,dt){var ht=it.doc,gt=it.display,Nt=st.from,Gt=st.to,Jt=!1,Yt=Nt.line;it.options.lineWrapping||(Yt=he(Sn(Ai(ht,Nt.line))),ht.iter(Yt,Gt.line+1,function(wn){if(wn==gt.maxLine)return Jt=!0,!0})),ht.sel.contains(st.from,st.to)>-1&&ar(it),Ld(ht,st,dt,Ss(it)),it.options.lineWrapping||(ht.iter(Yt,Nt.line+st.text.length,function(wn){var Si=nr(wn);Si>gt.maxLineLength&&(gt.maxLine=wn,gt.maxLineLength=Si,gt.maxLineChanged=!0,Jt=!1)}),Jt&&(it.curOp.updateMaxLine=!0)),oe(ht,Nt.line),DA(it,400);var pe=st.text.length-(Gt.line-Nt.line)-1;st.full?ms(it):Nt.line==Gt.line&&st.text.length==1&&!df(it.doc,st)?po(it,Nt.line,"text"):ms(it,Nt.line,Gt.line+1,pe);var qe=Qi(it,"changes"),we=Qi(it,"change");if(we||qe){var Mn={from:Nt,to:Gt,text:st.text,removed:st.removed,origin:st.origin};we&&sr(it,"change",it,Mn),qe&&(it.curOp.changeObjs||(it.curOp.changeObjs=[])).push(Mn)}it.display.selForContextMenu=null}function xh(it,st,dt,ht,gt){var Nt;ht||(ht=dt),yn(ht,dt)<0&&(Nt=[ht,dt],dt=Nt[0],ht=Nt[1]),typeof st=="string"&&(st=it.splitLines(st)),GA(it,{from:dt,to:ht,text:st,origin:gt})}function ql(it,st,dt,ht){dt<it.line?it.line+=ht:st<it.line&&(it.line=st,it.ch=0)}function mf(it,st,dt,ht){for(var gt=0;gt<it.length;++gt){var Nt=it[gt],Gt=!0;if(Nt.ranges){Nt.copied||(Nt=it[gt]=Nt.deepCopy(),Nt.copied=!0);for(var Jt=0;Jt<Nt.ranges.length;Jt++)ql(Nt.ranges[Jt].anchor,st,dt,ht),ql(Nt.ranges[Jt].head,st,dt,ht);continue}for(var Yt=0;Yt<Nt.changes.length;++Yt){var pe=Nt.changes[Yt];if(dt<pe.from.line)pe.from=on(pe.from.line+ht,pe.from.ch),pe.to=on(pe.to.line+ht,pe.to.ch);else if(st<=pe.to.line){Gt=!1;break}}Gt||(it.splice(0,gt+1),gt=0)}}function vf(it,st){var dt=st.from.line,ht=st.to.line,gt=st.text.length-(ht-dt)-1;mf(it.done,dt,ht,gt),mf(it.undone,dt,ht,gt)}function Sh(it,st,dt,ht){var gt=st,Nt=st;return typeof st=="number"?Nt=Ai(it,Nn(it,st)):gt=he(st),gt==null?null:(ht(Nt,gt)&&it.cm&&po(it.cm,gt,dt),Nt)}function Zh(it){this.lines=it,this.parent=null;for(var st=0,dt=0;dt<it.length;++dt)it[dt].parent=this,st+=it[dt].height;this.height=st}Zh.prototype={chunkSize:function(){return this.lines.length},removeInner:function(it,st){for(var dt=it,ht=it+st;dt<ht;++dt){var gt=this.lines[dt];this.height-=gt.height,Pr(gt),sr(gt,"delete")}this.lines.splice(it,st)},collapse:function(it){it.push.apply(it,this.lines)},insertInner:function(it,st,dt){this.height+=dt,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,dt){for(var ht=it+st;it<ht;++it)if(dt(this.lines[it]))return!0}};function zs(it){this.children=it;for(var st=0,dt=0,ht=0;ht<it.length;++ht){var gt=it[ht];st+=gt.chunkSize(),dt+=gt.height,gt.parent=this}this.size=st,this.height=dt,this.parent=null}zs.prototype={chunkSize:function(){return this.size},removeInner:function(it,st){this.size-=st;for(var dt=0;dt<this.children.length;++dt){var ht=this.children[dt],gt=ht.chunkSize();if(it<gt){var Nt=Math.min(st,gt-it),Gt=ht.height;if(ht.removeInner(it,Nt),this.height-=Gt-ht.height,gt==Nt&&(this.children.splice(dt--,1),ht.parent=null),(st-=Nt)==0)break;it=0}else it-=gt}if(this.size-st<25&&(this.children.length>1||!(this.children[0]instanceof Zh))){var Jt=[];this.collapse(Jt),this.children=[new Zh(Jt)],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,dt){this.size+=st.length,this.height+=dt;for(var ht=0;ht<this.children.length;++ht){var gt=this.children[ht],Nt=gt.chunkSize();if(it<=Nt){if(gt.insertInner(it,st,dt),gt.lines&>.lines.length>50){for(var Gt=gt.lines.length%25+25,Jt=Gt;Jt<gt.lines.length;){var Yt=new Zh(gt.lines.slice(Jt,Jt+=25));gt.height-=Yt.height,this.children.splice(++ht,0,Yt),Yt.parent=this}gt.lines=gt.lines.slice(0,Gt),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),dt=new zs(st);if(it.parent){it.size-=dt.size,it.height-=dt.height;var gt=Pn(it.parent.children,it);it.parent.children.splice(gt+1,0,dt)}else{var ht=new zs(it.children);ht.parent=it,it.children=[ht,dt],it=ht}dt.parent=it.parent}while(it.children.length>10);it.parent.maybeSpill()}},iterN:function(it,st,dt){for(var ht=0;ht<this.children.length;++ht){var gt=this.children[ht],Nt=gt.chunkSize();if(it<Nt){var Gt=Math.min(st,Nt-it);if(gt.iterN(it,Gt,dt))return!0;if((st-=Gt)==0)break;it=0}else it-=Nt}}};var mA=function(it,st,dt){if(dt)for(var ht in dt)dt.hasOwnProperty(ht)&&(this[ht]=dt[ht]);this.doc=it,this.node=st};mA.prototype.clear=function(){var it=this.doc.cm,st=this.line.widgets,dt=this.line,ht=he(dt);if(!(ht==null||!st)){for(var gt=0;gt<st.length;++gt)st[gt]==this&&st.splice(gt--,1);st.length||(dt.widgets=null);var Nt=oo(this);ui(dt,Math.max(0,dt.height-Nt)),it&&(rs(it,function(){jc(it,dt,-Nt),po(it,ht,"widget")}),sr(it,"lineWidgetCleared",it,this,ht))}},mA.prototype.changed=function(){var it=this,st=this.height,dt=this.doc.cm,ht=this.line;this.height=null;var gt=oo(this)-st;gt&&(cn(this.doc,ht)||ui(ht,ht.height+gt),dt&&rs(dt,function(){dt.curOp.forceUpdate=!0,jc(dt,ht,gt),sr(dt,"lineWidgetChanged",dt,it,he(ht))}))},Oi(mA);function jc(it,st,dt){Ui(st)<(it.curOp&&it.curOp.scrollTop||it.doc.scrollTop)&&ch(it,dt)}function Td(it,st,dt,ht){var gt=new mA(it,dt,ht),Nt=it.cm;return Nt&>.noHScroll&&(Nt.display.alignWidgets=!0),Sh(it,st,"widget",function(Gt){var Jt=Gt.widgets||(Gt.widgets=[]);if(gt.insertAt==null?Jt.push(gt):Jt.splice(Math.min(Jt.length-1,Math.max(0,gt.insertAt)),0,gt),gt.line=Gt,Nt&&!cn(it,Gt)){var Yt=Ui(Gt)<it.scrollTop;ui(Gt,Gt.height+oo(gt)),Yt&&ch(Nt,gt.height),Nt.curOp.forceUpdate=!0}return!0}),Nt&&sr(Nt,"lineWidgetAdded",Nt,gt,typeof st=="number"?st:he(st)),gt}var Nd=0,Re=function(it,st){this.lines=[],this.type=st,this.doc=it,this.id=++Nd};Re.prototype.clear=function(){if(!this.explicitlyCleared){var it=this.doc.cm,st=it&&!it.curOp;if(st&&Hl(it),Qi(this,"clear")){var dt=this.find();dt&&sr(this,"clear",dt.from,dt.to)}for(var ht=null,gt=null,Nt=0;Nt<this.lines.length;++Nt){var Gt=this.lines[Nt],Jt=Dn(Gt.markedSpans,this);it&&!this.collapsed?po(it,he(Gt),"text"):it&&(Jt.to!=null&&(gt=he(Gt)),Jt.from!=null&&(ht=he(Gt))),Gt.markedSpans=Zn(Gt.markedSpans,Jt),Jt.from==null&&this.collapsed&&!cn(this.doc,Gt)&&it&&ui(Gt,dl(it.display))}if(it&&this.collapsed&&!it.options.lineWrapping)for(var Yt=0;Yt<this.lines.length;++Yt){var pe=Sn(this.lines[Yt]),qe=nr(pe);qe>it.display.maxLineLength&&(it.display.maxLine=pe,it.display.maxLineLength=qe,it.display.maxLineChanged=!0)}ht!=null&&it&&this.collapsed&&ms(it,ht,gt+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,it&&Eu(it.doc)),it&&sr(it,"markerCleared",it,this,ht,gt),st&&Au(it),this.parent&&this.parent.clear()}},Re.prototype.find=function(it,st){it==null&&this.type=="bookmark"&&(it=1);for(var dt,ht,gt=0;gt<this.lines.length;++gt){var Nt=this.lines[gt],Gt=Dn(Nt.markedSpans,this);if(Gt.from!=null&&(dt=on(st?Nt:he(Nt),Gt.from),it==-1))return dt;if(Gt.to!=null&&(ht=on(st?Nt:he(Nt),Gt.to),it==1))return ht}return dt&&{from:dt,to:ht}},Re.prototype.changed=function(){var it=this,st=this.find(-1,!0),dt=this,ht=this.doc.cm;!st||!ht||rs(ht,function(){var gt=st.line,Nt=he(st.line),Gt=hl(ht,Nt);if(Gt&&(AA(Gt),ht.curOp.selectionChanged=ht.curOp.forceUpdate=!0),ht.curOp.updateMaxLine=!0,!cn(dt.doc,gt)&&dt.height!=null){var Jt=dt.height;dt.height=null;var Yt=oo(dt)-Jt;Yt&&ui(gt,gt.height+Yt)}sr(ht,"markerChanged",ht,it)})},Re.prototype.attachLine=function(it){if(!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(!st.maybeHiddenMarkers||Pn(st.maybeHiddenMarkers,this)==-1)&&(st.maybeUnhiddenMarkers||(st.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(it)},Re.prototype.detachLine=function(it){if(this.lines.splice(Pn(this.lines,it),1),!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(st.maybeHiddenMarkers||(st.maybeHiddenMarkers=[])).push(this)}},Oi(Re);function zA(it,st,dt,ht,gt){if(ht&&ht.shared)return Ag(it,st,dt,ht,gt);if(it.cm&&!it.cm.curOp)return ga(it.cm,zA)(it,st,dt,ht,gt);var Nt=new Re(it,gt),Gt=yn(st,dt);if(ht&&Ln(ht,Nt,!1),Gt>0||Gt==0&&Nt.clearWhenEmpty!==!1)return Nt;if(Nt.replacedWith&&(Nt.collapsed=!0,Nt.widgetNode=Pe("span",[Nt.replacedWith],"CodeMirror-widget"),ht.handleMouseEvents||Nt.widgetNode.setAttribute("cm-ignore-events","true"),ht.insertLeft&&(Nt.widgetNode.insertLeft=!0)),Nt.collapsed){if(Fn(it,st.line,st,dt,Nt)||st.line!=dt.line&&Fn(it,dt.line,st,dt,Nt))throw new Error("Inserting collapsed marker partially overlapping an existing one");Be()}Nt.addToHistory&&_c(it,{from:st,to:dt,origin:"markText"},it.sel,NaN);var Jt=st.line,Yt=it.cm,pe;if(it.iter(Jt,dt.line+1,function(we){Yt&&Nt.collapsed&&!Yt.options.lineWrapping&&Sn(we)==Yt.display.maxLine&&(pe=!0),Nt.collapsed&&Jt!=st.line&&ui(we,0),Li(we,new ln(Nt,Jt==st.line?st.ch:null,Jt==dt.line?dt.ch:null)),++Jt}),Nt.collapsed&&it.iter(st.line,dt.line+1,function(we){cn(it,we)&&ui(we,0)}),Nt.clearOnEnter&&gn(Nt,"beforeCursorEnter",function(){return Nt.clear()}),Nt.readOnly&&(Ye(),(it.history.done.length||it.history.undone.length)&&it.clearHistory()),Nt.collapsed&&(Nt.id=++Nd,Nt.atomic=!0),Yt){if(pe&&(Yt.curOp.updateMaxLine=!0),Nt.collapsed)ms(Yt,st.line,dt.line+1);else if(Nt.className||Nt.startStyle||Nt.endStyle||Nt.css||Nt.attributes||Nt.title)for(var qe=st.line;qe<=dt.line;qe++)po(Yt,qe,"text");Nt.atomic&&Eu(Yt.doc),sr(Yt,"markerAdded",Yt,Nt)}return Nt}var Mu=function(it,st){this.markers=it,this.primary=st;for(var dt=0;dt<it.length;++dt)it[dt].parent=this};Mu.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")}},Mu.prototype.find=function(it,st){return this.primary.find(it,st)},Oi(Mu);function Ag(it,st,dt,ht,gt){ht=Ln(ht),ht.shared=!1;var Nt=[zA(it,st,dt,ht,gt)],Gt=Nt[0],Jt=ht.widgetNode;return Cu(it,function(Yt){Jt&&(ht.widgetNode=Jt.cloneNode(!0)),Nt.push(zA(Yt,ai(Yt,st),ai(Yt,dt),ht,gt));for(var pe=0;pe<Yt.linked.length;++pe)if(Yt.linked[pe].isParent)return;Gt=Ee(Nt)}),new Mu(Nt,Gt)}function Dd(it){return it.findMarks(on(it.first,0),it.clipPos(on(it.lastLine())),function(st){return st.parent})}function Id(it,st){for(var dt=0;dt<st.length;dt++){var ht=st[dt],gt=ht.find(),Nt=it.clipPos(gt.from),Gt=it.clipPos(gt.to);if(yn(Nt,Gt)){var Jt=zA(it,Nt,Gt,ht.primary,ht.primary.type);ht.markers.push(Jt),Jt.parent=ht}}}function Vc(it){for(var st=function(ht){var gt=it[ht],Nt=[gt.primary.doc];Cu(gt.primary.doc,function(Yt){return Nt.push(Yt)});for(var Gt=0;Gt<gt.markers.length;Gt++){var Jt=gt.markers[Gt];Pn(Nt,Jt.doc)==-1&&(Jt.parent=null,gt.markers.splice(Gt--,1))}},dt=0;dt<it.length;dt++)st(dt)}var hg=0,Ma=function(it,st,dt,ht,gt){if(!(this instanceof Ma))return new Ma(it,st,dt,ht,gt);dt==null&&(dt=0),zs.call(this,[new Zh([new fr("",null)])]),this.first=dt,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=dt;var Nt=on(dt,0);this.sel=gA(Nt),this.history=new _h(null),this.id=++hg,this.modeOption=st,this.lineSep=ht,this.direction=gt=="rtl"?"rtl":"ltr",this.extend=!1,typeof it=="string"&&(it=this.splitLines(it)),Ld(this,{from:Nt,to:Nt,text:it}),Ka(this,gA(Nt),un)};Ma.prototype=kt(zs.prototype,{constructor:Ma,iter:function(it,st,dt){dt?this.iterN(it-this.first,st-it,dt):this.iterN(this.first,this.first+this.size,it)},insert:function(it,st){for(var dt=0,ht=0;ht<st.length;++ht)dt+=st[ht].height;this.insertInner(it-this.first,st,dt)},remove:function(it,st){this.removeInner(it-this.first,st)},getValue:function(it){var st=Ke(this,this.first,this.first+this.size);return it===!1?st:st.join(it||this.lineSeparator())},setValue:Fa(function(it){var st=on(this.first,0),dt=this.first+this.size-1;GA(this,{from:st,to:on(dt,Ai(this,dt).text.length),text:this.splitLines(it),origin:"setValue",full:!0},!0),this.cm&&uu(this.cm,0,0),Ka(this,gA(st),un)}),replaceRange:function(it,st,dt,ht){st=ai(this,st),dt=dt?ai(this,dt):st,xh(this,it,st,dt,ht)},getRange:function(it,st,dt){var ht=We(this,ai(this,it),ai(this,st));return dt===!1?ht:ht.join(dt||this.lineSeparator())},getLine:function(it){var st=this.getLineHandle(it);return st&&st.text},getLineHandle:function(it){if(Wn(this,it))return Ai(this,it)},getLineNumber:function(it){return he(it)},getLineHandleVisualStart:function(it){return typeof it=="number"&&(it=Ai(this,it)),Sn(it)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(it){return ai(this,it)},getCursor:function(it){var st=this.sel.primary(),dt;return it==null||it=="head"?dt=st.head:it=="anchor"?dt=st.anchor:it=="end"||it=="to"||it===!1?dt=st.to():dt=st.from(),dt},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Fa(function(it,st,dt){KA(this,ai(this,typeof it=="number"?on(it,st||0):it),null,dt)}),setSelection:Fa(function(it,st,dt){KA(this,ai(this,it),ai(this,st||it),dt)}),extendSelection:Fa(function(it,st,dt){jh(this,ai(this,it),st&&ai(this,st),dt)}),extendSelections:Fa(function(it,st){Fu(this,Ni(this,it),st)}),extendSelectionsBy:Fa(function(it,st){var dt=ci(this.sel.ranges,it);Fu(this,Ni(this,dt),st)}),setSelections:Fa(function(it,st,dt){if(it.length){for(var ht=[],gt=0;gt<it.length;gt++)ht[gt]=new fs(ai(this,it[gt].anchor),ai(this,it[gt].head));st==null&&(st=Math.min(it.length-1,this.sel.primIndex)),Ka(this,gl(this.cm,ht,st),dt)}}),addSelection:Fa(function(it,st,dt){var ht=this.sel.ranges.slice(0);ht.push(new fs(ai(this,it),ai(this,st||it))),Ka(this,gl(this.cm,ht,ht.length-1),dt)}),getSelection:function(it){for(var st=this.sel.ranges,dt,ht=0;ht<st.length;ht++){var gt=We(this,st[ht].from(),st[ht].to());dt=dt?dt.concat(gt):gt}return it===!1?dt:dt.join(it||this.lineSeparator())},getSelections:function(it){for(var st=[],dt=this.sel.ranges,ht=0;ht<dt.length;ht++){var gt=We(this,dt[ht].from(),dt[ht].to());it!==!1&&(gt=gt.join(it||this.lineSeparator())),st[ht]=gt}return st},replaceSelection:function(it,st,dt){for(var ht=[],gt=0;gt<this.sel.ranges.length;gt++)ht[gt]=it;this.replaceSelections(ht,st,dt||"+input")},replaceSelections:Fa(function(it,st,dt){for(var ht=[],gt=this.sel,Nt=0;Nt<gt.ranges.length;Nt++){var Gt=gt.ranges[Nt];ht[Nt]={from:Gt.from(),to:Gt.to(),text:this.splitLines(it[Nt]),origin:dt}}for(var Jt=st&&st!="end"&&Oc(this,ht,st),Yt=ht.length-1;Yt>=0;Yt--)GA(this,ht[Yt]);Jt?ph(this,Jt):this.cm&&lu(this.cm)}),undo:Fa(function(){zc(this,"undo")}),redo:Fa(function(){zc(this,"redo")}),undoSelection:Fa(function(){zc(this,"undo",!0)}),redoSelection:Fa(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,dt=0,ht=0;ht<it.done.length;ht++)it.done[ht].ranges||++st;for(var gt=0;gt<it.undone.length;gt++)it.undone[gt].ranges||++dt;return{undo:st,redo:dt}},clearHistory:function(){var it=this;this.history=new _h(this.history.maxGeneration),Cu(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:Fa(function(it,st,dt){return Sh(this,it,"gutter",function(ht){var gt=ht.gutterMarkers||(ht.gutterMarkers={});return gt[st]=dt,!dt&&Bt(gt)&&(ht.gutterMarkers=null),!0})}),clearGutter:Fa(function(it){var st=this;this.iter(function(dt){dt.gutterMarkers&&dt.gutterMarkers[it]&&Sh(st,dt,"gutter",function(){return dt.gutterMarkers[it]=null,Bt(dt.gutterMarkers)&&(dt.gutterMarkers=null),!0})})}),lineInfo:function(it){var st;if(typeof it=="number"){if(!Wn(this,it)||(st=it,it=Ai(this,it),!it))return null}else if(st=he(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:Fa(function(it,st,dt){return Sh(this,it,st=="gutter"?"gutter":"class",function(ht){var gt=st=="text"?"textClass":st=="background"?"bgClass":st=="gutter"?"gutterClass":"wrapClass";if(!ht[gt])ht[gt]=dt;else{if(_t(dt).test(ht[gt]))return!1;ht[gt]+=" "+dt}return!0})}),removeLineClass:Fa(function(it,st,dt){return Sh(this,it,st=="gutter"?"gutter":"class",function(ht){var gt=st=="text"?"textClass":st=="background"?"bgClass":st=="gutter"?"gutterClass":"wrapClass",Nt=ht[gt];if(Nt)if(dt==null)ht[gt]=null;else{var Gt=Nt.match(_t(dt));if(!Gt)return!1;var Jt=Gt.index+Gt[0].length;ht[gt]=Nt.slice(0,Gt.index)+(!Gt.index||Jt==Nt.length?"":" ")+Nt.slice(Jt)||null}else return!1;return!0})}),addLineWidget:Fa(function(it,st,dt){return Td(this,it,st,dt)}),removeLineWidget:function(it){it.clear()},markText:function(it,st,dt){return zA(this,ai(this,it),ai(this,st),dt,dt&&dt.type||"range")},setBookmark:function(it,st){var dt={replacedWith:st&&(st.nodeType==null?st.widget:st),insertLeft:st&&st.insertLeft,clearWhenEmpty:!1,shared:st&&st.shared,handleMouseEvents:st&&st.handleMouseEvents};return it=ai(this,it),zA(this,it,it,dt,"bookmark")},findMarksAt:function(it){it=ai(this,it);var st=[],dt=Ai(this,it.line).markedSpans;if(dt)for(var ht=0;ht<dt.length;++ht){var gt=dt[ht];(gt.from==null||gt.from<=it.ch)&&(gt.to==null||gt.to>=it.ch)&&st.push(gt.marker.parent||gt.marker)}return st},findMarks:function(it,st,dt){it=ai(this,it),st=ai(this,st);var ht=[],gt=it.line;return this.iter(it.line,st.line+1,function(Nt){var Gt=Nt.markedSpans;if(Gt)for(var Jt=0;Jt<Gt.length;Jt++){var Yt=Gt[Jt];!(Yt.to!=null&>==it.line&&it.ch>=Yt.to||Yt.from==null&>!=it.line||Yt.from!=null&>==st.line&&Yt.from>=st.ch)&&(!dt||dt(Yt.marker))&&ht.push(Yt.marker.parent||Yt.marker)}++gt}),ht},getAllMarks:function(){var it=[];return this.iter(function(st){var dt=st.markedSpans;if(dt)for(var ht=0;ht<dt.length;++ht)dt[ht].from!=null&&it.push(dt[ht].marker)}),it},posFromIndex:function(it){var st,dt=this.first,ht=this.lineSeparator().length;return this.iter(function(gt){var Nt=gt.text.length+ht;if(Nt>it)return st=it,!0;it-=Nt,++dt}),ai(this,on(dt,st))},indexFromPos:function(it){it=ai(this,it);var st=it.ch;if(it.line<this.first||it.ch<0)return 0;var dt=this.lineSeparator().length;return this.iter(this.first,it.line,function(ht){st+=ht.text.length+dt}),st},copy:function(it){var st=new Ma(Ke(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,dt=this.first+this.size;it.from!=null&&it.from>st&&(st=it.from),it.to!=null&&it.to<dt&&(dt=it.to);var ht=new Ma(Ke(this,st,dt),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 Yo&&(it=it.doc),this.linked)for(var st=0;st<this.linked.length;++st){var dt=this.linked[st];if(dt.doc==it){this.linked.splice(st,1),it.unlinkDoc(this),Vc(Dd(this));break}}if(it.history==this.history){var ht=[it.id];Cu(it,function(gt){return ht.push(gt.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){Cu(this,it)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(it){return this.lineSep?it.split(this.lineSep):Zr(it)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:Fa(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))})}),Ma.prototype.eachLine=Ma.prototype.iter;var Yh=0;function Ud(it){var st=this;if(dg(st),!(Ei(st,it)||ts(st.display,it))){Yi(it),de&&(Yh=+new Date);var dt=xa(st,it,!0),ht=it.dataTransfer.files;if(!(!dt||st.isReadOnly()))if(ht&&ht.length&&window.FileReader&&window.File)for(var gt=ht.length,Nt=Array(gt),Gt=0,Jt=function(){++Gt==gt&&ga(st,function(){dt=ai(st.doc,dt);var wn={from:dt,to:dt,text:st.doc.splitLines(Nt.filter(function(Si){return Si!=null}).join(st.doc.lineSeparator())),origin:"paste"};GA(st.doc,wn),ph(st.doc,gA(ai(st.doc,dt),ai(st.doc,OA(wn))))})()},Yt=function(wn,Si){if(st.options.allowDropFileTypes&&Pn(st.options.allowDropFileTypes,wn.type)==-1){Jt();return}var bi=new FileReader;bi.onerror=function(){return Jt()},bi.onload=function(){var zi=bi.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(zi)){Jt();return}Nt[Si]=zi,Jt()},bi.readAsText(wn)},pe=0;pe<ht.length;pe++)Yt(ht[pe],pe);else{if(st.state.draggingText&&st.doc.sel.contains(dt)>-1){st.state.draggingText(it),setTimeout(function(){return st.display.input.focus()},20);return}try{var qe=it.dataTransfer.getData("Text");if(qe){var we;if(st.state.draggingText&&!st.state.draggingText.copy&&(we=st.listSelections()),mh(st.doc,gA(dt,dt)),we)for(var Mn=0;Mn<we.length;++Mn)xh(st.doc,"",we[Mn].anchor,we[Mn].head,"drag");st.replaceSelection(qe,"around","paste"),st.display.input.focus()}}catch(wn){}}}}function Qd(it,st){if(de&&(!it.state.draggingText||+new Date-Yh<100)){Fr(st);return}if(!(Ei(it,st)||ts(it.display,st))&&(st.dataTransfer.setData("Text",it.getSelection()),st.dataTransfer.effectAllowed="copyMove",st.dataTransfer.setDragImage&&!Ne)){var dt=$t("img",null,null,"position: fixed; left: 0; top: 0;");dt.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Wt&&(dt.width=dt.height=1,it.display.wrapper.appendChild(dt),dt._top=dt.offsetTop),st.dataTransfer.setDragImage(dt,0,0),Wt&&dt.parentNode.removeChild(dt)}}function cg(it,st){var dt=xa(it,st);if(dt){var ht=document.createDocumentFragment();Uo(it,dt,ht),it.display.dragCursor||(it.display.dragCursor=$t("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),it.display.lineSpace.insertBefore(it.display.dragCursor,it.display.cursorDiv)),Zt(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"),dt=[],ht=0;ht<st.length;ht++){var gt=st[ht].CodeMirror;gt&&dt.push(gt)}dt.length&&dt[0].operation(function(){for(var Nt=0;Nt<dt.length;Nt++)it(dt[Nt])})}}var _l=!1;function pl(){_l||(Xh(),_l=!0)}function Xh(){var it;gn(window,"resize",function(){it==null&&(it=setTimeout(function(){it=null,fg(yf)},100))}),gn(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 Zu={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"},Wc=0;Wc<10;Wc++)Zu[Wc+48]=Zu[Wc+96]=String(Wc);for(var Od=65;Od<=90;Od++)Zu[Od]=String.fromCharCode(Od);for(var Zc=1;Zc<=12;Zc++)Zu[Zc+111]=Zu[Zc+63235]="F"+Zc;var Ml={};Ml.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"},Ml.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"},Ml.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"},Ml.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"]},Ml.default=At?Ml.macDefault:Ml.pcDefault;function wf(it){var st=it.split(/-(?!$)/);it=st[st.length-1];for(var dt,ht,gt,Nt,Gt=0;Gt<st.length-1;Gt++){var Jt=st[Gt];if(/^(cmd|meta|m)$/i.test(Jt))Nt=!0;else if(/^a(lt)?$/i.test(Jt))dt=!0;else if(/^(c|ctrl|control)$/i.test(Jt))ht=!0;else if(/^s(hift)?$/i.test(Jt))gt=!0;else throw new Error("Unrecognized modifier name: "+Jt)}return dt&&(it="Alt-"+it),ht&&(it="Ctrl-"+it),Nt&&(it="Cmd-"+it),gt&&(it="Shift-"+it),it}function xf(it){var st={};for(var dt in it)if(it.hasOwnProperty(dt)){var ht=it[dt];if(/^(name|fallthrough|(de|at)tach)$/.test(dt))continue;if(ht=="..."){delete it[dt];continue}for(var gt=ci(dt.split(" "),wf),Nt=0;Nt<gt.length;Nt++){var Gt=void 0,Jt=void 0;Nt==gt.length-1?(Jt=gt.join(" "),Gt=ht):(Jt=gt.slice(0,Nt+1).join(" "),Gt="...");var Yt=st[Jt];if(!Yt)st[Jt]=Gt;else if(Yt!=Gt)throw new Error("Inconsistent bindings for "+Jt)}delete it[dt]}for(var pe in st)it[pe]=st[pe];return it}function Kl(it,st,dt,ht){st=ha(st);var gt=st.call?st.call(it,ht):st[it];if(gt===!1)return"nothing";if(gt==="...")return"multi";if(gt!=null&&dt(gt))return"handled";if(st.fallthrough){if(Object.prototype.toString.call(st.fallthrough)!="[object Array]")return Kl(it,st.fallthrough,dt,ht);for(var Nt=0;Nt<st.fallthrough.length;Nt++){var Gt=Kl(it,st.fallthrough[Nt],dt,ht);if(Gt)return Gt}}}function Jh(it){var st=typeof it=="string"?it:Zu[it.keyCode];return st=="Ctrl"||st=="Alt"||st=="Shift"||st=="Mod"}function Yc(it,st,dt){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),!dt&&st.shiftKey&&ht!="Shift"&&(it="Shift-"+it),it}function Sf(it,st){if(Wt&&it.keyCode==34&&it.char)return!1;var dt=Zu[it.keyCode];return dt==null||it.altGraphKey?!1:(it.keyCode==3&&it.code&&(dt=it.code),Yc(dt,it,st))}function ha(it){return typeof it=="string"?Ml[it]:it}function Da(it,st){for(var dt=it.doc.sel.ranges,ht=[],gt=0;gt<dt.length;gt++){for(var Nt=st(dt[gt]);ht.length&&yn(Nt.from,Ee(ht).to)<=0;){var Gt=ht.pop();if(yn(Gt.from,Nt.from)<0){Nt.from=Gt.from;break}}ht.push(Nt)}rs(it,function(){for(var Jt=ht.length-1;Jt>=0;Jt--)xh(it.doc,"",ht[Jt].from,ht[Jt].to,"+delete");lu(it)})}function Bf(it,st,dt){var ht=ke(it.text,st+dt,dt);return ht<0||ht>it.text.length?null:ht}function oa(it,st,dt){var ht=Bf(it,st.ch,dt);return ht==null?null:new on(st.line,ht,dt<0?"after":"before")}function qh(it,st,dt,ht,gt){if(it){st.doc.direction=="rtl"&&(gt=-gt);var Nt=kn(dt,st.doc.direction);if(Nt){var Gt=gt<0?Ee(Nt):Nt[0],Jt=gt<0==(Gt.level==1),Yt=Jt?"after":"before",pe;if(Gt.level>0||st.doc.direction=="rtl"){var qe=Zo(st,dt);pe=gt<0?dt.text.length-1:0;var we=Ta(st,qe,pe).top;pe=Je(function(Mn){return Ta(st,qe,Mn).top==we},gt<0==(Gt.level==1)?Gt.from:Gt.to-1,pe),Yt=="before"&&(pe=Bf(dt,pe,1))}else pe=gt<0?Gt.to:Gt.from;return new on(ht,pe,Yt)}}return new on(ht,gt<0?dt.text.length:0,gt<0?"before":"after")}function $h(it,st,dt,ht){var gt=kn(st,it.doc.direction);if(!gt)return oa(st,dt,ht);dt.ch>=st.text.length?(dt.ch=st.text.length,dt.sticky="before"):dt.ch<=0&&(dt.ch=0,dt.sticky="after");var Nt=De(gt,dt.ch,dt.sticky),Gt=gt[Nt];if(it.doc.direction=="ltr"&&Gt.level%2==0&&(ht>0?Gt.to>dt.ch:Gt.from<dt.ch))return oa(st,dt,ht);var Jt=function(rr,Lr){return Bf(st,rr instanceof on?rr.ch:rr,Lr)},Yt,pe=function(rr){return it.options.lineWrapping?(Yt=Yt||Zo(it,st),cl(it,st,Yt,rr)):{begin:0,end:st.text.length}},qe=pe(dt.sticky=="before"?Jt(dt,-1):dt.ch);if(it.doc.direction=="rtl"||Gt.level==1){var we=Gt.level==1==ht<0,Mn=Jt(dt,we?1:-1);if(Mn!=null&&(we?Mn<=Gt.to&&Mn<=qe.end:Mn>=Gt.from&&Mn>=qe.begin)){var wn=we?"before":"after";return new on(dt.line,Mn,wn)}}var Si=function(rr,Lr,xr){for(var Qr=function(Hs,Sa){return Sa?new on(dt.line,Jt(Hs,1),"before"):new on(dt.line,Hs,"after")};rr>=0&&rr<gt.length;rr+=Lr){var lo=gt[rr],wr=Lr>0==(lo.level!=1),Mo=wr?xr.begin:Jt(xr.end,-1);if(lo.from<=Mo&&Mo<lo.to||(Mo=wr?lo.from:Jt(lo.to,-1),xr.begin<=Mo&&Mo<xr.end))return Qr(Mo,wr)}},bi=Si(Nt+ht,ht,qe);if(bi)return bi;var zi=ht>0?qe.end:Jt(qe.begin,-1);return zi!=null&&!(ht>0&&zi==st.text.length)&&(bi=Si(ht>0?0:gt.length-1,ht,pe(zi)),bi)?bi:null}var jA={selectAll:ra,singleSelection:function(it){return it.setSelection(it.getCursor("anchor"),it.getCursor("head"),un)},killLine:function(it){return Da(it,function(st){if(st.empty()){var dt=Ai(it.doc,st.head.line).text.length;return st.head.ch==dt&&st.head.line<it.lastLine()?{from:st.head,to:on(st.head.line+1,0)}:{from:st.head,to:on(st.head.line,dt)}}else return{from:st.from(),to:st.to()}})},deleteLine:function(it){return Da(it,function(st){return{from:on(st.from().line,0),to:ai(it.doc,on(st.to().line+1,0))}})},delLineLeft:function(it){return Da(it,function(st){return{from:on(st.from().line,0),to:st.from()}})},delWrappedLineLeft:function(it){return Da(it,function(st){var dt=it.charCoords(st.head,"div").top+5,ht=it.coordsChar({left:0,top:dt},"div");return{from:ht,to:st.from()}})},delWrappedLineRight:function(it){return Da(it,function(st){var dt=it.charCoords(st.head,"div").top+5,ht=it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:dt},"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(on(it.firstLine(),0))},goDocEnd:function(it){return it.extendSelection(on(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 dt=it.cursorCoords(st.head,"div").top+5;return it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:dt},"div")},si)},goLineLeft:function(it){return it.extendSelectionsBy(function(st){var dt=it.cursorCoords(st.head,"div").top+5;return it.coordsChar({left:0,top:dt},"div")},si)},goLineLeftSmart:function(it){return it.extendSelectionsBy(function(st){var dt=it.cursorCoords(st.head,"div").top+5,ht=it.coordsChar({left:0,top:dt},"div");return ht.ch<it.getLine(ht.line).search(/\S/)?Cf(it,st.head):ht},si)},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=[],dt=it.listSelections(),ht=it.options.tabSize,gt=0;gt<dt.length;gt++){var Nt=dt[gt].from(),Gt=be(it.getLine(Nt.line),Nt.ch,ht);st.push(oi(ht-Gt%ht))}it.replaceSelections(st)},defaultTab:function(it){it.somethingSelected()?it.indentSelection("add"):it.execCommand("insertTab")},transposeChars:function(it){return rs(it,function(){for(var st=it.listSelections(),dt=[],ht=0;ht<st.length;ht++)if(st[ht].empty()){var gt=st[ht].head,Nt=Ai(it.doc,gt.line).text;if(Nt){if(gt.ch==Nt.length&&(gt=new on(gt.line,gt.ch-1)),gt.ch>0)gt=new on(gt.line,gt.ch+1),it.replaceRange(Nt.charAt(gt.ch-1)+Nt.charAt(gt.ch-2),on(gt.line,gt.ch-2),gt,"+transpose");else if(gt.line>it.doc.first){var Gt=Ai(it.doc,gt.line-1).text;Gt&&(gt=new on(gt.line,1),it.replaceRange(Nt.charAt(0)+it.doc.lineSeparator()+Gt.charAt(Gt.length-1),on(gt.line-1,Gt.length-1),gt,"+transpose"))}}dt.push(new fs(gt,gt))}it.setSelections(dt)})},newlineAndIndent:function(it){return rs(it,function(){for(var st=it.listSelections(),dt=st.length-1;dt>=0;dt--)it.replaceRange(it.doc.lineSeparator(),st[dt].anchor,st[dt].head,"+input");st=it.listSelections();for(var ht=0;ht<st.length;ht++)it.indentLine(st[ht].from().line,null,!0);lu(it)})},openLine:function(it){return it.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(it){return it.toggleOverwrite()}};function tc(it,st){var dt=Ai(it.doc,st),ht=Sn(dt);return ht!=dt&&(st=he(ht)),qh(!0,it,ht,st,1)}function ec(it,st){var dt=Ai(it.doc,st),ht=dn(dt);return ht!=dt&&(st=he(ht)),qh(!0,it,dt,st,-1)}function Cf(it,st){var dt=tc(it,st.line),ht=Ai(it.doc,dt.line),gt=kn(ht,it.doc.direction);if(!gt||gt[0].level==0){var Nt=Math.max(dt.ch,ht.text.search(/\S/)),Gt=st.line==dt.line&&st.ch<=Nt&&st.ch;return on(dt.line,Gt?0:Nt,dt.sticky)}return dt}function nc(it,st,dt){if(typeof st=="string"&&(st=jA[st],!st))return!1;it.display.input.ensurePolled();var ht=it.display.shift,gt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),dt&&(it.display.shift=!1),gt=st(it)!=Jn}finally{it.display.shift=ht,it.state.suppressEdits=!1}return gt}function Pf(it,st,dt){for(var ht=0;ht<it.state.keyMaps.length;ht++){var gt=Kl(st,it.state.keyMaps[ht],dt,it);if(gt)return gt}return it.options.extraKeys&&Kl(st,it.options.extraKeys,dt,it)||Kl(st,it.options.keyMap,dt,it)}var Yu=new re;function Bh(it,st,dt,ht){var gt=it.state.keySeq;if(gt){if(Jh(st))return"handled";if(/\'$/.test(st)?it.state.keySeq=null:Yu.set(50,function(){it.state.keySeq==gt&&(it.state.keySeq=null,it.display.input.reset())}),Xc(it,gt+" "+st,dt,ht))return!0}return Xc(it,st,dt,ht)}function Xc(it,st,dt,ht){var gt=Pf(it,st,ht);return gt=="multi"&&(it.state.keySeq=st),gt=="handled"&&sr(it,"keyHandled",it,st,dt),(gt=="handled"||gt=="multi")&&(Yi(dt),is(it)),!!gt}function Jc(it,st){var dt=Sf(st,!0);return dt?st.shiftKey&&!it.state.keySeq?Bh(it,"Shift-"+dt,st,function(ht){return nc(it,ht,!0)})||Bh(it,dt,st,function(ht){if(typeof ht=="string"?/^go[A-Z]/.test(ht):ht.motion)return nc(it,ht)}):Bh(it,dt,st,function(ht){return nc(it,ht)}):!1}function qc(it,st,dt){return Bh(it,"'"+dt+"'",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=tn(),!Ei(st,it))){de&&Rt<11&&it.keyCode==27&&(it.returnValue=!1);var dt=it.keyCode;st.display.shift=dt==16||it.shiftKey;var ht=Jc(st,it);Wt&&(VA=ht?dt:null,!ht&&dt==88&&!Br&&(At?it.metaKey:it.ctrlKey)&&st.replaceSelection("",null,"cut")),Pt&&!At&&!ht&&dt==46&&it.shiftKey&&!it.ctrlKey&&document.execCommand&&document.execCommand("cut"),dt==18&&!/\bCodeMirror-crosshair\b/.test(st.display.lineDiv.className)&&Ff(st)}}function Ff(it){var st=it.display.lineDiv;Cn(st,"CodeMirror-crosshair");function dt(ht){(ht.keyCode==18||!ht.altKey)&&(Qt(st,"CodeMirror-crosshair"),di(document,"keyup",dt),di(document,"mouseover",dt))}gn(document,"keyup",dt),gn(document,"mouseover",dt)}function Ef(it){it.keyCode==16&&(this.doc.sel.shift=!1),Ei(this,it)}function bu(it){var st=this;if(!(it.target&&it.target!=st.display.input.getField())&&!(ts(st.display,it)||Ei(st,it)||it.ctrlKey&&!it.altKey||At&&it.metaKey)){var dt=it.keyCode,ht=it.charCode;if(Wt&&dt==VA){VA=null,Yi(it);return}if(!(Wt&&(!it.which||it.which<10)&&Jc(st,it))){var gt=String.fromCharCode(ht==null?dt:ht);gt!="\b"&&(qc(st,it,gt)||st.display.input.onKeyPress(it))}}}var gg=400,ic=function(it,st,dt){this.time=it,this.pos=st,this.button=dt};ic.prototype.compare=function(it,st,dt){return this.time+gg>it&&yn(st,this.pos)==0&&dt==this.button};var vA,Ch;function Hd(it,st){var dt=+new Date;return Ch&&Ch.compare(dt,it,st)?(vA=Ch=null,"triple"):vA&&vA.compare(dt,it,st)?(Ch=new ic(dt,it,st),vA=null,"double"):(vA=new ic(dt,it,st),Ch=null,"single")}function $l(it){var st=this,dt=st.display;if(!(Ei(st,it)||dt.activeTouch&&dt.input.supportsTouch())){if(dt.input.ensurePolled(),dt.shift=it.shiftKey,ts(dt,it)){ne||(dt.scroller.draggable=!1,setTimeout(function(){return dt.scroller.draggable=!0},100));return}if(!Kd(st,it)){var ht=xa(st,it),gt=Yr(it),Nt=ht?Hd(ht,gt):"single";window.focus(),gt==1&&st.state.selectingText&&st.state.selectingText(it),!(ht&&Rd(st,gt,ht,Nt,it))&&(gt==1?ht?Lf(st,ht,Nt,it):mr(it)==dt.scroller&&Yi(it):gt==2?(ht&&jh(st.doc,ht),setTimeout(function(){return dt.input.focus()},20)):gt==3&&(Mt?st.display.input.onContextMenu(it):Ms(st)))}}}function Rd(it,st,dt,ht,gt){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,gt),gt,function(Gt){if(typeof Gt=="string"&&(Gt=jA[Gt]),!Gt)return!1;var Jt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),Jt=Gt(it,dt)!=Jn}finally{it.state.suppressEdits=!1}return Jt})}function td(it,st,dt){var ht=it.getOption("configureMouse"),gt=ht?ht(it,st,dt):{};if(gt.unit==null){var Nt=at?dt.shiftKey&&dt.metaKey:dt.altKey;gt.unit=Nt?"rectangle":st=="single"?"char":st=="double"?"word":"line"}return(gt.extend==null||it.doc.extend)&&(gt.extend=it.doc.extend||dt.shiftKey),gt.addNew==null&&(gt.addNew=At?dt.metaKey:dt.ctrlKey),gt.moveOnDrag==null&&(gt.moveOnDrag=!(At?dt.altKey:dt.ctrlKey)),gt}function Lf(it,st,dt,ht){de?setTimeout($n(cs,it),0):it.curOp.focus=tn();var gt=td(it,dt,ht),Nt=it.doc.sel,Gt;it.options.dragDrop&&ji&&!it.isReadOnly()&&dt=="single"&&(Gt=Nt.contains(st))>-1&&(yn((Gt=Nt.ranges[Gt]).from(),st)<0||st.xRel>0)&&(yn(Gt.to(),st)>0||st.xRel<0)?Mf(it,ht,st,gt):pg(it,ht,st,gt)}function Mf(it,st,dt,ht){var gt=it.display,Nt=!1,Gt=ga(it,function(pe){ne&&(gt.scroller.draggable=!1),it.state.draggingText=!1,di(gt.wrapper.ownerDocument,"mouseup",Gt),di(gt.wrapper.ownerDocument,"mousemove",Jt),di(gt.scroller,"dragstart",Yt),di(gt.scroller,"drop",Gt),Nt||(Yi(pe),ht.addNew||jh(it.doc,dt,null,null,ht.extend),ne&&!Ne||de&&Rt==9?setTimeout(function(){gt.wrapper.ownerDocument.body.focus({preventScroll:!0}),gt.input.focus()},20):gt.input.focus())}),Jt=function(pe){Nt=Nt||Math.abs(st.clientX-pe.clientX)+Math.abs(st.clientY-pe.clientY)>=10},Yt=function(){return Nt=!0};ne&&(gt.scroller.draggable=!0),it.state.draggingText=Gt,Gt.copy=!ht.moveOnDrag,gt.scroller.dragDrop&>.scroller.dragDrop(),gn(gt.wrapper.ownerDocument,"mouseup",Gt),gn(gt.wrapper.ownerDocument,"mousemove",Jt),gn(gt.scroller,"dragstart",Yt),gn(gt.scroller,"drop",Gt),Ms(it),setTimeout(function(){return gt.input.focus()},20)}function rc(it,st,dt){if(dt=="char")return new fs(st,st);if(dt=="word")return it.findWordAt(st);if(dt=="line")return new fs(on(st.line,0),ai(it.doc,on(st.line+1,0)));var ht=dt(it,st);return new fs(ht.from,ht.to)}function pg(it,st,dt,ht){var gt=it.display,Nt=it.doc;Yi(st);var Gt,Jt,Yt=Nt.sel,pe=Yt.ranges;if(ht.addNew&&!ht.extend?(Jt=Nt.sel.contains(dt),Jt>-1?Gt=pe[Jt]:Gt=new fs(dt,dt)):(Gt=Nt.sel.primary(),Jt=Nt.sel.primIndex),ht.unit=="rectangle")ht.addNew||(Gt=new fs(dt,dt)),dt=xa(it,st,!0,!0),Jt=-1;else{var qe=rc(it,dt,ht.unit);ht.extend?Gt=bd(Gt,qe.anchor,qe.head,ht.extend):Gt=qe}ht.addNew?Jt==-1?(Jt=pe.length,Ka(Nt,gl(it,pe.concat([Gt]),Jt),{scroll:!1,origin:"*mouse"})):pe.length>1&&pe[Jt].empty()&&ht.unit=="char"&&!ht.extend?(Ka(Nt,gl(it,pe.slice(0,Jt).concat(pe.slice(Jt+1)),0),{scroll:!1,origin:"*mouse"}),Yt=Nt.sel):_A(Nt,Jt,Gt,Yn):(Jt=0,Ka(Nt,new Jl([Gt],0),Yn),Yt=Nt.sel);var we=dt;function Mn(xr){if(yn(we,xr)!=0)if(we=xr,ht.unit=="rectangle"){for(var Qr=[],lo=it.options.tabSize,wr=be(Ai(Nt,dt.line).text,dt.ch,lo),Mo=be(Ai(Nt,xr.line).text,xr.ch,lo),Hs=Math.min(wr,Mo),Sa=Math.max(wr,Mo),Ws=Math.min(dt.line,xr.line),ml=Math.min(it.lastLine(),Math.max(dt.line,xr.line));Ws<=ml;Ws++){var ba=Ai(Nt,Ws).text,ma=Fi(ba,Hs,lo);Hs==Sa?Qr.push(new fs(on(Ws,ma),on(Ws,ma))):ba.length>ma&&Qr.push(new fs(on(Ws,ma),on(Ws,Fi(ba,Sa,lo))))}Qr.length||Qr.push(new fs(dt,dt)),Ka(Nt,gl(it,Yt.ranges.slice(0,Jt).concat(Qr),Jt),{origin:"*mouse",scroll:!1}),it.scrollIntoView(xr)}else{var ol=Gt,Ia=rc(it,xr,ht.unit),vr=ol.anchor,jo;yn(Ia.anchor,vr)>0?(jo=Ia.head,vr=xn(ol.from(),Ia.anchor)):(jo=Ia.anchor,vr=An(ol.to(),Ia.head));var Rs=Yt.ranges.slice(0);Rs[Jt]=bf(it,new fs(ai(Nt,vr),jo)),Ka(Nt,gl(it,Rs,Jt),Yn)}}var wn=gt.wrapper.getBoundingClientRect(),Si=0;function bi(xr){var Qr=++Si,lo=xa(it,xr,!0,ht.unit=="rectangle");if(lo)if(yn(lo,we)!=0){it.curOp.focus=tn(),Mn(lo);var wr=Bo(gt,Nt);(lo.line>=wr.to||lo.line<wr.from)&&setTimeout(ga(it,function(){Si==Qr&&bi(xr)}),150)}else{var Mo=xr.clientY<wn.top?-20:xr.clientY>wn.bottom?20:0;Mo&&setTimeout(ga(it,function(){Si==Qr&&(gt.scroller.scrollTop+=Mo,bi(xr))}),50)}}function zi(xr){it.state.selectingText=!1,Si=1/0,xr&&(Yi(xr),gt.input.focus()),di(gt.wrapper.ownerDocument,"mousemove",rr),di(gt.wrapper.ownerDocument,"mouseup",Lr),Nt.history.lastSelOrigin=null}var rr=ga(it,function(xr){xr.buttons===0||!Yr(xr)?zi(xr):bi(xr)}),Lr=ga(it,zi);it.state.selectingText=Lr,gn(gt.wrapper.ownerDocument,"mousemove",rr),gn(gt.wrapper.ownerDocument,"mouseup",Lr)}function bf(it,st){var dt=st.anchor,ht=st.head,gt=Ai(it.doc,dt.line);if(yn(dt,ht)==0&&dt.sticky==ht.sticky)return st;var Nt=kn(gt);if(!Nt)return st;var Gt=De(Nt,dt.ch,dt.sticky),Jt=Nt[Gt];if(Jt.from!=dt.ch&&Jt.to!=dt.ch)return st;var Yt=Gt+(Jt.from==dt.ch==(Jt.level!=1)?0:1);if(Yt==0||Yt==Nt.length)return st;var pe;if(ht.line!=dt.line)pe=(ht.line-dt.line)*(it.doc.direction=="ltr"?1:-1)>0;else{var qe=De(Nt,ht.ch,ht.sticky),we=qe-Gt||(ht.ch-dt.ch)*(Jt.level==1?-1:1);qe==Yt-1||qe==Yt?pe=we<0:pe=we>0}var Mn=Nt[Yt+(pe?-1:0)],wn=pe==(Mn.level==1),Si=wn?Mn.from:Mn.to,bi=wn?"after":"before";return dt.ch==Si&&dt.sticky==bi?st:new fs(new on(dt.line,Si,bi),ht)}function _d(it,st,dt,ht){var gt,Nt;if(st.touches)gt=st.touches[0].clientX,Nt=st.touches[0].clientY;else try{gt=st.clientX,Nt=st.clientY}catch(Mn){return!1}if(gt>=Math.floor(it.display.gutters.getBoundingClientRect().right))return!1;ht&&Yi(st);var Gt=it.display,Jt=Gt.lineDiv.getBoundingClientRect();if(Nt>Jt.bottom||!Qi(it,dt))return Xi(st);Nt-=Jt.top-Gt.viewOffset;for(var Yt=0;Yt<it.display.gutterSpecs.length;++Yt){var pe=Gt.gutters.childNodes[Yt];if(pe&&pe.getBoundingClientRect().right>=gt){var qe=rn(it.doc,Nt),we=it.display.gutterSpecs[Yt];return xi(it,dt,it,qe,we.className,st),Xi(st)}}}function Kd(it,st){return _d(it,st,"gutterClick",!0)}function ed(it,st){ts(it.display,st)||Ph(it,st)||Ei(it,st,"contextmenu")||Mt||it.display.input.onContextMenu(st)}function Ph(it,st){return Qi(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-"),tl(it)}var ku={toString:function(){return"CodeMirror.Init"}},kf={},nd={};function mg(it){var st=it.optionHandlers;function dt(ht,gt,Nt,Gt){it.defaults[ht]=gt,Nt&&(st[ht]=Gt?function(Jt,Yt,pe){pe!=ku&&Nt(Jt,Yt,pe)}:Nt)}it.defineOption=dt,it.Init=ku,dt("value","",function(ht,gt){return ht.setValue(gt)},!0),dt("mode",null,function(ht,gt){ht.doc.modeOption=gt,Lo(ht)},!0),dt("indentUnit",2,Lo,!0),dt("indentWithTabs",!1),dt("smartIndent",!0),dt("tabSize",4,function(ht){Hc(ht),tl(ht),ms(ht)},!0),dt("lineSeparator",null,function(ht,gt){if(ht.doc.lineSep=gt,!!gt){var Nt=[],Gt=ht.doc.first;ht.doc.iter(function(Yt){for(var pe=0;;){var qe=Yt.text.indexOf(gt,pe);if(qe==-1)break;pe=qe+gt.length,Nt.push(on(Gt,qe))}Gt++});for(var Jt=Nt.length-1;Jt>=0;Jt--)xh(ht.doc,gt,Nt[Jt],on(Nt[Jt].line,Nt[Jt].ch+gt.length))}}),dt("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(ht,gt,Nt){ht.state.specialChars=new RegExp(gt.source+(gt.test(" ")?"":"| "),"g"),Nt!=ku&&ht.refresh()}),dt("specialCharPlaceholder",gr,function(ht){return ht.refresh()},!0),dt("electricChars",!0),dt("inputStyle",et?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),dt("spellcheck",!1,function(ht,gt){return ht.getInputField().spellcheck=gt},!0),dt("autocorrect",!1,function(ht,gt){return ht.getInputField().autocorrect=gt},!0),dt("autocapitalize",!1,function(ht,gt){return ht.getInputField().autocapitalize=gt},!0),dt("rtlMoveVisually",!ct),dt("wholeLineUpdateBefore",!0),dt("theme","default",function(ht){oc(ht),Rl(ht)},!0),dt("keyMap","default",function(ht,gt,Nt){var Gt=ha(gt),Jt=Nt!=ku&&ha(Nt);Jt&&Jt.detach&&Jt.detach(ht,Gt),Gt.attach&&Gt.attach(ht,Jt||null)}),dt("extraKeys",null),dt("configureMouse",null),dt("lineWrapping",!1,Tf,!0),dt("gutters",[],function(ht,gt){ht.display.gutterSpecs=Ea(gt,ht.options.lineNumbers),Rl(ht)},!0),dt("fixedGutter",!0,function(ht,gt){ht.display.gutters.style.left=gt?au(ht.display)+"px":"0",ht.refresh()},!0),dt("coverGutterNextToScrollbar",!1,function(ht){return na(ht)},!0),dt("scrollbarStyle","native",function(ht){xu(ht),na(ht),ht.display.scrollbars.setScrollTop(ht.doc.scrollTop),ht.display.scrollbars.setScrollLeft(ht.doc.scrollLeft)},!0),dt("lineNumbers",!1,function(ht,gt){ht.display.gutterSpecs=Ea(ht.options.gutters,gt),Rl(ht)},!0),dt("firstLineNumber",1,Rl,!0),dt("lineNumberFormatter",function(ht){return ht},Rl,!0),dt("showCursorWhenSelecting",!1,Vs,!0),dt("resetSelectionOnContextMenu",!0),dt("lineWiseCopyCut",!0),dt("pasteLinesPerSelection",!0),dt("selectionsMayTouch",!1),dt("readOnly",!1,function(ht,gt){gt=="nocursor"&&(dA(ht),ht.display.input.blur()),ht.display.input.readOnlyChanged(gt)}),dt("screenReaderLabel",null,function(ht,gt){gt=gt===""?null:gt,ht.display.input.screenReaderLabelChanged(gt)}),dt("disableInput",!1,function(ht,gt){gt||ht.display.input.reset()},!0),dt("dragDrop",!0,Gd),dt("allowDropFileTypes",null),dt("cursorBlinkRate",530),dt("cursorScrollMargin",0),dt("cursorHeight",1,Vs,!0),dt("singleCursorHeightPerLine",!0,Vs,!0),dt("workTime",100),dt("workDelay",100),dt("flattenSpans",!0,Hc,!0),dt("addModeClass",!1,Hc,!0),dt("pollInterval",100),dt("undoDepth",200,function(ht,gt){return ht.doc.history.undoDepth=gt}),dt("historyEventDelay",1250),dt("viewportMargin",10,function(ht){return ht.refresh()},!0),dt("maxHighlightLength",1e4,Hc,!0),dt("moveInputWithCursor",!0,function(ht,gt){gt||ht.display.input.resetPosition()}),dt("tabindex",null,function(ht,gt){return ht.display.input.getField().tabIndex=gt||""}),dt("autofocus",null),dt("direction","ltr",function(ht,gt){return ht.doc.setDirection(gt)},!0),dt("phrases",null)}function Gd(it,st,dt){var ht=dt&&dt!=ku;if(!st!=!ht){var gt=it.display.dragFunctions,Nt=st?gn:di;Nt(it.display.scroller,"dragstart",gt.start),Nt(it.display.scroller,"dragenter",gt.enter),Nt(it.display.scroller,"dragover",gt.over),Nt(it.display.scroller,"dragleave",gt.leave),Nt(it.display.scroller,"drop",gt.drop)}}function Tf(it){it.options.lineWrapping?(Cn(it.display.wrapper,"CodeMirror-wrap"),it.display.sizer.style.minWidth="",it.display.sizerWidth=null):(Qt(it.display.wrapper,"CodeMirror-wrap"),Ji(it)),_r(it),ms(it),tl(it),setTimeout(function(){return na(it)},100)}function Yo(it,st){var dt=this;if(!(this instanceof Yo))return new Yo(it,st);this.options=st=st?Ln(st):{},Ln(kf,st,!1);var ht=st.value;typeof ht=="string"?ht=new Ma(ht,st.mode,null,st.lineSeparator,st.direction):st.mode&&(ht.modeOption=st.mode),this.doc=ht;var gt=new Yo.inputStyles[st.inputStyle](this),Nt=this.display=new QA(it,ht,gt,st);Nt.wrapper.CodeMirror=this,oc(this),st.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),xu(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 re,keySeq:null,specialChars:null},st.autofocus&&!et&&Nt.input.focus(),de&&Rt<11&&setTimeout(function(){return dt.display.input.reset(!0)},20),Fh(this),pl(),Hl(this),this.curOp.forceUpdate=!0,pa(this,ht),st.autofocus&&!et||this.hasFocus()?setTimeout(function(){dt.hasFocus()&&!dt.state.focused&&_o(dt)},20):dA(this);for(var Gt in nd)nd.hasOwnProperty(Gt)&&nd[Gt](this,st[Gt],ku);Aa(this),st.finishInit&&st.finishInit(this);for(var Jt=0;Jt<WA.length;++Jt)WA[Jt](this);Au(this),ne&&st.lineWrapping&&getComputedStyle(Nt.lineDiv).textRendering=="optimizelegibility"&&(Nt.lineDiv.style.textRendering="auto")}Yo.defaults=kf,Yo.optionHandlers=nd;function Fh(it){var st=it.display;gn(st.scroller,"mousedown",ga(it,$l)),de&&Rt<11?gn(st.scroller,"dblclick",ga(it,function(Yt){if(!Ei(it,Yt)){var pe=xa(it,Yt);if(!(!pe||Kd(it,Yt)||ts(it.display,Yt))){Yi(Yt);var qe=it.findWordAt(pe);jh(it.doc,qe.anchor,qe.head)}}})):gn(st.scroller,"dblclick",function(Yt){return Ei(it,Yt)||Yi(Yt)}),gn(st.scroller,"contextmenu",function(Yt){return ed(it,Yt)}),gn(st.input.getField(),"contextmenu",function(Yt){st.scroller.contains(Yt.target)||ed(it,Yt)});var dt,ht={end:0};function gt(){st.activeTouch&&(dt=setTimeout(function(){return st.activeTouch=null},1e3),ht=st.activeTouch,ht.end=+new Date)}function Nt(Yt){if(Yt.touches.length!=1)return!1;var pe=Yt.touches[0];return pe.radiusX<=1&&pe.radiusY<=1}function Gt(Yt,pe){if(pe.left==null)return!0;var qe=pe.left-Yt.left,we=pe.top-Yt.top;return qe*qe+we*we>20*20}gn(st.scroller,"touchstart",function(Yt){if(!Ei(it,Yt)&&!Nt(Yt)&&!Kd(it,Yt)){st.input.ensurePolled(),clearTimeout(dt);var pe=+new Date;st.activeTouch={start:pe,moved:!1,prev:pe-ht.end<=300?ht:null},Yt.touches.length==1&&(st.activeTouch.left=Yt.touches[0].pageX,st.activeTouch.top=Yt.touches[0].pageY)}}),gn(st.scroller,"touchmove",function(){st.activeTouch&&(st.activeTouch.moved=!0)}),gn(st.scroller,"touchend",function(Yt){var pe=st.activeTouch;if(pe&&!ts(st,Yt)&&pe.left!=null&&!pe.moved&&new Date-pe.start<300){var qe=it.coordsChar(st.activeTouch,"page"),we;!pe.prev||Gt(pe,pe.prev)?we=new fs(qe,qe):!pe.prev.prev||Gt(pe,pe.prev.prev)?we=it.findWordAt(qe):we=new fs(on(qe.line,0),ai(it.doc,on(qe.line+1,0))),it.setSelection(we.anchor,we.head),it.focus(),Yi(Yt)}gt()}),gn(st.scroller,"touchcancel",gt),gn(st.scroller,"scroll",function(){st.scroller.clientHeight&&(yu(it,st.scroller.scrollTop),wu(it,st.scroller.scrollLeft,!0),xi(it,"scroll",it))}),gn(st.scroller,"mousewheel",function(Yt){return La(it,Yt)}),gn(st.scroller,"DOMMouseScroll",function(Yt){return La(it,Yt)}),gn(st.wrapper,"scroll",function(){return st.wrapper.scrollTop=st.wrapper.scrollLeft=0}),st.dragFunctions={enter:function(Yt){Ei(it,Yt)||Fr(Yt)},over:function(Yt){Ei(it,Yt)||(cg(it,Yt),Fr(Yt))},start:function(Yt){return Qd(it,Yt)},drop:ga(it,Ud),leave:function(Yt){Ei(it,Yt)||dg(it)}};var Jt=st.input.getField();gn(Jt,"keyup",function(Yt){return Ef.call(it,Yt)}),gn(Jt,"keydown",ga(it,$c)),gn(Jt,"keypress",ga(it,bu)),gn(Jt,"focus",function(Yt){return _o(it,Yt)}),gn(Jt,"blur",function(Yt){return dA(it,Yt)})}var WA=[];Yo.defineInitHook=function(it){return WA.push(it)};function ca(it,st,dt,ht){var gt=it.doc,Nt;dt==null&&(dt="add"),dt=="smart"&&(gt.mode.indent?Nt=Kr(it,st).state:dt="prev");var Gt=it.options.tabSize,Jt=Ai(gt,st),Yt=be(Jt.text,null,Gt);Jt.stateAfter&&(Jt.stateAfter=null);var pe=Jt.text.match(/^\s*/)[0],qe;if(!ht&&!/\S/.test(Jt.text))qe=0,dt="not";else if(dt=="smart"&&(qe=gt.mode.indent(Nt,Jt.text.slice(pe.length),Jt.text),qe==Jn||qe>150)){if(!ht)return;dt="prev"}dt=="prev"?st>gt.first?qe=be(Ai(gt,st-1).text,null,Gt):qe=0:dt=="add"?qe=Yt+it.options.indentUnit:dt=="subtract"?qe=Yt-it.options.indentUnit:typeof dt=="number"&&(qe=Yt+dt),qe=Math.max(0,qe);var we="",Mn=0;if(it.options.indentWithTabs)for(var wn=Math.floor(qe/Gt);wn;--wn)Mn+=Gt,we+=" ";if(Mn<qe&&(we+=oi(qe-Mn)),we!=pe)return xh(gt,we,on(st,0),on(st,pe.length),"+input"),Jt.stateAfter=null,!0;for(var Si=0;Si<gt.sel.ranges.length;Si++){var bi=gt.sel.ranges[Si];if(bi.head.line==st&&bi.head.ch<pe.length){var zi=on(st,pe.length);_A(gt,Si,new fs(zi,zi));break}}}var rl=null;function ZA(it){rl=it}function id(it,st,dt,ht,gt){var Nt=it.doc;it.display.shift=!1,ht||(ht=Nt.sel);var Gt=+new Date-200,Jt=gt=="paste"||it.state.pasteIncoming>Gt,Yt=Zr(st),pe=null;if(Jt&&ht.ranges.length>1)if(rl&&rl.text.join(`
|
|
|
`)==st){if(ht.ranges.length%rl.text.length==0){pe=[];for(var qe=0;qe<rl.text.length;qe++)pe.push(Nt.splitLines(rl.text[qe]))}}else Yt.length==ht.ranges.length&&it.options.pasteLinesPerSelection&&(pe=ci(Yt,function(rr){return[rr]}));for(var we=it.curOp.updateInput,Mn=ht.ranges.length-1;Mn>=0;Mn--){var wn=ht.ranges[Mn],Si=wn.from(),bi=wn.to();wn.empty()&&(dt&&dt>0?Si=on(Si.line,Si.ch-dt):it.state.overwrite&&!Jt?bi=on(bi.line,Math.min(Ai(Nt,bi.line).text.length,bi.ch+Ee(Yt).length)):Jt&&rl&&rl.lineWise&&rl.text.join(`
|
|
|
`)==Yt.join(`
|
|
|
`)&&(Si=bi=on(Si.line,0)));var zi={from:Si,to:bi,text:pe?pe[Mn%pe.length]:Yt,origin:gt||(Jt?"paste":it.state.cutIncoming>Gt?"cut":"+input")};GA(it.doc,zi),sr(it,"inputRead",it,zi)}st&&!Jt&&ac(it,st),lu(it),it.curOp.updateInput<2&&(it.curOp.updateInput=we),it.curOp.typing=!0,it.state.pasteIncoming=it.state.cutIncoming=-1}function sc(it,st){var dt=it.clipboardData&&it.clipboardData.getData("Text");if(dt)return it.preventDefault(),!st.isReadOnly()&&!st.options.disableInput&&rs(st,function(){return id(st,dt,0,null,"paste")}),!0}function ac(it,st){if(!(!it.options.electricChars||!it.options.smartIndent))for(var dt=it.doc.sel,ht=dt.ranges.length-1;ht>=0;ht--){var gt=dt.ranges[ht];if(!(gt.head.ch>100||ht&&dt.ranges[ht-1].head.line==gt.head.line)){var Nt=it.getModeAt(gt.head),Gt=!1;if(Nt.electricChars){for(var Jt=0;Jt<Nt.electricChars.length;Jt++)if(st.indexOf(Nt.electricChars.charAt(Jt))>-1){Gt=ca(it,gt.head.line,"smart");break}}else Nt.electricInput&&Nt.electricInput.test(Ai(it.doc,gt.head.line).text.slice(0,gt.head.ch))&&(Gt=ca(it,gt.head.line,"smart"));Gt&&sr(it,"electricInput",it,gt.head.line)}}}function zd(it){for(var st=[],dt=[],ht=0;ht<it.doc.sel.ranges.length;ht++){var gt=it.doc.sel.ranges[ht].head.line,Nt={anchor:on(gt,0),head:on(gt+1,0)};dt.push(Nt),st.push(it.getRange(Nt.anchor,Nt.head))}return{text:st,ranges:dt}}function jd(it,st,dt,ht){it.setAttribute("autocorrect",dt?"":"off"),it.setAttribute("autocapitalize",ht?"":"off"),it.setAttribute("spellcheck",!!st)}function Nf(){var it=$t("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),st=$t("div",[it],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return ne?it.style.width="1000px":it.setAttribute("wrap","off"),Ut&&(it.style.border="1px solid black"),jd(it),st}function yA(it){var st=it.optionHandlers,dt=it.helpers={};it.prototype={constructor:it,focus:function(){window.focus(),this.display.input.focus()},setOption:function(ht,gt){var Nt=this.options,Gt=Nt[ht];Nt[ht]==gt&&ht!="mode"||(Nt[ht]=gt,st.hasOwnProperty(ht)&&ga(this,st[ht])(this,gt,Gt),xi(this,"optionChange",this,ht))},getOption:function(ht){return this.options[ht]},getDoc:function(){return this.doc},addKeyMap:function(ht,gt){this.state.keyMaps[gt?"push":"unshift"](ha(ht))},removeKeyMap:function(ht){for(var gt=this.state.keyMaps,Nt=0;Nt<gt.length;++Nt)if(gt[Nt]==ht||gt[Nt].name==ht)return gt.splice(Nt,1),!0},addOverlay:Pa(function(ht,gt){var Nt=ht.token?ht:it.getMode(this.options,ht);if(Nt.startState)throw new Error("Overlays may not be stateful.");Pi(this.state.overlays,{mode:Nt,modeSpec:ht,opaque:gt&>.opaque,priority:gt&>.priority||0},function(Gt){return Gt.priority}),this.state.modeGen++,ms(this)}),removeOverlay:Pa(function(ht){for(var gt=this.state.overlays,Nt=0;Nt<gt.length;++Nt){var Gt=gt[Nt].modeSpec;if(Gt==ht||typeof ht=="string"&&Gt.name==ht){gt.splice(Nt,1),this.state.modeGen++,ms(this);return}}}),indentLine:Pa(function(ht,gt,Nt){typeof gt!="string"&&typeof gt!="number"&&(gt==null?gt=this.options.smartIndent?"smart":"prev":gt=gt?"add":"subtract"),Wn(this.doc,ht)&&ca(this,ht,gt,Nt)}),indentSelection:Pa(function(ht){for(var gt=this.doc.sel.ranges,Nt=-1,Gt=0;Gt<gt.length;Gt++){var Jt=gt[Gt];if(Jt.empty())Jt.head.line>Nt&&(ca(this,Jt.head.line,ht,!0),Nt=Jt.head.line,Gt==this.doc.sel.primIndex&&lu(this));else{var Yt=Jt.from(),pe=Jt.to(),qe=Math.max(Nt,Yt.line);Nt=Math.min(this.lastLine(),pe.line-(pe.ch?0:1))+1;for(var we=qe;we<Nt;++we)ca(this,we,ht);var Mn=this.doc.sel.ranges;Yt.ch==0&>.length==Mn.length&&Mn[Gt].from().ch>0&&_A(this.doc,Gt,new fs(Yt,Mn[Gt].to()),un)}}}),getTokenAt:function(ht,gt){return vi(this,ht,gt)},getLineTokens:function(ht,gt){return vi(this,on(ht),gt,!0)},getTokenTypeAt:function(ht){ht=ai(this.doc,ht);var gt=cr(this,Ai(this.doc,ht.line)),Nt=0,Gt=(gt.length-1)/2,Jt=ht.ch,Yt;if(Jt==0)Yt=gt[2];else for(;;){var pe=Nt+Gt>>1;if((pe?gt[pe*2-1]:0)>=Jt)Gt=pe;else if(gt[pe*2+1]<Jt)Nt=pe+1;else{Yt=gt[pe*2+2];break}}var qe=Yt?Yt.indexOf("overlay "):-1;return qe<0?Yt:qe==0?null:Yt.slice(0,qe-1)},getModeAt:function(ht){var gt=this.doc.mode;return gt.innerMode?it.innerMode(gt,this.getTokenAt(ht).state).mode:gt},getHelper:function(ht,gt){return this.getHelpers(ht,gt)[0]},getHelpers:function(ht,gt){var Nt=[];if(!dt.hasOwnProperty(gt))return Nt;var Gt=dt[gt],Jt=this.getModeAt(ht);if(typeof Jt[gt]=="string")Gt[Jt[gt]]&&Nt.push(Gt[Jt[gt]]);else if(Jt[gt])for(var Yt=0;Yt<Jt[gt].length;Yt++){var pe=Gt[Jt[gt][Yt]];pe&&Nt.push(pe)}else Jt.helperType&&Gt[Jt.helperType]?Nt.push(Gt[Jt.helperType]):Gt[Jt.name]&&Nt.push(Gt[Jt.name]);for(var qe=0;qe<Gt._global.length;qe++){var we=Gt._global[qe];we.pred(Jt,this)&&Pn(Nt,we.val)==-1&&Nt.push(we.val)}return Nt},getStateAfter:function(ht,gt){var Nt=this.doc;return ht=Nn(Nt,ht==null?Nt.first+Nt.size-1:ht),Kr(this,ht+1,gt).state},cursorCoords:function(ht,gt){var Nt,Gt=this.doc.sel.primary();return ht==null?Nt=Gt.head:typeof ht=="object"?Nt=ai(this.doc,ht):Nt=ht?Gt.from():Gt.to(),mo(this,Nt,gt||"page")},charCoords:function(ht,gt){return so(this,ai(this.doc,ht),gt||"page")},coordsChar:function(ht,gt){return ht=Oo(this,ht,gt||"page"),ss(this,ht.left,ht.top)},lineAtHeight:function(ht,gt){return ht=Oo(this,{top:ht,left:0},gt||"page").top,rn(this.doc,ht+this.display.viewOffset)},heightAtLine:function(ht,gt,Nt){var Gt=!1,Jt;if(typeof ht=="number"){var Yt=this.doc.first+this.doc.size-1;ht<this.doc.first?ht=this.doc.first:ht>Yt&&(ht=Yt,Gt=!0),Jt=Ai(this.doc,ht)}else Jt=ht;return js(this,Jt,{top:0,left:0},gt||"page",Nt||Gt).top+(Gt?this.doc.height-Ui(Jt):0)},defaultTextHeight:function(){return dl(this.display)},defaultCharWidth:function(){return vu(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(ht,gt,Nt,Gt,Jt){var Yt=this.display;ht=mo(this,ai(this.doc,ht));var pe=ht.bottom,qe=ht.left;if(gt.style.position="absolute",gt.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(gt),Yt.sizer.appendChild(gt),Gt=="over")pe=ht.top;else if(Gt=="above"||Gt=="near"){var we=Math.max(Yt.wrapper.clientHeight,this.doc.height),Mn=Math.max(Yt.sizer.clientWidth,Yt.lineSpace.clientWidth);(Gt=="above"||ht.bottom+gt.offsetHeight>we)&&ht.top>gt.offsetHeight?pe=ht.top-gt.offsetHeight:ht.bottom+gt.offsetHeight<=we&&(pe=ht.bottom),qe+gt.offsetWidth>Mn&&(qe=Mn-gt.offsetWidth)}gt.style.top=pe+"px",gt.style.left=gt.style.right="",Jt=="right"?(qe=Yt.sizer.clientWidth-gt.offsetWidth,gt.style.right="0px"):(Jt=="left"?qe=0:Jt=="middle"&&(qe=(Yt.sizer.clientWidth-gt.offsetWidth)/2),gt.style.left=qe+"px"),Nt&&TA(this,{left:qe,top:pe,right:qe+gt.offsetWidth,bottom:pe+gt.offsetHeight})},triggerOnKeyDown:Pa($c),triggerOnKeyPress:Pa(bu),triggerOnKeyUp:Ef,triggerOnMouseDown:Pa($l),execCommand:function(ht){if(jA.hasOwnProperty(ht))return jA[ht].call(null,this)},triggerElectric:Pa(function(ht){ac(this,ht)}),findPosH:function(ht,gt,Nt,Gt){var Jt=1;gt<0&&(Jt=-1,gt=-gt);for(var Yt=ai(this.doc,ht),pe=0;pe<gt&&(Yt=lc(this.doc,Yt,Jt,Nt,Gt),!Yt.hitSide);++pe);return Yt},moveH:Pa(function(ht,gt){var Nt=this;this.extendSelectionsBy(function(Gt){return Nt.display.shift||Nt.doc.extend||Gt.empty()?lc(Nt.doc,Gt.head,ht,gt,Nt.options.rtlMoveVisually):ht<0?Gt.from():Gt.to()},si)}),deleteH:Pa(function(ht,gt){var Nt=this.doc.sel,Gt=this.doc;Nt.somethingSelected()?Gt.replaceSelection("",null,"+delete"):Da(this,function(Jt){var Yt=lc(Gt,Jt.head,ht,gt,!1);return ht<0?{from:Yt,to:Jt.head}:{from:Jt.head,to:Yt}})}),findPosV:function(ht,gt,Nt,Gt){var Jt=1,Yt=Gt;gt<0&&(Jt=-1,gt=-gt);for(var pe=ai(this.doc,ht),qe=0;qe<gt;++qe){var we=mo(this,pe,"div");if(Yt==null?Yt=we.left:we.left=Yt,pe=YA(this,we,Jt,Nt),pe.hitSide)break}return pe},moveV:Pa(function(ht,gt){var Nt=this,Gt=this.doc,Jt=[],Yt=!this.display.shift&&!Gt.extend&&Gt.sel.somethingSelected();if(Gt.extendSelectionsBy(function(qe){if(Yt)return ht<0?qe.from():qe.to();var we=mo(Nt,qe.head,"div");qe.goalColumn!=null&&(we.left=qe.goalColumn),Jt.push(we.left);var Mn=YA(Nt,we,ht,gt);return gt=="page"&&qe==Gt.sel.primary()&&ch(Nt,so(Nt,Mn,"div").top-we.top),Mn},si),Jt.length)for(var pe=0;pe<Gt.sel.ranges.length;pe++)Gt.sel.ranges[pe].goalColumn=Jt[pe]}),findWordAt:function(ht){var gt=this.doc,Nt=Ai(gt,ht.line).text,Gt=ht.ch,Jt=ht.ch;if(Nt){var Yt=this.getHelper(ht,"wordChars");(ht.sticky=="before"||Jt==Nt.length)&&Gt?--Gt:++Jt;for(var pe=Nt.charAt(Gt),qe=Lt(pe,Yt)?function(we){return Lt(we,Yt)}:/\s/.test(pe)?function(we){return/\s/.test(we)}:function(we){return!/\s/.test(we)&&!Lt(we)};Gt>0&&qe(Nt.charAt(Gt-1));)--Gt;for(;Jt<Nt.length&&qe(Nt.charAt(Jt));)++Jt}return new fs(on(ht.line,Gt),on(ht.line,Jt))},toggleOverwrite:function(ht){ht!=null&&ht==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Cn(this.display.cursorDiv,"CodeMirror-overwrite"):Qt(this.display.cursorDiv,"CodeMirror-overwrite"),xi(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==tn()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Pa(function(ht,gt){uu(this,ht,gt)}),getScrollInfo:function(){var ht=this.display.scroller;return{left:ht.scrollLeft,top:ht.scrollTop,height:ht.scrollHeight-Io(this)-this.display.barHeight,width:ht.scrollWidth-Io(this)-this.display.barWidth,clientHeight:Wo(this),clientWidth:ys(this)}},scrollIntoView:Pa(function(ht,gt){ht==null?(ht={from:this.doc.sel.primary().head,to:null},gt==null&&(gt=this.options.cursorScrollMargin)):typeof ht=="number"?ht={from:on(ht,0),to:null}:ht.from==null&&(ht={from:ht,to:null}),ht.to||(ht.to=ht.from),ht.margin=gt||0,ht.from.line!=null?Ho(this,ht):dh(this,ht.from,ht.to,ht.margin)}),setSize:Pa(function(ht,gt){var Nt=this,Gt=function(Yt){return typeof Yt=="number"||/^\d+$/.test(String(Yt))?Yt+"px":Yt};ht!=null&&(this.display.wrapper.style.width=Gt(ht)),gt!=null&&(this.display.wrapper.style.height=Gt(gt)),this.options.lineWrapping&&wa(this);var Jt=this.display.viewFrom;this.doc.iter(Jt,this.display.viewTo,function(Yt){if(Yt.widgets){for(var pe=0;pe<Yt.widgets.length;pe++)if(Yt.widgets[pe].noHScroll){po(Nt,Jt,"widget");break}}++Jt}),this.curOp.forceUpdate=!0,xi(this,"refresh",this)}),operation:function(ht){return rs(this,ht)},startOperation:function(){return Hl(this)},endOperation:function(){return Au(this)},refresh:Pa(function(){var ht=this.display.cachedTextHeight;ms(this),this.curOp.forceUpdate=!0,tl(this),uu(this,this.doc.scrollLeft,this.doc.scrollTop),IA(this.display),(ht==null||Math.abs(ht-dl(this.display))>.5||this.options.lineWrapping)&&_r(this),xi(this,"refresh",this)}),swapDoc:Pa(function(ht){var gt=this.doc;return gt.cm=null,this.state.selectingText&&this.state.selectingText(),pa(this,ht),tl(this),this.display.input.reset(),uu(this,ht.scrollLeft,ht.scrollTop),this.curOp.forceScroll=!0,sr(this,"swapDoc",this,gt),gt}),phrase:function(ht){var gt=this.options.phrases;return gt&&Object.prototype.hasOwnProperty.call(gt,ht)?gt[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}},Oi(it),it.registerHelper=function(ht,gt,Nt){dt.hasOwnProperty(ht)||(dt[ht]=it[ht]={_global:[]}),dt[ht][gt]=Nt},it.registerGlobalHelper=function(ht,gt,Nt,Gt){it.registerHelper(ht,gt,Gt),dt[ht]._global.push({pred:Nt,val:Gt})}}function lc(it,st,dt,ht,gt){var Nt=st,Gt=dt,Jt=Ai(it,st.line),Yt=gt&&it.direction=="rtl"?-dt:dt;function pe(){var Lr=st.line+Yt;return Lr<it.first||Lr>=it.first+it.size?!1:(st=new on(Lr,st.ch,st.sticky),Jt=Ai(it,Lr))}function qe(Lr){var xr;if(ht=="codepoint"){var Qr=Jt.text.charCodeAt(st.ch+(ht>0?0:-1));isNaN(Qr)?xr=null:xr=new on(st.line,Math.max(0,Math.min(Jt.text.length,st.ch+dt*(Qr>=55296&&Qr<56320?2:1))),-dt)}else gt?xr=$h(it.cm,Jt,st,dt):xr=oa(Jt,st,dt);if(xr==null)if(!Lr&&pe())st=qh(gt,it.cm,Jt,st.line,Yt);else return!1;else st=xr;return!0}if(ht=="char"||ht=="codepoint")qe();else if(ht=="column")qe(!0);else if(ht=="word"||ht=="group")for(var we=null,Mn=ht=="group",wn=it.cm&&it.cm.getHelper(st,"wordChars"),Si=!0;!(dt<0&&!qe(!Si));Si=!1){var bi=Jt.text.charAt(st.ch)||`
|
|
|
`,zi=Lt(bi,wn)?"w":Mn&&bi==`
|
|
|
`?"n":!Mn||/\s/.test(bi)?null:"p";if(Mn&&!Si&&!zi&&(zi="s"),we&&we!=zi){dt<0&&(dt=1,qe(),st.sticky="after");break}if(zi&&(we=zi),dt>0&&!qe(!Si))break}var rr=Gc(it,st,Nt,Gt,!0);return ii(Nt,rr)&&(rr.hitSide=!0),rr}function YA(it,st,dt,ht){var gt=it.doc,Nt=st.left,Gt;if(ht=="page"){var Jt=Math.min(it.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Yt=Math.max(Jt-.5*dl(it.display),3);Gt=(dt>0?st.bottom:st.top)+dt*Yt}else ht=="line"&&(Gt=dt>0?st.bottom+3:st.top-3);for(var pe;pe=ss(it,Nt,Gt),!!pe.outside;){if(dt<0?Gt<=0:Gt>=gt.height){pe.hitSide=!0;break}Gt+=dt*5}return pe}var Cs=function(it){this.cm=it,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new re,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Cs.prototype.init=function(it){var st=this,dt=this,ht=dt.cm,gt=dt.div=it.lineDiv;jd(gt,ht.options.spellcheck,ht.options.autocorrect,ht.options.autocapitalize);function Nt(Jt){for(var Yt=Jt.target;Yt;Yt=Yt.parentNode){if(Yt==gt)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Yt.className))break}return!1}gn(gt,"paste",function(Jt){!Nt(Jt)||Ei(ht,Jt)||sc(Jt,ht)||Rt<=11&&setTimeout(ga(ht,function(){return st.updateFromDOM()}),20)}),gn(gt,"compositionstart",function(Jt){st.composing={data:Jt.data,done:!1}}),gn(gt,"compositionupdate",function(Jt){st.composing||(st.composing={data:Jt.data,done:!1})}),gn(gt,"compositionend",function(Jt){st.composing&&(Jt.data!=st.composing.data&&st.readFromDOMSoon(),st.composing.done=!0)}),gn(gt,"touchstart",function(){return dt.forceCompositionEnd()}),gn(gt,"input",function(){st.composing||st.readFromDOMSoon()});function Gt(Jt){if(!(!Nt(Jt)||Ei(ht,Jt))){if(ht.somethingSelected())ZA({lineWise:!1,text:ht.getSelections()}),Jt.type=="cut"&&ht.replaceSelection("",null,"cut");else if(ht.options.lineWiseCopyCut){var Yt=zd(ht);ZA({lineWise:!0,text:Yt.text}),Jt.type=="cut"&&ht.operation(function(){ht.setSelections(Yt.ranges,0,un),ht.replaceSelection("",null,"cut")})}else return;if(Jt.clipboardData){Jt.clipboardData.clearData();var pe=rl.text.join(`
|
|
|
`);if(Jt.clipboardData.setData("Text",pe),Jt.clipboardData.getData("Text")==pe){Jt.preventDefault();return}}var qe=Nf(),we=qe.firstChild;ht.display.lineSpace.insertBefore(qe,ht.display.lineSpace.firstChild),we.value=rl.text.join(`
|
|
|
`);var Mn=document.activeElement;In(we),setTimeout(function(){ht.display.lineSpace.removeChild(qe),Mn.focus(),Mn==gt&&dt.showPrimarySelection()},50)}}gn(gt,"copy",Gt),gn(gt,"cut",Gt)},Cs.prototype.screenReaderLabelChanged=function(it){it?this.div.setAttribute("aria-label",it):this.div.removeAttribute("aria-label")},Cs.prototype.prepareSelection=function(){var it=zu(this.cm,!1);return it.focus=document.activeElement==this.div,it},Cs.prototype.showSelection=function(it,st){!it||!this.cm.display.view.length||((it.focus||st)&&this.showPrimarySelection(),this.showMultipleSelections(it))},Cs.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Cs.prototype.showPrimarySelection=function(){var it=this.getSelection(),st=this.cm,dt=st.doc.sel.primary(),ht=dt.from(),gt=dt.to();if(st.display.viewTo==st.display.viewFrom||ht.line>=st.display.viewTo||gt.line<st.display.viewFrom){it.removeAllRanges();return}var Nt=Xu(st,it.anchorNode,it.anchorOffset),Gt=Xu(st,it.focusNode,it.focusOffset);if(!(Nt&&!Nt.bad&&Gt&&!Gt.bad&&yn(xn(Nt,Gt),ht)==0&&yn(An(Nt,Gt),gt)==0)){var Jt=st.display.view,Yt=ht.line>=st.display.viewFrom&&wA(st,ht)||{node:Jt[0].measure.map[2],offset:0},pe=gt.line<st.display.viewTo&&wA(st,gt);if(!pe){var qe=Jt[Jt.length-1].measure,we=qe.maps?qe.maps[qe.maps.length-1]:qe.map;pe={node:we[we.length-1],offset:we[we.length-2]-we[we.length-3]}}if(!Yt||!pe){it.removeAllRanges();return}var Mn=it.rangeCount&&it.getRangeAt(0),wn;try{wn=me(Yt.node,Yt.offset,pe.offset,pe.node)}catch(Si){}wn&&(!Pt&&st.state.focused?(it.collapse(Yt.node,Yt.offset),wn.collapsed||(it.removeAllRanges(),it.addRange(wn))):(it.removeAllRanges(),it.addRange(wn)),Mn&&it.anchorNode==null?it.addRange(Mn):Pt&&this.startGracePeriod()),this.rememberSelection()}},Cs.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)},Cs.prototype.showMultipleSelections=function(it){Zt(this.cm.display.cursorDiv,it.cursors),Zt(this.cm.display.selectionDiv,it.selection)},Cs.prototype.rememberSelection=function(){var it=this.getSelection();this.lastAnchorNode=it.anchorNode,this.lastAnchorOffset=it.anchorOffset,this.lastFocusNode=it.focusNode,this.lastFocusOffset=it.focusOffset},Cs.prototype.selectionInEditor=function(){var it=this.getSelection();if(!it.rangeCount)return!1;var st=it.getRangeAt(0).commonAncestorContainer;return $e(this.div,st)},Cs.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Cs.prototype.blur=function(){this.div.blur()},Cs.prototype.getField=function(){return this.div},Cs.prototype.supportsTouch=function(){return!0},Cs.prototype.receivedFocus=function(){var it=this;this.selectionInEditor()?this.pollSelection():rs(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)},Cs.prototype.selectionChanged=function(){var it=this.getSelection();return it.anchorNode!=this.lastAnchorNode||it.anchorOffset!=this.lastAnchorOffset||it.focusNode!=this.lastFocusNode||it.focusOffset!=this.lastFocusOffset},Cs.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var it=this.getSelection(),st=this.cm;if(nt&&ce&&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 dt=Xu(st,it.anchorNode,it.anchorOffset),ht=Xu(st,it.focusNode,it.focusOffset);dt&&ht&&rs(st,function(){Ka(st.doc,gA(dt,ht),un),(dt.bad||ht.bad)&&(st.curOp.selectionChanged=!0)})}}},Cs.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var it=this.cm,st=it.display,dt=it.doc.sel.primary(),ht=dt.from(),gt=dt.to();if(ht.ch==0&&ht.line>it.firstLine()&&(ht=on(ht.line-1,Ai(it.doc,ht.line-1).length)),gt.ch==Ai(it.doc,gt.line).text.length&>.line<it.lastLine()&&(gt=on(gt.line+1,0)),ht.line<st.viewFrom||gt.line>st.viewTo-1)return!1;var Nt,Gt,Jt;ht.line==st.viewFrom||(Nt=el(it,ht.line))==0?(Gt=he(st.view[0].line),Jt=st.view[0].node):(Gt=he(st.view[Nt].line),Jt=st.view[Nt-1].node.nextSibling);var Yt=el(it,gt.line),pe,qe;if(Yt==st.view.length-1?(pe=st.viewTo-1,qe=st.lineDiv.lastChild):(pe=he(st.view[Yt+1].line)-1,qe=st.view[Yt+1].node.previousSibling),!Jt)return!1;for(var we=it.doc.splitLines(hu(it,Jt,qe,Gt,pe)),Mn=We(it.doc,on(Gt,0),on(pe,Ai(it.doc,pe).text.length));we.length>1&&Mn.length>1;)if(Ee(we)==Ee(Mn))we.pop(),Mn.pop(),pe--;else if(we[0]==Mn[0])we.shift(),Mn.shift(),Gt++;else break;for(var wn=0,Si=0,bi=we[0],zi=Mn[0],rr=Math.min(bi.length,zi.length);wn<rr&&bi.charCodeAt(wn)==zi.charCodeAt(wn);)++wn;for(var Lr=Ee(we),xr=Ee(Mn),Qr=Math.min(Lr.length-(we.length==1?wn:0),xr.length-(Mn.length==1?wn:0));Si<Qr&&Lr.charCodeAt(Lr.length-Si-1)==xr.charCodeAt(xr.length-Si-1);)++Si;if(we.length==1&&Mn.length==1&&Gt==ht.line)for(;wn&&wn>ht.ch&&Lr.charCodeAt(Lr.length-Si-1)==xr.charCodeAt(xr.length-Si-1);)wn--,Si++;we[we.length-1]=Lr.slice(0,Lr.length-Si).replace(/^\u200b+/,""),we[0]=we[0].slice(wn).replace(/\u200b+$/,"");var lo=on(Gt,wn),wr=on(pe,Mn.length?Ee(Mn).length-Si:0);if(we.length>1||we[0]||yn(lo,wr))return xh(it.doc,we,lo,wr,"+input"),!0},Cs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Cs.prototype.reset=function(){this.forceCompositionEnd()},Cs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Cs.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))},Cs.prototype.updateFromDOM=function(){var it=this;(this.cm.isReadOnly()||!this.pollContent())&&rs(this.cm,function(){return ms(it.cm)})},Cs.prototype.setUneditable=function(it){it.contentEditable="false"},Cs.prototype.onKeyPress=function(it){it.charCode==0||this.composing||(it.preventDefault(),this.cm.isReadOnly()||ga(this.cm,id)(this.cm,String.fromCharCode(it.charCode==null?it.keyCode:it.charCode),0))},Cs.prototype.readOnlyChanged=function(it){this.div.contentEditable=String(it!="nocursor")},Cs.prototype.onContextMenu=function(){},Cs.prototype.resetPosition=function(){},Cs.prototype.needsContentAttribute=!0;function wA(it,st){var dt=hl(it,st.line);if(!dt||dt.hidden)return null;var ht=Ai(it.doc,st.line),gt=ao(dt,ht,st.line),Nt=kn(ht,it.doc.direction),Gt="left";if(Nt){var Jt=De(Nt,st.ch);Gt=Jt%2?"right":"left"}var Yt=uA(gt.map,st.ch,Gt);return Yt.offset=Yt.collapse=="right"?Yt.end:Yt.start,Yt}function Vd(it){for(var st=it;st;st=st.parentNode)if(/CodeMirror-gutter-wrapper/.test(st.className))return!0;return!1}function Js(it,st){return st&&(it.bad=!0),it}function hu(it,st,dt,ht,gt){var Nt="",Gt=!1,Jt=it.doc.lineSeparator(),Yt=!1;function pe(wn){return function(Si){return Si.id==wn}}function qe(){Gt&&(Nt+=Jt,Yt&&(Nt+=Jt),Gt=Yt=!1)}function we(wn){wn&&(qe(),Nt+=wn)}function Mn(wn){if(wn.nodeType==1){var Si=wn.getAttribute("cm-text");if(Si){we(Si);return}var bi=wn.getAttribute("cm-marker"),zi;if(bi){var rr=it.findMarks(on(ht,0),on(gt+1,0),pe(+bi));rr.length&&(zi=rr[0].find(0))&&we(We(it.doc,zi.from,zi.to).join(Jt));return}if(wn.getAttribute("contenteditable")=="false")return;var Lr=/^(pre|div|p|li|table|br)$/i.test(wn.nodeName);if(!/^br$/i.test(wn.nodeName)&&wn.textContent.length==0)return;Lr&&qe();for(var xr=0;xr<wn.childNodes.length;xr++)Mn(wn.childNodes[xr]);/^(pre|p)$/i.test(wn.nodeName)&&(Yt=!0),Lr&&(Gt=!0)}else wn.nodeType==3&&we(wn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Mn(st),st!=dt;)st=st.nextSibling,Yt=!1;return Nt}function Xu(it,st,dt){var ht;if(st==it.display.lineDiv){if(ht=it.display.lineDiv.childNodes[dt],!ht)return Js(it.clipPos(on(it.display.viewTo-1)),!0);st=null,dt=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 gt=0;gt<it.display.view.length;gt++){var Nt=it.display.view[gt];if(Nt.node==ht)return xA(Nt,st,dt)}}function xA(it,st,dt){var ht=it.text.firstChild,gt=!1;if(!st||!$e(ht,st))return Js(on(he(it.line),0),!0);if(st==ht&&(gt=!0,st=ht.childNodes[dt],dt=0,!st)){var Nt=it.rest?Ee(it.rest):it.line;return Js(on(he(Nt),Nt.text.length),gt)}var Gt=st.nodeType==3?st:null,Jt=st;for(!Gt&&st.childNodes.length==1&&st.firstChild.nodeType==3&&(Gt=st.firstChild,dt&&(dt=Gt.nodeValue.length));Jt.parentNode!=ht;)Jt=Jt.parentNode;var Yt=it.measure,pe=Yt.maps;function qe(zi,rr,Lr){for(var xr=-1;xr<(pe?pe.length:0);xr++)for(var Qr=xr<0?Yt.map:pe[xr],lo=0;lo<Qr.length;lo+=3){var wr=Qr[lo+2];if(wr==zi||wr==rr){var Mo=he(xr<0?it.line:it.rest[xr]),Hs=Qr[lo]+Lr;return(Lr<0||wr!=zi)&&(Hs=Qr[lo+(Lr?1:0)]),on(Mo,Hs)}}}var we=qe(Gt,Jt,dt);if(we)return Js(we,gt);for(var Mn=Jt.nextSibling,wn=Gt?Gt.nodeValue.length-dt:0;Mn;Mn=Mn.nextSibling){if(we=qe(Mn,Mn.firstChild,0),we)return Js(on(we.line,we.ch-wn),gt);wn+=Mn.textContent.length}for(var Si=Jt.previousSibling,bi=dt;Si;Si=Si.previousSibling){if(we=qe(Si,Si.firstChild,-1),we)return Js(on(we.line,we.ch+bi),gt);bi+=Si.textContent.length}}var Os=function(it){this.cm=it,this.prevInput="",this.pollingFast=!1,this.polling=new re,this.hasSelection=!1,this.composing=null};Os.prototype.init=function(it){var st=this,dt=this,ht=this.cm;this.createField(it);var gt=this.textarea;it.wrapper.insertBefore(this.wrapper,it.wrapper.firstChild),Ut&&(gt.style.width="0px"),gn(gt,"input",function(){de&&Rt>=9&&st.hasSelection&&(st.hasSelection=null),dt.poll()}),gn(gt,"paste",function(Gt){Ei(ht,Gt)||sc(Gt,ht)||(ht.state.pasteIncoming=+new Date,dt.fastPoll())});function Nt(Gt){if(!Ei(ht,Gt)){if(ht.somethingSelected())ZA({lineWise:!1,text:ht.getSelections()});else if(ht.options.lineWiseCopyCut){var Jt=zd(ht);ZA({lineWise:!0,text:Jt.text}),Gt.type=="cut"?ht.setSelections(Jt.ranges,null,un):(dt.prevInput="",gt.value=Jt.text.join(`
|
|
|
`),In(gt))}else return;Gt.type=="cut"&&(ht.state.cutIncoming=+new Date)}}gn(gt,"cut",Nt),gn(gt,"copy",Nt),gn(it.scroller,"paste",function(Gt){if(!(ts(it,Gt)||Ei(ht,Gt))){if(!gt.dispatchEvent){ht.state.pasteIncoming=+new Date,dt.focus();return}var Jt=new Event("paste");Jt.clipboardData=Gt.clipboardData,gt.dispatchEvent(Jt)}}),gn(it.lineSpace,"selectstart",function(Gt){ts(it,Gt)||Yi(Gt)}),gn(gt,"compositionstart",function(){var Gt=ht.getCursor("from");dt.composing&&dt.composing.range.clear(),dt.composing={start:Gt,range:ht.markText(Gt,ht.getCursor("to"),{className:"CodeMirror-composing"})}}),gn(gt,"compositionend",function(){dt.composing&&(dt.poll(),dt.composing.range.clear(),dt.composing=null)})},Os.prototype.createField=function(it){this.wrapper=Nf(),this.textarea=this.wrapper.firstChild},Os.prototype.screenReaderLabelChanged=function(it){it?this.textarea.setAttribute("aria-label",it):this.textarea.removeAttribute("aria-label")},Os.prototype.prepareSelection=function(){var it=this.cm,st=it.display,dt=it.doc,ht=zu(it);if(it.options.moveInputWithCursor){var gt=mo(it,dt.sel.primary().head,"div"),Nt=st.wrapper.getBoundingClientRect(),Gt=st.lineDiv.getBoundingClientRect();ht.teTop=Math.max(0,Math.min(st.wrapper.clientHeight-10,gt.top+Gt.top-Nt.top)),ht.teLeft=Math.max(0,Math.min(st.wrapper.clientWidth-10,gt.left+Gt.left-Nt.left))}return ht},Os.prototype.showSelection=function(it){var st=this.cm,dt=st.display;Zt(dt.cursorDiv,it.cursors),Zt(dt.selectionDiv,it.selection),it.teTop!=null&&(this.wrapper.style.top=it.teTop+"px",this.wrapper.style.left=it.teLeft+"px")},Os.prototype.reset=function(it){if(!(this.contextMenuPending||this.composing)){var st=this.cm;if(st.somethingSelected()){this.prevInput="";var dt=st.getSelection();this.textarea.value=dt,st.state.focused&&In(this.textarea),de&&Rt>=9&&(this.hasSelection=dt)}else it||(this.prevInput=this.textarea.value="",de&&Rt>=9&&(this.hasSelection=null))}},Os.prototype.getField=function(){return this.textarea},Os.prototype.supportsTouch=function(){return!1},Os.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!et||tn()!=this.textarea))try{this.textarea.focus()}catch(it){}},Os.prototype.blur=function(){this.textarea.blur()},Os.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Os.prototype.receivedFocus=function(){this.slowPoll()},Os.prototype.slowPoll=function(){var it=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){it.poll(),it.cm.state.focused&&it.slowPoll()})},Os.prototype.fastPoll=function(){var it=!1,st=this;st.pollingFast=!0;function dt(){var ht=st.poll();!ht&&!it?(it=!0,st.polling.set(60,dt)):(st.pollingFast=!1,st.slowPoll())}st.polling.set(20,dt)},Os.prototype.poll=function(){var it=this,st=this.cm,dt=this.textarea,ht=this.prevInput;if(this.contextMenuPending||!st.state.focused||bt(dt)&&!ht&&!this.composing||st.isReadOnly()||st.options.disableInput||st.state.keySeq)return!1;var gt=dt.value;if(gt==ht&&!st.somethingSelected())return!1;if(de&&Rt>=9&&this.hasSelection===gt||At&&/[\uf700-\uf7ff]/.test(gt))return st.display.input.reset(),!1;if(st.doc.sel==st.display.selForContextMenu){var Nt=gt.charCodeAt(0);if(Nt==8203&&!ht&&(ht="\u200B"),Nt==8666)return this.reset(),this.cm.execCommand("undo")}for(var Gt=0,Jt=Math.min(ht.length,gt.length);Gt<Jt&&ht.charCodeAt(Gt)==gt.charCodeAt(Gt);)++Gt;return rs(st,function(){id(st,gt.slice(Gt),ht.length-Gt,null,it.composing?"*compose":null),gt.length>1e3||gt.indexOf(`
|
|
|
`)>-1?dt.value=it.prevInput="":it.prevInput=gt,it.composing&&(it.composing.range.clear(),it.composing.range=st.markText(it.composing.start,st.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Os.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Os.prototype.onKeyPress=function(){de&&Rt>=9&&(this.hasSelection=null),this.fastPoll()},Os.prototype.onContextMenu=function(it){var st=this,dt=st.cm,ht=dt.display,gt=st.textarea;st.contextMenuPending&&st.contextMenuPending();var Nt=xa(dt,it),Gt=ht.scroller.scrollTop;if(!Nt||Wt)return;var Jt=dt.options.resetSelectionOnContextMenu;Jt&&dt.doc.sel.contains(Nt)==-1&&ga(dt,Ka)(dt.doc,gA(Nt),un);var Yt=gt.style.cssText,pe=st.wrapper.style.cssText,qe=st.wrapper.offsetParent.getBoundingClientRect();st.wrapper.style.cssText="position: static",gt.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(it.clientY-qe.top-5)+"px; left: "+(it.clientX-qe.left-5)+`px;
|
|
|
z-index: 1000; background: `+(de?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var we;ne&&(we=window.scrollY),ht.input.focus(),ne&&window.scrollTo(null,we),ht.input.reset(),dt.somethingSelected()||(gt.value=st.prevInput=" "),st.contextMenuPending=wn,ht.selForContextMenu=dt.doc.sel,clearTimeout(ht.detectingSelectAll);function Mn(){if(gt.selectionStart!=null){var bi=dt.somethingSelected(),zi="\u200B"+(bi?gt.value:"");gt.value="\u21DA",gt.value=zi,st.prevInput=bi?"":"\u200B",gt.selectionStart=1,gt.selectionEnd=zi.length,ht.selForContextMenu=dt.doc.sel}}function wn(){if(st.contextMenuPending==wn&&(st.contextMenuPending=!1,st.wrapper.style.cssText=pe,gt.style.cssText=Yt,de&&Rt<9&&ht.scrollbars.setScrollTop(ht.scroller.scrollTop=Gt),gt.selectionStart!=null)){(!de||de&&Rt<9)&&Mn();var bi=0,zi=function(){ht.selForContextMenu==dt.doc.sel&>.selectionStart==0&>.selectionEnd>0&&st.prevInput=="\u200B"?ga(dt,ra)(dt):bi++<10?ht.detectingSelectAll=setTimeout(zi,500):(ht.selForContextMenu=null,ht.input.reset())};ht.detectingSelectAll=setTimeout(zi,200)}}if(de&&Rt>=9&&Mn(),Mt){Fr(it);var Si=function(){di(window,"mouseup",Si),setTimeout(wn,20)};gn(window,"mouseup",Si)}else setTimeout(wn,50)},Os.prototype.readOnlyChanged=function(it){it||this.reset(),this.textarea.disabled=it=="nocursor",this.textarea.readOnly=!!it},Os.prototype.setUneditable=function(){},Os.prototype.needsContentAttribute=!1;function uc(it,st){if(st=st?Ln(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 dt=tn();st.autofocus=dt==it||it.getAttribute("autofocus")!=null&&dt==document.body}function ht(){it.value=Jt.getValue()}var gt;if(it.form&&(gn(it.form,"submit",ht),!st.leaveSubmitMethodAlone)){var Nt=it.form;gt=Nt.submit;try{var Gt=Nt.submit=function(){ht(),Nt.submit=gt,Nt.submit(),Nt.submit=Gt}}catch(Yt){}}st.finishInit=function(Yt){Yt.save=ht,Yt.getTextArea=function(){return it},Yt.toTextArea=function(){Yt.toTextArea=isNaN,ht(),it.parentNode.removeChild(Yt.getWrapperElement()),it.style.display="",it.form&&(di(it.form,"submit",ht),!st.leaveSubmitMethodAlone&&typeof it.form.submit=="function"&&(it.form.submit=gt))}},it.style.display="none";var Jt=Yo(function(Yt){return it.parentNode.insertBefore(Yt,it.nextSibling)},st);return Jt}function Gl(it){it.off=di,it.on=gn,it.wheelEventPixels=Ll,it.Doc=Ma,it.splitLines=Zr,it.countColumn=be,it.findColumn=Fi,it.isWordChar=vt,it.Pass=Jn,it.signal=xi,it.Line=fr,it.changeEnd=OA,it.scrollbarModel=Vu,it.Pos=on,it.cmpPos=yn,it.modes=Do,it.mimeModes=bo,it.resolveMode=wi,it.getMode=je,it.modeExtensions=He,it.extendMode=Ue,it.copyState=fi,it.startState=_i,it.innerMode=Se,it.commands=jA,it.keyMap=Ml,it.keyName=Sf,it.isModifierKey=Jh,it.lookupKey=Kl,it.normalizeKeyMap=xf,it.StringStream=Un,it.SharedTextMarker=Mu,it.TextMarker=Re,it.LineWidget=mA,it.e_preventDefault=Yi,it.e_stopPropagation=Hr,it.e_stop=Fr,it.addClass=Cn,it.contains=$e,it.rmClass=Qt,it.keyNames=Zu}mg(Yo),yA(Yo);var Ju="iter insert remove copy getEditor constructor".split(" ");for(var Ac in Ma.prototype)Ma.prototype.hasOwnProperty(Ac)&&Pn(Ju,Ac)<0&&(Yo.prototype[Ac]=function(it){return function(){return it.apply(this.doc,arguments)}}(Ma.prototype[Ac]));return Oi(Ma),Yo.inputStyles={textarea:Os,contenteditable:Cs},Yo.defineMode=function(it){!Yo.defaults.mode&&it!="null"&&(Yo.defaults.mode=it),$o.apply(this,arguments)},Yo.defineMIME=Zi,Yo.defineMode("null",function(){return{token:function(it){return it.skipToEnd()}}}),Yo.defineMIME("text/plain","null"),Yo.defineExtension=function(it,st){Yo.prototype[it]=st},Yo.defineDocExtension=function(it,st){Ma.prototype[it]=st},Yo.fromTextArea=uc,Gl(Yo),Yo.version="5.58.2",Yo})},25419:function(Bn,Ve,Ot){(function(Pt){Pt(Ot(89780),Ot(15525),Ot(98101))})(function(Pt){"use strict";Pt.defineMode("markdown",function(te,Ae){var Ce=Pt.getMode(te,"text/html"),de=Ce.name=="null";function Rt(be){if(Pt.findModeByName){var re=Pt.findModeByName(be);re&&(be=re.mime||re.mimes[0])}var Pn=Pt.getMode(te,be);return Pn.name=="null"?null:Pn}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 ne={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 ue in ne)ne.hasOwnProperty(ue)&&Ae.tokenTypeOverrides[ue]&&(ne[ue]=Ae.tokenTypeOverrides[ue]);var ce=/^([*\-_])(?:\s*\1){2,}\s*$/,Wt=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Ne=/^\[(x| )\](?=\s)/i,qt=Ae.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,Le=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Ut=/^[^#!\[\]*_\\<>` "'(~:]+/,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 ct(be,re,Pn){return re.f=re.inline=Pn,Pn(be,re)}function pt(be,re,Pn){return re.f=re.block=Pn,Pn(be,re)}function xt(be){return!be||!/\S/.test(be.string)}function Mt(be){if(be.linkTitle=!1,be.linkHref=!1,be.linkText=!1,be.em=!1,be.strong=!1,be.strikethrough=!1,be.quote=0,be.indentedCode=!1,be.f==Qt){var re=de;if(!re){var Pn=Pt.innerMode(Ce,be.htmlState);re=Pn.mode.name=="xml"&&Pn.state.tagStart===null&&!Pn.state.context&&Pn.state.tokenize.isInText}re&&(be.f=Pe,be.block=_t,be.htmlState=null)}return be.trailingSpace=0,be.trailingSpaceNewLine=!1,be.prevLine=be.thisLine,be.thisLine={stream:null},null}function _t(be,re){var Pn=be.column()===re.indentation,li=xt(re.prevLine.stream),Jn=re.indentedCode,un=re.prevLine.hr,Yn=re.list!==!1,si=(re.listStack[re.listStack.length-1]||0)+3;re.indentedCode=!1;var Fi=re.indentation;if(re.indentationDiff===null&&(re.indentationDiff=re.indentation,Yn)){for(re.list=null;Fi<re.listStack[re.listStack.length-1];)re.listStack.pop(),re.listStack.length?re.indentation=re.listStack[re.listStack.length-1]:re.list=!1;re.list!==!1&&(re.indentationDiff=Fi-re.listStack[re.listStack.length-1])}var sn=!li&&!un&&!re.prevLine.header&&(!Yn||!Jn)&&!re.prevLine.fencedCodeEnd,oi=(re.list===!1||un||li)&&re.indentation<=si&&be.match(ce),Ee=null;if(re.indentationDiff>=4&&(Jn||re.prevLine.fencedCodeEnd||re.prevLine.header||li))return be.skipToEnd(),re.indentedCode=!0,ne.code;if(be.eatSpace())return null;if(Pn&&re.indentation<=si&&(Ee=be.match(qt))&&Ee[1].length<=6)return re.quote=0,re.header=Ee[1].length,re.thisLine.header=!0,Ae.highlightFormatting&&(re.formatting="header"),re.f=re.inline,Zt(re);if(re.indentation<=si&&be.eat(">"))return re.quote=Pn?1:re.quote+1,Ae.highlightFormatting&&(re.formatting="quote"),be.eatSpace(),Zt(re);if(!oi&&!re.setext&&Pn&&re.indentation<=si&&(Ee=be.match(Wt))){var ci=Ee[1]?"ol":"ul";return re.indentation=Fi+be.current().length,re.list=!0,re.quote=0,re.listStack.push(re.indentation),re.em=!1,re.strong=!1,re.code=!1,re.strikethrough=!1,Ae.taskLists&&be.match(Ne,!1)&&(re.taskList=!0),re.f=re.inline,Ae.highlightFormatting&&(re.formatting=["list","list-"+ci]),Zt(re)}else{if(Pn&&re.indentation<=si&&(Ee=be.match(nt,!0)))return re.quote=0,re.fencedEndRE=new RegExp(Ee[1]+"+ *$"),re.localMode=Ae.fencedCodeBlockHighlighting&&Rt(Ee[2]||Ae.fencedCodeBlockDefaultMode),re.localMode&&(re.localState=Pt.startState(re.localMode)),re.f=re.block=Vt,Ae.highlightFormatting&&(re.formatting="code-block"),re.code=-1,Zt(re);if(re.setext||(!sn||!Yn)&&!re.quote&&re.list===!1&&!re.code&&!oi&&!et.test(be.string)&&(Ee=be.lookAhead(1))&&(Ee=Ee.match(Le)))return re.setext?(re.header=re.setext,re.setext=0,be.skipToEnd(),Ae.highlightFormatting&&(re.formatting="header")):(re.header=Ee[0].charAt(0)=="="?1:2,re.setext=re.header),re.thisLine.header=!0,re.f=re.inline,Zt(re);if(oi)return be.skipToEnd(),re.hr=!0,re.thisLine.hr=!0,ne.hr;if(be.peek()==="[")return ct(be,re,Tn)}return ct(be,re,re.inline)}function Qt(be,re){var Pn=Ce.token(be,re.htmlState);if(!de){var li=Pt.innerMode(Ce,re.htmlState);(li.mode.name=="xml"&&li.state.tagStart===null&&!li.state.context&&li.state.tokenize.isInText||re.md_inside&&be.current().indexOf(">")>-1)&&(re.f=Pe,re.block=_t,re.htmlState=null)}return Pn}function Vt(be,re){var Pn=re.listStack[re.listStack.length-1]||0,li=re.indentation<Pn,Jn=Pn+3;if(re.fencedEndRE&&re.indentation<=Jn&&(li||be.match(re.fencedEndRE))){Ae.highlightFormatting&&(re.formatting="code-block");var un;return li||(un=Zt(re)),re.localMode=re.localState=null,re.block=_t,re.f=Pe,re.fencedEndRE=null,re.code=0,re.thisLine.fencedCodeEnd=!0,li?pt(be,re,re.block):un}else return re.localMode?re.localMode.token(be,re.localState):(be.skipToEnd(),ne.code)}function Zt(be){var re=[];if(be.formatting){re.push(ne.formatting),typeof be.formatting=="string"&&(be.formatting=[be.formatting]);for(var Pn=0;Pn<be.formatting.length;Pn++)re.push(ne.formatting+"-"+be.formatting[Pn]),be.formatting[Pn]==="header"&&re.push(ne.formatting+"-"+be.formatting[Pn]+"-"+be.header),be.formatting[Pn]==="quote"&&(!Ae.maxBlockquoteDepth||Ae.maxBlockquoteDepth>=be.quote?re.push(ne.formatting+"-"+be.formatting[Pn]+"-"+be.quote):re.push("error"))}if(be.taskOpen)return re.push("meta"),re.length?re.join(" "):null;if(be.taskClosed)return re.push("property"),re.length?re.join(" "):null;if(be.linkHref?re.push(ne.linkHref,"url"):(be.strong&&re.push(ne.strong),be.em&&re.push(ne.em),be.strikethrough&&re.push(ne.strikethrough),be.emoji&&re.push(ne.emoji),be.linkText&&re.push(ne.linkText),be.code&&re.push(ne.code),be.image&&re.push(ne.image),be.imageAltText&&re.push(ne.imageAltText,"link"),be.imageMarker&&re.push(ne.imageMarker)),be.header&&re.push(ne.header,ne.header+"-"+be.header),be.quote&&(re.push(ne.quote),!Ae.maxBlockquoteDepth||Ae.maxBlockquoteDepth>=be.quote?re.push(ne.quote+"-"+be.quote):re.push(ne.quote+"-"+Ae.maxBlockquoteDepth)),be.list!==!1){var li=(be.listStack.length-1)%3;li?li===1?re.push(ne.list2):re.push(ne.list3):re.push(ne.list1)}return be.trailingSpaceNewLine?re.push("trailing-space-new-line"):be.trailingSpace&&re.push("trailing-space-"+(be.trailingSpace%2?"a":"b")),re.length?re.join(" "):null}function $t(be,re){if(be.match(Ut,!0))return Zt(re)}function Pe(be,re){var Pn=re.text(be,re);if(typeof Pn!="undefined")return Pn;if(re.list)return re.list=null,Zt(re);if(re.taskList){var li=be.match(Ne,!0)[1]===" ";return li?re.taskOpen=!0:re.taskClosed=!0,Ae.highlightFormatting&&(re.formatting="task"),re.taskList=!1,Zt(re)}if(re.taskOpen=!1,re.taskClosed=!1,re.header&&be.match(/^#+$/,!0))return Ae.highlightFormatting&&(re.formatting="header"),Zt(re);var Jn=be.next();if(re.linkTitle){re.linkTitle=!1;var un=Jn;Jn==="("&&(un=")"),un=(un+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Yn="^\\s*(?:[^"+un+"\\\\]+|\\\\\\\\|\\\\.)"+un;if(be.match(new RegExp(Yn),!0))return ne.linkHref}if(Jn==="`"){var si=re.formatting;Ae.highlightFormatting&&(re.formatting="code"),be.eatWhile("`");var Fi=be.current().length;if(re.code==0&&(!re.quote||Fi==1))return re.code=Fi,Zt(re);if(Fi==re.code){var sn=Zt(re);return re.code=0,sn}else return re.formatting=si,Zt(re)}else if(re.code)return Zt(re);if(Jn==="\\"&&(be.next(),Ae.highlightFormatting)){var oi=Zt(re),Ee=ne.formatting+"-escape";return oi?oi+" "+Ee:Ee}if(Jn==="!"&&be.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return re.imageMarker=!0,re.image=!0,Ae.highlightFormatting&&(re.formatting="image"),Zt(re);if(Jn==="["&&re.imageMarker&&be.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return re.imageMarker=!1,re.imageAltText=!0,Ae.highlightFormatting&&(re.formatting="image"),Zt(re);if(Jn==="]"&&re.imageAltText){Ae.highlightFormatting&&(re.formatting="image");var oi=Zt(re);return re.imageAltText=!1,re.image=!1,re.inline=re.f=$e,oi}if(Jn==="["&&!re.image)return re.linkText&&be.match(/^.*?\]/)||(re.linkText=!0,Ae.highlightFormatting&&(re.formatting="link")),Zt(re);if(Jn==="]"&&re.linkText){Ae.highlightFormatting&&(re.formatting="link");var oi=Zt(re);return re.linkText=!1,re.inline=re.f=be.match(/\(.*?\)| ?\[.*?\]/,!1)?$e:Pe,oi}if(Jn==="<"&&be.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){re.f=re.inline=me,Ae.highlightFormatting&&(re.formatting="link");var oi=Zt(re);return oi?oi+=" ":oi="",oi+ne.linkInline}if(Jn==="<"&&be.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){re.f=re.inline=me,Ae.highlightFormatting&&(re.formatting="link");var oi=Zt(re);return oi?oi+=" ":oi="",oi+ne.linkEmail}if(Ae.xml&&Jn==="<"&&be.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ci=be.string.indexOf(">",be.pos);if(ci!=-1){var Pi=be.string.substring(be.start,ci);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Pi)&&(re.md_inside=!0)}return be.backUp(1),re.htmlState=Pt.startState(Ce),pt(be,re,Qt)}if(Ae.xml&&Jn==="<"&&be.match(/^\/\w*?>/))return re.md_inside=!1,"tag";if(Jn==="*"||Jn==="_"){for(var Ht=1,kt=be.pos==1?" ":be.string.charAt(be.pos-2);Ht<3&&be.eat(Jn);)Ht++;var mt=be.peek()||" ",vt=!/\s/.test(mt)&&(!At.test(mt)||/\s/.test(kt)||At.test(kt)),Lt=!/\s/.test(kt)&&(!At.test(kt)||/\s/.test(mt)||At.test(mt)),Bt=null,Kt=null;if(Ht%2&&(!re.em&&vt&&(Jn==="*"||!Lt||At.test(kt))?Bt=!0:re.em==Jn&&Lt&&(Jn==="*"||!vt||At.test(mt))&&(Bt=!1)),Ht>1&&(!re.strong&&vt&&(Jn==="*"||!Lt||At.test(kt))?Kt=!0:re.strong==Jn&&Lt&&(Jn==="*"||!vt||At.test(mt))&&(Kt=!1)),Kt!=null||Bt!=null){Ae.highlightFormatting&&(re.formatting=Bt==null?"strong":Kt==null?"em":"strong em"),Bt===!0&&(re.em=Jn),Kt===!0&&(re.strong=Jn);var sn=Zt(re);return Bt===!1&&(re.em=!1),Kt===!1&&(re.strong=!1),sn}}else if(Jn===" "&&(be.eat("*")||be.eat("_"))){if(be.peek()===" ")return Zt(re);be.backUp(1)}if(Ae.strikethrough){if(Jn==="~"&&be.eatWhile(Jn)){if(re.strikethrough){Ae.highlightFormatting&&(re.formatting="strikethrough");var sn=Zt(re);return re.strikethrough=!1,sn}else if(be.match(/^[^\s]/,!1))return re.strikethrough=!0,Ae.highlightFormatting&&(re.formatting="strikethrough"),Zt(re)}else if(Jn===" "&&be.match(/^~~/,!0)){if(be.peek()===" ")return Zt(re);be.backUp(2)}}if(Ae.emoji&&Jn===":"&&be.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){re.emoji=!0,Ae.highlightFormatting&&(re.formatting="emoji");var ge=Zt(re);return re.emoji=!1,ge}return Jn===" "&&(be.match(/^ +$/,!1)?re.trailingSpace++:re.trailingSpace&&(re.trailingSpaceNewLine=!0)),Zt(re)}function me(be,re){var Pn=be.next();if(Pn===">"){re.f=re.inline=Pe,Ae.highlightFormatting&&(re.formatting="link");var li=Zt(re);return li?li+=" ":li="",li+ne.linkInline}return be.match(/^[^>]+/,!0),ne.linkInline}function $e(be,re){if(be.eatSpace())return null;var Pn=be.next();return Pn==="("||Pn==="["?(re.f=re.inline=Cn(Pn==="("?")":"]"),Ae.highlightFormatting&&(re.formatting="link-string"),re.linkHref=!0,Zt(re)):"error"}var tn={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Cn(be){return function(re,Pn){var li=re.next();if(li===be){Pn.f=Pn.inline=Pe,Ae.highlightFormatting&&(Pn.formatting="link-string");var Jn=Zt(Pn);return Pn.linkHref=!1,Jn}return re.match(tn[be]),Pn.linkHref=!0,Zt(Pn)}}function Tn(be,re){return be.match(/^([^\]\\]|\\.)*\]:/,!1)?(re.f=In,be.next(),Ae.highlightFormatting&&(re.formatting="link"),re.linkText=!0,Zt(re)):ct(be,re,Pe)}function In(be,re){if(be.match(/^\]:/,!0)){re.f=re.inline=$n,Ae.highlightFormatting&&(re.formatting="link");var Pn=Zt(re);return re.linkText=!1,Pn}return be.match(/^([^\]\\]|\\.)+/,!0),ne.linkText}function $n(be,re){return be.eatSpace()?null:(be.match(/^[^\s]+/,!0),be.peek()===void 0?re.linkTitle=!0:be.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),re.f=re.inline=Pe,ne.linkHref+" url")}var Ln={startState:function(){return{f:_t,prevLine:{stream:null},thisLine:{stream:null},block:_t,htmlState:null,indentation:0,inline:Pe,text:$t,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(be){return{f:be.f,prevLine:be.prevLine,thisLine:be.thisLine,block:be.block,htmlState:be.htmlState&&Pt.copyState(Ce,be.htmlState),indentation:be.indentation,localMode:be.localMode,localState:be.localMode?Pt.copyState(be.localMode,be.localState):null,inline:be.inline,text:be.text,formatting:!1,linkText:be.linkText,linkTitle:be.linkTitle,linkHref:be.linkHref,code:be.code,em:be.em,strong:be.strong,strikethrough:be.strikethrough,emoji:be.emoji,header:be.header,setext:be.setext,hr:be.hr,taskList:be.taskList,list:be.list,listStack:be.listStack.slice(0),quote:be.quote,indentedCode:be.indentedCode,trailingSpace:be.trailingSpace,trailingSpaceNewLine:be.trailingSpaceNewLine,md_inside:be.md_inside,fencedEndRE:be.fencedEndRE}},token:function(be,re){if(re.formatting=!1,be!=re.thisLine.stream){if(re.header=0,re.hr=!1,be.match(/^\s*$/,!0))return Mt(re),null;if(re.prevLine=re.thisLine,re.thisLine={stream:be},re.taskList=!1,re.trailingSpace=0,re.trailingSpaceNewLine=!1,!re.localState&&(re.f=re.block,re.f!=Qt)){var Pn=be.match(/^\s*/,!0)[0].replace(/\t/g,at).length;if(re.indentation=Pn,re.indentationDiff=null,Pn>0)return null}}return re.f(be,re)},innerMode:function(be){return be.block==Qt?{state:be.htmlState,mode:Ce}:be.localState?{state:be.localState,mode:be.localMode}:{state:be,mode:Ln}},indent:function(be,re,Pn){return be.block==Qt&&Ce.indent?Ce.indent(be.htmlState,re,Pn):be.localState&&be.localMode.indent?be.localMode.indent(be.localState,re,Pn):Pt.Pass},blankLine:Mt,getType:Zt,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Ln},"xml"),Pt.defineMIME("text/markdown","markdown"),Pt.defineMIME("text/x-markdown","markdown")})},98101:function(Bn,Ve,Ot){(function(Pt){Pt(Ot(89780))})(function(Pt){"use strict";Pt.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 te=0;te<Pt.modeInfo.length;te++){var Ae=Pt.modeInfo[te];Ae.mimes&&(Ae.mime=Ae.mimes[0])}Pt.findModeByMIME=function(Ce){Ce=Ce.toLowerCase();for(var de=0;de<Pt.modeInfo.length;de++){var Rt=Pt.modeInfo[de];if(Rt.mime==Ce)return Rt;if(Rt.mimes){for(var ne=0;ne<Rt.mimes.length;ne++)if(Rt.mimes[ne]==Ce)return Rt}}if(/\+xml$/.test(Ce))return Pt.findModeByMIME("application/xml");if(/\+json$/.test(Ce))return Pt.findModeByMIME("application/json")},Pt.findModeByExtension=function(Ce){Ce=Ce.toLowerCase();for(var de=0;de<Pt.modeInfo.length;de++){var Rt=Pt.modeInfo[de];if(Rt.ext){for(var ne=0;ne<Rt.ext.length;ne++)if(Rt.ext[ne]==Ce)return Rt}}},Pt.findModeByFileName=function(Ce){for(var de=0;de<Pt.modeInfo.length;de++){var Rt=Pt.modeInfo[de];if(Rt.file&&Rt.file.test(Ce))return Rt}var ne=Ce.lastIndexOf("."),ue=ne>-1&&Ce.substring(ne+1,Ce.length);if(ue)return Pt.findModeByExtension(ue)},Pt.findModeByName=function(Ce){Ce=Ce.toLowerCase();for(var de=0;de<Pt.modeInfo.length;de++){var Rt=Pt.modeInfo[de];if(Rt.name.toLowerCase()==Ce)return Rt;if(Rt.alias){for(var ne=0;ne<Rt.alias.length;ne++)if(Rt.alias[ne].toLowerCase()==Ce)return Rt}}}})},67549:function(Bn,Ve,Ot){(function(Pt){Pt(Ot(89780))})(function(Pt){"use strict";Pt.defineMode("stex",function(te,Ae){"use strict";function Ce(Ut,nt){Ut.cmdState.push(nt)}function de(Ut){return Ut.cmdState.length>0?Ut.cmdState[Ut.cmdState.length-1]:null}function Rt(Ut){var nt=Ut.cmdState.pop();nt&&nt.closeBracket()}function ne(Ut){for(var nt=Ut.cmdState,et=nt.length-1;et>=0;et--){var At=nt[et];if(At.name!="DEFAULT")return At}return{styleIdentifier:function(){return null}}}function ue(Ut,nt,et){return function(){this.name=Ut,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 ce={};ce.importmodule=ue("importmodule","tag",["string","builtin"]),ce.documentclass=ue("documentclass","tag",["","atom"]),ce.usepackage=ue("usepackage","tag",["atom"]),ce.begin=ue("begin","tag",["atom"]),ce.end=ue("end","tag",["atom"]),ce.label=ue("label","tag",["atom"]),ce.ref=ue("ref","tag",["atom"]),ce.eqref=ue("eqref","tag",["atom"]),ce.cite=ue("cite","tag",["atom"]),ce.bibitem=ue("bibitem","tag",["atom"]),ce.Bibitem=ue("Bibitem","tag",["atom"]),ce.RBibitem=ue("RBibitem","tag",["atom"]),ce.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Wt(Ut,nt){Ut.f=nt}function Ne(Ut,nt){var et;if(Ut.match(/^\\[a-zA-Z@]+/)){var At=Ut.current().slice(1);return et=ce.hasOwnProperty(At)?ce[At]:ce.DEFAULT,et=new et,Ce(nt,et),Wt(nt,Le),et.style}if(Ut.match(/^\\[$&%#{}_]/)||Ut.match(/^\\[,;!\/\\]/))return"tag";if(Ut.match("\\["))return Wt(nt,function(ct,pt){return qt(ct,pt,"\\]")}),"keyword";if(Ut.match("\\("))return Wt(nt,function(ct,pt){return qt(ct,pt,"\\)")}),"keyword";if(Ut.match("$$"))return Wt(nt,function(ct,pt){return qt(ct,pt,"$$")}),"keyword";if(Ut.match("$"))return Wt(nt,function(ct,pt){return qt(ct,pt,"$")}),"keyword";var at=Ut.next();if(at=="%")return Ut.skipToEnd(),"comment";if(at=="}"||at=="]"){if(et=de(nt),et)et.closeBracket(at),Wt(nt,Le);else return"error";return"bracket"}else return at=="{"||at=="["?(et=ce.DEFAULT,et=new et,Ce(nt,et),"bracket"):/\d/.test(at)?(Ut.eatWhile(/[\w.%]/),"atom"):(Ut.eatWhile(/[\w\-_]/),et=ne(nt),et.name=="begin"&&(et.argument=Ut.current()),et.styleIdentifier())}function qt(Ut,nt,et){if(Ut.eatSpace())return null;if(et&&Ut.match(et))return Wt(nt,Ne),"keyword";if(Ut.match(/^\\[a-zA-Z@]+/))return"tag";if(Ut.match(/^[a-zA-Z]+/))return"variable-2";if(Ut.match(/^\\[$&%#{}_]/)||Ut.match(/^\\[,;!\/]/)||Ut.match(/^[\^_&]/))return"tag";if(Ut.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Ut.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var At=Ut.next();return At=="{"||At=="}"||At=="["||At=="]"||At=="("||At==")"?"bracket":At=="%"?(Ut.skipToEnd(),"comment"):"error"}function Le(Ut,nt){var et=Ut.peek(),At;return et=="{"||et=="["?(At=de(nt),At.openBracket(et),Ut.eat(et),Wt(nt,Ne),"bracket"):/[ \t\r]/.test(et)?(Ut.eat(et),null):(Wt(nt,Ne),Rt(nt),Ne(Ut,nt))}return{startState:function(){var Ut=Ae.inMathMode?function(nt,et){return qt(nt,et)}:Ne;return{cmdState:[],f:Ut}},copyState:function(Ut){return{cmdState:Ut.cmdState.slice(),f:Ut.f}},token:function(Ut,nt){return nt.f(Ut,nt)},blankLine:function(Ut){Ut.f=Ne,Ut.cmdState.length=0},lineComment:"%"}}),Pt.defineMIME("text/x-stex","stex"),Pt.defineMIME("text/x-latex","stex")})},15525:function(Bn,Ve,Ot){(function(Pt){Pt(Ot(89780))})(function(Pt){"use strict";var te={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};Pt.defineMode("xml",function(Ce,de){var Rt=Ce.indentUnit,ne={},ue=de.htmlMode?te:Ae;for(var ce in ue)ne[ce]=ue[ce];for(var ce in de)ne[ce]=de[ce];var Wt,Ne;function qt(me,$e){function tn(In){return $e.tokenize=In,In(me,$e)}var Cn=me.next();if(Cn=="<")return me.eat("!")?me.eat("[")?me.match("CDATA[")?tn(nt("atom","]]>")):null:me.match("--")?tn(nt("comment","-->")):me.match("DOCTYPE",!0,!0)?(me.eatWhile(/[\w\._\-]/),tn(et(1))):null:me.eat("?")?(me.eatWhile(/[\w\._\-]/),$e.tokenize=nt("meta","?>"),"meta"):(Wt=me.eat("/")?"closeTag":"openTag",$e.tokenize=Le,"tag bracket");if(Cn=="&"){var Tn;return me.eat("#")?me.eat("x")?Tn=me.eatWhile(/[a-fA-F\d]/)&&me.eat(";"):Tn=me.eatWhile(/[\d]/)&&me.eat(";"):Tn=me.eatWhile(/[\w\.\-:]/)&&me.eat(";"),Tn?"atom":"error"}else return me.eatWhile(/[^&<]/),null}qt.isInText=!0;function Le(me,$e){var tn=me.next();if(tn==">"||tn=="/"&&me.eat(">"))return $e.tokenize=qt,Wt=tn==">"?"endTag":"selfcloseTag","tag bracket";if(tn=="=")return Wt="equals",null;if(tn=="<"){$e.tokenize=qt,$e.state=pt,$e.tagName=$e.tagStart=null;var Cn=$e.tokenize(me,$e);return Cn?Cn+" tag error":"tag error"}else return/[\'\"]/.test(tn)?($e.tokenize=Ut(tn),$e.stringStartCol=me.column(),$e.tokenize(me,$e)):(me.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Ut(me){var $e=function(tn,Cn){for(;!tn.eol();)if(tn.next()==me){Cn.tokenize=Le;break}return"string"};return $e.isInAttribute=!0,$e}function nt(me,$e){return function(tn,Cn){for(;!tn.eol();){if(tn.match($e)){Cn.tokenize=qt;break}tn.next()}return me}}function et(me){return function($e,tn){for(var Cn;(Cn=$e.next())!=null;){if(Cn=="<")return tn.tokenize=et(me+1),tn.tokenize($e,tn);if(Cn==">")if(me==1){tn.tokenize=qt;break}else return tn.tokenize=et(me-1),tn.tokenize($e,tn)}return"meta"}}function At(me,$e,tn){this.prev=me.context,this.tagName=$e,this.indent=me.indented,this.startOfLine=tn,(ne.doNotIndent.hasOwnProperty($e)||me.context&&me.context.noIndent)&&(this.noIndent=!0)}function at(me){me.context&&(me.context=me.context.prev)}function ct(me,$e){for(var tn;;){if(!me.context||(tn=me.context.tagName,!ne.contextGrabbers.hasOwnProperty(tn)||!ne.contextGrabbers[tn].hasOwnProperty($e)))return;at(me)}}function pt(me,$e,tn){return me=="openTag"?(tn.tagStart=$e.column(),xt):me=="closeTag"?Mt:pt}function xt(me,$e,tn){return me=="word"?(tn.tagName=$e.current(),Ne="tag",Vt):ne.allowMissingTagName&&me=="endTag"?(Ne="tag bracket",Vt(me,$e,tn)):(Ne="error",xt)}function Mt(me,$e,tn){if(me=="word"){var Cn=$e.current();return tn.context&&tn.context.tagName!=Cn&&ne.implicitlyClosed.hasOwnProperty(tn.context.tagName)&&at(tn),tn.context&&tn.context.tagName==Cn||ne.matchClosing===!1?(Ne="tag",_t):(Ne="tag error",Qt)}else return ne.allowMissingTagName&&me=="endTag"?(Ne="tag bracket",_t(me,$e,tn)):(Ne="error",Qt)}function _t(me,$e,tn){return me!="endTag"?(Ne="error",_t):(at(tn),pt)}function Qt(me,$e,tn){return Ne="error",_t(me,$e,tn)}function Vt(me,$e,tn){if(me=="word")return Ne="attribute",Zt;if(me=="endTag"||me=="selfcloseTag"){var Cn=tn.tagName,Tn=tn.tagStart;return tn.tagName=tn.tagStart=null,me=="selfcloseTag"||ne.autoSelfClosers.hasOwnProperty(Cn)?ct(tn,Cn):(ct(tn,Cn),tn.context=new At(tn,Cn,Tn==tn.indented)),pt}return Ne="error",Vt}function Zt(me,$e,tn){return me=="equals"?$t:(ne.allowMissing||(Ne="error"),Vt(me,$e,tn))}function $t(me,$e,tn){return me=="string"?Pe:me=="word"&&ne.allowUnquoted?(Ne="string",Vt):(Ne="error",Vt(me,$e,tn))}function Pe(me,$e,tn){return me=="string"?Pe:Vt(me,$e,tn)}return{startState:function(me){var $e={tokenize:qt,state:pt,indented:me||0,tagName:null,tagStart:null,context:null};return me!=null&&($e.baseIndent=me),$e},token:function(me,$e){if(!$e.tagName&&me.sol()&&($e.indented=me.indentation()),me.eatSpace())return null;Wt=null;var tn=$e.tokenize(me,$e);return(tn||Wt)&&tn!="comment"&&(Ne=null,$e.state=$e.state(Wt||tn,me,$e),Ne&&(tn=Ne=="error"?tn+" error":Ne)),tn},indent:function(me,$e,tn){var Cn=me.context;if(me.tokenize.isInAttribute)return me.tagStart==me.indented?me.stringStartCol+1:me.indented+Rt;if(Cn&&Cn.noIndent)return Pt.Pass;if(me.tokenize!=Le&&me.tokenize!=qt)return tn?tn.match(/^(\s*)/)[0].length:0;if(me.tagName)return ne.multilineTagIndentPastTag!==!1?me.tagStart+me.tagName.length+2:me.tagStart+Rt*(ne.multilineTagIndentFactor||1);if(ne.alignCDATA&&/<!\[CDATA\[/.test($e))return 0;var Tn=$e&&/^<(\/)?([\w_:\.-]*)/.exec($e);if(Tn&&Tn[1])for(;Cn;)if(Cn.tagName==Tn[2]){Cn=Cn.prev;break}else if(ne.implicitlyClosed.hasOwnProperty(Cn.tagName))Cn=Cn.prev;else break;else if(Tn)for(;Cn;){var In=ne.contextGrabbers[Cn.tagName];if(In&&In.hasOwnProperty(Tn[2]))Cn=Cn.prev;else break}for(;Cn&&Cn.prev&&!Cn.startOfLine;)Cn=Cn.prev;return Cn?Cn.indent+Rt:me.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:ne.htmlMode?"html":"xml",helperType:ne.htmlMode?"html":"xml",skipAttribute:function(me){me.state==$t&&(me.state=Vt)},xmlCurrentTag:function(me){return me.tagName?{name:me.tagName,close:me.type=="closeTag"}:null},xmlCurrentContext:function(me){for(var $e=[],tn=me.context;tn;tn=tn.prev)tn.tagName&&$e.push(tn.tagName);return $e.reverse()}}}),Pt.defineMIME("text/xml","xml"),Pt.defineMIME("application/xml","xml"),Pt.mimeModes.hasOwnProperty("text/html")||Pt.defineMIME("text/html",{name:"xml",htmlMode:!0})})},97774:function(Bn,Ve,Ot){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.default=void 0;var Pt=Object.assign||function(et){for(var At=1;At<arguments.length;At++){var at=arguments[At];for(var ct in at)Object.prototype.hasOwnProperty.call(at,ct)&&(et[ct]=at[ct])}return et},te=function(){function et(At,at){for(var ct=0;ct<at.length;ct++){var pt=at[ct];pt.enumerable=pt.enumerable||!1,pt.configurable=!0,"value"in pt&&(pt.writable=!0),Object.defineProperty(At,pt.key,pt)}}return function(At,at,ct){return at&&et(At.prototype,at),ct&&et(At,ct),At}}(),Ae=Ot(59301),Ce=Ne(Ae),de=Ot(12708),Rt=Ne(de),ne=Ot(53291),ue=Ne(ne),ce=Ot(47242),Wt=Ot(65429);function Ne(et){return et&&et.__esModule?et:{default:et}}function qt(et,At){if(!(et instanceof At))throw new TypeError("Cannot call a class as a function")}function Le(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 Ut(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){Ut(At,et);function At(at){qt(this,At);var ct=Le(this,(At.__proto__||Object.getPrototypeOf(At)).call(this,at));return ct.getEchartsInstance=function(){return ct.echartsLib.getInstanceByDom(ct.echartsElement)||ct.echartsLib.init(ct.echartsElement,ct.props.theme,ct.props.opts)},ct.dispose=function(){if(ct.echartsElement){try{(0,ce.clear)(ct.echartsElement)}catch(pt){console.warn(pt)}ct.echartsLib.dispose(ct.echartsElement)}},ct.rerender=function(){var pt=ct.props,xt=pt.onEvents,Mt=pt.onChartReady,_t=ct.renderEchartDom();ct.bindEvents(_t,xt||{}),typeof Mt=="function"&&ct.props.onChartReady(_t),ct.echartsElement&&(0,ce.bind)(ct.echartsElement,function(){try{_t.resize()}catch(Qt){console.warn(Qt)}})},ct.bindEvents=function(pt,xt){var Mt=function(Vt,Zt){typeof Vt=="string"&&typeof Zt=="function"&&pt.on(Vt,function($t){Zt($t,pt)})};for(var _t in xt)Object.prototype.hasOwnProperty.call(xt,_t)&&Mt(_t,xt[_t])},ct.renderEchartDom=function(){var pt=ct.getEchartsInstance();return pt.setOption(ct.props.option,ct.props.notMerge||!1,ct.props.lazyUpdate||!1),ct.props.showLoading?pt.showLoading(ct.props.loadingOption||null):pt.hideLoading(),pt},ct.echartsLib=at.echarts,ct.echartsElement=null,ct}return te(At,[{key:"componentDidMount",value:function(){this.rerender()}},{key:"componentDidUpdate",value:function(ct){if(!(typeof this.props.shouldSetOption=="function"&&!this.props.shouldSetOption(ct,this.props))){if(!(0,ue.default)(ct.theme,this.props.theme)||!(0,ue.default)(ct.opts,this.props.opts)||!(0,ue.default)(ct.onEvents,this.props.onEvents)){this.dispose(),this.rerender();return}var pt=["option","notMerge","lazyUpdate","showLoading","loadingOption"];if(!(0,ue.default)((0,Wt.pick)(this.props,pt),(0,Wt.pick)(ct,pt))){var xt=this.renderEchartDom();if(!(0,ue.default)(ct.style,this.props.style)||!(0,ue.default)(ct.className,this.props.className))try{xt.resize()}catch(Mt){console.warn(Mt)}}}}},{key:"componentWillUnmount",value:function(){this.dispose()}},{key:"render",value:function(){var ct=this,pt=this.props,xt=pt.style,Mt=pt.className,_t=Pt({height:300},xt);return Ce.default.createElement("div",{ref:function(Vt){ct.echartsElement=Vt},style:_t,className:"echarts-for-react "+Mt})}}]),At}(Ae.Component);Ve.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(Bn,Ve,Ot){"use strict";var Pt;Pt={value:!0},Ve.Z=void 0;var te=Ot(76411),Ae=Rt(te),Ce=Ot(97774),de=Rt(Ce);function Rt(Ne){return Ne&&Ne.__esModule?Ne:{default:Ne}}function ne(Ne,qt){if(!(Ne instanceof qt))throw new TypeError("Cannot call a class as a function")}function ue(Ne,qt){if(!Ne)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return qt&&(typeof qt=="object"||typeof qt=="function")?qt:Ne}function ce(Ne,qt){if(typeof qt!="function"&&qt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof qt);Ne.prototype=Object.create(qt&&qt.prototype,{constructor:{value:Ne,enumerable:!1,writable:!0,configurable:!0}}),qt&&(Object.setPrototypeOf?Object.setPrototypeOf(Ne,qt):Ne.__proto__=qt)}var Wt=function(Ne){ce(qt,Ne);function qt(Le){ne(this,qt);var Ut=ue(this,(qt.__proto__||Object.getPrototypeOf(qt)).call(this,Le));return Ut.echartsLib=Ae.default,Ut}return qt}(de.default);Ve.Z=Wt},65429:function(Bn,Ve){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});var Ot=Ve.pick=function(te,Ae){var Ce={};return Ae.forEach(function(de){Ce[de]=te[de]}),Ce}},86204:function(Bn){"use strict";var Ve=typeof Reflect=="object"?Reflect:null,Ot=Ve&&typeof Ve.apply=="function"?Ve.apply:function(pt,xt,Mt){return Function.prototype.apply.call(pt,xt,Mt)},Pt;Ve&&typeof Ve.ownKeys=="function"?Pt=Ve.ownKeys:Object.getOwnPropertySymbols?Pt=function(pt){return Object.getOwnPropertyNames(pt).concat(Object.getOwnPropertySymbols(pt))}:Pt=function(pt){return Object.getOwnPropertyNames(pt)};function te(ct){console&&console.warn&&console.warn(ct)}var Ae=Number.isNaN||function(pt){return pt!==pt};function Ce(){Ce.init.call(this)}Bn.exports=Ce,Bn.exports.once=et,Ce.EventEmitter=Ce,Ce.prototype._events=void 0,Ce.prototype._eventsCount=0,Ce.prototype._maxListeners=void 0;var de=10;function Rt(ct){if(typeof ct!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof ct)}Object.defineProperty(Ce,"defaultMaxListeners",{enumerable:!0,get:function(){return de},set:function(ct){if(typeof ct!="number"||ct<0||Ae(ct))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+ct+".");de=ct}}),Ce.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},Ce.prototype.setMaxListeners=function(pt){if(typeof pt!="number"||pt<0||Ae(pt))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+pt+".");return this._maxListeners=pt,this};function ne(ct){return ct._maxListeners===void 0?Ce.defaultMaxListeners:ct._maxListeners}Ce.prototype.getMaxListeners=function(){return ne(this)},Ce.prototype.emit=function(pt){for(var xt=[],Mt=1;Mt<arguments.length;Mt++)xt.push(arguments[Mt]);var _t=pt==="error",Qt=this._events;if(Qt!==void 0)_t=_t&&Qt.error===void 0;else if(!_t)return!1;if(_t){var Vt;if(xt.length>0&&(Vt=xt[0]),Vt instanceof Error)throw Vt;var Zt=new Error("Unhandled error."+(Vt?" ("+Vt.message+")":""));throw Zt.context=Vt,Zt}var $t=Qt[pt];if($t===void 0)return!1;if(typeof $t=="function")Ot($t,this,xt);else for(var Pe=$t.length,me=Le($t,Pe),Mt=0;Mt<Pe;++Mt)Ot(me[Mt],this,xt);return!0};function ue(ct,pt,xt,Mt){var _t,Qt,Vt;if(Rt(xt),Qt=ct._events,Qt===void 0?(Qt=ct._events=Object.create(null),ct._eventsCount=0):(Qt.newListener!==void 0&&(ct.emit("newListener",pt,xt.listener?xt.listener:xt),Qt=ct._events),Vt=Qt[pt]),Vt===void 0)Vt=Qt[pt]=xt,++ct._eventsCount;else if(typeof Vt=="function"?Vt=Qt[pt]=Mt?[xt,Vt]:[Vt,xt]:Mt?Vt.unshift(xt):Vt.push(xt),_t=ne(ct),_t>0&&Vt.length>_t&&!Vt.warned){Vt.warned=!0;var Zt=new Error("Possible EventEmitter memory leak detected. "+Vt.length+" "+String(pt)+" listeners added. Use emitter.setMaxListeners() to increase limit");Zt.name="MaxListenersExceededWarning",Zt.emitter=ct,Zt.type=pt,Zt.count=Vt.length,te(Zt)}return ct}Ce.prototype.addListener=function(pt,xt){return ue(this,pt,xt,!1)},Ce.prototype.on=Ce.prototype.addListener,Ce.prototype.prependListener=function(pt,xt){return ue(this,pt,xt,!0)};function ce(){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 Wt(ct,pt,xt){var Mt={fired:!1,wrapFn:void 0,target:ct,type:pt,listener:xt},_t=ce.bind(Mt);return _t.listener=xt,Mt.wrapFn=_t,_t}Ce.prototype.once=function(pt,xt){return Rt(xt),this.on(pt,Wt(this,pt,xt)),this},Ce.prototype.prependOnceListener=function(pt,xt){return Rt(xt),this.prependListener(pt,Wt(this,pt,xt)),this},Ce.prototype.removeListener=function(pt,xt){var Mt,_t,Qt,Vt,Zt;if(Rt(xt),_t=this._events,_t===void 0)return this;if(Mt=_t[pt],Mt===void 0)return this;if(Mt===xt||Mt.listener===xt)--this._eventsCount===0?this._events=Object.create(null):(delete _t[pt],_t.removeListener&&this.emit("removeListener",pt,Mt.listener||xt));else if(typeof Mt!="function"){for(Qt=-1,Vt=Mt.length-1;Vt>=0;Vt--)if(Mt[Vt]===xt||Mt[Vt].listener===xt){Zt=Mt[Vt].listener,Qt=Vt;break}if(Qt<0)return this;Qt===0?Mt.shift():Ut(Mt,Qt),Mt.length===1&&(_t[pt]=Mt[0]),_t.removeListener!==void 0&&this.emit("removeListener",pt,Zt||xt)}return this},Ce.prototype.off=Ce.prototype.removeListener,Ce.prototype.removeAllListeners=function(pt){var xt,Mt,_t;if(Mt=this._events,Mt===void 0)return this;if(Mt.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):Mt[pt]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete Mt[pt]),this;if(arguments.length===0){var Qt=Object.keys(Mt),Vt;for(_t=0;_t<Qt.length;++_t)Vt=Qt[_t],Vt!=="removeListener"&&this.removeAllListeners(Vt);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(xt=Mt[pt],typeof xt=="function")this.removeListener(pt,xt);else if(xt!==void 0)for(_t=xt.length-1;_t>=0;_t--)this.removeListener(pt,xt[_t]);return this};function Ne(ct,pt,xt){var Mt=ct._events;if(Mt===void 0)return[];var _t=Mt[pt];return _t===void 0?[]:typeof _t=="function"?xt?[_t.listener||_t]:[_t]:xt?nt(_t):Le(_t,_t.length)}Ce.prototype.listeners=function(pt){return Ne(this,pt,!0)},Ce.prototype.rawListeners=function(pt){return Ne(this,pt,!1)},Ce.listenerCount=function(ct,pt){return typeof ct.listenerCount=="function"?ct.listenerCount(pt):qt.call(ct,pt)},Ce.prototype.listenerCount=qt;function qt(ct){var pt=this._events;if(pt!==void 0){var xt=pt[ct];if(typeof xt=="function")return 1;if(xt!==void 0)return xt.length}return 0}Ce.prototype.eventNames=function(){return this._eventsCount>0?Pt(this._events):[]};function Le(ct,pt){for(var xt=new Array(pt),Mt=0;Mt<pt;++Mt)xt[Mt]=ct[Mt];return xt}function Ut(ct,pt){for(;pt+1<ct.length;pt++)ct[pt]=ct[pt+1];ct.pop()}function nt(ct){for(var pt=new Array(ct.length),xt=0;xt<pt.length;++xt)pt[xt]=ct[xt].listener||ct[xt];return pt}function et(ct,pt){return new Promise(function(xt,Mt){function _t(Vt){ct.removeListener(pt,Qt),Mt(Vt)}function Qt(){typeof ct.removeListener=="function"&&ct.removeListener("error",_t),xt([].slice.call(arguments))}at(ct,pt,Qt,{once:!0}),pt!=="error"&&At(ct,_t,{once:!0})})}function At(ct,pt,xt){typeof ct.on=="function"&&at(ct,"error",pt,xt)}function at(ct,pt,xt,Mt){if(typeof ct.on=="function")Mt.once?ct.once(pt,xt):ct.on(pt,xt);else if(typeof ct.addEventListener=="function")ct.addEventListener(pt,function _t(Qt){Mt.once&&ct.removeEventListener(pt,_t),xt(Qt)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof ct)}},53291:function(Bn){"use strict";var Ve=Array.isArray,Ot=Object.keys,Pt=Object.prototype.hasOwnProperty;Bn.exports=function te(Ae,Ce){if(Ae===Ce)return!0;if(Ae&&Ce&&typeof Ae=="object"&&typeof Ce=="object"){var de=Ve(Ae),Rt=Ve(Ce),ne,ue,ce;if(de&&Rt){if(ue=Ae.length,ue!=Ce.length)return!1;for(ne=ue;ne--!==0;)if(!te(Ae[ne],Ce[ne]))return!1;return!0}if(de!=Rt)return!1;var Wt=Ae instanceof Date,Ne=Ce instanceof Date;if(Wt!=Ne)return!1;if(Wt&&Ne)return Ae.getTime()==Ce.getTime();var qt=Ae instanceof RegExp,Le=Ce instanceof RegExp;if(qt!=Le)return!1;if(qt&&Le)return Ae.toString()==Ce.toString();var Ut=Ot(Ae);if(ue=Ut.length,ue!==Ot(Ce).length)return!1;for(ne=ue;ne--!==0;)if(!Pt.call(Ce,Ut[ne]))return!1;for(ne=ue;ne--!==0;)if(ce=Ut[ne],!te(Ae[ce],Ce[ce]))return!1;return!0}return Ae!==Ae&&Ce!==Ce}},6330:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{HT:function(){return Se},iZ:function(){return je}});var Pt={},te=function(oe,ae,ee,Ye,Be){var ln=new Worker(Pt[ae]||(Pt[ae]=URL.createObjectURL(new Blob([oe+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return ln.onmessage=function(Dn){var Zn=Dn.data,Li=Zn.$e$;if(Li){var Mi=new Error(Li[0]);Mi.code=Li[1],Mi.stack=Li[2],Be(Mi,null)}else Be(null,Zn)},ln.postMessage(ee,Ye),ln},Ae=Uint8Array,Ce=Uint16Array,de=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]),ne=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]),ue=new Ae([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ce=function(oe,ae){for(var ee=new Ce(31),Ye=0;Ye<31;++Ye)ee[Ye]=ae+=1<<oe[Ye-1];for(var Be=new de(ee[30]),Ye=1;Ye<30;++Ye)for(var ln=ee[Ye];ln<ee[Ye+1];++ln)Be[ln]=ln-ee[Ye]<<5|Ye;return{b:ee,r:Be}},Wt=ce(Rt,2),Ne=Wt.b,qt=Wt.r;Ne[28]=258,qt[258]=28;for(var Le=ce(ne,0),Ut=Le.b,nt=Le.r,et=new Ce(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 ct=function(oe,ae,ee){for(var Ye=oe.length,Be=0,ln=new Ce(ae);Be<Ye;++Be)oe[Be]&&++ln[oe[Be]-1];var Dn=new Ce(ae);for(Be=1;Be<ae;++Be)Dn[Be]=Dn[Be-1]+ln[Be-1]<<1;var Zn;if(ee){Zn=new Ce(1<<ae);var Li=15-ae;for(Be=0;Be<Ye;++Be)if(oe[Be])for(var Mi=Be<<4|oe[Be],Te=ae-oe[Be],yi=Dn[oe[Be]-1]++<<Te,Me=yi|(1<<Te)-1;yi<=Me;++yi)Zn[et[yi]>>Li]=Mi}else for(Zn=new Ce(Ye),Be=0;Be<Ye;++Be)oe[Be]&&(Zn[Be]=et[Dn[oe[Be]-1]++]>>15-oe[Be]);return Zn},pt=new Ae(288),At=0;At<144;++At)pt[At]=8;for(var At=144;At<256;++At)pt[At]=9;for(var At=256;At<280;++At)pt[At]=7;for(var At=280;At<288;++At)pt[At]=8;for(var xt=new Ae(32),At=0;At<32;++At)xt[At]=5;var Mt=ct(pt,9,0),_t=ct(pt,9,1),Qt=ct(xt,5,0),Vt=ct(xt,5,1),Zt=function(oe){for(var ae=oe[0],ee=1;ee<oe.length;++ee)oe[ee]>ae&&(ae=oe[ee]);return ae},$t=function(oe,ae,ee){var Ye=ae/8|0;return(oe[Ye]|oe[Ye+1]<<8)>>(ae&7)&ee},Pe=function(oe,ae){var ee=ae/8|0;return(oe[ee]|oe[ee+1]<<8|oe[ee+2]<<16)>>(ae&7)},me=function(oe){return(oe+7)/8|0},$e=function(oe,ae,ee){return(ae==null||ae<0)&&(ae=0),(ee==null||ee>oe.length)&&(ee=oe.length),new Ae(oe.subarray(ae,ee))},tn={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},Cn=["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"],Tn=function(oe,ae,ee){var Ye=new Error(ae||Cn[oe]);if(Ye.code=oe,Error.captureStackTrace&&Error.captureStackTrace(Ye,Tn),!ee)throw Ye;return Ye},In=function(oe,ae,ee,Ye){var Be=oe.length,ln=Ye?Ye.length:0;if(!Be||ae.f&&!ae.l)return ee||new Ae(0);var Dn=!ee,Zn=Dn||ae.i!=2,Li=ae.i;Dn&&(ee=new Ae(Be*3));var Mi=function(qr){var Nr=ee.length;if(qr>Nr){var ho=new Ae(Math.max(Nr*2,qr));ho.set(ee),ee=ho}},Te=ae.f||0,yi=ae.p||0,Me=ae.b||0,an=ae.l,Qe=ae.d,It=ae.m,vn=ae.n,pn=Be*8;do{if(!an){Te=$t(oe,yi,1);var Qn=$t(oe,yi+1,3);if(yi+=3,Qn)if(Qn==1)an=_t,Qe=Vt,It=9,vn=5;else if(Qn==2){var fn=$t(oe,yi,31)+257,Fn=$t(oe,yi+10,15)+4,Sn=fn+$t(oe,yi+5,31)+1;yi+=14;for(var dn=new Ae(Sn),gi=new Ae(19),Vn=0;Vn<Fn;++Vn)gi[ue[Vn]]=$t(oe,yi+Vn*3,7);yi+=Fn*3;for(var qn=Zt(gi),cn=(1<<qn)-1,ri=ct(gi,qn,1),Vn=0;Vn<Sn;){var Ui=ri[$t(oe,yi,cn)];yi+=Ui&15;var zn=Ui>>4;if(zn<16)dn[Vn++]=zn;else{var nr=0,Ji=0;for(zn==16?(Ji=3+$t(oe,yi,3),yi+=2,nr=dn[Vn-1]):zn==17?(Ji=3+$t(oe,yi,7),yi+=3):zn==18&&(Ji=11+$t(oe,yi,127),yi+=7);Ji--;)dn[Vn++]=nr}}var fr=dn.subarray(0,fn),dr=dn.subarray(fn);It=Zt(fr),vn=Zt(dr),an=ct(fr,It,1),Qe=ct(dr,vn,1)}else Tn(1);else{var zn=me(yi)+4,jn=oe[zn-4]|oe[zn-3]<<8,Ge=zn+jn;if(Ge>Be){Li&&Tn(0);break}Zn&&Mi(Me+jn),ee.set(oe.subarray(zn,Ge),Me),ae.b=Me+=jn,ae.p=yi=Ge*8,ae.f=Te;continue}if(yi>pn){Li&&Tn(0);break}}Zn&&Mi(Me+131072);for(var Pr=(1<<It)-1,Gr=(1<<vn)-1,Tr=yi;;Tr=yi){var nr=an[Pe(oe,yi)&Pr],ro=nr>>4;if(yi+=nr&15,yi>pn){Li&&Tn(0);break}if(nr||Tn(2),ro<256)ee[Me++]=ro;else if(ro==256){Tr=yi,an=null;break}else{var Oe=ro-254;if(ro>264){var Vn=ro-257,gr=Rt[Vn];Oe=$t(oe,yi,(1<<gr)-1)+Ne[Vn],yi+=gr}var Dr=Qe[Pe(oe,yi)&Gr],tr=Dr>>4;Dr||Tn(3),yi+=Dr&15;var dr=Ut[tr];if(tr>3){var gr=ne[tr];dr+=Pe(oe,yi)&(1<<gr)-1,yi+=gr}if(yi>pn){Li&&Tn(0);break}Zn&&Mi(Me+131072);var Ur=Me+Oe;if(Me<dr){var or=ln-dr,vo=Math.min(dr,Ur);for(or+Me<0&&Tn(3);Me<vo;++Me)ee[Me]=Ye[or+Me]}for(;Me<Ur;++Me)ee[Me]=ee[Me-dr]}}ae.l=an,ae.p=Tr,ae.b=Me,ae.f=Te,an&&(Te=1,ae.m=It,ae.d=Qe,ae.n=vn)}while(!Te);return Me!=ee.length&&Dn?$e(ee,0,Me):ee.subarray(0,Me)},$n=function(oe,ae,ee){ee<<=ae&7;var Ye=ae/8|0;oe[Ye]|=ee,oe[Ye+1]|=ee>>8},Ln=function(oe,ae,ee){ee<<=ae&7;var Ye=ae/8|0;oe[Ye]|=ee,oe[Ye+1]|=ee>>8,oe[Ye+2]|=ee>>16},be=function(oe,ae){for(var ee=[],Ye=0;Ye<oe.length;++Ye)oe[Ye]&&ee.push({s:Ye,f:oe[Ye]});var Be=ee.length,ln=ee.slice();if(!Be)return{t:si,l:0};if(Be==1){var Dn=new Ae(ee[0].s+1);return Dn[ee[0].s]=1,{t:Dn,l:1}}ee.sort(function(Ge,fn){return Ge.f-fn.f}),ee.push({s:-1,f:25001});var Zn=ee[0],Li=ee[1],Mi=0,Te=1,yi=2;for(ee[0]={s:-1,f:Zn.f+Li.f,l:Zn,r:Li};Te!=Be-1;)Zn=ee[ee[Mi].f<ee[yi].f?Mi++:yi++],Li=ee[Mi!=Te&&ee[Mi].f<ee[yi].f?Mi++:yi++],ee[Te++]={s:-1,f:Zn.f+Li.f,l:Zn,r:Li};for(var Me=ln[0].s,Ye=1;Ye<Be;++Ye)ln[Ye].s>Me&&(Me=ln[Ye].s);var an=new Ce(Me+1),Qe=re(ee[Te-1],an,0);if(Qe>ae){var Ye=0,It=0,vn=Qe-ae,pn=1<<vn;for(ln.sort(function(fn,Fn){return an[Fn.s]-an[fn.s]||fn.f-Fn.f});Ye<Be;++Ye){var Qn=ln[Ye].s;if(an[Qn]>ae)It+=pn-(1<<Qe-an[Qn]),an[Qn]=ae;else break}for(It>>=vn;It>0;){var zn=ln[Ye].s;an[zn]<ae?It-=1<<ae-an[zn]++-1:++Ye}for(;Ye>=0&&It;--Ye){var jn=ln[Ye].s;an[jn]==ae&&(--an[jn],++It)}Qe=ae}return{t:new Ae(an),l:Qe}},re=function(oe,ae,ee){return oe.s==-1?Math.max(re(oe.l,ae,ee+1),re(oe.r,ae,ee+1)):ae[oe.s]=ee},Pn=function(oe){for(var ae=oe.length;ae&&!oe[--ae];);for(var ee=new Ce(++ae),Ye=0,Be=oe[0],ln=1,Dn=function(Li){ee[Ye++]=Li},Zn=1;Zn<=ae;++Zn)if(oe[Zn]==Be&&Zn!=ae)++ln;else{if(!Be&&ln>2){for(;ln>138;ln-=138)Dn(32754);ln>2&&(Dn(ln>10?ln-11<<5|28690:ln-3<<5|12305),ln=0)}else if(ln>3){for(Dn(Be),--ln;ln>6;ln-=6)Dn(8304);ln>2&&(Dn(ln-3<<5|8208),ln=0)}for(;ln--;)Dn(Be);ln=1,Be=oe[Zn]}return{c:ee.subarray(0,Ye),n:ae}},li=function(oe,ae){for(var ee=0,Ye=0;Ye<ae.length;++Ye)ee+=oe[Ye]*ae[Ye];return ee},Jn=function(oe,ae,ee){var Ye=ee.length,Be=me(ae+2);oe[Be]=Ye&255,oe[Be+1]=Ye>>8,oe[Be+2]=oe[Be]^255,oe[Be+3]=oe[Be+1]^255;for(var ln=0;ln<Ye;++ln)oe[Be+ln+4]=ee[ln];return(Be+4+Ye)*8},un=function(oe,ae,ee,Ye,Be,ln,Dn,Zn,Li,Mi,Te){$n(ae,Te++,ee),++Be[256];for(var yi=be(Be,15),Me=yi.t,an=yi.l,Qe=be(ln,15),It=Qe.t,vn=Qe.l,pn=Pn(Me),Qn=pn.c,zn=pn.n,jn=Pn(It),Ge=jn.c,fn=jn.n,Fn=new Ce(19),Sn=0;Sn<Qn.length;++Sn)++Fn[Qn[Sn]&31];for(var Sn=0;Sn<Ge.length;++Sn)++Fn[Ge[Sn]&31];for(var dn=be(Fn,7),gi=dn.t,Vn=dn.l,qn=19;qn>4&&!gi[ue[qn-1]];--qn);var cn=Mi+5<<3,ri=li(Be,pt)+li(ln,xt)+Dn,Ui=li(Be,Me)+li(ln,It)+Dn+14+3*qn+li(Fn,gi)+2*Fn[16]+3*Fn[17]+7*Fn[18];if(Li>=0&&cn<=ri&&cn<=Ui)return Jn(ae,Te,oe.subarray(Li,Li+Mi));var nr,Ji,fr,dr;if($n(ae,Te,1+(Ui<ri)),Te+=2,Ui<ri){nr=ct(Me,an,0),Ji=Me,fr=ct(It,vn,0),dr=It;var Pr=ct(gi,Vn,0);$n(ae,Te,zn-257),$n(ae,Te+5,fn-1),$n(ae,Te+10,qn-4),Te+=14;for(var Sn=0;Sn<qn;++Sn)$n(ae,Te+3*Sn,gi[ue[Sn]]);Te+=3*qn;for(var Gr=[Qn,Ge],Tr=0;Tr<2;++Tr)for(var ro=Gr[Tr],Sn=0;Sn<ro.length;++Sn){var Oe=ro[Sn]&31;$n(ae,Te,Pr[Oe]),Te+=gi[Oe],Oe>15&&($n(ae,Te,ro[Sn]>>5&127),Te+=ro[Sn]>>12)}}else nr=Mt,Ji=pt,fr=Qt,dr=xt;for(var Sn=0;Sn<Zn;++Sn){var gr=Ye[Sn];if(gr>255){var Oe=gr>>18&31;Ln(ae,Te,nr[Oe+257]),Te+=Ji[Oe+257],Oe>7&&($n(ae,Te,gr>>23&31),Te+=Rt[Oe]);var Dr=gr&31;Ln(ae,Te,fr[Dr]),Te+=dr[Dr],Dr>3&&(Ln(ae,Te,gr>>5&8191),Te+=ne[Dr])}else Ln(ae,Te,nr[gr]),Te+=Ji[gr]}return Ln(ae,Te,nr[256]),Te+Ji[256]},Yn=new de([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),si=new Ae(0),Fi=function(oe,ae,ee,Ye,Be,ln){var Dn=ln.z||oe.length,Zn=new Ae(Ye+Dn+5*(1+Math.ceil(Dn/7e3))+Be),Li=Zn.subarray(Ye,Zn.length-Be),Mi=ln.l,Te=(ln.r||0)&7;if(ae){Te&&(Li[0]=ln.r>>3);for(var yi=Yn[ae-1],Me=yi>>13,an=yi&8191,Qe=(1<<ee)-1,It=ln.p||new Ce(32768),vn=ln.h||new Ce(Qe+1),pn=Math.ceil(ee/3),Qn=2*pn,zn=function(ks){return(oe[ks]^oe[ks+1]<<pn^oe[ks+2]<<Qn)&Qe},jn=new de(25e3),Ge=new Ce(288),fn=new Ce(32),Fn=0,Sn=0,dn=ln.i||0,gi=0,Vn=ln.w||0,qn=0;dn+2<Dn;++dn){var cn=zn(dn),ri=dn&32767,Ui=vn[cn];if(It[ri]=Ui,vn[cn]=ri,Vn<=dn){var nr=Dn-dn;if((Fn>7e3||gi>24576)&&(nr>423||!Mi)){Te=un(oe,Li,0,jn,Ge,fn,Sn,gi,qn,dn-qn,Te),gi=Fn=Sn=0,qn=dn;for(var Ji=0;Ji<286;++Ji)Ge[Ji]=0;for(var Ji=0;Ji<30;++Ji)fn[Ji]=0}var fr=2,dr=0,Pr=an,Gr=ri-Ui&32767;if(nr>2&&cn==zn(dn-Gr))for(var Tr=Math.min(Me,nr)-1,ro=Math.min(32767,dn),Oe=Math.min(258,nr);Gr<=ro&&--Pr&&ri!=Ui;){if(oe[dn+fr]==oe[dn+fr-Gr]){for(var gr=0;gr<Oe&&oe[dn+gr]==oe[dn+gr-Gr];++gr);if(gr>fr){if(fr=gr,dr=Gr,gr>Tr)break;for(var Dr=Math.min(Gr,gr-2),tr=0,Ji=0;Ji<Dr;++Ji){var Ur=dn-Gr+Ji&32767,or=It[Ur],vo=Ur-or&32767;vo>tr&&(tr=vo,Ui=Ur)}}}ri=Ui,Ui=It[ri],Gr+=ri-Ui&32767}if(dr){jn[gi++]=268435456|qt[fr]<<18|nt[dr];var qr=qt[fr]&31,Nr=nt[dr]&31;Sn+=Rt[qr]+ne[Nr],++Ge[257+qr],++fn[Nr],Vn=dn+fr,++Fn}else jn[gi++]=oe[dn],++Ge[oe[dn]]}}for(dn=Math.max(dn,Vn);dn<Dn;++dn)jn[gi++]=oe[dn],++Ge[oe[dn]];Te=un(oe,Li,Mi,jn,Ge,fn,Sn,gi,qn,dn-qn,Te),Mi||(ln.r=Te&7|Li[Te/8|0]<<3,Te-=7,ln.h=vn,ln.p=It,ln.i=dn,ln.w=Vn)}else{for(var dn=ln.w||0;dn<Dn+Mi;dn+=65535){var ho=dn+65535;ho>=Dn&&(Li[Te/8|0]=Mi,ho=Dn),Te=Jn(Li,Te+1,oe.subarray(dn,ho))}ln.i=Dn}return $e(Zn,0,Ye+me(Te)+Be)},sn=null,oi=function(){var oe=-1;return{p:function(ae){for(var ee=oe,Ye=0;Ye<ae.length;++Ye)ee=sn[ee&255^ae[Ye]]^ee>>>8;oe=ee},d:function(){return~oe}}},Ee=function(){var oe=1,ae=0;return{p:function(ee){for(var Ye=oe,Be=ae,ln=ee.length|0,Dn=0;Dn!=ln;){for(var Zn=Math.min(Dn+2655,ln);Dn<Zn;++Dn)Be+=Ye+=ee[Dn];Ye=(Ye&65535)+15*(Ye>>16),Be=(Be&65535)+15*(Be>>16)}oe=Ye,ae=Be},d:function(){return oe%=65521,ae%=65521,(oe&255)<<24|(oe&65280)<<8|(ae&255)<<8|ae>>8}}},ci=function(oe,ae,ee,Ye,Be){if(!Be&&(Be={l:1},ae.dictionary)){var ln=ae.dictionary.subarray(-32768),Dn=new Ae(ln.length+oe.length);Dn.set(ln),Dn.set(oe,ln.length),oe=Dn,Be.w=ln.length}return Fi(oe,ae.level==null?6:ae.level,ae.mem==null?Be.l?Math.ceil(Math.max(8,Math.min(13,Math.log(oe.length)))*1.5):20:12+ae.mem,ee,Ye,Be)},Pi=function(oe,ae){var ee={};for(var Ye in oe)ee[Ye]=oe[Ye];for(var Ye in ae)ee[Ye]=ae[Ye];return ee},Ht=function(oe,ae,ee){for(var Ye=oe(),Be=oe.toString(),ln=Be.slice(Be.indexOf("[")+1,Be.lastIndexOf("]")).replace(/\s+/g,"").split(","),Dn=0;Dn<Ye.length;++Dn){var Zn=Ye[Dn],Li=ln[Dn];if(typeof Zn=="function"){ae+=";"+Li+"=";var Mi=Zn.toString();if(Zn.prototype)if(Mi.indexOf("[native code]")!=-1){var Te=Mi.indexOf(" ",8)+1;ae+=Mi.slice(Te,Mi.indexOf("(",Te))}else{ae+=Mi;for(var yi in Zn.prototype)ae+=";"+Li+".prototype."+yi+"="+Zn.prototype[yi].toString()}else ae+=Mi}else ee[Li]=Zn}return ae},kt=null,mt=function(oe){var ae=[];for(var ee in oe)oe[ee].buffer&&ae.push((oe[ee]=new oe[ee].constructor(oe[ee])).buffer);return ae},vt=function(oe,ae,ee,Ye){if(!kt[ee]){for(var Be="",ln={},Dn=oe.length-1,Zn=0;Zn<Dn;++Zn)Be=Ht(oe[Zn],Be,ln);kt[ee]={c:Ht(oe[Dn],Be,ln),e:ln}}var Li=Pi({},kt[ee].e);return te(kt[ee].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+ae.toString()+"}",ee,Li,mt(Li),Ye)},Lt=function(){return[Ae,Ce,de,Rt,ne,ue,Ne,Ut,_t,Vt,et,Cn,ct,Zt,$t,Pe,me,$e,Tn,In,Xr,ve,ze]},Bt=function(){return[Ae,Ce,de,Rt,ne,ue,qt,nt,Mt,pt,Qt,xt,et,Yn,si,ct,$n,Ln,be,re,Pn,li,Jn,un,me,$e,Fi,ci,Yr,ve]},Kt=function(){return[xi,Qi,di,oi,sn]},ge=function(){return[Ei,ar]},ke=function(){return[Oi,di,Ee]},Je=function(){return[Yi]},ve=function(oe){return postMessage(oe,[oe.buffer])},ze=function(oe){return oe&&{out:oe.size&&new Ae(oe.size),dictionary:oe.dictionary}},De=function(oe,ae,ee,Ye,Be,ln){var Dn=vt(ee,Ye,Be,function(Zn,Li){Dn.terminate(),ln(Zn,Li)});return Dn.postMessage([oe,ae],ae.consume?[oe.buffer]:[]),function(){Dn.terminate()}},nn=function(oe){return oe.ondata=function(ae,ee){return postMessage([ae,ee],[ae.buffer])},function(ae){ae.data.length?(oe.push(ae.data[0],ae.data[1]),postMessage([ae.data[0].length])):oe.flush()}},kn=function(oe,ae,ee,Ye,Be,ln,Dn){var Zn,Li=vt(oe,Ye,Be,function(Mi,Te){Mi?(Li.terminate(),ae.ondata.call(ae,Mi)):Array.isArray(Te)?Te.length==1?(ae.queuedSize-=Te[0],ae.ondrain&&ae.ondrain(Te[0])):(Te[1]&&Li.terminate(),ae.ondata.call(ae,Mi,Te[0],Te[1])):Dn(Te)});Li.postMessage(ee),ae.queuedSize=0,ae.push=function(Mi,Te){ae.ondata||Tn(5),Zn&&ae.ondata(Tn(4,0,1),null,!!Te),ae.queuedSize+=Mi.length,Li.postMessage([Mi,Zn=Te],[Mi.buffer])},ae.terminate=function(){Li.terminate()},ln&&(ae.flush=function(){Li.postMessage([])})},Gn=function(oe,ae){return oe[ae]|oe[ae+1]<<8},gn=function(oe,ae){return(oe[ae]|oe[ae+1]<<8|oe[ae+2]<<16|oe[ae+3]<<24)>>>0},Ri=function(oe,ae){return gn(oe,ae)+gn(oe,ae+4)*4294967296},di=function(oe,ae,ee){for(;ee;++ae)oe[ae]=ee,ee>>>=8},xi=function(oe,ae){var ee=ae.filename;if(oe[0]=31,oe[1]=139,oe[2]=8,oe[8]=ae.level<2?4:ae.level==9?2:0,oe[9]=3,ae.mtime!=0&&di(oe,4,Math.floor(new Date(ae.mtime||Date.now())/1e3)),ee){oe[3]=8;for(var Ye=0;Ye<=ee.length;++Ye)oe[Ye+10]=ee.charCodeAt(Ye)}},Ei=function(oe){(oe[0]!=31||oe[1]!=139||oe[2]!=8)&&Tn(6,"invalid gzip data");var ae=oe[3],ee=10;ae&4&&(ee+=(oe[10]|oe[11]<<8)+2);for(var Ye=(ae>>3&1)+(ae>>4&1);Ye>0;Ye-=!oe[ee++]);return ee+(ae&2)},ar=function(oe){var ae=oe.length;return(oe[ae-4]|oe[ae-3]<<8|oe[ae-2]<<16|oe[ae-1]<<24)>>>0},Qi=function(oe){return 10+(oe.filename?oe.filename.length+1:0)},Oi=function(oe,ae){var ee=ae.level,Ye=ee==0?0:ee<6?1:ee==9?3:2;if(oe[0]=120,oe[1]=Ye<<6|(ae.dictionary&&32),oe[1]|=31-(oe[0]<<8|oe[1])%31,ae.dictionary){var Be=Ee();Be.p(ae.dictionary),di(oe,2,Be.d())}},Yi=function(oe,ae){return((oe[0]&15)!=8||oe[0]>>4>7||(oe[0]<<8|oe[1])%31)&&Tn(6,"invalid zlib data"),(oe[1]>>5&1)==+!ae&&Tn(6,"invalid zlib data: "+(oe[1]&32?"need":"unexpected")+" dictionary"),(oe[1]>>3&4)+2};function Hr(oe,ae){return typeof oe=="function"&&(ae=oe,oe={}),this.ondata=ae,oe}var Xi=null,Fr=null;function mr(oe,ae,ee){return ee||(ee=ae,ae={}),typeof ee!="function"&&Tn(7),De(oe,ae,[Bt],function(Ye){return ve(Yr(Ye.data[0],Ye.data[1]))},0,ee)}function Yr(oe,ae){return ci(oe,ae||{},0,0)}var ji=null,co=null;function fo(oe,ae,ee){return ee||(ee=ae,ae={}),typeof ee!="function"&&Tn(7),De(oe,ae,[Lt],function(Ye){return ve(Xr(Ye.data[0],ze(Ye.data[1])))},1,ee)}function Xr(oe,ae){return In(oe,{i:2},ae&&ae.out,ae&&ae.dictionary)}var Er=null,Zr=null;function bt(oe,ae,ee){return ee||(ee=ae,ae={}),typeof ee!="function"&&Tn(7),De(oe,ae,[Bt,Kt,function(){return[Br]}],function(Ye){return ve(Br(Ye.data[0],Ye.data[1]))},2,ee)}function Br(oe,ae){ae||(ae={});var ee=oi(),Ye=oe.length;ee.p(oe);var Be=ci(oe,ae,Qi(ae),8),ln=Be.length;return xi(Be,ae),di(Be,ln-8,ee.d()),di(Be,ln-4,Ye),Be}var Vi=null,Vr=null;function Do(oe,ae,ee){return ee||(ee=ae,ae={}),typeof ee!="function"&&Tn(7),De(oe,ae,[Lt,ge,function(){return[bo]}],function(Ye){return ve(bo(Ye.data[0],Ye.data[1]))},3,ee)}function bo(oe,ae){var ee=Ei(oe);return ee+8>oe.length&&Tn(6,"invalid gzip data"),In(oe.subarray(ee,-8),{i:2},ae&&ae.out||new Ae(ar(oe)),ae&&ae.dictionary)}var $o=null,Zi=null;function wi(oe,ae,ee){return ee||(ee=ae,ae={}),typeof ee!="function"&&Tn(7),De(oe,ae,[Bt,ke,function(){return[je]}],function(Ye){return ve(je(Ye.data[0],Ye.data[1]))},4,ee)}function je(oe,ae){ae||(ae={});var ee=Ee();ee.p(oe);var Ye=ci(oe,ae,ae.dictionary?6:2,4);return Oi(Ye,ae),di(Ye,Ye.length-4,ee.d()),Ye}var He=null,Ue=null;function fi(oe,ae,ee){return ee||(ee=ae,ae={}),typeof ee!="function"&&Tn(7),De(oe,ae,[Lt,Je,function(){return[Se]}],function(Ye){return ve(Se(Ye.data[0],ze(Ye.data[1])))},5,ee)}function Se(oe,ae){return In(oe.subarray(Yi(oe,ae&&ae.dictionary),-4),{i:2},ae&&ae.out,ae&&ae.dictionary)}var _i=null,Un=null;function Ai(oe,ae,ee){return ee||(ee=ae,ae={}),typeof ee!="function"&&Tn(7),oe[0]==31&&oe[1]==139&&oe[2]==8?Do(oe,ae,ee):(oe[0]&15)!=8||oe[0]>>4>7||(oe[0]<<8|oe[1])%31?fo(oe,ae,ee):fi(oe,ae,ee)}function We(oe,ae){return oe[0]==31&&oe[1]==139&&oe[2]==8?bo(oe,ae):(oe[0]&15)!=8||oe[0]>>4>7||(oe[0]<<8|oe[1])%31?Xr(oe,ae):Se(oe,ae)}var Ke=function(oe,ae,ee,Ye){for(var Be in oe){var ln=oe[Be],Dn=ae+Be,Zn=Ye;Array.isArray(ln)&&(Zn=Pi(Ye,ln[1]),ln=ln[0]),ln instanceof Ae?ee[Dn]=[ln,Zn]:(ee[Dn+="/"]=[new Ae(0),Zn],Ke(ln,Dn,ee,Ye))}},ui=typeof TextEncoder!="undefined"&&new TextEncoder,he=typeof TextDecoder!="undefined"&&new TextDecoder,rn=0;try{he.decode(si,{stream:!0}),rn=1}catch(oe){}var Wn=function(oe){for(var ae="",ee=0;;){var Ye=oe[ee++],Be=(Ye>127)+(Ye>223)+(Ye>239);if(ee+Be>oe.length)return{s:ae,r:$e(oe,ee-1)};Be?Be==3?(Ye=((Ye&15)<<18|(oe[ee++]&63)<<12|(oe[ee++]&63)<<6|oe[ee++]&63)-65536,ae+=String.fromCharCode(55296|Ye>>10,56320|Ye&1023)):Be&1?ae+=String.fromCharCode((Ye&31)<<6|oe[ee++]&63):ae+=String.fromCharCode((Ye&15)<<12|(oe[ee++]&63)<<6|oe[ee++]&63):ae+=String.fromCharCode(Ye)}},pi=null,on=null;function yn(oe,ae){if(ae){for(var ee=new Ae(oe.length),Ye=0;Ye<oe.length;++Ye)ee[Ye]=oe.charCodeAt(Ye);return ee}if(ui)return ui.encode(oe);for(var Be=oe.length,ln=new Ae(oe.length+(oe.length>>1)),Dn=0,Zn=function(Te){ln[Dn++]=Te},Ye=0;Ye<Be;++Ye){if(Dn+5>ln.length){var Li=new Ae(Dn+8+(Be-Ye<<1));Li.set(ln),ln=Li}var Mi=oe.charCodeAt(Ye);Mi<128||ae?Zn(Mi):Mi<2048?(Zn(192|Mi>>6),Zn(128|Mi&63)):Mi>55295&&Mi<57344?(Mi=65536+(Mi&1047552)|oe.charCodeAt(++Ye)&1023,Zn(240|Mi>>18),Zn(128|Mi>>12&63),Zn(128|Mi>>6&63),Zn(128|Mi&63)):(Zn(224|Mi>>12),Zn(128|Mi>>6&63),Zn(128|Mi&63))}return $e(ln,0,Dn)}function ii(oe,ae){if(ae){for(var ee="",Ye=0;Ye<oe.length;Ye+=16384)ee+=String.fromCharCode.apply(null,oe.subarray(Ye,Ye+16384));return ee}else{if(he)return he.decode(oe);var Be=Wn(oe),ln=Be.s,ee=Be.r;return ee.length&&Tn(8),ln}}var hn=function(oe){return oe==1?3:oe<6?2:oe==9?1:0},An=function(oe,ae){return ae+30+Gn(oe,ae+26)+Gn(oe,ae+28)},xn=function(oe,ae,ee){var Ye=Gn(oe,ae+28),Be=ii(oe.subarray(ae+46,ae+46+Ye),!(Gn(oe,ae+8)&2048)),ln=ae+46+Ye,Dn=gn(oe,ae+20),Zn=ee&&Dn==4294967295?Nn(oe,ln):[Dn,gn(oe,ae+24),gn(oe,ae+42)],Li=Zn[0],Mi=Zn[1],Te=Zn[2];return[Gn(oe,ae+10),Li,Mi,Be,ln+Gn(oe,ae+30)+Gn(oe,ae+32),Te]},Nn=function(oe,ae){for(;Gn(oe,ae)!=1;ae+=4+Gn(oe,ae+2));return[Ri(oe,ae+12),Ri(oe,ae+4),Ri(oe,ae+20)]},ai=function(oe){var ae=0;if(oe)for(var ee in oe){var Ye=oe[ee].length;Ye>65535&&Tn(9),ae+=Ye+4}return ae},Ki=function(oe,ae,ee,Ye,Be,ln,Dn,Zn){var Li=Ye.length,Mi=ee.extra,Te=Zn&&Zn.length,yi=ai(Mi);di(oe,ae,Dn!=null?33639248:67324752),ae+=4,Dn!=null&&(oe[ae++]=20,oe[ae++]=ee.os),oe[ae]=20,ae+=2,oe[ae++]=ee.flag<<1|(ln<0&&8),oe[ae++]=Be&&8,oe[ae++]=ee.compression&255,oe[ae++]=ee.compression>>8;var Me=new Date(ee.mtime==null?Date.now():ee.mtime),an=Me.getFullYear()-1980;if((an<0||an>119)&&Tn(10),di(oe,ae,an<<25|Me.getMonth()+1<<21|Me.getDate()<<16|Me.getHours()<<11|Me.getMinutes()<<5|Me.getSeconds()>>1),ae+=4,ln!=-1&&(di(oe,ae,ee.crc),di(oe,ae+4,ln<0?-ln-2:ln),di(oe,ae+8,ee.size)),di(oe,ae+12,Li),di(oe,ae+14,yi),ae+=16,Dn!=null&&(di(oe,ae,Te),di(oe,ae+6,ee.attrs),di(oe,ae+10,Dn),ae+=14),oe.set(Ye,ae),ae+=Li,yi)for(var Qe in Mi){var It=Mi[Qe],vn=It.length;di(oe,ae,+Qe),di(oe,ae+2,vn),oe.set(It,ae+4),ae+=4+vn}return Te&&(oe.set(Zn,ae),ae+=Te),ae},Ni=function(oe,ae,ee,Ye,Be){di(oe,ae,101010256),di(oe,ae+8,ee),di(oe,ae+10,ee),di(oe,ae+12,Ye),di(oe,ae+16,Be)},Ti=null,en=null,br=null,cr=null;function Kr(oe,ae,ee){ee||(ee=ae,ae={}),typeof ee!="function"&&Tn(7);var Ye={};Ke(oe,"",Ye,ae);var Be=Object.keys(Ye),ln=Be.length,Dn=0,Zn=0,Li=ln,Mi=new Array(ln),Te=[],yi=function(){for(var vn=0;vn<Te.length;++vn)Te[vn]()},Me=function(vn,pn){ki(function(){ee(vn,pn)})};ki(function(){Me=ee});var an=function(){var vn=new Ae(Zn+22),pn=Dn,Qn=Zn-Dn;Zn=0;for(var zn=0;zn<Li;++zn){var jn=Mi[zn];try{var Ge=jn.c.length;Ki(vn,Zn,jn,jn.f,jn.u,Ge);var fn=30+jn.f.length+ai(jn.extra),Fn=Zn+fn;vn.set(jn.c,Fn),Ki(vn,Dn,jn,jn.f,jn.u,Ge,Zn,jn.m),Dn+=16+fn+(jn.m?jn.m.length:0),Zn=Fn+Ge}catch(Sn){return Me(Sn,null)}}Ni(vn,Dn,Mi.length,Qn,pn),Me(null,vn)};ln||an();for(var Qe=function(vn){var pn=Be[vn],Qn=Ye[pn],zn=Qn[0],jn=Qn[1],Ge=oi(),fn=zn.length;Ge.p(zn);var Fn=yn(pn),Sn=Fn.length,dn=jn.comment,gi=dn&&yn(dn),Vn=gi&&gi.length,qn=ai(jn.extra),cn=jn.level==0?0:8,ri=function(Ui,nr){if(Ui)yi(),Me(Ui,null);else{var Ji=nr.length;Mi[vn]=Pi(jn,{size:fn,crc:Ge.d(),c:nr,f:Fn,m:gi,u:Sn!=pn.length||gi&&dn.length!=Vn,compression:cn}),Dn+=30+Sn+qn+Ji,Zn+=76+2*(Sn+qn)+(Vn||0)+Ji,--ln||an()}};if(Sn>65535&&ri(Tn(11,0,1),null),!cn)ri(null,zn);else if(fn<16e4)try{ri(null,Yr(zn,jn))}catch(Ui){ri(Ui,null)}else Te.push(mr(zn,jn,ri))},It=0;It<Li;++It)Qe(It);return yi}function Ze(oe,ae){ae||(ae={});var ee={},Ye=[];Ke(oe,"",ee,ae);var Be=0,ln=0;for(var Dn in ee){var Zn=ee[Dn],Li=Zn[0],Mi=Zn[1],Te=Mi.level==0?0:8,yi=yn(Dn),Me=yi.length,an=Mi.comment,Qe=an&&yn(an),It=Qe&&Qe.length,vn=ai(Mi.extra);Me>65535&&Tn(11);var pn=Te?Yr(Li,Mi):Li,Qn=pn.length,zn=oi();zn.p(Li),Ye.push(Pi(Mi,{size:Li.length,crc:zn.d(),c:pn,f:yi,m:Qe,u:Me!=Dn.length||Qe&&an.length!=It,o:Be,compression:Te})),Be+=30+Me+vn+Qn,ln+=76+2*(Me+vn)+(It||0)+Qn}for(var jn=new Ae(ln+22),Ge=Be,fn=ln-Be,Fn=0;Fn<Ye.length;++Fn){var yi=Ye[Fn];Ki(jn,yi.o,yi,yi.f,yi.u,yi.c.length);var Sn=30+yi.f.length+ai(yi.extra);jn.set(yi.c,yi.o+Sn),Ki(jn,Be,yi,yi.f,yi.u,yi.c.length,yi.o,yi.m),Be+=16+Sn+(yi.m?yi.m.length:0)}return Ni(jn,Be,Ye.length,fn,Ge),jn}var ni=null,Bi=null,Hi=null,vi=null,ki=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(oe){oe()};function er(oe,ae,ee){ee||(ee=ae,ae={}),typeof ee!="function"&&Tn(7);var Ye=[],Be=function(){for(var vn=0;vn<Ye.length;++vn)Ye[vn]()},ln={},Dn=function(vn,pn){ki(function(){ee(vn,pn)})};ki(function(){Dn=ee});for(var Zn=oe.length-22;gn(oe,Zn)!=101010256;--Zn)if(!Zn||oe.length-Zn>65558)return Dn(Tn(13,0,1),null),Be;var Li=Gn(oe,Zn+8);if(Li){var Mi=Li,Te=gn(oe,Zn+16),yi=Te==4294967295||Mi==65535;if(yi){var Me=gn(oe,Zn-12);yi=gn(oe,Me)==101075792,yi&&(Mi=Li=gn(oe,Me+32),Te=gn(oe,Me+48))}for(var an=ae&&ae.filter,Qe=function(vn){var pn=xn(oe,Te,yi),Qn=pn[0],zn=pn[1],jn=pn[2],Ge=pn[3],fn=pn[4],Fn=pn[5],Sn=An(oe,Fn);Te=fn;var dn=function(Vn,qn){Vn?(Be(),Dn(Vn,null)):(qn&&(ln[Ge]=qn),--Li||Dn(null,ln))};if(!an||an({name:Ge,size:zn,originalSize:jn,compression:Qn}))if(!Qn)dn(null,$e(oe,Sn,Sn+zn));else if(Qn==8){var gi=oe.subarray(Sn,Sn+zn);if(jn<524288||zn>.8*jn)try{dn(null,Xr(gi,{out:new Ae(jn)}))}catch(Vn){dn(Vn,null)}else Ye.push(fo(gi,{size:jn},dn))}else dn(Tn(14,"unknown compression type "+Qn,1),null);else dn(null,null)},It=0;It<Mi;++It)Qe(It)}else Dn(null,{});return Be}function lr(oe,ae){for(var ee={},Ye=oe.length-22;gn(oe,Ye)!=101010256;--Ye)(!Ye||oe.length-Ye>65558)&&Tn(13);var Be=Gn(oe,Ye+8);if(!Be)return{};var ln=gn(oe,Ye+16),Dn=ln==4294967295||Be==65535;if(Dn){var Zn=gn(oe,Ye-12);Dn=gn(oe,Zn)==101075792,Dn&&(Be=gn(oe,Zn+32),ln=gn(oe,Zn+48))}for(var Li=ae&&ae.filter,Mi=0;Mi<Be;++Mi){var Te=xn(oe,ln,Dn),yi=Te[0],Me=Te[1],an=Te[2],Qe=Te[3],It=Te[4],vn=Te[5],pn=An(oe,vn);ln=It,(!Li||Li({name:Qe,size:Me,originalSize:an,compression:yi}))&&(yi?yi==8?ee[Qe]=Xr(oe.subarray(pn,pn+Me),{out:new Ae(an)}):Tn(14,"unknown compression type "+yi):ee[Qe]=$e(oe,pn,pn+Me))}return ee}},12378:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{$u:function(){return ce},BD:function(){return Ht},E9:function(){return ue},FF:function(){return co},FJ:function(){return pt},Hn:function(){return ct},KX:function(){return Mt},NB:function(){return ve},S0:function(){return Ee},UL:function(){return Wt},Vk:function(){return at},Vm:function(){return De},YI:function(){return ci},ZA:function(){return Ae},Zt:function(){return Ne},al:function(){return Bt},bn:function(){return Lt},bx:function(){return kt},g2:function(){return Pi},h1:function(){return $t},hD:function(){return Oi},l4:function(){return Rt},rU:function(){return ze},s_:function(){return mt},uz:function(){return Je},z6:function(){return qt}}),Bn=Ot.hmd(Bn),function(){var bt;function Br(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Vi(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Br(a)}}function Vr(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var Do=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},bo;if(typeof Object.setPrototypeOf=="function")bo=Object.setPrototypeOf;else{var $o;t:{var Zi={a:!0},wi={};try{wi.__proto__=Zi,$o=wi.a;break t}catch(a){}$o=!1}bo=$o?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var je=bo;function He(a,y){if(a.prototype=Do(y.prototype),a.prototype.constructor=a,je)je(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 Ue=typeof Ot.g!="undefined"&&Ot.g!=null?Ot.g:self,fi=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},Se=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function _i(a,y){if(y){var x=Ue;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&&Se(x,a,{writable:!0,value:y})}}_i("Object.assign",function(a){return a||fi}),_i("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 Un=typeof globalThis=="object"&&globalThis||typeof Ot.g=="object"&&Ot.g.global===Ot.g&&Ot.g||typeof self=="object"&&self.self===self&&self||{};Un.requestAnimationFrame===void 0&&(Un.setImmediate===void 0?Un.requestAnimationFrame=function(a){Un.setTimeout(a,0)}:Un.requestAnimationFrame=Un.setImmediate);function Ai(){}function We(a,y){var x=-1;return function(){var E=this,b=arguments;x!==-1&&Un.clearTimeout(x),x=Ke(function(){x=-1,a.apply(E,b)},y)}}function Ke(a,y){return Un.setTimeout(a,y)}function ui(a){return Un.document.createElement(a)}function he(a){throw Error(a)}function rn(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),he(a)}function Wn(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),he(x+" is not in the range "+y+": "+a)}function pi(a){Un.console&&Un.console.log(a)}function on(a){return typeof a=="object"&&a!==null}function yn(a){return Array.isArray(a)||Un.NodeList&&a instanceof Un.NodeList||Un.HTMLCollection&&a instanceof Un.HTMLCollection}function ii(a){return Array.prototype.slice.call(a)}function hn(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):he("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function An(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):he("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function xn(){var a=Kr.pop();return a===void 0?[]:a}function Nn(a){a.length=0,Kr.push(a)}function ai(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(on(a)&&a.constructor)return ai(a.constructor);return typeof a}function Ki(a){var y=a;return on(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 Ni(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 Ti(a,y,x){Object.defineProperty(Bo.prototype,a,{get:y,set:x})}function en(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 br=Un.navigator!==void 0&&0<Un.navigator.userAgent.indexOf("Trident/7"),cr=Un.navigator!==void 0&&Un.navigator.platform!==void 0&&Un.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Kr=[];Object.freeze([]),Ai.className="Util",Ai.Dx="32ab5ff3b26f42dc0ed90f21472913b5",Ai.adym="gojs.net",Ai.vfo="28e645fdb266",Ai.className="Util";function Ze(a,y,x){ln(this),this.j=a,this.xa=y,this.o=x}Ze.prototype.toString=function(){return"EnumValue."+this.xa};function ni(a,y){return y==null||y===""?null:a[y]}Ue.Object.defineProperties(Ze.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),Ze.className="EnumValue";function Bi(){this.ew=[]}Bi.prototype.toString=function(){return this.ew.join("")},Bi.prototype.add=function(a){a!==""&&this.ew.push(a)},Bi.className="StringBuilder";function Hi(){}Hi.className="PropertyCollection";var vi={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){Un.console&&Un.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 ki(){}ki.prototype.reset=function(){},ki.prototype.next=function(){return!1},ki.prototype.Ad=function(){return!1},ki.prototype.first=function(){return null},ki.prototype.any=function(){return!1},ki.prototype.all=function(){return!0},ki.prototype.each=function(){return this},ki.prototype.map=function(){return this},ki.prototype.filter=function(){return this},ki.prototype.de=function(){},ki.prototype.toString=function(){return"EmptyIterator"},Ue.Object.defineProperties(ki.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),ki.prototype.first=ki.prototype.first,ki.prototype.hasNext=ki.prototype.Ad,ki.prototype.next=ki.prototype.next,ki.prototype.reset=ki.prototype.reset;var er=null;ki.className="EmptyIterator",er=new ki;function lr(a){this.key=-1,this.value=a}lr.prototype.reset=function(){this.key=-1},lr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},lr.prototype.Ad=function(){return this.next()},lr.prototype.first=function(){return this.key=0,this.value},lr.prototype.any=function(a){return this.key=-1,a(this.value)},lr.prototype.all=function(a){return this.key=-1,a(this.value)},lr.prototype.each=function(a){return this.key=-1,a(this.value),this},lr.prototype.map=function(a){return new lr(a(this.value))},lr.prototype.filter=function(a){return a(this.value)?new lr(this.value):er},lr.prototype.de=function(){this.value=null},lr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Ue.Object.defineProperties(lr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),lr.prototype.first=lr.prototype.first,lr.prototype.hasNext=lr.prototype.Ad,lr.prototype.next=lr.prototype.next,lr.prototype.reset=lr.prototype.reset,lr.className="SingletonIterator";function oe(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}oe.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},oe.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},oe.prototype.Ad=function(){return this.next()},oe.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},oe.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},oe.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},oe.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},oe.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 ee,a.s=x,a.xb(),a.iterator},oe.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 ee,a.s=x,a.xb(),a.iterator},oe.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},oe.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Ue.Object.defineProperties(oe.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}}}),oe.prototype.first=oe.prototype.first,oe.prototype.hasNext=oe.prototype.Ad,oe.prototype.next=oe.prototype.next,oe.prototype.reset=oe.prototype.reset,oe.className="ListIterator";function ae(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}ae.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},ae.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)},ae.prototype.Ad=function(){return this.next()},ae.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},ae.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},ae.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},ae.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},ae.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 ee,a.s=x,a.xb(),a.iterator},ae.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 ee,a.s=x,a.xb(),a.iterator},ae.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},ae.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Ue.Object.defineProperties(ae.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),ae.prototype.first=ae.prototype.first,ae.prototype.hasNext=ae.prototype.Ad,ae.prototype.next=ae.prototype.next,ae.prototype.reset=ae.prototype.reset,ae.className="ListIteratorBackwards";function ee(a){ln(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&he("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}bt=ee.prototype,bt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},bt.freeze=function(){return this._isFrozen=!0,this},bt.ka=function(){return this._isFrozen=!1,this},bt.toString=function(){return"List()#"+Zn(this)},bt.add=function(a){return a===null?this:(this._isFrozen&&rn(this,a),this.s.push(a),this.xb(),this)},bt.push=function(a){this.add(a)},bt.addAll=function(a){if(a===null)return this;this._isFrozen&&rn(this);var y=this.s;if(yn(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},bt.clear=function(){this._isFrozen&&rn(this),this.s.length=0,this.xb()},bt.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},bt.has=function(a){return this.contains(a)},bt.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},bt.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Wn(a,"0 <= i < length",ee,"elt:i"),y[a]},bt.get=function(a){return this.M(a)},bt.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Wn(a,"0 <= i < length",ee,"setElt:i"),this._isFrozen&&rn(this,a),x[a]=y},bt.set=function(a,y){this.cd(a,y)},bt.first=function(){var a=this.s;return a.length===0?null:a[0]},bt.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},bt.pop=function(){this._isFrozen&&rn(this);var a=this.s;return 0<a.length?a.pop():null},ee.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},ee.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},ee.prototype.each=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)a(y[E]);return this},ee.prototype.map=function(a){for(var y=new ee,x=[],E=this.s,b=E.length,z=0;z<b;z++)x.push(a(E[z]));return y.s=x,y.xb(),y},ee.prototype.filter=function(a){for(var y=new ee,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},bt=ee.prototype,bt.Gb=function(a,y){0>a&&Wn(a,">= 0",ee,"insertAt:i"),this._isFrozen&&rn(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},bt.remove=function(a){if(a===null)return!1;this._isFrozen&&rn(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)},bt.delete=function(a){return this.remove(a)},bt.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Wn(a,"0 <= i < length",ee,"removeAt:i"),this._isFrozen&&rn(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},bt.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&&rn(this);for(var b=a,z=y+1;z<E;)x[b++]=x[z++];return x.length=E-(y-a+1),this.xb(),this},ee.prototype.copy=function(){var a=new ee,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},bt=ee.prototype,bt.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),E=0;E<y;E++)x[E]=a[E];return x},bt.Iv=function(){for(var a=new Be,y=this.s,x=this.count,E=0;E<x;E++)a.add(y[E]);return a},bt.sort=function(a){return this._isFrozen&&rn(this),this.s.sort(a),this.xb(),this},bt.zi=function(a,y,x){var E=this.s,b=E.length;y===void 0&&(y=0),x===void 0&&(x=b),this._isFrozen&&rn(this);var z=x-y;if(1>=z)return this;if((0>y||y>=b-1)&&Wn(y,"0 <= from < length",ee,"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},bt.reverse=function(){return this._isFrozen&&rn(this),this.s.reverse(),this.xb(),this},Ue.Object.defineProperties(ee.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 er;var a=this.Sa;return a!==null?(a.reset(),a):new oe(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return er;var a=this.Hg;return a!==null?(a.reset(),a):new ae(this)}}}),ee.prototype.reverse=ee.prototype.reverse,ee.prototype.sortRange=ee.prototype.zi,ee.prototype.sort=ee.prototype.sort,ee.prototype.toSet=ee.prototype.Iv,ee.prototype.toArray=ee.prototype.Fa,ee.prototype.removeRange=ee.prototype.removeRange,ee.prototype.removeAt=ee.prototype.mb,ee.prototype.delete=ee.prototype.delete,ee.prototype.remove=ee.prototype.remove,ee.prototype.insertAt=ee.prototype.Gb,ee.prototype.pop=ee.prototype.pop,ee.prototype.last=ee.prototype.jc,ee.prototype.first=ee.prototype.first,ee.prototype.set=ee.prototype.set,ee.prototype.setElt=ee.prototype.cd,ee.prototype.get=ee.prototype.get,ee.prototype.elt=ee.prototype.M,ee.prototype.indexOf=ee.prototype.indexOf,ee.prototype.has=ee.prototype.has,ee.prototype.contains=ee.prototype.contains,ee.prototype.clear=ee.prototype.clear,ee.prototype.addAll=ee.prototype.addAll,ee.prototype.push=ee.prototype.push,ee.prototype.add=ee.prototype.add,ee.prototype.thaw=ee.prototype.ka,ee.prototype.freeze=ee.prototype.freeze,ee.className="List";function Ye(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Ye.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Ye.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)},Ye.prototype.Ad=function(){return this.next()},Ye.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},Ye.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},Ye.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},Ye.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},Ye.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new ee;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Ye.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new ee;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Ye.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Ye.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Ue.Object.defineProperties(Ye.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Ye.prototype.first=Ye.prototype.first,Ye.prototype.hasNext=Ye.prototype.Ad,Ye.prototype.next=Ye.prototype.next,Ye.prototype.reset=Ye.prototype.reset,Ye.className="SetIterator";function Be(a){ln(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&he("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}bt=Be.prototype,bt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},bt.freeze=function(){return this._isFrozen=!0,this},bt.ka=function(){return this._isFrozen=!1,this},bt.toString=function(){return"Set()#"+Zn(this)},bt.add=function(a){if(a===null)return this;this._isFrozen&&rn(this,a);var y=a;return on(a)&&(y=Dn(a)),this.Tb[y]===void 0&&(this.Sb++,a=new Me(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},bt.addAll=function(a){if(a===null)return this;if(this._isFrozen&&rn(this),yn(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},bt.contains=function(a){if(a===null)return!1;var y=a;return on(a)&&(y=Zn(a),y===void 0)?!1:this.Tb[y]!==void 0},bt.has=function(a){return this.contains(a)},bt.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},bt.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},bt.first=function(){var a=this.ea;return a===null?null:a.value},Be.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Be.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Be.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},Be.prototype.map=function(a){for(var y=new Be,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},Be.prototype.filter=function(a){for(var y=new Be,x=this.ea;x!==null;){var E=x.value;a(E)&&y.add(E),x=x.va}return y},bt=Be.prototype,bt.remove=function(a){if(a===null)return!1;this._isFrozen&&rn(this,a);var y=a;if(on(a)&&(y=Zn(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},bt.delete=function(a){return this.remove(a)},bt.hp=function(a){if(a===null)return this;if(this._isFrozen&&rn(this),yn(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},bt.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&rn(this);var y=new Be;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},bt.clear=function(){this._isFrozen&&rn(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},Be.prototype.copy=function(){var a=new Be,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},Be.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},Be.prototype.Hv=function(){var a=new ee,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function ln(a){a.__gohashid=Li++}function Dn(a){var y=a.__gohashid;return y===void 0&&(y=Li++,a.__gohashid=y),y}function Zn(a){return a.__gohashid}Ue.Object.defineProperties(Be.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return er;var a=this.Sa;return a!==null?(a.reset(),a):new Ye(this)}}}),Be.prototype.toList=Be.prototype.Hv,Be.prototype.toArray=Be.prototype.Fa,Be.prototype.clear=Be.prototype.clear,Be.prototype.retainAll=Be.prototype.pA,Be.prototype.removeAll=Be.prototype.hp,Be.prototype.delete=Be.prototype.delete,Be.prototype.remove=Be.prototype.remove,Be.prototype.first=Be.prototype.first,Be.prototype.containsAny=Be.prototype.Ty,Be.prototype.containsAll=Be.prototype.Sy,Be.prototype.has=Be.prototype.has,Be.prototype.contains=Be.prototype.contains,Be.prototype.addAll=Be.prototype.addAll,Be.prototype.add=Be.prototype.add,Be.prototype.thaw=Be.prototype.ka,Be.prototype.freeze=Be.prototype.freeze;var Li=1;Be.className="Set",Be.uniqueHash=ln,Be.hashIdUnique=Dn,Be.hashId=Zn;function Mi(a){this.ma=a,this.qa=a.Ja,this.sa=null}Mi.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},Mi.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)},Mi.prototype.Ad=function(){return this.next()},Mi.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},Mi.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},Mi.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},Mi.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},Mi.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new ee;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},Mi.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new ee;for(y=y.ea;y!==null;){var E=y.key;a(E)&&x.add(E),y=y.va}return x.iterator},Mi.prototype.de=function(){this.value=this.key=null,this.qa=-1},Mi.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Ue.Object.defineProperties(Mi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Mi.prototype.first=Mi.prototype.first,Mi.prototype.hasNext=Mi.prototype.Ad,Mi.prototype.next=Mi.prototype.next,Mi.prototype.reset=Mi.prototype.reset,Mi.className="MapKeySetIterator";function Te(a){Be.call(this),ln(this),this._isFrozen=!0,this.ma=a}He(Te,Be),bt=Te.prototype,bt.freeze=function(){return this},bt.ka=function(){return this},bt.toString=function(){return"MapKeySet("+this.ma.toString()+")"},bt.add=function(){he("This Set is read-only: "+this.toString())},bt.contains=function(a){return this.ma.contains(a)},bt.has=function(a){return this.contains(a)},bt.remove=function(){he("This Set is read-only: "+this.toString())},bt.delete=function(a){return this.remove(a)},bt.clear=function(){he("This Set is read-only: "+this.toString())},bt.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Te.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Te.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Te.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Te.prototype.map=function(a){for(var y=new Be,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Te.prototype.filter=function(a){for(var y=new Be,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},Te.prototype.copy=function(){return new Te(this.ma)},Te.prototype.Iv=function(){var a=new Be,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Te.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},Te.prototype.Hv=function(){var a=new ee,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Ue.Object.defineProperties(Te.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?er:new Mi(this.ma)}}}),Te.prototype.toList=Te.prototype.Hv,Te.prototype.toArray=Te.prototype.Fa,Te.prototype.toSet=Te.prototype.Iv,Te.prototype.first=Te.prototype.first,Te.prototype.clear=Te.prototype.clear,Te.prototype.delete=Te.prototype.delete,Te.prototype.remove=Te.prototype.remove,Te.prototype.has=Te.prototype.has,Te.prototype.contains=Te.prototype.contains,Te.prototype.add=Te.prototype.add,Te.prototype.thaw=Te.prototype.ka,Te.prototype.freeze=Te.prototype.freeze,Te.className="MapKeySet";function yi(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}yi.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},yi.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)},yi.prototype.Ad=function(){return this.next()},yi.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},yi.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},yi.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},yi.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},yi.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new ee;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},yi.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new ee;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},yi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},yi.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Ue.Object.defineProperties(yi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),yi.prototype.first=yi.prototype.first,yi.prototype.hasNext=yi.prototype.Ad,yi.prototype.next=yi.prototype.next,yi.prototype.reset=yi.prototype.reset,yi.className="MapValueSetIterator";function Me(a,y){this.key=a,this.value=y,this.ll=this.va=null}Me.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Me.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 ee;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 ee;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"},Ue.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 Qe(a){ln(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"&&he("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}bt=Qe.prototype,bt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},bt.freeze=function(){return this._isFrozen=!0,this},bt.ka=function(){return this._isFrozen=!1,this},bt.toString=function(){return"Map()#"+Zn(this)},bt.add=function(a,y){this._isFrozen&&rn(this,a);var x=a;on(a)&&(x=Dn(a));var E=this.Tb[x];return E===void 0?(this.Sb++,a=new Me(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},bt.set=function(a,y){return this.add(a,y)},bt.addAll=function(a){if(a===null)return this;if(yn(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 Qe)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},bt.first=function(){return this.ea},Qe.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Qe.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Qe.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},Qe.prototype.map=function(a){for(var y=new Qe,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},Qe.prototype.filter=function(a){for(var y=new Qe,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},bt=Qe.prototype,bt.contains=function(a){var y=a;return on(a)&&(y=Zn(a),y===void 0)?!1:this.Tb[y]!==void 0},bt.has=function(a){return this.contains(a)},bt.I=function(a){var y=a;return on(a)&&(y=Zn(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},bt.get=function(a){return this.I(a)},bt.remove=function(a){if(a===null)return!1;this._isFrozen&&rn(this,a);var y=a;if(on(a)&&(y=Zn(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},bt.delete=function(a){return this.remove(a)},bt.clear=function(){this._isFrozen&&rn(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()},Qe.prototype.copy=function(){var a=new Qe,y=this.Tb,x;for(x in y){var E=y[x];a.add(E.key,E.value)}return a},Qe.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 Me(b.key,b.value),x++}return y},Qe.prototype.Lf=function(){return new Te(this)},Ue.Object.defineProperties(Qe.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return er;var a=this.Sa;return a!==null?(a.reset(),a):new an(this)}},iteratorKeys:{get:function(){return 0>=this.count?er:new Mi(this)}},iteratorValues:{get:function(){if(0>=this.count)return er;var a=this.jf;return a!==null?(a.reset(),a):new yi(this)}}}),Qe.prototype.toKeySet=Qe.prototype.Lf,Qe.prototype.toArray=Qe.prototype.Fa,Qe.prototype.clear=Qe.prototype.clear,Qe.prototype.delete=Qe.prototype.delete,Qe.prototype.remove=Qe.prototype.remove,Qe.prototype.get=Qe.prototype.get,Qe.prototype.getValue=Qe.prototype.I,Qe.prototype.has=Qe.prototype.has,Qe.prototype.contains=Qe.prototype.contains,Qe.prototype.first=Qe.prototype.first,Qe.prototype.addAll=Qe.prototype.addAll,Qe.prototype.set=Qe.prototype.set,Qe.prototype.add=Qe.prototype.add,Qe.prototype.thaw=Qe.prototype.ka,Qe.prototype.freeze=Qe.prototype.freeze,Qe.className="Map";function It(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):he("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var vn,pn,Qn,zn,jn;It.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},It.prototype.h=function(a,y){return this.x=a,this.y=y,this},It.prototype.sg=function(a,y){return this.x=a,this.y=y,this},It.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},It.prototype.copy=function(){var a=new It;return a.x=this.x,a.y=this.y,a},bt=It.prototype,bt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},bt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},bt.freeze=function(){return this._isFrozen=!0,this},bt.ka=function(){return Object.isFrozen(this)&&he("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ge(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 It(x,b)}return new It}function fn(a){return a.x.toString()+" "+a.y.toString()}bt.toString=function(){return"Point("+this.x+","+this.y+")"},bt.D=function(a){return a instanceof It?this.x===a.x&&this.y===a.y:!1},bt.hi=function(a,y){return this.x===a&&this.y===y},bt.Xa=function(a){return xe.B(this.x,a.x)&&xe.B(this.y,a.y)},bt.add=function(a){return this.x+=a.x,this.y+=a.y,this},bt.re=function(a){return this.x-=a.x,this.y-=a.y,this},bt.offset=function(a,y){return this.x+=a,this.y+=y,this},It.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},bt=It.prototype,bt.scale=function(a,y){return this.x*=a,this.y*=y,this},bt.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},bt.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},bt.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},bt.ab=function(a){return Fn(a.x-this.x,a.y-this.y)},bt.direction=function(a,y){return Fn(a-this.x,y-this.y)};function Fn(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}bt.Ry=function(a,y){return xe.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},bt.fA=function(a,y,x,E){return xe.qh(a,y,x,E,this.x,this.y,this),this},bt.gA=function(a,y){return xe.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},bt.uA=function(a,y,x,E){return xe.No(this.x,this.y,a,y,x,E,this),this},bt.vA=function(a,y){return xe.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},bt.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},bt.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},bt.transform=function(a){return a.Ga(this),this};function Sn(a,y){return y.Cd(a),a}function dn(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 gi(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function Vn(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)}bt.w=function(){return isFinite(this.x)&&isFinite(this.y)},It.alloc=function(){var a=qn.pop();return a===void 0?new It:a},It.allocAt=function(a,y){var x=qn.pop();return x===void 0?new It(a,y):(x.x=a,x.y=y,x)},It.free=function(a){qn.push(a)},It.prototype.isReal=It.prototype.w,It.prototype.setSpot=It.prototype.yi,It.prototype.setRectSpot=It.prototype.xi,It.prototype.snapToGridPoint=It.prototype.vA,It.prototype.snapToGrid=It.prototype.uA,It.prototype.projectOntoLineSegmentPoint=It.prototype.gA,It.prototype.projectOntoLineSegment=It.prototype.fA,It.intersectingLineSegments=function(a,y,x,E,b,z,tt,rt){return xe.Rl(a,y,x,E,b,z,tt,rt)},It.prototype.compareWithLineSegmentPoint=It.prototype.Ry,It.compareWithLineSegment=function(a,y,x,E,b,z){return xe.Fl(a,y,x,E,b,z)},It.prototype.direction=It.prototype.direction,It.prototype.directionPoint=It.prototype.ab,It.prototype.normalize=It.prototype.normalize,It.prototype.distanceSquared=It.prototype.zd,It.prototype.distanceSquaredPoint=It.prototype.Bf,It.prototype.scale=It.prototype.scale,It.prototype.rotate=It.prototype.rotate,It.prototype.offset=It.prototype.offset,It.prototype.subtract=It.prototype.re,It.prototype.add=It.prototype.add,It.prototype.equalsApprox=It.prototype.Xa,It.prototype.equalTo=It.prototype.hi,It.prototype.equals=It.prototype.D,It.prototype.set=It.prototype.set,It.prototype.setTo=It.prototype.sg;var qn=[];It.className="Point",It.parse=Ge,It.stringify=fn,It.distanceLineSegmentSquared=dn,It.distanceSquared=gi,It.direction=Vn,It.Origin=vn=new It(0,0).ja(),It.InfiniteTopLeft=pn=new It(-1/0,-1/0).ja(),It.InfiniteBottomRight=Qn=new It(1/0,1/0).ja(),It.SixPoint=zn=new It(6,6).ja(),It.NoPoint=jn=new It(NaN,NaN).ja(),It.parse=Ge,It.stringify=fn,It.distanceLineSegmentSquared=dn,It.distanceSquared=gi,It.direction=Vn;function cn(a,y){a===void 0?this.height=this.width=0:typeof a=="number"&&(0<=a||isNaN(a))&&typeof y=="number"&&(0<=y||isNaN(y))?(this.width=a,this.height=y):he("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var ri,Ui,nr,Ji,fr,dr,Pr;cn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},cn.prototype.h=function(a,y){return this.width=a,this.height=y,this},cn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},cn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},cn.prototype.copy=function(){var a=new cn;return a.width=this.width,a.height=this.height,a},bt=cn.prototype,bt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},bt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},bt.freeze=function(){return this._isFrozen=!0,this},bt.ka=function(){return Object.isFrozen(this)&&he("cannot thaw constant: "+this),this._isFrozen=!1,this};function Gr(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 cn(x,b)}return new cn}function Tr(a){return a.width.toString()+" "+a.height.toString()}bt.toString=function(){return"Size("+this.width+","+this.height+")"},bt.D=function(a){return a instanceof cn?this.width===a.width&&this.height===a.height:!1},bt.hi=function(a,y){return this.width===a&&this.height===y},bt.Xa=function(a){return xe.B(this.width,a.width)&&xe.B(this.height,a.height)},bt.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},bt.w=function(){return isFinite(this.width)&&isFinite(this.height)},cn.alloc=function(){var a=ro.pop();return a===void 0?new cn:a},cn.free=function(a){ro.push(a)},cn.prototype.isReal=cn.prototype.w,cn.prototype.inflate=cn.prototype.Bc,cn.prototype.equalsApprox=cn.prototype.Xa,cn.prototype.equalTo=cn.prototype.hi,cn.prototype.equals=cn.prototype.D,cn.prototype.set=cn.prototype.set,cn.prototype.setTo=cn.prototype.sg;var ro=[];cn.className="Size",cn.parse=Gr,cn.stringify=Tr,cn.ZeroSize=ri=new cn(0,0).ja(),cn.OneSize=Ui=new cn(1,1).ja(),cn.SixSize=nr=new cn(6,6).ja(),cn.EightSize=Ji=new cn(8,8).ja(),cn.TenSize=fr=new cn(10,10).ja(),cn.InfiniteSize=dr=new cn(1/0,1/0).ja(),cn.NoSize=Pr=new cn(NaN,NaN).ja(),cn.parse=Gr,cn.stringify=Tr;function Oe(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 It?(x=a.x,a=a.y,y instanceof It?(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 cn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):he("Incorrect second argument supplied to Rect constructor "+y)):he("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}bt=Oe.prototype,bt.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},bt.h=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this};function gr(a,y,x){a.width=y,a.height=x}bt.sg=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this},bt.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},bt.dd=function(a){return this.x=a.x,this.y=a.y,this},bt.tA=function(a){return this.width=a.width,this.height=a.height,this},Oe.prototype.copy=function(){var a=new Oe;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},bt=Oe.prototype,bt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},bt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},bt.freeze=function(){return this._isFrozen=!0,this},bt.ka=function(){return Object.isFrozen(this)&&he("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++;(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 Oe(x,b,z,tt)}return new Oe}function tr(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}bt.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},bt.D=function(a){return a instanceof Oe?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},bt.hi=function(a,y,x,E){return this.x===a&&this.y===y&&this.width===x&&this.height===E},bt.Xa=function(a){return xe.B(this.x,a.x)&&xe.B(this.y,a.y)&&xe.B(this.width,a.width)&&xe.B(this.height,a.height)};function Ur(a,y){return xe.$(a.x,y.x)&&xe.$(a.y,y.y)&&xe.$(a.width,y.width)&&xe.$(a.height,y.height)}bt.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},bt.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},bt.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},bt.offset=function(a,y){return this.x+=a,this.y+=y,this},bt.Bc=function(a,y){return or(this,y,a,y,a)},bt.Co=function(a){return or(this,a.top,a.right,a.bottom,a.left)},bt.Fv=function(a){return or(this,-a.top,-a.right,-a.bottom,-a.left)},bt.Hz=function(a,y,x,E){return or(this,a,y,x,E)};function or(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}bt.Ex=function(a){return vo(this,a.x,a.y,a.width,a.height)},bt.Uu=function(a,y,x,E){return vo(this,a,y,x,E)};function vo(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}bt.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},bt.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 qr(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))}bt.Ye=function(a){return Nr(this,a.x,a.y,0,0)},bt.ed=function(a){return Nr(this,a.x,a.y,a.width,a.height)},bt.Kv=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),Nr(this,a,y,x,E)};function Nr(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}bt.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 ho(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 ks(a,y,x,E,b,z,tt,rt){return a>tt+b||b>x+a?!1:!(y>rt+z||z>E+y)}bt.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},bt.Mz=function(){return this.width===0&&this.height===0},Oe.alloc=function(){var a=Is.pop();return a===void 0?new Oe:a},Oe.allocAt=function(a,y,x,E){var b=Is.pop();return b===void 0?new Oe(a,y,x,E):b.h(a,y,x,E)},Oe.free=function(a){Is.push(a)},Ue.Object.defineProperties(Oe.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 It(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new cn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new It(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}}}),Oe.prototype.isEmpty=Oe.prototype.Mz,Oe.prototype.isReal=Oe.prototype.w,Oe.intersectsLineSegment=function(a,y,x,E,b,z,tt,rt){return xe.Fx(a,y,x,E,b,z,tt,rt)},Oe.prototype.setSpot=Oe.prototype.yi,Oe.prototype.union=Oe.prototype.Kv,Oe.prototype.unionRect=Oe.prototype.ed,Oe.prototype.unionPoint=Oe.prototype.Ye,Oe.prototype.intersects=Oe.prototype.Vu,Oe.prototype.intersectsRect=Oe.prototype.Yc,Oe.prototype.intersect=Oe.prototype.Uu,Oe.prototype.intersectRect=Oe.prototype.Ex,Oe.prototype.grow=Oe.prototype.Hz,Oe.prototype.subtractMargin=Oe.prototype.Fv,Oe.prototype.addMargin=Oe.prototype.Co,Oe.prototype.inflate=Oe.prototype.Bc,Oe.prototype.offset=Oe.prototype.offset,Oe.prototype.contains=Oe.prototype.contains,Oe.prototype.containsRect=Oe.prototype.Re,Oe.prototype.containsPoint=Oe.prototype.ca,Oe.prototype.equalsApprox=Oe.prototype.Xa,Oe.prototype.equalTo=Oe.prototype.hi,Oe.prototype.equals=Oe.prototype.D,Oe.prototype.setSize=Oe.prototype.tA,Oe.prototype.setPoint=Oe.prototype.dd,Oe.prototype.set=Oe.prototype.set,Oe.prototype.setTo=Oe.prototype.sg;var ls=null,la=null,Is=[];Oe.className="Rect",Oe.parse=Dr,Oe.stringify=tr,Oe.contains=ho,Oe.intersects=ks,Oe.ZeroRect=ls=new Oe(0,0,0,0).ja(),Oe.NoRect=la=new Oe(NaN,NaN,NaN,NaN).ja(),Oe.parse=Dr,Oe.stringify=tr,Oe.contains=ho,Oe.intersects=ks;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):he("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},bt=sr.prototype,bt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},bt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},bt.freeze=function(){return this._isFrozen=!0,this},bt.ka=function(){return Object.isFrozen(this)&&he("cannot thaw constant: "+this),this._isFrozen=!1,this};function Eo(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 os(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}bt.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},bt.D=function(a){return a instanceof sr?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},bt.hi=function(a,y,x,E){return this.top===a&&this.right===y&&this.bottom===x&&this.left===E},bt.Xa=function(a){return xe.B(this.top,a.top)&&xe.B(this.right,a.right)&&xe.B(this.bottom,a.bottom)&&xe.B(this.left,a.left)},bt.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},sr.alloc=function(){var a=ir.pop();return a===void 0?new sr:a},sr.free=function(a){ir.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 Gi=null,Wi=null,ir=[];sr.className="Margin",sr.parse=Eo,sr.stringify=os,sr.ZeroMargin=Gi=new sr(0,0,0,0).ja(),sr.TwoMargin=Wi=new sr(2,2,2,2).ja(),sr.parse=Eo,sr.stringify=os;function Kn(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,kr,xo,Ts,ps,Cr,to,oo,ts,yo,Vo,zo,Io,ys,Wo,Fl,ao,da,_a,hl,Zo,Ta,$a,uA,Ku,ws,Gu,AA,wa,tl,Gs,es,hs,js,Oo,so;Kn.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Kn.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},Kn.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Kn.prototype.copy=function(){var a=new Kn;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},bt=Kn.prototype,bt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},bt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},bt.freeze=function(){return this._isFrozen=!0,this},bt.ka=function(){return Object.isFrozen(this)&&he("cannot thaw constant: "+this),this._isFrozen=!1,this};function mo(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function Xs(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return Ar;if(a==="TopLeft")return kr;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return xo;if(a==="TopRight")return Ts;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return ps;if(a==="Center")return Cr;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return to;if(a==="BottomLeft")return oo;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return ts;if(a==="BottomRight")return yo;if(a==="TopSide")return Vo;if(a==="LeftSide")return zo;if(a==="RightSide")return Io;if(a==="BottomSide")return ys;if(a==="TopBottomSides")return Wo;if(a==="LeftRightSides")return Fl;if(a==="TopLeftSides")return ao;if(a==="TopRightSides")return da;if(a==="BottomLeftSides")return _a;if(a==="BottomRightSides")return hl;if(a==="NotTopSide")return Zo;if(a==="NotLeftSide")return Ta;if(a==="NotRightSide")return $a;if(a==="NotBottomSide")return uA;if(a==="AllSides")return Ku;if(a==="Default")return ws;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 Kn(x,b,z,tt)}return new Kn}function xs(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}bt.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(kr)?"TopLeft":this.D(xo)?"Top":this.D(Ts)?"TopRight":this.D(ps)?"Left":this.D(Cr)?"Center":this.D(to)?"Right":this.D(oo)?"BottomLeft":this.D(ts)?"Bottom":this.D(yo)?"BottomRight":this.D(Vo)?"TopSide":this.D(zo)?"LeftSide":this.D(Io)?"RightSide":this.D(ys)?"BottomSide":this.D(Wo)?"TopBottomSides":this.D(Fl)?"LeftRightSides":this.D(ao)?"TopLeftSides":this.D(da)?"TopRightSides":this.D(_a)?"BottomLeftSides":this.D(hl)?"BottomRightSides":this.D(Zo)?"NotTopSide":this.D(Ta)?"NotLeftSide":this.D($a)?"NotRightSide":this.D(uA)?"NotBottomSide":this.D(Ku)?"AllSides":this.D(ws)?"Default":"None"},bt.D=function(a){return a instanceof Kn?(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},bt.gv=function(){return new Kn(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},bt.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Gu))a=zo;else if(a.D(AA))a=Io;else if(a.D(wa))a=Vo;else if(a.D(tl))a=ys;else return!1;return a=a.offsetY,(this.offsetY&a)===a},bt.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},bt.Mc=function(){return isNaN(this.x)||isNaN(this.y)},bt.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},bt.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},bt.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},Kn.alloc=function(){var a=ss.pop();return a===void 0?new Kn:a},Kn.free=function(a){ss.push(a)},Kn.prototype.isDefault=Kn.prototype.Xb,Kn.prototype.isNone=Kn.prototype.ys,Kn.prototype.isSide=Kn.prototype.$c,Kn.prototype.isNoSpot=Kn.prototype.Mc,Kn.prototype.isSpot=Kn.prototype.sb,Kn.prototype.includesSide=Kn.prototype.Hf,Kn.prototype.opposite=Kn.prototype.gv,Kn.prototype.equals=Kn.prototype.D,Kn.prototype.set=Kn.prototype.set,Kn.prototype.setTo=Kn.prototype.sg;var ss=[];Kn.className="Spot",Kn.parse=Xs,Kn.stringify=xs,Kn.None=Ar=mo(new Kn(0,0,0,0),0).ja(),Kn.Default=ws=mo(new Kn(0,0,-1,0),-1).ja(),Kn.TopLeft=kr=new Kn(0,0,0,0).ja(),Kn.TopCenter=xo=new Kn(.5,0,0,0).ja(),Kn.TopRight=Ts=new Kn(1,0,0,0).ja(),Kn.LeftCenter=ps=new Kn(0,.5,0,0).ja(),Kn.Center=Cr=new Kn(.5,.5,0,0).ja(),Kn.RightCenter=to=new Kn(1,.5,0,0).ja(),Kn.BottomLeft=oo=new Kn(0,1,0,0).ja(),Kn.BottomCenter=ts=new Kn(.5,1,0,0).ja(),Kn.BottomRight=yo=new Kn(1,1,0,0).ja(),Kn.MiddleTop=Gs=xo,Kn.MiddleLeft=es=ps,Kn.MiddleRight=hs=to,Kn.MiddleBottom=js=ts,Kn.Top=wa=xo,Kn.Left=Gu=ps,Kn.Right=AA=to,Kn.Bottom=tl=ts,Kn.TopSide=Vo=mo(new Kn(0,0,1,1),1).ja(),Kn.LeftSide=zo=mo(new Kn(0,0,1,2),1).ja(),Kn.RightSide=Io=mo(new Kn(0,0,1,4),1).ja(),Kn.BottomSide=ys=mo(new Kn(0,0,1,8),1).ja(),Kn.TopBottomSides=Wo=mo(new Kn(0,0,1,9),1).ja(),Kn.LeftRightSides=Fl=mo(new Kn(0,0,1,6),1).ja(),Kn.TopLeftSides=ao=mo(new Kn(0,0,1,3),1).ja(),Kn.TopRightSides=da=mo(new Kn(0,0,1,5),1).ja(),Kn.BottomLeftSides=_a=mo(new Kn(0,0,1,10),1).ja(),Kn.BottomRightSides=hl=mo(new Kn(0,0,1,12),1).ja(),Kn.NotTopSide=Zo=mo(new Kn(0,0,1,14),1).ja(),Kn.NotLeftSide=Ta=mo(new Kn(0,0,1,13),1).ja(),Kn.NotRightSide=$a=mo(new Kn(0,0,1,11),1).ja(),Kn.NotBottomSide=uA=mo(new Kn(0,0,1,7),1).ja(),Kn.AllSides=Ku=mo(new Kn(0,0,1,15),1).ja(),Oo=new Kn(.156,.156).ja(),so=new Kn(.844,.844).ja(),Kn.parse=Xs,Kn.stringify=xs;function $i(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}$i.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},$i.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},$i.prototype.copy=function(){var a=new $i;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},$i.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},$i.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},$i.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},$i.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},$i.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},$i.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},$i.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},$i.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},bt=$i.prototype,bt.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},bt.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},bt.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)},bt.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))},bt.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))},bt.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,Et=E*z+x*rt+lt,Tt=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,Et),ft=Math.max(ft,Et),Et=Math.min(yt,Tt),yt=Math.max(yt,Tt),b=Math.min(b,x),ft=Math.max(ft,x),Et=Math.min(Et,y),yt=Math.max(yt,y),b=Math.min(b,z),ft=Math.max(ft,z),Et=Math.min(Et,E),yt=Math.max(yt,E),a.h(b,Et,ft-b,yt-Et),a},$i.alloc=function(){var a=cl.pop();return a===void 0?new $i:a},$i.free=function(a){cl.push(a)},$i.prototype.transformRect=$i.prototype.pp,$i.prototype.transformPoint=$i.prototype.Ga,$i.prototype.scale=$i.prototype.scale,$i.prototype.translate=$i.prototype.translate,$i.prototype.rotate=$i.prototype.rotate,$i.prototype.invert=$i.prototype.Vj,$i.prototype.multiplyInverted=$i.prototype.bv,$i.prototype.multiply=$i.prototype.multiply,$i.prototype.reset=$i.prototype.reset,$i.prototype.isIdentity=$i.prototype.ws,$i.prototype.equals=$i.prototype.D,$i.prototype.setTransform=$i.prototype.setTransform,$i.prototype.set=$i.prototype.set;var cl=[];$i.className="Transform",$i.xF="54a702f3e53909c447824c6706603faf4c";var xe={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=xe.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);xe.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(xe.Yb(a,y,tt,rt,ft,x,E)&&xe.Yb(a,y,tt,rt,ft,b,z))return xe.Yb(a,y,tt,rt,ft,lt,ut);var yt=(a+x)/2,Et=(y+E)/2,Tt=(x+b)/2,Dt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(yt+Tt)/2,x=(Et+Dt)/2,Tt=(Tt+b)/2,Dt=(Dt+z)/2;var Xt=(E+Tt)/2,jt=(x+Dt)/2;return xe.cs(a,y,yt,Et,E,x,Xt,jt,ot,lt,ut,ft)||xe.cs(Xt,jt,Tt,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 Vn(((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(xe.Yb(a,y,tt,rt,ot,x,E)&&xe.Yb(a,y,tt,rt,ot,b,z))Nr(lt,a,y,0,0),Nr(lt,tt,rt,0,0);else{var ut=(a+x)/2,ft=(y+E)/2,yt=(x+b)/2,Et=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(ut+yt)/2,x=(ft+Et)/2,yt=(yt+b)/2,Et=(Et+z)/2;var Tt=(E+yt)/2,Dt=(x+Et)/2;xe.Dl(a,y,ut,ft,E,x,Tt,Dt,ot,lt),xe.Dl(Tt,Dt,yt,Et,b,z,tt,rt,ot,lt)}return lt},Qe:function(a,y,x,E,b,z,tt,rt,ot,lt){if(xe.Yb(a,y,tt,rt,ot,x,E)&&xe.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,Et=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(ut+yt)/2,x=(ft+Et)/2,yt=(yt+b)/2,Et=(Et+z)/2;var Tt=(E+yt)/2,Dt=(x+Et)/2;xe.Qe(a,y,ut,ft,E,x,Tt,Dt,ot,lt),xe.Qe(Tt,Dt,yt,Et,b,z,tt,rt,ot,lt)}return lt},jv:function(a,y,x,E,b,z,tt,rt,ot,lt){if(xe.Yb(a,y,b,z,lt,x,E))return xe.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,Et=(ft+E)/2;return xe.jv(a,y,ut,ft,yt,Et,tt,rt,ot,lt)||xe.jv(yt,Et,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(xe.Yb(a,y,b,z,tt,x,E))Nr(rt,a,y,0,0),Nr(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;xe.iv(a,y,ot,lt,ut,ft,tt,rt),xe.iv(ut,ft,x,E,b,z,tt,rt)}return rt},ep:function(a,y,x,E,b,z,tt,rt){if(xe.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;xe.ep(a,y,ot,lt,ut,ft,tt,rt),xe.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,Et){if(xe.Yb(a,y,tt,rt,yt,x,E)&&xe.Yb(a,y,tt,rt,yt,b,z))return!xe.Rl(a,y,tt,rt,ot,lt,ut,ft)||(yt=(a-tt)*(lt-ft)-(y-rt)*(ot-ut),yt===0)?!1:(Et.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 Tt=(a+x)/2,Dt=(y+E)/2,Xt=(x+b)/2,jt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(Tt+Xt)/2,x=(Dt+jt)/2,Xt=(Xt+b)/2,jt=(jt+z)/2;var ie=(E+Xt)/2,le=(x+jt)/2,fe=1/0,ye=!1,_e=0,Xn=0;return xe.Eo(a,y,Tt,Dt,E,x,ie,le,ot,lt,ut,ft,yt,Et)&&(a=(Et.x-ot)*(Et.x-ot)+(Et.y-lt)*(Et.y-lt),a<fe&&(fe=a,ye=!0,_e=Et.x,Xn=Et.y)),xe.Eo(ie,le,Xt,jt,b,z,tt,rt,ot,lt,ut,ft,yt,Et)&&(Et.x-ot)*(Et.x-ot)+(Et.y-lt)*(Et.y-lt)<fe&&(ye=!0,_e=Et.x,Xn=Et.y),ye&&(Et.x=_e,Et.y=Xn),ye},Fo:function(a,y,x,E,b,z,tt,rt,ot,lt,ut,ft,yt){var Et=0;if(xe.Yb(a,y,tt,rt,yt,x,E)&&xe.Yb(a,y,tt,rt,yt,b,z)){if(yt=(a-tt)*(lt-ft)-(y-rt)*(ot-ut),yt===0)return Et;var Tt=((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(Tt>=ut)return Et;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 Et}else if(a<tt?(ot=a,a=tt):ot=tt,Tt<ot||Tt>a)return Et;0<yt?Et++:0>yt&&Et--}else{Tt=(a+x)/2,Dt=(y+E)/2;var Xt=(x+b)/2,jt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(Tt+Xt)/2,x=(Dt+jt)/2,Xt=(Xt+b)/2,jt=(jt+z)/2;var ie=(E+Xt)/2,le=(x+jt)/2;Et+=xe.Fo(a,y,Tt,Dt,E,x,ie,le,ot,lt,ut,ft,yt),Et+=xe.Fo(ie,le,Xt,jt,b,z,tt,rt,ot,lt,ut,ft,yt)}return Et},qh:function(a,y,x,E,b,z,tt){return xe.$(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)):xe.$(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 xe.B(a,x)&&xe.B(y,E)?(ot.h(a,y),!1):xe.$(b,tt)?xe.$(a,x)?(xe.qh(a,y,x,E,b,z,ot),!1):xe.qh(a,y,x,E,b,(E-y)/(x-a)*(b-a)+y,ot):(rt=(rt-z)/(tt-b),xe.$(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),xe.$(rt,tt)?(xe.qh(a,y,x,E,b,z,ot),!1):(b=(tt*a-rt*b+z-y)/(tt-rt),xe.$(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)):xe.qh(a,y,x,E,b,tt*(b-a)+y,ot))))},MA:function(a,y,x,E,b){return xe.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(Xt,jt){var ie=(Xt-a)*(Xt-a)+(jt-y)*(jt-y);ie<ft&&(ft=ie,ot.h(Xt,jt))}var ft=1/0;ut(ot.x,ot.y);var yt=0,Et=0,Tt=0,Dt=0;if(b<tt?(yt=b,Et=tt):(yt=tt,Et=b),z<rt?(Tt=b,Dt=tt):(Tt=tt,Dt=b),yt=(Et-yt)/2+lt,lt=(Dt-Tt)/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(xe.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 xe.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)),xe.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)),xe.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 xe.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):!!(ho(a,y,x,E,b,z)||ho(a,y,x,E,tt,rt)||xe.Rl(a,y,ot,y,b,z,tt,rt)||xe.Rl(ot,y,ot,lt,b,z,tt,rt)||xe.Rl(ot,lt,a,lt,b,z,tt,rt)||xe.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>=xe.Fl(a,y,x,E,b,z)*xe.Fl(a,y,x,E,tt,rt)&&0>=xe.Fl(b,z,tt,rt,a,y)*xe.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(xe.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),xe.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 Hi,um:new Hi,Mf:new Hi,Nf:0,vm:100};xe.za=xe.AA;function On(a){ln(this),this.l=2,a===void 0&&(a=On.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===On.o?this.ee=new ee:(On.V===null&&(On.V=new ee().freeze()),this.ee=On.V),this.aq=this.ee.Ja,this.Ip=new Oe().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=kr,this.gg=yo,this.Rk=this.Sk=NaN,this.Uf=Mn}On.prototype.copy=function(){var a=new On;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===On.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},On.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},On.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==On.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},On.prototype.ka=function(){if(Object.isFrozen(this)&&he("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==On.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},On.prototype.Xa=function(a){if(!(a instanceof On))return!1;if(this.type!==a.type)return this.type===On.j&&a.type===On.o?su(this,a):a.type===On.j&&this.type===On.o?su(a,this):!1;if(this.type===On.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 xe.B(this.startX,a.startX)&&xe.B(this.startY,a.startY)&&xe.B(this.endX,a.endX)&&xe.B(this.endY,a.endY)};function su(a,y){return a.type!==On.j||y.type!==On.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&xe.B(a.startX,y.startX)&&xe.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===po&&xe.B(a.endX,y.endX)&&xe.B(a.endY,y.endY))))}On.ia=function(a){return a.toString()},On.prototype.qb=function(a){a.classType===On&&(this.type=a)},On.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case On.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 On.u:var y=new Oe(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 On.F:if(y=new Oe(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 On.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()}},On.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},On.parse=function(a,y){function x(){return Dt>=fe-1?!0:lt[Dt+1].match(ye)!==null}function E(){return Dt++,lt[Dt]}function b(ur){var qi=parseFloat(E()),Jr=parseFloat(E());Xt===Xt.toLowerCase()&&(qi=le.x+qi,Jr=le.y+Jr),ur.h(qi,Jr)}function z(){return b(le),le}function tt(){return b(ie),ie}function rt(){var ur=jt.toLowerCase();return ur!=="c"&&ur!=="s"&&ur!=="q"&&ur!=="t"?le:new It(2*le.x-ie.x,2*le.y-ie.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=xn();for(var ft="",yt=!1,Et=0;Et<ut.length;Et++){var Tt=ut[Et];Tt!=="."||yt?Tt==="."?(ot.push(ft),ft="."):ft+=Tt:(yt=!0,ft+=Tt)}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,Nn(ot)}}var Dt=-1,Xt="",jt="";ot=new It(0,0);var ie=new It(0,0),le=new It(0,0),fe=lt.length;a=Dy(null),yt=ft=ut=!1,Et=!0,Tt=null;for(var ye=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(Dt>=fe-1);)if(jt=Xt,Xt=E(),Xt!=="")switch(Xt.toUpperCase()){case"X":Et=!0,ft=ut=!1;break;case"M":for(Tt=z(),a.mc===null||Et===!0?(Pg(a,Tt.x,Tt.y,ut,!ft,yt),Et=!1):a.moveTo(Tt.x,Tt.y),ot.assign(le);!x();)Tt=z(),a.lineTo(Tt.x,Tt.y);break;case"L":for(;!x();)Tt=z(),a.lineTo(Tt.x,Tt.y);break;case"H":for(;!x();)le=new It((Xt===Xt.toLowerCase()?le.x:0)+parseFloat(E()),le.y),a.lineTo(le.x,le.y);break;case"V":for(;!x();)le=new It(le.x,(Xt===Xt.toLowerCase()?le.y:0)+parseFloat(E())),a.lineTo(le.x,le.y);break;case"C":for(;!x();){Tt=new It,b(Tt);var _e=tt(),Xn=z();yc(a,Tt.x,Tt.y,_e.x,_e.y,Xn.x,Xn.y)}break;case"S":for(;!x();)Tt=rt(),_e=tt(),Xn=z(),yc(a,Tt.x,Tt.y,_e.x,_e.y,Xn.x,Xn.y);break;case"Q":for(;!x();)Tt=tt(),_e=z(),m0(a,Tt.x,Tt.y,_e.x,_e.y);break;case"T":for(;!x();)ie=Tt=rt(),_e=z(),m0(a,Tt.x,Tt.y,_e.x,_e.y);break;case"B":for(;!x();){Tt=parseFloat(E()),_e=parseFloat(E()),Xn=parseFloat(E());var mi=parseFloat(E()),hi=parseFloat(E()),Rn=hi,mn=!1;x()||(Rn=parseFloat(E()),x()||(mn=parseFloat(E())!==0)),Xt===Xt.toLowerCase()&&(Xn+=le.x,mi+=le.y),a.arcTo(Tt,_e,Xn,mi,hi,Rn,mn)}break;case"A":for(;!x();)Tt=Math.abs(parseFloat(E())),_e=Math.abs(parseFloat(E())),Xn=parseFloat(E()),hi=mi=!1,mn=Rn=0,Rn=E(),Rn.length===1?(mi=!!parseFloat(Rn),hi=!!parseFloat(E()),Rn=parseFloat(E())):Rn.length===2?(mi=!!parseFloat(Rn[0]),hi=!!parseFloat(Rn[1]),Rn=parseFloat(E())):(mi=!!parseFloat(Rn[0]),hi=!!parseFloat(Rn[1]),Rn=parseFloat(Rn.slice(2))),mn=parseFloat(E()),Xt===Xt.toLowerCase()&&(Rn=le.x+Rn,mn=le.y+mn),le.h(Rn,mn),Mw(a,Tt,_e,Xn,mi,hi,Rn,mn);break;case"Z":Lw(a),le.assign(ot);break;case"F":for(Tt="",_e=1;lt[Dt+_e];)if(lt[Dt+_e]==="0")yt=!0,_e++;else if(lt[Dt+_e].match(/[Uu]/)!==null)_e++;else if(lt[Dt+_e].match(ye)===null)_e++;else{Tt=lt[Dt+_e];break}Tt.match(/[Mm]/)?ut=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Tt="",_e=1;lt[Dt+_e];)if(lt[Dt+_e].match(/[Ff]/)!==null)_e++;else if(lt[Dt+_e].match(ye)===null)_e++;else{Tt=lt[Dt+_e];break}Tt.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},On.Ha=function(a,y){for(var x=a.length,E=It.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}It.free(E)},On.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===On.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},On.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===On.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),hA(this,a,!1),Nr(a,0,0,0,0),a.freeze()},On.prototype.ix=function(){var a=new Oe;return hA(this,a,!0),a};function hA(a,y,x){switch(a.type){case On.j:case On.u:case On.F:x?y.h(a.od,a.pd,0,0):Nr(y,a.od,a.pd,0,0),Nr(y,a.Dc,a.Ec,0,0);break;case On.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):Nr(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 po:case ms:ot=ft.endX,lt=ft.endY,Nr(y,ot,lt,0,0);break;case Bs:xe.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 Na:xe.iv(ot,lt,ft.point1X,ft.point1Y,ft.endX,ft.endY,.5,y),ot=ft.endX,lt=ft.endY;break;case ns:case nl:var yt=ft.type===ns?xa(ft,z):el(ft,z,ot,lt),Et=yt.length;if(Et===0){ot=ft.type===ns?ft.centerX:ft.endX,lt=ft.type===ns?ft.centerY:ft.endY,Nr(y,ot,lt,0,0);break}ft=null;for(var Tt=0;Tt<Et;Tt++)ft=yt[Tt],xe.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:he("Unknown Segment type: "+ft.type)}}}break;default:he("Unknown Geometry type: "+a.type)}}On.prototype.normalize=function(){this._isFrozen&&rn(this);var a=this.ix();return this.offset(-a.x,-a.y),new It(-a.x,-a.y)},On.prototype.offset=function(a,y){return this._isFrozen&&rn(this),this.transform(1,0,0,1,a,y),this},On.prototype.scale=function(a,y){return this._isFrozen&&rn(this),this.transform(a,0,0,y,0,0),this},On.prototype.rotate=function(a,y,x){this._isFrozen&&rn(this),y===void 0&&(y=0),x===void 0&&(x=0);var E=$i.alloc();return E.reset(),E.rotate(a,y,x),this.transform(E.m11,E.m12,E.m21,E.m22,E.dx,E.dy),$i.free(E),this},bt=On.prototype,bt.transform=function(a,y,x,E,b,z){switch(this.type){case On.j:case On.u:case On.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 On.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,Et=0;Et<yt;Et++){var Tt=ft[Et];switch(Tt.type){case po:case ms:tt=Tt.endX,rt=Tt.endY,Tt.endX=tt*a+rt*x+b,Tt.endY=tt*y+rt*E+z;break;case Bs:tt=Tt.point1X,rt=Tt.point1Y,Tt.point1X=tt*a+rt*x+b,Tt.point1Y=tt*y+rt*E+z,tt=Tt.point2X,rt=Tt.point2Y,Tt.point2X=tt*a+rt*x+b,Tt.point2Y=tt*y+rt*E+z,tt=Tt.endX,rt=Tt.endY,Tt.endX=tt*a+rt*x+b,Tt.endY=tt*y+rt*E+z;break;case Na:tt=Tt.point1X,rt=Tt.point1Y,Tt.point1X=tt*a+rt*x+b,Tt.point1Y=tt*y+rt*E+z,tt=Tt.endX,rt=Tt.endY,Tt.endX=tt*a+rt*x+b,Tt.endY=tt*y+rt*E+z;break;case ns:tt=Tt.centerX,rt=Tt.centerY,Tt.centerX=tt*a+rt*x+b,Tt.centerY=tt*y+rt*E+z,y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),Tt.startAngle+=tt),0>a&&(Tt.startAngle=180-Tt.startAngle,Tt.sweepAngle=-Tt.sweepAngle),0>E&&(Tt.startAngle=-Tt.startAngle,Tt.sweepAngle=-Tt.sweepAngle),Tt.radiusX*=Math.sqrt(a*a+x*x),Tt.radiusY!==void 0&&(Tt.radiusY*=Math.sqrt(y*y+E*E));break;case nl:if(tt=Tt.endX,rt=Tt.endY,Tt.endX=tt*a+rt*x+b,Tt.endY=tt*y+rt*E+z,Tt.radiusX===0||Tt.radiusY===0)break;y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),Tt.xAxisRotation+=tt),0>a&&(Tt.xAxisRotation=180-Tt.xAxisRotation,Tt.isClockwiseArc=!Tt.isClockwiseArc),0>E&&(Tt.xAxisRotation=-Tt.xAxisRotation,Tt.isClockwiseArc=!Tt.isClockwiseArc),Tt.radiusX*=Math.sqrt(a*a+x*x),Tt.radiusY*=Math.sqrt(y*y+E*E);break;default:he("Unknown Segment type: "+Tt.type)}}}}return this._isInvalidBounds=!0,this},bt.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 On.j:return xe.Yb(x,E,b,z,y,a.x,a.y);case On.u:var tt=Oe.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),Oe.free(tt),a;case On.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 On.o:return as(this,a,y,!0,!1);default:return!1}};function as(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,Et=yt.length,Tt=0;Tt<Et;Tt++){var Dt=yt[Tt],Xt=!Dt.isEvenOdd;if(Dt.isFilled){if(E&&Dt.ca(z,y,x))return!0;var jt=Dt.segments;ot=Dt.startX,lt=Dt.startY;for(var ie=ot,le=lt,fe=jt.s,ye=0;ye<=jt.length;ye++){var _e=void 0;if(ye!==jt.length){_e=fe[ye];var Xn=_e.type;a=_e.endX,ft=_e.endY}else Xn=po,a=ie,ft=le;switch(Xn){case ms:if(ie=dl(z,y,tt,y,ot,lt,ie,le),isNaN(ie))return!0;rt+=ie,ie=a,le=ft;break;case po:if(ot=dl(z,y,tt,y,ot,lt,a,ft),isNaN(ot))return!0;rt+=ot;break;case Bs:ut=xe.Fo(ot,lt,_e.point1X,_e.point1Y,_e.point2X,_e.point2Y,a,ft,tt,y,z,y,.5),rt+=ut;break;case Na:ut=xe.Fo(ot,lt,(ot+2*_e.point1X)/3,(lt+2*_e.point1Y)/3,(2*_e.point1X+a)/3,(2*_e.point1Y+ft)/3,a,ft,tt,y,z,y,.5),rt+=ut;break;case ns:case nl:Xn=_e.type===ns?xa(_e,Dt):el(_e,Dt,ot,lt);var mi=Xn.length;if(mi===0){if(ot=dl(z,y,tt,y,ot,lt,_e.type===ns?_e.centerX:_e.endX,_e.type===ns?_e.centerY:_e.endY),isNaN(ot))return!0;rt+=ot;break}_e=null;for(var hi=0;hi<mi;hi++){if(_e=Xn[hi],hi===0){if(ut=dl(z,y,tt,y,ot,lt,_e[0],_e[1]),isNaN(ut))return!0;rt+=ut}ut=xe.Fo(_e[0],_e[1],_e[2],_e[3],_e[4],_e[5],_e[6],_e[7],tt,y,z,y,.5),rt+=ut}_e!==null&&(a=_e[6],ft=_e[7]);break;default:he("Unknown Segment type: "+_e.type)}ot=a,lt=ft}if(Xt){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 dl(a,y,x,E,b,z,tt,rt){if(xe.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 vu(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}bt.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new It),this.type===On.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},bt.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===On.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},bt.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===On.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},bt.xx=function(a){if(this.type===On.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=It.alloc();return xe.qh(y,x,E,b,z,a,rt),a=rt.x,z=rt.y,It.free(rt),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/tt)}}else if(this.type===On.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=It.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],Et=x[ft],Tt=yt.length,Dt=0;Dt<Tt;Dt+=2){var Xt=yt[Dt],jt=yt[Dt+1];if(Dt!==0){xe.qh(lt,ut,Xt,jt,a.x,a.y,E);var ie=(E.x-a.x)*(E.x-a.x)+(E.y-a.y)*(E.y-a.y);ie<b&&(b=ie,tt=rt,tt+=Math.sqrt((E.x-lt)*(E.x-lt)+(E.y-ut)*(E.y-ut))),rt+=Et[(Dt-2)/2]}lt=Xt,ut=jt}return It.free(E),a=tt/z,0>a?0:1<a?1:a}return 0};function cA(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],E=[],b=[];if(a.type===On.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===On.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===On.F){var z=new Ss;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var tt=new _r(ns);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=xa(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];xe.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(au(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 ms:4<=E.length&&(y.push(E),x.push(au(E))),E=[],E.push(yt.endX),E.push(yt.endY),tt=yt.endX,z=yt.endY,rt=tt,ot=z;break;case po:E.push(yt.endX),E.push(yt.endY),tt=yt.endX,z=yt.endY;break;case Bs:xe.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 Na:xe.ep(tt,z,yt.point1X,yt.point1Y,yt.endX,yt.endY,.5,E),tt=yt.endX,z=yt.endY;break;case ns:var Et=xa(yt,b),Tt=Et.length;if(Tt===0){E.push(yt.centerX),E.push(yt.centerY),tt=yt.centerX,z=yt.centerY;break}for(var Dt=0;Dt<Tt;Dt++){var Xt=Et[Dt];xe.Qe(tt,z,Xt[2],Xt[3],Xt[4],Xt[5],Xt[6],Xt[7],.5,E),tt=Xt[6],z=Xt[7]}break;case nl:if(Et=el(yt,b,tt,z),Tt=Et.length,Dt=yt.endX,Xt=yt.endY,Tt===0){E.push(Dt),E.push(Xt),tt=Dt,z=Xt;break}for(Dt=0;Dt<Tt;Dt++)Xt=Et[Dt],xe.Qe(tt,z,Xt[2],Xt[3],Xt[4],Xt[5],Xt[6],Xt[7],.5,E),tt=Xt[6],z=Xt[7];break;default:he("Segment not of valid type: "+yt.type)}yt.isClosed&&(E.push(rt),E.push(ot))}4<=E.length&&(y.push(E),x.push(au(E)))}}}function au(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(gi(x,E,tt,rt))),x=tt,E=rt}return y}bt.add=function(a){return this.ee.add(a),this},bt.pm=function(a,y,x,E,b,z,tt,rt){return this._isFrozen&&rn(this),this.fg=new Kn(a,y,b,z).freeze(),this.gg=new Kn(x,E,tt,rt).freeze(),this},Ue.Object.defineProperties(On.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 cA(this),this.tk}},flattenedLengths:{get:function(){return cA(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===On.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===On.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&&rn(this,a),this.na=a,a===On.o?this.ee=new ee:(On.V===null&&(On.V=new ee().freeze()),this.ee=On.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&rn(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&rn(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&rn(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&rn(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&rn(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&rn(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&rn(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&rn(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),On.prototype.setSpots=On.prototype.pm,On.prototype.add=On.prototype.add,On.prototype.getFractionForPoint=On.prototype.xx,On.prototype.getPointAndAngleAlongPath=On.prototype.Qu,On.prototype.getAngleAlongPath=On.prototype.wx,On.prototype.getPointAlongPath=On.prototype.Pu,On.prototype.containsPoint=On.prototype.ca,On.prototype.transform=On.prototype.transform,On.prototype.rotate=On.prototype.rotate,On.prototype.scale=On.prototype.scale,On.prototype.offset=On.prototype.offset,On.prototype.normalize=On.prototype.normalize,On.prototype.computeBoundsWithoutOrigin=On.prototype.ix,On.prototype.equalsApprox=On.prototype.Xa,On.className="Geometry",On.j=new Ze(On,"Line",0),On.u=new Ze(On,"Rectangle",1),On.F=new Ze(On,"Ellipse",2),On.o=new Ze(On,"Path",3),On.V=null,On.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",On.className="Geometry",On.stringify=On.ia,On.fillPath=On.nb,On.parse=On.parse,On.Line=On.j,On.Rectangle=On.u,On.Ellipse=On.F,On.Path=On.o;function Ss(a,y,x,E,b){ln(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 ee,this.sr=this.pl.Ja,this.fw=null}Ss.prototype.copy=function(){var a=new Ss;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},bt=Ss.prototype,bt.Xa=function(a){if(!(a instanceof Ss&&xe.B(this.startX,a.startX)&&xe.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},bt.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},bt.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},bt.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},bt.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},bt.add=function(a){return this.pl.add(a),this},bt.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 ms:z=ut.endX,tt=ut.endY,E=ut.endX,b=ut.endY;break;case po:if(xe.Yb(E,b,ut.endX,ut.endY,x,a,y))return!0;E=ut.endX,b=ut.endY;break;case Bs:if(xe.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 Na:if(xe.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 ns:case nl:var ft=ut.type===ns?xa(ut,this):el(ut,this,E,b),yt=ft.length,Et=ut.type===ns?ut.centerX:ut.endX,Tt=ut.type===ns?ut.centerY:ut.endY;if(yt===0){if(xe.Yb(E,b,Et,Tt,x,a,y))return!0;E=Et,b=Tt;break}for(Et=null,Tt=0;Tt<yt;Tt++)if(Et=ft[Tt],Tt===0&&xe.Yb(E,b,Et[0],Et[1],x,a,y)||xe.cs(Et[0],Et[1],Et[2],Et[3],Et[4],Et[5],Et[6],Et[7],.5,a,y,x))return!0;Et!==null&&(E=Et[6],b=Et[7]);break;default:he("Unknown Segment type: "+ut.type)}if(ut.isClosed&&(E!==z||b!==tt)&&xe.Yb(E,b,z,tt,x,a,y))return!0}return!1},Ue.Object.defineProperties(Ss.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&&rn(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&rn(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&rn(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&rn(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&rn(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&rn(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Ss.prototype.add=Ss.prototype.add,Ss.prototype.equalsApprox=Ss.prototype.Xa,Ss.className="PathFigure";function _r(a,y,x,E,b,z,tt,rt){ln(this),a===void 0&&(a=po),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===nl?(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===ns&&(z=Math.max(z,0)),this.Wh=z,typeof tt=="number"?(a===ns&&(tt=Math.max(tt,0)),this.Pg=tt):this.Pg=0),this.ae=null}_r.prototype.copy=function(){var a=new _r;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},bt=_r.prototype,bt.Xa=function(a){if(!(a instanceof _r)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case ms:case po:return xe.B(this.endX,a.endX)&&xe.B(this.endY,a.endY);case Bs:return xe.B(this.endX,a.endX)&&xe.B(this.endY,a.endY)&&xe.B(this.point1X,a.point1X)&&xe.B(this.point1Y,a.point1Y)&&xe.B(this.point2X,a.point2X)&&xe.B(this.point2Y,a.point2Y);case Na:return xe.B(this.endX,a.endX)&&xe.B(this.endY,a.endY)&&xe.B(this.point1X,a.point1X)&&xe.B(this.point1Y,a.point1Y);case ns:return xe.B(this.startAngle,a.startAngle)&&xe.B(this.sweepAngle,a.sweepAngle)&&xe.B(this.centerX,a.centerX)&&xe.B(this.centerY,a.centerY)&&xe.B(this.radiusX,a.radiusX)&&xe.B(this.radiusY,a.radiusY);case nl:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&xe.B(this.xAxisRotation,a.xAxisRotation)&&xe.B(this.endX,a.endX)&&xe.B(this.endY,a.endY)&&xe.B(this.radiusX,a.radiusX)&&xe.B(this.radiusY,a.radiusY);default:return!1}},bt.qb=function(a){a.classType===_r&&(this.type=a)},bt.toString=function(a){switch(a===void 0&&(a=-1),this.type){case ms:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case po:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Bs: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 Na: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 ns: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 nl: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":"")},bt.freeze=function(){return this._isFrozen=!0,this},bt.ka=function(){return this._isFrozen=!1,this},bt.close=function(){return this.isClosed=!0,this};function xa(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=xe.jx(0,0,x<E?x:E,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==E){var tt=$i.alloc();tt.reset(),x<E?tt.scale(1,E/x):tt.scale(x/E,1),On.Ha(z,tt),$i.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 el(a,y,x,E){function b(Dt,Xt,jt,ie){return(Dt*ie<Xt*jt?-1:1)*Math.acos((Dt*jt+Xt*ie)/(Math.sqrt(Dt*Dt+Xt*Xt)*Math.sqrt(jt*jt+ie*ie)))}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),Et=ft*(x-lt)/2+yt*(E-ut)/2;tt=-yt*(x-lt)/2+ft*(E-ut)/2;var Tt=Et*Et/(y*y)+tt*tt/(z*z);return 1<Tt&&(y*=Math.sqrt(Tt),z*=Math.sqrt(Tt)),Tt=(rt===ot?-1:1)*Math.sqrt((y*y*z*z-y*y*tt*tt-z*z*Et*Et)/(y*y*tt*tt+z*z*Et*Et)),isNaN(Tt)&&(Tt=0),rt=Tt*y*tt/z,Tt=Tt*-z*Et/y,isNaN(rt)&&(rt=0),isNaN(Tt)&&(Tt=0),x=(x+lt)/2+ft*rt-yt*Tt,E=(E+ut)/2+yt*rt+ft*Tt,ut=b(1,0,(Et-rt)/y,(tt-Tt)/z),ft=(Et-rt)/y,lt=(tt-Tt)/z,Et=(-Et-rt)/y,rt=(-tt-Tt)/z,tt=b(ft,lt,Et,rt),Et=(ft*Et+lt*rt)/(Math.sqrt(ft*ft+lt*lt)*Math.sqrt(Et*Et+rt*rt)),-1>=Et?tt=Math.PI:1<=Et&&(tt=0),!ot&&0<tt&&(tt-=2*Math.PI),ot&&0>tt&&(tt+=2*Math.PI),ot=y>z?1:y/z,Et=y>z?z/y:1,y=xe.jx(0,0,y>z?y:z,ut,ut+tt,!0),z=$i.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(ot,Et),On.Ha(y,z),$i.free(z),a.ae=y,a.ae}Ue.Object.defineProperties(_r.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&&rn(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&rn(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&rn(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&rn(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&rn(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&rn(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&rn(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&rn(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&rn(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Wn(a,">= zero",_r,"radiusX"),this._isFrozen&&rn(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Wn(a,">= zero",_r,"radiusY"),this._isFrozen&&rn(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&rn(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&&rn(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&&rn(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&&rn(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&&rn(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),_r.prototype.equalsApprox=_r.prototype.Xa;var ms=new Ze(_r,"Move",0),po=new Ze(_r,"Line",1),Bs=new Ze(_r,"Bezier",2),Na=new Ze(_r,"QuadraticBezier",3),ns=new Ze(_r,"Arc",4),nl=new Ze(_r,"SvgArc",4);_r.className="PathSegment",_r.Move=ms,_r.Line=po,_r.Bezier=Bs,_r.QuadraticBezier=Na,_r.Arc=ns,_r.SvgArc=nl;function Vs(){this.H=null,this.xu=new It(0,0).freeze(),this.mt=new It(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}Vs.prototype.copy=function(){var a=new Vs;return this.clone(a)},Vs.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},Vs.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},Vs.prototype.So=function(a,y){var x=this.diagram;return x===null||Yc(x,a,y),y},Vs.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Yc(x,a,y),y.assign(x.Ps(y))),y},Ue.Object.defineProperties(Vs.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}}}),Vs.prototype.getMultiTouchDocumentPoint=Vs.prototype.Bz,Vs.prototype.getMultiTouchViewPoint=Vs.prototype.So,Vs.className="InputEvent";function zu(){this.H=null,this.xa="",this.ar=this.Lr=null}zu.prototype.copy=function(){var a=new zu;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},zu.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},Ue.Object.defineProperties(zu.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}}}),zu.className="DiagramEvent";function Uo(){this.Fm=To,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Uo.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Uo.prototype.copy=function(){var a=new Uo;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=on(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=on(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=on(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=on(y)&&typeof y.J=="function"?y.J():y,a},Uo.prototype.qb=function(a){a.classType===Uo&&(this.change=a)},Uo.prototype.toString=function(){var a="";return a=this.change===ea?a+"* ":this.change===To?a+(this.model!==null?"!m":"!d"):a+((this.model!==null?"!m":"!d")+this.change),this.propertyName&&typeof this.propertyName=="string"&&(a+=" "+this.propertyName),this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange),a+=": ",this.change===ea?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=Ki(this.object)),this.oldValue!==null&&(a+=" old: "+Ki(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+Ki(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Uo.prototype.I=function(a){return a?this.oldValue:this.newValue},Uo.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Uo.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Uo.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Uo.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Uo.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Ue.Object.defineProperties(Uo.prototype,{model:{get:function(){return this.cc},set:function(a){this.cc=a}},diagram:{get:function(){return this.H},set:function(a){this.H=a}},change:{get:function(){return this.Fm},set:function(a){this.Fm=a}},modelChange:{get:function(){return this.Qq},set:function(a){this.Qq=a}},propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},isTransactionFinished:{get:function(){return this.Fm===ea&&(this.rf==="CommittedTransaction"||this.rf==="FinishedUndo"||this.rf==="FinishedRedo")}},object:{get:function(){return this.Qn},set:function(a){this.Qn=a}},oldValue:{get:function(){return this.Sn},set:function(a){this.Sn=a}},oldParam:{get:function(){return this.Rn},set:function(a){this.Rn=a}},newValue:{get:function(){return this.Mn},set:function(a){this.Mn=a}},newParam:{get:function(){return this.Ln},set:function(a){this.Ln=a}}}),Uo.prototype.redo=Uo.prototype.redo,Uo.prototype.canRedo=Uo.prototype.canRedo,Uo.prototype.undo=Uo.prototype.undo,Uo.prototype.canUndo=Uo.prototype.canUndo,Uo.prototype.getParam=Uo.prototype.Dz,Uo.prototype.getValue=Uo.prototype.I,Uo.prototype.clear=Uo.prototype.clear;var ea=new Ze(Uo,"Transaction",-1),To=new Ze(Uo,"Property",0),is=new Ze(Uo,"Insert",1),cs=new Ze(Uo,"Remove",2);Uo.className="ChangedEvent",Uo.Transaction=ea,Uo.Property=To,Uo.Insert=is,Uo.Remove=cs;function Ms(){this.o=new ee().freeze(),this.xa="",this.j=!1}Ms.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},Ms.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()},Ms.prototype.canUndo=function(){return this.isComplete},Ms.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()}},Ms.prototype.canRedo=function(){return this.isComplete},Ms.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()}},Ms.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new Qe,x=0;x<a.count;x++){var E=a.M(x);if(E!==null&&E.change===To&&E.object){var b=y.get(E.object);b||(b=new Qe,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()}},Ue.Object.defineProperties(Ms.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}}}),Ms.prototype.optimize=Ms.prototype.ak,Ms.prototype.redo=Ms.prototype.redo,Ms.prototype.canRedo=Ms.prototype.canRedo,Ms.prototype.undo=Ms.prototype.undo,Ms.prototype.canUndo=Ms.prototype.canUndo,Ms.prototype.clear=Ms.prototype.clear,Ms.className="Transaction";function _o(){this.Pt=new Be,this.Jd=!1,this.u=new ee().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new ee().freeze(),this.hl=new ee,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}_o.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},_o.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},_o.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},bt=_o.prototype,bt.Xw=function(a){this.Pt.add(a)},bt.Rx=function(a){this.Pt.remove(a)},bt.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},bt.eb=function(a){return a===void 0&&(a=""),dA(this,!0,a)},bt.Kf=function(){return dA(this,!1,"")};function dA(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&pi("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}bt.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()}},_o.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},_o.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){pi("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},_o.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},_o.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){pi("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},_o.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var E=new Uo;for(E.change=ea,E.propertyName=a,E.object=x,E.oldValue=y,a=this.models;a.next();)y=a.value,E.model=y,y.ds(E)},_o.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Ms);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||pi("Change not within a transaction: "+x.toString()))}},_o.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},Ue.Object.defineProperties(_o.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}}}),_o.prototype.handleChanged=_o.prototype.Tu,_o.prototype.redo=_o.prototype.redo,_o.prototype.undo=_o.prototype.undo,_o.prototype.canUndo=_o.prototype.canUndo,_o.prototype.discardHistoryAfterIndex=_o.prototype.lx,_o.prototype.rollbackTransaction=_o.prototype.Kf,_o.prototype.commitTransaction=_o.prototype.eb,_o.prototype.startTransaction=_o.prototype.Ea,_o.prototype.removeModel=_o.prototype.Rx,_o.prototype.addModel=_o.prototype.Xw,_o.prototype.clear=_o.prototype.clear,_o.className="UndoManager";function Rr(){ln(this),this.H=Mu,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new Vs,this.Zr=-1}Rr.prototype.toString=function(){return this.name!==""?this.name+" Tool":ai(this.constructor)},Rr.prototype.updateAdornments=function(){},Rr.prototype.canStart=function(){return this.isEnabled},Rr.prototype.doStart=function(){},Rr.prototype.doActivate=function(){this.isActive=!0},Rr.prototype.doDeactivate=function(){this.isActive=!1},Rr.prototype.doStop=function(){},Rr.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Rr.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Rr.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Rr.prototype.doMouseMove=function(){},Rr.prototype.doMouseUp=function(){this.stopTool()},Rr.prototype.doMouseWheel=function(){},Rr.prototype.canStartMultiTouch=function(){return!0},Rr.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,It.allocAt(NaN,NaN)),E=y.So(1,It.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}It.free(x),It.free(E)},Rr.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,It.allocAt(NaN,NaN)),E=y.So(1,It.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 It((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}It.free(x),It.free(E)},Rr.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Rr.prototype.doKeyUp=function(){},Rr.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Rr.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Rr.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(cr?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||(cr?y.meta:y.control)||y.shift||a.clearSelection()}},Rr.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,ju(a,E,x),E.handled};function ju(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)}}}Rr.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}},Rr.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Rr.prototype.doCurrentObjectChanged=function(){},Rr.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===Xl&&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===Xl&&!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)}}},Rr.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Rr.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,E=y.clone(this.yy);this.Zr=Ke(function(){x.doWaitAfter(E)},a)},Rr.prototype.cancelWaitAfter=function(){this.Zr!==-1&&Un.clearTimeout(this.Zr),this.Zr=-1},Rr.prototype.doWaitAfter=function(){},Rr.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof Wr);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},Rr.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},Ue.Object.defineProperties(Rr.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Re&&(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}}}),Rr.prototype.startTransaction=Rr.prototype.Ea,Rr.className="Tool";function Bo(){Rr.call(this),this.name="ToolManager",this.hb=new ee,this.ob=new ee,this.Hb=new ee,this.F=this.V=850,this.o=new cn(2,2).ja(),this.Ha=5e3,this.ia=Xl,this.u=ch,this.Mp=this.j=null,this.zj=-1}He(Bo,Rr),Bo.prototype.initializeStandardTools=function(){},Bo.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Wr&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Bo.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===lu&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===uu){y.bubbles=!0;return}if(this.gestureBehavior===lu)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===Xl?this.mouseWheelBehavior=TA:this.mouseWheelBehavior===TA&&(this.mouseWheelBehavior=Xl)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Bo.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===uu){y.bubbles=!0;return}if(this.gestureBehavior===lu)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)}Bo.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof Wr&&(y===a||y.rg(a))||this.hideToolTip()},Bo.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()))},Bo.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)},Bo.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 Wr)||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()},Bo.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof Wr){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 Bu&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(Un.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var b=this;this.zj=Ke(function(){b.hideToolTip()},a)}},Bo.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}},Bo.prototype.hideToolTip=function(){this.zj!==-1&&(Un.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof Wr?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Bu&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Bo.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()},Bo.prototype.doMouseWheel=function(){this.standardMouseWheel()},Bo.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Bo.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Bo.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},Bo.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},Bo.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)},Ue.Object.defineProperties(Bo.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 Wr?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}}}),Bo.prototype.replaceStandardTool=Bo.prototype.gb;var Xl=new Ze(Bo,"WheelScroll",0),TA=new Ze(Bo,"WheelZoom",1),Hh=new Ze(Bo,"WheelNone",2),ch=new Ze(Bo,"GestureZoom",3),lu=new Ze(Bo,"GestureCancel",4),uu=new Ze(Bo,"GestureNone",5);Bo.className="ToolManager",Bo.WheelScroll=Xl,Bo.WheelZoom=TA,Bo.WheelNone=Hh,Bo.GestureZoom=ch,Bo.GestureCancel=lu,Bo.GestureNone=uu;function Ho(){Rr.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 It(NaN,NaN),this.Fr=new It,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new Be().freeze(),this.ia=new st,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var Ol;He(Ho,Rr),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,(cr?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),Qs=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&&Ma(a),qc(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,Qs=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 _n?(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 fl,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 Ju(vn):this.isGridSnapEnabled?new Ju(new It(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new Ju(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(),yu(this),VA(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<Ol.count){for(var y=Ol,x=y.length,E=0;E<x;E++){var b=y.M(E);Qo(b),wo(b),yu(b),b.diagram.ug()}y.clear()}Qo(this),this.tl.h(NaN,NaN),NA!==null&&(NA.currentCursor=""),Qs=NA=null,wo(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),Yh(a,!0)},Ho.prototype.stopTransaction=function(){var a=this.diagram,y=Rr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function yu(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,Vu(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function fA(){var a=Qs;wo(a),na(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}Ho.prototype.doCancel=function(){wo(this),na(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 wu(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")):na(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 Qe,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 _n&&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 wo(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 _n&&(x.value.point=new It(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function Qo(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 Us(a,y,x){var E=a.diagram,b=a.startPoint,z=It.alloc();z.assign(E.lastInput.documentPoint),a.moveParts(y,z.re(b),x),It.free(z),E.Gf("temporaryPixelRatio")===!0&&E.Yh===null&&30<E.$w&&(Ma(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 na(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 _n&&E.suspendsRouting){var b=x.value.point;a.draggedParts.add(E,a.Pd()),Sc(E,-b.x,-b.y)}y.bd()}}function fa(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),Hl(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=Vu(a,b,E),!a.isActive&&Qs===null)return;var rt=E!==null?E.part:null;if(rt===null||x.handlesDragDropForTopLevelParts&&rt.isTopLevel&&!(rt instanceof hr)){var ot=x.mouseDragOver;ot!==null&&(ot(b),tt=!0)}if(!a.isActive&&Qs===null||(a.doDragOver(y,E),!a.isActive&&Qs===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 Zu(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof Wr||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 Vu(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&&Qs===null||x===null)return E;for(y.handled=!1,b=x;b!==null;)a.Cg.push(b),b=xu(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 xu(a){var y=a.panel;return y!==null?y:a instanceof Ii&&!(a instanceof hr)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function Wu(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=It.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(Cr,a);ot=y.Bf(ot),ot<z&&(tt=rt,z=ot)}}return It.free(a),tt}function Hl(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=Wu(a,x.i(0),!1),z!==null&&(tt=z.part));var rt=null,ot=null;x.toNode===null&&(rt=Wu(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 Au(a,y){var x=a.diagram;a.dragsLink&&Hl(a,!0),yu(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=xu(z)}}else z=x.mouseDrop,z!==null&&z(b);if(a.isActive||Qs!==null){for(b=(a.copiedParts||a.draggedParts).iterator;b.next();)z=b.key,z instanceof ti&&z.linksConnected.each(function(rt){rt.suspendsRouting=!1});if(a.doDropOnto(y,E),a.isActive||Qs!==null){for(a=Oe.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof ti&&$g(x,E,a);Oe.free(a)}}}function qg(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof hr||(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 _n},!0,function(b){return b instanceof _n},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()?(wu(this,!1),qc(a,this.copiedParts),Us(this,this.copiedParts,!1),VA(a,this.copiedParts)):this.mayMove()?(wo(this),Us(this,this.draggedParts,!0)):this.mayDragOut()?(wu(this,!1),Us(this,this.copiedParts,!1)):wo(this),fa(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?(wo(this),wu(this,!0),qc(a,this.copiedParts),Us(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,wo(this),this.mayMove()&&(Us(this,this.draggedParts,!0),fa(this,a.lastInput.documentPoint))),this.Ym=!0,Au(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(Qs===null)return!1;var E=Qs.diagram;x instanceof Re||(x=null);var b=NA;return x!==b&&(b!==null&&b!==E&&(b.ug(),Qs.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&&(Ol.contains(b)||Ol.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(Qs===null)return!1;var E=NA,b=Qs.diagram;if(x===null)return Qs.doCancel(),!0;if(x!==E){var z=E.toolManager.findTool("Dragging");if(E!==null&&E!==b&&z!==null)return E.ug(),Qs.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;NA=x,E=x.toolManager.findTool("Dragging"),E!==null&&(fA(),Ol.contains(E)||Ol.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 It),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=Qs,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 ti&&(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||(cr?!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 Qs},Ho.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=Qs;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},Ho.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Da(a),a.animationManager.Cc(),a=Qs,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},Ho.prototype.doSimulatedDragLeave=function(){var a=Qs;a!==null&&a.doSimulatedDragOut(),this.doCancel()},Ho.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=Qs;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;sg(this,y.draggedParts.Lf(),!1,a.firstInput),Us(this,this.copiedParts,!1),fa(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},Ho.prototype.doSimulatedDrop=function(){var a=this.diagram,y=Qs;if(y!==null){var x=y.diagram;if(y.Ym=!0,wo(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),sg(this,y.draggedParts.Lf(),!0,a.lastInput),Us(this,this.copiedParts,!1);var E=new Be;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0,E.add(b)})),Au(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=Oe.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,Oe.free(z),z=a.Fr,tt=new Qe,rt=It.alloc(),ot=y.iterator;ot.next();)lt=ot.value,lt instanceof _n&<.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()&<.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))));It.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 It},Ue.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 Qs=null,NA=null;Ho.className="DraggingTool",Ol=new ee,Ti("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Bo.prototype.doCancel=function(){Qs!==null&&Qs.doCancel(),Rr.prototype.doCancel.call(this)};function rs(){Rr.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new _n,y=new yr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new yr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new ti,y=new yr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Ui,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new ti,y=new yr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Ui,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 Qe,this.Of=this.gj=this.Pf=null}He(rs,Rr),rs.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},rs.prototype.copyPortProperties=function(a,y,x,E,b){if(a!==null&&y!==null&&x!==null&&E!==null){var z=y.Df(),tt=cn.alloc();tt.width=y.naturalBounds.width*z,tt.height=y.naturalBounds.height*z,E.desiredSize=tt,cn.free(tt),b?(E.toSpot=y.toSpot,E.toEndSegmentLength=y.toEndSegmentLength):(E.fromSpot=y.fromSpot,E.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Cr,z=It.alloc(),x.location=y.ga(Cr,z),It.free(z),E.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,E,b)}},rs.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=Ui,y.fromSpot=Ar,y.toSpot=Ar),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},rs.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},rs.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof ti){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)}},rs.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof ti))return null;for(;a!==null;){var E=y?a.toLinkable:a.fromLinkable;if(E===!0&&(a.portId!==null||a instanceof ti)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(E===!1)break;a=a.panel}return null},rs.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 ti){var ot=tt.ga(Cr,It.alloc()),lt=x.x-ot.x,ut=x.y-ot.y;It.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 ti&&(x.layer===null||x.layer.allowLink))?y:null},rs.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},rs.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},rs.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},rs.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof ti))return!1;a=a.portId,a===null&&(a="");var E=y.part;if(!(E instanceof ti))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},rs.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)},rs.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 Be;return E.add(a),ga(this,x,y,E)};function ga(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),ga(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),ga(a,y.labeledLink,x,E))))}rs.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!Pa(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!Pa(this,a,y,x,!0)}if(E===sc)return a===y?a=!0:(E=new Be,E.add(y),a=Fa(this,E,a,y,x)),!a;if(E===ac)return!Pa(this,a,y,x,!1);if(E===zd)return a===y?a=!0:(E=new Be,E.add(y),a=DA(this,E,a,y,x)),!a}return!0};function Pa(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&&Pa(a,tt,x,E,b)))return!0}return!1}function Fa(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&&Fa(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}Ue.Object.defineProperties(rs.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}}}),rs.className="LinkingBaseTool";function ua(){rs.call(this),this.name="Linking",this.V={},this.F=null,this.K=fh,this.Xd=null}He(ua,rs),ua.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},ua.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 ti)))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},ua.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 ti&&(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 ti&&(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)},ua.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()},ua.prototype.doStop=function(){rs.prototype.doStop.call(this),this.startObject=null},ua.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 ti&&(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)}}},ua.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof _n)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)},ua.prototype.insertLink=function(a,y,x,E){return this.diagram.partManager.insertLink(a,y,x,E)},ua.prototype.doNoLink=function(){},Ue.Object.defineProperties(ua.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 Ze(ua,"Either",0),ag=new Ze(ua,"ForwardsOnly",0),lg=new Ze(ua,"BackwardsOnly",0);ua.className="LinkingTool",ua.Either=fh,ua.ForwardsOnly=ag,ua.BackwardsOnly=lg;function fl(){rs.call(this),this.name="Relinking";var a=new yr;a.figure="Diamond",a.desiredSize=Ji,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new yr,a.figure="Diamond",a.desiredSize=Ji,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new Oe}He(fl,rs),fl.prototype.updateAdornments=function(a){if(a!==null&&a instanceof _n){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)}},fl.prototype.makeAdornment=function(a,y){var x=new Wr;return x.type=En.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},fl.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},fl.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 Wr&&x.adornedPart instanceof _n))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=ri),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=ri),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},fl.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=Va),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}},fl.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()},fl.prototype.doStop=function(){rs.prototype.doStop.call(this),this.handle=null},fl.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 ti&&(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()}}},fl.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},fl.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)}Ue.Object.defineProperties(fl.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 Wr))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),fl.className="RelinkingTool",Ti("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),Ti("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function ds(){Rr.call(this),this.name="LinkReshaping";var a=new yr;a.figure="Rectangle",a.desiredSize=nr,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new yr,a.figure="Diamond",a.desiredSize=Ji,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new It,this.Yq=new ee}He(ds,Rr),ds.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:cf},ds.prototype.om=function(a,y){a.reshapingBehavior=y},ds.prototype.updateAdornments=function(a){if(a!==null&&a instanceof _n){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)}},ds.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,E=y.isOrthogonal,b=null;if(y.points!==null&&1<x){b=new Wr,b.type=En.Link,x=y.firstPickIndex;var z=y.lastPickIndex,tt=E?1:0;if(y.resegmentable&&y.computeCurve()!==Wl)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);xe.B(ot.x,lt.x)&&xe.B(ot.y,lt.y)&&(lt=y.i(x-1)),xe.B(ot.x,lt.x)?(this.om(rt,UA),rt.cursor="n-resize"):xe.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),xe.B(ot.x,lt.x)&&xe.B(ot.y,lt.y)&&(ot=y.i(z+1)),xe.B(ot.x,lt.x)?(this.om(rt,UA),rt.cursor="n-resize"):xe.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},ds.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},ds.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},ds.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},ds.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 _n){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}}},ds.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},ds.prototype.stopTransaction=function(){var a=this.diagram,y=Rr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ds.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},ds.prototype.getResegmentingPoint=function(){return this.handle.ga(Cr)},ds.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},ds.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&&(Su(this,tt,E,b,z,!0)||Su(this,tt,E,b,z,!1))){var rt=y.points.copy();Su(this,tt,E,b,z,!0)?(rt.cd(x-2,new It(tt.x,(z.y+tt.y)/2)),rt.cd(x+1,new It(z.x,(z.y+tt.y)/2))):(rt.cd(x-2,new It((z.x+tt.x)/2,tt.y)),rt.cd(x+1,new It((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&&(Su(this,E,b,z,tt,!0)||Su(this,E,b,z,tt,!1))&&(rt=y.points.copy(),Su(this,E,b,z,tt,!0)?(rt.cd(x-1,new It(E.x,(E.y+tt.y)/2)),rt.cd(x+2,new It(tt.x,(E.y+tt.y)/2))):(rt.cd(x-1,new It((E.x+tt.x)/2,E.y)),rt.cd(x+2,new It((E.x+tt.x)/2,tt.y))),rt.mb(x+1),rt.mb(x),y.points=rt,y.Wb())}}else tt=It.alloc(),xe.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()),It.free(tt)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function Su(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}ds.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);xe.B(z.x,b.x)&&xe.B(b.y,tt.y)?(xe.B(z.x,y.i(E-2).x)&&!xe.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),xe.B(tt.y,y.i(E+2).y)&&!xe.B(tt.x,y.i(E+2).x)?y.m(E+1,tt.x,a.y):y.L(E+1,tt.x,a.y)):xe.B(z.y,b.y)&&xe.B(b.x,tt.x)?(xe.B(z.y,y.i(E-2).y)&&!xe.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),xe.B(tt.x,y.i(E+2).x)&&!xe.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):xe.B(z.x,b.x)&&xe.B(b.x,tt.x)?(xe.B(z.x,y.i(E-2).x)&&!xe.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),xe.B(tt.x,y.i(E+2).x)&&!xe.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):xe.B(z.y,b.y)&&xe.B(b.y,tt.y)&&(xe.B(z.y,y.i(E-2).y)&&!xe.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),xe.B(tt.y,y.i(E+2).y)&&!xe.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(Cr,It.alloc()),E=y.getLinkPointFromPoint(E,b,z,a,!0,It.alloc()),y.L(0,E.x,E.y),It.free(z),It.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(Cr,It.alloc()),a=y.getLinkPointFromPoint(E,b,x,a,!1,It.alloc()),y.L(y.pointsCount-1,a.x,a.y),It.free(x),It.free(a));y.zf()},ds.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 It(y.i(x).x,a.y);case IA:return new It(a.x,y.i(x).y);default:case cf:return y.i(x)}},Ue.Object.defineProperties(ds.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 Wr))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}}}),ds.prototype.setReshapingBehavior=ds.prototype.om,ds.prototype.getReshapingBehavior=ds.prototype.Ru;var cf=new Ze(ds,"None",0),IA=new Ze(ds,"Horizontal",1),UA=new Ze(ds,"Vertical",2),Ed=new Ze(ds,"All",3);ds.className="LinkReshapingTool",ds.None=cf,ds.Horizontal=IA,ds.Vertical=UA,ds.All=Ed,Ti("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function Aa(){Rr.call(this),this.name="Resizing",this.o=new cn(1,1).freeze(),this.j=new cn(9999,9999).freeze(),this.yg=new cn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new yr;a.alignmentFocus=Cr,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 It,this.Dw=new cn,this.Tn=new It,this.rt=new cn(0,0),this.qt=new cn(1/0,1/0),this.pt=new cn(1,1)}He(Aa,Rr),Aa.prototype.updateAdornments=function(a){if(!(a===null||a instanceof _n)){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)}},Aa.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Wr,y.type=En.Spot,y.locationSpot=Cr;var x=new ja;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,kr)),y.add(this.makeHandle(a,Ts)),y.add(this.makeHandle(a,yo)),y.add(this.makeHandle(a,oo)),y.add(this.makeHandle(a,Gs)),y.add(this.makeHandle(a,hs)),y.add(this.makeHandle(a,js)),y.add(this.makeHandle(a,es))}else if(cu(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Aa.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},Aa.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=Cr),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 En)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},Aa.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},Aa.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))},Aa.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},Aa.prototype.stopTransaction=function(){var a=this.diagram,y=Rr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Aa.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Aa.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,It.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),It.free(b)}},Aa.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,It.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),It.free(b),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},Aa.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 hr){var E=new ee;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()}},Aa.prototype.computeResize=function(a,y,x,E,b,z){y.Mc()&&(y=Cr);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=It.alloc(),xe.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))),It.free(yt),a},Aa.prototype.computeReshape=function(){var a=wn;return this.adornedObject instanceof yr&&(a=_m(this.adornedObject)),!(a===Si||this.diagram.lastInput.shift)},Aa.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},Aa.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},Aa.prototype.computeCellSize=function(){var a=new cn(NaN,NaN),y=this.adornedObject.part;return y!==null&&(y=y.resizeCellSize,!isNaN(y.width)&&0<y.width&&(a.width=y.width),!isNaN(y.height)&&0<y.height&&(a.height=y.height)),y=this.cellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height),y=this.diagram,(isNaN(a.width)||isNaN(a.height))&&y&&(y=y.grid,y!==null&&y.visible&&this.isGridSnapEnabled&&(y=y.gridCellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height))),(isNaN(a.width)||a.width===0||a.width===1/0)&&(a.width=1),(isNaN(a.height)||a.height===0||a.height===1/0)&&(a.height=1),a},Ue.Object.defineProperties(Aa.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 Wr))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 Wr)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}}}),Aa.className="ResizingTool",Ti("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Ea(){Rr.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new It,this.ue=null;var a=new yr;a.figure="Ellipse",a.desiredSize=Ji,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new It(NaN,NaN),this.u=0,this.F=50}He(Ea,Rr),Ea.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)}},Ea.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new Wr,y.type=En.Position,y.locationSpot=Cr;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(cu(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Ea.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},Ea.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)},Ea.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(Cr)},Ea.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)},Ea.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new It(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Ea.prototype.stopTransaction=function(){var a=this.diagram,y=Rr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ea.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Ea.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Ea.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()},Ea.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()}},Ea.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},Ue.Object.defineProperties(Ea.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 Wr))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 Wr)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}}}),Ea.className="RotatingTool",Ti("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function gh(){Rr.call(this),this.name="ClickSelecting"}He(gh,Rr),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 Rl(){Rr.call(this),this.name="Action",this.pk=null}He(Rl,Rr),Rl.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},Rl.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()},Rl.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))}},Rl.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()},Rl.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())},Rl.prototype.doStop=function(){this.pk=null},Rl.className="ActionTool";function QA(){Rr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new It(0,0)}He(QA,Rr),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 Ii)x.Zc()&&(cu(x),E=x.copy(),E!==null&&y.add(E));else if(x!==null){var b=y.model.copyNodeData(x);on(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=It.allocAt(a.x,a.y);this.isGridSnapEnabled&&Jc(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),It.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",E)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return E},Ue.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 El(){Rr.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Ii;a.layerName="Tool",a.selectable=!1;var y=new yr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}He(El,Rr),El.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))},El.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},El.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},El.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=cn.alloc().h(y.width,y.height);x.desiredSize=E,this.box.mm(y.x,y.y,!1),cn.free(E),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},El.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()},El.prototype.computeBoxBounds=function(){var a=this.diagram;return new Oe(a.firstInput.documentPoint,a.lastInput.documentPoint)},El.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),cr?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 ee,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)}},Ue.Object.defineProperties(El.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}}}),El.className="DragSelectingTool";function ia(){Rr.call(this),this.name="Panning",this.Xt=new It,this.xy=new It,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(Un.document,"scroll",a.Kw,!1),a.stopTool()}}He(ia,Rr),ia.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())},ia.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(Un.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},ia.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},ia.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},ia.prototype.doMouseMove=function(){this.move()},ia.prototype.doMouseUp=function(){this.move(),this.stopTool()},ia.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)}},Ue.Object.defineProperties(ia.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),ia.className="PanningTool",Ti("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),Ti("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),Ti("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),Ti("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),Ti("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Bu(){this.F=this.u=this.j=this.o=null}Ue.Object.defineProperties(Bu.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}}}),Bu.className="HTMLInfo";function Ll(a,y,x){this.text=a,this.hx=y,this.visible=x}Ll.className="ContextMenuButtonInfo";function La(){Rr.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new It,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}He(La,Rr);function Jl(a){var y=new Bu;y.show=function(b,z,tt){tt.showDefaultContextMenu()},y.hide=function(b,z){z.hideDefaultContextMenu()},HA=y,a.tu=function(){a.stopTool()},y=ui("div");var x=ui("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=ui("style");Un.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",fs,!1),E.addEventListener(y,"selectstart",fs,!1),E.addEventListener(x,"contextmenu",fs,!1)),y.className="goCXforeground",x.className="goCXbackground",Un.document.body&&(Un.document.body.appendChild(y),Un.document.body.appendChild(x)),Oc=y,Rh=x,Qc=!0}function fs(a){return a.preventDefault(),!1}La.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)},La.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},La.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},La.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,E=null;if(a instanceof Re||(a instanceof we?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},La.prototype.doActivate=function(){},La.prototype.doMouseDown=function(){if(Rr.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof Wr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&gl(this)},La.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof Wr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}gl(this)};function gl(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var E=null;x instanceof Bu||(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())}La.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 we?x:null,a.showContextMenu(E,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof Wr&&!a.currentContextMenu.visible&&a.stopTool()}}La.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},La.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof Wr){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 Bu&&a.show(y,x,this);this.currentContextMenu=a},La.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}},La.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof Wr?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Bu&&(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 ee;return y.add(new Ll("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new Ll("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new Ll("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new Ll("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new Ll("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new Ll("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new Ll("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new Ll("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new Ll("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new Ll("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new Ll("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new Ll("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new Ll("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}La.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=ui("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=ui("li"),z.className="goCXli";var tt=ui("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"},La.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}},Ue.Object.defineProperties(La.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof Wr?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Qc===!1&&HA===null&&Yo&&Jl(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;La.className="ContextMenuTool",Ti("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function Lo(){Rr.call(this),this.name="TextEditing",this.Zh=new Po,this.ia=null,this.V=_h,this.vj=null,this.qa=Kh,this.u=1,this.F=!0,this.o=null,this.j=new Bu,this.kt=null,Hc(this,this.j)}He(Lo,Rr);function Hc(a,y){if(Yo){var x=ui("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(pa),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 Po&&z instanceof Lo)if(z.state===Kc)x.style.border="3px solid red",x.focus();else{var tt=E.ga(Cr),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)}}}Lo.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||RA&&RA!==this&&(RA.acceptText(Cu),RA&&RA!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Po&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===_h&&!y.isSelected||this.starting===Md&&2>a.lastInput.clickCount)):!1},Lo.prototype.doStart=function(){RA=this,this.textBlock!==null&&this.doActivate()},Lo.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 Po&&(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 Oe(this.textBlock.ga(kr),this.textBlock.ga(yo));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},Lo.prototype.doCancel=function(){this.stopTool()},Lo.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Lo.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Cu)},Lo.prototype.acceptText=function(a){switch(a){case Cu: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 pa:(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))}}Lo.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)},Lo.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Lo.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)},Lo.prototype.doStop=function(){RA=null},Lo.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)))},Lo.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Ue.Object.defineProperties(Lo.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)}}}),Lo.prototype.measureTemporaryTextBlock=Lo.prototype.Lx;var Ld=new Ze(Lo,"LostFocus",0),Cu=new Ze(Lo,"MouseDown",1),pa=new Ze(Lo,"Tab",2),Rc=new Ze(Lo,"Enter",3),ep=new Ze(Lo,"SingleClick",0),_h=new Ze(Lo,"SingleClickSelected",1),Md=new Ze(Lo,"DoubleClick",2),Kh=new Ze(Lo,"StateNone",0),Gh=new Ze(Lo,"StateActive",1),_c=new Ze(Lo,"StateEditing",2),ff=new Ze(Lo,"StateValidating",3),Kc=new Ze(Lo,"StateInvalid",4),zh=new Ze(Lo,"StateValidated",5),RA=null;Lo.className="TextEditingTool",Lo.LostFocus=Ld,Lo.MouseDown=Cu,Lo.Tab=pa,Lo.Enter=Rc,Lo.SingleClick=ep,Lo.SingleClickSelected=_h,Lo.DoubleClick=Md,Lo.StateNone=Kh,Lo.StateActive=Gh,Lo.StateEditing=_c,Lo.StateValidating=ff,Lo.StateInvalid=Kc,Lo.StateValidated=zh,Ti("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function il(a){vh||(gf(),vh=!0),this.H=Mu,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=Lu,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new Be,this.ce=new ra,this.ce.Yd=this,this.Ei=new Be,this.pu=new Be,this.Sr=new Be,this.pr=new Be,a&&Object.assign(this,a)}il.prototype.Xe=function(a){this.H=a},il.prototype.canStart=function(){return!0};function Pu(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),oa(a.H),a.zb=!0)}function zr(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,E=a.Zd.contains("Model");E&&(a.Ok=!0,a.Pk===Lu?(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===kd&&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!==ca&&E!==null&&(delete E.start.scale,delete E.end.scale),Un.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Ma(x),Ud(x),a.zb=!1,y.start(),y.bc&&(_A(a),x.Ya(),pf(y,0),Da(x,!0),KA(a),x.R("AnimationStarting",a)))}))}}function pA(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function bd(a,y,x,E){a.isTicking||pA(a)||y instanceof _n&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,E,!1)}bt=il.prototype,bt.fv=function(a){return this.ce.fv(a)},bt.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 we&&ot.diagram!==null||ot instanceof Re){rt=!0;break t}}rt=!1}rt?zc(tt,!1):tt.Xk=!0}}b.pu.clear(),b.bc!==!1&&(_A(b),Da(b.H),KA(b)),Un.requestAnimationFrame(x)}}var E=a.Ei,b=a;a.bc?a.Sr.add(y):(a.bc=!0,E.add(y),Un.requestAnimationFrame(function(){x()}))}function Fu(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}bt.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)},bt.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))},bt.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),Ka(this,a))},bt.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),Ka(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 Ka(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 It(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}var y=new Qe;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 It(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 It(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 It(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 It(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 Oe(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)}),Eu=y}Ue.Object.defineProperties(il.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&&Wn(a,">= 1",il,"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}}}),il.prototype.stopAnimation=il.prototype.Cc;var Eu=null,vh=!1,Lu=new Ze(il,"Default",1),Gc=new Ze(il,"AnimateLocations",2),kd=new Ze(il,"None",3);il.className="AnimationManager",il.defineAnimationEffect=function(a,y){vh||(gf(),vh=!0),Eu.add(a,y)},il.Default=Lu,il.AnimateLocations=Gc,il.None=kd;function ra(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=Wh,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=vn,this.vc=new Qe,this.Tt=new Qe,this.yl=new Be,this.Ut=new Be,this.dw=yA,a&&Object.assign(this,a)}ra.prototype.suspend=function(){this.Xk=!0},ra.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),Da(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}bt=ra.prototype,bt.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 Re?a=x:x instanceof we&&(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===Lu&&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)},bt.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},bt.add=function(a,y,x,E,b){if(y==="position"&&x.Xa(E))return this;if(this.H===null&&(a instanceof Re?this.H=a:a instanceof we&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Ii){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 Re&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(BA(E),ip(),E=[bn.j,bn.u,bn.o,bn.F],BA(b),ip(),b=[bn.j,bn.u,bn.o,bn.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 we&&rt instanceof It&&!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 It&&!tt.w()&&tt.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof Ii?rt.Ku.location=wh(y.location):z&&(rt.Ku[x]=wh(E))}function wh(a){return a instanceof It||a instanceof cn?a.copy():a}bt.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},bt.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),Da(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 we&&z.diagram===null)){var tt=E.value,rt=b?tt.end:tt.start;tt=b?tt.start:tt.end;var ot=Eu,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)}}}bt.stop=function(){return this.bc?(this.Ml(!0),this):this},bt.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=Eu;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 Ii&&(tt.location=ut.location),rt.nv&&tt instanceof Ii&&tt.Zb(!1)}if(y.As.clear(),Yh(y,!1),y.Ya(),y.N(),Da(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()}Da(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())}},bt.Cj=function(a,y){var x=y.actualBounds,E=null;if(y instanceof hr&&(E=y.placeholder),E!==null?(x=E.ga(kr),E=E.padding,x.x+=E.left,x.y+=E.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new It(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof hr)for(a=a.memberParts;a.next();)E=a.value,E instanceof ti&&this.Cj(E,y)},bt.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof hr&&(x=y.placeholder),x!==null){var E=x.ga(kr);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 hr)for(a=a.memberParts;a.next();)E=a.value,E instanceof ti&&this.Aj(E,y)}},bt.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Ue.Object.defineProperties(ra.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Wn(a,">= 1",ra,"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:he("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}}}),ra.prototype.getTemporaryState=ra.prototype.Ez,ra.prototype.stop=ra.prototype.stop,ra.prototype.add=ra.prototype.add,ra.prototype.addTemporaryPart=ra.prototype.Iy;function Wh(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}ra.className="Animation",ra.EaseLinear=function(a,y,x,E){return x*a/E+y},ra.EaseInOutQuad=Wh,ra.EaseInQuad=function(a,y,x,E){return x*(a/=E)*a+y},ra.EaseOutQuad=function(a,y,x,E){return-x*(a/=E)*(a-2)+y},ra.EaseInExpo=function(a,y,x,E){return a===0?y:x*Math.pow(2,10*(a/E-1))+y},ra.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 ql(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))}ql.prototype.copy=function(){var a=new ql(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))}Ue.Object.defineProperties(ql.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 Ze(ql,"Default",1),Sh=new Ze(ql,"Immediate",2),Zh=new Ze(ql,"Bundled",3);ql.className="AnimationTrigger",ql.Default=vf,ql.Immediate=Sh,ql.Bundled=Zh;function zs(a){ln(this),this.H=null,this.Pa=new ee,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)}bt=zs.prototype,bt.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,vr(x)}a.clear(),this.Zq.length=0},bt.Xe=function(a){this.H=a},bt.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 hr?b++:ot instanceof ti?E++:ot instanceof _n?z++:ot instanceof Wr?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&&Zn(E)&&(rt+=" #"+Zn(E)),x instanceof ti?rt+=" "+Ki(E):x instanceof _n&&(rt+=" "+Ki(x.fromNode)+" "+Ki(x.toNode));return y+" "+this.Pa.count+": "+rt},bt.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=It.alloc(),z=this.Pa.s,tt=z.length;tt--;){var rt=z[tt];if((E!==!0||od(rt)!==!1)&&rt.isVisible()&&(b.assign(a),Sn(b,rt.oe),rt=rt.ic(b,y,x),rt!==null&&(y!==null&&(rt=y(rt)),rt!==null&&(x===null||x(rt)))))return It.free(b),rt}return It.free(b),null},bt.ji=function(a,y,x,E){if(y===void 0&&(y=null),x===void 0&&(x=null),E instanceof ee||E instanceof Be||(E=new Be),this.Uh===!1)return E;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var z=It.alloc(),tt=this.Pa.s,rt=tt.length;rt--;){var ot=tt[rt];if((b!==!0||od(ot)!==!1)&&ot.isVisible()){z.assign(a),Sn(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 It.free(z),E},bt.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 ee||b instanceof Be||(b=new Be),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},bt.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)&<.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},bt.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 ee||b instanceof Be)&&(z=b),b=!0),z instanceof ee||z instanceof Be||(z=new Be),this.Uh===!1)return z;var tt=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(tt=!0);for(var rt=It.alloc(),ot=It.alloc(),lt=this.Pa.s,ut=lt.length;ut--;){var ft=lt[ut];if((tt!==!0||od(ft)!==!1)&&ft.isVisible()){rt.assign(a),Sn(rt,ft.oe),ot.h(a.x+y,a.y),Sn(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 It.free(rt),It.free(ot),z},bt.Fd=function(a,y){if(this.visible){var x=this.Pa.s,E=x.length;if(E!==0){a=xn();for(var b=xn(),z=0;z<E;z++){var tt=x[z];if(tt.vw=z,tt instanceof _n){if(tt.fd===!1)continue}else if(tt instanceof Wr&&tt.adornedPart!==null)continue;var rt=tt.actualBounds;tt.isVisible()&&qr(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]);Nn(a),Nn(b)}}};function mA(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}bt.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=Oe.alloc(),ot=0;ot<E;ot++)this.Oj(a,x[ot],y,z,tt,rt,!0);if(Oe.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=Oe.alloc(),ut=0;ut<z;ut++){var ft=b[ut];E.contains(ft)&&a.Oj(y,ft,x,rt,ot,lt,!1)}Oe.free(lt),y.globalAlpha=tt}}}bt.Oj=function(a,y,x,E,b,z,tt){if(tt&&!od(y))a.Hs(y);else{if(E!==null&&y instanceof _n&&(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 za?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&&(jo(y,a,y.areaBackground,!0,!0,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.areaBackground===null&&y.background===null&&(jo(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),jo(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))}},bt.g=function(a,y,x,E,b){var z=this.diagram;z!==null&&z.cb(To,a,this,y,x,E,b)},bt.oi=function(a,y,x){var E=this.Pa;if(y.Ig=this,this===null&&vr(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},bt.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,vr(y),a};function Td(a,y,x){if(y=Nd(a,y,x),x instanceof hr&&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}Ue.Object.defineProperties(zs.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===""&&he("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&he("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)&&Wn(a,"0 <= value <= 1",zs,"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))}}}),zs.prototype.findObjectsNear=zs.prototype.og,zs.prototype.findObjectsIn=zs.prototype.Cf,zs.prototype.findObjectsAt=zs.prototype.ji,zs.prototype.findObjectAt=zs.prototype.ic,zs.className="Layer";function Re(a,y){if(xA||(Os(),xA=!0),ln(this),Mu=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,Yo){var x=this,E=function(){x.removeEventListener(Un.document,"DOMContentLoaded",E,!1),x.setRTL()};Un.document.body!==null?this.setRTL():x.addEventListener(Un.document,"DOMContentLoaded",E,!1)}this.ol=null,Gd.add("Model",uo);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===To&&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 Go,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"||Un.Element&&a instanceof Element?Vc(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var zA,Mu;function Ag(a){a.Yd=new il,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new ee,a.pj=new Qe,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new It(NaN,NaN).freeze(),a.du=new It(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new It(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new $i,a.zu=new It(NaN,NaN).freeze(),a.ut=new Oe(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=ca,a.zk=ws,a.Fg=ca,a.pq=ws,a.yt=kr,a.Bt=kr,a.Fc=!0,a.pn=!1,a.De=new Be,a.Eh=new Qe,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 Vs,a.bq.diagram=a,a.Qg=new Vs,a.Qg.diagram=a,a.cj=new Vs,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,pg(a),a.ai=new Be,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 Qe,a.Xn=new ee,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 Be().freeze(),a.Nt=999999999,a.nw=new Be().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 Be,a.ow=new Be,a.Xh=null,a.aw=new cn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new It,bounds:new Oe,Py:new cn,bA:new cn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new Oe(NaN,NaN,NaN,NaN).freeze(),a.wo=new cn(NaN,NaN).freeze(),a.Sp=new Oe(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new Qe;var y=new ti,x=new Po;x.bind(new Fs("text","",Ki)),y.add(x),a.ny=y,a.Lg.add("",y),y=new ti,x=new Po,x.stroke="brown",x.bind(new Fs("text","",Ki)),y.add(x),a.Lg.add("Comment",y),y=new ti,y.selectable=!1,y.avoidable=!1,x=new yr,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new cn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new Qe,y=new hr,y.selectionObjectName="GROUPPANEL",y.type=En.Vertical,x=new Po,x.font="bold 12pt sans-serif",x.bind(new Fs("text","",Ki)),y.add(x),x=new En(En.Auto),x.name="GROUPPANEL";var E=new yr;E.figure="Rectangle",E.fill="rgba(128,128,128,0.2)",E.stroke="black",x.add(E),E=new ja,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 Qe,y=new _n,x=new yr,x.isPanelMain=!0,y.add(x),x=new yr,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new _n,x=new yr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Wr,y.type=En.Auto,x=new yr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new ja,x.margin=new sr(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new Wr,y.type=En.Link,x=new yr,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 uo,a.toolManager=new Bo,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=jn,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 It,a.zy=500,a.wp=new It,a.wq=!1}Re.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Fh=null,WA="",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 Be().freeze(),a.nw=new Be().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(),Kr=[],b!==null&&(a.add(b),a.partManager.parts.remove(b)),E&&(a.skipsUndoManager=x),z}function Id(){return null}Re.prototype.reset=function(){this.clear(),this.vb=!0,Ag(this),$l(this),this.Wg=!0,Qd(this),this.layout=new Go,this.Wg=!1,this.model=Ev(),this.model.undoManager=new _o,this.vb=this.rn=!1,this.N()},Re.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=Un.document.body);var y=ui("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},Re.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=Un.document.body);var y=0;if(Yo){var x=Tf;y=zA,x===null&&(x=Tf=ui("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=zA=ui("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||cr||(y=11)}this.Db=y,this.Gw=!0},Re.prototype.qb=function(a){a.classType===Re&&(this.autoScale=a)},Re.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(Yo){if(y!=null||he("Diagram setup requires an argument DIV."),a.Ka!==null&&he("Diagram has already completed setup."),typeof y=="string"?a.Ka=Un.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:he("No DIV or DIV id supplied: "+y),a.Ka===null&&he("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&he("Invalid div id; div already has a Diagram associated with it."),!a.ol&&Un.ResizeObserver){var x=We(function(){a.$b()},250);a.ol=new Un.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}Un.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=Un.go;var b=new jl(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",Un.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 jl(null),b.width=1,b.height=1,a.jw=b,a.oy=b.context,Yo){b=ui("div");var z=ui("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=We(function(){a.Yh=null,a.N()},300),a.Ov=We(function(){Ud(a)},250),a.preventDefault=function(tt){return tt.preventDefault(),!1},a.$j=function(tt){if(a.isEnabled){var rt=Ml(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(),Kl(rt,tt)}},a.aA=function(tt){a.isEnabled&&(a.Vk=!1,Ml(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():Kl(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=Un.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(),Kl(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=Un.document.elementFromPoint(tt.clientX,tt.clientY)||null;lt!==null&<.shadowRoot!==void 0&<.shadowRoot!==null&&(lt=lt.shadowRoot.elementFromPoint(tt.clientX,tt.clientY)),lt!==null&<.H instanceof Re&<.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(),Kl(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"+hu.slice(1,5)]["b"+Hw.slice(1,y)](E.Z,Xu,y,y),E.Vc(!0),hg(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}Re.prototype.addEventListener=function(a,y,x,E){a.addEventListener(y,x,{capture:E,passive:!1})},Re.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(Un,"resize",a.Ov,!1)}function Ma(a){30<a.Sq&&(a.Yh=1)}function Yh(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),vi&&vi.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}Re.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:Un.devicePixelRatio||1},Re.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},Re.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},Re.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},Re.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},Re.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},Re.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},Re.prototype.doFocus=function(){this.focus()},Re.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=Un.scrollX||Un.pageXOffset,y=Un.scrollY||Un.pageYOffset;this.ta.focus(),Un.scrollTo(a,y)}},Re.prototype.Oy=function(){this.H.R("GainedFocus")},Re.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===ca&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Qd(a){var y=new zs;y.name="Background",a.Al(y),y=new zs,y.name="",a.Al(y),y=new zs,y.name="Foreground",a.Al(y),y=new zs,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new zs,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new zs,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 En(En.Grid);y.name="GRID";var x=new yr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new yr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new yr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new yr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new yr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new yr,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Ii,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)}Re.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,Et=b.height,Tt=b.right,Dt=b.bottom;b=this.scale;var Xt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Xt=Xt+a.scrollWidth-a.clientWidth;break;case"reverse":Xt=a.scrollWidth-Xt-a.clientWidth}var jt=Xt;yt<ot||Et<lt?(Xt=It.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==jt&&(Xt.x=jt/b+tt,this.ju=jt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Xt.y=a.scrollTop/b+rt,this.lu=a.scrollTop),this.position=Xt,It.free(Xt),this.Ee=this.qr=!1):(Xt=It.alloc(),a.uy&&this.allowHorizontalScroll&&(tt<ft&&(this.position=Xt.h(jt+tt,this.position.y)),ut>Tt&&(this.position=Xt.h(-(y.scrollWidth-this.Aa)+jt-this.Aa/b+ut,this.position.y))),a.vy&&this.allowVerticalScroll&&(rt<E&&(this.position=Xt.h(this.position.x,a.scrollTop+rt)),z>Dt&&(this.position=Xt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/b+z))),It.free(Xt),this.vd=!0,this.Ee=this.qr=!1,E=this.documentBounds,b=this.viewportBounds,ut=E.right,Tt=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<=Tt&&(x.style.width="1px"),Et>=lt&&rt>=E&&z<=Dt&&(x.style.height="1px"))}},Re.prototype.computeBounds=function(a){return a===void 0&&(a=new Oe),oa(this),_l(this,a)};function _l(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&<.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}Re.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(yn(a))for(var E=0;E<a.length;E++){var b=a[E];!y&&b instanceof _n||(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 _n||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds));return x===null?new Oe(NaN,NaN,0,0):x};function pl(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=It.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var E=a.viewportBounds;E=Oe.allocAt(0,0,E.width,E.height);var b=It.alloc();b.xi(E,a.initialViewportSpot),b.h(x.x-b.x,x.y-b.y),a.position=b,Oe.free(E),It.free(b),It.free(x)}x=a.yh,y&&a.Fg!==ca&&(x=a.Fg);var z=x!==ca?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()?Cr:ot),yf(a,a.documentBounds,b,tt,rt,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,xe.B(z.x,x)&&xe.B(z.y,E)&&xe.B(z.width,b)&&xe.B(z.height,tt)||a.onViewportBoundsChanged(new Oe(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===rl?(y=Math.min(ot,rt),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===ZA?(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}Re.prototype.zoomToFit=function(){var a=this.sj;this.sj=yA,this.scale=Xh(this,rl),a!==yA&&(pl(this,!1),yf(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},bt=Re.prototype,bt.BA=function(a,y){y===void 0&&(y=rl);var x=a.width,E=a.height;if(!(x===0||E===0||isNaN(x)&&isNaN(E))){var b=1;if(y===rl||y===ZA)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===ZA?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 It(a.x,a.y)}},bt.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new It(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))},bt.zz=function(a){if(a instanceof we){this.eq=a;var y=It.alloc();this.fq=this.op(a.ga(kr,y)),It.free(y)}else this.eq=null,this.fq=jn};function yf(a,y,x,E,b,z){var tt=It.allocAt(a.pa.x,a.pa.y),rt=tt.x,ot=tt.y;if(a.eq!==null){var lt=It.alloc();lt=a.eq.ga(kr,lt),rt=lt.x-a.fq.x/a.scale,ot=lt.y-a.fq.y/a.scale,b=Ar,It.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),$l(a),It.free(tt)}bt.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=Zu(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof Ii)return a}else if(a=Zu(this,a,function(x){return x.part}),a instanceof Ii)return a;return null},bt.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),oa(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 Zu(a,y,x,E){for(x===void 0&&(x=null),E===void 0&&(E=null),oa(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}bt.lz=function(a,y,x){return y===void 0&&(y=!0),Wc(this,a,function(E){return E.part},y?function(E){return E instanceof Ii&&E.canSelect()}:null,x)};function Wc(a,y,x,E,b){for(x===void 0&&(x=null),E===void 0&&(E=null),b instanceof ee||b instanceof Be||(b=new Be),oa(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,E,b)}return b}bt.ji=function(a,y,x,E){y===void 0&&(y=null),x===void 0&&(x=null),E instanceof ee||E instanceof Be||(E=new Be),oa(this);for(var b=this.Wa.iteratorBackwards;b.next();){var z=b.value;z.visible&&z.ji(a,y,x,E)}return E},bt.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 Ii&&(!x||b.canSelect())},y,E)},bt.Cf=function(a,y,x,E,b){y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof ee||b instanceof Be||(b=new Be),oa(this);for(var z=this.Wa.iteratorBackwards;z.next();){var tt=z.value;tt.visible&&tt.Cf(a,y,x,E,b)}return b},bt.Nu=function(a,y,x,E,b,z){var tt=new Be;oa(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 ee||b instanceof Be||(b=new Be),oa(a),a=a.Wa.iteratorBackwards;a.next();){var tt=a.value;tt.visible&&!tt.isTemporary&&tt.Cf(y,z,x,E,b)}return b}bt.mz=function(a,y,x,E,b){return x===void 0&&(x=!0),E===void 0&&(E=!0),Zc(this,a,y,function(z){return z instanceof Ii&&(!E||z.canSelect())},x,b)},bt.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 ee||b instanceof Be)&&(z=b),b=!0),z instanceof ee||z instanceof Be||(z=new Be),oa(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 Zc(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 ee||b instanceof Be)&&(z=b),b=!0),z instanceof ee||z instanceof Be||(z=new Be),oa(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}Re.prototype.acceptEvent=function(a){return Ml(this,a,a instanceof MouseEvent)};function Ml(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),cr&&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,cr&&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 Kl(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}Re.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Ml(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(),Kl(x,a)},Re.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Ml(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(),Kl(x,a)},Re.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Ml(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),Kl(x,a)},Re.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Ml(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),Kl(x,a)},Re.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new It(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?Sn(new It(y,a),this.Ab):new It(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=It.allocAt(tt,rt),a.Ab.Cd(y),x.documentPoint.assign(y),It.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))}}Re.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function Sf(a){a.ld||oa(a),a.Va()}Re.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},bt=Re.prototype,bt.Pz=function(){return this.kg},bt.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Da(this),this.hf=!1,this.du=new It(NaN,NaN),y.isEnabled=x,this.ld=!0;var E=this;a!==null&&Ke(function(){E.ld=!1,Pu(y,"Model"),a(E)},1)},bt.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;Un.requestAnimationFrame(function(){y.kg&&y.bd()})}},bt.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Da(this))};function ha(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||nc(a)||(y&&oa(a),x&&pl(a,!1))}function Da(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];Ps(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),ha(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(bu(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),oa(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,oa(a),a.ou||Sf(a),ha(a,!0,!1),tt=!1,z?(x=Oe.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"),ha(a,!0,!1),Oe.free(x)):x.Ok&&x.Qw&&(a.Fg!==ca?a.scale=Xh(a,a.Fg):a.yh!==ca?a.scale=Xh(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),pl(a,!0)),z&&tt&&a.eb("Initial Layout"),oa(a),y||a.gc(a.ib),b&&(a.skipsUndoManager=E),a.ld=!1}}function Bf(a){if(a.Fg!==ca)a.scale=Xh(a,a.Fg);else if(a.yh!==ca)a.scale=Xh(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}pl(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),bu(a)}function oa(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 Be,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof hr&&E.U&65536&&(E.U=E.U^65536)})}}bt.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof hr||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof hr&&x.isVisible()&&qh(this,x);for(a.reset();a.next();)x=a.value,x instanceof _n&&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 Wr&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function qh(a,y){for(var x=xn(),E=xn(),b=y.memberParts;b.next();){var z=b.value;z.isVisible()&&(z instanceof hr?(yl(z)||Ba(z)||rd(z))&&qh(a,z):z instanceof _n?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(Nn(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();Nn(E)}bt.Fd=function(a,y,x,E){if(this.vd||this.animationManager.isAnimating)for(var b=0;b<y;b++)a[b].Fd(x,E)},bt.gc=function(a){if(this.Ka!==null){if(this.ta===null&&he("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?Gl(this.Yf,this)&&(a=this.Vp()):a=!0,a&&($i.prototype.Cd=$i.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?Gl(this.Yf,this)&&(y=this.Vp()):y=!0,y&&($i.prototype.Cd=$i.prototype.Eu),E?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,E=vi&&vi.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&&he("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 Et=new Oe(z.x,z.y,E.width/b,E.height/b),Tt=Et.copy();Tt.Co(x),bu(a,Tt),oa(a),a.Fd(ft,yt,a,Et),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 Xt=$i.alloc();Xt.reset(),Xt.translate(x.left,x.top),Xt.scale(b),z.x===0&&z.y===0||Xt.translate(-z.x,-z.y),y.setTransform(Xt.m11,Xt.m12,Xt.m21,Xt.m22,Xt.dx,Xt.dy),y.yc(),y instanceof za&&Uf(y,Xt.m11,Xt.m12,Xt.m21,Xt.m22,Xt.dx,Xt.dy),$i.free(Xt),jA(a,y),y.globalAlpha=a.pb;var jt=a.Qj("Grid");if(tt){var ie=new Be,le=tt.iterator;for(le.reset();le.next();){var fe=le.value;fe instanceof Ii&&(lt||fe.layer!==jt)&&(fe.Gj(),ie.add(fe))}for(lt=0;lt<yt;lt++)jc(ft[lt],y,a,ie,ot);ie.each(function(_e){return _e.Gj()})}else for(ie=0;ie<yt;ie++){var ye=ft[ie];ye===jt?lt&&ye.gc(y,a,!0):ye.gc(y,a,ot)}a.$i=!1,a.Yf&&Gl(a.Yf,a)&&a.Vp()}finally{a.Ca=ut,a.ib.Vc(!0),a.vd=!0,a.Fd(ft,yt,a,a.viewportBounds),bu(a),a.ib instanceof za&&(a.ib.Nj.PA(),a.redraw())}}}bt.Gf=function(a){return this.Rg[a]},bt.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},bt.Tx=function(){this.Rg=new Hi,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(cr||br),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))}bt.Ql=function(a){return this.on[a]},bt.sA=function(a,y){this.on[a]=y},bt.Sx=function(){this.on=new Hi,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},bt.set=function(a){return Object.assign(this,a),this},bt.Du=function(a){return this.nm(a)},bt.nm=function(a){return tc(this,a),this};function tc(a,y){var x=a instanceof En,E=a instanceof Re,b;for(b in y){b===""&&he("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])),on(z)?tt=b.substr(rt+1):he("Unable to find object named: "+ot+" in "+a.toString()+" when trying to set property: "+b)}}if(tt[0]!=="_"&&!Ni(z,tt))if(E&&tt==="ModelChanged"){a.Yw(y[tt]);continue}else if(E&&tt==="Changed"){a.Pe(y[tt]);continue}else if(E&&Ni(a.toolManager,tt))z=a.toolManager;else if(E&&bf(a,tt)){a.Bj(tt,y[tt]);continue}else if(a instanceof Ci&&tt==="Changed"){a.Pe(y[tt]);continue}else he('Trying to set undefined property "'+tt+'" on object: '+z.toString());z[tt]=y[b],tt[0]==="_"&&z instanceof we&&z.Vw(tt)}}bt.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new Qe,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},bt.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")},Re.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=Oe.alloc(),Rd(this,this.computeBounds(E)),Oe.free(E)),E=this.ta,E===null||E instanceof va)))){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),Et=Math.floor(rt-ft);a.drawImage(E.Oa,ut,ft,yt,Et,0,0,yt,Et),Gl(this.Yf,this)&&a.clearRect(0,0,ot,lt),E=xn(),a=xn(),Et=Math.abs(z),yt=Math.abs(y);var Tt=ut===0?0:b-Et;ut=It.allocAt(Tt,0),Et=It.allocAt(Et+Tt,rt),a.push(new Oe(Math.min(ut.x,Et.x),Math.min(ut.y,Et.y),Math.abs(ut.x-Et.x),Math.abs(ut.y-Et.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),Sn(ut,Dt),Sn(Et,Dt),E.push(new Oe(Math.min(ut.x,Et.x),Math.min(ut.y,Et.y),Math.abs(ut.x-Et.x),Math.abs(ut.y-Et.y))),Tt=ft===0?0:rt-yt,ut.h(0,Tt),Et.h(b,yt+Tt),a.push(new Oe(Math.min(ut.x,Et.x),Math.min(ut.y,Et.y),Math.abs(ut.x-Et.x),Math.abs(ut.y-Et.y))),Sn(ut,Dt),Sn(Et,Dt),E.push(new Oe(Math.min(ut.x,Et.x),Math.min(ut.y,Et.y),Math.abs(ut.x-Et.x),Math.abs(ut.y-Et.y))),Gl(this.Yf,this)&&(b=0<z?0:-z,rt=0<y?0:-y,ut.h(b,rt),Et.h(ot+b,lt+rt),a.push(new Oe(Math.min(ut.x,Et.x),Math.min(ut.y,Et.y),Math.abs(ut.x-Et.x),Math.abs(ut.y-Et.y))),Sn(ut,Dt),Sn(Et,Dt),E.push(new Oe(Math.min(ut.x,Et.x),Math.min(ut.y,Et.y),Math.abs(ut.x-Et.x),Math.abs(ut.y-Et.y)))),It.free(ut),It.free(Et),ha(this,!1,!0),this.Ka===null&&he("No div specified"),this.ta===null&&he("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=Oe.alloc(),Et=tt.Pa.s,Dt=Et.length,Tt=ot.length;for(var Xt=0;Xt<Dt;Xt++){var jt=Et[Xt],ie=$d(jt,jt.actualBounds);t:{for(var le=2/ut,fe=4/ut,ye=0;ye<Tt;ye++){var _e=ot[ye];if(_e.width!==0&&_e.height!==0&&ie.Vu(_e.x-le,_e.y-le,_e.width+fe,_e.height+fe)){ie=!0;break t}}ie=!1}ie&&tt.Oj(b,jt,this,ft,ut,yt,!0)}Oe.free(yt),b.globalAlpha=lt}b.restore(),b.Vc(!0),this.Yf&&Gl(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}Nn(E),Nn(a),this.ld=!1}}else this.bd();x&&(Ma(this),this.bd(),Yh(this,!0))}else x?(Ma(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){$l(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,Et=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,$l(a)),!a.hf||!a.viewportBounds.w())return!0;var Tt=a.ku,Dt=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var Xt=a.documentBounds,jt=0,ie=0,le=0,fe=0,ye=ut.width,_e=ut.height,Xn=a.rj;a.contentAlignment.sb()?(Xt.width>ye&&(jt=Xn.left,ie=Xn.right),Xt.height>_e&&(le=Xn.top,fe=Xn.bottom)):(jt=Xn.left,ie=Xn.right,le=Xn.top,fe=Xn.bottom);var mi=Xt.width+jt+ie,hi=Xt.height+le+fe;Xn=a.scale;var Rn=mi>ot/Xn,mn=hi>lt/Xn;if(!(z||a.gf||a.Be||Rn||mn))return!0;jt=Xt.x-jt,ot=ut.x,ie=Xt.right+ie,lt=ut.right+tt,le=Xt.y-le;var ur=ut.y;Xt=Xt.bottom+fe,ut=ut.bottom+rt;var qi="1px";if(fe="1px",a.scrollMode===yA&&(Rn||mn)&&(Rn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Rn=1,jt+1<ot&&(Rn=Math.max((ot-jt)*Xn+a.Aa,Rn)),ie>lt+1&&(Rn=Math.max((ie-lt)*Xn+a.Aa,Rn)),ye+tt+1<mi&&(Rn=Math.max((mi-ye)*Xn+a.Aa,Rn)),qi=Rn.toString()+"px"),mn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Rn=1,le+1<ur&&(Rn=Math.max((ur-le)*Xn+a.ya,Rn)),Xt>ut+1&&(Rn=Math.max((Xt-ut)*Xn+a.ya,Rn)),_e+rt+1<hi&&(Rn=Math.max((hi-_e)*Xn+a.ya,Rn)),fe=Rn.toString()+"px")),Rn=qi!=="1px",mn=fe!=="1px",Rn&&mn||!Rn&&!mn||(mn&&(lt-=a.Db),Rn&&(ut-=a.Db),mi<ye+tt||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(tt=1,jt+1<ot&&(tt=Math.max((ot-jt)*Xn+a.Aa,tt)),ie>lt+1&&(tt=Math.max((ie-lt)*Xn+a.Aa,tt)),ye+1<mi&&(tt=Math.max((mi-ye)*Xn+a.Aa,tt)),qi=tt.toString()+"px"),Rn=qi!=="1px",tt=a.ya,Rn!==a.Be&&(tt=Rn?a.ya-a.Db:a.ya+a.Db),hi<_e+rt||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(rt=1,le+1<ur&&(rt=Math.max((ur-le)*Xn+tt,rt)),Xt>ut+1&&(rt=Math.max((Xt-ut)*Xn+tt,rt)),_e+1<hi&&(rt=Math.max((hi-_e)*Xn+tt,rt)),fe=rt.toString()+"px"),mn=fe!=="1px"),a.qr&&Rn===a.Be&&mn===a.gf)return x===a.Aa&&E===a.ya||a.bd(),!1;if(Rn!==a.Be&&(qi==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=Rn,Dt.style.width=qi,mn!==a.gf&&(fe==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(rt=It.alloc(),mn?(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)),It.free(rt))),z&&$l(a),a.gf=mn,Dt.style.height=fe,a.gu=!0,z&&(a.pn=!0),y=Tt.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(ye+1<mi?y=(a.position.x-jt)*Xn:jt+1<ot?y=Tt.scrollWidth-Tt.clientWidth:ie>lt+1&&(y=a.position.x*Xn)),a.tn)switch(a.bu){case"negative":y=-(Tt.scrollWidth-y-Tt.clientWidth);break;case"reverse":y=Tt.scrollWidth-y-Tt.clientWidth}return Tt.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(_e+1<hi?Tt.scrollTop=(a.position.y-le)*Xn:le+1<ur?Tt.scrollTop=Tt.scrollHeight-Tt.clientHeight:Xt>ut+1&&(Tt.scrollTop=a.position.y*Xn)),ot=a.Aa,lt=a.ya,Tt.style.width=ot+(a.gf?a.Db:0)+"px",Tt.style.height=lt+(a.Be?a.Db:0)+"px",x!==ot||E!==lt||a.animationManager.zb?(x=Oe.allocAt(b,ft,yt,Et),a.onViewportBoundsChanged(x,a.viewportBounds,Xn,z),Oe.free(x),!1):!0}bt=Re.prototype,bt.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&he("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&&he('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(is,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},bt.oi=function(a){this.partManager.oi(a);var y=this;Nu(a,function(x){vA(y,x)}),(a instanceof Wr||a instanceof hr&&a.placeholder!==null)&&a.v(),a.data!==null&&Nu(a,function(x){Cv(y.partManager,x)}),Ba(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()},bt.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Nu(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()},bt.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(cs,"parts",E,y,null,x,null),a=y.layerChanged,a!==null&&a(y,E,null))}bt.Is=function(a,y){if(y===void 0&&(y=!1),yn(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 Be,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},bt.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},Re.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 Qe;if(a!==null)if(yn(a))for(var z=0;z<a.length;z++)Yu(this,b,a[z],x,E);else for(a=a.iterator;a.next();)Yu(this,b,a.value,x,E);else{for(a=this.parts;a.next();)Yu(this,b,a.value,x,E);for(a=this.nodes;a.next();)Yu(this,b,a.value,x,E);for(a=this.links;a.next();)Yu(this,b,a.value,x,E)}Bh(this,b,y,E,x)}};function Yu(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 ti){if(y.add(x,a.Pd(b,x,x.location)),x instanceof hr&&(x.placeholder!==null||b.dragsMembers))for(z=x.memberParts;z.next();)Yu(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)&&Yu(a,y,tt,E,b)}}if(b.dragsTree)for(x=x.Ou();x.next();)Yu(a,y,x.value,E,b)}else if(x instanceof _n)for(y.add(x,a.Pd(b,x)),x=x.labelNodes;x.next();)Yu(a,y,x.value,E,b);else x instanceof Wr||y.add(x,a.Pd(b,x,x.location))}function Bh(a,y,x,E,b){if(y!==null&&y.count!==0){var z=It.alloc(),tt=It.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=xn(),ot=xn(),lt=y.iterator,ut=It.alloc();lt.next();){var ft=lt.key,yt=lt.value;if(ft.Zc()){var Et=$c(a,ft,y);Et!==null?rt.push(new it(ft,yt,Et)):(!b||ft.canMove())&&(Et=yt.point,z.assign(Et),a.computeMove(ft,z.add(tt),E,ut),ft.location=ut,yt.shifted===void 0&&(yt.shifted=new It),yt.shifted.assign(ut.re(Et)))}else lt.key instanceof _n&&ot.push(lt.sa)}for(It.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 It),ft.node.location=z.add(ft.Su.shifted);for(b=It.alloc(),lt=It.alloc(),ft=ot.length,yt=0;yt<ft;yt++){var Tt=ot[yt];if(Et=Tt.key,Et instanceof _n)if(Et.suspendsRouting){Et.Tg=null,ut=Et.fromNode;var Dt=Et.toNode;if(a.draggedLink!==null&&E.dragsLink)if(Dt=Tt.value.point,Et.dragComputation===null)y.add(Et,a.Pd(E,Et,tt)),Sc(Et,tt.x-Dt.x,tt.y-Dt.y);else{Tt=It.allocAt(0,0),(ut=Et.i(0))&&ut.w()&&Tt.assign(ut);var Xt=ut=It.alloc().assign(Tt).add(tt);E.isGridSnapEnabled&&(E.isGridSnapRealtime||a.lastInput.up)&&(Xt=It.alloc(),Jc(a,Et,ut,Xt,E)),ut.assign(Et.dragComputation(Et,ut,Xt)).re(Tt),y.add(Et,a.Pd(E,Et,ut)),Sc(Et,ut.x-Dt.x,ut.y-Dt.y),It.free(Tt),It.free(ut),Xt!==ut&&It.free(Xt)}else ut!==null&&(b.assign(ut.location),Xt=y.I(ut),Xt!==null&&b.re(Xt.point)),Dt!==null&&(lt.assign(Dt.location),Xt=y.I(Dt),Xt!==null&<.re(Xt.point)),ut!==null&&Dt!==null?b.Xa(lt)?(ut=Tt.value.point,Dt=z,Dt.assign(b),Dt.re(ut),y.add(Et,a.Pd(E,Et,b)),Sc(Et,Dt.x,Dt.y)):(Et.suspendsRouting=!1,Et.bb()):(Tt=Tt.value.point,ut=ut!==null?b:Dt!==null?lt:tt,y.add(Et,a.Pd(E,Et,ut)),Sc(Et,ut.x-Tt.x,ut.y-Tt.y))}else(Et.fromNode===null||Et.toNode===null)&&(ut=Tt.value.point,y.add(Et,a.Pd(E,Et,tt)),Sc(Et,tt.x-ut.x,tt.y-ut.y))}It.free(z),It.free(tt),It.free(b),It.free(lt),Nn(rt),Nn(ot),x||(oa(a),VA(a,y))}}Re.prototype.computeMove=function(a,y,x,E){if(E===void 0&&(E=new It),E.assign(y),a===null)return E;var b=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(b=It.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&&It.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=It.allocAt(0,0),z.yi(0,0,a,y,b),xe.No(x.x,x.y,rt+z.x,tt+z.y,a,y,E),It.free(z)}}function qc(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof _n&&(y.suspendsRouting=!0)}function VA(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof _n&&(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}bt=Re.prototype,bt.Pd=function(a,y,x){if(x===void 0)return new Ju(vn);var E=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(E=!1),E?new Ju(new It(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new Ju(x.copy())};function Ff(a,y,x){if(y.diagram!==null&&y.diagram!==a&&he("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&he("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&he("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&he("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&&he("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}bt.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(is,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},bt.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(cs,"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(is,"layers",this,null,a,null,z),this.N(),0>E&&this.Ya(),this},bt.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(cs,"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(is,"layers",this,null,a,null,z+1),this.N(),0>E&&this.Ya(),this},bt.kA=function(a){if(a.diagram!==this&&he("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(cs,"layers",this,a,null,x,null),this.N(),this.Ya()}}},bt.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},bt.Yw=function(a){return this.pf===null&&(this.pf=new ee),this.pf.add(a),this.model.Pe(a),this},bt.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},bt.Pe=function(a){return this.zg===null&&(this.zg=new ee),this.zg.add(a),this},bt.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},bt.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==ea&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,E=0;E<x;E++)y.M(E)(a)},bt.cb=function(a,y,x,E,b,z,tt){z===void 0&&(z=null),tt===void 0&&(tt=null);var rt=new Uo;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)},bt.g=function(a,y,x,E,b){this.cb(To,a,this,y,x,E,b)},Re.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===To){var b=a.object;if(Ro(b,a.propertyName,a.I(y)),b instanceof we){var z=b.part;z!==null&&z.Wb()}this.isModified=!0}else if(E===is){var tt=a.object,rt=a.newParam,ot=a.newValue;if(tt instanceof En)if(typeof rt=="number"&&ot instanceof we){y?tt.pc(rt):tt.Gb(rt,ot);var lt=tt.part;lt!==null&<.Wb()}else typeof rt=="number"&&ot instanceof Ns&&(ot.isRow?fy(tt,rt,y?void 0:ot):gy(tt,rt,y?void 0:ot));else if(tt instanceof zs){var ut=a.oldParam===!0;typeof rt=="number"&&ot instanceof Ii&&(y?(ot.isSelected=!1,ot.isHighlighted=!1,ot.Wb(),tt.pc(ut?rt:-1,ot,ut)):tt.oi(rt,ot,ut))}else tt instanceof Re?typeof rt=="number"&&ot instanceof zs&&(y?this.Wa.mb(rt):(ot.Xe(this),this.Wa.Gb(rt,ot))):he("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(E===cs){var ft=a.object,yt=a.oldParam,Et=a.oldValue;if(ft instanceof En)typeof yt=="number"&&Et instanceof we?y?ft.Gb(yt,Et):ft.pc(yt):typeof yt=="number"&&Et instanceof Ns&&(Et.isRow?fy(ft,yt,y?Et:void 0):gy(ft,yt,y?Et:void 0));else if(ft instanceof zs){var Tt=a.newParam===!0;typeof yt=="number"&&Et instanceof Ii&&(y?0>ft.Pa.indexOf(Et)&&ft.oi(yt,Et,Tt):(Et.isSelected=!1,Et.isHighlighted=!1,Et.Wb(),ft.pc(Tt?yt:-1,Et,Tt)))}else ft instanceof Re?typeof yt=="number"&&Et instanceof zs&&(y?(Et.Xe(this),this.Wa.Gb(yt,Et)):this.Wa.mb(yt)):he("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==ea&&he("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},Re.prototype.Ea=function(a){return this.undoManager.Ea(a)},Re.prototype.eb=function(a){return this.undoManager.eb(a)},Re.prototype.Kf=function(){return this.undoManager.Kf()},Re.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}},Re.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},Re.prototype.rp=function(){this.partManager.rp()};function Ef(a,y,x){var E=a.animationManager;if(a.vb||a.ld)a.Ca=x,$l(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,$l(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(zo)?rt=0:lt.Hf(Io)&&(rt=z-1):rt=lt.sb()?lt.x*(z-1):z/2),isNaN(ot)&&(lt.$c()?lt.Hf(Vo)?ot=0:lt.Hf(ys)&&(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=It.allocAt(a.pa.x+rt/y-rt/x,a.pa.y+ot/y-ot/x),a.position=z,It.free(z),a.Ca=x,$l(a),a.vb=!1,a.onViewportBoundsChanged(b,a.viewportBounds,y,!1),pl(a,!1),E.zb&&(pA(E)||E.ce.add(E.H,"scale",y,a.Ca))}}Re.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!==ca||a.width===y.width&&a.height===y.height||b.C(),b=this.currentTool,this.Vk===!0&&b instanceof Bo&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Oh(b,this)),this.vb||this.invalidateViewport(a,y),bu(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 bu(a,y){var x=a.fe;if(x!==null&&x.visible){for(var E=cn.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/xe.vx(z,ut):b=b*ut/xe.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=Oe.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){Oe.free(y);return}b=y.width,z=y.height,a=y.x,tt=y.y,Oe.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=It.alloc(),xe.No(a,tt,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),cn.free(E),x.part.location=y,It.free(y)}}Re.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)}},Re.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))},Re.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),yn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];E instanceof Ii||he("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 Ii||he("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},Re.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()}},bt=Re.prototype,bt.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},bt.Jz=function(a){a=new Be().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 Ii||he("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},bt.scroll=function(a,y,x){x===void 0&&(x=1);var E=y==="up"||y==="down",b=0,z=It.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)),It.free(z);return}he("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):he("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),It.free(z)},bt.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)},bt.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},bt.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)},bt.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 Et=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,Et),yt=Math.max(yt,Et),Et=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,E),yt=Math.max(yt,E),Et=Math.min(Et,x),y=Math.max(y,x),z=Math.min(z,tt),yt=Math.max(yt,tt),Et=Math.min(Et,b),y=Math.max(y,b),new Oe(z,Et,yt-z,y-Et)},bt.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),Sn(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 uo}Re.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,E=a.propertyName;if(x===ea&&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===ea){(E==="FinishedUndo"||E==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),oa(this));var z=this.animationManager;E==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||zr(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(),Fu(this.animationManager)),!this.Rt&&tt&&this.lastInput.targetDiagram){this.Rt=!0;var rt=this;Ke(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 ll){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof Be&&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 ll){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 Be&&x.Bg.remove(a),Bg(E));break}}}}}Re.prototype.Wd=function(){this.partManager.Wd()},Re.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},Re.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},Re.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},Re.prototype.Vb=function(a){return this.partManager.Vb(a)},Re.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},bt=Re.prototype,bt.Lc=function(a){return this.partManager.Lc(a)},bt.ii=function(a){return this.partManager.ii(a)},bt.Kc=function(a){return this.partManager.Kc(a)},bt.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:Vr(Vi(y)))},bt.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:Vr(Vi(y)))};function $l(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),pl(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}bt.Va=function(){if(this.Zi){var a=Oe.alloc();Rd(this,this.computeBounds(a)),Oe.free(a)}},bt.rz=function(){for(var a=new Be,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},bt.qz=function(){return this.ai.iterator},bt.Uz=function(a){oa(this),a&&td(this,!0),this.ld?Mf(this,!1):(this.Jk=!0,Da(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||Pu(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),oa(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||zr(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)}}bt.yz=function(){for(var a=new ee,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 ee;x.add(b,tt),x.add(z,tt),E.add(b,b),E.add(z,b)}var x=new Qe,E=new Qe;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 bf(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;he("Unknown DiagramEvent name: "+y)}bt.Bj=function(a,y){return a=_d(this,a),a!==null&&a.add(y),this},bt.am=function(a,y){a=_d(this,a),a!==null&&a.remove(y)},bt.R=function(a,y,x){var E=_d(this,a),b=new zu;if(b.diagram=this,a=bf(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}bt.Yj=function(a,y){return ed(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},Re.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?_l(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=Oe.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)}Oe.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),b.initialize(y)),y=Oe.alloc(),z=x.memberParts;z.next();)tt=z.value,tt instanceof ti&&oc(a,tt,E,y);Oe.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 hr)for(y=y.memberParts;y.next();)b=y.value,b instanceof ti&&oc(a,b,x,E)}}function ku(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}Re.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():kf(this)};function kf(a){a.vk===-1&&(a.vk=Ke(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=Oe.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Rd(a,y),Oe.free(y),a.Fc=!0,a.bd(),kf(a))}},a.vp))}Re.prototype.ug=function(){this.vk!==-1&&(Un.clearTimeout(this.vk),this.vk=-1)},Re.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=Oe.allocAt(0,0,E.width*b,E.height*b);var z=It.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(vn)||(y=new It(y.x+z.x/b,y.y+z.y/b)),Oe.free(E),It.free(z),y},bt=Re.prototype,bt.Cs=function(){return null},bt.av=function(){return null},bt.bs=function(a,y){this.pj.add(a,y)},bt.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof hr&&(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):Un.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 Un.requestAnimationFrame(function(){E()}),null}bt.Wz=function(a){return Yo?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},bt.Jx=function(a){return a===void 0&&(a={}),nd(this,this.Xz,a)},bt.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 hu+"data":b=E.getImageData(0,0,x.width,x.height);break;case hu:E=(a.document||document).createElement("img"),E.src=x.toDataURL(a.type,a.details),b=E;break;case"blob":return typeof y!="function"&&he('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"&&he("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 cn(1/0,1/0):new cn(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,Et=y.elementFinished||null,Tt=y.showTemporary;Tt===void 0&&(Tt=!ft),y=y.showGrid,y===void 0&&(y=Tt),b!==null&&isNaN(b.width)&&isNaN(b.height)&&(b=null),typeof lt=="number"?lt=new sr(lt):lt instanceof sr||he("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 jl(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=Et,$h(a,E.context,lt,new cn(ft.width,ft.height),a.Ca,a.pa,ot,ut,Tt,y),E.context):(a.Xm=!1,$h(a,Dt,lt,new cn(ft.width,ft.height),a.Ca,a.pa,ot,ut,Tt,y),a.Xm=!0,ft.context);var Xt=a.Pp,jt=a.documentBounds.copy();if(jt.Fv(a.yb),Tt)for(var ie=a.Wa.s,le=ie.length,fe=0;fe<le;fe++){var ye=ie[fe];if(ye.visible&&ye.isTemporary){ye=ye.Pa.s;for(var _e=ye.length,Xn=0;Xn<_e;Xn++){var mi=ye[Xn];mi.isInDocumentBounds&&mi.isVisible()&&(mi=mi.actualBounds,mi.w()&&jt.ed(mi))}}}if(ie=new It(jt.x,jt.y),ot!==null){for(le=new Oe(0,0,0,0),fe=!0,ye=ot.iterator,ye.reset();ye.next();)_e=ye.value,_e instanceof Ii&&(Xn=_e.layer,Xn!==null&&!Xn.visible||Xn!==null&&!Tt&&Xn.isTemporary||!_e.isVisible()||(_e=_e.actualBounds,_e.w()&&(fe?(fe=!1,le.assign(_e)):le.ed(_e))));jt.width=le.width,jt.height=le.height,ie.x=le.x,ie.y=le.y}return rt!==null&&rt.w()&&(ie=rt,z||(z=Xt)),le=rt=0,lt!==null&&(rt=lt.left+lt.right,le=lt.top+lt.bottom),fe=ye=0,b!==null&&(ye=b.width,fe=b.height,isFinite(ye)&&(ye=Math.max(0,ye-rt)),isFinite(fe)&&(fe=Math.max(0,fe-le))),b!==null&&z!==null?(z==="NaN"&&(z=Xt),b.w()?(b=ye,jt=fe):isNaN(fe)?(b=ye,jt=jt.height*z):(b=jt.width*z,jt=fe)):b!==null?b.w()?(z=Math.min(ye/jt.width,fe/jt.height),b=ye,jt=fe):isNaN(fe)?(z=ye/jt.width,b=ye,jt=jt.height*z):(z=fe/jt.height,b=jt.width*z,jt=fe):z!==null?z==="NaN"&&tt.w()?(z=Math.min((tt.width-rt)/jt.width,(tt.height-le)/jt.height),z>Xt?(z=Xt,b=jt.width,jt=jt.height):(b=tt.width,jt=tt.height)):(b=jt.width*z,jt=jt.height*z):(z=Xt,b=jt.width,jt=jt.height),lt!==null?(b+=rt,jt+=le):lt=new sr(0),tt!==null&&(Xt=tt.width,tt=tt.height,isNaN(Xt)&&(Xt=2e3),isNaN(tt)&&(tt=2e3),isFinite(Xt)&&(b=Math.min(b,Xt)),isFinite(tt)&&(jt=Math.min(jt,tt))),ft.width=Math.ceil(b),ft.height=Math.ceil(jt),x==="SVG"?E===null?null:(E.resize(ft.width,ft.height,ft.width,ft.height),E.ownerDocument=yt,E.hs=Et,$h(a,E.context,lt,new cn(Math.ceil(b),Math.ceil(jt)),z,ie,ot,ut,Tt,y),E.context):(a.Xm=!1,$h(a,Dt,lt,new cn(Math.ceil(b),Math.ceil(jt)),z,ie,ot,ut,Tt,y),a.Xm=!0,ft.context)}Ue.Object.defineProperties(Re.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof gt||(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 va(this,Un.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 va(this,Un.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(Un,"resize",this.Ov,!1),this.removeEventListener(Un,"wheel",this.$j,!0),Mu===this&&(Mu=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)&&Wn(a,"0 <= value <= 1",Re,"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),pl(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),pl(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),pl(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),pl(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&Wn(a,">= 0",Re,"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&&Wn(a,">= 0",Re,"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 Wn(a,">= 0",Re,"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&&he("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,Pu(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(Un,"pointermove",this.dk,!0),this.addEventListener(Un,"pointerdown",this.ui,!0),this.addEventListener(Un,"pointerup",this.fk,!0),this.addEventListener(Un,"pointerout",this.ek,!0),this.addEventListener(Un,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(Un,"wheel",this.$j,!0),this.addEventListener(Un,"selectstart",this.preventDefault,!1)):(this.removeEventListener(Un,"pointermove",this.dk,!0),this.removeEventListener(Un,"pointerdown",this.ui,!0),this.removeEventListener(Un,"pointerup",this.fk,!0),this.removeEventListener(Un,"pointerout",this.ek,!0),this.removeEventListener(Un,"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(Un,"wheel",this.$j,!0),this.removeEventListener(Un,"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=It.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()?$l(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)}It.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!==En.Grid&&he("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),bu(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),$l(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||he("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&&pl(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,pl(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!==ca&&pl(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()||he("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()||he("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)):Wn(a,"> 0",Re,"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)):Wn(a,"> 0",Re,"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),pl(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&&he("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!==Cs&&a!==wA&&he("Unknown Diagram.treeCollapsePolicy: "+a),this.uu=a,this.g("treeCollapsePolicy",y,a))}},Ue:{get:function(){return this.pw},set:function(a){this.pw=a}},avoidanceCellSize:{get:function(){return this.aw},set:function(a){this.Xh=null,this.aw=new cn(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.bw},set:function(a){this.bw=Math.max(1,a)}},autoScrollInterval:{get:function(){return this.vp},set:function(a){var y=this.vp;y!==a&&(this.vp=a,this.g("autoScrollInterval",y,a))}},autoScrollRegion:{get:function(){return this.xp},set:function(a){typeof a=="number"&&(a=new sr(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Ue.Object.defineProperties(Re,{licenseKey:{get:function(){return Vd.jc()},set:function(a){Vd.add(a.replace(/\s/g,""))}},version:{get:function(){return Js}}}),Re.prototype.makeImageData=Re.prototype.Jx,Re.prototype.makeImage=Re.prototype.Wz,Re.prototype.cacheGroupExternalLinks=Re.prototype.Fu,Re.prototype.addRenderer=Re.prototype.bs,Re.prototype.makeSVG=Re.prototype.av,Re.prototype.makeSvg=Re.prototype.Cs,Re.prototype.stopAutoScroll=Re.prototype.ug,Re.prototype.doAutoScroll=Re.prototype.gs,Re.prototype.isUnoccupied=Re.prototype.Yj,Re.prototype.raiseDiagramEvent=Re.prototype.R,Re.prototype.removeDiagramListener=Re.prototype.am,Re.prototype.addDiagramListener=Re.prototype.Bj,Re.prototype.findTreeRoots=Re.prototype.yz,Re.prototype.layoutDiagram=Re.prototype.Uz,Re.prototype.findTopLevelGroups=Re.prototype.qz,Re.prototype.findTopLevelNodesAndLinks=Re.prototype.rz,Re.prototype.ensureBounds=Re.prototype.Va,Re.prototype.findLinksByExample=Re.prototype.ls,Re.prototype.findNodesByExample=Re.prototype.ms,Re.prototype.findLinkForData=Re.prototype.Kc,Re.prototype.findNodeForData=Re.prototype.ii,Re.prototype.findPartForData=Re.prototype.Lc,Re.prototype.findLinkForKey=Re.prototype.findLinkForKey,Re.prototype.findNodeForKey=Re.prototype.Vb,Re.prototype.findPartForKey=Re.prototype.findPartForKey,Re.prototype.rebuildParts=Re.prototype.Wd,Re.prototype.transformViewToDoc=Re.prototype.Ps,Re.prototype.transformRectDocToView=Re.prototype.zA,Re.prototype.transformDocToView=Re.prototype.op,Re.prototype.centerRect=Re.prototype.es,Re.prototype.scrollToRect=Re.prototype.tv,Re.prototype.scroll=Re.prototype.scroll,Re.prototype.highlightCollection=Re.prototype.Jz,Re.prototype.highlight=Re.prototype.Iz,Re.prototype.selectCollection=Re.prototype.rA,Re.prototype.select=Re.prototype.select,Re.prototype.updateAllRelationshipsFromData=Re.prototype.rp,Re.prototype.updateAllTargetBindings=Re.prototype.updateAllTargetBindings,Re.prototype.commit=Re.prototype.commit,Re.prototype.rollbackTransaction=Re.prototype.Kf,Re.prototype.commitTransaction=Re.prototype.eb,Re.prototype.startTransaction=Re.prototype.Ea,Re.prototype.raiseChanged=Re.prototype.g,Re.prototype.raiseChangedEvent=Re.prototype.cb,Re.prototype.removeChangedListener=Re.prototype.ik,Re.prototype.addChangedListener=Re.prototype.Pe,Re.prototype.removeModelChangedListener=Re.prototype.mA,Re.prototype.addModelChangedListener=Re.prototype.Yw,Re.prototype.findLayer=Re.prototype.Qj,Re.prototype.removeLayer=Re.prototype.kA,Re.prototype.addLayerAfter=Re.prototype.Cy,Re.prototype.addLayerBefore=Re.prototype.Ww,Re.prototype.addLayer=Re.prototype.Al,Re.prototype.moveParts=Re.prototype.moveParts,Re.prototype.copyParts=Re.prototype.Kj,Re.prototype.removeParts=Re.prototype.Is,Re.prototype.remove=Re.prototype.remove,Re.prototype.add=Re.prototype.add,Re.prototype.clearDelayedGeometries=Re.prototype.bx,Re.prototype.setProperties=Re.prototype.nm,Re.prototype.attach=Re.prototype.Du,Re.prototype.set=Re.prototype.set,Re.prototype.resetInputOptions=Re.prototype.Sx,Re.prototype.setInputOption=Re.prototype.sA,Re.prototype.getInputOption=Re.prototype.Ql,Re.prototype.resetRenderingHints=Re.prototype.Tx,Re.prototype.setRenderingHint=Re.prototype.Xx,Re.prototype.getRenderingHint=Re.prototype.Gf,Re.prototype.maybeUpdate=Re.prototype.bd,Re.prototype.requestUpdate=Re.prototype.$b,Re.prototype.delayInitialization=Re.prototype.Xy,Re.prototype.isUpdateRequested=Re.prototype.Pz,Re.prototype.invalidateDocumentBounds=Re.prototype.Ya,Re.prototype.findObjectsNear=Re.prototype.og,Re.prototype.findPartsNear=Re.prototype.mz,Re.prototype.findObjectsIn=Re.prototype.Cf,Re.prototype.findPartsIn=Re.prototype.ux,Re.prototype.findObjectsAt=Re.prototype.ji,Re.prototype.findPartsAt=Re.prototype.lz,Re.prototype.findObjectAt=Re.prototype.ic,Re.prototype.findPartAt=Re.prototype.Ol,Re.prototype.focusObject=Re.prototype.zz,Re.prototype.alignDocument=Re.prototype.Jy,Re.prototype.zoomToRect=Re.prototype.BA,Re.prototype.zoomToFit=Re.prototype.zoomToFit,Re.prototype.diagramScroll=Re.prototype.kx,Re.prototype.focus=Re.prototype.focus;var Gd=new Qe,Tf=null,Yo=Un.document!==void 0,Fh=null,WA="",ca=new Ze(Re,"None",0),rl=new Ze(Re,"Uniform",1),ZA=new Ze(Re,"UniformToFill",2),id=new Ze(Re,"CycleAll",10),sc=new Ze(Re,"CycleNotDirected",11),ac=new Ze(Re,"CycleNotDirectedFast",12),zd=new Ze(Re,"CycleNotUndirected",13),jd=new Ze(Re,"CycleDestinationTree",14),Nf=new Ze(Re,"CycleSourceTree",15),yA=new Ze(Re,"DocumentScroll",1),lc=new Ze(Re,"InfiniteScroll",2),YA=new Ze(Re,"TreeParentCollapsed",21),Cs=new Ze(Re,"AllParentsCollapsed",22),wA=new Ze(Re,"AnyParentsCollapsed",23),Vd=new ee,Js="2.3.10",hu="image",Xu=null,xA=!1;function Os(){if(Yo){var a=Un.document.createElement("canvas"),y=a.getContext("2d"),x=en("7ca11abfd022028846");y[x]=en("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",Ai.Dx+"4ae6247590da4bb21c324ba3a84e385776",$i.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",xe.za],b=1;5>b;b++)y[en("7ca11abfd7330390")](en(E[b-1]),10,15*b);for(y[x]=en("39f046ebb36e4b"),x=1;5>x;x++)y[en("7ca11abfd7330390")](en(E[x-1]),10,15*x);(E.length!==4||E[0][0]!=="5"||E[3][0]!=="7")&&($i.prototype.Cd=$i.prototype.Eu),Xu=a}}Re.className="Diagram",Re.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=Un.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof Re?y.H:null},Re.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},Re.useDOM=function(a){Yo=a?Un.document!==void 0:!1},Re.isUsingDOM=function(){return Yo},Re.None=ca,Re.Uniform=rl,Re.UniformToFill=ZA,Re.CycleAll=id,Re.CycleNotDirected=sc,Re.CycleNotDirectedFast=ac,Re.CycleNotUndirected=zd,Re.CycleDestinationTree=jd,Re.CycleSourceTree=Nf,Re.DocumentScroll=yA,Re.InfiniteScroll=lc,Re.TreeParentCollapsed=YA,Re.AllParentsCollapsed=Cs,Re.AnyParentsCollapsed=wA;function uc(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Gl(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=Un[en("76a715b2f73f148a")][en("72ba13b5")]||"";if(a.Rc=!0,Yo){var E=Re[en("76a115b6ed251eaf4692")];if(E)for(var b=Vd.iterator;b.next()&&(E=b.value,E=en(E).split(en("39e9")),!(6>E.length));){var z=en(E[1]).split(".");if(E[4]!=="7da71ca0")break;var tt=en(Ai[en("6cae19")]).split(".");if(z[0]>tt[0]||z[0]===tt[0]&&z[1]>=tt[1]){var rt=Un[en("74a900bae4370f8b51")][en("6fbb13a1c2311e8a57")].toLowerCase();if(tt=rt[en("73a612b6fb191d")](en("3aad1ab6e022098b4dc4")),z=en(E[2]),-1<tt&&(rt=rt[en("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<rt&&rt<tt),!a.Rc))break;for(tt=x[en("76ad18b4f73e")],rt=x[en("73a612b6fb191d")](en("35e7"))+2;rt<tt;rt++)y+=x[rt];if(tt=y[en("73a612b6fb191d")](z),0>tt&&z!==en("7da71ca0ad381e90")&&(tt=y[en("73a612b6fb191d")](en("76a715b2ef3e149757"))),0>tt&&(tt=y[en("73a612b6fb191d")](en("76a715b2ef3e149757"))),0>tt&&(tt=y[en("73a612b6fb191d")](en("2bfa41fdb3784bca12"))),0>tt&&(tt=x[en("73a612b6fb191d")](en("7baa19a6f76c1988428554"))),a.Rc=!(0<=tt&&tt<y[en("73a612b6fb191d")](en("35"))||y[en("73a612b6fb191d")](en("35"))===-1),!a.Rc||x[en("73a612b6fb191d")](en("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[en("73a612b6fb191d")](z)),!a.Rc)||(tt=Un[en("76a715b2f73f148a")][en("69ad17a1e03e")],rt=tt[en("73a612b6fb191d")](en("7fb002b6ed25128b4da25b2e")),-1<rt&&(a.Rc=!(tt[en("73a612b6fb191d")](z)>rt),!a.Rc)))break;if(z[0]==="#"){tt=Un.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[en("79a417a0f0181a8946")]=E,Un.document[en("78a712aa")]){Un.document[en("78a712aa")][en("7bb806b6ed32388c4a875b")](tt),ot=Un.getComputedStyle(tt).getPropertyValue(en("78a704b7e62456904c9b12701b6532a8"));var lt=Un.getComputedStyle(tt).getPropertyValue(en("75b817b0ea2202"));if(Un.document[en("78a712aa")][en("68ad1bbcf533388c4a875b")](tt),ot){if(tt=Un[en("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(en("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[en("76ad18b4f73e")],b=x[en("73a612b6fb191d")](en("35e7"))+2;b<ut;b++)y+=x[b];x=y[en("73a612b6fb191d")](en("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[en("73a612b6fb191d")](en("35")))}}}return 0<a.Rc&&a!==a.wy}uc.className="DiagramHelper";function Ju(a){this.j=a===void 0?new It:a,this.o=new It}Ue.Object.defineProperties(Ju.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";Ju.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 cn(NaN,NaN).freeze(),this.gridSnapCellSpot=kr,this.gridSnapOrigin=new It(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},st.className="DraggingOptions";function dt(a,y){if(typeof a=="string"||Un.Element&&a instanceof Element)var x=Re.call(this,a)||this;else x=Re.call(this)||this,y=a;return ht(x),y&&x.nm(y),x}He(dt,Re);function ht(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=xo,a.layout=new sa}dt.prototype.reset=function(){Re.prototype.reset.call(this),ht(this)},dt.className="Palette";function gt(a,y){if(typeof a=="string"||Un.Element&&a instanceof Element)var x=Re.call(this,a)||this;else x=Re.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 Ii;var b=new yr;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 Jt,x.toolManager.mouseMoveTools),x.click=function(){var z=E.observed;if(z!==null){var tt=z.viewportBounds,rt=E.lastInput.documentPoint;z.position=new It(rt.x-tt.width/2,rt.y-tt.height/2)}},x.Pf=function(){E.Ya(),Gt(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&&Gt(E)},x.autoScale=rl,x.vb=!1,y&&Object.assign(x,y),x}He(gt,Re),gt.prototype.computePixelRatio=function(){return 1},gt.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 jl(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}}}Re.prototype.redraw.call(this)},gt.prototype.gc=function(){if(this.Ka===null&&he("No div specified"),this.ta===null&&he("No canvas specified"),!(this.ta instanceof va)&&(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=Oe.alloc().assign(a.viewportBounds).ed(y.viewportBounds),bu(y,b),Oe.free(b),oa(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&<.layer===rt&&(rt=mA(rt,b),lt.gc(b,ot),b.globalAlpha=rt);else{for(var ut=mA(rt,b),ft=ot.scale,yt=Oe.alloc(),Et=rt.Pa.s,Tt=Et.length,Dt=0;Dt<Tt;Dt++){var Xt=Et[Dt];(E||Xt!==lt)&&rt.Oj(b,Xt,ot,null,ft,yt,!1)}Oe.free(yt),b.globalAlpha=ut}}}}}function Gt(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=cn.alloc();b.h(x.width,x.height),E.desiredSize=b,cn.free(b),a=2/a.scale,E instanceof yr&&(E.strokeWidth=a),y.location=new It(x.x-a/2,x.y-a/2),y.isSelected=!0}}}gt.prototype.computeBounds=function(){var a=this.observed;if(a===null)return ls;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},gt.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},gt.prototype.onViewportBoundsChanged=function(a,y,x,E){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),Gt(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.Oz=E,this.R("ViewportBoundsChanged",this.fc,a))},Ue.Object.defineProperties(gt.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof gt&&he("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),Gt(this),this.N();this.g("observed",y,a)}}},box:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.remove(y),this.add(this.j),Gt(this),this.g("box",y,a))}},drawsTemporaryLayers:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a,this.redraw())}},drawsGrid:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a,this.redraw())}},updateDelay:{get:function(){return this.ia},set:function(a){0>a&&(a=0),this.ia!==a&&(this.ia=a)}}}),gt.className="Overview";function Jt(){Ho.call(this),this.j=null}He(Jt,Ho),Jt.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 It(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new It(a.x-this.j.x,a.y-this.j.y)),!0)},Jt.prototype.doActivate=function(){this.j=null,Ho.prototype.doActivate.call(this)},Jt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Jt.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 It(E.x-x.x,E.y-x.y)}a=a.lastInput.documentPoint,y.position=new It(a.x-this.j.x,a.y-this.j.y)}}},Jt.className="OverviewDraggingTool";function Yt(){ln(this),this.H=Mu,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=ls,this.hb=!0,this.cg=null,this.ob=200}Yt.prototype.toString=function(){return"CommandHandler"},Yt.prototype.Xe=function(a){this.H=a},Yt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=cr?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()},Yt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Yt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Bo&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Yt.prototype.canStopCommand=function(){return!0},Yt.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=""}},Yt.prototype.canSelectAll=function(){return this.diagram.allowSelect},Yt.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 Be,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=""}},Yt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Yt.prototype.copySelection=function(){var a=this.diagram,y=new Be;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)},Yt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Yt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Yt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Yt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Fh=null,WA="";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 ee,x.addAll(z),Fh=x,WA=y.model.dataFormat}}y.R("ClipboardChanged",x)},Yt.prototype.pasteFromClipboard=function(){var a=new Be,y=Fh;if(y===null)return a;var x=this.diagram;if(WA!==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},Yt.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 It(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=""}},Yt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Fh===null||Fh.count===0||WA!==a.model.dataFormat)},Yt.prototype.undo=function(){this.diagram.undoManager.undo()},Yt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Yt.prototype.redo=function(){this.diagram.undoManager.redo()},Yt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Yt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===ca&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Yt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==ca?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Yt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===ca&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Yt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==ca?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Yt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Yt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Yt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,E=a.scale;Pu(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=ls):(this.Jt=E,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),zr(y)},Yt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Yt.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;Pu(x,"Scroll To Part");var E=this.scrollToPartPause;if(0<E){var b=pe(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 ti&&ot.isTreeExpanded&&(!(ot instanceof hr)||ot.isSubGraphExpanded);)ot=b.pop();0<b.length?(ot instanceof Ii&&y.tv(ot.actualBounds),ot instanceof ti&&!ot.isTreeExpanded&&(ot.isTreeExpanded=!0),ot instanceof hr&&!ot.isSubGraphExpanded&&(ot.isSubGraphExpanded=!0)):(ot instanceof Ii&&y.es(ot.actualBounds),y.am("LayoutCompleted",tt)),y.eb("Scroll To Part")},tt=function(){Ke(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 pe(a,y,x){if(y.isVisible())return x;if(y instanceof Wr)pe(a,y.adornedPart,x);else if(y instanceof _n){var E=y.fromNode;E!==null&&pe(a,E,x),y=y.toNode,y!==null&&pe(a,y,x)}else y instanceof ti&&(E=y.labeledLink,E!==null&&pe(a,E,x),E=y.pg(),E!==null&&(E.isTreeExpanded||E.wasTreeExpanded||x.push(E),pe(a,E,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),pe(a,y,x));return x}Yt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Ii)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Yt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),Pu(y.animationManager,"Collapse Tree");var x=new ee;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 ti&&b.isTreeExpanded&&(b.collapseTree(),x.add(b))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},Yt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof ti&&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 ti&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Yt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),Pu(y.animationManager,"Expand Tree");var x=new ee;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 ti&&!b.isTreeExpanded&&(b.expandTree(),x.add(b))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},Yt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof ti)||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 ti&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Yt.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 ee,z=a.selection.iterator;z.next();){var tt=z.value;tt.Zc()&&tt.canGroup()&&b.add(tt)}for(var rt=new ee,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 hr)cu(x),E=x.copy(),E!==null&&a.add(E);else if(y.Yu(x)){var Et=y.copyNodeData(x);on(Et)&&(y.xf(Et),E=a.ii(Et))}if(E!==null){ft!==null&&this.isValidMember(ft,E)&&(E.containingGroup=ft);for(var Tt=rt.iterator;Tt.next();){var Dt=Tt.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=""}}}},Yt.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 qe(a){var y=xn();for(a=a.iterator;a.next();){var x=a.value;x instanceof _n||y.push(x)}a=new Be,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 Nn(y),a}Yt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof _n)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},Yt.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 ee;if(a!==null)E.add(a);else for(var b=y.selection.iterator;b.next();){var z=b.value;z instanceof hr&&z.canUngroup()&&E.add(z)}var tt=new ee;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&<.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 _n)){var Et=yt.data;Et!==null?x.mp(Et,ut):yt.containingGroup=lt}}y.remove(ot)}}y.R("SelectionUngrouped",E,tt)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Yt.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 hr))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof hr&&y.canUngroup())return!0;return!1},Yt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=qe(a).iterator;a.next();){var E=a.value;E.containingGroup!==null&&(!y||this.isValidMember(null,E)?E.containingGroup=null:x=!1)}return x},Yt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),Pu(y.animationManager,"Collapse SubGraph");var x=new ee;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 hr&&b.isSubGraphExpanded&&(b.collapseSubGraph(),x.add(b))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Yt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof hr&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof hr&&y.isSubGraphExpanded)return!0;return!1},Yt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),Pu(y.animationManager,"Expand SubGraph");var x=new ee;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 hr&&!b.isSubGraphExpanded&&(b.expandSubGraph(),x.add(b))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Yt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof hr&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof hr&&!y.isSubGraphExpanded)return!0;return!1},Yt.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 Po&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},Yt.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 Po))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 Po&&x.editable}),a!==null))return!0;return!1},Yt.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 we?b=a.ga(Cr):y.viewportBounds.ca(E.documentPoint)||(b=y.viewportBounds,b=new It(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)}},Yt.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)},Yt.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 Qe,a===null)return E;for(var z=a.iterator;z.next();)Yu(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 _n&&(y=a.fromNode,y===null||E.contains(y)?(y=a.toNode,y===null||E.contains(y)||E.remove(a)):E.remove(a));return E},Ue.Object.defineProperties(Yt.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||he("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}}}),Yt.className="CommandHandler",Id=function(){return new Yt};function we(){ln(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new It(NaN,NaN).freeze(),this.jd=Pr,this.Ab=new $i,this.wh=new $i,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=Gi,this.uc=new Oe(NaN,NaN,NaN,NaN).freeze(),this.Ib=new Oe(NaN,NaN,NaN,NaN).freeze(),this.dc=new Oe(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=ws,this.Ag=this.io=0,this.V=this.tb=this.Dh=this.A=this.Ua=null,this.Uc=!1,this.jo=this.Ng=null}var Mn,wn,Si,bi,zi,rr,Lr,xr,Qr,lo;we.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=ii(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},we.prototype.Vw=function(a){var y=this.Dh;if(yn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},we.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},we.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},we.prototype.copy=function(){return this.clone()},bt=we.prototype,bt.qb=function(a){a.classType===_n?a.name.indexOf("Orient")===0?this.segmentOrientation=a:he("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===we&&(this.stretch=a)},bt.toString=function(){return ai(this.constructor)+"#"+Zn(this)},bt.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())}bt.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}},bt.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===To&&ta(this)&&Mo(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 Qe),tt=z.undoManager.transactionLevel===0,a.startCondition===Sh?tt=!0:a.startCondition===Zh&&(tt=!1),tt?(z=new ra,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()):(Pu(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,E,b)))),this instanceof En&&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 En&&Nu(rt,function(ot){ot.data!==null&&ot.l&16777216&&ot.La(y)})};function Mo(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=b1(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))}}bt.ks=function(a){return this.bindingId===a?this:null},bt.g=function(a,y,x){this.cb(To,a,this,y,x)},bt.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 $i);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),z.pp(b)}};function Hs(a,y,x,E){return a.pickable===!1?!1:(E.multiply(a.transform),x?a.Yc(y,E):a.fh(y,E))}bt.tx=function(a,y,x){if(this.pickable===!1)return!1;var E=this.naturalBounds;return y=a.Bf(y),x?dn(a.x,a.y,0,0,0,E.height)<=y||dn(a.x,a.y,0,E.height,E.width,E.height)<=y||dn(a.x,a.y,E.width,E.height,E.width,0)<=y||dn(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},bt.se=function(){return!0},bt.ca=function(a){var y=It.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return It.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=ho(x.x-tt*ot,x.y-tt*ot,x.width+z*ot,x.height+z*ot,y.x,y.y),It.free(y),a}return b=!1,(this instanceof Wr||this instanceof yr?ho(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)),It.free(y),b},bt.gh=function(a){var y=this.naturalBounds;return ho(0,0,y.width,y.height,a.x,a.y)},bt.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=Oe.allocAt(0,0,y.width,y.height);var x=this.transform,E=!1,b=It.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)))),It.free(b),Oe.free(y),E},bt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,E=!1,b=It.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)))),It.free(b),E},bt.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,E=It.allocAt(0,0),b=It.allocAt(0,x.height),z=It.allocAt(x.width,x.height),tt=It.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=Oe.allocAt(0,0,x.width,x.height);var ot=It.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)))),It.free(ot),Oe.free(x),!rt&&(xe.us(a,E,b)||xe.us(a,b,z)||xe.us(a,z,tt)||xe.us(a,tt,E))&&(rt=!0)}return It.free(E),It.free(b),It.free(z),It.free(tt),rt},bt.ga=function(a,y){if(y===void 0&&(y=new It),a instanceof Kn){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},bt.mi=function(a){a===void 0&&(a=new Oe);var y=this.naturalBounds,x=this.oe,E=It.allocAt(0,0).transform(x);return a.h(E.x,E.y,0,0),E.h(y.width,0).transform(x),Nr(a,E.x,E.y,0,0),E.h(y.width,y.height).transform(x),Nr(a,E.x,E.y,0,0),E.h(0,y.height).transform(x),Nr(a,E.x,E.y,0,0),It.free(E),a},bt.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},bt.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},bt.qs=function(a,y){return y===void 0&&(y=new It),y.assign(a),this.oe.Cd(y),y},bt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},bt.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,xe.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=xe.Ff(0,0,E.width,E.height,tt,a,y,x,b),b.transform(z),x)},we.prototype.measure=function(a,y,x,E){if(yl(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 En;switch(Ua(this,!0)){case wn:tt=b=0,rt&&(y=a=1/0);break;case Mn:isFinite(a)&&a>x&&(b=a),isFinite(y)&&y>E&&(tt=y);break;case bi:isFinite(a)&&a>x&&(b=a),tt=0,rt&&(y=1/0);break;case zi: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()||he("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Ps(this,!1)}},we.prototype.Wl=function(){},we.prototype.Dd=function(){return!1},we.prototype.arrange=function(a,y,x,E,b){this.Uk();var z=Oe.alloc();z.assign(this.Ib),this.Ib.ka(),Ba(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 Po&&(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()||he("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),qu(this,!1),Oe.free(z)},bt=we.prototype,bt.eh=function(){};function Sa(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=Ua(a,!0),x===E&&z===b&&(y=wn),y){case wn:(x>E||z>b)&&(Ps(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case Mn:Ps(a,!0),a.measure(E,b,0,0);break;case bi:Ps(a,!0),a.measure(E,z,0,0);break;case zi:Ps(a,!0),a.measure(x,b,0,0)}}}bt.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(),Ur(a,y)||(x.oh(),this.Pn(x)))},bt.Pn=function(a){this.portId!==null&&(ev(a,!0),a instanceof ti&&Wy(a,this))},bt.gc=function(a,y){if(!ol(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 En&&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&&(jo(this,a,lt,!0,!0,ot,rt),lt instanceof no&<.type===Sr?(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&&(jo(this,a,ut,!0,!1,ot,rt),ut instanceof no&&ut.type===Sr?(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&&Rs(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 Et=this.naturalBounds;yt=this.wh;var Tt=yt.m11,Dt=yt.m21,Xt=yt.dx,jt=yt.m12,ie=yt.m22,le=yt.dy,fe,ye=fe=0;yt=fe*Tt+ye*Dt+Xt;var _e=fe*jt+ye*ie+le;fe=Et.width+ft,ye=0;var Xn=fe*Tt+ye*Dt+Xt;fe=fe*jt+ye*ie+le,ye=Math.min(yt,Xn);var mi=Math.min(_e,fe),hi=Math.max(yt+0,Xn)-ye,Rn=Math.max(_e+0,fe)-mi;yt=ye,_e=mi,fe=Et.width+ft,ye=Et.height+ft,Xn=fe*Tt+ye*Dt+Xt,fe=fe*jt+ye*ie+le,ye=Math.min(yt,Xn),mi=Math.min(_e,fe),hi=Math.max(yt+hi,Xn)-ye,Rn=Math.max(_e+Rn,fe)-mi,yt=ye,_e=mi,fe=0,ye=Et.height+ft,Xn=fe*Tt+ye*Dt+Xt,fe=fe*jt+ye*ie+le,ye=Math.min(yt,Xn),mi=Math.min(_e,fe),hi=Math.max(yt+hi,Xn)-ye,Rn=Math.max(_e+Rn,fe)-mi,yt=ye,_e=mi,ft=y.viewportBounds,Et=ft.x,Tt=ft.y,yt=!(yt>ft.width+Et||Et>hi+yt||_e>ft.height+Tt||Tt>Rn+_e)}if(yt){if(yt=(this.l&256)!==0,a.clipInsteadOfFill&&(yt=!1),this instanceof Po&&(a.font=this.font),yt){if(_e=rt.se()?rt.naturalBounds:rt.actualBounds,hi=Math.max(tt.x,_e.x),Rn=Math.max(tt.y,_e.y),ft=Math.min(tt.right,_e.right)-hi,Et=Math.min(tt.bottom,_e.bottom)-Rn,Tt=this.tb,Tt!==null&&(hi=Tt.x,Rn=Tt.y,ft=Tt.width,Et=Tt.height),hi>tt.width+tt.x||tt.x>_e.width+_e.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect(hi,Rn,ft,Et),a.clip()}if(ut){if(!lt.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}ot&&(_e=lt.shadowOffset,a.Ev(_e.x*y.scale*this.scale*y.Mb,_e.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&&Tu(a),lt=this.naturalBounds,this.areaBackground!==null&&(a.yc(),ml(this,a,lt,tt)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),ot&&Ws(this,rt)&&this.shadowVisible===null&&Tu(a),this.Ma!==null&&(a.yc(),ba(this,a,lt,tt)),ot&&(this.Ma!==null||this.areaBackground!==null||Ws(this,rt))?(vl(this,!0),this.shadowVisible===null&&Tu(a)):vl(this,!1),this.hh(a,y),ot&&this.l&512&&SA(a),ut&&ot&&Tu(a),yt&&(a.restore(),a.Vc(this instanceof En)),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 Ws(a,y){return y===null?!1:(vc(y)&&(y=y.panel),(y.l&512)!==0||(y.type===En.Auto||y.type===En.Spot)&&y.Pb()!==a)}bt.Dv=function(){};function ml(a,y,x,E){jo(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof no&&a.areaBackground.type===Sr?(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 ba(a,y,x,E){var b=a.kq(),z=x.x,tt=x.y,rt=x.width+b,ot=x.height+b;jo(a,y,a.Ma,!0,!1,x,E),a.Ma instanceof no&&a.Ma.type===Sr?(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 ma(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===En.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 ol(a,y,x){if(!(y instanceof za))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&&ma(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 Po&&(y.font=a.font),y.yd=null;var tt=a.transform;z=a instanceof En;var rt=a instanceof En?vc(a):!1;a.l&4096&&Rs(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],ml(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]),ba(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],ba(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&&Tu(y),b=a.panel,rt&&Ws(a,b)&&a.shadowVisible===null&&Tu(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||Ws(a,b))?(vl(a,!0),a.shadowVisible===null&&Tu(y)):vl(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&<!==null&&rt!==lt&<.parentNode===a.panel.svg?(a.svg.replaceWith(rt),a.svg=rt,rt!==null&&a.$o(y,E,ot,rt),Ia(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()&&Tu(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&&ma(a,E,rt),tt!==null&&tt(a,rt)),!0)}bt.$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"+Li++,rt=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:b,width:tt,height:x}),this instanceof En&&(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"),Ia(a,E)};function Ia(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function vr(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Vi(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()}}bt.hh=function(){},bt.lv=function(){this.Uc=!0},bt.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 En?vc(this):!1;if(!(this instanceof En&&b))if(this instanceof ll){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 En)y.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");else if(this instanceof yr){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],ml(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 En))&&(a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy]),ba(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},bt.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 jo(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===Ir)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===Ko||x.yk===rt&&x.ft===ot))var ut=x.xe;else{var ft=0,yt=0,Et=0,Tt=0,Dt=0,Xt=0;if(Xt=Dt=0,b?(Dt=tt.x,Xt=tt.y):E||(Dt-=lt/2,Xt-=lt/2),ft=x.start.x*rt+x.start.offsetX,yt=x.start.y*ot+x.start.offsetY,Et=x.end.x*rt+x.end.offsetX,Tt=x.end.y*ot+x.end.offsetY,ft+=Dt,Et+=Dt,yt+=Xt,Tt+=Xt,x.type===pr)ut=y.createLinearGradient(ft,yt,Et,Tt);else if(x.type===Sr)Xt=isNaN(x.endRadius)?Math.max(rt,ot)/2:x.endRadius,isNaN(x.startRadius)?(Dt=0,Xt=Math.max(rt,ot)/2):Dt=x.startRadius,ut=y.createRadialGradient(ft,yt,Dt,Et,Tt,Xt);else if(x.type===Ko)try{ut=y.createPattern(x.pattern,"repeat")}catch(ie){ut=null}if(x.type!==Ko&&(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===Ko&&x.yk!==-1)){x.yk=-1;var jt=a.diagram;jt!==null&&x.yk===-1&&Ke(function(){jt.redraw()},600)}}E?y.fillStyle=ut:y.strokeStyle=ut}}}bt.rg=function(a){if(a instanceof En)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},bt.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},bt.If=function(){for(var a=this instanceof En?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Rs(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){zl(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)}zl(a,!1),Ga(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Ga(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,Ga(a,!1)))}bt.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=It.alloc();z.yi(y,x,E,b,Cr),a.rotate(this.Kb,z.x,z.y),It.free(z)}},bt.v=function(a){if(!yl(this)){a===void 0&&(a=!1),Ps(this,!0),qu(this,!0);var y=this.panel;y===null||a||y.v()}},bt.Uj=function(){yl(this)||(Ps(this,!0),qu(this,!0))};function bs(a){if(!Ba(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof ti&&a.Bd(),y.$b())),qu(a,!0)}}bt.Uk=function(){!(this.l&2048)&&(zl(this,!0),Ga(this,!0))},bt.Wu=function(){Ga(this,!0)},bt.N=function(){var a=this.part;a!==null&&a.N()};function Ua(a,y){var x=a.stretch,E=a.panel;return E!==null&&E.type===En.Table?Xo(a,E.Fb(a.row),E.Eb(a.column),y):E!==null&&E.type===En.Auto&&E.Pb()===a?Co(a,Mn,y):x===rr?E!==null?E.type===En.Spot&&E.Pb()===a?Co(a,Mn,y):(x=E.defaultStretch,x===rr?Co(a,wn,y):Co(a,x,y)):Co(a,wn,y):Co(a,x,y)}function Xo(a,y,x,E){var b=a.stretch;if(b!==rr)return Co(a,b,E);var z=b=null;switch(y.stretch){case zi:z=!0;break;case Mn:z=!0}switch(x.stretch){case bi:b=!0;break;case Mn:b=!0}return y=a.panel.defaultStretch,b===null&&(b=y===bi||y===Mn),z===null&&(z=y===zi||y===Mn),b===!0&&z===!0?Co(a,Mn,E):b===!0?Co(a,bi,E):z===!0?Co(a,zi,E):Co(a,wn,E)}function Co(a,y,x){if(x)return y;if(y===wn||(x=a.desiredSize,x.w()))return wn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===bi)return wn;if(y===Mn)return zi}else{if(y===zi)return wn;if(y===Mn)return bi}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===zi)return wn;if(y===Mn)return bi}else{if(y===bi)return wn;if(y===Mn)return zi}return y}function vl(a,y){a.l=y?a.l|512:a.l&-513}function ta(a){return(a.l&1024)!==0}function XA(a,y){a.l=y?a.l|1024:a.l&-1025}function zl(a,y){a.l=y?a.l|2048:a.l&-2049}function Ga(a,y){a.l=y?a.l|4096:a.l&-4097}function yl(a){return(a.l&8192)!==0}function Ps(a,y){a.l=y?a.l|8192:a.l&-8193}function Ba(a){return(a.l&16384)!==0}function qu(a,y){a.l=y?a.l|16384:a.l&-16385}bt.Gj=function(){this.svg=null},bt.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},bt.Av=function(){},bt.zv=function(a){return this.pa=a,bs(this),!0},bt.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},bt.kq=function(){return 0};function Eh(a){var y=a.part;if(y instanceof ti&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||Wy(y,a)}}function qp(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof En?a instanceof ti?a.Bd():a.qm(a,function(x){Eh(x)}):Eh(a))}bt.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Fs(a,y,x,E):b=a,b.xd=this,a=this.ih(),a!==null&&py(a)&&he("Cannot add a Binding to a template that has already been copied: "+b),this.localBindings===null&&(this.localBindings=new ee),this.localBindings.add(b),this},bt.set=function(a){return Object.assign(this,a),this},bt.Du=function(a){return vg(this,a),this},bt.apply=function(a){return a(this),this},bt.nm=function(a){return tc(this,a),this},bt.pz=function(){return this.ih()},bt.ih=function(){for(var a=this instanceof En?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},bt.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new Qe),this.animationTriggers.add(a.propertyName,a),this};function wl(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=Wd.I(a);typeof z=="function"?(x=ii(arguments),E=z(x),on(E)||he('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):b=Un.go[a]}if(E===null&&(b!=null&&b.constructor||he("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 Re&&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?he("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 Po)a.text=y;else if(a instanceof yr)a.figure=y;else if(a instanceof ll)a.source=y;else if(a instanceof En)y=Du.I(y),y!==null&&(a.type=y);else if(a instanceof no){var x=ni(no,y);x!==null?a.type=x:he("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof On?(y=ni(On,y),y!==null&&(a.type=y)):a instanceof _r&&(y=ni(_r,y),y!==null&&(a.type=y));else if(y instanceof we)a instanceof En||he("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Ns){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 Ns?s0(E,y):he("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof Ze)typeof a.qb=="function"&&a.qb(y);else if(y instanceof io)a.type=y;else if(y instanceof Fs)a instanceof we||a instanceof Ns?a.bind(y):he("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof ql)a instanceof we?a.Jv(y):he("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Ss)a instanceof On&&a.type===On.o?a.figures.add(y):he("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof _r)a instanceof Ss?a.segments.add(y):he("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof Go)a instanceof Re||a instanceof hr?a.layout=y:he("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 no){x=new Hi;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 Ns){y.row!==void 0?(b=y.row,(b==null||b===1/0||isNaN(b)||0>b)&&he("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)&&he("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+b),a.isRow=!1,a.index=b),b=new Hi;for(x in y)x!=="row"&&x!=="column"&&(b[x]=y[x]);tc(a,b)}else tc(a,y);else he('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function $u(a,y){Wd.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}Ue.Object.defineProperties(we.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:Va},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===Va&&(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:vn},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:rr},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)&&Wn(a,"0 <= value <= 1",we,"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&&Ft(a,"GraphObject.areaBackground"),a instanceof no&&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&&Ft(a,"GraphObject.background"),a instanceof no&&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 Ii)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 It(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&&he("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 yr&&this.qc(),this.g("desiredSize",E,a),ta(this)&&(a=this.part,a!==null&&(Mo(this,a,"width"),Mo(this,a,"height"))))}},width:{get:function(){return this.jd.width},set:function(a){var y=this.jd.width;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new cn(a,this.jd.height).freeze(),this.v(),this instanceof yr&&this.qc(),this.g("desiredSize",y,a),ta(this)&&(a=this.part,a!==null&&Mo(this,a,"width")))}},height:{get:function(){return this.jd.height},set:function(a){var y=this.jd.height;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new cn(this.jd.width,a).freeze(),this.v(),this instanceof yr&&this.qc(),this.g("desiredSize",y,a),ta(this)&&(a=this.part,a!==null&&Mo(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:ri},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:dr},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&&Rs(this),this.Ab}},oe:{get:function(){return this.l&4096&&Rs(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:wn},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()&&he("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),bs(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&&Wn(a,">= 0",we,"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&&Wn(a,">= 1",we,"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&&Wn(a,">= 0",we,"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&&Wn(a,">= 1",we,"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 ti||he("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&&Wn(a,">= 0",we,"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&&Wn(a,">= 0",we,"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&&Wn(a,">= 0",we,"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&&Wn(a,">= 0",we,"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))}}}),we.prototype.trigger=we.prototype.Jv,we.prototype.findBindingPanel=we.prototype.ih,we.prototype.findTemplateBinder=we.prototype.pz,we.prototype.setProperties=we.prototype.nm,we.prototype.apply=we.prototype.apply,we.prototype.attach=we.prototype.Du,we.prototype.set=we.prototype.set,we.prototype.isEnabledObject=we.prototype.If,we.prototype.isVisibleObject=we.prototype.Ed,we.prototype.isContainedBy=we.prototype.rg,we.prototype.getNearestIntersectionPoint=we.prototype.rs,we.prototype.getLocalPoint=we.prototype.qs,we.prototype.getDocumentScale=we.prototype.Df,we.prototype.getDocumentAngle=we.prototype.li,we.prototype.getDocumentBounds=we.prototype.mi,we.prototype.getDocumentPoint=we.prototype.ga,we.prototype.intersectsRect=we.prototype.Yc,we.prototype.containedInRect=we.prototype.fh,we.prototype.containsRect=we.prototype.Re,we.prototype.containsPoint=we.prototype.ca,we.prototype.raiseChanged=we.prototype.g,we.prototype.raiseChangedEvent=we.prototype.cb,we.prototype.addCopyProperty=we.prototype.Vw;var Wd=null;we.className="GraphObject",Wd=new Qe,$u("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=wl(En,En.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof En){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"},wl(yr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Kn(0,0,2.76142374915397,2.761423749153969),spot2:new Kn(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 En&&(x=E.fb("ButtonBorder"),x instanceof yr)){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 En&&(x=E.fb("ButtonBorder"),x instanceof yr&&(x.fill=E._buttonFillNormal,x.stroke=E._buttonStrokeNormal))},y.actionDown=function(x,E){if(E.If()&&E instanceof En&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof yr){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 En&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof yr){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 En&&E._buttonFillPressed!==null){var b=E.fb("ButtonBorder");if(b instanceof yr){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 En&&E._buttonFillPressed!==null){var b=x.diagram;if(b.firstInput.button===0&&(b.currentTool.standardMouseOver(),a(x,E)&&(x=E.fb("ButtonBorder"),x instanceof yr))){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}),$u("TreeExpanderButton",function(){var a=wl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},wl(yr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ji},new Fs("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Fs("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof Wr&&(x=x.adornedPart),x instanceof ti){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}),$u("SubGraphExpanderButton",function(){var a=wl("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},wl(yr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ji},new Fs("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 Wr&&(x=x.adornedPart),x instanceof hr){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}),$u("ToolTip",function(){return wl(Wr,En.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new It(0,3),shadowBlur:5},wl(yr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Kn(0,0,4,6),spot2:new Kn(1,1,-4,-4)}))}),$u("ContextMenu",function(){return wl(Wr,En.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new It(0,3),shadowBlur:5},new Fs("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),$u("ContextMenuButton",function(){var a=wl("Button");a.stretch=bi;var y=a.fb("ButtonBorder");return y instanceof yr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new Kn(0,0,2,3),y.spot2=new Kn(1,1,-2,-2)),a}),$u("PanelExpanderButton",function(a){var y=Df(a,"COLLAPSIBLE"),x=wl("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},wl(yr,{name:"ButtonIcon",strokeWidth:2},new Fs("geometryString","visible",function(E){return E?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof yr&&(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}),$u("CheckBoxButton",function(a){var y=Df(a);return a=wl("Button",{desiredSize:new cn(14,14)},wl(yr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Mn,geometryStretch:Si,visible:!1},y!==""?new Fs("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof En){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}),$u("CheckBox",function(a){a=Df(a),a=wl("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new sr(0,1,0,0)});var y=wl(En,"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}),we.None=wn=new Ze(we,"None",0),we.Default=rr=new Ze(we,"Default",0),we.Vertical=zi=new Ze(we,"Vertical",4),we.Horizontal=bi=new Ze(we,"Horizontal",5),we.Fill=Mn=new Ze(we,"Fill",3),we.Uniform=Si=new Ze(we,"Uniform",1),we.UniformToFill=Lr=new Ze(we,"UniformToFill",2),we.FlipVertical=xr=new Ze(we,"FlipVertical",1),we.FlipHorizontal=Qr=new Ze(we,"FlipHorizontal",2),we.FlipBoth=lo=new Ze(we,"FlipBoth",3),we.make=wl,we.getBuilders=function(){var a=new Qe,y;for(y in Wd)if(y!==y.toLowerCase()){var x=Wd.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},we.defineBuilder=$u,we.build=function(a,y,x){for(var E=[],b=2;b<arguments.length;++b)E[b-2]=arguments[b];if(b=Wd.I(a),typeof b=="function"&&(E=b([a].concat(E)),E instanceof we))return y&&E.set(y),E;he('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},we.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=ri,this.o=dr,this.hg=rr,this.ob=this.Bi=1,this.Pf=wn,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=vn,this.rr=Va,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=ws,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 va(a,y,x){this.ownerDocument=a=y===void 0?Un.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 za(this,x)}va.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},va.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),on(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},va.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},va.prototype.focus=function(){this.Oa.focus()},va.prototype.mx=function(){this.ownerDocument=null},Ue.Object.defineProperties(va.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}}}),va.className="SVGSurface";function za(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=Li++,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+")")}bt=za.prototype,bt.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,Et=y+ft,Tt=z?0:1;E=z?E-b:b-E,(1e-6<Math.abs(tt-yt)||1e-6<Math.abs(rt-Et))&&this.path.push(["L",yt,+Et]),0>E&&(E=E%ot+ot),E>lt?(this.path.push(["A",x,x,0,1,Tt,a-ut,y-ft]),this.path.push(["A",x,x,0,1,Tt,yt,Et])):1e-6<E&&this.path.push(["A",x,x,0,+(E>=Math.PI),Tt,a+x*Math.cos(b),y+x*Math.sin(b)])},bt.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},bt.Se=function(a){this.addPath(this.path,this.rb,a||0)},bt.bezierCurveTo=function(a,y,x,E,b,z){this.path.push(["C",a,y,x,E,b,z])},bt.clearRect=function(){},bt.clip=function(){this.Yl.clipPath=!0},bt.closePath=function(){this.path.push(["z"])},bt.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},bt.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"+Li++,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(hu,b)),this.svg.appendChild(a),x[y]=E,"url(#"+E+")"},bt.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)}bt.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},xe.$(E,rt)&&xe.$(b,ot)?lt.toLowerCase().indexOf(".svg")===-1&<.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,hu,z,this.rb),this.addElement(hu,z)},bt.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),fc(this,this.Yl)},bt.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},bt.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)},bt.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))},bt.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])},bt.lineTo=function(a,y){this.path.push(["L",a,y])},bt.moveTo=function(a,y){this.path.push(["M",a,y])},bt.quadraticCurveTo=function(a,y,x,E){this.path.push(["Q",a,y,x,E])},bt.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"])},bt.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},bt.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())},bt.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]+")"}bt.scale=function(a,y){this.rb.scale(a,y)},bt.translate=function(a,y){this.rb.translate(a,y)},bt.transform=function(){},bt.yc=function(){},bt.stroke=function(){e0(this,this.Yl)},bt.jk=function(){this.clipInsteadOfFill||this.stroke()},bt.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},bt.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"+Li++,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+")"}bt.addPath=function(a,y,x){for(var E=[],b=0;b<a.length;b++){var z=ii(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}bt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Tu(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}bt.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},bt.fs=function(){this.Ct=!1},bt.Vc=function(){},bt.Wx=function(){},za.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},za.prototype.getImageData=function(){return null},za.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()))}za.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},za.className="SVGContext",Re.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new va(this,Un.document));var y=new va(this,Un.document,!0);a===void 0&&(a=new Hi);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)},Re.prototype.makeSvg=Re.prototype.Cs,Re.prototype.av=function(a){return this.Cs(a)},Re.prototype.makeSVG=Re.prototype.av;function jl(a,y,x,E){this.ownerDocument=y=y===void 0?Un.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}jl.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},jl.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},jl.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},jl.prototype.focus=function(){this.Oa.focus()},jl.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},Ue.Object.defineProperties(jl.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}}}),jl.className="CanvasSurface";function pc(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&he("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 $i,this.isTemporary=!!x}bt=pc.prototype,bt.Wx=function(a){this.Z.imageSmoothingEnabled=a},bt.arc=function(a,y,x,E,b,z){this.Z.arc(a,y,x,E,b,z)},bt.beginPath=function(){this.Z.beginPath()},bt.Se=function(){},bt.bezierCurveTo=function(a,y,x,E,b,z){this.Z.bezierCurveTo(a,y,x,E,b,z)},bt.clearRect=function(a,y,x,E){this.yc(),this.Z.clearRect(a,y,x,E)},bt.clip=function(){this.Z.clip()},bt.closePath=function(){this.Z.closePath()},bt.createLinearGradient=function(a,y,x,E){return this.Z.createLinearGradient(a,y,x,E)},bt.createPattern=function(a,y){return this.Z.createPattern(a,y)},bt.createRadialGradient=function(a,y,x,E,b,z){return this.Z.createRadialGradient(a,y,x,E,b,z)},bt.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)},bt.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},bt.fillRect=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},bt.ox=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},bt.fillText=function(a,y,x){this.Z.fillText(a,y,x)},bt.getImageData=function(a,y,x,E){return this.Z.getImageData(a,y,x,E)},bt.lineTo=function(a,y){this.Z.lineTo(a,y)},bt.measureText=function(a){return this.Z.measureText(a)},bt.moveTo=function(a,y){this.Z.moveTo(a,y)},bt.quadraticCurveTo=function(a,y,x,E){this.Z.quadraticCurveTo(a,y,x,E)},bt.rect=function(a,y,x,E){this.Z.rect(a,y,x,E)},bt.restore=function(){this.Z.restore()},bt.save=function(){this.yc(),this.Z.save()},pc.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},bt=pc.prototype,bt.setTransform=function(a,y,x,E,b,z){this.El.setTransform(a,y,x,E,b,z)},bt.scale=function(a,y){this.El.scale(a,y)},bt.translate=function(a,y){this.El.translate(a,y)},bt.stroke=function(){this.Z.stroke()},bt.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}},bt.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},bt.ng=function(a,y){if(a instanceof no&&a.type===Sr){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)},bt.jk=function(){this.Hm||this.stroke()},bt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},bt.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},bt.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(Tm),a.lineDashOffset=0)},bt.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},bt.Hs=function(){},Ue.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 no(a,y){Di||(Ct(),Di=!0),ln(this),this._isFrozen=!1,a===void 0?(this.na=Ir,this.xk="black"):typeof a=="string"?(this.na=Ir,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===pr?(this.Qd=xo,this.Lk=ts):this.Lk=a===Sr?this.Qd=Cr: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)}no.prototype.copy=function(){var a=new no;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},bt=no.prototype,bt.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},bt.ka=function(){return Object.isFrozen(this)&&he("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},bt.qb=function(a){a.classType===no&&(this.type=a)},bt.toString=function(){var a="Brush(";if(this.type===Ir)a+=this.color;else if(a=this.type===pr?a+"Linear ":this.type===Sr?a+"Radial ":this.type===Ko?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+")"},bt.addColorStop=function(a,y){return this._isFrozen&&rn(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Wn(a,"0 <= loc <= 1",no,"addColorStop:loc"),this.we===null&&(this.we=new Qe),this.we.add(a,y),this.na===Ir&&(this.type=pr),this.xe=null,this},bt.Vz=function(a,y){if(this._isFrozen&&rn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?$r:y,this.type===Ir)BA(this.color),this.color=Yd(a,y);else if((this.type===pr||this.type===Sr)&&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?$r:x,BA(a),Yd(y,x)}bt.Wy=function(a,y){if(this._isFrozen&&rn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?$r:y,this.type===Ir)BA(this.color),this.color=Yd(-a,y);else if((this.type===pr||this.type===Sr)&&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?$r:x,BA(a),Yd(-y,x)}function np(a,y,x){BA(a),a=Ie.j;var E=Ie.u,b=Ie.o,z=Ie.F;return BA(y),x===void 0&&(x=.5),"rgba("+Math.round((Ie.j-a)*x+a)+", "+Math.round((Ie.u-E)*x+E)+", "+Math.round((Ie.o-b)*x+b)+", "+Math.round((Ie.F-z)*x+z)+")"}bt.Gx=function(){if(this.type===Ir)return Zd(this.color);if((this.type===pr||this.type===Sr)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Sr)return Zd(a.first().value);if(a.get(.5)!==null)return Zd(a.get(.5));if(a.count===2)return a=a.Fa(),Zd(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,Zd(np(a.get(x),a.get(E),1-z/b))}return!1};function Zd(a){return a?a instanceof no?a.Gx():(BA(a),128>(299*Ie.j+587*Ie.u+114*Ie.o)/1e3):!1}function Yd(a,y){switch(y){case $r:y=100*rp(Ie.j);var x=100*rp(Ie.u),E=100*rp(Ie.o);return Hn.j=.4124564*y+.3575761*x+.1804375*E,Hn.u=.2126729*y+.7151522*x+.072175*E,Hn.o=.0193339*y+.119192*x+.9503041*E,Hn.F=Ie.F,y=St(Hn.j/Fe[0]),x=St(Hn.u/Fe[1]),E=St(Hn.o/Fe[2]),ei.j=116*x-16,ei.u=500*(y-x),ei.o=200*(x-E),ei.F=Hn.F,ei.j=Math.min(100,Math.max(0,ei.j+100*a)),a=(ei.j+16)/116,y=a-ei.o/200,Hn.j=Fe[0]*wt(ei.u/500+a),Hn.u=Fe[1]*(ei.j>se*zt?Math.pow(a,3):ei.j/se),Hn.o=Fe[2]*wt(y),Hn.F=ei.F,a=-.969266*Hn.j+1.8760108*Hn.u+.041556*Hn.o,y=.0556434*Hn.j+-.2040259*Hn.u+1.0572252*Hn.o,Ie.j=255*op((3.2404542*Hn.j+-1.5371385*Hn.u+-.4985314*Hn.o)/100),Ie.u=255*op(a/100),Ie.o=255*op(y/100),Ie.F=Hn.F,Ie.j=Math.round(Ie.j),255<Ie.j?Ie.j=255:0>Ie.j&&(Ie.j=0),Ie.u=Math.round(Ie.u),255<Ie.u?Ie.u=255:0>Ie.u&&(Ie.u=0),Ie.o=Math.round(Ie.o),255<Ie.o?Ie.o=255:0>Ie.o&&(Ie.o=0),"rgba("+Ie.j+", "+Ie.u+", "+Ie.o+", "+Ie.F+")";case eo:return ip(),bn.o=Math.min(100,Math.max(0,bn.o+100*a)),"hsla("+bn.j+", "+bn.u+"%, "+bn.o+"%, "+bn.F+")";default:he("Unknown color space: "+y)}}function BA(a){Di||(Ct(),Di=!0);var y=Xe;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,Ie.j=a[0],Ie.u=a[1],Ie.o=a[2],Ie.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Ie.j=0,Ie.u=0,Ie.o=0,Ie.F=1)}}function ip(){var a=Ie.j/255,y=Ie.u/255,x=Ie.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))}bn.j=Math.round(tt),bn.u=Math.round(100*a),bn.o=Math.round(100*b),bn.F=Ie.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 St(a){return a>zt?Math.pow(a,1/3):(se*a+16)/116}function wt(a){var y=a*a*a;return y>zt?y:(116*a-16)/se}function Ft(a,y){typeof a!="string"&&(a instanceof no||he("Value for "+y+" must be a color string or a Brush, not "+a))}function Ct(){Xe=Yo?new jl(null,void 0,{willReadFrequently:!0}).context:null}Ue.Object.defineProperties(no.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&rn(this,a),this.na=a,this.start.Mc()&&(a===pr?this.start=xo:a===Sr&&(this.start=Cr)),this.end.Mc()&&(a===pr?this.end=ts:a===Sr&&(this.end=Cr)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&rn(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&rn(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&rn(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&rn(this,a),0>a&&Wn(a,">= zero",no,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&rn(this,a),0>a&&Wn(a,">= zero",no,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&rn(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&rn(this,a),this.cr=a,this.xe=null}}}),no.prototype.isDark=no.prototype.Gx,no.prototype.darkenBy=no.prototype.Wy,no.prototype.lightenBy=no.prototype.Vz,no.prototype.addColorStop=no.prototype.addColorStop;var zt=216/24389,se=24389/27,Fe=[95.047,100,108.883],Xe=null,Ie=new Rf,bn=new Rf,Hn=new Rf,ei=new Rf,Di=!1;no.className="Brush";var Ir;no.Solid=Ir=new Ze(no,"Solid",0);var pr;no.Linear=pr=new Ze(no,"Linear",1);var Sr;no.Radial=Sr=new Ze(no,"Radial",2);var Ko;no.Pattern=Ko=new Ze(no,"Pattern",4);var $r;no.Lab=$r=new Ze(no,"Lab",5);var eo;no.HSL=eo=new Ze(no,"HSL",6),no.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},no.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;Di||(Ct(),Di=!0);var y=Xe;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)},no.lighten=function(a){return n0(a)},no.lightenBy=n0,no.darken=function(a){return i0(a)},no.darkenBy=i0,no.mix=np,no.isDark=Zd;function io(){this.xa="Base"}io.prototype.measure=function(){},io.prototype.Yz=function(a,y,x,E,b){a.measure(y,x,E,b)},io.prototype.arrange=function(){},io.prototype.Ly=function(a,y,x,E,b,z){a.arrange(y,x,E,b,z)},io.prototype.iA=function(a){a.Uj()},io.prototype.gc=function(){},Ue.Object.defineProperties(io.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return En}}}),io.prototype.remeasureObject=io.prototype.iA,io.prototype.arrangeElement=io.prototype.Ly,io.prototype.measureElement=io.prototype.Yz,io.className="PanelLayout";function Jo(){this.xa="Base"}He(Jo,io),Jo.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length;a=sl(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 Et=lt.position.y;isFinite(yt)||(yt=0),isFinite(Et)||(Et=0),lt instanceof yr&<.isGeometryPositioned&&(lt=lt.strokeWidth/2,yt-=lt,Et-=lt),Nr(b,yt,Et,ft,ut)}}},Jo.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 yr&&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 ko(){this.xa="Base"}He(ko,io),ko.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length;y=xn(),z=sl(a);for(var ot=0;ot<rt;ot++){var lt=E[ot];if(lt.visible||lt===z){var ut=Ua(lt,!1);if(ut!==wn&&ut!==bi)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));Nn(y)},ko.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,Et=yt.top+yt.bottom,Tt=z+b.bottom,Dt=ft.height,Xt=Ua(ut,!1);(isNaN(ut.desiredSize.height)&&Xt===Mn||Xt===zi)&&(Dt=Math.max(x.height-Et-Tt,0)),Et=Dt+Et+Tt,Tt=ut.alignment,Tt.Xb()&&(Tt=a.defaultAlignment),Tt.sb()||(Tt=Cr),tt&&(rt-=ft.width+yt.left+yt.right),ut.arrange(rt+Tt.offsetX+yt.left,lt+Tt.offsetY+yt.top+(x.height*Tt.y-Et*Tt.y),ft.width,Dt),tt||(rt+=ft.width+yt.left+yt.right)}}};function jr(){this.xa="Base"}He(jr,io),jr.prototype.measure=function(a,y,x,E,b,z){var tt=E.length;x=xn();for(var rt=sl(a),ot=0;ot<tt;ot++){var lt=E[ot];if(lt.visible||lt===rt){var ut=Ua(lt,!1);if(ut!==wn&&ut!==zi)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,gr(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);Nn(x)}},jr.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,Et=yt.left+yt.right,Tt=z+b.right,Dt=ft.width,Xt=Ua(ut,!1);(isNaN(ut.desiredSize.width)&&Xt===Mn||Xt===bi)&&(Dt=Math.max(x.width-Et-Tt,0)),Et=Dt+Et+Tt,Tt=ut.alignment,Tt.Xb()&&(Tt=a.defaultAlignment),Tt.sb()||(Tt=Cr),tt&&(rt-=ft.height+yt.bottom+yt.top),ut.arrange(lt+Tt.offsetX+yt.left+(x.width*Tt.x-Et*Tt.x),rt+Tt.offsetY+yt.top,Dt,ft.height),tt||(rt+=ft.height+yt.bottom+yt.top)}}};function us(){this.xa="Base"}He(us,io),us.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 Et=Math.max(z+ut,0),Tt=Math.max(tt+ft,0),Dt=a.isClipping,Xt=Oe.allocAt(-lt.left,-lt.top,Et,Tt),jt=Oe.allocAt(0,0,z,tt);gs(ot,jt,!0),z=jt.width,tt=jt.height;for(var ie=!0,le=sl(a),fe=0;fe<rt;fe++){var ye=E[fe];yt=y;var _e=x;if(ye!==ot&&(ye.visible||ye===le)){lt=ye.margin;var Xn=lt.left,mi=lt.top;switch(Et=lt.right+lt.left,Tt=lt.top+lt.bottom,lt=Ua(ye,!1),lt){case Mn:yt=z,_e=tt,mi=Xn=Tt=Et=0;break;case bi:yt=z,Xn=Et=0;break;case zi:_e=tt,mi=Tt=0}ye.measure(yt,_e,0,0),yt=ye.measuredBounds,Et=Math.max(yt.width+Et,0),Tt=Math.max(yt.height+Tt,0),lt=ye.alignment,lt.Xb()&&(lt=a.defaultAlignment),lt.sb()||(lt=Cr);var hi=ye.alignmentFocus;if(hi.Xb()&&(hi=Cr),_e=null,ye instanceof En&&ye.$e!==""&&(_e=ye.fb(ye.$e),_e===ye&&(_e=null)),Xn=jt.x-Xn,mi=jt.y-mi,_e!==null){for(ye.arrange(0,0,yt.width,yt.height),yt=_e.actualBounds,yt=It.allocAt(yt.x+(hi.x*yt.width-hi.offsetX),yt.y+(hi.y*yt.height-hi.offsetY)),_e=_e.panel;_e!==ye;)_e.transform.Ga(yt),_e=_e.panel;Xn+=lt.x*z+lt.offsetX-yt.x,mi+=lt.y*tt+lt.offsetY-yt.y,It.free(yt)}else Xn+=lt.x*z+lt.offsetX-(hi.x*yt.width+hi.offsetX),mi+=lt.y*tt+lt.offsetY-(hi.y*yt.height+hi.offsetY);ie?(ie=!1,b.h(Xn,mi,Et,Tt)):Nr(b,Xn,mi,Et,Tt)}}switch(ie?b.assign(Xt):Dt?b.Uu(jt.x,jt.y,jt.width,jt.height):Nr(b,Xt.x,Xt.y,Xt.width,Xt.height),Oe.free(Xt),Oe.free(jt),lt=ot.stretch,lt===rr&&(lt=Ua(ot,!1)),lt){case wn:return;case Mn:if(!isFinite(y)&&!isFinite(x))return;break;case bi:if(!isFinite(y))return;break;case zi:if(!isFinite(x))return}for(yt=ot.measuredBounds,z=yt.width,tt=yt.height,Et=Math.max(z+ut,0),Tt=Math.max(tt+ft,0),lt=ot.margin,jt=Oe.allocAt(-lt.left,-lt.top,Et,Tt),gs(ot,jt,!0),z=jt.width,tt=jt.height,y=0;y<rt;y++)x=E[y],x===ot||!x.visible&&x!==le||(lt=x.margin,Et=lt.right+lt.left,Tt=lt.top+lt.bottom,yt=x.measuredBounds,Et=Math.max(yt.width+Et,0),Tt=Math.max(yt.height+Tt,0),ut=x.alignment,ut.Xb()&&(ut=a.defaultAlignment),ut.sb()||(ut=Cr),x=x.alignmentFocus,x.Xb()&&(x=Cr),ie?(ie=!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,Et,Tt)):Nr(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,Et,Tt));ie?b.assign(Xt):Dt?b.Uu(jt.x,jt.y,jt.width,jt.height):Nr(b,Xt.x,Xt.y,Xt.width,Xt.height),Oe.free(jt)},us.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=Oe.allocAt(0,0,tt,rt),gs(b,tt,!1),rt=0;rt<E;rt++){var ft=y[rt];if(ft!==b){lt=ft.measuredBounds;var yt=lt.width,Et=lt.height;ut=ft.alignment,ut.Xb()&&(ut=a.defaultAlignment),ut.sb()||(ut=Cr);var Tt=ft.alignmentFocus;if(Tt.Xb()&&(Tt=Cr),lt=null,ft instanceof En&&ft.$e!==""&&(lt=ft.fb(ft.$e),lt===ft&&(lt=null)),lt!==null){var Dt=lt.actualBounds;for(Tt=It.allocAt(Dt.x+(Tt.x*Dt.width-Tt.offsetX),Dt.y+(Tt.y*Dt.height-Tt.offsetY)),lt=lt.panel;lt!==ft;)lt.transform.Ga(Tt),lt=lt.panel;lt=ut.x*tt.width+ut.offsetX-Tt.x,ut=ut.y*tt.height+ut.offsetY-Tt.y,It.free(Tt)}else lt=ut.x*tt.width+ut.offsetX-(Tt.x*yt+Tt.offsetX),ut=ut.y*tt.height+ut.offsetY-(Tt.y*Et+Tt.offsetY);lt+=tt.x-x.x,ut+=tt.y-x.y,ft.visible&&ft.arrange(z+lt,ot+ut,yt,Et)}}Oe.free(tt)};function gs(a,y,x){var E=null;if(a instanceof En&&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 No(){this.xa="Base"}He(No,io),No.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,Et=lt.top+lt.bottom;ot.measure(y,x,z,tt),lt=ot.measuredBounds;var Tt=0,Dt=null;ot instanceof yr&&(Dt=ot,Tt=Dt.strokeWidth*Dt.scale);var Xt=Math.max(lt.width+yt,0);lt=Math.max(lt.height+Et,0);var jt=Dm(ot),ie=jt.x*Xt+jt.offsetX;jt=jt.y*lt+jt.offsetY;var le=Im(ot),fe=le.x*Xt+le.offsetX;for(le=le.y*lt+le.offsetY,isFinite(y)&&(ut=Math.max(Math.abs(ie-fe)-Tt,0)),isFinite(x)&&(ft=Math.max(Math.abs(jt-le)-Tt,0)),Tt=cn.alloc(),Tt.h(0,0),a=sl(a),le=0;le<rt;le++)jt=E[le],jt===ot||!jt.visible&&jt!==a||(lt=jt.margin,Xt=lt.right+lt.left,ie=lt.top+lt.bottom,jt.measure(ut,ft,0,0),lt=jt.measuredBounds,Xt=Math.max(lt.width+Xt,0),lt=Math.max(lt.height+ie,0),Tt.h(Math.max(Xt,Tt.width),Math.max(lt,Tt.height)));if(rt===1)b.width=Xt,b.height=lt,cn.free(Tt);else{switch(jt=Dm(ot),le=Im(ot),rt=E=0,le.x!==jt.x&&le.y!==jt.y&&(E=Tt.width/Math.abs(le.x-jt.x),rt=Tt.height/Math.abs(le.y-jt.y)),cn.free(Tt),Tt=0,Dt!==null&&(Tt=Dt.strokeWidth*Dt.scale,_m(Dt)===Si&&(E=rt=Math.max(E,rt))),E+=Math.abs(jt.offsetX)+Math.abs(le.offsetX)+Tt,rt+=Math.abs(jt.offsetY)+Math.abs(le.offsetY)+Tt,Dt=ot.stretch,Dt===rr&&(Dt=Ua(ot,!1)),Dt){case wn:tt=z=0;break;case Mn:isFinite(y)&&(E=y),isFinite(x)&&(rt=x);break;case bi:isFinite(y)&&(E=y),tt=0;break;case zi: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+Et}},No.prototype.arrange=function(a,y){var x=y.length,E=a.Pb(),b=E.measuredBounds,z=Oe.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,Et=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,Nr(z,Et,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=Cr),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&&(ho(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 Oe(z.x,z.y,z.width,z.height))));Oe.free(z)};function Ca(){this.xa="Base",this.name="Table"}He(Ca,io),Ca.prototype.measure=function(a,y,x,E,b){for(var z=E.length,tt=xn(),rt=xn(),ot=0;ot<z;ot++){var lt=E[ot],ut=lt instanceof En?lt:null;if(ut!==null&&vc(ut)&<.visible){rt.push(ut);for(var ft=ut.O.s,yt=ft.length,Et=0;Et<yt;Et++){var Tt=ft[Et];ut.type===En.TableRow?Tt.row=lt.row:ut.type===En.TableColumn&&(Tt.column=lt.column),tt.push(Tt)}}else tt.push(lt)}z=tt.length,z===0&&(a.Fb(0),a.Eb(0));for(var Dt=[],Xt=0;Xt<z;Xt++){var jt=tt[Xt];jt.visible&&(Ps(jt,!0),qu(jt,!0),Dt[jt.row]||(Dt[jt.row]=[]),Dt[jt.row][jt.column]||(Dt[jt.row][jt.column]=[]),Dt[jt.row][jt.column].push(jt))}Nn(tt);var ie=xn(),le=xn(),fe=xn(),ye={count:0},_e={count:0},Xn=y,mi=x,hi=a.rowDefs,Rn=a.colDefs,mn=null;z=hi.length;for(var ur=0;ur<z;ur++)mn=hi[ur],mn!==void 0&&(mn.actual=0);z=Rn.length;for(var qi=0;qi<z;qi++)mn=Rn[qi],mn!==void 0&&(mn.actual=0);for(var Jr=Dt.length,So=0,Zs=0;Zs<Jr;Zs++)Dt[Zs]&&(So=Math.max(So,Dt[Zs].length));var $s=Math.min(a.topIndex,Jr-1),Oa=Math.min(a.leftIndex,So-1),Ys=0;Jr=Dt.length;for(var Lc=sl(a),Es=0;Es<Jr;Es++)if(Dt[Es]){So=Dt[Es].length;var rA=a.Fb(Es);rA.actual=0;for(var Ha=rA.oc=0;Ha<So;Ha++)if(Dt[Es][Ha]){var Mc=a.Eb(Ha);ie[Ha]===void 0&&(Mc.actual=0,Mc.oc=0,ie[Ha]=!0);for(var Yl=Dt[Es][Ha],gu=Yl.length,Dl=0;Dl<gu;Dl++){var Sl=Yl[Dl];if(Sl.visible||Sl===Lc){var md=1<Sl.rowSpan||1<Sl.columnSpan;md&&(Es<$s||Ha<Oa||le.push(Sl));var oA=Sl.margin,Kg=oA.right+oA.left,Il=oA.top+oA.bottom,Ra=Xo(Sl,rA,Mc,!1),zp=Sl.desiredSize,qf=!isNaN(zp.height),LA=!isNaN(zp.width)&&qf;if(md||Ra===wn||LA||Es<$s||Ha<Oa||(ye[Ha]!==void 0||Ra!==Mn&&Ra!==bi||(ye[Ha]=-1,ye.count++),_e[Es]!==void 0||Ra!==Mn&&Ra!==zi||(_e[Es]=-1,_e.count++),fe.push(Sl)),Sl.measure(1/0,1/0,0,0),!(Es<$s||Ha<Oa)){var Bl=Sl.measuredBounds,of=Math.max(Bl.width+Kg,0),Ul=Math.max(Bl.height+Il,0);if(Sl.rowSpan===1&&(Ra===wn||Ra===bi)){mn=a.Fb(Es);var vd=mn.Wc();Ys=Math.max(Ul-mn.actual,0),Ys+vd>mi&&(Ys=Math.max(mi-vd,0));var wm=mn.oa===0;mn.oc=mn.oc+Ys,mn.actual=mn.oa+Ys,mi=Math.max(mi-(Ys+(wm?vd:0)),0)}if(Sl.columnSpan===1&&(Ra===wn||Ra===zi)){mn=a.Eb(Ha);var jp=mn.Wc();Ys=Math.max(of-mn.actual,0),Ys+jp>Xn&&(Ys=Math.max(Xn-jp,0));var iy=mn.oa===0;mn.oc=mn.oc+Ys,mn.actual=mn.oa+Ys,Xn=Math.max(Xn-(Ys+(iy?jp:0)),0)}md&&Sl.Uj()}}}}}Nn(ie);var uh=0,Th=0;z=a.columnCount;for(var $f=0;$f<z;$f++){var yd=Rn[$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=hi[Gg];wd!==void 0&&(Th+=isNaN(wd.Hc)?wd.oc:wd.Hc,wd.oc!==0&&(Th+=wd.Wc()))}Xn=Math.max(y-uh,0);var Ah=mi=Math.max(x-Th,0),bc=Xn;z=fe.length;for(var Cl=0;Cl<z;Cl++){var MA=fe[Cl],xm=a.Fb(MA.row),Nh=a.Eb(MA.column),zg=MA.measuredBounds,sA=MA.margin,sf=sA.right+sA.left,bA=sA.top+sA.bottom;ye[MA.column]=Nh.oc===0&&ye[MA.column]!==void 0?Math.max(zg.width+sf,ye[MA.column]):null,_e[MA.row]=xm.oc===0&&_e[MA.row]!==void 0?Math.max(zg.height+bA,_e[MA.row]):null}var tg=0,jg=0,Ru;for(Ru in _e)Ru!=="count"&&(tg+=_e[Ru]);for(Ru in ye)Ru!=="count"&&(jg+=ye[Ru]);for(var aa=cn.alloc(),Vp=0;Vp<z;Vp++){var Ja=fe[Vp];if(Ja.visible||Ja===Lc){var Ls=a.Fb(Ja.row),qa=a.Eb(Ja.column),Dh=0;isFinite(qa.width)?Dh=qa.width:(isFinite(Xn)&&ye[Ja.column]!==null?jg===0?Dh=qa.actual+Xn:Dh=ye[Ja.column]/jg*bc:ye[Ja.column]!==null?Dh=Xn:Dh=qa.actual||Xn,Dh=Math.max(0,Dh-qa.Wc()));var kc=0;switch(isFinite(Ls.height)?kc=Ls.height:(isFinite(mi)&&_e[Ja.row]!==null?tg===0?kc=Ls.actual+mi:kc=_e[Ja.row]/tg*Ah:_e[Ja.row]!==null?kc=mi:kc=Ls.actual||mi,kc=Math.max(0,kc-Ls.Wc())),aa.h(Math.max(qa.minimum,Math.min(Dh,qa.maximum)),Math.max(Ls.minimum,Math.min(kc,Ls.maximum))),Ra=Xo(Ja,Ls,qa,!1),Ra){case bi:aa.height=Math.max(aa.height,Ls.actual+mi);break;case zi:aa.width=Math.max(aa.width,qa.actual+Xn)}var af=Ja.margin,ry=af.right+af.left,Sm=af.top+af.bottom;Ja.Uj(),Ja.measure(aa.width,aa.height,qa.minimum,Ls.minimum);var Vg=Ja.measuredBounds,lf=Math.max(Vg.width+ry,0),eg=Math.max(Vg.height+Sm,0);isFinite(Xn)&&(lf=Math.min(lf,aa.width)),isFinite(mi)&&(eg=Math.min(eg,aa.height));var Pl=0;Pl=Ls.actual,Ls.actual=Math.max(Ls.actual,eg),Ls.oc=Math.max(Ls.oc,eg),Ys=Ls.actual-Pl,mi=Math.max(mi-Ys,0),_e[Ja.row]===null&&(Ah=Math.max(Ah-Ys,0)),Pl=qa.actual,qa.actual=Math.max(qa.actual,lf),qa.oc=Math.max(qa.oc,lf),Ys=qa.actual-Pl,Xn=Math.max(Xn-Ys,0),ye[Ja.column]===null&&(bc=Math.max(bc-Ys,0))}}Nn(fe);var Ih=cn.alloc(),aA=xn(),ou=xn();if(z=le.length,z!==0){for(var xd=0;xd<Jr;xd++)if(Dt[xd]){So=Dt[xd].length;var Wg=a.Fb(xd);aA[xd]=Wg.actual;for(var Sd=0;Sd<So;Sd++)if(Dt[xd][Sd]){var Bm=a.Eb(Sd);ou[Sd]=Bm.actual}}}for(var Zg=0;Zg<z;Zg++){var As=le[Zg];if(As.visible||As===Lc){var _u=a.Fb(As.row),pu=a.Eb(As.column);switch(aa.h(Math.max(pu.minimum,Math.min(y,pu.maximum)),Math.max(_u.minimum,Math.min(x,_u.maximum))),Ra=Xo(As,_u,pu,!1),Ra){case Mn:ou[pu.index]!==0&&(aa.width=Math.min(aa.width,ou[pu.index])),aA[_u.index]!==0&&(aa.height=Math.min(aa.height,aA[_u.index]));break;case bi:ou[pu.index]!==0&&(aa.width=Math.min(aa.width,ou[pu.index]));break;case zi:aA[_u.index]!==0&&(aa.height=Math.min(aa.height,aA[_u.index]))}isFinite(pu.width)&&(aa.width=pu.width),isFinite(_u.height)&&(aa.height=_u.height),Ih.h(0,0);for(var Cm=pu.minimum,Ql=_u.minimum,Tc=1;Tc<As.rowSpan&&!(As.row+Tc>=a.rowCount);Tc++)mn=a.Fb(As.row+Tc),Ys=0,Ys=Ra===Mn||Ra===zi?Math.max(mn.minimum,aA[As.row+Tc]===0?mn.maximum:Math.min(aA[As.row+Tc],mn.maximum)):Math.max(mn.minimum,isNaN(mn.Hc)?mn.maximum:Math.min(mn.Hc,mn.maximum)),Ih.height+=Ys,Ql+=mn.minimum;for(var mu=1;mu<As.columnSpan&&!(As.column+mu>=a.columnCount);mu++)mn=a.Eb(As.column+mu),Ys=0,Ys=Ra===Mn||Ra===bi?Math.max(mn.minimum,ou[As.column+mu]===0?mn.maximum:Math.min(ou[As.column+mu],mn.maximum)):Math.max(mn.minimum,isNaN(mn.Hc)?mn.maximum:Math.min(mn.Hc,mn.maximum)),Ih.width+=Ys,Cm+=mn.minimum;aa.width+=Ih.width,aa.height+=Ih.height;var Yg=As.margin,Bd=Yg.right+Yg.left,Wp=Yg.top+Yg.bottom;As.measure(aa.width,aa.height,Cm,Ql);for(var Xg=As.measuredBounds,kA=Math.max(Xg.width+Bd,0),uf=Math.max(Xg.height+Wp,0),Cd=0,Jg=0;Jg<As.rowSpan&&!(As.row+Jg>=a.rowCount);Jg++)mn=a.Fb(As.row+Jg),Cd+=mn.total||0;if(Cd<uf){var Nc=uf-Cd,hh=uf-Cd;if(As.spanAllocation!==null)for(var Dc=As.spanAllocation,Uh=0;Uh<As.rowSpan&&!(0>=Nc)&&!(As.row+Uh>=a.rowCount);Uh++){mn=a.Fb(As.row+Uh);var Ic=mn.oa||0,Af=Dc(As,mn,hh);mn.actual=Math.min(mn.maximum,Ic+Af),mn.oa!==Ic&&(Nc-=mn.oa-Ic)}for(;0<Nc;){var lA=mn.oa||0;if(isNaN(mn.height)&&mn.maximum>lA&&(mn.actual=Math.min(mn.maximum,lA+Nc),mn.oa!==lA&&(Nc-=mn.oa-lA)),mn.index===0)break;mn=a.Fb(mn.index-1)}}for(var ng=0,Uc=0;Uc<As.columnSpan&&!(As.column+Uc>=a.columnCount);Uc++)mn=a.Eb(As.column+Uc),ng+=mn.total||0;if(ng<kA){var ig=kA-ng,oy=kA-ng;if(As.spanAllocation!==null)for(var Qh=As.spanAllocation,hf=0;hf<As.columnSpan&&!(0>=ig)&&!(As.column+hf>=a.columnCount);hf++){mn=a.Eb(As.column+hf);var Zp=mn.oa||0,sy=Qh(As,mn,oy);mn.actual=Math.min(mn.maximum,Zp+sy),mn.oa!==Zp&&(ig-=mn.oa-Zp)}for(;0<ig;){var Pm=mn.oa||0;if(isNaN(mn.width)&&mn.maximum>Pm&&(mn.actual=Math.min(mn.maximum,Pm+ig),mn.oa!==Pm&&(ig-=mn.oa-Pm)),mn.index===0)break;mn=a.Eb(mn.index-1)}}}}Nn(le),cn.free(Ih),cn.free(aa),aA!==void 0&&Nn(aA),ou!==void 0&&Nn(ou);var rg=0,og=0,Fm=a.desiredSize,vw=a.maxSize;Ra=Ua(a,!0);var Yp=Th=uh=0,Xp=0;z=a.columnCount;for(var Em=0;Em<z;Em++)Rn[Em]!==void 0&&(mn=a.Eb(Em),isFinite(mn.width)?(Yp+=mn.width,Yp+=mn.Wc()):a0(mn)===ap?(Yp+=mn.oa,Yp+=mn.Wc()):mn.oa!==0&&(uh+=mn.oa,uh+=mn.Wc()));isFinite(Fm.width)?rg=Math.min(Fm.width,vw.width):rg=Ra!==wn&&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++)Rn[Lm]!==void 0&&(mn=a.Eb(Lm),isFinite(mn.width)||a0(mn)===ap||(mn.actual=mn.oa*rx),mn.position=b.width,mn.oa!==0&&(b.width+=mn.oa,b.width+=mn.Wc()));z=a.rowCount;for(var Mm=0;Mm<z;Mm++)hi[Mm]!==void 0&&(mn=a.Fb(Mm),isFinite(mn.height)?(Xp+=mn.height,Xp+=mn.Wc()):a0(mn)===ap?(Xp+=mn.oa,Xp+=mn.Wc()):mn.oa!==0&&(Th+=mn.oa,Th+=mn.Wc()));isFinite(Fm.height)?og=Math.min(Fm.height,vw.height):og=Ra!==wn&&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),bm=0;bm<z;bm++)hi[bm]!==void 0&&(mn=a.Fb(bm),isFinite(mn.height)||a0(mn)===ap||(mn.actual=mn.oa*ox),mn.position=b.height,mn.oa!==0&&(b.height+=mn.oa,b.height+=mn.Wc()));z=rt.length;for(var ay=0;ay<z;ay++){var Jp=rt[ay],ly=0,uy=0;Jp.type===En.TableRow?(ly=b.width,mn=a.Fb(Jp.row),uy=mn.actual):(mn=a.Eb(Jp.column),ly=mn.actual,uy=b.height),Jp.measuredBounds.h(0,0,ly,uy),Ps(Jp,!1)}Nn(rt),a.inRowsCols=Dt},Ca.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,Et=Math.min(a.topIndex,lt-1);if(0<ot.length){for(;Et!==lt&&(ot[Et]===void 0||ot[Et].oa===0);)Et++;Et=Math.max(Math.min(Et,lt-1),0),ft=-ot[Et].position}var Tt=Math.min(a.leftIndex,ut-1);if(0<rt.length){for(;Tt!==ut&&(rt[Tt]===void 0||rt[Tt].oa===0);)Tt++;Tt=Math.max(Math.min(Tt,ut-1),0),yt=-rt[Tt].position}for(var Dt=0,Xt=0;Dt!==lt&&ot[Dt]===void 0;)Dt++;for(;Xt!==lt&&rt[Xt]===void 0;)Xt++;ut=a.part,a.Fb(Dt),a.Eb(Xt);for(var jt=0;jt<y.length;jt++){var ie=y[jt];if(ie instanceof En&&ie.visible&&vc(ie)){if(ie.type===En.TableRow){rt=a.Fb(ie.row);var le=a.Eb(Xt)}else rt=a.Fb(Dt),le=a.Eb(ie.column);ot=rt.position+ft+b,rt.oa!==0&&(ot+=rt.Io(Math.max(Dt,Et))),rt=le.position+yt+z,le.oa!==0&&(rt+=le.Io(Math.max(Xt,Tt))),le=ie.measuredBounds,ie.Uk(),ie.actualBounds.ka();var fe=ie.actualBounds,ye=Oe.allocAt(fe.x,fe.y,fe.width,fe.height);fe.x=ie.type===En.TableRow?z:rt,fe.y=ie.type===En.TableColumn?b:ot,fe.width=le.width,fe.height=le.height,ie.actualBounds.freeze(),qu(ie,!1),Ur(ye,fe)||ut===null||(ut.oh(),ie.Pn(ut)),Oe.free(ye)}}for(jt=cn.alloc(),ie=0;ie<lt;ie++)if(tt[ie]){for(ut=tt[ie].length,le=a.Fb(ie),ot=le.position+ft+b,le.oa!==0&&(ot+=le.Io(Math.max(Dt,Et))),fe=0;fe<ut;fe++)if(tt[ie][fe]){ye=a.Eb(fe),rt=ye.position+yt+z,ye.oa!==0&&(rt+=ye.Io(Math.max(Xt,Tt)));for(var _e=tt[ie][fe],Xn=_e.length,mi=0;mi<Xn;mi++){var hi=_e[mi],Rn=hi.measuredBounds;jt.h(0,0);for(var mn=1;mn<hi.rowSpan&&!(ie+mn>=a.rowCount);mn++){var ur=a.Fb(ie+mn);ur.oa!==0&&(jt.height+=ur.total)}for(mn=1;mn<hi.columnSpan&&!(fe+mn>=a.columnCount);mn++)ur=a.Eb(fe+mn),ur.oa!==0&&(jt.width+=ur.total);var qi=ye.oa+jt.width,Jr=le.oa+jt.height;mn=rt,ur=ot;var So=qi,Zs=Jr,$s=rt,Oa=ot,Ys=qi,Lc=Jr;rt+qi>x.width&&(Ys=Math.max(x.width-rt,0)),ot+Jr>x.height&&(Lc=Math.max(x.height-ot,0));var Es=hi.alignment;if(Es.Xb()){Es=a.defaultAlignment,Es.sb()||(Es=Cr);var rA=Es.x,Ha=Es.y,Mc=Es.offsetX;Es=Es.offsetY;var Yl=ye.alignment,gu=le.alignment;Yl.sb()&&(rA=Yl.x,Mc=Yl.offsetX),gu.sb()&&(Ha=gu.y,Es=gu.offsetY)}else rA=Es.x,Ha=Es.y,Mc=Es.offsetX,Es=Es.offsetY;(isNaN(rA)||isNaN(Ha))&&(Ha=rA=.5,Es=Mc=0),Yl=Rn.width,gu=Rn.height;var Dl=hi.margin,Sl=Dl.left+Dl.right,md=Dl.top+Dl.bottom,oA=Xo(hi,le,ye,!1);!isNaN(hi.desiredSize.width)||oA!==Mn&&oA!==bi||(Yl=Math.max(qi-Sl,0)),!isNaN(hi.desiredSize.height)||oA!==Mn&&oA!==zi||(gu=Math.max(Jr-md,0)),qi=hi.maxSize,Jr=hi.minSize,Yl=Math.min(qi.width,Yl),gu=Math.min(qi.height,gu),Yl=Math.max(Jr.width,Yl),gu=Math.max(Jr.height,gu),qi=gu+md,mn+=So*rA-(Yl+Sl)*rA+Mc+Dl.left,ur+=Zs*Ha-qi*Ha+Es+Dl.top,hi.visible&&(ho($s,Oa,Ys,Lc,mn,ur,Rn.width,Rn.height)?hi.arrange(mn,ur,Yl,gu):hi.arrange(mn,ur,Yl,gu,new Oe($s,Oa,Ys,Lc)))}}}for(cn.free(jt),a=0;a<E;a++)x=y[a],z=x instanceof En?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 bl(){this.xa="Base"}He(bl,io),bl.prototype.measure=function(){},bl.prototype.arrange=function(){};function Vl(){this.xa="Base"}He(Vl,io),Vl.prototype.measure=function(){},Vl.prototype.arrange=function(){};function _s(){this.xa="Base"}He(_s,io),_s.prototype.measure=function(a,y,x,E,b,z,tt){1<E.length&&he("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),Et=Math.max(x-ot,0),Tt=1;a.viewboxStretch===Si?ft!==0&&rt!==0&&(Tt=Math.min(yt/ft,Et/rt)):ft!==0&&rt!==0&&(Tt=Math.max(yt/ft,Et/rt)),Tt===0&&(Tt=1e-4),E.Ca*=Tt,ut!==E.scale&&(Ps(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)},_s.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=Cr),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 Qa(){this.xa="Base"}He(Qa,io),Qa.prototype.measure=function(){},Qa.prototype.arrange=function(){},Qa.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 Et=[],Tt=a.O.s,Dt=Tt.length,Xt=0;Xt<Dt;Xt++){var jt=Tt[Xt],ie=[];if(Et.push(ie),jt.visible){var le=jt.interval;if(!(0>le)){jt=Mh(jt.figure);for(var fe=0;fe<Dt;fe++)if(fe!==Xt){var ye=Tt[fe];ye.visible&&Mh(ye.figure)===jt&&(ye=ye.interval,ye>le&&ie.push(ye))}}}}for(Tt=a.O.s,Dt=Tt.length,Xt=0;Xt<Dt;Xt++){var _e=Tt[Xt];if(_e.visible&&(ie=_e.interval||1,jt=Math.abs(ie),!(2>b*jt*x))){if(le=_e.segmentIndex,(!isFinite(le)||isNaN(le))&&(le=0),0>le&&(le=jt-Math.min(-le,jt)),le=Math.round(le%jt),jt=_e.opacity,fe=1,jt!==1){if(jt===0)continue;fe=y.globalAlpha,y.globalAlpha=fe*jt}ye=Et[Xt];var Xn=!1,mi=_e.strokeDashArray;if(mi!==null&&(Xn=!0,y.js(mi,_e.strokeDashOffset)),_e.figure==="LineV"&&_e.stroke!==null&&0<_e.strokeWidth){for(y.lineWidth=_e.strokeWidth,jo(a,y,_e.stroke,!1,!1,z,tt),y.beginPath(),mi=_e=Math.floor((yt-b)/b);mi<=_e+lt;mi++){var hi=mi*b+yt;0<=hi&&hi<=rt&&CA(mi,ie,le,ye)&&(y.moveTo(hi,0),y.lineTo(hi,ot))}y.stroke(),y.Se()}else if(_e.figure==="LineH"&&_e.stroke!==null&&0<_e.strokeWidth){for(y.lineWidth=_e.strokeWidth,jo(a,y,_e.stroke,!1,!1,z,tt),y.beginPath(),mi=_e=Math.floor((ft-E)/E);mi<=_e+ut;mi++)hi=mi*E+ft,0<=hi&&hi<=ot&&CA(mi,ie,le,ye)&&(y.moveTo(0,hi),y.lineTo(rt,hi));y.stroke(),y.Se()}else if(_e.figure==="BarV"&&_e.fill!==null)for(jo(a,y,_e.fill,!0,!1,z,tt),_e=_e.width,isNaN(_e)&&(_e=b),hi=mi=Math.floor((yt-b)/b);hi<=mi+lt;hi++){var Rn=hi*b+yt;0<=Rn+_e&&Rn<=rt&&CA(hi,ie,le,ye)&&y.fillRect(Rn,0,_e,ot)}else if(_e.figure==="BarH"&&_e.fill!==null)for(jo(a,y,_e.fill,!0,!1,z,tt),_e=_e.height,isNaN(_e)&&(_e=E),hi=mi=Math.floor((ft-E)/E);hi<=mi+ut;hi++)Rn=hi*E+ft,0<=Rn+_e&&Rn<=ot&&CA(hi,ie,le,ye)&&y.fillRect(0,Rn,rt,_e);Xn&&y.fs(),jt!==1&&(y.globalAlpha=fe)}}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 kl(){this.xa="Base"}He(kl,io),kl.prototype.measure=function(a,y,x,E,b){var z=E.length;if(a instanceof Wr||a instanceof _n){var tt=null,rt=null;if(a instanceof _n&&(tt=a),a instanceof Wr&&(rt=a,tt=rt.adornedPart,a.j===null&&(a.j=[])),tt instanceof _n){var ot=tt;if(z===0)gr(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var lt=a instanceof Wr?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,Et=a.j;if(Et.length=0,lt!==null){tu(a,rt,yt,lt);var Tt=lt.measuredBounds;x.ed(Tt),Et.push(Tt)}Tt=$i.alloc();for(var Dt=It.alloc(),Xt=It.alloc(),jt=0;jt<z;jt++){var ie=E[jt];if(ie!==lt)if(ie.isPanelMain&&ie instanceof yr){tu(a,rt,yt,ie);var le=ie.measuredBounds;x.ed(le),Et.push(le)}else if(2>ft)ie.measure(1/0,1/0,0,0),le=ie.measuredBounds,x.ed(le),Et.push(le);else{var fe=ie.segmentIndex,ye=ie.segmentFraction,_e=ie.alignmentFocus;_e.Mc()&&(_e=Cr);var Xn=ie.segmentOrientation,mi=ie.segmentOffset;if(isNaN(fe)){var hi=ot.ua;le=xn(),hi.Qu(ye,le);var Rn=It.allocAt(le[0],le[1]);if(Rn.add(ot.i(0)),hi.type===On.j?Rn.offset(-hi.startX,-hi.startY):(hi=hi.figures.first(),hi!==null&&Rn.offset(-hi.startX,-hi.startY)),hi=le[2],Xn!==Va){var mn=ot.computeAngle(ie,Xn,hi);ie.Kb=mn}mn=Rn.x-y.x;var ur=Rn.y-y.y;It.free(Rn),Nn(le)}else if(fe<-ft||fe>=ft)le=It.alloc(),ot.vg(),ot.computeMidPoint(le),hi=ot.midAngle,Xn!==Va&&(mn=ot.computeAngle(ie,Xn,hi),ie.Kb=mn),mn=le.x-y.x,ur=le.y-y.y,It.free(le);else{if(mn=0,0<=fe?(ur=ut.M(fe),le=fe<ft-1?ut.M(fe+1):ur):(mn=ft+fe,ur=ut.M(mn),le=0<mn?ut.M(mn-1):ur),ur.Xa(le)){0<=fe?(hi=0<fe?ut.M(fe-1):ur,mn=fe<ft-2?ut.M(fe+2):le):(hi=mn<ft-1?ut.M(mn+1):ur,mn=1<mn?ut.M(mn-2):le),Rn=hi.Bf(ur);var qi=le.Bf(mn);hi=Rn>qi+10?0<=fe?hi.ab(ur):ur.ab(hi):qi>Rn+10?0<=fe?le.ab(mn):mn.ab(le):0<=fe?hi.ab(mn):mn.ab(hi)}else hi=0<=fe?ur.ab(le):le.ab(ur);Xn!==Va&&(mn=ot.computeAngle(ie,Xn,hi),ie.Kb=mn),mn=ur.x+(le.x-ur.x)*ye-y.x,ur=ur.y+(le.y-ur.y)*ye-y.y}ie.measure(1/0,1/0,0,0),le=ie.measuredBounds,Rn=ie.naturalBounds;var Jr=0;ie instanceof yr&&(Jr=ie.strokeWidth),qi=Rn.width+Jr;var So=Rn.height+Jr;Tt.reset(),Tt.translate(-le.x,-le.y),Tt.scale(ie.scale,ie.scale),Tt.rotate(Xn===Va?ie.angle:hi,qi/2,So/2),Xn!==mp&&Xn!==yp||Tt.rotate(90,qi/2,So/2),Xn!==vp&&Xn!==wp||Tt.rotate(-90,qi/2,So/2),Xn===T0&&(45<hi&&135>hi||225<hi&&315>hi)&&Tt.rotate(-hi,qi/2,So/2),Rn=new Oe(0,0,qi,So),Dt.xi(Rn,_e),Tt.Ga(Dt),_e=-Dt.x+Jr/2*ie.scale,ie=-Dt.y+Jr/2*ie.scale,Xt.assign(mi),Jr=isNaN(mi.x);var Zs=isNaN(mi.y);if(Jr||Zs){qi=qi/2+3,So=So/2+3;var $s=45<=hi&&135>=hi,Oa=225<=hi&&315>=hi;Xn===Va&&($s||Oa)?(Xt.x=Zs?qi:mi.y,Xt.y=Jr?So:mi.x,$s?0<=fe||isNaN(fe)&&.5>ye||!Jr||(Xt.y=-So):Oa&&((0<=fe||isNaN(fe)&&.5>ye)&&Jr&&(Xt.y=-So),Zs&&(Xt.x=-qi))):(Jr&&(Xt.x=0<=fe||isNaN(fe)&&.5>ye?qi:-qi),Zs&&(Xt.y=-So),Xt.rotate(hi))}else Xt.rotate(hi);mn+=Xt.x,ur+=Xt.y,Rn.set(le),Rn.h(mn+_e,ur+ie,le.width,le.height),Et.push(Rn),x.ed(Rn)}}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),gr(b,x.width||0,x.height||0),$i.free(Tt),It.free(Dt),It.free(Xt)}}}},kl.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Wr||a instanceof _n){var E=a,b=null;a instanceof Wr&&(b=a,E=b.adornedPart);var z=a instanceof Wr?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 _n)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 Et=ft.ua,Tt=xn();Et.Qu(ot,Tt);var Dt=It.allocAt(Tt[0],Tt[1]);Dt.add(ft.i(0)),Et.type===On.j||(Et=Et.figures.first()),Dt.offset(-Et.startX,-Et.startY),Et=Tt[2],lt!==Va&&(ft=ft.computeAngle(tt,lt,Et),tt.angle=ft),ft=Dt.x;var Xt=Dt.y;It.free(Dt),Nn(Tt)}else if(rt<-x||rt>=x)Tt=It.alloc(),Et=ft,Xt=Tt,Et.vg(),Et.computeMidPoint(Xt),Et=ft.midAngle,lt!==Va&&(ft=ft.computeAngle(tt,lt,Et),tt.angle=ft),ft=Tt.x,Xt=Tt.y,It.free(Tt);else{if(Dt=0,0<=rt?(Tt=y.s[rt],Xt=rt<x-1?y.s[rt+1]:Tt):(Dt=x+rt,Tt=y.s[Dt],Xt=0<Dt?y.s[Dt-1]:Tt),Tt.Xa(Xt)){0<=rt?(Et=0<rt?y.s[rt-1]:Tt,Dt=rt<x-2?y.s[rt+2]:Xt):(Et=Dt<x-1?y.s[Dt+1]:Tt,Dt=1<Dt?y.s[Dt-2]:Xt);var jt=Et.Bf(Tt),ie=Xt.Bf(Dt);Et=jt>ie+10?0<=rt?Et.ab(Tt):Tt.ab(Et):ie>jt+10?0<=rt?Xt.ab(Dt):Dt.ab(Xt):0<=rt?Et.ab(Dt):Dt.ab(Et)}else Et=0<=rt?Tt.ab(Xt):Xt.ab(Tt);lt!==Va&&(ft=ft.computeAngle(tt,lt,Et),tt.angle=ft),ft=Tt.x+(Xt.x-Tt.x)*ot,Xt=Tt.y+(Xt.y-Tt.y)*ot}if(yt.ys())tt.location=new It(ft,Xt);else{yt.Mc()&&(yt=Cr),Tt=$i.alloc(),Tt.reset(),Tt.scale(tt.scale,tt.scale),Tt.rotate(tt.angle,0,0);var le=tt.naturalBounds;Dt=Oe.allocAt(0,0,le.width,le.height),jt=It.alloc(),jt.xi(Dt,yt),Tt.Ga(jt),yt=-jt.x,ie=-jt.y;var fe=le.width,ye=le.height;le=It.alloc(),le.assign(ut);var _e=isNaN(ut.x),Xn=isNaN(ut.y);if(_e||Xn){fe=fe/2+3,ye=ye/2+3;var mi=45<=Et&&135>=Et,hi=225<=Et&&315>=Et;lt===Va&&(mi||hi)?(le.x=Xn?fe:ut.y,le.y=_e?ye:ut.x,mi?0<=rt||isNaN(rt)&&.5>ot||!_e||(le.y=-ye):hi&&((0<=rt||isNaN(rt)&&.5>ot)&&_e&&(le.y=-ye),Xn&&(le.x=-fe))):(_e&&(le.x=0<=rt||isNaN(rt)&&.5>ot?fe:-fe),Xn&&(le.y=-ye),le.rotate(Et))}else le.rotate(Et);ft+=le.x,Xt+=le.y,Tt.pp(Dt),yt+=Dt.x,ie+=Dt.y,rt=It.allocAt(ft+yt,Xt+ie),tt.move(rt),It.free(rt),It.free(le),It.free(jt),Oe.free(Dt),$i.free(Tt)}}b!==null?b.Ul(!1):E.Ul(!1),E=Uy(a),a.location.h(a.position.x+E.x,a.position.y+E.y),It.free(E)}};function tu(a,y,x,E){if(yl(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof Wr&&a.type===En.Link&&a.adornedObject instanceof yr&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof _n&&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 Wr&&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),Ps(E,!1)}}function PA(){this.xa="Base"}He(PA,io),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 Oe(-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 Et=rt.geometry,Tt=rt.strokeWidth,Dt=Et.flattenedSegments,Xt=Et.flattenedLengths,jt=Et.flattenedTotalLength,ie=Dt.length,le=0,fe=0,ye=xn(),_e=0;_e<ie;_e++){var Xn=Dt[_e],mi=[];fe=le=0;for(var hi=Xn.length,Rn=0;Rn<hi;Rn+=2){var mn=Xn[Rn],ur=Xn[Rn+1];if(Rn!==0){var qi=180*Math.atan2(ur-fe,mn-le)/Math.PI;0>qi&&(qi+=360),mi.push(qi)}le=mn,fe=ur}ye.push(mi)}if(a.graduatedIntervals===null){for(var Jr=[],So=a.O.s,Zs=So.length,$s=0;$s<Zs;$s++){var Oa=So[$s],Ys=[];if(Jr.push(Ys),Oa.visible){var Lc=Oa.interval;if(!(0>Lc)){for(var Es=0;Es<Zs;Es++)if(Es!==$s){var rA=So[Es];if(rA.visible&&Oa.constructor===rA.constructor){var Ha=rA.interval;Ha>Lc&&Ys.push(Ha)}}}}}a.graduatedIntervals=Jr}var Mc=a.graduatedIntervals,Yl=a.O.s,gu=Yl.length,Dl=0,Sl=0,md=jt;a.graduatedMarks=[];for(var oA,Kg=0;Kg<gu;Kg++){var Il=Yl[Kg];if(oA=[],Il.visible&&Il!==rt){var Ra=Math.abs(Il.interval),zp=a.graduatedTickUnit;if(!(2>zp*Ra*jt/a.graduatedRange&&Il.graduatedSkip===null)){var qf=Xt[0][0],LA=0,Bl=0;Sl=jt*Il.graduatedStart-1e-4,md=jt*Il.graduatedEnd+1e-4;var of=zp*Ra,Ul=a.graduatedTickBase;if(Ul<a.graduatedMin){var vd=(a.graduatedMin-Ul)/of;vd=vd%1===0?vd:Math.floor(vd+1),Ul+=vd*of}else Ul>a.graduatedMin+of&&(Ul-=Math.floor((Ul-a.graduatedMin)/of)*of);for(var wm=Mc[Kg],jp=Ul,iy=1e-6*a.graduatedMax,uh=1;Ul<=a.graduatedMax+iy;uh++){t:{for(var Th=wm.length,$f=0;$f<Th;$f++){var yd=(Ul-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&&(Ul>a.graduatedMax&&(Ul=a.graduatedMax),Il.graduatedSkip===null||Il instanceof Po&&!Il.graduatedSkip(Ul,Il)||Il instanceof yr&&!Il.graduatedSkip(Ul,Il))&&(Dl=(Ul-a.graduatedMin)*jt/a.graduatedRange,Dl>jt&&(Dl=jt),Sl<=Dl&&Dl<=md)){for(var Ah=ye[LA][Bl],bc=Xt[LA][Bl];LA<Xt.length;){for(;Dl>qf&&Bl<Xt[LA].length-1;)Bl++,Ah=ye[LA][Bl],bc=Xt[LA][Bl],qf+=bc;if(Dl<=qf)break;LA++,Bl=0,Ah=ye[LA][Bl],bc=Xt[LA][Bl],qf+=bc}var Cl=Dt[LA],MA=Cl[2*Bl],xm=Cl[2*Bl+1],Nh=(Dl-(qf-bc))/bc,zg=new It(MA+(Cl[2*Bl+2]-MA)*Nh+Tt/2-Et.bounds.x,xm+(Cl[2*Bl+3]-xm)*Nh+Tt/2-Et.bounds.y);zg.scale(rt.scale,rt.scale);t:{var sA=Ah,sf=ye[LA];if(!(.5005>Nh&&.4995<Nh)){var bA=sA;if(.5>Nh?0<Bl?bA=sf[Bl-1]:xe.$(Cl[0],Cl[Cl.length-2])&&xe.$(Cl[1],Cl[Cl.length-1])&&(bA=sf[sf.length-1]):.5<Nh&&(Bl+1<sf.length?bA=sf[Bl+1]:xe.$(Cl[0],Cl[Cl.length-2])&&xe.$(Cl[1],Cl[Cl.length-1])&&(bA=sf[0])),sA!==bA){var tg=Math.abs(sA-bA);if(180<tg&&(sA<bA?sA+=360:bA+=360,tg=Math.abs(sA-bA)),5e-4>Nh||.9995<Nh){Ah=(sA+bA)/2%360;break t}if(10>tg){var jg=1-Math.abs(.5-Nh);Ah=(sA*jg+bA*(1-jg))%360;break t}}}Ah=sA}if(Il instanceof Po){var Ru="";Il.graduatedFunction!==null?(Ru=Il.graduatedFunction(Ul,Il),Ru=Ru!=null?Ru.toString():""):Ru=(+Ul.toFixed(2)).toString(),Ru!==""&&oA.push({$l:zg,angle:Ah,text:Ru})}else oA.push({$l:zg,angle:Ah})}Ul=jp+uh*of}}}a.graduatedMarks.push(oA)}Nn(ye);var aa=a.graduatedMarks;if(aa!==null)for(var Vp=E.length,Ja=0;Ja<Vp;Ja++){var Ls=E[Ja],qa=aa[Ja];if(Ls.visible&&Ls!==rt&&qa.length!==0){if(Ls instanceof yr){var Dh=a,kc=b,af=Ls.alignmentFocus;af.Mc()&&(af=xo);var ry=Ls.angle;Ls.Kb=0,Ls.measure(1/0,1/0,0,0),Ls.Kb=ry;var Sm=Ls.measuredBounds,Vg=Sm.width,lf=Sm.height,eg=Oe.allocAt(0,0,Vg,lf),Pl=It.alloc();Pl.xi(eg,af),Oe.free(eg);for(var Ih=-Pl.x,aA=-Pl.y,ou=new Oe,xd=qa.length,Wg=0;Wg<xd;Wg++)for(var Sd=qa[Wg],Bm=Sd.$l.x,Zg=Sd.$l.y,As=Sd.angle,_u=0;4>_u;_u++){switch(_u){case 0:Pl.h(Ih,aA);break;case 1:Pl.h(Ih+Vg,aA);break;case 2:Pl.h(Ih,aA+lf);break;case 3:Pl.h(Ih+Vg,aA+lf)}Pl.rotate(As+Ls.angle),Pl.offset(Bm,Zg),Wg===0&&_u===0?ou.h(Pl.x,Pl.y,0,0):ou.Ye(Pl),Pl.offset(-Bm,-Zg),Pl.rotate(-As-Ls.angle)}It.free(Pl),Dh.graduatedBounds!==null&&Dh.graduatedBounds.push(ou),Nr(kc,ou.x,ou.y,ou.width,ou.height)}else if(Ls instanceof Po){var pu=a,Cm=b;pu.temporaryTextBlock===null&&(pu.temporaryTextBlock=new Po);var Ql=pu.temporaryTextBlock;Sy(Ql,Ls);var Tc=Ls.alignmentFocus;Tc.Mc()&&(Tc=xo);for(var mu=Ls.segmentOrientation,Yg=Ls.segmentOffset,Bd=new Oe,Wp=0,Xg=0,kA=0,uf=0,Cd=0,Jg=qa.length,Nc=0;Nc<Jg;Nc++){var hh=qa[Nc];Wp=hh.$l.x,Xg=hh.$l.y,kA=hh.angle,Cd=uf=Ls.angle,mu!==Va&&(Cd=mu===pp||mu===k0?kA+Ls.angle:kA,uf=_n.computeAngle(mu,Cd)),Ql.Kb=uf,Ql.text=hh.text||"",Ql.measure(1/0,1/0,0,0);var Dc=Ql.measuredBounds,Uh=Ql.naturalBounds,Ic=Uh.width,Af=Uh.height,lA=$i.alloc();lA.reset(),lA.translate(-Dc.x,-Dc.y),lA.scale(Ql.scale,Ql.scale),lA.rotate(Cd,Ic/2,Af/2),mu!==mp&&mu!==yp||lA.rotate(90,Ic/2,Af/2),mu!==vp&&mu!==wp||lA.rotate(-90,Ic/2,Af/2),mu===T0&&(45<kA&&135>kA||225<kA&&315>kA)&&lA.rotate(-kA,Ic/2,Af/2);var ng=Oe.allocAt(0,0,Ic,Af),Uc=It.alloc();Uc.xi(ng,Tc),lA.Ga(Uc);var ig=-Uc.x,oy=-Uc.y,Qh=It.alloc();Qh.assign(Yg),isNaN(Qh.x)&&(Qh.x=Ic/2+3),isNaN(Qh.y)&&(Qh.y=-(Af/2+3)),Qh.rotate(kA),Wp+=Qh.x+ig,Xg+=Qh.y+oy;var hf=new Oe(Wp,Xg,Dc.width,Dc.height),Zp=new Oe(Dc.x,Dc.y,Dc.width,Dc.height),sy=new Oe(Uh.x,Uh.y,Uh.width,Uh.height);hh.Sz=uf,hh.lineCount=Ql.lineCount,hh.lines=[Ql.Cb,Ql.Ih,Ql.df,Ql.Le,Ql.Qc,Ql.Qb,Ql.ze],hh.actualBounds=hf,hh.measuredBounds=Zp,hh.naturalBounds=sy,Nc===0?Bd.assign(hf):Bd.ed(hf),It.free(Qh),It.free(Uc),Oe.free(ng),$i.free(lA)}pu.graduatedBounds!==null&&pu.graduatedBounds.push(Bd),Nr(Cm,Bd.x,Bd.y,Bd.width,Bd.height)}Ps(Ls,!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 za,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],Et=lt[ft],Tt=Et.length;if(yt.visible&&yt!==z&&Et.length!==0){if(yt instanceof yr){if(!(2>a.graduatedTickUnit*yt.interval*z.geometry.flattenedTotalLength/a.graduatedRange*tt&&yt.graduatedSkip===null)){var Dt=yt.measuredBounds,Xt=yt.strokeWidth*yt.scale,jt=yt.alignmentFocus;jt.Mc()&&(jt=xo);for(var ie=0;ie<Tt;ie++){var le=Et[ie].$l,fe=Et[ie].angle,ye=jt,_e=yt.Ab;_e.reset(),_e.translate(le.x+rt.x,le.y+rt.y),_e.rotate(fe+yt.angle,0,0),_e.translate(-Dt.width*ye.x+ye.offsetX+Xt/2,-Dt.height*ye.y+ye.offsetY+Xt/2),_e.scale(yt.scale,yt.scale),zl(yt,!1),yt.wh.set(yt.Ab),yt.Kk=yt.scale,Ga(yt,!1),yt.gc(y,x),b&&(a.svg.appendChild(yt.svg),yt.svg=null),yt.Ab.reset()}}}else if(yt instanceof Po)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Po),Dt=a.temporaryTextBlock,Sy(Dt,yt),Xt=0;Xt<Tt;Xt++)jt=Et[Xt],jt.actualBounds&&jt.measuredBounds&&jt.naturalBounds&&(Dt.ec=jt.text||"",Dt.Kb=jt.Sz||0,Dt.Gc=jt.lineCount||0,ie=jt.lines,ie!==void 0&&(Dt.Cb=ie[0],Dt.Ih=ie[1],Dt.df=ie[2],Dt.Le=ie[3],Dt.Qc=ie[4],Dt.Qb=ie[5],Dt.ze=ie[6]),jt.naturalBounds&&(Dt.dc=jt.naturalBounds),jt.actualBounds&&(ie=jt.actualBounds,Dt.arrange(ie.x,ie.y,ie.width,ie.height)),ie=jt.actualBounds,Dt.arrange(ie.x,ie.y,ie.width,ie.height),le=jt.measuredBounds,jt=jt.naturalBounds,fe=Dt.Ab,fe.reset(),fe.translate(ie.x+rt.x,ie.y+rt.y),fe.translate(-le.x,-le.y),Dt.no(fe,jt.x,jt.y,jt.width,jt.height),zl(Dt,!1),Dt.wh.set(Dt.Ab),Dt.Kk=Dt.scale,Ga(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 En(a,y){if(we.call(this),this.na=null,a===void 0)this.na=En.Position;else if(typeof a=="string"){var x=Du.I(a);x!==null&&(this.na=x)}else a instanceof io?this.na=a:a&&(this.na=En.Position,y=a);this.na===null&&he("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===En.Grid?1048576:0),this.O=new ee,this.yb=Gi,this.Tm=ws,this.Uf=rr,this.$g=null,this.$e="",this.jg=new Oe(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=Si,this.jn=fr,this.kn=vn,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}He(En,we),En.prototype.cloneProtected=function(a){we.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},En.prototype.Af=function(a){we.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},En.prototype.copy=function(){var a=we.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 ti&&(z.Te=!0);var rt=a.diagram;rt!==null&&rt.undoManager.isUndoingRedoing||z.cb(is,"elements",a,null,b,null,tt)}}return a}return null},bt=En.prototype,bt.toString=function(){return"Panel("+this.type.name+")#"+Zn(this)},bt.Pn=function(a){we.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,E=0;E<x;E++)y[E].Pn(a)},bt.hh=function(a,y){if(this.na===En.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===En.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===En.Table)if(a.yc(),a instanceof za){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===En.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&<.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){jo(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 Et=ft.Wc(),Tt=ft.separatorStrokeWidth;isNaN(Tt)&&(Tt=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Dt=ft.separatorStroke;Dt===null&&(Dt=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(Dt===null||ft.index===(x?ot:lt))&&(Tt=0),Et-=Tt,Tt=ft.position+Tt,Et+=ft.actual,Tt+Et>yt&&(Et=yt-Tt),0>=Et||(yt=a.yb,jo(a,y,ft.background,!0,!1,rt,tt),x?y.fillRect(yt.left,Tt+yt.top,tt.width-(yt.left+yt.right),Et):y.fillRect(Tt+yt.left,yt.top,Et,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"}bt.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},bt.kk=function(a,y,x){if(!we.prototype.kk.call(this,a,y,x))return!1;if(this.type===En.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===En.Grid||this.na===En.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},bt.nk=function(){return!0},bt.$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 we.prototype.$o.call(this,a,y,x,E)},bt.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),Et=rt*(tt.m12*tt.dx-tt.m11*tt.dy);if(this.areaBackground!==null)return tt=this.actualBounds,xe.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+Et,a=x*ot+E*ut+yt,ot=x*lt+E*ft+Et,b.h(0,0),x=this.naturalBounds,z=xe.Ff(0,0,x.width,x.height,z,rt,a,ot,b),b.transform(tt),z;z||(ot=1,ut=lt=0,ft=1,Et=yt=0),rt=a*ot+y*ut+yt,a=a*lt+y*ft+Et,ot=x*ot+E*ut+yt,x=x*lt+E*ft+Et,b.h(ot,x),E=(ot-rt)*(ot-rt)+(x-a)*(x-a),lt=!1,ft=this.O.s,Et=ft.length,ut=It.alloc(),yt=null,y=1/0;var Tt=null,Dt=this.isClipping&&this.na===En.Spot;Dt&&(Tt=It.alloc(),yt=this.Pb(),(lt=yt.Sj(rt,a,ot,x,Tt))&&(y=(rt-Tt.x)*(rt-Tt.x)+(a-Tt.y)*(a-Tt.y)));for(var Xt=0;Xt<Et;Xt++){var jt=ft[Xt];jt.visible&&jt!==yt&&jt.Sj(rt,a,ot,x,ut)&&(lt=!0,jt=(rt-ut.x)*(rt-ut.x)+(a-ut.y)*(a-ut.y),jt<E&&(E=jt,b.set(ut)))}return Dt&&(y>E&&b.set(Tt),It.free(Tt)),It.free(ut),z&&b.transform(tt),lt},bt.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();we.prototype.Gj.call(this)},bt.v=function(a){if(!yl(this)){we.prototype.v.call(this,a),a=null,(this.na===En.Auto||this.na===En.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=Ua(b,!1);(b instanceof ja||b instanceof En||b instanceof Po||z!==wn)&&b.v(!0)}}}},bt.Uj=function(){if(!yl(this)){Ps(this,!0),qu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},bt.Uk=function(){if(!(this.l&2048)){zl(this,!0),Ga(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},bt.Wu=function(){Ga(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},bt.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),gr(b,a,ot),gr(this.naturalBounds,a,ot),this.Ge(0,0,a,ot)},bt.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 sl(a){return a.part!==null?a.part.locationObject:null}bt.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=Ua(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=wn),a){case wn:(y>x||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case Mn:this.v(!0),this.measure(x+rt,E+tt,0,0);break;case bi:this.v(!0),this.measure(x+rt,z+tt,0,0);break;case zi:this.v(!0),this.measure(y+rt,E+tt,0,0)}}this.na.arrange(this,b,this.jg)}},bt.gh=function(a){var y=this.naturalBounds,x=sl(this);if(ho(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var E=y.length,b=It.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(Sn(b.set(a),z.transform),z.ca(b)))return It.free(b),!0}return It.free(b),!(this.Ma===null&&this.areaBackground===null)}return!1},bt.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},bt.qm=function(a,y){if(y(this,a),a instanceof En){a=a.O.s;for(var x=a.length,E=0;E<x;E++)this.qm(a[E],y)}};function Nu(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 En&&Xd(a,z,x)}}function Cw(a,y){hy(a,a,y)}function hy(a,y,x){if(x(y),y instanceof En){y=y.O.s;for(var E=y.length,b=0;b<E;b++)hy(a,y[b],x)}}bt.Nl=function(a){return cy(this,this,a)};function cy(a,y,x){if(x(y))return y;if(y instanceof En){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}bt.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 En){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 En?x=Math.max(x,dy(b)):b instanceof yr&&(x=Math.max(x,b.ig/2*b.strokeMiterLimit*b.Df()))}return x}bt.se=function(){return!(this.type===En.TableRow||this.type===En.TableColumn)};function vc(a){return a.type===En.TableRow||a.type===En.TableColumn}bt.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),Ba(this)))return null;var E=this.naturalBounds,b=1/this.Df(),z=this.se(),tt=z?a:Sn(It.allocAt(a.x,a.y),this.transform),rt=this.diagram,ot=10,lt=5;if(rt!==null&&(ot=rt.Ql("extraTouchArea"),lt=ot/2),ho(-(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=It.alloc(),lt=(ot=this.isClipping&&this.na===En.Spot)?this.Pb():null,ot&&(lt.se()?Sn(rt.set(a),lt.transform):rt.set(a),!lt.ca(rt)))return It.free(rt),z||It.free(tt),null;for(var ft=sl(this);ut--;){var yt=b[ut];if((yt.visible||yt===ft)&&(yt.se()?Sn(rt.set(a),yt.transform):rt.set(a),!ot||yt!==lt)){var Et=null;if(yt instanceof En?Et=yt.ic(rt,y,x):yt.pickable===!0&&yt.ca(rt)&&(Et=yt),Et!==null&&(y!==null&&(Et=y(Et)),Et!==null&&(x===null||x(Et))))return It.free(rt),z||It.free(tt),Et}}It.free(rt)}return this.background===null&&this.areaBackground===null?(z||It.free(tt),null):(a=ho(0,0,E.width,E.height,tt.x,tt.y)?this:null,z||It.free(tt),a)}return z||It.free(tt),null},bt.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:Sn(It.allocAt(a.x,a.y),this.transform);if(b=ho(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=It.alloc(),ut=sl(this);ot--;){var ft=rt[ot];if(ft.visible||ft===ut){ft.se()?Sn(lt.set(a),ft.transform):lt.set(a);var yt=ft;ft=ft instanceof En?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))}}It.free(lt)}return z||It.free(tt),b&&(this.background!==null||this.areaBackground!==null)}return z||It.free(tt),!1},bt.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=$i.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return Nm(this,y,x,b),z===void 0&&$i.free(tt),!0;if(this.Yc(a,tt)){if(!this.isAtomic)for(var rt=sl(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 En?ut:null,yt=$i.alloc(),yt.set(tt),(ut!==null?ut.Cf(a,y,x,E,b,yt):Hs(ft,a,E,yt))&&(y!==null&&(ft=y(ft)),ft===null||x!==null&&!x(ft)||b.add(ft)),$i.free(yt))}}return z===void 0&&$i.free(tt),E}return z===void 0&&$i.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 En&&Nm(tt,y,x,E),y!==null&&(tt=y(tt)),tt===null||x!==null&&!x(tt)||E.add(tt))}}}bt.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:Sn(It.allocAt(a.x,a.y),this.transform),lt=rt?y:Sn(It.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||dn(ot.x,ot.y,0,0,0,tt.height)<=ut||dn(ot.x,ot.y,0,tt.height,tt.width,tt.height)<=ut||dn(ot.x,ot.y,tt.width,tt.height,tt.width,0)<=ut||dn(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||(It.free(ot),It.free(lt)),ft){if(!this.isAtomic){ot=It.alloc(),lt=It.alloc(),ut=sl(this);for(var yt=this.O.s,Et=yt.length;Et--;){var Tt=yt[Et];if(Tt.visible||Tt===ut){var Dt=Tt.actualBounds,Xt=this.naturalBounds;(!rt||!(Dt.x>Xt.width||Dt.y>Xt.height||0>Dt.x+Dt.width||0>Dt.y+Dt.height))&&(Tt.se()?(Dt=Tt.transform,Sn(ot.set(a),Dt),Sn(lt.set(y),Dt)):(ot.set(a),lt.set(y)),Dt=Tt,Tt=Tt instanceof En?Tt:null,(Tt!==null?Tt.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)))}}It.free(ot),It.free(lt)}return b?ft:tt}return!1};function Dm(a){var y=null;return a instanceof yr&&(y=a.spot1,y===ws&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=kr),y}function Im(a){var y=null;return a instanceof yr&&(y=a.spot2,y===ws&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=yo),y}bt.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},bt.M=function(a){return this.O.M(a)},bt.Gb=function(a,y){y instanceof Ii&&he("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&he("Cannot make a Panel contain itself: "+this.toString()),he("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&he("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!==En.Grid||y instanceof yr||he("Can only add Shapes to a Grid Panel, not: "+y),this.na!==En.Graduated||y instanceof yr||y instanceof Po||he("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 Qe),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 he("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),yl(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof En&&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 ti&&(x.Te=!0),x.Te&&x instanceof ti&&(x.wc=null),b=this.diagram,b!==null&&b.undoManager.isUndoingRedoing||(E!==-1&&x.cb(cs,"elements",this,y,null,E,null),x.cb(is,"elements",this,null,y,null,a)))};function Um(a,y){a.l=y?a.l|16777216:a.l&-16777217}bt.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)},bt.mb=function(a){0<=a&&this.pc(a,!0)},bt.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),Ps(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 ti&&(E instanceof En?E.qm(E,function(tt,rt){ov(z,rt,y)}):ov(z,E,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(cs,"elements",this,E,null,a,null))},bt.Fb=function(a){0>a&&Wn(a,">= 0",En,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Ns;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(is,"rowdefs",this,null,x,null,a)}return y[a]},bt.oA=function(a){if(0>a&&Wn(a,">= 0",En,"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(cs,"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 Ns?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}bt.Eb=function(a){0>a&&Wn(a,">= 0",En,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Ns;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(is,"coldefs",this,null,x,null,a)}return y[a]},bt.jA=function(a){if(0>a&&Wn(a,">= 0",En,"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(cs,"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 Ns?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}bt.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},bt.Hy=function(a,y){return(a=this.Fb(a))&&s0(a,new Ns(y)),this},bt.By=function(a,y){return(a=this.Eb(a))&&s0(a,new Ns(y)),this},bt.nz=function(a){if(0>a||this.type!==En.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},bt.fz=function(a){if(0>a||this.type!==En.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},bt.Fz=function(a,y){if(y===void 0&&(y=new It(NaN,NaN)),this.type!==En.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)},bt.Gz=function(a){if(this.type!==En.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 cu(a){var y=a.allBindings;if(y===null)a.data!==null&&he("Template cannot have .data be non-null: "+a),a.allBindings=y=new ee;else if(y._isFrozen)return;var x=new ee;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 Et=yt.sourceName;Et!==null&&(Et==="/"&&Um(lt,!0),Et=b1(yt,lt,ut),Et!==null&&(x.add(Et),Et.srcBindings===null&&(Et.srcBindings=new ee),Et.srcBindings.add(yt))),y.add(yt)}if(ut instanceof En&&ut.type===En.Table){if(0<ut.rowCount){for(lt=ut.rowDefs,ft=lt.length,yt=0;yt<ft;yt++)if(Et=lt[yt],Et!==void 0&&Et.be!==null)for(var Tt=Et.be.iterator;Tt.next();){var Dt=Tt.value;Dt.xd=Et,Dt.to=2,Dt.wl=Et.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(Et=yt.be.iterator;Et.next();)Tt=Et.value,Tt.xd=yt,Tt.to=1,Tt.wl=yt.index,y.add(Tt)}}});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 ee),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 En&&(tt=rt.substring(0,ot),rt=rt.substr(ot+1),ot=z.fb(tt),ot!==null?(z=ot,b.targetProperty=rt):pi('Warning: unable to find GraphObject named "'+tt+'" for Binding: '+b.toString())),z instanceof Ns?(tt=Zn(z.panel),b.Ai=tt===void 0?-1:tt,z.panel.bindingId=b.Ai):z instanceof we?(tt=Zn(z),b.Ai=tt===void 0?-1:tt,z.bindingId=b.Ai):he("Unknown type of binding target: "+z)}y.freeze(),a instanceof Ii&&a.Zc()&&a.Va()}bt.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return Cw(y,function(x){x instanceof En&&(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&&cu(y),y},bt.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 En))continue;b===1?z=z.Eb(x.wl):b===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,E)}}},bt.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 En&&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 En)||z.data!==y[tt])return!0;b++,tt++}return!1}function sp(a){if(a.type===En.Spot||a.type===En.Auto)return Math.min(a.O.length,1);if(a.type===En.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var E=a.M(x);if(!(E instanceof yr&&E.isPanelMain))break}return x}return a.type===En.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof En&&vc(a))?1:0}bt.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 En){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),yl(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 ti&&(y.Te=!0),y.Te&&y instanceof ti&&(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(cu(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 Qe),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 En){var b=y,z=x;E.type===En.TableRow?E.row=b:E.type===En.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=vs(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;he("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,pi('No item template Panel found for category "'+y+'" on '+a),pi(" Using default item template."),a=new En,y=new Po,y.bind(new Fs("text","",Ki)),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 En){y=y.O.s,E=y.length;for(var b=0;b<E;b++){var z=y[b];x&&z instanceof En&&!z.isEnabled||o0(a,z,x)}}}function FA(a,y){y.name=a,Du.add(a,y)}Ue.Object.defineProperties(En.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===En.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&&Wn(a,">= 0",En,"padding"),a=new sr(a)):(0>a.left&&Wn(a.left,">= 0",En,"padding:value.left"),0>a.right&&Wn(a.right,">= 0",En,"padding:value.right"),0>a.top&&Wn(a.top,">= 0",En,"padding:value.top"),0>a.bottom&&Wn(a.bottom,">= 0",En,"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:Gi},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 eu),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 no)&&(a instanceof no&&a.freeze(),this.T===null&&(this.T=new eu),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 eu),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)||he("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 eu),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 no)&&(a instanceof no&&a.freeze(),this.T===null&&(this.T=new eu),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 eu),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)||he("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 eu),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 eu),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||he("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&bu(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()||he("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&bu(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 bh),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),ta(this)&&(a=this.part,a!==null&&Mo(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 bh),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),ta(this)&&(a=this.part,a!==null&&Mo(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 bh),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 bh),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 bh,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 bh,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 bh,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 bh,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 eu),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new eu),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 eu),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 eu),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)&&he("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new eu),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)&&he("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new eu),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 Ii&&!(this instanceof Wr);cu(this),this.ub=a;var E=this.diagram;E!==null&&(x?(x=E.partManager,this instanceof _n?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Ii&&(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 Qe}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Ii||a.isPanelMain)&&he("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 hr&&(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))}}}),Ue.Object.defineProperties(En,{Position:{get:function(){return Du.I("Position")}},Horizontal:{get:function(){return Du.I("Horizontal")}},Vertical:{get:function(){return Du.I("Vertical")}},Spot:{get:function(){return Du.I("Spot")}},Auto:{get:function(){return Du.I("Auto")}},Table:{get:function(){return Du.I("Table")}},Viewbox:{get:function(){return Du.I("Viewbox")}},TableRow:{get:function(){return Du.I("TableRow")}},TableColumn:{get:function(){return Du.I("TableColumn")}},Link:{get:function(){return Du.I("Link")}},Grid:{get:function(){return Du.I("Grid")}},Graduated:{get:function(){return Du.I("Graduated")}}}),En.prototype.rebuildItemElements=En.prototype.mv,En.prototype.findItemPanelForData=En.prototype.sx,En.prototype.updateTargetBindings=En.prototype.La,En.prototype.copyTemplate=En.prototype.Uy,En.prototype.graduatedValueForPoint=En.prototype.Gz,En.prototype.graduatedPointForValue=En.prototype.Fz,En.prototype.findColumnForLocalX=En.prototype.fz,En.prototype.findRowForLocalY=En.prototype.nz,En.prototype.addColumnDefinition=En.prototype.By,En.prototype.addRowDefinition=En.prototype.Hy,En.prototype.addRowColumnDefinition=En.prototype.Gy,En.prototype.removeColumnDefinition=En.prototype.jA,En.prototype.getColumnDefinition=En.prototype.Eb,En.prototype.removeRowDefinition=En.prototype.oA,En.prototype.getRowDefinition=En.prototype.Fb,En.prototype.removeAt=En.prototype.mb,En.prototype.remove=En.prototype.remove,En.prototype.insertAt=En.prototype.Gb,En.prototype.elt=En.prototype.M,En.prototype.add=En.prototype.add,En.prototype.findObject=En.prototype.fb,En.prototype.findInVisualTree=En.prototype.Nl,En.prototype.walkVisualTreeFrom=En.prototype.qm,En.prototype.findMainElement=En.prototype.Pb;var vy=!1,yy=null,Du=new Qe;En.className="Panel",En.definePanelLayout=FA,FA("Position",new Jo),FA("Vertical",new jr),FA("Auto",new No),FA("Link",new kl);function bh(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}bh.prototype.copy=function(){var a=new bh;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},bh.className="GradPanelSettings";function eu(){this.Pc=[],this.Oc=[],this.j=this.ob=l0,this.hb=this.Hb=0,this.Qp=Gi,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}eu.prototype.copy=function(a){for(var y=new eu,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},eu.className="TablePanelSettings";function Ns(a){ln(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=ws,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Rm,this.hg=rr,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))}Ns.prototype.copy=function(){var a=new Ns;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=ii(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=ii(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}bt=Ns.prototype,bt.qb=function(a){a.classType===Ns&&(this.sizing=a)},bt.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Zn(this)},bt.wi=function(a){this.Me=a},bt.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)},bt.Wc=function(){var a=0,y=this.Me,x=0,E=this.isRow;if(y!==null&&y.type===En.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)},bt.Ob=function(a,y,x){var E=this.Me;if(E!==null&&(E.cb(To,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}bt.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Fs(a,y,x,E):b=a,b.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&py(y)&&he("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+b+" on "+a)),this.be===null&&(this.be=new ee),this.be.add(b),this},Ue.Object.defineProperties(Ns.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&&Wn(a,">= 0",Ns,"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&&Wn(a,">= 0",Ns,"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))&&Wn(a,">= 0",Ns,"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&&Wn(a,">= 0",Ns,"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&&Ft(a,"RowColumnDefinition.separatorStroke"),a instanceof no&&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)||he("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&&Ft(a,"RowColumnDefinition.background"),a instanceof no&&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}}}),Ns.prototype.computeEffectiveSpacing=Ns.prototype.Wc,Ns.prototype.computeEffectiveSpacingTop=Ns.prototype.Io;var Rm=new Ze(Ns,"Default",0),ap=new Ze(Ns,"None",1),l0=new Ze(Ns,"ProportionalExtra",2);Ns.className="RowColumnDefinition",Ns.Default=Rm,Ns.None=ap,Ns.ProportionalExtra=l0;function yr(a,y){we.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)}He(yr,we),yr.prototype.cloneProtected=function(a){we.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=ii(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())}bt=yr.prototype,bt.th=function(){we.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},bt.qb=function(a){a===wn||a===Si||a===Lr||a===rr?this.geometryStretch=a:we.prototype.qb.call(this,a)},bt.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Zn(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,Et,Tt,Dt=0,Xt=xn(),jt=2;jt<b;jt+=2)lt=x[jt],ut=x[jt+1],ft=lt-rt,rt=ut-ot,ft===0&&(ft=.001),yt=rt/ft,Et=Math.atan2(rt,ft),Tt=Math.sqrt(ft*ft+rt*rt),Xt.push([ft,Et,yt,Tt]),Dt+=Tt,rt=lt,ot=ut;rt=x[0],ot=x[1],ft=E.measuredBounds.width,E instanceof yr&&(ft-=E.strokeWidth),1>ft&&(ft=1),b=x=ft,lt=tt/2,ut=lt!==0,jt=0,Tt=Xt[jt],ft=Tt[0],Et=Tt[1],yt=Tt[2],Tt=Tt[3];for(var ie=0;.1<=Dt;){if(ie===0&&(ut?(b=x,b-=lt,Dt-=lt,ut=!1):b=x,b===0&&(b=1)),b>Dt){Nn(Xt);return}b>Tt?(ie=b-Tt,b=Tt):ie=0;var le=Math.sqrt(b*b/(1+yt*yt));if(0>ft&&(le=-le),rt+=le,ot+=yt*le,a.translate(rt,ot),a.rotate(Et),a.translate(-(tt/2),-(z/2)),ie===0&&E.hh(a,y),a.translate(tt/2,z/2),a.rotate(-Et),a.translate(-rt,-ot),Dt-=b,Tt-=b,ie!==0){if(jt++,jt===Xt.length){Nn(Xt);return}Tt=Xt[jt],ft=Tt[0],Et=Tt[1],yt=Tt[2],Tt=Tt[3],b=ie}}Nn(Xt)}}bt.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&&jo(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===En.Link&&rt instanceof Wr&&rt.category==="Selection"&&rt.adornedObject instanceof yr&&rt.adornedPart.Pb()===rt.adornedObject?rt.adornedObject.strokeWidth:0),ot===0&&(x=null),x!==null&&ot!==0&&(jo(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===On.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===On.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&&Tu(a),a.jk(),rt&&z&&SA(a)),a.Se()}else if(b.type===On.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+xe.wg*b,ot-yt,lt+b,ot-xe.wg*yt,lt+b,ot),a.bezierCurveTo(lt+b,ot+xe.wg*yt,lt+xe.wg*b,ot+yt,lt,ot+yt),a.bezierCurveTo(lt-xe.wg*b,ot+yt,lt-b,ot+xe.wg*yt,lt-b,ot),a.bezierCurveTo(lt-b,ot-xe.wg*yt,lt-xe.wg*b,ot-yt,lt,ot-yt),a.closePath(),E!==null&&a.ng(E),x!==null&&(rt&&z&&Tu(a),a.jk(),rt&&z&&SA(a)),a.Se();else if(b.type===On.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 Et=null,Tt=0;Tt<ft;Tt++){var Dt=ut[Tt];switch(Dt.type){case ms:a.moveTo(Dt.endX,Dt.endY);break;case po:a.lineTo(Dt.endX,Dt.endY);break;case Bs:a.bezierCurveTo(Dt.point1X,Dt.point1Y,Dt.point2X,Dt.point2Y,Dt.endX,Dt.endY);break;case Na:a.quadraticCurveTo(Dt.point1X,Dt.point1Y,Dt.endX,Dt.endY);break;case ns:if(Dt.radiusX===Dt.radiusY){var Xt=Math.PI/180;a.arc(Dt.point1X,Dt.point1Y,Dt.radiusX,Dt.startAngle*Xt,(Dt.startAngle+Dt.sweepAngle)*Xt,0>Dt.sweepAngle,Et!==null?Et.endX:lt.startX,Et!==null?Et.endY:lt.startY)}else if(Et=xa(Dt,lt),Xt=Et.length,Xt===0)a.lineTo(Dt.centerX,Dt.centerY);else for(var jt=0;jt<Xt;jt++){var ie=Et[jt];jt===0&&a.lineTo(ie[0],ie[1]),a.bezierCurveTo(ie[2],ie[3],ie[4],ie[5],ie[6],ie[7])}break;case nl:if(jt=Xt=0,Et!==null&&Et.type===ns){if(Et=xa(Et,lt),ie=Et.length,ie===0){a.lineTo(Dt.endX,Dt.endY);break}Et=Et[ie-1]||null,Et!==null&&(Xt=Et[6],jt=Et[7])}else Xt=Et!==null?Et.endX:lt.startX,jt=Et!==null?Et.endY:lt.startY;if(Et=el(Dt,lt,Xt,jt),Xt=Et.length,Xt===0){a.lineTo(Dt.endX,Dt.endY);break}for(jt=0;jt<Xt;jt++)ie=Et[jt],a.bezierCurveTo(ie[2],ie[3],ie[4],ie[5],ie[6],ie[7]);break;default:he("Segment not of valid type: "+Dt.type)}Dt.isClosed&&a.closePath(),Et=Dt}ut=lt.isFilled,z?lt.isShadowed?(ut===!0&&E!=="transparent"&&E!==null&&a.ng(E,lt.isEvenOdd),x!==null&&(ut&&rt&&Tu(a),a.jk(),ut&&rt&&SA(a))):(Tu(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=xn(),z.type===On.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===On.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(Tt=lt[ft],Tt.type){case ms:wg(a,y,E,x),E.length=0,E.push(Tt.endX),E.push(Tt.endY),tt=Tt.endX,b=Tt.endY,ot=tt,yt=b;break;case po:E.push(Tt.endX),E.push(Tt.endY),tt=Tt.endX,b=Tt.endY;break;case Bs:xe.Qe(tt,b,Tt.point1X,Tt.point1Y,Tt.point2X,Tt.point2Y,Tt.endX,Tt.endY,.5,E),tt=Tt.endX,b=Tt.endY;break;case Na:xe.ep(tt,b,Tt.point1X,Tt.point1Y,Tt.endX,Tt.endY,.5,E),tt=Tt.endX,b=Tt.endY;break;case ns:if(Dt=xa(Tt,rt),Et=Dt.length,Et===0){E.push(Tt.centerX),E.push(Tt.centerY),tt=Tt.centerX,b=Tt.centerY;break}for(Xt=0;Xt<Et;Xt++)jt=Dt[Xt],xe.Qe(tt,b,jt[2],jt[3],jt[4],jt[5],jt[6],jt[7],.5,E),tt=jt[6],b=jt[7];break;case nl:if(Dt=el(Tt,rt,tt,b),Et=Dt.length,Et===0){E.push(Tt.endX),E.push(Tt.endY),tt=Tt.endX,b=Tt.endY;break}for(Xt=0;Xt<Et;Xt++)jt=Dt[Xt],xe.Qe(tt,b,jt[2],jt[3],jt[4],jt[5],jt[6],jt[7],.5,E),tt=jt[6],b=jt[7];break;default:he("Segment not of valid type: "+Tt.type)}Tt.isClosed&&(E.push(ot),E.push(yt),wg(a,y,E,x))}wg(a,y,E,x)}else if(z.type===On.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===On.F){if(b=new Ss,b.startX=z.endX,b.startY=(z.startY+z.endY)/2,tt=new _r(ns),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=xa(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],xe.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)}Nn(E),a.restore(),a.Vc(!1)}}}},bt.kk=function(a,y,x){return!we.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)},bt.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:we.prototype.nk.call(this,a)},bt.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)}},bt.ga=function(a,y){if(y===void 0&&(y=new It),a instanceof Kn){a.Mc()&&he("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},bt.mi=function(a){a===void 0&&(a=new Oe);var y=this.naturalBounds,x=this.oe;y=Oe.allocAt(y.x,y.y,y.width,y.height);var E=this.strokeWidth;return y.Bc(E/2,E/2),E=It.allocAt(y.x,y.y).transform(x),a.h(E.x,E.y,0,0),E.h(y.right,y.y).transform(x),Nr(a,E.x,E.y,0,0),E.h(y.right,y.bottom).transform(x),Nr(a,E.x,E.y,0,0),E.h(y.x,y.bottom).transform(x),Nr(a,E.x,E.y,0,0),Oe.free(y),It.free(E),a},bt.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!==On.j||y||(b+=2);var z=Oe.alloc();if(z.assign(E),z.Bc(b+2,b+2),!z.ca(a))return Oe.free(z),!1;if(E=b+1e-4,x.type===On.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:(Oe.free(z),xe.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===On.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 Oe.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),Oe.free(z),a}if(x.type===On.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 Oe.free(z),!1;tt+=E,b+=E}return this.stroke!==null&&(tt+=E,b+=E),Oe.free(z),0>=tt||0>=b?!1:1>=x*x/(tt*tt)+y*y/(b*b)}if(x.type===On.o)return Oe.free(z),this.fill===null?vu(x,a.x,a.y,b):as(x,a,b,1<this.strokeWidth,y);he("Unknown Geometry type: "+x.type)},bt.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=xe.Ze[rt];typeof lt=="string"&&(lt=xe.Ze[lt]),typeof lt=="function"?(ot=lt(null,100,100),Km[rt]=ot):he("Unsupported Figure: "+rt)}tt=ot.bounds}rt=tt.width,ot=tt.height,lt=tt.width;var ut=tt.height;switch(Ua(this,!0)){case wn:E=x=0;break;case Mn:lt=Math.max(a-z,0),ut=Math.max(y-z,0);break;case bi:lt=Math.max(a-z,0),E=0;break;case zi: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 wn:break;case Mn:rt=lt,ot=ut;break;case Si:x=Math.min(lt/rt,ut/ot),isFinite(x)||(x=1),rt*=x,ot*=x;break;default:he(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&&xe.$(this.ua.Sk,a-z)&&xe.$(this.ua.Rk,y-z)||(this.ua=yr.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===rr?Mn:y:y===rr?Km[a.figure].defaultStretch:y}bt.eh=function(a,y,x,E){Sa(this,a,y,x,E)},bt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},bt.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 Et=lt.bounds;if(ut=!1,lt.type===On.j)if(1.5>=this.strokeWidth)ut=xe.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=xn(),a=new It,xe.Ve(lt.startX+E,lt.startY+ut,lt.endX+E,lt.endY+ut,z,tt,rt,ot,a)&&y.push(a),a=new It,xe.Ve(lt.startX-E,lt.startY-ut,lt.endX-E,lt.endY-ut,z,tt,rt,ot,a)&&y.push(a),a=new It,xe.Ve(lt.startX+E,lt.startY+ut,lt.startX-E,lt.startY-ut,z,tt,rt,ot,a)&&y.push(a),a=new It,xe.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 Nn(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);Nn(y)}else if(lt.type===On.u)ut=xe.Ff(Et.x-ft,Et.y-ft,Et.x+Et.width+ft,Et.y+Et.height+ft,z,tt,rt,ot,b);else if(lt.type===On.F){y=Oe.allocAt(Et.x,Et.y,Et.width,Et.height).Bc(ft,ft);t:if(y.width===0)ut=xe.Ve(y.x,y.y,y.x,y.y+y.height,z,tt,rt,ot,b);else if(y.height===0)ut=xe.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}Oe.free(y)}else if(lt.type===On.o){yt=It.alloc();var Tt=rt-z,Dt=ot-tt,Xt=Tt*Tt+Dt*Dt,jt=z,ie=tt;if(0<Xt&&Et.contains(jt,ie)&&(yt.x=jt,yt.y=ie,this.ca(yt)))for(Tt!==0&&.5>Math.abs(Tt)?(Dt*=.5/Tt,Tt=.5):Dt!==0&&.5>Math.abs(Dt)&&(Tt*=.5/Dt,Dt=.5),jt-=Tt,ie-=Dt;Et.contains(jt,ie);)jt-=Tt,ie-=Dt;for(b.x=rt,b.y=ot,Dt=0;Dt<lt.figures.count;Dt++){var le=lt.figures.s[Dt],fe=le.isFilled?jt:z,ye=le.isFilled?ie:tt,_e=le.segments;Et=le.startX,Tt=le.startY;for(var Xn=Et,mi=Tt,hi=0;hi<_e.count;hi++){var Rn=_e.s[hi],mn=Rn.type,ur=Rn.endX,qi=Rn.endY,Jr=!1;switch(mn){case ms:Xn=ur,mi=qi;break;case po:Jr=A0(Et,Tt,ur,qi,fe,ye,rt,ot,yt);break;case Bs:Jr=xe.Eo(Et,Tt,Rn.point1X,Rn.point1Y,Rn.point2X,Rn.point2Y,ur,qi,fe,ye,rt,ot,.6,yt);break;case Na:Jr=xe.Eo(Et,Tt,Et+2/3*(Rn.point1X-Et),Tt+2/3*(Rn.point1Y-Tt),ur+2/3*(Rn.point1X-ur),qi+2/3*(Rn.point1Y-qi),ur,qi,fe,ye,rt,ot,.6,yt);break;case ns:case nl:mn=Rn.type===ns?xa(Rn,le):el(Rn,le,Et,Tt);var So=mn.length;if(So===0){Jr=A0(Et,Tt,Rn.type===ns?Rn.centerX:Rn.endX,Rn.type===ns?Rn.centerY:Rn.endY,fe,ye,rt,ot,yt);break}for(qi=null,ur=0;ur<So;ur++){if(qi=mn[ur],ur===0&&A0(Et,Tt,qi[0],qi[1],fe,ye,rt,ot,yt)){var Zs=u0(fe,ye,yt,Xt,b);Zs<Xt&&(Xt=Zs,ut=!0)}xe.Eo(qi[0],qi[1],qi[2],qi[3],qi[4],qi[5],qi[6],qi[7],fe,ye,rt,ot,.6,yt)&&(Zs=u0(fe,ye,yt,Xt,b),Zs<Xt&&(Xt=Zs,ut=!0))}ur=qi[6],qi=qi[7];break;default:he("Unknown Segment type: "+mn)}Et=ur,Tt=qi,Jr&&(Jr=u0(fe,ye,yt,Xt,b),Jr<Xt&&(Xt=Jr,ut=!0)),Rn.isClosed&&(ur=Xn,qi=mi,A0(Et,Tt,ur,qi,fe,ye,rt,ot,yt)&&(Rn=u0(fe,ye,yt,Xt,b),Rn<Xt&&(Xt=Rn,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,It.free(yt)}else he("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(xe.$(a,x)&&xe.$(y,E)||xe.$(b,tt)&&xe.$(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||xe.$(ot.y,a))&&(ot.y<y||xe.$(ot.y,y))&&(lt=!0)):(y=a<x?a:x,a=a<x?x:a,(ot.x>y||xe.$(ot.x,y))&&(ot.x<a||xe.$(ot.x,a))&&(lt=!0)),lt)}bt.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=It.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)))),It.free(z),b},bt.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=$i.alloc();x.set(y),x.Vj();var E=a.left,b=a.right,z=a.top;a=a.bottom;var tt=It.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 It.free(tt),!0;var rt=It.alloc(),ot=It.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)))),It.free(tt),$i.free(x),It.free(rt),It.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)}bt.tx=function(a,y,x){function E(Xt,jt){for(var ie=Xt.length,le=0;le<ie;le+=2)if(jt.zd(Xt[le],Xt[le+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,gi(a.x,a.y,rt,ot)<=b&&gi(a.x,a.y,lt,ot)<=b&&gi(a.x,a.y,rt,tt)<=b&&gi(a.x,a.y,lt,tt)<=b)return!0}if(rt=y.startX,ot=y.startY,lt=y.endX,tt=y.endY,y.type===On.j){if(x=(rt-lt)*(a.x-lt)+(ot-tt)*(a.y-tt),dn(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===On.u)return y=!1,x&&(y=dn(a.x,a.y,rt,ot,rt,tt)<=b||dn(a.x,a.y,rt,ot,lt,ot)<=b||dn(a.x,a.y,lt,ot,lt,tt)<=b||dn(a.x,a.y,rt,tt,lt,tt)<=b),y;if(y.type===On.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 dn(a.x,a.y,rt,ot,lt,tt)<=b;if(x){if(a=xe.$y(ut,ft,y,z),a*a<=b)return!0}else return!(gi(y,z,-ut,0)>=b||gi(y,z,0,-ft)>=b||gi(y,z,0,ft)>=b||gi(y,z,ut,0)>=b)}else if(y.type===On.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&&dn(a.x,a.y,z,rt,z,lt)>b&&dn(a.x,a.y,z,rt,ot,rt)>b&&dn(a.x,a.y,ot,lt,z,lt)>b&&dn(a.x,a.y,ot,lt,ot,rt)>b)return!1;if(z=Math.sqrt(b),x){if(this.fill===null?vu(y,a.x,a.y,z):as(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 ms:case po:if(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b)return!1;break;case Bs:var yt=xn();if(xe.Qe(tt,ut,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.8,yt),tt=E(yt,a),Nn(yt),tt||(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b))return!1;break;case Na:if(yt=xn(),xe.ep(tt,ut,ft.point1X,ft.point1Y,ft.endX,ft.endY,.8,yt),tt=E(yt,a),Nn(yt),tt||(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b))return!1;break;case ns:case nl:yt=ft.type===ns?xa(ft,z):el(ft,z,tt,ut);var Et=yt.length;if(Et===0){if(tt=ft.type===ns?ft.centerX:ft.endX,ut=ft.type===ns?ft.centerY:ft.endY,a.zd(tt,ut)>b)return!1;break}ft=null;for(var Tt=xn(),Dt=0;Dt<Et;Dt++)if(ft=yt[Dt],Tt.length=0,xe.Qe(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.8,Tt),E(Tt,a))return Nn(Tt),!1;Nn(Tt),ft!==null&&(tt=ft[6],ut=ft[7]);break;default:he("Unknown Segment type: "+ft.type)}}return!0}}}return!1},bt.qc=function(){this.ua=null},bt.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=hs):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new Kn(1-hs.x,hs.y)))}yr.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var E=eh[a.toArrow];else a.fromArrow!=="None"?E=eh[a.fromArrow]:(E=xe.Ze[a.figure],typeof E=="string"&&(E=xe.Ze[E]),E===void 0&&he("Unknown Shape.figure: "+a.figure),E=E(a,y,x),E.Sk=y,E.Rk=x);if(E===null){var b=xe.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 xe.um)if(b.toLowerCase()===x){E=b;break}if(E!==null)return a=On.parse(xe.um[E],!1),eh[E]=a,x!==E&&(eh[x]=E),E}}return typeof y=="string"?y:y instanceof On?a:null}Ue.Object.defineProperties(yr.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),ta(this)&&(a=this.part,a!==null&&Mo(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=On.parse(a);var y=a.normalize();this.geometry=a,this.position=a=It.allocAt(-y.x,-y.y),It.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&&Ft(a,"Shape.fill"),a instanceof no&&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&&Ft(a,"Shape.stroke"),a instanceof no&&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 Wn(a,"value >= 0",yr,"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"?Wn(a,'"butt", "round", or "square"',yr,"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"?Wn(a,'"miter", "bevel", or "round"',yr,"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)||he("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=xe.Ze[a];typeof x=="function"?x=a:(x=xe.Ze[a.toLowerCase()])||he("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?he("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?he("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:ws},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:ws},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:rr},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&&bu(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))}}}),yr.prototype.intersectsRect=yr.prototype.Yc,yr.prototype.containedInRect=yr.prototype.fh,yr.prototype.getNearestIntersectionPoint=yr.prototype.rs,yr.prototype.getDocumentBounds=yr.prototype.mi,yr.prototype.getDocumentPoint=yr.prototype.ga;var eh=new Hi,Km=new Hi;yr.className="Shape",yr.getFigureGenerators=function(){var a=new Qe,y;for(y in xe.Ze)y!==y.toLowerCase()&&a.add(y,xe.Ze[y]);return a.freeze(),a},yr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),E=xe.Ze;E[a]=y,E[x]=a},yr.getArrowheadGeometries=function(){var a=new Qe;for(E in xe.um)if(eh[E]===void 0){var y=On.parse(xe.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 On&&a.add(x,E)}return a.freeze(),a},yr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=On.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||he("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=rr,this.gg=this.fg=ws}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 Po(a,y){return we.call(this),g0||(al=Yo?new jl(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}He(Po,we),Po.prototype.cloneProtected=function(a){we.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())}bt=Po.prototype,bt.th=function(){we.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}bt.qb=function(a){a.classType===Po?this.wrap=a:we.prototype.qb.call(this,a)},bt.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},bt.v=function(){we.prototype.v.call(this)},bt.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;jo(this,a,this.xc,!0,!1,x,E),(ot||lt)&&jo(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 za&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,ft=this.spacingBelow,this.flip){case Qr:a.translate(b,0),a.scale(-1,1);break;case xr:a.translate(0,z),a.scale(1,-1);break;case lo: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 Et=this.Qc[yt];Et>b&&(Et=b),E+=y,this.Oj(this.Qb[yt],a,0,E,b,tt,Et,x,rt,ot,lt),E+=tt+ft}switch(this.flip){case Qr:a.scale(-1,1),a.translate(-b,0);break;case xr:a.scale(1,-1),a.translate(0,-z);break;case lo:a.scale(-1,-1),a.translate(-b,-z)}}},bt.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 za&&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 za&&y.ad.classList.add("gojs-td"))}},bt.kk=function(a,y,x){if(!we.prototype.kk.call(this,a,y,x))return!1;if(jo(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},bt.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:we.prototype.nk.call(this,a)},bt.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)}},bt.Wl=function(a,y,x,E){var b=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;al!==null&&My!==z&&(My=al.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,Iu(rt)),rt=lt+1}z=tt}else tt=z.indexOf(`
|
|
|
`,0),0<=tt&&(z=z.substr(0,tt)),z=Iu(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);Iu(lt)>y&&1<lt.length;)lt=lt.substr(0,lt.length-1);lt+=hp,y=Iu(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),gr(this.dc,z,tt),this.Ge(0,0,z,tt),this.svg!==null&&b!==this.Gc&&(this.Uc=!0)},bt.eh=function(a,y,x,E){Sa(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=Iu(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=Iu(z+y);0<y.length&<<=x;)z+=y,tt=tt.substr(y.length),y=xg(a,tt),lt=z+y,b&&(lt=lt.trim()),lt=Iu(lt);for(b&&(y=y.trim()),z+=y,x=Math.max(1,x-ot);Iu(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=hp;var ut=Iu(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);Iu(y)>x;){var ft=1;for(lt=Iu(y.substr(0,ft)),ut=0;lt<=x;)ft++,ut=lt,lt=Iu(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=Iu(y+ut);0<ut.length&<<=x;)y+=ut,tt=tt.substr(ut.length),ut=xg(a,tt),lt=y+ut,b&&(lt=lt.trim()),lt=Iu(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=Iu(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 Iu(a){return al===null?8*a.length:al.measureText(a).width}function up(a){if(a.df!==null)return a.df;var y=a.Ae;if(al===null){var x=16;return a.df=x}return Zm[y]!==void 0&&5e3>Ly?x=Zm[y]:(x=1.3*al.measureText("M").width,Zm[y]=x,Ly++),a.df=x}function By(a){if(al===null)return 6;if(f0[a]!==void 0&&5e3>Ym)var y=f0[a];else y=al.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=cn.alloc();zm(a,z,y,ot),b+=ot.height,cn.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}Ue.Object.defineProperties(Po.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:wn},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:wa},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),EA(this),this.da.Yr=a,bs(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=cn.alloc();zm(this,this.ec,999999,a);var y=a.width;cn.free(a),a=Cy(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),gr(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:Wm},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&&Ft(a,"TextBlock.stroke"),a instanceof no&&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&&Wn(a,"> 0",Po,"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 Ze(Po,"None",0),Py=new Ze(Po,"WrapFit",1),Vm=new Ze(Po,"WrapDesiredSize",2),Fy=new Ze(Po,"WrapBreakAll",3),Wm=new Ze(Po,"OverflowClip",0),d0=new Ze(Po,"OverflowEllipsis",1),Ap=new Ze(Po,"FormatTrim",0),Ey=new Ze(Po,"FormatNone",0),Fw=/[ \u200b\u00ad]/,Zm=new Hi,Ly=0,f0=new Hi,Ym=0,hp="...",My="",al=null,g0=!1;Po.className="TextBlock";function Xm(){this.nc=!1,this.Hd=null,this.Xf=wn,this.gq=Ap,this.Jq=1/0,this.$q=Wm,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=wa,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},Po.getEllipsis=function(){return hp},Po.setEllipsis=function(a){hp=a,f0=new Hi,Ym=0},Po.getBaseline=function(){return h0},Po.setBaseline=function(a){h0=a},Po.getUnderline=function(){return c0},Po.setUnderline=function(a){c0=a},Po.isValidFont=function(a){if(g0||(al=Yo?new jl(null).context:null,g0=!0),al===null)return!0;var y=al.font;if(a===y||a==="10px sans-serif")return!0;al.font="10px sans-serif",al.font=a;var x=al.font;if(x!=="10px sans-serif")return al.font=y,!0;al.font="19px serif";var E=al.font;return al.font=a,x=al.font,al.font=y,x!==E},Po.FormatNone=Ey,Po.FormatTrim=Ap,Po.None=jm,Po.OverflowClip=Wm,Po.OverflowEllipsis=d0,Po.WrapBreakAll=Fy,Po.WrapDesiredSize=Vm,Po.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 ll(a,y){we.call(this),this.Eg=null,this.qo="",this.Xg=la,this.Nk=Mn,this.Zg=this.Hd=null,this.Mk=Cr,this.Xf=wn,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;He(ll,we),ll.prototype.cloneProtected=function(a){we.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},ll.prototype.qb=function(a){a===wn||a===Si||a===Lr?this.imageStretch=a:we.prototype.qb.call(this,a)},ll.prototype.toString=function(){return"Picture("+this.source+")#"+Zn(this)};function Bg(a){a===void 0&&(a=""),a!==""?Sg[a]&&(delete Sg[a],p0--):(Sg=new Hi,p0=0)}function by(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()||(Ps(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=xn();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);Nn(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}ll.prototype.hA=function(){if(this.source!==""){Bg(this.source);var a=this.source;this.source="",this.source=a}},ll.prototype.redraw=function(){this.N(),this.Uc=!0},ll.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 za;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,Et=this.Nk,Tt=this.Mk;switch(Et){case wn:if(this.sourceRect.w())break;ft>=E.width&&(z=z+Tt.offsetX+(ft*Tt.x-E.width*Tt.x)),yt>=E.height&&(tt=tt+Tt.offsetY+(yt*Tt.y-E.height*Tt.y)),ot=Math.min(E.width,ft),rt=Math.min(E.height,yt);break;case Mn:ft=E.width,yt=E.height;break;case Si:case Lr:Et===Si?(Et=Math.min(E.height/yt,E.width/ft),ft*=Et,yt*=Et):Et===Lr&&(Et=Math.max(E.height/yt,E.width/ft),ft*=Et,yt*=Et,ft>=E.width&&(z=(z+Tt.offsetX+(ft*Tt.x-E.width*Tt.x)/ft)*ot),yt>=E.height&&(tt=(tt+Tt.offsetY+(yt*Tt.y-E.height*Tt.y)/yt)*rt),ot*=1/(ft/E.width),rt*=1/(yt/E.height),ft=E.width,yt=E.height)}Et=this.Df()*y.scale;var Dt=ft*Et*yt*Et,Xt=ot*rt/Dt,jt=x.__goCache;Et=null;var ie=Ew;if(!b){if(x.sq&&jt!==void 0&&4<Dt&&Xt>ie*ie)for(jt.gi===null&&(Ty(jt,4,lt,ut,x),Ty(jt,16,lt,ut,x)),b=jt.gi,lt=b.length,ut=0;ut<lt&&b[ut].ratio*b[ut].ratio<Xt;ut++)Et=b[ut];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{b=new jl(null).context;try{b.drawImage(this.Eg,0,0)}catch(le){this.en=!1}try{b.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(le){this.vl=!0}}if(this.vl)return}}switch(b=ft<E.width?Tt.offsetX+(E.width*Tt.x-ft*Tt.x):0,Tt=yt<E.height?Tt.offsetY+(E.height*Tt.y-yt*Tt.y):0,this.flip){case Qr:a.translate(Math.min(E.width,ft),0),a.scale(-1,1);break;case xr:a.translate(0,Math.min(E.height,yt)),a.scale(1,-1);break;case lo:a.translate(Math.min(E.width,ft),Math.min(E.height,yt)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&jt!==void 0&&Et!==null&&Et.ratio!==1){a.save(),y=Et.ratio;try{a.drawImage(Et.source,z/y,tt/y,Math.min(Et.source.width,ot/y),Math.min(Et.source.height,rt/y),b,Tt,Math.min(E.width,ft),Math.min(E.height,yt)),a instanceof za&&(this.bt=[z/y,tt/y,Math.min(Et.source.width,ot/y),Math.min(Et.source.height,rt/y),b,Tt,Math.min(E.width,ft),Math.min(E.height,yt)])}catch(le){this.en=!1}a.restore()}else try{a.drawImage(x,z,tt,ot,rt,b,Tt,Math.min(E.width,ft),Math.min(E.height,yt)),a instanceof za&&(this.bt=[z,tt,ot,rt,b,Tt,Math.min(E.width,ft),Math.min(E.height,yt)])}catch(le){this.en=!1}switch(this.flip){case Qr:a.scale(-1,1),a.translate(-Math.min(E.width,ft),0);break;case xr:a.scale(1,-1),a.translate(0,-Math.min(E.height,yt));break;case lo:a.scale(-1,-1),a.translate(-Math.min(E.width,ft),-Math.min(E.height,yt))}}}}},ll.prototype.Wl=function(a,y,x,E){var b=this.desiredSize,z=Ua(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===Mn||z===bi?(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===Mn||z===zi?(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)),gr(this.dc,a,y),this.Ge(0,0,a,y)},ll.prototype.eh=function(a,y,x,E){Sa(this,a,y,x,E)},Ue.Object.defineProperties(ll.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||he("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 Be),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()||(Ps(this,!1),this.v())):x&&by(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(Yo){var E=null;if(x[a]!==void 0)E=x[a];else if(a!==""){30<p0&&(Bg(),x=Sg),E=ui("img"),E.hn=!0,by(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 ky),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}}}),ll.prototype.redraw=ll.prototype.redraw,ll.prototype.reloadSource=ll.prototype.hA;var p0=0,Ew=4;ll.className="Picture",Sg=new Hi,ll.clearCache=Bg;function ky(){this.gi=null}function Ty(a,y,x,E,b){a.gi===null&&(a.gi=[]);var z=new jl(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))}ky.className="PictureCacheArray";function Ny(a,y){this.source=a,this.ratio=y}Ny.className="PictureCacheInstance";function Cg(){this.os=new On,this.mc=null}Cg.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new On,this.mc=null};function Pg(a,y,x,E,b,z){a.mc=new Ss,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 _r(ms);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 _r(po);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 _r(Bs);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 _r(Na);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 _r(ns);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 _r(nl,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 ka(a,y){var x=a.toLowerCase(),E=xe.Ze;E[a]=y,E[x]=a}ka("Rectangle",function(a,y,x){a="r"+y+","+x;var E=xe.Mf[a];return E!==void 0||(E=new On(On.u),E.endX=y,E.endY=x,xe.Nf<xe.vm&&(xe.Mf[a]=E,xe.Nf++)),E}),ka("Square",function(a,y,x){a="s"+y+","+x;var E=xe.Mf[a];return E!==void 0||(E=new On(On.u),E.endX=y,E.endY=x,E.defaultStretch=Si,xe.Nf<xe.vm&&(xe.Mf[a]=E,xe.Nf++)),E}),ka("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=xe.Mf[E];if(b!==void 0)return b;var z=a*xe.wg;return b=new On().add(new Ss(a,0,!0).add(new _r(po,y-a,0)).add(new _r(Bs,y,a,y-z,0,y,z)).add(new _r(po,y,x-a)).add(new _r(Bs,y-a,x,y,x-z,y-z,x)).add(new _r(po,a,x)).add(new _r(Bs,0,x-a,z,x,0,x-z)).add(new _r(po,0,a)).add(new _r(Bs,a,0,0,z,z,0).close())),1<z&&(b.spot1=new Kn(0,0,z,z),b.spot2=new Kn(1,1,-z,-z)),xe.Nf<xe.vm&&(xe.Mf[E]=b,xe.Nf++),b}),ka("Border","RoundedRectangle"),ka("Ellipse",function(a,y,x){a="e"+y+","+x;var E=xe.Mf[a];return E!==void 0||(E=new On(On.F),E.endX=y,E.endY=x,E.spot1=Oo,E.spot2=so,xe.Nf<xe.vm&&(xe.Mf[a]=E,xe.Nf++)),E}),ka("Circle",function(a,y,x){a="c"+y+","+x;var E=xe.Mf[a];return E!==void 0||(E=new On(On.F),E.endX=y,E.endY=x,E.spot1=Oo,E.spot2=so,E.defaultStretch=Si,xe.Nf<xe.vm&&(xe.Mf[a]=E,xe.Nf++)),E}),ka("TriangleRight",function(a,y,x){return new On().add(new Ss(0,0).add(new _r(po,y,.5*x)).add(new _r(po,0,x).close())).pm(0,.25,.5,.75)}),ka("TriangleDown",function(a,y,x){return new On().add(new Ss(0,0).add(new _r(po,y,0)).add(new _r(po,.5*y,x).close())).pm(.25,0,.75,.5)}),ka("TriangleLeft",function(a,y,x){return new On().add(new Ss(y,x).add(new _r(po,0,.5*x)).add(new _r(po,y,0).close())).pm(.5,.25,1,.75)}),ka("TriangleUp",function(a,y,x){return new On().add(new Ss(y,x).add(new _r(po,0,x)).add(new _r(po,.5*y,0).close())).pm(.25,.5,.75,1)}),ka("Triangle","TriangleUp"),ka("Diamond",function(a,y,x){return new On().add(new Ss(.5*y,0).add(new _r(po,0,.5*x)).add(new _r(po,.5*y,x)).add(new _r(po,y,.5*x).close())).pm(.25,.25,.75,.75)}),ka("LineH",function(a,y,x){return a=new On(On.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),ka("LineV",function(a,y,x){return a=new On(On.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),ka("None","Rectangle"),ka("BarH","Rectangle"),ka("BarV","Rectangle"),ka("MinusLine","LineH"),ka("PlusLine",function(a,y,x){return new On().add(new Ss(0,x/2,!1).add(new _r(po,y,x/2)).add(new _r(ms,y/2,0)).add(new _r(po,y/2,x)))}),ka("XLine",function(a,y,x){return new On().add(new Ss(0,x,!1).add(new _r(po,y,0)).add(new _r(ms,0,0)).add(new _r(po,y,x)))}),ka("LineRight",function(a,y,x){return new On().add(new Ss(.25*y,0,!1).add(new _r(po,.75*y,.5*x)).add(new _r(po,.25*y,x)))}),ka("LineDown",function(a,y,x){return new On().add(new Ss(0,.25*x,!1).add(new _r(po,.5*y,.75*x)).add(new _r(po,y,.25*x)))}),ka("LineLeft",function(a,y,x){return new On().add(new Ss(.75*y,0,!1).add(new _r(po,.25*y,.5*x)).add(new _r(po,.75*y,x)))}),ka("LineUp",function(a,y,x){return new On().add(new Ss(0,.75*x,!1).add(new _r(po,.5*y,.25*x)).add(new _r(po,y,.75*x)))}),xe.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=Pr,this.ir=null,this.jr="",this.lr=ws,this.Gq="",this.Hq=kr,this.Pq=pn,this.Kq=Qn,this.Up=null,this.Cq=127,this.zr=zn,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 Ii(a,y){a===void 0||a instanceof io||typeof a=="string"?En.call(this,a):(En.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 It(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new Oe,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}He(Ii,En),Ii.prototype.cloneProtected=function(a){En.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},bt=Ii.prototype,bt.Af=function(a){En.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},bt.toString=function(){var a=ai(this.constructor)+"#"+Zn(this);return this.data!==null&&(a+="("+Ki(this.data)+")"),a};function ul(a){a.P===null?a.P=new Jm:a.P.nc&&(a.P=a.P.copy())}bt.th=function(){En.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},bt.gk=function(a,y,x,E,b,z,tt){var rt=this.diagram;rt!==null&&(a===is&&y==="elements"?b instanceof En?Nu(b,function(ot){Cv(rt.partManager,ot),vA(rt,ot)}):Ch(rt,b):a===cs&&y==="elements"&&(b instanceof En?Nu(b,function(ot){Pv(rt.partManager,ot,rt)}):Hd(rt,b)),rt.cb(a,y,x,E,b,z,tt))},bt.La=function(a){if(En.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 En&&Nu(b,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Ii.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Ii.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Ii.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 Qe),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)))}}},Ii.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)}},Ii.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=xn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Nn(y)}},Ii.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 hr?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof Wr))break t;cu(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=En.Link),x.adornedObject=y)}if(x!==null){x.type===En.Link&&x.v(),this.bh("Selection",x);break t}}this.Jf("Selection")}for(bw(this,a),y=this.adornments;y.next();)y.value.La()}},Ii.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 bw(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=Oe.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(E,x),Oe.free(E),tv(a,!1)}}Ii.prototype.Ge=function(a,y,x,E){var b=this.uc;b.h(a,y,x,E),this.Lb===null&&(this.Lb=new $i);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),this.Lb=z,z.ws()||z.pp(b)},Ii.prototype.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Cr;this.locationSpot.sb()&&(z=this.locationSpot);var tt=It.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),It.free(tt)}},Ii.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Ii.prototype.moveTo=function(a,y,x){a=It.allocAt(a,y),this.move(a,x),It.free(a)},Ii.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())},Ii.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())},Ii.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new Qe),y.I(a)!==null)return y.I(a);var x=En.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 It),x=x.Mc()?Cr: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}Ii.prototype.mi=function(a){return a===void 0&&(a=new Oe),a.assign(this.actualBounds)},Ii.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function Uy(a){var y=It.alloc(),x=a.locationObject,E=x.naturalBounds,b=x instanceof yr?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}Ii.prototype.arrange=function(){if(Ba(this)===!1)Iy(this);else{qu(this,!1);var a=this.Ib,y=Oe.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()||xe.B(y.width,a.width)&&xe.B(y.height,a.height)||0<=this.vw&&this.C(16),Oe.free(y),tv(this,!1)}},bt=Ii.prototype,bt.Xl=function(a,y){var x=this.diagram;if(x!==null){var E=!1;if(x.Zi===!1&&a.w()){var b=Oe.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),Oe.free(b)}!(this.G&65536)&&a.D(y)||_y(this,E,x),x.N(),!a.w()&&!y.w()||Ur(a,y)||(this instanceof ti&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},bt.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 It(E.x+(a.x-y),E.y+(a.y-x)),this.g("location",E,this.ke.copy())),rd(this)===!1&&Ba(this)===!1&&(y0(this),Iy(this)),!0};function Qy(a,y,x,E,b){y===null||a instanceof Wr||(y=y.animationManager,y.zb&&bd(y,a,new It(E,b),x))}bt.mm=function(a,y,x){var E=this.ke,b=this.pa;if(x){if(E.x===a&&E.y===y)return;rd(this)||Ba(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)},bt.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,It.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 Wr||bd(x,a,new It(z,tt),y),E||y.x===z&&y.y===tt||a.g("position",new It(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 ti&&ku(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var E=x.viewportBounds;E.w()?od(a)?(qr(y,E)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(E)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}bt.si=function(){return!0},bt.Zc=function(){return!0},bt.ph=function(){return!1},bt.Dd=function(){return!0};function $m(a,y,x,E){y.constructor===a.constructor||zy||(zy=!0,pi('Should not change the class of the Part when changing category from "'+x+'" to "'+E+'"'),pi(" Old class: "+ai(a.constructor)+", new class: "+ai(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 ti&&(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 ti&&(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)}Ii.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},Ii.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},Ii.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},Ii.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},Ii.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},Ii.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},Ii.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},Ii.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},Ii.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}bt=Ii.prototype,bt.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}bt.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},bt.N=function(){var a=this.diagram;a!==null&&!Ba(this)&&!rd(this)&&this.isVisible()&&this.Ib.w()&&a.N($d(this,this.Ib))},bt.v=function(){En.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof ti&&this.labeledLink!==null&&bs(this.labeledLink),a.$b(!0))},bt.Vo=function(a){a||(a=this.Ah,a!==null&&av(a,this))},bt.Wo=function(a){a||(a=this.Ah,a!==null&&lv(a,this))},bt.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},bt.oz=function(){return nv(this,this)};function nv(a,y){var x=y.containingGroup;return x!==null?1+nv(a,x):y instanceof ti&&(y=y.labeledLink,y!==null)?nv(a,y):0}bt.sz=function(){return Ky(this,this)};function Ky(a,y){var x=y.containingGroup;return x!==null||y instanceof ti&&(x=y.labeledLink,x!==null)?Ky(a,x):y}bt.Td=function(a){return a instanceof hr?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 ti&&(y=y.labeledLink,y!==null)?iv(a,y,x):!1:!0}bt.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof hr&&w0(y,!0),y instanceof ti){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 ti&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof hr&&w0(y,!1),y instanceof ti&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Ii.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof ti&&this.isLinkLabel)},Ii.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 ti&&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 Wr)){if(a.add(y),y instanceof ti){if(x&&y instanceof hr)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&<: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 _n)for(y=y.labelNodes;y.next();)sd(a,y.value,x,E,b,z)}}Ue.Object.defineProperties(Ii.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?er: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(cs,"parts",y,this,null,E,!0),E=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=E&&x.cb(is,"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&&(ul(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 Wr?this.type!==En.Link&&this.placeholder!==null?this.nf=this.placeholder:this.nf=this:this.nf=this}return this.nf.visible?this.nf:this}},minLocation:{get:function(){return this.P!==null?this.P.Pq:pn},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),ul(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:Qn},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),ul(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&&(ul(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:kr},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),ul(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,Ba(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 Wr)){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 Wr?this instanceof Wr&&(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&&(cu(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&&(cu(x),x=x.copy(),x===null||x instanceof _n||(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&&(ul(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&&(ul(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&&(ul(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 _n?(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&&(ul(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&&(ul(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&&(ul(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:Pr},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),ul(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&&(ul(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&&(ul(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:ws},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),ul(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&&he("Cannot make a Group a member of itself: "+this.toString()),he("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 hr&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?av(a,this):this instanceof hr&&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 hr){for(x=new Be,sd(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof ti)for(E=E.linksConnected;E.next();)Fg(E.value)}if(this instanceof ti){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 he("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&&(ul(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof ti&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(ul(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&&(ul(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:zn},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),ul(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&&(ul(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&&(ul(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Ii.prototype.invalidateLayout=Ii.prototype.C,Ii.prototype.findCommonContainingGroup=Ii.prototype.px,Ii.prototype.isMemberOf=Ii.prototype.Td,Ii.prototype.findTopLevelPart=Ii.prototype.sz,Ii.prototype.findSubGraphLevel=Ii.prototype.oz,Ii.prototype.ensureBounds=Ii.prototype.Va,Ii.prototype.getDocumentBounds=Ii.prototype.mi,Ii.prototype.findObject=Ii.prototype.fb,Ii.prototype.moveTo=Ii.prototype.moveTo,Ii.prototype.invalidateAdornments=Ii.prototype.Wb,Ii.prototype.clearAdornments=Ii.prototype.Ej,Ii.prototype.removeAdornment=Ii.prototype.Jf,Ii.prototype.addAdornment=Ii.prototype.bh,Ii.prototype.findAdornment=Ii.prototype.Pj,Ii.prototype.updateTargetBindings=Ii.prototype.La;var zy=!1;Ii.className="Part",Ii.LayoutNone=0,Ii.LayoutAdded=1,Ii.LayoutRemoved=2,Ii.LayoutShown=4,Ii.LayoutHidden=8,Ii.LayoutNodeSized=16,Ii.LayoutGroupLayout=32,Ii.LayoutNodeReplaced=64,Ii.LayoutStandard=127,Ii.LayoutAll=16777215;function Wr(a,y){a===void 0||a instanceof io||typeof a=="string"?Ii.call(this,a):(Ii.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)}He(Wr,Ii),Wr.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Wr.prototype.updateRelationshipsFromData=function(){},Wr.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof _n&&y instanceof yr){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 yr&&(b.ua=a)}}},Wr.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!Ba(a))},Wr.prototype.Zc=function(){return!1},Wr.prototype.gk=function(a,y,x,E,b,z,tt){if(a===is&&y==="elements"){if(b instanceof ja)this.$a===null&&(this.$a=b);else if(b instanceof En){var rt=b.Nl(function(ot){return ot instanceof ja});rt instanceof ja&&this.$a===null&&(this.$a=rt)}}else a===cs&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof En&&this.$a.rg(E)&&(this.$a=null));Ii.prototype.gk.call(this,a,y,x,E,b,z,tt)},Wr.prototype.updateAdornments=function(){},Wr.prototype.Lj=function(){},Ue.Object.defineProperties(Wr.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}}}),Wr.className="Adornment";function rv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Wi,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 ti(a,y){a===void 0||a instanceof io||typeof a=="string"?Ii.call(this,a):(Ii.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new ee,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}He(ti,Ii),ti.prototype.cloneProtected=function(a){Ii.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},bt=ti.prototype,bt.Af=function(a){Ii.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())}bt.th=function(){Ii.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function jy(a,y){y!==null&&(a.af===null&&(a.af=new Be),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}bt.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=Vy(this,a,y,x),a!==null&&a.Sl()},bt.gk=function(a,y,x,E,b,z,tt){a===is&&y==="elements"?this.wc=null:a===cs&&y==="elements"&&(this.wc=null),Ii.prototype.gk.call(this,a,y,x,E,b,z,tt)},bt.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Tl(x.fromPort),Tl(x.toPort),x.bb())}};function Wy(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Tl(x.fromPort),Tl(x.toPort),x.bb())}}function Tl(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Tl(y.port)}}bt.si=function(){return!0},ti.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},ti.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},ti.prototype.isVisible=function(){if(!Ii.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===Cs){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},ti.prototype.Zb=function(a){Ii.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)}},ti.prototype.qx=function(){var a=new Be,y=new Be;return Zy(this,this,a,y),y.iterator};function Zy(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)&&Zy(a,b?tt.toNode:tt.fromNode,x,E):E.add(tt)})}}ti.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new oe(this.jb),x=this;return y.predicate=function(E){return E.fromNode===x&&E.fromPortId===a||E.toNode===x&&E.toPortId===a},y},bt=ti.prototype,bt.Mo=function(a){a===void 0&&(a=null);var y=new oe(this.jb),x=this;return y.predicate=function(E){return E.fromNode!==x?!1:a===null?!0:E.fromPortId===a},y},bt.Sd=function(a){a===void 0&&(a=null);var y=new oe(this.jb),x=this;return y.predicate=function(E){return E.toNode!==x?!1:a===null?!0:E.toPortId===a},y},bt.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 Be,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 Be,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new lr(x):er},bt.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 Be,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new lr(x):er},bt.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 Be,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new lr(x):er},bt.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new oe(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},bt.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new oe(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){Tl(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){Tl(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}}}ti.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},bt=ti.prototype,bt.Vo=function(a){Ii.prototype.Vo.call(this,a),a||(cp(this),a=this.Yk,a!==null&&i1(a,this))},bt.Wo=function(a){Ii.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},bt.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,Ii.prototype.Lj.call(this)},bt.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 Qe: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=xn()),x.push(E);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Nn(x)}}}bt.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},bt.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}},bt.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},bt.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},bt.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof ti)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},bt.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 Be;return a(this,y),y},bt.uz=function(){return Jy(this,this)};function Jy(a,y){return y=y.pg(),y===null?0:1+Jy(a,y)}bt.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new oe(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},bt.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 ee,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 ee,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new lr(x):er},bt.wz=function(a){a===void 0&&(a=1/0);var y=new Be;return sd(y,this,!1,a,!0),y},ti.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 Be;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&<!==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(Et){return Et===yt.uv||!Et.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}ti.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 Be;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(Et){return Et===yt.vv||!Et.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}Ue.Object.defineProperties(ti.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&&ku(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:Wi},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&&ku(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),bs(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))}}}),ti.prototype.expandTree=ti.prototype.expandTree,ti.prototype.collapseTree=ti.prototype.collapseTree,ti.prototype.findTreeParts=ti.prototype.wz,ti.prototype.findTreeChildrenNodes=ti.prototype.Ou,ti.prototype.findTreeChildrenLinks=ti.prototype.Qo,ti.prototype.findTreeLevel=ti.prototype.uz,ti.prototype.findTreeParentChain=ti.prototype.vz,ti.prototype.findTreeParentNode=ti.prototype.pg,ti.prototype.findTreeParentLink=ti.prototype.kh,ti.prototype.findCommonTreeParent=ti.prototype.gz,ti.prototype.findTreeRoot=ti.prototype.xz,ti.prototype.isInTreeOf=ti.prototype.Nz,ti.prototype.findPort=ti.prototype.ns,ti.prototype.findLinksTo=ti.prototype.kz,ti.prototype.findLinksBetween=ti.prototype.jz,ti.prototype.findNodesInto=ti.prototype.Oo,ti.prototype.findNodesOutOf=ti.prototype.Po,ti.prototype.findNodesConnected=ti.prototype.Mu,ti.prototype.findLinksInto=ti.prototype.Sd,ti.prototype.findLinksOutOf=ti.prototype.Mo,ti.prototype.findExternalTreeLinksConnected=ti.prototype.qx,ti.prototype.invalidateConnectedLinks=ti.prototype.Bd,ti.prototype.invalidateLinkBundle=ti.prototype.Lz;var kw=new Ze(ti,"SpreadingNone",10),B0=new Ze(ti,"SpreadingEvenly",11),sv=new Ze(ti,"SpreadingPacked",12);ti.className="Node",ti.SpreadingNone=kw,ti.SpreadingEvenly=B0,ti.SpreadingPacked=sv;function hr(a,y){a===void 0||a instanceof io||typeof a=="string"?ti.call(this,a):(ti.call(this),a&&(y=a)),this.U|=4608,this.Gn=new Be,this.$a=null,this.Sc=new Go,this.Sc.group=this,this.gl=new Be,this.tb=this.$p=null,y&&Object.assign(this,y)}He(hr,ti),hr.prototype.cloneProtected=function(a){ti.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof ja});y instanceof ja?a.$a=y:a.$a=null,this.Sc!==null?(a.Sc=this.Sc.copy(),a.Sc.group=a):(a.Sc!==null&&(a.Sc.group=null),a.Sc=null),this.tb!==null&&(a.tb=this.tb.copy())},bt=hr.prototype,bt.Af=function(a){ti.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 ti)x.Bd(y);else if(x instanceof _n)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},bt.gk=function(a,y,x,E,b,z,tt){if(a===is&&y==="elements"){if(b instanceof ja)this.$a===null?this.$a=b:this.$a!==b&&he("Cannot insert a second Placeholder into the visual tree of a Group.");else if(b instanceof En){var rt=b.Nl(function(ot){return ot instanceof ja});rt instanceof ja&&(this.$a===null?this.$a=rt:this.$a!==rt&&he("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===cs&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof En&&this.$a.rg(E)&&(this.$a=null));ti.prototype.gk.call(this,a,y,x,E,b,z,tt)},bt.Xl=function(a,y){ti.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==En.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof En&&(a=a.Pb()),this.tb===null&&(this.tb=new Oe),a.mi(this.tb),a instanceof yr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},bt.eh=function(a,y,x,E){this.nf=this.$a,ti.prototype.eh.call(this,a,y,x,E)},bt.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof _n||y.Va()}),ti.prototype.Va.call(this)},bt.si=function(){if(!ti.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof ti){if(y.isVisible()&&Ba(y))return!1}else if(y instanceof _n&&y.isVisible()&&Ba(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function av(a,y){if(a.Gn.add(y)){y instanceof hr&&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 _n&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function lv(a,y){if(a.Gn.remove(y)){y instanceof hr&&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 _n&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}bt.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)}ti.prototype.Lj.call(this)},hr.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=qe(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},hr.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var E=!0;for(a=qe(a).iterator;a.next();){var b=a.value;!y||x.isValidMember(this,b)?b.containingGroup=this:E=!1}return E},hr.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))},bt=hr.prototype,bt.Bd=function(a){var y=(this.U&65536)!==0;if(ti.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()?(Tl(x.fromPort),Tl(x.toPort),x.bb()):(E=x.toNode,E!==null&&E!==this&&E.Td(this)&&!E.isVisible()&&(Tl(x.fromPort),Tl(x.toPort),x.bb()))}}},bt.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 Be,E=y.iterator;E.next();){var b=E.value;if(b instanceof ti)for(b=b.linksConnected;b.next();){var z=b.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},bt.iz=function(){var a=this.Rj();a.add(this);for(var y=new Be,x=a.iterator;x.next();){var E=x.value;if(E instanceof ti)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},bt.hz=function(){function a(x,E){x!==null&&(E.add(x),a(x.containingGroup,E))}var y=new Be;return a(this,y),y},bt.Rj=function(){var a=new Be;return sd(a,this,!0,0,!0),a.remove(this),a},bt.Zb=function(a){ti.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},hr.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 hr&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,e1(z,y,x,E)),z instanceof ti)z.Bd(y),x.Aj(z,E);else if(z instanceof _n)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}hr.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 hr&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,n1(z,y,x,E)),z instanceof ti)z.Bd(y),x.Cj(z,E);else if(z instanceof _n)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}hr.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=It.alloc(),ti.prototype.move.call(this,a,y),a=new Be,y=this.Rj().iterator;y.next();)b=y.value,b instanceof _n&&(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 ti&&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 _n&&(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());It.free(z)}},Ue.Object.defineProperties(hr.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&&he("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)}}}),hr.prototype.expandSubGraph=hr.prototype.expandSubGraph,hr.prototype.collapseSubGraph=hr.prototype.collapseSubGraph,hr.prototype.findSubGraphParts=hr.prototype.Rj,hr.prototype.findContainingGroupChain=hr.prototype.hz,hr.prototype.findExternalNodesConnected=hr.prototype.iz,hr.prototype.findExternalLinksConnected=hr.prototype.Lu,hr.prototype.ensureBounds=hr.prototype.Va,hr.className="Group";function ja(a){we.call(this),this.yb=Gi,this.ko=new Oe(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}He(ja,we),ja.prototype.cloneProtected=function(a){we.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},ja.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return ho(0,0,y.width,y.height,a.x,a.y)},ja.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof hr||a instanceof Wr)||he("Placeholder is not inside a Group or Adornment."),a instanceof hr){var y=this.computeBorder(this.ko),x=this.minSize,E=this.dc;for(gr(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=It.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),It.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 yr&&(tt=z.strokeWidth);var rt=z.Df(),ot=z.naturalBounds,lt=(ot.width+tt)*rt;tt=(ot.height+tt)*rt,a.type!==En.Link&&(rt=z.ga(a.category==="Selection"?kr:a.locationSpot,It.alloc()),a.location=rt,It.free(rt)),isNaN(lt)||isNaN(tt)?(a=z.ga(kr,It.alloc()),lt=Oe.allocAt(a.x,a.y,0,0),lt.Ye(z.ga(yo,a)),lt.Ye(z.ga(Ts,a)),lt.Ye(z.ga(oo,a)),gr(y,lt.width+E||0,lt.height+b||0),this.Ge(-x.left,-x.top,y.width,y.height),It.free(a),Oe.free(lt)):(gr(y,lt+E||0,tt+b||0),this.Ge(-x.left,-x.top,y.width,y.height))}},ja.prototype.eh=function(a,y,x,E){this.actualBounds.h(a,y,x,E)},ja.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,E=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof hr&&!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=Oe.alloc(),b=this.computeMemberBounds(x);var z=this.yb;return y instanceof hr&&!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)),Oe.free(x),E&&y instanceof hr&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},ja.prototype.computeMemberBounds=function(a){if(!(this.part instanceof hr))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 _n&&(!y.computesBoundsIncludingLinks||yl(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},Ue.Object.defineProperties(ja.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())}}}),ja.className="Placeholder";function _n(a){Ii.call(this,En.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Va,this.Om=0,this.Qm=Va,this.Rm=NaN,this.qj=dv,this.po=.5,this.wd=null,this.Nb=new ee().freeze(),this.Tg=this.Mg=null,this.ml=new Oe,this.ua=new On,this.u=this.o=this.Sf=this.Wf=null,this.su=new It,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}He(_n,Ii),_n.prototype.cloneProtected=function(a){Ii.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())},bt=_n.prototype,bt.Af=function(a){Ii.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&&Tl(y),a=a.toPort,a!==null&&Tl(a)},bt.qb=function(a){a.classType===_n?(a.value&2)===2?this.routing=a:a===Wl||a===Bc||a===Lg?this.curve=a:a===gp||a===M0||a===b0?this.adjusting=a:a!==dv&&a!==Va&&he("Unknown Link enum value for a Link property: "+a):Ii.prototype.qb.call(this,a)},bt.Xc=function(){this.ba===null&&(this.ba=new If)},bt.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Ba(a)||rd(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Ba(a)||rd(a)))},bt.zv=function(){return!1},bt.Av=function(){},bt.Zc=function(){return!1},_n.prototype.computeAngle=function(a,y,x){return _n.computeAngle(y,x)},_n.computeAngle=function(a,y){switch(a){default:case Va: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 k0:a=xe.bp(y),90<a&&270>a&&(a-=180);break;case yp:a=xe.bp(y+90),90<a&&270>a&&(a-=180);break;case wp:a=xe.bp(y-90),90<a&&270>a&&(a-=180);break;case T0:if(a=xe.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return xe.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}bt=_n.prototype,bt.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Ii.prototype.oh.call(this)},bt.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},bt.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function i1(a,y){a.wd===null&&(a.wd=new Be),a.wd.add(y),a.v()}bt.Vo=function(a){if(Ii.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)}},bt.Wo=function(a){if(Ii.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)}},bt.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))},_n.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},_n.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?Ii.prototype.move.call(this,a,!1):(a=It.allocAt(x.x+E,x.y+b),Ii.prototype.move.call(this,a,!1),It.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)},_n.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},_n.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},_n.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(jn),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()===Wl))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()===Wl){if(y===3){x=this.i(0),E=this.i(1);var b=this.i(2);return xe.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),xe.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},_n.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()===Wl))return this.ua.wx(.5);if(this.computeCurve()===Wl&&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),xe.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)},bt=_n.prototype,bt.i=function(a){return this.Nb.s[a]},bt.dd=function(a,y){this.Nb.cd(a,y)},bt.L=function(a,y,x){this.Nb.cd(a,new It(y,x))},bt.Kz=function(a,y){this.Nb.Gb(a,y)},bt.m=function(a,y,x){this.Nb.Gb(a,new It(y,x))},bt.ne=function(a){this.Nb.add(a)},bt.yf=function(a,y){this.Nb.add(new It(a,y))},bt.pv=function(a){this.Nb.mb(a)},bt.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 ee,z=a.Nb.iterator;z.next();){var tt=z.value;b.add(new It(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),bs(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)}}bt.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},bt.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)}},bt.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))}bt.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())}},bt.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()}}},_n.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Gf||(Gf=new ti,Gf.desiredSize=ri,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 ti,zf.desiredSize=ri,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===Wl;this.Wf=lt&&!ut?ft=!0:!1;var yt=this.computeAdjusting()===Va||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 Et=z.x+rt/3,Tt=z.y+ot/3,Dt=Et,Xt=Tt;xe.B(ot,0)?Xt=0<rt?Xt-lt:Xt+lt:(ut=-rt/ot,ft=Math.sqrt(lt*lt/(ut*ut+1)),0>lt&&(ft=-ft),Dt=(0>ot?-1:1)*ft+Et,Xt=ut*(Dt-Et)+Tt),Et=z.x+2*rt/3,Tt=z.y+2*ot/3;var jt=Et,ie=Tt;xe.B(ot,0)?ie=0<rt?ie-lt:ie+lt:(jt=(0>ot?-1:1)*ft+Et,ie=ut*(jt-Et)+Tt),this.Fj(),this.ne(z),this.yf(Dt,Xt),this.yf(jt,ie),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,xe.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=Oe.alloc(),y.mi(rt),ot=rt.ca(b),yt.mi(rt),lt=rt.ca(E),(ot||lt)&&(tt=y.ga(F0(tt),new It),this.dd(0,this.getLinkPointFromPoint(a,y,tt,b,!0,tt)),x=yt.ga(F0(x),new It),this.dd(1,this.getLinkPointFromPoint(z,yt,x,E,!1,x))),Oe.free(rt))}else{ft=this.isAvoiding,yt&&(ut&&ft||lt)&&this.Fj();var le=lt?this.computeCurviness():0;ft=this.getLinkPoint(a,y,tt,!0,ut,E,b),Et=Dt=Tt=0,(ut||!rt||lt)&&(Xt=this.computeEndSegmentLength(a,y,tt,!0),Et=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)&&(Et-=ut?90:30,0>le&&(Et-=180)),0>Et?Et+=360:360<=Et&&(Et-=360),lt&&(Xt+=Math.abs(le)*(ut?1:2)),Et===0?Tt=Xt:Et===90?Dt=Xt:Et===180?Tt=-Xt:Et===270?Dt=-Xt:(Tt=Xt*Math.cos(Et*Math.PI/180),Dt=Xt*Math.sin(Et*Math.PI/180)),tt.Mc()&<&&(Xt=y.ga(Cr,It.alloc()),jt=It.allocAt(Xt.x+1e3*Tt,Xt.y+1e3*Dt),this.getLinkPointFromPoint(a,y,Xt,jt,!0,ft),It.free(Xt),It.free(jt))),Xt=this.getLinkPoint(E,b,x,!1,ut,a,y);var fe=ie=jt=0;if(ut||!ot||lt){var ye=this.computeEndSegmentLength(E,b,x,!1);fe=this.getLinkDirection(E,b,Xt,x,!1,ut,a,y),lt&&(ot||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(fe+=ut?0:30,0>le&&(fe+=180)),0>fe?fe+=360:360<=fe&&(fe-=360),lt&&(ye+=Math.abs(le)*(ut?1:2)),fe===0?jt=ye:fe===90?ie=ye:fe===180?jt=-ye:fe===270?ie=-ye:(jt=ye*Math.cos(fe*Math.PI/180),ie=ye*Math.sin(fe*Math.PI/180)),x.Mc()&<&&(x=b.ga(Cr,It.alloc()),tt=It.allocAt(x.x+1e3*jt,x.y+1e3*ie),this.getLinkPointFromPoint(E,b,x,tt,!1,Xt),It.free(x),It.free(tt))}x=ft,(ut||!rt||lt)&&(x=new It(ft.x+Tt,ft.y+Dt)),tt=Xt,(ut||!ot||lt)&&(tt=new It(Xt.x+jt,Xt.y+ie)),!yt&&!ut&&rt&&3<z&&this.adjustPoints(0,ft,z-2,tt)?this.dd(z-1,Xt):!yt&&!ut&&ot&&3<z&&this.adjustPoints(1,x,z-1,Xt)?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,Xt)):(this.Fj(),this.ne(ft),(ut||!rt||lt)&&this.ne(x),ut&&this.addOrthoPoints(x,Et,tt,fe,a,E),(ut||!ot||lt)&&this.ne(tt),this.ne(Xt))}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}_n.prototype.getLinkPointFromPoint=function(a,y,x,E,b,z){if(z===void 0&&(z=new It),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)}_n.prototype.getLinkPoint=function(a,y,x,E,b,z,tt,rt){if(rt===void 0&&(rt=new It),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=It.alloc(),lt=It.alloc();var ut=new Oe(y.ga(kr,ot),y.ga(yo,lt)),ft=this.computeSpot(!E,tt);a=this.getLinkPoint(z,tt,ft,!E,b,a,y,lt),(x.Hf(zo)||x.Hf(Io))&&a.y>=ut.y&&a.y<=ut.y+ut.height?rt.y=a.y:(x.Hf(Vo)||x.Hf(ys))&&a.x>=ut.x&&a.x<=ut.x+ut.width&&(rt.x=a.x),It.free(ot),It.free(lt)}}return rt}}return x=y.ga(F0(x),It.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=It.alloc(),tt=tt.ga(F0(ot),z),b&&(tt=uv(x,tt)),It.free(z)),this.getLinkPointFromPoint(a,y,x,tt,E,rt),It.free(x),rt},_n.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(Cr,It.alloc()),this.pointsCount>(z?6:2)?(rt=b?this.i(1):this.i(this.pointsCount-2),rt=z?uv(ot,rt.copy()):x):(x=It.alloc(),rt=rt.ga(Cr,x),It.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,It.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},_n.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)},_n.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Cr:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===ws?Ar:y)):(a=y||this.toPort,a===null?a=Cr:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===ws?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:Cr}_n.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Va&&4<this.pointsCount?this.computeMidPoint(new It):(a=y.Zn,a=a!==null?h1(a,this):null,a!==null?a.Zo:y.ga(Cr))},_n.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},_n.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=$i.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return Nm(this,y,x,b),z===void 0&&$i.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=$i.alloc(),ft.set(tt),ut instanceof En)rt=ut.Cf(a,y,x,E,b,ft);else if(this.path===ut){if(ut instanceof yr)if(rt=a,yt=E,ut.pickable===!1)rt=!1;else if(ft.multiply(ut.transform),yt)t:{var Et=rt,Tt=ft;if(ut.fh(Et,Tt))rt=!0;else{if(Tt===void 0&&(Tt=ut.transform,Et.Re(ut.actualBounds))){rt=!0;break t}rt=Et.left,yt=Et.right;var Dt=Et.top;Et=Et.bottom;var Xt=It.alloc(),jt=It.alloc(),ie=It.alloc(),le=$i.alloc();le.set(Tt),le.bv(ut.transform),le.Vj(),jt.x=yt,jt.y=Dt,jt.transform(le),Xt.x=rt,Xt.y=Dt,Xt.transform(le),Tt=!1,qd(ut,Xt,jt,ie)?Tt=!0:(Xt.x=yt,Xt.y=Et,Xt.transform(le),qd(ut,Xt,jt,ie)?Tt=!0:(jt.x=rt,jt.y=Et,jt.transform(le),qd(ut,Xt,jt,ie)?Tt=!0:(Xt.x=rt,Xt.y=Dt,Xt.transform(le),qd(ut,Xt,jt,ie)&&(Tt=!0)))),$i.free(le),It.free(Xt),It.free(jt),It.free(ie),rt=Tt}}else rt=ut.fh(rt,ft)}else rt=Hs(ut,a,E,ft);rt&&(yt=ut,y!==null&&(yt=y(ut)),yt&&(x===null||x(yt))&&b.add(yt)),$i.free(ft)}}}return z===void 0&&$i.free(tt),rt||this.background!==null||this.areaBackground!==null}return z===void 0&&$i.free(tt),!1},_n.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?Wl:this.curve},_n.prototype.computeCorner=function(){if(this.curve===Wl)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},_n.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},_n.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===k0||E===fv?a=Math.max(a,b):E===vp||E===wp||E===mp||E===yp?a=Math.max(a,tt):(y=y.ga(Cr).ab(x.ga(Cr))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*tt)+Math.abs(Math.cos(y)*b)+1)),this.curve===Wl&&(a*=1.333)}}return a},_n.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Va&&x.bb()}},_n.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=s1;var y=this.Sf;if(y!==null){for(var x=xn(),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),Nn(x)}}return a},_n.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},_n.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},_n.prototype.adjustPoints=function(a,y,x,E){var b=this.computeAdjusting();if(this.isOrthogonal){if(b===M0)return!1;b===b0&&(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(!xe.$(lt,0)){if(xe.$(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),xe.$(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),xe.$(y,0)||(xe.$(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 b0: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 Et=1;if(ot-rt!==0){var Tt=(yt-ut)/(ot-rt);Et=Math.sqrt(1+1/(Tt*Tt))}else Tt=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var Dt=y.x,Xt=y.y,jt=.5;lt!==0&&(jt=((b-Dt)*(b-tt)+(z-Xt)*(z-ft))/lt);var ie=b+jt*(tt-b),le=z+jt*(ft-z);y=Math.sqrt((Dt-ie)*(Dt-ie)+(Xt-le)*(Xt-le)),Xt<Tt*(Dt-ie)+le&&(y=-y),0<Tt&&(y=-y),Dt=rt+jt*(ot-rt),jt=ut+jt*(yt-ut),Tt!==0?(y=Dt+y/Et,this.L(a,y,jt-(y-Dt)/Tt)):this.L(a,Dt,jt+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,xe.B(b.y,z.y)?xe.B(z.x,tt.x)?ut=y.y:xe.B(z.y,tt.y)&&(rt=y.x):xe.B(b.x,z.x)&&(xe.B(z.y,tt.y)?rt=y.x:xe.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,xe.B(b.y,z.y)?xe.B(z.x,tt.x)?ut=E.y:xe.B(z.y,tt.y)&&(rt=E.x):xe.B(b.x,z.x)&&(xe.B(z.y,tt.y)?rt=E.x:xe.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}},_n.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=It.alloc(),ut=It.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&<.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&<.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&<.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&<.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 Et=ed(yt,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Et.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))&&Et.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))&&Et.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 Tt=x=null;if(yt.isVirtualized){yt=Et.bounds.copy(),yt.Bc(-Et.Ho,-Et.Go);var Dt=It.alloc();Mg(Et,a.x,a.y)||(xe.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)):xe.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)):xe.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(Et,ft.x,ft.y)||(xe.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,ft.x,ft.y,ut.x,ut.y,Dt)?(Tt=ft=Dt.copy(),E=ut.ab(Dt)):xe.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,ut.x,ut.y,lt.x,lt.y,Dt)?(Tt=ft=Dt.copy(),E=lt.ab(Dt)):xe.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,lt.x,lt.y,a.x,a.y,Dt)&&(Tt=ft=Dt.copy(),E=a.ab(Dt))),It.free(Dt)}rt=rt.copy().ed(ot),rt.Bc(Et.Ho*Et.Os,Et.Go*Et.Os),u1(Et,a,y,ft,E,rt,!0),ot=ih(Et,ft.x,ft.y),!Et.abort&&ot>=bg&&(l1(Et),rt.Bc(Et.Ho*Et.Hx,Et.Go*Et.Ix),u1(Et,a,y,ft,E,rt,!1),ot=ih(Et,ft.x,ft.y)),!Et.abort&&ot<bg&&ih(Et,ft.x,ft.y)!==Cc?(hv(this,Et,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?xe.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)):xe.B(rt.y,tt.y)?(Math.abs(a.y-rt.y)<=Et.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)&&(xe.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)):xe.B(rt.x,tt.x)?(Math.abs(a.x-rt.x)<=Et.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)),Tt!==null&&(E===0||E===180?this.yf(z.x,Tt.y):this.yf(Tt.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(lt.copy()),this.ne(ut.copy())),It.free(lt),It.free(ut)}},_n.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&<>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)}_n.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),E=this.i(1),b=dn(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=dn(y,a,E.x,E.y,x.x,x.y);E=x,rt<b&&(z=tt,b=rt)}return z},_n.prototype.qc=function(){this.lk=!1,this.v()},_n.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 yr&&(b.ua=this.ua)}}},_n.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===Wl&&3<=y&&!xe.$(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=On.o,rt=Dy(a),this.computeShortLength(!0)!==0&&(b=_f(this,b,!0,z)),Pg(rt,b.x,b.y,!1),tt===Wl&&3<=y&&!xe.$(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=It.allocAt(E,ot),x=It.alloc(),x.assign(this.i(1)),z=It.allocAt(E,ot),b=It.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,Et=lt,Tt=this.i(cv(this,lt,ft,!1));if((!xe.$(yt.x,Et.x)||!xe.$(Et.x,Tt.x))&&(!xe.$(yt.y,Et.y)||!xe.$(Et.y,Tt.y))){var Dt=ut;isNaN(Dt)&&(Dt=this.smoothness/3);var Xt=yt.x;yt=yt.y;var jt=Et.x;Et=Et.y;var ie=Tt.x;Tt=Tt.y;var le=Dt*E0(Xt,yt,jt,Et);Dt*=E0(jt,Et,ie,Tt),xe.$(yt,Et)&&xe.$(jt,ie)&&(jt>Xt?Tt>Et?(z.x=jt-le,z.y=Et-le,b.x=jt+Dt,b.y=Et+Dt):(z.x=jt-le,z.y=Et+le,b.x=jt+Dt,b.y=Et-Dt):Tt>Et?(z.x=jt+le,z.y=Et-le,b.x=jt-Dt,b.y=Et+Dt):(z.x=jt+le,z.y=Et+le,b.x=jt-Dt,b.y=Et-Dt)),xe.$(Xt,jt)&&xe.$(Et,Tt)&&(Et>yt?(ie>jt?(z.x=jt-le,z.y=Et-le,b.x=jt+Dt):(z.x=jt+le,z.y=Et-le,b.x=jt-Dt),b.y=Et+Dt):(ie>jt?(z.x=jt-le,z.y=Et+le,b.x=jt+Dt):(z.x=jt+le,z.y=Et+le,b.x=jt-Dt),b.y=Et-Dt)),(xe.$(Xt,jt)&&xe.$(jt,ie)||xe.$(yt,Et)&&xe.$(Et,Tt))&&(Xt=.5*(Xt+ie),yt=.5*(yt+Tt),z.x=Xt,z.y=yt,b.x=Xt,b.y=yt),(ft===1||ft===2&&xe.$(tt.x,this.i(0).x)&&xe.$(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,vn)),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),It.free(y),It.free(x),It.free(z),It.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,vn)),yc(rt,z.x-E,z.y-ot,b.x-E,b.y-ot,tt.x-E,tt.y-ot);else{for(z=It.alloc(),z.assign(this.i(0)),b=It.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,vn)),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,Xt=-ot,yt=ut,jt=this.i(lt),Dt=x,xe.B(z.y,yt.y)&&xe.B(yt.x,jt.x))if(Tt=Math.min(tt,Math.abs(yt.x-b.x)/2),Tt=le=Math.min(Tt,Math.abs(jt.y-yt.y)/2),xe.B(Tt,0))Kf(this,rt,ft,Xt,z,yt,Dt),z.assign(yt);else{var fe=yt.x,ye=yt.y;Et=fe,ie=ye,yt.x>z.x?fe=yt.x-Tt:fe=yt.x+Tt,jt.y>yt.y?ie=yt.y+le:ie=yt.y-le,jt=It.allocAt(fe,ye),Kf(this,rt,ft,Xt,z,jt,Dt),It.free(jt),m0(rt,yt.x+ft,yt.y+Xt,Et+ft,ie+Xt),z.h(Et,ie)}else xe.B(z.x,yt.x)&&xe.B(yt.y,jt.y)?(Tt=Math.min(tt,Math.abs(yt.y-b.y)/2),Tt=le=Math.min(Tt,Math.abs(jt.x-yt.x)/2),xe.B(le,0)?(Kf(this,rt,ft,Xt,z,yt,Dt),z.assign(yt)):(fe=yt.x,ye=yt.y,Et=fe,ie=ye,yt.y>z.y?ye=yt.y-Tt:ye=yt.y+Tt,jt.x>yt.x?Et=yt.x+le:Et=yt.x-le,jt=It.allocAt(fe,ye),Kf(this,rt,ft,Xt,z,jt,Dt),It.free(jt),m0(rt,yt.x+ft,yt.y+Xt,Et+ft,ie+Xt),z.h(Et,ie))):(Kf(this,rt,ft,Xt,z,yt,Dt),z.assign(yt));b.assign(ut),ft=lt}It.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=On.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),xe.$(a,0)?y:xe.$(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;xe.$(y.x,z.x)&&xe.$(y.y,z.y);){if(x>=b)return b-1;z=a.i(x++)}if(!xe.$(y.x,z.x)&&!xe.$(y.y,z.y))return x-1;for(var tt=z;xe.$(y.x,z.x)&&xe.$(z.x,tt.x)&&(!E||(y.y>=z.y?z.y>=tt.y:z.y<=tt.y))||xe.$(y.y,z.y)&&xe.$(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}_n.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(xe.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,Et=Math.min(ft+tt,z.x);ut<lt&&(ft=ot[ut],ft<Et+tt);)ut++,Et=Math.min(ft+rt,z.x);ft=z.y-tt+E,Et+=x;var Tt=z.y+E;a.curve===Bc?Pg(y,Et,Tt,!1):yc(y,yt,ft,Et,ft,Et,Tt)}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,Et=z.y+E,a.curve===Bc?Pg(y,ft,Et,!1):yc(y,yt,ut,ft,ut,ft,Et)}else if(xe.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&&(Et=ot[ut],Et<ft+tt);)ut++,ft=Math.min(Et+rt,z.y);Et=z.x-tt+x,Tt=z.x+x,ft+=E,a.curve===Bc?Pg(y,Tt,ft,!1):yc(y,Et,yt,Et,ft,Tt,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,Et=z.x+x,ut+=E,a.curve===Bc?Pg(y,Et,ut,!1):yc(y,ft,yt,ft,ut,Et,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 _n){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&<.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=xe.B(a.y,y.y),z=E.pointsCount,tt=E.i(0),rt=It.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&<.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&<.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,Et=y.y,Tt=tt.x;tt=tt.y;var Dt=lt.x,Xt=lt.y;if(xe.B(ut,yt)){if(!xe.B(ft,Et)&&xe.B(tt,Xt)&&Math.min(ft,Et)<tt&&Math.max(ft,Et)>tt&&Math.min(Tt,Dt)<ut&&Math.max(Tt,Dt)>ut&&!xe.B(Tt,Dt)){rt.x=ut,rt.y=tt,ut=!0;break t}}else if(xe.B(ft,Et)&&xe.B(Tt,Dt)&&Math.min(ut,yt)<Tt&&Math.max(ut,yt)>Tt&&Math.min(tt,Xt)<ft&&Math.max(tt,Xt)>ft&&!xe.B(tt,Xt)){rt.x=Tt,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}It.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()))}_n.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 _n&&(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 _n&&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())}}_n.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},_n.prototype.isVisible=function(){if(!Ii.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},_n.prototype.Zb=function(a){if(Ii.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)},_n.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&<.ff===E&<.uf===x&<.vf===b||lt.ef===x&<.ff===b&<.uf===y&<.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&&(An(y.links,a),y.Sl()))}_n.prototype.ph=function(){return!0},Ue.Object.defineProperties(_n.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&&Tl(x),fp(this),this.ff=a;var E=this.fromPort;E!==null&&Tl(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&&Tl(x),fp(this),this.vf=a;var E=this.toPort;E!==null&&Tl(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:ws},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&&Tl(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&&Wn(a,">= 0",_n,"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:ws},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&&Tl(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&&Wn(a,">= 0",_n,"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?er: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 yr?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()===Wl&&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),xe.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);xe.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 It)}},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);xe.$(E.x,b.x)?(E=b.y-E.y,0>E&&(E=-E)):xe.$(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 ee,E=0;E<a.length/2;E++)b=new It(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(!on(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){E=!1;break}}if(E)for(x=new ee,E=0;E<a.length;E++)b=a[E],x.add(new It(b.x,b.y).freeze())}}else if(a instanceof ee)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else he("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)}}}),_n.prototype.invalidateOtherJumpOvers=_n.prototype.Xo,_n.prototype.findClosestSegment=_n.prototype.ez,_n.prototype.updateRoute=_n.prototype.vg,_n.prototype.invalidateRoute=_n.prototype.bb,_n.prototype.rollbackRoute=_n.prototype.rv,_n.prototype.commitRoute=_n.prototype.zf,_n.prototype.startRoute=_n.prototype.uh,_n.prototype.clearPoints=_n.prototype.Fj,_n.prototype.removePoint=_n.prototype.pv,_n.prototype.addPointAt=_n.prototype.yf,_n.prototype.addPoint=_n.prototype.ne,_n.prototype.insertPointAt=_n.prototype.m,_n.prototype.insertPoint=_n.prototype.Kz,_n.prototype.setPointAt=_n.prototype.L,_n.prototype.setPoint=_n.prototype.dd,_n.prototype.getPoint=_n.prototype.i,_n.prototype.getOtherPort=_n.prototype.Cz,_n.prototype.getOtherNode=_n.prototype.To;var Gf=null,zf=null,dv=new Ze(_n,"Normal",1),Dw=new Ze(_n,"Orthogonal",2),Iw=new Ze(_n,"AvoidsNodes",6),o1=new Ze(_n,"AvoidsNodesStraight",7),Va=new Ze(_n,"None",0),Wl=new Ze(_n,"Bezier",9),Bc=new Ze(_n,"JumpGap",10),Lg=new Ze(_n,"JumpOver",11),gp=new Ze(_n,"End",17),M0=new Ze(_n,"Scale",18),b0=new Ze(_n,"Stretch",19),pp=new Ze(_n,"OrientAlong",21),mp=new Ze(_n,"OrientPlus90",22),vp=new Ze(_n,"OrientMinus90",23),fv=new Ze(_n,"OrientOpposite",24),k0=new Ze(_n,"OrientUpright",25),yp=new Ze(_n,"OrientPlus90Upright",26),wp=new Ze(_n,"OrientMinus90Upright",27),T0=new Ze(_n,"OrientUpright45",28),s1=16,a1=14,xp=8;_n.className="Link",_n.Normal=dv,_n.Orthogonal=Dw,_n.AvoidsNodes=Iw,_n.AvoidsNodesStraight=o1,_n.None=Va,_n.Bezier=Wl,_n.JumpGap=Bc,_n.JumpOver=Lg,_n.End=gp,_n.Scale=M0,_n.Stretch=b0,_n.OrientAlong=pp,_n.OrientPlus90=mp,_n.OrientMinus90=vp,_n.OrientOpposite=fv,_n.OrientUpright=k0,_n.OrientPlus90Upright=yp,_n.OrientMinus90Upright=wp,_n.OrientUpright45=T0,_n.EndSegmentStep=8,_n.CurvinessStart=s1,_n.SpacingMin=a1,_n.OrthoShortCut=xp;function N0(a,y,x,E){ln(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){ln(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<bg)for(b?ut+=E:lt+=E,ft+=1;z<=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=bg;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 Et=x===0||x===90?1:-1;if(x=x===90||x===270,E[rt][ot]===Cc?(D0(a,rt,ot,Et,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,Et,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,Et,x,lt,ut,lt,ut),x=xn(),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);Nn(x)}}}}function A1(a,y,x,E,b,z,tt){for(var rt=a.ac,ot=y,lt=x;;){if(ot===b&<===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++}}}Ue.Object.defineProperties(Sp.prototype,{bounds:{get:function(){return new Oe(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,bg=999999,gv=bg+1,pv=bg+2;Sp.className="PositionArray";function jf(){ln(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 hr?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(kr,It.alloc()),ot=a.port.ga(yo,It.alloc());for(b=Oe.allocAt(rt.x,rt.y,0,0),b.Ye(ot),It.free(rt),It.free(ot),rt=It.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()&<.fromPort!==lt.toPort){var ut=lt.fromPort===a.port||lt.fromNode!==null&<.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 Et=yt.findVisibleNode();Et!==null&&Et!==yt&&(yt=Et,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)),Et=a.pe[z],Et===void 0?(Et=new mv(lt,yt,ft),a.pe[z]=Et):(Et.link=lt,Et.angle=yt,Et.Nc=ft),Et.hv.set(ut),z++}}}}for(It.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=It.alloc(),ot=It.alloc(),tt=It.alloc(),lt=It.alloc(),ft.ga(kr,rt),ft.ga(Ts,ot),ft.ga(yo,tt),ft.ga(oo,lt),Et=yt=ut=ft=0,E===sv)for(var Tt=0;Tt<z.length;Tt++){var Dt=z[Tt];if(Dt!==null){var Xt=Dt.link.computeThickness();switch(Dt.Nc){case 8:yt+=Xt;break;case 2:Et+=Xt;break;case 1:ft+=Xt;break;default:case 4:ut+=Xt}}}var jt=Tt=0,ie=1,le=Dt=0;for(Xt=0;Xt<z.length;Xt++){var fe=z[Xt];if(fe!==null){if(Tt!==fe.Nc){switch(Tt=fe.Nc,Tt){case 8:var ye=tt;jt=lt;break;case 2:ye=lt,jt=rt;break;case 1:ye=rt,jt=ot;break;default:case 4:ye=ot,jt=tt}switch(Dt=jt.x-ye.x,le=jt.y-ye.y,Tt){case 8:yt>Math.abs(Dt)?(ie=Math.abs(Dt)/yt,yt=Math.abs(Dt)):ie=1;break;case 2:Et>Math.abs(le)?(ie=Math.abs(le)/Et,Et=Math.abs(le)):ie=1;break;case 1:ft>Math.abs(Dt)?(ie=Math.abs(Dt)/ft,ft=Math.abs(Dt)):ie=1;break;default:case 4:ut>Math.abs(le)?(ie=Math.abs(le)/ut,ut=Math.abs(le)):ie=1}jt=0}var _e=fe.Zo;if(E===sv){switch(fe=fe.link.computeThickness(),fe*=ie,_e.set(ye),Tt){case 8:_e.x=ye.x+Dt/2+yt/2-jt-fe/2;break;case 2:_e.y=ye.y+le/2+Et/2-jt-fe/2;break;case 1:_e.x=ye.x+Dt/2-ft/2+jt+fe/2;break;default:case 4:_e.y=ye.y+le/2-ut/2+jt+fe/2}jt+=fe}else{var Xn=.5;E===B0&&(Xn=(fe.Uo+1)/(fe.Gl+1)),_e.x=ye.x+Dt*Xn,_e.y=ye.y+le*Xn}}}for(It.free(rt),It.free(ot),It.free(tt),It.free(lt),ye=a.pe,z=0;z<ye.length;z++)E=ye[z],E!==null&&(E.Ju=a.computeEndSegmentLength(E));a.ap=x,Oe.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 It,this.Gl=this.Uo=0,this.Zo=new It,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 Go(a){ln(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new It(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}Go.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},Go.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Go.prototype.qb=function(){},Go.prototype.toString=function(){var a=ai(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},Go.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())}}},Go.prototype.createNetwork=function(){return new Fo(this)},Go.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof Re?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof hr?y.lg(a.memberParts):y.lg(a.iterator),y},Go.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")}},Go.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()}},Go.prototype.doLayout=function(a){var y=new Be;a instanceof Re?(ad(this,y,a.nodes,!0,this.rh,!0,!1,!0),ad(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof hr?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},Go.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 hr&&(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++}},Go.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 _n)&&(Bp(rt),this.rh(rt))){var ot=rt.measuredBounds,lt=ot.width;ot=ot.height,rt.moveTo(x,E),rt instanceof hr&&(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++}}},Go.prototype.rh=function(a){return!!(!a.location.w()||a instanceof hr&&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 ti?ot.isLinkLabel||(ot instanceof hr&&ot.layout===null?ad(a,y,ot.memberParts,!1,b,z,tt,rt):(Bp(ot),y.add(ot))):tt&&ot instanceof _n?y.add(ot):!rt||!ot.Zc()||ot instanceof ti||(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()}Go.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new Oe),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},Go.prototype.ex=function(a){var y=new Be;return a instanceof Re?(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 hr?ad(this,y,a.memberParts,!1,null,!0,!0,!0):ad(this,y,a.iterator,!1,null,!0,!0,!0),y},Go.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(kr),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Ue.Object.defineProperties(Go.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())}}}),Go.prototype.collectParts=Go.prototype.ex,Go.prototype.getLayoutBounds=Go.prototype.ni,Go.prototype.invalidateLayout=Go.prototype.C,Go.className="Layout";function Fo(a){ln(this),this.Sc=a,this.wf=new Be,this.ye=new Be,this.Es=new Qe,this.zs=new Qe}Fo.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 Be,this.ye=new Be,this.Es=new Qe,this.zs=new Qe},Fo.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},Fo.prototype.createVertex=function(){return new Ks(this)},Fo.prototype.createEdge=function(){return new Nl(this)},Fo.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 ti)return!tt.isLinkLabel;if(tt instanceof _n){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 ti&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)){if(E instanceof hr&&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 _n&&(!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))}}},Fo.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},bt=Fo.prototype,bt.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},bt.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},bt.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}bt.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},bt.ki=function(a){return a===null?null:this.Es.I(a)},bt.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}}bt.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},bt.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))}bt.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},bt.Lo=function(a){return a===null?null:this.zs.I(a)},bt.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},bt.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))}},bt.Ko=function(){for(var a=xn(),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]);Nn(a)},Fo.prototype.deleteArtificialVertexes=function(){for(var a=xn(),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=xn(),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]);Nn(a),Nn(y)};function Qw(a){for(var y=xn(),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]);Nn(y)}Fo.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Qw(this),this.Ko()),a=new ee;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))}}Fo.prototype.dz=function(){for(var a=new Be,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},Ue.Object.defineProperties(Fo.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}}}),Fo.prototype.findAllParts=Fo.prototype.dz,Fo.prototype.splitIntoSubNetworks=Fo.prototype.Zx,Fo.prototype.deleteSelfEdges=Fo.prototype.Ko,Fo.prototype.reverseEdge=Fo.prototype.gm,Fo.prototype.linkVertexes=Fo.prototype.Zj,Fo.prototype.findEdge=Fo.prototype.Lo,Fo.prototype.deleteLink=Fo.prototype.Yy,Fo.prototype.deleteEdge=Fo.prototype.Mj,Fo.prototype.addLink=Fo.prototype.Dy,Fo.prototype.addEdge=Fo.prototype.Bo,Fo.prototype.findVertex=Fo.prototype.ki,Fo.prototype.deleteNode=Fo.prototype.Zy,Fo.prototype.deleteVertex=Fo.prototype.Iu,Fo.prototype.addNode=Fo.prototype.Bl,Fo.prototype.addVertex=Fo.prototype.dh,Fo.prototype.addParts=Fo.prototype.lg,Fo.className="LayoutNetwork";function Ks(a){ln(this),this.ob=a,this.j=new Oe(0,0,10,10).freeze(),this.o=new It(5,5).freeze(),this.Sh=this.ub=null,this.tg=new ee,this.mg=new ee}Ks.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new ee,this.mg=new ee},Ks.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Zn(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},Ks.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;on(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 hr)){x=Oe.alloc(),a.Va();var E=this.network.layout.ni(a,x),b=a.locationObject.ga(Cr);if(E.w()&&b.w()){a.moveTo(y.x+this.focusX-(b.x-E.x),y.y+this.focusY-(b.y-E.y)),Oe.free(x);return}Oe.free(x)}a.moveTo(y.x,y.y)}},Ks.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},Ks.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},Ks.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},Ks.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}Ue.Object.defineProperties(Ks.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=Oe.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),Oe.free(x),!(a instanceof hr)&&(a=a.locationObject.ga(Cr),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 Be,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new Be,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new Be,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 ee,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}}}),Ks.prototype.deleteDestinationEdge=Ks.prototype.Jl,Ks.prototype.addDestinationEdge=Ks.prototype.zl,Ks.prototype.deleteSourceEdge=Ks.prototype.Kl,Ks.prototype.addSourceEdge=Ks.prototype.Cl,Ks.className="LayoutVertex",Ks.standardComparer=xv,Ks.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 Nl(a){ln(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Nl.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Nl.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Zn(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},Nl.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Nl.prototype.commit=function(){},Nl.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},Ue.Object.defineProperties(Nl.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)}}}),Nl.prototype.getOtherVertex=Nl.prototype.Ax,Nl.className="LayoutEdge";function sa(a){Go.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new cn(NaN,NaN).freeze(),this.tf=new cn(10,10).freeze(),this.Jb=Cp,this.Rb=Q0,this.nd=Pp,this.hd=d1,a&&Object.assign(this,a)}He(sa,Go),sa.prototype.cloneProtected=function(a){Go.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},sa.prototype.qb=function(a){a.classType===sa?a===Pp||a===H0||a===Sv||a===O0?this.sorting=a:a===Q0||a===tA?this.arrangement=a:a===Cp||a===U0?this.alignment=a:he("Unknown enum value: "+a):Go.prototype.qb.call(this,a)},sa.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 hr)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=Oe.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 Et=this.ni(b[yt],lt);ft=Math.max(ft,Et.height)}ft=Math.max(ft+ot,1),yt=this.arrangement;for(var Tt=Et=this.arrangementOrigin.x,Dt=this.arrangementOrigin.y,Xt=0,jt=0,ie=0;ie<b.length;ie++){var le=b[ie],fe=this.ni(le,lt),ye=Math.ceil((fe.width+rt)/ut)*ut,_e=Math.ceil((fe.height+ot)/ft)*ft;switch(yt){case tA:var Xn=Math.abs(Tt-fe.width);break;default:Xn=Tt+fe.width}switch((0<z&&Xt>z-1||0<tt&&0<Xt&&Xn-Et>tt)&&(E.push(new Oe(0,Dt,tt+rt,jt)),Xt=0,Tt=Et,Dt+=jt,jt=0),jt=Math.max(jt,_e),yt){case tA:fe=-fe.width;break;default:fe=0}switch(le.moveTo(Tt+fe,Dt),yt){case tA:Tt-=ye;break;default:Tt+=ye}Xt++}E.push(new Oe(0,Dt,tt+rt,jt)),Oe.free(lt);break;case Cp:for(ot=tt,ut=z,ft=y,yt=x,tt=Oe.alloc(),Et=Math.max(this.cellSize.width,1),z=Dt=lt=0,rt=It.alloc(),Tt=0;Tt<b.length;Tt++)jt=b[Tt],Xt=this.ni(jt,tt),jt=wc(jt,jt.locationObject,jt.locationSpot,rt),lt=Math.max(lt,jt.x),Dt=Math.max(Dt,Xt.width-jt.x),z=Math.max(z,jt.y);switch(Tt=this.arrangement,Tt){case tA:lt+=ft;break;default:Dt+=ft}Et=isFinite(Et)?Math.max(Et+ft,1):Math.max(lt+Dt,1);var mi=jt=this.arrangementOrigin.x;for(ie=this.arrangementOrigin.y,Dt=0,ot>=lt&&(ot-=lt),lt=le=0,ye=Math.max(this.cellSize.height,1),fe=z=0,_e=!0,Xt=It.alloc(),Xn=0;Xn<b.length;Xn++){var hi=b[Xn],Rn=this.ni(hi,tt),mn=wc(hi,hi.locationObject,hi.locationSpot,rt);if(0<Dt)switch(Tt){case tA:mi=(mi-jt-(Rn.width-mn.x))/Et,mi=xe.$(Math.round(mi),mi)?Math.round(mi):Math.floor(mi),mi=mi*Et+jt;break;default:mi=(mi-jt+mn.x)/Et,mi=xe.$(Math.round(mi),mi)?Math.round(mi):Math.ceil(mi),mi=mi*Et+jt}else switch(Tt){case tA:le=mi+mn.x+Rn.width;break;default:le=mi-mn.x}switch(Tt){case tA:var ur=-(mi+mn.x)+le;break;default:ur=mi+Rn.width-mn.x-le}if(0<ut&&Dt>ut-1||0<ot&&0<Dt&&ur>ot){for(E.push(new Oe(0,_e?ie-z:ie,ot+ft,fe+z+yt)),mi=0;mi<Dt&&Xn!==Dt;mi++){ur=b[Xn-Dt+mi];var qi=wc(ur,ur.locationObject,ur.locationSpot,Xt);ur.moveTo(ur.position.x,ur.position.y+z-qi.y)}fe+=yt,ie=_e?ie+fe:ie+(fe+z),Dt=fe=z=0,mi=jt,_e=!1}switch(mi===jt&&(lt=Tt===tA?Math.max(lt,Rn.width-mn.x):Math.min(lt,-mn.x)),z=Math.max(z,mn.y),fe=Math.max(fe,Rn.height-mn.y),isFinite(ye)&&(fe=Math.max(fe,Math.max(Rn.height,ye)-mn.y)),_e?hi.moveTo(mi-mn.x,ie-mn.y):hi.moveTo(mi-mn.x,ie),Tt){case tA:mi-=mn.x+ft;break;default:mi+=Rn.width-mn.x+ft}Dt++}if(E.push(new Oe(0,ie,ot+ft,(_e?fe:fe+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(It.free(rt),It.free(Xt),Tt===tA)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);Oe.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===tA?this.commitLayers(E,new It(b+y/2-(z+b),tt-x/2)):this.commitLayers(E,new It(b-y/2,tt-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},sa.prototype.commitLayers=function(){};function d1(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}Ue.Object.defineProperties(sa.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!==tA||(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 Ze(sa,"Position",0),Cp=new Ze(sa,"Location",1),Q0=new Ze(sa,"LeftToRight",2),tA=new Ze(sa,"RightToLeft",3),Sv=new Ze(sa,"Forward",4),O0=new Ze(sa,"Reverse",5),Pp=new Ze(sa,"Ascending",6),H0=new Ze(sa,"Descending",7);sa.className="GridLayout",sa.standardComparer=d1,sa.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},sa.Position=U0,sa.Location=Cp,sa.LeftToRight=Q0,sa.RightToLeft=tA,sa.Forward=Sv,sa.Reverse=O0,sa.Ascending=Pp,sa.Descending=H0;function uo(){this.On=new Be,this.Dn=new Be,this.Pa=new Be,this.cf=new Qe,this.bf=new Qe,this.aj=new Qe,this.H=null,this.tp=!1}bt=uo.prototype,bt.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},bt.Xe=function(a){this.H=a},bt.oi=function(a){if(a instanceof ti){if(this.On.add(a),a instanceof hr){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 _n?this.Dn.add(a):a instanceof Wr||this.Pa.add(a);y=a.data,y===null||a instanceof Wr||(a instanceof _n?this.bf.add(y,a):this.cf.add(y,a))},bt.pc=function(a){if(a.Ej(),a instanceof ti){if(this.On.remove(a),a instanceof hr){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 _n?this.Dn.remove(a):a instanceof Wr||this.Pa.remove(a);y=a.data,y===null||a instanceof Wr||(a instanceof _n?this.bf.remove(y):this.cf.remove(y))},bt.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 hr)&&he('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 hr||he('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 _n||he('Invalid link template in Diagram.linkTemplateMap: template for "'+E+'" must be a Link, not a normal Node or simple Part: '+x);for(y=xn(),x=a.selection.iterator;x.next();)(E=x.value.data)&&y.push(E);for(x=xn(),a=a.highlighteds.iterator;a.next();)(E=a.value.data)&&x.push(E);for(a=xn(),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]);Nn(y),Nn(x),Nn(a)}},uo.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},uo.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&&(cu(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)}}uo.prototype.insertLink=function(){return null},uo.prototype.resolveReferencesForData=function(){},uo.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,pi('No Group template found for category "'+x+'"'),pi(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(m1||(m1=!0,pi('No Node template found for category "'+x+'"'),pi(" Using default node template")),y=a.ny))),y}uo.prototype.getLinkCategoryForData=function(){return""},uo.prototype.setLinkCategoryForData=function(){},uo.prototype.setFromNodeForLink=function(){},uo.prototype.setToNodeForLink=function(){},uo.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,pi('No Link template found for category "'+a+'"'),pi(" Using default link template")),x=y.my)),x},uo.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},uo.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},uo.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Pf(this.diagram,a,!1),this.unresolveReferencesForPart(a))},uo.prototype.unresolveReferencesForPart=function(){},uo.prototype.removeDataForLink=function(){},uo.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},uo.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof ti?a:null)},uo.prototype.findLinkForKey=function(){return null},bt=uo.prototype,bt.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},bt.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof ti?a:null)},bt.Kc=function(a){return a===null?null:this.bf.I(a)},bt.ms=function(a){for(var y=0;y<arguments.length;++y);y=new Be;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(on(tt)&&Bv(this,b,tt)){y.add(E);break}}}return y.iterator},bt.ls=function(a){for(var y=0;y<arguments.length;++y);y=new Be;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(on(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(yn(z)){if(!yn(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(on(y)&&on(x)){if(!Bv(a,y,x))return!1}else if(y!==x)return!1;return!0}uo.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===To){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===is){var tt=a.newValue;E==="nodeDataArray"&&on(tt)&&f1(this,tt),y.isModified=!0}else if(x===cs){var rt=a.oldValue;E==="nodeDataArray"&&on(rt)&&this.ip(rt),y.isModified=!0}else x===ea&&(E==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):E==="ModelDisplaced"&&this.Wd());else if(x===To){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===is||x===cs){var ut=a.change===is,ft=ut?a.newParam:a.oldParam,yt=ut?a.newValue:a.oldValue,Et=this.aj.I(a.object);if(Array.isArray(Et))for(a=0;a<Et.length;a++){var Tt=Et[a];if(ut)r0(Tt,yt,ft,!0);else if(!(0>ft)){var Dt=ft+sp(Tt);Tt.pc(Dt,!0),Qm(Tt,Dt,ft)}}y.isModified=!0}}finally{y.aa=!0}}}}},uo.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)},uo.prototype.rp=function(){for(var a=this.H.model,y=new Be,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()},uo.prototype.refreshDataBoundLinks=function(){},uo.prototype.updateRelationshipsFromData=function(){},uo.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=xn()),x.push(tt))}if(x!==null)break}if(x!==null){for(E=0;E<x.length;E++)x[E].La(y);Nn(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function Cv(a,y){var x=y.Hh;if(yn(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){Nu(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(yn(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}}}}uo.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var E=new Qe;if(yn(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 Be;for(var z=new Qe,tt=E.iterator;tt.next();){var rt=tt.value;if(rt instanceof _n)a||rt.fromNode!==null&&rt.toNode!==null||b.add(rt);else if(rt instanceof ti&&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 Qe;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 Ii))return null;if(z.isSelected=!1,z.isHighlighted=!1,E.add(y,z),y instanceof ti){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 hr&&z instanceof hr)for(y=y.memberParts;y.next();)tt=R0(a,y.value,x,E,b),tt instanceof _n||tt===null||(tt.containingGroup=z)}else if(y instanceof _n&&z instanceof _n)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 ti&&(tt.labeledLink=z);return z}uo.prototype.copyPartData=function(a,y){var x=null,E=a.data;if(E!==null&&y!==null){var b=y.model;a instanceof _n||(E=b.copyNodeData(E),on(E)&&(b.xf(E),x=y.Lc(E)))}else cu(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 _n||(b=y.copyNodeData(E)),on(b)&&(x.data=b)));return x},Ue.Object.defineProperties(uo.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}}}),uo.prototype.updateAllRelationshipsFromData=uo.prototype.rp,uo.prototype.findLinksByExample=uo.prototype.ls,uo.prototype.findNodesByExample=uo.prototype.ms,uo.prototype.findLinkForData=uo.prototype.Kc,uo.prototype.findNodeForData=uo.prototype.ii,uo.prototype.findPartForData=uo.prototype.Lc,uo.prototype.findNodeForKey=uo.prototype.Vb,uo.prototype.removeModeledPart=uo.prototype.ip,uo.prototype.removeModeledParts=uo.prototype.Gs,uo.prototype.rebuildParts=uo.prototype.Wd;var m1=!1,v1=!1,y1=!1;uo.className="PartManager";function qs(a){uo.apply(this,arguments)}He(qs,uo),qs.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),w1(this,a.linkDataArray)},qs.prototype.addModeledParts=function(a){for(uo.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){cu(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=Zl(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof ti&&(b.fromNode=z)),z=z0(x,y,!1),z!==""&&(b.toPortId=z),z=Zl(x,y,!1),z!==void 0&&(z=a.Vb(z),z instanceof ti&&(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}}}}qs.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)})}qs.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},qs.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},qs.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},qs.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},qs.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},qs.prototype.findPartForKey=function(a){var y=uo.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},qs.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},qs.prototype.doModelChanged=function(a){var y=this;if(uo.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===To){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 Et=this.Lc(a.object);if(Et!==null){var Tt=a.newValue;if(Tt!==void 0){var Dt=this.Vb(Tt);Dt instanceof hr?Et.containingGroup=Dt:Et.containingGroup=null}else Et.containingGroup=null}}else if(b==="linkLabelKeys"){var Xt=this.Kc(a.object);if(Xt!==null){var jt=a.oldValue,ie=a.newValue;Array.isArray(jt)&&jt.forEach(function(mn){0<=ie.indexOf(mn)||(mn=y.Vb(mn),mn!==null&&(mn.labeledLink=null))}),Array.isArray(ie)&&ie.forEach(function(mn){mn=y.Vb(mn),mn!==null&&(mn.labeledLink=Xt)})}}else if(b==="linkCategory"){var le=this.Kc(a.object),fe=a.newValue;le!==null&&typeof fe=="string"&&(le.category=fe)}else b==="linkDataArray"&&(S1(this,a.oldValue),w1(this,a.newValue));x.isModified=!0}else if(E===is){var ye=a.newValue;if(b==="linkDataArray"&&typeof ye=="object"&&ye!==null)x1(this,ye);else if(b==="linkLabelKeys"&&ud(ye)){var _e=this.Kc(a.object),Xn=this.Vb(ye);_e!==null&&Xn!==null&&(Xn.labeledLink=_e)}x.isModified=!0}else if(E===cs){var mi=a.oldValue;if(b==="linkDataArray"&&typeof mi=="object"&&mi!==null)this.ip(mi);else if(b==="linkLabelKeys"&&ud(mi)){var hi=this.Vb(mi);hi!==null&&(hi.labeledLink=null)}x.isModified=!0}}else if(E===To){var Rn=a.propertyName;a.object!==x.model||Rn!=="linkFromKeyProperty"&&Rn!=="linkToKeyProperty"&&Rn!=="linkFromPortIdProperty"&&Rn!=="linkToPortIdProperty"&&Rn!=="linkLabelKeysProperty"&&Rn!=="nodeIsGroupProperty"&&Rn!=="nodeGroupKeyProperty"&&Rn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},qs.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new Be,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)})},qs.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 _n){var b=Zl(E,y,!0);if(b=x.Vb(b),a.fromNode=b,b=Zl(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 Be().addAll(y);var tt=new Be;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 Wr)&&(y=E.lh(y),y=x.findPartForKey(y),y===null||y instanceof hr)&&(a.containingGroup=y)}}},qs.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 hr&&y.lh(tt)===x&&(tt=this.Lc(tt),tt!==null&&(tt.containingGroup=b)):(z.link=this.Kc(tt),z.link!==null&&b instanceof ti&&(Zl(y,tt,!0)===x&&(z.link.fromNode=b),Zl(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}}nA(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof hr&&(b.containingGroup=a))}},qs.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof ti){var x=y.wa(a.data);if(x!==void 0){for(var E=a.linksConnected;E.next();)eA(y,x,E.value.data);if(a.isLinkLabel&&(E=a.labeledLink,E!==null&&eA(y,x,E.data)),a instanceof hr)for(a=a.memberParts;a.next();)E=a.value.data,y.lb(E)&&eA(y,x,E)}}},qs.prototype.copyPartData=function(a,y){var x=uo.prototype.copyPartData.call(this,a,y);if(a instanceof _n)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},qs.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 _n){if(cu(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 ti&&(cu(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 ti||(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},qs.prototype.findLinkForKey=qs.prototype.findLinkForKey,qs.prototype.findPartForKey=qs.prototype.findPartForKey,qs.prototype.removeAllModeledParts=qs.prototype.removeAllModeledParts,qs.prototype.addModeledParts=qs.prototype.addModeledParts,qs.prototype.addAllModeledParts=qs.prototype.addAllModeledParts,qs.className="GraphLinksPartManager";function nu(){uo.apply(this,arguments),this.Sg=null}He(nu,uo);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||!Pa(E,b,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),E=a.findLinkTemplateForCategory(y),E!==null&&(cu(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}}}nu.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},nu.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},nu.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}},nu.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))},nu.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},nu.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},nu.prototype.doModelChanged=function(a){if(uo.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===To){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===To){var ft=a.propertyName;a.object===y.model&&ft==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},nu.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;a instanceof ti&&(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)))}}},nu.prototype.updateDataBindings=function(a,y){uo.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},nu.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 ti&&y.mh(z)===x&&_0(this,b,this.ii(z))}nA(y,x)}a=y.mh(a),a!==void 0&&b instanceof ti&&(a=this.Vb(a),_0(this,a,b))}},nu.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof ti){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(cs,"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)&&eA(y,x,b)}},nu.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},nu.prototype.findLinkForKey=nu.prototype.findLinkForKey,nu.className="TreePartManager";function Ci(a,y){this.kl=new Be,this.il=new Be,this.Wv=`,
|
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
|
"removedNodeKeys": `,this.vh=null,ln(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new Qe,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 Qe,this.Lt=new ee,this.Wg=!1,this.o=null,this.undoManager=new _o,a!==void 0&&(yn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Ci.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},Ci.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Ci.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},Ci.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)+":"+Ki(b)}}return y},Ci.prototype.xA=function(a){a.change!==ea&&he("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Ms?(C1(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},Ci.prototype.Qv=function(a,y){var x=this,E=!1,b=new Be,z=new Be,tt=new Be,rt=this.vh;a.changes.each(function(ft){ft.model===x&&(ft.modelChange==="nodeDataArray"?ft.change===is?b.add(ft.newValue):ft.change===cs&&tt.add(ft.oldValue):x.lb(ft.object)?z.add(ft.object):ft.change!==To||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 Ci||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},Ci.prototype.cloneDeep=function(a){return kg(this,a,!0)};function kg(a,y,x,E,b,z){function tt(ft,yt){rt?(ft.__gohashid===void 0&&z.push(ft),E.set(ft,yt)):(ft=Li++,E.set(ft,yt),b.set(ft,y))}if(!on(y))return y;z||(z=[]);var rt=Object.isExtensible(y);if(E||(E=new Qe),rt){var ot=E.get(y);if(ot)return ot}else for(b||(b=new Qe),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(kg(a,y[ut],!1,E,b,z))}else if(y instanceof It||y instanceof cn||y instanceof Oe||y instanceof sr||y instanceof Kn)ot=y.copy(),tt(y,ot);else{if(y instanceof no||y instanceof On||y instanceof Ze)return y;if(y instanceof ee)ot=new ee().addAll(kg(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof Be)ot=new Be().addAll(kg(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof Qe)ot=new Qe().addAll(kg(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]=kg(a,y[ut],!1,E,b,z))}return x&&z.forEach(function(ft){delete ft.__gohashid}),ot}bt=Ci.prototype,bt.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},bt.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},bt.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,on(y)&&(a.dm(y),a.modelData=y)}bt.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)},bt.kv=function(a){B1(this,a),a=a.nodeDataArray,yn(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 Be,tt.add(z),E.add(b,tt)):tt.add(z)}}var E=a.vh;E===null&&(E=new Qe,y.changes.each(function(b){if(b.diagram!==null){var z=b.change;z===To?(b=b.object.panel)&&(z=b.data)&&x(z,b):(z===is||z===cs)&&(b=b.object,(z=b.itemArray)&&x(z,b))}}),a.vh=E)}function P1(a,y){for(var x=new Be,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(on(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}bt.Pv=function(a,y){var x=this,E=!1,b=new Be,z=new Be,tt=new Be,rt=this.vh;a.changes.each(function(ut){ut.model===x&&(ut.modelChange==="nodeDataArray"?ut.change===is?b.add(ut.newValue):ut.change===cs&&tt.add(ut.oldValue):x.lb(ut.object)?z.add(ut.object):ut.change!==To||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 Ci||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},bt.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)&&he("applyIncrementalJson cannot change Model properties"),B1(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,E=new Qe;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)},bt.$x=function(a,y){a.change!==ea&&he("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Ms?(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 }'},bt.yA=function(a,y){return this.$x(a,y)},bt.np=function(a){return a===void 0&&(a=Ep(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},bt.toJSON=function(a){return this.np(a)},bt.Zw=function(a){var y=null;if(typeof a=="string")try{y=Un.JSON.parse(a)}catch(E){}else typeof a=="object"?y=a:he("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&he("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},bt.Ky=function(a){return this.Zw(a)},Ci.constructGraphLinksModel=function(){return new Ci},bt=Ci.prototype,bt.dm=function(a){if(yn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];if(on(E)){var b=x;E=this.dm(E),Array.isArray(a)?a[b]=E:he("Cannot replace an object in an HTMLCollection or NodeList at "+b)}}else if(on(a)){for(y in a)if(x=a[y],on(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 ee,E=0;E<x.length/2;E++)b.add(new It(x[2*E],x[2*E+1]));b.freeze(),a[y]=b}}return Ow(a)}return a},bt.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()):yn(a)?ld(this,a):on(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 Bi;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 Wa(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function Fv(a,y){var x=y;if(x instanceof It)y={class:"go.Point",x:Wa(x.x),y:Wa(x.y)};else if(x instanceof cn)y={class:"go.Size",width:Wa(x.width),height:Wa(x.height)};else if(x instanceof Oe)y={class:"go.Rect",x:Wa(x.x),y:Wa(x.y),width:Wa(x.width),height:Wa(x.height)};else if(x instanceof sr)y={class:"go.Margin",top:Wa(x.top),right:Wa(x.right),bottom:Wa(x.bottom),left:Wa(x.left)};else if(x instanceof Kn)x.sb()?y={class:"go.Spot",x:Wa(x.x),y:Wa(x.y),offsetX:Wa(x.offsetX),offsetY:Wa(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof no){if(y={class:"go.Brush",type:x.type.name},x.type===Ir?y.color=x.color:(x.type===pr||x.type===Sr)&&(y.start=x.start,y.end=x.end,x.type===Sr&&(x.startRadius!==0&&(y.startRadius=Wa(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=Wa(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 On?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=Wa(x.startX)),x.startY!==0&&(y.startY=Wa(x.startY)),x.endX!==0&&(y.endX=Wa(x.endX)),x.endY!==0&&(y.endY=Wa(x.endY)),x.spot1.D(kr)||(y.spot1=x.spot1),x.spot2.D(yo)||(y.spot2=x.spot2),x.type===On.o&&(y.path=On.ia(x))):x instanceof Ze&&(y={class:"go.EnumValue",classType:Ep(a,x.classType),name:x.name});E="{",x=!0;for(var b in y){var z=vs(y,b);if(!F1(b,z))if(x?x=!1:E+=",",E+=a.quote(b)+":",b==="points"&&z instanceof ee){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 Za(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 It(Za(a.x),Za(a.y));else if(y==="Size")x=new cn(Za(a.width),Za(a.height));else if(y==="Rect")x=new Oe(Za(a.x),Za(a.y),Za(a.width),Za(a.height));else if(y==="Margin")x=new sr(Za(a.top),Za(a.right),Za(a.bottom),Za(a.left));else if(y==="Spot")typeof a.enum=="string"?x=Xs(a.enum):x=new Kn(Za(a.x),Za(a.y),Za(a.offsetX),Za(a.offsetY));else if(y==="Brush"){if(x=new no,x.type=ni(no,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof Kn&&(x.start=a.start),a.end instanceof Kn&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=Za(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=Za(a.endRadius)),a=a.colorStops,on(a))for(var E in a)x.addColorStop(parseFloat(E),a[E])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=On.parse(a.path):x=new On,x.type=ni(On,a.type),typeof a.startX=="number"&&(x.startX=Za(a.startX)),typeof a.startY=="number"&&(x.startY=Za(a.startY)),typeof a.endX=="number"&&(x.endX=Za(a.endX)),typeof a.endY=="number"&&(x.endY=Za(a.endY)),a.spot1 instanceof Kn&&(x.spot1=a.spot1),a.spot2 instanceof Kn&&(x.spot2=a.spot2)):y==="EnumValue"&&(E=a.classType,E.indexOf("go.")===0&&(E=E.substr(3)),E=Lv(E),typeof E=="function"&&(x=ni(E,a.name)));return x}bt.Pe=function(a){return this.Lt.add(a),this},bt.ik=function(a){this.Lt.remove(a)},bt.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)},bt.cb=function(a,y,x,E,b,z,tt){Ds(this,"",a,y,x,E,b,z,tt)},bt.g=function(a,y,x,E,b){Ds(this,"",To,a,this,y,x,E,b)},bt.Fs=function(a,y,x,E,b,z){Ds(this,"",To,y,a,x,E,b,z)};function Ds(a,y,x,E,b,z,tt,rt,ot){rt===void 0&&(rt=null),ot===void 0&&(ot=null);var lt=new Uo;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)}Ci.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===To){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===is?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,on(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]===a&&An(this.Tc,x),E!==void 0&&this.kb.remove(E)):(this.Tc[x]!==a&&hn(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)))):a.modelChange===""?((E=a.object)&&!yn(E)&&a.propertyName&&(E=vs(a.object,a.propertyName)),yn(E)&&typeof x=="number"&&(a=a.newValue,y?An(E,x):hn(E,x,a))):he("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===cs?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,on(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]!==a&&hn(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)):(this.Tc[x]===a&&An(this.Tc,x),E!==void 0&&this.kb.remove(E)))):a.modelChange===""?((E=a.object)&&!yn(E)&&a.propertyName&&(E=vs(a.object,a.propertyName)),yn(E)&&typeof x=="number"&&(a=a.oldValue,y?hn(E,x,a):An(E,x))):he("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==ea&&he("unknown ChangedEvent: "+a.toString())},Ci.prototype.Ea=function(a){return this.undoManager.Ea(a)},Ci.prototype.eb=function(a){return this.undoManager.eb(a)},Ci.prototype.Kf=function(){return this.undoManager.Kf()},Ci.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}},bt=Ci.prototype,bt.La=function(a,y){y===void 0&&(y=""),Ds(this,"SourceChanged",ea,y,a,null,null)},bt.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=vs(a,y),y!==void 0)){if(ud(y))return y;he("Key value for node data "+a+" is not a number or a string: "+y)}}},bt.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var E=vs(a,x);E!==y&&this.hc(y)===null&&(Ro(a,x,y),E!==void 0&&this.kb.remove(E),this.kb.add(y,a),Ds(this,"nodeKey",To,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"}bt.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},bt.hc=function(a){return a===null&&he("Model.findNodeDataForKey:key must not be null"),a!==void 0&&ud(a)?this.kb.I(a):null},bt.$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)}}}}},bt.xf=function(a){a!==null&&(Dn(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&&he("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(E,y),E=null,x&&(E=a.Tc.length,hn(a.Tc,E,y)),Ds(a,"nodeDataArray",is,"nodeDataArray",a,null,y,null,E),a.fm(y),a.em(y))}bt.Fy=function(a){if(yn(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)},bt.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;An(a.Tc,E)}Ds(a,"nodeDataArray",cs,"nodeDataArray",a,y,null,E,null),a.qp(y)}bt.nA=function(a){if(yn(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)},bt.$z=function(a){if(a!==this.nodeDataArray&&yn(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()}},bt.jp=function(a,y){y!==void 0&&(a=Fp(this,a),a instanceof Be&&this.Vf.add(y,a))},bt.Lv=function(){},bt.fm=function(){},bt.em=function(){},bt.qp=function(){};function eA(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E===null&&(E=new Be,a.Vf.add(y,E)),E.add(x)}}function nA(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E instanceof Be&&(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 Be?a:null)}bt.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},Ci.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):G0(this,a,!0),on(a)&&ln(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 ln(E),E}if(x&&on(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=vs(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 Ci||z instanceof _o||z instanceof Ms||z instanceof Uo||(z=G0(a,z,!1)),Ro(x,E,z)}return ln(x),x}return y instanceof It||y instanceof cn||y instanceof Oe||y instanceof Kn||y instanceof sr?y.copy():y}Ci.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 we&&(M1=!0,pi('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),pi(" Is that really your intent?"));var E=vs(a,y);E!==x&&(Ro(a,y,x),this.Fs(a,y,E,x))},bt=Ci.prototype,bt.set=function(a,y,x){this.setDataProperty(a,y,x)},bt.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])}},bt.Ay=function(a,y){this.ts(a,-1,y)},bt.ts=function(a,y,x){0>y&&(y=a.length),hn(a,y,x),Ds(this,"",is,"",a,null,x,null,y)},bt.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&he("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];An(a,y),Ds(this,"",cs,"",a,x,null,y,null)},bt.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=vs(a,y),y===void 0))return"";if(typeof y=="string")return y;he("getCategoryForNodeData found a non-string category for "+a+": "+y)},bt.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var E=vs(a,x);E===void 0&&(E=""),E!==y&&(Ro(a,x,y),Ds(this,"nodeCategory",To,x,a,E,y))}else Ro(a,x,y)}},bt.lm=function(a,y){this.jm(y,this.Ro(a))},bt.Tl=function(){return!1},bt.Wj=function(){return!1},bt.ri=function(){return!1},bt.xs=function(){return!1},bt.Xj=function(){return!1};function Ev(){return new Ci}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 Uu[a]?Uu[a]:Un.go!==void 0&&Un.go[a]?Un.go[a]:null}function vs(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){}}Ue.Object.defineProperties(Ci.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===""&&he("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&he("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];on(b)||he("Model.nodeDataArray must only contain Objects, not: "+b),Dn(b)}for(this.Tc=a,E=new ee,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(Ds(this,"nodeDataArray",To,"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"}}}),Ci.prototype.setCategoryForNodeData=Ci.prototype.jm,Ci.prototype.getCategoryForNodeData=Ci.prototype.Ro,Ci.prototype.removeArrayItem=Ci.prototype.ov,Ci.prototype.insertArrayItem=Ci.prototype.ts,Ci.prototype.addArrayItem=Ci.prototype.Ay,Ci.prototype.assignAllDataProperties=Ci.prototype.Do,Ci.prototype.set=Ci.prototype.set,Ci.prototype.clearUnresolvedReferences=Ci.prototype.Qy,Ci.prototype.mergeNodeDataArray=Ci.prototype.$z,Ci.prototype.removeNodeDataCollection=Ci.prototype.nA,Ci.prototype.removeNodeData=Ci.prototype.cm,Ci.prototype.addNodeDataCollection=Ci.prototype.Fy,Ci.prototype.addNodeData=Ci.prototype.xf,Ci.prototype.makeNodeDataKeyUnique=Ci.prototype.$u,Ci.prototype.findNodeDataForKey=Ci.prototype.hc,Ci.prototype.containsNodeData=Ci.prototype.lb,Ci.prototype.setKeyForNodeData=Ci.prototype.km,Ci.prototype.getKeyForNodeData=Ci.prototype.wa,Ci.prototype.updateTargetBindings=Ci.prototype.La,Ci.prototype.commit=Ci.prototype.commit,Ci.prototype.rollbackTransaction=Ci.prototype.Kf,Ci.prototype.commitTransaction=Ci.prototype.eb,Ci.prototype.startTransaction=Ci.prototype.Ea,Ci.prototype.raiseDataChanged=Ci.prototype.Fs,Ci.prototype.raiseChanged=Ci.prototype.g,Ci.prototype.raiseChangedEvent=Ci.prototype.cb,Ci.prototype.removeChangedListener=Ci.prototype.ik,Ci.prototype.addChangedListener=Ci.prototype.Pe,Ci.prototype.writeJsonValue=Ci.prototype.sm,Ci.prototype.replaceJsonObjects=Ci.prototype.dm,Ci.prototype.applyIncrementalJSON=Ci.prototype.Ky,Ci.prototype.applyIncrementalJson=Ci.prototype.Zw,Ci.prototype.toJSON=Ci.prototype.toJSON,Ci.prototype.toJson=Ci.prototype.np,Ci.prototype.toIncrementalJSON=Ci.prototype.yA,Ci.prototype.toIncrementalJson=Ci.prototype.$x,Ci.prototype.toIncrementalData=Ci.prototype.xA,Ci.prototype.clear=Ci.prototype.clear;var M1=!1,Uu={};Ci.className="Model",Ci.fromJSON=Ci.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=Un.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:he("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=Un[E])),typeof b=="function"&&(a=new b)}catch(z){}a===null||a instanceof Ci?y=a:he("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=Ci.constructGraphLinksModel()),y.gp(x),y.kv(x),y},Ci.safePropertyValue=vs,Ci.safePropertySet=Ro,Uu.Brush=no,Uu.ChangedEvent=Uo,Uu.Geometry=On,Uu.Margin=sr,Uu.Panel=En,Uu.Point=It,Uu.Rect=Oe,Uu.Size=cn,Uu.Spot=Kn,Uu.Transaction=Ms,Uu.UndoManager=_o;function Fs(a,y,x,E){ln(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=k1,this.wk=null):(this.el=Lp,this.wk=E),this.st=new Be}Fs.prototype.copy=function(){var a=new Fs;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},bt=Fs.prototype,bt.qb=function(a){a.classType===Fs&&(this.mode=a)},bt.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},bt.freeze=function(){return this._isFrozen=!0,this},bt.ka=function(){return this._isFrozen=!1,this},bt.Kx=function(a){return a===void 0&&(a=null),this.mode=Lp,this.backConverter=a,this},bt.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},bt.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function b1(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}bt.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==="")pi("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(E!==""&&(z=vs(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){}}}},bt.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=vs(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 Et=E.itemIndex,Tt=E.panel.itemArray;ot.ov(Tt,Et),ot.ts(Tt,Et,yt)}}}catch(Dt){}}finally{this.st.remove(a)}}}},Ue.Object.defineProperties(Fs.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&rn(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&rn(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&rn(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&rn(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&rn(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&rn(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&rn(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&rn(this),this.el=a}}}),Fs.prototype.updateSource=Fs.prototype.sp,Fs.prototype.updateTarget=Fs.prototype.Mv,Fs.prototype.ofModel=Fs.prototype.dA,Fs.prototype.ofObject=Fs.prototype.cp,Fs.prototype.makeTwoWay=Fs.prototype.Kx;var Hw="Binding",k1=new Ze(Fs,"OneWay",1),Lp=new Ze(Fs,"TwoWay",2);Fs.className="Binding",Fs.parseEnum=function(a,y){return function(x){return x=ni(a,x),x===null?y:x}},Fs.toString=Ki,Fs.OneWay=k1,Fs.TwoWay=Lp;function Or(a,y,x){Ci.call(this),this.Vv=`,
|
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
|
"removedLinkKeys": `,this.md=[],this.$f=new Be,this.wb=new Qe,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&&(yn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}He(Or,Ci),Or.constructGraphLinksModel=Ci.constructGraphLinksModel,Or.prototype.cloneProtected=function(a){Ci.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},bt=Or.prototype,bt.clear=function(){Ci.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},bt.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)+":"+Ki(b)}for(y+=`
|
|
|
link data:`,a=this.linkDataArray,x=a.length,E=0;E<x;E++)b=a[E],y+=" "+Zl(this,b,!0)+"-->"+Zl(this,b,!1)}return y},bt.Qv=function(a,y){this.linkKeyProperty===""&&he("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=Ci.prototype.Qv.call(this,a,y),E=this,b=new Be,z=new Be,tt=new Be,rt=this.vh;a.changes.each(function(ut){ut.model===E&&(ut.modelChange==="linkDataArray"?ut.change===is?b.add(ut.newValue):ut.change===cs&&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 Ci||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},bt.rm=function(){var a=Ci.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},bt.gp=function(a){Ci.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)},bt.Rv=function(){var a=Ci.prototype.Rv.call(this),y=`,
|
|
|
"linkDataArray": `+ld(this,this.linkDataArray,!0);return a+y},bt.kv=function(a){Ci.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 Be,E=0;E<a.linkDataArray.length;E++){var b=a.linkDataArray[E];K0(a,y,b,b,x)}return x}bt.Pv=function(a,y){this.linkKeyProperty===""&&he("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=Ci.prototype.Pv.call(this,a,y),E=this,b=new Be,z=new Be,tt=new Be,rt=this.vh;a.changes.each(function(ut){ut.model===E&&(ut.modelChange==="linkDataArray"?ut.change===is?b.add(ut.newValue):ut.change===cs&&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 Ci||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},bt.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)&&he("applyIncrementalJson cannot change Model properties"),Ci.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)},Or.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===To){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===is){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,on(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===cs){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,on(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}}Ci.prototype.changeState.call(this,a,y)}},bt=Or.prototype,bt.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}},bt.yx=function(a){return Zl(this,a,!0)},bt.wv=function(a,y){Tg(this,a,y,!0)},bt.Bx=function(a){return Zl(this,a,!1)},bt.Bv=function(a,y){Tg(this,a,y,!1)};function Zl(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=vs(y,a),a!==void 0))){if(ud(a))return a;he((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=vs(y,b);z!==x&&(nA(a,z,y),Ro(y,b,x),a.hc(x)===null&&eA(a,x,y),Ds(a,E?"linkFromKey":"linkToKey",To,b,y,z,x),typeof b=="string"&&a.La(y,b))}else Ro(y,b,x)}}bt.zx=function(a){return z0(this,a,!0)},bt.xv=function(a,y){Ng(this,a,y,!0)},bt.Cx=function(a){return z0(this,a,!1)},bt.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=vs(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=vs(y,b);z===void 0&&(z=""),z!==x&&(Ro(y,b,x),Ds(a,E?"linkFromPortId":"linkToPortId",To,b,y,z,x),typeof b=="string"&&a.La(y,b))}else Ro(y,b,x)}}bt.Ef=function(a){if(a===null)return j0;var y=this.je;return y===""?j0:(a=vs(a,y),a===void 0?j0:a)},bt.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var E=vs(a,x);if(E===void 0&&(E=j0),E!==y){if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)nA(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&&eA(this,tt,a)}Ds(this,"linkLabelKeys",To,x,a,E,y),typeof x=="string"&&this.La(a,x)}}else Ro(a,x,y)}},bt.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=vs(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&&eA(this,y,a),Ds(this,"linkLabelKeys",is,x,a,null,y,null,b)))}else he(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},bt.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=vs(a,x);if(Array.isArray(E)){var b=E.indexOf(y);0>b||(E.splice(b,1),this.Jc(a)&&(nA(this,y,a),Ds(this,"linkLabelKeys",cs,x,a,y,null,b,null)))}else E!==void 0&&he(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},bt.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=vs(a,y),y!==void 0)){if(ud(y))return y;he("Key value for link data "+a+" is not a number or a string: "+y)}}},bt.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var E=vs(a,x);E!==y&&this.jh(y)===null&&(Ro(a,x,y),E!==void 0&&this.wb.remove(E),this.wb.add(y,a),Ds(this,"linkKey",To,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Ro(a,x,y)}},bt.jh=function(a){return a===null&&he("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&ud(a)?this.wb.I(a):null},bt.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)}}}}},bt.Jc=function(a){return a===null?!1:this.$f.contains(a)},bt.fi=function(a){a!==null&&(Dn(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&&he("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)),Ds(a,"linkDataArray",is,"linkDataArray",a,null,y,null,E),Mv(a,y)}bt.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)},bt.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(Ds(a,"linkDataArray",cs,"linkDataArray",a,y,null,E,null),x=Zl(a,y,!0),nA(a,x,y),x=Zl(a,y,!1),nA(a,x,y),E=a.Ef(y),Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],nA(a,x,y)}bt.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)},bt.Zz=function(a){if(this.linkKeyProperty===""&&he("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&yn(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=Zl(a,y,!0);x=a.Vl(x),a.hc(x)===null&&eA(a,x,y),x=Zl(a,y,!1),x=a.Vl(x),a.hc(x)===null&&eA(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&&eA(a,x,y)}bt.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):G0(this,a,!0),on(a)&&(ln(a),this.lf!==""&&Ro(a,this.lf,void 0),this.mf!==""&&Ro(a,this.mf,void 0),this.je!==""&&Ro(a,this.je,[])),a},bt.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!vs(a,y)},bt.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=vs(a,y),y!==void 0)){if(ud(y))return y;he("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},bt.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var E=vs(a,x);E!==y&&(nA(this,E,a),Ro(a,x,y),this.hc(y)===null&&eA(this,y,a),Ds(this,"nodeGroupKey",To,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Ro(a,x,y)}},Or.prototype.copyNodeData=function(a){return a===null?null:(a=Ci.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||vs(a,this.Je)===void 0||Ro(a,this.Je,void 0),a)},Or.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=vs(a,y);E!==x&&(Ro(a,y,x),this.Fs(a,y,E,x))},bt=Or.prototype,bt.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&&vs(a,b)===y[b]||E&&b===this.linkKeyProperty||this.setDataProperty(a,b,y[b])}},bt.jp=function(a,y){Ci.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(Zl(this,E,!0)===b){var tt=this.lf;Ro(E,tt,z),Ds(this,"linkFromKey",To,tt,E,b,z),typeof tt=="string"&&this.La(E,tt)}if(Zl(this,E,!1)===b&&(tt=this.mf,Ro(E,tt,z),Ds(this,"linkToKey",To,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,Ds(this,"linkLabelKeys",is,ot,E,b,z,lt,lt))}},bt.qv=function(a,y,x){if(this.lh(a)===y){var E=this.Je;Ro(a,E,x),Ds(this,"nodeGroupKey",To,E,a,y,x),typeof E=="string"&&this.La(a,E)}},bt.Lv=function(){Ci.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)Mv(this,a[x])},bt.fm=function(a){Ci.prototype.fm.call(this,a),a=this.wa(a);var y=Fp(this,a);if(y!==null){var x=xn();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)){if(this.lh(E)===a){var b=this.Je;Ds(this,"nodeGroupKey",To,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}else if(Zl(this,E,!0)===a&&(b=this.lf,Ds(this,"linkFromKey",To,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),Zl(this,E,!1)===a&&(b=this.mf,Ds(this,"linkToKey",To,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&&(Ds(this,"linkLabelKeys",is,tt,E,a,a,rt,rt),x.push(E))}for(y=0;y<x.length;y++)nA(this,a,x[y]);Nn(x)}},bt.em=function(a){Ci.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&eA(this,y,a)},bt.qp=function(a){Ci.prototype.qp.call(this,a);var y=this.lh(a);nA(this,y,a)},bt.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=vs(a,y),y===void 0))return"";if(typeof y=="string")return y;he("getCategoryForLinkData found a non-string category for "+a+": "+y)},Or.prototype.getLinkCategoryForData=function(a){return this.ps(a)},Or.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var E=vs(a,x);E===void 0&&(E=""),E!==y&&(Ro(a,x,y),Ds(this,"linkCategory",To,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Ro(a,x,y)}},Or.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},bt=Or.prototype,bt.lm=function(a,y){Ci.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))}bt.Wj=function(){return!0},bt.ri=function(){return!0},bt.xs=function(){return!0},bt.Xj=function(){return!0},Ue.Object.defineProperties(Or.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];on(b)||he("GraphLinksModel.linkDataArray must only contain Objects, not: "+b),Dn(b)}if(this.md=a,this.linkKeyProperty!==""){for(E=new ee,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 Be,b=0;b<x;b++)E.add(a[b]);for(this.$f=E,Ds(this,"linkDataArray",To,"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"}}}),Or.prototype.setCategoryForLinkData=Or.prototype.lp,Or.prototype.getCategoryForLinkData=Or.prototype.ps,Or.prototype.assignAllDataProperties=Or.prototype.Do,Or.prototype.setGroupKeyForNodeData=Or.prototype.mp,Or.prototype.getGroupKeyForNodeData=Or.prototype.lh,Or.prototype.isGroupForNodeData=Or.prototype.Yu,Or.prototype.copyLinkData=Or.prototype.Jo,Or.prototype.mergeLinkDataArray=Or.prototype.Zz,Or.prototype.removeLinkDataCollection=Or.prototype.lA,Or.prototype.removeLinkData=Or.prototype.bm,Or.prototype.addLinkDataCollection=Or.prototype.Ey,Or.prototype.addLinkData=Or.prototype.fi,Or.prototype.containsLinkData=Or.prototype.Jc,Or.prototype.makeLinkDataKeyUnique=Or.prototype.Bs,Or.prototype.findLinkDataForKey=Or.prototype.jh,Or.prototype.setKeyForLinkData=Or.prototype.Ks,Or.prototype.getKeyForLinkData=Or.prototype.Ac,Or.prototype.removeLabelKeyForLinkData=Or.prototype.Qx,Or.prototype.addLabelKeyForLinkData=Or.prototype.Bu,Or.prototype.setLabelKeysForLinkData=Or.prototype.Ls,Or.prototype.getLabelKeysForLinkData=Or.prototype.Ef,Or.prototype.setToPortIdForLinkData=Or.prototype.Cv,Or.prototype.getToPortIdForLinkData=Or.prototype.Cx,Or.prototype.setFromPortIdForLinkData=Or.prototype.xv,Or.prototype.getFromPortIdForLinkData=Or.prototype.zx,Or.prototype.setToKeyForLinkData=Or.prototype.Bv,Or.prototype.getToKeyForLinkData=Or.prototype.Bx,Or.prototype.setFromKeyForLinkData=Or.prototype.wv,Or.prototype.getFromKeyForLinkData=Or.prototype.yx,Or.prototype.clear=Or.prototype.clear;var j0=Object.freeze([]);Or.className="GraphLinksModel",Uu.GraphLinksModel=Or,Ci.constructGraphLinksModel=Ci.constructGraphLinksModel=function(){return new Or},Ci.initDiagramModel=Ev=function(){return new Or};function Ya(a,y){Ci.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(yn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}He(Ya,Ci),Ya.constructGraphLinksModel=Ci.constructGraphLinksModel,Ya.prototype.cloneProtected=function(a){Ci.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},bt=Ya.prototype,bt.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)+":"+Ki(b)}}return y},bt.rm=function(){var a=Ci.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},bt.gp=function(a){Ci.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},bt.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&he("applyIncrementalJson cannot change Model properties"),Ci.prototype.fp.call(this,a)},bt.Vl=function(a){return a},bt.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=vs(a,y),y!==void 0)){if(ud(y))return y;he("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},bt.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=vs(a,x);E!==y&&(nA(this,E,a),Ro(a,x,y),this.hc(y)===null&&eA(this,y,a),Ds(this,"nodeParentKey",To,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Ro(a,x,y)}},bt.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=vs(a,y),y===void 0)?"":typeof y=="string"?y:(he("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},Ya.prototype.getLinkCategoryForData=function(a){return this.ss(a)},Ya.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var E=vs(a,x);E===void 0&&(E=""),E!==y&&(Ro(a,x,y),Ds(this,"parentLinkCategory",To,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Ro(a,x,y)}},Ya.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},Ya.prototype.copyNodeData=function(a){return a===null?null:(a=Ci.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||vs(a,this.Ke)===void 0||Ro(a,this.Ke,void 0),a)},Ya.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=vs(a,y);E!==x&&(Ro(a,y,x),this.Fs(a,y,E,x))},bt=Ya.prototype,bt.jp=function(a,y){Ci.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},bt.qv=function(a,y,x){if(this.mh(a)===y){var E=this.Ke;Ro(a,E,x),Ds(this,"nodeParentKey",To,E,a,y,x),typeof E=="string"&&this.La(a,E)}},bt.fm=function(a){Ci.prototype.fm.call(this,a),a=this.wa(a);var y=Fp(this,a);if(y!==null){var x=xn();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)&&this.mh(E)===a){var b=this.Ke;Ds(this,"nodeParentKey",To,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}for(y=0;y<x.length;y++)nA(this,a,x[y]);Nn(x)}},bt.em=function(a){Ci.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&eA(this,y,a)},bt.qp=function(a){Ci.prototype.qp.call(this,a);var y=this.mh(a);nA(this,y,a)},bt.lm=function(a,y){Ci.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},bt.Tl=function(){return!0},bt.xs=function(){return!0},Ue.Object.defineProperties(Ya.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"}}}),Ya.prototype.setParentLinkCategoryForNodeData=Ya.prototype.Ms,Ya.prototype.getParentLinkCategoryForNodeData=Ya.prototype.ss,Ya.prototype.setParentKeyForNodeData=Ya.prototype.qe,Ya.prototype.getParentKeyForNodeData=Ya.prototype.mh,Ya.className="TreeModel",Uu.TreeModel=Ya;function qo(a){Go.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=Qu,this.Ti=0,this.Zv=new It,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=Qu,this.K=Xa,this.nd=Ig,this.hd=xv,this.tf=6,this.Nn=q0,a&&Object.assign(this,a)}He(qo,Go),qo.prototype.cloneProtected=function(a){Go.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},qo.prototype.qb=function(a){a.classType===qo?a===X0||a===J0||a===Z0||a===Y0||a===Ig?this.sorting=a:a===nf||a===Dg||a===Xa||a===hd?this.direction=a:a===Pc||a===Ad||a===Qu||a===Ou?this.arrangement=a:(a===Vf||a===q0)&&(this.nodeDiameterFormula=a):Go.prototype.qb.call(this,a)},qo.prototype.createNetwork=function(){return new Ug(this)},qo.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 ee;y.addAll(a.iterator),a=new ee;var x=new ee,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===Ou&&ot===Vf?rt=Qu:rt===Ou&&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===Ou&&a.reverse(),E=new ee,E.addAll(a),E.addAll(x)):(this.arrangement===Ou&&x.reverse(),E=new ee,E.addAll(x),E.addAll(a))}ot=E.length;for(var Et=z=b=0;Et<E.length;Et++){var Tt=ft+yt*z*(this.direction===Xa?1:-1)/ot,Dt=E.M(Et).diameter;isNaN(Dt)&&(Dt=cd(E.M(Et),Tt)),360>yt&&(Et===0||Et===E.length-1)&&(Dt/=2),b+=Dt,z++}if(isNaN(lt)||rt===Ou){if(isNaN(y)&&(y=6),rt!==Qu&&rt!==Ou){for(z=-1/0,tt=0;tt<ot;tt++)Et=E.M(tt),b=E.M(tt===ot-1?0:tt+1),isNaN(Et.diameter)&&cd(Et,0),isNaN(b.diameter)&&cd(b,0),z=Math.max(z,(Et.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!==Ou?y:1.6*y),ut,ft*Math.PI/180,yt*Math.PI/180);z=lt*ut}else if(z=lt*ut,Et=bv(this,lt,z,ft*Math.PI/180,yt*Math.PI/180),isNaN(y))(rt===Qu||rt===Ou)&&(y=(Et-b)/(360<=yt?ot:ot-1));else if(rt===Qu||rt===Ou)Et=(Et-b)/(360<=yt?ot:ot-1),Et<y?(lt=V0(this,b+y*(360<=yt?ot:ot-1),ut,ft*Math.PI/180,yt*Math.PI/180),z=lt*ut):y=Et;else{for(tt=-1/0,b=0;b<ot;b++)Tt=E.M(b),Dt=E.M(b===ot-1?0:b+1),isNaN(Tt.diameter)&&cd(Tt,0),isNaN(Dt.diameter)&&cd(Dt,0),tt=Math.max(tt,(Tt.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=Et/(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!==Ou)if(this.direction===nf||this.direction===Dg){switch(tt=0,E){case Ad:tt=180*W0(this,rt,yt,lt,ot)/Math.PI;break;case Qu: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*W0(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:kp(this,a,lt,hd);break;case Qu:bp(this,a,lt,hd);break;case Pc:Mp(this,a,ut/2,lt,hd)}switch(E){case Ad:kp(this,x,lt+tt,Xa);break;case Qu:bp(this,x,lt+tt,Xa);break;case Pc:Mp(this,x,ut/2,lt+tt,Xa)}}else{switch(E){case Ad:kp(this,x,lt,hd);break;case Qu:bp(this,x,lt,hd);break;case Pc:Mp(this,x,ut/2,lt,hd)}switch(E){case Ad:kp(this,a,lt+tt,Xa);break;case Qu:bp(this,a,lt+tt,Xa);break;case Pc:Mp(this,a,ut/2,lt+tt,Xa)}}}else switch(E){case Ad:kp(this,y,lt,this.direction);break;case Qu:bp(this,y,lt,this.direction);break;case Pc:Mp(this,y,ut,lt,this.direction);break;case Ou:U1(this,y,ut,lt,this.direction)}else U1(this,y,ut,lt-ut/2,Xa)}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===Xa?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 bp(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=W0(a,b,z,E===Xa?x:-x,(lt.diameter+ut.diameter)/2+tt),x+=E===Xa?lt:-lt}}function kp(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=W0(a,b,z,E===Xa?x:-x,tt),x+=E===Xa?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===Xa?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=It.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(It.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),Et=Math.abs(lt-ft)-((ut[0].height+ut[ut.length-1].height)/2+tt);tt=0,1>Math.abs(Et)?Math.abs(ot-z)<(ut[0].width+ut[ut.length-1].width)/2&&(tt=0):tt=0<Et?Et:1>Math.abs(yt)?0:yt,ot=Math.abs(z)>Math.abs(ft)?0<z!=lt>ft:0<ft!=ot<z,(ot=b===Xa?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=It.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(It.free(ut),a.mj++,!(23<a.mj)){if(ot=Math.atan2(lt,ot),ot=b===Xa?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===Xa)){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===Xa)){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}qo.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},qo.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 It(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))},qo.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function bv(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?bv(a,1,x,E,b):bv(a,1,x))}function W0(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}}qo.prototype.sort=function(a){switch(this.sorting){case Z0: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:he("Invalid sorting type.")}return a};function Rw(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new ee;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}qo.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 ee;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,Et=[],Tt=0;Tt<x.length;Tt++)0>y[x[Tt]].indexOf(x[Tt===x.length-1?0:Tt+1])&&Et.push(Tt===x.length-1?0:Tt+1);if(Et.length===0)for(Tt=0;Tt<x.length;Tt++)Et.push(Tt);for(Tt=0;Tt<Et.length;Tt++){for(var Dt=Et[Tt],Xt=y[lt],jt=0,ie=0;ie<tt.length;ie++){var le=z[tt[ie]],fe=z[rt[ie]];if(le<fe){var ye=le;le=fe}else ye=fe;if(ye<Dt&&Dt<=le)for(fe=0;fe<Xt.length;fe++){var _e=Xt[fe];0>x.indexOf(_e)||ye<z[_e]&&z[_e]<le||ye===z[_e]||le===z[_e]||jt++}else for(fe=0;fe<Xt.length;fe++)_e=Xt[fe],0>x.indexOf(_e)||ye<z[_e]&&z[_e]<le&&ye!==z[_e]&&le!==z[_e]&&jt++}for(Xt=jt,ie=jt=0;ie<y[lt].length;ie++)ye=x.indexOf(y[lt][ie]),0<=ye&&(ye=Math.abs(Dt-(ye>=Dt?ye+1:ye)),jt+=ye<x.length+1-ye?ye:x.length+1-ye);for(ie=0;ie<tt.length;ie++)ye=z[tt[ie]],le=z[rt[ie]],ye>=Dt&&ye++,le>=Dt&&le++,ye>le&&(fe=le,le=ye,ye=fe),le-ye<(x.length+2)/2==(ye<Dt&&Dt<=le)&&jt++;(Xt<ut||Xt===ut&&jt<ft)&&(ut=Xt,ft=jt,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++)Et=x.indexOf(y[lt][yt]),0>Et||Et===ut||(Tt=Et>ut?Et-ut:ut-Et,ft+=Et<ut!=Tt>tt-Tt?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},Ue.Object.defineProperties(qo.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!==Ou&&a!==Qu&&a!==Ad&&a!==Pc||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Xa&&a!==hd&&a!==nf&&a!==Dg||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==Z0&&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 Qu=new Ze(qo,"ConstantSpacing",0),Ad=new Ze(qo,"ConstantDistance",1),Pc=new Ze(qo,"ConstantAngle",2),Ou=new Ze(qo,"Packed",3),Xa=new Ze(qo,"Clockwise",4),hd=new Ze(qo,"Counterclockwise",5),nf=new Ze(qo,"BidirectionalLeft",6),Dg=new Ze(qo,"BidirectionalRight",7),Z0=new Ze(qo,"Forwards",8),Y0=new Ze(qo,"Reverse",9),X0=new Ze(qo,"Ascending",10),J0=new Ze(qo,"Descending",11),Ig=new Ze(qo,"Optimized",12),q0=new Ze(qo,"Pythagorean",13),Vf=new Ze(qo,"Circular",14);qo.className="CircularLayout",qo.ConstantSpacing=Qu,qo.ConstantDistance=Ad,qo.ConstantAngle=Pc,qo.Packed=Ou,qo.Clockwise=Xa,qo.Counterclockwise=hd,qo.BidirectionalLeft=nf,qo.BidirectionalRight=Dg,qo.Forwards=Z0,qo.Reverse=Y0,qo.Ascending=X0,qo.Descending=J0,qo.Optimized=Ig,qo.Pythagorean=q0,qo.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){Fo.call(this,a)}He(Ug,Fo),Ug.prototype.createVertex=function(){return new Np(this)},Ug.prototype.createEdge=function(){return new $0(this)},Ug.className="CircularNetwork";function Np(a){Ks.call(this,a),this.u=this.Si=NaN}He(Np,Ks);function cd(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===Ou)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}Ue.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){Nl.call(this,a)}He($0,Nl),$0.className="CircularEdge";function ya(a){Go.call(this),this.ah=null,this.An=0,this.$d=new cn(100,100).freeze(),this.Bm=!1,this.sf=!0,this.td=!1,this.dl=100,this.$m=1,this.Zf=1e3,this.In=10,this.fo=Math,this.Hk=.05,this.Gk=50,this.Ek=150,this.Fk=0,this.Vm=10,this.Um=5,a&&Object.assign(this,a)}He(ya,Go),ya.prototype.cloneProtected=function(a){Go.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},ya.prototype.createNetwork=function(){return new Wf(this)},ya.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=xn(),ut=0;ut<rt+y.vertexes.count+2;ut++)lt[ut]=null;rt=0,tt.reset();for(var ft=Oe.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 It(ft.x+ft.width+E.width,ft.y),lt[1]=new It(ft.x,ft.y+ft.height+E.height),rt=2;else{var yt=K1(lt,rt,b,z,ft.width,ft.height,E),Et=lt[yt],Tt=new It(Et.x+ft.width+E.width,Et.y),Dt=new It(Et.x,Et.y+ft.height+E.height);for(yt+1<rt&<.splice(yt+1,0,null),lt[yt]=Tt,lt[yt+1]=Dt,rt++,yt=Et.x-ft.x,Et=Et.y-ft.y,ut=ut.vertexes.iterator;ut.next();)Tt=ut.value,Tt.centerX+=yt,Tt.centerY+=Et}for(Oe.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 It(yt.x+yt.width+E.width,yt.y),lt[1]=new It(yt.x,yt.y+yt.height+E.height),rt=2):(ot=K1(lt,rt,b,z,yt.width,yt.height,E),ft=lt[ot],Et=new It(ft.x+yt.width+E.width,ft.y),yt=new It(ft.x,ft.y+yt.height+E.height),ot+1<rt&<.splice(ot+1,0,null),lt[ot]=Et,lt[ot+1]=yt,rt++,tt.centerX=ft.x+tt.width/2,tt.centerY=ft.y+tt.height/2);for(Nn(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},ya.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},ya.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 Wf(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 ee),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 ee,b.Hj=rt),rt.add(tt),b.Vd--,b.sh+=tt.sh):tt.network===E&&(rt=tt.Hj,rt===null&&(rt=new ee,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,xe.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 Et=z.value;if(Et.Ax(ft)===b){yt=Et;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,Et=ut*ft,1>Et&&(Et=1),rt=xe.sqrt((rt+Et+lt*lt*4/(tt*tt))/Et),tt=(rt-1)*ut/2,rt=(rt-1)*ft/2,b.bounds=new Oe(z-yt.x-tt,ot-yt.y-rt,ut+2*tt,ft+2*rt),b.focus=new It(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 Oe(E.centerX-z,E.centerY-tt,b.Ss,b.Qs),E.focus=new It(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=xe.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(Et,Tt){return Et===null||Tt===null||Et===Tt?0:Tt.width*Tt.height-Et.width*Et.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=xe.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}ya.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},ya.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,xe.sqrt(x*x+a*a)):a+x<y?(E=E+b-tt,a=a+x-y,xe.sqrt(E*E+a*a)):tt-(E+b):E>tt+rt?a>y+z?(x=E-tt-rt,a=a-y-z,xe.sqrt(x*x+a*a)):a+x<y?(E=E-tt-rt,a=a+x-y,xe.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,Xt){return Dt===null||Xt===null||Dt===Xt?0:Dt.centerX-Xt.centerX}):y.sort(function(Dt,Xt){return Dt===null||Xt===null||Dt===Xt?0:Dt.centerY-Xt.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 Et=E.y+rt.y;if(ot-lt>x||lt-ot>x){if(b)break}else if(ut-Et>x||Et-ut>x){if(!b)break}else{var Tt=G1(tt,yt);1>Tt?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new tm),Tt=E.random(),rt=E.random(),ot>lt?(E=Math.abs(yt.bounds.right-tt.bounds.x),E=(1+E)*Tt):ot<lt?(E=Math.abs(yt.bounds.x-tt.bounds.right),E=-(1+E)*Tt):(E=Math.max(yt.width,tt.width),E=(1+E)*Tt-E/2),ut>Et?(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)/(Tt*Tt),E=(lt-ot)/Tt*rt,lt=(Et-ut)/Tt*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}ya.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},ya.prototype.moveFixedVertex=function(){},ya.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},ya.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=ws,y.toSpot=ws)}},ya.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=Oe.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,Oe.free(x)}x=Oe.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()}Oe.free(x)},ya.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},ya.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},ya.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},ya.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},ya.prototype.electricalFieldX=function(){return 0},ya.prototype.electricalFieldY=function(){return 0},ya.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},ya.prototype.gravitationalFieldX=function(){return 0},ya.prototype.gravitationalFieldY=function(){return 0},ya.prototype.isFixed=function(a){return a.isFixed},Ue.Object.defineProperties(ya.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"&&he('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())}}}),ya.className="ForceDirectedLayout";function j1(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}j1.className="ForceDirectedSubnet";function Wf(a){Fo.call(this,a)}He(Wf,Fo),Wf.prototype.createVertex=function(){return new Dp(this)},Wf.prototype.createEdge=function(){return new Ip(this)},Wf.className="ForceDirectedNetwork";function Dp(a){Ks.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}He(Dp,Ks),Ue.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){Nl.call(this,a),this.j=this.o=NaN}He(Ip,Nl),Ue.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 Ao(a){Go.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 It,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}He(Ao,Go),Ao.prototype.cloneProtected=function(a){Go.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},Ao.prototype.qb=function(a){a.classType===Ao?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:he("Unknown enum value: "+a):Go.prototype.qb.call(this,a)},Ao.prototype.createNetwork=function(){return new Og(this)},Ao.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 Et=yt;ft=ot,yt=rt,ot=lt,rt=Et}var Tt=b.focus;lt=z.focus;var Dt=E.rev?z.bounds:b.bounds;Et=It.alloc(),ut!==ft?Dt.w()&&ft.isVisible()?ft.actualBounds.w()?(wc(ft,yt,Cr,Et),Et.x+=ft.actualBounds.x-Dt.x,Et.y+=ft.actualBounds.y-Dt.y):(wc(ft,yt,Cr,Et),Et.w()||Et.assign(Tt)):Et.assign(Tt):Dt.w()?(wc(ft,yt,Cr,Et),Et.w()||Et.assign(Tt)):Et.assign(Tt),ft=E.rev?b.bounds:z.bounds,ut=It.alloc(),tt!==ot?ft.w()&&ot.isVisible()?ot.actualBounds.w()?(wc(ot,rt,Cr,ut),ut.x+=ot.actualBounds.x-ft.x,ut.y+=ot.actualBounds.y-ft.y):(wc(ot,rt,Cr,ut),ut.w()||ut.assign(lt)):ut.assign(lt):ft.w()?(wc(ot,rt,Cr,ut),ut.w()||ut.assign(lt)):ut.assign(lt),this.K===90||this.K===270?(tt=Math.round((Et.x-Tt.x)/this.kc),ot=Et.x,rt=Math.round((ut.x-lt.x)/this.kc),lt=ut.x):(tt=Math.round((Et.y-Tt.y)/this.kc),ot=Et.y,rt=Math.round((ut.y-lt.y)/this.kc),lt=ut.y),It.free(Et),It.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(Et=b.layer,ut=z.layer,ft=0,Dt=E.link,Dt!==null){var Xt=Dt.fromPort,jt=Dt.toPort;if(Xt!==null&&jt!==null){var ie=Dt.fromNode;if(yt=Dt.toNode,ie!==null&&yt!==null){var le=rm(this,!0),fe=rm(this,!1),ye=this.setsPortSpots?le:Dt.computeSpot(!0,Xt);Tt=this.setsPortSpots?fe:Dt.computeSpot(!1,jt);var _e=Dt.isOrthogonal;ye.$c()&&ye.Hf(fe)&&Tt.$c()&&Tt.Hf(le)?ft=0:(le=Dt.getLinkPoint(ie,Xt,ye,!0,_e,yt,jt,It.alloc()),fe=Dt.getLinkDirection(ie,Xt,le,ye,!0,_e,yt,jt),It.free(le),ye.ys()||fe!==tw(this,E,!0)?this.setsPortSpots&&ie!==null&&ie.ports.count===1&&E.rev&&(ft+=1):ft+=1,ye=Dt.getLinkPoint(yt,jt,Tt,!1,_e,ie,Xt,It.alloc()),Dt=Dt.getLinkDirection(yt,jt,ye,Tt,!1,_e,ie,Xt),It.free(ye),Tt.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)&&(Tt=a.createVertex(),Tt.node=null,Tt.Dj=1,Tt.layer=Et,Tt.near=b,a.dh(Tt),b=a.Zj(b,Tt,E.link),b.valid=!1,b.rev=E.rev,b.portFromColOffset=tt,b.portToColOffset=0,b.portFromPos=ot,b.portToPos=0,b=Tt),Dt=1,ft&&Dt--,Et-ut>Dt&&0<Et){for(E.valid=!1,Tt=a.createVertex(),Tt.node=null,Tt.Dj=2,Tt.layer=Et-1,a.dh(Tt),b=a.Zj(b,Tt,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=Tt,Et--;Et-ut>Dt&&0<Et;)Tt=a.createVertex(),Tt.node=null,Tt.Dj=3,Tt.layer=Et-1,a.dh(Tt),b=a.Zj(b,Tt,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=0,b.portFromPos=0,b.portToPos=0,b=Tt,Et--;b=a.Zj(Tt,z,E.link),b.valid=!ft,ft&&(Tt.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},Ao.prototype.linkMinLength=function(){return 1};function kv(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}Ao.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},Ao.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 Al(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 iu(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&<.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 Et=ot[lt];if(Et.valid&&Et.fromVertex.layer!==y)for(ft=Et.fromVertex.index,ut=Et.portToPos,Et=Et.portFromPos,yt=lt+1;yt<ot.length;yt++){var Tt=ot[yt];if(Tt.valid&&Tt.fromVertex.layer!==y){var Dt=Tt.fromVertex.index,Xt=Tt.portToPos;Tt=Tt.portFromPos,ut<Xt&&(ft>Dt||ft===Dt&&Et>Tt)&&rt++,Xt<ut&&(Dt>ft||Dt===ft&&Tt>Et)&&rt++}}}if(0>=x){for(ot=E[tt].destinationEdgesArrayAccess,lt=0;lt<ot.length;lt++)if(Et=ot[lt],Et.valid&&Et.toVertex.layer!==y)for(ft=Et.toVertex.index,ut=Et.portToPos,Et=Et.portFromPos,yt=lt+1;yt<ot.length;yt++)Tt=ot[yt],Tt.valid&&Tt.toVertex.layer!==y&&(Dt=Tt.toVertex.index,Xt=Tt.portToPos,Tt=Tt.portFromPos,Et<Tt&&(ft>Dt||ft===Dt&&ut>Xt)&&rt++,Tt<Et&&(Dt>ft||Dt===ft&&Xt>ut)&&rt++)}for(z[tt*b+tt]=rt,ot=tt+1;ot<b;ot++){var jt=0,ie=0;if(0<=x){rt=E[tt].sourceEdgesArrayAccess;var le=E[ot].sourceEdgesArrayAccess;for(lt=0;lt<rt.length;lt++)if(Et=rt[lt],Et.valid&&Et.fromVertex.layer!==y)for(ft=Et.fromVertex.index,Et=Et.portFromPos,yt=0;yt<le.length;yt++)Tt=le[yt],Tt.valid&&Tt.fromVertex.layer!==y&&(Dt=Tt.fromVertex.index,Tt=Tt.portFromPos,(ft<Dt||ft===Dt&&Et<Tt)&&ie++,(Dt<ft||Dt===ft&&Tt<Et)&&jt++)}if(0>=x){for(rt=E[tt].destinationEdgesArrayAccess,le=E[ot].destinationEdgesArrayAccess,lt=0;lt<rt.length;lt++)if(Et=rt[lt],Et.valid&&Et.toVertex.layer!==y)for(ft=Et.toVertex.index,ut=Et.portToPos,yt=0;yt<le.length;yt++)Tt=le[yt],Tt.valid&&Tt.toVertex.layer!==y&&(Dt=Tt.toVertex.index,Xt=Tt.portToPos,(ft<Dt||ft===Dt&&ut<Xt)&&ie++,(Dt<ft||Dt===ft&&Xt<ut)&&jt++)}z[tt*b+ot]=jt,z[ot*b+tt]=ie}}return fd(a,y,E),z}Ao.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,Et=ft.toVertex.column+ft.portToColOffset;rt+=(Math.abs(yt-Et)+1)*kv(ft)}}}fd(E,b,z),y+=rt}return y}Ao.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 Et=rt.fromVertex;rt.valid&&!rt.rev&&Et.layer!==y&&(ut+=Et.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 W1(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 Et=rt.fromVertex;rt.valid&&!rt.rev&&Et.layer!==y&&(ft[ut]=Et.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(Tt,Dt){return Tt-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)}}Ao.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=Z1(a);b!==null;)E[x]=b,x--,b.valid=!1,b=Z1(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&<++;(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 Z1(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++}Ao.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 Et=0;Et<b;Et++){var Tt=yt[Et],Dt=Tt.fromVertex;ut+=1,Dt.component!==1&&(z+=1,Dt=Dt.layer-lt.layer,Tt=a.linkMinLength(Tt),E=Math.min(E,Dt-Tt))}for(yt=lt.destinationEdgesArrayAccess,b=yt.length,Et=0;Et<b;Et++)Tt=yt[Et].toVertex,--ut,Tt.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,Et=0;Et<ft;Et++)Tt=yt[Et].fromVertex,lt+=1,Tt.component!==1?E+=1:ut=!0;for(yt=tt.destinationEdgesArrayAccess,ft=yt.length,Et=0;Et<ft;Et++)Tt=yt[Et],Dt=Tt.toVertex,--lt,Dt.component!==1&&(--E,Dt=tt.layer-Dt.layer,Tt=a.linkMinLength(Tt),b=Math.min(b,Dt-Tt));(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}Ao.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))}Ao.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=Al(this),x,E;for(x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)nm(this,E,1),du(this,E,1);var b=this.countCrossings();for(b<a&&(a=b,y=Al(this)),E=this.Ia;0<=E;E--)nm(this,E,-1),du(this,E,-1);b=this.countCrossings(),b<a&&(a=b,y=Al(this))}for(iu(this,y),x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)nm(this,E,0),du(this,E,0);for(b=this.countCrossings(),b<a&&(a=b,y=Al(this)),E=this.Ia;0<=E;E--)nm(this,E,0),du(this,E,0);b=this.countCrossings(),b<a&&(a=b,y=Al(this))}iu(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=du(this,E,-1)||z;for(b=this.countCrossings(),b>=a?iu(this,y):(a=b,y=Al(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=du(this,E,1)||z;for(b=this.countCrossings(),b>=a?iu(this,y):(a=b,y=Al(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=du(this,E,1)||z;for(b>=a?iu(this,y):(a=b,y=Al(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=du(this,E,-1)||z;for(b>=a?iu(this,y):(a=b,y=Al(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=du(this,E,0)||z;for(b>=a?iu(this,y):(a=b,y=Al(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=du(this,E,0)||z;b>=a?iu(this,y):(a=b,y=Al(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=du(this,E,-1)||z;for(b=this.countCrossings(),b>=a?iu(this,y):(a=b,y=Al(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=du(this,E,1)||z;for(b=this.countCrossings(),b>=a?iu(this,y):(a=b,y=Al(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=du(this,E,1)||z;for(b>=a?iu(this,y):(a=b,y=Al(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=du(this,E,-1)||z;for(b>=a?iu(this,y):(a=b,y=Al(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=du(this,E,0)||z;for(b>=a?iu(this,y):(a=b,y=Al(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=du(this,E,0)||z;b>=a?iu(this,y):(a=b,y=Al(this))}}iu(this,y)};function nm(a,y,x){var E=dd(a,y),b=a.tc[y],z=W1(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 du(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,Et=0,Tt=E[z].column,Dt=E[z+1].column,Xt=a.nodeMinColumnSpace(E[z],!0),jt=a.nodeMinColumnSpace(E[z],!1),ie=a.nodeMinColumnSpace(E[z+1],!0),le=a.nodeMinColumnSpace(E[z+1],!1);Xt=Tt-Xt+ie,jt=Dt-jt+le;var fe=E[z].sourceEdges.iterator;for(fe.reset();fe.next();)if(ie=fe.value,le=ie.fromVertex,ie.valid&&le.layer===y){for(ie=0;E[ie]!==le;)ie++;ie<z&&(yt+=2*(z-ie),Et+=2*(z+1-ie)),ie===z+1&&(yt+=1),ie>z+1&&(yt+=4*(ie-z),Et+=4*(ie-(z+1)))}for(fe=E[z].destinationEdges.iterator,fe.reset();fe.next();)if(ie=fe.value,le=ie.toVertex,ie.valid&&le.layer===y){for(ie=0;E[ie]!==le;)ie++;ie===z+1&&(Et+=1)}for(fe=E[z+1].sourceEdges.iterator,fe.reset();fe.next();)if(ie=fe.value,le=ie.fromVertex,ie.valid&&le.layer===y){for(ie=0;E[ie]!==le;)ie++;ie<z&&(yt+=2*(z+1-ie),Et+=2*(z-ie)),ie===z&&(Et+=1),ie>z+1&&(yt+=4*(ie-(z+1)),Et+=4*(ie-z))}for(fe=E[z+1].destinationEdges.iterator,fe.reset();fe.next();)if(ie=fe.value,le=ie.toVertex,ie.valid&&le.layer===y){for(ie=0;E[ie]!==le;)ie++;ie===z&&(yt+=1)}ie=le=0,fe=tt[E[z].index];var ye=rt[E[z].index],_e=tt[E[z+1].index],Xn=rt[E[z+1].index];fe!==-1&&(le+=Math.abs(fe-Tt),ie+=Math.abs(fe-jt)),ye!==-1&&(le+=Math.abs(ye-Tt),ie+=Math.abs(ye-jt)),_e!==-1&&(le+=Math.abs(_e-Dt),ie+=Math.abs(_e-Xt)),Xn!==-1&&(le+=Math.abs(Xn-Dt),ie+=Math.abs(Xn-Xt)),(Et<yt-.5||Et===yt&&ft<ut-.5||Et===yt&&ft===ut&&ie<le-.5)&&(lt=ot=!0,E[z].column=jt,E[z+1].column=Xt,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}Ao.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;Ww(a,y,x);)E=!0;return E}function Ww(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),Et=0;0>E-1||ut-b[E-1].column-1>ft+a.nodeMinColumnSpace(b[E-1],!1)?Et=ut-1:Et=ut,ft=E+1>=z||b[E+1].column-ut-1>yt+a.nodeMinColumnSpace(b[E+1],!0)?ut+1:ut;var Tt=yt=0,Dt=0;if(0>=x)for(var Xt=b[E].sourceEdges.iterator;Xt.next();){var jt=Xt.value,ie=jt.fromVertex;if(jt.valid&&ie.layer!==y){var le=kv(jt),fe=jt.portFromColOffset;jt=jt.portToColOffset,ie=ie.column,yt+=(Math.abs(ut+jt-(ie+fe))+1)*le,Tt+=(Math.abs(Et+jt-(ie+fe))+1)*le,Dt+=(Math.abs(ft+jt-(ie+fe))+1)*le}}if(0<=x)for(Xt=b[E].destinationEdges.iterator;Xt.next();)jt=Xt.value,ie=jt.toVertex,jt.valid&&ie.layer!==y&&(le=kv(jt),fe=jt.portFromColOffset,jt=jt.portToColOffset,ie=ie.column,yt+=(Math.abs(ut+fe-(ie+jt))+1)*le,Tt+=(Math.abs(Et+fe-(ie+jt))+1)*le,Dt+=(Math.abs(ft+fe-(ie+jt))+1)*le);jt=fe=le=0,Xt=tt[b[E].index],ie=rt[b[E].index],Xt!==-1&&(le+=Math.abs(Xt-ut),fe+=Math.abs(Xt-Et),jt+=Math.abs(Xt-ft)),ie!==-1&&(le+=Math.abs(ie-ut),fe+=Math.abs(ie-Et),jt+=Math.abs(ie-ft)),Tt<yt||Tt===yt&&fe<le?(lt=ot=!0,b[E].column=Et):(Dt<yt||Dt===yt&&jt<le)&&(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=W1(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 Zw(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(;Zw(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=Al(a),z=em(a);for(E=z+1;z<E;){E=z,rw(a,x,1);var tt=em(a);tt>z?iu(a,b):tt<z&&(z=tt,b=Al(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(b=Al(a),z=em(a),E=z+1;z<E;)E=z,rw(a,x,-1),tt=em(a),tt>z?iu(a,b):tt<z&&(z=tt,b=Al(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=xn(),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 Be,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=Vi(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)),Nn(y),a.u(z,tt,rt,ot),a.network.vertexes.each(function(Et){var Tt=xn();lt&&Tt.push(z.get(Et)),ut&&Tt.push(tt.get(Et)),ft&&Tt.push(rt.get(Et)),yt&&Tt.push(ot.get(Et)),Tt.sort(function(Xt,jt){return Xt-jt});var Dt=Tt.length;Dt=(Tt[Math.floor((Dt-1)/2)]+Tt[Math.ceil((Dt-1)/2)])/2,Nn(Tt),Et.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=Vi(lt.sourceEdgesArrayAccess),Et=yt.next();!Et.done;Et=yt.next())Et=Et.value,Et.valid&&ft.push(Et);lt.bo=ft}for(lt=Vi(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}}}Ao.prototype.verticalAlignment=function(a,y,x){qw(a),a=Vi(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=Vi(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=Vi(y),tt=z.next();!tt.done;tt=z.next()){var rt=Vi(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=Vi(y),rt=z.next();!rt.done;rt=z.next()){rt=Vi(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,Et=tt?ft.width:ft.height;if(x){var Tt=um(ut,ft),Dt=Tt.portFromPos,Xt=Tt.portToPos;Tt.link!==null&&(ut.node&&ut.node!==Tt.link.fromNode&&(Dt=tt?ut.focusX:ut.focusY),ft.node&&ft.node!==Tt.link.toNode&&(Xt=tt?ft.focusX:ft.focusY))}else Tt=um(ft,ut),Dt=Tt.portToPos,Xt=Tt.portFromPos,Tt.link!==null&&(ut.node&&ut.node!==Tt.link.toNode&&(Dt=tt?ut.focusX:ut.focusY),ft.node&&ft.node!==Tt.link.fromNode&&(Xt=tt?ft.focusX:ft.focusY));yt=E?ut.qg+(yt-Dt)-(Et-Xt):ut.qg+Dt-Xt,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=Vi(y),tt=x.next();!tt.done;tt=x.next())for(z=Vi(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 Qe,y=Vi(y),tt=y.next();!tt.done;tt=y.next())for(x=Vi(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&&he("Could not determine previous vertex in layer"),y[x][a-1]}Ao.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var E=xn(),b=xn(),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)));Nn(E),Nn(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}Ao.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?Gs:js:a.K===90?y?js:Gs:a.K===180?y?es:hs:y?hs:es}Ao.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 It(x&&E?0:z,x&&!E?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},Ao.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 Oe(0,0,x,Math.abs(this.Ta[0]))):y.push(new Oe(0,this.Ta[E-1],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===90?E===0?y.push(new Oe(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new Oe(0,this.Ta[E],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===180?E===0?y.push(new Oe(0,0,Math.abs(this.Ta[0]),x)):y.push(new Oe(this.Ta[E-1],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x)):E===0?y.push(new Oe(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new Oe(this.Ta[E],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x));this.commitLayers(y,this.Rf)},Ao.prototype.commitLayers=function(){},Ao.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===Wl&&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&<===Ar&&(E=!0),rt!==null&&ot===Ar&&(x=!0),(E||x)&&(ot=null,E&&(ot=y.getLinkPointFromPoint(b,tt,tt.ga(Cr),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(Cr),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,Et=!1,Tt=this.ie,Dt=y.firstPickIndex+1;if(y.isOrthogonal){Et=!0;var Xt=y.pointsCount;4<Xt&&y.points.removeRange(2,Xt-3)}else if(y.curve===Wl)yt=!0,Xt=y.pointsCount,4<Xt&&y.points.removeRange(2,Xt-3),Xt===4&&(Dt=2);else{Xt=y.pointsCount;var jt=lt===Ar,ie=ot===Ar;2<Xt&&jt&&ie?y.points.removeRange(1,Xt-2):3<Xt&&jt&&!ie?y.points.removeRange(1,Xt-3):3<Xt&&!jt&&ie?y.points.removeRange(2,Xt-2):4<Xt&&!jt&&!ie&&y.points.removeRange(2,Xt-3)}if(x.rev){for(;ft!==null&&ut!==ft;){var le=Xt=null;for(jt=ft.sourceEdges.iterator;jt.next()&&(ie=jt.value,ie.link!==x.link||(Xt=ie.fromVertex,le=ie.toVertex,Xt.node!==null)););if(Xt===null)break;if(Xt!==ut){jt=y.i(Dt-1).x,ie=y.i(Dt-1).y;var fe=Xt.centerX,ye=Xt.centerY;if(Et)this.K===180||this.K===0?Dt===y.firstPickIndex+1?(y.m(Dt++,jt,ie),y.m(Dt++,jt,ye)):(le!==null?le.centerY:ie)!==ye&&(le=this.Ta[Xt.layer-1]+this.Rf.x,y.m(Dt++,le,ie),y.m(Dt++,le,ye)):Dt===y.firstPickIndex+1?(y.m(Dt++,jt,ie),y.m(Dt++,fe,ie)):(le!==null?le.centerX:jt)!==fe&&(le=this.Ta[Xt.layer-1]+this.Rf.y,y.m(Dt++,jt,le),y.m(Dt++,fe,le));else if(Dt===y.firstPickIndex+1){le=Math.max(10,this.he[ft.layer]);var _e=Math.max(10,this.Ld[ft.layer]);if(yt)this.K===180?fe<=ft.bounds.x?(ft=ft.bounds.x,y.m(Dt++,ft-le,ye),y.m(Dt++,ft,ye),y.m(Dt++,ft+_e,ye)):(y.m(Dt++,fe-le,ye),y.m(Dt++,fe,ye),y.m(Dt++,fe+_e,ye)):this.K===90?ye>=ft.bounds.bottom?(ft=ft.bounds.y+ft.bounds.height,y.m(Dt++,fe,ft+_e),y.m(Dt++,fe,ft),y.m(Dt++,fe,ft-le)):(y.m(Dt++,fe,ye+_e),y.m(Dt++,fe,ye),y.m(Dt++,fe,ye-le)):this.K===270?ye<=ft.bounds.y?(ft=ft.bounds.y,y.m(Dt++,fe,ft-le),y.m(Dt++,fe,ft),y.m(Dt++,fe,ft+_e)):(y.m(Dt++,fe,ye-le),y.m(Dt++,fe,ye),y.m(Dt++,fe,ye+_e)):this.K===0&&(fe>=ft.bounds.right?(ft=ft.bounds.x+ft.bounds.width,y.m(Dt++,ft+_e,ye),y.m(Dt++,ft,ye),y.m(Dt++,ft-le,ye)):(y.m(Dt++,fe+_e,ye),y.m(Dt++,fe,ye),y.m(Dt++,fe-le,ye)));else{y.m(Dt++,jt,ie);var Xn=0;this.K===180||this.K===0?((this.K===180?fe>=ft.bounds.right:fe<=ft.bounds.x)&&(Xn=(this.K===0?-le:_e)/2),y.m(Dt++,jt+Xn,ye)):((this.K===270?ye>=ft.bounds.bottom:ye<=ft.bounds.y)&&(Xn=(this.K===90?-le:_e)/2),y.m(Dt++,fe,ie+Xn)),y.m(Dt++,fe,ye)}}else le=Math.max(10,this.he[Xt.layer]),_e=Math.max(10,this.Ld[Xt.layer]),yt?this.K===180?(y.m(Dt++,fe-le-Tt,ye),y.m(Dt++,Math.min(fe-le+Tt/2,fe),ye),y.m(Dt++,fe,ye),y.m(Dt++,fe,ye),y.m(Dt++,Math.max(fe+_e-Tt/2,fe),ye),y.m(Dt++,fe+_e+Tt,ye)):this.K===90?(y.m(Dt++,fe,ye+_e+Tt),y.m(Dt++,fe,Math.max(ye+_e-Tt/2,ye)),y.m(Dt++,fe,ye),y.m(Dt++,fe,ye),y.m(Dt++,fe,Math.min(ye-le+Tt/2,ye)),y.m(Dt++,fe,ye-le-Tt)):this.K===270?(y.m(Dt++,fe,ye-le-Tt),y.m(Dt++,fe,Math.min(ye-le+Tt/2,ye)),y.m(Dt++,fe,ye),y.m(Dt++,fe,ye),y.m(Dt++,fe,Math.max(ye+_e-Tt/2,ye)),y.m(Dt++,fe,ye+_e+Tt)):(y.m(Dt++,fe+_e+Tt,ye),y.m(Dt++,Math.max(fe+_e-Tt/2,fe),ye),y.m(Dt++,fe,ye),y.m(Dt++,fe,ye),y.m(Dt++,Math.min(fe-le+Tt/2,fe),ye),y.m(Dt++,fe-le-Tt,ye)):y.m(Dt++,fe,ye)}ft=Xt}(rt===null||lt!==Ar||Et)&&(jt=y.i(Dt-1).x,ie=y.i(Dt-1).y,fe=y.i(Dt).x,ye=y.i(Dt).y,Et?(Tt=this.Ld[ut.layer],this.K===180||this.K===0?(Et=ie,Et>=ut.bounds.y&&Et<=ut.bounds.bottom&&(this.K===180?fe>=ut.bounds.x:fe<=ut.bounds.right)&&(ft=ut.centerX+(this.K===180?-Tt:Tt),Et<ut.bounds.y+ut.bounds.height/2?Et=ut.bounds.y-this.kc/2:Et=ut.bounds.bottom+this.kc/2,y.m(Dt++,ft,ie),y.m(Dt++,ft,Et)),y.m(Dt++,fe,Et)):(Et=jt,Et>=ut.bounds.x&&Et<=ut.bounds.right&&(this.K===270?ye>=ut.bounds.y:ye<=ut.bounds.bottom)&&(ft=ut.centerY+(this.K===270?-Tt:Tt),Et<ut.bounds.x+ut.bounds.width/2?Et=ut.bounds.x-this.kc/2:Et=ut.bounds.right+this.kc/2,y.m(Dt++,jt,ft),y.m(Dt++,Et,ft)),y.m(Dt++,Et,ye)),y.m(Dt++,fe,ye)):yt?(le=Math.max(10,this.he[ut.layer]),_e=Math.max(10,this.Ld[ut.layer]),this.K===180&&fe>=ut.bounds.x?(ft=ut.bounds.x+ut.bounds.width,y.L(Dt-2,ft,ie),y.L(Dt-1,ft+_e,ie)):this.K===90&&ye<=ut.bounds.bottom?(ft=ut.bounds.y,y.L(Dt-2,jt,ft),y.L(Dt-1,jt,ft-le)):this.K===270&&ye>=ut.bounds.y?(ft=ut.bounds.y+ut.bounds.height,y.L(Dt-2,jt,ft),y.L(Dt-1,jt,ft+_e)):this.K===0&&fe<=ut.bounds.right&&(ft=ut.bounds.x,y.L(Dt-2,ft,ie),y.L(Dt-1,ft-le,ie))):(le=Math.max(10,this.he[ut.layer]),_e=Math.max(10,this.Ld[ut.layer]),Et=0,this.K===180||this.K===0?((this.K===180?fe<=ut.bounds.x:fe>=ut.bounds.right)&&(Et=(this.K===0?_e:-le)/2),y.m(Dt++,fe+Et,ie)):((this.K===270?ye<=ut.bounds.y:ye>=ut.bounds.bottom)&&(Et=(this.K===90?_e:-le)/2),y.m(Dt++,jt,ye+Et)),y.m(Dt++,fe,ye)))}else{for(;ut!==null&&ut!==ft;){for(le=Xt=null,ut=ut.destinationEdges.iterator;ut.next()&&(jt=ut.value,jt.link!==x.link||(Xt=jt.toVertex,le=jt.fromVertex,le.node!==null&&(le=null),Xt.node!==null)););if(Xt===null)break;Xt!==ft&&(jt=y.i(Dt-1).x,ie=y.i(Dt-1).y,fe=Xt.centerX,ye=Xt.centerY,Et?this.K===180||this.K===0?(le!==null?le.centerY:ie)!==ye&&(le=this.Ta[Xt.layer]+this.Rf.x,Dt===y.firstPickIndex+1&&(le=this.K===0?Math.max(le,jt):Math.min(le,jt)),y.m(Dt++,le,ie),y.m(Dt++,le,ye)):(le!==null?le.centerX:jt)!==fe&&(le=this.Ta[Xt.layer]+this.Rf.y,Dt===y.firstPickIndex+1&&(le=this.K===90?Math.max(le,ie):Math.min(le,ie)),y.m(Dt++,jt,le),y.m(Dt++,fe,le)):(le=Math.max(10,this.he[Xt.layer]),_e=Math.max(10,this.Ld[Xt.layer]),yt?this.K===180?(y.m(Dt++,fe+_e+Tt,ye),y.m(Dt++,Math.max(fe+_e-Tt/2,fe),ye),y.m(Dt++,fe,ye),y.m(Dt++,fe,ye),y.m(Dt++,Math.min(fe-le+Tt/2,fe),ye),y.m(Dt++,fe-le-Tt,ye)):this.K===90?(y.m(Dt++,fe,ye-le-Tt),y.m(Dt++,fe,Math.min(ye-le+Tt/2,ye)),y.m(Dt++,fe,ye),y.m(Dt++,fe,ye),y.m(Dt++,fe,Math.max(ye+_e-Tt/2,ye)),y.m(Dt++,fe,ye+_e+Tt)):this.K===270?(y.m(Dt++,fe,ye+_e+Tt),y.m(Dt++,fe,Math.max(ye+_e-Tt/2,ye)),y.m(Dt++,fe,ye),y.m(Dt++,fe,ye),y.m(Dt++,fe,Math.min(ye-le+Tt/2,ye)),y.m(Dt++,fe,ye-le-Tt)):(y.m(Dt++,fe-le-Tt,ye),y.m(Dt++,Math.min(fe-le+Tt/2,fe),ye),y.m(Dt++,fe,ye),y.m(Dt++,fe,ye),y.m(Dt++,Math.max(fe+_e-Tt/2,fe),ye),y.m(Dt++,fe+_e+Tt,ye)):this.K===180?(y.m(Dt++,fe+_e,ye),y.m(Dt++,fe-le,ye)):this.K===90?(y.m(Dt++,fe,ye-le),y.m(Dt++,fe,ye+_e)):this.K===270?(y.m(Dt++,fe,ye+_e),y.m(Dt++,fe,ye-le)):(y.m(Dt++,fe-le,ye),y.m(Dt++,fe+_e,ye)))),ut=Xt}Et&&(jt=y.i(Dt-1).x,ie=y.i(Dt-1).y,fe=y.i(Dt).x,ye=y.i(Dt).y,this.K===180||this.K===0?ie!==ye&&(le=this.K===0?Math.min(Math.max((fe+jt)/2,this.Ta[ft.layer]+this.Rf.x),fe):Math.max(Math.min((fe+jt)/2,this.Ta[ft.layer]+this.Rf.x),fe),y.m(Dt++,le,ie),y.m(Dt++,le,ye)):jt!==fe&&(le=this.K===90?Math.min(Math.max((ye+ie)/2,this.Ta[ft.layer]+this.Rf.y),ye):Math.max(Math.min((ye+ie)/2,this.Ta[ft.layer]+this.Rf.y),ye),y.m(Dt++,jt,le),y.m(Dt++,fe,le)))}E!==null&&yt&&4<=y.pointsCount&&(tt!==null&&(tt=lt===Ar?y.getLinkPointFromPoint(b,tt,tt.ga(Cr),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(Cr),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()},Ao.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new ee,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 Et=yt.link;z=Et.i(yt.index),tt=Et.i(yt.index+1);var Tt=this.linkSpacing*(ut-(lt-1)/2);y++,Et.uh(),Et.L(yt.index,z.x,z.y+Tt),Et.L(yt.index+1,tt.x,tt.y+Tt),Et.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),Et=yt.link,z=Et.i(yt.index),tt=Et.i(yt.index+1),Tt=this.linkSpacing*(ut-(lt-1)/2),y++,Et.uh(),Et.L(yt.index,z.x+Tt,z.y),Et.L(yt.index+1,tt.x+Tt,tt.y),Et.zf()}z=b}a=E}}}},bt=Ao.prototype,bt.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},bt.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},bt.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},bt.B=function(a,y){return a-=y,-1<a&&1>a},bt.zi=function(a,y,x,E){var b=a.length,z=E-x;if(!(1>=z))if((0>x||x>=b-1)&&he("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}Ue.Object.defineProperties(Ao.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()):he("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 Ze(Ao,"CycleDepthFirst",0),Uv=new Ze(Ao,"CycleGreedy",1),Qp=new Ze(Ao,"CycleFromLayers",2),sm=new Ze(Ao,"LayerOptimalLinkLength",0),Qv=new Ze(Ao,"LayerLongestPathSink",1),Ov=new Ze(Ao,"LayerLongestPathSource",2),am=new Ze(Ao,"InitDepthFirstOut",0),Hv=new Ze(Ao,"InitDepthFirstIn",1),Rv=new Ze(Ao,"InitNaive",2),_v=new Ze(Ao,"AggressiveNone",0),lm=new Ze(Ao,"AggressiveLess",1),Kv=new Ze(Ao,"AggressiveMore",2),tx=8;Ao.className="LayeredDigraphLayout",Ao.CycleDepthFirst=om,Ao.CycleGreedy=Uv,Ao.CycleFromLayers=Qp,Ao.LayerOptimalLinkLength=sm,Ao.LayerLongestPathSink=Qv,Ao.LayerLongestPathSource=Ov,Ao.InitDepthFirstOut=am,Ao.InitDepthFirstIn=Hv,Ao.InitNaive=Rv,Ao.AggressiveNone=_v,Ao.AggressiveLess=lm,Ao.AggressiveMore=Kv,Ao.PackNone=0,Ao.PackExpand=1,Ao.PackStraighten=2,Ao.PackMedian=4,Ao.PackAll=15,Ao.AlignNone=0,Ao.AlignUpperLeft=1,Ao.AlignUpperRight=2,Ao.AlignLowerLeft=4,Ao.AlignLowerRight=8,Ao.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){Fo.call(this,a)}He(Og,Fo),Og.prototype.createVertex=function(){return new ru(this)},Og.prototype.createEdge=function(){return new Op(this)},Og.className="LayeredDigraphNetwork";function ru(a){Ks.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}He(ru,Ks);function aw(a,y){return a.index-y.index}function um(a,y){if(!a.$n){for(var x=[],E=Vi(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=Vi(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;he("Unable to find destination edge to given vertex")}function Gv(a){if(!a.co){for(var y=[],x=Vi(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=Vi(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}ru.prototype.Cl=function(a){Ks.prototype.Cl.call(this,a),this.bo=this.co=null},ru.prototype.Kl=function(a){Ks.prototype.Kl.call(this,a),this.bo=this.co=null},ru.prototype.zl=function(a){Ks.prototype.zl.call(this,a),this.$n=this.ao=null},ru.prototype.Jl=function(a){Ks.prototype.Jl.call(this,a),this.$n=this.ao=null},Ue.Object.defineProperties(ru.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)}}}),ru.prototype.deleteDestinationEdge=ru.prototype.Jl,ru.prototype.addDestinationEdge=ru.prototype.zl,ru.prototype.deleteSourceEdge=ru.prototype.Kl,ru.prototype.addSourceEdge=ru.prototype.Cl,ru.className="LayeredDigraphVertex";function Op(a){Nl.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}He(Op,Nl),Ue.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 Mr(a){Go.call(this),this.Ub=new Be,this.Wn=dm,this.ud=oh,this.vo=gm,this.Bq=ty,this.$v=[],this.td=!0,this.Rb=pm,this.$d=new cn(10,10).freeze();var y=new Jf(this);this.W=new fu(y),this.Y=new fu(y),this.ru=[],a&&Object.assign(this,a)}He(Mr,Go),Mr.prototype.cloneProtected=function(a){Go.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)},Mr.prototype.qb=function(a){a.classType===Mr?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:he("Unknown enum value: "+a):Go.prototype.qb.call(this,a)},Mr.prototype.createNetwork=function(){return new Jf(this)},Mr.prototype.makeNetwork=function(a){function y(E){if(E instanceof ti)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof _n){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 Re?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof hr?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Mr.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 Re&&(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 Be,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof ti?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof fu&&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 fu&&Aw(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof fu&&hw(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof fu&&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 fu&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new Be,this.isValidLayout=!0};function nx(a){var y=new Be;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Mr.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:he("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:he("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 ee,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 ee,E=y.sourceVertexes;E.next();)b=E.value,uw(a,y,b)&&x.add(b);0<x.count&&(y.children=x.Fa())}break;default:he("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}Mr.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}}Mr.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])}}Mr.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])}}Mr.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:he("Unhandled sorting value "+a.sorting.toString())}},Mr.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Mr.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=Oe.allocAt(0,0,a.bounds.width+z,a.bounds.height+tt),a.bounds=b,Oe.free(b))};function pd(a){return a===Fc||a===lh||a===Ec||a===kh}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}Mr.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=It.alloc(),yt=0;yt<ut;yt++){var Et=lt[yt],Tt=Et.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-Tt.width,a.bounds.y+ot),Et.move(ft),Et=Et.Sd();Et.next();){var Dt=Et.value;Dt.fromSpot=es,Dt.toSpot=hs}else for(ft.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+ot),Et.move(ft),Et=Et.Sd();Et.next();)Dt=Et.value,Dt.fromSpot=hs,Dt.toSpot=es;else if(0<=a.commentMargin)for(ft.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+ot),Et.move(ft),Et=Et.Sd();Et.next();)Dt=Et.value,Dt.fromSpot=hs,Dt.toSpot=es;else for(ft.h(a.bounds.x+a.commentMargin-Tt.width,a.bounds.y+ot),Et.move(ft),Et=Et.Sd();Et.next();)Dt=Et.value,Dt.fromSpot=es,Dt.toSpot=hs;ot=0<=a.commentSpacing?ot+(Tt.height+a.commentSpacing):ot+(a.commentSpacing-Tt.height)}else{if(135<b&&!z||!x&&rt)if(0<=a.commentMargin)for(ft.h(a.bounds.x+ot,a.bounds.y-a.commentMargin-Tt.height),Et.move(ft),Et=Et.Sd();Et.next();)Dt=Et.value,Dt.fromSpot=Gs,Dt.toSpot=js;else for(ft.h(a.bounds.x+ot,a.bounds.y+2*a.focus.y-a.commentMargin),Et.move(ft),Et=Et.Sd();Et.next();)Dt=Et.value,Dt.fromSpot=js,Dt.toSpot=Gs;else if(0<=a.commentMargin)for(ft.h(a.bounds.x+ot,a.bounds.y+2*a.focus.y+a.commentMargin),Et.move(ft),Et=Et.Sd();Et.next();)Dt=Et.value,Dt.fromSpot=js,Dt.toSpot=Gs;else for(ft.h(a.bounds.x+ot,a.bounds.y+a.commentMargin-Tt.height),Et.move(ft),Et=Et.Sd();Et.next();)Dt=Et.value,Dt.fromSpot=Gs,Dt.toSpot=js;ot=0<=a.commentSpacing?ot+(Tt.width+a.commentSpacing):ot+(a.commentSpacing-Tt.width)}}if(It.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)}},Mr.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=Hu(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,Et=this.computeNodeIndent(a),Tt=a.rowSpacing,Dt=0;(E||lt||a.hm||a.im&&a.maxGenerationCount===1)&&(Dt=Math.max(0,a.rowIndent)),E=a.width;var Xt=a.height,jt=0,ie=0,le=0,fe=null,ye=null,_e=0,Xn=0,mi=0,hi=0,Rn=0,mn=0,ur=0,qi=0;if(ut&&!Hp(ot)&&135<b&&tt.reverse(),Hp(ot))if(1<rt)for(var Jr=0;Jr<rt;Jr++)Jr%2===0&&Jr!==rt-1&&(qi=Math.max(qi,y?tt[Jr].Da.width:tt[Jr].Da.height));else rt===1&&(qi=y?tt[0].Da.width:tt[0].Da.height);if(ut){switch(ot){case Fc:ie=135>b?fw(this,a,tt,qi,jt,ie):gw(this,a,tt,qi,jt,ie),qi=ie.x,jt=ie.width,ie=ie.height;break;case Ec:for(fe=0;fe<rt;fe++)ye=tt[fe],ft=ye.Da,le=mn===0?0:Tt,y?(ye.S.h(z-ft.width,hi+le),jt=Math.max(jt,ft.width),ie=Math.max(ie,hi+le+ft.height),hi+=le+ft.height):(ye.S.h(mi+le,z-ft.height),jt=Math.max(jt,mi+le+ft.width),ie=Math.max(ie,ft.height),mi+=le+ft.width),mn++;break;case kh:for(fe=0;fe<rt;fe++)ye=tt[fe],z=ye.Da,ft=mn===0?0:Tt,y?(ye.S.h(yt/2+a.focus.x,hi+ft),jt=Math.max(jt,z.width),ie=Math.max(ie,hi+ft+z.height),hi+=ft+z.height):(ye.S.h(mi+ft,yt/2+a.focus.y),jt=Math.max(jt,mi+ft+z.width),ie=Math.max(ie,z.height),mi+=ft+z.width),mn++}fe=xl(this,2),ye=xl(this,2),y?(fe[0].h(0,0),fe[1].h(0,ie),ye[0].h(jt,0)):(fe[0].h(0,0),fe[1].h(jt,0),ye[0].h(0,ie)),ye[1].h(jt,ie)}else for(Jr=0;Jr<rt;Jr++){var So=tt[Jr],Zs=So.Da;if(y){0<ft&&0<mn&&mi+yt+Zs.width>ft&&(mi<z&&rf(a,ot,z-mi,0,ur,Jr-1),Rn++,mn=0,ur=Jr,le=ie,mi=0,hi=135<b?-ie-Tt:ie+Tt),hm(this,So,0,hi);var $s=0;if(mn===0)fe=So.Yo,ye=So.kp,_e=Zs.width,Xn=Zs.height,(fe===null||ye===null||b!==Hu(So))&&(fe=xl(this,2),ye=xl(this,2),fe[0].h(0,0),fe[1].h(0,Xn),ye[0].h(_e,0),ye[1].h(_e,Xn));else{var Oa=xn();Xn=pw(this,a,So,fe,ye,_e,Xn,Oa),$s=Xn.x,fe=Oa[0],ye=Oa[1],_e=Xn.width,Xn=Xn.height,Nn(Oa),mi<Zs.width&&0>$s&&(Zf(a,-$s,0,ur,Jr-1),cm(fe,-$s,0),cm(ye,-$s,0),$s=0)}So.S.h($s,hi),jt=Math.max(jt,_e),ie=Math.max(ie,le+(Rn===0?0:Tt)+Zs.height),mi=_e}else 0<ft&&0<mn&&hi+yt+Zs.height>ft&&(hi<z&&rf(a,ot,0,z-hi,ur,Jr-1),Rn++,mn=0,ur=Jr,le=jt,hi=0,mi=135<b?-jt-Tt:jt+Tt),hm(this,So,mi,0),$s=0,mn===0?(fe=So.Yo,ye=So.kp,_e=Zs.width,Xn=Zs.height,(fe===null||ye===null||b!==Hu(So))&&(fe=xl(this,2),ye=xl(this,2),fe[0].h(0,0),fe[1].h(_e,0),ye[0].h(0,Xn),ye[1].h(_e,Xn))):(Oa=xn(),Xn=pw(this,a,So,fe,ye,_e,Xn,Oa),$s=Xn.x,fe=Oa[0],ye=Oa[1],_e=Xn.width,Xn=Xn.height,Nn(Oa),hi<Zs.height&&0>$s&&(Zf(a,0,-$s,ur,Jr-1),cm(fe,0,-$s),cm(ye,0,-$s),$s=0)),So.S.h(mi,$s),ie=Math.max(ie,Xn),jt=Math.max(jt,le+(Rn===0?0:Tt)+Zs.width),hi=Xn;mn++}switch(0<Rn&&(y?(ie+=Math.max(0,x),mi<jt&&rf(a,ot,jt-mi,0,ur,rt-1),0<Dt&&(lt||Zf(a,Dt,0,0,rt-1),jt+=Dt)):(jt+=Math.max(0,x),hi<ie&&rf(a,ot,0,ie-hi,ur,rt-1),0<Dt&&(lt||Zf(a,0,Dt,0,rt-1),ie+=Dt))),Dt=lt=0,ot){case Rg:y?lt+=jt/2-a.focus.x-Et/2:Dt+=ie/2-a.focus.y-Et/2;break;case Xf:0<Rn?y?lt+=jt/2-a.focus.x-Et/2:Dt+=ie/2-a.focus.y-Et/2:y?(qi=tt[0].S.x+tt[0].la.x,lt+=qi+(tt[rt-1].S.x+tt[rt-1].la.x+2*tt[rt-1].focus.x-qi)/2-a.focus.x-Et/2):(qi=tt[0].S.y+tt[0].la.y,Dt+=qi+(tt[rt-1].S.y+tt[rt-1].la.y+2*tt[rt-1].focus.y-qi)/2-a.focus.y-Et/2);break;case sh:y?(lt-=Et,jt+=Et):(Dt-=Et,ie+=Et);break;case ah:y?(lt+=jt-a.width+Et,jt+=Et):(Dt+=ie-a.height+Et,ie+=Et);break;case Fc:y?1<rt?lt+=qi+yt/2-a.focus.x:lt+=tt[0].focus.x-a.focus.x+tt[0].la.x:1<rt?Dt+=qi+yt/2-a.focus.y:Dt+=tt[0].focus.y-a.focus.y+tt[0].la.y;break;case Ec:y?lt+=jt+yt/2-a.focus.x:Dt+=ie+yt/2-a.focus.y;break;case kh:break;default:ie=this.customAlignment(a,lt,Dt,jt,ie),lt=ie[0],Dt=ie[1],jt=ie[2],ie=ie[3]}for(Et=0;Et<rt;Et++)qi=tt[Et],y?qi.S.h(qi.S.x+qi.la.x-lt,qi.S.y+(135<b?(ut?-ie:-qi.Da.height)+qi.la.y-x:Xt+x+qi.la.y)):qi.S.h(qi.S.x+(135<b?(ut?-jt:-qi.Da.width)+qi.la.x-x:E+x+qi.la.x),qi.S.y+qi.la.y-Dt);if(rt=tt=0,ut?y?(jt=Vv(a,jt,lt),0>lt&&(lt=0),135<b&&(Dt+=ie+x),ie+=Xt+x,ot===kh&&(tt+=yt/2+a.focus.x),rt+=Xt+x):(135<b&&(lt+=jt+x),jt+=E+x,ie=Wv(a,ie,Dt),0>Dt&&(Dt=0),ot===kh&&(rt+=yt/2+a.focus.y),tt+=E+x):y?(a.comments===null?E>jt&&(jt=Zv(ot,E-jt,0),tt=jt.x,rt=jt.y,jt=E,lt=0):jt=Vv(a,jt,lt),0>lt&&(tt-=lt,lt=0),135<b&&(Dt+=ie+x),ie=Math.max(Math.max(ie,Xt),ie+Xt+x),rt+=Xt+x):(135<b&&(lt+=jt+x),jt=Math.max(Math.max(jt,E),jt+E+x),a.comments===null?Xt>ie&&(ie=Zv(ot,0,Xt-ie),tt=ie.x,rt=ie.y,ie=Xt,Dt=0):ie=Wv(a,ie,Dt),0>Dt&&(rt-=Dt,Dt=0),tt+=E+x),0<Rn)b=xl(this,4),Rn=xl(this,4),y?(b[2].h(0,Xt+x),b[3].h(b[2].x,ie),Rn[2].h(jt,b[2].y),Rn[3].h(Rn[2].x,b[3].y)):(b[2].h(E+x,0),b[3].h(jt,b[2].y),Rn[2].h(b[2].x,ie),Rn[3].h(b[3].x,Rn[2].y));else{for(b=xl(this,fe.length+2),Rn=xl(this,ye.length+2),ot=0;ot<fe.length;ot++)ut=fe[ot],b[ot+2].h(ut.x+tt,ut.y+rt);for(ot=0;ot<ye.length;ot++)ut=ye[ot],Rn[ot+2].h(ut.x+tt,ut.y+rt)}y?(b[0].h(lt,0),b[1].h(b[0].x,Xt),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])),Rn[0].h(lt+E,0),Rn[1].h(Rn[0].x,Xt),Rn[2].y<Rn[1].y&&(Rn[2].x<Rn[0].x?Rn[2].assign(Rn[1]):Rn[1].assign(Rn[2])),Rn[3].y<Rn[2].y&&(Rn[3].x<Rn[0].x?Rn[3].assign(Rn[2]):Rn[2].assign(Rn[3])),b[2].y-=x/2,Rn[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])),Rn[0].h(0,Dt+Xt),Rn[1].h(E,Rn[0].y),Rn[2].x<Rn[1].x&&(Rn[2].y<Rn[0].y?Rn[2].assign(Rn[1]):Rn[1].assign(Rn[2])),Rn[3].x<Rn[2].x&&(Rn[3].y<Rn[0].y?Rn[3].assign(Rn[2]):Rn[2].assign(Rn[3])),b[2].x-=x/2,Rn[2].x-=x/2),iA(this,fe),iA(this,ye),a.Yo=b,a.kp=Rn,a.la.h(lt,Dt),a.Da.h(jt,ie)}break;default:he("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=Hu(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 Et=y.nodeSpacing,Tt=a.computeNodeIndent(y),Dt=ut||ft?0:Tt/2,Xt=y.rowSpacing,jt=0;(ut||ft||y.hm||y.im&&y.maxGenerationCount===1)&&(jt=Math.max(0,y.rowIndent)),ut=y.width;var ie=y.height,le=0,fe=0,ye=0,_e=0,Xn=0,mi=0,hi=0,Rn=0,mn=0,ur=0;if(rt&&!Hp(lt)&&135<E&&b.reverse(),Hp(lt))if(1<tt)for(var qi=0;qi<tt;qi++){var Jr=b[qi],So=Jr.Da;qi%2===0&&qi!==tt-1?mn=Math.max(mn,(x?So.width:So.height)+a.computeBusNodeSpacing(Jr)-Et):qi%2!==0&&(ur=Math.max(ur,(x?So.width:So.height)+a.computeBusNodeSpacing(Jr)-Et))}else tt===1&&(mn=x?b[0].Da.width:b[0].Da.height);if(rt)switch(lt){case Fc:case lh:fe=135>E?fw(a,y,b,mn,le,fe):gw(a,y,b,mn,le,fe),mn=fe.x,le=fe.width,fe=fe.height;break;case Ec:for(yt=0;yt<tt;yt++)Dt=b[yt],ye=Dt.Da,ur=hi===0?0:Xt,x?(Dt.S.h(z-ye.width,Xn+ur),le=Math.max(le,ye.width),fe=Math.max(fe,Xn+ur+ye.height),Xn+=ur+ye.height):(Dt.S.h(_e+ur,z-ye.height),le=Math.max(le,_e+ur+ye.width),fe=Math.max(fe,ye.height),_e+=ur+ye.width),hi++;break;case kh:for(z=0;z<tt;z++)yt=b[z],Dt=yt.Da,ye=hi===0?0:Xt,x?(yt.S.h(Et/2+y.focus.x,Xn+ye),le=Math.max(le,Dt.width),fe=Math.max(fe,Xn+ye+Dt.height),Xn+=ye+Dt.height):(yt.S.h(_e+ye,Et/2+y.focus.y),le=Math.max(le,_e+ye+Dt.width),fe=Math.max(fe,Dt.height),_e+=ye+Dt.width),hi++}else for(ur=0;ur<tt;ur++)qi=b[ur],Jr=qi.Da,x?(0<yt&&0<hi&&_e+Et+Jr.width>yt&&(_e<z&&rf(y,lt,z-_e,0,Rn,ur-1),mi++,hi=0,Rn=ur,ye=fe,_e=0,Xn=135<E?-fe-Xt:fe+Xt),So=hi===0?Dt:Et,hm(a,qi,0,Xn),qi.S.h(_e+So,Xn),le=Math.max(le,_e+So+Jr.width),fe=Math.max(fe,ye+(mi===0?0:Xt)+Jr.height),_e+=So+Jr.width):(0<yt&&0<hi&&Xn+Et+Jr.height>yt&&(Xn<z&&rf(y,lt,0,z-Xn,Rn,ur-1),mi++,hi=0,Rn=ur,ye=le,Xn=0,_e=135<E?-le-Xt:le+Xt),So=hi===0?Dt:Et,hm(a,qi,_e,0),qi.S.h(_e,Xn+So),fe=Math.max(fe,Xn+So+Jr.height),le=Math.max(le,ye+(mi===0?0:Xt)+Jr.width),Xn+=So+Jr.height),hi++;switch(0<mi&&(x?(fe+=Math.max(0,ot),_e<le&&rf(y,lt,le-_e,0,Rn,tt-1),0<jt&&(ft||Zf(y,jt,0,0,tt-1),le+=jt)):(le+=Math.max(0,ot),Xn<fe&&rf(y,lt,0,fe-Xn,Rn,tt-1),0<jt&&(ft||Zf(y,0,jt,0,tt-1),fe+=jt))),jt=ft=0,lt){case Rg:x?ft+=le/2-y.focus.x-Tt/2:jt+=fe/2-y.focus.y-Tt/2;break;case Xf:0<mi?x?ft+=le/2-y.focus.x-Tt/2:jt+=fe/2-y.focus.y-Tt/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-Tt/2):(a=b[0].S.y+b[0].la.y,jt+=a+(b[tt-1].S.y+b[tt-1].la.y+2*b[tt-1].focus.y-a)/2-y.focus.y-Tt/2);break;case sh:x?(ft-=Tt,le+=Tt):(jt-=Tt,fe+=Tt);break;case ah:x?(ft+=le-y.width+Tt,le+=Tt):(jt+=fe-y.height+Tt,fe+=Tt);break;case Fc:case lh:x?1<tt?ft+=mn+Et/2-y.focus.x:ft+=b[0].focus.x-y.focus.x+b[0].la.x:1<tt?jt+=mn+Et/2-y.focus.y:jt+=b[0].focus.y-y.focus.y+b[0].la.y;break;case Ec:x?ft+=le+Et/2-y.focus.x:jt+=fe+Et/2-y.focus.y;break;case kh:break;default:a=a.customAlignment(y,ft,jt,le,fe),ft=a[0],jt=a[1],le=a[2],fe=a[3]}for(a=0;a<tt;a++)Tt=b[a],x?Tt.S.h(Tt.S.x+Tt.la.x-ft,Tt.S.y+(135<E?(rt?-fe:-Tt.Da.height)+Tt.la.y-ot:ie+ot+Tt.la.y)):Tt.S.h(Tt.S.x+(135<E?(rt?-le:-Tt.Da.width)+Tt.la.x-ot:ut+ot+Tt.la.x),Tt.S.y+Tt.la.y-jt);x?(le=Vv(y,le,ft),0>ft&&(ft=0),135<E&&(jt+=fe+ot),fe=Math.max(Math.max(fe,ie),fe+ie+ot)):(135<E&&(ft+=le+ot),le=Math.max(Math.max(le,ut),le+ut+ot),fe=Wv(y,fe,jt),0>jt&&(jt=0)),y.la.h(ft,jt),y.Da.h(le,fe)}}Mr.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 Oe(E,0,b,z);if(tt===1)return y=x[0],b=y.Da.width,z=y.Da.height,new Oe(E,0,b,z);for(var rt=y.nodeSpacing,ot=y.rowSpacing,lt=Hu(y)===90,ut=0,ft=0,yt=0,Et=0;Et<tt;Et++)if(!(Et%2!==0||1<tt&&Et===tt-1)){var Tt=x[Et],Dt=Tt.Da,Xt=ut===0?0:ot;if(lt){var jt=a.computeBusNodeSpacing(Tt)-rt;Tt.S.h(E-(Dt.width+jt),yt+Xt),b=Math.max(b,Dt.width+jt),z=Math.max(z,yt+Xt+Dt.height),yt+=Xt+Dt.height}else jt=a.computeBusNodeSpacing(Tt)-rt,Tt.S.h(ft+Xt,E-(Dt.height+jt)),z=Math.max(z,Dt.height+jt),b=Math.max(b,ft+Xt+Dt.width),ft+=Xt+Dt.width;ut++}for(ut=0,Tt=ft,Et=yt,lt?(ft=E+rt,yt=0):(ft=0,yt=E+rt),Dt=0;Dt<tt;Dt++)if(Dt%2!==0){Xt=x[Dt],jt=Xt.Da;var ie=ut===0?0:ot;if(lt){var le=a.computeBusNodeSpacing(Xt)-rt;Xt.S.h(ft+le,yt+ie),b=Math.max(b,ft+jt.width+le),z=Math.max(z,yt+ie+jt.height),yt+=ie+jt.height}else le=a.computeBusNodeSpacing(Xt)-rt,Xt.S.h(ft+ie,yt+le),b=Math.max(b,ft+ie+jt.width),z=Math.max(z,yt+jt.height+le),ft+=ie+jt.width;ut++}return 1<tt&&tt%2===1&&(x=x[tt-1],tt=x.Da,a=a.computeBusLastRowSpacing(x,lt?Math.max(Math.abs(Et),Math.abs(yt)):Math.max(Math.abs(Tt),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(Et,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(Tt,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 Oe(E,0,b,z)}function gw(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new Oe(E,0,b,z);if(tt===1)return x=x[0],b=x.Da.width,z=x.Da.height,new Oe(E,0,b,z);for(var rt=y.nodeSpacing,ot=y.rowSpacing,lt=Hu(y)===270,ut=0,ft=0,yt=0,Et=0;Et<tt;Et++)if(!(Et%2!==0||1<tt&&Et===tt-1)){var Tt=x[Et],Dt=Tt.Da,Xt=ut===0?0:ot;if(lt){var jt=a.computeBusNodeSpacing(Tt)-rt;yt-=Xt+Dt.height,Tt.S.h(E-(Dt.width+jt),yt),b=Math.max(b,Dt.width+jt),z=Math.max(z,Math.abs(yt))}else jt=a.computeBusNodeSpacing(Tt)-rt,ft-=Xt+Dt.width,Tt.S.h(ft,E-(Dt.height+jt)),z=Math.max(z,Dt.height+jt),b=Math.max(b,Math.abs(ft));ut++}for(ut=0,Tt=ft,Et=yt,lt?(ft=E+rt,yt=0):(ft=0,yt=E+rt),Dt=0;Dt<tt;Dt++)if(Dt%2!==0){Xt=x[Dt],jt=Xt.Da;var ie=ut===0?0:ot;if(lt){var le=a.computeBusNodeSpacing(Xt)-rt;yt-=ie+jt.height,Xt.S.h(ft+le,yt),b=Math.max(b,ft+jt.width+le),z=Math.max(z,Math.abs(yt))}else le=a.computeBusNodeSpacing(Xt)-rt,ft-=ie+jt.width,Xt.S.h(ft,yt+le),z=Math.max(z,yt+jt.height+le),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(Et),Math.abs(yt)):Math.max(Math.abs(Tt),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(Et,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(Tt,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 Oe(E,0,b,z)}Mr.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Mr.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 kh:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Wv(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 kh:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Zv(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:he("Unhandled alignment value "+a.toString())}return new It(y,x)}function rf(a,y,x,E,b,z){y=Zv(y,x,E),Zf(a,y.x,y.y,b,z)}function Zf(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:he("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=Hu(y),lt=ot===90||ot===270,ut=y.nodeSpacing;y=E;var ft=b;E=z;var yt=tt,Et=x.Yo,Tt=x.kp;tt=x.Da;var Dt=lt?Math.max(yt,tt.height):Math.max(E,tt.width);if((Et===null||ot!==Hu(x))&&(Et=xl(a,2),Tt=xl(a,2),lt?(Et[0].h(0,0),Et[1].h(0,tt.height),Tt[0].h(tt.width,0),Tt[1].h(Tt[0].x,Et[1].y)):(Et[0].h(0,0),Et[1].h(tt.width,0),Tt[0].h(0,tt.height),Tt[1].h(Et[1].x,Tt[0].y))),lt){if(yt=9999999,!(ft===null||2>ft.length||Et===null||2>Et.length))for(b=x=0;x<ft.length&&b<Et.length;){z=ft[x];var Xt=Et[b];ot=Xt.x,lt=Xt.y,ot+=E;var jt=z;x+1<ft.length&&(jt=ft[x+1]);var ie=Xt;Xt=ie.x,ie=ie.y,b+1<Et.length&&(ie=Et[b+1],Xt=ie.x,ie=ie.y,Xt+=E);var le=yt;z.y===lt?le=ot-z.x:z.y>lt&&z.y<ie?le=ot+(z.y-lt)/(ie-lt)*(Xt-ot)-z.x:lt>z.y&<<jt.y&&(le=ot-(z.x+(lt-z.y)/(jt.y-z.y)*(jt.x-z.x))),le<yt&&(yt=le),jt.y<=z.y?x++:ie<=lt?b++:(jt.y<=ie&&x++,ie<=jt.y&&b++)}if(yt=E-yt,yt+=ut,x=Et,b=yt,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ut=xl(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=xl(a,E),ot=0;ot<E;ot++)x[ot].assign(ut[ot]);iA(a,ut),E=x}if(z=Tt,ot=yt,ft===null||2>ft.length||z===null||2>z.length)b=null;else{for(ut=xl(a,ft.length+z.length),b=lt=x=0;x<ft.length&&ft[x].y<z[0].y;)jt=ft[x++],ut[b++].h(jt.x,jt.y);for(;lt<z.length;)jt=z[lt++],ut[b++].h(jt.x+ot,jt.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=xl(a,b),x=0;x<b;x++)z[x].assign(ut[x]);iA(a,ut),b=z}return z=Math.max(0,yt)+tt.width,tt=Dt,iA(a,y),iA(a,Et),iA(a,ft),iA(a,Tt),rt[0]=E,rt[1]=b,new Oe(yt,0,z,tt)}if(E=9999999,!(ft===null||2>ft.length||Et===null||2>Et.length))for(b=x=0;x<ft.length&&b<Et.length;)z=ft[x],Xt=Et[b],ot=Xt.x,lt=Xt.y,lt+=yt,jt=z,x+1<ft.length&&(jt=ft[x+1]),ie=Xt,Xt=ie.x,ie=ie.y,b+1<Et.length&&(ie=Et[b+1],Xt=ie.x,ie=ie.y,ie+=yt),le=E,z.x===ot?le=lt-z.y:z.x>ot&&z.x<Xt?le=lt+(z.x-ot)/(Xt-ot)*(ie-lt)-z.y:ot>z.x&&ot<jt.x&&(le=lt-(z.y+(ot-z.x)/(jt.x-z.x)*(jt.y-z.y))),le<E&&(E=le),jt.x<=z.x?x++:Xt<=ot?b++:(jt.x<=Xt&&x++,Xt<=jt.x&&b++);if(yt-=E,yt+=ut,x=Et,b=yt,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ut=xl(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=xl(a,E),ot=0;ot<E;ot++)x[ot].assign(ut[ot]);iA(a,ut),E=x}if(z=Tt,ot=yt,ft===null||2>ft.length||z===null||2>z.length)b=null;else{for(ut=xl(a,ft.length+z.length),b=lt=x=0;x<ft.length&&ft[x].x<z[0].x;)jt=ft[x++],ut[b++].h(jt.x,jt.y);for(;lt<z.length;)jt=z[lt++],ut[b++].h(jt.x,jt.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=xl(a,b),x=0;x<b;x++)z[x].assign(ut[x]);iA(a,ut),b=z}return z=Dt,tt=Math.max(0,yt)+tt.height,iA(a,y),iA(a,Et),iA(a,ft),iA(a,Tt),rt[0]=E,rt[1]=b,new Oe(yt,0,z,tt)}function xl(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 It;return a}function iA(a,y){var x=y.length,E=a.ru[x];E===void 0&&(E=[],a.ru[x]=E),E.push(y)}Mr.prototype.arrangeTrees=function(){if(this.Rb===mm)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof fu){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 fu&&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:he("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:he("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)}}}Mr.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Mr.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Mr.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 It(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),E=new It(-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 Oe(0,z,x,rt))):this.angle===90?(b.push(new Oe(0,z,x,rt)),z+=rt):this.angle===180?(z-=rt,b.push(new Oe(z,0,rt,x))):(b.push(new Oe(z,0,rt,x)),z+=rt)}this.commitLayers(b,E)}},Mr.prototype.commitLayers=function(){},Mr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Mr.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof fu&&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])}}Mr.prototype.setPortSpots=function(a){var y=a.alignment;if(pd(y)){var x=this.ud===oh,E=Hu(a);switch(E){case 0:var b=hs;break;case 90:b=js;break;case 180:b=es;break;default:b=Gs}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?es:Gs;if(tt===1||y===tt-1&&tt%2===1)switch(E){case 0:ot=es;break;case 90:ot=Gs;break;case 180:ot=hs;break;default:ot=js}else y%2===0&&(ot=E===90||E===270?hs:js);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?hs:js,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 kh:for(E=E===90||E===270?es:Gs,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=Hu(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=hs;break;case 90:E.fromSpot=js;break;case 180:E.fromSpot=es;break;default:E.fromSpot=Gs}else E.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.toSpot=es;break;case 90:E.toSpot=Gs;break;case 180:E.toSpot=hs;break;default:E.toSpot=js}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=hs;break;case 90:E.toSpot=js;break;case 180:E.toSpot=es;break;default:E.toSpot=Gs}else E.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.fromSpot=es;break;case 90:E.fromSpot=Gs;break;case 180:E.fromSpot=hs;break;default:E.fromSpot=js}else E.fromSpot=a.childPortSpot}};function Hu(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}Mr.prototype.computeLayerSpacing=function(a){var y=Hu(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},Mr.prototype.computeNodeIndent=function(a){var y=Hu(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)},Ue.Object.defineProperties(Mr.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()):he("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 Ze(Mr,"PathDefault",-1),oh=new Ze(Mr,"PathDestination",0),Yf=new Ze(Mr,"PathSource",1),Hg=new Ze(Mr,"SortingForwards",10),Rp=new Ze(Mr,"SortingReverse",11),_p=new Ze(Mr,"SortingAscending",12),Kp=new Ze(Mr,"SortingDescending",13),Rg=new Ze(Mr,"AlignmentCenterSubtrees",20),Xf=new Ze(Mr,"AlignmentCenterChildren",21),sh=new Ze(Mr,"AlignmentStart",22),ah=new Ze(Mr,"AlignmentEnd",23),Fc=new Ze(Mr,"AlignmentBus",24),lh=new Ze(Mr,"AlignmentBusBranching",25),Ec=new Ze(Mr,"AlignmentTopLeftBus",26),kh=new Ze(Mr,"AlignmentBottomRightBus",27),fm=new Ze(Mr,"CompactionNone",30),Gp=new Ze(Mr,"CompactionBlock",31),gm=new Ze(Mr,"StyleLayered",40),Xv=new Ze(Mr,"StyleLastParents",41),Jv=new Ze(Mr,"StyleAlternating",42),qv=new Ze(Mr,"StyleRootOnly",43),pm=new Ze(Mr,"ArrangementVertical",50),$v=new Ze(Mr,"ArrangementHorizontal",51),mm=new Ze(Mr,"ArrangementFixedRoots",52),ty=new Ze(Mr,"LayerIndividual",60),ey=new Ze(Mr,"LayerSiblings",61),vm=new Ze(Mr,"LayerUniform",62);Mr.className="TreeLayout",Mr.PathDefault=dm,Mr.PathDestination=oh,Mr.PathSource=Yf,Mr.SortingForwards=Hg,Mr.SortingReverse=Rp,Mr.SortingAscending=_p,Mr.SortingDescending=Kp,Mr.AlignmentCenterSubtrees=Rg,Mr.AlignmentCenterChildren=Xf,Mr.AlignmentStart=sh,Mr.AlignmentEnd=ah,Mr.AlignmentBus=Fc,Mr.AlignmentBusBranching=lh,Mr.AlignmentTopLeftBus=Ec,Mr.AlignmentBottomRightBus=kh,Mr.CompactionNone=fm,Mr.CompactionBlock=Gp,Mr.StyleLayered=gm,Mr.StyleLastParents=Xv,Mr.StyleAlternating=Jv,Mr.StyleRootOnly=qv,Mr.ArrangementVertical=pm,Mr.ArrangementHorizontal=$v,Mr.ArrangementFixedRoots=mm,Mr.LayerIndividual=ty,Mr.LayerSiblings=ey,Mr.LayerUniform=vm;function Jf(a){Fo.call(this,a)}He(Jf,Fo),Jf.prototype.createVertex=function(){return new fu(this)},Jf.prototype.createEdge=function(){return new _g(this)},Jf.className="TreeNetwork";function fu(a){Ks.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 It(0,0),this.Da=new cn(0,0),this.la=new It(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=ws,this.wr=!0,this.Dp=ws}He(fu,Ks),fu.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)},Ue.Object.defineProperties(fu.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)}}}),fu.className="TreeVertex";function _g(a){Nl.call(this,a),this.$t=new It(0,0)}He(_g,Nl),_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:he("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=Hu(x),tt=y.computeLayerSpacing(x),rt=x.rowSpacing;a.vg();var ot=a.curve===Wl,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 Et=a.i(a.pointsCount-1);z===0?(x.alignment===ah?(z=E.bottom+b.y,b.y===0&&ft.y>Et.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<Et.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>Et.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<Et.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>Et.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<Et.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>Et.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<Et.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))):he("Invalid angle "+z),a.zf()}else b=E,a=this.link,E=this.network.layout,y=Hu(x),y!==Hu(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===Wl,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()))}}},Ue.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",Bo.prototype.initializeStandardTools=function(){this.gb("Action",new Rl,this.mouseDownTools),this.gb("Relinking",new fl,this.mouseDownTools),this.gb("LinkReshaping",new ds,this.mouseDownTools),this.gb("Rotating",new Ea,this.mouseDownTools),this.gb("Resizing",new Aa,this.mouseDownTools),this.gb("Linking",new ua,this.mouseMoveTools),this.gb("Dragging",new Ho,this.mouseMoveTools),this.gb("DragSelecting",new El,this.mouseMoveTools),this.gb("Panning",new ia,this.mouseMoveTools),this.gb("ContextMenu",new La,this.mouseUpTools),this.gb("TextEditing",new Lo,this.mouseUpTools),this.gb("ClickCreating",new QA,this.mouseUpTools),this.gb("ClickSelecting",new gh,this.mouseUpTools)},FA("Horizontal",new ko),FA("Spot",new us),FA("Table",new Ca),FA("Viewbox",new _s),FA("TableRow",new bl),FA("TableColumn",new Vl),FA("Graduated",new PA),FA("Grid",new Qa),Gd.add("GraphLinksModel",qs),Gd.add("TreeModel",nu);var ym=Un.go,ny={get licenseKey(){return Re.licenseKey},set licenseKey(a){Re.licenseKey=a},get version(){return Re.version},Group:hr,EnumValue:Ze,List:ee,Set:Be,Map:Qe,Point:It,Size:cn,Rect:Oe,Margin:sr,Spot:Kn,Geometry:On,PathFigure:Ss,PathSegment:_r,InputEvent:Vs,DiagramEvent:zu,ChangedEvent:Uo,Model:Ci,GraphLinksModel:Or,TreeModel:Ya,Binding:Fs,Transaction:Ms,UndoManager:_o,CommandHandler:Yt,Tool:Rr,DraggingTool:Ho,DraggingInfo:Ju,DraggingOptions:st,LinkingBaseTool:rs,LinkingTool:ua,RelinkingTool:fl,LinkReshapingTool:ds,ResizingTool:Aa,RotatingTool:Ea,ClickSelectingTool:gh,ActionTool:Rl,ClickCreatingTool:QA,HTMLInfo:Bu,ContextMenuTool:La,DragSelectingTool:El,PanningTool:ia,TextEditingTool:Lo,ToolManager:Bo,Animation:ra,AnimationManager:il,AnimationTrigger:ql,Layer:zs,Diagram:Re,Palette:dt,Overview:gt,Brush:no,GraphObject:we,Panel:En,RowColumnDefinition:Ns,Shape:yr,TextBlock:Po,Picture:ll,Part:Ii,Adornment:Wr,Node:ti,Link:_n,Placeholder:ja,Layout:Go,LayoutNetwork:Fo,LayoutVertex:Ks,LayoutEdge:Nl,GridLayout:sa,PanelLayout:io,CircularLayout:qo,CircularNetwork:Ug,CircularVertex:Np,CircularEdge:$0,ForceDirectedLayout:ya,ForceDirectedNetwork:Wf,ForceDirectedVertex:Dp,ForceDirectedEdge:Ip,LayeredDigraphLayout:Ao,LayeredDigraphNetwork:Og,LayeredDigraphVertex:ru,LayeredDigraphEdge:Op,TreeLayout:Mr,TreeNetwork:Jf,TreeVertex:fu,TreeEdge:_g};typeof ym=="object"&&ym.version&&pi("WARNING: a `go` object on the root object is already defined. "+("Debug"in ym?"debug ":"")+"version: "+ym.version+", replaced with version: "+ny.version),Re.prototype.go=ny,Un.go=ny,typeof Bn.exports=="object"&&(Bn.exports=typeof Ot.g!="undefined"?Ot.g.go:self.go)}();var Pt=typeof Ot.g!="undefined"?Ot.g.go:self.go;const te=typeof Ot.g!="undefined"?Ot.g.go:self.go,Ae=te.Group,Ce=te.EnumValue,de=te.List,Rt=te.Set,ne=te.Map,ue=te.Point,ce=te.Size,Wt=te.Rect,Ne=te.Margin,qt=te.Spot,Le=te.Geometry,Ut=te.PathFigure,nt=te.PathSegment,et=te.InputEvent,At=te.DiagramEvent,at=te.ChangedEvent,ct=te.Model,pt=te.GraphLinksModel,xt=te.TreeModel,Mt=te.Binding,_t=te.Transaction,Qt=te.UndoManager,Vt=te.CommandHandler,Zt=te.Tool,$t=te.DraggingTool,Pe=te.DraggingInfo,me=te.LinkingBaseTool,$e=te.LinkingTool,tn=te.RelinkingTool,Cn=te.LinkReshapingTool,Tn=te.ResizingTool,In=te.RotatingTool,$n=te.ClickSelectingTool,Ln=te.ActionTool,be=te.ClickCreatingTool,re=te.HTMLInfo,Pn=te.ContextMenuTool,li=te.DragSelectingTool,Jn=te.PanningTool,un=te.TextEditingTool,Yn=te.ToolManager,si=te.Animation,Fi=te.AnimationManager,sn=te.AnimationTrigger,oi=te.Layer,Ee=te.Diagram,ci=te.Palette,Pi=te.Overview,Ht=te.Brush,kt=te.GraphObject,mt=te.Panel,vt=te.RowColumnDefinition,Lt=te.Shape,Bt=te.TextBlock,Kt=te.TextBlockMetrics,ge=te.Picture,ke=te.Part,Je=te.Adornment,ve=te.Node,ze=te.Link,De=te.Placeholder,nn=te.Layout,kn=te.LayoutNetwork,Gn=te.LayoutVertex,gn=te.LayoutEdge,Ri=te.GridLayout,di=te.PanelLayout,xi=te.CircularLayout,Ei=te.CircularNetwork,ar=te.CircularVertex,Qi=te.CircularEdge,Oi=te.ForceDirectedLayout,Yi=te.ForceDirectedNetwork,Hr=te.ForceDirectedVertex,Xi=te.ForceDirectedEdge,Fr=te.LayeredDigraphLayout,mr=te.LayeredDigraphNetwork,Yr=te.LayeredDigraphVertex,ji=te.LayeredDigraphEdge,co=te.TreeLayout,fo=te.TreeNetwork,Xr=te.TreeVertex,Er=te.TreeEdge,Zr=te.version},64270:function(Bn){(function(Ve,Ot){Bn.exports=Ot()})(this,function(){"use strict";var Ve=function(St,wt){return Ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ft,Ct){Ft.__proto__=Ct}||function(Ft,Ct){for(var zt in Ct)Object.prototype.hasOwnProperty.call(Ct,zt)&&(Ft[zt]=Ct[zt])},Ve(St,wt)};function Ot(St,wt){if(typeof wt!="function"&&wt!==null)throw new TypeError("Class extends value "+String(wt)+" is not a constructor or null");Ve(St,wt);function Ft(){this.constructor=St}St.prototype=wt===null?Object.create(wt):(Ft.prototype=wt.prototype,new Ft)}var Pt=function(){return Pt=Object.assign||function(wt){for(var Ft,Ct=1,zt=arguments.length;Ct<zt;Ct++){Ft=arguments[Ct];for(var se in Ft)Object.prototype.hasOwnProperty.call(Ft,se)&&(wt[se]=Ft[se])}return wt},Pt.apply(this,arguments)};function te(St,wt,Ft,Ct){function zt(se){return se instanceof Ft?se:new Ft(function(Fe){Fe(se)})}return new(Ft||(Ft=Promise))(function(se,Fe){function Xe(Hn){try{bn(Ct.next(Hn))}catch(ei){Fe(ei)}}function Ie(Hn){try{bn(Ct.throw(Hn))}catch(ei){Fe(ei)}}function bn(Hn){Hn.done?se(Hn.value):zt(Hn.value).then(Xe,Ie)}bn((Ct=Ct.apply(St,wt||[])).next())})}function Ae(St,wt){var Ft={label:0,sent:function(){if(se[0]&1)throw se[1];return se[1]},trys:[],ops:[]},Ct,zt,se,Fe;return Fe={next:Xe(0),throw:Xe(1),return:Xe(2)},typeof Symbol=="function"&&(Fe[Symbol.iterator]=function(){return this}),Fe;function Xe(bn){return function(Hn){return Ie([bn,Hn])}}function Ie(bn){if(Ct)throw new TypeError("Generator is already executing.");for(;Ft;)try{if(Ct=1,zt&&(se=bn[0]&2?zt.return:bn[0]?zt.throw||((se=zt.return)&&se.call(zt),0):zt.next)&&!(se=se.call(zt,bn[1])).done)return se;switch(zt=0,se&&(bn=[bn[0]&2,se.value]),bn[0]){case 0:case 1:se=bn;break;case 4:return Ft.label++,{value:bn[1],done:!1};case 5:Ft.label++,zt=bn[1],bn=[0];continue;case 7:bn=Ft.ops.pop(),Ft.trys.pop();continue;default:if(se=Ft.trys,!(se=se.length>0&&se[se.length-1])&&(bn[0]===6||bn[0]===2)){Ft=0;continue}if(bn[0]===3&&(!se||bn[1]>se[0]&&bn[1]<se[3])){Ft.label=bn[1];break}if(bn[0]===6&&Ft.label<se[1]){Ft.label=se[1],se=bn;break}if(se&&Ft.label<se[2]){Ft.label=se[2],Ft.ops.push(bn);break}se[2]&&Ft.ops.pop(),Ft.trys.pop();continue}bn=wt.call(St,Ft)}catch(Hn){bn=[6,Hn],zt=0}finally{Ct=se=0}if(bn[0]&5)throw bn[1];return{value:bn[0]?bn[1]:void 0,done:!0}}}function Ce(St,wt,Ft){if(Ft||arguments.length===2)for(var Ct=0,zt=wt.length,se;Ct<zt;Ct++)(se||!(Ct in wt))&&(se||(se=Array.prototype.slice.call(wt,0,Ct)),se[Ct]=wt[Ct]);return St.concat(se||wt)}for(var de=function(){function St(wt,Ft,Ct,zt){this.left=wt,this.top=Ft,this.width=Ct,this.height=zt}return St.prototype.add=function(wt,Ft,Ct,zt){return new St(this.left+wt,this.top+Ft,this.width+Ct,this.height+zt)},St.fromClientRect=function(wt,Ft){return new St(Ft.left+wt.windowBounds.left,Ft.top+wt.windowBounds.top,Ft.width,Ft.height)},St.fromDOMRectList=function(wt,Ft){var Ct=Array.from(Ft).find(function(zt){return zt.width!==0});return Ct?new St(Ct.left+wt.windowBounds.left,Ct.top+wt.windowBounds.top,Ct.width,Ct.height):St.EMPTY},St.EMPTY=new St(0,0,0,0),St}(),Rt=function(St,wt){return de.fromClientRect(St,wt.getBoundingClientRect())},ne=function(St){var wt=St.body,Ft=St.documentElement;if(!wt||!Ft)throw new Error("Unable to get document size");var Ct=Math.max(Math.max(wt.scrollWidth,Ft.scrollWidth),Math.max(wt.offsetWidth,Ft.offsetWidth),Math.max(wt.clientWidth,Ft.clientWidth)),zt=Math.max(Math.max(wt.scrollHeight,Ft.scrollHeight),Math.max(wt.offsetHeight,Ft.offsetHeight),Math.max(wt.clientHeight,Ft.clientHeight));return new de(0,0,Ct,zt)},ue=function(St){for(var wt=[],Ft=0,Ct=St.length;Ft<Ct;){var zt=St.charCodeAt(Ft++);if(zt>=55296&&zt<=56319&&Ft<Ct){var se=St.charCodeAt(Ft++);(se&64512)===56320?wt.push(((zt&1023)<<10)+(se&1023)+65536):(wt.push(zt),Ft--)}else wt.push(zt)}return wt},ce=function(){for(var St=[],wt=0;wt<arguments.length;wt++)St[wt]=arguments[wt];if(String.fromCodePoint)return String.fromCodePoint.apply(String,St);var Ft=St.length;if(!Ft)return"";for(var Ct=[],zt=-1,se="";++zt<Ft;){var Fe=St[zt];Fe<=65535?Ct.push(Fe):(Fe-=65536,Ct.push((Fe>>10)+55296,Fe%1024+56320)),(zt+1===Ft||Ct.length>16384)&&(se+=String.fromCharCode.apply(String,Ct),Ct.length=0)}return se},Wt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ne=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),qt=0;qt<Wt.length;qt++)Ne[Wt.charCodeAt(qt)]=qt;for(var Le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ut=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),nt=0;nt<Le.length;nt++)Ut[Le.charCodeAt(nt)]=nt;for(var et=function(St){var wt=St.length*.75,Ft=St.length,Ct,zt=0,se,Fe,Xe,Ie;St[St.length-1]==="="&&(wt--,St[St.length-2]==="="&&wt--);var bn=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(wt):new Array(wt),Hn=Array.isArray(bn)?bn:new Uint8Array(bn);for(Ct=0;Ct<Ft;Ct+=4)se=Ut[St.charCodeAt(Ct)],Fe=Ut[St.charCodeAt(Ct+1)],Xe=Ut[St.charCodeAt(Ct+2)],Ie=Ut[St.charCodeAt(Ct+3)],Hn[zt++]=se<<2|Fe>>4,Hn[zt++]=(Fe&15)<<4|Xe>>2,Hn[zt++]=(Xe&3)<<6|Ie&63;return bn},At=function(St){for(var wt=St.length,Ft=[],Ct=0;Ct<wt;Ct+=2)Ft.push(St[Ct+1]<<8|St[Ct]);return Ft},at=function(St){for(var wt=St.length,Ft=[],Ct=0;Ct<wt;Ct+=4)Ft.push(St[Ct+3]<<24|St[Ct+2]<<16|St[Ct+1]<<8|St[Ct]);return Ft},ct=5,pt=11,xt=2,Mt=pt-ct,_t=65536>>ct,Qt=1<<ct,Vt=Qt-1,Zt=1024>>ct,$t=_t+Zt,Pe=$t,me=32,$e=Pe+me,tn=65536>>pt,Cn=1<<Mt,Tn=Cn-1,In=function(St,wt,Ft){return St.slice?St.slice(wt,Ft):new Uint16Array(Array.prototype.slice.call(St,wt,Ft))},$n=function(St,wt,Ft){return St.slice?St.slice(wt,Ft):new Uint32Array(Array.prototype.slice.call(St,wt,Ft))},Ln=function(St,wt){var Ft=et(St),Ct=Array.isArray(Ft)?at(Ft):new Uint32Array(Ft),zt=Array.isArray(Ft)?At(Ft):new Uint16Array(Ft),se=24,Fe=In(zt,se/2,Ct[4]/2),Xe=Ct[5]===2?In(zt,(se+Ct[4])/2):$n(Ct,Math.ceil((se+Ct[4])/4));return new be(Ct[0],Ct[1],Ct[2],Ct[3],Fe,Xe)},be=function(){function St(wt,Ft,Ct,zt,se,Fe){this.initialValue=wt,this.errorValue=Ft,this.highStart=Ct,this.highValueIndex=zt,this.index=se,this.data=Fe}return St.prototype.get=function(wt){var Ft;if(wt>=0){if(wt<55296||wt>56319&&wt<=65535)return Ft=this.index[wt>>ct],Ft=(Ft<<xt)+(wt&Vt),this.data[Ft];if(wt<=65535)return Ft=this.index[_t+(wt-55296>>ct)],Ft=(Ft<<xt)+(wt&Vt),this.data[Ft];if(wt<this.highStart)return Ft=$e-tn+(wt>>pt),Ft=this.index[Ft],Ft+=wt>>ct&Tn,Ft=this.index[Ft],Ft=(Ft<<xt)+(wt&Vt),this.data[Ft];if(wt<=1114111)return this.data[this.highValueIndex]}return this.errorValue},St}(),re="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pn=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),li=0;li<re.length;li++)Pn[re.charCodeAt(li)]=li;var Jn="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==",un=50,Yn=1,si=2,Fi=3,sn=4,oi=5,Ee=7,ci=8,Pi=9,Ht=10,kt=11,mt=12,vt=13,Lt=14,Bt=15,Kt=16,ge=17,ke=18,Je=19,ve=20,ze=21,De=22,nn=23,kn=24,Gn=25,gn=26,Ri=27,di=28,xi=29,Ei=30,ar=31,Qi=32,Oi=33,Yi=34,Hr=35,Xi=36,Fr=37,mr=38,Yr=39,ji=40,co=41,fo=42,Xr=43,Er=[9001,65288],Zr="!",bt="\xD7",Br="\xF7",Vi=Ln(Jn),Vr=[Ei,Xi],Do=[Yn,si,Fi,oi],bo=[Ht,ci],$o=[Ri,gn],Zi=Do.concat(bo),wi=[mr,Yr,ji,Yi,Hr],je=[Bt,vt],He=function(St,wt){wt===void 0&&(wt="strict");var Ft=[],Ct=[],zt=[];return St.forEach(function(se,Fe){var Xe=Vi.get(se);if(Xe>un?(zt.push(!0),Xe-=un):zt.push(!1),["normal","auto","loose"].indexOf(wt)!==-1&&[8208,8211,12316,12448].indexOf(se)!==-1)return Ct.push(Fe),Ft.push(Kt);if(Xe===sn||Xe===kt){if(Fe===0)return Ct.push(Fe),Ft.push(Ei);var Ie=Ft[Fe-1];return Zi.indexOf(Ie)===-1?(Ct.push(Ct[Fe-1]),Ft.push(Ie)):(Ct.push(Fe),Ft.push(Ei))}if(Ct.push(Fe),Xe===ar)return Ft.push(wt==="strict"?ze:Fr);if(Xe===fo||Xe===xi)return Ft.push(Ei);if(Xe===Xr)return se>=131072&&se<=196605||se>=196608&&se<=262141?Ft.push(Fr):Ft.push(Ei);Ft.push(Xe)}),[Ct,Ft,zt]},Ue=function(St,wt,Ft,Ct){var zt=Ct[Ft];if(Array.isArray(St)?St.indexOf(zt)!==-1:St===zt)for(var se=Ft;se<=Ct.length;){se++;var Fe=Ct[se];if(Fe===wt)return!0;if(Fe!==Ht)break}if(zt===Ht)for(var se=Ft;se>0;){se--;var Xe=Ct[se];if(Array.isArray(St)?St.indexOf(Xe)!==-1:St===Xe)for(var Ie=Ft;Ie<=Ct.length;){Ie++;var Fe=Ct[Ie];if(Fe===wt)return!0;if(Fe!==Ht)break}if(Xe!==Ht)break}return!1},fi=function(St,wt){for(var Ft=St;Ft>=0;){var Ct=wt[Ft];if(Ct===Ht)Ft--;else return Ct}return 0},Se=function(St,wt,Ft,Ct,zt){if(Ft[Ct]===0)return bt;var se=Ct-1;if(Array.isArray(zt)&&zt[se]===!0)return bt;var Fe=se-1,Xe=se+1,Ie=wt[se],bn=Fe>=0?wt[Fe]:0,Hn=wt[Xe];if(Ie===si&&Hn===Fi)return bt;if(Do.indexOf(Ie)!==-1)return Zr;if(Do.indexOf(Hn)!==-1||bo.indexOf(Hn)!==-1)return bt;if(fi(se,wt)===ci)return Br;if(Vi.get(St[se])===kt||(Ie===Qi||Ie===Oi)&&Vi.get(St[Xe])===kt||Ie===Ee||Hn===Ee||Ie===Pi||[Ht,vt,Bt].indexOf(Ie)===-1&&Hn===Pi||[ge,ke,Je,kn,di].indexOf(Hn)!==-1||fi(se,wt)===De||Ue(nn,De,se,wt)||Ue([ge,ke],ze,se,wt)||Ue(mt,mt,se,wt))return bt;if(Ie===Ht)return Br;if(Ie===nn||Hn===nn)return bt;if(Hn===Kt||Ie===Kt)return Br;if([vt,Bt,ze].indexOf(Hn)!==-1||Ie===Lt||bn===Xi&&je.indexOf(Ie)!==-1||Ie===di&&Hn===Xi||Hn===ve||Vr.indexOf(Hn)!==-1&&Ie===Gn||Vr.indexOf(Ie)!==-1&&Hn===Gn||Ie===Ri&&[Fr,Qi,Oi].indexOf(Hn)!==-1||[Fr,Qi,Oi].indexOf(Ie)!==-1&&Hn===gn||Vr.indexOf(Ie)!==-1&&$o.indexOf(Hn)!==-1||$o.indexOf(Ie)!==-1&&Vr.indexOf(Hn)!==-1||[Ri,gn].indexOf(Ie)!==-1&&(Hn===Gn||[De,Bt].indexOf(Hn)!==-1&&wt[Xe+1]===Gn)||[De,Bt].indexOf(Ie)!==-1&&Hn===Gn||Ie===Gn&&[Gn,di,kn].indexOf(Hn)!==-1)return bt;if([Gn,di,kn,ge,ke].indexOf(Hn)!==-1)for(var ei=se;ei>=0;){var Di=wt[ei];if(Di===Gn)return bt;if([di,kn].indexOf(Di)!==-1)ei--;else break}if([Ri,gn].indexOf(Hn)!==-1)for(var ei=[ge,ke].indexOf(Ie)!==-1?Fe:se;ei>=0;){var Di=wt[ei];if(Di===Gn)return bt;if([di,kn].indexOf(Di)!==-1)ei--;else break}if(mr===Ie&&[mr,Yr,Yi,Hr].indexOf(Hn)!==-1||[Yr,Yi].indexOf(Ie)!==-1&&[Yr,ji].indexOf(Hn)!==-1||[ji,Hr].indexOf(Ie)!==-1&&Hn===ji||wi.indexOf(Ie)!==-1&&[ve,gn].indexOf(Hn)!==-1||wi.indexOf(Hn)!==-1&&Ie===Ri||Vr.indexOf(Ie)!==-1&&Vr.indexOf(Hn)!==-1||Ie===kn&&Vr.indexOf(Hn)!==-1||Vr.concat(Gn).indexOf(Ie)!==-1&&Hn===De&&Er.indexOf(St[Xe])===-1||Vr.concat(Gn).indexOf(Hn)!==-1&&Ie===ke)return bt;if(Ie===co&&Hn===co){for(var Ir=Ft[se],pr=1;Ir>0&&(Ir--,wt[Ir]===co);)pr++;if(pr%2!==0)return bt}return Ie===Qi&&Hn===Oi?bt:Br},_i=function(St,wt){wt||(wt={lineBreak:"normal",wordBreak:"normal"});var Ft=He(St,wt.lineBreak),Ct=Ft[0],zt=Ft[1],se=Ft[2];(wt.wordBreak==="break-all"||wt.wordBreak==="break-word")&&(zt=zt.map(function(Xe){return[Gn,Ei,fo].indexOf(Xe)!==-1?Fr:Xe}));var Fe=wt.wordBreak==="keep-all"?se.map(function(Xe,Ie){return Xe&&St[Ie]>=19968&&St[Ie]<=40959}):void 0;return[Ct,zt,Fe]},Un=function(){function St(wt,Ft,Ct,zt){this.codePoints=wt,this.required=Ft===Zr,this.start=Ct,this.end=zt}return St.prototype.slice=function(){return ce.apply(void 0,this.codePoints.slice(this.start,this.end))},St}(),Ai=function(St,wt){var Ft=ue(St),Ct=_i(Ft,wt),zt=Ct[0],se=Ct[1],Fe=Ct[2],Xe=Ft.length,Ie=0,bn=0;return{next:function(){if(bn>=Xe)return{done:!0,value:null};for(var Hn=bt;bn<Xe&&(Hn=Se(Ft,se,zt,++bn,Fe))===bt;);if(Hn!==bt||bn===Xe){var ei=new Un(Ft,Hn,Ie,bn);return Ie=bn,{value:ei,done:!1}}return{done:!0,value:null}}}},We=1,Ke=2,ui=4,he=8,rn=10,Wn=47,pi=92,on=9,yn=32,ii=34,hn=61,An=35,xn=36,Nn=37,ai=39,Ki=40,Ni=41,Ti=95,en=45,br=33,cr=60,Kr=62,Ze=64,ni=91,Bi=93,Hi=61,vi=123,ki=63,er=125,lr=124,oe=126,ae=128,ee=65533,Ye=42,Be=43,ln=44,Dn=58,Zn=59,Li=46,Mi=0,Te=8,yi=11,Me=14,an=31,Qe=127,It=-1,vn=48,pn=97,Qn=101,zn=102,jn=117,Ge=122,fn=65,Fn=69,Sn=70,dn=85,gi=90,Vn=function(St){return St>=vn&&St<=57},qn=function(St){return St>=55296&&St<=57343},cn=function(St){return Vn(St)||St>=fn&&St<=Sn||St>=pn&&St<=zn},ri=function(St){return St>=pn&&St<=Ge},Ui=function(St){return St>=fn&&St<=gi},nr=function(St){return ri(St)||Ui(St)},Ji=function(St){return St>=ae},fr=function(St){return St===rn||St===on||St===yn},dr=function(St){return nr(St)||Ji(St)||St===Ti},Pr=function(St){return dr(St)||Vn(St)||St===en},Gr=function(St){return St>=Mi&&St<=Te||St===yi||St>=Me&&St<=an||St===Qe},Tr=function(St,wt){return St!==pi?!1:wt!==rn},ro=function(St,wt,Ft){return St===en?dr(wt)||Tr(wt,Ft):dr(St)?!0:!!(St===pi&&Tr(St,wt))},Oe=function(St,wt,Ft){return St===Be||St===en?Vn(wt)?!0:wt===Li&&Vn(Ft):Vn(St===Li?wt:St)},gr=function(St){var wt=0,Ft=1;(St[wt]===Be||St[wt]===en)&&(St[wt]===en&&(Ft=-1),wt++);for(var Ct=[];Vn(St[wt]);)Ct.push(St[wt++]);var zt=Ct.length?parseInt(ce.apply(void 0,Ct),10):0;St[wt]===Li&&wt++;for(var se=[];Vn(St[wt]);)se.push(St[wt++]);var Fe=se.length,Xe=Fe?parseInt(ce.apply(void 0,se),10):0;(St[wt]===Fn||St[wt]===Qn)&&wt++;var Ie=1;(St[wt]===Be||St[wt]===en)&&(St[wt]===en&&(Ie=-1),wt++);for(var bn=[];Vn(St[wt]);)bn.push(St[wt++]);var Hn=bn.length?parseInt(ce.apply(void 0,bn),10):0;return Ft*(zt+Xe*Math.pow(10,-Fe))*Math.pow(10,Ie*Hn)},Dr={type:2},tr={type:3},Ur={type:4},or={type:13},vo={type:8},qr={type:21},Nr={type:9},ho={type:10},ks={type:11},ls={type:12},la={type:14},Is={type:23},sr={type:1},Eo={type:25},os={type:24},Gi={type:26},Wi={type:27},ir={type:28},Kn={type:29},Ar={type:31},kr={type:32},xo=function(){function St(){this._value=[]}return St.prototype.write=function(wt){this._value=this._value.concat(ue(wt))},St.prototype.read=function(){for(var wt=[],Ft=this.consumeToken();Ft!==kr;)wt.push(Ft),Ft=this.consumeToken();return wt},St.prototype.consumeToken=function(){var wt=this.consumeCodePoint();switch(wt){case ii:return this.consumeStringToken(ii);case An:var Ft=this.peekCodePoint(0),Ct=this.peekCodePoint(1),zt=this.peekCodePoint(2);if(Pr(Ft)||Tr(Ct,zt)){var se=ro(Ft,Ct,zt)?Ke:We,Fe=this.consumeName();return{type:5,value:Fe,flags:se}}break;case xn:if(this.peekCodePoint(0)===hn)return this.consumeCodePoint(),or;break;case ai:return this.consumeStringToken(ai);case Ki:return Dr;case Ni:return tr;case Ye:if(this.peekCodePoint(0)===hn)return this.consumeCodePoint(),la;break;case Be:if(Oe(wt,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(wt),this.consumeNumericToken();break;case ln:return Ur;case en:var Xe=wt,Ie=this.peekCodePoint(0),bn=this.peekCodePoint(1);if(Oe(Xe,Ie,bn))return this.reconsumeCodePoint(wt),this.consumeNumericToken();if(ro(Xe,Ie,bn))return this.reconsumeCodePoint(wt),this.consumeIdentLikeToken();if(Ie===en&&bn===Kr)return this.consumeCodePoint(),this.consumeCodePoint(),os;break;case Li:if(Oe(wt,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(wt),this.consumeNumericToken();break;case Wn:if(this.peekCodePoint(0)===Ye)for(this.consumeCodePoint();;){var Hn=this.consumeCodePoint();if(Hn===Ye&&(Hn=this.consumeCodePoint(),Hn===Wn))return this.consumeToken();if(Hn===It)return this.consumeToken()}break;case Dn:return Gi;case Zn:return Wi;case cr:if(this.peekCodePoint(0)===br&&this.peekCodePoint(1)===en&&this.peekCodePoint(2)===en)return this.consumeCodePoint(),this.consumeCodePoint(),Eo;break;case Ze:var ei=this.peekCodePoint(0),Di=this.peekCodePoint(1),Ir=this.peekCodePoint(2);if(ro(ei,Di,Ir)){var Fe=this.consumeName();return{type:7,value:Fe}}break;case ni:return ir;case pi:if(Tr(wt,this.peekCodePoint(0)))return this.reconsumeCodePoint(wt),this.consumeIdentLikeToken();break;case Bi:return Kn;case Hi:if(this.peekCodePoint(0)===hn)return this.consumeCodePoint(),vo;break;case vi:return ks;case er:return ls;case jn:case dn:var pr=this.peekCodePoint(0),Sr=this.peekCodePoint(1);return pr===Be&&(cn(Sr)||Sr===ki)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(wt),this.consumeIdentLikeToken();case lr:if(this.peekCodePoint(0)===hn)return this.consumeCodePoint(),Nr;if(this.peekCodePoint(0)===lr)return this.consumeCodePoint(),qr;break;case oe:if(this.peekCodePoint(0)===hn)return this.consumeCodePoint(),ho;break;case It:return kr}return fr(wt)?(this.consumeWhiteSpace(),Ar):Vn(wt)?(this.reconsumeCodePoint(wt),this.consumeNumericToken()):dr(wt)?(this.reconsumeCodePoint(wt),this.consumeIdentLikeToken()):{type:6,value:ce(wt)}},St.prototype.consumeCodePoint=function(){var wt=this._value.shift();return typeof wt=="undefined"?-1:wt},St.prototype.reconsumeCodePoint=function(wt){this._value.unshift(wt)},St.prototype.peekCodePoint=function(wt){return wt>=this._value.length?-1:this._value[wt]},St.prototype.consumeUnicodeRangeToken=function(){for(var wt=[],Ft=this.consumeCodePoint();cn(Ft)&&wt.length<6;)wt.push(Ft),Ft=this.consumeCodePoint();for(var Ct=!1;Ft===ki&&wt.length<6;)wt.push(Ft),Ft=this.consumeCodePoint(),Ct=!0;if(Ct){var zt=parseInt(ce.apply(void 0,wt.map(function(Ie){return Ie===ki?vn:Ie})),16),se=parseInt(ce.apply(void 0,wt.map(function(Ie){return Ie===ki?Sn:Ie})),16);return{type:30,start:zt,end:se}}var Fe=parseInt(ce.apply(void 0,wt),16);if(this.peekCodePoint(0)===en&&cn(this.peekCodePoint(1))){this.consumeCodePoint(),Ft=this.consumeCodePoint();for(var Xe=[];cn(Ft)&&Xe.length<6;)Xe.push(Ft),Ft=this.consumeCodePoint();var se=parseInt(ce.apply(void 0,Xe),16);return{type:30,start:Fe,end:se}}else return{type:30,start:Fe,end:Fe}},St.prototype.consumeIdentLikeToken=function(){var wt=this.consumeName();return wt.toLowerCase()==="url"&&this.peekCodePoint(0)===Ki?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Ki?(this.consumeCodePoint(),{type:19,value:wt}):{type:20,value:wt}},St.prototype.consumeUrlToken=function(){var wt=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===It)return{type:22,value:""};var Ft=this.peekCodePoint(0);if(Ft===ai||Ft===ii){var Ct=this.consumeStringToken(this.consumeCodePoint());return Ct.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===It||this.peekCodePoint(0)===Ni)?(this.consumeCodePoint(),{type:22,value:Ct.value}):(this.consumeBadUrlRemnants(),Is)}for(;;){var zt=this.consumeCodePoint();if(zt===It||zt===Ni)return{type:22,value:ce.apply(void 0,wt)};if(fr(zt))return this.consumeWhiteSpace(),this.peekCodePoint(0)===It||this.peekCodePoint(0)===Ni?(this.consumeCodePoint(),{type:22,value:ce.apply(void 0,wt)}):(this.consumeBadUrlRemnants(),Is);if(zt===ii||zt===ai||zt===Ki||Gr(zt))return this.consumeBadUrlRemnants(),Is;if(zt===pi)if(Tr(zt,this.peekCodePoint(0)))wt.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Is;else wt.push(zt)}},St.prototype.consumeWhiteSpace=function(){for(;fr(this.peekCodePoint(0));)this.consumeCodePoint()},St.prototype.consumeBadUrlRemnants=function(){for(;;){var wt=this.consumeCodePoint();if(wt===Ni||wt===It)return;Tr(wt,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},St.prototype.consumeStringSlice=function(wt){for(var Ft=5e4,Ct="";wt>0;){var zt=Math.min(Ft,wt);Ct+=ce.apply(void 0,this._value.splice(0,zt)),wt-=zt}return this._value.shift(),Ct},St.prototype.consumeStringToken=function(wt){var Ft="",Ct=0;do{var zt=this._value[Ct];if(zt===It||zt===void 0||zt===wt)return Ft+=this.consumeStringSlice(Ct),{type:0,value:Ft};if(zt===rn)return this._value.splice(0,Ct),sr;if(zt===pi){var se=this._value[Ct+1];se!==It&&se!==void 0&&(se===rn?(Ft+=this.consumeStringSlice(Ct),Ct=-1,this._value.shift()):Tr(zt,se)&&(Ft+=this.consumeStringSlice(Ct),Ft+=ce(this.consumeEscapedCodePoint()),Ct=-1))}Ct++}while(!0)},St.prototype.consumeNumber=function(){var wt=[],Ft=ui,Ct=this.peekCodePoint(0);for((Ct===Be||Ct===en)&&wt.push(this.consumeCodePoint());Vn(this.peekCodePoint(0));)wt.push(this.consumeCodePoint());Ct=this.peekCodePoint(0);var zt=this.peekCodePoint(1);if(Ct===Li&&Vn(zt))for(wt.push(this.consumeCodePoint(),this.consumeCodePoint()),Ft=he;Vn(this.peekCodePoint(0));)wt.push(this.consumeCodePoint());Ct=this.peekCodePoint(0),zt=this.peekCodePoint(1);var se=this.peekCodePoint(2);if((Ct===Fn||Ct===Qn)&&((zt===Be||zt===en)&&Vn(se)||Vn(zt)))for(wt.push(this.consumeCodePoint(),this.consumeCodePoint()),Ft=he;Vn(this.peekCodePoint(0));)wt.push(this.consumeCodePoint());return[gr(wt),Ft]},St.prototype.consumeNumericToken=function(){var wt=this.consumeNumber(),Ft=wt[0],Ct=wt[1],zt=this.peekCodePoint(0),se=this.peekCodePoint(1),Fe=this.peekCodePoint(2);if(ro(zt,se,Fe)){var Xe=this.consumeName();return{type:15,number:Ft,flags:Ct,unit:Xe}}return zt===Nn?(this.consumeCodePoint(),{type:16,number:Ft,flags:Ct}):{type:17,number:Ft,flags:Ct}},St.prototype.consumeEscapedCodePoint=function(){var wt=this.consumeCodePoint();if(cn(wt)){for(var Ft=ce(wt);cn(this.peekCodePoint(0))&&Ft.length<6;)Ft+=ce(this.consumeCodePoint());fr(this.peekCodePoint(0))&&this.consumeCodePoint();var Ct=parseInt(Ft,16);return Ct===0||qn(Ct)||Ct>1114111?ee:Ct}return wt===It?ee:wt},St.prototype.consumeName=function(){for(var wt="";;){var Ft=this.consumeCodePoint();if(Pr(Ft))wt+=ce(Ft);else if(Tr(Ft,this.peekCodePoint(0)))wt+=ce(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(Ft),wt}},St}(),Ts=function(){function St(wt){this._tokens=wt}return St.create=function(wt){var Ft=new xo;return Ft.write(wt),new St(Ft.read())},St.parseValue=function(wt){return St.create(wt).parseComponentValue()},St.parseValues=function(wt){return St.create(wt).parseComponentValues()},St.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 Ft=this.consumeComponentValue();do wt=this.consumeToken();while(wt.type===31);if(wt.type===32)return Ft;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},St.prototype.parseComponentValues=function(){for(var wt=[];;){var Ft=this.consumeComponentValue();if(Ft.type===32)return wt;wt.push(Ft),wt.push()}},St.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},St.prototype.consumeSimpleBlock=function(wt){for(var Ft={type:wt,values:[]},Ct=this.consumeToken();;){if(Ct.type===32||Io(Ct,wt))return Ft;this.reconsumeToken(Ct),Ft.values.push(this.consumeComponentValue()),Ct=this.consumeToken()}},St.prototype.consumeFunction=function(wt){for(var Ft={name:wt.value,values:[],type:18};;){var Ct=this.consumeToken();if(Ct.type===32||Ct.type===3)return Ft;this.reconsumeToken(Ct),Ft.values.push(this.consumeComponentValue())}},St.prototype.consumeToken=function(){var wt=this._tokens.shift();return typeof wt=="undefined"?kr:wt},St.prototype.reconsumeToken=function(wt){this._tokens.unshift(wt)},St}(),ps=function(St){return St.type===15},Cr=function(St){return St.type===17},to=function(St){return St.type===20},oo=function(St){return St.type===0},ts=function(St,wt){return to(St)&&St.value===wt},yo=function(St){return St.type!==31},Vo=function(St){return St.type!==31&&St.type!==4},zo=function(St){var wt=[],Ft=[];return St.forEach(function(Ct){if(Ct.type===4){if(Ft.length===0)throw new Error("Error parsing function args, zero tokens for arg");wt.push(Ft),Ft=[];return}Ct.type!==31&&Ft.push(Ct)}),Ft.length&&wt.push(Ft),wt},Io=function(St,wt){return wt===11&&St.type===12||wt===28&&St.type===29?!0:wt===2&&St.type===3},ys=function(St){return St.type===17||St.type===15},Wo=function(St){return St.type===16||ys(St)},Fl=function(St){return St.length>1?[St[0],St[1]]:[St[0]]},ao={type:17,number:0,flags:ui},da={type:16,number:50,flags:ui},_a={type:16,number:100,flags:ui},hl=function(St,wt,Ft){var Ct=St[0],zt=St[1];return[Zo(Ct,wt),Zo(typeof zt!="undefined"?zt:Ct,Ft)]},Zo=function(St,wt){if(St.type===16)return St.number/100*wt;if(ps(St))switch(St.unit){case"rem":case"em":return 16*St.number;case"px":default:return St.number}return St.number},Ta="deg",$a="grad",uA="rad",Ku="turn",ws={name:"angle",parse:function(St,wt){if(wt.type===15)switch(wt.unit){case Ta:return Math.PI*wt.number/180;case $a:return Math.PI/200*wt.number;case uA:return wt.number;case Ku:return Math.PI*2*wt.number}throw new Error("Unsupported angle type")}},Gu=function(St){return St.type===15&&(St.unit===Ta||St.unit===$a||St.unit===uA||St.unit===Ku)},AA=function(St){var wt=St.filter(to).map(function(Ft){return Ft.value}).join(" ");switch(wt){case"to bottom right":case"to right bottom":case"left top":case"top left":return[ao,ao];case"to top":case"bottom":return wa(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[ao,_a];case"to right":case"left":return wa(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[_a,_a];case"to bottom":case"top":return wa(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[_a,ao];case"to left":case"right":return wa(270)}return 0},wa=function(St){return Math.PI*St/180},tl={name:"color",parse:function(St,wt){if(wt.type===18){var Ft=Xs[wt.name];if(typeof Ft=="undefined")throw new Error('Attempting to parse an unsupported color function "'+wt.name+'"');return Ft(St,wt.values)}if(wt.type===5){if(wt.value.length===3){var Ct=wt.value.substring(0,1),zt=wt.value.substring(1,2),se=wt.value.substring(2,3);return hs(parseInt(Ct+Ct,16),parseInt(zt+zt,16),parseInt(se+se,16),1)}if(wt.value.length===4){var Ct=wt.value.substring(0,1),zt=wt.value.substring(1,2),se=wt.value.substring(2,3),Fe=wt.value.substring(3,4);return hs(parseInt(Ct+Ct,16),parseInt(zt+zt,16),parseInt(se+se,16),parseInt(Fe+Fe,16)/255)}if(wt.value.length===6){var Ct=wt.value.substring(0,2),zt=wt.value.substring(2,4),se=wt.value.substring(4,6);return hs(parseInt(Ct,16),parseInt(zt,16),parseInt(se,16),1)}if(wt.value.length===8){var Ct=wt.value.substring(0,2),zt=wt.value.substring(2,4),se=wt.value.substring(4,6),Fe=wt.value.substring(6,8);return hs(parseInt(Ct,16),parseInt(zt,16),parseInt(se,16),parseInt(Fe,16)/255)}}if(wt.type===20){var Xe=ss[wt.value.toUpperCase()];if(typeof Xe!="undefined")return Xe}return ss.TRANSPARENT}},Gs=function(St){return(255&St)===0},es=function(St){var wt=255&St,Ft=255&St>>8,Ct=255&St>>16,zt=255&St>>24;return wt<255?"rgba("+zt+","+Ct+","+Ft+","+wt/255+")":"rgb("+zt+","+Ct+","+Ft+")"},hs=function(St,wt,Ft,Ct){return(St<<24|wt<<16|Ft<<8|Math.round(Ct*255)<<0)>>>0},js=function(St,wt){if(St.type===17)return St.number;if(St.type===16){var Ft=wt===3?1:255;return wt===3?St.number/100*Ft:Math.round(St.number/100*Ft)}return 0},Oo=function(St,wt){var Ft=wt.filter(Vo);if(Ft.length===3){var Ct=Ft.map(js),zt=Ct[0],se=Ct[1],Fe=Ct[2];return hs(zt,se,Fe,1)}if(Ft.length===4){var Xe=Ft.map(js),zt=Xe[0],se=Xe[1],Fe=Xe[2],Ie=Xe[3];return hs(zt,se,Fe,Ie)}return 0};function so(St,wt,Ft){return Ft<0&&(Ft+=1),Ft>=1&&(Ft-=1),Ft<1/6?(wt-St)*Ft*6+St:Ft<1/2?wt:Ft<2/3?(wt-St)*6*(2/3-Ft)+St:St}var mo=function(St,wt){var Ft=wt.filter(Vo),Ct=Ft[0],zt=Ft[1],se=Ft[2],Fe=Ft[3],Xe=(Ct.type===17?wa(Ct.number):ws.parse(St,Ct))/(Math.PI*2),Ie=Wo(zt)?zt.number/100:0,bn=Wo(se)?se.number/100:0,Hn=typeof Fe!="undefined"&&Wo(Fe)?Zo(Fe,1):1;if(Ie===0)return hs(bn*255,bn*255,bn*255,1);var ei=bn<=.5?bn*(Ie+1):bn+Ie-bn*Ie,Di=bn*2-ei,Ir=so(Di,ei,Xe+1/3),pr=so(Di,ei,Xe),Sr=so(Di,ei,Xe-1/3);return hs(Ir*255,pr*255,Sr*255,Hn)},Xs={hsl:mo,hsla:mo,rgb:Oo,rgba:Oo},xs=function(St,wt){return tl.parse(St,Ts.create(wt).parseComponentValue())},ss={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},$i={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(St,wt){return wt.map(function(Ft){if(to(Ft))switch(Ft.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},cl={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},xe=function(St,wt){var Ft=tl.parse(St,wt[0]),Ct=wt[1];return Ct&&Wo(Ct)?{color:Ft,stop:Ct}:{color:Ft,stop:null}},On=function(St,wt){var Ft=St[0],Ct=St[St.length-1];Ft.stop===null&&(Ft.stop=ao),Ct.stop===null&&(Ct.stop=_a);for(var zt=[],se=0,Fe=0;Fe<St.length;Fe++){var Xe=St[Fe].stop;if(Xe!==null){var Ie=Zo(Xe,wt);Ie>se?zt.push(Ie):zt.push(se),se=Ie}else zt.push(null)}for(var bn=null,Fe=0;Fe<zt.length;Fe++){var Hn=zt[Fe];if(Hn===null)bn===null&&(bn=Fe);else if(bn!==null){for(var ei=Fe-bn,Di=zt[bn-1],Ir=(Hn-Di)/(ei+1),pr=1;pr<=ei;pr++)zt[bn+pr-1]=Ir*pr;bn=null}}return St.map(function(Sr,Ko){var $r=Sr.color;return{color:$r,stop:Math.max(Math.min(1,zt[Ko]/wt),0)}})},su=function(St,wt,Ft){var Ct=wt/2,zt=Ft/2,se=Zo(St[0],wt)-Ct,Fe=zt-Zo(St[1],Ft);return(Math.atan2(Fe,se)+Math.PI*2)%(Math.PI*2)},hA=function(St,wt,Ft){var Ct=typeof St=="number"?St:su(St,wt,Ft),zt=Math.abs(wt*Math.sin(Ct))+Math.abs(Ft*Math.cos(Ct)),se=wt/2,Fe=Ft/2,Xe=zt/2,Ie=Math.sin(Ct-Math.PI/2)*Xe,bn=Math.cos(Ct-Math.PI/2)*Xe;return[zt,se-bn,se+bn,Fe-Ie,Fe+Ie]},as=function(St,wt){return Math.sqrt(St*St+wt*wt)},dl=function(St,wt,Ft,Ct,zt){var se=[[0,0],[0,wt],[St,0],[St,wt]];return se.reduce(function(Fe,Xe){var Ie=Xe[0],bn=Xe[1],Hn=as(Ft-Ie,Ct-bn);return(zt?Hn<Fe.optimumDistance:Hn>Fe.optimumDistance)?{optimumCorner:Xe,optimumDistance:Hn}:Fe},{optimumDistance:zt?1/0:-1/0,optimumCorner:null}).optimumCorner},vu=function(St,wt,Ft,Ct,zt){var se=0,Fe=0;switch(St.size){case 0:St.shape===0?se=Fe=Math.min(Math.abs(wt),Math.abs(wt-Ct),Math.abs(Ft),Math.abs(Ft-zt)):St.shape===1&&(se=Math.min(Math.abs(wt),Math.abs(wt-Ct)),Fe=Math.min(Math.abs(Ft),Math.abs(Ft-zt)));break;case 2:if(St.shape===0)se=Fe=Math.min(as(wt,Ft),as(wt,Ft-zt),as(wt-Ct,Ft),as(wt-Ct,Ft-zt));else if(St.shape===1){var Xe=Math.min(Math.abs(Ft),Math.abs(Ft-zt))/Math.min(Math.abs(wt),Math.abs(wt-Ct)),Ie=dl(Ct,zt,wt,Ft,!0),bn=Ie[0],Hn=Ie[1];se=as(bn-wt,(Hn-Ft)/Xe),Fe=Xe*se}break;case 1:St.shape===0?se=Fe=Math.max(Math.abs(wt),Math.abs(wt-Ct),Math.abs(Ft),Math.abs(Ft-zt)):St.shape===1&&(se=Math.max(Math.abs(wt),Math.abs(wt-Ct)),Fe=Math.max(Math.abs(Ft),Math.abs(Ft-zt)));break;case 3:if(St.shape===0)se=Fe=Math.max(as(wt,Ft),as(wt,Ft-zt),as(wt-Ct,Ft),as(wt-Ct,Ft-zt));else if(St.shape===1){var Xe=Math.max(Math.abs(Ft),Math.abs(Ft-zt))/Math.max(Math.abs(wt),Math.abs(wt-Ct)),ei=dl(Ct,zt,wt,Ft,!1),bn=ei[0],Hn=ei[1];se=as(bn-wt,(Hn-Ft)/Xe),Fe=Xe*se}break}return Array.isArray(St.size)&&(se=Zo(St.size[0],Ct),Fe=St.size.length===2?Zo(St.size[1],zt):se),[se,Fe]},cA=function(St,wt){var Ft=wa(180),Ct=[];return zo(wt).forEach(function(zt,se){if(se===0){var Fe=zt[0];if(Fe.type===20&&Fe.value==="to"){Ft=AA(zt);return}else if(Gu(Fe)){Ft=ws.parse(St,Fe);return}}var Xe=xe(St,zt);Ct.push(Xe)}),{angle:Ft,stops:Ct,type:1}},au=function(St,wt){var Ft=wa(180),Ct=[];return zo(wt).forEach(function(zt,se){if(se===0){var Fe=zt[0];if(Fe.type===20&&["top","left","right","bottom"].indexOf(Fe.value)!==-1){Ft=AA(zt);return}else if(Gu(Fe)){Ft=(ws.parse(St,Fe)+wa(270))%wa(360);return}}var Xe=xe(St,zt);Ct.push(Xe)}),{angle:Ft,stops:Ct,type:1}},Ss=function(St,wt){var Ft=wa(180),Ct=[],zt=1,se=0,Fe=3,Xe=[];return zo(wt).forEach(function(Ie,bn){var Hn=Ie[0];if(bn===0){if(to(Hn)&&Hn.value==="linear"){zt=1;return}else if(to(Hn)&&Hn.value==="radial"){zt=2;return}}if(Hn.type===18){if(Hn.name==="from"){var ei=tl.parse(St,Hn.values[0]);Ct.push({stop:ao,color:ei})}else if(Hn.name==="to"){var ei=tl.parse(St,Hn.values[0]);Ct.push({stop:_a,color:ei})}else if(Hn.name==="color-stop"){var Di=Hn.values.filter(Vo);if(Di.length===2){var ei=tl.parse(St,Di[1]),Ir=Di[0];Cr(Ir)&&Ct.push({stop:{type:16,number:Ir.number*100,flags:Ir.flags},color:ei})}}}}),zt===1?{angle:(Ft+wa(180))%wa(360),stops:Ct,type:zt}:{size:Fe,shape:se,stops:Ct,position:Xe,type:zt}},_r="closest-side",xa="farthest-side",el="closest-corner",ms="farthest-corner",po="circle",Bs="ellipse",Na="cover",ns="contain",nl=function(St,wt){var Ft=0,Ct=3,zt=[],se=[];return zo(wt).forEach(function(Fe,Xe){var Ie=!0;if(Xe===0){var bn=!1;Ie=Fe.reduce(function(ei,Di){if(bn)if(to(Di))switch(Di.value){case"center":return se.push(da),ei;case"top":case"left":return se.push(ao),ei;case"right":case"bottom":return se.push(_a),ei}else(Wo(Di)||ys(Di))&&se.push(Di);else if(to(Di))switch(Di.value){case po:return Ft=0,!1;case Bs:return Ft=1,!1;case"at":return bn=!0,!1;case _r:return Ct=0,!1;case Na:case xa:return Ct=1,!1;case ns:case el:return Ct=2,!1;case ms:return Ct=3,!1}else if(ys(Di)||Wo(Di))return Array.isArray(Ct)||(Ct=[]),Ct.push(Di),!1;return ei},Ie)}if(Ie){var Hn=xe(St,Fe);zt.push(Hn)}}),{size:Ct,shape:Ft,stops:zt,position:se,type:2}},Vs=function(St,wt){var Ft=0,Ct=3,zt=[],se=[];return zo(wt).forEach(function(Fe,Xe){var Ie=!0;if(Xe===0?Ie=Fe.reduce(function(Hn,ei){if(to(ei))switch(ei.value){case"center":return se.push(da),!1;case"top":case"left":return se.push(ao),!1;case"right":case"bottom":return se.push(_a),!1}else if(Wo(ei)||ys(ei))return se.push(ei),!1;return Hn},Ie):Xe===1&&(Ie=Fe.reduce(function(Hn,ei){if(to(ei))switch(ei.value){case po:return Ft=0,!1;case Bs:return Ft=1,!1;case ns:case _r:return Ct=0,!1;case xa:return Ct=1,!1;case el:return Ct=2,!1;case Na:case ms:return Ct=3,!1}else if(ys(ei)||Wo(ei))return Array.isArray(Ct)||(Ct=[]),Ct.push(ei),!1;return Hn},Ie)),Ie){var bn=xe(St,Fe);zt.push(bn)}}),{size:Ct,shape:Ft,stops:zt,position:se,type:2}},zu=function(St){return St.type===1},Uo=function(St){return St.type===2},ea={name:"image",parse:function(St,wt){if(wt.type===22){var Ft={url:wt.value,type:0};return St.cache.addImage(wt.value),Ft}if(wt.type===18){var Ct=is[wt.name];if(typeof Ct=="undefined")throw new Error('Attempting to parse an unsupported image function "'+wt.name+'"');return Ct(St,wt.values)}throw new Error("Unsupported image type "+wt.type)}};function To(St){return!(St.type===20&&St.value==="none")&&(St.type!==18||!!is[St.name])}var is={"linear-gradient":cA,"-moz-linear-gradient":au,"-ms-linear-gradient":au,"-o-linear-gradient":au,"-webkit-linear-gradient":au,"radial-gradient":nl,"-moz-radial-gradient":Vs,"-ms-radial-gradient":Vs,"-o-radial-gradient":Vs,"-webkit-radial-gradient":Vs,"-webkit-gradient":Ss},cs={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(St,wt){if(wt.length===0)return[];var Ft=wt[0];return Ft.type===20&&Ft.value==="none"?[]:wt.filter(function(Ct){return Vo(Ct)&&To(Ct)}).map(function(Ct){return ea.parse(St,Ct)})}},Ms={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(St,wt){return wt.map(function(Ft){if(to(Ft))switch(Ft.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},_o={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(St,wt){return zo(wt).map(function(Ft){return Ft.filter(Wo)}).map(Fl)}},dA={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(St,wt){return zo(wt).map(function(Ft){return Ft.filter(to).map(function(Ct){return Ct.value}).join(" ")}).map(Rr)}},Rr=function(St){switch(St){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}},ju;(function(St){St.AUTO="auto",St.CONTAIN="contain",St.COVER="cover"})(ju||(ju={}));var Bo={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(St,wt){return zo(wt).map(function(Ft){return Ft.filter(Oh)})}},Oh=function(St){return to(St)||Wo(St)},Xl=function(St){return{name:"border-"+St+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},TA=Xl("top"),Hh=Xl("right"),ch=Xl("bottom"),lu=Xl("left"),uu=function(St){return{name:"border-radius-"+St,initialValue:"0 0",prefix:!1,type:1,parse:function(wt,Ft){return Fl(Ft.filter(Wo))}}},Ho=uu("top-left"),Ol=uu("top-right"),dh=uu("bottom-right"),yu=uu("bottom-left"),fA=function(St){return{name:"border-"+St+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(wt,Ft){switch(Ft){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},wu=fA("top"),wo=fA("right"),Qo=fA("bottom"),Us=fA("left"),na=function(St){return{name:"border-"+St+"-width",initialValue:"0",type:0,prefix:!1,parse:function(wt,Ft){return ps(Ft)?Ft.number:0}}},fa=na("top"),Vu=na("right"),xu=na("bottom"),Wu=na("left"),Hl={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Au={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(St,wt){switch(wt){case"rtl":return 1;case"ltr":default:return 0}}},qg={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(St,wt){return wt.filter(to).reduce(function(Ft,Ct){return Ft|$g(Ct.value)},0)}},$g=function(St){switch(St){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(St,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(St,wt){return wt.type===20&&wt.value==="normal"?0:wt.type===17||wt.type===15?wt.number:0}},Qs;(function(St){St.NORMAL="normal",St.STRICT="strict"})(Qs||(Qs={}));var NA={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(St,wt){switch(wt){case"strict":return Qs.STRICT;case"normal":default:return Qs.NORMAL}}},rs={name:"line-height",initialValue:"normal",prefix:!1,type:4},ga=function(St,wt){return to(St)&&St.value==="normal"?1.2*wt:St.type===17?wt*St.number:Wo(St)?Zo(St,wt):wt},Pa={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(St,wt){return wt.type===20&&wt.value==="none"?null:ea.parse(St,wt)}},Fa={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(St,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(St,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}}},ua=function(St){return{name:"margin-"+St,initialValue:"0",prefix:!1,type:4}},fh=ua("top"),ag=ua("right"),lg=ua("bottom"),fl=ua("left"),Fd={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(St,wt){return wt.filter(to).map(function(Ft){switch(Ft.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},ds={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(St,wt){switch(wt){case"break-word":return"break-word";case"normal":default:return"normal"}}},Su=function(St){return{name:"padding-"+St,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},cf=Su("top"),IA=Su("right"),UA=Su("bottom"),Ed=Su("left"),Aa={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(St,wt){switch(wt){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},Ea={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(St,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(St,wt){return wt.length===1&&ts(wt[0],"none")?[]:zo(wt).map(function(Ft){for(var Ct={color:ss.TRANSPARENT,offsetX:ao,offsetY:ao,blur:ao},zt=0,se=0;se<Ft.length;se++){var Fe=Ft[se];ys(Fe)?(zt===0?Ct.offsetX=Fe:zt===1?Ct.offsetY=Fe:Ct.blur=Fe,zt++):Ct.color=tl.parse(St,Fe)}return Ct})}},Rl={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(St,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(St,wt){if(wt.type===20&&wt.value==="none")return null;if(wt.type===18){var Ft=Bu[wt.name];if(typeof Ft=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+wt.name+'"');return Ft(wt.values)}return null}},El=function(St){var wt=St.filter(function(Ft){return Ft.type===17}).map(function(Ft){return Ft.number});return wt.length===6?wt:null},ia=function(St){var wt=St.filter(function(Ie){return Ie.type===17}).map(function(Ie){return Ie.number}),Ft=wt[0],Ct=wt[1];wt[2],wt[3];var zt=wt[4],se=wt[5];wt[6],wt[7],wt[8],wt[9],wt[10],wt[11];var Fe=wt[12],Xe=wt[13];return wt[14],wt[15],wt.length===16?[Ft,Ct,zt,se,Fe,Xe]:null},Bu={matrix:El,matrix3d:ia},Ll={type:16,number:50,flags:ui},La=[Ll,Ll],Jl={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(St,wt){var Ft=wt.filter(Wo);return Ft.length!==2?La:[Ft[0],Ft[1]]}},fs={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(St,wt){switch(wt){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},gl;(function(St){St.NORMAL="normal",St.BREAK_ALL="break-all",St.KEEP_ALL="keep-all"})(gl||(gl={}));for(var gA={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(St,wt){switch(wt){case"break-all":return gl.BREAK_ALL;case"keep-all":return gl.KEEP_ALL;case"normal":default:return gl.NORMAL}}},OA={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(St,wt){if(wt.type===20)return{auto:!0,order:0};if(Cr(wt))return{auto:!1,order:wt.number};throw new Error("Invalid z-index number parsed")}},HA={name:"time",parse:function(St,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(St,wt){return Cr(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(St,wt){return wt.filter(to).map(function(Ft){switch(Ft.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(Ft){return Ft!==0})}},Lo={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(St,wt){var Ft=[],Ct=[];return wt.forEach(function(zt){switch(zt.type){case 20:case 0:Ft.push(zt.value);break;case 17:Ft.push(zt.number.toString());break;case 4:Ct.push(Ft.join(" ")),Ft.length=0;break}}),Ft.length&&Ct.push(Ft.join(" ")),Ct.map(function(zt){return zt.indexOf(" ")===-1?zt:"'"+zt+"'"})}},Hc={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},df={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(St,wt){if(Cr(wt))return wt.number;if(to(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(St,wt){return wt.filter(to).map(function(Ft){return Ft.value})}},Cu={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(St,wt){switch(wt){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},pa=function(St,wt){return(St&wt)!==0},Rc={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(St,wt){if(wt.length===0)return[];var Ft=wt[0];return Ft.type===20&&Ft.value==="none"?[]:wt}},ep={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(St,wt){if(wt.length===0)return null;var Ft=wt[0];if(Ft.type===20&&Ft.value==="none")return null;for(var Ct=[],zt=wt.filter(yo),se=0;se<zt.length;se++){var Fe=zt[se],Xe=zt[se+1];if(Fe.type===20){var Ie=Xe&&Cr(Xe)?Xe.number:1;Ct.push({counter:Fe.value,increment:Ie})}}return Ct}},_h={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(St,wt){if(wt.length===0)return[];for(var Ft=[],Ct=wt.filter(yo),zt=0;zt<Ct.length;zt++){var se=Ct[zt],Fe=Ct[zt+1];if(to(se)&&se.value!=="none"){var Xe=Fe&&Cr(Fe)?Fe.number:0;Ft.push({counter:se.value,reset:Xe})}}return Ft}},Md={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(St,wt){return wt.filter(ps).map(function(Ft){return HA.parse(St,Ft)})}},Kh={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(St,wt){if(wt.length===0)return null;var Ft=wt[0];if(Ft.type===20&&Ft.value==="none")return null;var Ct=[],zt=wt.filter(oo);if(zt.length%2!==0)return null;for(var se=0;se<zt.length;se+=2){var Fe=zt[se].value,Xe=zt[se+1].value;Ct.push({open:Fe,close:Xe})}return Ct}},Gh=function(St,wt,Ft){if(!St)return"";var Ct=St[Math.min(wt,St.length-1)];return Ct?Ft?Ct.open:Ct.close:""},_c={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(St,wt){return wt.length===1&&ts(wt[0],"none")?[]:zo(wt).map(function(Ft){for(var Ct={color:255,offsetX:ao,offsetY:ao,blur:ao,spread:ao,inset:!1},zt=0,se=0;se<Ft.length;se++){var Fe=Ft[se];ts(Fe,"inset")?Ct.inset=!0:ys(Fe)?(zt===0?Ct.offsetX=Fe:zt===1?Ct.offsetY=Fe:zt===2?Ct.blur=Fe:Ct.spread=Fe,zt++):Ct.color=tl.parse(St,Fe)}return Ct})}},ff={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(St,wt){var Ft=[0,1,2],Ct=[];return wt.filter(to).forEach(function(zt){switch(zt.value){case"stroke":Ct.push(1);break;case"fill":Ct.push(0);break;case"markers":Ct.push(2);break}}),Ft.forEach(function(zt){Ct.indexOf(zt)===-1&&Ct.push(zt)}),Ct}},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(St,wt){return ps(wt)?wt.number:0}},RA=function(){function St(wt,Ft){var Ct,zt;this.animationDuration=zr(wt,Md,Ft.animationDuration),this.backgroundClip=zr(wt,$i,Ft.backgroundClip),this.backgroundColor=zr(wt,cl,Ft.backgroundColor),this.backgroundImage=zr(wt,cs,Ft.backgroundImage),this.backgroundOrigin=zr(wt,Ms,Ft.backgroundOrigin),this.backgroundPosition=zr(wt,_o,Ft.backgroundPosition),this.backgroundRepeat=zr(wt,dA,Ft.backgroundRepeat),this.backgroundSize=zr(wt,Bo,Ft.backgroundSize),this.borderTopColor=zr(wt,TA,Ft.borderTopColor),this.borderRightColor=zr(wt,Hh,Ft.borderRightColor),this.borderBottomColor=zr(wt,ch,Ft.borderBottomColor),this.borderLeftColor=zr(wt,lu,Ft.borderLeftColor),this.borderTopLeftRadius=zr(wt,Ho,Ft.borderTopLeftRadius),this.borderTopRightRadius=zr(wt,Ol,Ft.borderTopRightRadius),this.borderBottomRightRadius=zr(wt,dh,Ft.borderBottomRightRadius),this.borderBottomLeftRadius=zr(wt,yu,Ft.borderBottomLeftRadius),this.borderTopStyle=zr(wt,wu,Ft.borderTopStyle),this.borderRightStyle=zr(wt,wo,Ft.borderRightStyle),this.borderBottomStyle=zr(wt,Qo,Ft.borderBottomStyle),this.borderLeftStyle=zr(wt,Us,Ft.borderLeftStyle),this.borderTopWidth=zr(wt,fa,Ft.borderTopWidth),this.borderRightWidth=zr(wt,Vu,Ft.borderRightWidth),this.borderBottomWidth=zr(wt,xu,Ft.borderBottomWidth),this.borderLeftWidth=zr(wt,Wu,Ft.borderLeftWidth),this.boxShadow=zr(wt,_c,Ft.boxShadow),this.color=zr(wt,Hl,Ft.color),this.direction=zr(wt,Au,Ft.direction),this.display=zr(wt,qg,Ft.display),this.float=zr(wt,tp,Ft.cssFloat),this.fontFamily=zr(wt,Lo,Ft.fontFamily),this.fontSize=zr(wt,Hc,Ft.fontSize),this.fontStyle=zr(wt,Cu,Ft.fontStyle),this.fontVariant=zr(wt,Ld,Ft.fontVariant),this.fontWeight=zr(wt,df,Ft.fontWeight),this.letterSpacing=zr(wt,sg,Ft.letterSpacing),this.lineBreak=zr(wt,NA,Ft.lineBreak),this.lineHeight=zr(wt,rs,Ft.lineHeight),this.listStyleImage=zr(wt,Pa,Ft.listStyleImage),this.listStylePosition=zr(wt,Fa,Ft.listStylePosition),this.listStyleType=zr(wt,DA,Ft.listStyleType),this.marginTop=zr(wt,fh,Ft.marginTop),this.marginRight=zr(wt,ag,Ft.marginRight),this.marginBottom=zr(wt,lg,Ft.marginBottom),this.marginLeft=zr(wt,fl,Ft.marginLeft),this.opacity=zr(wt,Qc,Ft.opacity);var se=zr(wt,Fd,Ft.overflow);this.overflowX=se[0],this.overflowY=se[se.length>1?1:0],this.overflowWrap=zr(wt,ds,Ft.overflowWrap),this.paddingTop=zr(wt,cf,Ft.paddingTop),this.paddingRight=zr(wt,IA,Ft.paddingRight),this.paddingBottom=zr(wt,UA,Ft.paddingBottom),this.paddingLeft=zr(wt,Ed,Ft.paddingLeft),this.paintOrder=zr(wt,ff,Ft.paintOrder),this.position=zr(wt,Ea,Ft.position),this.textAlign=zr(wt,Aa,Ft.textAlign),this.textDecorationColor=zr(wt,Rh,(Ct=Ft.textDecorationColor)!==null&&Ct!==void 0?Ct:Ft.color),this.textDecorationLine=zr(wt,Oc,(zt=Ft.textDecorationLine)!==null&&zt!==void 0?zt:Ft.textDecoration),this.textShadow=zr(wt,gh,Ft.textShadow),this.textTransform=zr(wt,Rl,Ft.textTransform),this.transform=zr(wt,QA,Ft.transform),this.transformOrigin=zr(wt,Jl,Ft.transformOrigin),this.visibility=zr(wt,fs,Ft.visibility),this.webkitTextStrokeColor=zr(wt,Kc,Ft.webkitTextStrokeColor),this.webkitTextStrokeWidth=zr(wt,zh,Ft.webkitTextStrokeWidth),this.wordBreak=zr(wt,gA,Ft.wordBreak),this.zIndex=zr(wt,OA,Ft.zIndex)}return St.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},St.prototype.isTransparent=function(){return Gs(this.backgroundColor)},St.prototype.isTransformed=function(){return this.transform!==null},St.prototype.isPositioned=function(){return this.position!==0},St.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},St.prototype.isFloating=function(){return this.float!==0},St.prototype.isInlineLevel=function(){return pa(this.display,4)||pa(this.display,33554432)||pa(this.display,268435456)||pa(this.display,536870912)||pa(this.display,67108864)||pa(this.display,134217728)},St}(),il=function(){function St(wt,Ft){this.content=zr(wt,Rc,Ft.content),this.quotes=zr(wt,Kh,Ft.quotes)}return St}(),Pu=function(){function St(wt,Ft){this.counterIncrement=zr(wt,ep,Ft.counterIncrement),this.counterReset=zr(wt,_h,Ft.counterReset)}return St}(),zr=function(St,wt,Ft){var Ct=new xo,zt=Ft!==null&&typeof Ft!="undefined"?Ft.toString():wt.initialValue;Ct.write(zt);var se=new Ts(Ct.read());switch(wt.type){case 2:var Fe=se.parseComponentValue();return wt.parse(St,to(Fe)?Fe.value:wt.initialValue);case 0:return wt.parse(St,se.parseComponentValue());case 1:return wt.parse(St,se.parseComponentValues());case 4:return se.parseComponentValue();case 3:switch(wt.format){case"angle":return ws.parse(St,se.parseComponentValue());case"color":return tl.parse(St,se.parseComponentValue());case"image":return ea.parse(St,se.parseComponentValue());case"length":var Xe=se.parseComponentValue();return ys(Xe)?Xe:ao;case"length-percentage":var Ie=se.parseComponentValue();return Wo(Ie)?Ie:ao;case"time":return HA.parse(St,se.parseComponentValue())}break}},pA="data-html2canvas-debug",bd=function(St){var wt=St.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(St,wt){var Ft=bd(St);return Ft===1||wt===Ft},Fu=function(){function St(wt,Ft){if(this.context=wt,this.textNodes=[],this.elements=[],this.flags=0,jh(Ft,3))debugger;this.styles=new RA(wt,window.getComputedStyle(Ft,null)),oc(Ft)&&(this.styles.animationDuration.some(function(Ct){return Ct>0})&&(Ft.style.animationDuration="0s"),this.styles.transform!==null&&(Ft.style.transform="none")),this.bounds=Rt(this.context,Ft),jh(Ft,4)&&(this.flags|=16)}return St}(),_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 Ka=function(St){var wt=St.length*.75,Ft=St.length,Ct,zt=0,se,Fe,Xe,Ie;St[St.length-1]==="="&&(wt--,St[St.length-2]==="="&&wt--);var bn=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(wt):new Array(wt),Hn=Array.isArray(bn)?bn:new Uint8Array(bn);for(Ct=0;Ct<Ft;Ct+=4)se=Vh[St.charCodeAt(Ct)],Fe=Vh[St.charCodeAt(Ct+1)],Xe=Vh[St.charCodeAt(Ct+2)],Ie=Vh[St.charCodeAt(Ct+3)],Hn[zt++]=se<<2|Fe>>4,Hn[zt++]=(Fe&15)<<4|Xe>>2,Hn[zt++]=(Xe&3)<<6|Ie&63;return bn},mh=function(St){for(var wt=St.length,Ft=[],Ct=0;Ct<wt;Ct+=2)Ft.push(St[Ct+1]<<8|St[Ct]);return Ft},gf=function(St){for(var wt=St.length,Ft=[],Ct=0;Ct<wt;Ct+=4)Ft.push(St[Ct+3]<<24|St[Ct+2]<<16|St[Ct+1]<<8|St[Ct]);return Ft},Eu=5,vh=11,Lu=2,Gc=vh-Eu,kd=65536>>Eu,ra=1<<Eu,yh=ra-1,GA=1024>>Eu,wh=kd+GA,zc=wh,pf=32,Wh=zc+pf,ug=65536>>vh,xh=1<<Gc,ql=xh-1,mf=function(St,wt,Ft){return St.slice?St.slice(wt,Ft):new Uint16Array(Array.prototype.slice.call(St,wt,Ft))},vf=function(St,wt,Ft){return St.slice?St.slice(wt,Ft):new Uint32Array(Array.prototype.slice.call(St,wt,Ft))},Sh=function(St,wt){var Ft=Ka(St),Ct=Array.isArray(Ft)?gf(Ft):new Uint32Array(Ft),zt=Array.isArray(Ft)?mh(Ft):new Uint16Array(Ft),se=24,Fe=mf(zt,se/2,Ct[4]/2),Xe=Ct[5]===2?mf(zt,(se+Ct[4])/2):vf(Ct,Math.ceil((se+Ct[4])/4));return new Zh(Ct[0],Ct[1],Ct[2],Ct[3],Fe,Xe)},Zh=function(){function St(wt,Ft,Ct,zt,se,Fe){this.initialValue=wt,this.errorValue=Ft,this.highStart=Ct,this.highValueIndex=zt,this.index=se,this.data=Fe}return St.prototype.get=function(wt){var Ft;if(wt>=0){if(wt<55296||wt>56319&&wt<=65535)return Ft=this.index[wt>>Eu],Ft=(Ft<<Lu)+(wt&yh),this.data[Ft];if(wt<=65535)return Ft=this.index[kd+(wt-55296>>Eu)],Ft=(Ft<<Lu)+(wt&yh),this.data[Ft];if(wt<this.highStart)return Ft=Wh-ug+(wt>>vh),Ft=this.index[Ft],Ft+=wt>>Eu&ql,Ft=this.index[Ft],Ft=(Ft<<Lu)+(wt&yh),this.data[Ft];if(wt<=1114111)return this.data[this.highValueIndex]}return this.errorValue},St}(),zs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",mA=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),jc=0;jc<zs.length;jc++)mA[zs.charCodeAt(jc)]=jc;var Td=1,Nd=2,Re=3,zA=4,Mu=5,Ag=7,Dd=8,Id=9,Vc=10,hg=11,Ma=12,Yh=13,Ud=14,Qd=15,cg=function(St){for(var wt=[],Ft=0,Ct=St.length;Ft<Ct;){var zt=St.charCodeAt(Ft++);if(zt>=55296&&zt<=56319&&Ft<Ct){var se=St.charCodeAt(Ft++);(se&64512)===56320?wt.push(((zt&1023)<<10)+(se&1023)+65536):(wt.push(zt),Ft--)}else wt.push(zt)}return wt},dg=function(){for(var St=[],wt=0;wt<arguments.length;wt++)St[wt]=arguments[wt];if(String.fromCodePoint)return String.fromCodePoint.apply(String,St);var Ft=St.length;if(!Ft)return"";for(var Ct=[],zt=-1,se="";++zt<Ft;){var Fe=St[zt];Fe<=65535?Ct.push(Fe):(Fe-=65536,Ct.push((Fe>>10)+55296,Fe%1024+56320)),(zt+1===Ft||Ct.length>16384)&&(se+=String.fromCharCode.apply(String,Ct),Ct.length=0)}return se},fg=Sh(_A),_l="\xD7",pl="\xF7",Xh=function(St){return fg.get(St)},yf=function(St,wt,Ft){var Ct=Ft-2,zt=wt[Ct],se=wt[Ft-1],Fe=wt[Ft];if(se===Nd&&Fe===Re)return _l;if(se===Nd||se===Re||se===zA||Fe===Nd||Fe===Re||Fe===zA)return pl;if(se===Dd&&[Dd,Id,hg,Ma].indexOf(Fe)!==-1||(se===hg||se===Id)&&(Fe===Id||Fe===Vc)||(se===Ma||se===Vc)&&Fe===Vc||Fe===Yh||Fe===Mu||Fe===Ag||se===Td)return _l;if(se===Yh&&Fe===Ud){for(;zt===Mu;)zt=wt[--Ct];if(zt===Ud)return _l}if(se===Qd&&Fe===Qd){for(var Xe=0;zt===Qd;)Xe++,zt=wt[--Ct];if(Xe%2===0)return _l}return pl},Zu=function(St){var wt=cg(St),Ft=wt.length,Ct=0,zt=0,se=wt.map(Xh);return{next:function(){if(Ct>=Ft)return{done:!0,value:null};for(var Fe=_l;Ct<Ft&&(Fe=yf(wt,se,++Ct))===_l;);if(Fe!==_l||Ct===Ft){var Xe=dg.apply(null,wt.slice(zt,Ct));return zt=Ct,{value:Xe,done:!1}}return{done:!0,value:null}}}},Wc=function(St){for(var wt=Zu(St),Ft=[],Ct;!(Ct=wt.next()).done;)Ct.value&&Ft.push(Ct.value.slice());return Ft},Od=function(St){var wt=123;if(St.createRange){var Ft=St.createRange();if(Ft.getBoundingClientRect){var Ct=St.createElement("boundtest");Ct.style.height=wt+"px",Ct.style.display="block",St.body.appendChild(Ct),Ft.selectNode(Ct);var zt=Ft.getBoundingClientRect(),se=Math.round(zt.height);if(St.body.removeChild(Ct),se===wt)return!0}}return!1},Zc=function(St){var wt=St.createElement("boundtest");wt.style.width="50px",wt.style.display="block",wt.style.fontSize="12px",wt.style.letterSpacing="0px",wt.style.wordSpacing="0px",St.body.appendChild(wt);var Ft=St.createRange();wt.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var Ct=wt.firstChild,zt=ue(Ct.data).map(function(Ie){return ce(Ie)}),se=0,Fe={},Xe=zt.every(function(Ie,bn){Ft.setStart(Ct,se),Ft.setEnd(Ct,se+Ie.length);var Hn=Ft.getBoundingClientRect();se+=Ie.length;var ei=Hn.x>Fe.x||Hn.y>Fe.y;return Fe=Hn,bn===0?!0:ei});return St.body.removeChild(wt),Xe},Ml=function(){return typeof new Image().crossOrigin!="undefined"},wf=function(){return typeof new XMLHttpRequest().responseType=="string"},xf=function(St){var wt=new Image,Ft=St.createElement("canvas"),Ct=Ft.getContext("2d");if(!Ct)return!1;wt.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{Ct.drawImage(wt,0,0),Ft.toDataURL()}catch(zt){return!1}return!0},Kl=function(St){return St[0]===0&&St[1]===255&&St[2]===0&&St[3]===255},Jh=function(St){var wt=St.createElement("canvas"),Ft=100;wt.width=Ft,wt.height=Ft;var Ct=wt.getContext("2d");if(!Ct)return Promise.reject(!1);Ct.fillStyle="rgb(0, 255, 0)",Ct.fillRect(0,0,Ft,Ft);var zt=new Image,se=wt.toDataURL();zt.src=se;var Fe=Yc(Ft,Ft,0,0,zt);return Ct.fillStyle="red",Ct.fillRect(0,0,Ft,Ft),Sf(Fe).then(function(Xe){Ct.drawImage(Xe,0,0);var Ie=Ct.getImageData(0,0,Ft,Ft).data;Ct.fillStyle="red",Ct.fillRect(0,0,Ft,Ft);var bn=St.createElement("div");return bn.style.backgroundImage="url("+se+")",bn.style.height=Ft+"px",Kl(Ie)?Sf(Yc(Ft,Ft,0,0,bn)):Promise.reject(!1)}).then(function(Xe){return Ct.drawImage(Xe,0,0),Kl(Ct.getImageData(0,0,Ft,Ft).data)}).catch(function(){return!1})},Yc=function(St,wt,Ft,Ct,zt){var se="http://www.w3.org/2000/svg",Fe=document.createElementNS(se,"svg"),Xe=document.createElementNS(se,"foreignObject");return Fe.setAttributeNS(null,"width",St.toString()),Fe.setAttributeNS(null,"height",wt.toString()),Xe.setAttributeNS(null,"width","100%"),Xe.setAttributeNS(null,"height","100%"),Xe.setAttributeNS(null,"x",Ft.toString()),Xe.setAttributeNS(null,"y",Ct.toString()),Xe.setAttributeNS(null,"externalResourcesRequired","true"),Fe.appendChild(Xe),Xe.appendChild(zt),Fe},Sf=function(St){return new Promise(function(wt,Ft){var Ct=new Image;Ct.onload=function(){return wt(Ct)},Ct.onerror=Ft,Ct.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(St))})},ha={get SUPPORT_RANGE_BOUNDS(){var St=Od(document);return Object.defineProperty(ha,"SUPPORT_RANGE_BOUNDS",{value:St}),St},get SUPPORT_WORD_BREAKING(){var St=ha.SUPPORT_RANGE_BOUNDS&&Zc(document);return Object.defineProperty(ha,"SUPPORT_WORD_BREAKING",{value:St}),St},get SUPPORT_SVG_DRAWING(){var St=xf(document);return Object.defineProperty(ha,"SUPPORT_SVG_DRAWING",{value:St}),St},get SUPPORT_FOREIGNOBJECT_DRAWING(){var St=typeof Array.from=="function"&&typeof window.fetch=="function"?Jh(document):Promise.resolve(!1);return Object.defineProperty(ha,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:St}),St},get SUPPORT_CORS_IMAGES(){var St=Ml();return Object.defineProperty(ha,"SUPPORT_CORS_IMAGES",{value:St}),St},get SUPPORT_RESPONSE_TYPE(){var St=wf();return Object.defineProperty(ha,"SUPPORT_RESPONSE_TYPE",{value:St}),St},get SUPPORT_CORS_XHR(){var St="withCredentials"in new XMLHttpRequest;return Object.defineProperty(ha,"SUPPORT_CORS_XHR",{value:St}),St},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var St=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(ha,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:St}),St}},Da=function(){function St(wt,Ft){this.text=wt,this.bounds=Ft}return St}(),Bf=function(St,wt,Ft,Ct){var zt=tc(wt,Ft),se=[],Fe=0;return zt.forEach(function(Xe){if(Ft.textDecorationLine.length||Xe.trim().length>0)if(ha.SUPPORT_RANGE_BOUNDS){var Ie=qh(Ct,Fe,Xe.length).getClientRects();if(Ie.length>1){var bn=$h(Xe),Hn=0;bn.forEach(function(Di){se.push(new Da(Di,de.fromDOMRectList(St,qh(Ct,Hn+Fe,Di.length).getClientRects()))),Hn+=Di.length})}else se.push(new Da(Xe,de.fromDOMRectList(St,Ie)))}else{var ei=Ct.splitText(Xe.length);se.push(new Da(Xe,oa(St,Ct))),Ct=ei}else ha.SUPPORT_RANGE_BOUNDS||(Ct=Ct.splitText(Xe.length));Fe+=Xe.length}),se},oa=function(St,wt){var Ft=wt.ownerDocument;if(Ft){var Ct=Ft.createElement("html2canvaswrapper");Ct.appendChild(wt.cloneNode(!0));var zt=wt.parentNode;if(zt){zt.replaceChild(Ct,wt);var se=Rt(St,Ct);return Ct.firstChild&&zt.replaceChild(Ct.firstChild,Ct),se}}return de.EMPTY},qh=function(St,wt,Ft){var Ct=St.ownerDocument;if(!Ct)throw new Error("Node has no owner document");var zt=Ct.createRange();return zt.setStart(St,wt),zt.setEnd(St,wt+Ft),zt},$h=function(St){if(ha.SUPPORT_NATIVE_TEXT_SEGMENTATION){var wt=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(wt.segment(St)).map(function(Ft){return Ft.segment})}return Wc(St)},jA=function(St,wt){if(ha.SUPPORT_NATIVE_TEXT_SEGMENTATION){var Ft=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(Ft.segment(St)).map(function(Ct){return Ct.segment})}return Cf(St,wt)},tc=function(St,wt){return wt.letterSpacing!==0?$h(St):jA(St,wt)},ec=[32,160,4961,65792,65793,4153,4241],Cf=function(St,wt){for(var Ft=Ai(St,{lineBreak:wt.lineBreak,wordBreak:wt.overflowWrap==="break-word"?"break-word":wt.wordBreak}),Ct=[],zt,se=function(){if(zt.value){var Fe=zt.value.slice(),Xe=ue(Fe),Ie="";Xe.forEach(function(bn){ec.indexOf(bn)===-1?Ie+=ce(bn):(Ie.length&&Ct.push(Ie),Ct.push(ce(bn)),Ie="")}),Ie.length&&Ct.push(Ie)}};!(zt=Ft.next()).done;)se();return Ct},nc=function(){function St(wt,Ft,Ct){this.text=Pf(Ft.data,Ct.textTransform),this.textBounds=Bf(wt,this.text,Ct,Ft)}return St}(),Pf=function(St,wt){switch(wt){case 1:return St.toLowerCase();case 3:return St.replace(Yu,Bh);case 2:return St.toUpperCase();default:return St}},Yu=/(^|\s|:|-|\(|\))([a-z])/g,Bh=function(St,wt,Ft){return St.length>0?wt+Ft.toUpperCase():St},Xc=function(St){Ot(wt,St);function wt(Ft,Ct){var zt=St.call(this,Ft,Ct)||this;return zt.src=Ct.currentSrc||Ct.src,zt.intrinsicWidth=Ct.naturalWidth,zt.intrinsicHeight=Ct.naturalHeight,zt.context.cache.addImage(zt.src),zt}return wt}(Fu),Jc=function(St){Ot(wt,St);function wt(Ft,Ct){var zt=St.call(this,Ft,Ct)||this;return zt.canvas=Ct,zt.intrinsicWidth=Ct.width,zt.intrinsicHeight=Ct.height,zt}return wt}(Fu),qc=function(St){Ot(wt,St);function wt(Ft,Ct){var zt=St.call(this,Ft,Ct)||this,se=new XMLSerializer,Fe=Rt(Ft,Ct);return Ct.setAttribute("width",Fe.width+"px"),Ct.setAttribute("height",Fe.height+"px"),zt.svg="data:image/svg+xml,"+encodeURIComponent(se.serializeToString(Ct)),zt.intrinsicWidth=Ct.width.baseVal.value,zt.intrinsicHeight=Ct.height.baseVal.value,zt.context.cache.addImage(zt.svg),zt}return wt}(Fu),VA=function(St){Ot(wt,St);function wt(Ft,Ct){var zt=St.call(this,Ft,Ct)||this;return zt.value=Ct.value,zt}return wt}(Fu),$c=function(St){Ot(wt,St);function wt(Ft,Ct){var zt=St.call(this,Ft,Ct)||this;return zt.start=Ct.start,zt.reversed=typeof Ct.reversed=="boolean"&&Ct.reversed===!0,zt}return wt}(Fu),Ff=[{type:15,flags:0,unit:"px",number:3}],Ef=[{type:16,flags:0,number:50}],bu=function(St){return St.width>St.height?new de(St.left+(St.width-St.height)/2,St.top,St.height,St.height):St.width<St.height?new de(St.left,St.top+(St.height-St.width)/2,St.width,St.width):St},gg=function(St){var wt=St.type===Ch?new Array(St.value.length+1).join("\u2022"):St.value;return wt.length===0?St.placeholder||"":wt},ic="checkbox",vA="radio",Ch="password",Hd=707406591,$l=function(St){Ot(wt,St);function wt(Ft,Ct){var zt=St.call(this,Ft,Ct)||this;switch(zt.type=Ct.type.toLowerCase(),zt.checked=Ct.checked,zt.value=gg(Ct),(zt.type===ic||zt.type===vA)&&(zt.styles.backgroundColor=3739148031,zt.styles.borderTopColor=zt.styles.borderRightColor=zt.styles.borderBottomColor=zt.styles.borderLeftColor=2779096575,zt.styles.borderTopWidth=zt.styles.borderRightWidth=zt.styles.borderBottomWidth=zt.styles.borderLeftWidth=1,zt.styles.borderTopStyle=zt.styles.borderRightStyle=zt.styles.borderBottomStyle=zt.styles.borderLeftStyle=1,zt.styles.backgroundClip=[0],zt.styles.backgroundOrigin=[0],zt.bounds=bu(zt.bounds)),zt.type){case ic:zt.styles.borderTopRightRadius=zt.styles.borderTopLeftRadius=zt.styles.borderBottomRightRadius=zt.styles.borderBottomLeftRadius=Ff;break;case vA:zt.styles.borderTopRightRadius=zt.styles.borderTopLeftRadius=zt.styles.borderBottomRightRadius=zt.styles.borderBottomLeftRadius=Ef;break}return zt}return wt}(Fu),Rd=function(St){Ot(wt,St);function wt(Ft,Ct){var zt=St.call(this,Ft,Ct)||this,se=Ct.options[Ct.selectedIndex||0];return zt.value=se&&se.text||"",zt}return wt}(Fu),td=function(St){Ot(wt,St);function wt(Ft,Ct){var zt=St.call(this,Ft,Ct)||this;return zt.value=Ct.value,zt}return wt}(Fu),Lf=function(St){Ot(wt,St);function wt(Ft,Ct){var zt=St.call(this,Ft,Ct)||this;zt.src=Ct.src,zt.width=parseInt(Ct.width,10)||0,zt.height=parseInt(Ct.height,10)||0,zt.backgroundColor=zt.styles.backgroundColor;try{if(Ct.contentWindow&&Ct.contentWindow.document&&Ct.contentWindow.document.documentElement){zt.tree=bf(Ft,Ct.contentWindow.document.documentElement);var se=Ct.contentWindow.document.documentElement?xs(Ft,getComputedStyle(Ct.contentWindow.document.documentElement).backgroundColor):ss.TRANSPARENT,Fe=Ct.contentWindow.document.body?xs(Ft,getComputedStyle(Ct.contentWindow.document.body).backgroundColor):ss.TRANSPARENT;zt.backgroundColor=Gs(se)?Gs(Fe)?zt.styles.backgroundColor:Fe:se}}catch(Xe){}return zt}return wt}(Fu),Mf=["OL","UL","MENU"],rc=function(St,wt,Ft,Ct){for(var zt=wt.firstChild,se=void 0;zt;zt=se)if(se=zt.nextSibling,ed(zt)&&zt.data.trim().length>0)Ft.textNodes.push(new nc(St,zt,Ft.styles));else if(Ph(zt))if(zd(zt)&&zt.assignedNodes)zt.assignedNodes().forEach(function(Xe){return rc(St,Xe,Ft,Ct)});else{var Fe=pg(St,zt);Fe.styles.isVisible()&&(_d(zt,Fe,Ct)?Fe.flags|=4:Kd(Fe.styles)&&(Fe.flags|=2),Mf.indexOf(zt.tagName)!==-1&&(Fe.flags|=8),Ft.elements.push(Fe),zt.slot,zt.shadowRoot?rc(St,zt.shadowRoot,Fe,Ct):!sc(zt)&&!Tf(zt)&&!ac(zt)&&rc(St,zt,Fe,Ct))}},pg=function(St,wt){return ca(wt)?new Xc(St,wt):Fh(wt)?new Jc(St,wt):Tf(wt)?new qc(St,wt):kf(wt)?new VA(St,wt):nd(wt)?new $c(St,wt):mg(wt)?new $l(St,wt):ac(wt)?new Rd(St,wt):sc(wt)?new td(St,wt):rl(wt)?new Lf(St,wt):new Fu(St,wt)},bf=function(St,wt){var Ft=pg(St,wt);return Ft.flags|=4,rc(St,wt,Ft,Ft),Ft},_d=function(St,wt,Ft){return wt.styles.isPositionedWithZIndex()||wt.styles.opacity<1||wt.styles.isTransformed()||Yo(St)&&Ft.styles.isTransparent()},Kd=function(St){return St.isPositioned()||St.isFloating()},ed=function(St){return St.nodeType===Node.TEXT_NODE},Ph=function(St){return St.nodeType===Node.ELEMENT_NODE},oc=function(St){return Ph(St)&&typeof St.style!="undefined"&&!ku(St)},ku=function(St){return typeof St.className=="object"},kf=function(St){return St.tagName==="LI"},nd=function(St){return St.tagName==="OL"},mg=function(St){return St.tagName==="INPUT"},Gd=function(St){return St.tagName==="HTML"},Tf=function(St){return St.tagName==="svg"},Yo=function(St){return St.tagName==="BODY"},Fh=function(St){return St.tagName==="CANVAS"},WA=function(St){return St.tagName==="VIDEO"},ca=function(St){return St.tagName==="IMG"},rl=function(St){return St.tagName==="IFRAME"},ZA=function(St){return St.tagName==="STYLE"},id=function(St){return St.tagName==="SCRIPT"},sc=function(St){return St.tagName==="TEXTAREA"},ac=function(St){return St.tagName==="SELECT"},zd=function(St){return St.tagName==="SLOT"},jd=function(St){return St.tagName.indexOf("-")>0},Nf=function(){function St(){this.counters={}}return St.prototype.getCounterValue=function(wt){var Ft=this.counters[wt];return Ft&&Ft.length?Ft[Ft.length-1]:1},St.prototype.getCounterValues=function(wt){var Ft=this.counters[wt];return Ft||[]},St.prototype.pop=function(wt){var Ft=this;wt.forEach(function(Ct){return Ft.counters[Ct].pop()})},St.prototype.parse=function(wt){var Ft=this,Ct=wt.counterIncrement,zt=wt.counterReset,se=!0;Ct!==null&&Ct.forEach(function(Xe){var Ie=Ft.counters[Xe.counter];Ie&&Xe.increment!==0&&(se=!1,Ie.length||Ie.push(1),Ie[Math.max(0,Ie.length-1)]+=Xe.increment)});var Fe=[];return se&&zt.forEach(function(Xe){var Ie=Ft.counters[Xe.counter];Fe.push(Xe.counter),Ie||(Ie=Ft.counters[Xe.counter]=[]),Ie.push(Xe.reset)}),Fe},St}(),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"]},Cs={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(St,wt,Ft,Ct,zt,se){return St<wt||St>Ft?dt(St,zt,se.length>0):Ct.integers.reduce(function(Fe,Xe,Ie){for(;St>=Xe;)St-=Xe,Fe+=Ct.values[Ie];return Fe},"")+se},Vd=function(St,wt,Ft,Ct){var zt="";do Ft||St--,zt=Ct(St)+zt,St/=wt;while(St*wt>=wt);return zt},Js=function(St,wt,Ft,Ct,zt){var se=Ft-wt+1;return(St<0?"-":"")+(Vd(Math.abs(St),se,Ct,function(Fe){return ce(Math.floor(Fe%se)+wt)})+zt)},hu=function(St,wt,Ft){Ft===void 0&&(Ft=". ");var Ct=wt.length;return Vd(Math.abs(St),Ct,!1,function(zt){return wt[Math.floor(zt%Ct)]})+Ft},Xu=1,xA=2,Os=4,uc=8,Gl=function(St,wt,Ft,Ct,zt,se){if(St<-9999||St>9999)return dt(St,4,zt.length>0);var Fe=Math.abs(St),Xe=zt;if(Fe===0)return wt[0]+Xe;for(var Ie=0;Fe>0&&Ie<=4;Ie++){var bn=Fe%10;bn===0&&pa(se,Xu)&&Xe!==""?Xe=wt[bn]+Xe:bn>1||bn===1&&Ie===0||bn===1&&Ie===1&&pa(se,xA)||bn===1&&Ie===1&&pa(se,Os)&&St>100||bn===1&&Ie>1&&pa(se,uc)?Xe=wt[bn]+(Ie>0?Ft[Ie-1]:"")+Xe:bn===1&&Ie>0&&(Xe=Ft[Ie-1]+Xe),Fe=Math.floor(Fe/10)}return(St<0?Ct:"")+Xe},Ju="\u5341\u767E\u5343\u842C",Ac="\u62FE\u4F70\u4EDF\u842C",it="\u30DE\u30A4\u30CA\u30B9",st="\uB9C8\uC774\uB108\uC2A4",dt=function(St,wt,Ft){var Ct=Ft?". ":"",zt=Ft?"\u3001":"",se=Ft?", ":"",Fe=Ft?" ":"";switch(wt){case 0:return"\u2022"+Fe;case 1:return"\u25E6"+Fe;case 2:return"\u25FE"+Fe;case 5:var Xe=Js(St,48,57,!0,Ct);return Xe.length<4?"0"+Xe:Xe;case 4:return hu(St,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",zt);case 6:return wA(St,1,3999,yA,3,Ct).toLowerCase();case 7:return wA(St,1,3999,yA,3,Ct);case 8:return Js(St,945,969,!1,Ct);case 9:return Js(St,97,122,!1,Ct);case 10:return Js(St,65,90,!1,Ct);case 11:return Js(St,1632,1641,!0,Ct);case 12:case 49:return wA(St,1,9999,lc,3,Ct);case 35:return wA(St,1,9999,lc,3,Ct).toLowerCase();case 13:return Js(St,2534,2543,!0,Ct);case 14:case 30:return Js(St,6112,6121,!0,Ct);case 15:return hu(St,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",zt);case 16:return hu(St,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",zt);case 17:case 48:return Gl(St,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Ju,"\u8CA0",zt,xA|Os|uc);case 47:return Gl(St,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",Ac,"\u8CA0",zt,Xu|xA|Os|uc);case 42:return Gl(St,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Ju,"\u8D1F",zt,xA|Os|uc);case 41:return Gl(St,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",Ac,"\u8D1F",zt,Xu|xA|Os|uc);case 26:return Gl(St,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",it,zt,0);case 25:return Gl(St,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",it,zt,Xu|xA|Os);case 31:return Gl(St,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",st,se,Xu|xA|Os);case 33:return Gl(St,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",st,se,0);case 32:return Gl(St,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",st,se,Xu|xA|Os);case 18:return Js(St,2406,2415,!0,Ct);case 20:return wA(St,1,19999,Cs,3,Ct);case 21:return Js(St,2790,2799,!0,Ct);case 22:return Js(St,2662,2671,!0,Ct);case 22:return wA(St,1,10999,YA,3,Ct);case 23:return hu(St,"\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 hu(St,"\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 Js(St,3302,3311,!0,Ct);case 28:return hu(St,"\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",zt);case 29:return hu(St,"\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",zt);case 34:return Js(St,3792,3801,!0,Ct);case 37:return Js(St,6160,6169,!0,Ct);case 38:return Js(St,4160,4169,!0,Ct);case 39:return Js(St,2918,2927,!0,Ct);case 40:return Js(St,1776,1785,!0,Ct);case 43:return Js(St,3046,3055,!0,Ct);case 44:return Js(St,3174,3183,!0,Ct);case 45:return Js(St,3664,3673,!0,Ct);case 46:return Js(St,3872,3881,!0,Ct);case 3:default:return Js(St,48,57,!0,Ct)}},ht="data-html2canvas-ignore",gt=function(){function St(wt,Ft,Ct){if(this.context=wt,this.options=Ct,this.scrolledElements=[],this.referenceElement=Ft,this.counters=new Nf,this.quoteDepth=0,!Ft.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(Ft.ownerDocument.documentElement,!1)}return St.prototype.toIFrame=function(wt,Ft){var Ct=this,zt=Gt(wt,Ft);if(!zt.contentWindow)return Promise.reject("Unable to find iframe window");var se=wt.defaultView.pageXOffset,Fe=wt.defaultView.pageYOffset,Xe=zt.contentWindow,Ie=Xe.document,bn=pe(zt).then(function(){return te(Ct,void 0,void 0,function(){var Hn,ei;return Ae(this,function(Di){switch(Di.label){case 0:return this.scrolledElements.forEach(Si),Xe&&(Xe.scrollTo(Ft.left,Ft.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(Xe.scrollY!==Ft.top||Xe.scrollX!==Ft.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(Xe.scrollX-Ft.left,Xe.scrollY-Ft.top,0,0))),Hn=this.options.onclone,ei=this.clonedReferenceElement,typeof ei=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:Ie.fonts&&Ie.fonts.ready?[4,Ie.fonts.ready]:[3,2];case 1:Di.sent(),Di.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Yt(Ie)]:[3,4];case 3:Di.sent(),Di.label=4;case 4:return typeof Hn=="function"?[2,Promise.resolve().then(function(){return Hn(Ie,ei)}).then(function(){return zt})]:[2,zt]}})})});return Ie.open(),Ie.write(Mn(document.doctype)+"<html></html>"),wn(this.referenceElement.ownerDocument,se,Fe),Ie.replaceChild(Ie.adoptNode(this.documentElement),Ie.documentElement),Ie.close(),bn},St.prototype.createElementClone=function(wt){if(jh(wt,2))debugger;if(Fh(wt))return this.createCanvasClone(wt);if(WA(wt))return this.createVideoClone(wt);if(ZA(wt))return this.createStyleClone(wt);var Ft=wt.cloneNode(!1);return ca(Ft)&&(ca(wt)&&wt.currentSrc&&wt.currentSrc!==wt.src&&(Ft.src=wt.currentSrc,Ft.srcset=""),Ft.loading==="lazy"&&(Ft.loading="eager")),jd(Ft)?this.createCustomElementClone(Ft):Ft},St.prototype.createCustomElementClone=function(wt){var Ft=document.createElement("html2canvascustomelement");return we(wt.style,Ft),Ft},St.prototype.createStyleClone=function(wt){try{var Ft=wt.sheet;if(Ft&&Ft.cssRules){var Ct=[].slice.call(Ft.cssRules,0).reduce(function(se,Fe){return Fe&&typeof Fe.cssText=="string"?se+Fe.cssText:se},""),zt=wt.cloneNode(!1);return zt.textContent=Ct,zt}}catch(se){if(this.context.logger.error("Unable to access cssRules property",se),se.name!=="SecurityError")throw se}return wt.cloneNode(!1)},St.prototype.createCanvasClone=function(wt){var Ft;if(this.options.inlineImages&&wt.ownerDocument){var Ct=wt.ownerDocument.createElement("img");try{return Ct.src=wt.toDataURL(),Ct}catch(bn){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",wt)}}var zt=wt.cloneNode(!1);try{zt.width=wt.width,zt.height=wt.height;var se=wt.getContext("2d"),Fe=zt.getContext("2d");if(Fe)if(!this.options.allowTaint&&se)Fe.putImageData(se.getImageData(0,0,wt.width,wt.height),0,0);else{var Xe=(Ft=wt.getContext("webgl2"))!==null&&Ft!==void 0?Ft:wt.getContext("webgl");if(Xe){var Ie=Xe.getContextAttributes();(Ie==null?void 0:Ie.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",wt)}Fe.drawImage(wt,0,0)}return zt}catch(bn){this.context.logger.info("Unable to clone canvas as it is tainted",wt)}return zt},St.prototype.createVideoClone=function(wt){var Ft=wt.ownerDocument.createElement("canvas");Ft.width=wt.offsetWidth,Ft.height=wt.offsetHeight;var Ct=Ft.getContext("2d");try{return Ct&&(Ct.drawImage(wt,0,0,Ft.width,Ft.height),this.options.allowTaint||Ct.getImageData(0,0,Ft.width,Ft.height)),Ft}catch(se){this.context.logger.info("Unable to clone video as it is tainted",wt)}var zt=wt.ownerDocument.createElement("canvas");return zt.width=wt.offsetWidth,zt.height=wt.offsetHeight,zt},St.prototype.appendChildNode=function(wt,Ft,Ct){(!Ph(Ft)||!id(Ft)&&!Ft.hasAttribute(ht)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(Ft)))&&(!this.options.copyStyles||!Ph(Ft)||!ZA(Ft))&&wt.appendChild(this.cloneNode(Ft,Ct))},St.prototype.cloneChildNodes=function(wt,Ft,Ct){for(var zt=this,se=wt.shadowRoot?wt.shadowRoot.firstChild:wt.firstChild;se;se=se.nextSibling)if(Ph(se)&&zd(se)&&typeof se.assignedNodes=="function"){var Fe=se.assignedNodes();Fe.length&&Fe.forEach(function(Xe){return zt.appendChildNode(Ft,Xe,Ct)})}else this.appendChildNode(Ft,se,Ct)},St.prototype.cloneNode=function(wt,Ft){if(ed(wt))return document.createTextNode(wt.data);if(!wt.ownerDocument)return wt.cloneNode(!1);var Ct=wt.ownerDocument.defaultView;if(Ct&&Ph(wt)&&(oc(wt)||ku(wt))){var zt=this.createElementClone(wt);zt.style.transitionProperty="none";var se=Ct.getComputedStyle(wt),Fe=Ct.getComputedStyle(wt,":before"),Xe=Ct.getComputedStyle(wt,":after");this.referenceElement===wt&&oc(zt)&&(this.clonedReferenceElement=zt),Yo(zt)&&Qr(zt);var Ie=this.counters.parse(new Pu(this.context,se)),bn=this.resolvePseudoContent(wt,zt,Fe,Nt.BEFORE);jd(wt)&&(Ft=!0),WA(wt)||this.cloneChildNodes(wt,zt,Ft),bn&&zt.insertBefore(bn,zt.firstChild);var Hn=this.resolvePseudoContent(wt,zt,Xe,Nt.AFTER);return Hn&&zt.appendChild(Hn),this.counters.pop(Ie),(se&&(this.options.copyStyles||ku(wt))&&!rl(wt)||Ft)&&we(se,zt),(wt.scrollTop!==0||wt.scrollLeft!==0)&&this.scrolledElements.push([zt,wt.scrollLeft,wt.scrollTop]),(sc(wt)||ac(wt))&&(sc(zt)||ac(zt))&&(zt.value=wt.value),zt}return wt.cloneNode(!1)},St.prototype.resolvePseudoContent=function(wt,Ft,Ct,zt){var se=this;if(Ct){var Fe=Ct.content,Xe=Ft.ownerDocument;if(!(!Xe||!Fe||Fe==="none"||Fe==="-moz-alt-content"||Ct.display==="none")){this.counters.parse(new Pu(this.context,Ct));var Ie=new il(this.context,Ct),bn=Xe.createElement("html2canvaspseudoelement");we(Ct,bn),Ie.content.forEach(function(ei){if(ei.type===0)bn.appendChild(Xe.createTextNode(ei.value));else if(ei.type===22){var Di=Xe.createElement("img");Di.src=ei.value,Di.style.opacity="1",bn.appendChild(Di)}else if(ei.type===18){if(ei.name==="attr"){var Ir=ei.values.filter(to);Ir.length&&bn.appendChild(Xe.createTextNode(wt.getAttribute(Ir[0].value)||""))}else if(ei.name==="counter"){var pr=ei.values.filter(Vo),Sr=pr[0],Ko=pr[1];if(Sr&&to(Sr)){var $r=se.counters.getCounterValue(Sr.value),eo=Ko&&to(Ko)?DA.parse(se.context,Ko.value):3;bn.appendChild(Xe.createTextNode(dt($r,eo,!1)))}}else if(ei.name==="counters"){var io=ei.values.filter(Vo),Sr=io[0],Jo=io[1],Ko=io[2];if(Sr&&to(Sr)){var ko=se.counters.getCounterValues(Sr.value),jr=Ko&&to(Ko)?DA.parse(se.context,Ko.value):3,us=Jo&&Jo.type===0?Jo.value:"",gs=ko.map(function(bl){return dt(bl,jr,!1)}).join(us);bn.appendChild(Xe.createTextNode(gs))}}}else if(ei.type===20)switch(ei.value){case"open-quote":bn.appendChild(Xe.createTextNode(Gh(Ie.quotes,se.quoteDepth++,!0)));break;case"close-quote":bn.appendChild(Xe.createTextNode(Gh(Ie.quotes,--se.quoteDepth,!1)));break;default:bn.appendChild(Xe.createTextNode(ei.value))}}),bn.className=rr+" "+Lr;var Hn=zt===Nt.BEFORE?" "+rr:" "+Lr;return ku(Ft)?Ft.className.baseValue+=Hn:Ft.className+=Hn,bn}}},St.destroy=function(wt){return wt.parentNode?(wt.parentNode.removeChild(wt),!0):!1},St}(),Nt;(function(St){St[St.BEFORE=0]="BEFORE",St[St.AFTER=1]="AFTER"})(Nt||(Nt={}));var Gt=function(St,wt){var Ft=St.createElement("iframe");return Ft.className="html2canvas-container",Ft.style.visibility="hidden",Ft.style.position="fixed",Ft.style.left="-10000px",Ft.style.top="0px",Ft.style.border="0",Ft.width=wt.width.toString(),Ft.height=wt.height.toString(),Ft.scrolling="no",Ft.setAttribute(ht,"true"),St.body.appendChild(Ft),Ft},Jt=function(St){return new Promise(function(wt){if(St.complete){wt();return}if(!St.src){wt();return}St.onload=wt,St.onerror=wt})},Yt=function(St){return Promise.all([].slice.call(St.images,0).map(Jt))},pe=function(St){return new Promise(function(wt,Ft){var Ct=St.contentWindow;if(!Ct)return Ft("No window assigned for iframe");var zt=Ct.document;Ct.onload=St.onload=function(){Ct.onload=St.onload=null;var se=setInterval(function(){zt.body.childNodes.length>0&&zt.readyState==="complete"&&(clearInterval(se),wt(St))},50)}})},qe=["all","d","content"],we=function(St,wt){for(var Ft=St.length-1;Ft>=0;Ft--){var Ct=St.item(Ft);qe.indexOf(Ct)===-1&&wt.style.setProperty(Ct,St.getPropertyValue(Ct))}return wt},Mn=function(St){var wt="";return St&&(wt+="<!DOCTYPE ",St.name&&(wt+=St.name),St.internalSubset&&(wt+=St.internalSubset),St.publicId&&(wt+='"'+St.publicId+'"'),St.systemId&&(wt+='"'+St.systemId+'"'),wt+=">"),wt},wn=function(St,wt,Ft){St&&St.defaultView&&(wt!==St.defaultView.pageXOffset||Ft!==St.defaultView.pageYOffset)&&St.defaultView.scrollTo(wt,Ft)},Si=function(St){var wt=St[0],Ft=St[1],Ct=St[2];wt.scrollLeft=Ft,wt.scrollTop=Ct},bi=":before",zi=":after",rr="___html2canvas___pseudoelement_before",Lr="___html2canvas___pseudoelement_after",xr=`{
|
|
|
content: "" !important;
|
|
|
display: none !important;
|
|
|
}`,Qr=function(St){lo(St,"."+rr+bi+xr+`
|
|
|
.`+Lr+zi+xr)},lo=function(St,wt){var Ft=St.ownerDocument;if(Ft){var Ct=Ft.createElement("style");Ct.textContent=wt,St.appendChild(Ct)}},wr=function(){function St(){}return St.getOrigin=function(wt){var Ft=St._link;return Ft?(Ft.href=wt,Ft.href=Ft.href,Ft.protocol+Ft.hostname+Ft.port):"about:blank"},St.isSameOrigin=function(wt){return St.getOrigin(wt)===St._origin},St.setContext=function(wt){St._link=wt.document.createElement("a"),St._origin=St.getOrigin(wt.location.href)},St._origin="about:blank",St}(),Mo=function(){function St(wt,Ft){this.context=wt,this._options=Ft,this._cache={}}return St.prototype.addImage=function(wt){var Ft=Promise.resolve();return this.has(wt)||(ol(wt)||ml(wt))&&(this._cache[wt]=this.loadImage(wt)).catch(function(){}),Ft},St.prototype.match=function(wt){return this._cache[wt]},St.prototype.loadImage=function(wt){return te(this,void 0,void 0,function(){var Ft,Ct,zt,se,Fe=this;return Ae(this,function(Xe){switch(Xe.label){case 0:return Ft=wr.isSameOrigin(wt),Ct=!ba(wt)&&this._options.useCORS===!0&&ha.SUPPORT_CORS_IMAGES&&!Ft,zt=!ba(wt)&&!Ft&&!ol(wt)&&typeof this._options.proxy=="string"&&ha.SUPPORT_CORS_XHR&&!Ct,!Ft&&this._options.allowTaint===!1&&!ba(wt)&&!ol(wt)&&!zt&&!Ct?[2]:(se=wt,zt?[4,this.proxy(se)]:[3,2]);case 1:se=Xe.sent(),Xe.label=2;case 2:return this.context.logger.debug("Added image "+wt.substring(0,256)),[4,new Promise(function(Ie,bn){var Hn=new Image;Hn.onload=function(){return Ie(Hn)},Hn.onerror=bn,(ma(se)||Ct)&&(Hn.crossOrigin="anonymous"),Hn.src=se,Hn.complete===!0&&setTimeout(function(){return Ie(Hn)},500),Fe._options.imageTimeout>0&&setTimeout(function(){return bn("Timed out ("+Fe._options.imageTimeout+"ms) loading image")},Fe._options.imageTimeout)})];case 3:return[2,Xe.sent()]}})})},St.prototype.has=function(wt){return typeof this._cache[wt]!="undefined"},St.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},St.prototype.proxy=function(wt){var Ft=this,Ct=this._options.proxy;if(!Ct)throw new Error("No proxy defined");var zt=wt.substring(0,256);return new Promise(function(se,Fe){var Xe=ha.SUPPORT_RESPONSE_TYPE?"blob":"text",Ie=new XMLHttpRequest;Ie.onload=function(){if(Ie.status===200)if(Xe==="text")se(Ie.response);else{var ei=new FileReader;ei.addEventListener("load",function(){return se(ei.result)},!1),ei.addEventListener("error",function(Di){return Fe(Di)},!1),ei.readAsDataURL(Ie.response)}else Fe("Failed to proxy resource "+zt+" with status code "+Ie.status)},Ie.onerror=Fe;var bn=Ct.indexOf("?")>-1?"&":"?";if(Ie.open("GET",""+Ct+bn+"url="+encodeURIComponent(wt)+"&responseType="+Xe),Xe!=="text"&&Ie instanceof XMLHttpRequest&&(Ie.responseType=Xe),Ft._options.imageTimeout){var Hn=Ft._options.imageTimeout;Ie.timeout=Hn,Ie.ontimeout=function(){return Fe("Timed out ("+Hn+"ms) proxying "+zt)}}Ie.send()})},St}(),Hs=/^data:image\/svg\+xml/i,Sa=/^data:image\/.*;base64,/i,Ws=/^data:image\/.*/i,ml=function(St){return ha.SUPPORT_SVG_DRAWING||!Ia(St)},ba=function(St){return Ws.test(St)},ma=function(St){return Sa.test(St)},ol=function(St){return St.substr(0,4)==="blob"},Ia=function(St){return St.substr(-3).toLowerCase()==="svg"||Hs.test(St)},vr=function(){function St(wt,Ft){this.type=0,this.x=wt,this.y=Ft}return St.prototype.add=function(wt,Ft){return new St(this.x+wt,this.y+Ft)},St}(),jo=function(St,wt,Ft){return new vr(St.x+(wt.x-St.x)*Ft,St.y+(wt.y-St.y)*Ft)},Rs=function(){function St(wt,Ft,Ct,zt){this.type=1,this.start=wt,this.startControl=Ft,this.endControl=Ct,this.end=zt}return St.prototype.subdivide=function(wt,Ft){var Ct=jo(this.start,this.startControl,wt),zt=jo(this.startControl,this.endControl,wt),se=jo(this.endControl,this.end,wt),Fe=jo(Ct,zt,wt),Xe=jo(zt,se,wt),Ie=jo(Fe,Xe,wt);return Ft?new St(this.start,Ct,Fe,Ie):new St(Ie,Xe,se,this.end)},St.prototype.add=function(wt,Ft){return new St(this.start.add(wt,Ft),this.startControl.add(wt,Ft),this.endControl.add(wt,Ft),this.end.add(wt,Ft))},St.prototype.reverse=function(){return new St(this.end,this.endControl,this.startControl,this.start)},St}(),bs=function(St){return St.type===1},Ua=function(){function St(wt){var Ft=wt.styles,Ct=wt.bounds,zt=hl(Ft.borderTopLeftRadius,Ct.width,Ct.height),se=zt[0],Fe=zt[1],Xe=hl(Ft.borderTopRightRadius,Ct.width,Ct.height),Ie=Xe[0],bn=Xe[1],Hn=hl(Ft.borderBottomRightRadius,Ct.width,Ct.height),ei=Hn[0],Di=Hn[1],Ir=hl(Ft.borderBottomLeftRadius,Ct.width,Ct.height),pr=Ir[0],Sr=Ir[1],Ko=[];Ko.push((se+Ie)/Ct.width),Ko.push((pr+ei)/Ct.width),Ko.push((Fe+Sr)/Ct.height),Ko.push((bn+Di)/Ct.height);var $r=Math.max.apply(Math,Ko);$r>1&&(se/=$r,Fe/=$r,Ie/=$r,bn/=$r,ei/=$r,Di/=$r,pr/=$r,Sr/=$r);var eo=Ct.width-Ie,io=Ct.height-Di,Jo=Ct.width-ei,ko=Ct.height-Sr,jr=Ft.borderTopWidth,us=Ft.borderRightWidth,gs=Ft.borderBottomWidth,No=Ft.borderLeftWidth,Ca=Zo(Ft.paddingTop,wt.bounds.width),bl=Zo(Ft.paddingRight,wt.bounds.width),Vl=Zo(Ft.paddingBottom,wt.bounds.width),_s=Zo(Ft.paddingLeft,wt.bounds.width);this.topLeftBorderDoubleOuterBox=se>0||Fe>0?Co(Ct.left+No/3,Ct.top+jr/3,se-No/3,Fe-jr/3,Xo.TOP_LEFT):new vr(Ct.left+No/3,Ct.top+jr/3),this.topRightBorderDoubleOuterBox=se>0||Fe>0?Co(Ct.left+eo,Ct.top+jr/3,Ie-us/3,bn-jr/3,Xo.TOP_RIGHT):new vr(Ct.left+Ct.width-us/3,Ct.top+jr/3),this.bottomRightBorderDoubleOuterBox=ei>0||Di>0?Co(Ct.left+Jo,Ct.top+io,ei-us/3,Di-gs/3,Xo.BOTTOM_RIGHT):new vr(Ct.left+Ct.width-us/3,Ct.top+Ct.height-gs/3),this.bottomLeftBorderDoubleOuterBox=pr>0||Sr>0?Co(Ct.left+No/3,Ct.top+ko,pr-No/3,Sr-gs/3,Xo.BOTTOM_LEFT):new vr(Ct.left+No/3,Ct.top+Ct.height-gs/3),this.topLeftBorderDoubleInnerBox=se>0||Fe>0?Co(Ct.left+No*2/3,Ct.top+jr*2/3,se-No*2/3,Fe-jr*2/3,Xo.TOP_LEFT):new vr(Ct.left+No*2/3,Ct.top+jr*2/3),this.topRightBorderDoubleInnerBox=se>0||Fe>0?Co(Ct.left+eo,Ct.top+jr*2/3,Ie-us*2/3,bn-jr*2/3,Xo.TOP_RIGHT):new vr(Ct.left+Ct.width-us*2/3,Ct.top+jr*2/3),this.bottomRightBorderDoubleInnerBox=ei>0||Di>0?Co(Ct.left+Jo,Ct.top+io,ei-us*2/3,Di-gs*2/3,Xo.BOTTOM_RIGHT):new vr(Ct.left+Ct.width-us*2/3,Ct.top+Ct.height-gs*2/3),this.bottomLeftBorderDoubleInnerBox=pr>0||Sr>0?Co(Ct.left+No*2/3,Ct.top+ko,pr-No*2/3,Sr-gs*2/3,Xo.BOTTOM_LEFT):new vr(Ct.left+No*2/3,Ct.top+Ct.height-gs*2/3),this.topLeftBorderStroke=se>0||Fe>0?Co(Ct.left+No/2,Ct.top+jr/2,se-No/2,Fe-jr/2,Xo.TOP_LEFT):new vr(Ct.left+No/2,Ct.top+jr/2),this.topRightBorderStroke=se>0||Fe>0?Co(Ct.left+eo,Ct.top+jr/2,Ie-us/2,bn-jr/2,Xo.TOP_RIGHT):new vr(Ct.left+Ct.width-us/2,Ct.top+jr/2),this.bottomRightBorderStroke=ei>0||Di>0?Co(Ct.left+Jo,Ct.top+io,ei-us/2,Di-gs/2,Xo.BOTTOM_RIGHT):new vr(Ct.left+Ct.width-us/2,Ct.top+Ct.height-gs/2),this.bottomLeftBorderStroke=pr>0||Sr>0?Co(Ct.left+No/2,Ct.top+ko,pr-No/2,Sr-gs/2,Xo.BOTTOM_LEFT):new vr(Ct.left+No/2,Ct.top+Ct.height-gs/2),this.topLeftBorderBox=se>0||Fe>0?Co(Ct.left,Ct.top,se,Fe,Xo.TOP_LEFT):new vr(Ct.left,Ct.top),this.topRightBorderBox=Ie>0||bn>0?Co(Ct.left+eo,Ct.top,Ie,bn,Xo.TOP_RIGHT):new vr(Ct.left+Ct.width,Ct.top),this.bottomRightBorderBox=ei>0||Di>0?Co(Ct.left+Jo,Ct.top+io,ei,Di,Xo.BOTTOM_RIGHT):new vr(Ct.left+Ct.width,Ct.top+Ct.height),this.bottomLeftBorderBox=pr>0||Sr>0?Co(Ct.left,Ct.top+ko,pr,Sr,Xo.BOTTOM_LEFT):new vr(Ct.left,Ct.top+Ct.height),this.topLeftPaddingBox=se>0||Fe>0?Co(Ct.left+No,Ct.top+jr,Math.max(0,se-No),Math.max(0,Fe-jr),Xo.TOP_LEFT):new vr(Ct.left+No,Ct.top+jr),this.topRightPaddingBox=Ie>0||bn>0?Co(Ct.left+Math.min(eo,Ct.width-us),Ct.top+jr,eo>Ct.width+us?0:Math.max(0,Ie-us),Math.max(0,bn-jr),Xo.TOP_RIGHT):new vr(Ct.left+Ct.width-us,Ct.top+jr),this.bottomRightPaddingBox=ei>0||Di>0?Co(Ct.left+Math.min(Jo,Ct.width-No),Ct.top+Math.min(io,Ct.height-gs),Math.max(0,ei-us),Math.max(0,Di-gs),Xo.BOTTOM_RIGHT):new vr(Ct.left+Ct.width-us,Ct.top+Ct.height-gs),this.bottomLeftPaddingBox=pr>0||Sr>0?Co(Ct.left+No,Ct.top+Math.min(ko,Ct.height-gs),Math.max(0,pr-No),Math.max(0,Sr-gs),Xo.BOTTOM_LEFT):new vr(Ct.left+No,Ct.top+Ct.height-gs),this.topLeftContentBox=se>0||Fe>0?Co(Ct.left+No+_s,Ct.top+jr+Ca,Math.max(0,se-(No+_s)),Math.max(0,Fe-(jr+Ca)),Xo.TOP_LEFT):new vr(Ct.left+No+_s,Ct.top+jr+Ca),this.topRightContentBox=Ie>0||bn>0?Co(Ct.left+Math.min(eo,Ct.width+No+_s),Ct.top+jr+Ca,eo>Ct.width+No+_s?0:Ie-No+_s,bn-(jr+Ca),Xo.TOP_RIGHT):new vr(Ct.left+Ct.width-(us+bl),Ct.top+jr+Ca),this.bottomRightContentBox=ei>0||Di>0?Co(Ct.left+Math.min(Jo,Ct.width-(No+_s)),Ct.top+Math.min(io,Ct.height+jr+Ca),Math.max(0,ei-(us+bl)),Di-(gs+Vl),Xo.BOTTOM_RIGHT):new vr(Ct.left+Ct.width-(us+bl),Ct.top+Ct.height-(gs+Vl)),this.bottomLeftContentBox=pr>0||Sr>0?Co(Ct.left+No+_s,Ct.top+ko,Math.max(0,pr-(No+_s)),Sr-(gs+Vl),Xo.BOTTOM_LEFT):new vr(Ct.left+No+_s,Ct.top+Ct.height-(gs+Vl))}return St}(),Xo;(function(St){St[St.TOP_LEFT=0]="TOP_LEFT",St[St.TOP_RIGHT=1]="TOP_RIGHT",St[St.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",St[St.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Xo||(Xo={}));var Co=function(St,wt,Ft,Ct,zt){var se=4*((Math.sqrt(2)-1)/3),Fe=Ft*se,Xe=Ct*se,Ie=St+Ft,bn=wt+Ct;switch(zt){case Xo.TOP_LEFT:return new Rs(new vr(St,bn),new vr(St,bn-Xe),new vr(Ie-Fe,wt),new vr(Ie,wt));case Xo.TOP_RIGHT:return new Rs(new vr(St,wt),new vr(St+Fe,wt),new vr(Ie,bn-Xe),new vr(Ie,bn));case Xo.BOTTOM_RIGHT:return new Rs(new vr(Ie,wt),new vr(Ie,wt+Xe),new vr(St+Fe,bn),new vr(St,bn));case Xo.BOTTOM_LEFT:default:return new Rs(new vr(Ie,bn),new vr(Ie-Fe,bn),new vr(St,wt+Xe),new vr(St,wt))}},vl=function(St){return[St.topLeftBorderBox,St.topRightBorderBox,St.bottomRightBorderBox,St.bottomLeftBorderBox]},ta=function(St){return[St.topLeftContentBox,St.topRightContentBox,St.bottomRightContentBox,St.bottomLeftContentBox]},XA=function(St){return[St.topLeftPaddingBox,St.topRightPaddingBox,St.bottomRightPaddingBox,St.bottomLeftPaddingBox]},zl=function(){function St(wt,Ft,Ct){this.offsetX=wt,this.offsetY=Ft,this.matrix=Ct,this.type=0,this.target=6}return St}(),Ga=function(){function St(wt,Ft){this.path=wt,this.target=Ft,this.type=1}return St}(),yl=function(){function St(wt){this.opacity=wt,this.type=2,this.target=6}return St}(),Ps=function(St){return St.type===0},Ba=function(St){return St.type===1},qu=function(St){return St.type===2},Eh=function(St,wt){return St.length===wt.length?St.some(function(Ft,Ct){return Ft===wt[Ct]}):!1},qp=function(St,wt,Ft,Ct,zt){return St.map(function(se,Fe){switch(Fe){case 0:return se.add(wt,Ft);case 1:return se.add(wt+Ct,Ft);case 2:return se.add(wt+Ct,Ft+zt);case 3:return se.add(wt,Ft+zt)}return se})},wl=function(){function St(wt){this.element=wt,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return St}(),vg=function(){function St(wt,Ft){if(this.container=wt,this.parent=Ft,this.effects=[],this.curves=new Ua(this.container),this.container.styles.opacity<1&&this.effects.push(new yl(this.container.styles.opacity)),this.container.styles.transform!==null){var Ct=this.container.bounds.left+this.container.styles.transformOrigin[0].number,zt=this.container.bounds.top+this.container.styles.transformOrigin[1].number,se=this.container.styles.transform;this.effects.push(new zl(Ct,zt,se))}if(this.container.styles.overflowX!==0){var Fe=vl(this.curves),Xe=XA(this.curves);Eh(Fe,Xe)?this.effects.push(new Ga(Fe,6)):(this.effects.push(new Ga(Fe,2)),this.effects.push(new Ga(Xe,4)))}}return St.prototype.getEffects=function(wt){for(var Ft=[2,3].indexOf(this.container.styles.position)===-1,Ct=this.parent,zt=this.effects.slice(0);Ct;){var se=Ct.effects.filter(function(Ie){return!Ba(Ie)});if(Ft||Ct.container.styles.position!==0||!Ct.parent){if(zt.unshift.apply(zt,se),Ft=[2,3].indexOf(Ct.container.styles.position)===-1,Ct.container.styles.overflowX!==0){var Fe=vl(Ct.curves),Xe=XA(Ct.curves);Eh(Fe,Xe)||zt.unshift(new Ga(Xe,6))}}else zt.unshift.apply(zt,se);Ct=Ct.parent}return zt.filter(function(Ie){return pa(Ie.target,wt)})},St}(),$u=function(St,wt,Ft,Ct){St.container.elements.forEach(function(zt){var se=pa(zt.flags,4),Fe=pa(zt.flags,2),Xe=new vg(zt,St);pa(zt.styles.display,2048)&&Ct.push(Xe);var Ie=pa(zt.flags,8)?[]:Ct;if(se||Fe){var bn=se||zt.styles.isPositioned()?Ft:wt,Hn=new wl(Xe);if(zt.styles.isPositioned()||zt.styles.opacity<1||zt.styles.isTransformed()){var ei=zt.styles.zIndex.order;if(ei<0){var Di=0;bn.negativeZIndex.some(function(pr,Sr){return ei>pr.element.container.styles.zIndex.order?(Di=Sr,!1):Di>0}),bn.negativeZIndex.splice(Di,0,Hn)}else if(ei>0){var Ir=0;bn.positiveZIndex.some(function(pr,Sr){return ei>=pr.element.container.styles.zIndex.order?(Ir=Sr+1,!1):Ir>0}),bn.positiveZIndex.splice(Ir,0,Hn)}else bn.zeroOrAutoZIndexOrTransformedOrOpacity.push(Hn)}else zt.styles.isFloating()?bn.nonPositionedFloats.push(Hn):bn.nonPositionedInlineLevel.push(Hn);$u(Xe,Hn,se?Hn:Ft,Ie)}else zt.styles.isInlineLevel()?wt.inlineLevel.push(Xe):wt.nonInlineLevel.push(Xe),$u(Xe,wt,Ft,Ie);pa(zt.flags,8)&&Df(zt,Ie)})},Df=function(St,wt){for(var Ft=St instanceof $c?St.start:1,Ct=St instanceof $c?St.reversed:!1,zt=0;zt<wt.length;zt++){var se=wt[zt];se.container instanceof VA&&typeof se.container.value=="number"&&se.container.value!==0&&(Ft=se.container.value),se.listValue=dt(Ft,se.container.styles.listStyleType,!0),Ft+=Ct?-1:1}},Wd=function(St){var wt=new vg(St,null),Ft=new wl(wt),Ct=[];return $u(wt,Ft,Ft,Ct),Df(wt.container,Ct),Ft},hc=function(St,wt){switch(wt){case 0:return va(St.topLeftBorderBox,St.topLeftPaddingBox,St.topRightBorderBox,St.topRightPaddingBox);case 1:return va(St.topRightBorderBox,St.topRightPaddingBox,St.bottomRightBorderBox,St.bottomRightPaddingBox);case 2:return va(St.bottomRightBorderBox,St.bottomRightPaddingBox,St.bottomLeftBorderBox,St.bottomLeftPaddingBox);case 3:default:return va(St.bottomLeftBorderBox,St.bottomLeftPaddingBox,St.topLeftBorderBox,St.topLeftPaddingBox)}},Lh=function(St,wt){switch(wt){case 0:return va(St.topLeftBorderBox,St.topLeftBorderDoubleOuterBox,St.topRightBorderBox,St.topRightBorderDoubleOuterBox);case 1:return va(St.topRightBorderBox,St.topRightBorderDoubleOuterBox,St.bottomRightBorderBox,St.bottomRightBorderDoubleOuterBox);case 2:return va(St.bottomRightBorderBox,St.bottomRightBorderDoubleOuterBox,St.bottomLeftBorderBox,St.bottomLeftBorderDoubleOuterBox);case 3:default:return va(St.bottomLeftBorderBox,St.bottomLeftBorderDoubleOuterBox,St.topLeftBorderBox,St.topLeftBorderDoubleOuterBox)}},If=function(St,wt){switch(wt){case 0:return va(St.topLeftBorderDoubleInnerBox,St.topLeftPaddingBox,St.topRightBorderDoubleInnerBox,St.topRightPaddingBox);case 1:return va(St.topRightBorderDoubleInnerBox,St.topRightPaddingBox,St.bottomRightBorderDoubleInnerBox,St.bottomRightPaddingBox);case 2:return va(St.bottomRightBorderDoubleInnerBox,St.bottomRightPaddingBox,St.bottomLeftBorderDoubleInnerBox,St.bottomLeftPaddingBox);case 3:default:return va(St.bottomLeftBorderDoubleInnerBox,St.bottomLeftPaddingBox,St.topLeftBorderDoubleInnerBox,St.topLeftPaddingBox)}},cc=function(St,wt){switch(wt){case 0:return JA(St.topLeftBorderStroke,St.topRightBorderStroke);case 1:return JA(St.topRightBorderStroke,St.bottomRightBorderStroke);case 2:return JA(St.bottomRightBorderStroke,St.bottomLeftBorderStroke);case 3:default:return JA(St.bottomLeftBorderStroke,St.topLeftBorderStroke)}},JA=function(St,wt){var Ft=[];return bs(St)?Ft.push(St.subdivide(.5,!1)):Ft.push(St),bs(wt)?Ft.push(wt.subdivide(.5,!0)):Ft.push(wt),Ft},va=function(St,wt,Ft,Ct){var zt=[];return bs(St)?zt.push(St.subdivide(.5,!1)):zt.push(St),bs(Ft)?zt.push(Ft.subdivide(.5,!0)):zt.push(Ft),bs(Ct)?zt.push(Ct.subdivide(.5,!0).reverse()):zt.push(Ct),bs(wt)?zt.push(wt.subdivide(.5,!1).reverse()):zt.push(wt),zt},za=function(St){var wt=St.bounds,Ft=St.styles;return wt.add(Ft.borderLeftWidth,Ft.borderTopWidth,-(Ft.borderRightWidth+Ft.borderLeftWidth),-(Ft.borderTopWidth+Ft.borderBottomWidth))},Uf=function(St){var wt=St.styles,Ft=St.bounds,Ct=Zo(wt.paddingLeft,Ft.width),zt=Zo(wt.paddingRight,Ft.width),se=Zo(wt.paddingTop,Ft.width),Fe=Zo(wt.paddingBottom,Ft.width);return Ft.add(Ct+wt.borderLeftWidth,se+wt.borderTopWidth,-(wt.borderRightWidth+wt.borderLeftWidth+Ct+zt),-(wt.borderTopWidth+wt.borderBottomWidth+se+Fe))},$p=function(St,wt){return St===0?wt.bounds:St===2?Uf(wt):za(wt)},t0=function(St,wt){return St===0?wt.bounds:St===2?Uf(wt):za(wt)},dc=function(St,wt,Ft){var Ct=$p(gc(St.styles.backgroundOrigin,wt),St),zt=t0(gc(St.styles.backgroundClip,wt),St),se=e0(gc(St.styles.backgroundSize,wt),Ft,Ct),Fe=se[0],Xe=se[1],Ie=hl(gc(St.styles.backgroundPosition,wt),Ct.width-Fe,Ct.height-Xe),bn=Of(gc(St.styles.backgroundRepeat,wt),Ie,se,Ct,zt),Hn=Math.round(Ct.left+Ie[0]),ei=Math.round(Ct.top+Ie[1]);return[bn,Hn,ei,Fe,Xe]},fc=function(St){return to(St)&&St.value===ju.AUTO},Qf=function(St){return typeof St=="number"},e0=function(St,wt,Ft){var Ct=wt[0],zt=wt[1],se=wt[2],Fe=St[0],Xe=St[1];if(!Fe)return[0,0];if(Wo(Fe)&&Xe&&Wo(Xe))return[Zo(Fe,Ft.width),Zo(Xe,Ft.height)];var Ie=Qf(se);if(to(Fe)&&(Fe.value===ju.CONTAIN||Fe.value===ju.COVER)){if(Qf(se)){var bn=Ft.width/Ft.height;return bn<se!=(Fe.value===ju.COVER)?[Ft.width,Ft.width/se]:[Ft.height*se,Ft.height]}return[Ft.width,Ft.height]}var Hn=Qf(Ct),ei=Qf(zt),Di=Hn||ei;if(fc(Fe)&&(!Xe||fc(Xe))){if(Hn&&ei)return[Ct,zt];if(!Ie&&!Di)return[Ft.width,Ft.height];if(Di&&Ie){var Ir=Hn?Ct:zt*se,pr=ei?zt:Ct/se;return[Ir,pr]}var Sr=Hn?Ct:Ft.width,Ko=ei?zt:Ft.height;return[Sr,Ko]}if(Ie){var $r=0,eo=0;return Wo(Fe)?$r=Zo(Fe,Ft.width):Wo(Xe)&&(eo=Zo(Xe,Ft.height)),fc(Fe)?$r=eo*se:(!Xe||fc(Xe))&&(eo=$r/se),[$r,eo]}var io=null,Jo=null;if(Wo(Fe)?io=Zo(Fe,Ft.width):Xe&&Wo(Xe)&&(Jo=Zo(Xe,Ft.height)),io!==null&&(!Xe||fc(Xe))&&(Jo=Hn&&ei?io/Ct*zt:Ft.height),Jo!==null&&fc(Fe)&&(io=Hn&&ei?Jo/zt*Ct:Ft.width),io!==null&&Jo!==null)return[io,Jo];throw new Error("Unable to calculate background-size for element")},gc=function(St,wt){var Ft=St[wt];return typeof Ft=="undefined"?St[0]:Ft},Of=function(St,wt,Ft,Ct,zt){var se=wt[0],Fe=wt[1],Xe=Ft[0],Ie=Ft[1];switch(St){case 2:return[new vr(Math.round(Ct.left),Math.round(Ct.top+Fe)),new vr(Math.round(Ct.left+Ct.width),Math.round(Ct.top+Fe)),new vr(Math.round(Ct.left+Ct.width),Math.round(Ie+Ct.top+Fe)),new vr(Math.round(Ct.left),Math.round(Ie+Ct.top+Fe))];case 3:return[new vr(Math.round(Ct.left+se),Math.round(Ct.top)),new vr(Math.round(Ct.left+se+Xe),Math.round(Ct.top)),new vr(Math.round(Ct.left+se+Xe),Math.round(Ct.height+Ct.top)),new vr(Math.round(Ct.left+se),Math.round(Ct.height+Ct.top))];case 1:return[new vr(Math.round(Ct.left+se),Math.round(Ct.top+Fe)),new vr(Math.round(Ct.left+se+Xe),Math.round(Ct.top+Fe)),new vr(Math.round(Ct.left+se+Xe),Math.round(Ct.top+Fe+Ie)),new vr(Math.round(Ct.left+se),Math.round(Ct.top+Fe+Ie))];default:return[new vr(Math.round(zt.left),Math.round(zt.top)),new vr(Math.round(zt.left+zt.width),Math.round(zt.top)),new vr(Math.round(zt.left+zt.width),Math.round(zt.height+zt.top)),new vr(Math.round(zt.left),Math.round(zt.height+zt.top))]}},yg="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Tu="Hidden Text",SA=function(){function St(wt){this._data={},this._document=wt}return St.prototype.parseMetrics=function(wt,Ft){var Ct=this._document.createElement("div"),zt=this._document.createElement("img"),se=this._document.createElement("span"),Fe=this._document.body;Ct.style.visibility="hidden",Ct.style.fontFamily=wt,Ct.style.fontSize=Ft,Ct.style.margin="0",Ct.style.padding="0",Ct.style.whiteSpace="nowrap",Fe.appendChild(Ct),zt.src=yg,zt.width=1,zt.height=1,zt.style.margin="0",zt.style.padding="0",zt.style.verticalAlign="baseline",se.style.fontFamily=wt,se.style.fontSize=Ft,se.style.margin="0",se.style.padding="0",se.appendChild(this._document.createTextNode(Tu)),Ct.appendChild(se),Ct.appendChild(zt);var Xe=zt.offsetTop-se.offsetTop+2;Ct.removeChild(se),Ct.appendChild(this._document.createTextNode(Tu)),Ct.style.lineHeight="normal",zt.style.verticalAlign="super";var Ie=zt.offsetTop-Ct.offsetTop+2;return Fe.removeChild(Ct),{baseline:Xe,middle:Ie}},St.prototype.getMetrics=function(wt,Ft){var Ct=wt+" "+Ft;return typeof this._data[Ct]=="undefined"&&(this._data[Ct]=this.parseMetrics(wt,Ft)),this._data[Ct]},St}(),Hf=function(){function St(wt,Ft){this.context=wt,this.options=Ft}return St}(),jl=1e4,pc=function(St){Ot(wt,St);function wt(Ft,Ct){var zt=St.call(this,Ft,Ct)||this;return zt._activeEffects=[],zt.canvas=Ct.canvas?Ct.canvas:document.createElement("canvas"),zt.ctx=zt.canvas.getContext("2d"),Ct.canvas||(zt.canvas.width=Math.floor(Ct.width*Ct.scale),zt.canvas.height=Math.floor(Ct.height*Ct.scale),zt.canvas.style.width=Ct.width+"px",zt.canvas.style.height=Ct.height+"px"),zt.fontMetrics=new SA(document),zt.ctx.scale(zt.options.scale,zt.options.scale),zt.ctx.translate(-Ct.x,-Ct.y),zt.ctx.textBaseline="bottom",zt._activeEffects=[],zt.context.logger.debug("Canvas renderer initialized ("+Ct.width+"x"+Ct.height+") with scale "+Ct.scale),zt}return wt.prototype.applyEffects=function(Ft){for(var Ct=this;this._activeEffects.length;)this.popEffect();Ft.forEach(function(zt){return Ct.applyEffect(zt)})},wt.prototype.applyEffect=function(Ft){this.ctx.save(),qu(Ft)&&(this.ctx.globalAlpha=Ft.opacity),Ps(Ft)&&(this.ctx.translate(Ft.offsetX,Ft.offsetY),this.ctx.transform(Ft.matrix[0],Ft.matrix[1],Ft.matrix[2],Ft.matrix[3],Ft.matrix[4],Ft.matrix[5]),this.ctx.translate(-Ft.offsetX,-Ft.offsetY)),Ba(Ft)&&(this.path(Ft.path),this.ctx.clip()),this._activeEffects.push(Ft)},wt.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},wt.prototype.renderStack=function(Ft){return te(this,void 0,void 0,function(){var Ct;return Ae(this,function(zt){switch(zt.label){case 0:return Ct=Ft.element.container.styles,Ct.isVisible()?[4,this.renderStackContent(Ft)]:[3,2];case 1:zt.sent(),zt.label=2;case 2:return[2]}})})},wt.prototype.renderNode=function(Ft){return te(this,void 0,void 0,function(){return Ae(this,function(Ct){switch(Ct.label){case 0:if(pa(Ft.container.flags,16))debugger;return Ft.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(Ft)]:[3,3];case 1:return Ct.sent(),[4,this.renderNodeContent(Ft)];case 2:Ct.sent(),Ct.label=3;case 3:return[2]}})})},wt.prototype.renderTextWithLetterSpacing=function(Ft,Ct,zt){var se=this;if(Ct===0)this.ctx.fillText(Ft.text,Ft.bounds.left,Ft.bounds.top+zt);else{var Fe=$h(Ft.text);Fe.reduce(function(Xe,Ie){return se.ctx.fillText(Ie,Xe,Ft.bounds.top+zt),Xe+se.ctx.measureText(Ie).width},Ft.bounds.left)}},wt.prototype.createFontStyle=function(Ft){var Ct=Ft.fontVariant.filter(function(Fe){return Fe==="normal"||Fe==="small-caps"}).join(""),zt=i0(Ft.fontFamily).join(", "),se=ps(Ft.fontSize)?""+Ft.fontSize.number+Ft.fontSize.unit:Ft.fontSize.number+"px";return[[Ft.fontStyle,Ct,Ft.fontWeight,se,zt].join(" "),zt,se]},wt.prototype.renderTextNode=function(Ft,Ct){return te(this,void 0,void 0,function(){var zt,se,Fe,Xe,Ie,bn,Hn,ei,Di=this;return Ae(this,function(Ir){return zt=this.createFontStyle(Ct),se=zt[0],Fe=zt[1],Xe=zt[2],this.ctx.font=se,this.ctx.direction=Ct.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",Ie=this.fontMetrics.getMetrics(Fe,Xe),bn=Ie.baseline,Hn=Ie.middle,ei=Ct.paintOrder,Ft.textBounds.forEach(function(pr){ei.forEach(function(Sr){switch(Sr){case 0:Di.ctx.fillStyle=es(Ct.color),Di.renderTextWithLetterSpacing(pr,Ct.letterSpacing,bn);var Ko=Ct.textShadow;Ko.length&&pr.text.trim().length&&(Ko.slice(0).reverse().forEach(function($r){Di.ctx.shadowColor=es($r.color),Di.ctx.shadowOffsetX=$r.offsetX.number*Di.options.scale,Di.ctx.shadowOffsetY=$r.offsetY.number*Di.options.scale,Di.ctx.shadowBlur=$r.blur.number,Di.renderTextWithLetterSpacing(pr,Ct.letterSpacing,bn)}),Di.ctx.shadowColor="",Di.ctx.shadowOffsetX=0,Di.ctx.shadowOffsetY=0,Di.ctx.shadowBlur=0),Ct.textDecorationLine.length&&(Di.ctx.fillStyle=es(Ct.textDecorationColor||Ct.color),Ct.textDecorationLine.forEach(function($r){switch($r){case 1:Di.ctx.fillRect(pr.bounds.left,Math.round(pr.bounds.top+bn),pr.bounds.width,1);break;case 2:Di.ctx.fillRect(pr.bounds.left,Math.round(pr.bounds.top),pr.bounds.width,1);break;case 3:Di.ctx.fillRect(pr.bounds.left,Math.ceil(pr.bounds.top+Hn),pr.bounds.width,1);break}}));break;case 1:Ct.webkitTextStrokeWidth&&pr.text.trim().length&&(Di.ctx.strokeStyle=es(Ct.webkitTextStrokeColor),Di.ctx.lineWidth=Ct.webkitTextStrokeWidth,Di.ctx.lineJoin=window.chrome?"miter":"round",Di.ctx.strokeText(pr.text,pr.bounds.left,pr.bounds.top+bn)),Di.ctx.strokeStyle="",Di.ctx.lineWidth=0,Di.ctx.lineJoin="miter";break}})}),[2]})})},wt.prototype.renderReplacedElement=function(Ft,Ct,zt){if(zt&&Ft.intrinsicWidth>0&&Ft.intrinsicHeight>0){var se=Uf(Ft),Fe=XA(Ct);this.path(Fe),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(zt,0,0,Ft.intrinsicWidth,Ft.intrinsicHeight,se.left,se.top,se.width,se.height),this.ctx.restore()}},wt.prototype.renderNodeContent=function(Ft){return te(this,void 0,void 0,function(){var Ct,zt,se,Fe,Xe,Ie,eo,eo,bn,Hn,ei,Di,Jo,Ir,pr,ko,Sr,Ko,$r,eo,io,Jo,ko;return Ae(this,function(jr){switch(jr.label){case 0:this.applyEffects(Ft.getEffects(4)),Ct=Ft.container,zt=Ft.curves,se=Ct.styles,Fe=0,Xe=Ct.textNodes,jr.label=1;case 1:return Fe<Xe.length?(Ie=Xe[Fe],[4,this.renderTextNode(Ie,se)]):[3,4];case 2:jr.sent(),jr.label=3;case 3:return Fe++,[3,1];case 4:if(!(Ct instanceof Xc))return[3,8];jr.label=5;case 5:return jr.trys.push([5,7,,8]),[4,this.context.cache.match(Ct.src)];case 6:return eo=jr.sent(),this.renderReplacedElement(Ct,zt,eo),[3,8];case 7:return jr.sent(),this.context.logger.error("Error loading image "+Ct.src),[3,8];case 8:if(Ct instanceof Jc&&this.renderReplacedElement(Ct,zt,Ct.canvas),!(Ct instanceof qc))return[3,12];jr.label=9;case 9:return jr.trys.push([9,11,,12]),[4,this.context.cache.match(Ct.svg)];case 10:return eo=jr.sent(),this.renderReplacedElement(Ct,zt,eo),[3,12];case 11:return jr.sent(),this.context.logger.error("Error loading svg "+Ct.svg.substring(0,255)),[3,12];case 12:return Ct instanceof Lf&&Ct.tree?(bn=new wt(this.context,{scale:this.options.scale,backgroundColor:Ct.backgroundColor,x:0,y:0,width:Ct.width,height:Ct.height}),[4,bn.render(Ct.tree)]):[3,14];case 13:Hn=jr.sent(),Ct.width&&Ct.height&&this.ctx.drawImage(Hn,0,0,Ct.width,Ct.height,Ct.bounds.left,Ct.bounds.top,Ct.bounds.width,Ct.bounds.height),jr.label=14;case 14:if(Ct instanceof $l&&(ei=Math.min(Ct.bounds.width,Ct.bounds.height),Ct.type===ic?Ct.checked&&(this.ctx.save(),this.path([new vr(Ct.bounds.left+ei*.39363,Ct.bounds.top+ei*.79),new vr(Ct.bounds.left+ei*.16,Ct.bounds.top+ei*.5549),new vr(Ct.bounds.left+ei*.27347,Ct.bounds.top+ei*.44071),new vr(Ct.bounds.left+ei*.39694,Ct.bounds.top+ei*.5649),new vr(Ct.bounds.left+ei*.72983,Ct.bounds.top+ei*.23),new vr(Ct.bounds.left+ei*.84,Ct.bounds.top+ei*.34085),new vr(Ct.bounds.left+ei*.39363,Ct.bounds.top+ei*.79)]),this.ctx.fillStyle=es(Hd),this.ctx.fill(),this.ctx.restore()):Ct.type===vA&&Ct.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(Ct.bounds.left+ei/2,Ct.bounds.top+ei/2,ei/4,0,Math.PI*2,!0),this.ctx.fillStyle=es(Hd),this.ctx.fill(),this.ctx.restore())),Tm(Ct)&&Ct.value.length){switch(Di=this.createFontStyle(se),Jo=Di[0],Ir=Di[1],pr=this.fontMetrics.getMetrics(Jo,Ir).baseline,this.ctx.font=Jo,this.ctx.fillStyle=es(se.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=no(Ct.styles.textAlign),ko=Uf(Ct),Sr=0,Ct.styles.textAlign){case 1:Sr+=ko.width/2;break;case 2:Sr+=ko.width;break}Ko=ko.add(Sr,0,0,-ko.height/2+1),this.ctx.save(),this.path([new vr(ko.left,ko.top),new vr(ko.left+ko.width,ko.top),new vr(ko.left+ko.width,ko.top+ko.height),new vr(ko.left,ko.top+ko.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Da(Ct.value,Ko),se.letterSpacing,pr),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!pa(Ct.styles.display,2048))return[3,20];if(Ct.styles.listStyleImage===null)return[3,19];if($r=Ct.styles.listStyleImage,$r.type!==0)return[3,18];eo=void 0,io=$r.url,jr.label=15;case 15:return jr.trys.push([15,17,,18]),[4,this.context.cache.match(io)];case 16:return eo=jr.sent(),this.ctx.drawImage(eo,Ct.bounds.left-(eo.width+10),Ct.bounds.top),[3,18];case 17:return jr.sent(),this.context.logger.error("Error loading list-style-image "+io),[3,18];case 18:return[3,20];case 19:Ft.listValue&&Ct.styles.listStyleType!==-1&&(Jo=this.createFontStyle(se)[0],this.ctx.font=Jo,this.ctx.fillStyle=es(se.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",ko=new de(Ct.bounds.left,Ct.bounds.top+Zo(Ct.styles.paddingTop,Ct.bounds.width),Ct.bounds.width,ga(se.lineHeight,se.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Da(Ft.listValue,ko),se.letterSpacing,ga(se.lineHeight,se.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),jr.label=20;case 20:return[2]}})})},wt.prototype.renderStackContent=function(Ft){return te(this,void 0,void 0,function(){var Ct,zt,$r,se,Fe,$r,Xe,Ie,$r,bn,Hn,$r,ei,Di,$r,Ir,pr,$r,Sr,Ko,$r;return Ae(this,function(eo){switch(eo.label){case 0:if(pa(Ft.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(Ft.element)];case 1:eo.sent(),Ct=0,zt=Ft.negativeZIndex,eo.label=2;case 2:return Ct<zt.length?($r=zt[Ct],[4,this.renderStack($r)]):[3,5];case 3:eo.sent(),eo.label=4;case 4:return Ct++,[3,2];case 5:return[4,this.renderNodeContent(Ft.element)];case 6:eo.sent(),se=0,Fe=Ft.nonInlineLevel,eo.label=7;case 7:return se<Fe.length?($r=Fe[se],[4,this.renderNode($r)]):[3,10];case 8:eo.sent(),eo.label=9;case 9:return se++,[3,7];case 10:Xe=0,Ie=Ft.nonPositionedFloats,eo.label=11;case 11:return Xe<Ie.length?($r=Ie[Xe],[4,this.renderStack($r)]):[3,14];case 12:eo.sent(),eo.label=13;case 13:return Xe++,[3,11];case 14:bn=0,Hn=Ft.nonPositionedInlineLevel,eo.label=15;case 15:return bn<Hn.length?($r=Hn[bn],[4,this.renderStack($r)]):[3,18];case 16:eo.sent(),eo.label=17;case 17:return bn++,[3,15];case 18:ei=0,Di=Ft.inlineLevel,eo.label=19;case 19:return ei<Di.length?($r=Di[ei],[4,this.renderNode($r)]):[3,22];case 20:eo.sent(),eo.label=21;case 21:return ei++,[3,19];case 22:Ir=0,pr=Ft.zeroOrAutoZIndexOrTransformedOrOpacity,eo.label=23;case 23:return Ir<pr.length?($r=pr[Ir],[4,this.renderStack($r)]):[3,26];case 24:eo.sent(),eo.label=25;case 25:return Ir++,[3,23];case 26:Sr=0,Ko=Ft.positiveZIndex,eo.label=27;case 27:return Sr<Ko.length?($r=Ko[Sr],[4,this.renderStack($r)]):[3,30];case 28:eo.sent(),eo.label=29;case 29:return Sr++,[3,27];case 30:return[2]}})})},wt.prototype.mask=function(Ft){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(Ft.slice(0).reverse()),this.ctx.closePath()},wt.prototype.path=function(Ft){this.ctx.beginPath(),this.formatPath(Ft),this.ctx.closePath()},wt.prototype.formatPath=function(Ft){var Ct=this;Ft.forEach(function(zt,se){var Fe=bs(zt)?zt.start:zt;se===0?Ct.ctx.moveTo(Fe.x,Fe.y):Ct.ctx.lineTo(Fe.x,Fe.y),bs(zt)&&Ct.ctx.bezierCurveTo(zt.startControl.x,zt.startControl.y,zt.endControl.x,zt.endControl.y,zt.end.x,zt.end.y)})},wt.prototype.renderRepeat=function(Ft,Ct,zt,se){this.path(Ft),this.ctx.fillStyle=Ct,this.ctx.translate(zt,se),this.ctx.fill(),this.ctx.translate(-zt,-se)},wt.prototype.resizeImage=function(Ft,Ct,zt){var se;if(Ft.width===Ct&&Ft.height===zt)return Ft;var Fe=(se=this.canvas.ownerDocument)!==null&&se!==void 0?se:document,Xe=Fe.createElement("canvas");Xe.width=Math.max(1,Ct),Xe.height=Math.max(1,zt);var Ie=Xe.getContext("2d");return Ie.drawImage(Ft,0,0,Ft.width,Ft.height,0,0,Ct,zt),Xe},wt.prototype.renderBackgroundImage=function(Ft){return te(this,void 0,void 0,function(){var Ct,zt,se,Fe,Xe,Ie;return Ae(this,function(bn){switch(bn.label){case 0:Ct=Ft.styles.backgroundImage.length-1,zt=function(Hn){var ei,Di,Ir,Ca,kl,tu,_s,Qa,gs,pr,Ca,kl,tu,_s,Qa,Sr,Ko,$r,eo,io,Jo,ko,jr,us,gs,No,Ca,bl,Vl,_s,Qa,CA,kl,tu,PA,En,qA,mc,$A,th,Mh,sl;return Ae(this,function(Nu){switch(Nu.label){case 0:if(Hn.type!==0)return[3,5];ei=void 0,Di=Hn.url,Nu.label=1;case 1:return Nu.trys.push([1,3,,4]),[4,se.context.cache.match(Di)];case 2:return ei=Nu.sent(),[3,4];case 3:return Nu.sent(),se.context.logger.error("Error loading background-image "+Di),[3,4];case 4:return ei&&(Ir=dc(Ft,Ct,[ei.width,ei.height,ei.width/ei.height]),Ca=Ir[0],kl=Ir[1],tu=Ir[2],_s=Ir[3],Qa=Ir[4],gs=se.ctx.createPattern(se.resizeImage(ei,_s,Qa),"repeat"),se.renderRepeat(Ca,gs,kl,tu)),[3,6];case 5:zu(Hn)?(pr=dc(Ft,Ct,[null,null,null]),Ca=pr[0],kl=pr[1],tu=pr[2],_s=pr[3],Qa=pr[4],Sr=hA(Hn.angle,_s,Qa),Ko=Sr[0],$r=Sr[1],eo=Sr[2],io=Sr[3],Jo=Sr[4],ko=document.createElement("canvas"),ko.width=_s,ko.height=Qa,jr=ko.getContext("2d"),us=jr.createLinearGradient($r,io,eo,Jo),On(Hn.stops,Ko).forEach(function(Xd){return us.addColorStop(Xd.stop,es(Xd.color))}),jr.fillStyle=us,jr.fillRect(0,0,_s,Qa),_s>0&&Qa>0&&(gs=se.ctx.createPattern(ko,"repeat"),se.renderRepeat(Ca,gs,kl,tu))):Uo(Hn)&&(No=dc(Ft,Ct,[null,null,null]),Ca=No[0],bl=No[1],Vl=No[2],_s=No[3],Qa=No[4],CA=Hn.position.length===0?[da]:Hn.position,kl=Zo(CA[0],_s),tu=Zo(CA[CA.length-1],Qa),PA=vu(Hn,kl,tu,_s,Qa),En=PA[0],qA=PA[1],En>0&&qA>0&&(mc=se.ctx.createRadialGradient(bl+kl,Vl+tu,0,bl+kl,Vl+tu,En),On(Hn.stops,En*2).forEach(function(Xd){return mc.addColorStop(Xd.stop,es(Xd.color))}),se.path(Ca),se.ctx.fillStyle=mc,En!==qA?($A=Ft.bounds.left+.5*Ft.bounds.width,th=Ft.bounds.top+.5*Ft.bounds.height,Mh=qA/En,sl=1/Mh,se.ctx.save(),se.ctx.translate($A,th),se.ctx.transform(1,0,0,Mh,0,0),se.ctx.translate(-$A,-th),se.ctx.fillRect(bl,sl*(Vl-th)+th,_s,Qa*sl),se.ctx.restore()):se.ctx.fill())),Nu.label=6;case 6:return Ct--,[2]}})},se=this,Fe=0,Xe=Ft.styles.backgroundImage.slice(0).reverse(),bn.label=1;case 1:return Fe<Xe.length?(Ie=Xe[Fe],[5,zt(Ie)]):[3,4];case 2:bn.sent(),bn.label=3;case 3:return Fe++,[3,1];case 4:return[2]}})})},wt.prototype.renderSolidBorder=function(Ft,Ct,zt){return te(this,void 0,void 0,function(){return Ae(this,function(se){return this.path(hc(zt,Ct)),this.ctx.fillStyle=es(Ft),this.ctx.fill(),[2]})})},wt.prototype.renderDoubleBorder=function(Ft,Ct,zt,se){return te(this,void 0,void 0,function(){var Fe,Xe;return Ae(this,function(Ie){switch(Ie.label){case 0:return Ct<3?[4,this.renderSolidBorder(Ft,zt,se)]:[3,2];case 1:return Ie.sent(),[2];case 2:return Fe=Lh(se,zt),this.path(Fe),this.ctx.fillStyle=es(Ft),this.ctx.fill(),Xe=If(se,zt),this.path(Xe),this.ctx.fill(),[2]}})})},wt.prototype.renderNodeBackgroundAndBorders=function(Ft){return te(this,void 0,void 0,function(){var Ct,zt,se,Fe,Xe,Ie,bn,Hn,ei=this;return Ae(this,function(Di){switch(Di.label){case 0:return this.applyEffects(Ft.getEffects(2)),Ct=Ft.container.styles,zt=!Gs(Ct.backgroundColor)||Ct.backgroundImage.length,se=[{style:Ct.borderTopStyle,color:Ct.borderTopColor,width:Ct.borderTopWidth},{style:Ct.borderRightStyle,color:Ct.borderRightColor,width:Ct.borderRightWidth},{style:Ct.borderBottomStyle,color:Ct.borderBottomColor,width:Ct.borderBottomWidth},{style:Ct.borderLeftStyle,color:Ct.borderLeftColor,width:Ct.borderLeftWidth}],Fe=Rf(gc(Ct.backgroundClip,0),Ft.curves),zt||Ct.boxShadow.length?(this.ctx.save(),this.path(Fe),this.ctx.clip(),Gs(Ct.backgroundColor)||(this.ctx.fillStyle=es(Ct.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(Ft.container)]):[3,2];case 1:Di.sent(),this.ctx.restore(),Ct.boxShadow.slice(0).reverse().forEach(function(Ir){ei.ctx.save();var pr=vl(Ft.curves),Sr=Ir.inset?0:jl,Ko=qp(pr,-Sr+(Ir.inset?1:-1)*Ir.spread.number,(Ir.inset?1:-1)*Ir.spread.number,Ir.spread.number*(Ir.inset?-2:2),Ir.spread.number*(Ir.inset?-2:2));Ir.inset?(ei.path(pr),ei.ctx.clip(),ei.mask(Ko)):(ei.mask(pr),ei.ctx.clip(),ei.path(Ko)),ei.ctx.shadowOffsetX=Ir.offsetX.number+Sr,ei.ctx.shadowOffsetY=Ir.offsetY.number,ei.ctx.shadowColor=es(Ir.color),ei.ctx.shadowBlur=Ir.blur.number,ei.ctx.fillStyle=Ir.inset?es(Ir.color):"rgba(0,0,0,1)",ei.ctx.fill(),ei.ctx.restore()}),Di.label=2;case 2:Xe=0,Ie=0,bn=se,Di.label=3;case 3:return Ie<bn.length?(Hn=bn[Ie],Hn.style!==0&&!Gs(Hn.color)&&Hn.width>0?Hn.style!==2?[3,5]:[4,this.renderDashedDottedBorder(Hn.color,Hn.width,Xe,Ft.curves,2)]:[3,11]):[3,13];case 4:return Di.sent(),[3,11];case 5:return Hn.style!==3?[3,7]:[4,this.renderDashedDottedBorder(Hn.color,Hn.width,Xe,Ft.curves,3)];case 6:return Di.sent(),[3,11];case 7:return Hn.style!==4?[3,9]:[4,this.renderDoubleBorder(Hn.color,Hn.width,Xe,Ft.curves)];case 8:return Di.sent(),[3,11];case 9:return[4,this.renderSolidBorder(Hn.color,Xe,Ft.curves)];case 10:Di.sent(),Di.label=11;case 11:Xe++,Di.label=12;case 12:return Ie++,[3,3];case 13:return[2]}})})},wt.prototype.renderDashedDottedBorder=function(Ft,Ct,zt,se,Fe){return te(this,void 0,void 0,function(){var Xe,Ie,bn,Hn,ei,Di,Ir,pr,Sr,Ko,$r,eo,io,Jo,ko,jr,ko,jr;return Ae(this,function(us){return this.ctx.save(),Xe=cc(se,zt),Ie=hc(se,zt),Fe===2&&(this.path(Ie),this.ctx.clip()),bs(Ie[0])?(bn=Ie[0].start.x,Hn=Ie[0].start.y):(bn=Ie[0].x,Hn=Ie[0].y),bs(Ie[1])?(ei=Ie[1].end.x,Di=Ie[1].end.y):(ei=Ie[1].x,Di=Ie[1].y),zt===0||zt===2?Ir=Math.abs(bn-ei):Ir=Math.abs(Hn-Di),this.ctx.beginPath(),Fe===3?this.formatPath(Xe):this.formatPath(Ie.slice(0,2)),pr=Ct<3?Ct*3:Ct*2,Sr=Ct<3?Ct*2:Ct,Fe===3&&(pr=Ct,Sr=Ct),Ko=!0,Ir<=pr*2?Ko=!1:Ir<=pr*2+Sr?($r=Ir/(2*pr+Sr),pr*=$r,Sr*=$r):(eo=Math.floor((Ir+Sr)/(pr+Sr)),io=(Ir-eo*pr)/(eo-1),Jo=(Ir-(eo+1)*pr)/eo,Sr=Jo<=0||Math.abs(Sr-io)<Math.abs(Sr-Jo)?io:Jo),Ko&&(Fe===3?this.ctx.setLineDash([0,pr+Sr]):this.ctx.setLineDash([pr,Sr])),Fe===3?(this.ctx.lineCap="round",this.ctx.lineWidth=Ct):this.ctx.lineWidth=Ct*2+1.1,this.ctx.strokeStyle=es(Ft),this.ctx.stroke(),this.ctx.setLineDash([]),Fe===2&&(bs(Ie[0])&&(ko=Ie[3],jr=Ie[0],this.ctx.beginPath(),this.formatPath([new vr(ko.end.x,ko.end.y),new vr(jr.start.x,jr.start.y)]),this.ctx.stroke()),bs(Ie[1])&&(ko=Ie[1],jr=Ie[2],this.ctx.beginPath(),this.formatPath([new vr(ko.end.x,ko.end.y),new vr(jr.start.x,jr.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},wt.prototype.render=function(Ft){return te(this,void 0,void 0,function(){var Ct;return Ae(this,function(zt){switch(zt.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=es(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),Ct=Wd(Ft),[4,this.renderStack(Ct)];case 1:return zt.sent(),this.applyEffects([]),[2,this.canvas]}})})},wt}(Hf),Tm=function(St){return St instanceof td||St instanceof Rd?!0:St instanceof $l&&St.type!==vA&&St.type!==ic},Rf=function(St,wt){switch(St){case 0:return vl(wt);case 2:return ta(wt);case 1:default:return XA(wt)}},no=function(St){switch(St){case 1:return"center";case 2:return"right";case 0:default:return"left"}},n0=["-apple-system","system-ui"],i0=function(St){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?St.filter(function(wt){return n0.indexOf(wt)===-1}):St},np=function(St){Ot(wt,St);function wt(Ft,Ct){var zt=St.call(this,Ft,Ct)||this;return zt.canvas=Ct.canvas?Ct.canvas:document.createElement("canvas"),zt.ctx=zt.canvas.getContext("2d"),zt.options=Ct,zt.canvas.width=Math.floor(Ct.width*Ct.scale),zt.canvas.height=Math.floor(Ct.height*Ct.scale),zt.canvas.style.width=Ct.width+"px",zt.canvas.style.height=Ct.height+"px",zt.ctx.scale(zt.options.scale,zt.options.scale),zt.ctx.translate(-Ct.x,-Ct.y),zt.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+Ct.width+"x"+Ct.height+" at "+Ct.x+","+Ct.y+") with scale "+Ct.scale),zt}return wt.prototype.render=function(Ft){return te(this,void 0,void 0,function(){var Ct,zt;return Ae(this,function(se){switch(se.label){case 0:return Ct=Yc(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,Ft),[4,Zd(Ct)];case 1:return zt=se.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=es(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(zt,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},wt}(Hf),Zd=function(St){return new Promise(function(wt,Ft){var Ct=new Image;Ct.onload=function(){wt(Ct)},Ct.onerror=Ft,Ct.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(St))})},Yd=function(){function St(wt){var Ft=wt.id,Ct=wt.enabled;this.id=Ft,this.enabled=Ct,this.start=Date.now()}return St.prototype.debug=function(){for(var wt=[],Ft=0;Ft<arguments.length;Ft++)wt[Ft]=arguments[Ft];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Ce([this.id,this.getTime()+"ms"],wt)):this.info.apply(this,wt))},St.prototype.getTime=function(){return Date.now()-this.start},St.prototype.info=function(){for(var wt=[],Ft=0;Ft<arguments.length;Ft++)wt[Ft]=arguments[Ft];this.enabled&&typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Ce([this.id,this.getTime()+"ms"],wt))},St.prototype.warn=function(){for(var wt=[],Ft=0;Ft<arguments.length;Ft++)wt[Ft]=arguments[Ft];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Ce([this.id,this.getTime()+"ms"],wt)):this.info.apply(this,wt))},St.prototype.error=function(){for(var wt=[],Ft=0;Ft<arguments.length;Ft++)wt[Ft]=arguments[Ft];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,Ce([this.id,this.getTime()+"ms"],wt)):this.info.apply(this,wt))},St.instances={},St}(),BA=function(){function St(wt,Ft){var Ct;this.windowBounds=Ft,this.instanceName="#"+St.instanceCount++,this.logger=new Yd({id:this.instanceName,enabled:wt.logging}),this.cache=(Ct=wt.cache)!==null&&Ct!==void 0?Ct:new Mo(this,wt)}return St.instanceCount=1,St}(),ip=function(St,wt){return wt===void 0&&(wt={}),rp(St,wt)};typeof window!="undefined"&&wr.setContext(window);var rp=function(St,wt){return te(void 0,void 0,void 0,function(){var Ft,Ct,zt,se,Fe,Xe,Ie,bn,Hn,ei,Di,Ir,pr,Sr,Ko,$r,eo,io,Jo,ko,us,jr,us,gs,No,Ca,bl,Vl,_s,Qa,CA,kl,tu,PA,En,qA,mc,$A,th,Mh;return Ae(this,function(sl){switch(sl.label){case 0:if(!St||typeof St!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(Ft=St.ownerDocument,!Ft)throw new Error("Element is not attached to a Document");if(Ct=Ft.defaultView,!Ct)throw new Error("Document is not attached to a Window");return zt={allowTaint:(gs=wt.allowTaint)!==null&&gs!==void 0?gs:!1,imageTimeout:(No=wt.imageTimeout)!==null&&No!==void 0?No:15e3,proxy:wt.proxy,useCORS:(Ca=wt.useCORS)!==null&&Ca!==void 0?Ca:!1},se=Pt({logging:(bl=wt.logging)!==null&&bl!==void 0?bl:!0,cache:wt.cache},zt),Fe={windowWidth:(Vl=wt.windowWidth)!==null&&Vl!==void 0?Vl:Ct.innerWidth,windowHeight:(_s=wt.windowHeight)!==null&&_s!==void 0?_s:Ct.innerHeight,scrollX:(Qa=wt.scrollX)!==null&&Qa!==void 0?Qa:Ct.pageXOffset,scrollY:(CA=wt.scrollY)!==null&&CA!==void 0?CA:Ct.pageYOffset},Xe=new de(Fe.scrollX,Fe.scrollY,Fe.windowWidth,Fe.windowHeight),Ie=new BA(se,Xe),bn=(kl=wt.foreignObjectRendering)!==null&&kl!==void 0?kl:!1,Hn={allowTaint:(tu=wt.allowTaint)!==null&&tu!==void 0?tu:!1,onclone:wt.onclone,ignoreElements:wt.ignoreElements,inlineImages:bn,copyStyles:bn},Ie.logger.debug("Starting document clone with size "+Xe.width+"x"+Xe.height+" scrolled to "+-Xe.left+","+-Xe.top),ei=new gt(Ie,St,Hn),Di=ei.clonedReferenceElement,Di?[4,ei.toIFrame(Ft,Xe)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return Ir=sl.sent(),pr=Yo(Di)||Gd(Di)?ne(Di.ownerDocument):Rt(Ie,Di),Sr=pr.width,Ko=pr.height,$r=pr.left,eo=pr.top,io=op(Ie,Di,wt.backgroundColor),Jo={canvas:wt.canvas,backgroundColor:io,scale:(En=(PA=wt.scale)!==null&&PA!==void 0?PA:Ct.devicePixelRatio)!==null&&En!==void 0?En:1,x:((qA=wt.x)!==null&&qA!==void 0?qA:0)+$r,y:((mc=wt.y)!==null&&mc!==void 0?mc:0)+eo,width:($A=wt.width)!==null&&$A!==void 0?$A:Math.ceil(Sr),height:(th=wt.height)!==null&&th!==void 0?th:Math.ceil(Ko)},bn?(Ie.logger.debug("Document cloned, using foreign object rendering"),us=new np(Ie,Jo),[4,us.render(Di)]):[3,3];case 2:return ko=sl.sent(),[3,5];case 3:return Ie.logger.debug("Document cloned, element located at "+$r+","+eo+" with size "+Sr+"x"+Ko+" using computed rendering"),Ie.logger.debug("Starting DOM parsing"),jr=bf(Ie,Di),io===jr.styles.backgroundColor&&(jr.styles.backgroundColor=ss.TRANSPARENT),Ie.logger.debug("Starting renderer for element at "+Jo.x+","+Jo.y+" with size "+Jo.width+"x"+Jo.height),us=new pc(Ie,Jo),[4,us.render(jr)];case 4:ko=sl.sent(),sl.label=5;case 5:return(!((Mh=wt.removeContainer)!==null&&Mh!==void 0)||Mh)&&(gt.destroy(Ir)||Ie.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),Ie.logger.debug("Finished rendering"),[2,ko]}})})},op=function(St,wt,Ft){var Ct=wt.ownerDocument,zt=Ct.documentElement?xs(St,getComputedStyle(Ct.documentElement).backgroundColor):ss.TRANSPARENT,se=Ct.body?xs(St,getComputedStyle(Ct.body).backgroundColor):ss.TRANSPARENT,Fe=typeof Ft=="string"?xs(St,Ft):Ft===null?ss.TRANSPARENT:4294967295;return wt===Ct.documentElement?Gs(zt)?Gs(se)?Fe:se:zt:Fe};return ip})},67467:function(Bn,Ve){Ve.read=function(Ot,Pt,te,Ae,Ce){var de,Rt,ne=Ce*8-Ae-1,ue=(1<<ne)-1,ce=ue>>1,Wt=-7,Ne=te?Ce-1:0,qt=te?-1:1,Le=Ot[Pt+Ne];for(Ne+=qt,de=Le&(1<<-Wt)-1,Le>>=-Wt,Wt+=ne;Wt>0;de=de*256+Ot[Pt+Ne],Ne+=qt,Wt-=8);for(Rt=de&(1<<-Wt)-1,de>>=-Wt,Wt+=Ae;Wt>0;Rt=Rt*256+Ot[Pt+Ne],Ne+=qt,Wt-=8);if(de===0)de=1-ce;else{if(de===ue)return Rt?NaN:(Le?-1:1)*(1/0);Rt=Rt+Math.pow(2,Ae),de=de-ce}return(Le?-1:1)*Rt*Math.pow(2,de-Ae)},Ve.write=function(Ot,Pt,te,Ae,Ce,de){var Rt,ne,ue,ce=de*8-Ce-1,Wt=(1<<ce)-1,Ne=Wt>>1,qt=Ce===23?Math.pow(2,-24)-Math.pow(2,-77):0,Le=Ae?0:de-1,Ut=Ae?1:-1,nt=Pt<0||Pt===0&&1/Pt<0?1:0;for(Pt=Math.abs(Pt),isNaN(Pt)||Pt===1/0?(ne=isNaN(Pt)?1:0,Rt=Wt):(Rt=Math.floor(Math.log(Pt)/Math.LN2),Pt*(ue=Math.pow(2,-Rt))<1&&(Rt--,ue*=2),Rt+Ne>=1?Pt+=qt/ue:Pt+=qt*Math.pow(2,1-Ne),Pt*ue>=2&&(Rt++,ue/=2),Rt+Ne>=Wt?(ne=0,Rt=Wt):Rt+Ne>=1?(ne=(Pt*ue-1)*Math.pow(2,Ce),Rt=Rt+Ne):(ne=Pt*Math.pow(2,Ne-1)*Math.pow(2,Ce),Rt=0));Ce>=8;Ot[te+Le]=ne&255,Le+=Ut,ne/=256,Ce-=8);for(Rt=Rt<<Ce|ne,ce+=Ce;ce>0;Ot[te+Le]=Rt&255,Le+=Ut,Rt/=256,ce-=8);Ot[te+Le-Ut]|=nt*128}},2859:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{hP:function(){return Pi}});var Pt=function(Ht,kt){return(Pt=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])})(Ht,kt)};function te(Ht,kt){function mt(){this.constructor=Ht}Pt(Ht,kt),Ht.prototype=kt===null?Object.create(kt):(mt.prototype=kt.prototype,new mt)}function Ae(Ht,kt,mt,vt){return new(mt||(mt=Promise))(function(Lt,Bt){function Kt(Je){try{ke(vt.next(Je))}catch(ve){Bt(ve)}}function ge(Je){try{ke(vt.throw(Je))}catch(ve){Bt(ve)}}function ke(Je){var ve;Je.done?Lt(Je.value):(ve=Je.value,ve instanceof mt?ve:new mt(function(ze){ze(ve)})).then(Kt,ge)}ke((vt=vt.apply(Ht,kt||[])).next())})}function Ce(Ht,kt){var mt,vt,Lt,Bt,Kt={label:0,sent:function(){if(1&Lt[0])throw Lt[1];return Lt[1]},trys:[],ops:[]};return Bt={next:ge(0),throw:ge(1),return:ge(2)},typeof Symbol=="function"&&(Bt[Symbol.iterator]=function(){return this}),Bt;function ge(ke){return function(Je){return function(ve){if(mt)throw new TypeError("Generator is already executing.");for(;Kt;)try{if(mt=1,vt&&(Lt=2&ve[0]?vt.return:ve[0]?vt.throw||((Lt=vt.return)&&Lt.call(vt),0):vt.next)&&!(Lt=Lt.call(vt,ve[1])).done)return Lt;switch(vt=0,Lt&&(ve=[2&ve[0],Lt.value]),ve[0]){case 0:case 1:Lt=ve;break;case 4:return Kt.label++,{value:ve[1],done:!1};case 5:Kt.label++,vt=ve[1],ve=[0];continue;case 7:ve=Kt.ops.pop(),Kt.trys.pop();continue;default:if(Lt=Kt.trys,!((Lt=Lt.length>0&&Lt[Lt.length-1])||ve[0]!==6&&ve[0]!==2)){Kt=0;continue}if(ve[0]===3&&(!Lt||ve[1]>Lt[0]&&ve[1]<Lt[3])){Kt.label=ve[1];break}if(ve[0]===6&&Kt.label<Lt[1]){Kt.label=Lt[1],Lt=ve;break}if(Lt&&Kt.label<Lt[2]){Kt.label=Lt[2],Kt.ops.push(ve);break}Lt[2]&&Kt.ops.pop(),Kt.trys.pop();continue}ve=kt.call(Ht,Kt)}catch(ze){ve=[6,ze],vt=0}finally{mt=Lt=0}if(5&ve[0])throw ve[1];return{value:ve[0]?ve[1]:void 0,done:!0}}([ke,Je])}}}function de(){for(var Ht=0,kt=0,mt=arguments.length;kt<mt;kt++)Ht+=arguments[kt].length;var vt=Array(Ht),Lt=0;for(kt=0;kt<mt;kt++)for(var Bt=arguments[kt],Kt=0,ge=Bt.length;Kt<ge;Kt++,Lt++)vt[Lt]=Bt[Kt];return vt}var Rt=function(){function Ht(){}return Ht.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Ht.setAttributes=function(kt,mt){for(var vt=0,Lt=mt;vt<Lt.length;vt++){var Bt=Lt[vt],Kt=Bt[0],ge=Bt[1];kt.setAttribute(Kt,ge)}},Ht.createRect=function(kt,mt,vt){var Lt=document.createElementNS("http://www.w3.org/2000/svg","rect");return Lt.setAttribute("width",kt.toString()),Lt.setAttribute("height",mt.toString()),vt&&Ht.setAttributes(Lt,vt),Lt},Ht.createLine=function(kt,mt,vt,Lt,Bt){var Kt=document.createElementNS("http://www.w3.org/2000/svg","line");return Kt.setAttribute("x1",kt.toString()),Kt.setAttribute("y1",mt.toString()),Kt.setAttribute("x2",vt.toString()),Kt.setAttribute("y2",Lt.toString()),Bt&&Ht.setAttributes(Kt,Bt),Kt},Ht.createPolygon=function(kt,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","polygon");return vt.setAttribute("points",kt),mt&&Ht.setAttributes(vt,mt),vt},Ht.createCircle=function(kt,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","circle");return vt.setAttribute("cx",(kt/2).toString()),vt.setAttribute("cy",(kt/2).toString()),vt.setAttribute("r",kt.toString()),mt&&Ht.setAttributes(vt,mt),vt},Ht.createEllipse=function(kt,mt,vt){var Lt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Lt.setAttribute("cx",(kt/2).toString()),Lt.setAttribute("cy",(mt/2).toString()),Lt.setAttribute("rx",(kt/2).toString()),Lt.setAttribute("ry",(mt/2).toString()),vt&&Ht.setAttributes(Lt,vt),Lt},Ht.createGroup=function(kt){var mt=document.createElementNS("http://www.w3.org/2000/svg","g");return kt&&Ht.setAttributes(mt,kt),mt},Ht.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Ht.createMarker=function(kt,mt,vt,Lt,Bt,Kt,ge){var ke=document.createElementNS("http://www.w3.org/2000/svg","marker");return Ht.setAttributes(ke,[["id",kt],["orient",mt],["markerWidth",vt.toString()],["markerHeight",Lt.toString()],["refX",Bt.toString()],["refY",Kt.toString()]]),ke.appendChild(ge),ke},Ht.createText=function(kt){var mt=document.createElementNS("http://www.w3.org/2000/svg","text");return mt.setAttribute("x","0"),mt.setAttribute("y","0"),kt&&Ht.setAttributes(mt,kt),mt},Ht.createTSpan=function(kt,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","tspan");return vt.textContent=kt,mt&&Ht.setAttributes(vt,mt),vt},Ht.createImage=function(kt){var mt=document.createElementNS("http://www.w3.org/2000/svg","image");return kt&&Ht.setAttributes(mt,kt),mt},Ht.createPoint=function(kt,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return vt.x=kt,vt.y=mt,vt},Ht.createPath=function(kt,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","path");return vt.setAttribute("d",kt),mt&&Ht.setAttributes(vt,mt),vt},Ht}(),ne=function(){function Ht(){}return Ht.addKey=function(kt){Ht.key=kt},Object.defineProperty(Ht,"isLicensed",{get:function(){return!!Ht.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Ht.key)},enumerable:!1,configurable:!0}),Ht}(),ue=function(){function Ht(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Ht.prototype.rasterize=function(kt,mt,vt){var Lt=this;return new Promise(function(Bt){var Kt=vt!==void 0?vt:document.createElement("canvas");kt===null&&(Lt.markersOnly=!0,Lt.naturalSize=!1);var ge=document.createElementNS("http://www.w3.org/2000/svg","svg");ge.setAttribute("xmlns","http://www.w3.org/2000/svg"),ge.setAttribute("width",mt.width.baseVal.valueAsString),ge.setAttribute("height",mt.height.baseVal.valueAsString),ge.setAttribute("viewBox","0 0 "+mt.viewBox.baseVal.width.toString()+" "+mt.viewBox.baseVal.height.toString()),ge.innerHTML=mt.innerHTML,Lt.naturalSize===!0?(ge.width.baseVal.value=kt.naturalWidth,ge.height.baseVal.value=kt.naturalHeight):Lt.width!==void 0&&Lt.height!==void 0&&(ge.width.baseVal.value=Lt.width,ge.height.baseVal.value=Lt.height),Kt.width=ge.width.baseVal.value,Kt.height=ge.height.baseVal.value;var ke=ge.outerHTML,Je=Kt.getContext("2d");Lt.markersOnly!==!0&&Je.drawImage(kt,0,0,Kt.width,Kt.height);var ve=window.URL,ze=new Image(Kt.width,Kt.height);ze.setAttribute("crossOrigin","anonymous");var De=new Blob([ke],{type:"image/svg+xml"}),nn=ve.createObjectURL(De);ze.onload=function(){Je.drawImage(ze,0,0),ve.revokeObjectURL(nn);var kn=Kt.toDataURL(Lt.imageType,Lt.imageQuality);Bt(kn)},ze.src=nn})},Ht}(),ce=function(){},Wt=function(){function Ht(kt){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+kt+"_"}return Object.defineProperty(Ht.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.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(Ht.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Ht.prototype.addClass=function(kt){return this.styleSheet===void 0&&this.addStyleSheet(),kt.name=""+this.classNamePrefix+kt.localName,this.classes.push(kt),this.styleSheet.sheet.insertRule("."+kt.name+" {"+kt.style+"}",this.styleSheet.sheet.cssRules.length),kt},Ht.prototype.addRule=function(kt){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(kt),this.styleSheet.sheet.insertRule(kt.selector+" {"+kt.style+"}",this.styleSheet.sheet.cssRules.length)},Ht.prototype.addStyleSheet=function(){var kt;this.styleSheet=document.createElement("style"),((kt=this.styleSheetRoot)!==null&&kt!==void 0?kt:document.head).appendChild(this.styleSheet),this.addRule(new Ne("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ne("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new Ne("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new qt("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new qt("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},Ht.prototype.removeStyleSheet=function(){var kt;this.styleSheet&&(((kt=this.styleSheetRoot)!==null&&kt!==void 0?kt:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Ht}(),Ne=function(Ht,kt){this.selector=Ht,this.style=kt},qt=function(Ht,kt){this.localName=Ht,this.style=kt},Le=function(){function Ht(kt,mt,vt,Lt,Bt){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=kt,this.displayMode=mt,this.markerItems=vt,this.uiStyleSettings=Lt,this.styles=Bt,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Ht.prototype.show=function(kt){var mt=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=kt,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(Bt){var Kt=document.createElement("div");Kt.className=""+mt.toolbarButtonStyleClass.name,Kt.setAttribute("data-type-name",Bt.typeName),Kt.innerHTML=Bt.icon,Kt.addEventListener("click",function(){mt.markerToolbarButtonClicked(Kt,Bt)}),mt.buttons.push(Kt),mt.markerButtons.push(Kt)}),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()},Ht.prototype.addButtonClickListener=function(kt){this.buttonClickListeners.push(kt)},Ht.prototype.removeButtonClickListener=function(kt){this.buttonClickListeners.indexOf(kt)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(kt),1)},Ht.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Ht.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var kt=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<kt||mt===kt&&this.markerButtons.length-1===kt?this.markerButtonBlock.appendChild(this.markerButtons[mt]):(mt===kt&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[mt]))}},Ht.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")},Ht.prototype.resetButtonStyles=function(){var kt=this;this.buttons.forEach(function(mt){mt.className=mt.className.replace(kt.uiStyleSettings.toolbarButtonStyleColorsClassName?kt.uiStyleSettings.toolbarButtonStyleColorsClassName:kt.toolbarButtonStyleColorsClass.name,"").trim(),mt.className=mt.className.replace(kt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?kt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:kt.toolbarActiveButtonStyleColorsClass.name,"").trim(),mt.className+=" "+(kt.uiStyleSettings.toolbarButtonStyleColorsClassName?kt.uiStyleSettings.toolbarButtonStyleColorsClassName:kt.toolbarButtonStyleColorsClass.name)})},Ht.prototype.addActionButton=function(kt,mt,vt){var Lt=this,Bt=document.createElement("div");switch(Bt.className=""+this.toolbarButtonStyleClass.name,Bt.innerHTML=mt,Bt.setAttribute("data-action",vt),Bt.addEventListener("click",function(){Lt.actionToolbarButtonClicked(Bt,vt)}),vt){case"select":Bt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Bt.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Bt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Bt.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Bt.style.fill=this.uiStyleSettings.closeButtonColor}kt.appendChild(Bt),this.buttons.push(Bt)},Ht.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new qt("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 qt("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new qt("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new qt("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 qt("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var kt=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new qt("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*kt)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*kt)+`px;
|
|
|
padding: `+kt+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new qt("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new qt("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new Ne("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new Ne("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},Ht.prototype.markerToolbarButtonClicked=function(kt,mt){this.setActiveButton(kt),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(vt){return vt("marker",mt)}),this.markerButtonOverflowBlock.style.display="none"},Ht.prototype.actionToolbarButtonClicked=function(kt,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])},Ht.prototype.setActiveButton=function(kt){this.resetButtonStyles(),kt.className=kt.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),kt.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Ht.prototype.setActiveMarkerButton=function(kt){var mt=this.markerButtons.find(function(vt){return vt.getAttribute("data-type-name")===kt});mt&&this.setActiveButton(mt)},Ht.prototype.setCurrentMarker=function(kt){var mt=this;this.currentMarker=kt,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")})},Ht}(),Ut=function(){function Ht(kt,mt,vt,Lt){this.panels=[],this.panelButtons=[],this.markerjsContainer=kt,this.displayMode=mt,this.uiStyleSettings=vt,this.styles=Lt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Ht.prototype.addStyles=function(){var kt;this.toolboxStyleClass=this.styles.addClass(new qt("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 qt("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var mt=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new qt("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new qt("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new qt("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 qt("toolbox-panel-row_colors",`
|
|
|
background-color: `+((kt=this.uiStyleSettings.toolboxBackgroundColor)!==null&&kt!==void 0?kt:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new qt("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 qt("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new qt("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new Ne("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new Ne("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},Ht.prototype.show=function(kt){var mt;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=kt,this.uiContainer.className=this.toolboxStyleClass.name+" "+((mt=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&mt!==void 0?mt:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Ht.prototype.setPanelButtons=function(kt){var mt,vt,Lt=this;this.panels=kt,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(Bt){var Kt;Bt.uiStyleSettings=Lt.uiStyleSettings;var ge=document.createElement("div");ge.className=Lt.toolboxButtonStyleClass.name+" "+((Kt=Lt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Kt!==void 0?Kt:Lt.toolboxButtonStyleColorsClass.name),ge.innerHTML=Bt.icon,ge.title=Bt.title,ge.addEventListener("click",function(){Lt.panelButtonClick(Bt)}),Lt.panelButtons.push(ge),Lt.buttonRow.appendChild(ge)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Ht.prototype.panelButtonClick=function(kt){var mt=this,vt=-1;if(kt!==this.activePanel){vt=this.panels.indexOf(kt),this.panelRow.innerHTML="";var Lt=kt.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=kt}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(Bt,Kt){var ge,ke;Bt.className=mt.toolboxButtonStyleClass.name+" "+(Kt===vt?""+((ge=mt.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&ge!==void 0?ge:mt.toolboxActiveButtonStyleColorsClass.name):""+((ke=mt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ke!==void 0?ke:mt.toolboxButtonStyleColorsClass.name))})},Ht}(),nt=function(Ht,kt){this.title=Ht,this.icon=kt},et=function(Ht){function kt(mt,vt,Lt,Bt){var Kt=Ht.call(this,mt,Bt||'<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 Kt.colors=[],Kt.addTransparent=!1,Kt.colorBoxes=[],Kt.colors=vt,Kt.currentColor=Lt,Kt.setCurrentColor=Kt.setCurrentColor.bind(Kt),Kt.getColorBox=Kt.getColorBox.bind(Kt),Kt}return te(kt,Ht),kt.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 Bt=mt.getColorBox(Lt);vt.appendChild(Bt),mt.colorBoxes.push(Bt)}),vt},kt.prototype.getColorBox=function(mt){var vt=this,Lt=this.uiStyleSettings.toolbarHeight/4,Bt=this.uiStyleSettings.toolbarHeight-Lt,Kt=document.createElement("div");Kt.style.display="inline-block",Kt.style.boxSizing="content-box",Kt.style.width=Bt-2+"px",Kt.style.height=Bt-2+"px",Kt.style.padding="1px",Kt.style.marginRight="2px",Kt.style.marginBottom="2px",Kt.style.borderWidth="2px",Kt.style.borderStyle="solid",Kt.style.borderRadius=(Bt+2)/2+"px",Kt.style.borderColor=mt===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Kt.addEventListener("click",function(){vt.setCurrentColor(mt,Kt)});var ge=document.createElement("div");return ge.style.display="inline-block",ge.style.width=Bt-2+"px",ge.style.height=Bt-2+"px",ge.style.backgroundColor=mt,ge.style.borderRadius=Bt/2+"px",mt==="transparent"&&(ge.style.fill=this.uiStyleSettings.toolboxAccentColor,ge.innerHTML=`<svg viewBox="0 0 24 24">
|
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
|
</svg>`),Kt.appendChild(ge),Kt},kt.prototype.setCurrentColor=function(mt,vt){var Lt=this;this.currentColor=mt,this.colorBoxes.forEach(function(Bt){Bt.style.borderColor=Bt===vt?Lt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(mt)},kt}(nt),At=function(){function Ht(kt,mt,vt){this._state="new",this._isSelected=!1,this._container=kt,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(Ht.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Ht.prototype.ownsTarget=function(kt){return!1},Object.defineProperty(Ht.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Ht.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Ht.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Ht.prototype.pointerDown=function(kt,mt){},Ht.prototype.dblClick=function(kt,mt){},Ht.prototype.manipulate=function(kt){},Ht.prototype.pointerUp=function(kt){this.stateChanged()},Ht.prototype.dispose=function(){},Ht.prototype.addMarkerVisualToContainer=function(kt){this.container.childNodes.length>0?this.container.insertBefore(kt,this.container.childNodes[0]):this.container.appendChild(kt)},Ht.prototype.getState=function(){return{typeName:Ht.typeName,state:this.state,notes:this.notes}},Ht.prototype.restoreState=function(kt){this._state=kt.state,this.notes=kt.notes},Ht.prototype.scale=function(kt,mt){},Ht.prototype.colorChanged=function(kt){this.onColorChanged&&this.onColorChanged(kt),this.stateChanged()},Ht.prototype.fillColorChanged=function(kt){this.onFillColorChanged&&this.onFillColorChanged(kt),this.stateChanged()},Ht.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var kt=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),kt.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(kt)&&this.onStateChanged(this)}},Ht.typeName="MarkerBase",Ht}(),at=function(){function Ht(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Ht.prototype.findGripByVisual=function(kt){return this.topLeft.ownsTarget(kt)?this.topLeft:this.topCenter.ownsTarget(kt)?this.topCenter:this.topRight.ownsTarget(kt)?this.topRight:this.centerLeft.ownsTarget(kt)?this.centerLeft:this.centerRight.ownsTarget(kt)?this.centerRight:this.bottomLeft.ownsTarget(kt)?this.bottomLeft:this.bottomCenter.ownsTarget(kt)?this.bottomCenter:this.bottomRight.ownsTarget(kt)?this.bottomRight:void 0},Ht}(),ct=function(){function Ht(){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 Ht.prototype.ownsTarget=function(kt){return kt===this.visual||kt===this.visual.childNodes[0]||kt===this.visual.childNodes[1]},Ht}(),pt=function(){function Ht(){}return Ht.toITransformMatrix=function(kt){return{a:kt.a,b:kt.b,c:kt.c,d:kt.d,e:kt.e,f:kt.f}},Ht.toSVGMatrix=function(kt,mt){return kt.a=mt.a,kt.b=mt.b,kt.c=mt.c,kt.d=mt.d,kt.e=mt.e,kt.f=mt.f,kt},Ht}(),xt=function(Ht){function kt(mt,vt,Lt){var Bt=Ht.call(this,mt,vt,Lt)||this;return Bt.left=0,Bt.top=0,Bt.width=0,Bt.height=0,Bt.defaultSize={x:50,y:20},Bt.offsetX=0,Bt.offsetY=0,Bt.rotationAngle=0,Bt.CB_DISTANCE=10,Bt._suppressMarkerCreateEvent=!1,Bt.container.transform.baseVal.appendItem(Rt.createTransform()),Bt.setupControlBox(),Bt}return te(kt,Ht),Object.defineProperty(kt.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(kt.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}),kt.prototype.ownsTarget=function(mt){return!!Ht.prototype.ownsTarget.call(this,mt)||!!(this.controlGrips.findGripByVisual(mt)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(mt))},kt.prototype.pointerDown=function(mt,vt){Ht.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 Bt=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Bt.x-this.width/2,this.top=Bt.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Kt=this.container.transform.baseVal.getItem(0);Kt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Kt,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},kt.prototype.pointerUp=function(mt){var vt=this.state;Ht.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)},kt.prototype.moveVisual=function(mt){this.visual.style.transform="translate("+mt.x+"px, "+mt.y+"px)"},kt.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)},kt.prototype.resize=function(mt){var vt=this.manipulationStartLeft,Lt=this.manipulationStartWidth,Bt=this.manipulationStartTop,Kt=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:Bt=this.manipulationStartTop+mt.y-this.manipulationStartY,Kt=this.manipulationStartHeight+this.manipulationStartTop-Bt;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Kt=this.manipulationStartHeight+mt.y-this.manipulationStartY}Lt>=0?(this.left=vt,this.width=Lt):(this.left=vt+Lt,this.width=-Lt),Kt>=0?(this.top=Bt,this.height=Kt):(this.top=Bt+Kt,this.height=-Kt),this.setSize()},kt.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},kt.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()}},kt.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)},kt.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}},kt.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}},kt.prototype.select=function(){Ht.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},kt.prototype.deselect=function(){Ht.prototype.deselect.call(this),this.controlBox.style.display="none"},kt.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"},kt.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()},kt.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()},kt.prototype.createGrip=function(){var mt=new ct;return mt.visual.transform.baseVal.appendItem(Rt.createTransform()),this.controlBox.appendChild(mt.visual),mt},kt.prototype.positionGrips=function(){var mt=this.controlGrips.topLeft.GRIP_SIZE,vt=-mt/2,Lt=vt,Bt=(this.width+this.CB_DISTANCE)/2-mt/2,Kt=(this.height+this.CB_DISTANCE)/2-mt/2,ge=this.height+this.CB_DISTANCE-mt/2,ke=this.width+this.CB_DISTANCE-mt/2;this.positionGrip(this.controlGrips.topLeft.visual,vt,Lt),this.positionGrip(this.controlGrips.topCenter.visual,Bt,Lt),this.positionGrip(this.controlGrips.topRight.visual,ke,Lt),this.positionGrip(this.controlGrips.centerLeft.visual,vt,Kt),this.positionGrip(this.controlGrips.centerRight.visual,ke,Kt),this.positionGrip(this.controlGrips.bottomLeft.visual,vt,ge),this.positionGrip(this.controlGrips.bottomCenter.visual,Bt,ge),this.positionGrip(this.controlGrips.bottomRight.visual,ke,ge),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Bt,Lt-3*this.CB_DISTANCE)},kt.prototype.positionGrip=function(mt,vt,Lt){var Bt=mt.transform.baseVal.getItem(0);Bt.setTranslate(vt,Lt),mt.transform.baseVal.replaceItem(Bt,0)},kt.prototype.hideControlBox=function(){this.controlBox.style.display="none"},kt.prototype.showControlBox=function(){this.controlBox.style.display=""},kt.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:pt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:pt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Ht.prototype.getState.call(this))},kt.prototype.restoreState=function(mt){Ht.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(pt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,vt.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(pt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,vt.containerTransformMatrix))},kt.prototype.scale=function(mt,vt){Ht.prototype.scale.call(this,mt,vt);var Lt=this.rotatePoint({x:this.left,y:this.top}),Bt=this.unrotatePoint({x:Lt.x*mt,y:Lt.y*vt});this.left=Bt.x,this.top=Bt.y,this.width=this.width*mt,this.height=this.height*vt,this.adjustControlBox()},kt}(At),Mt=function(Ht){function kt(mt,vt,Lt){var Bt=Ht.call(this,mt,vt,Lt)||this;return Bt.fillColor="transparent",Bt.strokeColor="transparent",Bt.strokeWidth=0,Bt.strokeDasharray="",Bt.opacity=1,Bt.setStrokeColor=Bt.setStrokeColor.bind(Bt),Bt.setFillColor=Bt.setFillColor.bind(Bt),Bt.setStrokeWidth=Bt.setStrokeWidth.bind(Bt),Bt.setStrokeDasharray=Bt.setStrokeDasharray.bind(Bt),Bt.createVisual=Bt.createVisual.bind(Bt),Bt}return te(kt,Ht),kt.prototype.ownsTarget=function(mt){return!(!Ht.prototype.ownsTarget.call(this,mt)&&mt!==this.visual)},kt.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)},kt.prototype.pointerDown=function(mt,vt){Ht.prototype.pointerDown.call(this,mt,vt),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},kt.prototype.manipulate=function(mt){Ht.prototype.manipulate.call(this,mt)},kt.prototype.resize=function(mt){Ht.prototype.resize.call(this,mt),this.setSize()},kt.prototype.setSize=function(){Ht.prototype.setSize.call(this),Rt.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},kt.prototype.pointerUp=function(mt){Ht.prototype.pointerUp.call(this,mt),this.setSize()},kt.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.visual&&Rt.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},kt.prototype.setFillColor=function(mt){this.fillColor=mt,this.visual&&Rt.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},kt.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.visual&&Rt.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},kt.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.visual&&Rt.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},kt.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Ht.prototype.getState.call(this))},kt.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(),Ht.prototype.restoreState.call(this,mt),this.setSize()},kt.prototype.scale=function(mt,vt){Ht.prototype.scale.call(this,mt,vt),this.setSize()},kt.title="Rectangle marker",kt}(xt),_t=function(Ht){function kt(mt,vt,Lt,Bt){var Kt=Ht.call(this,mt,Bt||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Kt.widths=[],Kt.widthBoxes=[],Kt.widths=vt,Kt.currentWidth=Lt,Kt.setCurrentWidth=Kt.setCurrentWidth.bind(Kt),Kt}return te(kt,Ht),kt.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 Bt=document.createElement("div");Bt.style.display="flex",Bt.style.flexGrow="2",Bt.style.alignItems="center",Bt.style.justifyContent="space-between",Bt.style.padding="5px",Bt.style.borderWidth="2px",Bt.style.borderStyle="solid",Bt.style.borderColor=Lt===mt.currentWidth?mt.uiStyleSettings.toolboxAccentColor:"transparent",Bt.addEventListener("click",function(){mt.setCurrentWidth(Lt,Bt)}),vt.appendChild(Bt);var Kt=document.createElement("div");Kt.innerText=Lt.toString(),Kt.style.marginRight="5px",Bt.appendChild(Kt);var ge=document.createElement("div");ge.style.minHeight="20px",ge.style.flexGrow="2",ge.style.display="flex",ge.style.alignItems="center";var ke=document.createElement("hr");ke.style.minWidth="20px",ke.style.border="0px",ke.style.borderTop=Lt+"px solid "+mt.uiStyleSettings.toolboxColor,ke.style.flexGrow="2",ge.appendChild(ke),Bt.appendChild(ge),mt.widthBoxes.push(Bt)}),vt},kt.prototype.setCurrentWidth=function(mt,vt){var Lt=this;this.currentWidth=mt,this.widthBoxes.forEach(function(Bt){Bt.style.borderColor=Bt===vt?Lt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},kt}(nt),Qt=function(Ht){function kt(mt,vt,Lt,Bt){var Kt=Ht.call(this,mt,Bt||'<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 Kt.styles=[],Kt.styleBoxes=[],Kt.styles=vt,Kt.currentStyle=Lt,Kt.setCurrentStyle=Kt.setCurrentStyle.bind(Kt),Kt}return te(kt,Ht),kt.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 Bt=document.createElement("div");Bt.style.display="flex",Bt.style.alignItems="center",Bt.style.justifyContent="space-between",Bt.style.padding="5px",Bt.style.borderWidth="2px",Bt.style.borderStyle="solid",Bt.style.overflow="hidden",Bt.style.maxWidth=100/mt.styles.length-5+"%",Bt.style.borderColor=Lt===mt.currentStyle?mt.uiStyleSettings.toolboxAccentColor:"transparent",Bt.addEventListener("click",function(){mt.setCurrentStyle(Lt,Bt)}),vt.appendChild(Bt);var Kt=document.createElement("div");Kt.style.minHeight="20px",Kt.style.flexGrow="2",Kt.style.overflow="hidden";var ge=`<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>`;Kt.innerHTML=ge,Bt.appendChild(Kt),mt.styleBoxes.push(Bt)}),vt},kt.prototype.setCurrentStyle=function(mt,vt){var Lt=this;this.currentStyle=mt,this.styleBoxes.forEach(function(Bt){Bt.style.borderColor=Bt===vt?Lt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},kt}(nt),Vt=function(Ht){function kt(mt,vt,Lt){var Bt=Ht.call(this,mt,vt,Lt)||this;return Bt.strokeColor=Lt.defaultColor,Bt.strokeWidth=Lt.defaultStrokeWidth,Bt.strokeDasharray=Lt.defaultStrokeDasharray,Bt.strokePanel=new et("Line color",Lt.defaultColorSet,Lt.defaultColor),Bt.strokePanel.onColorChanged=Bt.setStrokeColor,Bt.strokeWidthPanel=new _t("Line width",Lt.defaultStrokeWidths,Lt.defaultStrokeWidth),Bt.strokeWidthPanel.onWidthChanged=Bt.setStrokeWidth,Bt.strokeStylePanel=new Qt("Line style",Lt.defaultStrokeDasharrays,Lt.defaultStrokeDasharray),Bt.strokeStylePanel.onStyleChanged=Bt.setStrokeDasharray,Bt}return te(kt,Ht),Object.defineProperty(kt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),kt.prototype.getState=function(){var mt=Ht.prototype.getState.call(this);return mt.typeName=kt.typeName,mt},kt.typeName="FrameMarker",kt.title="Frame marker",kt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',kt}(Mt),Zt=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"},$t=function(Ht){function kt(mt,vt,Lt){var Bt=Ht.call(this,mt,vt,Lt)||this;return Bt.x1=0,Bt.y1=0,Bt.x2=0,Bt.y2=0,Bt.defaultLength=50,Bt.manipulationStartX=0,Bt.manipulationStartY=0,Bt.manipulationStartX1=0,Bt.manipulationStartY1=0,Bt.manipulationStartX2=0,Bt.manipulationStartY2=0,Bt.setupControlBox(),Bt}return te(kt,Ht),kt.prototype.ownsTarget=function(mt){return!!Ht.prototype.ownsTarget.call(this,mt)||!(!this.grip1.ownsTarget(mt)&&!this.grip2.ownsTarget(mt))},kt.prototype.pointerDown=function(mt,vt){Ht.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")},kt.prototype.pointerUp=function(mt){var vt=this.state;Ht.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)},kt.prototype.adjustVisual=function(){},kt.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)},kt.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()},kt.prototype.select=function(){Ht.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},kt.prototype.deselect=function(){Ht.prototype.deselect.call(this),this.controlBox.style.display="none"},kt.prototype.setupControlBox=function(){this.controlBox=Rt.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},kt.prototype.adjustControlBox=function(){this.positionGrips()},kt.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},kt.prototype.createGrip=function(){var mt=new ct;return mt.visual.transform.baseVal.appendItem(Rt.createTransform()),this.controlBox.appendChild(mt.visual),mt},kt.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)},kt.prototype.positionGrip=function(mt,vt,Lt){var Bt=mt.transform.baseVal.getItem(0);Bt.setTranslate(vt,Lt),mt.transform.baseVal.replaceItem(Bt,0)},kt.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Ht.prototype.getState.call(this))},kt.prototype.restoreState=function(mt){Ht.prototype.restoreState.call(this,mt);var vt=mt;this.x1=vt.x1,this.y1=vt.y1,this.x2=vt.x2,this.y2=vt.y2},kt.prototype.scale=function(mt,vt){Ht.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()},kt}(At),Pe=function(Ht){function kt(mt,vt,Lt){var Bt=Ht.call(this,mt,vt,Lt)||this;return Bt.strokeColor="transparent",Bt.strokeWidth=0,Bt.strokeDasharray="",Bt.setStrokeColor=Bt.setStrokeColor.bind(Bt),Bt.setStrokeWidth=Bt.setStrokeWidth.bind(Bt),Bt.setStrokeDasharray=Bt.setStrokeDasharray.bind(Bt),Bt.strokeColor=Lt.defaultColor,Bt.strokeWidth=Lt.defaultStrokeWidth,Bt.strokeDasharray=Lt.defaultStrokeDasharray,Bt.strokePanel=new et("Line color",Lt.defaultColorSet,Lt.defaultColor),Bt.strokePanel.onColorChanged=Bt.setStrokeColor,Bt.strokeWidthPanel=new _t("Line width",Lt.defaultStrokeWidths,Lt.defaultStrokeWidth),Bt.strokeWidthPanel.onWidthChanged=Bt.setStrokeWidth,Bt.strokeStylePanel=new Qt("Line style",Lt.defaultStrokeDasharrays,Lt.defaultStrokeDasharray),Bt.strokeStylePanel.onStyleChanged=Bt.setStrokeDasharray,Bt}return te(kt,Ht),kt.prototype.ownsTarget=function(mt){return!(!Ht.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.selectorLine&&mt!==this.visibleLine)},kt.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)},kt.prototype.pointerDown=function(mt,vt){Ht.prototype.pointerDown.call(this,mt,vt),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},kt.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()]]))},kt.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.adjustVisual(),this.colorChanged(mt)},kt.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.adjustVisual()},kt.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(kt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),kt.prototype.getState=function(){var mt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Ht.prototype.getState.call(this));return mt.typeName=kt.typeName,mt},kt.prototype.restoreState=function(mt){Ht.prototype.restoreState.call(this,mt);var vt=mt;this.strokeColor=vt.strokeColor,this.strokeWidth=vt.strokeWidth,this.strokeDasharray=vt.strokeDasharray,this.createVisual(),this.adjustVisual()},kt.typeName="LineMarker",kt.title="Line marker",kt.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',kt}($t),me=function(Ht){function kt(mt,vt,Lt,Bt){var Kt=Ht.call(this,mt,Bt||'<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 Kt.fonts=[],Kt.fontBoxes=[],Kt.fonts=vt,Kt.currentFont=Lt,Kt.setCurrentFont=Kt.setCurrentFont.bind(Kt),Kt}return te(kt,Ht),kt.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 Bt=document.createElement("div");Bt.style.display="inline-block",Bt.style.alignItems="center",Bt.style.justifyContent="space-between",Bt.style.padding="5px",Bt.style.borderWidth="2px",Bt.style.borderStyle="solid",Bt.style.overflow="hidden",Bt.style.maxWidth=100/mt.fonts.length-5+"%",Bt.style.borderColor=Lt===mt.currentFont?mt.uiStyleSettings.toolboxAccentColor:"transparent",Bt.addEventListener("click",function(){mt.setCurrentFont(Lt,Bt)}),vt.appendChild(Bt);var Kt=document.createElement("div");Kt.style.display="flex",Kt.style.minHeight="20px",Kt.style.flexGrow="2",Kt.style.fontFamily=Lt,Kt.style.overflow="hidden";var ge=document.createElement("div");ge.style.whiteSpace="nowrap",ge.style.overflow="hidden",ge.style.textOverflow="ellipsis",ge.innerHTML="The quick brown fox jumps over the lazy dog",Kt.appendChild(ge),Bt.appendChild(Kt),mt.fontBoxes.push(Bt)}),vt},kt.prototype.setCurrentFont=function(mt,vt){var Lt=this;this.currentFont=mt,this.fontBoxes.forEach(function(Bt){Bt.style.borderColor=Bt===vt?Lt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},kt}(nt),$e=function(Ht){function kt(mt,vt,Lt){var Bt=Ht.call(this,mt,vt,Lt)||this;return Bt.color="transparent",Bt.padding=5,Bt.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Bt.text=Bt.DEFAULT_TEXT,Bt.isMoved=!1,Bt.color=Lt.defaultColor,Bt.fontFamily=Lt.defaultFontFamily,Bt.defaultSize={x:100,y:30},Bt.setColor=Bt.setColor.bind(Bt),Bt.setFont=Bt.setFont.bind(Bt),Bt.renderText=Bt.renderText.bind(Bt),Bt.sizeText=Bt.sizeText.bind(Bt),Bt.textEditDivClicked=Bt.textEditDivClicked.bind(Bt),Bt.showTextEditor=Bt.showTextEditor.bind(Bt),Bt.setSize=Bt.setSize.bind(Bt),Bt.positionTextEditor=Bt.positionTextEditor.bind(Bt),Bt.colorPanel=new et("Color",Lt.defaultColorSet,Lt.defaultColor),Bt.colorPanel.onColorChanged=Bt.setColor,Bt.fontFamilyPanel=new me("Font",Lt.defaultFontFamilies,Lt.defaultFontFamily),Bt.fontFamilyPanel.onFontChanged=Bt.setFont,Bt}return te(kt,Ht),kt.prototype.ownsTarget=function(mt){if(Ht.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},kt.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()},kt.prototype.pointerDown=function(mt,vt){Ht.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")},kt.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)}},kt.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,Bt=(1*this.height-this.height*this.padding*2/100)/mt.height;vt=Math.min(Lt,Bt)}return vt},kt.prototype.getTextPosition=function(mt){var vt=this.textElement.getBBox(),Lt=0,Bt=0;return vt.width>0&&vt.height>0&&(Lt=(this.width-vt.width*mt)/2,Bt=this.height/2-vt.height*mt/2),{x:Lt,y:Bt}},kt.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))},kt.prototype.manipulate=function(mt){Ht.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)},kt.prototype.resize=function(mt){Ht.prototype.resize.call(this,mt),this.isMoved=!0,this.setSize(),this.sizeText()},kt.prototype.setSize=function(){Ht.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()]]))},kt.prototype.pointerUp=function(mt){var vt=this.state;vt==="creating"&&(this._suppressMarkerCreateEvent=!0),Ht.prototype.pointerUp.call(this,mt),this.setSize(),(vt==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},kt.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"),Bt=window.getSelection();if(!Bt.rangeCount)return!1;Bt.deleteFromDocument(),Bt.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")},kt.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(),Bt={x:Lt.width*mt,y:Lt.height*mt};vt.x-=Bt.x/2,vt.y-=Bt.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"}},kt.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()},kt.prototype.select=function(){Ht.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},kt.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Ht.prototype.deselect.call(this)},kt.prototype.dblClick=function(mt,vt){Ht.prototype.dblClick.call(this,mt,vt),this.showTextEditor()},kt.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)},kt.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()},kt.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},kt.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(kt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),kt.prototype.getState=function(){var mt=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Ht.prototype.getState.call(this));return mt.typeName=kt.typeName,mt},kt.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(),Ht.prototype.restoreState.call(this,mt),this.setSize()},kt.prototype.scale=function(mt,vt){Ht.prototype.scale.call(this,mt,vt),this.setSize(),this.sizeText(),this.positionTextEditor()},kt.typeName="TextMarker",kt.title="Text marker",kt.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>',kt}(xt),tn=function(Ht){function kt(mt,vt,Lt){var Bt=Ht.call(this,mt,vt,Lt)||this;return Bt.color="transparent",Bt.lineWidth=3,Bt.drawing=!1,Bt.pixelRatio=1,Bt.color=Lt.defaultColor,Bt.lineWidth=Lt.defaultStrokeWidth,Bt.pixelRatio=Lt.freehandPixelRatio,Bt.setColor=Bt.setColor.bind(Bt),Bt.addCanvas=Bt.addCanvas.bind(Bt),Bt.finishCreation=Bt.finishCreation.bind(Bt),Bt.setLineWidth=Bt.setLineWidth.bind(Bt),Bt.colorPanel=new et("Color",Lt.defaultColorSet,Lt.defaultColor),Bt.colorPanel.onColorChanged=Bt.setColor,Bt.lineWidthPanel=new _t("Line width",Lt.defaultStrokeWidths,Lt.defaultStrokeWidth),Bt.lineWidthPanel.onWidthChanged=Bt.setLineWidth,Bt}return te(kt,Ht),kt.prototype.ownsTarget=function(mt){return!(!Ht.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.drawingImage)},kt.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)},kt.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):Ht.prototype.pointerDown.call(this,mt,vt)},kt.prototype.manipulate=function(mt){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(mt.x,mt.y),this.canvasContext.stroke()):Ht.prototype.manipulate.call(this,mt)},kt.prototype.resize=function(mt){Ht.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()]])},kt.prototype.pointerUp=function(mt){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Ht.prototype.pointerUp.call(this,mt)},kt.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)},kt.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Ht.prototype.select.call(this)},kt.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Ht.prototype.deselect.call(this)},kt.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],Bt=vt[1],Kt=vt[2],ge=vt[3],ke=!1,Je=0;Je<this.canvasElement.height;Je++)for(var ve=0;ve<this.canvasElement.width;ve++)mt.data[Je*this.canvasElement.width*4+4*ve+3]>0&&(ke=!0,Je<Bt&&(Bt=Je),ve<Lt&&(Lt=ve),Je>ge&&(ge=Je),ve>Kt&&(Kt=ve));if(ke){this.left=Lt/this.pixelRatio,this.top=Bt/this.pixelRatio,this.width=(Kt-Lt)/this.pixelRatio,this.height=(ge-Bt)/this.pixelRatio;var ze=document.createElement("canvas");ze.width=Kt-Lt,ze.height=ge-Bt,ze.getContext("2d").putImageData(this.canvasContext.getImageData(Lt,Bt,Kt-Lt,ge-Bt),0,0),this.drawingImgUrl=ze.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},kt.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})},kt.prototype.setColor=function(mt){this.color=mt,this.colorChanged(mt)},kt.prototype.setLineWidth=function(mt){this.lineWidth=mt},Object.defineProperty(kt.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),kt.prototype.getState=function(){var mt=Object.assign({drawingImgUrl:this.drawingImgUrl},Ht.prototype.getState.call(this));return mt.typeName=kt.typeName,mt},kt.prototype.restoreState=function(mt){this.createVisual(),Ht.prototype.restoreState.call(this,mt),this.drawingImgUrl=mt.drawingImgUrl,this.setDrawingImage()},kt.prototype.scale=function(mt,vt){Ht.prototype.scale.call(this,mt,vt),this.setDrawingImage()},kt.typeName="FreehandMarker",kt.title="Freehand marker",kt.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>',kt}(xt),Cn=function(Ht){function kt(mt,vt,Lt){var Bt=Ht.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 Bt.typeBoxes=[],Bt.currentType=vt,Bt.setCurrentType=Bt.setCurrentType.bind(Bt),Bt}return te(kt,Ht),kt.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(ge){var ke="both";switch(ge){case 0:ke="both";break;case 1:ke="start";break;case 2:ke="end";break;case 3:ke="none"}var Je=document.createElement("div");if(Je.style.display="flex",Je.style.flexGrow="2",Je.style.alignItems="center",Je.style.justifyContent="space-between",Je.style.padding="5px",Je.style.borderWidth="2px",Je.style.borderStyle="solid",Je.style.borderColor=ke===Bt.currentType?Bt.uiStyleSettings.toolboxAccentColor:"transparent",Je.addEventListener("click",function(){mt.setCurrentType(ke,Je)}),vt.appendChild(Je),ke==="both"||ke==="start"){var ve=document.createElement("div");ve.style.display="flex",ve.style.alignItems="center",ve.style.minHeight="20px",ve.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="`+(Bt.uiStyleSettings!==void 0?Bt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,ve.style.marginLeft="5px",Je.appendChild(ve)}var ze=document.createElement("div");ze.style.display="flex",ze.style.alignItems="center",ze.style.minHeight="20px",ze.style.flexGrow="2";var De=document.createElement("hr");if(De.style.minWidth="20px",De.style.border="0px",De.style.borderTop="3px solid "+(Bt.uiStyleSettings!==void 0?Bt.uiStyleSettings.toolboxColor:"#eeeeee"),De.style.flexGrow="2",ze.appendChild(De),Je.appendChild(ze),ke==="both"||ke==="end"){var nn=document.createElement("div");nn.style.display="flex",nn.style.alignItems="center",nn.style.minHeight="20px",nn.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="`+(Bt.uiStyleSettings!==void 0?Bt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,nn.style.marginRight="5px",Je.appendChild(nn)}Bt.typeBoxes.push(Je)},Bt=this,Kt=0;Kt<4;Kt++)Lt(Kt);return vt},kt.prototype.setCurrentType=function(mt,vt){var Lt=this;this.currentType=mt,this.typeBoxes.forEach(function(Bt){Bt.style.borderColor=Bt===vt?Lt.uiStyleSettings!==void 0?Lt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},kt}(nt),Tn=function(Ht){function kt(mt,vt,Lt){var Bt=Ht.call(this,mt,vt,Lt)||this;return Bt.arrowType="end",Bt.arrowBaseHeight=10,Bt.arrowBaseWidth=10,Bt.getArrowPoints=Bt.getArrowPoints.bind(Bt),Bt.setArrowType=Bt.setArrowType.bind(Bt),Bt.arrowTypePanel=new Cn("Arrow type","end"),Bt.arrowTypePanel.onArrowTypeChanged=Bt.setArrowType,Bt}return te(kt,Ht),kt.prototype.ownsTarget=function(mt){return!(!Ht.prototype.ownsTarget.call(this,mt)&&mt!==this.arrow1&&mt!==this.arrow2)},kt.prototype.getArrowPoints=function(mt,vt){var Lt=this.arrowBaseWidth+2*this.strokeWidth,Bt=this.arrowBaseHeight+2*this.strokeWidth;return mt-Lt/2+","+(vt+Bt/2)+" "+mt+","+(vt-Bt/2)+" "+(mt+Lt/2)+","+(vt+Bt/2)},kt.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)},kt.prototype.pointerDown=function(mt,vt){Ht.prototype.pointerDown.call(this,mt,vt),this.state==="creating"&&this.createTips()},kt.prototype.adjustVisual=function(){if(Ht.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)}},kt.prototype.setArrowType=function(mt){this.arrowType=mt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(kt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),kt.prototype.getState=function(){var mt=Object.assign({arrowType:this.arrowType},Ht.prototype.getState.call(this));return mt.typeName=kt.typeName,mt},kt.prototype.restoreState=function(mt){Ht.prototype.restoreState.call(this,mt);var vt=mt;this.arrowType=vt.arrowType,this.createTips(),this.adjustVisual()},kt.typeName="ArrowMarker",kt.title="Arrow marker",kt.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',kt}(Pe),In=function(Ht){function kt(mt,vt,Lt){var Bt=Ht.call(this,mt,vt,Lt)||this;return Bt.fillColor=Lt.defaultFillColor,Bt.strokeWidth=0,Bt.fillPanel=new et("Color",Lt.defaultColorSet,Lt.defaultFillColor),Bt.fillPanel.onColorChanged=Bt.setFillColor,Bt}return te(kt,Ht),Object.defineProperty(kt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),kt.prototype.getState=function(){var mt=Ht.prototype.getState.call(this);return mt.typeName=kt.typeName,mt},kt.typeName="CoverMarker",kt.title="Cover marker",kt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',kt}(Mt),$n=function(Ht){function kt(mt,vt,Lt,Bt){var Kt=Ht.call(this,mt,Bt||'<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 Kt.opacities=[],Kt.opacityBoxes=[],Kt.opacities=vt,Kt.currentOpacity=Lt,Kt.setCurrentOpacity=Kt.setCurrentOpacity.bind(Kt),Kt}return te(kt,Ht),kt.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 Bt=document.createElement("div");Bt.style.display="flex",Bt.style.alignItems="center",Bt.style.justifyContent="center",Bt.style.padding="5px",Bt.style.borderWidth="2px",Bt.style.borderStyle="solid",Bt.style.borderColor=Lt===mt.currentOpacity?mt.uiStyleSettings.toolboxAccentColor:"transparent",Bt.addEventListener("click",function(){mt.setCurrentOpacity(Lt,Bt)}),vt.appendChild(Bt);var Kt=document.createElement("div");Kt.innerText=100*Lt+"%",Bt.appendChild(Kt),mt.opacityBoxes.push(Bt)}),vt},kt.prototype.setCurrentOpacity=function(mt,vt){var Lt=this;this.currentOpacity=mt,this.opacityBoxes.forEach(function(Bt){Bt.style.borderColor=Bt===vt?Lt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},kt}(nt),Ln=function(Ht){function kt(mt,vt,Lt){var Bt=Ht.call(this,mt,vt,Lt)||this;return Bt.setOpacity=Bt.setOpacity.bind(Bt),Bt.fillColor=Lt.defaultHighlightColor,Bt.strokeWidth=0,Bt.opacity=Lt.defaultHighlightOpacity,Bt.fillPanel=new et("Color",Lt.defaultColorSet,Bt.fillColor),Bt.fillPanel.onColorChanged=Bt.setFillColor,Bt.opacityPanel=new $n("Opacity",Lt.defaultOpacitySteps,Bt.opacity),Bt.opacityPanel.onOpacityChanged=Bt.setOpacity,Bt}return te(kt,Ht),kt.prototype.setOpacity=function(mt){this.opacity=mt,this.visual&&Rt.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(kt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),kt.prototype.getState=function(){var mt=Ht.prototype.getState.call(this);return mt.typeName=kt.typeName,mt},kt.typeName="HighlightMarker",kt.title="Highlight marker",kt.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>',kt}(In),be='<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>',re='<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>',Pn=function(Ht){function kt(mt,vt,Lt){var Bt=Ht.call(this,mt,vt,Lt)||this;return Bt.bgColor="transparent",Bt.tipPosition={x:0,y:0},Bt.tipBase1Position={x:0,y:0},Bt.tipBase2Position={x:0,y:0},Bt.tipMoving=!1,Bt.color=Lt.defaultStrokeColor,Bt.bgColor=Lt.defaultFillColor,Bt.fontFamily=Lt.defaultFontFamily,Bt.defaultSize={x:100,y:30},Bt.setBgColor=Bt.setBgColor.bind(Bt),Bt.getTipPoints=Bt.getTipPoints.bind(Bt),Bt.positionTip=Bt.positionTip.bind(Bt),Bt.setTipPoints=Bt.setTipPoints.bind(Bt),Bt.colorPanel=new et("Text color",Lt.defaultColorSet,Bt.color,be),Bt.colorPanel.onColorChanged=Bt.setColor,Bt.bgColorPanel=new et("Fill color",Lt.defaultColorSet,Bt.bgColor,re),Bt.bgColorPanel.onColorChanged=Bt.setBgColor,Bt.fontFamilyPanel=new me("Font",Lt.defaultFontFamilies,Lt.defaultFontFamily),Bt.fontFamilyPanel.onFontChanged=Bt.setFont,Bt.tipGrip=new ct,Bt.tipGrip.visual.transform.baseVal.appendItem(Rt.createTransform()),Bt.controlBox.appendChild(Bt.tipGrip.visual),Bt}return te(kt,Ht),kt.prototype.ownsTarget=function(mt){return Ht.prototype.ownsTarget.call(this,mt)||this.tipGrip.ownsTarget(mt)||this.tip===mt},kt.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)},kt.prototype.pointerDown=function(mt,vt){this.state==="new"&&Ht.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):Ht.prototype.pointerDown.call(this,mt,vt)},kt.prototype.pointerUp=function(mt){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Ht.prototype.pointerUp.call(this,mt);else{var vt=this.state==="creating";Ht.prototype.pointerUp.call(this,mt),this.setTipPoints(vt),this.positionTip()}},kt.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 Ht.prototype.manipulate.call(this,mt)},kt.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)},kt.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},kt.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 Bt=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Bt<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?Bt<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?Bt<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}):Bt<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})},kt.prototype.resize=function(mt){Ht.prototype.resize.call(this,mt),this.positionTip()},kt.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(kt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),kt.prototype.select=function(){this.positionTip(),Ht.prototype.select.call(this)},kt.prototype.getState=function(){var mt=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Ht.prototype.getState.call(this));return mt.typeName=kt.typeName,mt},kt.prototype.restoreState=function(mt){var vt=mt;this.bgColor=vt.bgColor,this.tipPosition=vt.tipPosition,Ht.prototype.restoreState.call(this,mt),this.createTip(),this.setTipPoints()},kt.prototype.scale=function(mt,vt){Ht.prototype.scale.call(this,mt,vt),this.tipPosition={x:this.tipPosition.x*mt,y:this.tipPosition.y*vt},this.positionTip()},kt.typeName="CalloutMarker",kt.title="Callout marker",kt.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>',kt}($e),li=function(Ht){function kt(mt,vt,Lt){var Bt=Ht.call(this,mt,vt,Lt)||this;return Bt.fillColor="transparent",Bt.strokeColor="transparent",Bt.strokeWidth=0,Bt.strokeDasharray="",Bt.opacity=1,Bt.strokeColor=Lt.defaultColor,Bt.strokeWidth=Lt.defaultStrokeWidth,Bt.strokeDasharray=Lt.defaultStrokeDasharray,Bt.fillColor=Lt.defaultFillColor,Bt.setStrokeColor=Bt.setStrokeColor.bind(Bt),Bt.setFillColor=Bt.setFillColor.bind(Bt),Bt.setStrokeWidth=Bt.setStrokeWidth.bind(Bt),Bt.setStrokeDasharray=Bt.setStrokeDasharray.bind(Bt),Bt.setOpacity=Bt.setOpacity.bind(Bt),Bt.createVisual=Bt.createVisual.bind(Bt),Bt.strokePanel=new et("Line color",de(Lt.defaultColorSet,["transparent"]),Lt.defaultColor),Bt.strokePanel.onColorChanged=Bt.setStrokeColor,Bt.fillPanel=new et("Fill color",de(Lt.defaultColorSet,["transparent"]),Bt.fillColor,re),Bt.fillPanel.onColorChanged=Bt.setFillColor,Bt.strokeWidthPanel=new _t("Line width",Lt.defaultStrokeWidths,Lt.defaultStrokeWidth),Bt.strokeWidthPanel.onWidthChanged=Bt.setStrokeWidth,Bt.strokeStylePanel=new Qt("Line style",Lt.defaultStrokeDasharrays,Lt.defaultStrokeDasharray),Bt.strokeStylePanel.onStyleChanged=Bt.setStrokeDasharray,Bt.opacityPanel=new $n("Opacity",Lt.defaultOpacitySteps,Bt.opacity),Bt.opacityPanel.onOpacityChanged=Bt.setOpacity,Bt}return te(kt,Ht),kt.prototype.ownsTarget=function(mt){return!(!Ht.prototype.ownsTarget.call(this,mt)&&mt!==this.visual)},kt.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)},kt.prototype.pointerDown=function(mt,vt){Ht.prototype.pointerDown.call(this,mt,vt),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},kt.prototype.manipulate=function(mt){Ht.prototype.manipulate.call(this,mt)},kt.prototype.resize=function(mt){Ht.prototype.resize.call(this,mt),this.setSize()},kt.prototype.setSize=function(){Ht.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()]])},kt.prototype.pointerUp=function(mt){Ht.prototype.pointerUp.call(this,mt),this.setSize()},kt.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.visual&&Rt.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},kt.prototype.setFillColor=function(mt){this.fillColor=mt,this.visual&&Rt.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(mt),this.stateChanged()},kt.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.visual&&Rt.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},kt.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.visual&&Rt.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},kt.prototype.setOpacity=function(mt){this.opacity=mt,this.visual&&Rt.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(kt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),kt.prototype.getState=function(){var mt=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Ht.prototype.getState.call(this));return mt.typeName=kt.typeName,mt},kt.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(),Ht.prototype.restoreState.call(this,mt),this.setSize()},kt.prototype.scale=function(mt,vt){Ht.prototype.scale.call(this,mt,vt),this.setSize()},kt.typeName="EllipseMarker",kt.title="Ellipse marker",kt.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>',kt}(xt),Jn=function(Ht){function kt(mt,vt,Lt){return Ht.call(this,mt,vt,Lt)||this}return te(kt,Ht),Object.defineProperty(kt.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),kt.prototype.ownsTarget=function(mt){return!(!Ht.prototype.ownsTarget.call(this,mt)&&mt!==this.tip1&&mt!==this.tip2)},kt.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)},kt.prototype.pointerDown=function(mt,vt){Ht.prototype.pointerDown.call(this,mt,vt),this.state==="creating"&&this.createTips()},kt.prototype.adjustVisual=function(){if(Ht.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(kt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),kt.prototype.getState=function(){var mt=Ht.prototype.getState.call(this);return mt.typeName=kt.typeName,mt},kt.prototype.restoreState=function(mt){Ht.prototype.restoreState.call(this,mt),this.createTips(),this.adjustVisual()},kt.typeName="MeasurementMarker",kt.title="Measurement marker",kt.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>',kt}(Pe),un=function(Ht){function kt(mt,vt,Lt){var Bt=Ht.call(this,mt,vt,Lt)||this;return Bt.strokePanel.colors=Lt.defaultColorSet,Bt.fillColor="transparent",Bt}return te(kt,Ht),Object.defineProperty(kt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),kt.prototype.getState=function(){var mt=Ht.prototype.getState.call(this);return mt.typeName=kt.typeName,mt},kt.typeName="EllipseFrameMarker",kt.title="Ellipse frame marker",kt.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>',kt}(li),Yn=function(){function Ht(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Ht.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Ht.prototype.addUndoStep=function(kt){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(kt)||(this.undoStack.push(kt),JSON.stringify(this.lastRedoStep)!==JSON.stringify(kt)&&this.redoStack.splice(0,this.redoStack.length))},Ht.prototype.replaceLastUndoStep=function(kt){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=kt)},Ht.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Ht.prototype.undo=function(){if(this.undoStack.length>1){var kt=this.undoStack.pop();return kt!==void 0&&this.redoStack.push(kt),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Ht.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Ht}(),si=function(Ht){function kt(mt,vt,Lt){var Bt=Ht.call(this,mt,vt,Lt)||this;return Bt.strokeColor="transparent",Bt.strokeWidth=0,Bt.strokeDasharray="",Bt.curveX=0,Bt.curveY=0,Bt.manipulationStartCurveX=0,Bt.manipulationStartCurveY=0,Bt.setStrokeColor=Bt.setStrokeColor.bind(Bt),Bt.setStrokeWidth=Bt.setStrokeWidth.bind(Bt),Bt.setStrokeDasharray=Bt.setStrokeDasharray.bind(Bt),Bt.positionGrips=Bt.positionGrips.bind(Bt),Bt.addControlGrips=Bt.addControlGrips.bind(Bt),Bt.adjustVisual=Bt.adjustVisual.bind(Bt),Bt.setupControlBox=Bt.setupControlBox.bind(Bt),Bt.resize=Bt.resize.bind(Bt),Bt.strokeColor=Lt.defaultColor,Bt.strokeWidth=Lt.defaultStrokeWidth,Bt.strokeDasharray=Lt.defaultStrokeDasharray,Bt.strokePanel=new et("Line color",Lt.defaultColorSet,Lt.defaultColor),Bt.strokePanel.onColorChanged=Bt.setStrokeColor,Bt.strokeWidthPanel=new _t("Line width",Lt.defaultStrokeWidths,Lt.defaultStrokeWidth),Bt.strokeWidthPanel.onWidthChanged=Bt.setStrokeWidth,Bt.strokeStylePanel=new Qt("Line style",Lt.defaultStrokeDasharrays,Lt.defaultStrokeDasharray),Bt.strokeStylePanel.onStyleChanged=Bt.setStrokeDasharray,Bt}return te(kt,Ht),kt.prototype.ownsTarget=function(mt){return!(!Ht.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.selectorCurve&&mt!==this.visibleCurve&&!this.curveGrip.ownsTarget(mt))},kt.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},kt.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)},kt.prototype.pointerDown=function(mt,vt){Ht.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")},kt.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()]]))},kt.prototype.setupControlBox=function(){Ht.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)},kt.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Ht.prototype.addControlGrips.call(this)},kt.prototype.positionGrips=function(){Ht.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()))},kt.prototype.manipulate=function(mt){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+mt.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+mt.y-this.manipulationStartY),Ht.prototype.manipulate.call(this,mt)},kt.prototype.resize=function(mt){this.activeGrip===this.curveGrip&&(this.curveX=mt.x,this.curveY=mt.y),Ht.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)},kt.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.adjustVisual(),this.colorChanged(mt)},kt.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.adjustVisual()},kt.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.adjustVisual()},kt.prototype.scale=function(mt,vt){this.curveX=this.curveX*mt,this.curveY=this.curveY*vt,Ht.prototype.scale.call(this,mt,vt)},Object.defineProperty(kt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),kt.prototype.getState=function(){var mt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Ht.prototype.getState.call(this));return mt.typeName=kt.typeName,mt},kt.prototype.restoreState=function(mt){Ht.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()},kt.typeName="CurveMarker",kt.title="Curve marker",kt.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>',kt}($t),Fi=function(Ht){function kt(mt,vt,Lt){var Bt=Ht.call(this,mt,vt,Lt)||this;return Bt.fillColor="transparent",Bt.strokeColor="transparent",Bt.strokeWidth=0,Bt.strokeDasharray="",Bt.textColor="transparent",Bt.fontSize="1rem",Bt.isMoved=!1,Bt.captionText="Caption",Bt.PADDING=5,Bt.captionBoxWidth=0,Bt.captionBoxHeight=0,Bt.strokeColor=Lt.defaultColor,Bt.strokeWidth=Lt.defaultStrokeWidth,Bt.strokeDasharray=Lt.defaultStrokeDasharray,Bt.fillColor=Lt.defaultFillColor,Bt.textColor=Lt.defaultStrokeColor,Bt.fontFamily=Lt.defaultFontFamily,Bt.fontSize=Lt.defaultCaptionFontSize,Bt.captionText=Lt.defaultCaptionText,Bt.setStrokeColor=Bt.setStrokeColor.bind(Bt),Bt.setFillColor=Bt.setFillColor.bind(Bt),Bt.setStrokeWidth=Bt.setStrokeWidth.bind(Bt),Bt.setStrokeDasharray=Bt.setStrokeDasharray.bind(Bt),Bt.createVisual=Bt.createVisual.bind(Bt),Bt.sizeCaption=Bt.sizeCaption.bind(Bt),Bt.setCaptionText=Bt.setCaptionText.bind(Bt),Bt.showTextEditor=Bt.showTextEditor.bind(Bt),Bt.positionTextEditor=Bt.positionTextEditor.bind(Bt),Bt.finishTextEditing=Bt.finishTextEditing.bind(Bt),Bt.setFont=Bt.setFont.bind(Bt),Bt.setTextColor=Bt.setTextColor.bind(Bt),Bt.strokePanel=new et("Line color",de(Lt.defaultColorSet,["transparent"]),Bt.strokeColor),Bt.strokePanel.onColorChanged=Bt.setStrokeColor,Bt.fillPanel=new et("Fill color",de(Lt.defaultColorSet,["transparent"]),Bt.fillColor,re),Bt.fillPanel.onColorChanged=Bt.setFillColor,Bt.strokeWidthPanel=new _t("Line width",Lt.defaultStrokeWidths,Lt.defaultStrokeWidth),Bt.strokeWidthPanel.onWidthChanged=Bt.setStrokeWidth,Bt.strokeStylePanel=new Qt("Line style",Lt.defaultStrokeDasharrays,Lt.defaultStrokeDasharray),Bt.strokeStylePanel.onStyleChanged=Bt.setStrokeDasharray,Bt.fontFamilyPanel=new me("Font",Lt.defaultFontFamilies,Lt.defaultFontFamily),Bt.fontFamilyPanel.onFontChanged=Bt.setFont,Bt.textColorPanel=new et("Text color",Lt.defaultColorSet,Bt.textColor,be),Bt.textColorPanel.onColorChanged=Bt.setTextColor,Bt}return te(kt,Ht),kt.prototype.ownsTarget=function(mt){return!(!Ht.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.frame&&mt!==this.captionBg&&mt!==this.captionElement)},kt.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()},kt.prototype.setCaptionText=function(mt){this.captionText=mt,this.captionElement.textContent=this.captionText,this.sizeCaption()},kt.prototype.pointerDown=function(mt,vt){Ht.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")},kt.prototype.manipulate=function(mt){Ht.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)},kt.prototype.resize=function(mt){Ht.prototype.resize.call(this,mt),this.setSize()},kt.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')"]])},kt.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()},kt.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"))},kt.prototype.finishTextEditing=function(mt){this.setCaptionText(mt.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},kt.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()},kt.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()},kt.prototype.setSize=function(){Ht.prototype.setSize.call(this),Rt.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},kt.prototype.pointerUp=function(mt){Ht.prototype.pointerUp.call(this,mt),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},kt.prototype.dblClick=function(mt,vt){Ht.prototype.dblClick.call(this,mt,vt),this.showTextEditor()},kt.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.frame&&Rt.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},kt.prototype.setFillColor=function(mt){this.fillColor=mt,this.captionBg&&Rt.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(mt),this.stateChanged()},kt.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.frame&&Rt.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},kt.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.frame&&Rt.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(kt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),kt.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},Ht.prototype.getState.call(this));return mt.typeName=this.typeName,mt},kt.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(),Ht.prototype.restoreState.call(this,mt),this.setSize()},kt.prototype.scale=function(mt,vt){Ht.prototype.scale.call(this,mt,vt),this.setSize()},kt.typeName="CaptionFrameMarker",kt.title="Caption frame marker",kt.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>',kt}(xt),sn=function(){function Ht(kt,mt){mt===void 0&&(mt=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=kt,this.cancelable=mt}return Object.defineProperty(Ht.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Ht.prototype.preventDefault=function(){this._defaultPrevented=!0},Ht}(),oi=function(Ht){function kt(mt,vt,Lt){var Bt=Ht.call(this,mt,!1)||this;return Bt.dataUrl=vt,Bt.state=Lt,Bt}return te(kt,Ht),kt}(sn),Ee=function(Ht){function kt(mt,vt,Lt){Lt===void 0&&(Lt=!1);var Bt=Ht.call(this,mt,Lt)||this;return Bt.marker=vt,Bt}return te(kt,Ht),kt}(sn),ci=function(){function Ht(){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 Ht.prototype.addEventListener=function(kt,mt){this[kt].push(mt)},Ht.prototype.removeEventListener=function(kt,mt){var vt=this[kt].indexOf(mt);vt>-1&&this[kt].splice(vt,1)},Ht}(),Pi=function(){function Ht(kt){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Zt,this._isOpen=!1,this.undoRedoManager=new Yn,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 ci,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Ht.instanceCounter++,this.styles=new Wt(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=kt,this.targetRoot=document.body,this.width=kt.clientWidth,this.height=kt.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(Ht.prototype,"ALL_MARKER_TYPES",{get:function(){return[Vt,tn,Tn,$e,un,li,Ln,Pn,Jn,In,Pe,si,Fi]},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Vt,tn,Tn,$e,li,Ln,Pn]},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Vt,tn,Tn,$e,Ln]},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(kt){var mt=this;this._availableMarkerTypes.splice(0),kt.forEach(function(vt){if(typeof vt=="string"){var Lt=mt.ALL_MARKER_TYPES.find(function(Bt){return Bt.typeName===vt});Lt!==void 0&&mt._availableMarkerTypes.push(Lt)}else mt._availableMarkerTypes.push(vt)})},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(kt){this._zoomLevel=kt,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(Ht.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Ht.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ne.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Ht.prototype.show=function(){var kt=this;this.styles.styleSheetRoot===void 0&&ce.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ce.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(mt){return mt(new sn(kt))})},Ht.prototype.render=function(){return Ae(this,void 0,void 0,function(){var kt;return Ce(this,function(mt){switch(mt.label){case 0:return this.setCurrentMarker(),(kt=new ue).naturalSize=this.renderAtNaturalSize,kt.imageType=this.renderImageType,kt.imageQuality=this.renderImageQuality,kt.markersOnly=this.renderMarkersOnly,kt.width=this.renderWidth,kt.height=this.renderHeight,[4,kt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return mt.sent(),[4,kt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,mt.sent()]}})})},Ht.prototype.close=function(kt){var mt=this;if(kt===void 0&&(kt=!1),this.isOpen){var vt=!1;kt||this.eventListeners.beforeclose.forEach(function(Lt){var Bt=new sn(mt,!0);Lt(Bt),Bt.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 sn(mt))}),this.detachEvents(),this._isOpen=!1)}},Ht.prototype.addMarkersToToolbar=function(){for(var kt,mt=[],vt=0;vt<arguments.length;vt++)mt[vt]=arguments[vt];(kt=this._availableMarkerTypes).push.apply(kt,mt)},Ht.prototype.addRenderEventListener=function(kt){this.addEventListener("render",function(mt){kt(mt.dataUrl,mt.state)})},Ht.prototype.removeRenderEventListener=function(kt){},Ht.prototype.addCloseEventListener=function(kt){this.addEventListener("close",function(){kt()})},Ht.prototype.removeCloseEventListener=function(kt){},Ht.prototype.setupResizeObserver=function(){var kt=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){kt.resize(kt.target.clientWidth,kt.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return kt.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Ht.prototype.onPopupTargetResize=function(){var kt=1*this.target.clientWidth/this.target.clientHeight,mt=this.editorCanvas.clientWidth/kt>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*kt:this.editorCanvas.clientWidth,vt=mt<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/kt;this.resize(mt,vt)},Ht.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Ht.prototype.resize=function(kt,mt){this._isResizing=!0;var vt=kt/this.imageWidth,Lt=mt/this.imageHeight;this.imageWidth=Math.round(kt),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},Ht.prototype.scaleMarkers=function(kt,mt){var vt,Lt=this;this._currentMarker&&this._currentMarker instanceof $e?this._currentMarker.scale(kt,mt):(vt=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Bt){Bt!==Lt._currentMarker&&Bt.scale(kt,mt)}),vt!==void 0&&this.setCurrentMarker(vt)},Ht.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"},Ht.prototype.setTopLeft=function(){var kt=this.editingTarget.getBoundingClientRect(),mt=this.editorCanvas.getBoundingClientRect();this.left=kt.left-mt.left,this.top=kt.top-mt.top},Ht.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)},Ht.prototype.addDefs=function(){for(var kt,mt=[],vt=0;vt<arguments.length;vt++)mt[vt]=arguments[vt];this.defs=Rt.createDefs(),this.addDefsToImage(),(kt=this.defs).append.apply(kt,mt)},Ht.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Ht.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)},Ht.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Ht.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Ht.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)},Ht.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Ht.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)},Ht.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 kt=document.createElement("a");kt.href="https://markerjs.com/",kt.target="_blank",kt.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>',kt.title="Powered by marker.js",kt.style.display="grid",kt.style.alignItems="center",kt.style.justifyItems="center",kt.style.padding="3px",kt.style.width="20px",kt.style.height="20px",this.logoUI.appendChild(kt),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Ht.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")},Ht.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"},Ht.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Ht.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 kt=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=kt+"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 Le(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 Ut(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Ht.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Ht.prototype.removeMarker=function(kt){this.markerImage.removeChild(kt.container),this.markers.indexOf(kt)>-1&&this.markers.splice(this.markers.indexOf(kt),1),kt.dispose()},Ht.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())},Ht.prototype.toolbarButtonClicked=function(kt,mt){if(kt==="marker"&&mt!==void 0)this.createNewMarker(mt);else if(kt==="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()}},Ht.prototype.deleteSelectedMarker=function(){var kt=this;if(this._currentMarker!==void 0){var mt=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Lt){var Bt=new Ee(kt,kt._currentMarker,!0);Lt(Bt),Bt.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 Ee(kt,vt))})}}},Ht.prototype.clear=function(){var kt=this,mt=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Kt){var ge=new Ee(kt,void 0,!0);Kt(ge),ge.defaultPrevented&&(mt=!0)}),!mt)){this.setCurrentMarker();for(var vt=function(Kt){var ge=Lt.markers[Kt];Lt.setCurrentMarker(Lt.markers[Kt]),Lt._currentMarker.dispose(),Lt.markerImage.removeChild(Lt._currentMarker.container),Lt.markers.splice(Lt.markers.indexOf(Lt._currentMarker),1),Lt.eventListeners.markerdelete.forEach(function(ke){return ke(new Ee(kt,ge))})},Lt=this,Bt=this.markers.length-1;Bt>=0;Bt--)vt(Bt);this.addUndoStep()}},Object.defineProperty(Ht.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Ht.prototype.showNotesEditor=function(){var kt;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=(kt=this._currentMarker.notes)!==null&&kt!==void 0?kt:"",this.overlayContainer.appendChild(this.notesArea))},Ht.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)},Ht.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Ht.prototype.addUndoStep=function(){var kt=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(Bt){return Bt(new sn(kt))})}else this.undoRedoManager.replaceLastUndoStep(mt),this.eventListeners.statechange.forEach(function(Bt){return Bt(new sn(kt))})}},Ht.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Ht.prototype.undoStep=function(){var kt=this,mt=this.undoRedoManager.undo();mt!==void 0&&(this.restoreState(mt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(vt){return vt(new sn(kt))}))},Ht.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Ht.prototype.redoStep=function(){var kt=this,mt=this.undoRedoManager.redo();mt!==void 0&&(this.restoreState(mt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(vt){return vt(new sn(kt))}))},Ht.prototype.stepZoom=function(){var kt=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=kt<this.zoomSteps.length-1?this.zoomSteps[kt+1]:this.zoomSteps[0]},Ht.prototype.panTo=function(kt){this.contentDiv.scrollBy({left:this.prevPanPoint.x-kt.x,top:this.prevPanPoint.y-kt.y}),this.prevPanPoint=kt},Ht.prototype.startRenderAndClose=function(){return Ae(this,void 0,void 0,function(){var kt,mt,vt=this;return Ce(this,function(Lt){switch(Lt.label){case 0:return[4,this.render()];case 1:return kt=Lt.sent(),mt=this.getState(),this.eventListeners.render.forEach(function(Bt){return Bt(new oi(vt,kt,mt))}),this.close(!0),[2]}})})},Ht.prototype.getState=function(kt){kt===!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},Ht.prototype.restoreState=function(kt){var mt=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);kt.markers.forEach(function(vt){var Lt=mt._availableMarkerTypes.find(function(Kt){return Kt.typeName===vt.typeName});if(Lt!==void 0){var Bt=mt.addNewMarker(Lt);Bt.restoreState(vt),mt.markers.push(Bt)}}),kt.width&&kt.height&&(kt.width!==this.imageWidth||kt.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/kt.width,this.imageHeight/kt.height),this.eventListeners.restorestate.forEach(function(vt){return vt(new sn(mt))})},Ht.prototype.addNewMarker=function(kt){var mt=Rt.createGroup();return this.markerImage.appendChild(mt),new kt(mt,this.overlayContainer,this.settings)},Ht.prototype.createNewMarker=function(kt){var mt,vt=this;(mt=typeof kt=="string"?this._availableMarkerTypes.find(function(Lt){return Lt.typeName===kt}):kt)&&(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 Ee(vt,vt._currentMarker))}))},Ht.prototype.markerCreated=function(kt){var mt=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(kt),this.setCurrentMarker(kt),kt instanceof tn&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(tn):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(vt){return vt(new Ee(mt,mt._currentMarker))})},Ht.prototype.colorChanged=function(kt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=kt,this.settings.defaultStrokeColor=kt)},Ht.prototype.fillColorChanged=function(kt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=kt)},Ht.prototype.markerStateChanged=function(kt){var mt=this;this.eventListeners.markerchange.forEach(function(vt){return vt(new Ee(mt,kt))})},Ht.prototype.setCurrentMarker=function(kt){var mt=this;this._currentMarker!==kt&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(vt){return vt(new Ee(mt,mt._currentMarker))})),this._currentMarker=kt,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 Ee(mt,mt._currentMarker))}))},Ht.prototype.onPointerDown=function(kt){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||kt.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(kt.target)});mt!==void 0?(this.setCurrentMarker(mt),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(kt.clientX,kt.clientY),kt.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:kt.clientX,y:kt.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(kt.clientX,kt.clientY))},Ht.prototype.onDblClick=function(kt){if(this._isFocused||this.focus(),this.mode==="select"){var mt=this.markers.find(function(vt){return vt.ownsTarget(kt.target)});mt!==void 0&&mt!==this._currentMarker&&this.setCurrentMarker(mt),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(kt.clientX,kt.clientY),kt.target):this.setCurrentMarker()}},Ht.prototype.onPointerMove=function(kt){this.touchPoints!==1&&kt.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||kt.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(kt.clientX,kt.clientY)):this.zoomLevel>1&&this.panTo({x:kt.clientX,y:kt.clientY}))},Ht.prototype.onPointerUp=function(kt){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(kt.clientX,kt.clientY)),this.isDragging=!1,this.addUndoStep()},Ht.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Ht.prototype.onKeyUp=function(kt){this._currentMarker===void 0||this.notesArea!==void 0||kt.key!=="Delete"&&kt.key!=="Backspace"||this.deleteSelectedMarker()},Ht.prototype.clientToLocalCoordinates=function(kt,mt){var vt=this.markerImage.getBoundingClientRect();return{x:(kt-vt.left)/this.zoomLevel,y:(mt-vt.top)/this.zoomLevel}},Ht.prototype.onWindowResize=function(){this.positionUI()},Ht.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var kt=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=kt+"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()},Ht.prototype.addLicenseKey=function(kt){ne.addKey(kt)},Ht.prototype.addEventListener=function(kt,mt){this.eventListeners.addEventListener(kt,mt)},Ht.prototype.removeEventListener=function(kt,mt){this.eventListeners.removeEventListener(kt,mt)},Ht.prototype.renderState=function(kt){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(kt),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Ht.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Ht.prototype.focus=function(){var kt=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 sn(kt))}))},Ht.prototype.blur=function(){var kt=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(mt){return mt(new sn(kt))}))},Ht.instanceCounter=0,Ht}()},23425:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{Z:function(){return Qt}});var Pt=Ot(49618),te=Ot(72308),Ae=Ot(62853),Ce=Ot(77321),de=Ot(52487),Rt=Ot(92310),ne=Ot.n(Rt),ue=Ot(18929),ce=Ot(10228),Wt=Ot(26112),Ne=Ot(48736),qt=Ot(59301),Le=Ot(17119),Ut=[10,20,50,100],nt=function(Zt){var $t=Zt.pageSizeOptions,Pe=$t===void 0?Ut:$t,me=Zt.locale,$e=Zt.changeSize,tn=Zt.pageSize,Cn=Zt.goButton,Tn=Zt.quickGo,In=Zt.rootPrefixCls,$n=Zt.disabled,Ln=Zt.buildOptionText,be=Zt.showSizeChanger,re=Zt.sizeChangerRender,Pn=qt.useState(""),li=(0,de.Z)(Pn,2),Jn=li[0],un=li[1],Yn=function(){return!Jn||Number.isNaN(Jn)?void 0:Number(Jn)},si=typeof Ln=="function"?Ln:function(mt){return"".concat(mt," ").concat(me.items_per_page)},Fi=function(vt){un(vt.target.value)},sn=function(vt){Cn||Jn===""||(un(""),!(vt.relatedTarget&&(vt.relatedTarget.className.indexOf("".concat(In,"-item-link"))>=0||vt.relatedTarget.className.indexOf("".concat(In,"-item"))>=0))&&(Tn==null||Tn(Yn())))},oi=function(vt){Jn!==""&&(vt.keyCode===ce.Z.ENTER||vt.type==="click")&&(un(""),Tn==null||Tn(Yn()))},Ee=function(){return Pe.some(function(vt){return vt.toString()===tn.toString()})?Pe:Pe.concat([tn]).sort(function(vt,Lt){var Bt=Number.isNaN(Number(vt))?0:Number(vt),Kt=Number.isNaN(Number(Lt))?0:Number(Lt);return Bt-Kt})},ci="".concat(In,"-options");if(!be&&!Tn)return null;var Pi=null,Ht=null,kt=null;return be&&re&&(Pi=re({disabled:$n,size:tn,onSizeChange:function(vt){$e==null||$e(Number(vt))},"aria-label":me.page_size,className:"".concat(ci,"-size-changer"),options:Ee().map(function(mt){return{label:si(mt),value:mt}})})),Tn&&(Cn&&(kt=typeof Cn=="boolean"?qt.createElement("button",{type:"button",onClick:oi,onKeyUp:oi,disabled:$n,className:"".concat(ci,"-quick-jumper-button")},me.jump_to_confirm):qt.createElement("span",{onClick:oi,onKeyUp:oi},Cn)),Ht=qt.createElement("div",{className:"".concat(ci,"-quick-jumper")},me.jump_to,qt.createElement("input",{disabled:$n,type:"text",value:Jn,onChange:Fi,onKeyUp:oi,onBlur:sn,"aria-label":me.page}),me.page,kt)),qt.createElement("li",{className:ci},Pi,Ht)},et=nt,At=function(Zt){var $t=Zt.rootPrefixCls,Pe=Zt.page,me=Zt.active,$e=Zt.className,tn=Zt.showTitle,Cn=Zt.onClick,Tn=Zt.onKeyPress,In=Zt.itemRender,$n="".concat($t,"-item"),Ln=ne()($n,"".concat($n,"-").concat(Pe),(0,Pt.Z)((0,Pt.Z)({},"".concat($n,"-active"),me),"".concat($n,"-disabled"),!Pe),$e),be=function(){Cn(Pe)},re=function(Jn){Tn(Jn,Cn,Pe)},Pn=In(Pe,"page",qt.createElement("a",{rel:"nofollow"},Pe));return Pn?qt.createElement("li",{title:tn?String(Pe):null,className:Ln,onClick:be,onKeyDown:re,tabIndex:0},Pn):null},at=At,ct=function(Zt,$t,Pe){return Pe};function pt(){}function xt(Vt){var Zt=Number(Vt);return typeof Zt=="number"&&!Number.isNaN(Zt)&&isFinite(Zt)&&Math.floor(Zt)===Zt}function Mt(Vt,Zt,$t){var Pe=typeof Vt=="undefined"?Zt:Vt;return Math.floor(($t-1)/Pe)+1}var _t=function(Zt){var $t=Zt.prefixCls,Pe=$t===void 0?"rc-pagination":$t,me=Zt.selectPrefixCls,$e=me===void 0?"rc-select":me,tn=Zt.className,Cn=Zt.current,Tn=Zt.defaultCurrent,In=Tn===void 0?1:Tn,$n=Zt.total,Ln=$n===void 0?0:$n,be=Zt.pageSize,re=Zt.defaultPageSize,Pn=re===void 0?10:re,li=Zt.onChange,Jn=li===void 0?pt:li,un=Zt.hideOnSinglePage,Yn=Zt.align,si=Zt.showPrevNextJumpers,Fi=si===void 0?!0:si,sn=Zt.showQuickJumper,oi=Zt.showLessItems,Ee=Zt.showTitle,ci=Ee===void 0?!0:Ee,Pi=Zt.onShowSizeChange,Ht=Pi===void 0?pt:Pi,kt=Zt.locale,mt=kt===void 0?Le.Z:kt,vt=Zt.style,Lt=Zt.totalBoundaryShowSizeChanger,Bt=Lt===void 0?50:Lt,Kt=Zt.disabled,ge=Zt.simple,ke=Zt.showTotal,Je=Zt.showSizeChanger,ve=Je===void 0?Ln>Bt:Je,ze=Zt.sizeChangerRender,De=Zt.pageSizeOptions,nn=Zt.itemRender,kn=nn===void 0?ct:nn,Gn=Zt.jumpPrevIcon,gn=Zt.jumpNextIcon,Ri=Zt.prevIcon,di=Zt.nextIcon,xi=qt.useRef(null),Ei=(0,ue.Z)(10,{value:be,defaultValue:Pn}),ar=(0,de.Z)(Ei,2),Qi=ar[0],Oi=ar[1],Yi=(0,ue.Z)(1,{value:Cn,defaultValue:In,postState:function(Dn){return Math.max(1,Math.min(Dn,Mt(void 0,Qi,Ln)))}}),Hr=(0,de.Z)(Yi,2),Xi=Hr[0],Fr=Hr[1],mr=qt.useState(Xi),Yr=(0,de.Z)(mr,2),ji=Yr[0],co=Yr[1];(0,qt.useEffect)(function(){co(Xi)},[Xi]);var fo=Jn!==pt,Xr="current"in Zt,Er=Math.max(1,Xi-(oi?3:5)),Zr=Math.min(Mt(void 0,Qi,Ln),Xi+(oi?3:5));function bt(ln,Dn){var Zn=ln||qt.createElement("button",{type:"button","aria-label":Dn,className:"".concat(Pe,"-item-link")});return typeof ln=="function"&&(Zn=qt.createElement(ln,(0,Ce.Z)({},Zt))),Zn}function Br(ln){var Dn=ln.target.value,Zn=Mt(void 0,Qi,Ln),Li;return Dn===""?Li=Dn:Number.isNaN(Number(Dn))?Li=ji:Dn>=Zn?Li=Zn:Li=Number(Dn),Li}function Vi(ln){return xt(ln)&&ln!==Xi&&xt(Ln)&&Ln>0}var Vr=Ln>Qi?sn:!1;function Do(ln){(ln.keyCode===ce.Z.UP||ln.keyCode===ce.Z.DOWN)&&ln.preventDefault()}function bo(ln){var Dn=Br(ln);switch(Dn!==ji&&co(Dn),ln.keyCode){case ce.Z.ENTER:wi(Dn);break;case ce.Z.UP:wi(Dn-1);break;case ce.Z.DOWN:wi(Dn+1);break;default:break}}function $o(ln){wi(Br(ln))}function Zi(ln){var Dn=Mt(ln,Qi,Ln),Zn=Xi>Dn&&Dn!==0?Dn:Xi;Oi(ln),co(Zn),Ht==null||Ht(Xi,ln),Fr(Zn),Jn==null||Jn(Zn,ln)}function wi(ln){if(Vi(ln)&&!Kt){var Dn=Mt(void 0,Qi,Ln),Zn=ln;return ln>Dn?Zn=Dn:ln<1&&(Zn=1),Zn!==ji&&co(Zn),Fr(Zn),Jn==null||Jn(Zn,Qi),Zn}return Xi}var je=Xi>1,He=Xi<Mt(void 0,Qi,Ln);function Ue(){je&&wi(Xi-1)}function fi(){He&&wi(Xi+1)}function Se(){wi(Er)}function _i(){wi(Zr)}function Un(ln,Dn){if(ln.key==="Enter"||ln.charCode===ce.Z.ENTER||ln.keyCode===ce.Z.ENTER){for(var Zn=arguments.length,Li=new Array(Zn>2?Zn-2:0),Mi=2;Mi<Zn;Mi++)Li[Mi-2]=arguments[Mi];Dn.apply(void 0,Li)}}function Ai(ln){Un(ln,Ue)}function We(ln){Un(ln,fi)}function Ke(ln){Un(ln,Se)}function ui(ln){Un(ln,_i)}function he(ln){var Dn=kn(ln,"prev",bt(Ri,"prev page"));return qt.isValidElement(Dn)?qt.cloneElement(Dn,{disabled:!je}):Dn}function rn(ln){var Dn=kn(ln,"next",bt(di,"next page"));return qt.isValidElement(Dn)?qt.cloneElement(Dn,{disabled:!He}):Dn}function Wn(ln){(ln.type==="click"||ln.keyCode===ce.Z.ENTER)&&wi(ji)}var pi=null,on=(0,Wt.Z)(Zt,{aria:!0,data:!0}),yn=ke&&qt.createElement("li",{className:"".concat(Pe,"-total-text")},ke(Ln,[Ln===0?0:(Xi-1)*Qi+1,Xi*Qi>Ln?Ln:Xi*Qi])),ii=null,hn=Mt(void 0,Qi,Ln);if(un&&Ln<=Qi)return null;var An=[],xn={rootPrefixCls:Pe,onClick:wi,onKeyPress:Un,showTitle:ci,itemRender:kn,page:-1},Nn=Xi-1>0?Xi-1:0,ai=Xi+1<hn?Xi+1:hn,Ki=sn&&sn.goButton,Ni=(0,Ae.Z)(ge)==="object"?ge.readOnly:!ge,Ti=Ki,en=null;ge&&(Ki&&(typeof Ki=="boolean"?Ti=qt.createElement("button",{type:"button",onClick:Wn,onKeyUp:Wn},mt.jump_to_confirm):Ti=qt.createElement("span",{onClick:Wn,onKeyUp:Wn},Ki),Ti=qt.createElement("li",{title:ci?"".concat(mt.jump_to).concat(Xi,"/").concat(hn):null,className:"".concat(Pe,"-simple-pager")},Ti)),en=qt.createElement("li",{title:ci?"".concat(Xi,"/").concat(hn):null,className:"".concat(Pe,"-simple-pager")},Ni?ji:qt.createElement("input",{type:"text","aria-label":mt.jump_to,value:ji,disabled:Kt,onKeyDown:Do,onKeyUp:bo,onChange:bo,onBlur:$o,size:3}),qt.createElement("span",{className:"".concat(Pe,"-slash")},"/"),hn));var br=oi?1:2;if(hn<=3+br*2){hn||An.push(qt.createElement(at,(0,te.Z)({},xn,{key:"noPager",page:1,className:"".concat(Pe,"-item-disabled")})));for(var cr=1;cr<=hn;cr+=1)An.push(qt.createElement(at,(0,te.Z)({},xn,{key:cr,page:cr,active:Xi===cr})))}else{var Kr=oi?mt.prev_3:mt.prev_5,Ze=oi?mt.next_3:mt.next_5,ni=kn(Er,"jump-prev",bt(Gn,"prev page")),Bi=kn(Zr,"jump-next",bt(gn,"next page"));Fi&&(pi=ni?qt.createElement("li",{title:ci?Kr:null,key:"prev",onClick:Se,tabIndex:0,onKeyDown:Ke,className:ne()("".concat(Pe,"-jump-prev"),(0,Pt.Z)({},"".concat(Pe,"-jump-prev-custom-icon"),!!Gn))},ni):null,ii=Bi?qt.createElement("li",{title:ci?Ze:null,key:"next",onClick:_i,tabIndex:0,onKeyDown:ui,className:ne()("".concat(Pe,"-jump-next"),(0,Pt.Z)({},"".concat(Pe,"-jump-next-custom-icon"),!!gn))},Bi):null);var Hi=Math.max(1,Xi-br),vi=Math.min(Xi+br,hn);Xi-1<=br&&(vi=1+br*2),hn-Xi<=br&&(Hi=hn-br*2);for(var ki=Hi;ki<=vi;ki+=1)An.push(qt.createElement(at,(0,te.Z)({},xn,{key:ki,page:ki,active:Xi===ki})));if(Xi-1>=br*2&&Xi!==3&&(An[0]=qt.cloneElement(An[0],{className:ne()("".concat(Pe,"-item-after-jump-prev"),An[0].props.className)}),An.unshift(pi)),hn-Xi>=br*2&&Xi!==hn-2){var er=An[An.length-1];An[An.length-1]=qt.cloneElement(er,{className:ne()("".concat(Pe,"-item-before-jump-next"),er.props.className)}),An.push(ii)}Hi!==1&&An.unshift(qt.createElement(at,(0,te.Z)({},xn,{key:1,page:1}))),vi!==hn&&An.push(qt.createElement(at,(0,te.Z)({},xn,{key:hn,page:hn})))}var lr=he(Nn);if(lr){var oe=!je||!hn;lr=qt.createElement("li",{title:ci?mt.prev_page:null,onClick:Ue,tabIndex:oe?null:0,onKeyDown:Ai,className:ne()("".concat(Pe,"-prev"),(0,Pt.Z)({},"".concat(Pe,"-disabled"),oe)),"aria-disabled":oe},lr)}var ae=rn(ai);if(ae){var ee,Ye;ge?(ee=!He,Ye=je?0:null):(ee=!He||!hn,Ye=ee?null:0),ae=qt.createElement("li",{title:ci?mt.next_page:null,onClick:fi,tabIndex:Ye,onKeyDown:We,className:ne()("".concat(Pe,"-next"),(0,Pt.Z)({},"".concat(Pe,"-disabled"),ee)),"aria-disabled":ee},ae)}var Be=ne()(Pe,tn,(0,Pt.Z)((0,Pt.Z)((0,Pt.Z)((0,Pt.Z)((0,Pt.Z)({},"".concat(Pe,"-start"),Yn==="start"),"".concat(Pe,"-center"),Yn==="center"),"".concat(Pe,"-end"),Yn==="end"),"".concat(Pe,"-simple"),ge),"".concat(Pe,"-disabled"),Kt));return qt.createElement("ul",(0,te.Z)({className:Be,style:vt,ref:xi},on),yn,lr,ge?en:An,ae,qt.createElement(et,{locale:mt,rootPrefixCls:Pe,disabled:Kt,selectPrefixCls:$e,changeSize:Zi,pageSize:Qi,pageSizeOptions:De,quickGo:Vr?wi:null,goButton:Ti,showSizeChanger:ve,sizeChangerRender:ze}))},Qt=_t},738:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{Z:function(){return pt}});var Pt=Ot(72308),te=Ot(49618),Ae=Ot(52487),Ce=Ot(74416),de=Ot(92310),Rt=Ot.n(de),ne=Ot(18929),ue=Ot(10228),ce=Ot(26112),Wt=Ot(59301);function Ne(xt,Mt){var _t=xt.disabled,Qt=xt.prefixCls,Vt=xt.character,Zt=xt.characterRender,$t=xt.index,Pe=xt.count,me=xt.value,$e=xt.allowHalf,tn=xt.focused,Cn=xt.onHover,Tn=xt.onClick,In=function(un){Cn(un,$t)},$n=function(un){Tn(un,$t)},Ln=function(un){un.keyCode===ue.Z.ENTER&&Tn(un,$t)},be=$t+1,re=new Set([Qt]);me===0&&$t===0&&tn?re.add("".concat(Qt,"-focused")):$e&&me+.5>=be&&me<be?(re.add("".concat(Qt,"-half")),re.add("".concat(Qt,"-active")),tn&&re.add("".concat(Qt,"-focused"))):(be<=me?re.add("".concat(Qt,"-full")):re.add("".concat(Qt,"-zero")),be===me&&tn&&re.add("".concat(Qt,"-focused")));var Pn=typeof Vt=="function"?Vt(xt):Vt,li=Wt.createElement("li",{className:Rt()(Array.from(re)),ref:Mt},Wt.createElement("div",{onClick:_t?null:$n,onKeyDown:_t?null:Ln,onMouseMove:_t?null:In,role:"radio","aria-checked":me>$t?"true":"false","aria-posinset":$t+1,"aria-setsize":Pe,tabIndex:_t?-1:0},Wt.createElement("div",{className:"".concat(Qt,"-first")},Pn),Wt.createElement("div",{className:"".concat(Qt,"-second")},Pn)));return Zt&&(li=Zt(li,xt)),li}var qt=Wt.forwardRef(Ne);function Le(){var xt=Wt.useRef({});function Mt(Qt){return xt.current[Qt]}function _t(Qt){return function(Vt){xt.current[Qt]=Vt}}return[Mt,_t]}function Ut(xt){var Mt=xt.pageXOffset,_t="scrollLeft";if(typeof Mt!="number"){var Qt=xt.document;Mt=Qt.documentElement[_t],typeof Mt!="number"&&(Mt=Qt.body[_t])}return Mt}function nt(xt){var Mt,_t,Qt=xt.ownerDocument,Vt=Qt.body,Zt=Qt&&Qt.documentElement,$t=xt.getBoundingClientRect();return Mt=$t.left,_t=$t.top,Mt-=Zt.clientLeft||Vt.clientLeft||0,_t-=Zt.clientTop||Vt.clientTop||0,{left:Mt,top:_t}}function et(xt){var Mt=nt(xt),_t=xt.ownerDocument,Qt=_t.defaultView||_t.parentWindow;return Mt.left+=Ut(Qt),Mt.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,Mt){var _t=xt.prefixCls,Qt=_t===void 0?"rc-rate":_t,Vt=xt.className,Zt=xt.defaultValue,$t=xt.value,Pe=xt.count,me=Pe===void 0?5:Pe,$e=xt.allowHalf,tn=$e===void 0?!1:$e,Cn=xt.allowClear,Tn=Cn===void 0?!0:Cn,In=xt.keyboard,$n=In===void 0?!0:In,Ln=xt.character,be=Ln===void 0?"\u2605":Ln,re=xt.characterRender,Pn=xt.disabled,li=xt.direction,Jn=li===void 0?"ltr":li,un=xt.tabIndex,Yn=un===void 0?0:un,si=xt.autoFocus,Fi=xt.onHoverChange,sn=xt.onChange,oi=xt.onFocus,Ee=xt.onBlur,ci=xt.onKeyDown,Pi=xt.onMouseLeave,Ht=(0,Ce.Z)(xt,At),kt=Le(),mt=(0,Ae.Z)(kt,2),vt=mt[0],Lt=mt[1],Bt=Wt.useRef(null),Kt=function(){if(!Pn){var Er;(Er=Bt.current)===null||Er===void 0||Er.focus()}};Wt.useImperativeHandle(Mt,function(){return{focus:Kt,blur:function(){if(!Pn){var Er;(Er=Bt.current)===null||Er===void 0||Er.blur()}}}});var ge=(0,ne.Z)(Zt||0,{value:$t}),ke=(0,Ae.Z)(ge,2),Je=ke[0],ve=ke[1],ze=(0,ne.Z)(null),De=(0,Ae.Z)(ze,2),nn=De[0],kn=De[1],Gn=function(Er,Zr){var bt=Jn==="rtl",Br=Er+1;if(tn){var Vi=vt(Er),Vr=et(Vi),Do=Vi.clientWidth;(bt&&Zr-Vr>Do/2||!bt&&Zr-Vr<Do/2)&&(Br-=.5)}return Br},gn=function(Er){ve(Er),sn==null||sn(Er)},Ri=Wt.useState(!1),di=(0,Ae.Z)(Ri,2),xi=di[0],Ei=di[1],ar=function(){Ei(!0),oi==null||oi()},Qi=function(){Ei(!1),Ee==null||Ee()},Oi=Wt.useState(null),Yi=(0,Ae.Z)(Oi,2),Hr=Yi[0],Xi=Yi[1],Fr=function(Er,Zr){var bt=Gn(Zr,Er.pageX);bt!==nn&&(Xi(bt),kn(null)),Fi==null||Fi(bt)},mr=function(Er){Pn||(Xi(null),kn(null),Fi==null||Fi(void 0)),Er&&(Pi==null||Pi(Er))},Yr=function(Er,Zr){var bt=Gn(Zr,Er.pageX),Br=!1;Tn&&(Br=bt===Je),mr(),gn(Br?0:bt),kn(Br?bt:null)},ji=function(Er){var Zr=Er.keyCode,bt=Jn==="rtl",Br=tn?.5:1;$n&&(Zr===ue.Z.RIGHT&&Je<me&&!bt?(gn(Je+Br),Er.preventDefault()):Zr===ue.Z.LEFT&&Je>0&&!bt||Zr===ue.Z.RIGHT&&Je>0&&bt?(gn(Je-Br),Er.preventDefault()):Zr===ue.Z.LEFT&&Je<me&&bt&&(gn(Je+Br),Er.preventDefault())),ci==null||ci(Er)};Wt.useEffect(function(){si&&!Pn&&Kt()},[]);var co=new Array(me).fill(0).map(function(Xr,Er){return Wt.createElement(qt,{ref:Lt(Er),index:Er,count:me,disabled:Pn,prefixCls:"".concat(Qt,"-star"),allowHalf:tn,value:Hr===null?Je:Hr,onClick:Yr,onHover:Fr,key:Xr||Er,character:be,characterRender:re,focused:xi})}),fo=Rt()(Qt,Vt,(0,te.Z)((0,te.Z)({},"".concat(Qt,"-disabled"),Pn),"".concat(Qt,"-rtl"),Jn==="rtl"));return Wt.createElement("ul",(0,Pt.Z)({className:fo,onMouseLeave:mr,tabIndex:Pn?-1:Yn,onFocus:Pn?null:ar,onBlur:Pn?null:Qi,onKeyDown:Pn?null:ji,ref:Bt},(0,ce.Z)(Ht,{aria:!0,data:!0,attr:!0})),co)}var ct=Wt.forwardRef(at),pt=ct},69582:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{ZP:function(){return ne}});var Pt=Ot(52487),te=Ot(59301),Ae=Ot(47273),Ce=0,de=(0,Ae.Z)();function Rt(){var ue;return de?(ue=Ce,Ce+=1):ue="TEST_OR_SSR",ue}function ne(ue){var ce=te.useState(),Wt=(0,Pt.Z)(ce,2),Ne=Wt[0],qt=Wt[1];return te.useEffect(function(){qt("rc_select_".concat(Rt()))},[]),ue||Ne}},45560:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{Ac:function(){return Ri},Xo:function(){return xi},Wx:function(){return ar},ZP:function(){return Ai},lk:function(){return pt}});var Pt=Ot(72308),te=Ot(80702),Ae=Ot(49618),Ce=Ot(77321),de=Ot(52487),Rt=Ot(74416),ne=Ot(62853),ue=Ot(18929),ce=Ot(48736),Wt=Ot(59301),Ne=Ot(92310),qt=Ot.n(Ne),Le=Ot(34280),Ut=Ot(49658),nt=Ot(8654),et=function(Ke){var ui=Ke.className,he=Ke.customizeIcon,rn=Ke.customizeIconProps,Wn=Ke.children,pi=Ke.onMouseDown,on=Ke.onClick,yn=typeof he=="function"?he(rn):he;return Wt.createElement("span",{className:ui,onMouseDown:function(hn){hn.preventDefault(),pi==null||pi(hn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:on,"aria-hidden":!0},yn!==void 0?yn:Wt.createElement("span",{className:qt()(ui.split(/\s+/).map(function(ii){return"".concat(ii,"-icon")}))},Wn))},At=et,at=function(Ke,ui,he,rn,Wn){var pi=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,on=arguments.length>6?arguments[6]:void 0,yn=arguments.length>7?arguments[7]:void 0,ii=Wt.useMemo(function(){if((0,ne.Z)(rn)==="object")return rn.clearIcon;if(Wn)return Wn},[rn,Wn]),hn=Wt.useMemo(function(){return!!(!pi&&rn&&(he.length||on)&&!(yn==="combobox"&&on===""))},[rn,pi,he.length,on,yn]);return{allowClear:hn,clearIcon:Wt.createElement(At,{className:"".concat(Ke,"-clear"),onMouseDown:ui,customizeIcon:ii},"\xD7")}},ct=Wt.createContext(null);function pt(){return Wt.useContext(ct)}function xt(){var We=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Ke=Wt.useState(!1),ui=(0,de.Z)(Ke,2),he=ui[0],rn=ui[1],Wn=Wt.useRef(null),pi=function(){window.clearTimeout(Wn.current)};Wt.useEffect(function(){return pi},[]);var on=function(ii,hn){pi(),Wn.current=window.setTimeout(function(){rn(ii),hn&&hn()},We)};return[he,on,pi]}function Mt(){var We=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Ke=Wt.useRef(null),ui=Wt.useRef(null);Wt.useEffect(function(){return function(){window.clearTimeout(ui.current)}},[]);function he(rn){(rn||Ke.current===null)&&(Ke.current=rn),window.clearTimeout(ui.current),ui.current=window.setTimeout(function(){Ke.current=null},We)}return[function(){return Ke.current},he]}function _t(We,Ke,ui,he){var rn=Wt.useRef(null);rn.current={open:Ke,triggerOpen:ui,customizedTrigger:he},Wt.useEffect(function(){function Wn(pi){var on;if(!((on=rn.current)!==null&&on!==void 0&&on.customizedTrigger)){var yn=pi.target;yn.shadowRoot&&pi.composed&&(yn=pi.composedPath()[0]||yn),rn.current.open&&We().filter(function(ii){return ii}).every(function(ii){return!ii.contains(yn)&&ii!==yn})&&rn.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Wn),function(){return window.removeEventListener("mousedown",Wn)}},[])}var Qt=Ot(10228);function Vt(We){return We&&![Qt.Z.ESC,Qt.Z.SHIFT,Qt.Z.BACKSPACE,Qt.Z.TAB,Qt.Z.WIN_KEY,Qt.Z.ALT,Qt.Z.META,Qt.Z.WIN_KEY_RIGHT,Qt.Z.CTRL,Qt.Z.SEMICOLON,Qt.Z.EQUALS,Qt.Z.CAPS_LOCK,Qt.Z.CONTEXT_MENU,Qt.Z.F1,Qt.Z.F2,Qt.Z.F3,Qt.Z.F4,Qt.Z.F5,Qt.Z.F6,Qt.Z.F7,Qt.Z.F8,Qt.Z.F9,Qt.Z.F10,Qt.Z.F11,Qt.Z.F12].includes(We)}var Zt=Ot(26112),$t=Ot(11780),Pe=function(Ke,ui){var he,rn=Ke.prefixCls,Wn=Ke.id,pi=Ke.inputElement,on=Ke.disabled,yn=Ke.tabIndex,ii=Ke.autoFocus,hn=Ke.autoComplete,An=Ke.editable,xn=Ke.activeDescendantId,Nn=Ke.value,ai=Ke.maxLength,Ki=Ke.onKeyDown,Ni=Ke.onMouseDown,Ti=Ke.onChange,en=Ke.onPaste,br=Ke.onCompositionStart,cr=Ke.onCompositionEnd,Kr=Ke.onBlur,Ze=Ke.open,ni=Ke.attrs,Bi=pi||Wt.createElement("input",null),Hi=Bi,vi=Hi.ref,ki=Hi.props,er=ki.onKeyDown,lr=ki.onChange,oe=ki.onMouseDown,ae=ki.onCompositionStart,ee=ki.onCompositionEnd,Ye=ki.onBlur,Be=ki.style;return(0,ce.Kp)(!("maxLength"in Bi.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Bi=Wt.cloneElement(Bi,(0,Ce.Z)((0,Ce.Z)((0,Ce.Z)({type:"search"},ki),{},{id:Wn,ref:(0,nt.sQ)(ui,vi),disabled:on,tabIndex:yn,autoComplete:hn||"off",autoFocus:ii,className:qt()("".concat(rn,"-selection-search-input"),(he=Bi)===null||he===void 0||(he=he.props)===null||he===void 0?void 0:he.className),role:"combobox","aria-expanded":Ze||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Wn,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Wn,"_list"),"aria-activedescendant":Ze?xn:void 0},ni),{},{value:An?Nn:"",maxLength:ai,readOnly:!An,unselectable:An?null:"on",style:(0,Ce.Z)((0,Ce.Z)({},Be),{},{opacity:An?null:0}),onKeyDown:function(Dn){Ki(Dn),er&&er(Dn)},onMouseDown:function(Dn){Ni(Dn),oe&&oe(Dn)},onChange:function(Dn){Ti(Dn),lr&&lr(Dn)},onCompositionStart:function(Dn){br(Dn),ae&&ae(Dn)},onCompositionEnd:function(Dn){cr(Dn),ee&&ee(Dn)},onPaste:en,onBlur:function(Dn){Kr(Dn),Ye&&Ye(Dn)}})),Bi},me=Wt.forwardRef(Pe),$e=me;function tn(We){return Array.isArray(We)?We:We!==void 0?[We]:[]}var Cn=typeof window!="undefined"&&window.document&&window.document.documentElement,Tn=Cn;function In(We){return We!=null}function $n(We){return!We&&We!==0}function Ln(We){return["string","number"].includes((0,ne.Z)(We))}function be(We){var Ke=void 0;return We&&(Ln(We.title)?Ke=We.title.toString():Ln(We.label)&&(Ke=We.label.toString())),Ke}function re(We,Ke){Tn?Wt.useLayoutEffect(We,Ke):Wt.useEffect(We,Ke)}function Pn(We){var Ke;return(Ke=We.key)!==null&&Ke!==void 0?Ke:We.value}var li=function(Ke){Ke.preventDefault(),Ke.stopPropagation()},Jn=function(Ke){var ui=Ke.id,he=Ke.prefixCls,rn=Ke.values,Wn=Ke.open,pi=Ke.searchValue,on=Ke.autoClearSearchValue,yn=Ke.inputRef,ii=Ke.placeholder,hn=Ke.disabled,An=Ke.mode,xn=Ke.showSearch,Nn=Ke.autoFocus,ai=Ke.autoComplete,Ki=Ke.activeDescendantId,Ni=Ke.tabIndex,Ti=Ke.removeIcon,en=Ke.maxTagCount,br=Ke.maxTagTextLength,cr=Ke.maxTagPlaceholder,Kr=cr===void 0?function(jn){return"+ ".concat(jn.length," ...")}:cr,Ze=Ke.tagRender,ni=Ke.onToggleOpen,Bi=Ke.onRemove,Hi=Ke.onInputChange,vi=Ke.onInputPaste,ki=Ke.onInputKeyDown,er=Ke.onInputMouseDown,lr=Ke.onInputCompositionStart,oe=Ke.onInputCompositionEnd,ae=Ke.onInputBlur,ee=Wt.useRef(null),Ye=(0,Wt.useState)(0),Be=(0,de.Z)(Ye,2),ln=Be[0],Dn=Be[1],Zn=(0,Wt.useState)(!1),Li=(0,de.Z)(Zn,2),Mi=Li[0],Te=Li[1],yi="".concat(he,"-selection"),Me=Wn||An==="multiple"&&on===!1||An==="tags"?pi:"",an=An==="tags"||An==="multiple"&&on===!1||xn&&(Wn||Mi);re(function(){Dn(ee.current.scrollWidth)},[Me]);var Qe=function(Ge,fn,Fn,Sn,dn){return Wt.createElement("span",{title:be(Ge),className:qt()("".concat(yi,"-item"),(0,Ae.Z)({},"".concat(yi,"-item-disabled"),Fn))},Wt.createElement("span",{className:"".concat(yi,"-item-content")},fn),Sn&&Wt.createElement(At,{className:"".concat(yi,"-item-remove"),onMouseDown:li,onClick:dn,customizeIcon:Ti},"\xD7"))},It=function(Ge,fn,Fn,Sn,dn,gi){var Vn=function(cn){li(cn),ni(!Wn)};return Wt.createElement("span",{onMouseDown:Vn},Ze({label:fn,value:Ge,disabled:Fn,closable:Sn,onClose:dn,isMaxTag:!!gi}))},vn=function(Ge){var fn=Ge.disabled,Fn=Ge.label,Sn=Ge.value,dn=!hn&&!fn,gi=Fn;if(typeof br=="number"&&(typeof Fn=="string"||typeof Fn=="number")){var Vn=String(gi);Vn.length>br&&(gi="".concat(Vn.slice(0,br),"..."))}var qn=function(ri){ri&&ri.stopPropagation(),Bi(Ge)};return typeof Ze=="function"?It(Sn,gi,fn,dn,qn):Qe(Ge,gi,fn,dn,qn)},pn=function(Ge){if(!rn.length)return null;var fn=typeof Kr=="function"?Kr(Ge):Kr;return typeof Ze=="function"?It(void 0,fn,!1,!1,void 0,!0):Qe({title:fn},fn,!1)},Qn=Wt.createElement("div",{className:"".concat(yi,"-search"),style:{width:ln},onFocus:function(){Te(!0)},onBlur:function(){Te(!1)}},Wt.createElement($e,{ref:yn,open:Wn,prefixCls:he,id:ui,inputElement:null,disabled:hn,autoFocus:Nn,autoComplete:ai,editable:an,activeDescendantId:Ki,value:Me,onKeyDown:ki,onMouseDown:er,onChange:Hi,onPaste:vi,onCompositionStart:lr,onCompositionEnd:oe,onBlur:ae,tabIndex:Ni,attrs:(0,Zt.Z)(Ke,!0)}),Wt.createElement("span",{ref:ee,className:"".concat(yi,"-search-mirror"),"aria-hidden":!0},Me,"\xA0")),zn=Wt.createElement($t.Z,{prefixCls:"".concat(yi,"-overflow"),data:rn,renderItem:vn,renderRest:pn,suffix:Qn,itemKey:Pn,maxCount:en});return Wt.createElement("span",{className:"".concat(yi,"-wrap")},zn,!rn.length&&!Me&&Wt.createElement("span",{className:"".concat(yi,"-placeholder")},ii))},un=Jn,Yn=function(Ke){var ui=Ke.inputElement,he=Ke.prefixCls,rn=Ke.id,Wn=Ke.inputRef,pi=Ke.disabled,on=Ke.autoFocus,yn=Ke.autoComplete,ii=Ke.activeDescendantId,hn=Ke.mode,An=Ke.open,xn=Ke.values,Nn=Ke.placeholder,ai=Ke.tabIndex,Ki=Ke.showSearch,Ni=Ke.searchValue,Ti=Ke.activeValue,en=Ke.maxLength,br=Ke.onInputKeyDown,cr=Ke.onInputMouseDown,Kr=Ke.onInputChange,Ze=Ke.onInputPaste,ni=Ke.onInputCompositionStart,Bi=Ke.onInputCompositionEnd,Hi=Ke.onInputBlur,vi=Ke.title,ki=Wt.useState(!1),er=(0,de.Z)(ki,2),lr=er[0],oe=er[1],ae=hn==="combobox",ee=ae||Ki,Ye=xn[0],Be=Ni||"";ae&&Ti&&!lr&&(Be=Ti),Wt.useEffect(function(){ae&&oe(!1)},[ae,Ti]);var ln=hn!=="combobox"&&!An&&!Ki?!1:!!Be,Dn=vi===void 0?be(Ye):vi,Zn=Wt.useMemo(function(){return Ye?null:Wt.createElement("span",{className:"".concat(he,"-selection-placeholder"),style:ln?{visibility:"hidden"}:void 0},Nn)},[Ye,ln,Nn,he]);return Wt.createElement("span",{className:"".concat(he,"-selection-wrap")},Wt.createElement("span",{className:"".concat(he,"-selection-search")},Wt.createElement($e,{ref:Wn,prefixCls:he,id:rn,open:An,inputElement:ui,disabled:pi,autoFocus:on,autoComplete:yn,editable:ee,activeDescendantId:ii,value:Be,onKeyDown:br,onMouseDown:cr,onChange:function(Mi){oe(!0),Kr(Mi)},onPaste:Ze,onCompositionStart:ni,onCompositionEnd:Bi,onBlur:Hi,tabIndex:ai,attrs:(0,Zt.Z)(Ke,!0),maxLength:ae?en:void 0})),!ae&&Ye?Wt.createElement("span",{className:"".concat(he,"-selection-item"),title:Dn,style:ln?{visibility:"hidden"}:void 0},Ye.label):null,Zn)},si=Yn,Fi=function(Ke,ui){var he=(0,Wt.useRef)(null),rn=(0,Wt.useRef)(!1),Wn=Ke.prefixCls,pi=Ke.open,on=Ke.mode,yn=Ke.showSearch,ii=Ke.tokenWithEnter,hn=Ke.disabled,An=Ke.prefix,xn=Ke.autoClearSearchValue,Nn=Ke.onSearch,ai=Ke.onSearchSubmit,Ki=Ke.onToggleOpen,Ni=Ke.onInputKeyDown,Ti=Ke.onInputBlur,en=Ke.domRef;Wt.useImperativeHandle(ui,function(){return{focus:function(Dn){he.current.focus(Dn)},blur:function(){he.current.blur()}}});var br=Mt(0),cr=(0,de.Z)(br,2),Kr=cr[0],Ze=cr[1],ni=function(Dn){var Zn=Dn.which,Li=he.current instanceof HTMLTextAreaElement;!Li&&pi&&(Zn===Qt.Z.UP||Zn===Qt.Z.DOWN)&&Dn.preventDefault(),Ni&&Ni(Dn),Zn===Qt.Z.ENTER&&on==="tags"&&!rn.current&&!pi&&(ai==null||ai(Dn.target.value)),!(Li&&!pi&&~[Qt.Z.UP,Qt.Z.DOWN,Qt.Z.LEFT,Qt.Z.RIGHT].indexOf(Zn))&&Vt(Zn)&&Ki(!0)},Bi=function(){Ze(!0)},Hi=(0,Wt.useRef)(null),vi=function(Dn){Nn(Dn,!0,rn.current)!==!1&&Ki(!0)},ki=function(){rn.current=!0},er=function(Dn){rn.current=!1,on!=="combobox"&&vi(Dn.target.value)},lr=function(Dn){var Zn=Dn.target.value;if(ii&&Hi.current&&/[\r\n]/.test(Hi.current)){var Li=Hi.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Zn=Zn.replace(Li,Hi.current)}Hi.current=null,vi(Zn)},oe=function(Dn){var Zn=Dn.clipboardData,Li=Zn==null?void 0:Zn.getData("text");Hi.current=Li||""},ae=function(Dn){var Zn=Dn.target;if(Zn!==he.current){var Li=document.body.style.msTouchAction!==void 0;Li?setTimeout(function(){he.current.focus()}):he.current.focus()}},ee=function(Dn){var Zn=Kr();Dn.target!==he.current&&!Zn&&!(on==="combobox"&&hn)&&Dn.preventDefault(),(on!=="combobox"&&(!yn||!Zn)||!pi)&&(pi&&xn!==!1&&Nn("",!0,!1),Ki())},Ye={inputRef:he,onInputKeyDown:ni,onInputMouseDown:Bi,onInputChange:lr,onInputPaste:oe,onInputCompositionStart:ki,onInputCompositionEnd:er,onInputBlur:Ti},Be=on==="multiple"||on==="tags"?Wt.createElement(un,(0,Pt.Z)({},Ke,Ye)):Wt.createElement(si,(0,Pt.Z)({},Ke,Ye));return Wt.createElement("div",{ref:en,className:"".concat(Wn,"-selector"),onClick:ae,onMouseDown:ee},An&&Wt.createElement("div",{className:"".concat(Wn,"-prefix")},An),Be)},sn=Wt.forwardRef(Fi),oi=sn,Ee=Ot(65352),ci=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Pi=function(Ke){var ui=Ke===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:ui,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:ui,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:ui,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:ui,adjustY:1},htmlRegion:"scroll"}}},Ht=function(Ke,ui){var he=Ke.prefixCls,rn=Ke.disabled,Wn=Ke.visible,pi=Ke.children,on=Ke.popupElement,yn=Ke.animation,ii=Ke.transitionName,hn=Ke.dropdownStyle,An=Ke.dropdownClassName,xn=Ke.direction,Nn=xn===void 0?"ltr":xn,ai=Ke.placement,Ki=Ke.builtinPlacements,Ni=Ke.dropdownMatchSelectWidth,Ti=Ke.dropdownRender,en=Ke.dropdownAlign,br=Ke.getPopupContainer,cr=Ke.empty,Kr=Ke.getTriggerDOMNode,Ze=Ke.onPopupVisibleChange,ni=Ke.onPopupMouseEnter,Bi=(0,Rt.Z)(Ke,ci),Hi="".concat(he,"-dropdown"),vi=on;Ti&&(vi=Ti(on));var ki=Wt.useMemo(function(){return Ki||Pi(Ni)},[Ki,Ni]),er=yn?"".concat(Hi,"-").concat(yn):ii,lr=typeof Ni=="number",oe=Wt.useMemo(function(){return lr?null:Ni===!1?"minWidth":"width"},[Ni,lr]),ae=hn;lr&&(ae=(0,Ce.Z)((0,Ce.Z)({},ae),{},{width:Ni}));var ee=Wt.useRef(null);return Wt.useImperativeHandle(ui,function(){return{getPopupElement:function(){var Be;return(Be=ee.current)===null||Be===void 0?void 0:Be.popupElement}}}),Wt.createElement(Ee.Z,(0,Pt.Z)({},Bi,{showAction:Ze?["click"]:[],hideAction:Ze?["click"]:[],popupPlacement:ai||(Nn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:ki,prefixCls:Hi,popupTransitionName:er,popup:Wt.createElement("div",{onMouseEnter:ni},vi),ref:ee,stretch:oe,popupAlign:en,popupVisible:Wn,getPopupContainer:br,popupClassName:qt()(An,(0,Ae.Z)({},"".concat(Hi,"-empty"),cr)),popupStyle:ae,getTriggerDOMNode:Kr,onPopupVisibleChange:Ze}),pi)},kt=Wt.forwardRef(Ht),mt=kt,vt=Ot(68413);function Lt(We,Ke){var ui=We.key,he;return"value"in We&&(he=We.value),ui!=null?ui:he!==void 0?he:"rc-index-key-".concat(Ke)}function Bt(We){return typeof We!="undefined"&&!Number.isNaN(We)}function Kt(We,Ke){var ui=We||{},he=ui.label,rn=ui.value,Wn=ui.options,pi=ui.groupLabel,on=he||(Ke?"children":"label");return{label:on,value:rn||"value",options:Wn||"options",groupLabel:pi||on}}function ge(We){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ui=Ke.fieldNames,he=Ke.childrenAsData,rn=[],Wn=Kt(ui,!1),pi=Wn.label,on=Wn.value,yn=Wn.options,ii=Wn.groupLabel;function hn(An,xn){Array.isArray(An)&&An.forEach(function(Nn){if(xn||!(yn in Nn)){var ai=Nn[on];rn.push({key:Lt(Nn,rn.length),groupOption:xn,data:Nn,label:Nn[pi],value:ai})}else{var Ki=Nn[ii];Ki===void 0&&he&&(Ki=Nn.label),rn.push({key:Lt(Nn,rn.length),group:!0,data:Nn,label:Ki}),hn(Nn[yn],!0)}})}return hn(We,!1),rn}function ke(We){var Ke=(0,Ce.Z)({},We);return"props"in Ke||Object.defineProperty(Ke,"props",{get:function(){return(0,ce.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Ke}}),Ke}var Je=function(Ke,ui,he){if(!ui||!ui.length)return null;var rn=!1,Wn=function on(yn,ii){var hn=(0,vt.Z)(ii),An=hn[0],xn=hn.slice(1);if(!An)return[yn];var Nn=yn.split(An);return rn=rn||Nn.length>1,Nn.reduce(function(ai,Ki){return[].concat((0,te.Z)(ai),(0,te.Z)(on(Ki,xn)))},[]).filter(Boolean)},pi=Wn(Ke,ui);return rn?typeof he!="undefined"?pi.slice(0,he):pi:null},ve=Wt.createContext(null),ze=ve;function De(We){var Ke=We.visible,ui=We.values;if(!Ke)return null;var he=50;return Wt.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(ui.slice(0,he).map(function(rn){var Wn=rn.label,pi=rn.value;return["number","string"].includes((0,ne.Z)(Wn))?Wn:pi}).join(", ")),ui.length>he?", ...":null)}var nn=["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"],kn=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Gn=function(Ke){return Ke==="tags"||Ke==="multiple"},gn=Wt.forwardRef(function(We,Ke){var ui,he=We.id,rn=We.prefixCls,Wn=We.className,pi=We.showSearch,on=We.tagRender,yn=We.direction,ii=We.omitDomProps,hn=We.displayValues,An=We.onDisplayValuesChange,xn=We.emptyOptions,Nn=We.notFoundContent,ai=Nn===void 0?"Not Found":Nn,Ki=We.onClear,Ni=We.mode,Ti=We.disabled,en=We.loading,br=We.getInputElement,cr=We.getRawInputElement,Kr=We.open,Ze=We.defaultOpen,ni=We.onDropdownVisibleChange,Bi=We.activeValue,Hi=We.onActiveValueChange,vi=We.activeDescendantId,ki=We.searchValue,er=We.autoClearSearchValue,lr=We.onSearch,oe=We.onSearchSplit,ae=We.tokenSeparators,ee=We.allowClear,Ye=We.prefix,Be=We.suffixIcon,ln=We.clearIcon,Dn=We.OptionList,Zn=We.animation,Li=We.transitionName,Mi=We.dropdownStyle,Te=We.dropdownClassName,yi=We.dropdownMatchSelectWidth,Me=We.dropdownRender,an=We.dropdownAlign,Qe=We.placement,It=We.builtinPlacements,vn=We.getPopupContainer,pn=We.showAction,Qn=pn===void 0?[]:pn,zn=We.onFocus,jn=We.onBlur,Ge=We.onKeyUp,fn=We.onKeyDown,Fn=We.onMouseDown,Sn=(0,Rt.Z)(We,nn),dn=Gn(Ni),gi=(pi!==void 0?pi:dn)||Ni==="combobox",Vn=(0,Ce.Z)({},Sn);kn.forEach(function(Oo){delete Vn[Oo]}),ii==null||ii.forEach(function(Oo){delete Vn[Oo]});var qn=Wt.useState(!1),cn=(0,de.Z)(qn,2),ri=cn[0],Ui=cn[1];Wt.useEffect(function(){Ui((0,Ut.Z)())},[]);var nr=Wt.useRef(null),Ji=Wt.useRef(null),fr=Wt.useRef(null),dr=Wt.useRef(null),Pr=Wt.useRef(null),Gr=Wt.useRef(!1),Tr=xt(),ro=(0,de.Z)(Tr,3),Oe=ro[0],gr=ro[1],Dr=ro[2];Wt.useImperativeHandle(Ke,function(){var Oo,so;return{focus:(Oo=dr.current)===null||Oo===void 0?void 0:Oo.focus,blur:(so=dr.current)===null||so===void 0?void 0:so.blur,scrollTo:function(Xs){var xs;return(xs=Pr.current)===null||xs===void 0?void 0:xs.scrollTo(Xs)},nativeElement:nr.current||Ji.current}});var tr=Wt.useMemo(function(){var Oo;if(Ni!=="combobox")return ki;var so=(Oo=hn[0])===null||Oo===void 0?void 0:Oo.value;return typeof so=="string"||typeof so=="number"?String(so):""},[ki,Ni,hn]),Ur=Ni==="combobox"&&typeof br=="function"&&br()||null,or=typeof cr=="function"&&cr(),vo=(0,nt.x1)(Ji,or==null||(ui=or.props)===null||ui===void 0?void 0:ui.ref),qr=Wt.useState(!1),Nr=(0,de.Z)(qr,2),ho=Nr[0],ks=Nr[1];(0,Le.Z)(function(){ks(!0)},[]);var ls=(0,ue.Z)(!1,{defaultValue:Ze,value:Kr}),la=(0,de.Z)(ls,2),Is=la[0],sr=la[1],Eo=ho?Is:!1,os=!ai&&xn;(Ti||os&&Eo&&Ni==="combobox")&&(Eo=!1);var Gi=os?!1:Eo,Wi=Wt.useCallback(function(Oo){var so=Oo!==void 0?Oo:!Eo;Ti||(sr(so),Eo!==so&&(ni==null||ni(so)))},[Ti,Eo,sr,ni]),ir=Wt.useMemo(function(){return(ae||[]).some(function(Oo){return[`
|
|
|
`,`\r
|
|
|
`].includes(Oo)})},[ae]),Kn=Wt.useContext(ze)||{},Ar=Kn.maxCount,kr=Kn.rawValues,xo=function(so,mo,Xs){if(!(dn&&Bt(Ar)&&(kr==null?void 0:kr.size)>=Ar)){var xs=!0,ss=so;Hi==null||Hi(null);var $i=Je(so,ae,Bt(Ar)?Ar-kr.size:void 0),cl=Xs?null:$i;return Ni!=="combobox"&&cl&&(ss="",oe==null||oe(cl),Wi(!1),xs=!1),lr&&tr!==ss&&lr(ss,{source:mo?"typing":"effect"}),xs}},Ts=function(so){!so||!so.trim()||lr(so,{source:"submit"})};Wt.useEffect(function(){!Eo&&!dn&&Ni!=="combobox"&&xo("",!1,!1)},[Eo]),Wt.useEffect(function(){Is&&Ti&&sr(!1),Ti&&!Gr.current&&gr(!1)},[Ti]);var ps=Mt(),Cr=(0,de.Z)(ps,2),to=Cr[0],oo=Cr[1],ts=Wt.useRef(!1),yo=function(so){var mo=to(),Xs=so.key,xs=Xs==="Enter";if(xs&&(Ni!=="combobox"&&so.preventDefault(),Eo||Wi(!0)),oo(!!tr),Xs==="Backspace"&&!mo&&dn&&!tr&&hn.length){for(var ss=(0,te.Z)(hn),$i=null,cl=ss.length-1;cl>=0;cl-=1){var xe=ss[cl];if(!xe.disabled){ss.splice(cl,1),$i=xe;break}}$i&&An(ss,{type:"remove",values:[$i]})}for(var On=arguments.length,su=new Array(On>1?On-1:0),hA=1;hA<On;hA++)su[hA-1]=arguments[hA];if(Eo&&(!xs||!ts.current)){var as;xs&&(ts.current=!0),(as=Pr.current)===null||as===void 0||as.onKeyDown.apply(as,[so].concat(su))}fn==null||fn.apply(void 0,[so].concat(su))},Vo=function(so){for(var mo=arguments.length,Xs=new Array(mo>1?mo-1:0),xs=1;xs<mo;xs++)Xs[xs-1]=arguments[xs];if(Eo){var ss;(ss=Pr.current)===null||ss===void 0||ss.onKeyUp.apply(ss,[so].concat(Xs))}so.key==="Enter"&&(ts.current=!1),Ge==null||Ge.apply(void 0,[so].concat(Xs))},zo=function(so){var mo=hn.filter(function(Xs){return Xs!==so});An(mo,{type:"remove",values:[so]})},Io=function(){ts.current=!1},ys=Wt.useRef(!1),Wo=function(){gr(!0),Ti||(zn&&!ys.current&&zn.apply(void 0,arguments),Qn.includes("focus")&&Wi(!0)),ys.current=!0},Fl=function(){Gr.current=!0,gr(!1,function(){ys.current=!1,Gr.current=!1,Wi(!1)}),!Ti&&(tr&&(Ni==="tags"?lr(tr,{source:"submit"}):Ni==="multiple"&&lr("",{source:"blur"})),jn&&jn.apply(void 0,arguments))},ao=[];Wt.useEffect(function(){return function(){ao.forEach(function(Oo){return clearTimeout(Oo)}),ao.splice(0,ao.length)}},[]);var da=function(so){var mo,Xs=so.target,xs=(mo=fr.current)===null||mo===void 0?void 0:mo.getPopupElement();if(xs&&xs.contains(Xs)){var ss=setTimeout(function(){var On=ao.indexOf(ss);if(On!==-1&&ao.splice(On,1),Dr(),!ri&&!xs.contains(document.activeElement)){var su;(su=dr.current)===null||su===void 0||su.focus()}});ao.push(ss)}for(var $i=arguments.length,cl=new Array($i>1?$i-1:0),xe=1;xe<$i;xe++)cl[xe-1]=arguments[xe];Fn==null||Fn.apply(void 0,[so].concat(cl))},_a=Wt.useState({}),hl=(0,de.Z)(_a,2),Zo=hl[1];function Ta(){Zo({})}var $a;or&&($a=function(so){Wi(so)}),_t(function(){var Oo;return[nr.current,(Oo=fr.current)===null||Oo===void 0?void 0:Oo.getPopupElement()]},Gi,Wi,!!or);var uA=Wt.useMemo(function(){return(0,Ce.Z)((0,Ce.Z)({},We),{},{notFoundContent:ai,open:Eo,triggerOpen:Gi,id:he,showSearch:gi,multiple:dn,toggleOpen:Wi})},[We,ai,Gi,Eo,he,gi,dn,Wi]),Ku=!!Be||en,ws;Ku&&(ws=Wt.createElement(At,{className:qt()("".concat(rn,"-arrow"),(0,Ae.Z)({},"".concat(rn,"-arrow-loading"),en)),customizeIcon:Be,customizeIconProps:{loading:en,searchValue:tr,open:Eo,focused:Oe,showSearch:gi}}));var Gu=function(){var so;Ki==null||Ki(),(so=dr.current)===null||so===void 0||so.focus(),An([],{type:"clear",values:hn}),xo("",!1,!1)},AA=at(rn,Gu,hn,ee,ln,Ti,tr,Ni),wa=AA.allowClear,tl=AA.clearIcon,Gs=Wt.createElement(Dn,{ref:Pr}),es=qt()(rn,Wn,(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(rn,"-focused"),Oe),"".concat(rn,"-multiple"),dn),"".concat(rn,"-single"),!dn),"".concat(rn,"-allow-clear"),ee),"".concat(rn,"-show-arrow"),Ku),"".concat(rn,"-disabled"),Ti),"".concat(rn,"-loading"),en),"".concat(rn,"-open"),Eo),"".concat(rn,"-customize-input"),Ur),"".concat(rn,"-show-search"),gi)),hs=Wt.createElement(mt,{ref:fr,disabled:Ti,prefixCls:rn,visible:Gi,popupElement:Gs,animation:Zn,transitionName:Li,dropdownStyle:Mi,dropdownClassName:Te,direction:yn,dropdownMatchSelectWidth:yi,dropdownRender:Me,dropdownAlign:an,placement:Qe,builtinPlacements:It,getPopupContainer:vn,empty:xn,getTriggerDOMNode:function(so){return Ji.current||so},onPopupVisibleChange:$a,onPopupMouseEnter:Ta},or?Wt.cloneElement(or,{ref:vo}):Wt.createElement(oi,(0,Pt.Z)({},We,{domRef:Ji,prefixCls:rn,inputElement:Ur,ref:dr,id:he,prefix:Ye,showSearch:gi,autoClearSearchValue:er,mode:Ni,activeDescendantId:vi,tagRender:on,values:hn,open:Eo,onToggleOpen:Wi,activeValue:Bi,searchValue:tr,onSearch:xo,onSearchSubmit:Ts,onRemove:zo,tokenWithEnter:ir,onInputBlur:Io}))),js;return or?js=hs:js=Wt.createElement("div",(0,Pt.Z)({className:es},Vn,{ref:nr,onMouseDown:da,onKeyDown:yo,onKeyUp:Vo,onFocus:Wo,onBlur:Fl}),Wt.createElement(De,{visible:Oe&&!Eo,values:hn}),hs,ws,wa&&tl),Wt.createElement(ct.Provider,{value:uA},js)}),Ri=gn,di=function(){return null};di.isSelectOptGroup=!0;var xi=di,Ei=function(){return null};Ei.isSelectOption=!0;var ar=Ei,Qi=Ot(80547),Oi=Ot(2738),Yi=Ot(45680);function Hr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Xi=["disabled","title","children","style","className"];function Fr(We){return typeof We=="string"||typeof We=="number"}var mr=function(Ke,ui){var he=pt(),rn=he.prefixCls,Wn=he.id,pi=he.open,on=he.multiple,yn=he.mode,ii=he.searchValue,hn=he.toggleOpen,An=he.notFoundContent,xn=he.onPopupScroll,Nn=Wt.useContext(ze),ai=Nn.maxCount,Ki=Nn.flattenOptions,Ni=Nn.onActiveValue,Ti=Nn.defaultActiveFirstOption,en=Nn.onSelect,br=Nn.menuItemSelectedIcon,cr=Nn.rawValues,Kr=Nn.fieldNames,Ze=Nn.virtual,ni=Nn.direction,Bi=Nn.listHeight,Hi=Nn.listItemHeight,vi=Nn.optionRender,ki="".concat(rn,"-item"),er=(0,Qi.Z)(function(){return Ki},[pi,Ki],function(pn,Qn){return Qn[0]&&pn[1]!==Qn[1]}),lr=Wt.useRef(null),oe=Wt.useMemo(function(){return on&&Bt(ai)&&(cr==null?void 0:cr.size)>=ai},[on,ai,cr==null?void 0:cr.size]),ae=function(Qn){Qn.preventDefault()},ee=function(Qn){var zn;(zn=lr.current)===null||zn===void 0||zn.scrollTo(typeof Qn=="number"?{index:Qn}:Qn)},Ye=Wt.useCallback(function(pn){return yn==="combobox"?!1:cr.has(pn)},[yn,(0,te.Z)(cr).toString(),cr.size]),Be=function(Qn){for(var zn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,jn=er.length,Ge=0;Ge<jn;Ge+=1){var fn=(Qn+Ge*zn+jn)%jn,Fn=er[fn]||{},Sn=Fn.group,dn=Fn.data;if(!Sn&&!(dn!=null&&dn.disabled)&&(Ye(dn.value)||!oe))return fn}return-1},ln=Wt.useState(function(){return Be(0)}),Dn=(0,de.Z)(ln,2),Zn=Dn[0],Li=Dn[1],Mi=function(Qn){var zn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Li(Qn);var jn={source:zn?"keyboard":"mouse"},Ge=er[Qn];if(!Ge){Ni(null,-1,jn);return}Ni(Ge.value,Qn,jn)};(0,Wt.useEffect)(function(){Mi(Ti!==!1?Be(0):-1)},[er.length,ii]);var Te=Wt.useCallback(function(pn){return yn==="combobox"?String(pn).toLowerCase()===ii.toLowerCase():cr.has(pn)},[yn,ii,(0,te.Z)(cr).toString(),cr.size]);(0,Wt.useEffect)(function(){var pn=setTimeout(function(){if(!on&&pi&&cr.size===1){var zn=Array.from(cr)[0],jn=er.findIndex(function(Ge){var fn=Ge.data;return fn.value===zn});jn!==-1&&(Mi(jn),ee(jn))}});if(pi){var Qn;(Qn=lr.current)===null||Qn===void 0||Qn.scrollTo(void 0)}return function(){return clearTimeout(pn)}},[pi,ii]);var yi=function(Qn){Qn!==void 0&&en(Qn,{selected:!cr.has(Qn)}),on||hn(!1)};if(Wt.useImperativeHandle(ui,function(){return{onKeyDown:function(Qn){var zn=Qn.which,jn=Qn.ctrlKey;switch(zn){case Qt.Z.N:case Qt.Z.P:case Qt.Z.UP:case Qt.Z.DOWN:{var Ge=0;if(zn===Qt.Z.UP?Ge=-1:zn===Qt.Z.DOWN?Ge=1:Hr()&&jn&&(zn===Qt.Z.N?Ge=1:zn===Qt.Z.P&&(Ge=-1)),Ge!==0){var fn=Be(Zn+Ge,Ge);ee(fn),Mi(fn,!0)}break}case Qt.Z.TAB:case Qt.Z.ENTER:{var Fn,Sn=er[Zn];Sn&&!(Sn!=null&&(Fn=Sn.data)!==null&&Fn!==void 0&&Fn.disabled)&&!oe?yi(Sn.value):yi(void 0),pi&&Qn.preventDefault();break}case Qt.Z.ESC:hn(!1),pi&&Qn.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Qn){ee(Qn)}}}),er.length===0)return Wt.createElement("div",{role:"listbox",id:"".concat(Wn,"_list"),className:"".concat(ki,"-empty"),onMouseDown:ae},An);var Me=Object.keys(Kr).map(function(pn){return Kr[pn]}),an=function(Qn){return Qn.label};function Qe(pn,Qn){var zn=pn.group;return{role:zn?"presentation":"option",id:"".concat(Wn,"_list_").concat(Qn)}}var It=function(Qn){var zn=er[Qn];if(!zn)return null;var jn=zn.data||{},Ge=jn.value,fn=zn.group,Fn=(0,Zt.Z)(jn,!0),Sn=an(zn);return zn?Wt.createElement("div",(0,Pt.Z)({"aria-label":typeof Sn=="string"&&!fn?Sn:null},Fn,{key:Qn},Qe(zn,Qn),{"aria-selected":Te(Ge)}),Ge):null},vn={role:"listbox",id:"".concat(Wn,"_list")};return Wt.createElement(Wt.Fragment,null,Ze&&Wt.createElement("div",(0,Pt.Z)({},vn,{style:{height:0,width:0,overflow:"hidden"}}),It(Zn-1),It(Zn),It(Zn+1)),Wt.createElement(Yi.Z,{itemKey:"key",ref:lr,data:er,height:Bi,itemHeight:Hi,fullHeight:!1,onMouseDown:ae,onScroll:xn,virtual:Ze,direction:ni,innerProps:Ze?null:vn},function(pn,Qn){var zn=pn.group,jn=pn.groupOption,Ge=pn.data,fn=pn.label,Fn=pn.value,Sn=Ge.key;if(zn){var dn,gi=(dn=Ge.title)!==null&&dn!==void 0?dn:Fr(fn)?fn.toString():void 0;return Wt.createElement("div",{className:qt()(ki,"".concat(ki,"-group"),Ge.className),title:gi},fn!==void 0?fn:Sn)}var Vn=Ge.disabled,qn=Ge.title,cn=Ge.children,ri=Ge.style,Ui=Ge.className,nr=(0,Rt.Z)(Ge,Xi),Ji=(0,Oi.Z)(nr,Me),fr=Ye(Fn),dr=Vn||!fr&&oe,Pr="".concat(ki,"-option"),Gr=qt()(ki,Pr,Ui,(0,Ae.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({},"".concat(Pr,"-grouped"),jn),"".concat(Pr,"-active"),Zn===Qn&&!dr),"".concat(Pr,"-disabled"),dr),"".concat(Pr,"-selected"),fr)),Tr=an(pn),ro=!br||typeof br=="function"||fr,Oe=typeof Tr=="number"?Tr:Tr||Fn,gr=Fr(Oe)?Oe.toString():void 0;return qn!==void 0&&(gr=qn),Wt.createElement("div",(0,Pt.Z)({},(0,Zt.Z)(Ji),Ze?{}:Qe(pn,Qn),{"aria-selected":Te(Fn),className:Gr,title:gr,onMouseMove:function(){Zn===Qn||dr||Mi(Qn)},onClick:function(){dr||yi(Fn)},style:ri}),Wt.createElement("div",{className:"".concat(Pr,"-content")},typeof vi=="function"?vi(pn,{index:Qn}):Oe),Wt.isValidElement(br)||fr,ro&&Wt.createElement(At,{className:"".concat(ki,"-option-state"),customizeIcon:br,customizeIconProps:{value:Fn,disabled:dr,isSelected:fr}},fr?"\u2713":null))}))},Yr=Wt.forwardRef(mr),ji=Yr,co=function(We,Ke){var ui=Wt.useRef({values:new Map,options:new Map}),he=Wt.useMemo(function(){var Wn=ui.current,pi=Wn.values,on=Wn.options,yn=We.map(function(An){if(An.label===void 0){var xn;return(0,Ce.Z)((0,Ce.Z)({},An),{},{label:(xn=pi.get(An.value))===null||xn===void 0?void 0:xn.label})}return An}),ii=new Map,hn=new Map;return yn.forEach(function(An){ii.set(An.value,An),hn.set(An.value,Ke.get(An.value)||on.get(An.value))}),ui.current.values=ii,ui.current.options=hn,yn},[We,Ke]),rn=Wt.useCallback(function(Wn){return Ke.get(Wn)||ui.current.options.get(Wn)},[Ke]);return[he,rn]};function fo(We,Ke){return tn(We).join("").toUpperCase().includes(Ke)}var Xr=function(We,Ke,ui,he,rn){return Wt.useMemo(function(){if(!ui||he===!1)return We;var Wn=Ke.options,pi=Ke.label,on=Ke.value,yn=[],ii=typeof he=="function",hn=ui.toUpperCase(),An=ii?he:function(Nn,ai){return rn?fo(ai[rn],hn):ai[Wn]?fo(ai[pi!=="children"?pi:"label"],hn):fo(ai[on],hn)},xn=ii?function(Nn){return ke(Nn)}:function(Nn){return Nn};return We.forEach(function(Nn){if(Nn[Wn]){var ai=An(ui,xn(Nn));if(ai)yn.push(Nn);else{var Ki=Nn[Wn].filter(function(Ni){return An(ui,xn(Ni))});Ki.length&&yn.push((0,Ce.Z)((0,Ce.Z)({},Nn),{},(0,Ae.Z)({},Wn,Ki)))}return}An(ui,xn(Nn))&&yn.push(Nn)}),yn},[We,he,rn,ui,Ke])},Er=Ot(69582),Zr=Ot(11592),bt=["children","value"],Br=["children"];function Vi(We){var Ke=We,ui=Ke.key,he=Ke.props,rn=he.children,Wn=he.value,pi=(0,Rt.Z)(he,bt);return(0,Ce.Z)({key:ui,value:Wn!==void 0?Wn:ui,children:rn},pi)}function Vr(We){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Zr.Z)(We).map(function(ui,he){if(!Wt.isValidElement(ui)||!ui.type)return null;var rn=ui,Wn=rn.type.isSelectOptGroup,pi=rn.key,on=rn.props,yn=on.children,ii=(0,Rt.Z)(on,Br);return Ke||!Wn?Vi(ui):(0,Ce.Z)((0,Ce.Z)({key:"__RC_SELECT_GRP__".concat(pi===null?he:pi,"__"),label:pi},ii),{},{options:Vr(yn)})}).filter(function(ui){return ui})}var Do=function(Ke,ui,he,rn,Wn){return Wt.useMemo(function(){var pi=Ke,on=!Ke;on&&(pi=Vr(ui));var yn=new Map,ii=new Map,hn=function(Nn,ai,Ki){Ki&&typeof Ki=="string"&&Nn.set(ai[Ki],ai)},An=function xn(Nn){for(var ai=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ki=0;Ki<Nn.length;Ki+=1){var Ni=Nn[Ki];!Ni[he.options]||ai?(yn.set(Ni[he.value],Ni),hn(ii,Ni,he.label),hn(ii,Ni,rn),hn(ii,Ni,Wn)):xn(Ni[he.options],!0)}};return An(pi),{options:pi,valueOptions:yn,labelOptions:ii}},[Ke,ui,he,rn,Wn])},bo=Do;function $o(We){var Ke=Wt.useRef();Ke.current=We;var ui=Wt.useCallback(function(){return Ke.current.apply(Ke,arguments)},[]);return ui}function Zi(We){var Ke=We.mode,ui=We.options,he=We.children,rn=We.backfill,Wn=We.allowClear,pi=We.placeholder,on=We.getInputElement,yn=We.showSearch,ii=We.onSearch,hn=We.defaultOpen,An=We.autoFocus,xn=We.labelInValue,Nn=We.value,ai=We.inputValue,Ki=We.optionLabelProp,Ni=isMultiple(Ke),Ti=yn!==void 0?yn:Ni||Ke==="combobox",en=ui||convertChildrenToData(he);if(warning(Ke!=="tags"||en.every(function(Ze){return!Ze.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Ke==="tags"||Ke==="combobox"){var br=en.some(function(Ze){return Ze.options?Ze.options.some(function(ni){return typeof("value"in ni?ni.value:ni.key)=="number"}):typeof("value"in Ze?Ze.value:Ze.key)=="number"});warning(!br,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Ke!=="combobox"||!Ki,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Ke==="combobox"||!rn,"`backfill` only works with `combobox` mode."),warning(Ke==="combobox"||!on,"`getInputElement` only work with `combobox` mode."),noteOnce(Ke!=="combobox"||!on||!Wn||!pi,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ii&&!Ti&&Ke!=="combobox"&&Ke!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!hn||An,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Nn!=null){var cr=toArray(Nn);warning(!xn||cr.every(function(Ze){return _typeof(Ze)==="object"&&("key"in Ze||"value"in Ze)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Ni||Array.isArray(Nn),"`value` should be array when `mode` is `multiple` or `tags`")}if(he){var Kr=null;toNodeArray(he).some(function(Ze){if(!React.isValidElement(Ze)||!Ze.type)return!1;var ni=Ze,Bi=ni.type;if(Bi.isSelectOption)return!1;if(Bi.isSelectOptGroup){var Hi=toNodeArray(Ze.props.children).every(function(vi){return!React.isValidElement(vi)||!Ze.type||vi.type.isSelectOption?!0:(Kr=vi.type,!1)});return!Hi}return Kr=Bi,!0}),Kr&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Kr.displayName||Kr.name||Kr,"`.")),warning(ai===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function wi(We,Ke){if(We){var ui=function he(rn){for(var Wn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,pi=0;pi<rn.length;pi++){var on=rn[pi];if(on[Ke==null?void 0:Ke.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Wn&&Array.isArray(on[Ke==null?void 0:Ke.options])&&he(on[Ke==null?void 0:Ke.options],!0))break}};ui(We)}}var je=null,He=["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"],Ue=["inputValue"];function fi(We){return!We||(0,ne.Z)(We)!=="object"}var Se=Wt.forwardRef(function(We,Ke){var ui=We.id,he=We.mode,rn=We.prefixCls,Wn=rn===void 0?"rc-select":rn,pi=We.backfill,on=We.fieldNames,yn=We.inputValue,ii=We.searchValue,hn=We.onSearch,An=We.autoClearSearchValue,xn=An===void 0?!0:An,Nn=We.onSelect,ai=We.onDeselect,Ki=We.dropdownMatchSelectWidth,Ni=Ki===void 0?!0:Ki,Ti=We.filterOption,en=We.filterSort,br=We.optionFilterProp,cr=We.optionLabelProp,Kr=We.options,Ze=We.optionRender,ni=We.children,Bi=We.defaultActiveFirstOption,Hi=We.menuItemSelectedIcon,vi=We.virtual,ki=We.direction,er=We.listHeight,lr=er===void 0?200:er,oe=We.listItemHeight,ae=oe===void 0?20:oe,ee=We.labelRender,Ye=We.value,Be=We.defaultValue,ln=We.labelInValue,Dn=We.onChange,Zn=We.maxCount,Li=(0,Rt.Z)(We,He),Mi=(0,Er.ZP)(ui),Te=Gn(he),yi=!!(!Kr&&ni),Me=Wt.useMemo(function(){return Ti===void 0&&he==="combobox"?!1:Ti},[Ti,he]),an=Wt.useMemo(function(){return Kt(on,yi)},[JSON.stringify(on),yi]),Qe=(0,ue.Z)("",{value:ii!==void 0?ii:yn,postState:function(ir){return ir||""}}),It=(0,de.Z)(Qe,2),vn=It[0],pn=It[1],Qn=bo(Kr,ni,an,br,cr),zn=Qn.valueOptions,jn=Qn.labelOptions,Ge=Qn.options,fn=Wt.useCallback(function(Wi){var ir=tn(Wi);return ir.map(function(Kn){var Ar,kr,xo,Ts,ps;if(fi(Kn))Ar=Kn;else{var Cr;xo=Kn.key,kr=Kn.label,Ar=(Cr=Kn.value)!==null&&Cr!==void 0?Cr:xo}var to=zn.get(Ar);if(to){var oo;if(kr===void 0&&(kr=to==null?void 0:to[cr||an.label]),xo===void 0&&(xo=(oo=to==null?void 0:to.key)!==null&&oo!==void 0?oo:Ar),Ts=to==null?void 0:to.disabled,ps=to==null?void 0:to.title,0)var ts}return{label:kr,value:Ar,key:xo,disabled:Ts,title:ps}})},[an,cr,zn]),Fn=(0,ue.Z)(Be,{value:Ye}),Sn=(0,de.Z)(Fn,2),dn=Sn[0],gi=Sn[1],Vn=Wt.useMemo(function(){var Wi,ir=Te&&dn===null?[]:dn,Kn=fn(ir);return he==="combobox"&&$n((Wi=Kn[0])===null||Wi===void 0?void 0:Wi.value)?[]:Kn},[dn,fn,he,Te]),qn=co(Vn,zn),cn=(0,de.Z)(qn,2),ri=cn[0],Ui=cn[1],nr=Wt.useMemo(function(){if(!he&&ri.length===1){var Wi=ri[0];if(Wi.value===null&&(Wi.label===null||Wi.label===void 0))return[]}return ri.map(function(ir){var Kn;return(0,Ce.Z)((0,Ce.Z)({},ir),{},{label:(Kn=typeof ee=="function"?ee(ir):ir.label)!==null&&Kn!==void 0?Kn:ir.value})})},[he,ri,ee]),Ji=Wt.useMemo(function(){return new Set(ri.map(function(Wi){return Wi.value}))},[ri]);Wt.useEffect(function(){if(he==="combobox"){var Wi,ir=(Wi=ri[0])===null||Wi===void 0?void 0:Wi.value;pn(In(ir)?String(ir):"")}},[ri]);var fr=$o(function(Wi,ir){var Kn=ir!=null?ir:Wi;return(0,Ae.Z)((0,Ae.Z)({},an.value,Wi),an.label,Kn)}),dr=Wt.useMemo(function(){if(he!=="tags")return Ge;var Wi=(0,te.Z)(Ge),ir=function(Ar){return zn.has(Ar)};return(0,te.Z)(ri).sort(function(Kn,Ar){return Kn.value<Ar.value?-1:1}).forEach(function(Kn){var Ar=Kn.value;ir(Ar)||Wi.push(fr(Ar,Kn.label))}),Wi},[fr,Ge,zn,ri,he]),Pr=Xr(dr,an,vn,Me,br),Gr=Wt.useMemo(function(){return he!=="tags"||!vn||Pr.some(function(Wi){return Wi[br||"value"]===vn})||Pr.some(function(Wi){return Wi[an.value]===vn})?Pr:[fr(vn)].concat((0,te.Z)(Pr))},[fr,br,he,Pr,vn,an]),Tr=function Wi(ir){var Kn=(0,te.Z)(ir).sort(function(Ar,kr){return en(Ar,kr,{searchValue:vn})});return Kn.map(function(Ar){return Array.isArray(Ar.options)?(0,Ce.Z)((0,Ce.Z)({},Ar),{},{options:Ar.options.length>0?Wi(Ar.options):Ar.options}):Ar})},ro=Wt.useMemo(function(){return en?Tr(Gr):Gr},[Gr,en,vn]),Oe=Wt.useMemo(function(){return ge(ro,{fieldNames:an,childrenAsData:yi})},[ro,an,yi]),gr=function(ir){var Kn=fn(ir);if(gi(Kn),Dn&&(Kn.length!==ri.length||Kn.some(function(xo,Ts){var ps;return((ps=ri[Ts])===null||ps===void 0?void 0:ps.value)!==(xo==null?void 0:xo.value)}))){var Ar=ln?Kn:Kn.map(function(xo){return xo.value}),kr=Kn.map(function(xo){return ke(Ui(xo.value))});Dn(Te?Ar:Ar[0],Te?kr:kr[0])}},Dr=Wt.useState(null),tr=(0,de.Z)(Dr,2),Ur=tr[0],or=tr[1],vo=Wt.useState(0),qr=(0,de.Z)(vo,2),Nr=qr[0],ho=qr[1],ks=Bi!==void 0?Bi:he!=="combobox",ls=Wt.useCallback(function(Wi,ir){var Kn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ar=Kn.source,kr=Ar===void 0?"keyboard":Ar;ho(ir),pi&&he==="combobox"&&Wi!==null&&kr==="keyboard"&&or(String(Wi))},[pi,he]),la=function(ir,Kn,Ar){var kr=function(){var zo,Io=Ui(ir);return[ln?{label:Io==null?void 0:Io[an.label],value:ir,key:(zo=Io==null?void 0:Io.key)!==null&&zo!==void 0?zo:ir}:ir,ke(Io)]};if(Kn&&Nn){var xo=kr(),Ts=(0,de.Z)(xo,2),ps=Ts[0],Cr=Ts[1];Nn(ps,Cr)}else if(!Kn&&ai&&Ar!=="clear"){var to=kr(),oo=(0,de.Z)(to,2),ts=oo[0],yo=oo[1];ai(ts,yo)}},Is=$o(function(Wi,ir){var Kn,Ar=Te?ir.selected:!0;Ar?Kn=Te?[].concat((0,te.Z)(ri),[Wi]):[Wi]:Kn=ri.filter(function(kr){return kr.value!==Wi}),gr(Kn),la(Wi,Ar),he==="combobox"?or(""):(!Gn||xn)&&(pn(""),or(""))}),sr=function(ir,Kn){gr(ir);var Ar=Kn.type,kr=Kn.values;(Ar==="remove"||Ar==="clear")&&kr.forEach(function(xo){la(xo.value,!1,Ar)})},Eo=function(ir,Kn){if(pn(ir),or(null),Kn.source==="submit"){var Ar=(ir||"").trim();if(Ar){var kr=Array.from(new Set([].concat((0,te.Z)(Ji),[Ar])));gr(kr),la(Ar,!0),pn("")}return}Kn.source!=="blur"&&(he==="combobox"&&gr(ir),hn==null||hn(ir))},os=function(ir){var Kn=ir;he!=="tags"&&(Kn=ir.map(function(kr){var xo=jn.get(kr);return xo==null?void 0:xo.value}).filter(function(kr){return kr!==void 0}));var Ar=Array.from(new Set([].concat((0,te.Z)(Ji),(0,te.Z)(Kn))));gr(Ar),Ar.forEach(function(kr){la(kr,!0)})},Gi=Wt.useMemo(function(){var Wi=vi!==!1&&Ni!==!1;return(0,Ce.Z)((0,Ce.Z)({},Qn),{},{flattenOptions:Oe,onActiveValue:ls,defaultActiveFirstOption:ks,onSelect:Is,menuItemSelectedIcon:Hi,rawValues:Ji,fieldNames:an,virtual:Wi,direction:ki,listHeight:lr,listItemHeight:ae,childrenAsData:yi,maxCount:Zn,optionRender:Ze})},[Zn,Qn,Oe,ls,ks,Is,Hi,Ji,an,vi,Ni,ki,lr,ae,yi,Ze]);return Wt.createElement(ze.Provider,{value:Gi},Wt.createElement(Ri,(0,Pt.Z)({},Li,{id:Mi,prefixCls:Wn,ref:Ke,omitDomProps:Ue,mode:he,displayValues:nr,onDisplayValuesChange:sr,direction:ki,searchValue:vn,onSearch:Eo,autoClearSearchValue:xn,onSearchSplit:os,dropdownMatchSelectWidth:Ni,OptionList:ji,emptyOptions:!Oe.length,activeValue:Ur,activeDescendantId:"".concat(Mi,"_list_").concat(Nr)})))}),_i=Se;_i.Option=ar,_i.OptGroup=xi;var Un=_i,Ai=Un},63158:function(Bn,Ve,Ot){"use strict";var Pt=Ot(72308),te=Ot(49618),Ae=Ot(52487),Ce=Ot(74416),de=Ot(59301),Rt=Ot(92310),ne=Ot.n(Rt),ue=Ot(18929),ce=Ot(10228),Wt=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Ne=de.forwardRef(function(qt,Le){var Ut,nt=qt.prefixCls,et=nt===void 0?"rc-switch":nt,At=qt.className,at=qt.checked,ct=qt.defaultChecked,pt=qt.disabled,xt=qt.loadingIcon,Mt=qt.checkedChildren,_t=qt.unCheckedChildren,Qt=qt.onClick,Vt=qt.onChange,Zt=qt.onKeyDown,$t=(0,Ce.Z)(qt,Wt),Pe=(0,ue.Z)(!1,{value:at,defaultValue:ct}),me=(0,Ae.Z)(Pe,2),$e=me[0],tn=me[1];function Cn(Ln,be){var re=$e;return pt||(re=Ln,tn(re),Vt==null||Vt(re,be)),re}function Tn(Ln){Ln.which===ce.Z.LEFT?Cn(!1,Ln):Ln.which===ce.Z.RIGHT&&Cn(!0,Ln),Zt==null||Zt(Ln)}function In(Ln){var be=Cn(!$e,Ln);Qt==null||Qt(be,Ln)}var $n=ne()(et,At,(Ut={},(0,te.Z)(Ut,"".concat(et,"-checked"),$e),(0,te.Z)(Ut,"".concat(et,"-disabled"),pt),Ut));return de.createElement("button",(0,Pt.Z)({},$t,{type:"button",role:"switch","aria-checked":$e,disabled:pt,className:$n,ref:Le,onKeyDown:Tn,onClick:In}),xt,de.createElement("span",{className:"".concat(et,"-inner")},de.createElement("span",{className:"".concat(et,"-inner-checked")},Mt),de.createElement("span",{className:"".concat(et,"-inner-unchecked")},_t)))});Ne.displayName="Switch",Ve.Z=Ne},67204:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{R:function(){return te},w:function(){return Pt}});var Pt={},te="rc-table-internal-hook"},78612:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{L:function(){return et},Z:function(){return xt}});var Pt=Ot(52487),te=Ot(49618),Ae=Ot(80702),Ce=Ot(62853),de=Ot(77321),Rt=Ot(74416),ne=Ot(11592),ue=Ot(48736),ce=Ot(59301),Wt=Ot(67204),Ne=Ot(90494);function qt(Mt){var _t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof _t=="number"?_t:_t.endsWith("%")?Mt*parseFloat(_t)/100:null}function Le(Mt,_t,Qt){return ce.useMemo(function(){if(_t&&_t>0){var Vt=0,Zt=0;Mt.forEach(function(In){var $n=qt(_t,In.width);$n?Vt+=$n:Zt+=1});var $t=Math.max(_t,Qt),Pe=Math.max($t-Vt,Zt),me=Zt,$e=Pe/Zt,tn=0,Cn=Mt.map(function(In){var $n=(0,de.Z)({},In),Ln=qt(_t,$n.width);if(Ln)$n.width=Ln;else{var be=Math.floor($e);$n.width=me===1?Pe:be,Pe-=be,me-=1}return tn+=$n.width,$n});if(tn<$t){var Tn=$t/tn;Pe=$t,Cn.forEach(function(In,$n){var Ln=Math.floor(In.width*Tn);In.width=$n===Cn.length-1?Pe:Ln,Pe-=Ln})}return[Cn,Math.max(tn,$t)]}return[Mt,_t]},[Mt,_t,Qt])}var Ut=["children"],nt=["fixed"];function et(Mt){return(0,ne.Z)(Mt).filter(function(_t){return ce.isValidElement(_t)}).map(function(_t){var Qt=_t.key,Vt=_t.props,Zt=Vt.children,$t=(0,Rt.Z)(Vt,Ut),Pe=(0,de.Z)({key:Qt},$t);return Zt&&(Pe.children=et(Zt)),Pe})}function At(Mt){return Mt.filter(function(_t){return _t&&(0,Ce.Z)(_t)==="object"&&!_t.hidden}).map(function(_t){var Qt=_t.children;return Qt&&Qt.length>0?(0,de.Z)((0,de.Z)({},_t),{},{children:At(Qt)}):_t})}function at(Mt){var _t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return Mt.filter(function(Qt){return Qt&&(0,Ce.Z)(Qt)==="object"}).reduce(function(Qt,Vt,Zt){var $t=Vt.fixed,Pe=$t===!0?"left":$t,me="".concat(_t,"-").concat(Zt),$e=Vt.children;return $e&&$e.length>0?[].concat((0,Ae.Z)(Qt),(0,Ae.Z)(at($e,me).map(function(tn){return(0,de.Z)({fixed:Pe},tn)}))):[].concat((0,Ae.Z)(Qt),[(0,de.Z)((0,de.Z)({key:me},Vt),{},{fixed:Pe})])},[])}function ct(Mt){return Mt.map(function(_t){var Qt=_t.fixed,Vt=(0,Rt.Z)(_t,nt),Zt=Qt;return Qt==="left"?Zt="right":Qt==="right"&&(Zt="left"),(0,de.Z)({fixed:Zt},Vt)})}function pt(Mt,_t){var Qt=Mt.prefixCls,Vt=Mt.columns,Zt=Mt.children,$t=Mt.expandable,Pe=Mt.expandedKeys,me=Mt.columnTitle,$e=Mt.getRowKey,tn=Mt.onTriggerExpand,Cn=Mt.expandIcon,Tn=Mt.rowExpandable,In=Mt.expandIconColumnIndex,$n=Mt.direction,Ln=Mt.expandRowByClick,be=Mt.columnWidth,re=Mt.fixed,Pn=Mt.scrollWidth,li=Mt.clientWidth,Jn=ce.useMemo(function(){var Pi=Vt||et(Zt)||[];return At(Pi.slice())},[Vt,Zt]),un=ce.useMemo(function(){if($t){var Pi=Jn.slice();if(!Pi.includes(Wt.w)){var Ht=In||0;Ht>=0&&(Ht||re==="left"||!re)&&Pi.splice(Ht,0,Wt.w),re==="right"&&Pi.splice(Jn.length,0,Wt.w)}var kt=Pi.indexOf(Wt.w);Pi=Pi.filter(function(Bt,Kt){return Bt!==Wt.w||Kt===kt});var mt=Jn[kt],vt;re?vt=re:vt=mt?mt.fixed:null;var Lt=(0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)({},Ne.v,{className:"".concat(Qt,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",me),"fixed",vt),"className","".concat(Qt,"-row-expand-icon-cell")),"width",be),"render",function(Kt,ge,ke){var Je=$e(ge,ke),ve=Pe.has(Je),ze=Tn?Tn(ge):!0,De=Cn({prefixCls:Qt,expanded:ve,expandable:ze,record:ge,onExpand:tn});return Ln?ce.createElement("span",{onClick:function(kn){return kn.stopPropagation()}},De):De});return Pi.map(function(Bt){return Bt===Wt.w?Lt:Bt})}return Jn.filter(function(Bt){return Bt!==Wt.w})},[$t,Jn,$e,Pe,Cn,$n]),Yn=ce.useMemo(function(){var Pi=un;return _t&&(Pi=_t(Pi)),Pi.length||(Pi=[{render:function(){return null}}]),Pi},[_t,un,$n]),si=ce.useMemo(function(){return $n==="rtl"?ct(at(Yn)):at(Yn)},[Yn,$n,Pn]),Fi=ce.useMemo(function(){for(var Pi=-1,Ht=si.length-1;Ht>=0;Ht-=1){var kt=si[Ht].fixed;if(kt==="left"||kt===!0){Pi=Ht;break}}if(Pi>=0)for(var mt=0;mt<=Pi;mt+=1){var vt=si[mt].fixed;if(vt!=="left"&&vt!==!0)return!0}var Lt=si.findIndex(function(ge){var ke=ge.fixed;return ke==="right"});if(Lt>=0)for(var Bt=Lt;Bt<si.length;Bt+=1){var Kt=si[Bt].fixed;if(Kt!=="right")return!0}return!1},[si]),sn=Le(si,Pn,li),oi=(0,Pt.Z)(sn,2),Ee=oi[0],ci=oi[1];return[Yn,Ee,ci,Fi]}var xt=pt},16596:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{w2:function(){return Pt.w},vP:function(){return ji.v},RQ:function(){return Pt.R},ER:function(){return Je},Q$:function(){return cr},TN:function(){return Mi}});var Pt=Ot(67204),te=Ot(52487),Ae=Ot(6089),Ce=Ot(34280),de=Ot(13697),Rt=Ot(59301),ne=Ot(4676);function ue(Me){var an=Rt.createContext(void 0),Qe=function(vn){var pn=vn.value,Qn=vn.children,zn=Rt.useRef(pn);zn.current=pn;var jn=Rt.useState(function(){return{getValue:function(){return zn.current},listeners:new Set}}),Ge=(0,te.Z)(jn,1),fn=Ge[0];return(0,Ce.Z)(function(){(0,ne.unstable_batchedUpdates)(function(){fn.listeners.forEach(function(Fn){Fn(pn)})})},[pn]),Rt.createElement(an.Provider,{value:fn},Qn)};return{Context:an,Provider:Qe,defaultValue:Me}}function ce(Me,an){var Qe=(0,Ae.Z)(typeof an=="function"?an:function(Fn){if(an===void 0)return Fn;if(!Array.isArray(an))return Fn[an];var Sn={};return an.forEach(function(dn){Sn[dn]=Fn[dn]}),Sn}),It=Rt.useContext(Me==null?void 0:Me.Context),vn=It||{},pn=vn.listeners,Qn=vn.getValue,zn=Rt.useRef();zn.current=Qe(It?Qn():Me==null?void 0:Me.defaultValue);var jn=Rt.useState({}),Ge=(0,te.Z)(jn,2),fn=Ge[1];return(0,Ce.Z)(function(){if(!It)return;function Fn(Sn){var dn=Qe(Sn);(0,de.Z)(zn.current,dn,!0)||fn({})}return pn.add(Fn),function(){pn.delete(Fn)}},[It]),zn.current}var Wt=Ot(72308),Ne=Ot(8654);function qt(){var Me=Rt.createContext(null);function an(){return Rt.useContext(Me)}function Qe(vn,pn){var Qn=(0,Ne.Yr)(vn),zn=function(Ge,fn){var Fn=Qn?{ref:fn}:{},Sn=Rt.useRef(0),dn=Rt.useRef(Ge),gi=an();return gi!==null?Rt.createElement(vn,(0,Wt.Z)({},Ge,Fn)):((!pn||pn(dn.current,Ge))&&(Sn.current+=1),dn.current=Ge,Rt.createElement(Me.Provider,{value:Sn.current},Rt.createElement(vn,(0,Wt.Z)({},Ge,Fn))))};return Qn?Rt.forwardRef(zn):zn}function It(vn,pn){var Qn=(0,Ne.Yr)(vn),zn=function(Ge,fn){var Fn=Qn?{ref:fn}:{};return an(),Rt.createElement(vn,(0,Wt.Z)({},Ge,Fn))};return Qn?Rt.memo(Rt.forwardRef(zn),pn):Rt.memo(zn,pn)}return{makeImmutable:Qe,responseImmutable:It,useImmutableMark:an}}var Le=qt(),Ut=Le.makeImmutable,nt=Le.responseImmutable,et=Le.useImmutableMark,At=qt(),at=At.makeImmutable,ct=At.responseImmutable,pt=At.useImmutableMark,xt=ue(),Mt=xt;function _t(Me,an){var Qe=React.useRef(0);Qe.current+=1;var It=React.useRef(Me),vn=[];Object.keys(Me||{}).map(function(Qn){var zn;(Me==null?void 0:Me[Qn])!==((zn=It.current)===null||zn===void 0?void 0:zn[Qn])&&vn.push(Qn)}),It.current=Me;var pn=React.useRef([]);return vn.length&&(pn.current=vn),React.useDebugValue(Qe.current),React.useDebugValue(pn.current.join(", ")),an&&console.log("".concat(an,":"),Qe.current,pn.current),Qe.current}var Qt=null,Vt=null,Zt=Ot(62853),$t=Ot(77321),Pe=Ot(49618),me=Ot(92310),$e=Ot.n(me),tn=Ot(80547),Cn=Ot(97938),Tn=Ot(48736),In=Rt.createContext({renderWithProps:!1}),$n=In,Ln="RC_TABLE_KEY";function be(Me){return Me==null?[]:Array.isArray(Me)?Me:[Me]}function re(Me){var an=[],Qe={};return Me.forEach(function(It){for(var vn=It||{},pn=vn.key,Qn=vn.dataIndex,zn=pn||be(Qn).join("-")||Ln;Qe[zn];)zn="".concat(zn,"_next");Qe[zn]=!0,an.push(zn)}),an}function Pn(Me){return Me!=null}function li(Me){return typeof Me=="number"&&!Number.isNaN(Me)}function Jn(Me){return Me&&(0,Zt.Z)(Me)==="object"&&!Array.isArray(Me)&&!Rt.isValidElement(Me)}function un(Me,an,Qe,It,vn,pn){var Qn=Rt.useContext($n),zn=pt(),jn=(0,tn.Z)(function(){if(Pn(It))return[It];var Ge=an==null||an===""?[]:Array.isArray(an)?an:[an],fn=(0,Cn.Z)(Me,Ge),Fn=fn,Sn=void 0;if(vn){var dn=vn(fn,Me,Qe);Jn(dn)?(Fn=dn.children,Sn=dn.props,Qn.renderWithProps=!0):Fn=dn}return[Fn,Sn]},[zn,Me,It,an,vn,Qe],function(Ge,fn){if(pn){var Fn=(0,te.Z)(Ge,2),Sn=Fn[1],dn=(0,te.Z)(fn,2),gi=dn[1];return pn(gi,Sn)}return Qn.renderWithProps?!0:!(0,de.Z)(Ge,fn,!0)});return jn}function Yn(Me,an,Qe,It){var vn=Me+an-1;return Me<=It&&vn>=Qe}function si(Me,an){return ce(Mt,function(Qe){var It=Yn(Me,an||1,Qe.hoverStartRow,Qe.hoverEndRow);return[It,Qe.onHover]})}var Fi=Ot(70425),sn=function(an){var Qe=an.ellipsis,It=an.rowType,vn=an.children,pn,Qn=Qe===!0?{showTitle:!0}:Qe;return Qn&&(Qn.showTitle||It==="header")&&(typeof vn=="string"||typeof vn=="number"?pn=vn.toString():Rt.isValidElement(vn)&&typeof vn.props.children=="string"&&(pn=vn.props.children)),pn};function oi(Me){var an,Qe,It,vn,pn,Qn,zn,jn,Ge=Me.component,fn=Me.children,Fn=Me.ellipsis,Sn=Me.scope,dn=Me.prefixCls,gi=Me.className,Vn=Me.align,qn=Me.record,cn=Me.render,ri=Me.dataIndex,Ui=Me.renderIndex,nr=Me.shouldCellUpdate,Ji=Me.index,fr=Me.rowType,dr=Me.colSpan,Pr=Me.rowSpan,Gr=Me.fixLeft,Tr=Me.fixRight,ro=Me.firstFixLeft,Oe=Me.lastFixLeft,gr=Me.firstFixRight,Dr=Me.lastFixRight,tr=Me.appendNode,Ur=Me.additionalProps,or=Ur===void 0?{}:Ur,vo=Me.isSticky,qr="".concat(dn,"-cell"),Nr=ce(Mt,["supportSticky","allColumnsFixedLeft","rowHoverable"]),ho=Nr.supportSticky,ks=Nr.allColumnsFixedLeft,ls=Nr.rowHoverable,la=un(qn,ri,Ui,fn,cn,nr),Is=(0,te.Z)(la,2),sr=Is[0],Eo=Is[1],os={},Gi=typeof Gr=="number"&&ho,Wi=typeof Tr=="number"&&ho;Gi&&(os.position="sticky",os.left=Gr),Wi&&(os.position="sticky",os.right=Tr);var ir=(an=(Qe=(It=Eo==null?void 0:Eo.colSpan)!==null&&It!==void 0?It:or.colSpan)!==null&&Qe!==void 0?Qe:dr)!==null&&an!==void 0?an:1,Kn=(vn=(pn=(Qn=Eo==null?void 0:Eo.rowSpan)!==null&&Qn!==void 0?Qn:or.rowSpan)!==null&&pn!==void 0?pn:Pr)!==null&&vn!==void 0?vn:1,Ar=si(Ji,Kn),kr=(0,te.Z)(Ar,2),xo=kr[0],Ts=kr[1],ps=(0,Fi.zX)(function(zo){var Io;qn&&Ts(Ji,Ji+Kn-1),or==null||(Io=or.onMouseEnter)===null||Io===void 0||Io.call(or,zo)}),Cr=(0,Fi.zX)(function(zo){var Io;qn&&Ts(-1,-1),or==null||(Io=or.onMouseLeave)===null||Io===void 0||Io.call(or,zo)});if(ir===0||Kn===0)return null;var to=(zn=or.title)!==null&&zn!==void 0?zn:sn({rowType:fr,ellipsis:Fn,children:sr}),oo=$e()(qr,gi,(jn={},(0,Pe.Z)((0,Pe.Z)((0,Pe.Z)((0,Pe.Z)((0,Pe.Z)((0,Pe.Z)((0,Pe.Z)((0,Pe.Z)((0,Pe.Z)((0,Pe.Z)(jn,"".concat(qr,"-fix-left"),Gi&&ho),"".concat(qr,"-fix-left-first"),ro&&ho),"".concat(qr,"-fix-left-last"),Oe&&ho),"".concat(qr,"-fix-left-all"),Oe&&ks&&ho),"".concat(qr,"-fix-right"),Wi&&ho),"".concat(qr,"-fix-right-first"),gr&&ho),"".concat(qr,"-fix-right-last"),Dr&&ho),"".concat(qr,"-ellipsis"),Fn),"".concat(qr,"-with-append"),tr),"".concat(qr,"-fix-sticky"),(Gi||Wi)&&vo&&ho),(0,Pe.Z)(jn,"".concat(qr,"-row-hover"),!Eo&&xo)),or.className,Eo==null?void 0:Eo.className),ts={};Vn&&(ts.textAlign=Vn);var yo=(0,$t.Z)((0,$t.Z)((0,$t.Z)((0,$t.Z)({},Eo==null?void 0:Eo.style),os),ts),or.style),Vo=sr;return(0,Zt.Z)(Vo)==="object"&&!Array.isArray(Vo)&&!Rt.isValidElement(Vo)&&(Vo=null),Fn&&(Oe||gr)&&(Vo=Rt.createElement("span",{className:"".concat(qr,"-content")},Vo)),Rt.createElement(Ge,(0,Wt.Z)({},Eo,or,{className:oo,style:yo,title:to,scope:Sn,onMouseEnter:ls?ps:void 0,onMouseLeave:ls?Cr:void 0,colSpan:ir!==1?ir:null,rowSpan:Kn!==1?Kn:null}),tr,Vo)}var Ee=Rt.memo(oi);function ci(Me,an,Qe,It,vn){var pn=Qe[Me]||{},Qn=Qe[an]||{},zn,jn;pn.fixed==="left"?zn=It.left[vn==="rtl"?an:Me]:Qn.fixed==="right"&&(jn=It.right[vn==="rtl"?Me:an]);var Ge=!1,fn=!1,Fn=!1,Sn=!1,dn=Qe[an+1],gi=Qe[Me-1],Vn=dn&&!dn.fixed||gi&&!gi.fixed||Qe.every(function(nr){return nr.fixed==="left"});if(vn==="rtl"){if(zn!==void 0){var qn=gi&&gi.fixed==="left";Sn=!qn&&Vn}else if(jn!==void 0){var cn=dn&&dn.fixed==="right";Fn=!cn&&Vn}}else if(zn!==void 0){var ri=dn&&dn.fixed==="left";Ge=!ri&&Vn}else if(jn!==void 0){var Ui=gi&&gi.fixed==="right";fn=!Ui&&Vn}return{fixLeft:zn,fixRight:jn,lastFixLeft:Ge,firstFixRight:fn,lastFixRight:Fn,firstFixLeft:Sn,isSticky:It.isSticky}}var Pi=Rt.createContext({}),Ht=Pi;function kt(Me){var an=Me.className,Qe=Me.index,It=Me.children,vn=Me.colSpan,pn=vn===void 0?1:vn,Qn=Me.rowSpan,zn=Me.align,jn=ce(Mt,["prefixCls","direction"]),Ge=jn.prefixCls,fn=jn.direction,Fn=Rt.useContext(Ht),Sn=Fn.scrollColumnIndex,dn=Fn.stickyOffsets,gi=Fn.flattenColumns,Vn=Qe+pn-1,qn=Vn+1===Sn?pn+1:pn,cn=ci(Qe,Qe+qn-1,gi,dn,fn);return Rt.createElement(Ee,(0,Wt.Z)({className:an,index:Qe,component:"td",prefixCls:Ge,record:null,dataIndex:null,align:zn,colSpan:qn,rowSpan:Qn,render:function(){return It}},cn))}var mt=Ot(74416),vt=["children"];function Lt(Me){var an=Me.children,Qe=(0,mt.Z)(Me,vt);return Rt.createElement("tr",Qe,an)}function Bt(Me){var an=Me.children;return an}Bt.Row=Lt,Bt.Cell=kt;var Kt=Bt;function ge(Me){var an=Me.children,Qe=Me.stickyOffsets,It=Me.flattenColumns,vn=ce(Mt,"prefixCls"),pn=It.length-1,Qn=It[pn],zn=Rt.useMemo(function(){return{stickyOffsets:Qe,flattenColumns:It,scrollColumnIndex:Qn!=null&&Qn.scrollbar?pn:null}},[Qn,It,pn,Qe]);return Rt.createElement(Ht.Provider,{value:zn},Rt.createElement("tfoot",{className:"".concat(vn,"-summary")},an))}var ke=ct(ge),Je=Kt,ve=Ot(29301),ze=Ot(29194),De=Ot(24514),nn=Ot(75152),kn=Ot(26112);function Gn(Me,an,Qe,It,vn,pn,Qn){Me.push({record:an,indent:Qe,index:Qn});var zn=pn(an),jn=vn==null?void 0:vn.has(zn);if(an&&Array.isArray(an[It])&&jn)for(var Ge=0;Ge<an[It].length;Ge+=1)Gn(Me,an[It][Ge],Qe+1,It,vn,pn,Ge)}function gn(Me,an,Qe,It){var vn=Rt.useMemo(function(){if(Qe!=null&&Qe.size){for(var pn=[],Qn=0;Qn<(Me==null?void 0:Me.length);Qn+=1){var zn=Me[Qn];Gn(pn,zn,0,an,Qe,It,Qn)}return pn}return Me==null?void 0:Me.map(function(jn,Ge){return{record:jn,indent:0,index:Ge}})},[Me,an,Qe,It]);return vn}function Ri(Me,an,Qe,It){var vn=ce(Mt,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),pn=vn.flattenColumns,Qn=vn.expandableType,zn=vn.expandedKeys,jn=vn.childrenColumnName,Ge=vn.onTriggerExpand,fn=vn.rowExpandable,Fn=vn.onRow,Sn=vn.expandRowByClick,dn=vn.rowClassName,gi=Qn==="nest",Vn=Qn==="row"&&(!fn||fn(Me)),qn=Vn||gi,cn=zn&&zn.has(an),ri=jn&&Me&&Me[jn],Ui=(0,Fi.zX)(Ge),nr=Fn==null?void 0:Fn(Me,Qe),Ji=nr==null?void 0:nr.onClick,fr=function(Tr){Sn&&qn&&Ge(Me,Tr);for(var ro=arguments.length,Oe=new Array(ro>1?ro-1:0),gr=1;gr<ro;gr++)Oe[gr-1]=arguments[gr];Ji==null||Ji.apply(void 0,[Tr].concat(Oe))},dr;typeof dn=="string"?dr=dn:typeof dn=="function"&&(dr=dn(Me,Qe,It));var Pr=re(pn);return(0,$t.Z)((0,$t.Z)({},vn),{},{columnsKey:Pr,nestExpandable:gi,expanded:cn,hasNestChildren:ri,record:Me,onTriggerExpand:Ui,rowSupportExpand:Vn,expandable:qn,rowProps:(0,$t.Z)((0,$t.Z)({},nr),{},{className:$e()(dr,nr==null?void 0:nr.className),onClick:fr})})}function di(Me){var an=Me.prefixCls,Qe=Me.children,It=Me.component,vn=Me.cellComponent,pn=Me.className,Qn=Me.expanded,zn=Me.colSpan,jn=Me.isEmpty,Ge=ce(Mt,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),fn=Ge.scrollbarSize,Fn=Ge.fixHeader,Sn=Ge.fixColumn,dn=Ge.componentWidth,gi=Ge.horizonScroll,Vn=Qe;return(jn?gi&&dn:Sn)&&(Vn=Rt.createElement("div",{style:{width:dn-(Fn&&!jn?fn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(an,"-expanded-row-fixed")},Vn)),Rt.createElement(It,{className:pn,style:{display:Qn?null:"none"}},Rt.createElement(Ee,{component:vn,prefixCls:an,colSpan:zn},Vn))}var xi=di;function Ei(Me){var an=Me.prefixCls,Qe=Me.record,It=Me.onExpand,vn=Me.expanded,pn=Me.expandable,Qn="".concat(an,"-row-expand-icon");if(!pn)return Rt.createElement("span",{className:$e()(Qn,"".concat(an,"-row-spaced"))});var zn=function(Ge){It(Qe,Ge),Ge.stopPropagation()};return Rt.createElement("span",{className:$e()(Qn,(0,Pe.Z)((0,Pe.Z)({},"".concat(an,"-row-expanded"),vn),"".concat(an,"-row-collapsed"),!vn)),onClick:zn})}function ar(Me,an,Qe){var It=[];function vn(pn){(pn||[]).forEach(function(Qn,zn){It.push(an(Qn,zn)),vn(Qn[Qe])})}return vn(Me),It}function Qi(Me,an,Qe,It){return typeof Me=="string"?Me:typeof Me=="function"?Me(an,Qe,It):""}function Oi(Me,an,Qe,It,vn){var pn=Me.record,Qn=Me.prefixCls,zn=Me.columnsKey,jn=Me.fixedInfoList,Ge=Me.expandIconColumnIndex,fn=Me.nestExpandable,Fn=Me.indentSize,Sn=Me.expandIcon,dn=Me.expanded,gi=Me.hasNestChildren,Vn=Me.onTriggerExpand,qn=zn[Qe],cn=jn[Qe],ri;Qe===(Ge||0)&&fn&&(ri=Rt.createElement(Rt.Fragment,null,Rt.createElement("span",{style:{paddingLeft:"".concat(Fn*It,"px")},className:"".concat(Qn,"-row-indent indent-level-").concat(It)}),Sn({prefixCls:Qn,expanded:dn,expandable:gi,record:pn,onExpand:Vn})));var Ui;return an.onCell&&(Ui=an.onCell(pn,vn)),{key:qn,fixedInfo:cn,appendCellNode:ri,additionalCellProps:Ui||{}}}function Yi(Me){var an=Me.className,Qe=Me.style,It=Me.record,vn=Me.index,pn=Me.renderIndex,Qn=Me.rowKey,zn=Me.indent,jn=zn===void 0?0:zn,Ge=Me.rowComponent,fn=Me.cellComponent,Fn=Me.scopeCellComponent,Sn=Ri(It,Qn,vn,jn),dn=Sn.prefixCls,gi=Sn.flattenColumns,Vn=Sn.expandedRowClassName,qn=Sn.expandedRowRender,cn=Sn.rowProps,ri=Sn.expanded,Ui=Sn.rowSupportExpand,nr=Rt.useRef(!1);nr.current||(nr.current=ri);var Ji=Qi(Vn,It,vn,jn),fr=Rt.createElement(Ge,(0,Wt.Z)({},cn,{"data-row-key":Qn,className:$e()(an,"".concat(dn,"-row"),"".concat(dn,"-row-level-").concat(jn),cn==null?void 0:cn.className,(0,Pe.Z)({},Ji,jn>=1)),style:(0,$t.Z)((0,$t.Z)({},Qe),cn==null?void 0:cn.style)}),gi.map(function(Gr,Tr){var ro=Gr.render,Oe=Gr.dataIndex,gr=Gr.className,Dr=Oi(Sn,Gr,Tr,jn,vn),tr=Dr.key,Ur=Dr.fixedInfo,or=Dr.appendCellNode,vo=Dr.additionalCellProps;return Rt.createElement(Ee,(0,Wt.Z)({className:gr,ellipsis:Gr.ellipsis,align:Gr.align,scope:Gr.rowScope,component:Gr.rowScope?Fn:fn,prefixCls:dn,key:tr,record:It,index:vn,renderIndex:pn,dataIndex:Oe,render:ro,shouldCellUpdate:Gr.shouldCellUpdate},Ur,{appendNode:or,additionalProps:vo}))})),dr;if(Ui&&(nr.current||ri)){var Pr=qn(It,vn,jn+1,ri);dr=Rt.createElement(xi,{expanded:ri,className:$e()("".concat(dn,"-expanded-row"),"".concat(dn,"-expanded-row-level-").concat(jn+1),Ji),prefixCls:dn,component:Ge,cellComponent:fn,colSpan:gi.length,isEmpty:!1},Pr)}return Rt.createElement(Rt.Fragment,null,fr,dr)}var Hr=ct(Yi);function Xi(Me){var an=Me.columnKey,Qe=Me.onColumnResize,It=Rt.useRef();return Rt.useEffect(function(){It.current&&Qe(an,It.current.offsetWidth)},[]),Rt.createElement(ve.Z,{data:an},Rt.createElement("td",{ref:It,style:{padding:0,border:0,height:0}},Rt.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function Fr(Me){var an=Me.prefixCls,Qe=Me.columnsKey,It=Me.onColumnResize;return Rt.createElement("tr",{"aria-hidden":"true",className:"".concat(an,"-measure-row"),style:{height:0,fontSize:0}},Rt.createElement(ve.Z.Collection,{onBatchResize:function(pn){pn.forEach(function(Qn){var zn=Qn.data,jn=Qn.size;It(zn,jn.offsetWidth)})}},Qe.map(function(vn){return Rt.createElement(Xi,{key:vn,columnKey:vn,onColumnResize:It})})))}function mr(Me){var an=Me.data,Qe=Me.measureColumnWidth,It=ce(Mt,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),vn=It.prefixCls,pn=It.getComponent,Qn=It.onColumnResize,zn=It.flattenColumns,jn=It.getRowKey,Ge=It.expandedKeys,fn=It.childrenColumnName,Fn=It.emptyNode,Sn=gn(an,fn,Ge,jn),dn=Rt.useRef({renderWithProps:!1}),gi=pn(["body","wrapper"],"tbody"),Vn=pn(["body","row"],"tr"),qn=pn(["body","cell"],"td"),cn=pn(["body","cell"],"th"),ri;an.length?ri=Sn.map(function(nr,Ji){var fr=nr.record,dr=nr.indent,Pr=nr.index,Gr=jn(fr,Ji);return Rt.createElement(Hr,{key:Gr,rowKey:Gr,record:fr,index:Ji,renderIndex:Pr,rowComponent:Vn,cellComponent:qn,scopeCellComponent:cn,indent:dr})}):ri=Rt.createElement(xi,{expanded:!0,className:"".concat(vn,"-placeholder"),prefixCls:vn,component:Vn,cellComponent:qn,colSpan:zn.length,isEmpty:!0},Fn);var Ui=re(zn);return Rt.createElement($n.Provider,{value:dn.current},Rt.createElement(gi,{className:"".concat(vn,"-tbody")},Qe&&Rt.createElement(Fr,{prefixCls:vn,columnsKey:Ui,onColumnResize:Qn}),ri))}var Yr=ct(mr),ji=Ot(90494),co=["columnType"];function fo(Me){for(var an=Me.colWidths,Qe=Me.columns,It=Me.columCount,vn=ce(Mt,["tableLayout"]),pn=vn.tableLayout,Qn=[],zn=It||Qe.length,jn=!1,Ge=zn-1;Ge>=0;Ge-=1){var fn=an[Ge],Fn=Qe&&Qe[Ge],Sn=void 0,dn=void 0;if(Fn&&(Sn=Fn[ji.v],pn==="auto"&&(dn=Fn.minWidth)),fn||dn||Sn||jn){var gi=Sn||{},Vn=gi.columnType,qn=(0,mt.Z)(gi,co);Qn.unshift(Rt.createElement("col",(0,Wt.Z)({key:Ge,style:{width:fn,minWidth:dn}},qn))),jn=!0}}return Rt.createElement("colgroup",null,Qn)}var Xr=fo,Er=Ot(80702),Zr=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function bt(Me,an){return(0,Rt.useMemo)(function(){for(var Qe=[],It=0;It<an;It+=1){var vn=Me[It];if(vn!==void 0)Qe[It]=vn;else return null}return Qe},[Me.join("_"),an])}var Br=Rt.forwardRef(function(Me,an){var Qe=Me.className,It=Me.noData,vn=Me.columns,pn=Me.flattenColumns,Qn=Me.colWidths,zn=Me.columCount,jn=Me.stickyOffsets,Ge=Me.direction,fn=Me.fixHeader,Fn=Me.stickyTopOffset,Sn=Me.stickyBottomOffset,dn=Me.stickyClassName,gi=Me.onScroll,Vn=Me.maxContentScroll,qn=Me.children,cn=(0,mt.Z)(Me,Zr),ri=ce(Mt,["prefixCls","scrollbarSize","isSticky","getComponent"]),Ui=ri.prefixCls,nr=ri.scrollbarSize,Ji=ri.isSticky,fr=ri.getComponent,dr=fr(["header","table"],"table"),Pr=Ji&&!fn?0:nr,Gr=Rt.useRef(null),Tr=Rt.useCallback(function(vo){(0,Ne.mH)(an,vo),(0,Ne.mH)(Gr,vo)},[]);Rt.useEffect(function(){var vo;function qr(Nr){var ho=Nr,ks=ho.currentTarget,ls=ho.deltaX;ls&&(gi({currentTarget:ks,scrollLeft:ks.scrollLeft+ls}),Nr.preventDefault())}return(vo=Gr.current)===null||vo===void 0||vo.addEventListener("wheel",qr,{passive:!1}),function(){var Nr;(Nr=Gr.current)===null||Nr===void 0||Nr.removeEventListener("wheel",qr)}},[]);var ro=Rt.useMemo(function(){return pn.every(function(vo){return vo.width})},[pn]),Oe=pn[pn.length-1],gr={fixed:Oe?Oe.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Ui,"-cell-scrollbar")}}},Dr=(0,Rt.useMemo)(function(){return Pr?[].concat((0,Er.Z)(vn),[gr]):vn},[Pr,vn]),tr=(0,Rt.useMemo)(function(){return Pr?[].concat((0,Er.Z)(pn),[gr]):pn},[Pr,pn]),Ur=(0,Rt.useMemo)(function(){var vo=jn.right,qr=jn.left;return(0,$t.Z)((0,$t.Z)({},jn),{},{left:Ge==="rtl"?[].concat((0,Er.Z)(qr.map(function(Nr){return Nr+Pr})),[0]):qr,right:Ge==="rtl"?vo:[].concat((0,Er.Z)(vo.map(function(Nr){return Nr+Pr})),[0]),isSticky:Ji})},[Pr,jn,Ji]),or=bt(Qn,zn);return Rt.createElement("div",{style:(0,$t.Z)({overflow:"hidden"},Ji?{top:Fn,bottom:Sn}:{}),ref:Tr,className:$e()(Qe,(0,Pe.Z)({},dn,!!dn))},Rt.createElement(dr,{style:{tableLayout:"fixed",visibility:It||or?null:"hidden"}},(!It||!Vn||ro)&&Rt.createElement(Xr,{colWidths:or?[].concat((0,Er.Z)(or),[Pr]):[],columCount:zn+1,columns:tr}),qn((0,$t.Z)((0,$t.Z)({},cn),{},{stickyOffsets:Ur,columns:Dr,flattenColumns:tr}))))}),Vi=Rt.memo(Br),Vr=function(an){var Qe=an.cells,It=an.stickyOffsets,vn=an.flattenColumns,pn=an.rowComponent,Qn=an.cellComponent,zn=an.onHeaderRow,jn=an.index,Ge=ce(Mt,["prefixCls","direction"]),fn=Ge.prefixCls,Fn=Ge.direction,Sn;zn&&(Sn=zn(Qe.map(function(gi){return gi.column}),jn));var dn=re(Qe.map(function(gi){return gi.column}));return Rt.createElement(pn,Sn,Qe.map(function(gi,Vn){var qn=gi.column,cn=ci(gi.colStart,gi.colEnd,vn,It,Fn),ri;return qn&&qn.onHeaderCell&&(ri=gi.column.onHeaderCell(qn)),Rt.createElement(Ee,(0,Wt.Z)({},gi,{scope:qn.title?gi.colSpan>1?"colgroup":"col":null,ellipsis:qn.ellipsis,align:qn.align,component:Qn,prefixCls:fn,key:dn[Vn]},cn,{additionalProps:ri,rowType:"header"}))}))},Do=Vr;function bo(Me){var an=[];function Qe(Qn,zn){var jn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;an[jn]=an[jn]||[];var Ge=zn,fn=Qn.filter(Boolean).map(function(Fn){var Sn={key:Fn.key,className:Fn.className||"",children:Fn.title,column:Fn,colStart:Ge},dn=1,gi=Fn.children;return gi&&gi.length>0&&(dn=Qe(gi,Ge,jn+1).reduce(function(Vn,qn){return Vn+qn},0),Sn.hasSubColumns=!0),"colSpan"in Fn&&(dn=Fn.colSpan),"rowSpan"in Fn&&(Sn.rowSpan=Fn.rowSpan),Sn.colSpan=dn,Sn.colEnd=Sn.colStart+dn-1,an[jn].push(Sn),Ge+=dn,dn});return fn}Qe(Me,0);for(var It=an.length,vn=function(zn){an[zn].forEach(function(jn){!("rowSpan"in jn)&&!jn.hasSubColumns&&(jn.rowSpan=It-zn)})},pn=0;pn<It;pn+=1)vn(pn);return an}var $o=function(an){var Qe=an.stickyOffsets,It=an.columns,vn=an.flattenColumns,pn=an.onHeaderRow,Qn=ce(Mt,["prefixCls","getComponent"]),zn=Qn.prefixCls,jn=Qn.getComponent,Ge=Rt.useMemo(function(){return bo(It)},[It]),fn=jn(["header","wrapper"],"thead"),Fn=jn(["header","row"],"tr"),Sn=jn(["header","cell"],"th");return Rt.createElement(fn,{className:"".concat(zn,"-thead")},Ge.map(function(dn,gi){var Vn=Rt.createElement(Do,{key:gi,flattenColumns:vn,cells:dn,stickyOffsets:Qe,rowComponent:Fn,cellComponent:Sn,onHeaderRow:pn,index:gi});return Vn}))},Zi=ct($o),wi=Ot(78612);function je(Me,an,Qe){var It=(0,ji.g)(Me),vn=It.expandIcon,pn=It.expandedRowKeys,Qn=It.defaultExpandedRowKeys,zn=It.defaultExpandAllRows,jn=It.expandedRowRender,Ge=It.onExpand,fn=It.onExpandedRowsChange,Fn=It.childrenColumnName,Sn=vn||Ei,dn=Fn||"children",gi=Rt.useMemo(function(){return jn?"row":Me.expandable&&Me.internalHooks===Pt.R&&Me.expandable.__PARENT_RENDER_ICON__||an.some(function(Ji){return Ji&&(0,Zt.Z)(Ji)==="object"&&Ji[dn]})?"nest":!1},[!!jn,an]),Vn=Rt.useState(function(){return Qn||(zn?ar(an,Qe,dn):[])}),qn=(0,te.Z)(Vn,2),cn=qn[0],ri=qn[1],Ui=Rt.useMemo(function(){return new Set(pn||cn||[])},[pn,cn]),nr=Rt.useCallback(function(Ji){var fr=Qe(Ji,an.indexOf(Ji)),dr,Pr=Ui.has(fr);Pr?(Ui.delete(fr),dr=(0,Er.Z)(Ui)):dr=[].concat((0,Er.Z)(Ui),[fr]),ri(dr),Ge&&Ge(!Pr,Ji),fn&&fn(dr)},[Qe,Ui,an,Ge,fn]);return[It,gi,Ui,Sn,dn,nr]}function He(Me,an,Qe){var It=Me.map(function(vn,pn){return ci(pn,pn,Me,an,Qe)});return(0,tn.Z)(function(){return It},[It],function(vn,pn){return!(0,de.Z)(vn,pn)})}function Ue(Me){var an=(0,Rt.useRef)(Me),Qe=(0,Rt.useState)({}),It=(0,te.Z)(Qe,2),vn=It[1],pn=(0,Rt.useRef)(null),Qn=(0,Rt.useRef)([]);function zn(jn){Qn.current.push(jn);var Ge=Promise.resolve();pn.current=Ge,Ge.then(function(){if(pn.current===Ge){var fn=Qn.current,Fn=an.current;Qn.current=[],fn.forEach(function(Sn){an.current=Sn(an.current)}),pn.current=null,Fn!==an.current&&vn({})}})}return(0,Rt.useEffect)(function(){return function(){pn.current=null}},[]),[an.current,zn]}function fi(Me){var an=(0,Rt.useRef)(Me||null),Qe=(0,Rt.useRef)();function It(){window.clearTimeout(Qe.current)}function vn(Qn){an.current=Qn,It(),Qe.current=window.setTimeout(function(){an.current=null,Qe.current=void 0},100)}function pn(){return an.current}return(0,Rt.useEffect)(function(){return It},[]),[vn,pn]}function Se(){var Me=Rt.useState(-1),an=(0,te.Z)(Me,2),Qe=an[0],It=an[1],vn=Rt.useState(-1),pn=(0,te.Z)(vn,2),Qn=pn[0],zn=pn[1],jn=Rt.useCallback(function(Ge,fn){It(Ge),zn(fn)},[]);return[Qe,Qn,jn]}var _i=Ot(47273),Un=(0,_i.Z)()?window:null;function Ai(Me,an){var Qe=(0,Zt.Z)(Me)==="object"?Me:{},It=Qe.offsetHeader,vn=It===void 0?0:It,pn=Qe.offsetSummary,Qn=pn===void 0?0:pn,zn=Qe.offsetScroll,jn=zn===void 0?0:zn,Ge=Qe.getContainer,fn=Ge===void 0?function(){return Un}:Ge,Fn=fn()||Un,Sn=!!Me;return Rt.useMemo(function(){return{isSticky:Sn,stickyClassName:Sn?"".concat(an,"-sticky-holder"):"",offsetHeader:vn,offsetSummary:Qn,offsetScroll:jn,container:Fn}},[Sn,jn,vn,Qn,an,Fn])}function We(Me,an,Qe){var It=(0,Rt.useMemo)(function(){var vn=an.length,pn=function(Ge,fn,Fn){for(var Sn=[],dn=0,gi=Ge;gi!==fn;gi+=Fn)Sn.push(dn),an[gi].fixed&&(dn+=Me[gi]||0);return Sn},Qn=pn(0,vn,1),zn=pn(vn-1,-1,-1).reverse();return Qe==="rtl"?{left:zn,right:Qn}:{left:Qn,right:zn}},[Me,an,Qe]);return It}var Ke=We;function ui(Me){var an=Me.className,Qe=Me.children;return Rt.createElement("div",{className:an},Qe)}var he=ui,rn=Ot(8224),Wn=Ot(16089),pi=Ot(76846);function on(Me){var an=(0,pi.bn)(Me),Qe=an.getBoundingClientRect(),It=document.documentElement;return{left:Qe.left+(window.pageXOffset||It.scrollLeft)-(It.clientLeft||document.body.clientLeft||0),top:Qe.top+(window.pageYOffset||It.scrollTop)-(It.clientTop||document.body.clientTop||0)}}var yn=function(an,Qe){var It,vn,pn=an.scrollBodyRef,Qn=an.onScroll,zn=an.offsetScroll,jn=an.container,Ge=an.direction,fn=ce(Mt,"prefixCls"),Fn=((It=pn.current)===null||It===void 0?void 0:It.scrollWidth)||0,Sn=((vn=pn.current)===null||vn===void 0?void 0:vn.clientWidth)||0,dn=Fn&&Sn*(Sn/Fn),gi=Rt.useRef(),Vn=Ue({scrollLeft:0,isHiddenScrollBar:!0}),qn=(0,te.Z)(Vn,2),cn=qn[0],ri=qn[1],Ui=Rt.useRef({delta:0,x:0}),nr=Rt.useState(!1),Ji=(0,te.Z)(nr,2),fr=Ji[0],dr=Ji[1],Pr=Rt.useRef(null);Rt.useEffect(function(){return function(){Wn.Z.cancel(Pr.current)}},[]);var Gr=function(){dr(!1)},Tr=function(tr){tr.persist(),Ui.current.delta=tr.pageX-cn.scrollLeft,Ui.current.x=0,dr(!0),tr.preventDefault()},ro=function(tr){var Ur,or=tr||((Ur=window)===null||Ur===void 0?void 0:Ur.event),vo=or.buttons;if(!fr||vo===0){fr&&dr(!1);return}var qr=Ui.current.x+tr.pageX-Ui.current.x-Ui.current.delta,Nr=Ge==="rtl";qr=Math.max(Nr?dn-Sn:0,Math.min(Nr?0:Sn-dn,qr));var ho=!Nr||Math.abs(qr)+Math.abs(dn)<Sn;ho&&(Qn({scrollLeft:qr/Sn*(Fn+2)}),Ui.current.x=tr.pageX)},Oe=function(){Wn.Z.cancel(Pr.current),Pr.current=(0,Wn.Z)(function(){if(pn.current){var tr=on(pn.current).top,Ur=tr+pn.current.offsetHeight,or=jn===window?document.documentElement.scrollTop+window.innerHeight:on(jn).top+jn.clientHeight;Ur-(0,nn.Z)()<=or||tr>=or-zn?ri(function(vo){return(0,$t.Z)((0,$t.Z)({},vo),{},{isHiddenScrollBar:!0})}):ri(function(vo){return(0,$t.Z)((0,$t.Z)({},vo),{},{isHiddenScrollBar:!1})})}})},gr=function(tr){ri(function(Ur){return(0,$t.Z)((0,$t.Z)({},Ur),{},{scrollLeft:tr/Fn*Sn||0})})};return Rt.useImperativeHandle(Qe,function(){return{setScrollLeft:gr,checkScrollBarVisible:Oe}}),Rt.useEffect(function(){var Dr=(0,rn.Z)(document.body,"mouseup",Gr,!1),tr=(0,rn.Z)(document.body,"mousemove",ro,!1);return Oe(),function(){Dr.remove(),tr.remove()}},[dn,fr]),Rt.useEffect(function(){if(pn.current){for(var Dr=[],tr=(0,pi.bn)(pn.current);tr;)Dr.push(tr),tr=tr.parentElement;return Dr.forEach(function(Ur){return Ur.addEventListener("scroll",Oe,!1)}),window.addEventListener("resize",Oe,!1),window.addEventListener("scroll",Oe,!1),jn.addEventListener("scroll",Oe,!1),function(){Dr.forEach(function(Ur){return Ur.removeEventListener("scroll",Oe)}),window.removeEventListener("resize",Oe),window.removeEventListener("scroll",Oe),jn.removeEventListener("scroll",Oe)}}},[jn]),Rt.useEffect(function(){cn.isHiddenScrollBar||ri(function(Dr){var tr=pn.current;return tr?(0,$t.Z)((0,$t.Z)({},Dr),{},{scrollLeft:tr.scrollLeft/tr.scrollWidth*tr.clientWidth}):Dr})},[cn.isHiddenScrollBar]),Fn<=Sn||!dn||cn.isHiddenScrollBar?null:Rt.createElement("div",{style:{height:(0,nn.Z)(),width:Sn,bottom:zn},className:"".concat(fn,"-sticky-scroll")},Rt.createElement("div",{onMouseDown:Tr,ref:gi,className:$e()("".concat(fn,"-sticky-scroll-bar"),(0,Pe.Z)({},"".concat(fn,"-sticky-scroll-bar-active"),fr)),style:{width:"".concat(dn,"px"),transform:"translate3d(".concat(cn.scrollLeft,"px, 0, 0)")}}))},ii=Rt.forwardRef(yn);function hn(Me){return null}var An=hn;function xn(Me){return null}var Nn=xn,ai="rc-table",Ki=[],Ni={};function Ti(){return"No Data"}function en(Me,an){var Qe=(0,$t.Z)({rowKey:"key",prefixCls:ai,emptyText:Ti},Me),It=Qe.prefixCls,vn=Qe.className,pn=Qe.rowClassName,Qn=Qe.style,zn=Qe.data,jn=Qe.rowKey,Ge=Qe.scroll,fn=Qe.tableLayout,Fn=Qe.direction,Sn=Qe.title,dn=Qe.footer,gi=Qe.summary,Vn=Qe.caption,qn=Qe.id,cn=Qe.showHeader,ri=Qe.components,Ui=Qe.emptyText,nr=Qe.onRow,Ji=Qe.onHeaderRow,fr=Qe.onScroll,dr=Qe.internalHooks,Pr=Qe.transformColumns,Gr=Qe.internalRefs,Tr=Qe.tailor,ro=Qe.getContainerWidth,Oe=Qe.sticky,gr=Qe.rowHoverable,Dr=gr===void 0?!0:gr,tr=zn||Ki,Ur=!!tr.length,or=dr===Pt.R,vo=Rt.useCallback(function(wo,Qo){return(0,Cn.Z)(ri,wo)||Qo},[ri]),qr=Rt.useMemo(function(){return typeof jn=="function"?jn:function(wo){var Qo=wo&&wo[jn];return Qo}},[jn]),Nr=vo(["body"]),ho=Se(),ks=(0,te.Z)(ho,3),ls=ks[0],la=ks[1],Is=ks[2],sr=je(Qe,tr,qr),Eo=(0,te.Z)(sr,6),os=Eo[0],Gi=Eo[1],Wi=Eo[2],ir=Eo[3],Kn=Eo[4],Ar=Eo[5],kr=Ge==null?void 0:Ge.x,xo=Rt.useState(0),Ts=(0,te.Z)(xo,2),ps=Ts[0],Cr=Ts[1],to=(0,wi.Z)((0,$t.Z)((0,$t.Z)((0,$t.Z)({},Qe),os),{},{expandable:!!os.expandedRowRender,columnTitle:os.columnTitle,expandedKeys:Wi,getRowKey:qr,onTriggerExpand:Ar,expandIcon:ir,expandIconColumnIndex:os.expandIconColumnIndex,direction:Fn,scrollWidth:or&&Tr&&typeof kr=="number"?kr:null,clientWidth:ps}),or?Pr:null),oo=(0,te.Z)(to,4),ts=oo[0],yo=oo[1],Vo=oo[2],zo=oo[3],Io=Vo!=null?Vo:kr,ys=Rt.useMemo(function(){return{columns:ts,flattenColumns:yo}},[ts,yo]),Wo=Rt.useRef(),Fl=Rt.useRef(),ao=Rt.useRef(),da=Rt.useRef();Rt.useImperativeHandle(an,function(){return{nativeElement:Wo.current,scrollTo:function(Qo){var Us;if(ao.current instanceof HTMLElement){var na=Qo.index,fa=Qo.top,Vu=Qo.key;if(li(fa)){var xu;(xu=ao.current)===null||xu===void 0||xu.scrollTo({top:fa})}else{var Wu,Hl=Vu!=null?Vu:qr(tr[na]);(Wu=ao.current.querySelector('[data-row-key="'.concat(Hl,'"]')))===null||Wu===void 0||Wu.scrollIntoView()}}else(Us=ao.current)!==null&&Us!==void 0&&Us.scrollTo&&ao.current.scrollTo(Qo)}}});var _a=Rt.useRef(),hl=Rt.useState(!1),Zo=(0,te.Z)(hl,2),Ta=Zo[0],$a=Zo[1],uA=Rt.useState(!1),Ku=(0,te.Z)(uA,2),ws=Ku[0],Gu=Ku[1],AA=Ue(new Map),wa=(0,te.Z)(AA,2),tl=wa[0],Gs=wa[1],es=re(yo),hs=es.map(function(wo){return tl.get(wo)}),js=Rt.useMemo(function(){return hs},[hs.join("_")]),Oo=Ke(js,yo,Fn),so=Ge&&Pn(Ge.y),mo=Ge&&Pn(Io)||!!os.fixed,Xs=mo&&yo.some(function(wo){var Qo=wo.fixed;return Qo}),xs=Rt.useRef(),ss=Ai(Oe,It),$i=ss.isSticky,cl=ss.offsetHeader,xe=ss.offsetSummary,On=ss.offsetScroll,su=ss.stickyClassName,hA=ss.container,as=Rt.useMemo(function(){return gi==null?void 0:gi(tr)},[gi,tr]),dl=(so||$i)&&Rt.isValidElement(as)&&as.type===Kt&&as.props.fixed,vu,cA,au;so&&(cA={overflowY:Ur?"scroll":"auto",maxHeight:Ge.y}),mo&&(vu={overflowX:"auto"},so||(cA={overflowY:"hidden"}),au={width:Io===!0?"auto":Io,minWidth:"100%"});var Ss=Rt.useCallback(function(wo,Qo){(0,ze.Z)(Wo.current)&&Gs(function(Us){if(Us.get(wo)!==Qo){var na=new Map(Us);return na.set(wo,Qo),na}return Us})},[]),_r=fi(null),xa=(0,te.Z)(_r,2),el=xa[0],ms=xa[1];function po(wo,Qo){Qo&&(typeof Qo=="function"?Qo(wo):Qo.scrollLeft!==wo&&(Qo.scrollLeft=wo,Qo.scrollLeft!==wo&&setTimeout(function(){Qo.scrollLeft=wo},0)))}var Bs=(0,Ae.Z)(function(wo){var Qo=wo.currentTarget,Us=wo.scrollLeft,na=Fn==="rtl",fa=typeof Us=="number"?Us:Qo.scrollLeft,Vu=Qo||Ni;if(!ms()||ms()===Vu){var xu;el(Vu),po(fa,Fl.current),po(fa,ao.current),po(fa,_a.current),po(fa,(xu=xs.current)===null||xu===void 0?void 0:xu.setScrollLeft)}var Wu=Qo||Fl.current;if(Wu){var Hl=or&&Tr&&typeof Io=="number"?Io:Wu.scrollWidth,Au=Wu.clientWidth;if(Hl===Au){$a(!1),Gu(!1);return}na?($a(-fa<Hl-Au),Gu(-fa>0)):($a(fa>0),Gu(fa<Hl-Au))}}),Na=(0,Ae.Z)(function(wo){Bs(wo),fr==null||fr(wo)}),ns=function(){if(mo&&ao.current){var Qo;Bs({currentTarget:(0,pi.bn)(ao.current),scrollLeft:(Qo=ao.current)===null||Qo===void 0?void 0:Qo.scrollLeft})}else $a(!1),Gu(!1)},nl=function(Qo){var Us,na=Qo.width;(Us=xs.current)===null||Us===void 0||Us.checkScrollBarVisible();var fa=Wo.current?Wo.current.offsetWidth:na;or&&ro&&Wo.current&&(fa=ro(Wo.current,fa)||fa),fa!==ps&&(ns(),Cr(fa))},Vs=Rt.useRef(!1);Rt.useEffect(function(){Vs.current&&ns()},[mo,zn,ts.length]),Rt.useEffect(function(){Vs.current=!0},[]);var zu=Rt.useState(0),Uo=(0,te.Z)(zu,2),ea=Uo[0],To=Uo[1],is=Rt.useState(!0),cs=(0,te.Z)(is,2),Ms=cs[0],_o=cs[1];Rt.useEffect(function(){(!Tr||!or)&&(ao.current instanceof Element?To((0,nn.o)(ao.current).width):To((0,nn.o)(da.current).width)),_o((0,De.G)("position","sticky"))},[]),Rt.useEffect(function(){or&&Gr&&(Gr.body.current=ao.current)});var dA=Rt.useCallback(function(wo){return Rt.createElement(Rt.Fragment,null,Rt.createElement(Zi,wo),dl==="top"&&Rt.createElement(ke,wo,as))},[dl,as]),Rr=Rt.useCallback(function(wo){return Rt.createElement(ke,wo,as)},[as]),ju=vo(["table"],"table"),Bo=Rt.useMemo(function(){return fn||(Xs?Io==="max-content"?"auto":"fixed":so||$i||yo.some(function(wo){var Qo=wo.ellipsis;return Qo})?"fixed":"auto")},[so,Xs,yo,fn,$i]),Oh,Xl={colWidths:js,columCount:yo.length,stickyOffsets:Oo,onHeaderRow:Ji,fixHeader:so,scroll:Ge},TA=Rt.useMemo(function(){return Ur?null:typeof Ui=="function"?Ui():Ui},[Ur,Ui]),Hh=Rt.createElement(Yr,{data:tr,measureColumnWidth:so||mo||$i}),ch=Rt.createElement(Xr,{colWidths:yo.map(function(wo){var Qo=wo.width;return Qo}),columns:yo}),lu=Vn!=null?Rt.createElement("caption",{className:"".concat(It,"-caption")},Vn):void 0,uu=(0,kn.Z)(Qe,{data:!0}),Ho=(0,kn.Z)(Qe,{aria:!0});if(so||$i){var Ol;typeof Nr=="function"?(Ol=Nr(tr,{scrollbarSize:ea,ref:ao,onScroll:Bs}),Xl.colWidths=yo.map(function(wo,Qo){var Us=wo.width,na=Qo===yo.length-1?Us-ea:Us;return typeof na=="number"&&!Number.isNaN(na)?na:0})):Ol=Rt.createElement("div",{style:(0,$t.Z)((0,$t.Z)({},vu),cA),onScroll:Na,ref:ao,className:$e()("".concat(It,"-body"))},Rt.createElement(ju,(0,Wt.Z)({style:(0,$t.Z)((0,$t.Z)({},au),{},{tableLayout:Bo})},Ho),lu,ch,Hh,!dl&&as&&Rt.createElement(ke,{stickyOffsets:Oo,flattenColumns:yo},as)));var dh=(0,$t.Z)((0,$t.Z)((0,$t.Z)({noData:!tr.length,maxContentScroll:mo&&Io==="max-content"},Xl),ys),{},{direction:Fn,stickyClassName:su,onScroll:Bs});Oh=Rt.createElement(Rt.Fragment,null,cn!==!1&&Rt.createElement(Vi,(0,Wt.Z)({},dh,{stickyTopOffset:cl,className:"".concat(It,"-header"),ref:Fl}),dA),Ol,dl&&dl!=="top"&&Rt.createElement(Vi,(0,Wt.Z)({},dh,{stickyBottomOffset:xe,className:"".concat(It,"-summary"),ref:_a}),Rr),$i&&ao.current&&ao.current instanceof Element&&Rt.createElement(ii,{ref:xs,offsetScroll:On,scrollBodyRef:ao,onScroll:Bs,container:hA,direction:Fn}))}else Oh=Rt.createElement("div",{style:(0,$t.Z)((0,$t.Z)({},vu),cA),className:$e()("".concat(It,"-content")),onScroll:Bs,ref:ao},Rt.createElement(ju,(0,Wt.Z)({style:(0,$t.Z)((0,$t.Z)({},au),{},{tableLayout:Bo})},Ho),lu,ch,cn!==!1&&Rt.createElement(Zi,(0,Wt.Z)({},Xl,ys)),Hh,as&&Rt.createElement(ke,{stickyOffsets:Oo,flattenColumns:yo},as)));var yu=Rt.createElement("div",(0,Wt.Z)({className:$e()(It,vn,(0,Pe.Z)((0,Pe.Z)((0,Pe.Z)((0,Pe.Z)((0,Pe.Z)((0,Pe.Z)((0,Pe.Z)((0,Pe.Z)((0,Pe.Z)((0,Pe.Z)({},"".concat(It,"-rtl"),Fn==="rtl"),"".concat(It,"-ping-left"),Ta),"".concat(It,"-ping-right"),ws),"".concat(It,"-layout-fixed"),fn==="fixed"),"".concat(It,"-fixed-header"),so),"".concat(It,"-fixed-column"),Xs),"".concat(It,"-fixed-column-gapped"),Xs&&zo),"".concat(It,"-scroll-horizontal"),mo),"".concat(It,"-has-fix-left"),yo[0]&&yo[0].fixed),"".concat(It,"-has-fix-right"),yo[yo.length-1]&&yo[yo.length-1].fixed==="right")),style:Qn,id:qn,ref:Wo},uu),Sn&&Rt.createElement(he,{className:"".concat(It,"-title")},Sn(tr)),Rt.createElement("div",{ref:da,className:"".concat(It,"-container")},Oh),dn&&Rt.createElement(he,{className:"".concat(It,"-footer")},dn(tr)));mo&&(yu=Rt.createElement(ve.Z,{onResize:nl},yu));var fA=He(yo,Oo,Fn),wu=Rt.useMemo(function(){return{scrollX:Io,prefixCls:It,getComponent:vo,scrollbarSize:ea,direction:Fn,fixedInfoList:fA,isSticky:$i,supportSticky:Ms,componentWidth:ps,fixHeader:so,fixColumn:Xs,horizonScroll:mo,tableLayout:Bo,rowClassName:pn,expandedRowClassName:os.expandedRowClassName,expandIcon:ir,expandableType:Gi,expandRowByClick:os.expandRowByClick,expandedRowRender:os.expandedRowRender,onTriggerExpand:Ar,expandIconColumnIndex:os.expandIconColumnIndex,indentSize:os.indentSize,allColumnsFixedLeft:yo.every(function(wo){return wo.fixed==="left"}),emptyNode:TA,columns:ts,flattenColumns:yo,onColumnResize:Ss,hoverStartRow:ls,hoverEndRow:la,onHover:Is,rowExpandable:os.rowExpandable,onRow:nr,getRowKey:qr,expandedKeys:Wi,childrenColumnName:Kn,rowHoverable:Dr}},[Io,It,vo,ea,Fn,fA,$i,Ms,ps,so,Xs,mo,Bo,pn,os.expandedRowClassName,ir,Gi,os.expandRowByClick,os.expandedRowRender,Ar,os.expandIconColumnIndex,os.indentSize,TA,ts,yo,Ss,ls,la,Is,os.rowExpandable,nr,qr,Wi,Kn,Dr]);return Rt.createElement(Mt.Provider,{value:wu},yu)}var br=Rt.forwardRef(en);function cr(Me){return at(br,Me)}var Kr=cr();Kr.EXPAND_COLUMN=Pt.w,Kr.INTERNAL_HOOKS=Pt.R,Kr.Column=An,Kr.ColumnGroup=Nn,Kr.Summary=Je;var Ze=Kr,ni=Ot(45680),Bi=ue(null),Hi=ue(null);function vi(Me,an,Qe){var It=an||1;return Qe[Me+It]-(Qe[Me]||0)}function ki(Me){var an=Me.rowInfo,Qe=Me.column,It=Me.colIndex,vn=Me.indent,pn=Me.index,Qn=Me.component,zn=Me.renderIndex,jn=Me.record,Ge=Me.style,fn=Me.className,Fn=Me.inverse,Sn=Me.getHeight,dn=Qe.render,gi=Qe.dataIndex,Vn=Qe.className,qn=Qe.width,cn=ce(Hi,["columnsOffset"]),ri=cn.columnsOffset,Ui=Oi(an,Qe,It,vn,pn),nr=Ui.key,Ji=Ui.fixedInfo,fr=Ui.appendCellNode,dr=Ui.additionalCellProps,Pr=dr.style,Gr=dr.colSpan,Tr=Gr===void 0?1:Gr,ro=dr.rowSpan,Oe=ro===void 0?1:ro,gr=It-1,Dr=vi(gr,Tr,ri),tr=Tr>1?qn-Dr:0,Ur=(0,$t.Z)((0,$t.Z)((0,$t.Z)({},Pr),Ge),{},{flex:"0 0 ".concat(Dr,"px"),width:"".concat(Dr,"px"),marginRight:tr,pointerEvents:"auto"}),or=Rt.useMemo(function(){return Fn?Oe<=1:Tr===0||Oe===0||Oe>1},[Oe,Tr,Fn]);or?Ur.visibility="hidden":Fn&&(Ur.height=Sn==null?void 0:Sn(Oe));var vo=or?function(){return null}:dn,qr={};return(Oe===0||Tr===0)&&(qr.rowSpan=1,qr.colSpan=1),Rt.createElement(Ee,(0,Wt.Z)({className:$e()(Vn,fn),ellipsis:Qe.ellipsis,align:Qe.align,scope:Qe.rowScope,component:Qn,prefixCls:an.prefixCls,key:nr,record:jn,index:pn,renderIndex:zn,dataIndex:gi,render:vo,shouldCellUpdate:Qe.shouldCellUpdate},Ji,{appendNode:fr,additionalProps:(0,$t.Z)((0,$t.Z)({},dr),{},{style:Ur},qr)}))}var er=ki,lr=["data","index","className","rowKey","style","extra","getHeight"],oe=Rt.forwardRef(function(Me,an){var Qe=Me.data,It=Me.index,vn=Me.className,pn=Me.rowKey,Qn=Me.style,zn=Me.extra,jn=Me.getHeight,Ge=(0,mt.Z)(Me,lr),fn=Qe.record,Fn=Qe.indent,Sn=Qe.index,dn=ce(Mt,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),gi=dn.scrollX,Vn=dn.flattenColumns,qn=dn.prefixCls,cn=dn.fixColumn,ri=dn.componentWidth,Ui=ce(Bi,["getComponent"]),nr=Ui.getComponent,Ji=Ri(fn,pn,It,Fn),fr=nr(["body","row"],"div"),dr=nr(["body","cell"],"div"),Pr=Ji.rowSupportExpand,Gr=Ji.expanded,Tr=Ji.rowProps,ro=Ji.expandedRowRender,Oe=Ji.expandedRowClassName,gr;if(Pr&&Gr){var Dr=ro(fn,It,Fn+1,Gr),tr=Qi(Oe,fn,It,Fn),Ur={};cn&&(Ur={style:(0,Pe.Z)({},"--virtual-width","".concat(ri,"px"))});var or="".concat(qn,"-expanded-row-cell");gr=Rt.createElement(fr,{className:$e()("".concat(qn,"-expanded-row"),"".concat(qn,"-expanded-row-level-").concat(Fn+1),tr)},Rt.createElement(Ee,{component:dr,prefixCls:qn,className:$e()(or,(0,Pe.Z)({},"".concat(or,"-fixed"),cn)),additionalProps:Ur},Dr))}var vo=(0,$t.Z)((0,$t.Z)({},Qn),{},{width:gi});zn&&(vo.position="absolute",vo.pointerEvents="none");var qr=Rt.createElement(fr,(0,Wt.Z)({},Tr,Ge,{"data-row-key":pn,ref:Pr?null:an,className:$e()(vn,"".concat(qn,"-row"),Tr==null?void 0:Tr.className,(0,Pe.Z)({},"".concat(qn,"-row-extra"),zn)),style:(0,$t.Z)((0,$t.Z)({},vo),Tr==null?void 0:Tr.style)}),Vn.map(function(Nr,ho){return Rt.createElement(er,{key:ho,component:dr,rowInfo:Ji,column:Nr,colIndex:ho,indent:Fn,index:It,renderIndex:Sn,record:fn,inverse:zn,getHeight:jn})}));return Pr?Rt.createElement("div",{ref:an},qr,gr):qr}),ae=ct(oe),ee=ae,Ye=Rt.forwardRef(function(Me,an){var Qe=Me.data,It=Me.onScroll,vn=ce(Mt,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),pn=vn.flattenColumns,Qn=vn.onColumnResize,zn=vn.getRowKey,jn=vn.expandedKeys,Ge=vn.prefixCls,fn=vn.childrenColumnName,Fn=vn.scrollX,Sn=vn.direction,dn=ce(Bi),gi=dn.sticky,Vn=dn.scrollY,qn=dn.listItemHeight,cn=dn.getComponent,ri=dn.onScroll,Ui=Rt.useRef(),nr=gn(Qe,fn,jn,zn),Ji=Rt.useMemo(function(){var gr=0;return pn.map(function(Dr){var tr=Dr.width,Ur=Dr.key;return gr+=tr,[Ur,tr,gr]})},[pn]),fr=Rt.useMemo(function(){return Ji.map(function(gr){return gr[2]})},[Ji]);Rt.useEffect(function(){Ji.forEach(function(gr){var Dr=(0,te.Z)(gr,2),tr=Dr[0],Ur=Dr[1];Qn(tr,Ur)})},[Ji]),Rt.useImperativeHandle(an,function(){var gr,Dr={scrollTo:function(Ur){var or;(or=Ui.current)===null||or===void 0||or.scrollTo(Ur)},nativeElement:(gr=Ui.current)===null||gr===void 0?void 0:gr.nativeElement};return Object.defineProperty(Dr,"scrollLeft",{get:function(){var Ur;return((Ur=Ui.current)===null||Ur===void 0?void 0:Ur.getScrollInfo().x)||0},set:function(Ur){var or;(or=Ui.current)===null||or===void 0||or.scrollTo({left:Ur})}}),Dr});var dr=function(Dr,tr){var Ur,or=(Ur=nr[tr])===null||Ur===void 0?void 0:Ur.record,vo=Dr.onCell;if(vo){var qr,Nr=vo(or,tr);return(qr=Nr==null?void 0:Nr.rowSpan)!==null&&qr!==void 0?qr:1}return 1},Pr=function(Dr){var tr=Dr.start,Ur=Dr.end,or=Dr.getSize,vo=Dr.offsetY;if(Ur<0)return null;for(var qr=pn.filter(function(ir){return dr(ir,tr)===0}),Nr=tr,ho=function(Kn){if(qr=qr.filter(function(Ar){return dr(Ar,Kn)===0}),!qr.length)return Nr=Kn,1},ks=tr;ks>=0&&!ho(ks);ks-=1);for(var ls=pn.filter(function(ir){return dr(ir,Ur)!==1}),la=Ur,Is=function(Kn){if(ls=ls.filter(function(Ar){return dr(Ar,Kn)!==1}),!ls.length)return la=Math.max(Kn-1,Ur),1},sr=Ur;sr<nr.length&&!Is(sr);sr+=1);for(var Eo=[],os=function(Kn){var Ar=nr[Kn];if(!Ar)return 1;pn.some(function(kr){return dr(kr,Kn)>1})&&Eo.push(Kn)},Gi=Nr;Gi<=la;Gi+=1)os(Gi);var Wi=Eo.map(function(ir){var Kn=nr[ir],Ar=zn(Kn.record,ir),kr=function(ps){var Cr=ir+ps-1,to=zn(nr[Cr].record,Cr),oo=or(Ar,to);return oo.bottom-oo.top},xo=or(Ar);return Rt.createElement(ee,{key:ir,data:Kn,rowKey:Ar,index:ir,style:{top:-vo+xo.top},extra:!0,getHeight:kr})});return Wi},Gr=Rt.useMemo(function(){return{columnsOffset:fr}},[fr]),Tr="".concat(Ge,"-tbody"),ro=cn(["body","wrapper"]),Oe={};return gi&&(Oe.position="sticky",Oe.bottom=0,(0,Zt.Z)(gi)==="object"&&gi.offsetScroll&&(Oe.bottom=gi.offsetScroll)),Rt.createElement(Hi.Provider,{value:Gr},Rt.createElement(ni.Z,{fullHeight:!1,ref:Ui,prefixCls:"".concat(Tr,"-virtual"),styles:{horizontalScrollBar:Oe},className:Tr,height:Vn,itemHeight:qn||24,data:nr,itemKey:function(Dr){return zn(Dr.record)},component:ro,scrollWidth:Fn,direction:Sn,onVirtualScroll:function(Dr){var tr,Ur=Dr.x;It({currentTarget:(tr=Ui.current)===null||tr===void 0?void 0:tr.nativeElement,scrollLeft:Ur})},onScroll:ri,extraRender:Pr},function(gr,Dr,tr){var Ur=zn(gr.record,Dr);return Rt.createElement(ee,{data:gr,rowKey:Ur,index:Dr,style:tr.style})}))}),Be=ct(Ye),ln=Be,Dn=function(an,Qe){var It=Qe.ref,vn=Qe.onScroll;return Rt.createElement(ln,{ref:It,data:an,onScroll:vn})};function Zn(Me,an){var Qe=Me.data,It=Me.columns,vn=Me.scroll,pn=Me.sticky,Qn=Me.prefixCls,zn=Qn===void 0?ai:Qn,jn=Me.className,Ge=Me.listItemHeight,fn=Me.components,Fn=Me.onScroll,Sn=vn||{},dn=Sn.x,gi=Sn.y;typeof dn!="number"&&(dn=1),typeof gi!="number"&&(gi=500);var Vn=(0,Fi.zX)(function(ri,Ui){return(0,Cn.Z)(fn,ri)||Ui}),qn=(0,Fi.zX)(Fn),cn=Rt.useMemo(function(){return{sticky:pn,scrollY:gi,listItemHeight:Ge,getComponent:Vn,onScroll:qn}},[pn,gi,Ge,Vn,qn]);return Rt.createElement(Bi.Provider,{value:cn},Rt.createElement(Ze,(0,Wt.Z)({},Me,{className:$e()(jn,"".concat(zn,"-virtual")),scroll:(0,$t.Z)((0,$t.Z)({},vn),{},{x:dn}),components:(0,$t.Z)((0,$t.Z)({},fn),{},{body:Qe!=null&&Qe.length?Dn:void 0}),columns:It,internalHooks:Pt.R,tailor:!0,ref:an})))}var Li=Rt.forwardRef(Zn);function Mi(Me){return at(Li,Me)}var Te=Mi(),yi=null},90494:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{g:function(){return Rt},v:function(){return de}});var Pt=Ot(77321),te=Ot(74416),Ae=Ot(48736),Ce=["expandable"],de="RC_TABLE_INTERNAL_COL_DEFINE";function Rt(ne){var ue=ne.expandable,ce=(0,te.Z)(ne,Ce),Wt;return"expandable"in ne?Wt=(0,Pt.Z)((0,Pt.Z)({},ce),ue):Wt=ce,Wt.showExpandColumn===!1&&(Wt.expandIconColumnIndex=-1),Wt}},22711:function(Bn,Ve,Ot){"use strict";Ot.r(Ve),Ot.d(Ve,{ResizableTextArea:function(){return me},default:function(){return Tn}});var Pt=Ot(72308),te=Ot(49618),Ae=Ot(77321),Ce=Ot(80702),de=Ot(52487),Rt=Ot(74416),ne=Ot(92310),ue=Ot.n(ne),ce=Ot(36901),Wt=Ot(66003),Ne=Ot(30292),qt=Ot(18929),Le=Ot(59301),Ut=Ot(62853),nt=Ot(29301),et=Ot(34280),At=Ot(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;
|
|
|
`,ct=["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"],pt={},xt;function Mt(In){var $n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ln=In.getAttribute("id")||In.getAttribute("data-reactid")||In.getAttribute("name");if($n&&pt[Ln])return pt[Ln];var be=window.getComputedStyle(In),re=be.getPropertyValue("box-sizing")||be.getPropertyValue("-moz-box-sizing")||be.getPropertyValue("-webkit-box-sizing"),Pn=parseFloat(be.getPropertyValue("padding-bottom"))+parseFloat(be.getPropertyValue("padding-top")),li=parseFloat(be.getPropertyValue("border-bottom-width"))+parseFloat(be.getPropertyValue("border-top-width")),Jn=ct.map(function(Yn){return"".concat(Yn,":").concat(be.getPropertyValue(Yn))}).join(";"),un={sizingStyle:Jn,paddingSize:Pn,borderSize:li,boxSizing:re};return $n&&Ln&&(pt[Ln]=un),un}function _t(In){var $n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ln=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,be=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)),In.getAttribute("wrap")?xt.setAttribute("wrap",In.getAttribute("wrap")):xt.removeAttribute("wrap");var re=Mt(In,$n),Pn=re.paddingSize,li=re.borderSize,Jn=re.boxSizing,un=re.sizingStyle;xt.setAttribute("style","".concat(un,";").concat(at)),xt.value=In.value||In.placeholder||"";var Yn=void 0,si=void 0,Fi,sn=xt.scrollHeight;if(Jn==="border-box"?sn+=li:Jn==="content-box"&&(sn-=Pn),Ln!==null||be!==null){xt.value=" ";var oi=xt.scrollHeight-Pn;Ln!==null&&(Yn=oi*Ln,Jn==="border-box"&&(Yn=Yn+Pn+li),sn=Math.max(Yn,sn)),be!==null&&(si=oi*be,Jn==="border-box"&&(si=si+Pn+li),Fi=sn>si?"":"hidden",sn=Math.min(si,sn))}var Ee={height:sn,overflowY:Fi,resize:"none"};return Yn&&(Ee.minHeight=Yn),si&&(Ee.maxHeight=si),Ee}var Qt=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Vt=0,Zt=1,$t=2,Pe=Le.forwardRef(function(In,$n){var Ln=In,be=Ln.prefixCls,re=Ln.defaultValue,Pn=Ln.value,li=Ln.autoSize,Jn=Ln.onResize,un=Ln.className,Yn=Ln.style,si=Ln.disabled,Fi=Ln.onChange,sn=Ln.onInternalAutoSize,oi=(0,Rt.Z)(Ln,Qt),Ee=(0,qt.Z)(re,{value:Pn,postState:function(Yi){return Yi!=null?Yi:""}}),ci=(0,de.Z)(Ee,2),Pi=ci[0],Ht=ci[1],kt=function(Yi){Ht(Yi.target.value),Fi==null||Fi(Yi)},mt=Le.useRef();Le.useImperativeHandle($n,function(){return{textArea:mt.current}});var vt=Le.useMemo(function(){return li&&(0,Ut.Z)(li)==="object"?[li.minRows,li.maxRows]:[]},[li]),Lt=(0,de.Z)(vt,2),Bt=Lt[0],Kt=Lt[1],ge=!!li,ke=function(){try{if(document.activeElement===mt.current){var Yi=mt.current,Hr=Yi.selectionStart,Xi=Yi.selectionEnd,Fr=Yi.scrollTop;mt.current.setSelectionRange(Hr,Xi),mt.current.scrollTop=Fr}}catch(mr){}},Je=Le.useState($t),ve=(0,de.Z)(Je,2),ze=ve[0],De=ve[1],nn=Le.useState(),kn=(0,de.Z)(nn,2),Gn=kn[0],gn=kn[1],Ri=function(){De(Vt)};(0,et.Z)(function(){ge&&Ri()},[Pn,Bt,Kt,ge]),(0,et.Z)(function(){if(ze===Vt)De(Zt);else if(ze===Zt){var Oi=_t(mt.current,!1,Bt,Kt);De($t),gn(Oi)}else ke()},[ze]);var di=Le.useRef(),xi=function(){At.Z.cancel(di.current)},Ei=function(Yi){ze===$t&&(Jn==null||Jn(Yi),li&&(xi(),di.current=(0,At.Z)(function(){Ri()})))};Le.useEffect(function(){return xi},[]);var ar=ge?Gn:null,Qi=(0,Ae.Z)((0,Ae.Z)({},Yn),ar);return(ze===Vt||ze===Zt)&&(Qi.overflowY="hidden",Qi.overflowX="hidden"),Le.createElement(nt.Z,{onResize:Ei,disabled:!(li||Jn)},Le.createElement("textarea",(0,Pt.Z)({},oi,{ref:mt,style:Qi,className:ue()(be,un,(0,te.Z)({},"".concat(be,"-disabled"),si)),disabled:si,value:Pi,onChange:kt})))}),me=Pe,$e=["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"],tn=Le.forwardRef(function(In,$n){var Ln,be=In.defaultValue,re=In.value,Pn=In.onFocus,li=In.onBlur,Jn=In.onChange,un=In.allowClear,Yn=In.maxLength,si=In.onCompositionStart,Fi=In.onCompositionEnd,sn=In.suffix,oi=In.prefixCls,Ee=oi===void 0?"rc-textarea":oi,ci=In.showCount,Pi=In.count,Ht=In.className,kt=In.style,mt=In.disabled,vt=In.hidden,Lt=In.classNames,Bt=In.styles,Kt=In.onResize,ge=In.onClear,ke=In.onPressEnter,Je=In.readOnly,ve=In.autoSize,ze=In.onKeyDown,De=(0,Rt.Z)(In,$e),nn=(0,qt.Z)(be,{value:re,defaultValue:be}),kn=(0,de.Z)(nn,2),Gn=kn[0],gn=kn[1],Ri=Gn==null?"":String(Gn),di=Le.useState(!1),xi=(0,de.Z)(di,2),Ei=xi[0],ar=xi[1],Qi=Le.useRef(!1),Oi=Le.useState(null),Yi=(0,de.Z)(Oi,2),Hr=Yi[0],Xi=Yi[1],Fr=(0,Le.useRef)(null),mr=(0,Le.useRef)(null),Yr=function(){var We;return(We=mr.current)===null||We===void 0?void 0:We.textArea},ji=function(){Yr().focus()};(0,Le.useImperativeHandle)($n,function(){var Ai;return{resizableTextArea:mr.current,focus:ji,blur:function(){Yr().blur()},nativeElement:((Ai=Fr.current)===null||Ai===void 0?void 0:Ai.nativeElement)||Yr()}}),(0,Le.useEffect)(function(){ar(function(Ai){return!mt&&Ai})},[mt]);var co=Le.useState(null),fo=(0,de.Z)(co,2),Xr=fo[0],Er=fo[1];Le.useEffect(function(){if(Xr){var Ai;(Ai=Yr()).setSelectionRange.apply(Ai,(0,Ce.Z)(Xr))}},[Xr]);var Zr=(0,Wt.Z)(Pi,ci),bt=(Ln=Zr.max)!==null&&Ln!==void 0?Ln:Yn,Br=Number(bt)>0,Vi=Zr.strategy(Ri),Vr=!!bt&&Vi>bt,Do=function(We,Ke){var ui=Ke;!Qi.current&&Zr.exceedFormatter&&Zr.max&&Zr.strategy(Ke)>Zr.max&&(ui=Zr.exceedFormatter(Ke,{max:Zr.max}),Ke!==ui&&Er([Yr().selectionStart||0,Yr().selectionEnd||0])),gn(ui),(0,Ne.rJ)(We.currentTarget,We,Jn,ui)},bo=function(We){Qi.current=!0,si==null||si(We)},$o=function(We){Qi.current=!1,Do(We,We.currentTarget.value),Fi==null||Fi(We)},Zi=function(We){Do(We,We.target.value)},wi=function(We){We.key==="Enter"&&ke&&ke(We),ze==null||ze(We)},je=function(We){ar(!0),Pn==null||Pn(We)},He=function(We){ar(!1),li==null||li(We)},Ue=function(We){gn(""),ji(),(0,Ne.rJ)(Yr(),We,Jn)},fi=sn,Se;Zr.show&&(Zr.showFormatter?Se=Zr.showFormatter({value:Ri,count:Vi,maxLength:bt}):Se="".concat(Vi).concat(Br?" / ".concat(bt):""),fi=Le.createElement(Le.Fragment,null,fi,Le.createElement("span",{className:ue()("".concat(Ee,"-data-count"),Lt==null?void 0:Lt.count),style:Bt==null?void 0:Bt.count},Se)));var _i=function(We){var Ke;Kt==null||Kt(We),(Ke=Yr())!==null&&Ke!==void 0&&Ke.style.height&&Xi(!0)},Un=!ve&&!ci&&!un;return Le.createElement(ce.BaseInput,{ref:Fr,value:Ri,allowClear:un,handleReset:Ue,suffix:fi,prefixCls:Ee,classNames:(0,Ae.Z)((0,Ae.Z)({},Lt),{},{affixWrapper:ue()(Lt==null?void 0:Lt.affixWrapper,(0,te.Z)((0,te.Z)({},"".concat(Ee,"-show-count"),ci),"".concat(Ee,"-textarea-allow-clear"),un))}),disabled:mt,focused:Ei,className:ue()(Ht,Vr&&"".concat(Ee,"-out-of-range")),style:(0,Ae.Z)((0,Ae.Z)({},kt),Hr&&!Un?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Se=="string"?Se:void 0}},hidden:vt,readOnly:Je,onClear:ge},Le.createElement(me,(0,Pt.Z)({},De,{autoSize:ve,maxLength:Yn,onKeyDown:wi,onChange:Zi,onFocus:je,onBlur:He,onCompositionStart:bo,onCompositionEnd:$o,className:ue()(Lt==null?void 0:Lt.textarea),style:(0,Ae.Z)((0,Ae.Z)({},Bt==null?void 0:Bt.textarea),{},{resize:kt==null?void 0:kt.resize}),disabled:mt,prefixCls:Ee,onResize:_i,ref:mr,readOnly:Je})))}),Cn=tn,Tn=Cn},639:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{Z:function(){return pt}});var Pt=Ot(72308),te=Ot(49618),Ae=Ot(77321),Ce=Ot(52487),de=Ot(74416),Rt=Ot(59301),ne=Ot(92310),ue=Ot.n(ne),ce=Ot(26112),Wt=Ot(30699),Ne=function(Mt){for(var _t=Mt.prefixCls,Qt=Mt.level,Vt=Mt.isStart,Zt=Mt.isEnd,$t="".concat(_t,"-indent-unit"),Pe=[],me=0;me<Qt;me+=1)Pe.push(Rt.createElement("span",{key:me,className:ue()($t,(0,te.Z)((0,te.Z)({},"".concat($t,"-start"),Vt[me]),"".concat($t,"-end"),Zt[me]))}));return Rt.createElement("span",{"aria-hidden":"true",className:"".concat(_t,"-indent")},Pe)},qt=Rt.memo(Ne),Le=Ot(65065),Ut=Ot(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="---",ct=function(Mt){var _t,Qt,Vt,Zt=Mt.eventKey,$t=Mt.className,Pe=Mt.style,me=Mt.dragOver,$e=Mt.dragOverGapTop,tn=Mt.dragOverGapBottom,Cn=Mt.isLeaf,Tn=Mt.isStart,In=Mt.isEnd,$n=Mt.expanded,Ln=Mt.selected,be=Mt.checked,re=Mt.halfChecked,Pn=Mt.loading,li=Mt.domRef,Jn=Mt.active,un=Mt.data,Yn=Mt.onMouseMove,si=Mt.selectable,Fi=(0,de.Z)(Mt,nt),sn=Rt.useContext(Wt.k),oi=Rt.useContext(Wt.y),Ee=Rt.useRef(null),ci=Rt.useState(!1),Pi=(0,Ce.Z)(ci,2),Ht=Pi[0],kt=Pi[1],mt=!!(sn.disabled||Mt.disabled||(_t=oi.nodeDisabled)!==null&&_t!==void 0&&_t.call(oi,un)),vt=Rt.useMemo(function(){return!sn.checkable||Mt.checkable===!1?!1:sn.checkable},[sn.checkable,Mt.checkable]),Lt=function(Vi){mt||sn.onNodeSelect(Vi,(0,Ut.F)(Mt))},Bt=function(Vi){mt||!vt||Mt.disableCheckbox||sn.onNodeCheck(Vi,(0,Ut.F)(Mt),!be)},Kt=Rt.useMemo(function(){return typeof si=="boolean"?si:sn.selectable},[si,sn.selectable]),ge=function(Vi){sn.onNodeClick(Vi,(0,Ut.F)(Mt)),Kt?Lt(Vi):Bt(Vi)},ke=function(Vi){sn.onNodeDoubleClick(Vi,(0,Ut.F)(Mt))},Je=function(Vi){sn.onNodeMouseEnter(Vi,(0,Ut.F)(Mt))},ve=function(Vi){sn.onNodeMouseLeave(Vi,(0,Ut.F)(Mt))},ze=function(Vi){sn.onNodeContextMenu(Vi,(0,Ut.F)(Mt))},De=Rt.useMemo(function(){return!!(sn.draggable&&(!sn.draggable.nodeDraggable||sn.draggable.nodeDraggable(un)))},[sn.draggable,un]),nn=function(Vi){Vi.stopPropagation(),kt(!0),sn.onNodeDragStart(Vi,Mt);try{Vi.dataTransfer.setData("text/plain","")}catch(Vr){}},kn=function(Vi){Vi.preventDefault(),Vi.stopPropagation(),sn.onNodeDragEnter(Vi,Mt)},Gn=function(Vi){Vi.preventDefault(),Vi.stopPropagation(),sn.onNodeDragOver(Vi,Mt)},gn=function(Vi){Vi.stopPropagation(),sn.onNodeDragLeave(Vi,Mt)},Ri=function(Vi){Vi.stopPropagation(),kt(!1),sn.onNodeDragEnd(Vi,Mt)},di=function(Vi){Vi.preventDefault(),Vi.stopPropagation(),kt(!1),sn.onNodeDrop(Vi,Mt)},xi=function(Vi){Pn||sn.onNodeExpand(Vi,(0,Ut.F)(Mt))},Ei=Rt.useMemo(function(){var Br=(0,Le.Z)(sn.keyEntities,Zt)||{},Vi=Br.children;return!!(Vi||[]).length},[sn.keyEntities,Zt]),ar=Rt.useMemo(function(){return Cn===!1?!1:Cn||!sn.loadData&&!Ei||sn.loadData&&Mt.loaded&&!Ei},[Cn,sn.loadData,Ei,Mt.loaded]);Rt.useEffect(function(){Pn||typeof sn.loadData=="function"&&$n&&!ar&&!Mt.loaded&&sn.onNodeLoad((0,Ut.F)(Mt))},[Pn,sn.loadData,sn.onNodeLoad,$n,ar,Mt]);var Qi=Rt.useMemo(function(){var Br;return(Br=sn.draggable)!==null&&Br!==void 0&&Br.icon?Rt.createElement("span",{className:"".concat(sn.prefixCls,"-draggable-icon")},sn.draggable.icon):null},[sn.draggable]),Oi=function(Vi){var Vr=Mt.switcherIcon||sn.switcherIcon;return typeof Vr=="function"?Vr((0,Ae.Z)((0,Ae.Z)({},Mt),{},{isLeaf:Vi})):Vr},Yi=function(){if(ar){var Vi=Oi(!0);return Vi!==!1?Rt.createElement("span",{className:ue()("".concat(sn.prefixCls,"-switcher"),"".concat(sn.prefixCls,"-switcher-noop"))},Vi):null}var Vr=Oi(!1);return Vr!==!1?Rt.createElement("span",{onClick:xi,className:ue()("".concat(sn.prefixCls,"-switcher"),"".concat(sn.prefixCls,"-switcher_").concat($n?et:At))},Vr):null},Hr=Rt.useMemo(function(){if(!vt)return null;var Br=typeof vt!="boolean"?vt:null;return Rt.createElement("span",{className:ue()("".concat(sn.prefixCls,"-checkbox"),(0,te.Z)((0,te.Z)((0,te.Z)({},"".concat(sn.prefixCls,"-checkbox-checked"),be),"".concat(sn.prefixCls,"-checkbox-indeterminate"),!be&&re),"".concat(sn.prefixCls,"-checkbox-disabled"),mt||Mt.disableCheckbox)),onClick:Bt,role:"checkbox","aria-checked":re?"mixed":be,"aria-disabled":mt||Mt.disableCheckbox,"aria-label":"Select ".concat(typeof Mt.title=="string"?Mt.title:"tree node")},Br)},[vt,be,re,mt,Mt.disableCheckbox,Mt.title]),Xi=Rt.useMemo(function(){return ar?null:$n?et:At},[ar,$n]),Fr=Rt.useMemo(function(){return Rt.createElement("span",{className:ue()("".concat(sn.prefixCls,"-iconEle"),"".concat(sn.prefixCls,"-icon__").concat(Xi||"docu"),(0,te.Z)({},"".concat(sn.prefixCls,"-icon_loading"),Pn))})},[sn.prefixCls,Xi,Pn]),mr=Rt.useMemo(function(){var Br=!!sn.draggable,Vi=!Mt.disabled&&Br&&sn.dragOverNodeKey===Zt;return Vi?sn.dropIndicatorRender({dropPosition:sn.dropPosition,dropLevelOffset:sn.dropLevelOffset,indent:sn.indent,prefixCls:sn.prefixCls,direction:sn.direction}):null},[sn.dropPosition,sn.dropLevelOffset,sn.indent,sn.prefixCls,sn.direction,sn.draggable,sn.dragOverNodeKey,sn.dropIndicatorRender]),Yr=Rt.useMemo(function(){var Br=Mt.title,Vi=Br===void 0?at:Br,Vr="".concat(sn.prefixCls,"-node-content-wrapper"),Do;if(sn.showIcon){var bo=Mt.icon||sn.icon;Do=bo?Rt.createElement("span",{className:ue()("".concat(sn.prefixCls,"-iconEle"),"".concat(sn.prefixCls,"-icon__customize"))},typeof bo=="function"?bo(Mt):bo):Fr}else sn.loadData&&Pn&&(Do=Fr);var $o;return typeof Vi=="function"?$o=Vi(un):sn.titleRender?$o=sn.titleRender(un):$o=Vi,Rt.createElement("span",{ref:Ee,title:typeof Vi=="string"?Vi:"",className:ue()(Vr,"".concat(Vr,"-").concat(Xi||"normal"),(0,te.Z)({},"".concat(sn.prefixCls,"-node-selected"),!mt&&(Ln||Ht))),onMouseEnter:Je,onMouseLeave:ve,onContextMenu:ze,onClick:ge,onDoubleClick:ke},Do,Rt.createElement("span",{className:"".concat(sn.prefixCls,"-title")},$o),mr)},[sn.prefixCls,sn.showIcon,Mt,sn.icon,Fr,sn.titleRender,un,Xi,Je,ve,ze,ge,ke]),ji=(0,ce.Z)(Fi,{aria:!0,data:!0}),co=(0,Le.Z)(sn.keyEntities,Zt)||{},fo=co.level,Xr=In[In.length-1],Er=!mt&&De,Zr=sn.draggingNodeKey===Zt,bt=si!==void 0?{"aria-selected":!!si}:void 0;return Rt.createElement("div",(0,Pt.Z)({ref:li,role:"treeitem","aria-expanded":Cn?void 0:$n,className:ue()($t,"".concat(sn.prefixCls,"-treenode"),(Vt={},(0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)(Vt,"".concat(sn.prefixCls,"-treenode-disabled"),mt),"".concat(sn.prefixCls,"-treenode-switcher-").concat($n?"open":"close"),!Cn),"".concat(sn.prefixCls,"-treenode-checkbox-checked"),be),"".concat(sn.prefixCls,"-treenode-checkbox-indeterminate"),re),"".concat(sn.prefixCls,"-treenode-selected"),Ln),"".concat(sn.prefixCls,"-treenode-loading"),Pn),"".concat(sn.prefixCls,"-treenode-active"),Jn),"".concat(sn.prefixCls,"-treenode-leaf-last"),Xr),"".concat(sn.prefixCls,"-treenode-draggable"),De),"dragging",Zr),(0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)(Vt,"drop-target",sn.dropTargetKey===Zt),"drop-container",sn.dropContainerKey===Zt),"drag-over",!mt&&me),"drag-over-gap-top",!mt&&$e),"drag-over-gap-bottom",!mt&&tn),"filter-node",(Qt=sn.filterTreeNode)===null||Qt===void 0?void 0:Qt.call(sn,(0,Ut.F)(Mt))),"".concat(sn.prefixCls,"-treenode-leaf"),ar))),style:Pe,draggable:Er,onDragStart:Er?nn:void 0,onDragEnter:De?kn:void 0,onDragOver:De?Gn:void 0,onDragLeave:De?gn:void 0,onDrop:De?di:void 0,onDragEnd:De?Ri:void 0,onMouseMove:Yn},bt,ji),Rt.createElement(qt,{prefixCls:sn.prefixCls,level:fo,isStart:Tn,isEnd:In}),Qi,Yi(),Hr,Yr)};ct.isTreeNode=1;var pt=ct},30699:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{k:function(){return te},y:function(){return Ae}});var Pt=Ot(59301),te=Pt.createContext(null),Ae=Pt.createContext({})},15018:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{OF:function(){return Zt.Z},y6:function(){return At.y},ZP:function(){return mt}});var Pt=Ot(72308),te=Ot(62853),Ae=Ot(77321),Ce=Ot(80702),de=Ot(96949),Rt=Ot(55090),ne=Ot(80237),ue=Ot(77205),ce=Ot(38793),Wt=Ot(49618),Ne=Ot(92310),qt=Ot.n(Ne),Le=Ot(10228),Ut=Ot(26112),nt=Ot(48736),et=Ot(59301),At=Ot(30699),at=function(Lt){var Bt=Lt.dropPosition,Kt=Lt.dropLevelOffset,ge=Lt.indent,ke={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Bt){case-1:ke.top=0,ke.left=-Kt*ge;break;case 1:ke.bottom=0,ke.left=-Kt*ge;break;case 0:ke.bottom=0,ke.left=ge;break}return et.createElement("div",{style:ke})},ct=at;function pt(vt){if(vt==null)throw new TypeError("Cannot destructure "+vt)}var xt=Ot(52487),Mt=Ot(74416),_t=Ot(34280),Qt=Ot(45680),Vt=Ot(77900),Zt=Ot(639);function $t(vt,Lt){var Bt=et.useState(!1),Kt=(0,xt.Z)(Bt,2),ge=Kt[0],ke=Kt[1];(0,_t.Z)(function(){if(ge)return vt(),function(){Lt()}},[ge]),(0,_t.Z)(function(){return ke(!0),function(){ke(!1)}},[])}var Pe=$t,me=Ot(34061),$e=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],tn=et.forwardRef(function(vt,Lt){var Bt=vt.className,Kt=vt.style,ge=vt.motion,ke=vt.motionNodes,Je=vt.motionType,ve=vt.onMotionStart,ze=vt.onMotionEnd,De=vt.active,nn=vt.treeNodeRequiredProps,kn=(0,Mt.Z)(vt,$e),Gn=et.useState(!0),gn=(0,xt.Z)(Gn,2),Ri=gn[0],di=gn[1],xi=et.useContext(At.k),Ei=xi.prefixCls,ar=ke&&Je!=="hide";(0,_t.Z)(function(){ke&&ar!==Ri&&di(ar)},[ke]);var Qi=function(){ke&&ve()},Oi=et.useRef(!1),Yi=function(){ke&&!Oi.current&&(Oi.current=!0,ze())};Pe(Qi,Yi);var Hr=function(Fr){ar===Fr&&Yi()};return ke?et.createElement(Vt.default,(0,Pt.Z)({ref:Lt,visible:Ri},ge,{motionAppear:Je==="show",onVisibleChanged:Hr}),function(Xi,Fr){var mr=Xi.className,Yr=Xi.style;return et.createElement("div",{ref:Fr,className:qt()("".concat(Ei,"-treenode-motion"),mr),style:Yr},ke.map(function(ji){var co=Object.assign({},(pt(ji.data),ji.data)),fo=ji.title,Xr=ji.key,Er=ji.isStart,Zr=ji.isEnd;delete co.children;var bt=(0,me.H8)(Xr,nn);return et.createElement(Zt.Z,(0,Pt.Z)({},co,bt,{title:fo,active:De,data:ji.data,key:Xr,isStart:Er,isEnd:Zr}))}))}):et.createElement(Zt.Z,(0,Pt.Z)({domRef:Lt,className:Bt,style:Kt},kn,{active:De}))}),Cn=tn;function Tn(){var vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Bt=vt.length,Kt=Lt.length;if(Math.abs(Bt-Kt)!==1)return{add:!1,key:null};function ge(ke,Je){var ve=new Map;ke.forEach(function(De){ve.set(De,!0)});var ze=Je.filter(function(De){return!ve.has(De)});return ze.length===1?ze[0]:null}return Bt<Kt?{add:!0,key:ge(vt,Lt)}:{add:!1,key:ge(Lt,vt)}}function In(vt,Lt,Bt){var Kt=vt.findIndex(function(ve){return ve.key===Bt}),ge=vt[Kt+1],ke=Lt.findIndex(function(ve){return ve.key===Bt});if(ge){var Je=Lt.findIndex(function(ve){return ve.key===ge.key});return Lt.slice(ke+1,Je)}return Lt.slice(ke+1)}var $n=["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"],Ln={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},be=function(){},re="RC_TREE_MOTION_".concat(Math.random()),Pn={key:re},li={key:re,level:0,index:0,pos:"0",node:Pn,nodes:[Pn]},Jn={parent:null,children:[],pos:li.pos,data:Pn,title:null,key:re,isStart:[],isEnd:[]};function un(vt,Lt,Bt,Kt){return Lt===!1||!Bt?vt:vt.slice(0,Math.ceil(Bt/Kt)+1)}function Yn(vt){var Lt=vt.key,Bt=vt.pos;return(0,me.km)(Lt,Bt)}function si(vt){for(var Lt=String(vt.data.key),Bt=vt;Bt.parent;)Bt=Bt.parent,Lt="".concat(Bt.data.key," > ").concat(Lt);return Lt}var Fi=et.forwardRef(function(vt,Lt){var Bt=vt.prefixCls,Kt=vt.data,ge=vt.selectable,ke=vt.checkable,Je=vt.expandedKeys,ve=vt.selectedKeys,ze=vt.checkedKeys,De=vt.loadedKeys,nn=vt.loadingKeys,kn=vt.halfCheckedKeys,Gn=vt.keyEntities,gn=vt.disabled,Ri=vt.dragging,di=vt.dragOverNodeKey,xi=vt.dropPosition,Ei=vt.motion,ar=vt.height,Qi=vt.itemHeight,Oi=vt.virtual,Yi=vt.scrollWidth,Hr=vt.focusable,Xi=vt.activeItem,Fr=vt.focused,mr=vt.tabIndex,Yr=vt.onKeyDown,ji=vt.onFocus,co=vt.onBlur,fo=vt.onActiveChange,Xr=vt.onListChangeStart,Er=vt.onListChangeEnd,Zr=(0,Mt.Z)(vt,$n),bt=et.useRef(null),Br=et.useRef(null);et.useImperativeHandle(Lt,function(){return{scrollTo:function(hn){bt.current.scrollTo(hn)},getIndentWidth:function(){return Br.current.offsetWidth}}});var Vi=et.useState(Je),Vr=(0,xt.Z)(Vi,2),Do=Vr[0],bo=Vr[1],$o=et.useState(Kt),Zi=(0,xt.Z)($o,2),wi=Zi[0],je=Zi[1],He=et.useState(Kt),Ue=(0,xt.Z)(He,2),fi=Ue[0],Se=Ue[1],_i=et.useState([]),Un=(0,xt.Z)(_i,2),Ai=Un[0],We=Un[1],Ke=et.useState(null),ui=(0,xt.Z)(Ke,2),he=ui[0],rn=ui[1],Wn=et.useRef(Kt);Wn.current=Kt;function pi(){var ii=Wn.current;je(ii),Se(ii),We([]),rn(null),Er()}(0,_t.Z)(function(){bo(Je);var ii=Tn(Do,Je);if(ii.key!==null)if(ii.add){var hn=wi.findIndex(function(Ni){var Ti=Ni.key;return Ti===ii.key}),An=un(In(wi,Kt,ii.key),Oi,ar,Qi),xn=wi.slice();xn.splice(hn+1,0,Jn),Se(xn),We(An),rn("show")}else{var Nn=Kt.findIndex(function(Ni){var Ti=Ni.key;return Ti===ii.key}),ai=un(In(Kt,wi,ii.key),Oi,ar,Qi),Ki=Kt.slice();Ki.splice(Nn+1,0,Jn),Se(Ki),We(ai),rn("hide")}else wi!==Kt&&(je(Kt),Se(Kt))},[Je,Kt]),et.useEffect(function(){Ri||pi()},[Ri]);var on=Ei?fi:Kt,yn={expandedKeys:Je,selectedKeys:ve,loadedKeys:De,loadingKeys:nn,checkedKeys:ze,halfCheckedKeys:kn,dragOverNodeKey:di,dropPosition:xi,keyEntities:Gn};return et.createElement(et.Fragment,null,Fr&&Xi&&et.createElement("span",{style:Ln,"aria-live":"assertive"},si(Xi)),et.createElement("div",null,et.createElement("input",{style:Ln,disabled:Hr===!1||gn,tabIndex:Hr!==!1?mr:null,onKeyDown:Yr,onFocus:ji,onBlur:co,value:"",onChange:be,"aria-label":"for screen reader"})),et.createElement("div",{className:"".concat(Bt,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},et.createElement("div",{className:"".concat(Bt,"-indent")},et.createElement("div",{ref:Br,className:"".concat(Bt,"-indent-unit")}))),et.createElement(Qt.Z,(0,Pt.Z)({},Zr,{data:on,itemKey:Yn,height:ar,fullHeight:!1,virtual:Oi,itemHeight:Qi,scrollWidth:Yi,prefixCls:"".concat(Bt,"-list"),ref:bt,role:"tree",onVisibleChange:function(hn){hn.every(function(An){return Yn(An)!==re})&&pi()}}),function(ii){var hn=ii.pos,An=Object.assign({},(pt(ii.data),ii.data)),xn=ii.title,Nn=ii.key,ai=ii.isStart,Ki=ii.isEnd,Ni=(0,me.km)(Nn,hn);delete An.key,delete An.children;var Ti=(0,me.H8)(Ni,yn);return et.createElement(Cn,(0,Pt.Z)({},An,Ti,{title:xn,active:!!Xi&&Nn===Xi.key,pos:hn,data:ii.data,isStart:ai,isEnd:Ki,motion:Ei,motionNodes:Nn===re?Ai:null,motionType:he,onMotionStart:Xr,onMotionEnd:pi,treeNodeRequiredProps:yn,onMouseMove:function(){fo(null)}}))}))}),sn=Fi,oi=Ot(82661),Ee=Ot(34643),ci=Ot(65065),Pi=10,Ht=function(vt){(0,ue.Z)(Bt,vt);var Lt=(0,ce.Z)(Bt);function Bt(){var Kt;(0,de.Z)(this,Bt);for(var ge=arguments.length,ke=new Array(ge),Je=0;Je<ge;Je++)ke[Je]=arguments[Je];return Kt=Lt.call.apply(Lt,[this].concat(ke)),(0,Wt.Z)((0,ne.Z)(Kt),"destroyed",!1),(0,Wt.Z)((0,ne.Z)(Kt),"delayedDragEnterLogic",void 0),(0,Wt.Z)((0,ne.Z)(Kt),"loadingRetryTimes",{}),(0,Wt.Z)((0,ne.Z)(Kt),"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,me.w$)()}),(0,Wt.Z)((0,ne.Z)(Kt),"dragStartMousePosition",null),(0,Wt.Z)((0,ne.Z)(Kt),"dragNodeProps",null),(0,Wt.Z)((0,ne.Z)(Kt),"currentMouseOverDroppableNodeKey",null),(0,Wt.Z)((0,ne.Z)(Kt),"listRef",et.createRef()),(0,Wt.Z)((0,ne.Z)(Kt),"onNodeDragStart",function(ve,ze){var De=Kt.state,nn=De.expandedKeys,kn=De.keyEntities,Gn=Kt.props.onDragStart,gn=ze.eventKey;Kt.dragNodeProps=ze,Kt.dragStartMousePosition={x:ve.clientX,y:ve.clientY};var Ri=(0,oi._5)(nn,gn);Kt.setState({draggingNodeKey:gn,dragChildrenKeys:(0,oi.wA)(gn,kn),indent:Kt.listRef.current.getIndentWidth()}),Kt.setExpandedKeys(Ri),window.addEventListener("dragend",Kt.onWindowDragEnd),Gn==null||Gn({event:ve,node:(0,me.F)(ze)})}),(0,Wt.Z)((0,ne.Z)(Kt),"onNodeDragEnter",function(ve,ze){var De=Kt.state,nn=De.expandedKeys,kn=De.keyEntities,Gn=De.dragChildrenKeys,gn=De.flattenNodes,Ri=De.indent,di=Kt.props,xi=di.onDragEnter,Ei=di.onExpand,ar=di.allowDrop,Qi=di.direction,Oi=ze.pos,Yi=ze.eventKey;if(Kt.currentMouseOverDroppableNodeKey!==Yi&&(Kt.currentMouseOverDroppableNodeKey=Yi),!Kt.dragNodeProps){Kt.resetDragState();return}var Hr=(0,oi.OM)(ve,Kt.dragNodeProps,ze,Ri,Kt.dragStartMousePosition,ar,gn,kn,nn,Qi),Xi=Hr.dropPosition,Fr=Hr.dropLevelOffset,mr=Hr.dropTargetKey,Yr=Hr.dropContainerKey,ji=Hr.dropTargetPos,co=Hr.dropAllowed,fo=Hr.dragOverNodeKey;if(Gn.includes(mr)||!co){Kt.resetDragState();return}if(Kt.delayedDragEnterLogic||(Kt.delayedDragEnterLogic={}),Object.keys(Kt.delayedDragEnterLogic).forEach(function(Xr){clearTimeout(Kt.delayedDragEnterLogic[Xr])}),Kt.dragNodeProps.eventKey!==ze.eventKey&&(ve.persist(),Kt.delayedDragEnterLogic[Oi]=window.setTimeout(function(){if(Kt.state.draggingNodeKey!==null){var Xr=(0,Ce.Z)(nn),Er=(0,ci.Z)(kn,ze.eventKey);Er&&(Er.children||[]).length&&(Xr=(0,oi.L0)(nn,ze.eventKey)),Kt.props.hasOwnProperty("expandedKeys")||Kt.setExpandedKeys(Xr),Ei==null||Ei(Xr,{node:(0,me.F)(ze),expanded:!0,nativeEvent:ve.nativeEvent})}},800)),Kt.dragNodeProps.eventKey===mr&&Fr===0){Kt.resetDragState();return}Kt.setState({dragOverNodeKey:fo,dropPosition:Xi,dropLevelOffset:Fr,dropTargetKey:mr,dropContainerKey:Yr,dropTargetPos:ji,dropAllowed:co}),xi==null||xi({event:ve,node:(0,me.F)(ze),expandedKeys:nn})}),(0,Wt.Z)((0,ne.Z)(Kt),"onNodeDragOver",function(ve,ze){var De=Kt.state,nn=De.dragChildrenKeys,kn=De.flattenNodes,Gn=De.keyEntities,gn=De.expandedKeys,Ri=De.indent,di=Kt.props,xi=di.onDragOver,Ei=di.allowDrop,ar=di.direction;if(Kt.dragNodeProps){var Qi=(0,oi.OM)(ve,Kt.dragNodeProps,ze,Ri,Kt.dragStartMousePosition,Ei,kn,Gn,gn,ar),Oi=Qi.dropPosition,Yi=Qi.dropLevelOffset,Hr=Qi.dropTargetKey,Xi=Qi.dropContainerKey,Fr=Qi.dropTargetPos,mr=Qi.dropAllowed,Yr=Qi.dragOverNodeKey;nn.includes(Hr)||!mr||(Kt.dragNodeProps.eventKey===Hr&&Yi===0?Kt.state.dropPosition===null&&Kt.state.dropLevelOffset===null&&Kt.state.dropTargetKey===null&&Kt.state.dropContainerKey===null&&Kt.state.dropTargetPos===null&&Kt.state.dropAllowed===!1&&Kt.state.dragOverNodeKey===null||Kt.resetDragState():Oi===Kt.state.dropPosition&&Yi===Kt.state.dropLevelOffset&&Hr===Kt.state.dropTargetKey&&Xi===Kt.state.dropContainerKey&&Fr===Kt.state.dropTargetPos&&mr===Kt.state.dropAllowed&&Yr===Kt.state.dragOverNodeKey||Kt.setState({dropPosition:Oi,dropLevelOffset:Yi,dropTargetKey:Hr,dropContainerKey:Xi,dropTargetPos:Fr,dropAllowed:mr,dragOverNodeKey:Yr}),xi==null||xi({event:ve,node:(0,me.F)(ze)}))}}),(0,Wt.Z)((0,ne.Z)(Kt),"onNodeDragLeave",function(ve,ze){Kt.currentMouseOverDroppableNodeKey===ze.eventKey&&!ve.currentTarget.contains(ve.relatedTarget)&&(Kt.resetDragState(),Kt.currentMouseOverDroppableNodeKey=null);var De=Kt.props.onDragLeave;De==null||De({event:ve,node:(0,me.F)(ze)})}),(0,Wt.Z)((0,ne.Z)(Kt),"onWindowDragEnd",function(ve){Kt.onNodeDragEnd(ve,null,!0),window.removeEventListener("dragend",Kt.onWindowDragEnd)}),(0,Wt.Z)((0,ne.Z)(Kt),"onNodeDragEnd",function(ve,ze){var De=Kt.props.onDragEnd;Kt.setState({dragOverNodeKey:null}),Kt.cleanDragState(),De==null||De({event:ve,node:(0,me.F)(ze)}),Kt.dragNodeProps=null,window.removeEventListener("dragend",Kt.onWindowDragEnd)}),(0,Wt.Z)((0,ne.Z)(Kt),"onNodeDrop",function(ve,ze){var De,nn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,kn=Kt.state,Gn=kn.dragChildrenKeys,gn=kn.dropPosition,Ri=kn.dropTargetKey,di=kn.dropTargetPos,xi=kn.dropAllowed;if(xi){var Ei=Kt.props.onDrop;if(Kt.setState({dragOverNodeKey:null}),Kt.cleanDragState(),Ri!==null){var ar=(0,Ae.Z)((0,Ae.Z)({},(0,me.H8)(Ri,Kt.getTreeNodeRequiredProps())),{},{active:((De=Kt.getActiveItem())===null||De===void 0?void 0:De.key)===Ri,data:(0,ci.Z)(Kt.state.keyEntities,Ri).node}),Qi=Gn.includes(Ri);(0,nt.ZP)(!Qi,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Oi=(0,oi.yx)(di),Yi={event:ve,node:(0,me.F)(ar),dragNode:Kt.dragNodeProps?(0,me.F)(Kt.dragNodeProps):null,dragNodesKeys:[Kt.dragNodeProps.eventKey].concat(Gn),dropToGap:gn!==0,dropPosition:gn+Number(Oi[Oi.length-1])};nn||Ei==null||Ei(Yi),Kt.dragNodeProps=null}}}),(0,Wt.Z)((0,ne.Z)(Kt),"cleanDragState",function(){var ve=Kt.state.draggingNodeKey;ve!==null&&Kt.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),Kt.dragStartMousePosition=null,Kt.currentMouseOverDroppableNodeKey=null}),(0,Wt.Z)((0,ne.Z)(Kt),"triggerExpandActionExpand",function(ve,ze){var De=Kt.state,nn=De.expandedKeys,kn=De.flattenNodes,Gn=ze.expanded,gn=ze.key,Ri=ze.isLeaf;if(!(Ri||ve.shiftKey||ve.metaKey||ve.ctrlKey)){var di=kn.filter(function(Ei){return Ei.key===gn})[0],xi=(0,me.F)((0,Ae.Z)((0,Ae.Z)({},(0,me.H8)(gn,Kt.getTreeNodeRequiredProps())),{},{data:di.data}));Kt.setExpandedKeys(Gn?(0,oi._5)(nn,gn):(0,oi.L0)(nn,gn)),Kt.onNodeExpand(ve,xi)}}),(0,Wt.Z)((0,ne.Z)(Kt),"onNodeClick",function(ve,ze){var De=Kt.props,nn=De.onClick,kn=De.expandAction;kn==="click"&&Kt.triggerExpandActionExpand(ve,ze),nn==null||nn(ve,ze)}),(0,Wt.Z)((0,ne.Z)(Kt),"onNodeDoubleClick",function(ve,ze){var De=Kt.props,nn=De.onDoubleClick,kn=De.expandAction;kn==="doubleClick"&&Kt.triggerExpandActionExpand(ve,ze),nn==null||nn(ve,ze)}),(0,Wt.Z)((0,ne.Z)(Kt),"onNodeSelect",function(ve,ze){var De=Kt.state.selectedKeys,nn=Kt.state,kn=nn.keyEntities,Gn=nn.fieldNames,gn=Kt.props,Ri=gn.onSelect,di=gn.multiple,xi=ze.selected,Ei=ze[Gn.key],ar=!xi;ar?di?De=(0,oi.L0)(De,Ei):De=[Ei]:De=(0,oi._5)(De,Ei);var Qi=De.map(function(Oi){var Yi=(0,ci.Z)(kn,Oi);return Yi?Yi.node:null}).filter(Boolean);Kt.setUncontrolledState({selectedKeys:De}),Ri==null||Ri(De,{event:"select",selected:ar,node:ze,selectedNodes:Qi,nativeEvent:ve.nativeEvent})}),(0,Wt.Z)((0,ne.Z)(Kt),"onNodeCheck",function(ve,ze,De){var nn=Kt.state,kn=nn.keyEntities,Gn=nn.checkedKeys,gn=nn.halfCheckedKeys,Ri=Kt.props,di=Ri.checkStrictly,xi=Ri.onCheck,Ei=ze.key,ar,Qi={event:"check",node:ze,checked:De,nativeEvent:ve.nativeEvent};if(di){var Oi=De?(0,oi.L0)(Gn,Ei):(0,oi._5)(Gn,Ei),Yi=(0,oi._5)(gn,Ei);ar={checked:Oi,halfChecked:Yi},Qi.checkedNodes=Oi.map(function(ji){return(0,ci.Z)(kn,ji)}).filter(Boolean).map(function(ji){return ji.node}),Kt.setUncontrolledState({checkedKeys:Oi})}else{var Hr=(0,Ee.S)([].concat((0,Ce.Z)(Gn),[Ei]),!0,kn),Xi=Hr.checkedKeys,Fr=Hr.halfCheckedKeys;if(!De){var mr=new Set(Xi);mr.delete(Ei);var Yr=(0,Ee.S)(Array.from(mr),{checked:!1,halfCheckedKeys:Fr},kn);Xi=Yr.checkedKeys,Fr=Yr.halfCheckedKeys}ar=Xi,Qi.checkedNodes=[],Qi.checkedNodesPositions=[],Qi.halfCheckedKeys=Fr,Xi.forEach(function(ji){var co=(0,ci.Z)(kn,ji);if(co){var fo=co.node,Xr=co.pos;Qi.checkedNodes.push(fo),Qi.checkedNodesPositions.push({node:fo,pos:Xr})}}),Kt.setUncontrolledState({checkedKeys:Xi},!1,{halfCheckedKeys:Fr})}xi==null||xi(ar,Qi)}),(0,Wt.Z)((0,ne.Z)(Kt),"onNodeLoad",function(ve){var ze,De=ve.key,nn=Kt.state.keyEntities,kn=(0,ci.Z)(nn,De);if(!(kn!=null&&(ze=kn.children)!==null&&ze!==void 0&&ze.length)){var Gn=new Promise(function(gn,Ri){Kt.setState(function(di){var xi=di.loadedKeys,Ei=xi===void 0?[]:xi,ar=di.loadingKeys,Qi=ar===void 0?[]:ar,Oi=Kt.props,Yi=Oi.loadData,Hr=Oi.onLoad;if(!Yi||Ei.includes(De)||Qi.includes(De))return null;var Xi=Yi(ve);return Xi.then(function(){var Fr=Kt.state.loadedKeys,mr=(0,oi.L0)(Fr,De);Hr==null||Hr(mr,{event:"load",node:ve}),Kt.setUncontrolledState({loadedKeys:mr}),Kt.setState(function(Yr){return{loadingKeys:(0,oi._5)(Yr.loadingKeys,De)}}),gn()}).catch(function(Fr){if(Kt.setState(function(Yr){return{loadingKeys:(0,oi._5)(Yr.loadingKeys,De)}}),Kt.loadingRetryTimes[De]=(Kt.loadingRetryTimes[De]||0)+1,Kt.loadingRetryTimes[De]>=Pi){var mr=Kt.state.loadedKeys;(0,nt.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),Kt.setUncontrolledState({loadedKeys:(0,oi.L0)(mr,De)}),gn()}Ri(Fr)}),{loadingKeys:(0,oi.L0)(Qi,De)}})});return Gn.catch(function(){}),Gn}}),(0,Wt.Z)((0,ne.Z)(Kt),"onNodeMouseEnter",function(ve,ze){var De=Kt.props.onMouseEnter;De==null||De({event:ve,node:ze})}),(0,Wt.Z)((0,ne.Z)(Kt),"onNodeMouseLeave",function(ve,ze){var De=Kt.props.onMouseLeave;De==null||De({event:ve,node:ze})}),(0,Wt.Z)((0,ne.Z)(Kt),"onNodeContextMenu",function(ve,ze){var De=Kt.props.onRightClick;De&&(ve.preventDefault(),De({event:ve,node:ze}))}),(0,Wt.Z)((0,ne.Z)(Kt),"onFocus",function(){var ve=Kt.props.onFocus;Kt.setState({focused:!0});for(var ze=arguments.length,De=new Array(ze),nn=0;nn<ze;nn++)De[nn]=arguments[nn];ve==null||ve.apply(void 0,De)}),(0,Wt.Z)((0,ne.Z)(Kt),"onBlur",function(){var ve=Kt.props.onBlur;Kt.setState({focused:!1}),Kt.onActiveChange(null);for(var ze=arguments.length,De=new Array(ze),nn=0;nn<ze;nn++)De[nn]=arguments[nn];ve==null||ve.apply(void 0,De)}),(0,Wt.Z)((0,ne.Z)(Kt),"getTreeNodeRequiredProps",function(){var ve=Kt.state,ze=ve.expandedKeys,De=ve.selectedKeys,nn=ve.loadedKeys,kn=ve.loadingKeys,Gn=ve.checkedKeys,gn=ve.halfCheckedKeys,Ri=ve.dragOverNodeKey,di=ve.dropPosition,xi=ve.keyEntities;return{expandedKeys:ze||[],selectedKeys:De||[],loadedKeys:nn||[],loadingKeys:kn||[],checkedKeys:Gn||[],halfCheckedKeys:gn||[],dragOverNodeKey:Ri,dropPosition:di,keyEntities:xi}}),(0,Wt.Z)((0,ne.Z)(Kt),"setExpandedKeys",function(ve){var ze=Kt.state,De=ze.treeData,nn=ze.fieldNames,kn=(0,me.oH)(De,ve,nn);Kt.setUncontrolledState({expandedKeys:ve,flattenNodes:kn},!0)}),(0,Wt.Z)((0,ne.Z)(Kt),"onNodeExpand",function(ve,ze){var De=Kt.state.expandedKeys,nn=Kt.state,kn=nn.listChanging,Gn=nn.fieldNames,gn=Kt.props,Ri=gn.onExpand,di=gn.loadData,xi=ze.expanded,Ei=ze[Gn.key];if(!kn){var ar=De.includes(Ei),Qi=!xi;if((0,nt.ZP)(xi&&ar||!xi&&!ar,"Expand state not sync with index check"),De=Qi?(0,oi.L0)(De,Ei):(0,oi._5)(De,Ei),Kt.setExpandedKeys(De),Ri==null||Ri(De,{node:ze,expanded:Qi,nativeEvent:ve.nativeEvent}),Qi&&di){var Oi=Kt.onNodeLoad(ze);Oi&&Oi.then(function(){var Yi=(0,me.oH)(Kt.state.treeData,De,Gn);Kt.setUncontrolledState({flattenNodes:Yi})}).catch(function(){var Yi=Kt.state.expandedKeys,Hr=(0,oi._5)(Yi,Ei);Kt.setExpandedKeys(Hr)})}}}),(0,Wt.Z)((0,ne.Z)(Kt),"onListChangeStart",function(){Kt.setUncontrolledState({listChanging:!0})}),(0,Wt.Z)((0,ne.Z)(Kt),"onListChangeEnd",function(){setTimeout(function(){Kt.setUncontrolledState({listChanging:!1})})}),(0,Wt.Z)((0,ne.Z)(Kt),"onActiveChange",function(ve){var ze=Kt.state.activeKey,De=Kt.props,nn=De.onActiveChange,kn=De.itemScrollOffset,Gn=kn===void 0?0:kn;ze!==ve&&(Kt.setState({activeKey:ve}),ve!==null&&Kt.scrollTo({key:ve,offset:Gn}),nn==null||nn(ve))}),(0,Wt.Z)((0,ne.Z)(Kt),"getActiveItem",function(){var ve=Kt.state,ze=ve.activeKey,De=ve.flattenNodes;return ze===null?null:De.find(function(nn){var kn=nn.key;return kn===ze})||null}),(0,Wt.Z)((0,ne.Z)(Kt),"offsetActiveKey",function(ve){var ze=Kt.state,De=ze.flattenNodes,nn=ze.activeKey,kn=De.findIndex(function(Ri){var di=Ri.key;return di===nn});kn===-1&&ve<0&&(kn=De.length),kn=(kn+ve+De.length)%De.length;var Gn=De[kn];if(Gn){var gn=Gn.key;Kt.onActiveChange(gn)}else Kt.onActiveChange(null)}),(0,Wt.Z)((0,ne.Z)(Kt),"onKeyDown",function(ve){var ze=Kt.state,De=ze.activeKey,nn=ze.expandedKeys,kn=ze.checkedKeys,Gn=ze.fieldNames,gn=Kt.props,Ri=gn.onKeyDown,di=gn.checkable,xi=gn.selectable;switch(ve.which){case Le.Z.UP:{Kt.offsetActiveKey(-1),ve.preventDefault();break}case Le.Z.DOWN:{Kt.offsetActiveKey(1),ve.preventDefault();break}}var Ei=Kt.getActiveItem();if(Ei&&Ei.data){var ar=Kt.getTreeNodeRequiredProps(),Qi=Ei.data.isLeaf===!1||!!(Ei.data[Gn.children]||[]).length,Oi=(0,me.F)((0,Ae.Z)((0,Ae.Z)({},(0,me.H8)(De,ar)),{},{data:Ei.data,active:!0}));switch(ve.which){case Le.Z.LEFT:{Qi&&nn.includes(De)?Kt.onNodeExpand({},Oi):Ei.parent&&Kt.onActiveChange(Ei.parent.key),ve.preventDefault();break}case Le.Z.RIGHT:{Qi&&!nn.includes(De)?Kt.onNodeExpand({},Oi):Ei.children&&Ei.children.length&&Kt.onActiveChange(Ei.children[0].key),ve.preventDefault();break}case Le.Z.ENTER:case Le.Z.SPACE:{di&&!Oi.disabled&&Oi.checkable!==!1&&!Oi.disableCheckbox?Kt.onNodeCheck({},Oi,!kn.includes(De)):!di&&xi&&!Oi.disabled&&Oi.selectable!==!1&&Kt.onNodeSelect({},Oi);break}}}Ri==null||Ri(ve)}),(0,Wt.Z)((0,ne.Z)(Kt),"setUncontrolledState",function(ve){var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,De=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Kt.destroyed){var nn=!1,kn=!0,Gn={};Object.keys(ve).forEach(function(gn){if(Kt.props.hasOwnProperty(gn)){kn=!1;return}nn=!0,Gn[gn]=ve[gn]}),nn&&(!ze||kn)&&Kt.setState((0,Ae.Z)((0,Ae.Z)({},Gn),De))}}),(0,Wt.Z)((0,ne.Z)(Kt),"scrollTo",function(ve){Kt.listRef.current.scrollTo(ve)}),Kt}return(0,Rt.Z)(Bt,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var ge=this.props,ke=ge.activeKey,Je=ge.itemScrollOffset,ve=Je===void 0?0:Je;ke!==void 0&&ke!==this.state.activeKey&&(this.setState({activeKey:ke}),ke!==null&&this.scrollTo({key:ke,offset:ve}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var ge=this.state,ke=ge.focused,Je=ge.flattenNodes,ve=ge.keyEntities,ze=ge.draggingNodeKey,De=ge.activeKey,nn=ge.dropLevelOffset,kn=ge.dropContainerKey,Gn=ge.dropTargetKey,gn=ge.dropPosition,Ri=ge.dragOverNodeKey,di=ge.indent,xi=this.props,Ei=xi.prefixCls,ar=xi.className,Qi=xi.style,Oi=xi.showLine,Yi=xi.focusable,Hr=xi.tabIndex,Xi=Hr===void 0?0:Hr,Fr=xi.selectable,mr=xi.showIcon,Yr=xi.icon,ji=xi.switcherIcon,co=xi.draggable,fo=xi.checkable,Xr=xi.checkStrictly,Er=xi.disabled,Zr=xi.motion,bt=xi.loadData,Br=xi.filterTreeNode,Vi=xi.height,Vr=xi.itemHeight,Do=xi.scrollWidth,bo=xi.virtual,$o=xi.titleRender,Zi=xi.dropIndicatorRender,wi=xi.onContextMenu,je=xi.onScroll,He=xi.direction,Ue=xi.rootClassName,fi=xi.rootStyle,Se=(0,Ut.Z)(this.props,{aria:!0,data:!0}),_i;co&&((0,te.Z)(co)==="object"?_i=co:typeof co=="function"?_i={nodeDraggable:co}:_i={});var Un={prefixCls:Ei,selectable:Fr,showIcon:mr,icon:Yr,switcherIcon:ji,draggable:_i,draggingNodeKey:ze,checkable:fo,checkStrictly:Xr,disabled:Er,keyEntities:ve,dropLevelOffset:nn,dropContainerKey:kn,dropTargetKey:Gn,dropPosition:gn,dragOverNodeKey:Ri,indent:di,direction:He,dropIndicatorRender:Zi,loadData:bt,filterTreeNode:Br,titleRender:$o,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:Un},et.createElement("div",{className:qt()(Ei,ar,Ue,(0,Wt.Z)((0,Wt.Z)((0,Wt.Z)({},"".concat(Ei,"-show-line"),Oi),"".concat(Ei,"-focused"),ke),"".concat(Ei,"-active-focused"),De!==null)),style:fi},et.createElement(sn,(0,Pt.Z)({ref:this.listRef,prefixCls:Ei,style:Qi,data:Je,disabled:Er,selectable:Fr,checkable:!!fo,motion:Zr,dragging:ze!==null,height:Vi,itemHeight:Vr,virtual:bo,focusable:Yi,focused:ke,tabIndex:Xi,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:wi,onScroll:je,scrollWidth:Do},this.getTreeNodeRequiredProps(),Se))))}}],[{key:"getDerivedStateFromProps",value:function(ge,ke){var Je=ke.prevProps,ve={prevProps:ge};function ze(Xi){return!Je&&ge.hasOwnProperty(Xi)||Je&&Je[Xi]!==ge[Xi]}var De,nn=ke.fieldNames;if(ze("fieldNames")&&(nn=(0,me.w$)(ge.fieldNames),ve.fieldNames=nn),ze("treeData")?De=ge.treeData:ze("children")&&((0,nt.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),De=(0,me.zn)(ge.children)),De){ve.treeData=De;var kn=(0,me.I8)(De,{fieldNames:nn});ve.keyEntities=(0,Ae.Z)((0,Wt.Z)({},re,li),kn.keyEntities)}var Gn=ve.keyEntities||ke.keyEntities;if(ze("expandedKeys")||Je&&ze("autoExpandParent"))ve.expandedKeys=ge.autoExpandParent||!Je&&ge.defaultExpandParent?(0,oi.r7)(ge.expandedKeys,Gn):ge.expandedKeys;else if(!Je&&ge.defaultExpandAll){var gn=(0,Ae.Z)({},Gn);delete gn[re];var Ri=[];Object.keys(gn).forEach(function(Xi){var Fr=gn[Xi];Fr.children&&Fr.children.length&&Ri.push(Fr.key)}),ve.expandedKeys=Ri}else!Je&&ge.defaultExpandedKeys&&(ve.expandedKeys=ge.autoExpandParent||ge.defaultExpandParent?(0,oi.r7)(ge.defaultExpandedKeys,Gn):ge.defaultExpandedKeys);if(ve.expandedKeys||delete ve.expandedKeys,De||ve.expandedKeys){var di=(0,me.oH)(De||ke.treeData,ve.expandedKeys||ke.expandedKeys,nn);ve.flattenNodes=di}if(ge.selectable&&(ze("selectedKeys")?ve.selectedKeys=(0,oi.BT)(ge.selectedKeys,ge):!Je&&ge.defaultSelectedKeys&&(ve.selectedKeys=(0,oi.BT)(ge.defaultSelectedKeys,ge))),ge.checkable){var xi;if(ze("checkedKeys")?xi=(0,oi.E6)(ge.checkedKeys)||{}:!Je&&ge.defaultCheckedKeys?xi=(0,oi.E6)(ge.defaultCheckedKeys)||{}:De&&(xi=(0,oi.E6)(ge.checkedKeys)||{checkedKeys:ke.checkedKeys,halfCheckedKeys:ke.halfCheckedKeys}),xi){var Ei=xi,ar=Ei.checkedKeys,Qi=ar===void 0?[]:ar,Oi=Ei.halfCheckedKeys,Yi=Oi===void 0?[]:Oi;if(!ge.checkStrictly){var Hr=(0,Ee.S)(Qi,!0,Gn);Qi=Hr.checkedKeys,Yi=Hr.halfCheckedKeys}ve.checkedKeys=Qi,ve.halfCheckedKeys=Yi}}return ze("loadedKeys")&&(ve.loadedKeys=ge.loadedKeys),ve}}]),Bt}(et.Component);(0,Wt.Z)(Ht,"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:ct,allowDrop:function(){return!0},expandAction:!1}),(0,Wt.Z)(Ht,"TreeNode",Zt.Z);var kt=Ht,mt=kt},82661:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{BT:function(){return et},E6:function(){return ct},L0:function(){return Wt},OM:function(){return nt},_5:function(){return ce},r7:function(){return pt},wA:function(){return qt},yx:function(){return Ne}});var Pt=Ot(80702),te=Ot(62853),Ae=Ot(48736),Ce=Ot(59301),de=Ot(639),Rt=Ot(65065),ne=Ot(34061),ue=null;function ce(xt,Mt){if(!xt)return[];var _t=xt.slice(),Qt=_t.indexOf(Mt);return Qt>=0&&_t.splice(Qt,1),_t}function Wt(xt,Mt){var _t=(xt||[]).slice();return _t.indexOf(Mt)===-1&&_t.push(Mt),_t}function Ne(xt){return xt.split("-")}function qt(xt,Mt){var _t=[],Qt=(0,Rt.Z)(Mt,xt);function Vt(){var Zt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Zt.forEach(function($t){var Pe=$t.key,me=$t.children;_t.push(Pe),Vt(me)})}return Vt(Qt.children),_t}function Le(xt){if(xt.parent){var Mt=Ne(xt.pos);return Number(Mt[Mt.length-1])===xt.parent.children.length-1}return!1}function Ut(xt){var Mt=Ne(xt.pos);return Number(Mt[Mt.length-1])===0}function nt(xt,Mt,_t,Qt,Vt,Zt,$t,Pe,me,$e){var tn,Cn=xt.clientX,Tn=xt.clientY,In=xt.target.getBoundingClientRect(),$n=In.top,Ln=In.height,be=($e==="rtl"?-1:1)*(((Vt==null?void 0:Vt.x)||0)-Cn),re=(be-12)/Qt,Pn=me.filter(function(mt){var vt;return(vt=Pe[mt])===null||vt===void 0||(vt=vt.children)===null||vt===void 0?void 0:vt.length}),li=(0,Rt.Z)(Pe,_t.eventKey);if(Tn<$n+Ln/2){var Jn=$t.findIndex(function(mt){return mt.key===li.key}),un=Jn<=0?0:Jn-1,Yn=$t[un].key;li=(0,Rt.Z)(Pe,Yn)}var si=li.key,Fi=li,sn=li.key,oi=0,Ee=0;if(!Pn.includes(si))for(var ci=0;ci<re&&Le(li);ci+=1)li=li.parent,Ee+=1;var Pi=Mt.data,Ht=li.node,kt=!0;return Ut(li)&&li.level===0&&Tn<$n+Ln/2&&Zt({dragNode:Pi,dropNode:Ht,dropPosition:-1})&&li.key===_t.eventKey?oi=-1:(Fi.children||[]).length&&Pn.includes(sn)?Zt({dragNode:Pi,dropNode:Ht,dropPosition:0})?oi=0:kt=!1:Ee===0?re>-1.5?Zt({dragNode:Pi,dropNode:Ht,dropPosition:1})?oi=1:kt=!1:Zt({dragNode:Pi,dropNode:Ht,dropPosition:0})?oi=0:Zt({dragNode:Pi,dropNode:Ht,dropPosition:1})?oi=1:kt=!1:Zt({dragNode:Pi,dropNode:Ht,dropPosition:1})?oi=1:kt=!1,{dropPosition:oi,dropLevelOffset:Ee,dropTargetKey:li.key,dropTargetPos:li.pos,dragOverNodeKey:sn,dropContainerKey:oi===0?null:((tn=li.parent)===null||tn===void 0?void 0:tn.key)||null,dropAllowed:kt}}function et(xt,Mt){if(xt){var _t=Mt.multiple;return _t?xt.slice():xt.length?[xt[0]]:xt}}var At=function(Mt){return Mt};function at(xt,Mt){if(!xt)return[];var _t=Mt||{},Qt=_t.processProps,Vt=Qt===void 0?At:Qt,Zt=Array.isArray(xt)?xt:[xt];return Zt.map(function($t){var Pe=$t.children,me=_objectWithoutProperties($t,ue),$e=at(Pe,Mt);return React.createElement(TreeNode,_extends({key:me.key},Vt(me)),$e)})}function ct(xt){if(!xt)return null;var Mt;if(Array.isArray(xt))Mt={checkedKeys:xt,halfCheckedKeys:void 0};else if((0,te.Z)(xt)==="object")Mt={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 Mt}function pt(xt,Mt){var _t=new Set;function Qt(Vt){if(!_t.has(Vt)){var Zt=(0,Rt.Z)(Mt,Vt);if(Zt){_t.add(Vt);var $t=Zt.parent,Pe=Zt.node;Pe.disabled||$t&&Qt($t.key)}}}return(xt||[]).forEach(function(Vt){Qt(Vt)}),(0,Pt.Z)(_t)}},34643:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{S:function(){return ne}});var Pt=Ot(48736),te=Ot(65065);function Ae(ue,ce){var Wt=new Set;return ue.forEach(function(Ne){ce.has(Ne)||Wt.add(Ne)}),Wt}function Ce(ue){var ce=ue||{},Wt=ce.disabled,Ne=ce.disableCheckbox,qt=ce.checkable;return!!(Wt||Ne)||qt===!1}function de(ue,ce,Wt,Ne){for(var qt=new Set(ue),Le=new Set,Ut=0;Ut<=Wt;Ut+=1){var nt=ce.get(Ut)||new Set;nt.forEach(function(ct){var pt=ct.key,xt=ct.node,Mt=ct.children,_t=Mt===void 0?[]:Mt;qt.has(pt)&&!Ne(xt)&&_t.filter(function(Qt){return!Ne(Qt.node)}).forEach(function(Qt){qt.add(Qt.key)})})}for(var et=new Set,At=Wt;At>=0;At-=1){var at=ce.get(At)||new Set;at.forEach(function(ct){var pt=ct.parent,xt=ct.node;if(!(Ne(xt)||!ct.parent||et.has(ct.parent.key))){if(Ne(ct.parent.node)){et.add(pt.key);return}var Mt=!0,_t=!1;(pt.children||[]).filter(function(Qt){return!Ne(Qt.node)}).forEach(function(Qt){var Vt=Qt.key,Zt=qt.has(Vt);Mt&&!Zt&&(Mt=!1),!_t&&(Zt||Le.has(Vt))&&(_t=!0)}),Mt&&qt.add(pt.key),_t&&Le.add(pt.key),et.add(pt.key)}})}return{checkedKeys:Array.from(qt),halfCheckedKeys:Array.from(Ae(Le,qt))}}function Rt(ue,ce,Wt,Ne,qt){for(var Le=new Set(ue),Ut=new Set(ce),nt=0;nt<=Ne;nt+=1){var et=Wt.get(nt)||new Set;et.forEach(function(pt){var xt=pt.key,Mt=pt.node,_t=pt.children,Qt=_t===void 0?[]:_t;!Le.has(xt)&&!Ut.has(xt)&&!qt(Mt)&&Qt.filter(function(Vt){return!qt(Vt.node)}).forEach(function(Vt){Le.delete(Vt.key)})})}Ut=new Set;for(var At=new Set,at=Ne;at>=0;at-=1){var ct=Wt.get(at)||new Set;ct.forEach(function(pt){var xt=pt.parent,Mt=pt.node;if(!(qt(Mt)||!pt.parent||At.has(pt.parent.key))){if(qt(pt.parent.node)){At.add(xt.key);return}var _t=!0,Qt=!1;(xt.children||[]).filter(function(Vt){return!qt(Vt.node)}).forEach(function(Vt){var Zt=Vt.key,$t=Le.has(Zt);_t&&!$t&&(_t=!1),!Qt&&($t||Ut.has(Zt))&&(Qt=!0)}),_t||Le.delete(xt.key),Qt&&Ut.add(xt.key),At.add(xt.key)}})}return{checkedKeys:Array.from(Le),halfCheckedKeys:Array.from(Ae(Ut,Le))}}function ne(ue,ce,Wt,Ne){var qt=[],Le;Ne?Le=Ne:Le=Ce;var Ut=new Set(ue.filter(function(at){var ct=!!(0,te.Z)(Wt,at);return ct||qt.push(at),ct})),nt=new Map,et=0;Object.keys(Wt).forEach(function(at){var ct=Wt[at],pt=ct.level,xt=nt.get(pt);xt||(xt=new Set,nt.set(pt,xt)),xt.add(ct),et=Math.max(et,pt)}),(0,Pt.ZP)(!qt.length,"Tree missing follow keys: ".concat(qt.slice(0,100).map(function(at){return"'".concat(at,"'")}).join(", ")));var At;return ce===!0?At=de(Ut,nt,et,Le):At=Rt(Ut,ce.halfCheckedKeys,nt,et,Le),At}},65065:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{Z:function(){return Pt}});function Pt(te,Ae){return te[Ae]}},34061:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{F:function(){return pt},H8:function(){return ct},I8:function(){return at},km:function(){return qt},oH:function(){return et},w$:function(){return Le},zn:function(){return nt}});var Pt=Ot(62853),te=Ot(80702),Ae=Ot(77321),Ce=Ot(74416),de=Ot(11592),Rt=Ot(2738),ne=Ot(48736),ue=Ot(65065),ce=["children"];function Wt(xt,Mt){return"".concat(xt,"-").concat(Mt)}function Ne(xt){return xt&&xt.type&&xt.type.isTreeNode}function qt(xt,Mt){return xt!=null?xt:Mt}function Le(xt){var Mt=xt||{},_t=Mt.title,Qt=Mt._title,Vt=Mt.key,Zt=Mt.children,$t=_t||"title";return{title:$t,_title:Qt||[$t],key:Vt||"key",children:Zt||"children"}}function Ut(xt,Mt){var _t=new Map;function Qt(Vt){var Zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Vt||[]).forEach(function($t){var Pe=$t[Mt.key],me=$t[Mt.children];warning(Pe!=null,"Tree node must have a certain key: [".concat(Zt).concat(Pe,"]"));var $e=String(Pe);warning(!_t.has($e)||Pe===null||Pe===void 0,"Same 'key' exist in the Tree: ".concat($e)),_t.set($e,!0),Qt(me,"".concat(Zt).concat($e," > "))})}Qt(xt)}function nt(xt){function Mt(_t){var Qt=(0,de.Z)(_t);return Qt.map(function(Vt){if(!Ne(Vt))return(0,ne.ZP)(!Vt,"Tree/TreeNode can only accept TreeNode as children."),null;var Zt=Vt.key,$t=Vt.props,Pe=$t.children,me=(0,Ce.Z)($t,ce),$e=(0,Ae.Z)({key:Zt},me),tn=Mt(Pe);return tn.length&&($e.children=tn),$e}).filter(function(Vt){return Vt})}return Mt(xt)}function et(xt,Mt,_t){var Qt=Le(_t),Vt=Qt._title,Zt=Qt.key,$t=Qt.children,Pe=new Set(Mt===!0?[]:Mt),me=[];function $e(tn){var Cn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return tn.map(function(Tn,In){for(var $n=Wt(Cn?Cn.pos:"0",In),Ln=qt(Tn[Zt],$n),be,re=0;re<Vt.length;re+=1){var Pn=Vt[re];if(Tn[Pn]!==void 0){be=Tn[Pn];break}}var li=Object.assign((0,Rt.Z)(Tn,[].concat((0,te.Z)(Vt),[Zt,$t])),{title:be,key:Ln,parent:Cn,pos:$n,children:null,data:Tn,isStart:[].concat((0,te.Z)(Cn?Cn.isStart:[]),[In===0]),isEnd:[].concat((0,te.Z)(Cn?Cn.isEnd:[]),[In===tn.length-1])});return me.push(li),Mt===!0||Pe.has(Ln)?li.children=$e(Tn[$t]||[],li):li.children=[],li})}return $e(xt),me}function At(xt,Mt,_t){var Qt={};(0,Pt.Z)(_t)==="object"?Qt=_t:Qt={externalGetKey:_t},Qt=Qt||{};var Vt=Qt,Zt=Vt.childrenPropName,$t=Vt.externalGetKey,Pe=Vt.fieldNames,me=Le(Pe),$e=me.key,tn=me.children,Cn=Zt||tn,Tn;$t?typeof $t=="string"?Tn=function(Ln){return Ln[$t]}:typeof $t=="function"&&(Tn=function(Ln){return $t(Ln)}):Tn=function(Ln,be){return qt(Ln[$e],be)};function In($n,Ln,be,re){var Pn=$n?$n[Cn]:xt,li=$n?Wt(be.pos,Ln):"0",Jn=$n?[].concat((0,te.Z)(re),[$n]):[];if($n){var un=Tn($n,li),Yn={node:$n,index:Ln,pos:li,key:un,parentPos:be.node?be.pos:null,level:be.level+1,nodes:Jn};Mt(Yn)}Pn&&Pn.forEach(function(si,Fi){In(si,Fi,{node:$n,pos:li,level:be?be.level+1:-1},Jn)})}In(null)}function at(xt){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_t=Mt.initWrapper,Qt=Mt.processEntity,Vt=Mt.onProcessFinished,Zt=Mt.externalGetKey,$t=Mt.childrenPropName,Pe=Mt.fieldNames,me=arguments.length>2?arguments[2]:void 0,$e=Zt||me,tn={},Cn={},Tn={posEntities:tn,keyEntities:Cn};return _t&&(Tn=_t(Tn)||Tn),At(xt,function(In){var $n=In.node,Ln=In.index,be=In.pos,re=In.key,Pn=In.parentPos,li=In.level,Jn=In.nodes,un={node:$n,nodes:Jn,index:Ln,key:re,pos:be,level:li},Yn=qt(re,be);tn[be]=un,Cn[Yn]=un,un.parent=tn[Pn],un.parent&&(un.parent.children=un.parent.children||[],un.parent.children.push(un)),Qt&&Qt(un,Tn)},{externalGetKey:$e,childrenPropName:$t,fieldNames:Pe}),Vt&&Vt(Tn),Tn}function ct(xt,Mt){var _t=Mt.expandedKeys,Qt=Mt.selectedKeys,Vt=Mt.loadedKeys,Zt=Mt.loadingKeys,$t=Mt.checkedKeys,Pe=Mt.halfCheckedKeys,me=Mt.dragOverNodeKey,$e=Mt.dropPosition,tn=Mt.keyEntities,Cn=(0,ue.Z)(tn,xt),Tn={eventKey:xt,expanded:_t.indexOf(xt)!==-1,selected:Qt.indexOf(xt)!==-1,loaded:Vt.indexOf(xt)!==-1,loading:Zt.indexOf(xt)!==-1,checked:$t.indexOf(xt)!==-1,halfChecked:Pe.indexOf(xt)!==-1,pos:String(Cn?Cn.pos:""),dragOver:me===xt&&$e===0,dragOverGapTop:me===xt&&$e===-1,dragOverGapBottom:me===xt&&$e===1};return Tn}function pt(xt){var Mt=xt.data,_t=xt.expanded,Qt=xt.selected,Vt=xt.checked,Zt=xt.loaded,$t=xt.loading,Pe=xt.halfChecked,me=xt.dragOver,$e=xt.dragOverGapTop,tn=xt.dragOverGapBottom,Cn=xt.pos,Tn=xt.active,In=xt.eventKey,$n=(0,Ae.Z)((0,Ae.Z)({},Mt),{},{expanded:_t,selected:Qt,checked:Vt,loaded:Zt,loading:$t,halfChecked:Pe,dragOver:me,dragOverGapTop:$e,dragOverGapBottom:tn,pos:Cn,active:Tn,key:In});return"props"in $n||Object.defineProperty($n,"props",{get:function(){return(0,ne.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),xt}}),$n}},8224:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{Z:function(){return te}});var Pt=Ot(4676);function te(Ae,Ce,de,Rt){var ne=Pt.unstable_batchedUpdates?function(ce){Pt.unstable_batchedUpdates(de,ce)}:de;return Ae!=null&&Ae.addEventListener&&Ae.addEventListener(Ce,ne,Rt),{remove:function(){Ae!=null&&Ae.removeEventListener&&Ae.removeEventListener(Ce,ne,Rt)}}}},24514:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{G:function(){return Ce}});var Pt=Ot(47273),te=function(Rt){if((0,Pt.Z)()&&window.document.documentElement){var ne=Array.isArray(Rt)?Rt:[Rt],ue=window.document.documentElement;return ne.some(function(ce){return ce in ue.style})}return!1},Ae=function(Rt,ne){if(!te(Rt))return!1;var ue=document.createElement("div"),ce=ue.style[Rt];return ue.style[Rt]=ne,ue.style[Rt]!==ce};function Ce(de,Rt){return!Array.isArray(de)&&Rt!==void 0?Ae(de,Rt):te(de)}},45680:function(Bn,Ve,Ot){"use strict";Ot.d(Ve,{Z:function(){return Pi}});var Pt=Ot(72308),te=Ot(62853),Ae=Ot(77321),Ce=Ot(49618),de=Ot(52487),Rt=Ot(74416),ne=Ot(92310),ue=Ot.n(ne),ce=Ot(29301),Wt=Ot(70425),Ne=Ot(34280),qt=Ot(59301),Le=Ot(4676),Ut=qt.forwardRef(function(Ht,kt){var mt=Ht.height,vt=Ht.offsetY,Lt=Ht.offsetX,Bt=Ht.children,Kt=Ht.prefixCls,ge=Ht.onInnerResize,ke=Ht.innerProps,Je=Ht.rtl,ve=Ht.extra,ze={},De={display:"flex",flexDirection:"column"};return vt!==void 0&&(ze={height:mt,position:"relative",overflow:"hidden"},De=(0,Ae.Z)((0,Ae.Z)({},De),{},(0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)({transform:"translateY(".concat(vt,"px)")},Je?"marginRight":"marginLeft",-Lt),"position","absolute"),"left",0),"right",0),"top",0))),qt.createElement("div",{style:ze},qt.createElement(ce.Z,{onResize:function(kn){var Gn=kn.offsetHeight;Gn&&ge&&ge()}},qt.createElement("div",(0,Pt.Z)({style:De,className:ue()((0,Ce.Z)({},"".concat(Kt,"-holder-inner"),Kt)),ref:kt},ke),Bt,ve)))});Ut.displayName="Filler";var nt=Ut;function et(Ht){var kt=Ht.children,mt=Ht.setRef,vt=qt.useCallback(function(Lt){mt(Lt)},[]);return qt.cloneElement(kt,{ref:vt})}function At(Ht,kt,mt,vt,Lt,Bt,Kt,ge){var ke=ge.getKey;return Ht.slice(kt,mt+1).map(function(Je,ve){var ze=kt+ve,De=Kt(Je,ze,{style:{width:vt},offsetX:Lt}),nn=ke(Je);return qt.createElement(et,{key:nn,setRef:function(Gn){return Bt(Je,Gn)}},De)})}function at(Ht,kt,mt,vt){var Lt=mt-Ht,Bt=kt-mt,Kt=Math.min(Lt,Bt)*2;if(vt<=Kt){var ge=Math.floor(vt/2);return vt%2?mt+ge+1:mt-ge}return Lt>Bt?mt-(vt-Bt):mt+(vt-Lt)}function ct(Ht,kt,mt){var vt=Ht.length,Lt=kt.length,Bt,Kt;if(vt===0&&Lt===0)return null;vt<Lt?(Bt=Ht,Kt=kt):(Bt=kt,Kt=Ht);var ge={__EMPTY_ITEM__:!0};function ke(kn){return kn!==void 0?mt(kn):ge}for(var Je=null,ve=Math.abs(vt-Lt)!==1,ze=0;ze<Kt.length;ze+=1){var De=ke(Bt[ze]),nn=ke(Kt[ze]);if(De!==nn){Je=ze,ve=ve||De!==ke(Kt[ze+1]);break}}return Je===null?null:{index:Je,multiple:ve}}function pt(Ht,kt,mt){var vt=qt.useState(Ht),Lt=(0,de.Z)(vt,2),Bt=Lt[0],Kt=Lt[1],ge=qt.useState(null),ke=(0,de.Z)(ge,2),Je=ke[0],ve=ke[1];return qt.useEffect(function(){var ze=ct(Bt||[],Ht||[],kt);(ze==null?void 0:ze.index)!==void 0&&(mt==null||mt(ze.index),ve(Ht[ze.index])),Kt(Ht)},[Ht]),[Je]}var xt=Ot(16089),Mt=(typeof navigator=="undefined"?"undefined":(0,te.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),_t=Mt,Qt=function(Ht,kt,mt,vt){var Lt=(0,qt.useRef)(!1),Bt=(0,qt.useRef)(null);function Kt(){clearTimeout(Bt.current),Lt.current=!0,Bt.current=setTimeout(function(){Lt.current=!1},50)}var ge=(0,qt.useRef)({top:Ht,bottom:kt,left:mt,right:vt});return ge.current.top=Ht,ge.current.bottom=kt,ge.current.left=mt,ge.current.right=vt,function(ke,Je){var ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ze=ke?Je<0&&ge.current.left||Je>0&&ge.current.right:Je<0&&ge.current.top||Je>0&&ge.current.bottom;return ve&&ze?(clearTimeout(Bt.current),Lt.current=!1):(!ze||Lt.current)&&Kt(),!Lt.current&&ze}};function Vt(Ht,kt,mt,vt,Lt,Bt,Kt){var ge=(0,qt.useRef)(0),ke=(0,qt.useRef)(null),Je=(0,qt.useRef)(null),ve=(0,qt.useRef)(!1),ze=Qt(kt,mt,vt,Lt);function De(di,xi){if(xt.Z.cancel(ke.current),!ze(!1,xi)){var Ei=di;if(!Ei._virtualHandled)Ei._virtualHandled=!0;else return;ge.current+=xi,Je.current=xi,_t||Ei.preventDefault(),ke.current=(0,xt.Z)(function(){var ar=ve.current?10:1;Kt(ge.current*ar,!1),ge.current=0})}}function nn(di,xi){Kt(xi,!0),_t||di.preventDefault()}var kn=(0,qt.useRef)(null),Gn=(0,qt.useRef)(null);function gn(di){if(Ht){xt.Z.cancel(Gn.current),Gn.current=(0,xt.Z)(function(){kn.current=null},2);var xi=di.deltaX,Ei=di.deltaY,ar=di.shiftKey,Qi=xi,Oi=Ei;(kn.current==="sx"||!kn.current&&ar&&Ei&&!xi)&&(Qi=Ei,Oi=0,kn.current="sx");var Yi=Math.abs(Qi),Hr=Math.abs(Oi);kn.current===null&&(kn.current=Bt&&Yi>Hr?"x":"y"),kn.current==="y"?De(di,Oi):nn(di,Qi)}}function Ri(di){Ht&&(ve.current=di.detail===Je.current)}return[gn,Ri]}function Zt(Ht,kt,mt,vt){var Lt=qt.useMemo(function(){return[new Map,[]]},[Ht,mt.id,vt]),Bt=(0,de.Z)(Lt,2),Kt=Bt[0],ge=Bt[1],ke=function(ve){var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ve,De=Kt.get(ve),nn=Kt.get(ze);if(De===void 0||nn===void 0)for(var kn=Ht.length,Gn=ge.length;Gn<kn;Gn+=1){var gn,Ri=Ht[Gn],di=kt(Ri);Kt.set(di,Gn);var xi=(gn=mt.get(di))!==null&&gn!==void 0?gn:vt;if(ge[Gn]=(ge[Gn-1]||0)+xi,di===ve&&(De=Gn),di===ze&&(nn=Gn),De!==void 0&&nn!==void 0)break}return{top:ge[De-1]||0,bottom:ge[nn]}};return ke}var $t=Ot(96949),Pe=Ot(55090),me=function(){function Ht(){(0,$t.Z)(this,Ht),(0,Ce.Z)(this,"maps",void 0),(0,Ce.Z)(this,"id",0),(0,Ce.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,Pe.Z)(Ht,[{key:"set",value:function(mt,vt){this.maps[mt]=vt,this.id+=1,this.diffKeys.add(mt)}},{key:"get",value:function(mt){return this.maps[mt]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),Ht}(),$e=me;function tn(Ht){var kt=parseFloat(Ht);return isNaN(kt)?0:kt}function Cn(Ht,kt,mt){var vt=qt.useState(0),Lt=(0,de.Z)(vt,2),Bt=Lt[0],Kt=Lt[1],ge=(0,qt.useRef)(new Map),ke=(0,qt.useRef)(new $e),Je=(0,qt.useRef)(0);function ve(){Je.current+=1}function ze(){var nn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;ve();var kn=function(){var Ri=!1;ge.current.forEach(function(di,xi){if(di&&di.offsetParent){var Ei=di.offsetHeight,ar=getComputedStyle(di),Qi=ar.marginTop,Oi=ar.marginBottom,Yi=tn(Qi),Hr=tn(Oi),Xi=Ei+Yi+Hr;ke.current.get(xi)!==Xi&&(ke.current.set(xi,Xi),Ri=!0)}}),Ri&&Kt(function(di){return di+1})};if(nn)kn();else{Je.current+=1;var Gn=Je.current;Promise.resolve().then(function(){Gn===Je.current&&kn()})}}function De(nn,kn){var Gn=Ht(nn),gn=ge.current.get(Gn);kn?(ge.current.set(Gn,kn),ze()):ge.current.delete(Gn),!gn!=!kn&&(kn?kt==null||kt(nn):mt==null||mt(nn))}return(0,qt.useEffect)(function(){return ve},[]),[De,ze,ke.current,Bt]}var Tn=14/15;function In(Ht,kt,mt){var vt=(0,qt.useRef)(!1),Lt=(0,qt.useRef)(0),Bt=(0,qt.useRef)(0),Kt=(0,qt.useRef)(null),ge=(0,qt.useRef)(null),ke,Je=function(nn){if(vt.current){var kn=Math.ceil(nn.touches[0].pageX),Gn=Math.ceil(nn.touches[0].pageY),gn=Lt.current-kn,Ri=Bt.current-Gn,di=Math.abs(gn)>Math.abs(Ri);di?Lt.current=kn:Bt.current=Gn;var xi=mt(di,di?gn:Ri,!1,nn);xi&&nn.preventDefault(),clearInterval(ge.current),xi&&(ge.current=setInterval(function(){di?gn*=Tn:Ri*=Tn;var Ei=Math.floor(di?gn:Ri);(!mt(di,Ei,!0)||Math.abs(Ei)<=.1)&&clearInterval(ge.current)},16))}},ve=function(){vt.current=!1,ke()},ze=function(nn){ke(),nn.touches.length===1&&!vt.current&&(vt.current=!0,Lt.current=Math.ceil(nn.touches[0].pageX),Bt.current=Math.ceil(nn.touches[0].pageY),Kt.current=nn.target,Kt.current.addEventListener("touchmove",Je,{passive:!1}),Kt.current.addEventListener("touchend",ve,{passive:!0}))};ke=function(){Kt.current&&(Kt.current.removeEventListener("touchmove",Je),Kt.current.removeEventListener("touchend",ve))},(0,Ne.Z)(function(){return Ht&&kt.current.addEventListener("touchstart",ze,{passive:!0}),function(){var De;(De=kt.current)===null||De===void 0||De.removeEventListener("touchstart",ze),ke(),clearInterval(ge.current)}},[Ht])}function $n(Ht){return Math.floor(Math.pow(Ht,.5))}function Ln(Ht,kt){var mt="touches"in Ht?Ht.touches[0]:Ht;return mt[kt?"pageX":"pageY"]-window[kt?"scrollX":"scrollY"]}function be(Ht,kt,mt){qt.useEffect(function(){var vt=kt.current;if(Ht&&vt){var Lt=!1,Bt,Kt,ge=function(){xt.Z.cancel(Bt)},ke=function De(){ge(),Bt=(0,xt.Z)(function(){mt(Kt),De()})},Je=function(nn){if(!(nn.target.draggable||nn.button!==0)){var kn=nn;kn._virtualHandled||(kn._virtualHandled=!0,Lt=!0)}},ve=function(){Lt=!1,ge()},ze=function(nn){if(Lt){var kn=Ln(nn,!1),Gn=vt.getBoundingClientRect(),gn=Gn.top,Ri=Gn.bottom;if(kn<=gn){var di=gn-kn;Kt=-$n(di),ke()}else if(kn>=Ri){var xi=kn-Ri;Kt=$n(xi),ke()}else ge()}};return vt.addEventListener("mousedown",Je),vt.ownerDocument.addEventListener("mouseup",ve),vt.ownerDocument.addEventListener("mousemove",ze),function(){vt.removeEventListener("mousedown",Je),vt.ownerDocument.removeEventListener("mouseup",ve),vt.ownerDocument.removeEventListener("mousemove",ze),ge()}}},[Ht])}var re=10;function Pn(Ht,kt,mt,vt,Lt,Bt,Kt,ge){var ke=qt.useRef(),Je=qt.useState(null),ve=(0,de.Z)(Je,2),ze=ve[0],De=ve[1];return(0,Ne.Z)(function(){if(ze&&ze.times<re){if(!Ht.current){De(function(Zr){return(0,Ae.Z)({},Zr)});return}Bt();var nn=ze.targetAlign,kn=ze.originAlign,Gn=ze.index,gn=ze.offset,Ri=Ht.current.clientHeight,di=!1,xi=nn,Ei=null;if(Ri){for(var ar=nn||kn,Qi=0,Oi=0,Yi=0,Hr=Math.min(kt.length-1,Gn),Xi=0;Xi<=Hr;Xi+=1){var Fr=Lt(kt[Xi]);Oi=Qi;var mr=mt.get(Fr);Yi=Oi+(mr===void 0?vt:mr),Qi=Yi}for(var Yr=ar==="top"?gn:Ri-gn,ji=Hr;ji>=0;ji-=1){var co=Lt(kt[ji]),fo=mt.get(co);if(fo===void 0){di=!0;break}if(Yr-=fo,Yr<=0)break}switch(ar){case"top":Ei=Oi-gn;break;case"bottom":Ei=Yi-Ri+gn;break;default:{var Xr=Ht.current.scrollTop,Er=Xr+Ri;Oi<Xr?xi="top":Yi>Er&&(xi="bottom")}}Ei!==null&&Kt(Ei),Ei!==ze.lastTop&&(di=!0)}di&&De((0,Ae.Z)((0,Ae.Z)({},ze),{},{times:ze.times+1,targetAlign:xi,lastTop:Ei}))}},[ze,Ht.current]),function(nn){if(nn==null){ge();return}if(xt.Z.cancel(ke.current),typeof nn=="number")Kt(nn);else if(nn&&(0,te.Z)(nn)==="object"){var kn,Gn=nn.align;"index"in nn?kn=nn.index:kn=kt.findIndex(function(di){return Lt(di)===nn.key});var gn=nn.offset,Ri=gn===void 0?0:gn;De({times:0,index:kn,offset:Ri,originAlign:Gn})}}}var li=qt.forwardRef(function(Ht,kt){var mt=Ht.prefixCls,vt=Ht.rtl,Lt=Ht.scrollOffset,Bt=Ht.scrollRange,Kt=Ht.onStartMove,ge=Ht.onStopMove,ke=Ht.onScroll,Je=Ht.horizontal,ve=Ht.spinSize,ze=Ht.containerSize,De=Ht.style,nn=Ht.thumbStyle,kn=Ht.showScrollBar,Gn=qt.useState(!1),gn=(0,de.Z)(Gn,2),Ri=gn[0],di=gn[1],xi=qt.useState(null),Ei=(0,de.Z)(xi,2),ar=Ei[0],Qi=Ei[1],Oi=qt.useState(null),Yi=(0,de.Z)(Oi,2),Hr=Yi[0],Xi=Yi[1],Fr=!vt,mr=qt.useRef(),Yr=qt.useRef(),ji=qt.useState(kn),co=(0,de.Z)(ji,2),fo=co[0],Xr=co[1],Er=qt.useRef(),Zr=function(){kn===!0||kn===!1||(clearTimeout(Er.current),Xr(!0),Er.current=setTimeout(function(){Xr(!1)},3e3))},bt=Bt-ze||0,Br=ze-ve||0,Vi=qt.useMemo(function(){if(Lt===0||bt===0)return 0;var Ue=Lt/bt;return Ue*Br},[Lt,bt,Br]),Vr=function(fi){fi.stopPropagation(),fi.preventDefault()},Do=qt.useRef({top:Vi,dragging:Ri,pageY:ar,startTop:Hr});Do.current={top:Vi,dragging:Ri,pageY:ar,startTop:Hr};var bo=function(fi){di(!0),Qi(Ln(fi,Je)),Xi(Do.current.top),Kt(),fi.stopPropagation(),fi.preventDefault()};qt.useEffect(function(){var Ue=function(Un){Un.preventDefault()},fi=mr.current,Se=Yr.current;return fi.addEventListener("touchstart",Ue,{passive:!1}),Se.addEventListener("touchstart",bo,{passive:!1}),function(){fi.removeEventListener("touchstart",Ue),Se.removeEventListener("touchstart",bo)}},[]);var $o=qt.useRef();$o.current=bt;var Zi=qt.useRef();Zi.current=Br,qt.useEffect(function(){if(Ri){var Ue,fi=function(Un){var Ai=Do.current,We=Ai.dragging,Ke=Ai.pageY,ui=Ai.startTop;xt.Z.cancel(Ue);var he=mr.current.getBoundingClientRect(),rn=ze/(Je?he.width:he.height);if(We){var Wn=(Ln(Un,Je)-Ke)*rn,pi=ui;!Fr&&Je?pi-=Wn:pi+=Wn;var on=$o.current,yn=Zi.current,ii=yn?pi/yn:0,hn=Math.ceil(ii*on);hn=Math.max(hn,0),hn=Math.min(hn,on),Ue=(0,xt.Z)(function(){ke(hn,Je)})}},Se=function(){di(!1),ge()};return window.addEventListener("mousemove",fi,{passive:!0}),window.addEventListener("touchmove",fi,{passive:!0}),window.addEventListener("mouseup",Se,{passive:!0}),window.addEventListener("touchend",Se,{passive:!0}),function(){window.removeEventListener("mousemove",fi),window.removeEventListener("touchmove",fi),window.removeEventListener("mouseup",Se),window.removeEventListener("touchend",Se),xt.Z.cancel(Ue)}}},[Ri]),qt.useEffect(function(){return Zr(),function(){clearTimeout(Er.current)}},[Lt]),qt.useImperativeHandle(kt,function(){return{delayHidden:Zr}});var wi="".concat(mt,"-scrollbar"),je={position:"absolute",visibility:fo?null:"hidden"},He={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Je?(je.height=8,je.left=0,je.right=0,je.bottom=0,He.height="100%",He.width=ve,Fr?He.left=Vi:He.right=Vi):(je.width=8,je.top=0,je.bottom=0,Fr?je.right=0:je.left=0,He.width="100%",He.height=ve,He.top=Vi),qt.createElement("div",{ref:mr,className:ue()(wi,(0,Ce.Z)((0,Ce.Z)((0,Ce.Z)({},"".concat(wi,"-horizontal"),Je),"".concat(wi,"-vertical"),!Je),"".concat(wi,"-visible"),fo)),style:(0,Ae.Z)((0,Ae.Z)({},je),De),onMouseDown:Vr,onMouseMove:Zr},qt.createElement("div",{ref:Yr,className:ue()("".concat(wi,"-thumb"),(0,Ce.Z)({},"".concat(wi,"-thumb-moving"),Ri)),style:(0,Ae.Z)((0,Ae.Z)({},He),nn),onMouseDown:bo}))}),Jn=li,un=20;function Yn(){var Ht=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,mt=Ht/kt*Ht;return isNaN(mt)&&(mt=0),mt=Math.max(mt,un),Math.floor(mt)}var si=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Fi=[],sn={overflowY:"auto",overflowAnchor:"none"};function oi(Ht,kt){var mt=Ht.prefixCls,vt=mt===void 0?"rc-virtual-list":mt,Lt=Ht.className,Bt=Ht.height,Kt=Ht.itemHeight,ge=Ht.fullHeight,ke=ge===void 0?!0:ge,Je=Ht.style,ve=Ht.data,ze=Ht.children,De=Ht.itemKey,nn=Ht.virtual,kn=Ht.direction,Gn=Ht.scrollWidth,gn=Ht.component,Ri=gn===void 0?"div":gn,di=Ht.onScroll,xi=Ht.onVirtualScroll,Ei=Ht.onVisibleChange,ar=Ht.innerProps,Qi=Ht.extraRender,Oi=Ht.styles,Yi=Ht.showScrollBar,Hr=Yi===void 0?"optional":Yi,Xi=(0,Rt.Z)(Ht,si),Fr=qt.useCallback(function(Ge){return typeof De=="function"?De(Ge):Ge==null?void 0:Ge[De]},[De]),mr=Cn(Fr,null,null),Yr=(0,de.Z)(mr,4),ji=Yr[0],co=Yr[1],fo=Yr[2],Xr=Yr[3],Er=!!(nn!==!1&&Bt&&Kt),Zr=qt.useMemo(function(){return Object.values(fo.maps).reduce(function(Ge,fn){return Ge+fn},0)},[fo.id,fo.maps]),bt=Er&&ve&&(Math.max(Kt*ve.length,Zr)>Bt||!!Gn),Br=kn==="rtl",Vi=ue()(vt,(0,Ce.Z)({},"".concat(vt,"-rtl"),Br),Lt),Vr=ve||Fi,Do=(0,qt.useRef)(),bo=(0,qt.useRef)(),$o=(0,qt.useRef)(),Zi=(0,qt.useState)(0),wi=(0,de.Z)(Zi,2),je=wi[0],He=wi[1],Ue=(0,qt.useState)(0),fi=(0,de.Z)(Ue,2),Se=fi[0],_i=fi[1],Un=(0,qt.useState)(!1),Ai=(0,de.Z)(Un,2),We=Ai[0],Ke=Ai[1],ui=function(){Ke(!0)},he=function(){Ke(!1)},rn={getKey:Fr};function Wn(Ge){He(function(fn){var Fn;typeof Ge=="function"?Fn=Ge(fn):Fn=Ge;var Sn=ki(Fn);return Do.current.scrollTop=Sn,Sn})}var pi=(0,qt.useRef)({start:0,end:Vr.length}),on=(0,qt.useRef)(),yn=pt(Vr,Fr),ii=(0,de.Z)(yn,1),hn=ii[0];on.current=hn;var An=qt.useMemo(function(){if(!Er)return{scrollHeight:void 0,start:0,end:Vr.length-1,offset:void 0};if(!bt){var Ge;return{scrollHeight:((Ge=bo.current)===null||Ge===void 0?void 0:Ge.offsetHeight)||0,start:0,end:Vr.length-1,offset:void 0}}for(var fn=0,Fn,Sn,dn,gi=Vr.length,Vn=0;Vn<gi;Vn+=1){var qn=Vr[Vn],cn=Fr(qn),ri=fo.get(cn),Ui=fn+(ri===void 0?Kt:ri);Ui>=je&&Fn===void 0&&(Fn=Vn,Sn=fn),Ui>je+Bt&&dn===void 0&&(dn=Vn),fn=Ui}return Fn===void 0&&(Fn=0,Sn=0,dn=Math.ceil(Bt/Kt)),dn===void 0&&(dn=Vr.length-1),dn=Math.min(dn+1,Vr.length-1),{scrollHeight:fn,start:Fn,end:dn,offset:Sn}},[bt,Er,je,Vr,Xr,Bt]),xn=An.scrollHeight,Nn=An.start,ai=An.end,Ki=An.offset;pi.current.start=Nn,pi.current.end=ai,qt.useLayoutEffect(function(){var Ge=fo.getRecord();if(Ge.size===1){var fn=Array.from(Ge)[0],Fn=Vr[Nn];if(Fn){var Sn=Fr(Fn);if(Sn===fn){var dn=fo.get(fn),gi=dn-Kt;Wn(function(Vn){return Vn+gi})}}}fo.resetRecord()},[xn]);var Ni=qt.useState({width:0,height:Bt}),Ti=(0,de.Z)(Ni,2),en=Ti[0],br=Ti[1],cr=function(fn){br({width:fn.offsetWidth,height:fn.offsetHeight})},Kr=(0,qt.useRef)(),Ze=(0,qt.useRef)(),ni=qt.useMemo(function(){return Yn(en.width,Gn)},[en.width,Gn]),Bi=qt.useMemo(function(){return Yn(en.height,xn)},[en.height,xn]),Hi=xn-Bt,vi=(0,qt.useRef)(Hi);vi.current=Hi;function ki(Ge){var fn=Ge;return Number.isNaN(vi.current)||(fn=Math.min(fn,vi.current)),fn=Math.max(fn,0),fn}var er=je<=0,lr=je>=Hi,oe=Se<=0,ae=Se>=Gn,ee=Qt(er,lr,oe,ae),Ye=function(){return{x:Br?-Se:Se,y:je}},Be=(0,qt.useRef)(Ye()),ln=(0,Wt.zX)(function(Ge){if(xi){var fn=(0,Ae.Z)((0,Ae.Z)({},Ye()),Ge);(Be.current.x!==fn.x||Be.current.y!==fn.y)&&(xi(fn),Be.current=fn)}});function Dn(Ge,fn){var Fn=Ge;fn?((0,Le.flushSync)(function(){_i(Fn)}),ln()):Wn(Fn)}function Zn(Ge){var fn=Ge.currentTarget.scrollTop;fn!==je&&Wn(fn),di==null||di(Ge),ln()}var Li=function(fn){var Fn=fn,Sn=Gn?Gn-en.width:0;return Fn=Math.max(Fn,0),Fn=Math.min(Fn,Sn),Fn},Mi=(0,Wt.zX)(function(Ge,fn){fn?((0,Le.flushSync)(function(){_i(function(Fn){var Sn=Fn+(Br?-Ge:Ge);return Li(Sn)})}),ln()):Wn(function(Fn){var Sn=Fn+Ge;return Sn})}),Te=Vt(Er,er,lr,oe,ae,!!Gn,Mi),yi=(0,de.Z)(Te,2),Me=yi[0],an=yi[1];In(Er,Do,function(Ge,fn,Fn,Sn){var dn=Sn;return ee(Ge,fn,Fn)?!1:!dn||!dn._virtualHandled?(dn&&(dn._virtualHandled=!0),Me({preventDefault:function(){},deltaX:Ge?fn:0,deltaY:Ge?0:fn}),!0):!1}),be(bt,Do,function(Ge){Wn(function(fn){return fn+Ge})}),(0,Ne.Z)(function(){function Ge(Fn){var Sn=er&&Fn.detail<0,dn=lr&&Fn.detail>0;Er&&!Sn&&!dn&&Fn.preventDefault()}var fn=Do.current;return fn.addEventListener("wheel",Me,{passive:!1}),fn.addEventListener("DOMMouseScroll",an,{passive:!0}),fn.addEventListener("MozMousePixelScroll",Ge,{passive:!1}),function(){fn.removeEventListener("wheel",Me),fn.removeEventListener("DOMMouseScroll",an),fn.removeEventListener("MozMousePixelScroll",Ge)}},[Er,er,lr]),(0,Ne.Z)(function(){if(Gn){var Ge=Li(Se);_i(Ge),ln({x:Ge})}},[en.width,Gn]);var Qe=function(){var fn,Fn;(fn=Kr.current)===null||fn===void 0||fn.delayHidden(),(Fn=Ze.current)===null||Fn===void 0||Fn.delayHidden()},It=Pn(Do,Vr,fo,Kt,Fr,function(){return co(!0)},Wn,Qe);qt.useImperativeHandle(kt,function(){return{nativeElement:$o.current,getScrollInfo:Ye,scrollTo:function(fn){function Fn(Sn){return Sn&&(0,te.Z)(Sn)==="object"&&("left"in Sn||"top"in Sn)}Fn(fn)?(fn.left!==void 0&&_i(Li(fn.left)),It(fn.top)):It(fn)}}}),(0,Ne.Z)(function(){if(Ei){var Ge=Vr.slice(Nn,ai+1);Ei(Ge,Vr)}},[Nn,ai,Vr]);var vn=Zt(Vr,Fr,fo,Kt),pn=Qi==null?void 0:Qi({start:Nn,end:ai,virtual:bt,offsetX:Se,offsetY:Ki,rtl:Br,getSize:vn}),Qn=At(Vr,Nn,ai,Gn,Se,ji,ze,rn),zn=null;Bt&&(zn=(0,Ae.Z)((0,Ce.Z)({},ke?"height":"maxHeight",Bt),sn),Er&&(zn.overflowY="hidden",Gn&&(zn.overflowX="hidden"),We&&(zn.pointerEvents="none")));var jn={};return Br&&(jn.dir="rtl"),qt.createElement("div",(0,Pt.Z)({ref:$o,style:(0,Ae.Z)((0,Ae.Z)({},Je),{},{position:"relative"}),className:Vi},jn,Xi),qt.createElement(ce.Z,{onResize:cr},qt.createElement(Ri,{className:"".concat(vt,"-holder"),style:zn,ref:Do,onScroll:Zn,onMouseEnter:Qe},qt.createElement(nt,{prefixCls:vt,height:xn,offsetX:Se,offsetY:Ki,scrollWidth:Gn,onInnerResize:co,ref:bo,innerProps:ar,rtl:Br,extra:pn},Qn))),bt&&xn>Bt&&qt.createElement(Jn,{ref:Kr,prefixCls:vt,scrollOffset:je,scrollRange:xn,rtl:Br,onScroll:Dn,onStartMove:ui,onStopMove:he,spinSize:Bi,containerSize:en.height,style:Oi==null?void 0:Oi.verticalScrollBar,thumbStyle:Oi==null?void 0:Oi.verticalScrollBarThumb,showScrollBar:Hr}),bt&&Gn>en.width&&qt.createElement(Jn,{ref:Ze,prefixCls:vt,scrollOffset:Se,scrollRange:Gn,rtl:Br,onScroll:Dn,onStartMove:ui,onStopMove:he,spinSize:ni,containerSize:en.width,horizontal:!0,style:Oi==null?void 0:Oi.horizontalScrollBar,thumbStyle:Oi==null?void 0:Oi.horizontalScrollBarThumb,showScrollBar:Hr}))}var Ee=qt.forwardRef(oi);Ee.displayName="List";var ci=Ee,Pi=ci},2637:function(Bn,Ve,Ot){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Object.defineProperty(Ve,"DraggableCore",{enumerable:!0,get:function(){return ue.default}}),Ve.default=void 0;var Pt=qt(Ot(59301)),te=Wt(Ot(12708)),Ae=Wt(Ot(4676)),Ce=Wt(Ot(57780)),de=Ot(13957),Rt=Ot(60976),ne=Ot(36641),ue=Wt(Ot(80486)),ce=Wt(Ot(94187));function Wt(at){return at&&at.__esModule?at:{default:at}}function Ne(at){if(typeof WeakMap!="function")return null;var ct=new WeakMap,pt=new WeakMap;return(Ne=function(xt){return xt?pt:ct})(at)}function qt(at,ct){if(!ct&&at&&at.__esModule)return at;if(at===null||typeof at!="object"&&typeof at!="function")return{default:at};var pt=Ne(ct);if(pt&&pt.has(at))return pt.get(at);var xt={},Mt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _t in at)if(_t!=="default"&&Object.prototype.hasOwnProperty.call(at,_t)){var Qt=Mt?Object.getOwnPropertyDescriptor(at,_t):null;Qt&&(Qt.get||Qt.set)?Object.defineProperty(xt,_t,Qt):xt[_t]=at[_t]}return xt.default=at,pt&&pt.set(at,xt),xt}function Le(){return Le=Object.assign?Object.assign.bind():function(at){for(var ct=1;ct<arguments.length;ct++){var pt=arguments[ct];for(var xt in pt)Object.prototype.hasOwnProperty.call(pt,xt)&&(at[xt]=pt[xt])}return at},Le.apply(this,arguments)}function Ut(at,ct,pt){return ct=nt(ct),ct in at?Object.defineProperty(at,ct,{value:pt,enumerable:!0,configurable:!0,writable:!0}):at[ct]=pt,at}function nt(at){var ct=et(at,"string");return typeof ct=="symbol"?ct:String(ct)}function et(at,ct){if(typeof at!="object"||at===null)return at;var pt=at[Symbol.toPrimitive];if(pt!==void 0){var xt=pt.call(at,ct||"default");if(typeof xt!="object")return xt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(ct==="string"?String:Number)(at)}class At extends Pt.Component{static getDerivedStateFromProps(ct,pt){let{position:xt}=ct,{prevPropsPosition:Mt}=pt;return xt&&(!Mt||xt.x!==Mt.x||xt.y!==Mt.y)?((0,ce.default)("Draggable: getDerivedStateFromProps %j",{position:xt,prevPropsPosition:Mt}),{x:xt.x,y:xt.y,prevPropsPosition:Pd({},xt)}):null}constructor(ct){super(ct),Ut(this,"onDragStart",(pt,xt)=>{if((0,ce.default)("Draggable: onDragStart: %j",xt),this.props.onStart(pt,(0,Rt.createDraggableData)(this,xt))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),Ut(this,"onDrag",(pt,xt)=>{if(!this.state.dragging)return!1;(0,ce.default)("Draggable: onDrag: %j",xt);const Mt=(0,Rt.createDraggableData)(this,xt),_t={x:Mt.x,y:Mt.y,slackX:0,slackY:0};if(this.props.bounds){const{x:Vt,y:Zt}=_t;_t.x+=this.state.slackX,_t.y+=this.state.slackY;const[$t,Pe]=(0,Rt.getBoundPosition)(this,_t.x,_t.y);_t.x=$t,_t.y=Pe,_t.slackX=this.state.slackX+(Vt-_t.x),_t.slackY=this.state.slackY+(Zt-_t.y),Mt.x=_t.x,Mt.y=_t.y,Mt.deltaX=_t.x-this.state.x,Mt.deltaY=_t.y-this.state.y}if(this.props.onDrag(pt,Mt)===!1)return!1;this.setState(_t)}),Ut(this,"onDragStop",(pt,xt)=>{if(!this.state.dragging||this.props.onStop(pt,(0,Rt.createDraggableData)(this,xt))===!1)return!1;(0,ce.default)("Draggable: onDragStop: %j",xt);const _t={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:Vt,y:Zt}=this.props.position;_t.x=Vt,_t.y=Zt}this.setState(_t)}),this.state={dragging:!1,dragged:!1,x:ct.position?ct.position.x:ct.defaultPosition.x,y:ct.position?ct.position.y:ct.defaultPosition.y,prevPropsPosition:Pd({},ct.position),slackX:0,slackY:0,isElementSVG:!1},ct.position&&!(ct.onDrag||ct.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.setState({dragging:!1})}findDOMNode(){var ct,pt;return(ct=(pt=this.props)===null||pt===void 0||(pt=pt.nodeRef)===null||pt===void 0?void 0:pt.current)!==null&&ct!==void 0?ct:Ae.default.findDOMNode(this)}render(){const be=this.props,{axis:ct,bounds:pt,children:xt,defaultPosition:Mt,defaultClassName:_t,defaultClassNameDragging:Qt,defaultClassNameDragged:Vt,position:Zt,positionOffset:$t,scale:Pe}=be,me=Sw(be,["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"]);let $e={},tn=null;const Tn=!!!Zt||this.state.dragging,In=Zt||Mt,$n={x:(0,Rt.canDragX)(this)&&Tn?this.state.x:In.x,y:(0,Rt.canDragY)(this)&&Tn?this.state.y:In.y};this.state.isElementSVG?tn=(0,de.createSVGTransform)($n,$t):$e=(0,de.createCSSTransform)($n,$t);const Ln=(0,Ce.default)(xt.props.className||"",_t,{[Qt]:this.state.dragging,[Vt]:this.state.dragged});return Pt.createElement(ue.default,Le({},me,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),Pt.cloneElement(Pt.Children.only(xt),{className:Ln,style:Pd(Pd({},xt.props.style),$e),transform:tn}))}}Ve.default=At,Ut(At,"displayName","Draggable"),Ut(At,"propTypes",Ay(Pd({},ue.default.propTypes),{axis:te.default.oneOf(["both","x","y","none"]),bounds:te.default.oneOfType([te.default.shape({left:te.default.number,right:te.default.number,top:te.default.number,bottom:te.default.number}),te.default.string,te.default.oneOf([!1])]),defaultClassName:te.default.string,defaultClassNameDragging:te.default.string,defaultClassNameDragged:te.default.string,defaultPosition:te.default.shape({x:te.default.number,y:te.default.number}),positionOffset:te.default.shape({x:te.default.oneOfType([te.default.number,te.default.string]),y:te.default.oneOfType([te.default.number,te.default.string])}),position:te.default.shape({x:te.default.number,y:te.default.number}),className:ne.dontSetMe,style:ne.dontSetMe,transform:ne.dontSetMe})),Ut(At,"defaultProps",Ay(Pd({},ue.default.defaultProps),{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))},80486:function(Bn,Ve,Ot){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.default=void 0;var Pt=Wt(Ot(59301)),te=ue(Ot(12708)),Ae=ue(Ot(4676)),Ce=Ot(13957),de=Ot(60976),Rt=Ot(36641),ne=ue(Ot(94187));function ue(At){return At&&At.__esModule?At:{default:At}}function ce(At){if(typeof WeakMap!="function")return null;var at=new WeakMap,ct=new WeakMap;return(ce=function(pt){return pt?ct:at})(At)}function Wt(At,at){if(!at&&At&&At.__esModule)return At;if(At===null||typeof At!="object"&&typeof At!="function")return{default:At};var ct=ce(at);if(ct&&ct.has(At))return ct.get(At);var pt={},xt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Mt in At)if(Mt!=="default"&&Object.prototype.hasOwnProperty.call(At,Mt)){var _t=xt?Object.getOwnPropertyDescriptor(At,Mt):null;_t&&(_t.get||_t.set)?Object.defineProperty(pt,Mt,_t):pt[Mt]=At[Mt]}return pt.default=At,ct&&ct.set(At,pt),pt}function Ne(At,at,ct){return at=qt(at),at in At?Object.defineProperty(At,at,{value:ct,enumerable:!0,configurable:!0,writable:!0}):At[at]=ct,At}function qt(At){var at=Le(At,"string");return typeof at=="symbol"?at:String(at)}function Le(At,at){if(typeof At!="object"||At===null)return At;var ct=At[Symbol.toPrimitive];if(ct!==void 0){var pt=ct.call(At,at||"default");if(typeof pt!="object")return pt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(at==="string"?String:Number)(At)}const Ut={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let nt=Ut.mouse;class et extends Pt.Component{constructor(){super(...arguments),Ne(this,"dragging",!1),Ne(this,"lastX",NaN),Ne(this,"lastY",NaN),Ne(this,"touchIdentifier",null),Ne(this,"mounted",!1),Ne(this,"handleDragStart",at=>{if(this.props.onMouseDown(at),!this.props.allowAnyClick&&typeof at.button=="number"&&at.button!==0)return!1;const ct=this.findDOMNode();if(!ct||!ct.ownerDocument||!ct.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:pt}=ct;if(this.props.disabled||!(at.target instanceof pt.defaultView.Node)||this.props.handle&&!(0,Ce.matchesSelectorAndParentsTo)(at.target,this.props.handle,ct)||this.props.cancel&&(0,Ce.matchesSelectorAndParentsTo)(at.target,this.props.cancel,ct))return;at.type==="touchstart"&&at.preventDefault();const xt=(0,Ce.getTouchIdentifier)(at);this.touchIdentifier=xt;const Mt=(0,de.getControlPosition)(at,xt,this);if(Mt==null)return;const{x:_t,y:Qt}=Mt,Vt=(0,de.createCoreData)(this,_t,Qt);(0,ne.default)("DraggableCore: handleDragStart: %j",Vt),(0,ne.default)("calling",this.props.onStart),!(this.props.onStart(at,Vt)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,Ce.addUserSelectStyles)(pt),this.dragging=!0,this.lastX=_t,this.lastY=Qt,(0,Ce.addEvent)(pt,nt.move,this.handleDrag),(0,Ce.addEvent)(pt,nt.stop,this.handleDragStop))}),Ne(this,"handleDrag",at=>{const ct=(0,de.getControlPosition)(at,this.touchIdentifier,this);if(ct==null)return;let{x:pt,y:xt}=ct;if(Array.isArray(this.props.grid)){let Qt=pt-this.lastX,Vt=xt-this.lastY;if([Qt,Vt]=(0,de.snapToGrid)(this.props.grid,Qt,Vt),!Qt&&!Vt)return;pt=this.lastX+Qt,xt=this.lastY+Vt}const Mt=(0,de.createCoreData)(this,pt,xt);if((0,ne.default)("DraggableCore: handleDrag: %j",Mt),this.props.onDrag(at,Mt)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch(Qt){const Vt=document.createEvent("MouseEvents");Vt.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(Vt)}return}this.lastX=pt,this.lastY=xt}),Ne(this,"handleDragStop",at=>{if(!this.dragging)return;const ct=(0,de.getControlPosition)(at,this.touchIdentifier,this);if(ct==null)return;let{x:pt,y:xt}=ct;if(Array.isArray(this.props.grid)){let Vt=pt-this.lastX||0,Zt=xt-this.lastY||0;[Vt,Zt]=(0,de.snapToGrid)(this.props.grid,Vt,Zt),pt=this.lastX+Vt,xt=this.lastY+Zt}const Mt=(0,de.createCoreData)(this,pt,xt);if(this.props.onStop(at,Mt)===!1||this.mounted===!1)return!1;const Qt=this.findDOMNode();Qt&&this.props.enableUserSelectHack&&(0,Ce.removeUserSelectStyles)(Qt.ownerDocument),(0,ne.default)("DraggableCore: handleDragStop: %j",Mt),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,Qt&&((0,ne.default)("DraggableCore: Removing handlers"),(0,Ce.removeEvent)(Qt.ownerDocument,nt.move,this.handleDrag),(0,Ce.removeEvent)(Qt.ownerDocument,nt.stop,this.handleDragStop))}),Ne(this,"onMouseDown",at=>(nt=Ut.mouse,this.handleDragStart(at))),Ne(this,"onMouseUp",at=>(nt=Ut.mouse,this.handleDragStop(at))),Ne(this,"onTouchStart",at=>(nt=Ut.touch,this.handleDragStart(at))),Ne(this,"onTouchEnd",at=>(nt=Ut.touch,this.handleDragStop(at)))}componentDidMount(){this.mounted=!0;const at=this.findDOMNode();at&&(0,Ce.addEvent)(at,Ut.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const at=this.findDOMNode();if(at){const{ownerDocument:ct}=at;(0,Ce.removeEvent)(ct,Ut.mouse.move,this.handleDrag),(0,Ce.removeEvent)(ct,Ut.touch.move,this.handleDrag),(0,Ce.removeEvent)(ct,Ut.mouse.stop,this.handleDragStop),(0,Ce.removeEvent)(ct,Ut.touch.stop,this.handleDragStop),(0,Ce.removeEvent)(at,Ut.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,Ce.removeUserSelectStyles)(ct)}}findDOMNode(){var at,ct;return(at=this.props)!==null&&at!==void 0&&at.nodeRef?(ct=this.props)===null||ct===void 0||(ct=ct.nodeRef)===null||ct===void 0?void 0:ct.current:Ae.default.findDOMNode(this)}render(){return Pt.cloneElement(Pt.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}Ve.default=et,Ne(et,"displayName","DraggableCore"),Ne(et,"propTypes",{allowAnyClick:te.default.bool,children:te.default.node.isRequired,disabled:te.default.bool,enableUserSelectHack:te.default.bool,offsetParent:function(At,at){if(At[at]&&At[at].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:te.default.arrayOf(te.default.number),handle:te.default.string,cancel:te.default.string,nodeRef:te.default.object,onStart:te.default.func,onDrag:te.default.func,onStop:te.default.func,onMouseDown:te.default.func,scale:te.default.number,className:Rt.dontSetMe,style:Rt.dontSetMe,transform:Rt.dontSetMe}),Ne(et,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},12911:function(Bn,Ve,Ot){"use strict";const{default:Pt,DraggableCore:te}=Ot(2637);Bn.exports=Pt,Bn.exports.default=Pt,Bn.exports.DraggableCore=te},13957:function(Bn,Ve,Ot){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.addClassName=Mt,Ve.addEvent=ue,Ve.addUserSelectStyles=pt,Ve.createCSSTransform=nt,Ve.createSVGTransform=et,Ve.getTouch=at,Ve.getTouchIdentifier=ct,Ve.getTranslation=At,Ve.innerHeight=qt,Ve.innerWidth=Le,Ve.matchesSelector=Rt,Ve.matchesSelectorAndParentsTo=ne,Ve.offsetXYFromParent=Ut,Ve.outerHeight=Wt,Ve.outerWidth=Ne,Ve.removeClassName=_t,Ve.removeEvent=ce,Ve.removeUserSelectStyles=xt;var Pt=Ot(36641),te=Ce(Ot(32092));function Ae(Qt){if(typeof WeakMap!="function")return null;var Vt=new WeakMap,Zt=new WeakMap;return(Ae=function($t){return $t?Zt:Vt})(Qt)}function Ce(Qt,Vt){if(!Vt&&Qt&&Qt.__esModule)return Qt;if(Qt===null||typeof Qt!="object"&&typeof Qt!="function")return{default:Qt};var Zt=Ae(Vt);if(Zt&&Zt.has(Qt))return Zt.get(Qt);var $t={},Pe=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var me in Qt)if(me!=="default"&&Object.prototype.hasOwnProperty.call(Qt,me)){var $e=Pe?Object.getOwnPropertyDescriptor(Qt,me):null;$e&&($e.get||$e.set)?Object.defineProperty($t,me,$e):$t[me]=Qt[me]}return $t.default=Qt,Zt&&Zt.set(Qt,$t),$t}let de="";function Rt(Qt,Vt){return de||(de=(0,Pt.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(Zt){return(0,Pt.isFunction)(Qt[Zt])})),(0,Pt.isFunction)(Qt[de])?Qt[de](Vt):!1}function ne(Qt,Vt,Zt){let $t=Qt;do{if(Rt($t,Vt))return!0;if($t===Zt)return!1;$t=$t.parentNode}while($t);return!1}function ue(Qt,Vt,Zt,$t){if(!Qt)return;const Pe=Pd({capture:!0},$t);Qt.addEventListener?Qt.addEventListener(Vt,Zt,Pe):Qt.attachEvent?Qt.attachEvent("on"+Vt,Zt):Qt["on"+Vt]=Zt}function ce(Qt,Vt,Zt,$t){if(!Qt)return;const Pe=Pd({capture:!0},$t);Qt.removeEventListener?Qt.removeEventListener(Vt,Zt,Pe):Qt.detachEvent?Qt.detachEvent("on"+Vt,Zt):Qt["on"+Vt]=null}function Wt(Qt){let Vt=Qt.clientHeight;const Zt=Qt.ownerDocument.defaultView.getComputedStyle(Qt);return Vt+=(0,Pt.int)(Zt.borderTopWidth),Vt+=(0,Pt.int)(Zt.borderBottomWidth),Vt}function Ne(Qt){let Vt=Qt.clientWidth;const Zt=Qt.ownerDocument.defaultView.getComputedStyle(Qt);return Vt+=(0,Pt.int)(Zt.borderLeftWidth),Vt+=(0,Pt.int)(Zt.borderRightWidth),Vt}function qt(Qt){let Vt=Qt.clientHeight;const Zt=Qt.ownerDocument.defaultView.getComputedStyle(Qt);return Vt-=(0,Pt.int)(Zt.paddingTop),Vt-=(0,Pt.int)(Zt.paddingBottom),Vt}function Le(Qt){let Vt=Qt.clientWidth;const Zt=Qt.ownerDocument.defaultView.getComputedStyle(Qt);return Vt-=(0,Pt.int)(Zt.paddingLeft),Vt-=(0,Pt.int)(Zt.paddingRight),Vt}function Ut(Qt,Vt,Zt){const Pe=Vt===Vt.ownerDocument.body?{left:0,top:0}:Vt.getBoundingClientRect(),me=(Qt.clientX+Vt.scrollLeft-Pe.left)/Zt,$e=(Qt.clientY+Vt.scrollTop-Pe.top)/Zt;return{x:me,y:$e}}function nt(Qt,Vt){const Zt=At(Qt,Vt,"px");return{[(0,te.browserPrefixToKey)("transform",te.default)]:Zt}}function et(Qt,Vt){return At(Qt,Vt,"")}function At(Qt,Vt,Zt){let{x:$t,y:Pe}=Qt,me="translate(".concat($t).concat(Zt,",").concat(Pe).concat(Zt,")");if(Vt){const $e="".concat(typeof Vt.x=="string"?Vt.x:Vt.x+Zt),tn="".concat(typeof Vt.y=="string"?Vt.y:Vt.y+Zt);me="translate(".concat($e,", ").concat(tn,")")+me}return me}function at(Qt,Vt){return Qt.targetTouches&&(0,Pt.findInArray)(Qt.targetTouches,Zt=>Vt===Zt.identifier)||Qt.changedTouches&&(0,Pt.findInArray)(Qt.changedTouches,Zt=>Vt===Zt.identifier)}function ct(Qt){if(Qt.targetTouches&&Qt.targetTouches[0])return Qt.targetTouches[0].identifier;if(Qt.changedTouches&&Qt.changedTouches[0])return Qt.changedTouches[0].identifier}function pt(Qt){if(!Qt)return;let Vt=Qt.getElementById("react-draggable-style-el");Vt||(Vt=Qt.createElement("style"),Vt.type="text/css",Vt.id="react-draggable-style-el",Vt.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
|
`,Vt.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
|
`,Qt.getElementsByTagName("head")[0].appendChild(Vt)),Qt.body&&Mt(Qt.body,"react-draggable-transparent-selection")}function xt(Qt){if(Qt)try{if(Qt.body&&_t(Qt.body,"react-draggable-transparent-selection"),Qt.selection)Qt.selection.empty();else{const Vt=(Qt.defaultView||window).getSelection();Vt&&Vt.type!=="Caret"&&Vt.removeAllRanges()}}catch(Vt){}}function Mt(Qt,Vt){Qt.classList?Qt.classList.add(Vt):Qt.className.match(new RegExp("(?:^|\\s)".concat(Vt,"(?!\\S)")))||(Qt.className+=" ".concat(Vt))}function _t(Qt,Vt){Qt.classList?Qt.classList.remove(Vt):Qt.className=Qt.className.replace(new RegExp("(?:^|\\s)".concat(Vt,"(?!\\S)"),"g"),"")}},32092:function(Bn,Ve){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.browserPrefixToKey=te,Ve.browserPrefixToStyle=Ae,Ve.default=void 0,Ve.getPrefix=Pt;const Ot=["Moz","Webkit","O","ms"];function Pt(){var Rt;let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window=="undefined")return"";const ue=(Rt=window.document)===null||Rt===void 0||(Rt=Rt.documentElement)===null||Rt===void 0?void 0:Rt.style;if(!ue||ne in ue)return"";for(let ce=0;ce<Ot.length;ce++)if(te(ne,Ot[ce])in ue)return Ot[ce];return""}function te(Rt,ne){return ne?"".concat(ne).concat(Ce(Rt)):Rt}function Ae(Rt,ne){return ne?"-".concat(ne.toLowerCase(),"-").concat(Rt):Rt}function Ce(Rt){let ne="",ue=!0;for(let ce=0;ce<Rt.length;ce++)ue?(ne+=Rt[ce].toUpperCase(),ue=!1):Rt[ce]==="-"?ue=!0:ne+=Rt[ce];return ne}var de=Ve.default=Pt()},94187:function(Bn,Ve){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.default=Ot;function Ot(){}},60976:function(Bn,Ve,Ot){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.canDragX=de,Ve.canDragY=Rt,Ve.createCoreData=ue,Ve.createDraggableData=ce,Ve.getBoundPosition=Ae,Ve.getControlPosition=ne,Ve.snapToGrid=Ce;var Pt=Ot(36641),te=Ot(13957);function Ae(qt,Le,Ut){if(!qt.props.bounds)return[Le,Ut];let{bounds:nt}=qt.props;nt=typeof nt=="string"?nt:Wt(nt);const et=Ne(qt);if(typeof nt=="string"){const{ownerDocument:At}=et,at=At.defaultView;let ct;if(nt==="parent"?ct=et.parentNode:ct=At.querySelector(nt),!(ct instanceof at.HTMLElement))throw new Error('Bounds selector "'+nt+'" could not find an element.');const pt=ct,xt=at.getComputedStyle(et),Mt=at.getComputedStyle(pt);nt={left:-et.offsetLeft+(0,Pt.int)(Mt.paddingLeft)+(0,Pt.int)(xt.marginLeft),top:-et.offsetTop+(0,Pt.int)(Mt.paddingTop)+(0,Pt.int)(xt.marginTop),right:(0,te.innerWidth)(pt)-(0,te.outerWidth)(et)-et.offsetLeft+(0,Pt.int)(Mt.paddingRight)-(0,Pt.int)(xt.marginRight),bottom:(0,te.innerHeight)(pt)-(0,te.outerHeight)(et)-et.offsetTop+(0,Pt.int)(Mt.paddingBottom)-(0,Pt.int)(xt.marginBottom)}}return(0,Pt.isNum)(nt.right)&&(Le=Math.min(Le,nt.right)),(0,Pt.isNum)(nt.bottom)&&(Ut=Math.min(Ut,nt.bottom)),(0,Pt.isNum)(nt.left)&&(Le=Math.max(Le,nt.left)),(0,Pt.isNum)(nt.top)&&(Ut=Math.max(Ut,nt.top)),[Le,Ut]}function Ce(qt,Le,Ut){const nt=Math.round(Le/qt[0])*qt[0],et=Math.round(Ut/qt[1])*qt[1];return[nt,et]}function de(qt){return qt.props.axis==="both"||qt.props.axis==="x"}function Rt(qt){return qt.props.axis==="both"||qt.props.axis==="y"}function ne(qt,Le,Ut){const nt=typeof Le=="number"?(0,te.getTouch)(qt,Le):null;if(typeof Le=="number"&&!nt)return null;const et=Ne(Ut),At=Ut.props.offsetParent||et.offsetParent||et.ownerDocument.body;return(0,te.offsetXYFromParent)(nt||qt,At,Ut.props.scale)}function ue(qt,Le,Ut){const nt=!(0,Pt.isNum)(qt.lastX),et=Ne(qt);return nt?{node:et,deltaX:0,deltaY:0,lastX:Le,lastY:Ut,x:Le,y:Ut}:{node:et,deltaX:Le-qt.lastX,deltaY:Ut-qt.lastY,lastX:qt.lastX,lastY:qt.lastY,x:Le,y:Ut}}function ce(qt,Le){const Ut=qt.props.scale;return{node:Le.node,x:qt.state.x+Le.deltaX/Ut,y:qt.state.y+Le.deltaY/Ut,deltaX:Le.deltaX/Ut,deltaY:Le.deltaY/Ut,lastX:qt.state.x,lastY:qt.state.y}}function Wt(qt){return{left:qt.left,top:qt.top,right:qt.right,bottom:qt.bottom}}function Ne(qt){const Le=qt.findDOMNode();if(!Le)throw new Error("<DraggableCore>: Unmounted during event!");return Le}},36641:function(Bn,Ve){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.dontSetMe=Ce,Ve.findInArray=Ot,Ve.int=Ae,Ve.isFunction=Pt,Ve.isNum=te;function Ot(de,Rt){for(let ne=0,ue=de.length;ne<ue;ne++)if(Rt.apply(Rt,[de[ne],ne,de]))return de[ne]}function Pt(de){return typeof de=="function"||Object.prototype.toString.call(de)==="[object Function]"}function te(de){return typeof de=="number"&&!isNaN(de)}function Ae(de){return parseInt(de,10)}function Ce(de,Rt,ne){if(de[Rt])return new Error("Invalid prop ".concat(Rt," passed to ").concat(ne," - do not set this, set it on the child."))}},27774:function(Bn,Ve){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.SizeSensorId=Ve.SensorTabIndex=Ve.SensorClassName=void 0;var Ot="size-sensor-id";Ve.SizeSensorId=Ot;var Pt="size-sensor-object";Ve.SensorClassName=Pt;var te="-1";Ve.SensorTabIndex=te},79301:function(Bn,Ve){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.default=void 0;var Ot=function(te){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,Ce=null;return function(){for(var de=this,Rt=arguments.length,ne=new Array(Rt),ue=0;ue<Rt;ue++)ne[ue]=arguments[ue];clearTimeout(Ce),Ce=setTimeout(function(){te.apply(de,ne)},Ae)}};Ve.default=Ot},79789:function(Bn,Ve){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.default=void 0;var Ot=1,Pt=function(){return"".concat(Ot++)};Ve.default=Pt},47242:function(Bn,Ve,Ot){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.ver=Ve.clear=Ve.bind=void 0;var Pt=Ot(95270),te=function(Rt,ne){var ue=(0,Pt.getSensor)(Rt);return ue.bind(ne),function(){ue.unbind(ne)}};Ve.bind=te;var Ae=function(Rt){var ne=(0,Pt.getSensor)(Rt);(0,Pt.removeSensor)(ne)};Ve.clear=Ae;var Ce="1.0.2";Ve.ver=Ce},95270:function(Bn,Ve,Ot){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.removeSensor=Ve.getSensor=Ve.Sensors=void 0;var Pt=Ce(Ot(79789)),te=Ot(57829),Ae=Ot(27774);function Ce(ce){return ce&&ce.__esModule?ce:{default:ce}}var de={};Ve.Sensors=de;function Rt(ce){ce&&de[ce]&&delete de[ce]}var ne=function(Wt){var Ne=Wt.getAttribute(Ae.SizeSensorId);if(Ne&&de[Ne])return de[Ne];var qt=(0,Pt.default)();Wt.setAttribute(Ae.SizeSensorId,qt);var Le=(0,te.createSensor)(Wt,function(){return Rt(qt)});return de[qt]=Le,Le};Ve.getSensor=ne;var ue=function(Wt){var Ne=Wt.element.getAttribute(Ae.SizeSensorId);Wt.destroy(),Rt(Ne)};Ve.removeSensor=ue},57829:function(Bn,Ve,Ot){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.createSensor=void 0;var Pt=Ot(20953),te=Ot(55202),Ae=typeof ResizeObserver!="undefined"?te.createSensor:Pt.createSensor;Ve.createSensor=Ae},20953:function(Bn,Ve,Ot){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.createSensor=void 0;var Pt=Ae(Ot(79301)),te=Ot(27774);function Ae(de){return de&&de.__esModule?de:{default:de}}var Ce=function(Rt,ne){var ue=void 0,ce=[],Wt=function(){getComputedStyle(Rt).position==="static"&&(Rt.style.position="relative");var et=document.createElement("object");return et.onload=function(){et.contentDocument.defaultView.addEventListener("resize",Ne),Ne()},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",te.SensorClassName),et.setAttribute("tabindex",te.SensorTabIndex),et.type="text/html",Rt.appendChild(et),et.data="about:blank",et},Ne=(0,Pt.default)(function(){ce.forEach(function(nt){nt(Rt)})}),qt=function(et){ue||(ue=Wt()),ce.indexOf(et)===-1&&ce.push(et)},Le=function(){ue&&ue.parentNode&&(ue.contentDocument&&ue.contentDocument.defaultView.removeEventListener("resize",Ne),ue.parentNode.removeChild(ue),Rt.removeAttribute(te.SizeSensorId),ue=void 0,ce=[],ne&&ne())},Ut=function(et){var At=ce.indexOf(et);At!==-1&&ce.splice(At,1),ce.length===0&&ue&&Le()};return{element:Rt,bind:qt,destroy:Le,unbind:Ut}};Ve.createSensor=Ce},55202:function(Bn,Ve,Ot){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.createSensor=void 0;var Pt=Ot(27774),te=Ae(Ot(79301));function Ae(de){return de&&de.__esModule?de:{default:de}}var Ce=function(Rt,ne){var ue=void 0,ce=[],Wt=(0,te.default)(function(){ce.forEach(function(nt){nt(Rt)})}),Ne=function(){var et=new ResizeObserver(Wt);return et.observe(Rt),Wt(),et},qt=function(et){ue||(ue=Ne()),ce.indexOf(et)===-1&&ce.push(et)},Le=function(){ue.disconnect(),ce=[],ue=void 0,Rt.removeAttribute(Pt.SizeSensorId),ne&&ne()},Ut=function(et){var At=ce.indexOf(et);At!==-1&&ce.splice(At,1),ce.length===0&&ue&&Le()};return{element:Rt,bind:qt,destroy:Le,unbind:Ut}};Ve.createSensor=Ce},93314:function(Bn){"use strict";Bn.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(Bn){"use strict";Bn.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(Bn){"use strict";Bn.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(Bn){"use strict";Bn.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(Bn,Ve,Ot){"use strict";Ot.d(Ve,{Z:function(){return ue}});const Pt=ce=>typeof ce=="object"&&ce!=null&&ce.nodeType===1,te=(ce,Wt)=>(!Wt||ce!=="hidden")&&ce!=="visible"&&ce!=="clip",Ae=(ce,Wt)=>{if(ce.clientHeight<ce.scrollHeight||ce.clientWidth<ce.scrollWidth){const Ne=getComputedStyle(ce,null);return te(Ne.overflowY,Wt)||te(Ne.overflowX,Wt)||(qt=>{const Le=(Ut=>{if(!Ut.ownerDocument||!Ut.ownerDocument.defaultView)return null;try{return Ut.ownerDocument.defaultView.frameElement}catch(nt){return null}})(qt);return!!Le&&(Le.clientHeight<qt.scrollHeight||Le.clientWidth<qt.scrollWidth)})(ce)}return!1},Ce=(ce,Wt,Ne,qt,Le,Ut,nt,et)=>Ut<ce&&nt>Wt||Ut>ce&&nt<Wt?0:Ut<=ce&&et<=Ne||nt>=Wt&&et>=Ne?Ut-ce-qt:nt>Wt&&et<Ne||Ut<ce&&et>Ne?nt-Wt+Le:0,de=ce=>{const Wt=ce.parentElement;return Wt==null?ce.getRootNode().host||null:Wt},Rt=(ce,Wt)=>{var Ne,qt,Le,Ut;if(typeof document=="undefined")return[];const{scrollMode:nt,block:et,inline:At,boundary:at,skipOverflowHiddenElements:ct}=Wt,pt=typeof at=="function"?at:Jn=>Jn!==at;if(!Pt(ce))throw new TypeError("Invalid target");const xt=document.scrollingElement||document.documentElement,Mt=[];let _t=ce;for(;Pt(_t)&&pt(_t);){if(_t=de(_t),_t===xt){Mt.push(_t);break}_t!=null&&_t===document.body&&Ae(_t)&&!Ae(document.documentElement)||_t!=null&&Ae(_t,ct)&&Mt.push(_t)}const Qt=(qt=(Ne=window.visualViewport)==null?void 0:Ne.width)!=null?qt:innerWidth,Vt=(Ut=(Le=window.visualViewport)==null?void 0:Le.height)!=null?Ut:innerHeight,{scrollX:Zt,scrollY:$t}=window,{height:Pe,width:me,top:$e,right:tn,bottom:Cn,left:Tn}=ce.getBoundingClientRect(),{top:In,right:$n,bottom:Ln,left:be}=(Jn=>{const un=window.getComputedStyle(Jn);return{top:parseFloat(un.scrollMarginTop)||0,right:parseFloat(un.scrollMarginRight)||0,bottom:parseFloat(un.scrollMarginBottom)||0,left:parseFloat(un.scrollMarginLeft)||0}})(ce);let re=et==="start"||et==="nearest"?$e-In:et==="end"?Cn+Ln:$e+Pe/2-In+Ln,Pn=At==="center"?Tn+me/2-be+$n:At==="end"?tn+$n:Tn-be;const li=[];for(let Jn=0;Jn<Mt.length;Jn++){const un=Mt[Jn],{height:Yn,width:si,top:Fi,right:sn,bottom:oi,left:Ee}=un.getBoundingClientRect();if(nt==="if-needed"&&$e>=0&&Tn>=0&&Cn<=Vt&&tn<=Qt&&(un===xt&&!Ae(un)||$e>=Fi&&Cn<=oi&&Tn>=Ee&&tn<=sn))return li;const ci=getComputedStyle(un),Pi=parseInt(ci.borderLeftWidth,10),Ht=parseInt(ci.borderTopWidth,10),kt=parseInt(ci.borderRightWidth,10),mt=parseInt(ci.borderBottomWidth,10);let vt=0,Lt=0;const Bt="offsetWidth"in un?un.offsetWidth-un.clientWidth-Pi-kt:0,Kt="offsetHeight"in un?un.offsetHeight-un.clientHeight-Ht-mt:0,ge="offsetWidth"in un?un.offsetWidth===0?0:si/un.offsetWidth:0,ke="offsetHeight"in un?un.offsetHeight===0?0:Yn/un.offsetHeight:0;if(xt===un)vt=et==="start"?re:et==="end"?re-Vt:et==="nearest"?Ce($t,$t+Vt,Vt,Ht,mt,$t+re,$t+re+Pe,Pe):re-Vt/2,Lt=At==="start"?Pn:At==="center"?Pn-Qt/2:At==="end"?Pn-Qt:Ce(Zt,Zt+Qt,Qt,Pi,kt,Zt+Pn,Zt+Pn+me,me),vt=Math.max(0,vt+$t),Lt=Math.max(0,Lt+Zt);else{vt=et==="start"?re-Fi-Ht:et==="end"?re-oi+mt+Kt:et==="nearest"?Ce(Fi,oi,Yn,Ht,mt+Kt,re,re+Pe,Pe):re-(Fi+Yn/2)+Kt/2,Lt=At==="start"?Pn-Ee-Pi:At==="center"?Pn-(Ee+si/2)+Bt/2:At==="end"?Pn-sn+kt+Bt:Ce(Ee,sn,si,Pi,kt+Bt,Pn,Pn+me,me);const{scrollLeft:Je,scrollTop:ve}=un;vt=ke===0?0:Math.max(0,Math.min(ve+vt/ke,un.scrollHeight-Yn/ke+Kt)),Lt=ge===0?0:Math.max(0,Math.min(Je+Lt/ge,un.scrollWidth-si/ge+Bt)),re+=ve-vt,Pn+=Je-Lt}li.push({el:un,top:vt,left:Lt})}return li},ne=ce=>ce===!1?{block:"end",inline:"nearest"}:(Wt=>Wt===Object(Wt)&&Object.keys(Wt).length!==0)(ce)?ce:{block:"start",inline:"nearest"};function ue(ce,Wt){if(!ce.isConnected||!(Le=>{let Ut=Le;for(;Ut&&Ut.parentNode;){if(Ut.parentNode===document)return!0;Ut=Ut.parentNode instanceof ShadowRoot?Ut.parentNode.host:Ut.parentNode}return!1})(ce))return;const Ne=(Le=>{const Ut=window.getComputedStyle(Le);return{top:parseFloat(Ut.scrollMarginTop)||0,right:parseFloat(Ut.scrollMarginRight)||0,bottom:parseFloat(Ut.scrollMarginBottom)||0,left:parseFloat(Ut.scrollMarginLeft)||0}})(ce);if((Le=>typeof Le=="object"&&typeof Le.behavior=="function")(Wt))return Wt.behavior(Rt(ce,Wt));const qt=typeof Wt=="boolean"||Wt==null?void 0:Wt.behavior;for(const{el:Le,top:Ut,left:nt}of Rt(ce,ne(Wt))){const et=Ut-Ne.top+Ne.bottom,At=nt-Ne.left+Ne.right;Le.scroll({top:et,left:At,behavior:qt})}}}}]);
|
|
|
}()); |