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

1184 lines
2.3 MiB

This file contains ambiguous Unicode characters!

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

!(function(){var sx=Object.defineProperty,ax=Object.defineProperties;var lx=Object.getOwnPropertyDescriptors;var km=Object.getOwnPropertySymbols;var ww=Object.prototype.hasOwnProperty,xw=Object.prototype.propertyIsEnumerable;var yw=(Cn,We,Qt)=>We in Cn?sx(Cn,We,{enumerable:!0,configurable:!0,writable:!0,value:Qt}):Cn[We]=Qt,Pd=(Cn,We)=>{for(var Qt in We||(We={}))ww.call(We,Qt)&&yw(Cn,Qt,We[Qt]);if(km)for(var Qt of km(We))xw.call(We,Qt)&&yw(Cn,Qt,We[Qt]);return Cn},Ay=(Cn,We)=>ax(Cn,lx(We));var Sw=(Cn,We)=>{var Qt={};for(var Pt in Cn)ww.call(Cn,Pt)&&We.indexOf(Pt)<0&&(Qt[Pt]=Cn[Pt]);if(Cn!=null&&km)for(var Pt of km(Cn))We.indexOf(Pt)<0&&xw.call(Cn,Pt)&&(Qt[Pt]=Cn[Pt]);return Qt};(self.webpackChunk=self.webpackChunk||[]).push([[342],{95869:function(Cn,We,Qt){"use strict";Qt.d(We,{Z:function(){return ue}});var Pt=Qt(5016),te=Qt(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"},Be=Ae,de=Qt(7657),Ht=function(Vt,De){return te.createElement(de.Z,(0,Pt.Z)({},Vt,{ref:De,icon:Be}))},ne=te.forwardRef(Ht),ue=ne},39060:function(){"use strict"},76596:function(){"use strict"},25346:function(Cn,We){"use strict";We.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},74042:function(){"use strict";function Cn(It,nt,et,At){et===void 0&&(et=0),At===void 0&&(At=1/0),this._name=It,this._defaultValue=nt,this._minimum=et,this._maximum=At}Object.defineProperty(Cn.prototype,"name",{get:function(){return this._name},set:function(It){if(typeof It!="string"||It==="")throw new Error("Shape name must be a valid string.");this._name=It}}),Object.defineProperty(Cn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(It){if(typeof It!="number"||isNaN(It))throw new Error("The default value must be a real number, not: "+It);this._defaultValue=It}}),Object.defineProperty(Cn.prototype,"minimum",{get:function(){return this._minimum},set:function(It){if(typeof It!="number"||isNaN(It))throw new Error("Minimum must be a real number, not: "+It);this._minimum=It}}),Object.defineProperty(Cn.prototype,"maximum",{get:function(){return this._maximum},set:function(It){if(typeof It!="number"||isNaN(It))throw new Error("Maximum must be a real number, not: "+It);this._maximum=It}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(It,nt){var et=go.Shape._FigureParameters[It];return et?et[nt]:null},go.Shape.setFigureParameter=function(It,nt,et){if(!(et instanceof Cn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+et);if(et.defaultValue<et.minimum||et.defaultValue>et.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+et.defaultValue);var At=go.Shape._FigureParameters[It];At||(At=[],go.Shape._FigureParameters[It]=At),At[nt]=et};var We=[];function Qt(It,nt){var et=We.pop();return et===void 0?new go.Point(It,nt):(et.x=It,et.y=nt,et)}function Pt(){var It=We.pop();return It===void 0?new go.Point:It}function te(It){We.push(It)}function Ae(It,nt,et,At,at,ct,pt,xt,bt){bt||(bt=new go.Point);var Rt=It-et,Ot=at-pt,Wt=NaN,Zt=NaN;if(Rt===0)if(Ot===0)It===et&&(Wt=It,Zt=nt);else{var $t=(ct-xt)/Ot,Ce=ct-$t*at;Wt=It,Zt=$t*Wt+Ce}else if(Ot===0){var ge=(nt-At)/Rt,nn=nt-ge*It;Wt=at,Zt=ge*Wt+nn}else{var ge=(nt-At)/Rt,$t=(ct-xt)/Ot,nn=nt-ge*It,Ce=ct-$t*at;Wt=(Ce-nn)/(ge-$t),Zt=ge*Wt+nn}return bt.x=Wt,bt.y=Zt,bt}function Be(It,nt,et,At,at,ct,pt,xt,bt,Rt,Ot,Wt,Zt,$t){var Ce=1-bt,ge=bt,nn=It*Ce+et*ge,qe=nt*Ce+At*ge,En=et*Ce+at*ge,Tn=At*Ce+ct*ge,bn=at*Ce+pt*ge,ni=ct*Ce+xt*ge,In=nn*Ce+En*ge,Ee=qe*Ce+Tn*ge,ie=En*Ce+bn*ge,Pn=Tn*Ce+ni*ge,pi=In*Ce+ie*ge,Wn=Ee*Ce+Pn*ge;Rt.x=nn,Rt.y=qe,Ot.x=In,Ot.y=Ee,Wt.x=pi,Wt.y=Wn,Zt.x=ie,Zt.y=Pn,$t.x=bn,$t.y=ni}var de=new go.Spot(.156,.156),Ht=new go.Spot(.844,.844),ne=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Cn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(It,nt,et){var At=It?It.parameter1:NaN;(isNaN(At)||At<0)&&(At=5),At=Math.min(At,nt/3),At=Math.min(At,et/3);var at=At*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(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(nt,et).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(nt,et).add(new go.PathSegment(go.PathSegment.Line,0,et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(It,nt,et){var At=new go.Geometry(go.Geometry.Line);return At.startX=0,At.startY=et/2,At.endX=nt,At.endY=et/2,At}),go.Shape.defineFigureGenerator("LineV",function(It,nt,et){var At=new go.Geometry(go.Geometry.Line);return At.startX=nt/2,At.startY=0,At.endX=nt/2,At.endY=et,At}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,et/2,!1).add(new go.PathSegment(go.PathSegment.Line,nt,et/2)).add(new go.PathSegment(go.PathSegment.Move,nt/2,0)).add(new go.PathSegment(go.PathSegment.Line,nt/2,et)))}),go.Shape.defineFigureGenerator("XLine",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)))}),go.Shape.defineFigureGenerator("LineRight",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(.25*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)))}),go.Shape.defineFigureGenerator("LineDown",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,.25*et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.75*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)))}),go.Shape.defineFigureGenerator("LineLeft",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(.75*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.75*nt,et)))}),go.Shape.defineFigureGenerator("LineUp",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,.75*et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(It,nt,et){var At=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(At*nt,(1-At)*et,!1).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,At*et)).add(new go.PathSegment(go.PathSegment.Move,At*nt,At*et)).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,(1-At)*et)).add(new go.PathSegment(go.PathSegment.Move,0,et/2)).add(new go.PathSegment(go.PathSegment.Line,nt,et/2)).add(new go.PathSegment(go.PathSegment.Move,nt/2,0)).add(new go.PathSegment(go.PathSegment.Line,nt/2,et)))}),go.Shape.defineFigureGenerator("CircleLine",function(It,nt,et){var At=nt/2,at=new go.Geometry().add(new go.PathFigure(nt,nt/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,At,At,At,At).close()));return at.spot1=de,at.spot2=Ht,at.defaultStretch=go.GraphObject.Uniform,at}),go.Shape.defineFigureGenerator("Line1",function(It,nt,et){var At=new go.Geometry(go.Geometry.Line);return At.startX=0,At.startY=0,At.endX=nt,At.endY=et,At}),go.Shape.defineFigureGenerator("Line2",function(It,nt,et){var At=new go.Geometry(go.Geometry.Line);return At.startX=nt,At.startY=0,At.endX=0,At.endY=et,At}),go.Shape.defineFigureGenerator("Curve1",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,nt,et,ne*nt,0,nt,(1-ne)*et)))}),go.Shape.defineFigureGenerator("Curve2",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,nt,et,0,ne*et,(1-ne)*nt,et)))}),go.Shape.defineFigureGenerator("Curve3",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,ne*et,ne*nt,et)))}),go.Shape.defineFigureGenerator("Curve4",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,et,(1-ne)*nt,0,0,(1-ne)*et)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new Cn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)?At=.1:At<-1?At=-1:At>1&&(At=1);var at=Math.abs(At)*nt;if(At===0){var 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 Cn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)?At=10:At<-nt?At=-nt:At>nt&&(At=nt);var at=Math.abs(At);if(At===0){var 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 Cn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)?At=.2:At<.5?At=-.5:At>.5&&(At=.5);var at=Math.abs(At)*nt;if(At===0){var 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 Cn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)?At=20:At<-nt?At=-nt/2:At>nt&&(At=nt/2);var at=Math.abs(At);if(At===0){var 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 Cn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)?At=10:At<-nt?At=-nt/2:At>nt&&(At=nt/2);var at=Math.abs(At);if(At===0){var 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 It=ue.pop();return It===void 0?[]:It}function Vt(It){It.length=0,ue.push(It)}function De(It){for(var nt=ce(),et=.5,At=.5,at=Math.PI*1.5,ct=0,pt=0;pt<It;pt++)ct=2*Math.PI/It*pt+at,nt[pt]=new go.Point(At+et*Math.cos(ct),At+et*Math.sin(ct));return nt.push(nt[0]),nt}function Jt(It){var nt=be(It),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 Vt(nt),et}function be(It){for(var nt=De(It),et=ce(),At=Math.floor(nt.length/2),at=nt.length-1,ct=It%2===0?2:1,pt=0;pt<at;pt++){var xt=nt[pt],bt=nt[pt+1],Rt=nt[(At+pt-1)%at],Ot=nt[(At+pt+ct)%at];et[pt*2]=xt,et[pt*2+1]=Ae(xt.x,xt.y,Rt.x,Rt.y,bt.x,bt.y,Ot.x,Ot.y,new go.Point)}return et[et.length]=et[0],Vt(nt),et}go.Shape.defineFigureGenerator("Pentagon",function(It,nt,et){var At=De(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()),Vt(At),at.spot1=new go.Spot(.2,.22),at.spot2=new go.Spot(.8,.9),at}),go.Shape.defineFigureGenerator("Hexagon",function(It,nt,et){var At=De(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()),Vt(At),at.spot1=new go.Spot(.07,.25),at.spot2=new go.Spot(.93,.75),at}),go.Shape.defineFigureGenerator("Heptagon",function(It,nt,et){var At=De(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()),Vt(At),at.spot1=new go.Spot(.2,.15),at.spot2=new go.Spot(.8,.85),at}),go.Shape.defineFigureGenerator("Octagon",function(It,nt,et){var At=De(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()),Vt(At),at.spot1=new go.Spot(.15,.15),at.spot2=new go.Spot(.85,.85),at}),go.Shape.defineFigureGenerator("Nonagon",function(It,nt,et){var At=De(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()),Vt(At),at.spot1=new go.Spot(.17,.13),at.spot2=new go.Spot(.82,.82),at}),go.Shape.defineFigureGenerator("Decagon",function(It,nt,et){var At=De(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()),Vt(At),at.spot1=new go.Spot(.16,.16),at.spot2=new go.Spot(.84,.84),at}),go.Shape.defineFigureGenerator("Dodecagon",function(It,nt,et){var At=De(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()),Vt(At),at.spot1=new go.Spot(.16,.16),at.spot2=new go.Spot(.84,.84),at}),go.Shape.defineFigureGenerator("FivePointedStar",function(It,nt,et){var At=be(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()),Vt(At),at.spot1=new go.Spot(.266,.333),at.spot2=new go.Spot(.733,.733),at}),go.Shape.defineFigureGenerator("SixPointedStar",function(It,nt,et){var At=be(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()),Vt(At),at.spot1=new go.Spot(.17,.25),at.spot2=new go.Spot(.83,.75),at}),go.Shape.defineFigureGenerator("SevenPointedStar",function(It,nt,et){var At=be(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()),Vt(At),at.spot1=new go.Spot(.222,.277),at.spot2=new go.Spot(.777,.666),at}),go.Shape.defineFigureGenerator("EightPointedStar",function(It,nt,et){var At=be(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()),Vt(At),at.spot1=new go.Spot(.25,.25),at.spot2=new go.Spot(.75,.75),at}),go.Shape.defineFigureGenerator("NinePointedStar",function(It,nt,et){var At=be(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()),Vt(At),at.spot1=new go.Spot(.222,.277),at.spot2=new go.Spot(.777,.666),at}),go.Shape.defineFigureGenerator("TenPointedStar",function(It,nt,et){var At=be(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()),Vt(At),at.spot1=new go.Spot(.281,.261),at.spot2=new go.Spot(.723,.748),at}),go.Shape.defineFigureGenerator("FivePointedBurst",function(It,nt,et){var At=Jt(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(),Vt(At),at.spot1=new go.Spot(.222,.277),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("SixPointedBurst",function(It,nt,et){var At=Jt(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(),Vt(At),at.spot1=new go.Spot(.17,.222),at.spot2=new go.Spot(.833,.777),at}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(It,nt,et){var At=Jt(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(),Vt(At),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("EightPointedBurst",function(It,nt,et){var At=Jt(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(),Vt(At),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("NinePointedBurst",function(It,nt,et){var At=Jt(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(),Vt(At),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("TenPointedBurst",function(It,nt,et){var At=Jt(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(),Vt(At),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.setFigureParameter("FramedRectangle",0,new Cn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new Cn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(It,nt,et){var At=It?It.parameter1:NaN,at=It?It.parameter2:NaN;isNaN(At)&&(At=8),isNaN(at)&&(at=8);var 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 Cn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(It,nt,et){var At=It?It.parameter1:NaN;(isNaN(At)||At<0)&&(At=8);var at=nt/2,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=Ht,ct.defaultStretch=go.GraphObject.Uniform,ct}),go.Shape.defineFigureGenerator("Cloud",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(.08034461*nt,.1944299*et,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*nt,.05349299*et,-.09239631*nt,.07836421*et,.1406031*nt,-.0542823*et)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*nt,.074219*et,.2450511*nt,-.00697547*et,.3776197*nt,-.01112067*et)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*nt,.07004196*et,.4539471*nt,0,.6066018*nt,-.02526587*et)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*nt,.08370865*et,.6914277*nt,-.01904177*et,.8921095*nt,-.01220843*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*nt,.3194596*et,1.036446*nt,.04105738*et,1.020377*nt,.3022052*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*nt,.562044*et,1.04448*nt,.360238*et,.992256*nt,.5219009*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*nt,.8217117*et,1.032337*nt,.5771781*et,1.018411*nt,.8120651*et)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*nt,.9156953*et,1.028411*nt,.9571472*et,.8556702*nt,1.052487*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*nt,.9310455*et,.7431877*nt,1.009325*et,.5624123*nt,1.021761*et)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*nt,.9344623*et,.4820677*nt,1.031761*et,.3030112*nt,1.002796*et)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*nt,.870098*et,.2329994*nt,1.01518*et,.03213784*nt,1.01518*et)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*nt,.6545475*et,-.02812061*nt,.9032597*et,-.01205169*nt,.6835638*et)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*nt,.4265613*et,-.01812061*nt,.6089503*et,-.00606892*nt,.4555777*et)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*nt,.1944299*et,-.01606892*nt,.3892545*et,-.01205169*nt,.1944299*et))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(It,nt,et){var At=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(At*nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,At*et)).add(new go.PathSegment(go.PathSegment.Line,nt,(1-At)*et)).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,et)).add(new go.PathSegment(go.PathSegment.Line,At*nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,(1-At)*et)).add(new go.PathSegment(go.PathSegment.Line,0,At*et).close())).setSpots(At/2,At/2,1-At/2,1-At/2)}),go.Shape.setFigureParameter("Pie",0,new Cn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Cn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(It,nt,et){var At=It?It.parameter1:NaN,at=It?It.parameter2:NaN;isNaN(At)&&(At=0),isNaN(at)&&(at=315);var 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(It,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 Cn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(It,nt,et){var At=It?It.parameter1:NaN;(isNaN(At)||At<0)&&(At=30);var at=Math.min(At,nt)/2,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 Cn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(It,nt,et){var At=It?It.parameter1:NaN;(isNaN(At)||At<0)&&(At=10);var at=Math.min(At,nt)/2,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 Cn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(It,nt,et){var At=It?It.parameter1:NaN;if((isNaN(At)||At<0)&&(At=30),nt===0||et===0){var at=new go.Geometry(go.Geometry.Rectangle);return at.startX=0,at.startY=0,at.endX=nt,at.endY=et,at}else{var ct=nt/2,pt=et/2,xt=Math.atan2(et,nt),bt=At-Math.min(Math.cos(xt)*At/2,ct),Rt=At-Math.min(Math.sin(xt)*At/2,pt),at=new go.Geometry,Ot=new go.PathFigure(bt,0,!0);return at.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Line,ct,.2*et)),Ot.add(new go.PathSegment(go.PathSegment.Line,nt-bt,0)),Ot.add(new go.PathSegment(go.PathSegment.Line,nt,Rt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.8*nt,pt)),Ot.add(new go.PathSegment(go.PathSegment.Line,nt,et-Rt)),Ot.add(new go.PathSegment(go.PathSegment.Line,nt-bt,et)),Ot.add(new go.PathSegment(go.PathSegment.Line,ct,.8*et)),Ot.add(new go.PathSegment(go.PathSegment.Line,bt,et)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,et-Rt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.2*nt,pt)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,Rt).close()),at}}),go.Shape.setFigureParameter("ThinX",0,new Cn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(It,nt,et){var At=It?It.parameter1:NaN;(isNaN(At)||At<0)&&(At=10);var at=new go.Geometry,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 Cn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.2);var at=new go.Geometry,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 Cn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.5);var at=new go.Geometry,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(It,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(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,0,nt,et)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*nt,.75*et,.5*nt,.25*et).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,et,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*et,.1*nt,.8*et,0,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,0,0,.45*nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,nt,.3*et,.55*nt,0,nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,.5*et,.9*nt,.8*et).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*nt,.01*et)).add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.6*nt,.2*et,nt,.25*et)).add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.7*et,nt,.8*et,.6*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,.5*nt,.75*et,.55*nt,.95*et)).add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)).add(new go.PathSegment(go.PathSegment.Bezier,.45*nt,.7*et,.45*nt,.95*et,.5*nt,.75*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.4*nt,.8*et,0,.8*et)).add(new go.PathSegment(go.PathSegment.Bezier,.49*nt,.01*et,0,.25*et,.4*nt,.2*et).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.4*nt,.6*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.15*nt,et,.5*nt,.75*et,.45*nt,.95*et)),at.add(new go.PathSegment(go.PathSegment.Line,.85*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.6*nt,.6*et,.55*nt,.95*et,.5*nt,.75*et));var ct=.2,pt=.3,xt=0,bt=ct*ne;return at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*nt,(.5+ct+xt)*et,(.5-ct+pt)*nt,(.5+bt+xt)*et,(.5-bt+pt)*nt,(.5+ct+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ct+pt)*nt,(.5+xt)*et,(.5+bt+pt)*nt,(.5+ct+xt)*et,(.5+ct+pt)*nt,(.5+bt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*nt,(.5-ct+xt)*et,(1-.5+ct+pt)*nt,(.5-bt+xt)*et,(.5+bt+pt)*nt,(.5-ct+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.65*nt,.36771243*et,(.5-bt+pt)*nt,(.5-ct+xt)*et,(.5-ct+pt+.05)*nt,(.5-bt+xt-.02)*et)),ct=.2,pt=0,xt=-.3,bt=ct*ne,at.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ct+pt)*nt,(.5+xt)*et,(.5+bt+pt)*nt,(.5+ct+xt)*et,(.5+ct+pt)*nt,(.5+bt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*nt,(.5-ct+xt)*et,(1-.5+ct+pt)*nt,(.5-bt+xt)*et,(.5+bt+pt)*nt,(.5-ct+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ct+pt)*nt,(.5+xt)*et,(.5-bt+pt)*nt,(.5-ct+xt)*et,(.5-ct+pt)*nt,(.5-bt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5-bt+pt)*nt,(.5+ct+xt)*et,(.5-ct+pt)*nt,(.5+bt+xt)*et,(.5-bt+pt)*nt,(.5+ct+xt)*et)),ct=.2,pt=-.3,xt=0,bt=ct*ne,at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*nt,(.5-ct+xt)*et,(1-.5+ct+pt-.05)*nt,(.5-bt+xt-.02)*et,(.5+bt+pt)*nt,(.5-ct+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ct+pt)*nt,(.5+xt)*et,(.5-bt+pt)*nt,(.5-ct+xt)*et,(.5-ct+pt)*nt,(.5-bt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pt)*nt,(.5+ct+xt)*et,(.5-ct+pt)*nt,(.5+bt+xt)*et,(.5-bt+pt)*nt,(.5+ct+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,.6*et,(.5+bt+pt)*nt,(.5+ct+xt)*et,(.5+ct+pt)*nt,(.5+bt+xt)*et).close()),At.setSpots(.06,.33,.93,.68),At}),go.Shape.defineFigureGenerator("YinYang",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*.5,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,270,180,nt*.5,nt*.5,nt*.5,nt*.5)),at.add(new go.PathSegment(go.PathSegment.Arc,90,-180,nt*.5,nt*.75,nt*.25,nt*.25)),at.add(new go.PathSegment(go.PathSegment.Arc,90,180,nt*.5,nt*.25,nt*.25,nt*.25));var 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(It,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(It,nt,et){var At=new go.Geometry,at=ne*.5,ct=.5,pt=.5,xt=.5,bt=new go.PathFigure(pt*nt,(xt-ct)*et);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ct)*nt,xt*et,(pt-at)*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+ct)*et,(pt-ct)*nt,(xt+at)*et,(pt-at)*nt,(xt+ct)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,xt*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),bt.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 Rt=Pt(),Ot=Pt(),Wt=Pt(),Zt=Pt();Be(pt,xt-ct,pt+at,xt-ct,pt+ct,xt-at,pt+ct,xt,.42,Rt,Ot,Wt,Zt,Zt);var $t=Pt(),Ce=Pt(),ge=Pt();Be(pt,xt-ct,pt+at,xt-ct,pt+ct,xt-at,pt+ct,xt,.58,Zt,Zt,ge,$t,Ce);var nn=Pt(),qe=Pt(),En=Pt();Be(pt,xt+ct,pt-at,xt+ct,pt-ct,xt+at,pt-ct,xt,.42,nn,qe,En,Zt,Zt);var Tn=Pt(),bn=Pt(),ni=Pt();return Be(pt,xt+ct,pt-at,xt+ct,pt-ct,xt+at,pt-ct,xt,.58,Zt,Zt,ni,Tn,bn),bt.add(new go.PathSegment(go.PathSegment.Move,ni.x*nt,ni.y*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ct)*nt,xt*et,Tn.x*nt,Tn.y*et,bn.x*nt,bn.y*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,Wt.x*nt,Wt.y*et,Rt.x*nt,Rt.y*et,Ot.x*nt,Ot.y*et)),bt.add(new go.PathSegment(go.PathSegment.Line,ni.x*nt,ni.y*et).close()),bt.add(new go.PathSegment(go.PathSegment.Move,En.x*nt,En.y*et)),bt.add(new go.PathSegment(go.PathSegment.Line,ge.x*nt,ge.y*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,xt*et,$t.x*nt,$t.y*et,Ce.x*nt,Ce.y*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,En.x*nt,En.y*et,nn.x*nt,nn.y*et,qe.x*nt,qe.y*et).close()),te(Rt),te(Ot),te(Wt),te(Zt),te($t),te(Ce),te(ge),te(nn),te(qe),te(En),te(Tn),te(bn),te(ni),At.defaultStretch=go.GraphObject.Uniform,At}),go.Shape.defineFigureGenerator("Fragile",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.15*et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,.29*nt,.33*et)).add(new go.PathSegment(go.PathSegment.Line,.35*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.15*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.5*et,nt,.25*et,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.55*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.45*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.45*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.5*et,0,.25*et).close()))}),go.Shape.setFigureParameter("HourGlass",0,new Cn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(It,nt,et){var At=It?It.parameter1:NaN;(isNaN(At)||At<0)&&(At=30),At>nt&&(At=nt);var at=(nt-At)/2,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(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,.55*et).add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.45*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.45*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.55*et).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(It,nt,et){var At=new go.Geometry,at=ne*.4,ct=.4,pt=.5,xt=.5,bt=Pt(),Rt=Pt(),Ot=Pt(),Wt=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)),Be(pt,xt-ct,pt+at,xt-ct,pt+ct,xt-at,pt+ct,xt,.44,Ot,Wt,Rt,bt,bt),Zt.add(new go.PathSegment(go.PathSegment.Bezier,Rt.x*nt,Rt.y*et,Ot.x*nt,Ot.y*et,Wt.x*nt,Wt.y*et));var $t=Qt(Rt.x,Rt.y);Be(pt,xt-ct,pt+at,xt-ct,pt+ct,xt-at,pt+ct,xt,.56,bt,bt,Rt,Ot,Wt);var Ce=Qt(Rt.x,Rt.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,(Ce.x*.1+.9)*nt,.15*et)),Zt.add(new go.PathSegment(go.PathSegment.Line,(Ce.x*.1+.9)*nt,(Ce.y*.1+.05*.9)*et)),Zt.add(new go.PathSegment(go.PathSegment.Line,Ce.x*nt,Ce.y*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,xt*et,Ot.x*nt,Ot.y*et,Wt.x*nt,Wt.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 ge=new go.PathFigure(pt*nt,(xt-ct)*et,!1);At.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ct)*nt,xt*et,(pt-at)*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et)),ge.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+ct)*et,(pt-ct)*nt,(xt+at)*et,(pt-at)*nt,(xt+ct)*et)),ge.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,xt*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),ge.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 nn=new go.PathFigure((pt-ct)*nt,xt*et,!1);return At.add(nn),te(bt),te(Rt),te(Ot),te(Wt),te($t),te(Ce),At.spot1=new go.Spot(.202,.257),At.spot2=new go.Spot(.792,.739),At.defaultStretch=go.GraphObject.Uniform,At}),go.Shape.defineFigureGenerator("GenderFemale",function(It,nt,et){var At=new go.Geometry,at=.375,ct=0,pt=-.125,xt=at*ne,bt=new go.PathFigure((.525+ct)*nt,(.5+at+pt)*et,!1);At.add(bt),bt.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)),bt.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)),bt.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)),bt.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)),bt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,.85*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.85*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.9*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,.9*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,et)),bt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,et)),bt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.9*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.9*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.85*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.85*et).close()),at=.325,ct=0,pt=-.125,xt=at*ne;var bt=new go.PathFigure((1-.5+at+ct)*nt,(.5+pt)*et,!1);At.add(bt),bt.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)),bt.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)),bt.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)),bt.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 bt=new go.PathFigure((.525+ct)*nt,(.5+at+pt)*et,!1);return At.add(bt),At.spot1=new go.Spot(.232,.136),At.spot2=new go.Spot(.682,.611),At.defaultStretch=go.GraphObject.Uniform,At}),go.Shape.defineFigureGenerator("LogicImplies",function(It,nt,et){var At=It?It.parameter1:NaN;return isNaN(At)&&(At=.2),new go.Geometry().add(new go.PathFigure((1-At)*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(It,nt,et){var At=It?It.parameter1:NaN;return isNaN(At)&&(At=.2),new go.Geometry().add(new go.PathFigure((1-At)*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Move,At*nt,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,At*nt,et))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)))}),go.Shape.defineFigureGenerator("LogicAnd",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(It,nt,et){var At=new go.Geometry().add(new go.PathFigure(.5*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*nt,.5*et,.5*nt,.5*et)));return At.defaultStretch=go.GraphObject.Uniform,At}),go.Shape.defineFigureGenerator("LogicTruth",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Move,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et)))}),go.Shape.defineFigureGenerator("LogicForAll",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,.25*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Move,0,et)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(It,nt,et){var At=.5;return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,0,At*et)).add(new go.PathSegment(go.PathSegment.Arc,180,180,At*nt,At*et,At*nt,At*et)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(It,nt,et){var At=.5;return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,At*et)).add(new go.PathSegment(go.PathSegment.Arc,0,180,At*nt,At*et,At*nt,At*et)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new Cn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Cn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.3);var at=It?It.parameter2:NaN;isNaN(at)&&(at=.3);var ct=(1-At)*nt,pt=(.5-at/2)*et,xt=(.5+at/2)*et,bt=new go.Geometry,Rt=new go.PathFigure(0,pt,!0);bt.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Line,ct,pt)),Rt.add(new go.PathSegment(go.PathSegment.Line,ct,0)),Rt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),Rt.add(new go.PathSegment(go.PathSegment.Line,ct,et)),Rt.add(new go.PathSegment(go.PathSegment.Line,ct,xt)),Rt.add(new go.PathSegment(go.PathSegment.Line,0,xt).close()),bt.spot1=new go.Spot(0,pt/et);var Ot=Ae(0,xt/et,1,xt/et,ct/nt,1,1,.5,Pt());return bt.spot2=new go.Spot(Ot.x,Ot.y),te(Ot),bt}),go.Shape.setFigureParameter("Arrow2",0,new Cn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Cn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=30),At>nt&&(At=nt);var at=It?It.parameter2:NaN;isNaN(at)&&(at=30),at=Math.min(at,et/2);var ct=nt-At,pt=(et-at)/2,xt=pt+at,bt=new go.Geometry,Rt=new go.PathFigure(0,pt,!0);bt.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Line,ct,pt)),Rt.add(new go.PathSegment(go.PathSegment.Line,ct,0)),Rt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),Rt.add(new go.PathSegment(go.PathSegment.Line,ct,et)),Rt.add(new go.PathSegment(go.PathSegment.Line,ct,xt)),Rt.add(new go.PathSegment(go.PathSegment.Line,0,xt).close()),bt.spot1=new go.Spot(0,pt/et);var Ot=Ae(0,xt/et,1,xt/et,ct/nt,1,1,.5,Pt());return bt.spot2=new go.Spot(Ot.x,Ot.y),te(Ot),bt}),go.Shape.defineFigureGenerator("Chevron",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et).close()),At}),go.Shape.defineFigureGenerator("DoubleArrow",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.214*et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,1*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,1*et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.786*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,1*et).close()),At}),go.Shape.setFigureParameter("DoubleEndArrow",0,new Cn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.3);var at=(.5-At/2)*et,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 bt=Ae(0,.5,.3,0,0,at/et,.1,at/et,Pt());return pt.spot1=new go.Spot(bt.x,bt.y),bt=Ae(.7,1,1,.5,0,ct/et,1,ct/et,bt),pt.spot2=new go.Spot(bt.x,bt.y),te(bt),pt}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Cn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Cn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=40);var at=It?It.parameter2:NaN;isNaN(at)&&(at=100);var ct=(et-At)/2,pt=ct+At,xt=(et-at)/2,bt=xt+at;(At>et||at>et)&&(at>At?(At=At*et/at,ct=(et-At)/2,pt=ct+At,xt=0,bt=et):(ct=0,pt=et,xt=0,bt=et));var Rt=new go.Geometry,Ot=new go.PathFigure(nt,.5*et,!0);Rt.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,bt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,pt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.3*nt,pt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.3*nt,bt)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),Ot.add(new go.PathSegment(go.PathSegment.Line,.3*nt,xt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.3*nt,ct)),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ct)),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,xt).close());var Wt=Ae(0,.5,.3,xt/et,0,ct/et,1,ct/et,Pt());return Rt.spot1=new go.Spot(Wt.x,Wt.y),Wt=Ae(.7,bt/et,1,.5,0,pt/et,1,pt/et,Wt),Rt.spot2=new go.Spot(Wt.x,Wt.y),te(Wt),Rt}),go.Shape.setFigureParameter("IBeamArrow",0,new Cn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.3);var at=(.5-At/2)*et,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 bt=Ae(.7,1,1,.5,0,ct/et,1,ct/et,Pt());return pt.spot2=new go.Spot(bt.x,bt.y),te(bt),pt}),go.Shape.setFigureParameter("IBeamArrow2",0,new Cn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Cn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=40);var at=It?It.parameter2:NaN;isNaN(at)&&(at=100);var ct=(et-At)/2,pt=ct+At,xt=(et-at)/2,bt=xt+at;(At>et||at>et)&&(at>At?(At=At*et/at,ct=(et-At)/2,pt=ct+At,xt=0,bt=et):(ct=0,pt=et,xt=0,bt=et));var Rt=new go.Geometry,Ot=new go.PathFigure(nt,.5*et,!0);Rt.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,bt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,pt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.2*nt,pt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.2*nt,bt)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,bt)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,xt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.2*nt,xt)),Ot.add(new go.PathSegment(go.PathSegment.Line,.2*nt,ct)),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,ct)),Ot.add(new go.PathSegment(go.PathSegment.Line,.7*nt,xt).close()),Rt.spot1=new go.Spot(0,ct/et);var Wt=Ae(.7,bt/et,1,.5,0,pt/et,1,pt/et,Pt());return Rt.spot2=new go.Spot(Wt.x,Wt.y),te(Wt),Rt}),go.Shape.setFigureParameter("Pointer",0,new Cn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.1);var at=new go.Geometry,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 Cn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.3);var at=new go.Geometry,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 Cn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.4);var at=(.5-At/2)*et,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 bt=Ae(.7,1,1,.5,0,ct/et,1,ct/et,Pt());return pt.spot2=new go.Spot(bt.x,bt.y),te(bt),pt}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Cn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=50);var at=(et-At)/2,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 bt=Ae(.7,1,1,.5,0,ct/et,1,ct/et,Pt());return pt.spot2=new go.Spot(bt.x,bt.y),te(bt),pt}),go.Shape.setFigureParameter("SquareArrow",0,new Cn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.7);var at=new go.Geometry,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(It,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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.9*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.9*et,(1-.85/.9)*nt,et,.85/.9*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,.9*et).close());var 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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,.15*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.85*et).close());var 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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.3*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0).close());var 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(It,nt,et){var At=It?It.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(It,nt,et){var At=It?It.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(It,nt,et){var At=It?It.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(It,nt,et){var At=It?It.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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.25*nt,.25*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var 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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.25*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var 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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.75*et).close());var 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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.85*et).close());var 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(It,nt,et){var At=new go.Geometry,at=.2,ct=.1,pt=ne*at,xt=ne*ct,bt=.5,Rt=.1,Ot=new go.PathFigure(bt*nt,(Rt+ct)*et,!0);At.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(bt-at)*nt,Rt*et,(bt-pt)*nt,(Rt+ct)*et,(bt-at)*nt,(Rt+xt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Rt-ct)*et,(bt-at)*nt,(Rt-xt)*et,(bt-pt)*nt,(Rt-ct)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(bt+at)*nt,Rt*et,(bt+pt)*nt,(Rt-ct)*et,(bt+at)*nt,(Rt-xt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Rt+ct)*et,(bt+at)*nt,(Rt+xt)*et,(bt+pt)*nt,(Rt+ct)*et));var Wt=.05,Zt=ne*Wt;bt=.05,Rt=.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)),bt=.95,Rt=.25,$t.add(new go.PathSegment(go.PathSegment.Bezier,(bt+Wt)*nt,Rt*et,(bt+Zt)*nt,(Rt-Wt)*et,(bt+Wt)*nt,(Rt-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)),Wt=.025,Zt=ne*Wt,bt=.825,Rt=.35,$t.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Rt-Wt)*et,(bt+Wt)*nt,(Rt-Zt)*et,(bt+Zt)*nt,(Rt-Wt)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(bt-Wt)*nt,Rt*et,(bt-Zt)*nt,(Rt-Wt)*et,(bt-Wt)*nt,(Rt-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)),Wt=.05,Zt=ne*Wt,bt=.5,Rt=.7,$t.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Rt-Wt)*et,(bt+Wt)*nt,(Rt-Zt)*et,(bt+Zt)*nt,(Rt-Wt)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(bt-Wt)*nt,Rt*et,(bt-Zt)*nt,(Rt-Wt)*et,(bt-Wt)*nt,(Rt-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)),Wt=.025,Zt=ne*Wt,bt=.175,Rt=.35,$t.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Rt-Wt)*et,(bt+Wt)*nt,(Rt-Zt)*et,(bt+Zt)*nt,(Rt-Wt)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(bt-Wt)*nt,Rt*et,(bt-Zt)*nt,(Rt-Wt)*et,(bt-Wt)*nt,(Rt-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)),Wt=.05,Zt=ne*Wt,bt=.05,Rt=.25,$t.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Rt-Wt)*et,(bt-Wt)*nt,(Rt-Zt)*et,(bt-Zt)*nt,(Rt-Wt)*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 Cn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(It,nt,et){var At=It?It.parameter1:NaN;isNaN(At)&&(At=.2);var at=new go.Geometry,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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,.5*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et));var 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(It,nt,et){var At=new go.Geometry,at=It?It.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(It,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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,nt,0,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.9*et,.25*nt,.1*et).close()),At.spot1=new go.Spot(.226,0),At.spot2=new go.Spot(.81,1),At}),go.Shape.defineFigureGenerator("DiskStorage",function(It,nt,et){var At=new go.Geometry,at=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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.25*nt,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,nt,0,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close()),At.spot1=new go.Spot(.25,0),At.spot2=new go.Spot(.75,1),At}),go.Shape.defineFigureGenerator("DividedEvent",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;isNaN(at)?at=.2:at<.15&&(at=.15);var 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(It,nt,et){var At=new go.Geometry,at=It?It.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(It,nt,et){var At=new go.Geometry;et=et/.8;var at=new go.PathFigure(0,.7*et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close()),At.spot1=go.Spot.TopLeft,At.spot2=new go.Spot(1,.6),At}),go.Shape.defineFigureGenerator("ExternalOrganization",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;(isNaN(at)||at<.2)&&(at=.2);var 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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close());var 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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var 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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt,.5*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et));var 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(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN,ct=It?It.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(It,nt,et){var At=new go.Geometry,at=1/Math.SQRT2,ct=(1-1/Math.SQRT2)/2,pt=ne*.5,xt=.5,bt=new go.PathFigure(nt,xt*et,!0);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,xt*nt,et,nt,(xt+pt)*et,(xt+pt)*nt,et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,0,xt*et,(xt-pt)*nt,et,0,(xt+pt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,xt*nt,0,0,(xt-pt)*et,(xt-pt)*nt,0)),bt.add(new go.PathSegment(go.PathSegment.Bezier,nt,xt*et,(xt+pt)*nt,0,nt,(xt-pt)*et));var Rt=new go.PathFigure((ct+at)*nt,(ct+at)*et,!1);return At.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Line,ct*nt,ct*et)),Rt.add(new go.PathSegment(go.PathSegment.Move,ct*nt,(ct+at)*et)),Rt.add(new go.PathSegment(go.PathSegment.Line,(ct+at)*nt,ct*et)),At}),go.Shape.defineFigureGenerator("LinedDocument",function(It,nt,et){var At=new go.Geometry;et=et/.8;var at=new go.PathFigure(0,.7*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close());var 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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),At.spot1=new go.Spot(0,.25),At.spot2=go.Spot.BottomRight,At}),go.Shape.defineFigureGenerator("MagneticTape",function(It,nt,et){var At=new go.Geometry,at=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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.25*et).close()),At.spot1=new go.Spot(0,.25),At.spot2=go.Spot.BottomRight,At}),go.Shape.defineFigureGenerator("MessageFromUser",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;isNaN(at)&&(at=.7);var 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(It,nt,et){var At=new go.Geometry,at=It?It.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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At.spot1=new go.Spot(0,.25),At.spot2=new go.Spot(1,.75),At}),go.Shape.defineFigureGenerator("MultiDocument",function(It,nt,et){var At=new go.Geometry;et=et/.8;var at=new go.PathFigure(nt,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.44*et,.96*nt,.47*et,.93*nt,.45*et)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.54*et,.86*nt,.57*et,.83*nt,.55*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.4*nt,.4*et,.4*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0).close());var 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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.1*nt,.1*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et).close());var 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(It,nt,et){var At=new go.Geometry,at=It?It.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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At.spot1=go.Spot.TopLeft,At.spot2=new go.Spot(.75,1),At}),go.Shape.defineFigureGenerator("Or",function(It,nt,et){var At=new go.Geometry,at=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(It,nt,et){var At=new go.Geometry;et=et/.8;var at=new go.PathFigure(0,.7*et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.3*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.3*et,.5*nt,.6*et,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close()),At.spot1=new go.Spot(0,.49),At.spot2=new go.Spot(1,.75),At}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN,ct=It?It.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(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN,ct=It?It.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(It,nt,et){var At=new go.Geometry,at=It?It.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(It,nt,et){var At=new go.Geometry,at=It?It.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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close());var 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(It,nt,et){var At=new go.Geometry,at=It?It.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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.25*nt,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*nt,.5*et,.25*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*nt,.5*et,.25*nt,.5*et)),At.spot1=new go.Spot(.23,0),At.spot2=new go.Spot(.77,1),At}),go.Shape.defineFigureGenerator("TransmittalTape",function(It,nt,et){var At=new go.Geometry,at=It?It.parameter1:NaN;isNaN(at)&&(at=.1);var 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(It,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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At.spot1=new go.Spot(0,.25),At.spot2=new go.Spot(.5,.75),At}),go.Shape.defineFigureGenerator("Clock",function(It,nt,et){var At=new go.Geometry,at=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 bt=new go.PathFigure(.8*nt,.75*et,!1);return At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.25*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.25*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.75*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.75*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.25*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.25*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.75*et)),At}),go.Shape.defineFigureGenerator("Ground",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Move,.3*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Move,.4*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et)),At}),go.Shape.defineFigureGenerator("Inverter",function(It,nt,et){var At=new go.Geometry,at=ne*.1,ct=.1,pt=.9,xt=.5,bt=new go.PathFigure(.8*nt,.5*et,!0);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,0,et)),bt.add(new go.PathSegment(go.PathSegment.Line,0,0)),bt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et));var Rt=new go.PathFigure((pt+ct)*nt,xt*et,!0);return At.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ct)*nt,xt*et,(pt-at)*nt,(xt+ct)*et,(pt-ct)*nt,(xt+at)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et)),Rt.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(It,nt,et){var At=new go.Geometry,at=ne*.5,ct=ne*.4,pt=ne*.1,xt=.1,bt=.9,Rt=.5,Ot=new go.PathFigure(.8*nt,.5*et,!0);At.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,et,.8*nt,(.5+ct)*et,(.4+at)*nt,et)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,et)),Ot.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ot.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(.4+at)*nt,0,.8*nt,(.5-ct)*et));var Wt=new go.PathFigure((bt+xt)*nt,Rt*et,!0);return At.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Rt+xt)*et,(bt+xt)*nt,(Rt+pt)*et,(bt+pt)*nt,(Rt+xt)*et)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(bt-xt)*nt,Rt*et,(bt-pt)*nt,(Rt+xt)*et,(bt-xt)*nt,(Rt+pt)*et)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Rt-xt)*et,(bt-xt)*nt,(Rt-pt)*et,(bt-pt)*nt,(Rt-xt)*et)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(bt+xt)*nt,Rt*et,(bt+pt)*nt,(Rt-xt)*et,(bt+xt)*nt,(Rt-pt)*et)),At.spot1=new go.Spot(0,.05),At.spot2=new go.Spot(.55,.95),At}),go.Shape.defineFigureGenerator("NorGate",function(It,nt,et){var At=new go.Geometry,at=.5,ct=ne*at,pt=0,xt=.5,bt=new go.PathFigure(.8*nt,.5*et,!0);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.7*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.75*et,.25*nt,.25*et)),bt.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 Rt=new go.PathFigure((pt-at)*nt,xt*et,!0);return At.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at)*nt,xt*et,(pt+ct)*nt,(xt-at)*et,(pt+at)*nt,(xt-ct)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),Rt.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(It,nt,et){var At=new go.Geometry,at=.5,ct=ne*at,pt=0,xt=.5,bt=new go.PathFigure(0,0,!0);return At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(pt+ct+ct)*nt,(xt-at)*et,.8*nt,(xt-ct)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.8*nt,(xt+ct)*et,(pt+ct+ct)*nt,(xt+at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.75*et,.25*nt,.25*et).close()),At.spot1=new go.Spot(.2,.25),At.spot2=new go.Spot(.75,.75),At}),go.Shape.defineFigureGenerator("XnorGate",function(It,nt,et){var At=new go.Geometry,at=.5,ct=ne*at,pt=.2,xt=.5,bt=new go.PathFigure(.1*nt,0,!1);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,et,.35*nt,.25*et,.35*nt,.75*et));var Rt=new go.PathFigure(.8*nt,.5*et,!0);At.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,et,.7*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,.45*nt,.75*et,.45*nt,.25*et)),Rt.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 Ot=new go.PathFigure((pt-at)*nt,xt*et,!0);return At.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at)*nt,xt*et,(pt+ct)*nt,(xt-at)*et,(pt+at)*nt,(xt-ct)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),Ot.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(It,nt,et){var At=new go.Geometry,at=.5,ct=ne*at,pt=.2,xt=.5,bt=new go.PathFigure(.1*nt,0,!1);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,et,.35*nt,.25*et,.35*nt,.75*et));var Rt=new go.PathFigure(.2*nt,0,!0);return At.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(pt+ct)*nt,(xt-at)*et,.9*nt,(xt-ct)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,et,.9*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,.45*nt,.75*et,.45*nt,.25*et).close()),At.spot1=new go.Spot(.4,.25),At.spot2=new go.Spot(.8,.75),At}),go.Shape.defineFigureGenerator("Capacitor",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Move,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),At}),go.Shape.defineFigureGenerator("Resistor",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.5*et,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.5*et)),At}),go.Shape.defineFigureGenerator("Inductor",function(It,nt,et){var At=new go.Geometry,at=ne*.1,ct=.1,pt=.1,xt=.5,bt=new go.PathFigure((pt-at*.5)*nt,et,!1);return At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,0,(pt-at)*nt,et,(pt-ct)*nt,0)),pt=.3,bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,et,(pt+ct)*nt,0,(pt+at)*nt,et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,0,(pt-at)*nt,et,(pt-ct)*nt,0)),pt=.5,bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,et,(pt+ct)*nt,0,(pt+at)*nt,et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,0,(pt-at)*nt,et,(pt-ct)*nt,0)),pt=.7,bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,et,(pt+ct)*nt,0,(pt+at)*nt,et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,0,(pt-at)*nt,et,(pt-ct)*nt,0)),pt=.9,bt.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(It,nt,et){var At=new go.Geometry,at=ne*.5,ct=.5,pt=.5,xt=.5,bt=new go.PathFigure((pt-ct)*nt,xt*et,!1);return At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,xt*et,(pt+at)*nt,(xt-ct)*et,(pt+ct)*nt,(xt-at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ct)*nt,xt*et,(pt-at)*nt,(xt+ct)*et,(pt-ct)*nt,(xt+at)*et)),bt.add(new go.PathSegment(go.PathSegment.Move,(pt-ct+.1)*nt,xt*et)),bt.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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.75*et,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),at.add(new go.PathSegment(go.PathSegment.Move,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),At}),go.Shape.defineFigureGenerator("Diode",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt,0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),At.spot1=new go.Spot(0,.25),At.spot2=new go.Spot(.5,.75),At}),go.Shape.defineFigureGenerator("Wifi",function(It,nt,et){var At=new go.Geometry,at=nt,ct=et;nt=nt*.38,et=et*.6;var pt=ne*.8,xt=.8,bt=0,Rt=.5,Ot=(at-nt)/2,Wt=(ct-et)/2,Zt=new go.PathFigure(bt*nt+Ot,(Rt+xt)*et+Wt,!0);At.add(Zt),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(bt-xt)*nt+Ot,Rt*et+Wt,(bt-pt)*nt+Ot,(Rt+xt)*et+Wt,(bt-xt)*nt+Ot,(Rt+pt)*et+Wt)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ot,(Rt-xt)*et+Wt,(bt-xt)*nt+Ot,(Rt-pt)*et+Wt,(bt-pt)*nt+Ot,(Rt-xt)*et+Wt)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(bt-xt+pt*.5)*nt+Ot,Rt*et+Wt,bt*nt+Ot,(Rt-xt)*et+Wt,(bt-xt+pt*.5)*nt+Ot,(Rt-pt)*et+Wt)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ot,(Rt+xt)*et+Wt,(bt-xt+pt*.5)*nt+Ot,(Rt+pt)*et+Wt,bt*nt+Ot,(Rt+xt)*et+Wt).close()),pt=ne*.4,xt=.4,bt=.2,Rt=.5;var $t=new go.PathFigure(bt*nt+Ot,(Rt+xt)*et+Wt,!0);At.add($t),$t.add(new go.PathSegment(go.PathSegment.Bezier,(bt-xt)*nt+Ot,Rt*et+Wt,(bt-pt)*nt+Ot,(Rt+xt)*et+Wt,(bt-xt)*nt+Ot,(Rt+pt)*et+Wt)),$t.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ot,(Rt-xt)*et+Wt,(bt-xt)*nt+Ot,(Rt-pt)*et+Wt,(bt-pt)*nt+Ot,(Rt-xt)*et+Wt)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(bt-xt+pt*.5)*nt+Ot,Rt*et+Wt,bt*nt+Ot,(Rt-xt)*et+Wt,(bt-xt+pt*.5)*nt+Ot,(Rt-pt)*et+Wt)),$t.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ot,(Rt+xt)*et+Wt,(bt-xt+pt*.5)*nt+Ot,(Rt+pt)*et+Wt,bt*nt+Ot,(Rt+xt)*et+Wt).close()),pt=ne*.2,xt=.2,bt=.5,Rt=.5;var Ce=new go.PathFigure((bt-xt)*nt+Ot,Rt*et+Wt,!0);At.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ot,(Rt-xt)*et+Wt,(bt-xt)*nt+Ot,(Rt-pt)*et+Wt,(bt-pt)*nt+Ot,(Rt-xt)*et+Wt)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(bt+xt)*nt+Ot,Rt*et+Wt,(bt+pt)*nt+Ot,(Rt-xt)*et+Wt,(bt+xt)*nt+Ot,(Rt-pt)*et+Wt)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ot,(Rt+xt)*et+Wt,(bt+xt)*nt+Ot,(Rt+pt)*et+Wt,(bt+pt)*nt+Ot,(Rt+xt)*et+Wt)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(bt-xt)*nt+Ot,Rt*et+Wt,(bt-pt)*nt+Ot,(Rt+xt)*et+Wt,(bt-xt)*nt+Ot,(Rt+pt)*et+Wt)),pt=ne*.4,xt=.4,bt=.8,Rt=.5;var ge=new go.PathFigure(bt*nt+Ot,(Rt-xt)*et+Wt,!0);At.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,(bt+xt)*nt+Ot,Rt*et+Wt,(bt+pt)*nt+Ot,(Rt-xt)*et+Wt,(bt+xt)*nt+Ot,(Rt-pt)*et+Wt)),ge.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ot,(Rt+xt)*et+Wt,(bt+xt)*nt+Ot,(Rt+pt)*et+Wt,(bt+pt)*nt+Ot,(Rt+xt)*et+Wt)),ge.add(new go.PathSegment(go.PathSegment.Bezier,(bt+xt-pt*.5)*nt+Ot,Rt*et+Wt,bt*nt+Ot,(Rt+xt)*et+Wt,(bt+xt-pt*.5)*nt+Ot,(Rt+pt)*et+Wt)),ge.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ot,(Rt-xt)*et+Wt,(bt+xt-pt*.5)*nt+Ot,(Rt-pt)*et+Wt,bt*nt+Ot,(Rt-xt)*et+Wt).close()),pt=ne*.8,xt=.8,bt=1,Rt=.5;var nn=new go.PathFigure(bt*nt+Ot,(Rt-xt)*et+Wt,!0);return At.add(nn),nn.add(new go.PathSegment(go.PathSegment.Bezier,(bt+xt)*nt+Ot,Rt*et+Wt,(bt+pt)*nt+Ot,(Rt-xt)*et+Wt,(bt+xt)*nt+Ot,(Rt-pt)*et+Wt)),nn.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ot,(Rt+xt)*et+Wt,(bt+xt)*nt+Ot,(Rt+pt)*et+Wt,(bt+pt)*nt+Ot,(Rt+xt)*et+Wt)),nn.add(new go.PathSegment(go.PathSegment.Bezier,(bt+xt-pt*.5)*nt+Ot,Rt*et+Wt,bt*nt+Ot,(Rt+xt)*et+Wt,(bt+xt-pt*.5)*nt+Ot,(Rt+pt)*et+Wt)),nn.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Ot,(Rt-xt)*et+Wt,(bt+xt-pt*.5)*nt+Ot,(Rt-pt)*et+Wt,bt*nt+Ot,(Rt-xt)*et+Wt).close()),At}),go.Shape.defineFigureGenerator("Email",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var 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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.35*nt,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.65*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.35*nt,0).close());var 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(It,nt,et){var At=new go.Geometry,at=ne*.4,ct=.4,pt=.5,xt=.5,bt=Pt(),Rt=Pt(),Ot=Pt(),Wt=Pt();Be(pt,xt-ct,pt+at,xt-ct,pt+ct,xt-at,pt+ct,xt,.5,bt,bt,Rt,Ot,Wt);var Zt=Qt(Rt.x,Rt.y),$t=new go.PathFigure(Rt.x*nt,Rt.y*et,!0);At.add($t),$t.add(new go.PathSegment(go.PathSegment.Bezier,(pt+ct)*nt,xt*et,Ot.x*nt,Ot.y*et,Wt.x*nt,Wt.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)),Be(pt-ct,xt,pt-ct,xt-at,pt-at,xt-ct,pt,xt-ct,.5,Ot,Wt,Rt,bt,bt),$t.add(new go.PathSegment(go.PathSegment.Bezier,Rt.x*nt,Rt.y*et,Ot.x*nt,Ot.y*et,Wt.x*nt,Wt.y*et)),at=ne*.3,ct=.3,Be(pt-ct,xt,pt-ct,xt-at,pt-at,xt-ct,pt,xt-ct,.5,Ot,Wt,Rt,bt,bt),$t.add(new go.PathSegment(go.PathSegment.Line,Rt.x*nt,Rt.y*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(pt-ct)*nt,xt*et,Wt.x*nt,Wt.y*et,Ot.x*nt,Ot.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)),Be(pt,xt-ct,pt+at,xt-ct,pt+ct,xt-at,pt+ct,xt,.5,bt,bt,Rt,Ot,Wt),$t.add(new go.PathSegment(go.PathSegment.Bezier,Rt.x*nt,Rt.y*et,Wt.x*nt,Wt.y*et,Ot.x*nt,Ot.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(bt),te(Rt),te(Ot),te(Wt),te(Zt),At.spot1=new go.Spot(.25,.45),At.spot2=new go.Spot(.75,.8),At}),go.Shape.defineFigureGenerator("Fallout",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et/2,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,180,360,nt/2,et/2,nt/2,et/2));function ct(pt,xt,bt){pt.add(new go.PathSegment(go.PathSegment.Move,(.3+xt)*nt,(.8+bt)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(.5+xt)*nt,(.5+bt)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(.1+xt)*nt,(.5+bt)*et)),pt.add(new go.PathSegment(go.PathSegment.Line,(.3+xt)*nt,(.8+bt)*et).close())}return ct(at,0,0),ct(at,.4,0),ct(at,.2,-.3),At}),go.Shape.defineFigureGenerator("IrritationHazard",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.2*nt,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.3*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.2*et).close()),At.spot1=new go.Spot(.3,.3),At.spot2=new go.Spot(.7,.7),At}),go.Shape.defineFigureGenerator("ElectricalHazard",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.37*nt,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.11*et)),at.add(new go.PathSegment(go.PathSegment.Line,.77*nt,.04*et)),at.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.49*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.37*et)),at.add(new go.PathSegment(go.PathSegment.Line,.63*nt,.86*et)),at.add(new go.PathSegment(go.PathSegment.Line,.77*nt,.91*et)),at.add(new go.PathSegment(go.PathSegment.Line,.34*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.34*nt,.78*et)),at.add(new go.PathSegment(go.PathSegment.Line,.44*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.56*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.68*et).close()),At}),go.Shape.defineFigureGenerator("FireHazard",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.1*nt,et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.29*nt,0,-.25*nt,.63*et,.45*nt,.44*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.51*nt,.42*et,.48*nt,.17*et,.54*nt,.35*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.59*nt,.18*et,.59*nt,.29*et,.58*nt,.28*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,.6*et,.8*nt,.34*et,.88*nt,.43*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.88*nt,.31*et,.87*nt,.48*et,.88*nt,.43*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,et,1.17*nt,.76*et,.82*nt,.8*et).close()),At.spot1=new go.Spot(.07,.445),At.spot2=new go.Spot(.884,.958),At}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(It,nt,et){var At=new go.Geometry,at=.5,ct=0,pt=0,xt=at*ne,bt=.4*Math.SQRT2/2+.5,Rt=.5-.5*Math.SQRT2/2,Ot=1,Wt=.5,Zt=.5,$t=0,Ce=new go.PathFigure(bt*nt,(1-Rt)*et,!1);return At.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,Ot*nt,Wt*et,Ot*nt,.7*et,Ot*nt,Wt*et)),Ce.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)),Ce.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)),Ce.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)),Ce.add(new go.PathSegment(go.PathSegment.Move,(.25+ct)*nt,.8*et)),Ce.add(new go.PathSegment(go.PathSegment.Line,(.35+ct)*nt,.9*et)),Ce.add(new go.PathSegment(go.PathSegment.Line,(.2+ct)*nt,.95*et)),At}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Move,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),At}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Move,0,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Move,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),At}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);At.add(at);var 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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.5*et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close()),At}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.2*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*et).close());var at=new go.PathFigure(0,.2*et,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),At}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.7*nt,et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,0,.6*nt,.5*et,0,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,et,.4*nt,.5*et,nt,.5*et).close());var 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(It,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,bt=pt,Rt=Math.PI/4,Ot=4*(1-Math.cos(Rt))/(3*Math.sin(Rt)),Wt=Ot*.5,Zt=pt,$t=pt,Ce=Ot*Zt,ge=Ot*$t;ct.add(new go.PathSegment(go.PathSegment.Bezier,(xt-Zt)*nt,bt*et,(xt-(Ce+Zt)/2)*nt,(bt+($t+ge)/2)*et,(xt-Zt)*nt,(bt+ge)*et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,xt*nt,(bt-$t)*et,(xt-Zt)*nt,(bt-ge)*et,(xt-Ce)*nt,(bt-$t)*et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,(xt+Zt)*nt,bt*et,(xt+Ce)*nt,(bt-$t)*et,(xt+Zt)*nt,(bt-ge)*et)),ct.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*nt,(1-.595)*et,(xt+Zt)*nt,(bt+ge)*et,(xt+(Ce+Zt)/2)*nt,(bt+($t+ge)/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 nn=new go.PathFigure(.2*nt,et,!1);At.add(nn),nn.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.8*et));var qe=new go.PathFigure(.8*nt,et,!1);return At.add(qe),qe.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.8*et)),At}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.1*nt,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et).close());var 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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.33*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.66*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.66*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.5*et).close()),At}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);At.add(at);var 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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.05*nt,et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,.8*et,0,et,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.1*et,.5*nt,0,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.95*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,et,nt,et,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.05*nt,et));var 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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.45*nt,.95*et,!1);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.95*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.185*nt,.85*et,.17*nt,.95*et,.15*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Line,.235*nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.625*et)),at.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.65*et)),at.add(new go.PathSegment(go.PathSegment.Line,.275*nt,.45*et)),at.add(new go.PathSegment(go.PathSegment.Line,.05*nt,.45*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.05*nt,.575*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.1875*nt,.95*et,0,.675*et,0,.7*et)),at.add(new go.PathSegment(go.PathSegment.Move,.45*nt,.95*et)),at.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.775*et)),at.add(new go.PathSegment(go.PathSegment.Line,.22*nt,.775*et));var 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(It,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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.15*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var 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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var 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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt,et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et).close());var 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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.15*nt,.6*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.85*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et));var 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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt,et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.66*nt,.33*et)),at.add(new go.PathSegment(go.PathSegment.Line,.66*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.33*et)),at.add(new go.PathSegment(go.PathSegment.Line,.33*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,.33*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),At}),go.Shape.defineFigureGenerator("Workcell",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.65*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.35*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At}),go.Shape.defineFigureGenerator("Supermarket",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.33*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.33*et)),at.add(new go.PathSegment(go.PathSegment.Move,nt,.33*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.66*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.66*et)),at.add(new go.PathSegment(go.PathSegment.Move,nt,.66*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),At}),go.Shape.defineFigureGenerator("TruckShipment",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var 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,bt=.2,Rt=.9,Ot=new go.PathFigure((bt-pt)*nt,Rt*et,!0);At.add(Ot),Ot.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Rt-pt)*et,(bt-pt)*nt,(Rt-xt)*et,(bt-xt)*nt,(Rt-pt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(bt+pt)*nt,Rt*et,(bt+xt)*nt,(Rt-pt)*et,(bt+pt)*nt,(Rt-xt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Rt+pt)*et,(bt+pt)*nt,(Rt+xt)*et,(bt+xt)*nt,(Rt+pt)*et)),Ot.add(new go.PathSegment(go.PathSegment.Bezier,(bt-pt)*nt,Rt*et,(bt-xt)*nt,(Rt+pt)*et,(bt-pt)*nt,(Rt+xt)*et).close()),pt=.1,xt=ne*.1,bt=.8,Rt=.9;var Wt=new go.PathFigure((bt-pt)*nt,Rt*et,!0);return At.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Rt-pt)*et,(bt-pt)*nt,(Rt-xt)*et,(bt-xt)*nt,(Rt-pt)*et)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(bt+pt)*nt,Rt*et,(bt+xt)*nt,(Rt-pt)*et,(bt+pt)*nt,(Rt-xt)*et)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Rt+pt)*et,(bt+pt)*nt,(Rt+xt)*et,(bt+xt)*nt,(Rt+pt)*et)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(bt-pt)*nt,Rt*et,(bt-xt)*nt,(Rt+pt)*et,(bt-pt)*nt,(Rt+xt)*et).close()),At}),go.Shape.defineFigureGenerator("KanbanPost",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.2*nt,0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),At}),go.Shape.defineFigureGenerator("Forklift",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,0));var 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 bt=.1,Rt=ne*.1,Ot=.1,Wt=.9,Zt=new go.PathFigure((Ot-bt)*nt,Wt*et,!0);At.add(Zt),Zt.add(new go.PathSegment(go.PathSegment.Bezier,Ot*nt,(Wt-bt)*et,(Ot-bt)*nt,(Wt-Rt)*et,(Ot-Rt)*nt,(Wt-bt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(Ot+bt)*nt,Wt*et,(Ot+Rt)*nt,(Wt-bt)*et,(Ot+bt)*nt,(Wt-Rt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,Ot*nt,(Wt+bt)*et,(Ot+bt)*nt,(Wt+Rt)*et,(Ot+Rt)*nt,(Wt+bt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(Ot-bt)*nt,Wt*et,(Ot-Rt)*nt,(Wt+bt)*et,(Ot-bt)*nt,(Wt+Rt)*et)),bt=.1,Rt=ne*.1,Ot=.4,Wt=.9;var $t=new go.PathFigure((Ot-bt)*nt,Wt*et,!0);return At.add($t),$t.add(new go.PathSegment(go.PathSegment.Bezier,Ot*nt,(Wt-bt)*et,(Ot-bt)*nt,(Wt-Rt)*et,(Ot-Rt)*nt,(Wt-bt)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(Ot+bt)*nt,Wt*et,(Ot+Rt)*nt,(Wt-bt)*et,(Ot+bt)*nt,(Wt-Rt)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,Ot*nt,(Wt+bt)*et,(Ot+bt)*nt,(Wt+Rt)*et,(Ot+Rt)*nt,(Wt+bt)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(Ot-bt)*nt,Wt*et,(Ot-Rt)*nt,(Wt+bt)*et,(Ot-bt)*nt,(Wt+Rt)*et)),At}),go.Shape.defineFigureGenerator("RailShipment",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.1*nt,.4*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.4*et).close());var 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 Ot=.05,Wt=ne*.05,Zt=.175,$t=.95,xt=new go.PathFigure((Zt-Ot)*nt,$t*et,!0);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,Zt*nt,($t-Ot)*et,(Zt-Ot)*nt,($t-Wt)*et,(Zt-Wt)*nt,($t-Ot)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,(Zt+Ot)*nt,$t*et,(Zt+Wt)*nt,($t-Ot)*et,(Zt+Ot)*nt,($t-Wt)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,Zt*nt,($t+Ot)*et,(Zt+Ot)*nt,($t+Wt)*et,(Zt+Wt)*nt,($t+Ot)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,(Zt-Ot)*nt,$t*et,(Zt-Wt)*nt,($t+Ot)*et,(Zt-Ot)*nt,($t+Wt)*et));var Ot=.05,Wt=ne*.05,Zt=.375,$t=.95,bt=new go.PathFigure((Zt-Ot)*nt,$t*et,!0);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,Zt*nt,($t-Ot)*et,(Zt-Ot)*nt,($t-Wt)*et,(Zt-Wt)*nt,($t-Ot)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(Zt+Ot)*nt,$t*et,(Zt+Wt)*nt,($t-Ot)*et,(Zt+Ot)*nt,($t-Wt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,Zt*nt,($t+Ot)*et,(Zt+Ot)*nt,($t+Wt)*et,(Zt+Wt)*nt,($t+Ot)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(Zt-Ot)*nt,$t*et,(Zt-Wt)*nt,($t+Ot)*et,(Zt-Ot)*nt,($t+Wt)*et));var Ot=.05,Wt=ne*.05,Zt=.625,$t=.95,Rt=new go.PathFigure((Zt-Ot)*nt,$t*et,!0);At.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Bezier,Zt*nt,($t-Ot)*et,(Zt-Ot)*nt,($t-Wt)*et,(Zt-Wt)*nt,($t-Ot)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,(Zt+Ot)*nt,$t*et,(Zt+Wt)*nt,($t-Ot)*et,(Zt+Ot)*nt,($t-Wt)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,Zt*nt,($t+Ot)*et,(Zt+Ot)*nt,($t+Wt)*et,(Zt+Wt)*nt,($t+Ot)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,(Zt-Ot)*nt,$t*et,(Zt-Wt)*nt,($t+Ot)*et,(Zt-Ot)*nt,($t+Wt)*et));var Ot=.05,Wt=ne*.05,Zt=.825,$t=.95,Ce=new go.PathFigure((Zt-Ot)*nt,$t*et,!0);At.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,Zt*nt,($t-Ot)*et,(Zt-Ot)*nt,($t-Wt)*et,(Zt-Wt)*nt,($t-Ot)*et)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(Zt+Ot)*nt,$t*et,(Zt+Wt)*nt,($t-Ot)*et,(Zt+Ot)*nt,($t-Wt)*et)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,Zt*nt,($t+Ot)*et,(Zt+Ot)*nt,($t+Wt)*et,(Zt+Wt)*nt,($t+Ot)*et)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(Zt-Ot)*nt,$t*et,(Zt-Wt)*nt,($t+Ot)*et,(Zt-Ot)*nt,($t+Wt)*et).close());var ge=new go.PathFigure(0,et,!1);return At.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),At}),go.Shape.defineFigureGenerator("Warehouse",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var 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,bt=ne*.05,Rt=.35,Ot=.775,Wt=new go.PathFigure((Rt-xt)*nt,Ot*et,!0);return At.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,Rt*nt,(Ot-xt)*et,(Rt-xt)*nt,(Ot-bt)*et,(Rt-bt)*nt,(Ot-xt)*et)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Rt+xt)*nt,Ot*et,(Rt+bt)*nt,(Ot-xt)*et,(Rt+xt)*nt,(Ot-bt)*et)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,Rt*nt,(Ot+xt)*et,(Rt+xt)*nt,(Ot+bt)*et,(Rt+bt)*nt,(Ot+xt)*et)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Rt-xt)*nt,Ot*et,(Rt-bt)*nt,(Ot+xt)*et,(Rt-xt)*nt,(Ot+bt)*et).close()),At}),go.Shape.defineFigureGenerator("ControlCenter",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Move,.1*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et).close()),At}),go.Shape.defineFigureGenerator("Bluetooth",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.75*et,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),At}),go.Shape.defineFigureGenerator("Bookmark",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),At}),go.Shape.defineFigureGenerator("Bookmark",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),At}),go.Shape.defineFigureGenerator("Globe",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Move,0,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.75*nt,0,nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,.75*et,.75*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.25*nt,et,0,.75*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,.25*et,.25*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,.15*nt,.25*et,.15*nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.85*nt,.75*et,.85*nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Move,.1675*nt,.15*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.8325*nt,.15*et,.35*nt,.3*et,.65*nt,.3*et)),at.add(new go.PathSegment(go.PathSegment.Move,.1675*nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.8325*nt,.85*et,.35*nt,.7*et,.65*nt,.7*et)),At}),go.Shape.defineFigureGenerator("Wave",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.25*et,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.25*et,.1*nt,0,.2*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,.25*et,.425*nt,.5*et,.575*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.25*et,.8*nt,0,.9*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Move,0,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.75*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.75*et,.1*nt,.5*et,.2*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,.75*et,.425*nt,et,.575*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.75*et,.8*nt,.5*et,.9*nt,.5*et)),At}),go.Shape.defineFigureGenerator("Operator",function(It,nt,et){var At=new go.Geometry,at=.3,ct=ne*.3,pt=.5,xt=.7,bt=new go.PathFigure((pt-at)*nt,xt*et,!0);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at)*nt,xt*et,(pt+ct)*nt,(xt-at)*et,(pt+at)*nt,(xt-ct)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),bt.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 Rt=new go.PathFigure(0,.7*et,!1);return At.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.7*et,0,0,nt,0)),At}),go.Shape.defineFigureGenerator("TripleFanBlades",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.65*nt,.3*et,.65*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.35*nt,.5*et,.35*nt,.3*et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.65*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.3*nt,.6*et,.1*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.2*nt,et,.35*nt,.95*et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.65*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,et,.7*nt,.6*et,.9*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.8*nt,et,.65*nt,.95*et)),At}),go.Shape.defineFigureGenerator("CentrifugalPump",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,0,.075*et,0,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,et,0,et,.4*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.4*et,.8*nt,et,.85*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),At}),go.Shape.defineFigureGenerator("Battery",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Move,.4*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.1*et));var 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(It,nt,et){var At=new go.Geometry,at=.5,ct=ne*.5,pt=.5,xt=.5,bt=new go.PathFigure((pt-at)*nt,xt*et,!0);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at)*nt,xt*et,(pt+ct)*nt,(xt-at)*et,(pt+at)*nt,(xt-ct)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),bt.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 Rt=new go.PathFigure(.15*nt,.5*et,!1);return At.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.5*et)),At}),go.Shape.defineFigureGenerator("Flag",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.1*et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Move,0,.1*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.1*et,.15*nt,0,.35*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,.65*nt,.2*et,.85*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.5*et,.85*nt,.6*et,.65*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.35*nt,.4*et,.15*nt,.4*et).close()),At}),go.Shape.defineFigureGenerator("Help",function(It,nt,et){var At=new go.Geometry,at=.5,ct=ne*.5,pt=.5,xt=.5,bt=new go.PathFigure((pt-at)*nt,xt*et,!1);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at)*nt,xt*et,(pt+ct)*nt,(xt-at)*et,(pt+at)*nt,(xt-ct)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),bt.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 Rt=new go.PathFigure((pt-at)*nt,xt*et,!1);return At.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt-at)*et,(pt-at)*nt,(xt-ct)*et,(pt-ct)*nt,(xt-at)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,(pt+at)*nt,xt*et,(pt+ct)*nt,(xt-at)*et,(pt+at)*nt,(xt-ct)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,pt*nt,(xt+at)*et,(pt+at)*nt,(xt+ct)*et,(pt+ct)*nt,(xt+at)*et)),Rt.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()),Rt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.7*et)),Rt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,.75*nt,.475*et,.75*nt,.225*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.35*et,.4*nt,.2*et,.3*nt,.25*et)),At}),go.Shape.defineFigureGenerator("Location",function(It,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,et,!0).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.975*nt,.025*et,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*nt,.5*et,.5*nt,0,.025*nt,.025*et).close()).add(new go.PathSegment(go.PathSegment.Move,.5*nt,.2*et)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*nt,.3*et,.1*nt,.1*et).close()))}),go.Shape.defineFigureGenerator("Lock",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.5*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var 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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.5*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var 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(It,nt,et){return new go.Geometry().add(new go.PathFigure(.9375*nt,.56246875*et,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Line,.80621875*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Bezier,.763*nt,.3316875*et,.79840625*nt,.39915625*et,.7834375*nt,.3635*et)).add(new go.PathSegment(go.PathSegment.Line,.8566875*nt,.23796875*et)).add(new go.PathSegment(go.PathSegment.Line,.76825*nt,.14959375*et)).add(new go.PathSegment(go.PathSegment.Line,.67596875*nt,.24184375*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*nt,.19378125*et,.64228125*nt,.2188125*et,.603875*nt,.2021875*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.0625*et)).add(new go.PathSegment(go.PathSegment.Line,.4375*nt,.0625*et)).add(new go.PathSegment(go.PathSegment.Line,.4375*nt,.19378125*et)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*nt,.239375*et,.39759375*nt,.20190625*et,.36053125*nt,.2176875*et)).add(new go.PathSegment(go.PathSegment.Line,.2379375*nt,.14959375*et)).add(new go.PathSegment(go.PathSegment.Line,.14953125*nt,.2379375*et)).add(new go.PathSegment(go.PathSegment.Line,.23934375*nt,.3278125*et)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*nt,.4375*et,.21765625*nt,.36059375*et,.201875*nt,.397625*et)).add(new go.PathSegment(go.PathSegment.Line,.0625*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Line,.0625*nt,.5625*et)).add(new go.PathSegment(go.PathSegment.Line,.1938125*nt,.5625*et)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*nt,.67596875*et,.20221875*nt,.603875*et,.21884375*nt,.64228125*et)).add(new go.PathSegment(go.PathSegment.Line,.1495625*nt,.76825*et)).add(new go.PathSegment(go.PathSegment.Line,.238*nt,.8566875*et)).add(new go.PathSegment(go.PathSegment.Line,.3316875*nt,.76296875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*nt,.80621875*et,.36353125*nt,.78340625*et,.3991875*nt,.79840625*et)).add(new go.PathSegment(go.PathSegment.Line,.43753125*nt,.9375*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.9375*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.80621875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*nt,.760625*et,.602375*nt,.79809375*et,.63946875*nt,.78234375*et)).add(new go.PathSegment(go.PathSegment.Line,.76828125*nt,.8566875*et)).add(new go.PathSegment(go.PathSegment.Line,.85671875*nt,.76825*et)).add(new go.PathSegment(go.PathSegment.Line,.76065625*nt,.67221875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*nt,.56246875*et,.78234375*nt,.63940625*et,.798125*nt,.602375*et)).add(new go.PathSegment(go.PathSegment.Line,.9375*nt,.56246875*et).close()).add(new go.PathSegment(go.PathSegment.Move,.5*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*nt,.5*et,.1*nt,.1*et).close()))}),go.Shape.defineFigureGenerator("Hand",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.5*et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,.3*et,0,.375*et,.05*nt,.325*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.45*nt,.075*et,.3*nt,.225*et,.4*nt,.175*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.525*nt,.075*et,.46*nt,.05*et,.525*nt,.05*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.4*et,.525*nt,.275*et,.475*nt,.325*et)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.55*et,nt,.4*et,nt,.55*et)),at.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.55*et)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.55*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.6*nt,.7*et,.675*nt,.55*et,.675*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.575*nt,.85*et,.65*nt,.7*et,.65*nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.535*nt,et,.61*nt,.85*et,.61*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,.435*nt,et,0,et).close()),At}),go.Shape.defineFigureGenerator("Map",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.2*et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),at.add(new go.PathSegment(go.PathSegment.Move,.25*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Move,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.8*et)),At}),go.Shape.defineFigureGenerator("Eject",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et*.7)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*.7).close());var 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(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et).close()))}),go.Shape.defineFigureGenerator("Building",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*1,et*1,!1);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*.85)),at.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.85)),at.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*.3)),at.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.3)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.3)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et*.3)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.85)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et*.85).close());var 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 bt=new go.PathFigure(.5*nt,.1*et,!1);return At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*nt,.3*et)),bt.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*nt,.3*et).close()),At}),go.Shape.defineFigureGenerator("Staircase",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et*1,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*.8)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.8)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.6)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.6)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.4)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.4)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.2)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.2)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.15)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.15)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.35)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.35)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.15,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.15,et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*.95).close()),At}),go.Shape.defineFigureGenerator("5Bars",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et*1,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.184,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.184,et*(1-.184)).close());var 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 bt=new go.PathFigure(nt*.816,et,!0);return At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,nt*.816,et*(1-.184*4))),bt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-.184*5))),bt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1).close()),At}),go.Shape.defineFigureGenerator("PC",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,0).close());var 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 bt=new go.PathFigure(nt*1,0,!0);return At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,0)),bt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.65)),bt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.65).close()),At}),go.Shape.defineFigureGenerator("Plane",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(.55*nt,et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.475*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.35*nt,.525*et,0,.4*et,.225*nt,.45*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.475*et)),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.35*et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.325*et)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.325*et)),at.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.2*et,.975*nt,0,nt,.08*et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.45*et)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.95*et)),at.add(new go.PathSegment(go.PathSegment.Line,.55*nt,et).close()),At}),go.Shape.defineFigureGenerator("Key",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*1,et*.5,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.9,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.35*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,.35*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.15,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.35*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.65*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.15,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,.65*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.65*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.6,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.65,.55*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.7,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,.55*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.85,.575*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.9,.6*et).close()),at.add(new go.PathSegment(go.PathSegment.Move,.17*nt,.425*et)),at.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*nt,.5*et,.075*nt,.075*et).close()),At}),go.Shape.defineFigureGenerator("FilmTape",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);At.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,270,180,nt*0,nt*.3,nt*.055)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.08,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.08,et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*1),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*1),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*2),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*2),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*3),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*3),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*4),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*4),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*5),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*5),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*6),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*6),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*7),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*7),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*8),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*8),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*9),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*9),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*10),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*10),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*11),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*11),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*12),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*12),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*13),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*13),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*14),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*14),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*15),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*15),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1));var 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 bt=new go.PathFigure(nt*(.11+.24133333*2+.028*2),et*.1,!1);return At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*3+.028*2),et*.1)),bt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*3+.028*2),et*.8)),bt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*2),et*.8).close()),At}),go.Shape.defineFigureGenerator("FloppyDisk",function(It,nt,et){var At=new go.Geometry,at=8,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 bt=new go.PathFigure(nt*.83,et*1,!1);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,nt*.83,et*.5)),bt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*.5)),bt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*1).close());var Rt=new go.PathFigure(nt*.78,et*.05,!1);return At.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.05)),Rt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.25)),Rt.add(new go.PathSegment(go.PathSegment.Line,nt*.78,et*.25).close()),At}),go.Shape.defineFigureGenerator("SpeechBubble",function(It,nt,et){var At=It?It.parameter1:NaN;(isNaN(At)||At<0)&&(At=15),At=Math.min(At,nt/3),At=Math.min(At,et/3);var at=At*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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*0,et*.45,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*.9)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.9)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*.45).close());var 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(It,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close()).add(new go.PathSegment(go.PathSegment.Move,.4*nt,.4*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et).close()).add(new go.PathSegment(go.PathSegment.Move,.2*nt,.1*et)).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.1*et).close()).add(new go.PathSegment(go.PathSegment.Move,.1*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.1*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et).close()))}),go.Shape.defineFigureGenerator("Terminal",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*0,et*.1,!1);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.9)),at.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*.9).close());var 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(It,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(It,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(It,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(It,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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*.15,et*0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.85,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1).close()),At}),go.Shape.defineFigureGenerator("Drink",function(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*.15,et*0,!1);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.85,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1).close());var 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(It,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*.5,et*0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*.25)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.25)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.35)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.5)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.65)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.65)),at.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*.5)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.35)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.25)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.25).close()),At}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},84072: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 Cn={},We="5.0",Qt={},Pt=null,te=!1,Ae=!1,Be=null,de=!1,Ht=null,ne=null,ue=0;ue<arguments.length;ue++){var ce=arguments[ue];if(ce!==null)switch(typeof ce){case"number":We=ce.toFixed(1);break;case"string":ce.match(new RegExp("^[0-9]\\.[0-9]+$"))?We=ce:Be=ce;break;case"object":typeof ce.is3D!="undefined"?Pt=ce:Qt=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},Qt.material_id!==void 0&&!Ae&&(te=!0)),Be!==null&&Qt.id===void 0&&(Qt.id=Be);var Vt="",De="",Jt=!1,be=null,It=null,nt=null,et=!1,At=null,at=null,ct=null,pt=null,xt=null;Qt.height!==void 0&&(Qt.height=Math.round(Qt.height)),Qt.width!==void 0&&(Qt.width=Math.round(Qt.width));var bt=function(un){return parseFloat(un)>4?parseFloat(un):5};Cn.setHTML5Codebase=function(un,Zn){ne=un,Pn(un,Zn)},Cn.setJavaCodebase=Cn.setJavaCodebaseVersion=Cn.isCompiledInstalled=Cn.setPreCompiledScriptPath=Cn.setPreCompiledResourcePath=function(){},Cn.setHTML5CodebaseVersion=function(un,Zn){var si=parseFloat(un);if(si!==NaN&&si<5){console.log("The GeoGebra HTML5 codebase version "+si+" is deprecated. Using version latest instead.");return}Ht=un,ie(un,Zn)},Cn.getHTML5CodebaseVersion=function(){return It},Cn.getParameters=function(){return Qt},Cn.setFontsCSSURL=function(un){pt=un},Cn.setGiacJSURL=function(un){},Cn.setJNLPFile=function(un){Vt=un},Cn.setJNLPBaseDir=function(un){},Cn.inject=function(){function un(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Zn="auto",si=Qt.id,Oi,on=!1,ri=0;ri<arguments.length;ri++){var Le=arguments[ri];typeof Le=="string"?(Le=Le.toLowerCase(),Le.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Zn=Le:si=arguments[ri]):typeof Le=="boolean"?on=Le:Le instanceof HTMLElement&&(Oi=Le)}fi();function fi(){if(!de){setTimeout(fi,200);return}Zn=In(Zn);var Pi=Oi||document.getElementById(si);if(!Pi){console.log("possibly bug on ajax loading? ");return}if(Cn.removeExistingApplet(Pi,!1),Qt.width===void 0&&Pi.clientWidth&&(Qt.width=Pi.clientWidth),Qt.height===void 0&&Pi.clientHeight&&(Qt.height=Pi.clientHeight),!(Qt.width&&Qt.height)&&Zn==="html5"&&(delete Qt.width,delete Qt.height),be=Zn,Zn==="screenshot")qe(Pi,Qt);else{var jt=!1;Qt.hasOwnProperty("playButton")&&Qt.playButton||Qt.hasOwnProperty("clickToLoad")&&Qt.clickToLoad?jt=!0:Qt.hasOwnProperty("playButtonAutoDecide")&&Qt.playButtonAutoDecide&&(jt=(!Rt()||un())&&Ot()),jt?(be="screenshot",Tn(Pi,Qt,on,Zn)):nn(Pi,Qt,on)}}};function Rt(){try{return window.self!==window.top}catch(un){return!0}}function Ot(){return Qt.hasOwnProperty("screenshotGenerator")&&Qt.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Cn.getViews=function(){return Pt},Cn.isJavaInstalled=function(){return!1};var Wt=function(un){var Zn=function(ri){var Le=JSON.parse(ri),fi=function(Mt){return Mt.type=="G"||Mt.type=="E"},Pi=Le.elements?Le.elements.filter(fi)[0]:Le;if(!Pi||!Pi.url){si();return}Qt.fileName=Pi.url,Zt(Pi.settings||{}),Pt.is3D=!0;var jt="https://www.geogebra.org/images/";Cn.setPreviewImage(At||Pi.previewUrl,jt+"GeoGebra_loading.png",jt+"applet_play.png"),un()},si=function(){Qt.onError&&Qt.onError(),pi("Error: Fetching material (id "+Qt.material_id+") failed.",Qt)},Oi=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",on="/materials/"+Qt.material_id+"?scope=basic";$t("https://"+Oi+"/api/proxy.php?path="+encodeURIComponent(on),Zn,si)};function Zt(un){var Zn=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(si){un[si]=!!un[si]}),Zn.forEach(function(si){Qt[si]===void 0&&un[si]!==void 0&&(Qt[si]=un[si])}),Qt.showToolBarHelp===void 0&&(Qt.showToolBarHelp=Qt.showToolBar)}function $t(un,Zn,si){var Oi=new XMLHttpRequest;Oi.open("GET",un),Oi.onload=function(){Zn(Oi.responseText)},Oi.onerror=si,Oi.send()}Cn.isHTML5Installed=function(){return!0},Cn.getLoadedAppletType=function(){return be},Cn.setPreviewImage=function(un,Zn,si){At=un,at=Zn,ct=si},Cn.removeExistingApplet=function(un,Zn){var si;typeof un=="string"&&(un=document.getElementById(un)),be=null;var Oi=null;for(si=0;si<un.childNodes.length;si++){var on=un.childNodes[si],ri=on.className;ri==="applet_screenshot"?Zn?(on.style.display="block",be="screenshot"):on.style.display="none":ri!=="applet_scaler prerender"&&(un.removeChild(on),Oi=ri&&ri.indexOf("appletParameters")!=-1?on.id:null,si--)}var Le=Qt.id!==void 0?Qt.id:Oi,fi=window[Le];fi&&typeof fi.getBase64=="function"&&(fi.remove(),window[Le]=null)},Cn.refreshHitPoints=function(){if(bt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var un=Cn.getAppletObject();return un&&typeof un.recalculateEnvironments=="function"?(un.recalculateEnvironments(),!0):!1},Cn.startAnimation=function(){var un=Cn.getAppletObject();return un&&typeof un.startAnimation=="function"?(un.startAnimation(),!0):!1},Cn.stopAnimation=function(){var un=Cn.getAppletObject();return un&&typeof un.stopAnimation=="function"?(un.stopAnimation(),!0):!1},Cn.getAppletObject=function(){var un=Qt.id!==void 0?Qt.id:"ggbApplet";return window[un]},Cn.resize=function(){};var Ce=function(un,Zn,si){var Oi=document.createElement("param");Oi.setAttribute("name",Zn),Oi.setAttribute("value",si),un.appendChild(Oi)},ge=function(un){return un&&un!=="false"},nn=function(un,Zn,si){bt(It)<=4.2&&(si=!0);var Oi=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==It||ggbHTML5LoadedCodebaseIsWebSimple&&!et)&&(Oi=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var on=document.createElement("div");on.classList.add("appletParameters","notranslate");var ri=Zn.width,Le=Zn.height;if(Zn.disableAutoScale=Zn.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Zn.disableAutoScale,Zn.width!==void 0)if(bt(It)<=4.4)ge(Zn.showToolBar)&&(Zn.height-=7),ge(Zn.showAlgebraInput)&&(Zn.height-=37),Zn.width<605&&ge(Zn.showToolBar)&&(Zn.width=605,ri=605);else{var fi=100;(ge(Zn.showToolBar)||ge(Zn.showMenuBar))&&(Zn.hasOwnProperty("customToolBar")&&(Zn.customToolbar=Zn.customToolBar),fi=ge(Zn.showMenuBar)?245:155),ri<fi&&(Zn.width=fi,ri=fi)}on.style.border="none",on.style.display="inline-block";for(var Pi in Zn)Zn.hasOwnProperty(Pi)&&Pi!=="appletOnLoad"&&on.setAttribute("data-param-"+Pi,Zn[Pi]);pt&&on.setAttribute("data-param-fontscssurl",pt),Cn.resize=function(){GGBAppletUtils.responsiveResize(un,Zn)},window.addEventListener("resize",function(Oe){Cn.resize()});var jt=typeof Zn.appletOnLoad=="function"?Zn.appletOnLoad:function(){};if(!si&&Zn.width!==void 0){Zn.hasOwnProperty("showSplash")||on.setAttribute("data-param-showSplash","false");var Mt=un.querySelector(".applet_scaler.prerender"),mt=Mt!==null;if(mt)var vt=Mt.querySelector(".ggb_preview");else{var vt=ni(ri,Le,Zn.borderColor,!1);Mt=document.createElement("div"),Mt.className="applet_scaler",Mt.style.position="relative",Mt.style.display="block",Mt.style.width=ri+"px",Mt.style.height=Le+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Mt,"66%"),bt(It)>=5?(Zn.appletOnLoad=function(Oe){var $e=un.querySelector(".ggb_preview");$e&&$e.parentNode.removeChild($e),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Mt),window.GGBT_wsf_view&&$(window).trigger("resize"),jt(Oe)},mt||Mt.appendChild(vt)):on.appendChild(vt),Mt.appendChild(on),mt||un.appendChild(Mt),setTimeout(function(){Cn.resize()},1)}else{var Lt=document.createElement("div");Lt.className="applet_scaler",Lt.style.position="relative",Lt.style.display="block",Lt.appendChild(on),un.appendChild(Lt),Zn.appletOnLoad=function(Oe){Cn.resize(),jt(Oe)}}function Bt(Oe,$e){$e&&typeof $e.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Oe,$e.appletOnLoad):renderGGBElement(Oe),pi("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",$e)}function _t(Oe,$e){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Oe,params:$e}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(yn){Bt(yn.article,yn.params)}),html5AppletsToProcess=null)},bt(It)<5&&(Oe.className+=" geogebraweb")):Bt(Oe,$e)}if(Oi){scriptLoadStarted=!0;for(var Me=0;Me<on.childNodes.length;Me++){var ye=on.childNodes[Me].tagName;ye==="TABLE"&&(on.removeChild(on.childNodes[Me]),Me--)}if(ggbHTML5LoadedScript!==null){var Ye=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Ye!=null&&Ye.parentNode.removeChild(Ye)}var Fe=document.createElement("script"),Te=function(){_t(on,Zn)};Fe.src=De+nt,ggbHTML5LoadedCodebaseIsWebSimple=et,ggbHTML5LoadedCodebaseVersion=It,ggbHTML5LoadedScript=Fe.src,pi("GeoGebra HTML5 codebase loaded: '"+De+"'.",Zn),!ne&&(!Ht||Ht=="5.0")?(et?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Te()):De.requirejs?__webpack_require__.e(822).then(function(){var Oe=[__webpack_require__(20822)];Te.apply(null,Oe)}.bind(this)).catch(__webpack_require__.oe):(Fe.onload=Te,un.appendChild(Fe))}else _t(on,Zn);Zn.height=Le,Zn.width=ri},qe=function(un,Zn,si){var Oi=ni(Zn.width,Zn.height,Zn.borderColor,si),on=document.createElement("div");on.style.position="relative",on.style.display="block",on.style.width=Zn.width+"px",on.style.height=Zn.height+"px",on.className="applet_screenshot applet_scaler"+(si?" applet_screenshot_play":""),on.appendChild(Oi);var ri=GGBAppletUtils.getScale(Zn,un,si);si?(un.appendChild(bn()),window.GGBT_wsf_view||(un.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(on,"66%"),un.appendChild(on),ri!==1&&!isNaN(ri)&&(GGBAppletUtils.scaleElement(on,ri),on.style.width=Zn.width+"px",on.style.height=Zn.height+"px",on.parentNode.style.width=Zn.width*ri+"px",on.parentNode.style.height=Zn.height*ri+"px"),Cn.resize=function(){En(un,Oi,on,si)},window.addEventListener("resize",function(Le){Cn.resize()}),Cn.resize()};function En(un,Zn,si,Oi){if(un.contains(Zn)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(un.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(un)}var on=GGBAppletUtils.getScale(Qt,un,Oi);si.parentNode!==null&&(!isNaN(on)&&on!==1?(GGBAppletUtils.scaleElement(si,on),si.parentNode.style.width=Qt.width*on+"px",si.parentNode.style.height=Qt.height*on+"px"):(GGBAppletUtils.scaleElement(si,1),si.parentNode.style.width=Qt.width+"px",si.parentNode.style.height=Qt.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()}}Cn.onExitFullscreen=function(un,Zn){Zn.appendChild(un)};var Tn=function(un,Zn,si,Oi){qe(un,Zn,!0);for(var on=function(){var fi=[];for(Le=0;Le<un.childNodes.length;Le++)fi.push(un.childNodes[Le]);if(window.GGBT_wsf_view){var Pi=window.GGBT_wsf_view.renderFullScreen(un,Zn.id),jt=document.getElementById("fullscreencontainer"),Mt=jQuery(un).find(".fullscreencontent");Mt.length>0?(Pi.remove(),Mt.attr("id","fullscreencontent").show(),jQuery(jt).append(Mt),window.dispatchEvent(new Event("resize"))):nn(Pi,Zn,!1),window.GGBT_wsf_view.launchFullScreen(jt)}else be=Oi,nn(un,Zn,!1);if(!window.GGBT_wsf_view)for(Le=0;Le<fi.length;Le++)un.removeChild(fi[Le])},ri=un.getElementsByClassName("ggb_preview_play"),Le=0;Le<ri.length;Le++)ri[Le].addEventListener("click",on,!1),ri[Le].addEventListener("ontouchstart",on,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(un),Ot()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},bn=function(){var un=document.createElement("div");if(un.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Zn='.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=Zn:si.appendChild(document.createTextNode(Zn)),document.getElementsByTagName("head")[0].appendChild(si)}return un},ni=function(un,Zn,si,Oi){var on=document.createElement("div");on.className="ggb_preview",on.style.position="absolute",on.style.zIndex="90",on.style.width=un-2+"px",on.style.height=Zn-2+"px",on.style.top="0px",on.style.left="0px",on.style.overflow="hidden",on.style.backgroundColor="white";var ri="lightgrey";si!==void 0&&(si==="none"?ri="transparent":ri=si),on.style.border="1px solid "+ri;var Le=document.createElement("img");if(Le.style.position="relative",Le.style.zIndex="1000",Le.style.top="-1px",Le.style.left="-1px",At!==null&&Le.setAttribute("src",At),Le.style.opacity=.7,at!==null){var fi,Pi,jt;if(!Oi){fi=document.createElement("img"),fi.style.position="absolute",fi.style.zIndex="1001",fi.style.opacity=1,Le.style.opacity=.3,Pi=360,Pi>un/4*3&&(Pi=un/4*3),jt=Pi/5.8,fi.setAttribute("src",at),fi.setAttribute("width",Pi),fi.setAttribute("height",jt);var Mt=(un-Pi)/2,mt=(Zn-jt)/2;fi.style.left=Mt+"px",fi.style.top=mt+"px",on.appendChild(fi)}}return on.appendChild(Le),on},In=function(un){return un=un.toLowerCase(),un==="html5"||un==="screenshot"?un:"html5"},Ee=["web","webSimple","web3d","tablet","tablet3d","phone"],ie=function(un,Zn){if(It=un,Zn){Pn(It,!0);return}var si=!te;if(si){var Oi=bt(It);!isNaN(Oi)&&Oi<4.4&&(si=!1)}var on,ri;window.location.protocol.substr(0,4)==="http"?on=window.location.protocol:on="http:";var Le=It.indexOf("//");Le>0?ri=It:Le===0?ri=on+It:ri="https://www.geogebra.org/apps/5.2.814.0/";for(var fi in Ee)if(It.slice(Ee[fi].length*-1)===Ee[fi]||It.slice((Ee[fi].length+1)*-1)===Ee[fi]+"/"){Pn(ri,!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&&!ge(Qt.showToolBar)&&!ge(Qt.showMenuBar)&&!ge(Qt.showAlgebraInput)&&!ge(Qt.enableRightClick)&&(!Qt.appName||Qt.appName=="classic")?ri+="webSimple/":ri+="web3d/",Pn(ri,!1)},Pn=function(un,Zn){if(un.requirejs){De=un;return}un.slice(-1)!=="/"&&(un+="/"),De=un,Zn===null&&(Zn=un.indexOf("http")===-1),Jt=Zn,nt="web.nocache.js",et=!1;var si=De.split("/");si.length>1&&(!Zn&&si[si.length-2]==="webSimple"?(nt="webSimple.nocache.js",et=!0):Ee.indexOf(si[si.length-2])>=0&&(nt=si[si.length-2]+".nocache.js")),si=un.split("/"),It=si[si.length-3],It.substr(0,4)==="test"?It=It.substr(4,1)+"."+It.substr(5,1):(It.substr(0,3)==="war"||It.substr(0,4)==="beta")&&(It="5.0");var Oi=parseFloat(It);Oi!==NaN&&Oi<5&&un.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Oi+" is deprecated. Using version latest instead."),ie("5.0",Zn))},pi=function(un,Zn){window.console&&window.console.log&&(!Zn||typeof Zn.showLogging=="undefined"||Zn.showLogging&&Zn.showLogging!=="false")&&console.log(un)};Qt.material_id!==void 0?Wt(Wn):Wn();function Wn(){var un=We;Ht!==null?un=Ht:parseFloat(un)<5&&(un="5.0"),ie(un,!1),ne!==null&&Pn(ne,Jt),de=!0}return Cn},GGBAppletUtils=function(){"use strict";function Cn(){return window.GGBT_wsf_edit!==void 0}function We(de,Ht){Ht!=1?(de.style.transformOrigin="0% 0% 0px",de.style.webkitTransformOrigin="0% 0% 0px",de.style.transform="scale("+Ht+","+Ht+")",de.style.webkitTransform="scale("+Ht+","+Ht+")",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 Qt(de,Ht,ne,ue,ce,Vt){var De=null;if(Vt!=null&&Vt!="")for(var Jt=de.parentNode;Jt!=null;)if((" "+Jt.className+" ").indexOf(" "+Vt+" ")>-1){De=Jt;break}else Jt=Jt.parentNode;var be=0,It=0,nt=0,et=0,At=0,at=0,ct=0;if(De)be=De.offsetWidth,It=Math.max(ue?De.offsetWidth:0,De.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(be=Math.min(window.innerWidth,document.documentElement.clientWidth),It=Math.min(window.innerHeight,document.documentElement.clientHeight),nt=be):(be=window.innerWidth,It=window.innerHeight,nt=window.innerWidth),de){var pt=de.getBoundingClientRect();pt.left>0&&pt.left<=be&&(ce===void 0||!ce)&&(document.dir==="rtl"?(At=be-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)&&Ht>0&&Ht+et<be?be=Ht:be-=et,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ne===void 0||!ne)&&(It-=ct)),{width:be,height:It}}function Pt(de,Ht,ne,ue,ce){if(de.isScreenshoGenerator)return 1;var Vt=ue!==void 0&&ue,De=de.noScaleMargin!=null&&de.noScaleMargin,Jt=function(xt){return xt&&xt!=="false"},be=Jt(de.autoHeight),It=Qt(Ht,de.width,ne,be,Vt&&window.GGBT_wsf_view||De,ce),nt=parseInt(It.width),et=de.width,At=de.height;if(et===void 0){var at=Ht.querySelector(".appletParameters");at&&(et=at.offsetWidth,At=at.offsetHeight)}var ct=nt/et,pt=Vt?1:It.height/At;return ne!==void 0&&!ne&&(ct=Math.min(1,ct),pt=Math.min(1,pt)),Math.min(ct,pt)}function te(de,Ht,ne){var ue=1,ce,Vt=!1;if(de.hasOwnProperty("allowUpscale")&&(Vt=de.allowUpscale),de.hasOwnProperty("scale")&&(ue=parseFloat(de.scale),(isNaN(ue)||ue===null||ue===0)&&(ue=1),ue>1&&(Vt=!0)),Ht&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Vt=!0),!(de.hasOwnProperty("disableAutoScale")&&de.disableAutoScale))ce=Pt(de,Ht,Vt,ne,de.scaleContainerClass);else return ue;return Vt&&(!de.hasOwnProperty("scale")||ue===1)?ce:Math.min(ue,ce)}function Ae(de){var Ht=Math.min(window.innerWidth,document.documentElement.clientWidth),ne=Math.min(window.innerHeight,document.documentElement.clientHeight),ue=de.getBoundingClientRect(),ce=(Ht-ue.width)/2,Vt=(ne-ue.height)/2;Vt<0&&(Vt=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=Vt+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Vt<40?de.style.top="40px":de.style.top=Vt+"px",de.style.left=ce+"px")}function Be(de,Ht){var ne=de.querySelector(".appletParameters");if(ne){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ht.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(Ht,de);Cn()&&ne.setAttribute("data-param-scale",ue);for(var ce=null,Vt=0;Vt<de.childNodes.length;Vt++)if(de.childNodes[Vt].className!==void 0&&de.childNodes[Vt].className.match(/^applet_scaler/)){ce=de.childNodes[Vt];break}if(ce!==null&&ce.querySelector(".noscale")!==null)return;var De=Ht.id!==void 0?Ht.id:"ggbApplet",Jt=window[De];(Jt==null||!Jt.recalculateEnvironments)&&ce!==null&&!ce.className.match(/fullscreen/)&&(ce.parentNode.style.transform="",!isNaN(ue)&&ue!==1?(ce.parentNode.style.width=Ht.width*ue+"px",ce.parentNode.style.height=Ht.height*ue+"px",We(ce,ue)):(We(ce,1),ce.parentNode.style.width=Ht.width+"px",ce.parentNode.style.height=Ht.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:Be,isFlexibleWorksheetEditor:Cn,positionCenter:Ae,getScale:te,scaleElement:We}}();__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 Cn=n.location.search;return Cn.indexOf(J)!=-1||Cn.indexOf(K)!=-1}function q(Cn,We){}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(Cn){var We=s[L].bindings;s[L].bindings=function(){for(var Qt=We?We():{},Pt=Cn[webModule.__softPermutationId],te=O;te<Pt.length;te++){var Ae=Pt[te];Qt[Ae[O]]=Ae[P]}return Qt}};var t;function u(){return v(),t}function v(){if(!t){var Cn=o.createElement(Q);if(Cn.id=L,Cn.style.cssText=R+S,Cn.tabIndex=-1,o.body.appendChild(Cn),t=Cn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var We=document.compatMode==U?V:W;t.write(We+X),t.close()}}}function w(Cn){function We(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 Be(){if(!Ae){if(!te())return;Ae=!0,Pt(),o.removeEventListener&&o.removeEventListener(Z,Be,!1),de&&clearInterval(de)}}o.addEventListener&&o.addEventListener(Z,Be,!1);var de=setInterval(function(){Be()},$)}function Qt(Pt){var te=u(),Ae=te.body,Be=te.createElement(_);Be.language=ab,Be.crossOrigin=W,Be.src=Pt,webModule.__errFn&&(Be.onerror=function(){webModule.__errFn(L,new Error(bb+Pt))}),Ae.appendChild(Be)}We(function(){Qt(Cn)})}webModule.__startLoadingFragment=function(Cn){return C(Cn)},webModule.__installRunAsyncCode=function(Cn){var We=u(),Qt=We.body,Pt=We.createElement(_);Pt.language=ab,Pt.text=Cn,Qt.appendChild(Pt),Qt.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(Cn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Cn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Cn){var We=c[Cn];return We==null?null:We},r=d,webModule.__errFn=e}function B(){function Cn(de){var Ht=de.lastIndexOf(rb);Ht==-1&&(Ht=de.length);var ne=de.indexOf(sb);ne==-1&&(ne=de.length);var ue=de.lastIndexOf(tb,Math.min(ne,Ht));return ue>=O?de.substring(O,ue+P):W}function We(de){if(!de.match(/^\w+:\/\//)){var Ht=o.createElement(ub);Ht.src=de+vb,de=Cn(Ht.src)}return de}function Qt(){var de=__gwt_getMetaProperty(wb);return de!=null?de:W}function Pt(){for(var de=o.getElementsByTagName(_),Ht=O;Ht<de.length;++Ht)if(de[Ht].src.indexOf(xb)!=-1)return Cn(de[Ht].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 Be=Qt();return Be==W&&(Be=Pt()),Be==W&&(Be=te()),Be==W&&Ae()&&(Be=Cn(o.location.href)),Be=We(Be),Be}function C(Cn){return Cn.match(/^\//)||Cn.match(/^[a-zA-Z]+:\/\//)?Cn:webModule.__moduleBase+Cn}function D(){var Cn=[],We=O,Qt=[],Pt=[];function te(de){var Ht=Pt[de](),ne=Qt[de];if(Ht in ne)return Ht;var ue=[];for(var ce in ne)ue[ne[ce]]=ce;throw r&&r(de,ue,Ht),null}if(__gwt_isKnownPropertyValue=function(de,Ht){return Ht in Qt[de]},webModule.__getPropMap=function(){var de={};for(var Ht in Qt)Qt.hasOwnProperty(Ht)&&(de[Ht]=te(Ht));return de},webModule.__computePropValue=te,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Ae;try{Ae=Cb;var Be=Ae.indexOf(Db);Be!=-1&&(We=parseInt(Ae.substring(Be+P),$),Ae=Ae.substring(O,Be))}catch(de){}return webModule.__softPermutationId=We,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})()},77665:function(Cn,We,Qt){"use strict";Qt.d(We,{Ax:function(){return Be},Ds:function(){return de},KI:function(){return ne},SI:function(){return Ae},f1:function(){return te}});var Pt=Qt(13952);function te(ue){let ce=!0;if(ue.length>0){for(let Vt=0;Vt<ue.length;Vt++)if(ue[Vt].compile_success==0||!ue[Vt].compile_success){ce=!1;break}}else ce=!1;return ce}function Ae(ue,ce=""){let Vt=[];for(let De=0;De<ue.length;De++){let Jt=ue[De],be=ce?`${ce}/${Jt.name}`:`${Jt.name}`;Vt.push({title:Jt.name,type:Jt.type,isLeaf:Jt.type!=="tree",key:be})}return Vt}function Be(ue,ce,Vt){for(let De=0;De<ue.length;De++){let Jt=ue[De];if(Jt.key===ce){Jt.children=Vt;break}Jt.children&&Be(Jt.children,ce,Vt)}return ue}function de(ue,ce,Vt){let De;return function(){let Jt=this,be=arguments,It=function(){De=null,Vt||ue.apply(Jt,be)},nt=Vt&&!De;clearTimeout(De),De=setTimeout(It,ce),nt&&ue.apply(Jt,be)}}const Ht=!0,ne=Pt.Z.API_SERVER},5423:function(Cn,We,Qt){"use strict";Qt.d(We,{ij:function(){return ct},_s:function(){return at},Uf:function(){return At},ZP:function(){return xt}});var Pt=Qt(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=Qt(92310),Be=Qt.n(Ae),de=Qt(42441),Ht=Qt(25399),ne=Qt(458),ue=Qt(29787),ce=Qt(63604),Vt=Qt(13952),De=Object.defineProperty,Jt=Object.getOwnPropertySymbols,be=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,nt=(bt,Rt,Ot)=>Rt in bt?De(bt,Rt,{enumerable:!0,configurable:!0,writable:!0,value:Ot}):bt[Rt]=Ot,et=(bt,Rt)=>{for(var Ot in Rt||(Rt={}))be.call(Rt,Ot)&&nt(bt,Ot,Rt[Ot]);if(Jt)for(var Ot of Jt(Rt))It.call(Rt,Ot)&&nt(bt,Ot,Rt[Ot]);return bt};const At=(bt={})=>{var Rt,Ot,Wt,Zt;let $t=(Rt=bt==null?void 0:bt.emotion)==null?void 0:Rt.map(qe=>et({value:qe==null?void 0:qe.rate},qe)),Ce=(Ot=bt==null?void 0:bt.focus)==null?void 0:Ot.map(qe=>et({value:qe==null?void 0:qe.rate},qe)),ge=(Wt=bt==null?void 0:bt.action)==null?void 0:Wt.map(qe=>et({value:qe==null?void 0:qe.rate},qe)),nn=(Zt=bt==null?void 0:bt.intention)==null?void 0:Zt.map(qe=>et({value:qe==null?void 0:qe.rate},qe));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:Ce||[]},{title:"\u884C\u4E3A\u5360\u6BD4\u60C5\u51B5",color:["#5eca9c","#a39bed","#f68238","#f0e999","#eaa170","#f9ac95"],data:ge||[]},{title:"\u610F\u56FE\u5360\u6BD4\u60C5\u51B5",color:["#eaa170","#739fcb","#f0e999","#f9ac95","#4f74ee","#5eca9c"],data:nn||[]}]},at=({className:bt,dataSource:Rt=[],col:Ot=4,right:Wt,bottom:Zt=23,precision:$t=0,wrapWidth:Ce=1200})=>{const ge=(qe="",En,Tn="--")=>qe?(qe==null?void 0:qe.length)>En?(qe==null?void 0:qe.slice(0,En-1))+"...":qe:Tn,nn=Math.floor((Ce-(Ot-1)*Wt)/Ot);return Pt.createElement("div",{className:Be()(te.list,bt)},!!(Rt!=null&&Rt.length)&&(Rt==null?void 0:Rt.map((qe,En)=>{const{cover_pic:Tn,created_at:bn,emotion:ni,action:In,intention:Ee,focus:ie}=qe;return Pt.createElement("div",{key:En,className:te.wrap,style:{width:nn,marginRight:(1+En)%Ot===0?0:Wt+$t,marginBottom:Zt}},Pt.createElement("div",{className:te.img},Pt.createElement("img",{src:`${Vt.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,bn))),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(Ht.Z,{title:ni},Pt.createElement("span",{className:"c-grey-333"},ge(ni,4))))),Pt.createElement("li",null,Pt.createElement("i",{className:"iconfont icon-hangwei"}),Pt.createElement("span",null,"\u884C\u4E3A\uFF1A",Pt.createElement(Ht.Z,{title:In},Pt.createElement("span",{className:"c-grey-333"},ge(In,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(Ht.Z,{title:Ee},Pt.createElement("span",{className:"c-grey-333"},ge(Ee,4))))),Pt.createElement("li",null,Pt.createElement("i",{className:"iconfont icon-zhuangtai"}),Pt.createElement("span",null,"\u4E13\u6CE8\u5EA6\uFF1A",Pt.createElement(Ht.Z,{title:ie},Pt.createElement("span",{className:"c-grey-333"},ge(ie,3))))))))})))},ct=({className:bt,style:Rt,title:Ot,hideBar:Wt=!1,children:Zt,customText:$t="",noDataText:Ce="",emptyData:ge=[],loading:nn,actionAnalysis:qe})=>{var En,Tn;const bn=((En=ge==null?void 0:ge[0])==null?void 0:En.every(In=>{var Ee;return!((Ee=In==null?void 0:In.data)!=null&&Ee.length)}))&&!((Tn=ge==null?void 0:ge[1])!=null&&Tn.length)||!qe,ni=qe?Ce:$t;return Pt.createElement(ne.Z,{loading:nn,active:!0},bn&&Pt.createElement("div",{className:Be()(te.noData,bt),style:Rt},!!Ot&&Pt.createElement("div",{className:te.title},!Wt&&Pt.createElement("b",null),Pt.createElement("span",null,Ot)),Pt.createElement("div",{className:te.itemWrap},Pt.createElement(ce.Z,{customText:ni}))),!bn&&Zt)};var xt=({className:bt,style:Rt,data:Ot=[],title:Wt,hideBar:Zt=!1,loading:$t=!1})=>Pt.createElement("div",{className:Be()(te.analysis,bt),style:Rt},!!Wt&&Pt.createElement("div",{className:te.title},!Zt&&Pt.createElement("b",null),Pt.createElement("span",null,Wt)),Pt.createElement(ue.Z,{spinning:$t},Pt.createElement("div",{className:te.itemWrap},Ot==null?void 0:Ot.map((Ce,ge)=>Pt.createElement("div",{className:te.item,key:ge},Pt.createElement(de.Z,{option:{tooltip:{trigger:"item",formatter:"{a} <br/>{b}: {c}%"},title:{left:"center",bottom:15,text:Ce==null?void 0:Ce.title},legend:{top:10,right:10,orient:"vertical",show:!0,align:"left",icon:"circle",itemWidth:10,itemHeight:10,formatter:function(nn){for(let qe in Ce==null?void 0:Ce.data)if(nn==(Ce==null?void 0:Ce.data[qe].name))return nn+" "+(Ce==null?void 0:Ce.data[qe].value)+"%"},textStyle:{color:"#767676",fontSize:12}},color:Ce==null?void 0:Ce.color,series:[{type:"pie",radius:["20%","35%"],center:["20%","40%"],avoidLabelOverlap:!1,label:{show:!1},labelLine:{show:!1},data:Ce==null?void 0:Ce.data}]},style:{height:145}}))))))},48102:function(Cn,We,Qt){"use strict";var Pt=Qt(86204),te=Qt.n(Pt),Ae=Object.defineProperty,Be=(ue,ce,Vt)=>ce in ue?Ae(ue,ce,{enumerable:!0,configurable:!0,writable:!0,value:Vt}):ue[ce]=Vt,de=(ue,ce,Vt)=>Be(ue,typeof ce!="symbol"?ce+"":ce,Vt),Ht=(ue,ce,Vt)=>new Promise((De,Jt)=>{var be=et=>{try{nt(Vt.next(et))}catch(At){Jt(At)}},It=et=>{try{nt(Vt.throw(et))}catch(At){Jt(At)}},nt=et=>et.done?De(et.value):Promise.resolve(et.value).then(be,It);nt((Vt=Vt.apply(ue,ce)).next())});class ne extends Pt.EventEmitter{constructor(ce,Vt){super(),de(this,"url"),de(this,"body"),de(this,"fullContent",""),de(this,"controller",null),de(this,"buffer",""),this.url=ce,this.body=Vt}startStream(){return Ht(this,null,function*(){this.controller=new AbortController;const{signal:ce}=this.controller;try{const Vt=yield fetch(this.url,{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},credentials:"include",body:JSON.stringify(this.body),signal:ce});if(!Vt.ok)throw new Error(`\u8BF7\u6C42\u5931\u8D25: ${Vt.status}`);const De=Vt.headers.get("content-type");if(!De)throw new Error("\u54CD\u5E94\u5934\u7F3A\u5C11 content-type");if(De.includes("application/json")){const It=yield Vt.json();this.emit("error",It);return}if(!De.includes("text/event-stream"))throw new Error("\u54CD\u5E94\u6570\u636E\u683C\u5F0F\u9519\u8BEF");const Jt=Vt.body.getReader(),be=new TextDecoder("utf-8");for(;;){const{done:It,value:nt}=yield Jt.read();if(It)break;const et=be.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(Vt){Vt.name==="AbortError"?this.emit("cancelled",this.fullContent):this.emit("error",Vt.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()}}We.Z=ne},89837:function(Cn,We,Qt){"use strict";Qt.d(We,{Z:function(){return De}});var Pt=Qt(59301),te={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Ae=Qt(92310),Be=Qt.n(Ae),de=Qt(29787),Ht=Qt(2859),ne=Qt(52430),ue=Qt(89299),ce=(Jt,be,It)=>new Promise((nt,et)=>{var At=pt=>{try{ct(It.next(pt))}catch(xt){et(xt)}},at=pt=>{try{ct(It.throw(pt))}catch(xt){et(xt)}},ct=pt=>pt.done?nt(pt.value):Promise.resolve(pt.value).then(At,at);ct((It=It.apply(Jt,be)).next())}),De=({data:Jt,className:be,fullWidth:It,style:nt={},onClose:et,onOk:At,showFullTools:at,noAssociationId:ct})=>{const pt=(0,Pt.useRef)(null),xt=(0,Pt.useRef)(null),bt=(0,Pt.useRef)(null),Rt=(0,Pt.useRef)(null),[Ot,Wt]=(0,Pt.useState)(!1),[Zt,$t]=(0,Pt.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,Pt.useEffect)(()=>(bt.current||(bt.current=document.createElement("style"),document.head.appendChild(bt.current)),Jt!=null&&Jt.visible?(document.body.setAttribute("data-custom","y-hidden"),bt.current.innerHTML=" html { overflow-y: hidden; }",Jt!=null&&Jt.src&&Ce()):(document.body.removeAttribute("data-custom"),bt.current&&(document.head.removeChild(bt.current),bt.current=null)),()=>{document.body.removeAttribute("data-custom"),bt.current&&(document.head.removeChild(bt.current),bt.current=null)}),[Jt==null?void 0:Jt.visible]);const Ce=()=>ce(void 0,null,function*(){Wt(!0),$t("\u6B63\u5728\u52A0\u8F7D\u4E2D");const En=yield(0,ue.ZJ)(Jt==null?void 0:Jt.src);pt.current.src="",pt.current.src=En,pt.current.onload=function(){qe()},Wt(!1),$t("")}),ge=En=>ce(void 0,null,function*(){Wt(!0),$t("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Tn=yield(0,ne.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Jt.title,file:En.dataUrl}});Tn!=null&&Tn.id&&!ct?(yield(0,ne.ZP)(`/api/attachments/${Jt.id}/add_subitem.json`,{method:"post",body:{subitem_id:Tn==null?void 0:Tn.id,settings:JSON.stringify(En.state)}})).status===0&&At():Tn!=null&&Tn.id&&At(Tn),Wt(!1),$t("")}),nn=()=>{const En=document.querySelector('a[href="https://markerjs.com/"]');En&&En.parentNode&&(En.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"\u9009\u62E9"},{name:'[data-action="delete"]',title:"\u5220\u9664\u5143\u7D20"},{name:'[data-action="undo"]',title:"\u64A4\u9500"},{name:'[data-type-name="FrameMarker"]',title:"\u77E9\u5F62"},{name:'[data-type-name="FreehandMarker"]',title:"\u753B\u7EBF"},{name:'[data-type-name="ArrowMarker"]',title:"\u7BAD\u5934"},{name:'[data-type-name="TextMarker"]',title:"\u6587\u672C"},{name:'[data-type-name="EllipseMarker"]',title:"\u692D\u5706"},{name:'[data-type-name="HighlightMarker"]',title:"\u65B9\u5757"},{name:'[data-type-name="CalloutMarker"]',title:"\u6CE8\u91CA"},{name:'[data-action="render"]',title:"\u4FDD\u5B58"},{name:'[data-action="close"]',title:"\u9000\u51FA"}].forEach(bn=>{const ni=document.querySelector(bn.name);ni&&ni.setAttribute("title",bn.title)})},qe=()=>{xt.current=new Ht.hP(pt.current),xt.current.targetRoot=Rt.current,xt.current.addEventListener("render",ge),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(),Jt!=null&&Jt.snapshotData&&xt.current.restoreState(Jt.snapshotData),setTimeout(()=>{window.scrollTo(0,0),nn()},300)};return Pt.createElement(Pt.Fragment,null,(Jt==null?void 0:Jt.visible)&&Pt.createElement(de.Z,{spinning:Ot,tip:Zt,style:{position:"absolute",width:"100vw"}},Pt.createElement("div",{ref:Rt,className:Be()(te.imageDimensions,be,It?te.fullWidth:""),style:nt},Pt.createElement("img",{className:te.img,ref:pt}))))}},53267:function(Cn,We,Qt){"use strict";var Pt=Qt(59301),te=Qt(77019),Ae=Qt(5269),Be=Qt(20554),de=Qt(99571),Ht=Qt(78380),ne=Qt(25346),ue=Qt(48136),ce=Qt(59301);const Vt=(0,Pt.forwardRef)(({callback:De,showSaveButton:Jt,value:be=""},It)=>{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,bt)=>ce.createElement(Ae.Z,{flex:"110px",className:ne.Z.item},ce.createElement("div",null,ce.createElement(Ht.Z,{value:`$$${xt.value}$$`}),xt.name),ce.createElement("div",{className:ne.Z.children},xt.children.map((Rt,Ot)=>ce.createElement("div",{key:Ot},ce.createElement("h1",null,Rt.name),ce.createElement(te.Z,{gutter:[10,10]},Rt.data.map((Wt,Zt)=>ce.createElement(Ae.Z,{key:Zt,onClick:()=>at(Wt),className:ne.Z.diamond},ce.createElement(Ht.Z,{value:"`$$"+Wt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ce.createElement(te.Z,{className:ne.Z.lists,gutter:[10,10]},At.map((xt,bt)=>ce.createElement(Ae.Z,{flex:"110px",className:ne.Z.item},ce.createElement("div",null,ce.createElement(Ht.Z,{value:"`$$"+xt.value+"$$`"}),xt.name),ce.createElement("div",{className:ne.Z.children},xt.children.map((Rt,Ot)=>ce.createElement("div",{key:Ot},Rt.name&&ce.createElement("h1",null,Rt.name),ce.createElement(te.Z,{gutter:[10,10]},Rt.data.map((Wt,Zt)=>ce.createElement(Ae.Z,{key:Zt,onClick:()=>at(Wt),className:ne.Z.diamond},ce.createElement(Ht.Z,{value:"`$$"+Wt.value+"$$`"}))))))))))}],pt=()=>{var xt=document.createElement("div");xt.innerHTML=nt.current.getValue();var bt=xt.innerText;return De&&De(bt),bt};return(0,Pt.useImperativeHandle)(It,()=>({getData:pt})),ce.createElement("div",{className:ne.Z.mathWrap},ce.createElement(Be.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}},be||""),Jt&&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")))});We.Z=Vt},63604:function(Cn,We,Qt){"use strict";var Pt=Qt(59301),te=Qt(93314),Ae=Qt(99571),Be=Object.defineProperty,de=Object.defineProperties,Ht=Object.getOwnPropertyDescriptors,ne=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable,Vt=(It,nt,et)=>nt in It?Be(It,nt,{enumerable:!0,configurable:!0,writable:!0,value:et}):It[nt]=et,De=(It,nt)=>{for(var et in nt||(nt={}))ue.call(nt,et)&&Vt(It,et,nt[et]);if(ne)for(var et of ne(nt))ce.call(nt,et)&&Vt(It,et,nt[et]);return It},Jt=(It,nt)=>de(It,Ht(nt));const be=({img:It,buttonProps:nt={},styles:et={},customText:At,ButtonText:at,ButtonClick:ct,Buttonclass:pt,ButtonTwo:xt,imgStyles:bt,loading:Rt=!1,className:Ot=""})=>Pt.createElement("section",{className:`tc animated fadeIn ${Ot}`,style:De({color:"#999",margin:"100px auto",visibility:Rt?"hidden":"visible"},et)},Pt.createElement("img",{src:It||te,style:Jt(De({},bt),{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,De({className:pt,onClick:ct},nt),at),xt&&xt);We.Z=be},23416:function(Cn,We,Qt){"use strict";Qt.d(We,{Z:function(){return pt}});var Pt=Qt(59301),te={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Ae=Qt(99571),Be=Qt(70557),de=Qt(58531),Ht=Qt(25399),ne=Qt(89299),ue=Qt(68606),ce=Qt(63604),Vt=Qt(13952),De=Qt(59669),Jt=Qt(59301),be=Object.defineProperty,It=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,At=(xt,bt,Rt)=>bt in xt?be(xt,bt,{enumerable:!0,configurable:!0,writable:!0,value:Rt}):xt[bt]=Rt,at=(xt,bt)=>{for(var Rt in bt||(bt={}))nt.call(bt,Rt)&&At(xt,Rt,bt[Rt]);if(It)for(var Rt of It(bt))et.call(bt,Rt)&&At(xt,Rt,bt[Rt]);return xt},ct=(xt,bt,Rt)=>new Promise((Ot,Wt)=>{var Zt=ge=>{try{Ce(Rt.next(ge))}catch(nn){Wt(nn)}},$t=ge=>{try{Ce(Rt.throw(ge))}catch(nn){Wt(nn)}},Ce=ge=>ge.done?Ot(ge.value):Promise.resolve(ge.value).then(Zt,$t);Ce((Rt=Rt.apply(xt,bt)).next())}),pt=({editOffice:xt="view",data:bt,issaver:Rt,onSaver:Ot,theme:Wt,type:Zt,filename:$t,monacoEditor:Ce,className:ge,style:nn,close:qe,onClose:En,hasMask:Tn,disabledDownload:bn,onImgDimensions:ni,showNodata:In,recordInfo:Ee})=>{const[ie,Pn]=(0,Pt.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[pi,Wn]=(0,Pt.useState)(""),[un,Zn]=(0,Pt.useState)(),si=window.ENV==="build"?"/react/build":"",Oi=location.host.startsWith("localhost")?Vt.Z.PROXY_SERVER:Vt.Z.API_SERVER,ri=10*(1024*1024),Le=(0,Pt.useRef)();bt!=null&&bt.startsWith("/api")&&Zt!=="txt"&&(bt=Vt.Z.API_SERVER+bt);const fi=vt=>vt.substring(vt.lastIndexOf("/")+1).split(".").pop();$t&&Ce&&(Ce.filename=$t),(0,Pt.useEffect)(()=>{var vt,Lt;const Bt=(Lt=(vt=document.cookie)==null?void 0:vt.replace(/\s/g,""))==null?void 0:Lt.split(";");Bt==null||Bt.map(_t=>{let Me=_t.split("=");Me[0]==="_educoder_session"&&Wn(Me[1])})},[]),(0,Pt.useEffect)(()=>{Zt==="office"&&(bt.indexOf("bigfilescdn.")>-1||bt.indexOf("bigfiles1")>-1?Zn({url:bt,fileType:fi(bt),model:bt.indexOf("model=edit")?"edit":"view"}):jt())},[Zt,bt]);function Pi(vt){return ct(this,null,function*(){vt.data.type==="pdfdata"&&(Ot(vt.data.data),window.removeEventListener("message",Pi,!1)),console.log("mess---:",vt.data)})}const jt=()=>ct(void 0,null,function*(){console.log("data:",bt);let vt=bt;bt.startsWith("http")||(vt=location.origin+vt);let Lt=new URL(vt).pathname.split("/").pop();const Bt=yield(0,ue.gJ)({attachment_id:Lt});Bt.url=Oi+Bt.url,Zn(Bt)}),Mt=()=>{if(bt.startsWith("http")||bt.startsWith("blob:")){mt();return}(0,ne.Sv)($t||"educoder",bt,$t)},mt=()=>{Ee&&(0,De.fc)({id:Ee==null?void 0:Ee.id,watch_type:1,course_id:Ee==null?void 0:Ee.course_id}),(0,ne.Nd)($t||"educoder",decodeURIComponent(bt))};return Jt.createElement("div",{style:at({},nn||{}),className:`${Tn&&te.bgBlack} ${Zt?te.wrp:"hide"}`},qe&&Jt.createElement("div",{className:te.close,ref:Le},!!ni&&Jt.createElement(Ht.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Le.current},Jt.createElement("span",{onClick:()=>{En(),ni()}},Jt.createElement("i",{className:"icon-yulanpizhu"}))),!bn&&Jt.createElement(Ht.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Le.current},Jt.createElement("span",{onClick:mt},Jt.createElement("i",{className:"icon-quxiaozhiding"}))),Rt&&Jt.createElement(Ht.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>Le.current},Jt.createElement("span",{className:"",onClick:()=>{const vt=document.getElementById("pdfiframe");window.addEventListener("message",Pi,!1),setTimeout(()=>{vt.contentWindow.postMessage("getData","*")},300)}},Jt.createElement("i",{className:"icon-baocun"}))),Jt.createElement(Ht.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Le.current},Jt.createElement("span",{className:"",onClick:()=>{En()}},Jt.createElement("i",{className:"icon-guanbi1"})))),Jt.createElement("div",{className:`${te[ge]} ${ge} ${te.monaco} ${Zt==="txt"?"show":"hide"}`},Zt==="txt"&&Jt.createElement(Jt.Fragment,null,Jt.createElement(de.ZP,at({},Ce)))),Zt==="audio"&&Jt.createElement("audio",{src:`${(bt==null?void 0:bt.indexOf("http://"))>-1||(bt==null?void 0:bt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${bt}`,autoPlay:!0}),Zt==="video"&&Jt.createElement(Jt.Fragment,null,(bt==null?void 0:bt.indexOf("http"))>-1?Jt.createElement("video",{controls:!0,src:`${bt}`,autoPlay:!0}):Jt.createElement("video",{controls:!0,src:`data:video/mp4;base64,${bt}`,autoPlay:!0})),Zt==="office"&&un&&Jt.createElement("iframe",{src:`${si}/office.html?key=${un.key}&url=${btoa(un.url)}&callbackUrl=${Oi+(un.callbackUrl||"")}&fileType=${un.fileType}&title=${un.title||""}&model=${xt}&officeServer=${Vt.Z.ONLYOFFICE}&disabledDownload=${!!bn}`}),Zt==="html"&&Jt.createElement("iframe",{src:bt+"&disposition=inline"}),Zt==="pdf"&&Jt.createElement("iframe",{id:"pdfiframe",src:`${si}/js/pdfview/index.html?filename=${$t||"educoder.pdf"}&url=${encodeURIComponent(bt)}&disabledDownload=${!!bn}&model=${xt}`}),Zt==="image"&&Jt.createElement("img",{src:`${(bt==null?void 0:bt.indexOf("http://"))>-1||(bt==null?void 0:bt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${bt}`}),(Zt==="other"||Zt==="download")&&Jt.createElement(Jt.Fragment,null,In?Jt.createElement(ce.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:Jt.createElement(Ae.ZP,{icon:Jt.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Mt,disabled:bn},"\u4E0B\u8F7D")}):Jt.createElement(Ae.ZP,{type:"primary",size:"middle",onClick:Mt,disabled:bn},Jt.createElement(Be.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},78380:function(Cn,We,Qt){"use strict";Qt.d(We,{z:function(){return Wt},Z:function(){return Zt}});var Pt=Qt(59301),te=Qt(14752),Ae=Qt(48421),Be=Qt(64018),de=Qt(79710),Ht=Qt(13952),ne=Qt(89299),ue=Qt(15342),ce=Qt(1012),Vt=Qt(23416),De=Qt(59301),be=({html:$t})=>{const Ce=(0,Pt.useRef)(null),ge=(0,Pt.useRef)(null),nn=`.markdown-body p {
margin: 0 0 16px 0 !important;
line-height: 28px;
white-space: pre-wrap;
}
ol,
ul,
li {
list-style-type: none
}
ol,
ul,
dl {
margin-bottom: 0px;
}
.markdown-body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
color: #333;
overflow: hidden;
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
word-break: break-word;
font-size: 16px;
line-height: 1.6;
white-space: normal;
word-wrap: break-word;
position: relative;
}
.markdown-body ul>li {
list-style-type: disc;
}
.markdown-body ol>li {
list-style-type: decimal;
}
.markdown-body a {
background: transparent;
}
.markdown-body a:active,
.markdown-body a:hover {
outline: 0;
}
.markdown-body strong {
font-weight: bold;
}
.markdown-body h1 {
font-size: 2em;
margin: 0.67em 0;
}
.markdown-body img {
border: 0;
}
.markdown-body hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
.markdown-body pre {
overflow: auto;
}
.markdown-body code,
.markdown-body kbd,
.markdown-body pre {
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
font-size: 1em;
}
.markdown-body input {
color: inherit;
font: inherit;
margin: 0;
}
.markdown-body html input[disabled] {
cursor: default;
}
.markdown-body input {
line-height: normal;
}
.markdown-body input[type="checkbox"] {
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
.markdown-body table {
border-collapse: collapse;
border-spacing: 0;
}
.markdown-body td,
.markdown-body th {
padding: 0;
}
.markdown-body * {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body input {
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
}
.markdown-body a {
color: #4183c4;
text-decoration: none;
}
.markdown-body a:hover,
.markdown-body a:active {
text-decoration: underline;
}
.markdown-body hr {
height: 0;
margin: 15px 0;
overflow: hidden;
background: transparent;
border: 0;
border-bottom: 1px solid #ddd;
}
.markdown-body hr:before {
display: table;
content: "";
}
.markdown-body hr:after {
display: table;
clear: both;
content: "";
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
margin-top: 15px;
margin-bottom: 15px;
line-height: 1.1;
}
.markdown-body h1 {
font-size: 30px;
}
.markdown-body h2 {
font-size: 21px;
}
.markdown-body h3 {
font-size: 16px;
}
.markdown-body h4 {
font-size: 14px;
}
.markdown-body h5 {
font-size: 12px;
}
.markdown-body h6 {
font-size: 11px;
}
.markdown-body blockquote {
margin: 0;
}
.markdown-body ul,
.markdown-body ol {
padding: 0;
margin-top: 0;
margin-bottom: 0;
}
ul.linenums,
ol.linenums {
padding: 16px 0 0 56px !important;
}
.markdown-body ul,
.markdown-body ol {
padding-left: 2em;
}
.markdown-body ol ol,
.markdown-body ul ol {
list-style-type: lower-roman;
}
.markdown-body ul ul ol,
.markdown-body ul ol ol,
.markdown-body ol ul ol,
.markdown-body ol ol ol {
list-style-type: lower-alpha;
}
.markdown-body dd {
margin-left: 0;
}
.markdown-body code {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 12px;
}
.markdown-body pre {
margin-top: 0;
margin-bottom: 0;
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.markdown-body .octicon {
font: normal normal 16px octicons-anchor;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.markdown-body .octicon-link:before {
content: '\f05c';
}
.markdown-body>*:first-child {
margin-top: 0 !important;
}
.markdown-body>*:last-child {
margin-bottom: 0 !important;
}
.markdown-body .anchor {
position: absolute;
top: 0;
left: 0;
display: block;
padding-right: 6px;
padding-left: 30px;
margin-left: -30px;
}
.markdown-body .anchor:focus {
outline: none;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
position: relative;
margin-top: 1em;
margin-bottom: 16px;
font-weight: bold;
line-height: 1.4;
}
.markdown-body h1 .octicon-link,
.markdown-body h2 .octicon-link,
.markdown-body h3 .octicon-link,
.markdown-body h4 .octicon-link,
.markdown-body h5 .octicon-link,
.markdown-body h6 .octicon-link {
display: none;
color: #000;
vertical-align: middle;
}
.markdown-body h1:hover .anchor,
.markdown-body h2:hover .anchor,
.markdown-body h3:hover .anchor,
.markdown-body h4:hover .anchor,
.markdown-body h5:hover .anchor,
.markdown-body h6:hover .anchor {
padding-left: 8px;
margin-left: -30px;
text-decoration: none;
}
.markdown-body h1:hover .anchor .octicon-link,
.markdown-body h2:hover .anchor .octicon-link,
.markdown-body h3:hover .anchor .octicon-link,
.markdown-body h4:hover .anchor .octicon-link,
.markdown-body h5:hover .anchor .octicon-link,
.markdown-body h6:hover .anchor .octicon-link {
display: inline-block;
}
.markdown-body h1 {
padding-bottom: 0.3em;
font-size: 2.25em;
line-height: 1.2;
border-bottom: 1px solid #eee;
}
.markdown-body h1 .anchor {
line-height: 1;
}
.markdown-body h2 {
padding-bottom: 0.3em;
font-size: 1.75em;
line-height: 1.225;
border-bottom: 1px solid #eee;
}
.markdown-body h2 .anchor {
line-height: 1;
}
.markdown-body h3 {
font-size: 1.5em;
line-height: 1.43;
}
.markdown-body h3 .anchor {
line-height: 1.2;
}
.markdown-body h4 {
font-size: 1.25em;
}
.markdown-body h4 .anchor {
line-height: 1.2;
}
.markdown-body h5 {
font-size: 1em;
}
.markdown-body h5 .anchor {
line-height: 1.1;
}
.markdown-body h6 {
font-size: 1em;
color: #777;
}
.markdown-body h6 .anchor {
line-height: 1.1;
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}
.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
margin-top: 0;
margin-bottom: 0;
}
.markdown-body li>p {
margin-top: 16px;
}
.markdown-body dl {
padding: 0;
}
.markdown-body dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: bold;
}
.markdown-body dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
.markdown-body blockquote {
padding: 0 15px;
color: #777;
border-left: 4px solid #ddd;
}
.markdown-body blockquote> :first-child {
margin-top: 0;
}
.markdown-body blockquote> :last-child {
margin-bottom: 0;
}
.markdown-body table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
}
.markdown-body table th {
font-weight: bold;
text-align: revert;
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
.markdown-body table tr {
background-color: #fff;
border-top: 1px solid #ccc;
}
.markdown-body table tr:nth-child(2n) {
background-color: #f8f8f8;
}
.markdown-body img {
max-width: 100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body code {
padding: 0;
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
background-color: rgba(0, 0, 0, 0.04);
border-radius: 3px;
}
.markdown-body code:has(.katex) {
background-color: transparent;
}
.markdown-body code:before,
.markdown-body code:after {
letter-spacing: -0.2em;
content: "\\00a0";
}
.markdown-body pre>code {
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.markdown-body .highlight {
margin-bottom: 16px;
}
.markdown-body .highlight pre,
.markdown-body pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f7f7f7;
border-radius: 3px;
}
.markdown-body .highlight pre {
margin-bottom: 0;
word-break: normal;
}
.markdown-body pre {
word-wrap: normal;
}
.markdown-body pre code {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
.markdown-body pre code:before,
.markdown-body pre code:after {
content: normal;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .pl-c {
color: #969896;
}
.markdown-body .pl-c1,
.markdown-body .pl-mdh,
.markdown-body .pl-mm,
.markdown-body .pl-mp,
.markdown-body .pl-mr,
.markdown-body .pl-s1 .pl-v,
.markdown-body .pl-s3,
.markdown-body .pl-sc,
.markdown-body .pl-sv {
color: #0086b3;
}
.markdown-body .pl-e,
.markdown-body .pl-en {
color: #795da3;
}
.markdown-body .pl-s1 .pl-s2,
.markdown-body .pl-smi,
.markdown-body .pl-smp,
.markdown-body .pl-stj,
.markdown-body .pl-vo,
.markdown-body .pl-vpf {
color: #333;
}
.markdown-body .pl-ent {
color: #63a35c;
}
.markdown-body .pl-k,
.markdown-body .pl-s,
.markdown-body .pl-st {
color: #a71d5d;
}
.markdown-body .pl-pds,
.markdown-body .pl-s1,
.markdown-body .pl-s1 .pl-pse .pl-s2,
.markdown-body .pl-sr,
.markdown-body .pl-sr .pl-cce,
.markdown-body .pl-sr .pl-sra,
.markdown-body .pl-sr .pl-sre,
.markdown-body .pl-src {
color: #df5000;
}
.markdown-body .pl-mo,
.markdown-body .pl-v {
color: #1d3e81;
}
.markdown-body .pl-id {
color: #b52a1d;
}
.markdown-body .pl-ii {
background-color: #b52a1d;
color: #f8f8f8;
}
.markdown-body .pl-sr .pl-cce {
color: #63a35c;
font-weight: bold;
}
.markdown-body .pl-ml {
color: #693a17;
}
.markdown-body .pl-mh,
.markdown-body .pl-mh .pl-en,
.markdown-body .pl-ms {
color: #1d3e81;
font-weight: bold;
}
.markdown-body .pl-mq {
color: #008080;
}
.markdown-body .pl-mi {
color: #333;
font-style: italic;
}
.markdown-body .pl-mb {
color: #333;
font-weight: bold;
}
.markdown-body .pl-md,
.markdown-body .pl-mdhf {
background-color: #ffecec;
color: #bd2c00;
}
.markdown-body .pl-mdht,
.markdown-body .pl-mi1 {
background-color: #eaffea;
color: #55a532;
}
.markdown-body .pl-mdr {
color: #795da3;
font-weight: bold;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .task-list-item {
list-style-type: none;
}
.markdown-body .task-list-item+.task-list-item {
margin-top: 3px;
}
.markdown-body .task-list-item input {
float: left;
margin: 0.3em 0 0.25em -1.6em;
vertical-align: middle;
}
.markdown-body :checked+.radio-label {
z-index: 1;
position: relative;
border-color: #4183c4;
}
/*! Pretty printing styles. Used with prettify.js. */
/* SPAN elements with the classes below are added by prettyprint. */
.pln {
color: #000
}
/* plain text */
@media screen {
.str {
color: #080
}
/* string content */
.kwd {
color: #008
}
/* a keyword */
.com {
color: #800
}
/* a comment */
.typ {
color: #606
}
/* a type name */
.lit {
color: #066
}
/* a literal value */
/* punctuation, lisp open bracket, lisp close bracket */
.pun,
.opn,
.clo {
color: #660
}
.tag {
color: #008
}
/* a markup tag name */
.atn {
color: #606
}
/* a markup attribute name */
.atv {
color: #080
}
/* a markup attribute value */
.dec,
.var {
color: #606
}
/* a declaration; a variable name */
.fun {
color: red
}
/* a function name */
}
/* Use higher contrast and text-weight for printable form. */
@media print,
projection {
.str {
color: #060
}
.kwd {
color: #006;
font-weight: bold
}
.com {
color: #600;
font-style: italic
}
.typ {
color: #404;
font-weight: bold
}
.lit {
color: #044
}
.pun,
.opn,
.clo {
color: #440
}
.tag {
color: #006;
font-weight: bold
}
.atn {
color: #404
}
.atv {
color: #060
}
}
/* Put a border around prettyprinted code snippets. */
pre.prettyprint {
padding: 2px;
/* border: 1px solid #888 */
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
margin-top: 0;
margin-bottom: 0
}
/* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L5,
li.L6,
li.L7,
li.L8 {
list-style-type: none
}
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 {
background: #eee
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}`;return(0,Pt.useEffect)(()=>{const qe=Ce.current.attachShadow({mode:"open"});ge.current=document.createElement("div"),ge.current.className="markdown-body",ge.current.innerHTML=$t,qe.appendChild(ge.current);const En=document.createElement("style");return En.textContent=nn,qe.appendChild(En),()=>{qe.innerHTML=""}},[]),(0,Pt.useEffect)(()=>{ge.current&&(ge.current.innerHTML=$t)},[$t]),De.createElement("div",{ref:Ce})};function It($t){const Ce=["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"],ge=new RegExp(`\\b(${Ce.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return $t.replace(ge,"").trim()}var nt=Object.defineProperty,et=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable,ct=($t,Ce,ge)=>Ce in $t?nt($t,Ce,{enumerable:!0,configurable:!0,writable:!0,value:ge}):$t[Ce]=ge,pt=($t,Ce)=>{for(var ge in Ce||(Ce={}))At.call(Ce,ge)&&ct($t,ge,Ce[ge]);if(et)for(var ge of et(Ce))at.call(Ce,ge)&&ct($t,ge,Ce[ge]);return $t};const xt="@\u2581\u2581@",bt="@\u2581@",Rt=/<pre[^>]*>/g;function Ot($t){let Ce=document.createElement("div");return Ce.innerHTML=$t,Ce.childNodes.length===0?"":Ce.childNodes[0].nodeValue}const Wt=($t,Ce)=>{$t=$t||"";const ge=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,nn=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,qe=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,En=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ce?$t.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(ge,(Tn,bn,ni,In,Ee,ie,Pn)=>{const pi=bn||In||ie,Wn=ni||Ee||Pn||"?";return Ht.Z.API_SERVER+"/api/attachments/"+pi+Wn+"&t="+(0,ne.Jn)(pi,Date.now())+(Tn.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):($t=$t.replace(En,(Tn,bn,ni,In,Ee,ie,Pn)=>{const pi=bn||In||ie,Wn=ni||Ee||Pn||"?";return Ht.Z.API_SERVER+"/attachments/download/"+pi+Wn+"&t="+(0,ne.Jn)(pi,Date.now())+(Tn.indexOf(")")>-1?")":"&")}).replace(ge,(Tn,bn,ni,In,Ee,ie,Pn)=>{const pi=bn||In||ie,Wn=ni||Ee||Pn||"?";return Ht.Z.API_SERVER+"/api/attachments/"+pi+Wn+"&t="+(0,ne.Jn)(pi,Date.now())+(Tn.indexOf(")")>-1?")":"&")}).replace(nn,(Tn,bn,ni,In,Ee)=>{const ie=bn||In,Pn=ni||Ee||"";return'"'+Ht.Z.API_SERVER+"/api/attachments/"+ie+Pn+ie+Pn+"&t="+(0,ne.Jn)(ie,Date.now())}).replace(qe,(Tn,bn,ni,In,Ee)=>{const ie=bn||In,Pn=ni||Ee||"";return"("+Ht.Z.API_SERVER+"/files/uploads/"+ie+Pn+ie+Pn+"&t="+(0,ne.Jn)(ie,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,`
`),$t)};var Zt=({value:$t="",className:Ce,showTextOnly:ge,showLines:nn,style:qe={},stylesPrev:En={},highlightKeywords:Tn,showProgramFill:bn,isProgramFill:ni,disabledFill:In=!1,programFillValue:Ee,onFillChange:ie=Wn=>{},onFillBlur:Pn=()=>{},onFillFocus:pi=()=>{}})=>{let Wn=It(String($t||""));const[un,Zn]=(0,Pt.useState)(""),[si,Oi]=(0,Pt.useState)("office"),[on,ri]=(0,Pt.useState)([]),Le=(0,Pt.useRef)("a"+(0,ce.Z)()),fi={},Pi=Te=>/<style[\s\S]*?>/i.test(Te||""),jt=(Te,Oe,$e)=>{const yn=document.createElement(Te===bt?"input":"textarea");yn.style.width="100%",yn.style.height=Te===bt?"40px":"151px",yn.rows=5,yn.spellcheck=!1,yn.name="edu-program-fill",yn.placeholder="\u8BF7\u8F93\u5165",yn.dataset.id=Oe;const Kn=Object.keys(fi).length;return fi[Kn]=yn,`<span class="edu-program-fill-wrap ${Te===bt?"":"show"}" style="width:${Te===bt?"400px":"100%"}" title=${$e||""}><span>${yn.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Mt(Te){return Te=Te.replace(/!\[.*?\]\(.*?\)/g,""),Te=Te.replace(/\[.*?\]\(.*?\)/g,""),Te=Te.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Te=Te.replace(/<embed.*?>/g,""),Te=Te.replace(/<img.*?>/g,""),Te=Te.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Te=Te.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Te=Te.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Te=Te.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Te}const mt=Te=>!ge&&Pi(Wn)?Te:Te.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Oe,$e){let yn=$e.replace(/(\n|\r)/g,"").split("}"),Kn=[];return yn.map(Sn=>{Sn!=""&&Kn.push(`.${Le.current} ${Sn}`)}),`<style>${Kn.join("}")}</style>`}),vt=(0,Pt.useMemo)(()=>{try{const yn=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Kn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Sn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,ui=/\(\/attachments\/download\//g;Wn=Wn.replace(ui,"("+Ht.Z.API_SERVER+"/attachments/download/").replace(yn,"("+Ht.Z.API_SERVER+"/api/attachments/").replace(Kn,'"'+Ht.Z.API_SERVER+"/api/attachments/").replace(Sn,'"'+Ht.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(yn){}if(bn){let yn=-1;return Wn=Wn.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(Kn,Sn,ui){var ci;return++yn,jt(Kn,yn,(ci=Ee==null?void 0:Ee[yn])==null?void 0:ci.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${mt(Wn||"")}</pre>`}let Te=mt(Wn);Te=(0,Ae.ZP)(Te);const Oe=(0,Ae.ez)();Wn.match(/\[TOC\]/)&&(Te=Te.replace("<p>[TOC]</p>",(0,Ae.Qv)()),(0,Ae.Iy)()),Te=Te.replace(/(__special_katext_id_\d+__)/g,(yn,Kn)=>{const{type:Sn,expression:ui}=Oe[Kn];return(0,ue.renderToString)(Ot(ui)||"",{displayMode:Sn==="block",throwOnError:!1,output:"html"})}),Te=Te.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ae.AL)();const $e=document.createElement("div");if($e.innerHTML=Te,ge)return $e.innerText;if(Tn){const yn=Tn.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Me($e,yn),$e.innerHTML}return setTimeout(()=>Fe(),500),$e.innerHTML},[Wn,Tn]);(0,Pt.useEffect)(()=>{ye.current&&ye.current.querySelectorAll(["input","textarea"]).forEach(Oe=>{Oe.oninput=Lt,Oe.onblur=Bt,Oe.onfocus=_t})},[on]),(0,Pt.useEffect)(()=>{var Te,Oe,$e,yn,Kn;if(Ee!=null&&Ee.length)try{const Sn=ye.current.querySelectorAll(".edu-program-fill-score"),ui=ye.current.querySelectorAll('[name="edu-program-fill"]');for(const[ci,mi]of ui.entries())mi.value=((Te=Ee==null?void 0:Ee[ci])==null?void 0:Te.value)||"",((Oe=Ee==null?void 0:Ee[ci])==null?void 0:Oe.type)==="warning"?mi.className="program-fill-warning":(($e=Ee==null?void 0:Ee[ci])==null?void 0:$e.type)==="success"?mi.className="program-fill-success":mi.className="";for(const[ci,mi]of Sn.entries())mi.innerHTML=(yn=Ee==null?void 0:Ee[ci])!=null&&yn.score?`${(Kn=Ee==null?void 0:Ee[ci])==null?void 0:Kn.score}\u5206`:"";ri(Ee)}catch(Sn){console.log(Sn,"error")}},[Ee]);const Lt=Te=>{on[Te.target.dataset.id]=on[Te.target.dataset.id]||{},on[Te.target.dataset.id].value=Te.target.value,ri([...on]),ie(on,Te.target.dataset.id)},Bt=Te=>{on[Te.target.dataset.id]=on[Te.target.dataset.id]||{},on[Te.target.dataset.id].value=Te.target.value,ri([...on]),Pn(on,Te.target.dataset.id)},_t=Te=>{on[Te.target.dataset.id]=on[Te.target.dataset.id]||{},on[Te.target.dataset.id].value=Te.target.value,ri([...on]),pi(on,Te.target.dataset.id)};function Me(Te,Oe){return Te.childNodes.forEach($e=>{var yn;if($e.childNodes.length>0)Me($e,Oe);else if($e.nodeName!=="IMG")if($e.innerHTML)$e.innerHTML=(yn=$e.innerHTML)==null?void 0:yn.replace(new RegExp(Oe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Kn=document.createElement("span");Kn.innerHTML=$e.textContent.replace(new RegExp(Oe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),$e.replaceWith(Kn)}})}const ye=(0,Pt.useRef)();Ae.jb.WebkitLineClamp=nn,nn&&(qe=pt(pt({},qe),Ae.jb));function Ye(Te){let Oe=Te.target;if(Oe.tagName.toUpperCase()==="A"){let $e=Oe.getAttribute("href");if($e.indexOf("office")>-1)Te.preventDefault(),Zn($e),Oi("office");else if($e.indexOf("application/pdf")>-1)Te.preventDefault(),Zn($e),Oi("pdf");else if($e.indexOf("text/html")>-1)Te.preventDefault(),Zn($e),Oi("html");else if($e.startsWith("#")){Te.preventDefault();let yn=document.getElementById($e.replace("#",""));yn&&yn.scrollIntoView(!0)}}}const Fe=()=>{var Te;const Oe=(Te=ye.current)==null?void 0:Te.querySelectorAll("video");Oe==null||Oe.forEach($e=>{if($e.oncontextmenu=()=>!1,$e.src.indexOf(".m3u8")>-1&&!$e.canPlayType("application/vnd.apple.mpegurl")){if(de.ZP.isSupported()){var yn=new de.ZP;yn.loadSource($e.src),yn.attachMedia($e)}}})};return(0,Pt.useEffect)(()=>{if(ye.current&&vt&&vt.match(Rt)&&window.PR.prettyPrint(),ye.current)return ye.current.addEventListener("click",Ye),()=>{var Te;(Te=ye.current)==null||Te.removeEventListener("click",Ye),(0,Ae.AL)(),(0,Ae.Iy)()}},[vt,ye.current,Ye]),(0,Pt.useEffect)(()=>{var Te;const Oe=$e=>{$e.preventDefault(),$e.clipboardData.setData("text",window.getSelection().toString())};return(Te=ye.current)==null||Te.addEventListener("copy",Oe),()=>{var $e;($e=ye.current)==null||$e.removeEventListener("copy",Oe)}},[ye.current]),Pt.createElement(Pt.Fragment,null,ge&&Pt.createElement("div",{ref:ye},vt),!ge&&!Pi(vt)&&Pt.createElement("div",{ref:ye,style:pt({},qe),className:`${Ce||""} ${In?"disabled-fill":""} markdown-body ${Le.current}`,dangerouslySetInnerHTML:{__html:vt}}),!ge&&Pi(vt)&&Pt.createElement(be,{html:vt}),Pt.createElement(Vt.Z,{close:!0,data:un,type:un!=null&&un.length?si:"",style:pt({},En),onClose:()=>Zn("")}))}},71465:function(Cn,We,Qt){"use strict";Qt.d(We,{Z:function(){return nn}});var Pt=Qt(59301),te=Qt(44993),Ae=Qt(62957),Be=Qt(28284),de=Qt(6767),Ht=Qt(29787),ne=Qt(18287),ue=Qt(77019),ce=Qt(5269),Vt=Qt(25399),De=Qt(37568),Jt={currentPrimary:"currentPrimary___NPWiR",currentDelete:"currentDelete___UEfhf",DirectoryTree:"DirectoryTree___xPxCY",EditDom:"EditDom___seNxC"},be=Qt(96911),It=Qt(37425),nt=Qt(63604),et=Qt(38776),At=Object.defineProperty,at=Object.defineProperties,ct=Object.getOwnPropertyDescriptors,pt=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,bt=Object.prototype.propertyIsEnumerable,Rt=(qe,En,Tn)=>En in qe?At(qe,En,{enumerable:!0,configurable:!0,writable:!0,value:Tn}):qe[En]=Tn,Ot=(qe,En)=>{for(var Tn in En||(En={}))xt.call(En,Tn)&&Rt(qe,Tn,En[Tn]);if(pt)for(var Tn of pt(En))bt.call(En,Tn)&&Rt(qe,Tn,En[Tn]);return qe},Wt=(qe,En)=>at(qe,ct(En)),Zt=(qe,En)=>{var Tn={};for(var bn in qe)xt.call(qe,bn)&&En.indexOf(bn)<0&&(Tn[bn]=qe[bn]);if(qe!=null&&pt)for(var bn of pt(qe))En.indexOf(bn)<0&&bt.call(qe,bn)&&(Tn[bn]=qe[bn]);return Tn},$t=(qe,En,Tn)=>new Promise((bn,ni)=>{var In=Pn=>{try{ie(Tn.next(Pn))}catch(pi){ni(pi)}},Ee=Pn=>{try{ie(Tn.throw(Pn))}catch(pi){ni(pi)}},ie=Pn=>Pn.done?bn(Pn.value):Promise.resolve(Pn.value).then(In,Ee);ie((Tn=Tn.apply(qe,En)).next())});const Ce=(qe=[])=>qe==null?void 0:qe.map(En=>Wt(Ot({},En),{title:(En==null?void 0:En.value)||"",key:En==null?void 0:En.id,isLeaf:!0})),ge=qe=>{var En=qe,{user:Tn,children:bn,isShowComponent:ni=!0,ModalProps:In={},onDataSelect:Ee}=En,ie=Zt(En,["user","children","isShowComponent","ModalProps","onDataSelect"]);const[Pn,pi]=Ae.default.useModal(),[Wn]=Be.default.useForm(),[un,Zn]=(0,Pt.useState)([]),[si,Oi]=(0,Pt.useState)(!1),[on,ri]=(0,Pt.useState)(!1),[,Le,fi,Pi]=(0,be.U)(It.qE,{page:1,limit:9999}),[,,jt]=(0,be.U)(It.V8,{}),[,,Mt]=(0,be.U)(It.B$,{}),[,,mt]=(0,be.U)(It.DH,{}),[,,vt]=(0,be.U)(It.bJ,{}),Lt=()=>{Oi(!1),Wn.resetFields(),ri(!1)},Bt=Me=>$t(void 0,null,function*(){const{node:ye,dragNode:Ye,event:Fe}=Me,Te=Me.node.pos.split("-"),Oe=Me.dropPosition-Number(Te[Te.length-1]);if(Oe==0){de.ZP.warning("\u65E0\u6CD5\u79FB\u52A8\u5230\u5185\u90E8\u4F4D\u7F6E");return}if(Oe==1&&(Ye==null?void 0:Ye.item_index)==(ye==null?void 0:ye.item_index)+1){de.ZP.warning("\u672A\u79FB\u52A8\u4F4D\u7F6E");return}const $e=yield vt({id:Ye==null?void 0:Ye.key,position:Oe==-1?1:(Ye==null?void 0:Ye.item_index)>(ye==null?void 0:ye.item_index)?(ye==null?void 0:ye.item_index)+1:ye==null?void 0:ye.item_index});($e==null?void 0:$e.status)===0&&(de.ZP.success("\u79FB\u52A8\u6210\u529F"),fi({},!0))}),_t=Me=>$t(void 0,null,function*(){let ye={};on?ye=yield Mt(Ot({},Me)):ye=yield mt(Ot({},Me)),(ye==null?void 0:ye.status)==0&&(de.ZP.success((ye==null?void 0:ye.message)||(on?"\u6DFB\u52A0\u6210\u529F":"\u66F4\u65B0\u6210\u529F")),fi({},!0),Lt())});return(0,Pt.useEffect)(()=>{In!=null&&In.open&&fi({},!0)},[In==null?void 0:In.open]),(0,Pt.useEffect)(()=>{var Me;Zn(Ce((Me=Pi==null?void 0:Pi.data)==null?void 0:Me.list))},[Pi]),ni?Pt.createElement(Pt.Fragment,null,pi,bn,Pt.createElement(Ae.default,Ot({},Ot({title:"\u5E38\u7528\u8BC4\u8BED",width:640,centered:!0,footer:null,bodyStyle:{padding:"10px 5px 25px"}},In)),Pt.createElement(Ht.Z,{spinning:Le},(un==null?void 0:un.length)>0?Pt.createElement(Pt.Fragment,null,Pt.createElement(ne.default.DirectoryTree,{height:500,className:Jt.DirectoryTree,multiple:!0,draggable:{icon:!1},defaultExpandAll:!0,switcherIcon:!1,showIcon:!1,onSelect:Ee,treeData:un,onDrop:Bt,titleRender:Me=>Pt.createElement(Pt.Fragment,null,Pt.createElement("span",{className:"multi_ellipsis1",style:{flex:1,marginRight:"32px"}},Me==null?void 0:Me.title),Pt.createElement("div",{className:`${Jt.EditDom}`},Pt.createElement(ue.Z,{wrap:!1,align:"middle",gutter:16},Pt.createElement(ce.Z,null,Pt.createElement(Vt.Z,{title:"\u957F\u6309\u53EF\u8FDB\u884C\u62D6\u62FD\u6392\u5E8F"},Pt.createElement("i",{className:`iconfont icon-tuodong1 font12 ${Jt.currentPrimary}`}))),Pt.createElement(ce.Z,null,Pt.createElement(Vt.Z,{title:"\u7F16\u8F91"},Pt.createElement("i",{className:`iconfont icon-bianji11 font12 ${Jt.currentPrimary}`,onClick:ye=>{ye.stopPropagation(),Wn.setFieldsValue(Ot({},Me)),Oi(!0)}}))),Pt.createElement(ce.Z,null,Pt.createElement(Vt.Z,{title:"\u5220\u9664"},Pt.createElement("i",{className:`iconfont icon-shanchu14 font12 ${Jt.currentDelete}`,onClick:ye=>{ye.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 Ye=yield jt({id:Me==null?void 0:Me.key});(Ye==null?void 0:Ye.status)==0&&(de.ZP.success((Ye==null?void 0:Ye.message)||"\u5220\u9664\u6210\u529F"),fi({},!0))})})}}))))))}),Pt.createElement(et.op,{className:"ml20 mt20",icon:Pt.createElement("i",{className:"iconfont icon-xiaojiahao"}),style:{borderRadius:"4px"},onClick:()=>{ri(!0),Oi(!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:()=>{ri(!0),Oi(!0)}},"\u6DFB\u52A0\u5E38\u7528\u8BC4\u8BED"))}))),Pt.createElement(Ae.default,{title:on?"\u6DFB\u52A0\u5E38\u7528\u8BC4\u8BED":"\u7F16\u8F91\u5E38\u7528\u8BC4\u8BED",open:si,okText:on?"\u6DFB\u52A0":"\u786E\u5B9A",onCancel:()=>{Lt()},onOk:()=>{Wn.submit()}},Pt.createElement(Be.default,{form:Wn,onFinish:_t},on&&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(Be.default.Item,{hidden:!0,name:"id"}),Pt.createElement(Be.default.Item,{className:"mt10",name:"value"},Pt.createElement(De.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 nn=(0,te.connect)(({loading:qe,user:En})=>({user:En,loading:qe.effects}))(ge)},41539:function(Cn,We,Qt){"use strict";Qt.d(We,{h:function(){return xt}});var Pt=Qt(59301),te=Qt(82326),Ae=Qt(28284),Be=Qt(99571),de=Qt(89780),Ht=Qt.n(de),ne=Qt(39060),ue=Qt(76596),ce=Object.defineProperty,Vt=Object.defineProperties,De=Object.getOwnPropertyDescriptors,Jt=Object.getOwnPropertySymbols,be=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,nt=(bt,Rt,Ot)=>Rt in bt?ce(bt,Rt,{enumerable:!0,configurable:!0,writable:!0,value:Ot}):bt[Rt]=Ot,et=(bt,Rt)=>{for(var Ot in Rt||(Rt={}))be.call(Rt,Ot)&&nt(bt,Ot,Rt[Ot]);if(Jt)for(var Ot of Jt(Rt))It.call(Rt,Ot)&&nt(bt,Ot,Rt[Ot]);return bt},At=(bt,Rt)=>Vt(bt,De(Rt));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"]};We.Z=({callback:bt,onCancel:Rt})=>{const[Ot,Wt]=(0,Pt.useState)("python");function Zt(Ce){Wt(pt[Ce][1])}function $t(Ce){bt(Ce)}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:Ce=>Ce.parentNode,onChange:Zt},Object.keys(pt).map(Ce=>Pt.createElement(at,{key:Ce,value:Ce},pt[Ce][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:Ot})),Pt.createElement("div",{className:"flex-container flex-end"},Pt.createElement(Be.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Pt.createElement(Be.ZP,{type:"ghost",onClick:Rt},"\u53D6\u6D88")))};function xt({value:bt,onChange:Rt,mode:Ot,options:Wt={}}){const Zt=(0,Pt.useRef)(),[$t,Ce]=(0,Pt.useState)();return(0,Pt.useEffect)(()=>{if($t){let ge=function(nn){const qe=nn.getValue();Rt&&Rt(qe)};return $t.on("change",ge),()=>{$t.off("change",ge)}}},[$t,Rt]),(0,Pt.useEffect)(()=>{$t&&$t.setOption("mode",Ot)},[$t,Ot]),(0,Pt.useEffect)(()=>{$t&&(bt!==$t.getValue()||bt==="")&&setTimeout(()=>{$t.setValue(bt||"")},300)},[$t,bt]),(0,Pt.useEffect)(()=>{if(Zt.current&&!$t){const ge=Ht().fromTextArea(Zt.current,et({mode:Ot,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Wt));Ce(ge)}},[Zt.current,$t]),Pt.createElement("div",{className:"my-codemirror-container"},Pt.createElement("textarea",{ref:Zt}))}},4213:function(Cn,We,Qt){"use strict";Qt.d(We,{Z:function(){return Ni}});var Pt=Qt(59301),te=Qt(89780),Ae=Qt.n(te),Be=Qt(76374),de=Qt(39060),Ht=Qt(6313),ne=Qt(25717),ue=Qt(99498),ce=Qt(25419),Vt=Qt(67549),De=Qt(78380),Jt=({value:_e="",className:Re,showTextOnly:Ue,showLines:gi,style:xe={}})=>{const Hi=(0,Pt.useMemo)(()=>"",[_e]);return Pt.createElement(Pt.Fragment,null,Pt.createElement("div",{dangerouslySetInnerHTML:{__html:Hi}}))},be=Qt(59301),It=Object.defineProperty,nt=Object.defineProperties,et=Object.getOwnPropertyDescriptors,At=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,pt=(_e,Re,Ue)=>Re in _e?It(_e,Re,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):_e[Re]=Ue,xt=(_e,Re)=>{for(var Ue in Re||(Re={}))at.call(Re,Ue)&&pt(_e,Ue,Re[Ue]);if(At)for(var Ue of At(Re))ct.call(Re,Ue)&&pt(_e,Ue,Re[Ue]);return _e},bt=(_e,Re)=>nt(_e,et(Re));let Rt=[{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 Ot({onActionCallback:_e,title:Re,icon:Ue,actionName:gi,className:xe="",children:Hi}){function Dn(){_e(gi)}return be.createElement("a",{title:Re,className:xe,onClick:Dn},be.createElement("i",{className:`${Ue}`}),Hi)}var Wt=({watch:_e,showNullButton:Re,showNullProgramButton:Ue,onActionCallback:gi,fullScreen:xe,insertTemp:Hi,hidetoolBar:Dn,extraUse:Ai})=>{const Ve=[...Rt,{title:`${_e?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${_e?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return be.createElement("ul",{className:"markdown-toolbar-container"},!Dn&&Ve.map((ze,ai)=>be.createElement("li",{key:ai},ze.actionName?be.createElement(Ot,bt(xt({},ze),{onActionCallback:gi})):be.createElement("span",{className:"v-line"}))),Re?be.createElement("li",null,be.createElement(Ot,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:gi},be.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ue?be.createElement(be.Fragment,null,be.createElement("li",null,be.createElement(Ot,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:gi},be.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),be.createElement("li",null,be.createElement(Ot,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:gi},be.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,Hi&&be.createElement("li",null,be.createElement(Ot,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Hi}`,onActionCallback:gi},be.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Ai&&be.createElement("li",null,Ai),be.createElement("li",{className:"btn-full-screen"},be.createElement(Ot,{icon:`${xe?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:xe?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:gi})))},Zt=Qt(51498),$t=Qt(28284),Ce=Qt(37568),ge=Qt(99571),nn=Object.defineProperty,qe=Object.defineProperties,En=Object.getOwnPropertyDescriptors,Tn=Object.getOwnPropertySymbols,bn=Object.prototype.hasOwnProperty,ni=Object.prototype.propertyIsEnumerable,In=(_e,Re,Ue)=>Re in _e?nn(_e,Re,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):_e[Re]=Ue,Ee=(_e,Re)=>{for(var Ue in Re||(Re={}))bn.call(Re,Ue)&&In(_e,Ue,Re[Ue]);if(Tn)for(var Ue of Tn(Re))ni.call(Re,Ue)&&In(_e,Ue,Re[Ue]);return _e},ie=(_e,Re)=>qe(_e,En(Re));const Pn={labelCol:{span:4},wrapperCol:{span:20}};var pi=({callback:_e,onCancel:Re})=>{function Ue(gi){_e(gi)}return Pt.createElement($t.default,ie(Ee({},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(Ce.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(Ce.default,null)),Pt.createElement("div",{className:"flex-container flex-end"},Pt.createElement(ge.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Pt.createElement(ge.ZP,{type:"ghost",onClick:Re},"\u53D6\u6D88")))},Wn=Qt(41539),un=Qt(35944),Zn=Qt(62957),si=Qt(77019),Oi=Qt(89837),on=Qt(59301),ri=({callback:_e,onCancel:Re})=>{const Ue=document.createElement("canvas"),gi=Ue.getContext("2d");Ue.width=1e3,Ue.height=800,gi.fillStyle="#ffffff",gi.fillRect(0,0,Ue.width,Ue.height);const xe=Ue.toDataURL("image/png");return on.createElement(Zn.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},on.createElement(si.Z,{style:{height:"100vh"}},on.createElement(Oi.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:xe,visible:!0,title:String(Date.now())},onOk:Hi=>{_e({src:Hi.url})},onClose:Re})))},Le=Qt(12378);function fi(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(fi,go.CommandHandler),fi.prototype.canAlignSelection=function(){var _e=this.diagram;return!(_e===null||_e.isReadOnly||_e.isModelReadOnly||_e.selection.count<2)},fi.prototype.alignLeft=function(){var _e=this.diagram;_e.startTransaction("aligning left");var Re=1/0;_e.selection.each(function(Ue){Ue instanceof go.Link||(Re=Math.min(Ue.position.x,Re))}),_e.selection.each(function(Ue){Ue instanceof go.Link||Ue.move(new go.Point(Re,Ue.position.y))}),_e.commitTransaction("aligning left")},fi.prototype.alignRight=function(){var _e=this.diagram;_e.startTransaction("aligning right");var Re=-1/0;_e.selection.each(function(Ue){if(!(Ue instanceof go.Link)){var gi=Ue.actualBounds.x+Ue.actualBounds.width;Re=Math.max(gi,Re)}}),_e.selection.each(function(Ue){Ue instanceof go.Link||Ue.move(new go.Point(Re-Ue.actualBounds.width,Ue.position.y))}),_e.commitTransaction("aligning right")},fi.prototype.alignTop=function(){var _e=this.diagram;_e.startTransaction("alignTop");var Re=1/0;_e.selection.each(function(Ue){Ue instanceof go.Link||(Re=Math.min(Ue.position.y,Re))}),_e.selection.each(function(Ue){Ue instanceof go.Link||Ue.move(new go.Point(Ue.position.x,Re))}),_e.commitTransaction("alignTop")},fi.prototype.alignBottom=function(){var _e=this.diagram;_e.startTransaction("aligning bottom");var Re=-1/0;_e.selection.each(function(Ue){if(!(Ue instanceof go.Link)){var gi=Ue.actualBounds.y+Ue.actualBounds.height;Re=Math.max(gi,Re)}}),_e.selection.each(function(Ue){Ue instanceof go.Link||Ue.move(new go.Point(Ue.actualBounds.x,Re-Ue.actualBounds.height))}),_e.commitTransaction("aligning bottom")},fi.prototype.alignCenterX=function(){var _e=this.diagram,Re=_e.selection.first();if(Re){_e.startTransaction("aligning Center X");var Ue=Re.actualBounds.x+Re.actualBounds.width/2;_e.selection.each(function(gi){gi instanceof go.Link||gi.move(new go.Point(Ue-gi.actualBounds.width/2,gi.actualBounds.y))}),_e.commitTransaction("aligning Center X")}},fi.prototype.alignCenterY=function(){var _e=this.diagram,Re=_e.selection.first();if(Re){_e.startTransaction("aligning Center Y");var Ue=Re.actualBounds.y+Re.actualBounds.height/2;_e.selection.each(function(gi){gi instanceof go.Link||gi.move(new go.Point(gi.actualBounds.x,Ue-gi.actualBounds.height/2))}),_e.commitTransaction("aligning Center Y")}},fi.prototype.alignColumn=function(_e){var Re=this.diagram;Re.startTransaction("align Column"),_e===void 0&&(_e=0),_e=parseFloat(_e);var Ue=new Array;Re.selection.each(function(Ai){Ai instanceof go.Link||Ue.push(Ai)});for(var gi=0;gi<Ue.length-1;gi++){var xe=Ue[gi],Hi=xe.actualBounds.y+xe.actualBounds.height+_e,Dn=Ue[gi+1];Dn.move(new go.Point(xe.actualBounds.x,Hi))}Re.commitTransaction("align Column")},fi.prototype.alignRow=function(_e){_e===void 0&&(_e=0),_e=parseFloat(_e);var Re=this.diagram;Re.startTransaction("align Row");var Ue=new Array;Re.selection.each(function(Ai){Ai instanceof go.Link||Ue.push(Ai)});for(var gi=0;gi<Ue.length-1;gi++){var xe=Ue[gi],Hi=xe.actualBounds.x+xe.actualBounds.width+_e,Dn=Ue[gi+1];Dn.move(new go.Point(Hi,xe.actualBounds.y))}Re.commitTransaction("align Row")},fi.prototype.canRotate=function(_e){var Re=this.diagram;return!(Re===null||Re.isReadOnly||Re.isModelReadOnly||Re.selection.count<1)},fi.prototype.rotate=function(_e){_e===void 0&&(_e=90);var Re=this.diagram;Re.startTransaction("rotate "+_e.toString());var Re=this.diagram;Re.selection.each(function(Ue){Ue instanceof go.Link||Ue instanceof go.Group||(Ue.angle+=_e)}),Re.commitTransaction("rotate "+_e.toString())},fi.prototype.pullToFront=function(){var _e=this.diagram;_e.startTransaction("pullToFront");var Re=new go.Map;_e.selection.each(function(Ue){Re.set(Ue.layer,0)}),Re.iteratorKeys.each(function(Ue){var gi=0;Ue.parts.each(function(xe){if(!xe.isSelected){var Hi=xe.zOrder;isNaN(Hi)?xe.zOrder=0:gi=Math.max(gi,Hi)}}),Re.set(Ue,gi)}),_e.selection.each(function(Ue){fi._assignZOrder(Ue,Re.get(Ue.layer)+1)}),_e.commitTransaction("pullToFront")},fi.prototype.pushToBack=function(){var _e=this.diagram;_e.startTransaction("pushToBack");var Re=new go.Map;_e.selection.each(function(Ue){Re.set(Ue.layer,0)}),Re.iteratorKeys.each(function(Ue){var gi=0;Ue.parts.each(function(xe){if(!xe.isSelected){var Hi=xe.zOrder;isNaN(Hi)?xe.zOrder=0:gi=Math.min(gi,Hi)}}),Re.set(Ue,gi)}),_e.selection.each(function(Ue){fi._assignZOrder(Ue,Re.get(Ue.layer)-1-fi._findGroupDepth(Ue))}),_e.commitTransaction("pushToBack")},fi._assignZOrder=function(_e,Re,Ue){Ue===void 0&&(Ue=_e),_e.layer===Ue.layer&&(_e.zOrder=Re),_e instanceof go.Group&&_e.memberParts.each(function(gi){fi._assignZOrder(gi,Re+1,Ue)})},fi._findGroupDepth=function(_e){if(_e instanceof go.Group){var Re=0;return _e.memberParts.each(function(Ue){Re=Math.max(Re,fi._findGroupDepth(Ue))}),Re+1}else return 0},fi.prototype.doKeyDown=function(){var _e=this.diagram;if(_e!==null){var Re=_e.lastInput;if(Re.key==="Up"||Re.key==="Down"||Re.key==="Left"||Re.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)}},fi.prototype._getAllParts=function(){var _e=new Array;return this.diagram.nodes.each(function(Re){_e.push(Re)}),this.diagram.parts.each(function(Re){_e.push(Re)}),_e},fi.prototype._arrowKeyMove=function(){var _e=this.diagram,Re=_e.lastInput,Ue=0,gi=0;if(Re.control||Re.meta)Ue=1,gi=1;else if(_e.grid!==null){var xe=_e.grid.gridCellSize;gi=xe.width,Ue=xe.height}_e.startTransaction("arrowKeyMove"),_e.selection.each(function(Hi){Re.key==="Up"?Hi.move(new go.Point(Hi.actualBounds.x,Hi.actualBounds.y-Ue)):Re.key==="Down"?Hi.move(new go.Point(Hi.actualBounds.x,Hi.actualBounds.y+Ue)):Re.key==="Left"?Hi.move(new go.Point(Hi.actualBounds.x-gi,Hi.actualBounds.y)):Re.key==="Right"&&Hi.move(new go.Point(Hi.actualBounds.x+gi,Hi.actualBounds.y))}),_e.commitTransaction("arrowKeyMove")},fi.prototype._arrowKeySelect=function(){var _e=this.diagram,Re=_e.lastInput,Ue=null;Re.key==="Up"?Ue=this._findNearestPartTowards(270):Re.key==="Down"?Ue=this._findNearestPartTowards(90):Re.key==="Left"?Ue=this._findNearestPartTowards(180):Re.key==="Right"&&(Ue=this._findNearestPartTowards(0)),Ue!==null&&(Re.shift?Ue.isSelected=!0:Re.control||Re.meta?Ue.isSelected=!Ue.isSelected:_e.select(Ue))},fi.prototype._findNearestPartTowards=function(_e){var Re=this.diagram.selection.first();if(Re===null)return null;for(var Ue=Re.actualBounds.center,gi=this._getAllParts(),xe=1/0,Hi=Re,Dn=0;Dn<gi.length;Dn++){var Ai=gi[Dn];if(Ai!==Re&&Ai.canSelect()){var Ve=Ai.actualBounds.center,ze=Ue.directionPoint(Ve),ai=this._angleCloseness(ze,_e);if(ai<=45){var he=Ue.distanceSquaredPoint(Ve);he*=1+Math.sin(ai*Math.PI/180),he<xe&&(xe=he,Hi=Ai)}}}return Hi},fi.prototype._angleCloseness=function(_e,Re){return Math.min(Math.abs(Re-_e),Math.min(Math.abs(Re+360-_e),Math.abs(Re-360-_e)))},fi.prototype._arrowKeyTree=function(){var _e=this.diagram,Re=_e.selection.first();if(Re instanceof go.Node){var Ue=_e.lastInput;if(Ue.key==="Right"){if(!Re.isTreeLeaf)if(!Re.isTreeExpanded)_e.commandHandler.canExpandTree(Re)&&_e.commandHandler.expandTree(Re);else{var gi=this._sortTreeChildrenByY(Re).first();gi!==null&&_e.select(gi)}}else if(Ue.key==="Left")if(!Re.isTreeLeaf&&Re.isTreeExpanded)_e.commandHandler.canCollapseTree(Re)&&_e.commandHandler.collapseTree(Re);else{var xe=Re.findTreeParentNode();xe!==null&&_e.select(xe)}else if(Ue.key==="Up"){var xe=Re.findTreeParentNode();if(xe!==null){var Hi=this._sortTreeChildrenByY(xe),Dn=Hi.indexOf(Re);if(Dn>0){for(var Ai=Hi.elt(Dn-1);Ai!==null&&Ai.isTreeExpanded&&!Ai.isTreeLeaf;){var Ve=this._sortTreeChildrenByY(Ai);Ai=Ve.last()}Ai!==null&&_e.select(Ai)}else _e.select(xe)}}else if(Ue.key==="Down")if(Re.isTreeExpanded&&!Re.isTreeLeaf){var gi=this._sortTreeChildrenByY(Re).first();gi!==null&&_e.select(gi)}else for(;Re!==null;){var xe=Re.findTreeParentNode();if(xe===null)break;var Hi=this._sortTreeChildrenByY(xe),Dn=Hi.indexOf(Re);if(Dn<Hi.length-1){_e.select(Hi.elt(Dn+1));break}else Re=xe}var ze=_e.selection.first();ze!==null&&_e.scrollToRect(ze.actualBounds)}},fi.prototype._sortTreeChildrenByY=function(_e){var Re=new go.List().addAll(_e.findTreeChildrenNodes());return Re.sort(function(Ue,gi){var xe=Ue.location,Hi=gi.location;return xe.y<Hi.y?-1:xe.y>Hi.y?1:xe.x<Hi.x?-1:xe.x>Hi.x?1:0}),Re},fi.prototype.copyToClipboard=function(_e){go.CommandHandler.prototype.copyToClipboard.call(this,_e),this._lastPasteOffset.set(this.pasteOffset)},fi.prototype.pasteFromClipboard=function(){var _e=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(_e,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),_e},Object.defineProperty(fi.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(_e){if(_e!=="move"&&_e!=="select"&&_e!=="scroll"&&_e!=="tree"&&_e!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+_e);this._arrowKeyBehavior=_e}}),Object.defineProperty(fi.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(_e){if(!(_e instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+_e);this._pasteOffset.set(_e)}});var Pi=fi,jt=Qt(74042),Mt=Qt(5269),mt=Qt(52430),vt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Lt=Qt(64681),Bt=Qt(59301),_t=(_e,Re,Ue)=>new Promise((gi,xe)=>{var Hi=Ve=>{try{Ai(Ue.next(Ve))}catch(ze){xe(ze)}},Dn=Ve=>{try{Ai(Ue.throw(Ve))}catch(ze){xe(ze)}},Ai=Ve=>Ve.done?gi(Ve.value):Promise.resolve(Ve.value).then(Hi,Dn);Ai((Ue=Ue.apply(_e,Re)).next())});function Me({onCancel:_e,callback:Re}){let Ue=(0,Pt.useRef)(),gi=(0,Pt.useRef)(),xe=(0,Pt.useRef)(),Hi=(0,Pt.useRef)(!1);const Dn=(0,Pt.useRef)(!1),[Ai,Ve]=(0,Pt.useState)(0);function ze(){const he=Le.bx.make,an={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 Le.S0(gi.current,{padding:20,grid:he(Le.s_,"Grid",he(Le.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),he(Le.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:oi=>{var Ci=oi.diagram.commandHandler.addTopLevelParts(oi.diagram.selection,!0);Ci||oi.diagram.currentTool.doCancel()},commandHandler:he(Pi),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:oi=>{var Ci=oi.subject;Ci.location=Ci.location.copy().snapToGridPoint(oi.diagram.grid.gridOrigin,oi.diagram.grid.gridCellSize),setTimeout(()=>{oi.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:oi=>{var Ci=oi.subject;setTimeout(()=>{oi.diagram.commandHandler.editTextBlock()})},LinkRelinked:oi=>{var Ci=oi.parameter.part;Ci.invalidateConnectedLinks();var bi=oi.subject;oi.diagram.toolManager.linkingTool.isForwards?bi.toNode.invalidateConnectedLinks():bi.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Ue.current.nodeTemplate=he(Le.NB,"Auto",{locationSpot:Le.z6.Center,locationObjectName:"SHAPE",desiredSize:new Le.$u(120,60),minSize:new Le.$u(40,40),resizable:!0,resizeCellSize:new Le.$u(10,10),rotatable:!0},new Le.KX("location","loc",Le.E9.parse).makeTwoWay(Le.E9.stringify),new Le.KX("desiredSize","size",Le.$u.parse).makeTwoWay(Le.$u.stringify),he(Le.bn,{name:"SHAPE",fill:an.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Le.z6.AllSides,toSpot:Le.z6.AllSides},new Le.KX("figure"),new Le.KX("fill"),new Le.KX("stroke","borderColor"),new Le.KX("strokeWidth","thickness"),new Le.KX("strokeDashArray","dash")),he(Le.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),he(Le.al,{margin:1,textAlign:"center",overflow:Le.al.OverflowEllipsis,editable:!0},new Le.KX("text").makeTwoWay(),new Le.KX("stroke","color"))),Ue.current.nodeTemplate.toolTip=he("ToolTip",he(Le.s_,"Vertical",{maxSize:new Le.$u(200,NaN)},he(Le.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Le.KX("text")),he(Le.al,{font:"10pt sans-serif",textAlign:"center"},new Le.KX("text","details"))));function Yn(oi,Ci){var bi=(xi,Ei)=>{xi.handled=!0,xi.diagram.model.commit(Yi=>{var sr=Ei.part.adornedPart,oe=new Le.E9().setRectSpot(sr.actualBounds,oi);oe.subtract(sr.location),oe.scale(2,2),oe.x+=Math.sign(oe.x)*130,oe.y+=Math.sign(oe.y)*130,oe.add(sr.location),oe.snapToGridPoint(xi.diagram.grid.gridOrigin,xi.diagram.grid.gridCellSize);var ae=Yi.copyNodeData(sr.data);Yi.setGroupKeyForNodeData(ae,Yi.getGroupKeyForNodeData(sr.data)),Yi.addNodeData(ae);var ee={from:sr.key,to:Yi.getKeyForNodeData(ae)};Yi.addLinkData(ee);var je=xi.diagram.findNodeForData(ae);je.location=oe,xi.diagram.select(je),setTimeout(()=>{xi.diagram.commandHandler.editTextBlock()},20)})};return he(Le.bn,{figure:Ci,alignment:oi,alignmentFocus:oi.opposite(),width:oi.equals(Le.z6.Top)||oi.equals(Le.z6.Bottom)?25:18,height:oi.equals(Le.z6.Top)||oi.equals(Le.z6.Bottom)?18:25,fill:"orange",stroke:an.white,strokeWidth:4,mouseEnter:(xi,Ei)=>Ei.fill="dodgerblue",mouseLeave:(xi,Ei)=>Ei.fill="orange",isActionable:!0,click:bi,contextClick:bi})}function vi(oi){return he(Le.bn,{fill:"orange",stroke:"rgba(0, 0, 0, 0)",strokeWidth:15,background:"transparent",geometryString:"F1 M0 0 b 0 360 -4 0 4 z M10 0 b 0 360 -4 0 4 z M20 0 b 0 360 -4 0 4",isActionable:!0,cursor:"context-menu",mouseEnter:(Ci,bi)=>bi.fill="dodgerblue",mouseLeave:(Ci,bi)=>bi.fill="orange",click:(Ci,bi)=>{Ci.diagram.commandHandler.showContextMenu(bi.part.adornedPart)}},oi||{})}Ue.current.nodeTemplate.selectionAdornmentTemplate=he(Le.uz,"Spot",he(Le.Vm,{padding:10}),Yn(Le.z6.Top,"TriangleUp"),Yn(Le.z6.Left,"TriangleLeft"),Yn(Le.z6.Right,"TriangleRight"),Yn(Le.z6.Bottom,"TriangleDown"),vi({alignment:new Le.z6(.75,0)}));function ln(oi,Ci){return(bi,xi)=>{bi.handled=!0,bi.diagram.model.commit(Ei=>{Ei.set(xi.part.adornedPart.data,oi,Ci)})}}function qn(oi,Ci){return Ci||(Ci="color"),he(Le.bn,{width:16,height:16,stroke:"lightgray",fill:oi,margin:1,background:"transparent",mouseEnter:(bi,xi)=>xi.stroke="dodgerblue",mouseLeave:(bi,xi)=>xi.stroke="lightgray",click:ln(Ci,oi),contextClick:ln(Ci,oi)})}function li(){return[he("ContextMenuButton",he(Le.s_,"Horizontal",qn(an.white,"fill"),qn(an.beige,"fill"),qn(an.extralightblue,"fill"),qn(an.extralightred,"fill"))),he("ContextMenuButton",he(Le.s_,"Horizontal",qn(an.lightgray,"fill"),qn(an.lightgreen,"fill"),qn(an.lightblue,"fill"),qn(an.lightred,"fill")))]}function Xe(){return[he("ContextMenuButton",he(Le.s_,"Horizontal",qn(an.black),qn(an.green),qn(an.blue),qn(an.red))),he("ContextMenuButton",he(Le.s_,"Horizontal",qn(an.white),qn(an.magenta),qn(an.purple),qn(an.orange)))]}function sn(oi,Ci){return Ci||(Ci="thickness"),he(Le.bn,"LineH",{width:16,height:16,strokeWidth:oi,margin:1,background:"transparent",mouseEnter:(bi,xi)=>xi.background="dodgerblue",mouseLeave:(bi,xi)=>xi.background="transparent",click:ln(Ci,oi),contextClick:ln(Ci,oi)})}function wn(oi,Ci){return Ci||(Ci="dash"),he(Le.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:oi,margin:1,background:"transparent",mouseEnter:(bi,xi)=>xi.background="dodgerblue",mouseLeave:(bi,xi)=>xi.background="transparent",click:ln(Ci,oi),contextClick:ln(Ci,oi)})}function Mn(){return[he("ContextMenuButton",he(Le.s_,"Horizontal",sn(1),sn(2),sn(3),sn(4))),he("ContextMenuButton",he(Le.s_,"Horizontal",wn(null),wn([2,4]),wn([4,4])))]}function ii(oi,Ci){return Ci||(Ci="figure"),he(Le.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:oi,margin:1,background:"transparent",mouseEnter:(bi,xi)=>xi.fill="dodgerblue",mouseLeave:(bi,xi)=>xi.fill="lightgray",click:ln(Ci,oi),contextClick:ln(Ci,oi)})}Ue.current.nodeTemplate.contextMenu=he("ContextMenu",he("ContextMenuButton",he(Le.s_,"Horizontal",ii("Rectangle"),ii("RoundedRectangle"),ii("Ellipse"),ii("Diamond"))),he("ContextMenuButton",he(Le.s_,"Horizontal",ii("Parallelogram2"),ii("ManualOperation"),ii("Procedure"),ii("Cylinder1"))),he("ContextMenuButton",he(Le.s_,"Horizontal",ii("Terminator"),ii("CreateRequest"),ii("Document"),ii("TriangleDown"))),li(),Xe(),Mn()),Ue.current.groupTemplate=he(Le.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Le.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(oi,Ci)=>{var bi=Ci.addMembers(Ci.diagram.selection,!0);bi||Ci.diagram.currentTool.doCancel()},avoidable:!1},new Le.KX("location","loc",Le.E9.parse).makeTwoWay(Le.E9.stringify),he(Le.s_,"Auto",{name:"BODY"},he(Le.bn,{parameter1:10,fill:an.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Le.z6.AllSides,toSpot:Le.z6.AllSides},new Le.KX("fill"),new Le.KX("stroke","color"),new Le.KX("strokeWidth","thickness"),new Le.KX("strokeDashArray","dash")),he(Le.Vm,{background:"transparent",margin:20})),he(Le.al,{alignment:Le.z6.Top,alignmentFocus:Le.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new Le.KX("text"),new Le.KX("stroke","color"))),Ue.current.groupTemplate.selectionAdornmentTemplate=he(Le.uz,"Spot",he(Le.s_,"Auto",he(Le.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),he(Le.Vm,{margin:1.5})),vi({alignment:Le.z6.TopRight,alignmentFocus:Le.z6.BottomRight})),Ue.current.groupTemplate.contextMenu=he("ContextMenu",li(),Xe(),Mn()),Ue.current.linkTemplate=he(Le.rU,{layerName:"Foreground",routing:Le.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new Le.KX("fromSpot","fromSpot",Le.z6.parse),new Le.KX("toSpot","toSpot",Le.z6.parse),new Le.KX("fromShortLength","dir",oi=>oi>=1?10:0),new Le.KX("toShortLength","dir",oi=>oi>=1?10:0),new Le.KX("points").makeTwoWay(),he(Le.bn,{strokeWidth:2},new Le.KX("stroke","color"),new Le.KX("strokeWidth","thickness"),new Le.KX("strokeDashArray","dash")),he(Le.bn,{segmentIndex:0,segmentOffset:new Le.E9(15,0),segmentOrientation:Le.rU.OrientAlong,alignmentFocus:Le.z6.Right,figure:"circle",width:10,strokeWidth:0},new Le.KX("fill","color"),new Le.KX("visible","dir",oi=>oi===1)),he(Le.bn,{segmentIndex:-1,segmentOffset:new Le.E9(-10,6),segmentOrientation:Le.rU.OrientPlus90,alignmentFocus:Le.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Le.KX("fill","color"),new Le.KX("visible","dir",oi=>oi>=1),new Le.KX("width","thickness",oi=>7+3*oi),new Le.KX("height","thickness",oi=>7+3*oi),new Le.KX("segmentOffset","thickness",oi=>new Le.E9(-15,4+1.5*oi))),he(Le.bn,{segmentIndex:0,segmentOffset:new Le.E9(15,-6),segmentOrientation:Le.rU.OrientMinus90,alignmentFocus:Le.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Le.KX("fill","color"),new Le.KX("visible","dir",oi=>oi===2),new Le.KX("width","thickness",oi=>7+3*oi),new Le.KX("height","thickness",oi=>7+3*oi),new Le.KX("segmentOffset","thickness",oi=>new Le.E9(-15,4+1.5*oi))),he(Le.al,{alignmentFocus:new Le.z6(0,1,-4,0),editable:!0},new Le.KX("text").makeTwoWay(),new Le.KX("stroke","color"))),Ue.current.linkTemplate.selectionAdornmentTemplate=he(Le.uz,he(Le.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:_i(2)},new Le.KX("pathPattern","thickness",_i)),vi({alignmentFocus:new Le.z6(0,0,-6,-4)}));function _i(oi){return he(Le.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(oi+4).toString()+" H3"})}function Ki(oi){var Ci="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return oi===0?Ci="M0 0 M16 16 M0 8 L16 8":oi===2&&(Ci="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),he(Le.bn,{geometryString:Ci,margin:2,background:"transparent",mouseEnter:(bi,xi)=>xi.background="dodgerblue",mouseLeave:(bi,xi)=>xi.background="transparent",click:ln("dir",oi),contextClick:ln("dir",oi)})}function Ti(oi){var Ci=(bi,xi)=>{bi.handled=!0,bi.diagram.model.commit(Ei=>{var Yi=xi.part.adornedPart;Ei.set(Yi.data,oi?"toSpot":"fromSpot",Le.z6.stringify(Le.z6.AllSides)),(oi?Yi.toNode:Yi.fromNode).invalidateConnectedLinks()})};return he(Le.bn,{width:12,height:12,fill:"transparent",mouseEnter:(bi,xi)=>xi.background="dodgerblue",mouseLeave:(bi,xi)=>xi.background="transparent",click:Ci,contextClick:Ci})}function en(oi,Ci){var bi=0,xi=Le.z6.RightSide;oi.equals(Le.z6.Top)?(bi=270,xi=Le.z6.TopSide):oi.equals(Le.z6.Left)?(bi=180,xi=Le.z6.LeftSide):oi.equals(Le.z6.Bottom)&&(bi=90,xi=Le.z6.BottomSide),Ci||(bi-=180);var Ei=(Yi,sr)=>{Yi.handled=!0,Yi.diagram.model.commit(oe=>{var ae=sr.part.adornedPart;oe.set(ae.data,Ci?"toSpot":"fromSpot",Le.z6.stringify(xi)),(Ci?ae.toNode:ae.fromNode).invalidateConnectedLinks()})};return he(Le.bn,{alignment:oi,alignmentFocus:oi.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:bi,background:"transparent",mouseEnter:(Yi,sr)=>sr.background="dodgerblue",mouseLeave:(Yi,sr)=>sr.background="transparent",click:Ei,contextClick:Ei})}Ue.current.linkTemplate.contextMenu=he("ContextMenu",Xe(),Mn(),he("ContextMenuButton",he(Le.s_,"Horizontal",Ki(0),Ki(1),Ki(2))),he("ContextMenuButton",he(Le.s_,"Horizontal",he(Le.s_,"Spot",Ti(!1),en(Le.z6.Top,!1),en(Le.z6.Left,!1),en(Le.z6.Right,!1),en(Le.z6.Bottom,!1)),he(Le.s_,"Spot",{margin:new Le.Zt(0,0,0,2)},Ti(!0),en(Le.z6.Top,!0),en(Le.z6.Left,!0),en(Le.z6.Right,!0),en(Le.z6.Bottom,!0)))));const Lr=`{ "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 Ur(oi){return console.log("shapeName:",oi),cr.indexOf(oi)>=0}var rn=new Le.YI(xe.current,{maxSelectionCount:1,linkTemplate:he(Le.rU,{locationSpot:Le.z6.Center,selectionAdornmentTemplate:he(Le.uz,"Link",{locationSpot:Le.z6.Center},he(Le.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),he(Le.bn,{toArrow:"Standard",stroke:null}))},{routing:Le.rU.AvoidsNodes,curve:Le.rU.JumpOver,corner:5,toShortLength:4},new Le.KX("points"),he(Le.bn,{isPanelMain:!0,strokeWidth:2}),he(Le.bn,{toArrow:"Standard",stroke:null})),model:new Le.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...Le.bn.getFigureGenerators().toArray().map(oi=>({text:"\u672A\u547D\u540D",size:"100 100",figure:oi.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Ue.current.addDiagramListener("TextEdited",function(oi){var Ci;const bi=oi.subject.part;var xi=(Ci=document.activeElement)==null?void 0:Ci.value;typeof xi=="string"&&xi.trim()===""&&Ue.current.model.commit(function(Ei){Ei.set(bi.data,"text","\u672A\u547D\u540D"),Ue.current.commandHandler.stopCommand()},"increment")}),rn.nodeTemplate=he(Le.NB,"Auto",{locationSpot:Le.z6.Center},new Le.KX("location","location",Le.E9.parse).makeTwoWay(Le.E9.stringify),he(Le.bn,"Circle",{fill:"white",stroke:"gray",strokeWidth:2,width:20,height:20,portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromLinkableSelfNode:!0,toLinkableSelfNode:!0},new Le.KX("stroke").makeTwoWay(),new Le.KX("fill").makeTwoWay(),new Le.KX("figure")),he(Le.al,{margin:new Le.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new Le.$u(16,16),maxSize:new Le.$u(10,NaN),textAlign:"center",editable:!0},new Le.KX("key").makeTwoWay())),setTimeout(()=>{Ue.current.grid=he(Le.s_,"Grid",he(Le.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),he(Le.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 ai=()=>_t(this,null,function*(){var he,an=Ue.current.makeImage();const Yn=yield(0,mt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:an.src,file_data:JSON.stringify({login:(he=(0,Lt.eY)())==null?void 0:he.login,data:JSON.parse(Ue.current.model.toJson())})}});Re({src:Yn.url})});return(0,Pt.useEffect)(()=>(setTimeout(()=>{ze()},500),Ve(Ai+1),()=>{Ue.current=null}),[]),Bt.createElement("div",{ref:Dn,className:"body-overflow-initial"},Bt.createElement(Zn.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(Mt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Bt.createElement(Mt.Z,{onClick:()=>{var he,an,Yn=Ue.current.selection.first();if(Hi.current=!Hi.current,document.activeElement&&Yn){let vi=(an=(he=document.activeElement)==null?void 0:he.value)==null?void 0:an.trim();typeof vi=="string"&&Ue.current.model.commit(function(ln){ln.set(Yn.data,"text",vi||"\u672A\u547D\u540D"),Ue.current.commandHandler.stopCommand()},"increment")}Ve(Ai+1)}},Bt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:_e},Bt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:Hi.current?"none":"block"},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:xe})),Bt.createElement("div",{style:{flex:1,position:"relative"}},Bt.createElement("div",{ref:gi,style:{height:"80vh"}}))),Bt.createElement("div",{className:"tr"},Bt.createElement(ge.ZP,{size:"large",onClick:ai,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var ye=Me,Ye=Qt(47889),Fe=Qt(71051);const Te=Ye.ZP.Group,Oe={margin:"0 8px"};var $e=({callback:_e,onCancel:Re})=>{function Ue(gi){_e(gi)}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:Oe},"\u5355\u5143\u683C\u6570\uFF1A"),Pt.createElement("span",{style:Oe},"\u884C\u6570"),Pt.createElement($t.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},Pt.createElement(Fe.Z,null)),Pt.createElement("span",{style:Oe},"\u5217\u6570"),Pt.createElement($t.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},Pt.createElement(Fe.Z,null))),Pt.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},Pt.createElement("span",{style:Oe},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),Pt.createElement($t.default.Item,{name:"align"},Pt.createElement(Te,null,Pt.createElement(Ye.ZP,{value:"default"},Pt.createElement("i",{className:"fa fa-align-justify"})),Pt.createElement(Ye.ZP,{value:"left"},Pt.createElement("i",{className:"fa fa-align-left"})),Pt.createElement(Ye.ZP,{value:"center"},Pt.createElement("i",{className:"fa fa-align-center"})),Pt.createElement(Ye.ZP,{value:"right"},Pt.createElement("i",{className:"fa fa-align-right"}))))),Pt.createElement("div",{className:"flex-container flex-end"},Pt.createElement(ge.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Pt.createElement(ge.ZP,{type:"ghost",onClick:Re},"\u53D6\u6D88")))},yn=Qt(71411),Kn=Qt(84072),Sn=Qt.n(Kn),ci=(0,Pt.forwardRef)(({use3d:_e,width:Re,height:Ue,callback:gi,showSaveButton:xe},Hi)=>{const Dn=(0,Pt.useRef)(),Ai=(0,Pt.useRef)(),[Ve,ze]=(0,Pt.useState)(!1),ai=(0,Pt.useRef)({id:Dn,appName:"graphing",width:Re||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(Sn())(ai.current,!0),window.onload=function(){Ai.current.inject("applet_container")}},[]);const he=()=>{var an=window.ggbApplet.getPNGBase64(1,!0,72);return gi&&gi(an),an};return(0,Pt.useEffect)(()=>{ai.current.appName=Ve?"3D":"graphing",Ai.current.inject("applet_container")},[Ve]),(0,Pt.useEffect)(()=>{ze(_e)},[_e]),(0,Pt.useImperativeHandle)(Hi,()=>({getImgData:he})),Pt.createElement(Pt.Fragment,null,Pt.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Dn}),Pt.createElement(si.Z,{align:"middle"},Pt.createElement(Mt.Z,{flex:1},Pt.createElement(yn.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Ve,onChange:an=>ze(an)})),Pt.createElement(Mt.Z,null,Pt.createElement(ge.ZP,{size:"large",onClick:he,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),mi=Qt(53267),Mi=Qt(6767);const yr="link",ki="upload-image",Ri="add-flowchart",Vi="draw-image",Or="add-flowchart",qi="code-block",Cr="add-table",xr="------------",Wr={default:xr,left:`:${xr}`,center:`:${xr}:`,right:`${xr}:`};var $i=Qt(47458);function eo(){}let fo=0;const Zr=1e4,Fr="\u2581",ro="@\u2581\u2581@",Tt="@\u2581@",Gi=`
**\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`,Zi=["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 Yr(_e){return/^\d+$/.test(_e)?`${_e}px`:_e}const ko=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",$o={[ko+"-B"]:"bold",[ko+"-I"]:"italic"},Xi={[yr]:"\u6DFB\u52A0\u94FE\u63A5",[qi]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[ki]:"\u6DFB\u52A0\u56FE\u7247",[Vi]:"\u6DFB\u52A0\u753B\u56FE",[Ri]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Cr]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Ni=({defaultValue:_e="",onChange:Re,width:Ue="100%",height:gi=400,miniToolbar:xe=!1,isFocus:Hi=!1,watch:Dn,insertTemp:Ai,mode:Ve="markdown",id:ze="markdown-editor-id",showResizeBar:ai=!1,noStorage:he=!1,showNullButton:an=!1,showNullProgramButton:Yn=!1,hidetoolBar:vi=!1,fullScreen:ln=!1,onBlur:qn,onCMBeforeChange:li,onFullScreen:Xe,className:sn="",disablePaste:wn=!1,disabled:Mn=!1,disabledFill:ii=!1,placeholder:_i="",values:Ki="",extraUse:Ti})=>{const[en,Lr]=(0,Pt.useState)(null),[cr,Ur]=(0,Pt.useState)(_e),[rn,oi]=(0,Pt.useState)(Dn),[Ci,bi]=(0,Pt.useState)(ln),[xi,Ei]=(0,Pt.useState)(""),[Yi,sr]=(0,Pt.useState)(0),[oe,ae]=(0,Pt.useState)(gi),[ee,je]=(0,Pt.useState)(!1),[Se,An]=(0,Pt.useState)(0),[Nn,Vn]=(0,Pt.useState)(0),Qi=(0,Pt.useRef)(),Si=(0,Pt.useRef)(),Ne=(0,Pt.useRef)(),wi=(0,Pt.useRef)();(0,Pt.useEffect)(()=>{const zn=window.scrollY||window.pageYOffset;Ur(Ki),en==null||en.setValue(Ki),window.scrollTo(0,zn)},[Ki]),(0,Pt.useEffect)(()=>{Xe==null||Xe(Ci)},[Ci]),(0,Pt.useEffect)(()=>{if(Qi.current){let zn=function(cn,ti){var Di;if(wn){ti.preventDefault();return}const ir=ti.clipboardData;if(ir){const Ji=ir.types.toString(),fr=ir.items;if(Ji==="Files"||ir.types.indexOf("Files")>-1){if(ti.preventDefault(),Ve=="stex")return;try{let dr=fr[1];((Di=fr[0])==null?void 0:Di.kind)==="file"&&(dr=fr[0]);const Er=dr.getAsFile(),Gr=Er.name.split(".").pop();(0,un.I)(Er,Tr=>{var oo,He,gr;Tr.id?((oo=Er==null?void 0:Er.type)==null?void 0:oo.indexOf("image"))>-1?Xn.replaceSelection(`<img width="100%" src="/api/attachments/${Tr.id}?type=${Tr.content_type})" alt="" />`):((He=Er==null?void 0:Er.type)==null?void 0:He.indexOf("video"))>-1?Xn.replaceSelection(`<video width="100%" controls src="/api/attachments/${Tr.id}"></video>`):((gr=Er==null?void 0:Er.type)==null?void 0:gr.indexOf("pdf"))>-1?Xn.replaceSelection(`<a href="/api/attachments/${Tr.id}?type=${Er.type}&disposition=inline" target="_blank">${Er.name}</a>`):Zi.includes(Gr)?Xn.replaceSelection(`<a href="/api/attachments/${Tr.id}?type=office&disposition=inline" target="_blank">${Er.name}</a>`):Xn.replaceSelection(`[${Er.name}](/api/attachments/${Tr.id}?type=${Tr.content_type})`):(Tr==null?void 0:Tr.status)===401&&(document.location.href="/user/login")})}catch(dr){Mi.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Xn=Ae().fromTextArea(Qi.current,{mode:Ve,lineNumbers:!xe,lineWrapping:!0,value:_e,autoCloseTags:!0,autoCloseBrackets:!0});return Xn.on("keyup",function(cn,ti){ti.keyCode===8&&(cn.getValue()==""?Xn.setOption("placeholder",_i):Xn.setOption("placeholder",null))}),Xn.on("keydown",function(cn,ti){if(ti.keyCode===8){var Di=hn(cn);Di&&ti.preventDefault()}}),Hi&&Xn.focus(),Xn.on("paste",zn),Mn&&Xn.on("beforeChange",function(cn,ti){(ti.origin==="paste"||ti.origin==="+input")&&ti.cancel()}),Lr(Xn),()=>{Xn.off("paste",zn)}}},[]);const ke=(0,Pt.useCallback)(()=>{if(Si.current)try{}catch(zn){console.log(zn,"---- to set md editor body height")}},[oe,Si,Ci]);(0,Pt.useEffect)(()=>{function zn(){let Xn=new Be.Z(cn=>{for(let ti of cn)(ti.target.offsetHeight>0||ti.target.offsetWidth>0)&&(ke(),en.setSize("100%","100%"),en.refresh())});return Xn.observe(Qi.current.parentElement),Xn}if(en){const Xn=zn();return()=>{var cn,ti;(cn=Qi.current)!=null&&cn.parentElement&&Xn.unobserve((ti=Qi.current)==null?void 0:ti.parentElement)}}},[en,ke]),(0,Pt.useEffect)(()=>{if(en){let zn=[];for(const[Xn,cn]of Object.entries($o)){let ti={[Xn]:()=>{Qe(cn)}};zn.push(ti),en.addKeyMap(ti)}return()=>{for(let Xn of zn)en.removeKeyMap(Xn)}}},[en]),(0,Pt.useEffect)(()=>{ln!==Ci&&bi(ln)},[ln]),(0,$i.Z)(()=>{if(!he&&Yi>0){let zn=new Date().getTime(),Xn=window.sessionStorage.getItem(ze);zn>=Yi+Zr&&(!Xn||Xn!==cr)&&(window.sessionStorage.setItem(ze,cr),je(!0))}},Zr),(0,Pt.useEffect)(()=>{oi(Dn)},[en,Dn]),(0,Pt.useEffect)(()=>{en&&Hi&&en.focus()},[en,Hi]),(0,Pt.useEffect)(()=>{if(rn&&en){let zn=function(cn){let ti=cn.target;if(wi.current){let Di=ti.scrollTop/ti.scrollHeight;wi.current.scrollTop=wi.current.scrollHeight*Di}};const Xn=en.getScrollerElement();return Xn.addEventListener("scroll",zn),()=>{Xn.removeEventListener("scroll",zn)}}},[en,rn]),(0,Pt.useEffect)(()=>{if(en&&li){let zn=function(Xn,cn){li(Xn,cn)};return en.on("beforeChange",zn),()=>{en.off("beforeChange",zn)}}},[en,li]),(0,Pt.useEffect)(()=>{if(en&&qn){let zn=function(){qn(en.getValue())};return en.on("blur",zn),()=>{en.off("blur",zn)}}},[en,qn]);function hn(zn,Xn){var cn=zn.getDoc(),ti=cn.getCursor(),Di=cn.getLine(ti.line),ir=Di.charAt(ti.ch-1),Ji=Di.lastIndexOf("@\u2581@",ti.ch),fr=Di.lastIndexOf("@\u2581\u2581@",ti.ch),dr=Ji>fr?Ji:fr,Er=Ji>fr?3:4;if(ro.indexOf(ir)===-1)return null;if(console.log("change1:",Xn,zn,Di,ti,dr,Ji,fr,ir),dr>=0&&ti.ch-dr<5){var Gr=dr+Er;return cn.replaceRange("",{line:ti.line,ch:dr},{line:ti.line,ch:Gr}),{line:ti.line,ch:Gr}}return null}(0,Pt.useEffect)(()=>{if(en){let zn=function(Xn,cn){const ti=Xn.getValue();Ur(ti),sr(new Date().getTime()),Xn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Re&&(Yn?Re(ti,tn(ti)):Re(ti))};return en.on("change",zn),()=>{en.off("change",zn)}}},[en,Re]),(0,Pt.useEffect)(()=>{if(en)if(_e==null)en.setValue(""),Ur("");else{const zn=window.scrollY||window.pageYOffset;_e!==en.getValue()&&(en.setValue(_e),Ur(_e),en.setCursor(Mn?1:en.lineCount(),0),window.scrollTo(0,zn))}},[en,_e]);const Qe=(0,Pt.useCallback)(zn=>{const Xn=en.getCursor(),cn=en.getSelection();let ti=cn.split(`
`);switch(zn){case"bold":return en.replaceSelection("**"+cn+"**"),cn===""&&en.setCursor(Xn.line,Xn.ch+2),en.focus();case"italic":return en.replaceSelection("*"+cn+"*"),cn===""&&en.setCursor(Xn.line,Xn.ch+1),en.focus();case"code":return en.replaceSelection("`"+cn+"`"),cn===""&&en.setCursor(Xn.line,Xn.ch+1),en.focus();case"inline-latex":return Ei("inline-latex"),en.focus();case"latex":return en.replaceSelection("```latex\n"+cn+"\n```"),en.setCursor(Xn.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(ti.map(Di=>Di===""?"":`- ${Di}`).join(`
`)),en.focus();case"list-ol":return cn===""?en.replaceSelection("1. "+cn):en.replaceSelection(ti.map((Di,ir)=>Di===""?"":`${ir+1}. ${Di}`).join(`
`)),en.focus();case"add-null-ch":return cn===""&&en.setCursor(Xn.line,Xn.ch),en.replaceSelection(Fr),en.focus();case"add-signal":return cn===""&&en.setCursor(Xn.line,Xn.ch),en.replaceSelection(Tt),en.focus();case"add-multiple":return cn===""&&en.setCursor(Xn.line,Xn.ch),en.replaceSelection(ro),en.focus();case"inster-template-1":return cn===""&&en.setCursor(Xn.line,Xn.ch),en.replaceSelection(Gi),en.focus();case"eraser":return en.setValue(""),en.focus();case"trigger-watch":return oi(!rn),en.focus();case"trigger-full-screen":return bi(!Ci),en.focus();case yr:Ei(yr);return;case qi:Ei(qi);return;case ki:Ei(ki);return;case Vi:Ei(Vi);return;case"maths-latex":Ei("maths-latex");return;case Ri:Ei(Ri);return;case Cr:Ei(Cr);return;default:throw new Error}},[en,rn,Ci]),Ut=(0,Pt.useCallback)((zn,Xn)=>{var cn,ti,Di,ir,Ji,fr;switch(Ei(""),xi){case yr:const{title:oo,link:He}=zn;return en.replaceSelection(`[${oo}](${He})`),en.focus();case qi:const{language:gr,content:Dr}=zn;return en.replaceSelection(["```"+gr,Dr,"```"].join(`
`)),en.focus();case"maths-latex":for(var dr=atob(zn),Er=new Uint8Array(dr.length),Gr=0;Gr<dr.length;Gr++)Er[Gr]=dr.charCodeAt(Gr);var Tr=new Blob([Er],{type:"image/png"});(0,un.I)(Tr,ls=>{ls.id?en.replaceSelection(`![,](/api/attachments/${ls.id}?type=${ls.content_type})`):(ls==null?void 0:ls.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":en.replaceSelection("`$$"+zn+"$$`");break;case ki:case Vi:case Or:const{src:nr,alt:Qr}=zn,ar=Xn,vo=(Di=(ti=(cn=ar==null?void 0:ar.name)==null?void 0:cn.split("."))==null?void 0:ti.pop)==null?void 0:Di.call(ti);return((ir=ar==null?void 0:ar.type)==null?void 0:ir.indexOf("image"))>-1||!(ar!=null&&ar.type)?ar!=null&&ar.align||ar!=null&&ar.width?en.replaceSelection(`<p style="text-align:${ar.align||"initial"}"><img width="${ar.width?ar.width+"%":"initial"}" src="${nr}" alt="${Qr||""}" /></p>`):en.replaceSelection(`<img width="100%" src="${nr}" alt="${Qr||""}" />`):((Ji=ar==null?void 0:ar.type)==null?void 0:Ji.indexOf("video"))>-1?en.replaceSelection(`<video width="100%" controls src="${nr}"></video>`):((fr=ar==null?void 0:ar.type)==null?void 0:fr.indexOf("pdf"))>-1?en.replaceSelection(`<a href="${nr}?type=${ar.type}&disposition=inline" target="_blank">${ar.name}</a>`):Zi.includes(vo)?en.replaceSelection(`<a href="${nr}?type=office&disposition=inline" target="_blank">${ar.name}</a>`):en.replaceSelection(`[${ar.name}](${nr})`),en.focus();case Cr:const{row:Jr,col:Nr,align:co}=zn;let ks=`
`;for(let ls=0;ls<Jr;ls++){let la=[],Is=[];for(let lr=0;lr<Nr;lr++)ls===1&&Is.push(Wr[co]),la.push(" ");ls===1&&(ks+=`| ${Is.join(" | ")} |
`),ks+=`| ${la.join(Nr===1?"":" | ")} |
`}return en.replaceSelection(ks+`
`),en.focus();default:throw new Error}},[en,xi]),pn=(0,Pt.useMemo)(()=>{switch(xi){case yr:return Pt.createElement(pi,{callback:Ut,onCancel:fn});case qi:return Pt.createElement(Wn.Z,{callback:Ut,onCancel:fn});case ki:return Pt.createElement(un.Z,{callback:Ut,onCancel:fn});case Ri:return Pt.createElement(ye,{callback:Ut,onCancel:fn});case Cr:return Pt.createElement($e,{callback:Ut,onCancel:fn});case"maths-latex":return Pt.createElement(ci,{showSaveButton:!0,callback:Ut});case"inline-latex":return Pt.createElement(mi.Z,{showSaveButton:!0,callback:Ut});default:return null}},[xi]);function fn(){Ei("")}(0,Pt.useEffect)(()=>{if(Ne.current){let zn=function(Ji){Di=!0,ir=Ji.pageY},Xn=function(){Di=!1},cn=function(Ji){if(Di){let fr=Ji.pageY-ir;fr<0&&(fr=0),fr>300&&(fr=300);let dr=gi+fr+"px";ae(dr)}},ti=Ne.current,Di=!1,ir=0;return ti.addEventListener("mousedown",zn),document.addEventListener("mousemove",cn),document.addEventListener("mouseup",Xn),()=>{ti.removeEventListener("mousedown",zn),document.removeEventListener("mousemove",cn),document.removeEventListener("mouseup",Xn)}}},[en,Ne]),(0,Pt.useEffect)(()=>{ae(gi)},[gi]);const Qn=Yr(Ue),Gn=Yr(oe),jn={width:Qn,height:Gn},dn=(0,Pt.useMemo)(()=>{if(Yi){let zn=new Date(Yi),Xn=zn.getHours(),cn=zn.getMinutes(),ti=zn.getSeconds();return Xn=Xn<10?"0"+Xn:Xn,cn=cn<10?"0"+cn:cn,ti=ti<10?"0"+ti:ti,`${Xn}:${cn}:${ti}`}return 0},[Yi]),tn=zn=>{const Xn=[];if(Yn){let cn=-1;zn=zn.replace(/(@▁▁@|@▁@)/g,function(ti,Di,ir){Xn.push({multiLine:ti!==Tt})})}return Xn};function gn(){window.sessionStorage.removeItem(ze),je(!1),sr(0)}function mn(){je(!1),sr(0),en.setValue(window.sessionStorage.getItem(ze))}(0,Pt.useEffect)(()=>{Xi[xi]&&xi!==Vi&&xi!==Ri&&setTimeout(()=>{const zn=document.getElementsByClassName("markdown-popup-form")[0],Xn=window.innerWidth/2-zn.offsetWidth/2,cn=window.innerHeight/2-zn.offsetHeight/2;An(Xn),Vn(cn)},0)},[xi]);const xn=zn=>{zn.preventDefault();const Xn=zn.clientX-Se,cn=zn.clientY-Nn;document.body.onmousemove=ti=>{let Di=ti.clientX-Xn,ir=ti.clientY-cn;const Ji=document.getElementsByClassName("markdown-popup-form")[0],fr=window.innerWidth-Ji.offsetWidth,dr=window.innerHeight-Ji.offsetHeight;Di=Math.max(0,Math.min(Di,fr)),ir=Math.max(0,Math.min(ir,dr)),hi(ti.clientX,ti.clientY,Xn,cn)&&(An(Di),Vn(ir))},document.body.onmouseup=function(){document.body.onmousemove=null}},hi=(zn,Xn,cn,ti)=>{const Di=document.body.clientHeight,ir=document.body.clientWidth;return zn<20&&cn>zn||zn>ir-20&&cn<zn||Xn<20&&ti>Xn||Xn>Di-20&&ti<Xn?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return Pt.createElement(Pt.Fragment,null,Pt.createElement("div",{className:"markdown-editor-wrapper",ref:Si},Pt.createElement("div",{className:`markdown-editor-container ${sn} ${rn?"on-preview":""} ${xe?"mini":""} ${Ci?"full-screen":""}`,style:jn},Pt.createElement(Wt,{insertTemp:Ai,watch:rn,fullScreen:Ci,showNullButton:an,showNullProgramButton:Yn,onActionCallback:Qe,hidetoolBar:vi,extraUse:Ti}),Pt.createElement("div",{className:"markdown-editor-body"},Pt.createElement("div",{className:"codemirror-container"},Pt.createElement("textarea",{ref:Qi,placeholder:_i})),rn?Pt.createElement("div",{ref:wi,className:"preview-container"},Ve==="stex"&&Pt.createElement(Jt,{value:cr}),Ve!=="stex"&&Pt.createElement(De.Z,{disabledFill:ii,showProgramFill:Yn,value:cr})):null))),ai?Pt.createElement("a",{ref:Ne,className:"editor-resize"}):null,xi===Vi&&Pt.createElement(ri,{callback:Ut,onCancel:fn}),xi===Ri&&Pt.createElement(ye,{callback:Ut,onCancel:fn}),Pt.createElement(Zt.Z,null,Xi[xi]&&xi!==Vi&&xi!==Ri?Pt.createElement(Zn.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Se,top:Nn},title:Pt.createElement("div",{style:{cursor:"move"},onMouseDown:xn},Xi[xi]),open:!0,onCancel:fn,footer:null,destroyOnClose:!0,width:xi===Ri?"1200px":null,height:xi===Ri?"80vh":null,className:"markdown-popup-form"},pn):null))}},35944:function(Cn,We,Qt){"use strict";Qt.d(We,{Z:function(){return Rt},I:function(){return Wt}});var Pt=Qt(28284),te=Qt(6767),Ae=Qt(37568),Be=Qt(77736),de=Qt(71051),Ht=Qt(47889),ne=Qt(99571),ue=Qt(77665),ce=Qt(59301),Vt=Qt(59301),De=Object.defineProperty,Jt=Object.defineProperties,be=Object.getOwnPropertyDescriptors,It=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,At=(Zt,$t,Ce)=>$t in Zt?De(Zt,$t,{enumerable:!0,configurable:!0,writable:!0,value:Ce}):Zt[$t]=Ce,at=(Zt,$t)=>{for(var Ce in $t||($t={}))nt.call($t,Ce)&&At(Zt,Ce,$t[Ce]);if(It)for(var Ce of It($t))et.call($t,Ce)&&At(Zt,Ce,$t[Ce]);return Zt},ct=(Zt,$t)=>Jt(Zt,be($t));const{useForm:pt}=Pt.default,xt={width:280,marginRight:10},bt={labelCol:{span:5},wrapperCol:{span:19}};var Rt=({callback:Zt,onCancel:$t})=>{const[Ce]=pt();let ge=(0,ce.useRef)();function nn(Tn){ge.current.width=Ce.getFieldValue("width"),ge.current.align=Ce.getFieldValue("align"),Zt(Tn,ge.current)}function qe(Tn,bn){if(Tn.status===-1){te.ZP.error(Tn.message);return}Ce.setFieldsValue({src:`/api/attachments/${Tn.id}`,type:bn.type})}function En(Tn){let bn=Tn.target.files[0];ge.current=bn,Wt(bn,qe)}return Vt.createElement(Pt.default,ct(at({form:Ce},bt),{className:"upload-image-panel",onFinish:nn,style:{width:470,overflow:"hidden"}}),Vt.createElement(Pt.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Vt.createElement("div",{className:"flex-container"},Vt.createElement(Pt.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Vt.createElement(Ae.default,{style:xt})),Vt.createElement(Ot,{onFileChange:En}))),Vt.createElement(Pt.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Vt.createElement(Ae.default,{style:{width:264}})),Vt.createElement(Pt.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},Vt.createElement(Be.Z,null,Vt.createElement(Pt.default.Item,{name:"width",style:{margin:0}},Vt.createElement(de.Z,{style:{width:264}})),Vt.createElement("span",{className:"ml8"},"%"))),Vt.createElement(Pt.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},Vt.createElement(Ht.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"}]})),Vt.createElement("aside",null,Vt.createElement(Pt.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},Vt.createElement(ne.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Vt.createElement(ne.ZP,{type:"default",onClick:$t},"\u53D6\u6D88"))))};function Ot({onFileChange:Zt}){return Vt.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Vt.createElement("input",{type:"file",onChange:Zt}))}function Wt(Zt,$t){if(!Zt)throw new String("\u6CA1\u6709\u6587\u4EF6");let Ce=new FormData;Ce.append("editormd-image-file",Zt),Ce.append("file_param_name","editormd-image-file"),Ce.append("byxhr","true");var ge=new window.XMLHttpRequest;ge.withCredentials=!0,ge.addEventListener("load",function(nn){$t(JSON.parse(nn.target.responseText),Zt)},!1),ge.addEventListener("error",function(nn){console.error(nn)},!1),ge.open("POST",`${ue.KI}/api/attachments.json`),ge.send(Ce)}},51498:function(Cn,We,Qt){"use strict";Qt.d(We,{Z:function(){return Ae}});var Pt=Qt(59301),te=Qt(4676);class Ae extends Pt.Component{constructor(de){super(de);const Ht=window.document;this.node=Ht.createElement("div"),Ht.body.appendChild(this.node)}render(){const{children:de}=this.props;return(0,te.createPortal)(de,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},58531:function(Cn,We,Qt){"use strict";Qt.d(We,{SV:function(){return Me},ZP:function(){return _t}});var Pt=Qt(59301),te=Qt(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"]},Be={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(`
`)}]},Ht={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=Qt(53184),ce=Qt.n(ue),Vt=Object.defineProperty,De=Object.defineProperties,Jt=Object.getOwnPropertyDescriptors,be=Object.getOwnPropertySymbols,It=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,et=(ye,Ye,Fe)=>Ye in ye?Vt(ye,Ye,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):ye[Ye]=Fe,At=(ye,Ye)=>{for(var Fe in Ye||(Ye={}))It.call(Ye,Fe)&&et(ye,Fe,Ye[Fe]);if(be)for(var Fe of be(Ye))nt.call(Ye,Fe)&&et(ye,Fe,Ye[Fe]);return ye},at=(ye,Ye)=>De(ye,Jt(Ye)),ct=(ye,Ye,Fe)=>new Promise((Te,Oe)=>{var $e=Sn=>{try{Kn(Fe.next(Sn))}catch(ui){Oe(ui)}},yn=Sn=>{try{Kn(Fe.throw(Sn))}catch(ui){Oe(ui)}},Kn=Sn=>Sn.done?Te(Sn.value):Promise.resolve(Sn.value).then($e,yn);Kn((Fe=Fe.apply(ye,Ye)).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=(ye,Ye)=>Ye.map(Fe=>({label:Fe,kind:ye.languages.CompletionItemKind.Keyword,insertText:Fe})),bt=ye=>Object.keys(pt.tables).map(Ye=>({label:Ye,kind:ye.languages.CompletionItemKind.Variable,insertText:Ye})),Rt=(ye,Ye)=>{const Fe=pt.tables[ye];return Fe?Fe.map(Te=>({label:Te,kind:Ye.languages.CompletionItemKind.Field,insertText:Te})):[]};function Ot(ye,Ye,Fe,Te,Oe){let $e=Ye.getWordUntilPosition(Fe),yn={startLineNumber:Fe.lineNumber,endLineNumber:Fe.lineNumber,startColumn:$e.startColumn,endColumn:$e.endColumn},Kn=Te.map(Sn=>({label:Sn,kind:ye.languages.CompletionItemKind.Keyword,insertText:Sn,insertTextRules:ye.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:yn}));return Oe.map(Sn=>{Kn.push(at(At({},Sn),{range:yn}))}),Kn}var Wt=ye=>{pt.languages.map(Oe=>(ye.languages.registerDocumentFormattingEditProvider(Oe,{provideDocumentFormattingEdits($e,yn,Kn){return ct(this,null,function*(){const Sn=ce()($e.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1});return[{range:$e.getFullModelRange(),text:Sn}]})}}),Oe));const Ye=de.quickKey.map(Oe=>({label:Oe.label,kind:ye.languages.CompletionItemKind.Method,insertText:Oe.content,insertTextRules:ye.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Fe=Ht.quickKey.map(Oe=>({label:Oe.label,kind:ye.languages.CompletionItemKind.Method,insertText:Oe.content,insertTextRules:ye.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Te=Be.quickKey.map(Oe=>({label:Oe.label,kind:ye.languages.CompletionItemKind.Method,insertText:Oe.content,insertTextRules:ye.languages.CompletionItemInsertTextRule.InsertAsSnippet}));ye.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Oe,$e){var yn=Oe.getWordUntilPosition($e),Kn={startLineNumber:$e.lineNumber,endLineNumber:$e.lineNumber,startColumn:yn.startColumn,endColumn:yn.endColumn},Sn=Oe.getLineContent($e.lineNumber).substring(yn.startColumn-2,yn.endColumn);return{suggestions:[...de.keywords.map(ui=>({label:ui,kind:ye.languages.CompletionItemKind.Function,documentation:ui,insertText:ui,insertTextRules:ye.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Kn})),...de.quickKey.map(ui=>({label:ui.label,kind:ye.languages.CompletionItemKind.Function,documentation:ui.content,insertText:Sn.startsWith("#")?ui.content.replace(/#/,""):ui.content,insertTextRules:ye.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Kn}))]}}}),ye.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Oe,$e){var yn=Oe.getWordUntilPosition($e),Kn={startLineNumber:$e.lineNumber,endLineNumber:$e.lineNumber,startColumn:yn.startColumn,endColumn:yn.endColumn};return{suggestions:[...Ae.keywords.map(Sn=>({label:Sn,kind:ye.languages.CompletionItemKind.Function,documentation:Sn,insertText:Sn,insertTextRules:ye.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Kn}))]}}}),ye.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Oe,$e){var yn=Oe.getWordUntilPosition($e),Kn={startLineNumber:$e.lineNumber,endLineNumber:$e.lineNumber,startColumn:yn.startColumn,endColumn:yn.endColumn},Sn=Oe.getLineContent($e.lineNumber).substring(yn.startColumn-2,yn.endColumn);return{suggestions:[...Be.keywords.map(ui=>({label:ui,kind:ye.languages.CompletionItemKind.Function,documentation:ui,insertText:ui,insertTextRules:ye.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Kn})),...Be.quickKey.map(ui=>({label:ui.label,kind:ye.languages.CompletionItemKind.Function,documentation:ui.content,insertText:Sn.startsWith("#")?ui.content.replace(/#/,""):ui.content,insertTextRules:ye.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Kn}))]}}}),ye.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Oe,$e){var yn=Oe.getWordUntilPosition($e),Kn={startLineNumber:$e.lineNumber,endLineNumber:$e.lineNumber,startColumn:yn.startColumn,endColumn:yn.endColumn},Sn=Oe.getLineContent($e.lineNumber).substring(yn.startColumn-2,yn.endColumn);return{suggestions:[...ne.keywords.map(ui=>({label:ui,kind:ye.languages.CompletionItemKind.Function,documentation:ui,insertText:ui,insertTextRules:ye.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Kn})),...ne.quickKey.map(ui=>({label:ui.label,kind:ye.languages.CompletionItemKind.Function,documentation:ui.content,insertText:Sn.startsWith("#")?ui.content.replace(/#/,""):ui.content,insertTextRules:ye.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Kn}))]}}}),ye.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Oe,$e){var yn=Oe.getWordUntilPosition($e),Kn={startLineNumber:$e.lineNumber,endLineNumber:$e.lineNumber,startColumn:yn.startColumn,endColumn:yn.endColumn},Sn=Oe.getLineContent($e.lineNumber).substring(yn.startColumn-2,yn.endColumn);return{suggestions:[...Ht.keywords.map(ui=>({label:ui,kind:ye.languages.CompletionItemKind.Function,documentation:ui,insertText:ui,insertTextRules:ye.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Kn})),...Ht.quickKey.map(ui=>({label:ui.label,kind:ye.languages.CompletionItemKind.Function,documentation:ui.content,insertText:Sn.startsWith("#")?ui.content.replace(/#/,""):ui.content,insertTextRules:ye.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,Ce=(ye,Ye,Fe)=>Ye in ye?$t(ye,Ye,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):ye[Ye]=Fe,ge=(ye,Ye,Fe)=>Ce(ye,typeof Ye!="symbol"?Ye+"":Ye,Fe);const nn=class Bw{constructor(Ye,Fe,Te){this.placeholder=Ye,this.editor=Fe,this.monaco=Te,Fe.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)}};ge(nn,"ID","editor.widget.placeholderHint");var En=nn,Tn=Qt(96236),bn=Qt(6767),ni=Qt(25399),In=Qt(89392),Ee=Qt(41312),ie=Qt(56102),Pn=Object.defineProperty,pi=Object.defineProperties,Wn=Object.getOwnPropertyDescriptors,un=Object.getOwnPropertySymbols,Zn=Object.prototype.hasOwnProperty,si=Object.prototype.propertyIsEnumerable,Oi=(ye,Ye,Fe)=>Ye in ye?Pn(ye,Ye,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):ye[Ye]=Fe,on=(ye,Ye)=>{for(var Fe in Ye||(Ye={}))Zn.call(Ye,Fe)&&Oi(ye,Fe,Ye[Fe]);if(un)for(var Fe of un(Ye))si.call(Ye,Fe)&&Oi(ye,Fe,Ye[Fe]);return ye},ri=(ye,Ye)=>pi(ye,Wn(Ye)),Le=(ye,Ye)=>{var Fe={};for(var Te in ye)Zn.call(ye,Te)&&Ye.indexOf(Te)<0&&(Fe[Te]=ye[Te]);if(ye!=null&&un)for(var Te of un(ye))Ye.indexOf(Te)<0&&si.call(ye,Te)&&(Fe[Te]=ye[Te]);return Fe},fi=(ye,Ye,Fe)=>new Promise((Te,Oe)=>{var $e=Sn=>{try{Kn(Fe.next(Sn))}catch(ui){Oe(ui)}},yn=Sn=>{try{Kn(Fe.throw(Sn))}catch(ui){Oe(ui)}},Kn=Sn=>Sn.done?Te(Sn.value):Promise.resolve(Sn.value).then($e,yn);Kn((Fe=Fe.apply(ye,Ye)).next())});function Pi(ye){return/^\d+$/.test(ye)?`${ye}px`:ye}function jt(){}let Mt=!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(ye=[]){let Ye=ye;if(Array.isArray(ye)){for(let Fe=0;Fe<ye.length;Fe++){let Te=mt[ye[Fe]];if(Te)return Te}return Ye[0]}return mt[Ye]||Ye}let Lt=null;const Bt=()=>fi(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(ye){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",ye)}});var _t=ye=>{var Ye=ye,{width:Fe="100%",height:Te="100%",value:Oe,language:$e="javascript",style:yn={},options:Kn={},overrideServices:Sn={},theme:ui="vs-dark",onEditBlur:ci,isCopy:mi=!1,onSave:Mi,autoHeight:yr=!1,forbidCopy:ki=!1,onChange:Ri=jt,editorDidMount:Vi=jt,onFocus:Or=jt,onBreakPoint:qi=jt,breakPointValue:Cr=[],filename:xr="educoder.txt",errorLine:Wr,errorContent:$i="",highlightLine:eo,openBreakPoint:fo=!1,placeholder:Zr="",showMiniMap:Fr=!0}=Ye,ro=Le(Ye,["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 Tt=(0,Pt.useRef)(),Gi=(0,Pt.useRef)({}),Zi=(0,Pt.useRef)(),Yr=(0,Pt.useRef)(),bo=(0,Pt.useRef)([]),ko=(0,Pt.useRef)(!1),$o=(0,Pt.useRef)(),Xi=(0,Pt.useRef)(),Ni=(0,Pt.useRef)(!1),[_e,Re]=(0,Pt.useState)(!1);function Ue(){let li;return Tt.current&&(li=new te.Z(Xe=>{for(let sn of Xe)(sn.target.offsetHeight>0||sn.target.offsetWidth>0)&&Gi.current.instance.layout()}),li.observe(Tt.current)),li}function gi(){bn.ZP.warning({content:decodeURIComponent(Zt),key:"monaco-editor-tip"})}const xe=()=>{let li=Gi.current.instance;if(Oe!=null&&li&&_e){const Xe=li.getModel();Xe&&Oe!==Xe.getValue()&&(Mt=!0,Xe.setValue(Oe),li.layout(),Mt=!1)}};(0,Pt.useEffect)(()=>{const li=Ee.Z.subscribe("formatDocument",Xe=>{var sn;let wn=Gi.current.instance;(sn=wn==null?void 0:wn.getAction)==null||sn.call(wn,"editor.action.formatDocument").run()});return window.updateMonacoValue=Xe=>{Ri(Xe)},li},[]),(0,Pt.useEffect)(()=>{var li;let Xe=Gi.current.instance;Yr.current&&clearTimeout(Yr.current),Yr.current=setTimeout(()=>{xe()},500),Oe&&(Oe!=null&&Oe.length)&&((li=Xe==null?void 0:Xe.updateOptions)==null||li.call(Xe,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Oe.split(/\r\n|\r|\n/g).length))+3,5)}))},[Oe,_e,Gi.current]),(0,Pt.useEffect)(()=>{if(Wr&&Gi.current&&Gi.current.instance){let Xe=Gi.current.instance;Xe.changeViewZones(function(sn){var wn=document.createElement("div");wn.style.padding="10px 20px",wn.style.width="calc(100% - 20px)",wn.className="my-error-line-wrp",wn.innerHTML=$i,sn.addZone({afterLineNumber:Wr||11,heightInLines:3,domNode:wn})});var li={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}};Xe.addOverlayWidget(li),Xe.revealPositionInCenter({lineNumber:20,column:1})}},[Wr,Gi.current,_e]);const Hi=(li="",Xe)=>{if(!li||li.trim()==="")return!0;const wn=Gi.current.instance.getModel().getLineTokens(Xe);let Mn=!1;for(let ii=0;ii<2;ii++)wn.getStandardTokenType(ii)===1&&(Mn=!0);return Mn};(0,Pt.useEffect)(()=>{var li;const Xe=(li=Gi.current)==null?void 0:li.instance;if(Xe&&_e&&ki){const sn=Xe.onDidBlurEditorWidget(()=>{Ni.current=!1}),wn=Xe.onDidFocusEditorText(()=>{Ni.current=!0});return()=>{sn.dispose(),wn.dispose()}}},[Gi.current,_e,ki]),(0,Pt.useEffect)(()=>{var li;if((li=Gi.current)!=null&&li.instance&&_e&&fo){let Xe=Gi.current.instance,sn=Xe.getModel();if(!sn)return;(()=>{var oi;let Ci=[],bi=[];const xi=sn.getAllDecorations();for(let Yi of xi)Yi.options.className==="highlighted-line"&&(Ci.push((oi=Yi==null?void 0:Yi.range)==null?void 0:oi.startLineNumber),bi.push(Yi==null?void 0:Yi.id));if(eo===Ci[0])return;sn.deltaDecorations(bi,[]);const Ei=sn.getLineCount();eo&&eo<=Ei&&(Xe.deltaDecorations([],[{range:new Lt.Range(eo,1,eo,sn.getLineMaxColumn(eo)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Xe.revealLineInCenter(eo))})();const Mn=(oi=!1)=>{var Ci;let bi=[],xi=[];const Ei=sn.getAllDecorations();for(let Yi of Ei)Yi.options.linesDecorationsClassName==="breakpoints-select"&&(bi.push((Ci=Yi==null?void 0:Yi.range)==null?void 0:Ci.startLineNumber),xi.push(Yi==null?void 0:Yi.id));if(oi)return{lines:bi,ids:xi};qi(bi)},ii=oi=>fi(void 0,null,function*(){let Ci={range:new Lt.Range(oi,1,oi,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield sn.deltaDecorations([],[Ci]),Mn()}),_i=oi=>fi(void 0,null,function*(){let Ci=[];const bi=Xe.getLineDecorations(oi);for(let xi of bi)xi.options.linesDecorationsClassName==="breakpoints-select"&&Ci.push(xi.id);yield sn.deltaDecorations(Ci,[]),Mn()}),Ki=oi=>{let Ci=Xe.getLineDecorations(oi);for(let bi of Ci)if(bi.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,In.isEqual)(Cr,Mn(!0).lines)){sn.deltaDecorations(Mn(!0).ids,[]);const oi=Cr.map(Ci=>({range:new Lt.Range(Ci,1,Ci,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));sn.deltaDecorations([],oi)}const Ti=Xe.onDidChangeModelContent(oi=>{let Ci=Xe.getPosition();if(Ci){let bi=Ci.lineNumber;clearTimeout(Xi.current),Xi.current=setTimeout(()=>{Hi(sn.getLineContent(bi),bi)?_i(bi):Ki(bi)?(_i(bi),ii(bi)):Mn()},100)}}),en=Xe.onMouseDown(oi=>{var Ci,bi,xi;if(oi.target.detail&&((xi=(bi=(Ci=oi.target)==null?void 0:Ci.element)==null?void 0:bi.className)!=null&&xi.includes("line-numbers"))){let Ei=oi.target.position.lineNumber;if(Hi(sn.getLineContent(Ei),Ei))return;Ki(Ei)?_i(Ei):ii(Ei)}}),Lr=oi=>{let Ci={range:new Lt.Range(oi,1,oi,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};bo.current=Xe.deltaDecorations(bo.current,[Ci])},cr=()=>{bo.current=Xe.deltaDecorations(bo.current,[])},Ur=Xe.onMouseMove(oi=>{var Ci,bi,xi;if(cr(),oi.target.detail&&((xi=(bi=(Ci=oi.target)==null?void 0:Ci.element)==null?void 0:bi.className)!=null&&xi.includes("line-numbers"))){let Ei=oi.target.position.lineNumber;if(Hi(sn.getLineContent(Ei),Ei))return;Lr(Ei)}}),rn=Xe.onMouseLeave(()=>{cr()});return()=>{Ti.dispose(),en.dispose(),Ur.dispose(),rn.dispose()}}},[Gi.current,_e,Cr,eo,fo,$e]),(0,Pt.useEffect)(()=>{var li;(li=Gi.current)!=null&&li.instance&&fo&&Gi.current.instance.setPosition({lineNumber:0,column:0})},[eo]);function Dn(){let li=Gi.current.instance;if(li){const Xe=li.getSelection(),sn=Gi.current.pastePos||{},wn=new Lt.Range(sn.startLineNumber||Xe.endLineNumber,sn.startColumn||Xe.endColumn,sn.endLineNumber||Xe.endLineNumber,sn.endColumn||Xe.endColumn);setTimeout(()=>{li.executeEdits("",[{range:wn,text:""}])},300)}}function Ai(li){(window.navigator.platform.match("Mac")?li.metaKey:li.ctrlKey)&&li.keyCode==83&&(li.preventDefault(),Mi())}const Ve=()=>{if(yr&&Gi.current.instance){const li=Gi.current.instance.getContentHeight();ln(li<Te?Te:li)}else ln(Te)};function ze(li){var Xe=document.createEvent("MouseEvents");Xe.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),li.dispatchEvent(Xe)}const ai=li=>{if(!Ni.current)return;const{keyCode:Xe,ctrlKey:sn,metaKey:wn,target:Mn,type:ii}=li;return(ii==="paste"||(Xe===67||Xe===86)&&(wn||sn))&&Mn.nodeName==="TEXTAREA"&&(gi(),li.preventDefault()),!1};function he(li,Xe){var sn=window.URL||window.webkitURL||window,wn=new Blob([Xe]),Mn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Mn.href=sn.createObjectURL(wn),Mn.download=li,ze(Mn)}(0,Pt.useEffect)(()=>{Ve()},[Ve]),(0,Pt.useEffect)(()=>{Tt.current&&!_e&&Promise.all([Qt.e(8909),Qt.e(503)]).then(Qt.bind(Qt,71448)).then(li=>{try{Lt=li,Gi.current.instance=Lt.editor.create(Tt.current,{value:Oe,language:vt($e),theme:ui,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Fr||!1}},Sn);const Xe=Gi.current.instance;let Mn=[...Tn.BH._menuItems].find(Ti=>Ti[0]._debugName=="EditorContext")[1],ii=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],_i=(Ti,en)=>{var Lr,cr;let Ur=Ti._first;do en.includes((cr=(Lr=Ur.element)==null?void 0:Lr.command)==null?void 0:cr.id)&&Ti._remove(Ur);while(Ur=Ur.next)};if(Vi(Xe,Lt),setTimeout(()=>{Ve(),Gi.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{he(xr||"educoder.txt",Xe.getValue())}})},500),Gi.current.subscription=Xe.onDidChangeModelContent(Ti=>{ko.current?clearTimeout($o.current):(Ve(),Ri(Xe.getValue(),Ti)),$o.current=setTimeout(()=>{ko.current=!1},500)}),window.Monaco||Wt(Lt,vt($e)),ki&&(_i(Mn,ii),Tt.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",ai),window.removeEventListener("paste",ai),window.addEventListener("keydown",ai),window.addEventListener("paste",ai)),window.Monaco=Lt,ci&&Xe.onDidBlurEditorWidget(()=>{ci(Xe.getValue())}),Or&&Xe.onDidFocusEditorText(()=>{ki&&Bt(),Or(Xe.getValue())}),ki){Bt();try{Xe.onDidPaste(Ti=>{const en=Xe.getSelection(),Lr=Gi.current.pastePos||{},cr=new Lt.Range(Lr.startLineNumber||en.endLineNumber,Lr.startColumn||en.endColumn,Lr.endLineNumber||en.endLineNumber,Lr.endColumn||en.endColumn);Xe.executeEdits("",[{range:Ti.range,text:""}])})}catch(Ti){}}let Ki=Ue();return Zr&&typeof Zr=="string"&&new En(Zr,Xe,Lt),Re(!0),()=>{const Ti=Gi.current.instance;Ti.dispose();const en=Ti.getModel();en&&en.dispose(),Gi.current.subscription&&Gi.current.subscription.dispose(),Ki.unobserve(Tt.current)}}catch(Xe){}})},[]),(0,Pt.useEffect)(()=>{if(Gi.current.instance&&_e)return document.addEventListener("keydown",Ai,!1),()=>{document.removeEventListener("keydown",Ai)}},[Mi,_e]),(0,Pt.useEffect)(()=>{let li=Gi.current.instance;if(li&&_e){let Xe=vt($e);Lt.editor.setModelLanguage(li.getModel(),Xe)}},[$e,_e]),(0,Pt.useEffect)(()=>{Gi.current.instance&&_e&&Lt.editor.setTheme(ui)},[ui,_e]),(0,Pt.useEffect)(()=>{let li=Gi.current.instance;Zi.current=Kn,li&&_e&&(li.updateOptions(on({},Kn)),setTimeout(()=>{li.getModel().updateOptions(on({},Kn))},200))},[JSON.stringify(Kn),_e]),(0,Pt.useEffect)(()=>{let li=Gi.current.instance;li&&_e&&li.layout()},[Fe,Te,_e]);const[an,Yn]=(0,Pt.useState)(Pi(Fe)),[vi,ln]=(0,Pt.useState)(Pi(Te)),qn=ri(on({},yn),{width:an,height:vi,position:"relative"});return Pt.createElement("div",{className:"my-monaco-editor",ref:Tt,style:qn},mi&&Pt.createElement(ie.CopyToClipboard,{text:Oe,onCopy:()=>bn.ZP.success("\u590D\u5236\u6210\u529F")},Pt.createElement(ni.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 Me({width:ye="100%",height:Ye="100%",original:Fe,modified:Te,language:Oe,options:$e={}}){const yn=(0,Pt.useRef)(),[Kn,Sn]=(0,Pt.useState)(null);function ui(yr){let ki;return yn.current&&(ki=new te.Z(Ri=>{for(let Vi of Ri)(Vi.target.offsetHeight>0||Vi.target.offsetWidth>0)&&yr.layout()}),ki.observe(yn.current)),ki}(0,Pt.useEffect)(()=>(yn.current&&Promise.all([Qt.e(8909),Qt.e(9404)]).then(Qt.bind(Qt,2550)).then(yr=>{Lt=yr;const ki=Lt.editor.createDiffEditor(yn.current,ri(on({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},$e),{wordWrap:!0}));Sn(ki);let Ri=ui(ki);return()=>{ki.dispose();const Vi=ki.getModel();Vi&&Vi.dispose(),Ri.unobserve(yn.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,Pt.useEffect)(()=>{Kn&&Kn.setModel({original:Lt.editor.createModel(Fe,Oe),modified:Lt.editor.createModel(Te,Oe)})},[Fe,Te,Oe,Kn]);const ci=Pi(ye),mi=Pi(Ye),Mi={width:ci,height:mi};return Pt.createElement("div",{className:"my-diff-editor",ref:yn,style:Mi})}},38776:function(Cn,We,Qt){"use strict";Qt.d(We,{jL:function(){return de},w9:function(){return Zn},QD:function(){return ki},cQ:function(){return ie},op:function(){return Sn},O5:function(){return $o},_b:function(){return xr},t7:function(){return at},Gi:function(){return fi},YG:function(){return ri},qp:function(){return De},vr:function(){return Or},qE:function(){return mi},Je:function(){return xt},wb:function(){return Tn},cq:function(){return Lt},tp:function(){return It}});var Pt=Qt(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:Xi=[],img:Ni,imgWidth:_e=346,title:Re,sunTitle:Ue,bannerExtraContent:gi})=>Pt.createElement("div",{className:te.banner},Pt.createElement("div",{className:te.content},Pt.createElement("aside",null,Pt.createElement("p",null,Pt.createElement("b",null,Re),Pt.createElement("span",null,Ue)),Xi.length>0&&Pt.createElement("div",{className:te.btns},Xi.map((xe,Hi)=>Pt.createElement("div",{key:Hi,onClick:xe.click},xe.name,xe.sign?Pt.createElement("img",{src:Ae,width:39}):null))),gi),Ni&&Pt.createElement("img",{style:{marginTop:33,marginRight:38},src:Ni,width:_e}))),Ht={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=Qt(92310),ue=Qt.n(ne),ce=Qt(89392),De=({dataSource:Xi=[],value:Ni,onChange:_e,onTitleChange:Re,className:Ue,title:gi,titleWidth:xe=41,style:Hi={},fontColor:Dn="#6A7283",showCount:Ai})=>{const[Ve,ze]=(0,Pt.useState)(0),[ai,he]=(0,Pt.useState)(!1),an=(0,Pt.useRef)(null),Yn=(0,Pt.useRef)(null);return(0,Pt.useEffect)(()=>{var vi;Xi.length!==0&&(((vi=an==null?void 0:an.current)==null?void 0:vi.clientHeight)>97?ze(1):ze(0)),Xi.length===0&&ze(0),he(!1)},[Xi]),Pt.createElement("div",{className:ue()(Ht.row,Ue),style:Hi},Pt.createElement("div",{onClick:(0,ce.throttle)(()=>Re==null?void 0:Re(),2e3),style:{width:xe,marginTop:ai?12:4},className:`${Ht.title} ${Re?"current":""}`},gi),Pt.createElement("div",{className:ai?`${Ht.tagsWrap} ${Ht.tagsBorderWrap}`:Ht.tagsWrap},Pt.createElement("div",{className:Ht.bar,ref:Yn,style:Ve>0?{height:Ve===1?97:"auto",overflow:Ve===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},Pt.createElement("div",{className:Ht.tag,ref:an},Xi==null?void 0:Xi.map(vi=>Pt.createElement("span",{onClick:()=>_e(vi.id),key:vi.id,style:{color:Dn},className:Ni===vi.id?Ht.active:""},Pt.createElement("span",{title:vi.name,className:Ht.name},vi.name),!!Ai&&Pt.createElement("span",{className:Ht.num},vi.count))))),!!Ve&&Pt.createElement(Pt.Fragment,null,Ve===1?Pt.createElement("div",{onClick:()=>{var vi;ze(2),((vi=an==null?void 0:an.current)==null?void 0:vi.clientHeight)>245?he(!0):he(!1)},className:Ht.action},"\u5C55\u5F00",Pt.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):Pt.createElement("div",{onClick:()=>{Yn.current.scrollTop=0,ze(1),he(!1)},className:Ht.action},"\u6536\u8D77",Pt.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},Jt={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},It=({dataSource:Xi=[],value:Ni,onChange:_e,className:Re,style:Ue={}})=>Pt.createElement("div",{style:Ue,className:ue()(Jt.tabs,Re)},Xi.map(gi=>Pt.createElement("span",{onClick:()=>_e(gi.id),className:Ni===gi.id?Jt.active:"",key:gi.id},gi.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=Qt(37568),at=({dataSource:Xi=[],value:Ni="",onChange:_e,onInputChange:Re=()=>{},className:Ue,style:gi={},placeholder:xe,allowClear:Hi=!1})=>{var Dn;const[Ai,Ve]=(0,Pt.useState)(""),[ze,ai]=(0,Pt.useState)("");(0,Pt.useEffect)(()=>{var Yn;let vi=Ni;(Yn=JSON.stringify(Ni))!=null&&Yn.includes("{")&&(Ve(Ni.id),vi=Ni.value||"");try{ai(decodeURIComponent(vi||""))}catch(ln){ai(decodeURIComponent(vi||""))}},[Ni]);const he=()=>{_e(encodeURIComponent(ze),Ai||null)},an=Yn=>{Yn!==Ai&&(Ve(Yn),_e(encodeURIComponent(ze),Yn))};return Pt.createElement("div",{className:ue()(nt.input,Ue),style:gi},!!Xi.length&&Pt.createElement("div",{className:nt.dropdown},Pt.createElement("div",{className:nt.text},(Dn=Xi.find(Yn=>Yn.id===Ai))==null?void 0:Dn.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},Xi.map((Yn,vi)=>Pt.createElement("div",{key:vi,onClick:()=>an(Yn.id)},Yn.name)))),Pt.createElement(et.default,{onPressEnter:he,value:ze,onChange:Yn=>{ai(Yn.target.value),Re(encodeURIComponent(Yn.target.value),Ai||null)},bordered:!1,placeholder:xe}),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:Xi,onChange:Ni,className:_e,total:Re,pageSize:Ue,style:gi={}})=>{const xe=Xi<2,Hi=Xi>=Math.ceil(Re/Ue);return Re<=Ue?Pt.createElement(Pt.Fragment,null):Pt.createElement("div",{className:ue()(ct.quickPager,_e),style:gi},Pt.createElement("div",{onClick:()=>{xe||Ni(Xi-1,"prev")},className:xe?ct.disabled:""},"\u4E0A\u4E00\u9875"),Pt.createElement("div",{onClick:()=>{Hi||Ni(Xi+1,"next")},className:Hi?ct.disabled:""},"\u4E0B\u4E00\u9875"))},bt={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"},Rt=Qt(29787),Ot=Qt(25399),Wt=Qt(58018),Zt=Qt(13952),$t=Qt(89299),Ce=Qt(96908),ge=Qt(57177),nn=Qt(81378),qe=Qt(63604),Tn=({className:Xi,dataSource:Ni=[],col:_e=4,right:Re,bottom:Ue=23,precision:gi=0,wrapWidth:xe=1200,trackEventItems:Hi,loading:Dn})=>{const Ai=Math.floor((xe-(_e-1)*Re)/_e);return Pt.createElement(Rt.Z,{spinning:Dn},Pt.createElement("div",{className:ue()(bt.list,Xi)},!!Ni.length&&Ni.map((Ve,ze)=>{const{name:ai,id:he,identifier:an,power:Yn,cover_image_id:vi,pic:ln}=Ve;return Pt.createElement("div",{className:bt.wrap,key:he,style:{width:Ai,marginRight:(1+ze)%_e===0?0:Re+gi,marginBottom:Ue}},Pt.createElement("a",{target:"_blank",href:`/shixuns/${an}/challenges`,className:bt.li,onClick:qn=>{qn.preventDefault(),Hi&&(0,$t.L9)([Hi]),Yn&&(0,$t.xg)(`/shixuns/${an}/challenges`)}},Pt.createElement("div",{className:bt.img},Pt.createElement("img",{className:bt.cover,src:`${ln}`}),Ve.is_jupyter&&Pt.createElement("img",{className:bt.sign,src:Ce}),Ve.is_jupyter_lab&&Pt.createElement("img",{className:bt.sign,src:ge}),Ve.is_unity_3d&&Pt.createElement("img",{className:bt.sign,src:nn})),Pt.createElement("div",{className:bt.name},Pt.createElement(Ot.Z,{title:ai||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},Pt.createElement("span",{className:bt.e},ai||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),Pt.createElement("div",{className:bt.tags},Pt.createElement(Ot.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},Pt.createElement("span",null,Pt.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),Pt.createElement("span",null,Ve.challenges_count))),!!Ve.myshixuns_count&&Pt.createElement(Ot.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,Ve.myshixuns_count))),Pt.createElement(Ot.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},Pt.createElement("span",null,Pt.createElement("span",null,Ve.level))),Pt.createElement("div",{className:bt.rate},Pt.createElement(Wt.Z,{allowHalf:!0,disabled:!0,defaultValue:Ve.score_info}),Pt.createElement("span",null,"\xA0",Ve.score_info?`${Ve.score_info}\u5206`:"5\u5206")))),!Yn&&Pt.createElement("div",{className:bt.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")))}),!Ni.length&&Pt.createElement(qe.Z,null)))},bn={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"},ni=Qt(64681),In=Qt(59301),ie=({className:Xi,dataSource:Ni=[],col:_e=4,right:Re,bottom:Ue=23,precision:gi=0,wrapWidth:xe=1200,trackEventItems:Hi,loading:Dn,onRemove:Ai=()=>{},isCurrent:Ve=!0,showAlias:ze=!1})=>{const ai=Math.floor((xe-(_e-1)*Re)/_e),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 In.createElement(Rt.Z,{spinning:Dn},In.createElement("div",{className:ue()(bn.list,Xi)},!!(Ni!=null&&Ni.length)&&(Ni==null?void 0:Ni.map((an,Yn)=>{var vi;const{name:ln,id:qn,identifier:li,featured:Xe,school_name:sn,image_url:wn,excellent:Mn,is_plan:ii}=an;return In.createElement("div",{key:qn,className:bn.wrap,style:{width:ai,marginRight:(1+Yn)%_e===0?0:Re+gi,marginBottom:Ue}},In.createElement("a",{className:bn.li,onClick:_i=>{_i.preventDefault(),_i.stopPropagation(),Hi&&(0,$t.L9)([Hi]),(0,$t.xg)(`/paths/${li}`)}},In.createElement("div",{className:bn.img},In.createElement("img",{className:bn.cover,src:`${wn}`}),Ve&&(0,ni.bg)()&&(an==null?void 0:an.studying)&&In.createElement("div",{className:`${bn.movebq} user-path-items`,onClick:_i=>{_i.stopPropagation(),Ai(an)}},In.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),In.createElement("span",{className:"c-red"},"\u79FB\u9664")),(vi=an==null?void 0:an.subject_tags)==null?void 0:vi.map((_i,Ki)=>{var Ti,en;if(Ki===0){const cr=(Ti=he.find(Ur=>Ur.name==_i))==null?void 0:Ti.swimg;return In.createElement("img",{className:bn.sign,src:cr,style:{left:"-4px"}})}const Lr=(en=he.find(cr=>cr.name==_i))==null?void 0:en.ptimg;return In.createElement("img",{className:bn.sign,src:Lr,style:{left:`${48+52*(Ki-1)+2*Ki}px`}})}),In.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(an==null?void 0:an.excellent)&&In.createElement("div",{className:bn.bq},"\u5F00\u653E\u8BFE\u7A0B"))),In.createElement("div",{className:bn.name},In.createElement(Ot.Z,{title:ze&&(an!=null&&an.excellent_alias_name)?In.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${ln}`,In.createElement("br",null),In.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${an==null?void 0:an.excellent_alias_name}`)):ln},In.createElement("span",{className:bn.e},ze&&(an==null?void 0:an.excellent_alias_name)||ln))),In.createElement(Ot.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${sn}`},In.createElement("div",{className:bn.unit},In.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),sn)),In.createElement("div",{className:bn.tags},In.createElement("div",null,In.createElement(Ot.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},In.createElement("span",null,In.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),In.createElement("span",null,an.stages_count))),In.createElement(Ot.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},In.createElement("span",null,In.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),In.createElement("span",null,an.members_count)))))))})),!Ni.length&&In.createElement(qe.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"},pi="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",Wn=Qt(59301),Zn=({className:Xi,dataSource:Ni=[],col:_e=4,right:Re,bottom:Ue=23,precision:gi=0,wrapWidth:xe=1200,trackEventItems:Hi,loading:Dn,handleVery:Ai=()=>!0})=>{const Ve=Math.floor((xe-(_e-1)*Re)/_e);return Wn.createElement(Rt.Z,{spinning:Dn},Wn.createElement("div",{className:ue()(Pn.list,Xi)},!!Ni.length&&Ni.map((ze,ai)=>{const{subject_identifier:he,id:an,identifier:Yn,power:vi}=ze,ln=ze.is_public!=0&&ze.is_public;return Wn.createElement("div",{className:Pn.wrap,key:an,style:{width:Ve,marginRight:(1+ai)%_e===0?0:Re+gi,marginBottom:Ue}},Wn.createElement("a",{className:Pn.li,onClick:qn=>{qn.preventDefault(),Ai(ze==null?void 0:ze.first_category_url)&&(Hi&&(0,$t.L9)([Hi]),(0,$t.xg)(ze.first_category_url))}},Wn.createElement("div",{className:Pn.top},Wn.createElement(Ot.Z,{title:ze.name},Wn.createElement("div",{className:Pn.name},ze.name)),Wn.createElement("img",{className:Pn.img,src:Zt.Z.IMG_SERVER+"/images/"+ze.avatar_url}),Wn.createElement("div",{className:Pn.text,title:ze.creator},ze.creator),he&&Wn.createElement("div",{className:Pn.btns},Wn.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),Wn.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),ln&&Wn.createElement("div",{className:Pn.sign},"\u516C\u5F00")),Wn.createElement("div",{className:Pn.bottom},ze.visits>0&&Wn.createElement(Ot.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},Wn.createElement("span",null,Wn.createElement("i",{className:"iconfont icon-liulanyan"}),Wn.createElement("span",null,ze.visits))),ze.course_members_count>0&&Wn.createElement(Ot.Z,{title:"\u6210\u5458",placement:"bottom"},Wn.createElement("span",null,Wn.createElement("i",{className:"iconfont icon-chengyuan"}),ze.course_members_count)),ze.tasks_count>0&&Wn.createElement(Ot.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},Wn.createElement("span",null,Wn.createElement("i",{className:"iconfont icon-zuoye"}),ze.tasks_count)),ze.is_end?Wn.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):Wn.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!ze.is_accessible&&Wn.createElement("div",{className:Pn.lockWrap},Wn.createElement("img",{src:`${Zt.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),Wn.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!Ni.length&&Wn.createElement(qe.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"},Oi=Qt(44993),ri=({dataSource:Xi=[],value:Ni,onChange:_e,className:Re,style:Ue={},tabBarExtraContent:gi})=>Pt.createElement("div",{className:ue()(si.tabs,Re),style:Ue},Pt.createElement("div",{className:si.tabsWrap},Xi.map((xe,Hi)=>!(xe!=null&&xe.hide)&&Pt.createElement("aside",{className:si.tab,onClick:()=>{_e(xe.id),xe.link&&Oi.history.push(xe.link)},key:Hi},Pt.createElement("div",{className:Ni===xe.id?si.active:""},xe.name),(xe==null?void 0:xe.resetCount)==null&&(xe==null?void 0:xe.total)!==void 0&&Pt.createElement("span",null,"\uFF08",xe==null?void 0:xe.total,"\uFF09"),(xe==null?void 0:xe.resetCount)!==void 0&&(xe==null?void 0:xe.total)!==void 0&&Pt.createElement(Ot.Z,{title:(xe==null?void 0:xe.tip)!=null?xe==null?void 0:xe.tip:""},Pt.createElement("span",{style:{color:"#9096A3"}},"\uFF08",Pt.createElement("span",{style:{color:"#000"}},xe==null?void 0:xe.resetCount),"/",Pt.createElement("span",null,xe==null?void 0:xe.total),"\uFF09"))))),Pt.createElement("div",{className:si.tabBar},gi)),fi=({className:Xi,style:Ni={},children:_e})=>Pt.createElement("div",{className:ue()(Xi),style:Ni},_e),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"},jt=Qt(75727),Mt=Qt(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:Xi,dropValue:Ni,className:_e,onSort:Re,onDrop:Ue,dataSource:gi=mt})=>{var xe;return Pt.createElement("div",{className:ue()(Pi.orderWrap,_e)},Pt.createElement(jt.Z,{dropdownRender:()=>Pt.createElement(Mt.default,null,gi.map((Hi,Dn)=>Pt.createElement(Mt.default.Item,{key:Dn,onClick:()=>Ue(Hi.id)},Hi.name)))},Pt.createElement("span",{className:Pi.orderTextWrap},(xe=gi.find(Hi=>Ni===Hi.id))==null?void 0:xe.name)),Pt.createElement("span",{className:Pi.orderIconWrap},Pt.createElement("span",{className:Pi.orderAsc},Pt.createElement("i",{className:Xi==="asc"?`iconfont icon-sanjiaoxing-up font12 ${Pi.cursorPointer} ${Pi.active}`:`iconfont icon-sanjiaoxing-up font12 ${Pi.cursorPointer}`,onClick:()=>Re(Xi==="asc"?"desc":"asc")})),Pt.createElement("span",{className:Pi.orderDesc},Pt.createElement("i",{className:Xi==="desc"?`iconfont icon-sanjiaoxing-down font12 ${Pi.cursorPointer} ${Pi.active}`:`iconfont icon-sanjiaoxing-down font12 ${Pi.cursorPointer}`,onClick:()=>Re(Xi==="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"},_t=Qt(99571),Me=Object.defineProperty,ye=Object.getOwnPropertySymbols,Ye=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable,Te=(Xi,Ni,_e)=>Ni in Xi?Me(Xi,Ni,{enumerable:!0,configurable:!0,writable:!0,value:_e}):Xi[Ni]=_e,Oe=(Xi,Ni)=>{for(var _e in Ni||(Ni={}))Ye.call(Ni,_e)&&Te(Xi,_e,Ni[_e]);if(ye)for(var _e of ye(Ni))Fe.call(Ni,_e)&&Te(Xi,_e,Ni[_e]);return Xi},$e=(Xi,Ni)=>{var _e={};for(var Re in Xi)Ye.call(Xi,Re)&&Ni.indexOf(Re)<0&&(_e[Re]=Xi[Re]);if(Xi!=null&&ye)for(var Re of ye(Xi))Ni.indexOf(Re)<0&&Fe.call(Xi,Re)&&(_e[Re]=Xi[Re]);return _e},yn=(Xi,Ni,_e)=>new Promise((Re,Ue)=>{var gi=Dn=>{try{Hi(_e.next(Dn))}catch(Ai){Ue(Ai)}},xe=Dn=>{try{Hi(_e.throw(Dn))}catch(Ai){Ue(Ai)}},Hi=Dn=>Dn.done?Re(Dn.value):Promise.resolve(Dn.value).then(gi,xe);Hi((_e=_e.apply(Xi,Ni)).next())}),Sn=Xi=>{var Ni=Xi,{className:_e,style:Re,children:Ue,loading:gi=!1,openLoading:xe,onClick:Hi=()=>{},size:Dn="middle",shape:Ai="round"}=Ni,Ve=$e(Ni,["className","style","children","loading","openLoading","onClick","size","shape"]);const[ze,ai]=(0,Pt.useState)(!1);return Pt.createElement(_t.ZP,Oe({onClick:(0,ce.throttle)(he=>yn(void 0,null,function*(){xe&&ai(!0);try{yield Hi(he)}catch(an){console.log("error",an)}xe&&ai(!1)}),2e3,{leading:!0,trailing:!1}),className:ue()(Bt.btn,Bt[`${Dn}-${Ai}`],_e),style:Re,size:Dn,shape:Ai,loading:ze||gi},Ve),Ue)},ui={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"},mi=({className:Xi,style:Ni,children:_e=null,onClick:Re,title:Ue})=>Pt.createElement("div",{className:ue()(ui.head,Xi),style:Ni},Pt.createElement("span",{className:"primary-hover",onClick:Re},Pt.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),Pt.createElement("b",{title:Ue},Ue),Pt.createElement("div",{className:ui.node},_e)),Mi={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"},ki=({confirmShow:Xi=!0,confirmTitle:Ni,confirmClick:_e,cancelShow:Re=!0,cancelTitle:Ue,cancelClick:gi,className:xe,style:Hi,confirmLoading:Dn=!1})=>Pt.createElement("div",{className:ue()(Mi.btns,xe),style:Hi},Xi&&Pt.createElement(_t.ZP,{loading:Dn,onClick:_e,type:"primary",className:Mi.confirm},Ni),Re&&Pt.createElement(_t.ZP,{onClick:gi,className:Mi.cancel},Ue)),Ri={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"},Or=({className:Xi,style:Ni={},LeftContent:_e,children:Re,RightContent:Ue})=>Pt.createElement("div",{className:ue()(Ri.fixedBottom,Xi),style:Ni},Pt.createElement("div",{className:Ri.wrap},Pt.createElement("div",{className:Ri.left},_e),Pt.createElement("div",{className:Ri.center},Re),Pt.createElement("div",{className:Ri.right},Ue))),qi={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"},xr=({className:Xi,style:Ni={},dataSource:_e=[]})=>Pt.createElement("div",{className:ue()(qi.crumbs,Xi),style:Ni},_e.map((Re,Ue)=>Ue<_e.length-1?Pt.createElement(Pt.Fragment,{key:Ue},Re.path||Re.onClick?Pt.createElement("span",{className:qi.hover,onClick:Re!=null&&Re.onClick?Re.onClick:()=>Oi.history.push(Re.path)},Re.name):Pt.createElement("span",null,Re.name),Pt.createElement("span",null,"\xA0",">","\xA0")):Pt.createElement("span",{key:Ue,style:{color:"#5F6368"}},Re.name))),Wr=Qt(11938),$i=Object.defineProperty,eo=Object.defineProperties,fo=Object.getOwnPropertyDescriptors,Zr=Object.getOwnPropertySymbols,Fr=Object.prototype.hasOwnProperty,ro=Object.prototype.propertyIsEnumerable,Tt=(Xi,Ni,_e)=>Ni in Xi?$i(Xi,Ni,{enumerable:!0,configurable:!0,writable:!0,value:_e}):Xi[Ni]=_e,Gi=(Xi,Ni)=>{for(var _e in Ni||(Ni={}))Fr.call(Ni,_e)&&Tt(Xi,_e,Ni[_e]);if(Zr)for(var _e of Zr(Ni))ro.call(Ni,_e)&&Tt(Xi,_e,Ni[_e]);return Xi},Zi=(Xi,Ni)=>eo(Xi,fo(Ni)),Yr=(Xi,Ni)=>{var _e={};for(var Re in Xi)Fr.call(Xi,Re)&&Ni.indexOf(Re)<0&&(_e[Re]=Xi[Re]);if(Xi!=null&&Zr)for(var Re of Zr(Xi))Ni.indexOf(Re)<0&&ro.call(Xi,Re)&&(_e[Re]=Xi[Re]);return _e};const{Countdown:bo}=Wr.default;var $o=Xi=>{var Ni=Xi,{onChange:_e}=Ni,Re=Yr(Ni,["onChange"]);const[Ue,gi]=(0,Pt.useState)(null);(0,Pt.useEffect)(()=>{typeof Ue=="number"&&Ue>=0&&_e(Ue)},[Ue]);const xe=Hi=>{const Dn=Math.floor(Hi/1e3);gi(Dn)};return Pt.createElement(bo,Zi(Gi({},Re),{onChange:xe}))}},47458:function(Cn,We,Qt){"use strict";Qt.d(We,{Z:function(){return te}});var Pt=Qt(59301);function te(Ae,Be){const de=(0,Pt.useRef)();(0,Pt.useEffect)(()=>{de.current=Ae}),(0,Pt.useEffect)(()=>{function Ht(){de.current()}if(Be!==null){let ne=setInterval(Ht,Be);return()=>clearInterval(ne)}},[Be])}},240:function(Cn,We,Qt){"use strict";Qt.r(We),Qt.d(We,{default:function(){return li}});var Pt=Qt(59301),te=Qt(61186),Ae=Qt.n(te),Be=Qt(86129),de=Qt.n(Be),Ht=Qt(52430),ne=Qt(44993),ue=Qt(62957),ce=Qt(6767),Vt=Qt(458),De=Qt(91882),Jt=Qt(77019),be=Qt(5269),It=Qt(99571),nt=Qt(25399),et=Qt(37285),At=Qt(37568),at=Qt(54172),ct=Qt(82326),pt=Qt(13747),xt=Qt(27812),bt=Qt(95869),Rt=Qt(87169),Ot=Qt(26227),Wt=Qt(13952),Zt=Qt(64681),$t=Qt(89299),Ce=Qt(42441),ge={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"},nn={normal:{opacity:.8,shadowBlur:10,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",color:"#2e65ad"}};const qe=({shixunHomeworks:Xe,data:sn,globalSetting:wn,loading:Mn,dispatch:ii})=>{var _i;const{shixunWorkReport:Ki}=Xe;let Ti=((_i=sn==null?void 0:sn.efficiency_list)==null?void 0:_i.length)-parseInt(sn==null?void 0:sn.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===Ki.username?"\u59D3\u540D\uFF1A"+Ki.username+"<br/>\u5B66\u53F7\uFF1A "+Ki.user_id+"<br/>\u6548\u7387\uFF1A"+(sn==null?void 0:sn.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:sn==null?void 0:sn.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:Ki.username,xAxis:Ti,yAxis:sn==null?void 0:sn.myself_eff[1],value:sn==null?void 0:sn.myself_eff[1]}],itemStyle:{normal:{color:"#c23531"}}},markLine:{lineStyle:{normal:{type:"solid",color:"#ff6800"}},data:[{type:"average",name:"\u4E2D\u4F4D\u503C"}]}}]}),Lr=()=>({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 Ur=cr.value;if(cr.name===Ki.username)return"\u59D3\u540D\uFF1A"+Ki.username+"<br/>\u5B66\u53F7\uFF1A "+Ki.user_id+"<br/>\u5F97\u5206\uFF1A"+(sn==null?void 0:sn.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:nn,data:sn==null?void 0:sn.consume_list,symbolSize:function(cr){return Math.round(cr[2])},markPoint:{data:[{name:Ki.username,xAxis:sn==null?void 0:sn.myself_object[0],yAxis:sn==null?void 0:sn.myself_object[1],value:sn==null?void 0:sn.myself_object[1]}],itemStyle:{normal:{color:"#c23531"}}}}]});return Pt.createElement(Pt.Fragment,null,Pt.createElement("aside",{className:"ml60 pr30"},Pt.createElement(Jt.Z,null,Pt.createElement(be.Z,{flex:"800px"},Pt.createElement(Ce.Z,{style:{width:750,height:580},option:en()})),Pt.createElement(be.Z,{flex:"1"},Pt.createElement("aside",{className:ge.rightInfo},Pt.createElement("ul",null,Pt.createElement("li",null,Pt.createElement("span",null,"\u59D3\u540D")," ",Pt.createElement("span",{className:"ml30"},Ki.username)),Pt.createElement("li",null,Pt.createElement("span",null,"\u5B66\u53F7")," ",Pt.createElement("span",{className:"ml30"},Ki.student_id||"--")),Pt.createElement("li",null,Pt.createElement("span",null,"\u5B66\u4E60\u6548\u7387")," ",Pt.createElement("span",{className:"ml30 c-orange"},sn==null?void 0:sn.myself_eff[1])),Pt.createElement("li",null,Pt.createElement("span",null,"\u5F53\u524D\u6392\u540D")," ",Pt.createElement("span",{className:"ml30 c-orange"},sn==null?void 0:sn.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(Jt.Z,null,Pt.createElement(be.Z,{flex:"800px"},Pt.createElement(Ce.Z,{style:{width:750,height:580},option:Lr()})),Pt.createElement(be.Z,{flex:"1"},Pt.createElement("aside",{className:ge.rightInfo},Pt.createElement("ul",null,Pt.createElement("li",null,Pt.createElement("span",null,"\u59D3\u540D")," ",Pt.createElement("span",{className:"ml30"},Ki.username)),Pt.createElement("li",null,Pt.createElement("span",null,"\u5B66\u53F7")," ",Pt.createElement("span",{className:"ml30"},Ki.student_id||"--")),Pt.createElement("li",null,Pt.createElement("span",null,"\u80FD\u529B")," ",Pt.createElement("span",{className:"ml30 c-orange"},sn==null?void 0:sn.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 En=(0,ne.connect)(({shixunHomeworks:Xe,loading:sn,globalSetting:wn})=>({shixunHomeworks:Xe,globalSetting:wn,loading:sn.effects}))(qe),Tn=Qt(58531),bn=Qt(71051),ni=({defaultValue:Xe,onBlur:sn,max:wn,className:Mn="game-score"})=>{const[ii,_i]=(0,Pt.useState)(Xe);(0,Pt.useEffect)(()=>{_i(Xe)},[Xe]);function Ki(en){_i(en)}function Ti(){ii!==Xe&&sn(ii>wn?wn:ii)}return Pt.createElement(bn.Z,{max:wn,min:0,className:Mn,value:ii,onChange:Ki,onBlur:Ti})},In=Qt(4213),Ee={md:"md___TEmcT"},ie=Qt(59301),Pn=Object.defineProperty,pi=Object.defineProperties,Wn=Object.getOwnPropertyDescriptors,un=Object.getOwnPropertySymbols,Zn=Object.prototype.hasOwnProperty,si=Object.prototype.propertyIsEnumerable,Oi=(Xe,sn,wn)=>sn in Xe?Pn(Xe,sn,{enumerable:!0,configurable:!0,writable:!0,value:wn}):Xe[sn]=wn,on=(Xe,sn)=>{for(var wn in sn||(sn={}))Zn.call(sn,wn)&&Oi(Xe,wn,sn[wn]);if(un)for(var wn of un(sn))si.call(sn,wn)&&Oi(Xe,wn,sn[wn]);return Xe},ri=(Xe,sn)=>pi(Xe,Wn(sn));const Le=ct.default.Option,fi={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,enableSplitViewResizing:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1};var Pi=(Xe=>(Xe[Xe.SET_PATH=0]="SET_PATH",Xe[Xe.GET_PASSED_CONTENT=1]="GET_PASSED_CONTENT",Xe))(Pi||{});function jt(Xe,sn){switch(sn.type){case 0:return ri(on({},Xe),{selectedPath:sn.payload});case 1:return ri(on({},Xe),{passedContent:sn.payload});default:throw new Error}}var Mt=({path:Xe,game_id:sn,onPathChange:wn,autoHeight:Mn,diff_code_count:ii,data:_i,game_codes_cn:Ki})=>{var Ti,en,Lr,cr;const Ur=Xe.split("\uFF1B").filter(Yi=>!!Yi),[rn,oi]=(0,Pt.useReducer)(jt,{selectedPath:Ur[0],passedContent:{language:"python",content:""}}),{selectedPath:Ci,passedContent:bi}=rn;function xi(Yi){oi({type:0,payload:Yi})}const Ei={\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 ie.createElement(ie.Fragment,null,ie.createElement("h2",null," ",ie.createElement("span",null,Ki,ie.createElement(nt.Z,{title:ie.createElement("div",null,ie.createElement("div",null,"\u4EE3\u7801\u5C55\u793A\u89C4\u5219\uFF1A"),ie.createElement("div",null,"1.\u5C55\u793A\u5B66\u5458\u5728\u4F5C\u4E1A\u622A\u6B62\u524D\u5F97\u5206\u6700\u9AD8\u7684\u4EE3\u7801\u7248\u672C\u3002"),ie.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"),ie.createElement("div",null," 3.\u4F5C\u4E1A\u622A\u6B62\u540E\u63D0\u4EA4\u7684\u4EE3\u7801\u5C06\u4E0D\u4E88\u5C55\u793A\u3002"))},ie.createElement("i",{style:{marginLeft:10,color:"#3061D0",fontSize:16},className:"iconfont icon-tishixiaowenhao"}))),ii&&ie.createElement("span",{style:{marginLeft:"50px"}},"\u4EE3\u7801\u4FEE\u6539\u884C\u6570 ",ii),ie.createElement("span",null,ie.createElement(ct.default,{style:{width:200},value:Ci,onChange:xi}," ",Ur.map(Yi=>ie.createElement(Le,{key:Yi,value:Yi},Yi))," "))," "),(Ci==null?void 0:Ci.split(".")[1])==="md"&&ie.createElement(In.Z,{height:300,autoHeight:Mn,defaultValue:((en=(Ti=_i==null?void 0:_i.filter(Yi=>Yi.path===Ci))==null?void 0:Ti[0])==null?void 0:en.content)||"",className:Ee.md}),(Ci==null?void 0:Ci.split(".")[1])!=="md"&&ie.createElement(Tn.ZP,{height:300,language:bi.language,value:((cr=(Lr=_i==null?void 0:_i.filter(Yi=>Yi.path===Ci))==null?void 0:Lr[0])==null?void 0:cr.content)||"",autoHeight:Mn,theme:"default",isCopy:!0,options:fi}))},mt=Qt(54877),vt=Qt(12911),Lt=Qt.n(vt),Bt=Object.defineProperty,_t=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable,Ye=(Xe,sn,wn)=>sn in Xe?Bt(Xe,sn,{enumerable:!0,configurable:!0,writable:!0,value:wn}):Xe[sn]=wn,Fe=(Xe,sn)=>{for(var wn in sn||(sn={}))Me.call(sn,wn)&&Ye(Xe,wn,sn[wn]);if(_t)for(var wn of _t(sn))ye.call(sn,wn)&&Ye(Xe,wn,sn[wn]);return Xe};const Te=Xe=>React.createElement("svg",Fe({className:"scai_svg__icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:16,height:16},Xe),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 Oe="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxwYXRoIGQ9Ik01MTIgMzI3LjY4YzI0NS43NiAwIDQ0NS40NCAxNTMuNiA0NDUuNDQgMzQ4LjE2Qzk1Ny40NCA4NzAuNCA3NTcuNzYgMTAyNCA1MTIgMTAyNGMtMjQ1Ljc2LTUuMTItNDQ1LjQ0LTE1My42LTQ0NS40NC0zNDguMTYgMC0xOTQuNTYgMTk5LjY4LTM0OC4xNiA0NDUuNDQtMzQ4LjE2eiIgZmlsbD0iI0RCRENGRiIvPjxwYXRoIGQ9Ik02NDUuMTIgOTQ3LjJjMTE3Ljc2LTEwLjI0IDE1OC43Mi0xNDMuMzYgMTYzLjg0LTI2Ni4yNCAwLTEyOC0xMjgtMTc0LjA4LTI5MS44NC0xNzQuMDgtMTYzLjg0IDAtMjkxLjg0IDQ2LjA4LTI5MS44NCAxNzQuMDggMCAxMTIuNjQgMzUuODQgMjQwLjY0IDE0My4zNiAyNjEuMTIgMzAuNzIgNS4xMiAyNjEuMTIgMTAuMjQgMjc2LjQ4IDUuMTJ6IiBmaWxsPSIjMTExQUNDIi8+PHBhdGggZD0iTTQwNC40OCA2ODYuMDhjMTUuMzYgMCAyNS42IDEwLjI0IDI1LjYgMjUuNnY2MS40NGMwIDE1LjM2LTEwLjI0IDI1LjYtMjUuNiAyNS42LTE1LjM2IDAtMjUuNi0xMC4yNC0yNS42LTI1LjZ2LTYxLjQ0Yy01LjEyLTEwLjI0IDEwLjI0LTI1LjYgMjUuNi0yNS42em0yMjAuMTYgMGMxNS4zNiAwIDI1LjYgMTAuMjQgMjUuNiAyNS42djYxLjQ0YzAgMTUuMzYtMTAuMjQgMjUuNi0yNS42IDI1LjYtMTUuMzYgMC0yNS42LTEwLjI0LTI1LjYtMjUuNnYtNjEuNDRjMC0xMC4yNCAxMC4yNC0yNS42IDI1LjYtMjUuNnoiIGZpbGw9IiNGRkYiLz48cGF0aCBkPSJNOTE2LjQ4IDUyNy4zNmM1Ni4zMiAwIDEwNy41MiA3MS42OCAxMDcuNTIgMTUzLjYgMCA4Ny4wNC02MS40NCAxNTMuNi0xMTcuNzYgMTUzLjYgMCAwIDUxLjItNzYuOCA1MS4yLTE1OC43MnMtNDAuOTYtMTQ4LjQ4LTQwLjk2LTE0OC40OHptLTgwOC45NiA1LjEyLTUuMTIgNS4xMmMtMTAuMjQgMjAuNDgtMzUuODQgNzYuOC0zNS44NCAxMzguMjQgMCA3Ni44IDM1Ljg0IDEzOC4yNCA1MS4yIDE1OC43MkM2MS40NCA4MzQuNTYgMCA3NjggMCA2ODAuOTZjMC04MS45MiA1MS4yLTE0OC40OCAxMDcuNTItMTQ4LjQ4eiIgZmlsbD0iIzgxODdGRiIvPjxwYXRoIGQ9Ik01MTIgMGMyMC40OCAwIDMwLjcyIDE1LjM2IDMwLjcyIDMwLjcydjIyMC4xNmMwIDIwLjQ4LTE1LjM2IDMwLjcyLTMwLjcyIDMwLjcycy0zMC43Mi0xMC4yNC0zMC43Mi0zMC43MlYzMC43MkM0ODEuMjggMTUuMzYgNDk2LjY0IDAgNTEyIDB6IiBmaWxsPSIjNzAxQ0RDIi8+PHBhdGggZD0iTTM4NCA0Ni4wOGMyMC40OCAwIDMwLjcyIDE1LjM2IDMwLjcyIDMwLjcydjEzMy4xMmMwIDIwLjQ4LTE1LjM2IDMwLjcyLTMwLjcyIDMwLjcycy0zNS44NC0xNS4zNi0zNS44NC0zMC43MlY3Ni44YzAtMjAuNDggMTUuMzYtMzAuNzIgMzUuODQtMzAuNzJ6IiBmaWxsPSIjMzcxQ0RDIi8+PHBhdGggZD0iTTY0NS4xMiA0Ni4wOGMyMC40OCAwIDMwLjcyIDE1LjM2IDMwLjcyIDMwLjcydjEzMy4xMmMwIDIwLjQ4LTE1LjM2IDMwLjcyLTMwLjcyIDMwLjcycy0zMC43Mi0xNS4zNi0zMC43Mi0zMC43MlY3Ni44YzAtMjAuNDggMTUuMzYtMzAuNzIgMzAuNzItMzAuNzJ6IiBmaWxsPSIjQUIyRkYwIi8+PHBhdGggZD0iTTI1MC44OCA4Ny4wNGMyMC40OCAwIDMwLjcyIDE1LjM2IDMwLjcyIDMwLjcydjQ2LjA4YzAgMjAuNDgtMTUuMzYgMzAuNzItMzAuNzIgMzAuNzJzLTM1Ljg0LTEwLjI0LTM1Ljg0LTMwLjcydi00MC45NmMwLTIwLjQ4IDE1LjM2LTM1Ljg0IDM1Ljg0LTM1Ljg0eiIgZmlsbD0iIzZENTdGMiIvPjxwYXRoIGQ9Ik03NzguMjQgODcuMDRjMjAuNDggMCAzMC43MiAxNS4zNiAzMC43MiAzMC43MnY0Ni4wOGMwIDIwLjQ4LTE1LjM2IDMwLjcyLTMwLjcyIDMwLjcycy0zMC43Mi0xNS4zNi0zMC43Mi0zMC43MnYtNDAuOTZjMC0yMC40OCAxNS4zNi0zNS44NCAzMC43Mi0zNS44NHoiIGZpbGw9IiNDODZGRkEiLz48L3N2Zz4=",$e=Qt(48102),yn=Qt(78380),Kn=Object.defineProperty,Sn=Object.defineProperties,ui=Object.getOwnPropertyDescriptors,ci=Object.getOwnPropertySymbols,mi=Object.prototype.hasOwnProperty,Mi=Object.prototype.propertyIsEnumerable,yr=(Xe,sn,wn)=>sn in Xe?Kn(Xe,sn,{enumerable:!0,configurable:!0,writable:!0,value:wn}):Xe[sn]=wn,ki=(Xe,sn)=>{for(var wn in sn||(sn={}))mi.call(sn,wn)&&yr(Xe,wn,sn[wn]);if(ci)for(var wn of ci(sn))Mi.call(sn,wn)&&yr(Xe,wn,sn[wn]);return Xe},Ri=(Xe,sn)=>Sn(Xe,ui(sn)),Vi=(Xe,sn,wn)=>new Promise((Mn,ii)=>{var _i=en=>{try{Ti(wn.next(en))}catch(Lr){ii(Lr)}},Ki=en=>{try{Ti(wn.throw(en))}catch(Lr){ii(Lr)}},Ti=en=>en.done?Mn(en.value):Promise.resolve(en.value).then(_i,Ki);Ti((wn=wn.apply(Xe,sn)).next())});const Or=({shixunHomeworks:Xe,autoHeight:sn,classroomList:wn,dispatch:Mn})=>{var ii,_i,Ki,Ti,en,Lr,cr,Ur;const{shixunWorkReport:rn}=Xe,{stage_list:oi,work_id:Ci,ai_code_evaluation_promote:bi}=rn,[xi,Ei]=(0,Pt.useState)(!1),[Yi,sr]=(0,Pt.useState)(!0),[oe,ae]=(0,Pt.useState)({left:0,top:0,bottom:0,right:0}),ee=(0,Pt.useRef)(null),[je,Se]=(0,Pt.useState)(!1),[An,Nn]=(0,Pt.useState)(""),Vn=(0,Pt.useRef)(null),Qi=(tn,gn)=>{var mn;const{clientWidth:xn,clientHeight:hi}=window.document.documentElement,zn=(mn=ee.current)==null?void 0:mn.getBoundingClientRect();zn&&ae({left:-zn.left+gn.x,right:xn-(zn.right-gn.x),top:-zn.top+gn.y,bottom:hi-(zn.bottom-gn.y)})},Si=(0,ne.useParams)(),Ne=(0,Zt.GJ)(),wi={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1};(0,Pt.useEffect)(()=>{console.log(Si)},[]);const ke=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"position",width:"100px"},{title:"\u8BE6\u7EC6\u4FE1\u606F",dataIndex:"output_detail",render:(tn,gn,mn)=>Pt.createElement("div",null,tn,gn.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:tn=>Ae()(tn).format("YYYY-MM-DD HH:mm")},{title:"\u64CD\u4F5C",width:"80px",dataIndex:"query_index",render:(tn,gn)=>Pt.createElement("span",{className:"c-blue current",onClick:()=>Vi(void 0,null,function*(){var mn,xn;const hi=yield(0,mt.Lk)(gn.game_identifier,{path:(xn=(mn=gn.path)==null?void 0:mn.replace(/\/g,";"))==null?void 0:xn.split(";")[0],query_index:gn.query_index,homework_common_id:Si.categoryId});(hi==null?void 0:hi.status)===0&&(Se(hi),Ei(!0))})},gn.query_index?"\u67E5\u770B\u4EE3\u7801":"")}],hn=[{title:"\u8C03\u5206\u7528\u6237",dataIndex:["user","name"],width:350,render:(tn,gn)=>{var mn;return Pt.createElement("span",null,Pt.createElement("img",{width:30,height:30,style:{borderRadius:"50%",marginRight:"10px"},src:Wt.Z.IMG_SERVER+"/images/"+((mn=gn==null?void 0:gn.user)==null?void 0:mn.image_url)}),tn)}},{title:"\u8C03\u5206\u524D",dataIndex:"old_score",width:270,render:tn=>Pt.createElement("span",null,"\u4FEE\u6B63\u524D\u5206\u6570\uFF1A",tn,"\u5206")},{title:"\u8C03\u5206\u540E",dataIndex:"score",width:270,render:tn=>Pt.createElement("span",null,"\u4FEE\u6B63\u540E\u5206\u6570\uFF1A",tn,"\u5206")},{title:"\u8C03\u5206\u65F6\u95F4",dataIndex:"created_at",align:"right",render:tn=>Pt.createElement("span",null,"\u4FEE\u6B63\u65F6\u95F4\uFF1A",tn?Ae()(tn).format("YYYY-MM-DD HH:mm"):"--")}];function Qe(tn,gn){return Vi(this,null,function*(){const{challenge_id:mn}=oi[tn],xn=yield Mn({type:"shixunHomeworks/changeScore",payload:{categoryId:Si.homeworkId,type:"report",score:gn,challenge_id:mn}});yield Mn({type:"shixunHomeworks/getShixunWorkReport",payload:ki({},Si)}),xn.status===0&&ce.ZP.success("\u64CD\u4F5C\u6210\u529F")})}function Ut(tn,gn){return(0,Ht.U2)(`student_works/${Ci}/rep_passed_content.json`,{path:gn,game_id:tn})}const[pn,fn]=(0,Pt.useState)((ii=rn==null?void 0:rn.shixun_detail)==null?void 0:ii.map(tn=>Ri(ki({},tn),{commentEdit:!1}))),Qn=tn=>tn.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,"`$&`"),[Gn,jn]=(0,Pt.useState)(!1),dn=(tn,gn)=>Vi(void 0,null,function*(){var mn,xn;jn(!0),Vn.current=new $e.Z(Wt.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:bi,shixun_id:rn==null?void 0:rn.myshixun_identifier,game_id:tn==null?void 0:tn.id,source:"shixun",is_chat:!1,type:9,description:tn==null?void 0:tn.challenge_description,query:(xn=(mn=tn==null?void 0:tn.game_codes)==null?void 0:mn[0])==null?void 0:xn.content,homework_common_id:Si.categoryId}),yield new Promise((hi,zn)=>{Vn.current.on("data",Xn=>{const cn=[...pn];cn[gn].comment=Qn(Xn==null?void 0:Xn.full),fn(cn)}),Vn.current.on("done",()=>Vi(void 0,null,function*(){var Xn;jn(!1);const cn=[...pn],ti=yield(0,Ht.ZP)(`/api/student_works/${Si==null?void 0:Si.homeworkId}/challenge_comment`,{method:"put",body:{challenge_id:tn==null?void 0:tn.challenge_id,comment:cn[gn].comment}});if((ti==null?void 0:ti.status)==0){ce.ZP.success("\u8BC4\u4EF7\u6210\u529F");const Di=[...pn];Di[gn].comment_updated_at=(Xn=ti==null?void 0:ti.data)==null?void 0:Xn.comment_updated_at,fn(Di)}})),Vn.current.startStream()})});return Pt.createElement(Pt.Fragment,null,pn==null?void 0:pn.map(function(tn,gn){var mn,xn;return Pt.createElement("div",{key:gn},Pt.createElement("aside",{className:"pl30 pr30",key:gn},Pt.createElement("div",{className:`${ge.shixunTitle} mt10`},Pt.createElement("div",null,Pt.createElement("span",{className:"fa fa-code "}),Pt.createElement("strong",{className:"c-black"},"\u7B2C",gn+1,"\u5173 ",Pt.createElement(ne.Link,{className:"c-black",target:"_blank",to:`/tasks/${Si.coursesId}/${Si.categoryId}/${tn.game_identifier}`},tn.subject))),Ne?Pt.createElement("span",null,"\u8C03\u5206\uFF1A",Pt.createElement(ni,{className:"game-score",max:oi[gn].game_score_full,defaultValue:oi[gn].game_score,onBlur:hi=>{var zn;if((0,Zt.Rm)()&&!((zn=wn.AssistantObject.practice)!=null&&zn.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}Qe(gn,hi)}})):null),Pt.createElement("div",{className:"font16 mt10"},tn.st===0&&(tn.path?typeof(tn==null?void 0:tn.game_codes_cn)=="string"?Pt.createElement("aside",{className:ge.shixunWrp},Pt.createElement(Mt,{game_codes_cn:tn==null?void 0:tn.game_codes_cn,autoHeight:sn,path:tn.path,game_id:tn.id,data:tn.game_codes,diff_code_count:tn.diff_code_count,onPathChange:Ut})):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"),tn.st===1&&(tn.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"},(mn=tn.outputs)!=null&&mn.length?Pt.createElement(at.default,{columns:ke,pagination:{hideOnSinglePage:!0},dataSource:tn.outputs.map(hi=>ki(ki({},tn),hi))}):"\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"),!(tn!=null&&tn.commentEdit)&&!(0,Zt.dE)()&&(tn!=null&&tn.comment?Pt.createElement(Pt.Fragment,null,Pt.createElement("div",{style:{color:"#666666",fontSize:"12px",marginLeft:"auto"}},"\u6700\u65B0\u8BC4\u4EF7\u65F6\u95F4\uFF1A",tn!=null&&tn.comment_updated_at?Ae()(tn==null?void 0:tn.comment_updated_at).format("YYYY-MM-DD HH:mm:ss"):"--"),Pt.createElement("div",{style:{color:"#3061D0",fontSize:"14px",marginLeft:"40px",cursor:"pointer"},onClick:()=>Vi(this,null,function*(){Gn?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:()=>Vi(this,null,function*(){dn(tn,gn)})})})},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:()=>Vi(this,null,function*(){Gn?ce.ZP.warning("\u6B63\u5728\u751F\u6210\u8BC4\u8BBA\u4E2D\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):dn(tn,gn)})},Pt.createElement("img",{src:Oe,className:"mr8"}),"\u4E00\u952EAI\u751F\u6210")),!(tn!=null&&tn.commentEdit)&&!(0,Zt.dE)()&&Pt.createElement("div",{style:{color:"#3061D0",fontSize:"14px",marginLeft:"20px",cursor:"pointer"},onClick:()=>{const hi=[...pn];hi[gn].commentEdit=!0,fn(hi),Nn(tn==null?void 0:tn.comment)}},Pt.createElement("i",{className:"iconfont icon-bianji-moren mr8 font14"}),"\u7F16\u8F91"),(tn==null?void 0:tn.commentEdit)&&Pt.createElement(Pt.Fragment,null,Pt.createElement("div",{className:ge.pj_close,onClick:()=>{const hi=[...pn];hi[gn].commentEdit=!1,fn(hi)}},"\u53D6\u6D88"),Pt.createElement("div",{className:ge.pj_save,onClick:()=>Vi(this,null,function*(){var hi;const zn=yield(0,Ht.ZP)(`/api/student_works/${Si==null?void 0:Si.homeworkId}/challenge_comment`,{method:"put",body:{challenge_id:tn==null?void 0:tn.challenge_id,comment:An}});if((zn==null?void 0:zn.status)==0){ce.ZP.success("\u8BC4\u4EF7\u6210\u529F");const Xn=[...pn];Xn[gn].commentEdit=!1,Xn[gn].comment=An,Xn[gn].comment_updated_at=(hi=zn==null?void 0:zn.data)==null?void 0:hi.comment_updated_at,fn(Xn)}})},"\u4FDD\u5B58"))),!(tn!=null&&tn.commentEdit)&&Pt.createElement("div",{className:ge.pingjia},tn!=null&&tn.comment?Pt.createElement(yn.Z,{value:tn==null?void 0:tn.comment,style:{fontSize:"14px"}}):"\u6682\u65E0\u8BC4\u4EF7~"),(tn==null?void 0:tn.commentEdit)&&Pt.createElement(At.default.TextArea,{defaultValue:An,style:{borderRadius:"5px",marginTop:"10px"},rows:5,onChange:hi=>Nn(hi.target.value)}))),Pt.createElement("aside",{className:"mt10 font16"},((xn=tn==null?void 0:tn.adjust_review_score_list)==null?void 0:xn.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:hn,pagination:{hideOnSinglePage:!0},dataSource:tn.adjust_review_score_list,showHeader:!1})))))}),Pt.createElement(ue.default,{open:xi,width:900,okText:"\u5173\u95ED",cancelButtonProps:{style:{display:"none"}},onOk:()=>{Se({}),Ei(!1)},onCancel:()=>{Se({}),Ei(!1)},title:Pt.createElement("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>{Yi&&sr(!1)},onMouseOut:()=>{sr(!0)},onFocus:()=>{},onBlur:()=>{}},"\u4EE3\u7801\u5185\u5BB9"),modalRender:tn=>Pt.createElement(Lt(),{disabled:Yi,bounds:oe,nodeRef:ee,onStart:(gn,mn)=>Qi(gn,mn)},Pt.createElement("div",{ref:ee},tn))},Pt.createElement("div",{style:{background:"#F6F7F9",padding:"30px 20px",marginBottom:20}},Pt.createElement("div",{style:{display:"flex",alignItems:"center"}},((_i=je==null?void 0:je.data)==null?void 0:_i.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:((Ki=je==null?void 0:je.data)==null?void 0:Ki.output_detail)==="\u8BC4\u6D4B\u901A\u8FC7"?"#0B9953":"#E21010",fontSize:16,fontWeight:600}},(Ti=je==null?void 0:je.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=je==null?void 0:je.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"}},(Lr=je==null?void 0:je.data)==null?void 0:Lr.ts_time,"s")),Pt.createElement("div",null,Pt.createElement("span",{style:{color:"#6A7283"}},"\u5185\u5B58"),Pt.createElement("span",{style:{marginLeft:8,color:"#232B40"}},(cr=je==null?void 0:je.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"}},((Ur=je==null?void 0:je.data)==null?void 0:Ur.test_set_passed_rate)*100,"%")))),Pt.createElement(Tn.ZP,{height:500,autoHeight:sn,language:"python",theme:"default",isCopy:!0,value:decodeURIComponent(escape(window.atob((je==null?void 0:je.content)||""))),options:wi})))};var qi=(0,ne.connect)(({shixunHomeworks:Xe,loading:sn,globalSetting:wn,classroomList:Mn})=>({shixunHomeworks:Xe,globalSetting:wn,loading:sn.effects,classroomList:Mn}))(Or),Cr=Qt(28284),xr={greyText:"greyText___nOpNq",info:"info___nBB3c",label:"label___P6my8",blackContent:"blackContent___O4HnS",orangeContent:"orangeContent___JBF44",inputLabel:"inputLabel___B2GAs",tableTitle:"tableTitle___IqAxM",scoreTable:"scoreTable___RJvpU"},Wr=Qt(71465),$i=Qt(59301),eo=Object.defineProperty,fo=Object.getOwnPropertySymbols,Zr=Object.prototype.hasOwnProperty,Fr=Object.prototype.propertyIsEnumerable,ro=(Xe,sn,wn)=>sn in Xe?eo(Xe,sn,{enumerable:!0,configurable:!0,writable:!0,value:wn}):Xe[sn]=wn,Tt=(Xe,sn)=>{for(var wn in sn||(sn={}))Zr.call(sn,wn)&&ro(Xe,wn,sn[wn]);if(fo)for(var wn of fo(sn))Fr.call(sn,wn)&&ro(Xe,wn,sn[wn]);return Xe},Gi=(Xe,sn,wn)=>new Promise((Mn,ii)=>{var _i=en=>{try{Ti(wn.next(en))}catch(Lr){ii(Lr)}},Ki=en=>{try{Ti(wn.throw(en))}catch(Lr){ii(Lr)}},Ti=en=>en.done?Mn(en.value):Promise.resolve(en.value).then(_i,Ki);Ti((wn=wn.apply(Xe,sn)).next())});const Zi=({shixunHomeworks:Xe,dispatch:sn,classroomList:wn})=>{const{shixunWorkReport:Mn}=Xe,ii=(0,ne.useParams)(),[_i,Ki]=(0,Pt.useState)(!1),[Ti]=Cr.default.useForm(),[en,Lr]=ue.default.useModal(),[cr,Ur]=(0,Pt.useState)(!1),[rn,oi]=(0,Pt.useState)(!1);(0,Pt.useEffect)(()=>{var xi,Ei,Yi,sr;Xe.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4"&&Ti.setFieldsValue({comment:(Ei=(xi=Xe.actionTabs.selectArrs)==null?void 0:xi.data)==null?void 0:Ei.work_comment,hidden_comment:(sr=(Yi=Xe.actionTabs.selectArrs)==null?void 0:Yi.data)==null?void 0:sr.work_comment_hidden})},[Xe.actionTabs.key]);const Ci=()=>Gi(void 0,null,function*(){const xi=Ti.getFieldsValue();(yield(0,Ht.ZP)(`/api/student_works/${ii.homeworkId}/shixun_work_comment.json`,{method:"post",body:{hidden_comment:xi.hidden_comment,comment:xi.comment}})).status===0&&(ce.ZP.success("\u8BC4\u9605\u6210\u529F"),Ti.resetFields(),sn({type:"shixunHomeworks/setActionTabs",payload:{}}),sn({type:"shixunHomeworks/getShixunWorkReport",payload:Tt({},ii)}))}),bi=[{title:"\u5173\u5361",dataIndex:"name",render:(xi,Ei,Yi)=>Yi+1},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",render:(xi,Ei,Yi)=>$i.createElement("div",null,xi,Ei.complete_status===4&&$i.createElement($t.vA,{status:Ei.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:xi=>xi?"\u662F":"\u5426"},{title:"\u5173\u5361\u5F97\u5206",dataIndex:"game_score",align:"center",render:(xi,Ei)=>$i.createElement("div",null,$i.createElement("span",{style:{color:parseFloat(Ei.game_score_full)!==parseFloat(xi)?"#E30000":"#53C41B"}},xi),"/",Ei.game_score_full)},{title:"\u8C03\u5206",dataIndex:"game_score",align:"center",fixed:"right",render:(xi,Ei)=>(0,Zt.GJ)()?$i.createElement(ni,{max:Ei.game_score_full,defaultValue:parseFloat(xi),onBlur:Yi=>Gi(void 0,null,function*(){var sr,oe;if((0,Zt.Rm)()&&!((sr=wn.AssistantObject.practice)!=null&&sr.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 sn({type:"shixunHomeworks/changeScore",payload:{categoryId:ii.homeworkId,type:"report",score:Yi,challenge_id:Ei.challenge_id}});(oe=Xe==null?void 0:Xe.actionTabs)==null||oe.fn(),yield sn({type:"shixunHomeworks/getShixunWorkReport",payload:Tt({},ii)}),ae.status===0&&ce.ZP.success("\u64CD\u4F5C\u6210\u529F")})}):xi}];return $i.createElement($i.Fragment,null,Lr,$i.createElement(ue.default,{centered:!0,width:1080,title:"\u70B9\u8BC4\u4F5C\u4E1A",open:Xe.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>Gi(void 0,null,function*(){var xi;if((0,Zt.Rm)()&&!((xi=wn.AssistantObject.practice)!=null&&xi.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 Ei=Ti.getFieldsValue();JSON.stringify(Ei)==="{}"||Ei.hidden_comment===""&&Ei.comment===""?Ki(!0):Ci()}),onCancel:()=>{sn({type:"shixunHomeworks/setActionTabs",payload:{}})}},$i.createElement(Jt.Z,{justify:"space-between",className:xr.info},$i.createElement(be.Z,null,$i.createElement("span",{className:`${xr.label} ${xr.greyText}`},"\u59D3\u540D"),$i.createElement("span",{className:xr.blackContent},Mn==null?void 0:Mn.username)),$i.createElement(be.Z,null,$i.createElement("span",{className:`${xr.label} ${xr.greyText}`},"\u5B66\u53F7"),$i.createElement("span",{className:xr.blackContent},(Mn==null?void 0:Mn.student_id)||"--")),$i.createElement(be.Z,null,$i.createElement("span",{className:`${xr.label} ${xr.greyText}`},"\u73ED\u7EA7"),$i.createElement("span",{className:xr.blackContent},(Mn==null?void 0:Mn.group_name)||"--")),$i.createElement(be.Z,null,$i.createElement("span",{className:`${xr.label} ${xr.greyText}`},"\u5173\u5361\u5F97\u5206"),$i.createElement("span",{className:xr.orangeContent},(Mn==null?void 0:Mn.challenge_score)||"--")),$i.createElement(be.Z,null,$i.createElement("span",{className:`${xr.label} ${xr.greyText}`},"\u6548\u7387\u5206"),$i.createElement("span",{className:xr.orangeContent},(Mn==null?void 0:Mn.eff_score)||"--")),$i.createElement(be.Z,null,$i.createElement("span",{className:`${xr.label} ${xr.greyText}`},"\u8865\u4EA4\u6263\u5206"),$i.createElement("span",{className:xr.orangeContent},(Mn==null?void 0:Mn.late_penalty)||"--")),$i.createElement(be.Z,null,$i.createElement("span",{className:`${xr.label} ${xr.greyText}`},"\u6700\u7EC8\u6210\u7EE9"),$i.createElement("span",{className:xr.orangeContent},(Mn==null?void 0:Mn.work_score)||"--"))),$i.createElement(Cr.default,{form:Ti,onChange:()=>{_i&&Ki(!1)}},$i.createElement(Jt.Z,{wrap:!1,align:"middle",justify:"space-between"},$i.createElement(be.Z,null,$i.createElement("div",{className:`${xr.inputLabel} ${xr.greyText}`},"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1")),$i.createElement(be.Z,null,$i.createElement(Wr.Z,{isShowComponent:(0,Zt.G5)(),ModalProps:{open:cr,onCancel:()=>{Ur(!1)}},onDataSelect:(xi,Ei)=>Gi(void 0,[xi,Ei],function*(Yi,{node:sr}){const oe=()=>{Ti.setFieldsValue({comment:sr==null?void 0:sr.value}),Ur(!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()})},$i.createElement(It.ZP,{style:{padding:0,height:"auto"},icon:$i.createElement("i",{className:"iconfont icon-changyongpingyu"}),type:"link",onClick:xi=>{Ur(!0)}},"\u5E38\u7528\u8BC4\u8BED")))),$i.createElement(Cr.default.Item,{name:"comment"},$i.createElement(At.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:3})),$i.createElement(Jt.Z,{wrap:!1,align:"middle",justify:"space-between"},$i.createElement(be.Z,null,$i.createElement("div",{className:`${xr.inputLabel} ${xr.greyText}`},"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1")),$i.createElement(be.Z,null,$i.createElement(Wr.Z,{isShowComponent:(0,Zt.G5)(),ModalProps:{open:rn,onCancel:()=>{oi(!1)}},onDataSelect:(xi,Ei)=>Gi(void 0,[xi,Ei],function*(Yi,{node:sr}){const oe=()=>{Ti.setFieldsValue({hidden_comment:sr==null?void 0:sr.value}),oi(!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()})},$i.createElement(It.ZP,{style:{padding:0,height:"auto"},icon:$i.createElement("i",{className:"iconfont icon-changyongpingyu"}),type:"link",onClick:xi=>{oi(!0)}},"\u5E38\u7528\u8BC4\u8BED")))),$i.createElement(Cr.default.Item,{name:"hidden_comment"},$i.createElement(At.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:3}))),_i&&$i.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A"),$i.createElement("div",{className:xr.tableTitle},"\u5173\u5361\u6210\u7EE9"),$i.createElement(at.default,{className:xr.scoreTable,dataSource:Mn.stage_list,rowKey:"challenge_id",pagination:!1,columns:bi,scroll:{x:"max-content"}})))};var Yr=(0,ne.connect)(({shixunHomeworks:Xe,classroomList:sn})=>({shixunHomeworks:Xe,classroomList:sn}))(Zi),bo=Qt(20471),ko=Qt(91605),$o=Qt(44164),Xi=Qt.n($o),Ni={wrap:"wrap___LZOi9",line:"line___oju0L"},_e=Qt(5423),Ue=({detailData:Xe})=>{var sn;return Pt.createElement("div",{className:Ni.wrap},Pt.createElement(_e.ij,{hideBar:!0,actionAnalysis:!0,loading:!1,emptyData:[(0,_e.Uf)(Xe),(Xe==null?void 0:Xe.photos)||[]],title:"\u5B9E\u8BAD\u5B66\u4E60\u5206\u6790",noDataText:"\u8BE5\u5B66\u751F\u65E0\u5B66\u4E60\u884C\u4E3A\u5206\u6790\u6570\u636E"},Pt.createElement(_e.ZP,{hideBar:!0,title:"\u5B9E\u8BAD\u5B66\u4E60\u5206\u6790",data:(0,_e.Uf)(Xe)}),!!((sn=Xe==null?void 0:Xe.photos)!=null&&sn.length)&&Pt.createElement(Pt.Fragment,null,Pt.createElement("div",{className:Ni.line}),Pt.createElement(_e._s,{dataSource:Xe==null?void 0:Xe.photos,right:21,col:4,wrapWidth:1140}))))},gi=Qt(66654),xe=Qt(59301),Hi=Object.defineProperty,Dn=Object.defineProperties,Ai=Object.getOwnPropertyDescriptors,Ve=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,ai=Object.prototype.propertyIsEnumerable,he=(Xe,sn,wn)=>sn in Xe?Hi(Xe,sn,{enumerable:!0,configurable:!0,writable:!0,value:wn}):Xe[sn]=wn,an=(Xe,sn)=>{for(var wn in sn||(sn={}))ze.call(sn,wn)&&he(Xe,wn,sn[wn]);if(Ve)for(var wn of Ve(sn))ai.call(sn,wn)&&he(Xe,wn,sn[wn]);return Xe},Yn=(Xe,sn)=>Dn(Xe,Ai(sn)),vi=(Xe,sn)=>{var wn={};for(var Mn in Xe)ze.call(Xe,Mn)&&sn.indexOf(Mn)<0&&(wn[Mn]=Xe[Mn]);if(Xe!=null&&Ve)for(var Mn of Ve(Xe))sn.indexOf(Mn)<0&&ai.call(Xe,Mn)&&(wn[Mn]=Xe[Mn]);return wn},ln=(Xe,sn,wn)=>new Promise((Mn,ii)=>{var _i=en=>{try{Ti(wn.next(en))}catch(Lr){ii(Lr)}},Ki=en=>{try{Ti(wn.throw(en))}catch(Lr){ii(Lr)}},Ti=en=>en.done?Mn(en.value):Promise.resolve(en.value).then(_i,Ki);Ti((wn=wn.apply(Xe,sn)).next())});const qn=Xe=>{var sn=Xe,{shixunHomeworks:wn,classroomList:Mn,globalSetting:ii,loading:_i,user:Ki,dispatch:Ti}=sn,en=vi(sn,["shixunHomeworks","classroomList","globalSetting","loading","user","dispatch"]),Lr,cr,Ur;const[rn,oi]=(0,Pt.useState)(an({},(0,ne.useParams)())),Ci=(0,ne.useParams)(),[bi,xi]=(0,Pt.useState)({page:1,page_size:10}),Ei=(0,ne.useLocation)(),[]=(0,Pt.useState)([]),[Yi,sr]=(0,Pt.useState)(),oe=(0,Pt.useRef)(),ae=(0,Pt.useRef)(),[ee,je]=(0,Pt.useState)(!1),[Se,An]=(0,Pt.useState)(!0),[Nn,Vn]=(0,Pt.useState)(!1),[Qi,Si]=(0,Pt.useState)(!1),{shixunWorkReport:Ne}=wn,[wi,ke]=(0,Pt.useState)(),[hn,Qe]=(0,Pt.useState)([]),[Ut,pn]=(0,Pt.useState)(),[fn,Qn]=(0,Pt.useState)("all"),Gn=(0,Zt.GJ)(),[jn,dn]=(0,Pt.useState)(new(de())),[tn,gn]=(0,Pt.useState)(0),[mn,xn]=(0,Pt.useState)(!1),[hi,zn]=(0,Pt.useState)(!1),[Xn,cn]=(0,Pt.useState)(!1),[ti,Di]=(0,Pt.useState)(""),[ir,Ji]=(0,Pt.useState)(!1),[fr,dr]=(0,Pt.useState)(!0),[Er,Gr]=(0,Pt.useState)(0),Tr=(0,Pt.useRef)(JSON.parse(sessionStorage.all_student_works_params||"{}")),oo=(0,Pt.useRef)(),He=()=>ln(void 0,null,function*(){(Ki.userInfo.is_teacher||Ki.userInfo.admin)&&(Ji(!0),dr(!1))});(0,Pt.useEffect)(()=>{var zi;(0,Zt.Rm)()&&Mn.AssistantObject.practice&&!((zi=Mn.AssistantObject.practice)!=null&&zi.can_view)&&ne.history.replace("/403")},[(Lr=Mn.AssistantObject.practice)==null?void 0:Lr.can_view]),(0,Pt.useEffect)(()=>{He(),console.log("\u6253\u5370\u7684------",Ne),oo.current=Ne==null?void 0:Ne.next_student_work_id,Di(Ne.repeat_minus_score)},[Ne,Ki]),(0,Pt.useEffect)(()=>{console.log("\u89E6\u53D1\u8FD9",Ne.work_score),Gr(Ne.work_score)},[Ne.work_score,ti]),(0,Pt.useEffect)(()=>(Ti({type:"globalSetting/footerToggle",payload:!1}),()=>{Ti({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,Pt.useEffect)(()=>{var zi;if(Ne){let Wi=[];(zi=Ne==null?void 0:Ne.target_test_sets)==null||zi.map((rr,_n)=>{var Ar;(Ar=rr==null?void 0:rr.targets)==null||Ar.map((kr,xo)=>{var Ts;kr.name=rr==null?void 0:rr.name,kr.total_target_score=rr==null?void 0:rr.total_target_score,kr.actual_target_score=rr==null?void 0:rr.actual_target_score,kr.rowSpan=xo===0?(Ts=rr==null?void 0:rr.targets)==null?void 0:Ts.length:0,kr.order=_n+1,Wi.push(kr)})}),ke(Wi),(0,Zt.Rm)()&&Ti({type:"classroomList/getAssistantPermissions",payload:{course_id:rn.coursesId}})}},[Ne]),(0,Pt.useEffect)(()=>{wn.actionTabs.key==="\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"&&(Ne==null?void 0:Ne.students_count)>0&&!Se&&setTimeout(()=>{Nr("all")},800)},[Ne==null?void 0:Ne.homework_common_id,Se]),(0,Pt.useEffect)(()=>{oi(an({},Ci))},[Ei.pathname]);const gr=()=>{document.body.scrollIntoView()},Dr=zi=>{bi.page=zi,xi(an({},bi)),nr(bi,fn)},nr=(zi,Wi)=>ln(void 0,null,function*(){Vn(!0);const rr=yield(0,Ht.ZP)(`/api/student_works/${rn==null?void 0:rn.homeworkId}/adjust_review_score_histories.json`,{method:"get",params:Yn(an({},zi),{challenge_id:Wi=="all"?null:Wi})});(rr==null?void 0:rr.status)===0&&(Qe(rr==null?void 0:rr.list),pn(rr==null?void 0:rr.count)),Vn(!1)});function Qr(){return ln(this,null,function*(){Tr.current=JSON.parse(sessionStorage.all_student_works_params||"{}")})}const ar=()=>{document.querySelectorAll("canvas").forEach(zi=>{(!zi.clientWidth||!zi.clientHeight)&&zi.remove()})},vo=()=>{oe.current.offsetHeight>62e3?Si(!1):Si(!0)},Jr=zi=>ln(void 0,null,function*(){const Wi=yield(0,ko.t1)({homeworkId:zi||rn.homeworkId});sr(Wi==null?void 0:Wi.data)}),Nr=zi=>ln(void 0,null,function*(){var Wi,rr,_n,Ar;let kr=0,xo;xo=ue.default.info({width:460,title:xe.createElement("div",null,"\u6B63\u5728\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A,",xe.createElement("span",{className:"c-red"},"\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3")),content:xe.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",xe.createElement("span",{className:"c-blue"},kr+1),"/",zi!=="all"?1:Ne==null?void 0:Ne.students_count,xe.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"),maskClosable:!1,className:ge.modal,onOk:()=>{}});const Ts={margin:[0,0],filename:`${Ne!=null&&Ne.student_id&&(Ne==null?void 0:Ne.student_id)!="--"?Ne==null?void 0:Ne.student_id:""}${Ne.username}.pdf`,html2canvas:{useCORS:!0,letterRendering:!0},jsPDF:{unit:"mm",format:"a4",orientation:"landscape"}},ps=jn.folder(Ne==null?void 0:Ne.shixun_name);function Pr($r){return ln(this,null,function*(){yield Jr($r||oo.current);const so=yield Ti({type:"shixunHomeworks/getShixunWorkReport",payload:an({homeworkId:$r||oo.current},Tr.current||{})});oo.current=so==null?void 0:so.next_student_work_id,gr(),kr++,setTimeout(()=>ln(this,null,function*(){var ts,yo,Vo,zo;ar();const ys=ps.folder(`${so==null?void 0:so.group_name}`).folder(`${so!=null&&so.student_id&&(so==null?void 0:so.student_id)!="--"?so.student_id+"+":""}${so==null?void 0:so.username}`),Wo=document.querySelector("#export-all").children;let Fl=Xi()();for(let lo=0;lo<Wo.length;lo++)yield Fl.set(Ts).from(Wo[lo]).toContainer().toCanvas().toPdf().get("pdf").then(da=>ln(this,null,function*(){lo<Wo.length-1&&(yield da.addPage())}));if(ys.file(`${so!=null&&so.student_id&&(so==null?void 0:so.student_id)!="--"?so.student_id+"+":""}${so==null?void 0:so.username}.pdf`,Fl.output("blob")),((ts=so==null?void 0:so.shixun_detail)==null?void 0:ts.length)>0&&((Vo=(yo=so==null?void 0:so.shixun_detail)==null?void 0:yo.filter(lo=>{var da;return((da=lo==null?void 0:lo.game_codes)==null?void 0:da.length)>0}))==null?void 0:Vo.length)>0){const lo=ys.folder("\u4EE3\u7801\u6587\u4EF6");(zo=so==null?void 0:so.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=lo.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:xe.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",xe.createElement("span",{className:"c-blue"},kr),"/",so==null?void 0:so.students_count,xe.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3")}),kr==(so==null?void 0:so.students_count)?(xo.destroy(),co()):Pr()}),2200)})}if(zi!=="all"||(Ne==null?void 0:Ne.students_count)<2){ar(),gr();const $r=ae.current.children;let so=Xi()();const yo=ps.folder(`${Ne==null?void 0:Ne.group_name}`).folder(`${Ne!=null&&Ne.student_id&&(Ne==null?void 0:Ne.student_id)!="--"?(Ne==null?void 0:Ne.student_id)+"+":""}${Ne==null?void 0:Ne.username}`);for(let Vo=0;Vo<$r.length;Vo++)yield so.set(Ts).from($r[Vo]).toContainer().toCanvas().toPdf().get("pdf").then(zo=>ln(void 0,null,function*(){Vo<$r.length-1&&(yield zo.addPage())}));if(je(!1),yo.file(`${Ne!=null&&Ne.student_id&&(Ne==null?void 0:Ne.student_id)!="--"?(Ne==null?void 0:Ne.student_id)+"+":""}${Ne.username}.pdf`,so.output("blob"),{base64:!1}),((Wi=Ne==null?void 0:Ne.shixun_detail)==null?void 0:Wi.length)>0&&((_n=(rr=Ne==null?void 0:Ne.shixun_detail)==null?void 0:rr.filter(Vo=>{var zo;return((zo=Vo==null?void 0:Vo.game_codes)==null?void 0:zo.length)>0}))==null?void 0:_n.length)>0){const Vo=yo.folder("\u4EE3\u7801\u6587\u4EF6");(Ar=Ne==null?void 0:Ne.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(lo=>{Fl.file(`${lo.filename}.txt`,lo==null?void 0:lo.content)})}})}xo.destroy(),co();return}else Pr(Ne==null?void 0:Ne.first_student_work_id)}),co=()=>{jn.generateAsync({type:"blob"}).then(function(zi){console.log(Ne,"shixunWorkReport");const Wi=document.createElement("a");Wi.href=window.URL.createObjectURL(zi),Wi.download=(Ne==null?void 0:Ne.shixun_name)+".zip",document.body.appendChild(Wi);const rr=document.createEvent("MouseEvents");rr.initEvent("click",!1,!1),Wi.dispatchEvent(rr),document.body.removeChild(Wi),dn(new(de()))}),Si(!1)};(0,Pt.useEffect)(()=>{ks()},[rn.homeworkId]);const ks=()=>ln(void 0,null,function*(){An(!0),yield Ti({type:"shixunHomeworks/getShixunWorkReport",payload:an(an({},rn),Tr.current||{})}),Jr(),(0,Zt.GJ)()&&Qr(),An(!1)}),ls=[{title:"\u5173\u5361",dataIndex:"name",render:(zi,Wi,rr)=>rr+1},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",render:(zi,Wi,rr)=>xe.createElement("div",null,zi,Wi.complete_status===4&&xe.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:(zi,Wi,rr)=>zi||"- -"},{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:zi=>zi?"\u662F":"\u5426"},{title:"\u7ECF\u9A8C\u503C",dataIndex:"experience",render:(zi,Wi)=>xe.createElement("div",null,xe.createElement("span",{style:{color:parseFloat(Wi.myself_experience)!==parseFloat(zi)?"red":"green"}},Wi.myself_experience),"/",zi)},{title:"\u5173\u5361\u5F97\u5206",dataIndex:"game_score",render:(zi,Wi)=>xe.createElement("div",null,xe.createElement("span",{style:{color:parseFloat(Wi.game_score_full)!==parseFloat(zi)?"red":"green"}},zi),"/",Wi.game_score_full)},{title:"\u8C03\u5206",dataIndex:"game_score",render:(zi,Wi)=>Gn?xe.createElement(ni,{max:Wi.game_score_full,defaultValue:parseFloat(zi),onBlur:rr=>ln(void 0,null,function*(){var _n;if((0,Zt.Rm)()&&!((_n=Mn.AssistantObject.practice)!=null&&_n.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:rn.homeworkId,type:"report",score:rr,challenge_id:Wi.challenge_id}});nr({page:1,page_size:10},"all"),yield Ti({type:"shixunHomeworks/getShixunWorkReport",payload:an(an({},rn),Tr.current||{})}),Ar.status===0&&ce.ZP.success("\u64CD\u4F5C\u6210\u529F")})}):zi}];let la=[{title:"\u5173\u5361",dataIndex:"order",key:"order",render:(zi,Wi,rr)=>({children:zi,props:{rowSpan:Wi.rowSpan}})},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",key:"name",render:(zi,Wi,rr)=>({children:zi,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:(zi,Wi,rr)=>xe.createElement("div",null,xe.createElement("span",{style:{color:parseFloat(Wi.actual_test_score)!==parseFloat(zi)?"red":"green"}},Wi.actual_test_score),"/",zi)},{title:"\u6307\u6807\u603B\u5206",render:(zi,Wi,rr)=>({children:xe.createElement("div",null,xe.createElement("span",{style:{color:parseFloat(Wi.actual_target_score)!==parseFloat(zi)?"red":"green"}},Wi.actual_target_score),"/",zi),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:zi=>xe.createElement("span",null,zi?Ae()(zi).format("YYYY-MM-DD HH:mm"):"--")}],lr=zi=>{Ti({type:"shixunHomeworks/setActionTabs",payload:{key:"",type:2}}),setTimeout(()=>{zi==="next"?ne.history.push(`/classrooms/${rn.coursesId}/shixun_homework/${rn.categoryId}/${Ne==null?void 0:Ne.next_student_work_id}/comment`):ne.history.push(`/classrooms/${rn.coursesId}/shixun_homework/${rn.categoryId}/${Ne==null?void 0:Ne.pre_student_work_id}/comment`)},200)},Eo=zi=>{Di(""),zi.target.value&&(console.log("\u8FDB\u6765",Ne),zi.target.value=zi.target.value>Ne.repeat_setting_score?Ne.repeat_setting_score:zi.target.value,Di(zi.target.value))},os=()=>ln(void 0,null,function*(){const zi=yield(0,Ht.ZP)(`/api/student_works/${Ne==null?void 0:Ne.work_id}/update_repeat_score`,{method:"put",body:{score:ti}});yield Ti({type:"shixunHomeworks/getShixunWorkReport",payload:an(an({},rn),Tr.current||{})}),zi.status===0&&ce.ZP.info("\u64CD\u4F5C\u6210\u529F")});return xe.createElement("section",{className:"bg-fafafa",style:{position:"sticky",top:0}},xe.createElement("div",{className:"edu-container mt10",style:{paddingBottom:100}},xe.createElement(Vt.Z,{loading:_i["shixunHomeworks/getShixunWorkReport"],active:!0,avatar:{size:40},paragraph:{rows:5}},xe.createElement("div",{className:"edu-container"},Ne.course_id&&xe.createElement("section",{className:"animated fadeIn"},xe.createElement("aside",{className:""},Ne.category&&xe.createElement(De.Z,{separator:">"},xe.createElement(De.Z.Item,null,xe.createElement(ne.Link,{to:`/classrooms/${Ne.course_id}/shixun_homework`},Ne.course_name)),xe.createElement(De.Z.Item,null,xe.createElement(ne.Link,{to:`/classrooms/${Ne.course_id}/shixun_homework/${Ne.category.main?"":Ne.category.category_id}`},Ne.category.category_name)),xe.createElement(De.Z.Item,null,xe.createElement(ne.Link,{to:`/classrooms/${Ne.course_id}/shixun_homework/${Ne.homework_common_id}/detail${(0,Zt.dE)()?"?tabs=1":""}`},"\u4F5C\u4E1A\u8BE6\u60C5")),xe.createElement(De.Z.Item,null,Ne.username))),xe.createElement("aside",{className:[ge.title1,"mt20"].join(" ")},xe.createElement(Jt.Z,{align:"middle"},xe.createElement(be.Z,{flex:1},xe.createElement(ne.Link,{to:`/classrooms/${Ne.course_id}/shixun_homework/${Ne.homework_common_id}/detail`},xe.createElement(xt.Z,{className:"font16 c-black"})),xe.createElement("strong",{className:"font20 ml5"},Ne==null?void 0:Ne.homework_name),xe.createElement($t.VV,{temporary:!0,status:Ne.homework_status})),xe.createElement(be.Z,{className:ge.title1_right},Ne.view_tpi&&xe.createElement(It.ZP,{onClick:()=>{var zi,Wi;(0,$t.xg)(`/tasks/${Ne==null?void 0:Ne.course_id}/${Ne==null?void 0:Ne.homework_common_id}/${(Wi=(zi=Ne==null?void 0:Ne.shixun_detail)==null?void 0:zi[0])==null?void 0:Wi.game_identifier}`)}},xe.createElement("span",{className:"iconfont icon-yijiandianping mr5"}),"\u67E5\u770B\u5B66\u5458\u5B9E\u8BAD"),(0,Zt.GJ)()&&Ne.homework_end===!1&&!!Ne.myshixun_id&&xe.createElement(It.ZP,{className:"ml10",onClick:()=>ln(void 0,null,function*(){yield Ti({type:"shixunHomeworks/setActionTabs",payload:{key:"\u6253\u56DE\u91CD\u505A",selectArrs:{myshixun_identifier:Ne.myshixun_identifier},homework_common_id:Ci.categoryId}})})},xe.createElement("span",{className:"iconfont icon-dahuizhongzuo3x mr5"}),"\u6253\u56DE\u91CD\u505A"),xe.createElement(It.ZP,{className:"ml10",onClick:()=>{var zi;if((0,Zt.Rm)()&&!((zi=Mn.AssistantObject.practice)!=null&&zi.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},xe.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"),(0,Zt.GJ)()&&(Ne==null?void 0:Ne.students_count)>1&&xe.createElement(It.ZP,{className:"ml10",onClick:()=>{var zi;if((0,Zt.Rm)()&&!((zi=Mn.AssistantObject.practice)!=null&&zi.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:xe.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:xe.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,gi.jj)({categoryId:rn.categoryId,coursesId:rn.coursesId},"shixun_report")}}})}},xe.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5168\u90E8\u5B66\u751F\u5B9E\u8BAD\u62A5\u544A"))))),xe.createElement("aside",{className:"mt30 relative"})),xe.createElement("aside",{className:"edu-container bg-white",ref:oe},xe.createElement("div",{id:"export-all",ref:ae},xe.createElement("div",{id:"export-all-1"},xe.createElement("div",{className:ge.title},xe.createElement("h1",null,"\u603B\u4F53\u8BC4\u4EF7"),xe.createElement("div",null,(0,Zt.GJ)()&&xe.createElement(It.ZP,{className:"mr20",type:"primary",onClick:()=>{Ti({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:Ne.user_id,data:an({},Ne)},fn:()=>nr({page:1,page_size:10},"all")}})}},xe.createElement(bt.Z,null),Ne.has_shixun_work_comment?"\u66F4\u6539\u70B9\u8BC4":"\u70B9\u8BC4\u4F5C\u4E1A"))),xe.createElement(et.Z,{style:{marginTop:0}}),xe.createElement(Jt.Z,{className:"pl30 pr30"},xe.createElement(be.Z,null,xe.createElement("img",{className:ge.userPic,src:`${Wt.Z.IMG_SERVER}/images/${Ne.image_url}`,alt:Ne.username})),xe.createElement(be.Z,null,xe.createElement("span",{className:"font16 ml40"},Ne.username),xe.createElement($t.vA,{status:Ne.compelete_status}),xe.createElement("ul",{className:ge.userInfo},xe.createElement("li",null,"\u5B66\u53F7\uFF1A",Ne.student_id||"--"),xe.createElement("li",null,"\u5206\u73ED\uFF1A",Ne.group_name||"--"),xe.createElement("br",null),xe.createElement("li",null,"\u622A\u6B62\u524D\u5B8C\u6210\u5173\u5361\uFF1A",xe.createElement("span",{className:"c-red"},Ne.complete_count),"/",xe.createElement("span",{className:"c-red"},Ne.challenges_count)),xe.createElement("li",null,"\u6700\u65B0\u5B8C\u6210\u5173\u5361\uFF1A",xe.createElement("span",{className:"c-red"},Ne.current_complete_count||"-"),"/",xe.createElement("span",{className:"c-red"},Ne.challenges_count)),xe.createElement("li",null,"\u5B8C\u6210\u6548\u7387\uFF1A",Ne&&Ne.efficiency===null?"--":Ne&&Ne.efficiency),xe.createElement("li",null,"\u8BFE\u5802\u6700\u9AD8\u5B8C\u6210\u6548\u7387\uFF1A",Ne&&Ne.max_efficiency===null?"--":Ne&&Ne.max_efficiency))),xe.createElement("ul",{className:[ge.listItem,"mt10"].join(" ")},xe.createElement("li",null,xe.createElement("strong",null,"\u901A\u5173\u65F6\u95F4"),xe.createElement("div",{className:"c-light-black mt20"},Ne&&Ne.passed_time===null||Ne&&Ne.passed_time==="--"?"--":Ae()(Ne&&Ne.passed_time).format("YYYY-MM-DD HH:mm"))),xe.createElement("li",null,xe.createElement("strong",null,"\u8BA1\u65F6\u89C4\u5219",xe.createElement("i",{onClick:zi=>{zi.stopPropagation(),zi.preventDefault(),xn(!0)},style:{marginLeft:4,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),xe.createElement("div",{className:"c-light-black mt20"},Ne==null?void 0:Ne.human_training_time_rules)),xe.createElement("li",null,xe.createElement("strong",null,"\u5B9E\u8BAD\u603B\u8017\u65F6",xe.createElement("i",{onClick:zi=>{zi.stopPropagation(),zi.preventDefault(),zn(!0)},style:{marginLeft:4,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),xe.createElement("div",{className:"c-light-black mt20"},Ne.time_consuming)),xe.createElement("li",null,xe.createElement("strong",null,"\u8BC4\u6D4B\u6B21\u6570"),xe.createElement("div",{className:"mt20"},Ne.evaluate_count)),(Ne==null?void 0:Ne.eff_score_full)&&xe.createElement(xe.Fragment,null,xe.createElement("li",null,xe.createElement("strong",null,"\u5173\u5361\u5F97\u5206"),xe.createElement("div",{className:"mt20"},xe.createElement("span",{className:"c-orange"},Ne.challenge_score),"/",xe.createElement("span",{className:"c-light-black"},Ne.challenge_score_full))),xe.createElement("li",null,xe.createElement("strong",null,"\u6548\u7387\u5206"),xe.createElement("div",{className:"mt20"},xe.createElement("span",{className:"c-orange"},Ne.eff_score),"/",xe.createElement("span",{className:"c-light-black"},Ne.eff_score_full)))),(Ne==null?void 0:Ne.have_repeat)&&(Ne==null?void 0:Ne.repeat_minus_score)!==0&&xe.createElement("li",{style:{position:"relative"}},xe.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},xe.createElement("strong",null,"\u67E5\u91CD\u6263\u5206"),xe.createElement("div",{style:{position:"absolute",fontSize:"10px",color:"white",left:"57px",width:"46px",bottom:"72px"}},Ne!=null&&Ne.review_rate?xe.createElement("span",{style:{background:"#0152d9",borderRadius:"6px 6px 6px 0",cursor:"pointer"},onClick:()=>{if(Ne!=null&&Ne.review_id&&ir)localStorage.setItem("studentDetial",window.location.pathname),ne.history.push({pathname:`/classrooms/:coursesId/shixun_homework/${rn.categoryId}/review_detail/${Ne==null?void 0:Ne.review_id}`});else return}},Ne.review_rate.toFixed(1),"%"):xe.createElement("span",{style:{background:"#0152d9",borderRadius:"6px 6px 6px 0"}},"- -"))),ir?xe.createElement("div",{className:"mt20"},xe.createElement(At.default,{style:{width:"45px",height:"22px"},value:ti,onChange:zi=>{Eo(zi)},onBlur:os,disabled:fr})," / ",Ne==null?void 0:Ne.repeat_setting_score):xe.createElement("div",{className:"mt20"},Ne==null?void 0:Ne.repeat_minus_score," / ",Ne==null?void 0:Ne.repeat_setting_score)),console.log("sssssssssssssssssssssss",Ne==null?void 0:Ne.have_repeat,Ne==null?void 0:Ne.repeat_minus_score),(Ne==null?void 0:Ne.have_repeat)&&(Ne==null?void 0:Ne.repeat_minus_score)===0&&xe.createElement("li",null,xe.createElement("strong",null,"\u67E5\u91CD\u6263\u5206"),xe.createElement("div",{className:"mt20"}," - -")),!(Ne!=null&&Ne.have_repeat)&&xe.createElement("li",null,xe.createElement("strong",null,"\u67E5\u91CD\u6263\u5206"),xe.createElement("div",{className:"mt20"}," - -")),xe.createElement("li",null,xe.createElement("strong",null,"\u8865\u4EA4\u6263\u5206"),xe.createElement("div",{className:"mt20"},xe.createElement("span",null,Ne.late_penalty||"- -"))),xe.createElement("li",null,xe.createElement("strong",null,"\u6700\u7EC8\u6210\u7EE9"),xe.createElement("div",{className:"mt20"},xe.createElement("span",{className:"c-orange"},Er),"/",xe.createElement("span",{className:"c-light-black"},Ne.all_work_score))),xe.createElement("li",null,xe.createElement("strong",null,"\u603B\u8BC4"),xe.createElement("div",{className:"mt20"},xe.createElement("span",{className:"c-orange"},Ne.overall_appraisal))))),xe.createElement(et.Z,{style:{margin:0}}),(Ne.work_comment_hidden||Ne.work_comment)&&xe.createElement("div",null,xe.createElement(Jt.Z,{align:"middle"},xe.createElement(be.Z,{flex:1},xe.createElement("h1",{className:ge.title},"\u70B9\u8BC4\u5185\u5BB9")),xe.createElement(be.Z,{className:"pr30"},(0,Zt.GJ)()&&xe.createElement(It.ZP,{onClick:()=>ln(void 0,null,function*(){ue.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:xe.createElement(Rt.Z,null),content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",onOk(){return ln(this,null,function*(){(yield(0,ko.gZ)({comment_id:Ne.comment_id,homeworkId:rn.homeworkId})).status===0&&(ce.ZP.success("\u5220\u9664\u6210\u529F"),Ti({type:"shixunHomeworks/getShixunWorkReport",payload:an(an({},rn),Tr.current||{})}))})}})})},xe.createElement(Ot.Z,null),"\u5220\u9664"))),xe.createElement(et.Z,{style:{margin:0}}),Ne.work_comment&&xe.createElement("aside",{className:"pl30 pr30 mt20"},xe.createElement("span",{className:"c-light-black font12"},"# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),xe.createElement("br",null),xe.createElement(yn.Z,{value:Ne.work_comment})),Ne.work_comment_hidden&&xe.createElement("aside",{className:"pl30 pr30 mt20"},xe.createElement("span",{className:"c-light-black font12"},"# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),xe.createElement("br",null),xe.createElement(yn.Z,{value:Ne.work_comment_hidden}))),(Ne==null?void 0:Ne.action_analysis)&&xe.createElement(Ue,{detailData:Ne}),xe.createElement("div",{className:ge.score},xe.createElement("h1",{className:ge.title},"\u9636\u6BB5\u6210\u7EE9"),(Ne==null?void 0:Ne.adjust_review_score_count)>0&&(0,Zt.GJ)()&&xe.createElement("div",{style:{color:"#0152d9",cursor:"pointer"},onClick:()=>{cn(!0),nr({page:1,page_size:10},"all")}},"\u6210\u7EE9\u8C03\u5206\u8BB0\u5F55\uFF08",Ne==null?void 0:Ne.adjust_review_score_count,"\u6B21\uFF09")),xe.createElement("aside",{className:"pl30 pr30"},xe.createElement(at.default,{dataSource:Ne.stage_list,rowKey:zi=>zi==null?void 0:zi.challenge_id,pagination:!1,columns:ls})),((cr=Ne==null?void 0:Ne.target_test_sets)==null?void 0:cr.length)>0&&xe.createElement("div",null,xe.createElement("h1",{className:ge.title},"\u6307\u6807\u6210\u7EE9"),xe.createElement("aside",{className:"pl30 pr30"},xe.createElement(at.default,{dataSource:wi,rowKey:zi=>zi==null?void 0:zi.challenge_id,pagination:!1,bordered:!0,columns:la}))),(Ne==null?void 0:Ne.work_description)&&xe.createElement(xe.Fragment,null,xe.createElement("h1",{className:ge.title},"\u4E2A\u4EBA\u603B\u7ED3"),xe.createElement("aside",{className:"pl30 pr30"},xe.createElement(yn.Z,{value:Ne==null?void 0:Ne.work_description}))),xe.createElement("h1",{className:ge.title},"\u56FE\u5F62\u7EDF\u8BA1"),xe.createElement(En,{data:Yi}),xe.createElement("h1",{className:ge.title},"\u5B9E\u8BAD\u8BE6\u60C5")),xe.createElement(qi,{autoHeight:Qi}))),(0,Zt.GJ)()&&xe.createElement("aside",{className:`${ge.footerBar} ${ee?ge.footerBarStatic:""}`},xe.createElement("aside",{className:"edu-container"},xe.createElement(Jt.Z,{align:"middle"},xe.createElement(be.Z,{flex:"1"},xe.createElement(ne.Link,{className:ge.exitComment,to:`/classrooms/${rn.coursesId}/shixun_homework/${rn.categoryId}/detail`},"\u8FD4\u56DE\u5217\u8868")),xe.createElement(be.Z,{flex:"1",className:"tr"},xe.createElement(It.ZP,{type:"default",disabled:!(Ne!=null&&Ne.pre_student_work_id),onClick:()=>lr()},"\u4E0A\u4E00\u4E2A"),xe.createElement(It.ZP,{type:"default",style:{marginLeft:"20px",marginRight:"20px"},disabled:!(Ne!=null&&Ne.next_student_work_id),onClick:()=>lr("next")},"\u4E0B\u4E00\u4E2A"),(0,Zt.GJ)()&&xe.createElement(It.ZP,{type:"primary",onClick:()=>ln(void 0,null,function*(){Ti({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:Ne.user_id,data:an({},Ne)},fn:()=>nr({page:1,page_size:10},"all")}})})},"\u70B9\u8BC4\u4F5C\u4E1A"))))))),xe.createElement(Yr,null),xe.createElement(bo.Z,null),xe.createElement(ue.default,{open:mn,width:860,centered:!0,onCancel:()=>{xn(!1)},title:"\u8BA1\u65F6\u89C4\u5219\u8BF4\u660E",footer:null},xe.createElement("div",{style:{color:"#333333",fontWeight:400}},xe.createElement("span",{style:{fontWeight:500}},"1\u3001\u9875\u9762\u505C\u7559\u65F6\u957F"),xe.createElement("br",null),xe.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"),xe.createElement("br",null),xe.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"),xe.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 "),xe.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")),xe.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},xe.createElement("span",{style:{fontWeight:500}},"2\u3001\u5173\u5361\u603B\u8017\u65F6"),xe.createElement("br",null),xe.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 "),xe.createElement("br",null),xe.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"),xe.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 "),xe.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"),xe.createElement("br",null),xe.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")),xe.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},xe.createElement("span",{style:{fontWeight:500}},"3\u3001\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),xe.createElement("br",null),xe.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")),xe.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},xe.createElement("span",{style:{fontWeight:500}},"\u89C4\u5219\u76EE\u7684"),xe.createElement("br",null),xe.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"))),xe.createElement(ue.default,{open:hi,title:"\u5B9E\u8BAD\u603B\u8017\u65F6\u8BF4\u660E",centered:!0,footer:null,onCancel:()=>{zn(!1)},width:600},xe.createElement("div",{style:{fontWeight:400,color:"#333333"}},xe.createElement("div",null,"1\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",xe.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"),xe.createElement("div",{style:{margin:"20px 0px"}},"2\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",xe.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"),xe.createElement("div",null,"3\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",xe.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"))),xe.createElement(ue.default,{open:Xn,title:"\u6210\u7EE9\u8C03\u5206\u8BB0\u5F55",centered:!0,footer:null,onCancel:()=>{Qn("all"),cn(!1)},destroyOnClose:!0,width:900},xe.createElement("div",{style:{fontWeight:400,color:"#333333"}},xe.createElement("div",null,xe.createElement("span",null,"\u5173\u5361\uFF1A"),xe.createElement(ct.default,{style:{width:300},value:fn,placeholder:"\u8BF7\u9009\u62E9\u5173\u5361",defaultValue:"all",onChange:zi=>ln(void 0,null,function*(){Qn(zi),nr({page:1,page_size:10},zi)})},xe.createElement(ct.default.Option,{value:"all"}," \u5168\u90E8 "),(Ur=Ne==null?void 0:Ne.stage_list)==null?void 0:Ur.map((zi,Wi)=>xe.createElement(ct.default.Option,{key:Wi,value:zi==null?void 0:zi.challenge_id},"\u7B2C",(0,$t.EM)(Wi+1),"\u5173")))),xe.createElement("div",{className:"mt20"},xe.createElement(at.default,{dataSource:hn,rowKey:zi=>zi==null?void 0:zi.id,pagination:!1,columns:Is,loading:Nn})),xe.createElement("div",{className:ge.footer},xe.createElement("div",null,xe.createElement("span",{style:{color:"#656F87"}},"\u5171",xe.createElement("span",{className:"c-light-primary"},Ut),"\u6761\u6570\u636E")),xe.createElement(pt.Z,{defaultCurrent:1,defaultPageSize:10,current:(bi==null?void 0:bi.page)||1,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,total:Ut,onChange:Dr})))))};var li=(0,ne.connect)(({shixunHomeworks:Xe,classroomList:sn,loading:wn,globalSetting:Mn,user:ii})=>({shixunHomeworks:Xe,classroomList:sn,globalSetting:Mn,loading:wn.effects,user:ii}))(qn)},20471:function(Cn,We,Qt){"use strict";var Pt=Qt(62957),te=Qt(6767),Ae=Qt(52430),Be=Qt(44993),de=Qt(64681),Ht=Qt(59301),ne=(ce,Vt,De)=>new Promise((Jt,be)=>{var It=At=>{try{et(De.next(At))}catch(at){be(at)}},nt=At=>{try{et(De.throw(At))}catch(at){be(at)}},et=At=>At.done?Jt(At.value):Promise.resolve(At.value).then(It,nt);et((De=De.apply(ce,Vt)).next())});const ue=({shixunHomeworks:ce,classroomList:Vt,dispatch:De})=>{const Jt=(0,Be.useParams)();return Ht.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 be,It,nt,et;if((0,de.Rm)()&&!((be=Vt.AssistantObject.practice)!=null&&be.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:Jt.coursesId,homework_common_id:ce.actionTabs.homework_common_id}});if(At.shixun_identifier){te.ZP.success("\u64CD\u4F5C\u6210\u529F"),De({type:"shixunHomeworks/setActionTabs",payload:{}});const at=(nt=(It=At==null?void 0:At.new_works)==null?void 0:It.find(ct=>`${ct.homework_common_id}`===Jt.categoryId))==null?void 0:nt.id;if((0,de.Rm)()&&!((et=Vt.AssistantObject.practice)!=null&&et.can_view))return;Be.history.replace(`/classrooms/${Jt.coursesId}/shixun_homework/${Jt.categoryId}/${at}/comment`)}}),onCancel:()=>{De({type:"shixunHomeworks/setActionTabs",payload:{}})}},Ht.createElement("p",null,"\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C\u5B66\u751F\u5B9E\u8BAD\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"),Ht.createElement("p",null,"\u786E\u5B9A\u6253\u56DE?"))};We.Z=(0,Be.connect)(({shixunHomeworks:ce,classroomList:Vt})=>({shixunHomeworks:ce,classroomList:Vt}))(ue)},66654:function(Cn,We,Qt){"use strict";Qt.d(We,{AD:function(){return En},D9:function(){return Pn},Hp:function(){return Rt},IM:function(){return Wn},Iy:function(){return Wt},KM:function(){return jt},MJ:function(){return Ot},Ne:function(){return pi},ON:function(){return on},Uj:function(){return fi},VY:function(){return si},YO:function(){return Le},YX:function(){return ri},Zn:function(){return nt},_g:function(){return pt},_k:function(){return Ee},c6:function(){return nn},cr:function(){return et},eV:function(){return qe},fi:function(){return At},gh:function(){return Ce},hS:function(){return un},iA:function(){return at},j6:function(){return xt},je:function(){return ni},jj:function(){return bt},kS:function(){return Oi},lS:function(){return In},o6:function(){return ge},pO:function(){return Pi},rQ:function(){return Tn},sA:function(){return $t},xm:function(){return ie},xo:function(){return Zn},y8:function(){return bn},yd:function(){return ct}});var Pt=Qt(54877),te=Qt(44993),Ae=Qt(89299),Be=Qt(6767),de=Qt(13952),Ht=Object.defineProperty,ne=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable,Vt=(Mt,mt,vt)=>mt in Mt?Ht(Mt,mt,{enumerable:!0,configurable:!0,writable:!0,value:vt}):Mt[mt]=vt,De=(Mt,mt)=>{for(var vt in mt||(mt={}))ue.call(mt,vt)&&Vt(Mt,vt,mt[vt]);if(ne)for(var vt of ne(mt))ce.call(mt,vt)&&Vt(Mt,vt,mt[vt]);return Mt},Jt=(Mt,mt,vt)=>new Promise((Lt,Bt)=>{var _t=Ye=>{try{ye(vt.next(Ye))}catch(Fe){Bt(Fe)}},Me=Ye=>{try{ye(vt.throw(Ye))}catch(Fe){Bt(Fe)}},ye=Ye=>Ye.done?Lt(Ye.value):Promise.resolve(Ye.value).then(_t,Me);ye((vt=vt.apply(Mt,mt)).next())});const be=()=>{(0,te.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u751F\u6210\u6587\u4EF6\uFF0C\u8BF7\u7A0D\u540E..."}})},It=()=>{(0,te.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}})},nt=Mt=>Jt(void 0,null,function*(){be(),(yield(0,Pt.YR)(De({},Mt))).status===0&&(yield(0,Ae.QH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/courses/${Mt.coursesId}/export_couser_info.json`,query:Mt}))),It()}),et=Mt=>Jt(void 0,null,function*(){const mt=yield(0,Pt.yS)(De({},Mt));if(mt.status===0)Be.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),te.history.push(`/classrooms/${Mt.coursesId}/exportlist/course_member_act_score`);else{if(mt.status===-2)return mt;mt.status===-3&&((0,te.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),te.history.push(`/classrooms/${Mt.coursesId}/exportlist/course_member_act_score`))}}),At=Mt=>Jt(void 0,null,function*(){const mt=yield(0,Pt.W0)(De({},Mt));if(mt.status===0)Be.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),te.history.push(`/classrooms/${Mt.coursesId}/exportlist/course_total_score`);else{if(mt.status===-4)return mt;mt.status===-3&&((0,te.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),te.history.push(`/classrooms/${Mt.coursesId}/exportlist/course_total_score`))}}),at=Mt=>Jt(void 0,null,function*(){const mt=yield(0,Pt.Nl)(De({},Mt));if(mt.status===0)Be.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),te.history.push(`/classrooms/${Mt.coursesId}/exportlist/course_total_exercise_and_other`);else{if(mt.status===-4)return mt;mt.status===-3&&((0,te.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),te.history.push(`/classrooms/${Mt.coursesId}/exportlist/course_total_exercise_and_other`))}}),ct=Mt=>Jt(void 0,null,function*(){const mt=yield(0,Pt.IU)(De({},Mt));if(mt.status===0)Be.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),te.history.push(`/classrooms/${Mt.coursesId}/exportlist/export_star_user`);else{if(mt.status===-4)return mt;mt.status===-3&&((0,te.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),te.history.push(`/classrooms/${Mt.coursesId}/exportlist/export_star_user`))}}),pt=Mt=>Jt(void 0,null,function*(){const mt=yield(0,Pt.td)(De({},Mt));if(mt.status===0)Be.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),te.history.push(`/classrooms/${Mt.coursesId}/exportlist/course_total_exercise_and_other`);else{if(mt.status===-2)return mt;if(mt.status===-3)(0,te.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),te.history.push(`/classrooms/${Mt.coursesId}/exportlist/course_total_exercise_and_other`);else if(mt.status===-4)return mt}}),xt=Mt=>Jt(void 0,null,function*(){const mt=yield(0,Pt.QX)(De({},Mt));if(mt.status===0)Be.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),te.history.push(`/classrooms/${Mt.coursesId}/exportlist/course_total_homework`);else{if(mt.status===-4)return mt;mt.status===-3&&((0,te.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),te.history.push(`/classrooms/${Mt.coursesId}/exportlist/course_total_homework`))}}),bt=(Mt,mt)=>Jt(void 0,null,function*(){const vt=yield(0,Pt.o_)(De({},Mt));vt.status===0?(Be.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/${Mt.coursesId}/exportlist/${mt}`)):vt.status===-3&&((0,te.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),te.history.push(`/classrooms/${Mt.coursesId}/exportlist/${mt}`))}),Rt=(Mt,mt)=>Jt(void 0,null,function*(){const vt=yield(0,Pt.ZL)(De({},Mt));vt.status===0?(Be.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/${Mt.coursesId}/exportlist/${mt}`)):vt.status===-3&&((0,te.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),te.history.push(`/classrooms/${Mt.coursesId}/exportlist/${mt}`))}),Ot=(Mt,mt)=>Jt(void 0,null,function*(){const vt=yield(0,Pt.vV)(De({},Mt));vt.status===0?(Be.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/${Mt.coursesId}/exportlist/${mt}`)):vt.status===-3&&((0,te.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),te.history.push(`/classrooms/${Mt.coursesId}/exportlist/${mt}`))}),Wt=(Mt,mt)=>Jt(void 0,null,function*(){const vt=yield(0,Pt.aP)(De({},Mt));vt.status===0?(Be.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),te.history.push(`/classrooms/${Mt.coursesId}/exportlist/${mt}`)):vt.status===-3&&((0,te.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),te.history.push(`/classrooms/${Mt.coursesId}/exportlist/${mt}`))}),Zt=Mt=>Jt(void 0,null,function*(){be(),(yield exportCourseWorkListAppendix(De({},Mt))).status===0&&(yield downLoadFileIframe("",setUrlQuery({url:ENV.API_SERVER+`/api/homework_commons/${Mt.categoryId}/works_list.zip`,query:Mt}))),It()}),$t=Mt=>Jt(void 0,null,function*(){be(),yield(0,Ae.QH)("",de.Z.API_SERVER+`/api/polls/${Mt.categoryId}/commit_result.xlsx`),It()}),Ce=Mt=>Jt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/courses/${Mt.coursesId}/attendances/export_xlsx_data.xlsx`,query:Mt}))}),ge=Mt=>Jt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/courses/${Mt.coursesId}/video_study_statics.xlsx`,query:Mt}))}),nn=Mt=>Jt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/courses/${Mt.coursesId}/export_video_study.xlsx`,query:Mt}))}),qe=Mt=>Jt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/courses/${Mt.coursesId}/export_course_students_info.xlsx`,query:Mt}))}),En=Mt=>Jt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+"/api/school_manages/students.xlsx",query:Mt}))}),Tn=Mt=>Jt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+"/api/item_banks/export.xlsx",query:Mt}))}),bn=Mt=>Jt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+"/api/competitions/region_reports.xlsx",query:Mt}))}),ni=Mt=>Jt(void 0,null,function*(){const mt=yield(0,Pt.Uy)(De({},Mt));mt.status===0?(Be.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),te.history.push(`/classrooms/${Mt.coursesId}/exportlist/exercise_score,export_exercise_users`)):mt.status===-3&&((0,te.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),te.history.push(`/classrooms/${Mt.coursesId}/exportlist/exercise_score,export_exercise_users`))}),In=Mt=>Jt(void 0,null,function*(){const mt=yield(0,Pt.tg)(De({},Mt));mt.status===0?(Be.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),te.history.push(`/classrooms/${Mt.coursesId}/exportlist/exercise_score,export_exercise_report`)):mt.status===-3&&((0,te.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),te.history.push(`/classrooms/${Mt.coursesId}/exportlist/exercise_score,export_exercise_report`))}),Ee=Mt=>Jt(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/${Mt.id}.xlsx`,query:Mt}))}),ie=Mt=>Jt(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:Mt}))}),Pn=Mt=>Jt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/courses/${Mt==null?void 0:Mt.coursesId}/${Mt.menuKey}_statistic.xlsx?${Mt.checkedList.map(mt=>`course_group_id[]=${mt}`).join("&")}`,query:Mt}))}),pi=Mt=>Jt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/ec_years/${Mt==null?void 0:Mt.ec_year_id}/ec_training_objectives.xlsx`,query:Mt}))}),Wn=Mt=>Jt(void 0,null,function*(){yield(0,Ae.FH)(Mt==null?void 0:Mt.name,(0,Ae.NY)({url:de.Z.API_SERVER+"/api/attachments/get_ecs_attachment.docx",query:Mt}))}),un=Mt=>Jt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/ec_years/${Mt==null?void 0:Mt.ec_year_id}/ec_courses.xlsx`,query:Mt}))}),Zn=Mt=>Jt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/ec_years/${Mt==null?void 0:Mt.ec_year_id}/ec_graduation_requirements.xlsx`,query:Mt}))}),si=Mt=>Jt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+"/api/courses/rank_list.xlsx",query:Mt}))}),Oi=Mt=>Jt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+"/api/courses/question_rank_list.xlsx",query:Mt}))}),on=Mt=>Jt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/examination_banks/${Mt.id}.json`,query:Mt}))}),ri=Mt=>Jt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/exercises/${Mt.categoryId}.json`,query:Mt}))}),Le=Mt=>Jt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/polls/${Mt==null?void 0:Mt.id}/commit_result.json`,query:Mt}))}),fi=Mt=>Jt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+"/api/paths/get_task_pass.json",query:Mt}))}),Pi=(Mt,mt)=>Jt(void 0,null,function*(){yield(0,Ae.FH)(mt||"",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/exercises/${Mt==null?void 0:Mt.exercise_id}/consult_exercise.json`,query:Mt}))}),jt=Mt=>Jt(void 0,null,function*(){yield(0,Ae.FH)("",(0,Ae.NY)({url:de.Z.API_SERVER+`/api/competitions/${Mt==null?void 0:Mt.identifier}/competition_commit_records/member_works.xlsx`,query:Mt}))})},96911:function(Cn,We,Qt){"use strict";Qt.d(We,{U:function(){return ce}});var Pt=Qt(59301),te=Object.defineProperty,Ae=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,Ht=(Vt,De,Jt)=>De in Vt?te(Vt,De,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Vt[De]=Jt,ne=(Vt,De)=>{for(var Jt in De||(De={}))Be.call(De,Jt)&&Ht(Vt,Jt,De[Jt]);if(Ae)for(var Jt of Ae(De))de.call(De,Jt)&&Ht(Vt,Jt,De[Jt]);return Vt},ue=(Vt,De,Jt)=>new Promise((be,It)=>{var nt=at=>{try{At(Jt.next(at))}catch(ct){It(ct)}},et=at=>{try{At(Jt.throw(at))}catch(ct){It(ct)}},At=at=>at.done?be(at.value):Promise.resolve(at.value).then(nt,et);At((Jt=Jt.apply(Vt,De)).next())});function ce(Vt,De){const[Jt,be]=(0,Pt.useState)(De),[It,nt]=(0,Pt.useState)(!1),[et,At]=(0,Pt.useState)();return[Jt,It,(ct,pt=!1)=>ue(this,null,function*(){const xt=pt?De:ne(ne({},Jt),ct);nt(!0),be(xt);const bt=yield Vt(xt);return nt(!1),At(bt),bt}),et,At]}},48421:function(Cn,We,Qt){"use strict";Qt.d(We,{AL:function(){return xt},Iy:function(){return De},Qv:function(){return It},ez:function(){return pt},jb:function(){return Jt}});var Pt=Qt(32834),te=Qt.n(Pt),Ae=Qt(11690),Be=Qt.n(Ae);let de=1;function Ht(Zt,$t){const Ce=Zt.match(/^(\s+)(?:```)/);if(Ce===null)return $t;const ge=Ce[1];return $t.split(`
`).map(nn=>{const qe=nn.match(/^\s+/);if(qe===null)return nn;const[En]=qe;return En.length>=ge.length?nn.slice(ge.length):nn}).join(`
`)}let ne=[],ue=["<ul>"];const ce=new(te()).Renderer,Vt=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function De(){ne.length=0,ue=["<ul>"]}const Jt={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function be(Zt,$t,Ce,ge){if($t>=Zt.length||Zt[$t].level<=Ce)return $t;var nn=Zt[$t];ge.push("<li><a href='#"+de+nn.anchor+"'>"+nn.text+"</a>"),$t++;var qe=[];return $t=be(Zt,$t,nn.level,qe),qe.length>0&&(ge.push("<ul>"),qe.forEach(function(En){ge.push(En)}),ge.push("</ul>")),ge.push("</li>"),$t=be(Zt,$t,Ce,ge),$t}function It(){return be(ne,0,0,ue),ue.push("</ul>"),ue.join("")}const nt={heading(Zt){const $t=Vt.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 Ce=$t[0];let ge=Ht(Ce,$t[3]||"");const nn=$t[2]?$t[2].trim():$t[2];if(["latex","katex","math"].indexOf(nn)>=0){const qe=at(),En=ge;ge=qe,ct[qe]={type:"block",expression:En}}return{type:"code",raw:Ce,lang:nn,text:ge}}}},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 bt(Zt){return Zt=Zt.replace(et,($t,Ce)=>{const ge=at();return ct[ge]={type:"inline",expression:Ce},ge}),Zt}const Rt=ce.listitem;ce.listitem=function(Zt){return Rt(bt(Zt))};const Ot=ce.paragraph;ce.paragraph=function(Zt){return Ot(bt(Zt))};const Wt=ce.tablecell;ce.tablecell=function(Zt,$t){return Wt(bt(Zt),$t)},ce.code=function(Zt,$t,Ce){const ge=($t||"").match(/\S*/)[0];return ge?["latex","katex","math"].indexOf(ge)>=0?`<p class='editormd-tex'>${Zt}</p>`:`<pre class="prettyprint linenums"><code class="language-${$t}">${Ce?Zt:(0,Ae.escape)(Zt,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(Ce?Zt:(0,Ae.escape)(Zt,!0))+"</code></pre>"},ce.heading=function(Zt,$t,Ce){let ge=this.options.headerPrefix+Ce.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ne.push({anchor:ge,level:$t,text:Zt}),"<h"+$t+' id="'+de+ge+'">'+Zt+"</h"+$t+">"},te().setOptions({silent:!0,gfm:!0,pedantic:!1}),te().use({tokenizer:nt,renderer:ce}),We.ZP=te()},86251:function(Cn,We){"use strict";We.byteLength=ne,We.toByteArray=ce,We.fromByteArray=Jt;for(var Qt=[],Pt=[],te=typeof Uint8Array!="undefined"?Uint8Array:Array,Ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Be=0,de=Ae.length;Be<de;++Be)Qt[Be]=Ae[Be],Pt[Ae.charCodeAt(Be)]=Be;Pt[45]=62,Pt[95]=63;function Ht(be){var It=be.length;if(It%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var nt=be.indexOf("=");nt===-1&&(nt=It);var et=nt===It?0:4-nt%4;return[nt,et]}function ne(be){var It=Ht(be),nt=It[0],et=It[1];return(nt+et)*3/4-et}function ue(be,It,nt){return(It+nt)*3/4-nt}function ce(be){var It,nt=Ht(be),et=nt[0],At=nt[1],at=new te(ue(be,et,At)),ct=0,pt=At>0?et-4:et,xt;for(xt=0;xt<pt;xt+=4)It=Pt[be.charCodeAt(xt)]<<18|Pt[be.charCodeAt(xt+1)]<<12|Pt[be.charCodeAt(xt+2)]<<6|Pt[be.charCodeAt(xt+3)],at[ct++]=It>>16&255,at[ct++]=It>>8&255,at[ct++]=It&255;return At===2&&(It=Pt[be.charCodeAt(xt)]<<2|Pt[be.charCodeAt(xt+1)]>>4,at[ct++]=It&255),At===1&&(It=Pt[be.charCodeAt(xt)]<<10|Pt[be.charCodeAt(xt+1)]<<4|Pt[be.charCodeAt(xt+2)]>>2,at[ct++]=It>>8&255,at[ct++]=It&255),at}function Vt(be){return Qt[be>>18&63]+Qt[be>>12&63]+Qt[be>>6&63]+Qt[be&63]}function De(be,It,nt){for(var et,At=[],at=It;at<nt;at+=3)et=(be[at]<<16&16711680)+(be[at+1]<<8&65280)+(be[at+2]&255),At.push(Vt(et));return At.join("")}function Jt(be){for(var It,nt=be.length,et=nt%3,At=[],at=16383,ct=0,pt=nt-et;ct<pt;ct+=at)At.push(De(be,ct,ct+at>pt?pt:ct+at));return et===1?(It=be[nt-1],At.push(Qt[It>>2]+Qt[It<<4&63]+"==")):et===2&&(It=(be[nt-2]<<8)+be[nt-1],At.push(Qt[It>>10]+Qt[It>>4&63]+Qt[It<<2&63]+"=")),At.join("")}},19208:function(Cn,We,Qt){"use strict";var Pt;var te=Qt(86251),Ae=Qt(67467),Be=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;We.lW=ue,Pt=ct,We.h2=50;var de=2147483647;Pt=de,ue.TYPED_ARRAY_SUPPORT=Ht(),!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 Ht(){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 Jt(mt)}return ce(mt,vt,Lt)}ue.poolSize=8192;function ce(mt,vt,Lt){if(typeof mt=="string")return be(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 _t=At(mt);if(_t)return _t;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 Vt(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 De(mt,vt,Lt){return Vt(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 De(mt,vt,Lt)};function Jt(mt){return Vt(mt),ne(mt<0?0:at(mt)|0)}ue.allocUnsafe=function(mt){return Jt(mt)},ue.allocUnsafeSlow=function(mt){return Jt(mt)};function be(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),_t=Bt.write(mt,vt);return _t!==Lt&&(Bt=Bt.slice(0,_t)),Bt}function It(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 It(mt)}function et(mt,vt,Lt){if(vt<0||mt.byteLength<vt)throw new RangeError('"offset" is outside of buffer bounds');if(mt.byteLength<vt+(Lt||0))throw new RangeError('"length" is outside of buffer bounds');var 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"||jt(mt.length)?ne(0):It(mt);if(mt.type==="Buffer"&&Array.isArray(mt.data))return It(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,_t=Lt.length,Me=0,ye=Math.min(Bt,_t);Me<ye;++Me)if(vt[Me]!==Lt[Me]){Bt=vt[Me],_t=Lt[Me];break}return Bt<_t?-1:_t<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 _t=ue.allocUnsafe(Lt),Me=0;for(Bt=0;Bt<vt.length;++Bt){var ye=vt[Bt];if(Pi(ye,Uint8Array))Me+ye.length>_t.length?ue.from(ye).copy(_t,Me):Uint8Array.prototype.set.call(_t,ye,Me);else if(ue.isBuffer(ye))ye.copy(_t,Me);else throw new TypeError('"list" argument must be an Array of Buffers');Me+=ye.length}return _t};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 _t=!1;;)switch(vt){case"ascii":case"latin1":case"binary":return Lt;case"utf8":case"utf-8":return Oi(mt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Lt*2;case"hex":return Lt>>>1;case"base64":return Le(mt).length;default:if(_t)return Bt?-1:Oi(mt).length;vt=(""+vt).toLowerCase(),_t=!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 In(this,vt,Lt);case"utf8":case"utf-8":return qe(this,vt,Lt);case"ascii":return bn(this,vt,Lt);case"latin1":case"binary":return ni(this,vt,Lt);case"base64":return nn(this,vt,Lt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ee(this,vt,Lt);default:if(Bt)throw new TypeError("Unknown encoding: "+mt);mt=(mt+"").toLowerCase(),Bt=!0}}ue.prototype._isBuffer=!0;function bt(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)bt(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)bt(this,Lt,Lt+3),bt(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)bt(this,Lt,Lt+7),bt(this,Lt+1,Lt+6),bt(this,Lt+2,Lt+5),bt(this,Lt+3,Lt+4);return this},ue.prototype.toString=function(){var vt=this.length;return vt===0?"":arguments.length===0?qe(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=We.h2;return vt=this.toString("hex",0,Lt).replace(/(.{2})/g,"$1 ").trim(),this.length>Lt&&(vt+=" ... "),"<Buffer "+vt+">"},Be&&(ue.prototype[Be]=ue.prototype.inspect),ue.prototype.compare=function(vt,Lt,Bt,_t,Me){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),_t===void 0&&(_t=0),Me===void 0&&(Me=this.length),Lt<0||Bt>vt.length||_t<0||Me>this.length)throw new RangeError("out of range index");if(_t>=Me&&Lt>=Bt)return 0;if(_t>=Me)return-1;if(Lt>=Bt)return 1;if(Lt>>>=0,Bt>>>=0,_t>>>=0,Me>>>=0,this===vt)return 0;for(var ye=Me-_t,Ye=Bt-Lt,Fe=Math.min(ye,Ye),Te=this.slice(_t,Me),Oe=vt.slice(Lt,Bt),$e=0;$e<Fe;++$e)if(Te[$e]!==Oe[$e]){ye=Te[$e],Ye=Oe[$e];break}return ye<Ye?-1:Ye<ye?1:0};function Rt(mt,vt,Lt,Bt,_t){if(mt.length===0)return-1;if(typeof Lt=="string"?(Bt=Lt,Lt=0):Lt>2147483647?Lt=2147483647:Lt<-2147483648&&(Lt=-2147483648),Lt=+Lt,jt(Lt)&&(Lt=_t?0:mt.length-1),Lt<0&&(Lt=mt.length+Lt),Lt>=mt.length){if(_t)return-1;Lt=mt.length-1}else if(Lt<0)if(_t)Lt=0;else return-1;if(typeof vt=="string"&&(vt=ue.from(vt,Bt)),ue.isBuffer(vt))return vt.length===0?-1:Ot(mt,vt,Lt,Bt,_t);if(typeof vt=="number")return vt=vt&255,typeof Uint8Array.prototype.indexOf=="function"?_t?Uint8Array.prototype.indexOf.call(mt,vt,Lt):Uint8Array.prototype.lastIndexOf.call(mt,vt,Lt):Ot(mt,[vt],Lt,Bt,_t);throw new TypeError("val must be string, number or Buffer")}function Ot(mt,vt,Lt,Bt,_t){var Me=1,ye=mt.length,Ye=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;Me=2,ye/=2,Ye/=2,Lt/=2}function Fe(Kn,Sn){return Me===1?Kn[Sn]:Kn.readUInt16BE(Sn*Me)}var Te;if(_t){var Oe=-1;for(Te=Lt;Te<ye;Te++)if(Fe(mt,Te)===Fe(vt,Oe===-1?0:Te-Oe)){if(Oe===-1&&(Oe=Te),Te-Oe+1===Ye)return Oe*Me}else Oe!==-1&&(Te-=Te-Oe),Oe=-1}else for(Lt+Ye>ye&&(Lt=ye-Ye),Te=Lt;Te>=0;Te--){for(var $e=!0,yn=0;yn<Ye;yn++)if(Fe(mt,Te+yn)!==Fe(vt,yn)){$e=!1;break}if($e)return Te}return-1}ue.prototype.includes=function(vt,Lt,Bt){return this.indexOf(vt,Lt,Bt)!==-1},ue.prototype.indexOf=function(vt,Lt,Bt){return Rt(this,vt,Lt,Bt,!0)},ue.prototype.lastIndexOf=function(vt,Lt,Bt){return Rt(this,vt,Lt,Bt,!1)};function Wt(mt,vt,Lt,Bt){Lt=Number(Lt)||0;var _t=mt.length-Lt;Bt?(Bt=Number(Bt),Bt>_t&&(Bt=_t)):Bt=_t;var Me=vt.length;Bt>Me/2&&(Bt=Me/2);for(var ye=0;ye<Bt;++ye){var Ye=parseInt(vt.substr(ye*2,2),16);if(jt(Ye))return ye;mt[Lt+ye]=Ye}return ye}function Zt(mt,vt,Lt,Bt){return fi(Oi(vt,mt.length-Lt),mt,Lt,Bt)}function $t(mt,vt,Lt,Bt){return fi(on(vt),mt,Lt,Bt)}function Ce(mt,vt,Lt,Bt){return fi(Le(vt),mt,Lt,Bt)}function ge(mt,vt,Lt,Bt){return fi(ri(vt,mt.length-Lt),mt,Lt,Bt)}ue.prototype.write=function(vt,Lt,Bt,_t){if(Lt===void 0)_t="utf8",Bt=this.length,Lt=0;else if(Bt===void 0&&typeof Lt=="string")_t=Lt,Bt=this.length,Lt=0;else if(isFinite(Lt))Lt=Lt>>>0,isFinite(Bt)?(Bt=Bt>>>0,_t===void 0&&(_t="utf8")):(_t=Bt,Bt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Me=this.length-Lt;if((Bt===void 0||Bt>Me)&&(Bt=Me),vt.length>0&&(Bt<0||Lt<0)||Lt>this.length)throw new RangeError("Attempt to write outside buffer bounds");_t||(_t="utf8");for(var ye=!1;;)switch(_t){case"hex":return Wt(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 Ce(this,vt,Lt,Bt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ge(this,vt,Lt,Bt);default:if(ye)throw new TypeError("Unknown encoding: "+_t);_t=(""+_t).toLowerCase(),ye=!0}},ue.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function nn(mt,vt,Lt){return vt===0&&Lt===mt.length?te.fromByteArray(mt):te.fromByteArray(mt.slice(vt,Lt))}function qe(mt,vt,Lt){Lt=Math.min(mt.length,Lt);for(var Bt=[],_t=vt;_t<Lt;){var Me=mt[_t],ye=null,Ye=Me>239?4:Me>223?3:Me>191?2:1;if(_t+Ye<=Lt){var Fe,Te,Oe,$e;switch(Ye){case 1:Me<128&&(ye=Me);break;case 2:Fe=mt[_t+1],(Fe&192)===128&&($e=(Me&31)<<6|Fe&63,$e>127&&(ye=$e));break;case 3:Fe=mt[_t+1],Te=mt[_t+2],(Fe&192)===128&&(Te&192)===128&&($e=(Me&15)<<12|(Fe&63)<<6|Te&63,$e>2047&&($e<55296||$e>57343)&&(ye=$e));break;case 4:Fe=mt[_t+1],Te=mt[_t+2],Oe=mt[_t+3],(Fe&192)===128&&(Te&192)===128&&(Oe&192)===128&&($e=(Me&15)<<18|(Fe&63)<<12|(Te&63)<<6|Oe&63,$e>65535&&$e<1114112&&(ye=$e))}}ye===null?(ye=65533,Ye=1):ye>65535&&(ye-=65536,Bt.push(ye>>>10&1023|55296),ye=56320|ye&1023),Bt.push(ye),_t+=Ye}return Tn(Bt)}var En=4096;function Tn(mt){var vt=mt.length;if(vt<=En)return String.fromCharCode.apply(String,mt);for(var Lt="",Bt=0;Bt<vt;)Lt+=String.fromCharCode.apply(String,mt.slice(Bt,Bt+=En));return Lt}function bn(mt,vt,Lt){var Bt="";Lt=Math.min(mt.length,Lt);for(var _t=vt;_t<Lt;++_t)Bt+=String.fromCharCode(mt[_t]&127);return Bt}function ni(mt,vt,Lt){var Bt="";Lt=Math.min(mt.length,Lt);for(var _t=vt;_t<Lt;++_t)Bt+=String.fromCharCode(mt[_t]);return Bt}function In(mt,vt,Lt){var Bt=mt.length;(!vt||vt<0)&&(vt=0),(!Lt||Lt<0||Lt>Bt)&&(Lt=Bt);for(var _t="",Me=vt;Me<Lt;++Me)_t+=Mt[mt[Me]];return _t}function Ee(mt,vt,Lt){for(var Bt=mt.slice(vt,Lt),_t="",Me=0;Me<Bt.length-1;Me+=2)_t+=String.fromCharCode(Bt[Me]+Bt[Me+1]*256);return _t}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 _t=this.subarray(vt,Lt);return Object.setPrototypeOf(_t,ue.prototype),_t};function ie(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||ie(vt,Lt,this.length);for(var _t=this[vt],Me=1,ye=0;++ye<Lt&&(Me*=256);)_t+=this[vt+ye]*Me;return _t},ue.prototype.readUintBE=ue.prototype.readUIntBE=function(vt,Lt,Bt){vt=vt>>>0,Lt=Lt>>>0,Bt||ie(vt,Lt,this.length);for(var _t=this[vt+--Lt],Me=1;Lt>0&&(Me*=256);)_t+=this[vt+--Lt]*Me;return _t},ue.prototype.readUint8=ue.prototype.readUInt8=function(vt,Lt){return vt=vt>>>0,Lt||ie(vt,1,this.length),this[vt]},ue.prototype.readUint16LE=ue.prototype.readUInt16LE=function(vt,Lt){return vt=vt>>>0,Lt||ie(vt,2,this.length),this[vt]|this[vt+1]<<8},ue.prototype.readUint16BE=ue.prototype.readUInt16BE=function(vt,Lt){return vt=vt>>>0,Lt||ie(vt,2,this.length),this[vt]<<8|this[vt+1]},ue.prototype.readUint32LE=ue.prototype.readUInt32LE=function(vt,Lt){return vt=vt>>>0,Lt||ie(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||ie(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||ie(vt,Lt,this.length);for(var _t=this[vt],Me=1,ye=0;++ye<Lt&&(Me*=256);)_t+=this[vt+ye]*Me;return Me*=128,_t>=Me&&(_t-=Math.pow(2,8*Lt)),_t},ue.prototype.readIntBE=function(vt,Lt,Bt){vt=vt>>>0,Lt=Lt>>>0,Bt||ie(vt,Lt,this.length);for(var _t=Lt,Me=1,ye=this[vt+--_t];_t>0&&(Me*=256);)ye+=this[vt+--_t]*Me;return Me*=128,ye>=Me&&(ye-=Math.pow(2,8*Lt)),ye},ue.prototype.readInt8=function(vt,Lt){return vt=vt>>>0,Lt||ie(vt,1,this.length),this[vt]&128?(255-this[vt]+1)*-1:this[vt]},ue.prototype.readInt16LE=function(vt,Lt){vt=vt>>>0,Lt||ie(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||ie(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||ie(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||ie(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||ie(vt,4,this.length),Ae.read(this,vt,!0,23,4)},ue.prototype.readFloatBE=function(vt,Lt){return vt=vt>>>0,Lt||ie(vt,4,this.length),Ae.read(this,vt,!1,23,4)},ue.prototype.readDoubleLE=function(vt,Lt){return vt=vt>>>0,Lt||ie(vt,8,this.length),Ae.read(this,vt,!0,52,8)},ue.prototype.readDoubleBE=function(vt,Lt){return vt=vt>>>0,Lt||ie(vt,8,this.length),Ae.read(this,vt,!1,52,8)};function Pn(mt,vt,Lt,Bt,_t,Me){if(!ue.isBuffer(mt))throw new TypeError('"buffer" argument must be a Buffer instance');if(vt>_t||vt<Me)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,_t){if(vt=+vt,Lt=Lt>>>0,Bt=Bt>>>0,!_t){var Me=Math.pow(2,8*Bt)-1;Pn(this,vt,Lt,Bt,Me,0)}var ye=1,Ye=0;for(this[Lt]=vt&255;++Ye<Bt&&(ye*=256);)this[Lt+Ye]=vt/ye&255;return Lt+Bt},ue.prototype.writeUintBE=ue.prototype.writeUIntBE=function(vt,Lt,Bt,_t){if(vt=+vt,Lt=Lt>>>0,Bt=Bt>>>0,!_t){var Me=Math.pow(2,8*Bt)-1;Pn(this,vt,Lt,Bt,Me,0)}var ye=Bt-1,Ye=1;for(this[Lt+ye]=vt&255;--ye>=0&&(Ye*=256);)this[Lt+ye]=vt/Ye&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,_t){if(vt=+vt,Lt=Lt>>>0,!_t){var Me=Math.pow(2,8*Bt-1);Pn(this,vt,Lt,Bt,Me-1,-Me)}var ye=0,Ye=1,Fe=0;for(this[Lt]=vt&255;++ye<Bt&&(Ye*=256);)vt<0&&Fe===0&&this[Lt+ye-1]!==0&&(Fe=1),this[Lt+ye]=(vt/Ye>>0)-Fe&255;return Lt+Bt},ue.prototype.writeIntBE=function(vt,Lt,Bt,_t){if(vt=+vt,Lt=Lt>>>0,!_t){var Me=Math.pow(2,8*Bt-1);Pn(this,vt,Lt,Bt,Me-1,-Me)}var ye=Bt-1,Ye=1,Fe=0;for(this[Lt+ye]=vt&255;--ye>=0&&(Ye*=256);)vt<0&&Fe===0&&this[Lt+ye+1]!==0&&(Fe=1),this[Lt+ye]=(vt/Ye>>0)-Fe&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 pi(mt,vt,Lt,Bt,_t,Me){if(Lt+Bt>mt.length)throw new RangeError("Index out of range");if(Lt<0)throw new RangeError("Index out of range")}function Wn(mt,vt,Lt,Bt,_t){return vt=+vt,Lt=Lt>>>0,_t||pi(mt,vt,Lt,4,34028234663852886e22,-34028234663852886e22),Ae.write(mt,vt,Lt,Bt,23,4),Lt+4}ue.prototype.writeFloatLE=function(vt,Lt,Bt){return Wn(this,vt,Lt,!0,Bt)},ue.prototype.writeFloatBE=function(vt,Lt,Bt){return Wn(this,vt,Lt,!1,Bt)};function un(mt,vt,Lt,Bt,_t){return vt=+vt,Lt=Lt>>>0,_t||pi(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,_t){if(!ue.isBuffer(vt))throw new TypeError("argument should be a Buffer");if(Bt||(Bt=0),!_t&&_t!==0&&(_t=this.length),Lt>=vt.length&&(Lt=vt.length),Lt||(Lt=0),_t>0&&_t<Bt&&(_t=Bt),_t===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(_t<0)throw new RangeError("sourceEnd out of bounds");_t>this.length&&(_t=this.length),vt.length-Lt<_t-Bt&&(_t=vt.length-Lt+Bt);var Me=_t-Bt;return this===vt&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(Lt,Bt,_t):Uint8Array.prototype.set.call(vt,this.subarray(Bt,_t),Lt),Me},ue.prototype.fill=function(vt,Lt,Bt,_t){if(typeof vt=="string"){if(typeof Lt=="string"?(_t=Lt,Lt=0,Bt=this.length):typeof Bt=="string"&&(_t=Bt,Bt=this.length),_t!==void 0&&typeof _t!="string")throw new TypeError("encoding must be a string");if(typeof _t=="string"&&!ue.isEncoding(_t))throw new TypeError("Unknown encoding: "+_t);if(vt.length===1){var Me=vt.charCodeAt(0);(_t==="utf8"&&Me<128||_t==="latin1")&&(vt=Me)}}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 ye;if(typeof vt=="number")for(ye=Lt;ye<Bt;++ye)this[ye]=vt;else{var Ye=ue.isBuffer(vt)?vt:ue.from(vt,_t),Fe=Ye.length;if(Fe===0)throw new TypeError('The value "'+vt+'" is invalid for argument "value"');for(ye=0;ye<Bt-Lt;++ye)this[ye+Lt]=Ye[ye%Fe]}return this};var Zn=/[^+/0-9A-Za-z-_]/g;function si(mt){if(mt=mt.split("=")[0],mt=mt.trim().replace(Zn,""),mt.length<2)return"";for(;mt.length%4!==0;)mt=mt+"=";return mt}function Oi(mt,vt){vt=vt||1/0;for(var Lt,Bt=mt.length,_t=null,Me=[],ye=0;ye<Bt;++ye){if(Lt=mt.charCodeAt(ye),Lt>55295&&Lt<57344){if(!_t){if(Lt>56319){(vt-=3)>-1&&Me.push(239,191,189);continue}else if(ye+1===Bt){(vt-=3)>-1&&Me.push(239,191,189);continue}_t=Lt;continue}if(Lt<56320){(vt-=3)>-1&&Me.push(239,191,189),_t=Lt;continue}Lt=(_t-55296<<10|Lt-56320)+65536}else _t&&(vt-=3)>-1&&Me.push(239,191,189);if(_t=null,Lt<128){if((vt-=1)<0)break;Me.push(Lt)}else if(Lt<2048){if((vt-=2)<0)break;Me.push(Lt>>6|192,Lt&63|128)}else if(Lt<65536){if((vt-=3)<0)break;Me.push(Lt>>12|224,Lt>>6&63|128,Lt&63|128)}else if(Lt<1114112){if((vt-=4)<0)break;Me.push(Lt>>18|240,Lt>>12&63|128,Lt>>6&63|128,Lt&63|128)}else throw new Error("Invalid code point")}return Me}function on(mt){for(var vt=[],Lt=0;Lt<mt.length;++Lt)vt.push(mt.charCodeAt(Lt)&255);return vt}function ri(mt,vt){for(var Lt,Bt,_t,Me=[],ye=0;ye<mt.length&&!((vt-=2)<0);++ye)Lt=mt.charCodeAt(ye),Bt=Lt>>8,_t=Lt%256,Me.push(_t),Me.push(Bt);return Me}function Le(mt){return te.toByteArray(si(mt))}function fi(mt,vt,Lt,Bt){for(var _t=0;_t<Bt&&!(_t+Lt>=vt.length||_t>=mt.length);++_t)vt[_t+Lt]=mt[_t];return _t}function Pi(mt,vt){return mt instanceof vt||mt!=null&&mt.constructor!=null&&mt.constructor.name!=null&&mt.constructor.name===vt.name}function jt(mt){return mt!==mt}var Mt=function(){for(var mt="0123456789abcdef",vt=new Array(256),Lt=0;Lt<16;++Lt)for(var Bt=Lt*16,_t=0;_t<16;++_t)vt[Bt+_t]=mt[Lt]+mt[_t];return vt}()},57780:function(Cn,We,Qt){"use strict";Qt.r(We),Qt.d(We,{clsx:function(){return te}});function Pt(Ae){var Be,de,Ht="";if(typeof Ae=="string"||typeof Ae=="number")Ht+=Ae;else if(typeof Ae=="object")if(Array.isArray(Ae))for(Be=0;Be<Ae.length;Be++)Ae[Be]&&(de=Pt(Ae[Be]))&&(Ht&&(Ht+=" "),Ht+=de);else for(Be in Ae)Ae[Be]&&(Ht&&(Ht+=" "),Ht+=Be);return Ht}function te(){for(var Ae,Be,de=0,Ht="";de<arguments.length;)(Ae=arguments[de++])&&(Be=Pt(Ae))&&(Ht&&(Ht+=" "),Ht+=Be);return Ht}We.default=te},99498:function(Cn,We,Qt){(function(Pt){Pt(Qt(89780))})(function(Pt){Pt.defineOption("placeholder","",function(ue,ce,Vt){var De=Vt&&Vt!=Pt.Init;if(ce&&!De)ue.on("blur",de),ue.on("change",Ht),ue.on("swapDoc",Ht),Pt.on(ue.getInputField(),"compositionupdate",ue.state.placeholderCompose=function(){Be(ue)}),Ht(ue);else if(!ce&&De){ue.off("blur",de),ue.off("change",Ht),ue.off("swapDoc",Ht),Pt.off(ue.getInputField(),"compositionupdate",ue.state.placeholderCompose),te(ue);var Jt=ue.getWrapperElement();Jt.className=Jt.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 Vt=ue.getOption("placeholder");typeof Vt=="string"&&(Vt=document.createTextNode(Vt)),ce.appendChild(Vt),ue.display.lineSpace.insertBefore(ce,ue.display.lineSpace.firstChild)}function Be(ue){setTimeout(function(){var ce=!1,Vt=ue.getInputField();Vt.nodeName=="TEXTAREA"?ce=!Vt.value:ue.lineCount()==1&&(ce=!/[^\u200b]/.test(Vt.querySelector(".CodeMirror-line").textContent)),ce?Ae(ue):te(ue)},20)}function de(ue){ne(ue)&&Ae(ue)}function Ht(ue){var ce=ue.getWrapperElement(),Vt=ne(ue);ce.className=ce.className.replace(" CodeMirror-empty","")+(Vt?" CodeMirror-empty":""),Vt?Ae(ue):te(ue)}function ne(ue){return ue.lineCount()===1&&ue.getLine(0)===""}})},25717:function(Cn,We,Qt){(function(Pt){Pt(Qt(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&&(Ht(Be(et,"pairs")),nt.state.closeBrackets=et,nt.addKeyMap(de))});function Be(nt,et){return et=="pairs"&&typeof nt=="string"?nt:typeof nt=="object"&&nt[et]!=null?nt[et]:te[et]}var de={Backspace:ce,Enter:Vt};function Ht(nt){for(var et=0;et<nt.length;et++){var At=nt.charAt(et),at="'"+At+"'";de[at]||(de[at]=ne(At))}}Ht(te.pairs+"`");function ne(nt){return function(et){return Jt(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=Be(et,"pairs"),at=nt.listSelections(),ct=0;ct<at.length;ct++){if(!at[ct].empty())return Pt.Pass;var pt=be(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 Vt(nt){var et=ue(nt),At=et&&Be(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=be(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 bt=0;bt<at.length;bt++){var Rt=at[bt].head.line;nt.indentLine(Rt,null,!0),nt.indentLine(Rt+1,null,!0)}})}function De(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 Jt(nt,et){var At=ue(nt);if(!At||nt.getOption("disableInput"))return Pt.Pass;var at=Be(At,"pairs"),ct=at.indexOf(et);if(ct==-1)return Pt.Pass;for(var pt=Be(At,"closeBefore"),xt=Be(At,"triples"),bt=at.charAt(ct+1)==et,Rt=nt.listSelections(),Ot=ct%2==0,Wt,Zt=0;Zt<Rt.length;Zt++){var $t=Rt[Zt],Ce=$t.head,ge,nn=nt.getRange(Ce,Ae(Ce.line,Ce.ch+1));if(Ot&&!$t.empty())ge="surround";else if((bt||!Ot)&&nn==et)bt&&It(nt,Ce)?ge="both":xt.indexOf(et)>=0&&nt.getRange(Ce,Ae(Ce.line,Ce.ch+3))==et+et+et?ge="skipThree":ge="skip";else if(bt&&Ce.ch>1&&xt.indexOf(et)>=0&&nt.getRange(Ae(Ce.line,Ce.ch-2),Ce)==et+et){if(Ce.ch>2&&/\bstring/.test(nt.getTokenTypeAt(Ae(Ce.line,Ce.ch-2))))return Pt.Pass;ge="addFour"}else if(bt){var qe=Ce.ch==0?" ":nt.getRange(Ae(Ce.line,Ce.ch-1),Ce);if(!Pt.isWordChar(nn)&&qe!=et&&!Pt.isWordChar(qe))ge="both";else return Pt.Pass}else if(Ot&&(nn.length===0||/\s/.test(nn)||pt.indexOf(nn)>-1))ge="both";else return Pt.Pass;if(!Wt)Wt=ge;else if(Wt!=ge)return Pt.Pass}var En=ct%2?at.charAt(ct-1):et,Tn=ct%2?et:at.charAt(ct+1);nt.operation(function(){if(Wt=="skip")nt.execCommand("goCharRight");else if(Wt=="skipThree")for(var bn=0;bn<3;bn++)nt.execCommand("goCharRight");else if(Wt=="surround"){for(var ni=nt.getSelections(),bn=0;bn<ni.length;bn++)ni[bn]=En+ni[bn]+Tn;nt.replaceSelections(ni,"around"),ni=nt.listSelections().slice();for(var bn=0;bn<ni.length;bn++)ni[bn]=De(ni[bn]);nt.setSelections(ni)}else Wt=="both"?(nt.replaceSelection(En+Tn,null),nt.triggerElectric(En+Tn),nt.execCommand("goCharLeft")):Wt=="addFour"&&(nt.replaceSelection(En+En+En+En,"before"),nt.execCommand("goCharRight"))})}function be(nt,et){var At=nt.getRange(Ae(et.line,et.ch-1),Ae(et.line,et.ch+1));return At.length==2?At:null}function It(nt,et){var At=nt.getTokenAt(Ae(et.line,et.ch+1));return/\bstring/.test(At.type)&&At.start==et.ch&&(et.ch==0||!/\bstring/.test(nt.getTokenTypeAt(et)))}})},6313:function(Cn,We,Qt){(function(Pt){Pt(Qt(89780),Qt(32855))})(function(Pt){Pt.defineOption("autoCloseTags",!1,function(ce,Vt,De){if(De!=Pt.Init&&De&&ce.removeKeyMap("autoCloseTags"),!!Vt){var Jt={name:"autoCloseTags"};(typeof Vt!="object"||Vt.whenClosing!==!1)&&(Jt["'/'"]=function(be){return Ht(be)}),(typeof Vt!="object"||Vt.whenOpening!==!1)&&(Jt["'>'"]=function(be){return Be(be)}),ce.addKeyMap(Jt)}});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 Be(ce){if(ce.getOption("disableInput"))return Pt.Pass;for(var Vt=ce.listSelections(),De=[],Jt=ce.getOption("autoCloseTags"),be=0;be<Vt.length;be++){if(!Vt[be].empty())return Pt.Pass;var It=Vt[be].head,nt=ce.getTokenAt(It),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 Jt=="object"&&Jt.dontCloseTags||pt&&te,bt=typeof Jt=="object"&&Jt.indentTags||pt&&Ae;nt.end>It.ch&&(ct=ct.slice(0,ct.length-nt.end+It.ch));var Rt=ct.toLowerCase();if(!ct||nt.type=="string"&&(nt.end!=It.ch||!/[\"\']/.test(nt.string.charAt(nt.string.length-1))||nt.string.length==1)||nt.type=="tag"&&at.close||nt.string.indexOf("/")==It.ch-nt.start-1||xt&&ne(xt,Rt)>-1||ue(ce,et.mode.xmlCurrentContext&&et.mode.xmlCurrentContext(At)||[],ct,It,!0))return Pt.Pass;var Ot=typeof Jt=="object"&&Jt.emptyTags;if(Ot&&ne(Ot,ct)>-1){De[be]={text:"/>",newPos:Pt.Pos(It.line,It.ch+2)};continue}var Wt=bt&&ne(bt,Rt)>-1;De[be]={indent:Wt,text:">"+(Wt?`
`:"")+"</"+ct+">",newPos:Wt?Pt.Pos(It.line+1,0):Pt.Pos(It.line,It.ch+1)}}for(var Zt=typeof Jt=="object"&&Jt.dontIndentOnAutoClose,be=Vt.length-1;be>=0;be--){var $t=De[be];ce.replaceRange($t.text,Vt[be].head,Vt[be].anchor,"+insert");var Ce=ce.listSelections().slice(0);Ce[be]={head:$t.newPos,anchor:$t.newPos},ce.setSelections(Ce),!Zt&&$t.indent&&(ce.indentLine($t.newPos.line,null,!0),ce.indentLine($t.newPos.line+1,null,!0))}}function de(ce,Vt){for(var De=ce.listSelections(),Jt=[],be=Vt?"/":"</",It=ce.getOption("autoCloseTags"),nt=typeof It=="object"&&It.dontIndentOnSlash,et=0;et<De.length;et++){if(!De[et].empty())return Pt.Pass;var At=De[et].head,at=ce.getTokenAt(At),ct=Pt.innerMode(ce.getMode(),at.state),pt=ct.state;if(Vt&&(at.type=="string"||at.string.charAt(0)!="<"||at.start!=At.ch-1))return Pt.Pass;var xt,bt=ct.mode.name!="xml"&&ce.getMode().name=="htmlmixed";if(bt&&ct.mode.name=="javascript")xt=be+"script";else if(bt&&ct.mode.name=="css")xt=be+"style";else{var Rt=ct.mode.xmlCurrentContext&&ct.mode.xmlCurrentContext(pt);if(!Rt||Rt.length&&ue(ce,Rt,Rt[Rt.length-1],At))return Pt.Pass;xt=be+Rt[Rt.length-1]}ce.getLine(At.line).charAt(at.end)!=">"&&(xt+=">"),Jt[et]=xt}if(ce.replaceSelections(Jt),De=ce.listSelections(),!nt)for(var et=0;et<De.length;et++)(et==De.length-1||De[et].head.line<De[et+1].head.line)&&ce.indentLine(De[et].head.line)}function Ht(ce){return ce.getOption("disableInput")?Pt.Pass:de(ce,!0)}Pt.commands.closeTag=function(ce){return de(ce)};function ne(ce,Vt){if(ce.indexOf)return ce.indexOf(Vt);for(var De=0,Jt=ce.length;De<Jt;++De)if(ce[De]==Vt)return De;return-1}function ue(ce,Vt,De,Jt,be){if(!Pt.scanForClosingTag)return!1;var It=Math.min(ce.lastLine()+1,Jt.line+500),nt=Pt.scanForClosingTag(ce,Jt,null,It);if(!nt||nt.tag!=De)return!1;for(var et=be?1:0,At=Vt.length-1;At>=0&&Vt[At]==De;At--)++et;Jt=nt.to;for(var At=1;At<et;At++){var at=Pt.scanForClosingTag(ce,Jt,null,It);if(!at||at.tag!=De)return!1;Jt=at.to}return!0}})},32855:function(Cn,We,Qt){(function(Pt){Pt(Qt(89780))})(function(Pt){"use strict";var te=Pt.Pos;function Ae(At,at){return At.line-at.line||At.ch-at.ch}var Be="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=Be+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Ht=new RegExp("<(/?)(["+Be+"]["+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 Vt(At){if(!(At.line<=At.min))return At.text=At.cm.getLine(--At.line),At.ch=At.text.length,!0}function De(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 Jt(At){for(;;){var at=At.ch?At.text.lastIndexOf("<",At.ch-1):-1;if(at==-1){if(Vt(At))continue;return}if(!ue(At,at+1)){At.ch=at;continue}Ht.lastIndex=at,At.ch=at;var ct=Ht.exec(At.text);if(ct&&ct.index==at)return ct}}function be(At){for(;;){Ht.lastIndex=At.ch;var at=Ht.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 It(At){for(;;){var at=At.ch?At.text.lastIndexOf(">",At.ch-1):-1;if(at==-1){if(Vt(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=be(At),xt,bt=At.line,Rt=At.ch-(pt?pt[0].length:0);if(!pt||!(xt=De(At)))return;if(xt!="selfClose")if(pt[1]){for(var Ot=ct.length-1;Ot>=0;--Ot)if(ct[Ot]==pt[2]){ct.length=Ot;break}if(Ot<0&&(!at||at==pt[2]))return{tag:pt[2],from:te(bt,Rt),to:te(At.line,At.ch)}}else ct.push(pt[2])}}function et(At,at){for(var ct=[];;){var pt=It(At);if(!pt)return;if(pt=="selfClose"){Jt(At);continue}var xt=At.line,bt=At.ch,Rt=Jt(At);if(!Rt)return;if(Rt[1])ct.push(Rt[2]);else{for(var Ot=ct.length-1;Ot>=0;--Ot)if(ct[Ot]==Rt[2]){ct.length=Ot;break}if(Ot<0&&(!at||at==Rt[2]))return{tag:Rt[2],from:te(At.line,At.ch),to:te(xt,bt)}}}}Pt.registerHelper("fold","xml",function(At,at){for(var ct=new ne(At,at.line,0);;){var pt=be(ct);if(!pt||ct.line!=at.line)return;var xt=De(ct);if(!xt)return;if(!pt[1]&&xt!="selfClose"){var bt=te(ct.line,ct.ch),Rt=nt(ct,pt[2]);return Rt&&Ae(Rt.from,bt)>0?{from:bt,to:Rt.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=De(pt),bt=xt&&te(pt.line,pt.ch),Rt=xt&&Jt(pt);if(!(!xt||!Rt||Ae(pt,at)>0)){var Ot={from:te(pt.line,pt.ch),to:bt,tag:Rt[2]};return xt=="selfClose"?{open:Ot,close:null,at:"open"}:Rt[1]?{open:et(pt,Rt[2]),close:Ot,at:"close"}:(pt=new ne(At,bt.line,bt.ch,ct),{open:Ot,close:nt(pt,Rt[2]),at:"open"})}}},Pt.findEnclosingTag=function(At,at,ct,pt){for(var xt=new ne(At,at.line,at.ch,ct);;){var bt=et(xt,pt);if(!bt)break;var Rt=new ne(At,at.line,at.ch,ct),Ot=nt(Rt,bt.tag);if(Ot)return{open:bt,close:Ot}}},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(Cn){(function(We,Qt){Cn.exports=Qt()})(this,function(){"use strict";var We=navigator.userAgent,Qt=navigator.platform,Pt=/gecko\/\d/i.test(We),te=/MSIE \d/.test(We),Ae=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(We),Be=/Edge\/(\d+)/.exec(We),de=te||Ae||Be,Ht=de&&(te?document.documentMode||6:+(Be||Ae)[1]),ne=!Be&&/WebKit\//.test(We),ue=ne&&/Qt\/\d+\.\d+/.test(We),ce=!Be&&/Chrome\//.test(We),Vt=/Opera\//.test(We),De=/Apple Computer/.test(navigator.vendor),Jt=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(We),be=/PhantomJS/.test(We),It=!Be&&/AppleWebKit/.test(We)&&/Mobile\/\w+/.test(We),nt=/Android/.test(We),et=It||nt||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(We),At=It||/Mac/.test(Qt),at=/\bCrOS\b/.test(We),ct=/win/i.test(Qt),pt=Vt&&We.match(/Version\/(\d*\.\d*)/);pt&&(pt=Number(pt[1])),pt&&pt>=15&&(Vt=!1,ne=!0);var xt=At&&(ue||Vt&&(pt==null||pt<12.11)),bt=Pt||de&&Ht>=9;function Rt(it){return new RegExp("(^|\\s)"+it+"(?:$|\\s)\\s*")}var Ot=function(it,st){var dt=it.className,ht=Rt(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 Wt(it){for(var st=it.childNodes.length;st>0;--st)it.removeChild(it.firstChild);return it}function Zt(it,st){return Wt(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 Ce(it,st,dt,ht){var gt=$t(it,st,dt,ht);return gt.setAttribute("role","presentation"),gt}var ge;document.createRange?ge=function(it,st,dt,ht){var gt=document.createRange();return gt.setEnd(ht||it,dt),gt.setStart(it,st),gt}:ge=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 nn(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 qe(){var it;try{it=document.activeElement}catch(st){it=document.body||null}for(;it&&it.shadowRoot&&it.shadowRoot.activeElement;)it=it.shadowRoot.activeElement;return it}function En(it,st){var dt=it.className;Rt(st).test(dt)||(it.className+=(dt?" ":"")+st)}function Tn(it,st){for(var dt=it.split(" "),ht=0;ht<dt.length;ht++)dt[ht]&&!Rt(dt[ht]).test(st)&&(st+=" "+dt[ht]);return st}var bn=function(it){it.select()};It?bn=function(it){it.selectionStart=0,it.selectionEnd=it.value.length}:de&&(bn=function(it){try{it.select()}catch(st){}});function ni(it){var st=Array.prototype.slice.call(arguments,1);return function(){return it.apply(null,st)}}function In(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 Ee(it,st,dt,ht,gt){st==null&&(st=it.search(/[^\s\u00a0]/),st==-1&&(st=it.length));for(var Nt=ht||0,Kt=gt||0;;){var qt=it.indexOf(" ",Nt);if(qt<0||qt>=st)return Kt+(st-Nt);Kt+=qt-Nt,Kt+=dt-Kt%dt,Nt=qt+1}}var ie=function(){this.id=null,this.f=null,this.time=0,this.handler=ni(this.onTimeout,this)};ie.prototype.onTimeout=function(it){it.id=0,it.time<=+new Date?it.f():setTimeout(it.handler,it.time-+new Date)},ie.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 pi=50,Wn={toString:function(){return"CodeMirror.Pass"}},un={scroll:!1},Zn={origin:"*mouse"},si={origin:"+move"};function Oi(it,st,dt){for(var ht=0,gt=0;;){var Nt=it.indexOf(" ",ht);Nt==-1&&(Nt=it.length);var Kt=Nt-ht;if(Nt==it.length||gt+Kt>=st)return ht+Math.min(Kt,st-gt);if(gt+=Nt-ht,gt+=dt-gt%dt,ht=Nt+1,gt>=st)return ht}}var on=[""];function ri(it){for(;on.length<=it;)on.push(Le(on)+" ");return on[it]}function Le(it){return it[it.length-1]}function fi(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 jt(){}function Mt(it,st){var dt;return Object.create?dt=Object.create(it):(jt.prototype=it,dt=new jt),st&&In(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 _t=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Me(it){return it.charCodeAt(0)>=768&&_t.test(it)}function ye(it,st,dt){for(;(dt<0?st>0:st<it.length)&&Me(it.charAt(st));)st+=dt;return st}function Ye(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 Fe(it,st,dt,ht){if(!it)return ht(st,dt,"ltr",0);for(var gt=!1,Nt=0;Nt<it.length;++Nt){var Kt=it[Nt];(Kt.from<dt&&Kt.to>st||st==dt&&Kt.to==st)&&(ht(Math.max(Kt.from,st),Math.min(Kt.to,dt),Kt.level==1?"rtl":"ltr",Nt),gt=!0)}gt||ht(st,dt,"ltr")}var Te=null;function Oe(it,st,dt){var ht;Te=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:Te=gt),Nt.from==st&&(Nt.from!=Nt.to&&dt!="before"?ht=gt:Te=gt)}return ht!=null?ht:Te}var $e=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]/,Kt=/[Lb1n]/,qt=/[1n]/;function Yt(pe,Je,ve){this.level=pe,this.from=Je,this.to=ve}return function(pe,Je){var ve=Je=="ltr"?"L":"R";if(pe.length==0||Je=="ltr"&&!ht.test(pe))return!1;for(var Ln=pe.length,Bn=[],Bi=0;Bi<Ln;++Bi)Bn.push(dt(pe.charCodeAt(Bi)));for(var Li=0,ji=ve;Li<Ln;++Li){var or=Bn[Li];or=="m"?Bn[Li]=ji:ji=or}for(var Mr=0,Sr=ve;Mr<Ln;++Mr){var Hr=Bn[Mr];Hr=="1"&&Sr=="r"?Bn[Mr]="n":Nt.test(Hr)&&(Sr=Hr,Hr=="r"&&(Bn[Mr]="R"))}for(var uo=1,wr=Bn[0];uo<Ln-1;++uo){var Mo=Bn[uo];Mo=="+"&&wr=="1"&&Bn[uo+1]=="1"?Bn[uo]="1":Mo==","&&wr==Bn[uo+1]&&(wr=="1"||wr=="n")&&(Bn[uo]=wr),wr=Mo}for(var Hs=0;Hs<Ln;++Hs){var Sa=Bn[Hs];if(Sa==",")Bn[Hs]="N";else if(Sa=="%"){var Ws=void 0;for(Ws=Hs+1;Ws<Ln&&Bn[Ws]=="%";++Ws);for(var ml=Hs&&Bn[Hs-1]=="!"||Ws<Ln&&Bn[Ws]=="1"?"1":"N",ba=Hs;ba<Ws;++ba)Bn[ba]=ml;Hs=Ws-1}}for(var ma=0,ol=ve;ma<Ln;++ma){var Ia=Bn[ma];ol=="L"&&Ia=="1"?Bn[ma]="L":Nt.test(Ia)&&(ol=Ia)}for(var mr=0;mr<Ln;++mr)if(gt.test(Bn[mr])){var jo=void 0;for(jo=mr+1;jo<Ln&&gt.test(Bn[jo]);++jo);for(var Rs=(mr?Bn[mr-1]:ve)=="L",bs=(jo<Ln?Bn[jo]:ve)=="L",Ua=Rs==bs?Rs?"L":"R":ve,Xo=mr;Xo<jo;++Xo)Bn[Xo]=Ua;mr=jo-1}for(var Co=[],vl,ta=0;ta<Ln;)if(Kt.test(Bn[ta])){var XA=ta;for(++ta;ta<Ln&&Kt.test(Bn[ta]);++ta);Co.push(new Yt(0,XA,ta))}else{var zl=ta,Ga=Co.length,yl=Je=="rtl"?1:0;for(++ta;ta<Ln&&Bn[ta]!="L";++ta);for(var Ps=zl;Ps<ta;)if(qt.test(Bn[Ps])){zl<Ps&&(Co.splice(Ga,0,new Yt(1,zl,Ps)),Ga+=yl);var Ba=Ps;for(++Ps;Ps<ta&&qt.test(Bn[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 Je=="ltr"&&(Co[0].level==1&&(vl=pe.match(/^\s+/))&&(Co[0].from=vl[0].length,Co.unshift(new Yt(0,0,vl[0].length))),Le(Co).level==1&&(vl=pe.match(/\s+$/))&&(Le(Co).to-=vl[0].length,Co.push(new Yt(0,Ln-vl[0].length,Ln)))),Je=="rtl"?Co.reverse():Co}}();function yn(it,st){var dt=it.order;return dt==null&&(dt=it.order=$e(it.text,st)),dt}var Kn=[],Sn=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]||Kn).concat(dt)}};function ui(it,st){return it._handlers&&it._handlers[st]||Kn}function ci(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 mi(it,st){var dt=ui(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 Mi(it,st,dt){return typeof st=="string"&&(st={type:st,preventDefault:function(){this.defaultPrevented=!0}}),mi(it,dt||st.type,it,st),qi(st)||st.codemirrorIgnore}function yr(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 ki(it,st){return ui(it,st).length>0}function Ri(it){it.prototype.on=function(st,dt){Sn(this,st,dt)},it.prototype.off=function(st,dt){ci(this,st,dt)}}function Vi(it){it.preventDefault?it.preventDefault():it.returnValue=!1}function Or(it){it.stopPropagation?it.stopPropagation():it.cancelBubble=!0}function qi(it){return it.defaultPrevented!=null?it.defaultPrevented:it.returnValue==!1}function Cr(it){Vi(it),Or(it)}function xr(it){return it.target||it.srcElement}function Wr(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 $i=function(){if(de&&Ht<9)return!1;var it=$t("div");return"draggable"in it||"dragDrop"in it}(),eo;function fo(it){if(eo==null){var st=$t("span","\u200B");Zt(it,$t("span",[st,document.createTextNode("x")])),it.firstChild.offsetHeight!=0&&(eo=st.offsetWidth<=1&&st.offsetHeight>2&&!(de&&Ht<8))}var dt=eo?$t("span","\u200B"):$t("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return dt.setAttribute("cm-text",""),dt}var Zr;function Fr(it){if(Zr!=null)return Zr;var st=Zt(it,document.createTextNode("A\u062EA")),dt=ge(st,0,1).getBoundingClientRect(),ht=ge(st,1,2).getBoundingClientRect();return Wt(it),!dt||dt.left==dt.right?!1:Zr=ht.right-dt.right<3}var ro=`
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),Kt=Nt.indexOf("\r");Kt!=-1?(dt.push(Nt.slice(0,Kt)),st+=Kt+1):(dt.push(Nt),st=gt+1)}return dt}:function(it){return it.split(/\r\n?|\n/)},Tt=window.getSelection?function(it){try{return it.selectionStart!=it.selectionEnd}catch(st){return!1}}:function(it){var st;try{st=it.ownerDocument.selection.createRange()}catch(dt){}return!st||st.parentElement()!=it?!1:st.compareEndPoints("StartToEnd",st)!=0},Gi=function(){var it=$t("div");return"oncopy"in it?!0:(it.setAttribute("oncopy","return;"),typeof it.oncopy=="function")}(),Zi=null;function Yr(it){if(Zi!=null)return Zi;var st=Zt(it,$t("span","x")),dt=st.getBoundingClientRect(),ht=ge(st,0,1).getBoundingClientRect();return Zi=Math.abs(dt.left-ht.left)>1}var bo={},ko={};function $o(it,st){arguments.length>2&&(st.dependencies=Array.prototype.slice.call(arguments,2)),bo[it]=st}function Xi(it,st){ko[it]=st}function Ni(it){if(typeof it=="string"&&ko.hasOwnProperty(it))it=ko[it];else if(it&&typeof it.name=="string"&&ko.hasOwnProperty(it.name)){var st=ko[it.name];typeof st=="string"&&(st={name:st}),it=Mt(st,it),it.name=st.name}else{if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(it))return Ni("application/xml");if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(it))return Ni("application/json")}return typeof it=="string"?{name:it}:it||{name:"null"}}function _e(it,st){st=Ni(st);var dt=bo[st.name];if(!dt)return _e(it,"text/plain");var ht=dt(it,st);if(Re.hasOwnProperty(st.name)){var gt=Re[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 Kt in st.modeProps)ht[Kt]=st.modeProps[Kt];return ht}var Re={};function Ue(it,st){var dt=Re.hasOwnProperty(it)?Re[it]:Re[it]={};In(st,dt)}function gi(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 xe(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 Hi(it,st,dt){return it.startState?it.startState(st,dt):!0}var Dn=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};Dn.prototype.eol=function(){return this.pos>=this.string.length},Dn.prototype.sol=function(){return this.pos==this.lineStart},Dn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Dn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Dn.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},Dn.prototype.eatWhile=function(it){for(var st=this.pos;this.eat(it););return this.pos>st},Dn.prototype.eatSpace=function(){for(var it=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>it},Dn.prototype.skipToEnd=function(){this.pos=this.string.length},Dn.prototype.skipTo=function(it){var st=this.string.indexOf(it,this.pos);if(st>-1)return this.pos=st,!0},Dn.prototype.backUp=function(it){this.pos-=it},Dn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Ee(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Ee(this.string,this.lineStart,this.tabSize):0)},Dn.prototype.indentation=function(){return Ee(this.string,null,this.tabSize)-(this.lineStart?Ee(this.string,this.lineStart,this.tabSize):0)},Dn.prototype.match=function(it,st,dt){if(typeof it=="string"){var ht=function(Kt){return dt?Kt.toLowerCase():Kt},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)}},Dn.prototype.current=function(){return this.string.slice(this.start,this.pos)},Dn.prototype.hideFirstChars=function(it,st){this.lineStart+=it;try{return st()}finally{this.lineStart-=it}},Dn.prototype.lookAhead=function(it){var st=this.lineOracle;return st&&st.lookAhead(it)},Dn.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 Ve(it,st,dt){var ht=[],gt=st.line;return it.iter(st.line,dt.line+1,function(Nt){var Kt=Nt.text;gt==dt.line&&(Kt=Kt.slice(0,dt.ch)),gt==st.line&&(Kt=Kt.slice(st.ch)),ht.push(Kt),++gt}),ht}function ze(it,st,dt){var ht=[];return it.iter(st,dt,function(gt){ht.push(gt.text)}),ht}function ai(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 an(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 Kt=0;Kt<it.lines.length;++Kt){var qt=it.lines[Kt],Yt=qt.height;if(st<Yt)break;st-=Yt}return dt+Kt}function Yn(it,st){return st>=it.first&&st<it.first+it.size}function vi(it,st){return String(it.lineNumberFormatter(st+it.firstLineNumber))}function ln(it,st,dt){if(dt===void 0&&(dt=null),!(this instanceof ln))return new ln(it,st,dt);this.line=it,this.ch=st,this.sticky=dt}function qn(it,st){return it.line-st.line||it.ch-st.ch}function li(it,st){return it.sticky==st.sticky&&qn(it,st)==0}function Xe(it){return ln(it.line,it.ch)}function sn(it,st){return qn(it,st)<0?st:it}function wn(it,st){return qn(it,st)<0?it:st}function Mn(it,st){return Math.max(it.first,Math.min(st,it.first+it.size-1))}function ii(it,st){if(st.line<it.first)return ln(it.first,0);var dt=it.first+it.size-1;return st.line>dt?ln(dt,Ai(it,dt).text.length):_i(st,Ai(it,st.line).text.length)}function _i(it,st){var dt=it.ch;return dt==null||dt>st?ln(it.line,st):dt<0?ln(it.line,0):it}function Ki(it,st){for(var dt=[],ht=0;ht<st.length;ht++)dt[ht]=ii(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,gi(it.mode,st.state),dt,st.lookAhead):new en(it,gi(it.mode,st),dt)},en.prototype.save=function(it){var st=it!==!1?gi(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ti(st,this.maxLookAhead):st};function Lr(it,st,dt,ht){var gt=[it.state.modeGen],Nt={};Yi(it,st.text,it.doc.mode,dt,function(pe,Je){return gt.push(pe,Je)},Nt,ht);for(var Kt=dt.state,qt=function(pe){dt.baseTokens=gt;var Je=it.state.overlays[pe],ve=1,Ln=0;dt.state=!0,Yi(it,st.text,Je.mode,dt,function(Bn,Bi){for(var Li=ve;Ln<Bn;){var ji=gt[ve];ji>Bn&&gt.splice(ve,1,Bn,gt[ve+1],ji),ve+=2,Ln=Math.min(Bn,ji)}if(Bi)if(Je.opaque)gt.splice(Li,ve-Li,Bn,"overlay "+Bi),ve=Li+2;else for(;Li<ve;Li+=2){var or=gt[Li+1];gt[Li+1]=(or?or+" ":"")+"overlay "+Bi}},Nt),dt.state=Kt,dt.baseTokens=null,dt.baseTokenPos=1},Yt=0;Yt<it.state.overlays.length;++Yt)qt(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=Ur(it,he(st)),gt=st.text.length>it.options.maxHighlightLength&&gi(it.doc.mode,ht.state),Nt=Lr(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 Ur(it,st,dt){var ht=it.doc,gt=it.display;if(!ht.mode.startState)return new en(ht,!0,st);var Nt=sr(it,st,dt),Kt=Nt>ht.first&&Ai(ht,Nt-1).stateAfter,qt=Kt?en.fromSaved(ht,Kt,Nt):new en(ht,Hi(ht.mode),Nt);return ht.iter(Nt,st,function(Yt){rn(it,Yt.text,qt);var pe=qt.line;Yt.stateAfter=pe==st-1||pe%5==0||pe>=gt.viewFrom&&pe<gt.viewTo?qt.save():null,qt.nextLine()}),dt&&(ht.modeFrontier=qt.line),qt}function rn(it,st,dt,ht){var gt=it.doc.mode,Nt=new Dn(st,it.options.tabSize,dt);for(Nt.start=Nt.pos=ht||0,st==""&&oi(gt,dt.state);!Nt.eol();)Ci(gt,Nt,dt.state),Nt.start=Nt.pos}function oi(it,st){if(it.blankLine)return it.blankLine(st);if(it.innerMode){var dt=xe(it,st);if(dt.mode.blankLine)return dt.mode.blankLine(dt.state)}}function Ci(it,st,dt,ht){for(var gt=0;gt<10;gt++){ht&&(ht[0]=xe(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 bi=function(it,st,dt){this.start=it.start,this.end=it.pos,this.string=it.current(),this.type=st||null,this.state=dt};function xi(it,st,dt,ht){var gt=it.doc,Nt=gt.mode,Kt;st=ii(gt,st);var qt=Ai(gt,st.line),Yt=Ur(it,st.line,dt),pe=new Dn(qt.text,it.options.tabSize,Yt),Je;for(ht&&(Je=[]);(ht||pe.pos<st.ch)&&!pe.eol();)pe.start=pe.pos,Kt=Ci(Nt,pe,Yt.state),ht&&Je.push(new bi(pe,Kt,gi(gt.mode,Yt.state)));return ht?Je:new bi(pe,Kt,Yt.state)}function Ei(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 Yi(it,st,dt,ht,gt,Nt,Kt){var qt=dt.flattenSpans;qt==null&&(qt=it.options.flattenSpans);var Yt=0,pe=null,Je=new Dn(st,it.options.tabSize,ht),ve,Ln=it.options.addModeClass&&[null];for(st==""&&Ei(oi(dt,ht.state),Nt);!Je.eol();){if(Je.pos>it.options.maxHighlightLength?(qt=!1,Kt&&rn(it,st,ht,Je.pos),Je.pos=st.length,ve=null):ve=Ei(Ci(dt,Je,ht.state,Ln),Nt),Ln){var Bn=Ln[0].name;Bn&&(ve="m-"+(ve?Bn+" "+ve:Bn))}if(!qt||pe!=ve){for(;Yt<Je.start;)Yt=Math.min(Je.start,Yt+5e3),gt(Yt,pe);pe=ve}Je.start=Je.pos}for(;Yt<Je.pos;){var Bi=Math.min(Je.pos,Yt+5e3);gt(Bi,pe),Yt=Bi}}function sr(it,st,dt){for(var ht,gt,Nt=it.doc,Kt=dt?-1:st-(it.doc.mode.innerMode?1e3:100),qt=st;qt>Kt;--qt){if(qt<=Nt.first)return Nt.first;var Yt=Ai(Nt,qt-1),pe=Yt.stateAfter;if(pe&&(!dt||qt+(pe instanceof Ti?pe.lookAhead:0)<=Nt.modeFrontier))return qt;var Je=Ee(Yt.text,null,it.options.tabSize);(gt==null||ht>Je)&&(gt=qt-1,ht=Je)}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 je(){ae=!0}function Se(){ee=!0}function An(it,st,dt){this.marker=it,this.from=st,this.to=dt}function Nn(it,st){if(it)for(var dt=0;dt<it.length;++dt){var ht=it[dt];if(ht.marker==st)return ht}}function Vn(it,st){for(var dt,ht=0;ht<it.length;++ht)it[ht]!=st&&(dt||(dt=[])).push(it[ht]);return dt}function Qi(it,st){it.markedSpans=it.markedSpans?it.markedSpans.concat([st]):[st],st.marker.attachLine(it)}function Si(it,st,dt){var ht;if(it)for(var gt=0;gt<it.length;++gt){var Nt=it[gt],Kt=Nt.marker,qt=Nt.from==null||(Kt.inclusiveLeft?Nt.from<=st:Nt.from<st);if(qt||Nt.from==st&&Kt.type=="bookmark"&&(!dt||!Nt.marker.insertLeft)){var Yt=Nt.to==null||(Kt.inclusiveRight?Nt.to>=st:Nt.to>st);(ht||(ht=[])).push(new An(Kt,Nt.from,Yt?null:Nt.to))}}return ht}function Ne(it,st,dt){var ht;if(it)for(var gt=0;gt<it.length;++gt){var Nt=it[gt],Kt=Nt.marker,qt=Nt.to==null||(Kt.inclusiveRight?Nt.to>=st:Nt.to>st);if(qt||Nt.from==st&&Kt.type=="bookmark"&&(!dt||Nt.marker.insertLeft)){var Yt=Nt.from==null||(Kt.inclusiveLeft?Nt.from<=st:Nt.from<st);(ht||(ht=[])).push(new An(Kt,Yt?null:Nt.from-st,Nt.to==null?null:Nt.to-st))}}return ht}function wi(it,st){if(st.full)return null;var dt=Yn(it,st.from.line)&&Ai(it,st.from.line).markedSpans,ht=Yn(it,st.to.line)&&Ai(it,st.to.line).markedSpans;if(!dt&&!ht)return null;var gt=st.from.ch,Nt=st.to.ch,Kt=qn(st.from,st.to)==0,qt=Si(dt,gt,Kt),Yt=Ne(ht,Nt,Kt),pe=st.text.length==1,Je=Le(st.text).length+(pe?gt:0);if(qt)for(var ve=0;ve<qt.length;++ve){var Ln=qt[ve];if(Ln.to==null){var Bn=Nn(Yt,Ln.marker);Bn?pe&&(Ln.to=Bn.to==null?null:Bn.to+Je):Ln.to=gt}}if(Yt)for(var Bi=0;Bi<Yt.length;++Bi){var Li=Yt[Bi];if(Li.to!=null&&(Li.to+=Je),Li.from==null){var ji=Nn(qt,Li.marker);ji||(Li.from=Je,pe&&(qt||(qt=[])).push(Li))}else Li.from+=Je,pe&&(qt||(qt=[])).push(Li)}qt&&(qt=ke(qt)),Yt&&Yt!=qt&&(Yt=ke(Yt));var or=[qt];if(!pe){var Mr=st.text.length-2,Sr;if(Mr>0&&qt)for(var Hr=0;Hr<qt.length;++Hr)qt[Hr].to==null&&(Sr||(Sr=[])).push(new An(qt[Hr].marker,null,null));for(var uo=0;uo<Mr;++uo)or.push(Sr);or.push(Yt)}return or}function ke(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 hn(it,st,dt){var ht=null;if(it.iter(st.line,dt.line+1,function(Bn){if(Bn.markedSpans)for(var Bi=0;Bi<Bn.markedSpans.length;++Bi){var Li=Bn.markedSpans[Bi].marker;Li.readOnly&&(!ht||Pn(ht,Li)==-1)&&(ht||(ht=[])).push(Li)}}),!ht)return null;for(var gt=[{from:st,to:dt}],Nt=0;Nt<ht.length;++Nt)for(var Kt=ht[Nt],qt=Kt.find(0),Yt=0;Yt<gt.length;++Yt){var pe=gt[Yt];if(!(qn(pe.to,qt.from)<0||qn(pe.from,qt.to)>0)){var Je=[Yt,1],ve=qn(pe.from,qt.from),Ln=qn(pe.to,qt.to);(ve<0||!Kt.inclusiveLeft&&!ve)&&Je.push({from:pe.from,to:qt.from}),(Ln>0||!Kt.inclusiveRight&&!Ln)&&Je.push({from:qt.to,to:pe.to}),gt.splice.apply(gt,Je),Yt+=Je.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 Ut(it,st){if(st){for(var dt=0;dt<st.length;++dt)st[dt].marker.attachLine(it);it.markedSpans=st}}function pn(it){return it.inclusiveLeft?-1:0}function fn(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=qn(ht.from,gt.from)||pn(it)-pn(st);if(Nt)return-Nt;var Kt=qn(ht.to,gt.to)||fn(it)-fn(st);return Kt||st.id-it.id}function Gn(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 Gn(it,!0)}function dn(it){return Gn(it,!1)}function tn(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 gn(it,st,dt,ht,gt){var Nt=Ai(it,st),Kt=ee&&Nt.markedSpans;if(Kt)for(var qt=0;qt<Kt.length;++qt){var Yt=Kt[qt];if(Yt.marker.collapsed){var pe=Yt.marker.find(0),Je=qn(pe.from,dt)||pn(Yt.marker)-pn(gt),ve=qn(pe.to,ht)||fn(Yt.marker)-fn(gt);if(!(Je>=0&&ve<=0||Je<=0&&ve>=0)&&(Je<=0&&(Yt.marker.inclusiveRight&&gt.inclusiveLeft?qn(pe.to,dt)>=0:qn(pe.to,dt)>0)||Je>=0&&(Yt.marker.inclusiveRight&&gt.inclusiveLeft?qn(pe.from,ht)<=0:qn(pe.from,ht)<0)))return!0}}}function mn(it){for(var st;st=jn(it);)it=st.find(-1,!0).line;return it}function xn(it){for(var st;st=dn(it);)it=st.find(1,!0).line;return it}function hi(it){for(var st,dt;st=dn(it);)it=st.find(1,!0).line,(dt||(dt=[])).push(it);return dt}function zn(it,st){var dt=Ai(it,st),ht=mn(dt);return dt==ht?st:he(ht)}function Xn(it,st){if(st>it.lastLine())return st;var dt=Ai(it,st),ht;if(!cn(it,dt))return st;for(;ht=dn(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&&ti(it,st,ht))return!0}}}function ti(it,st,dt){if(dt.to==null){var ht=dt.marker.find(1,!0);return ti(it,ht.line,Nn(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&&gt.from==dt.to&&(gt.to==null||gt.to!=dt.from)&&(gt.marker.inclusiveLeft||dt.marker.inclusiveRight)&&ti(it,st,gt))return!0}function Di(it){it=mn(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 Kt=0;Kt<Nt.children.length;++Kt){var qt=Nt.children[Kt];if(qt==dt)break;st+=qt.height}return st}function ir(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=dn(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=ir(st.maxLine),st.maxLineChanged=!0,dt.iter(function(ht){var gt=ir(ht);gt>st.maxLineLength&&(st.maxLineLength=gt,st.maxLine=ht)})}var fr=function(it,st,dt){this.text=it,Ut(this,st),this.height=dt?dt(this):1};fr.prototype.lineNo=function(){return he(this)},Ri(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),Ut(it,dt);var gt=ht?ht(it):1;gt!=it.height&&ai(it,gt)}function Er(it){it.parent=null,Qe(it)}var Gr={},Tr={};function oo(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 He(it,st){var dt=Ce("span",null,null,ne?"padding-right: .1px":null),ht={pre:Ce("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,Kt=void 0;ht.pos=0,ht.addToken=Dr,Fr(it.display.measure)&&(Kt=yn(Nt,it.doc.direction))&&(ht.addToken=Qr(ht.addToken,Kt)),ht.map=[];var qt=st!=it.display.externalMeasured&&he(Nt);vo(Nt,ht,cr(it,Nt,qt)),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 mi(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,Kt){if(st){var qt=it.splitSpaces?nr(st,it.trailingSpace):st,Yt=it.cm.state.specialChars,pe=!1,Je;if(!Yt.test(st))it.col+=st.length,Je=document.createTextNode(qt),it.map.push(it.pos,it.pos+st.length,Je),de&&Ht<9&&(pe=!0),it.pos+=st.length;else{Je=document.createDocumentFragment();for(var ve=0;;){Yt.lastIndex=ve;var Ln=Yt.exec(st),Bn=Ln?Ln.index-ve:st.length-ve;if(Bn){var Bi=document.createTextNode(qt.slice(ve,ve+Bn));de&&Ht<9?Je.appendChild($t("span",[Bi])):Je.appendChild(Bi),it.map.push(it.pos,it.pos+Bn,Bi),it.col+=Bn,it.pos+=Bn}if(!Ln)break;ve+=Bn+1;var Li=void 0;if(Ln[0]==" "){var ji=it.cm.options.tabSize,or=ji-it.col%ji;Li=Je.appendChild($t("span",ri(or),"cm-tab")),Li.setAttribute("role","presentation"),Li.setAttribute("cm-text"," "),it.col+=or}else Ln[0]=="\r"||Ln[0]==`
`?(Li=Je.appendChild($t("span",Ln[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Li.setAttribute("cm-text",Ln[0]),it.col+=1):(Li=it.cm.options.specialCharPlaceholder(Ln[0]),Li.setAttribute("cm-text",Ln[0]),de&&Ht<9?Je.appendChild($t("span",[Li])):Je.appendChild(Li),it.col+=1);it.map.push(it.pos,it.pos+1,Li),it.pos++}}if(it.trailingSpace=qt.charCodeAt(st.length-1)==32,dt||ht||gt||pe||Nt||Kt){var Mr=dt||"";ht&&(Mr+=ht),gt&&(Mr+=gt);var Sr=$t("span",[Je],Mr,Nt);if(Kt)for(var Hr in Kt)Kt.hasOwnProperty(Hr)&&Hr!="style"&&Hr!="class"&&Sr.setAttribute(Hr,Kt[Hr]);return it.content.appendChild(Sr)}it.content.appendChild(Je)}}function nr(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 Qr(it,st){return function(dt,ht,gt,Nt,Kt,qt,Yt){gt=gt?gt+" cm-force-border":"cm-force-border";for(var pe=dt.pos,Je=pe+ht.length;;){for(var ve=void 0,Ln=0;Ln<st.length&&(ve=st[Ln],!(ve.to>pe&&ve.from<=pe));Ln++);if(ve.to>=Je)return it(dt,ht,gt,Nt,Kt,qt,Yt);it(dt,ht.slice(0,ve.to-pe),gt,Nt,null,qt,Yt),Nt=null,ht=ht.slice(ve.to-pe),pe=ve.to}}}function ar(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 Kt=1;Kt<dt.length;Kt+=2)st.addToken(st,gt.slice(Nt,Nt=dt[Kt]),oo(dt[Kt+1],st.cm.options));return}for(var qt=gt.length,Yt=0,pe=1,Je="",ve,Ln,Bn=0,Bi,Li,ji,or,Mr;;){if(Bn==Yt){Bi=Li=ji=Ln="",Mr=null,or=null,Bn=1/0;for(var Sr=[],Hr=void 0,uo=0;uo<ht.length;++uo){var wr=ht[uo],Mo=wr.marker;if(Mo.type=="bookmark"&&wr.from==Yt&&Mo.widgetNode)Sr.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&&Bn>wr.to&&(Bn=wr.to,Li=""),Mo.className&&(Bi+=" "+Mo.className),Mo.css&&(Ln=(Ln?Ln+";":"")+Mo.css),Mo.startStyle&&wr.from==Yt&&(ji+=" "+Mo.startStyle),Mo.endStyle&&wr.to==Bn&&(Hr||(Hr=[])).push(Mo.endStyle,wr.to),Mo.title&&((Mr||(Mr={})).title=Mo.title),Mo.attributes)for(var Hs in Mo.attributes)(Mr||(Mr={}))[Hs]=Mo.attributes[Hs];Mo.collapsed&&(!or||Qn(or.marker,Mo)<0)&&(or=wr)}else wr.from>Yt&&Bn>wr.from&&(Bn=wr.from)}if(Hr)for(var Sa=0;Sa<Hr.length;Sa+=2)Hr[Sa+1]==Bn&&(Li+=" "+Hr[Sa]);if(!or||or.from==Yt)for(var Ws=0;Ws<Sr.length;++Ws)ar(st,0,Sr[Ws]);if(or&&(or.from||0)==Yt){if(ar(st,(or.to==null?qt+1:or.to)-Yt,or.marker,or.from==null),or.to==null)return;or.to==Yt&&(or=!1)}}if(Yt>=qt)break;for(var ml=Math.min(qt,Bn);;){if(Je){var ba=Yt+Je.length;if(!or){var ma=ba>ml?Je.slice(0,ml-Yt):Je;st.addToken(st,ma,ve?ve+Bi:Bi,ji,Yt+ma.length==Bn?Li:"",Ln,Mr)}if(ba>=ml){Je=Je.slice(ml-Yt),Yt=ml;break}Yt=ba,ji=""}Je=gt.slice(Nt,Nt=dt[pe++]),ve=oo(dt[pe++],st.cm.options)}}}function Jr(it,st,dt){this.line=st,this.rest=hi(st),this.size=this.rest?he(Le(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 Kt=new Jr(it.doc,Ai(it.doc,Nt),Nt);gt=Nt+Kt.size,ht.push(Kt)}return ht}var co=null;function ks(it){co?co.ops.push(it):it.ownsGroup=co={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{co=null,st(dt)}}var Is=null;function lr(it,st){var dt=ui(it,st);if(dt.length){var ht=Array.prototype.slice.call(arguments,2),gt;co?gt=co.delayedCallbacks:Is?gt=Is:(gt=Is=[],setTimeout(Eo,0));for(var Nt=function(qt){gt.push(function(){return dt[qt].apply(null,ht)})},Kt=0;Kt<dt.length;++Kt)Nt(Kt)}}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"?_n(it,st):Nt=="gutter"?kr(it,st,dt,ht):Nt=="class"?Ar(it,st):Nt=="widget"&&xo(it,st,ht)}st.changes=null}function zi(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&&Ht<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=zi(st);st.background=ht.insertBefore($t("div",null,dt),ht.firstChild),it.display.input.setUneditable(st.background)}}function rr(it,st){var dt=it.display.externalMeasured;return dt&&dt.line==st.line?(it.display.externalMeasured=null,st.measure=dt.measure,dt.built):He(it,st)}function _n(it,st){var dt=st.text.className,ht=rr(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?zi(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=zi(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 Kt=zi(st),qt=st.gutter=$t("div",null,"CodeMirror-gutter-wrapper","left: "+(it.options.fixedGutter?ht.fixedPos:-ht.gutterTotalWidth)+"px");if(it.display.input.setUneditable(qt),Kt.insertBefore(qt,st.text),st.line.gutterClass&&(qt.className+=" "+st.line.gutterClass),it.options.lineNumbers&&(!Nt||!Nt["CodeMirror-linenumbers"])&&(st.lineNumber=qt.appendChild($t("div",vi(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,Je=Nt.hasOwnProperty(pe)&&Nt[pe];Je&&qt.appendChild($t("div",[Je],"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=Rt("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=rr(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(Pr(it,st.line,st,dt,!0),st.rest)for(var ht=0;ht<st.rest.length;ht++)Pr(it,st.rest[ht],st,dt,!1)}function Pr(it,st,dt,ht,gt){if(st.widgets)for(var Nt=zi(dt),Kt=0,qt=st.widgets;Kt<qt.length;++Kt){var Yt=qt[Kt],pe=$t("div",[Yt.node],"CodeMirror-linewidget"+(Yt.className?" "+Yt.className:""));Yt.handleMouseEvents||pe.setAttribute("cm-ignore-events","true"),$r(Yt,pe,dt,ht),it.display.input.setUneditable(pe),gt&&Yt.above?Nt.insertBefore(pe,dt.gutter||dt.text):Nt.appendChild(pe),lr(Yt,"redraw")}}function $r(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 so(it){if(it.height!=null)return it.height;var st=it.doc.cm;if(!st)return 0;if(!nn(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=xr(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 pi-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 Kt=st.text.firstChild.getClientRects(),qt=0;qt<Kt.length-1;qt++){var Yt=Kt[qt],pe=Kt[qt+1];Math.abs(Yt.bottom-pe.bottom)>2&&Nt.push((Yt.bottom+pe.top)/2-dt.top)}}Nt.push(dt.bottom-dt.top)}}function lo(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=mn(st);var dt=he(st),ht=it.display.externalMeasured=new Jr(it.doc,st,dt);ht.lineN=dt;var gt=ht.built=He(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=lo(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||""),Kt;return st.cache.hasOwnProperty(Nt)?Kt=st.cache[Nt]:(st.rect||(st.rect=st.view.text.getBoundingClientRect()),st.hasHeights||(Fl(it,st.view,st.rect),st.hasHeights=!0),Kt=ws(it,st,dt,ht),Kt.bogus||(st.cache[Nt]=Kt)),{left:Kt.left,right:Kt.right,top:gt?Kt.rtop:Kt.top,bottom:gt?Kt.rbottom:Kt.bottom}}var $a={left:0,right:0,top:0,bottom:0};function uA(it,st,dt){for(var ht,gt,Nt,Kt,qt,Yt,pe=0;pe<it.length;pe+=3)if(qt=it[pe],Yt=it[pe+1],st<qt?(gt=0,Nt=1,Kt="left"):st<Yt?(gt=st-qt,Nt=gt+1):(pe==it.length-3||st==Yt&&it[pe+3]>st)&&(Nt=Yt-qt,gt=Nt-1,st>=Yt&&(Kt="right")),gt!=null){if(ht=it[pe+2],qt==Yt&&dt==(ht.insertLeft?"left":"right")&&(Kt=dt),dt=="left"&&gt==0)for(;pe&&it[pe-2]==it[pe-3]&&it[pe-1].insertLeft;)ht=it[(pe-=3)+2],Kt="left";if(dt=="right"&&gt==Yt-qt)for(;pe<it.length-3&&it[pe+3]==it[pe+4]&&!it[pe+5].insertLeft;)ht=it[(pe+=3)+2],Kt="right";break}return{node:ht,start:gt,end:Nt,collapse:Kt,coverStart:qt,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,Kt=gt.start,qt=gt.end,Yt=gt.collapse,pe;if(Nt.nodeType==3){for(var Je=0;Je<4;Je++){for(;Kt&&Me(st.line.text.charAt(gt.coverStart+Kt));)--Kt;for(;gt.coverStart+qt<gt.coverEnd&&Me(st.line.text.charAt(gt.coverStart+qt));)++qt;if(de&&Ht<9&&Kt==0&&qt==gt.coverEnd-gt.coverStart?pe=Nt.parentNode.getBoundingClientRect():pe=Ku(ge(Nt,Kt,qt).getClientRects(),ht),pe.left||pe.right||Kt==0)break;qt=Kt,Kt=Kt-1,Yt="right"}de&&Ht<11&&(pe=Gu(it.display.measure,pe))}else{Kt>0&&(Yt=ht="right");var ve;it.options.lineWrapping&&(ve=Nt.getClientRects()).length>1?pe=ve[ht=="right"?ve.length-1:0]:pe=Nt.getBoundingClientRect()}if(de&&Ht<9&&!Kt&&(!pe||!pe.left&&!pe.right)){var Ln=Nt.parentNode.getClientRects()[0];Ln?pe={left:Ln.left,right:Ln.left+vu(it.display),top:Ln.top,bottom:Ln.bottom}:pe=$a}for(var Bn=pe.top-st.rect.top,Bi=pe.bottom-st.rect.top,Li=(Bn+Bi)/2,ji=st.view.measure.heights,or=0;or<ji.length-1&&!(Li<ji[or]);or++);var Mr=or?ji[or-1]:0,Sr=ji[or],Hr={left:(Yt=="right"?pe.right:pe.left)-st.rect.left,right:(Yt=="left"?pe.left:pe.right)-st.rect.left,top:Mr,bottom:Sr};return!pe.left&&!pe.right&&(Hr.bogus=!0),it.options.singleCursorHeightPerLine||(Hr.rtop=Bn,Hr.rbottom=Bi),Hr}function Gu(it,st){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Yr(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,Wt(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+=so(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 Kt=Di(st);if(ht=="local"?Kt+=yo(it.display):Kt-=it.display.viewOffset,ht=="page"||ht=="window"){var qt=it.display.lineSpace.getBoundingClientRect();Kt+=qt.top+(ht=="window"?0:es());var Yt=qt.left+(ht=="window"?0:Gs());dt.left+=Yt,dt.right+=Yt}return dt.top+=Kt,dt.bottom+=Kt,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 Kt=it.display.lineSpace.getBoundingClientRect();return{left:ht-Kt.left,top:gt-Kt.top}}function ao(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 Kt(Bi,Li){var ji=Ta(it,gt,Bi,Li?"right":"left",Nt);return Li?ji.left=ji.right:ji.right=ji.left,js(it,ht,ji,dt)}var qt=yn(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"),!qt)return Kt(pe=="before"?Yt-1:Yt,pe=="before");function Je(Bi,Li,ji){var or=qt[Li],Mr=or.level==1;return Kt(ji?Bi-1:Bi,Mr!=ji)}var ve=Oe(qt,Yt,pe),Ln=Te,Bn=Je(Yt,ve,pe=="before");return Ln!=null&&(Bn.other=Je(Yt,Ln,pe!="before")),Bn}function Xs(it,st){var dt=0;st=ii(it.doc,st),it.options.lineWrapping||(dt=vu(it.display)*st.ch);var ht=Ai(it.doc,st.line),gt=Di(ht)+yo(it.display);return{left:dt,right:dt,top:gt,bottom:gt+ht.height}}function xs(it,st,dt,ht,gt){var Nt=ln(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=an(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 Kt=Ai(ht,gt);;){var qt=Un(it,Kt,gt,st,dt),Yt=tn(Kt,qt.ch+(qt.xRel>0||qt.outside>0?1:0));if(!Yt)return qt;var pe=Yt.find(1);if(pe.line==gt)return pe;Kt=Ai(ht,gt=pe.line)}}function er(it,st,dt,ht){ht-=hs(st);var gt=st.text.length,Nt=Ye(function(Kt){return Ta(it,dt,Kt-1).bottom<=ht},gt,0);return gt=Ye(function(Kt){return Ta(it,dt,Kt).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 er(it,st,dt,gt)}function we(it,st,dt,ht){return it.bottom<=dt?!1:it.top>dt?!0:(ht?it.left:it.right)>st}function Un(it,st,dt,ht,gt){gt-=Di(st);var Nt=Zo(it,st),Kt=hs(st),qt=0,Yt=st.text.length,pe=!0,Je=yn(st,it.doc.direction);if(Je){var ve=(it.options.lineWrapping?hA:su)(it,st,dt,Nt,Je,ht,gt);pe=ve.level!=1,qt=pe?ve.from:ve.to-1,Yt=pe?ve.to:ve.from-1}var Ln=null,Bn=null,Bi=Ye(function(uo){var wr=Ta(it,Nt,uo);return wr.top+=Kt,wr.bottom+=Kt,we(wr,ht,gt,!1)?(wr.top<=gt&&wr.left<=ht&&(Ln=uo,Bn=wr),!0):!1},qt,Yt),Li,ji,or=!1;if(Bn){var Mr=ht-Bn.left<Bn.right-ht,Sr=Mr==pe;Bi=Ln+(Sr?0:1),ji=Sr?"after":"before",Li=Mr?Bn.left:Bn.right}else{!pe&&(Bi==Yt||Bi==qt)&&Bi++,ji=Bi==0?"after":Bi==st.text.length?"before":Ta(it,Nt,Bi-(pe?1:0)).bottom+Kt<=gt==pe?"after":"before";var Hr=mo(it,ln(dt,Bi,ji),"line",st,Nt);Li=Hr.left,or=gt<Hr.top?-1:gt>=Hr.bottom?1:0}return Bi=ye(st.text,Bi,1),xs(dt,Bi,ji,or,ht-Li)}function su(it,st,dt,ht,gt,Nt,Kt){var qt=Ye(function(ve){var Ln=gt[ve],Bn=Ln.level!=1;return we(mo(it,ln(dt,Bn?Ln.to:Ln.from,Bn?"before":"after"),"line",st,ht),Nt,Kt,!0)},0,gt.length-1),Yt=gt[qt];if(qt>0){var pe=Yt.level!=1,Je=mo(it,ln(dt,pe?Yt.from:Yt.to,pe?"after":"before"),"line",st,ht);we(Je,Nt,Kt,!0)&&Je.top>Kt&&(Yt=gt[qt-1])}return Yt}function hA(it,st,dt,ht,gt,Nt,Kt){var qt=er(it,st,ht,Kt),Yt=qt.begin,pe=qt.end;/\s/.test(st.text.charAt(pe-1))&&pe--;for(var Je=null,ve=null,Ln=0;Ln<gt.length;Ln++){var Bn=gt[Ln];if(!(Bn.from>=pe||Bn.to<=Yt)){var Bi=Bn.level!=1,Li=Ta(it,ht,Bi?Math.min(pe,Bn.to)-1:Math.max(Yt,Bn.from)).right,ji=Li<Nt?Nt-Li+1e9:Li-Nt;(!Je||ve>ji)&&(Je=Bn,ve=ji)}}return Je||(Je=gt[gt.length-1]),Je.from<Yt&&(Je={from:Yt,to:Je.to,level:Je.level}),Je.to>pe&&(Je={from:Je.from,to:pe,level:Je.level}),Je}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),Wt(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,Kt=0;Nt;Nt=Nt.nextSibling,++Kt){var qt=it.display.gutterSpecs[Kt].className;dt[qt]=Nt.offsetLeft+Nt.clientLeft+gt,ht[qt]=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 Kt=0;Kt<gt.widgets.length;Kt++)gt.widgets[Kt].height&&(Nt+=gt.widgets[Kt].height);return dt?Nt+(Math.ceil(gt.text.length/ht)||1)*st:Nt+st}}function Kr(it){var st=it.doc,dt=Ss(it);st.iter(function(ht){var gt=dt(ht);gt!=ht.height&&ai(ht,gt)})}function xa(it,st,dt,ht){var gt=it.display;if(!dt&&xr(st).getAttribute("cm-not-content")=="true")return null;var Nt,Kt,qt=gt.lineSpace.getBoundingClientRect();try{Nt=st.clientX-qt.left,Kt=st.clientY-qt.top}catch(ve){return null}var Yt=ss(it,Nt,Kt),pe;if(ht&&Yt.xRel>0&&(pe=Ai(it.doc,Yt.line).text).length==Yt.ch){var Je=Ee(pe,pe.length,it.options.tabSize)-pe.length;Yt=ln(Yt.line,Math.max(0,Math.round((Nt-zo(it.display).left)/vu(it.display))-Je))}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&&zn(it.doc,st)<gt.viewTo&&Bs(it);else if(dt<=gt.viewFrom)ee&&Xn(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 Kt=Na(it,st,st,-1);Kt?(gt.view=gt.view.slice(0,Kt.index),gt.viewTo=Kt.lineN):Bs(it)}else{var qt=Na(it,st,st,-1),Yt=Na(it,dt,dt+ht,1);qt&&Yt?(gt.view=gt.view.slice(0,qt.index).concat(Nr(it,qt.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 Kt=Nt.changes||(Nt.changes=[]);Pn(Kt,dt)==-1&&Kt.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,Kt=it.display.view;if(!ee||dt==it.doc.first+it.doc.size)return{index:gt,lineN:dt};for(var qt=it.display.viewFrom,Yt=0;Yt<gt;Yt++)qt+=Kt[Yt].size;if(qt!=st){if(ht>0){if(gt==Kt.length-1)return null;Nt=qt+Kt[gt].size-st,gt++}else Nt=qt-st;st+=Nt,dt+=Nt}for(;zn(it.doc,dt)!=dt;){if(gt==(ht<0?0:Kt.length-1))return null;dt+=ht*Kt[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(),Kt=0;Kt<dt.sel.ranges.length;Kt++)if(!(!st&&Kt==dt.sel.primIndex)){var qt=dt.sel.ranges[Kt];if(!(qt.from().line>=it.display.viewTo||qt.to().line<it.display.viewFrom)){var Yt=qt.empty();(Yt||it.options.showCursorWhenSelecting)&&Uo(it,qt.head,gt),Yt||No(it,qt,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 No(it,st,dt){var ht=it.display,gt=it.doc,Nt=document.createDocumentFragment(),Kt=zo(it.display),qt=Kt.left,Yt=Math.max(ht.sizerWidth,ys(it)-ht.sizer.offsetLeft)-Kt.right,pe=gt.direction=="ltr";function Je(Sr,Hr,uo,wr){Hr<0&&(Hr=0),Hr=Math.round(Hr),wr=Math.round(wr),Nt.appendChild($t("div",null,"CodeMirror-selected","position: absolute; left: "+Sr+`px;
top: `+Hr+"px; width: "+(uo==null?Yt-Sr:uo)+`px;
height: `+(wr-Hr)+"px"))}function ve(Sr,Hr,uo){var wr=Ai(gt,Sr),Mo=wr.text.length,Hs,Sa;function Ws(ma,ol){return ao(it,ln(Sr,ma),"div",wr,ol)}function ml(ma,ol,Ia){var mr=cl(it,wr,null,ma),jo=ol=="ltr"==(Ia=="after")?"left":"right",Rs=Ia=="after"?mr.begin:mr.end-(/\s/.test(wr.text.charAt(mr.end-1))?2:1);return Ws(Rs,jo)[jo]}var ba=yn(wr,gt.direction);return Fe(ba,Hr||0,uo==null?Mo:uo,function(ma,ol,Ia,mr){var jo=Ia=="ltr",Rs=Ws(ma,jo?"left":"right"),bs=Ws(ol-1,jo?"right":"left"),Ua=Hr==null&&ma==0,Xo=uo==null&&ol==Mo,Co=mr==0,vl=!ba||mr==ba.length-1;if(bs.top-Rs.top<=3){var ta=(pe?Ua:Xo)&&Co,XA=(pe?Xo:Ua)&&vl,zl=ta?qt:(jo?Rs:bs).left,Ga=XA?Yt:(jo?bs:Rs).right;Je(zl,Rs.top,Ga-zl,Rs.bottom)}else{var yl,Ps,Ba,qu;jo?(yl=pe&&Ua&&Co?qt:Rs.left,Ps=pe?Yt:ml(ma,Ia,"before"),Ba=pe?qt:ml(ol,Ia,"after"),qu=pe&&Xo&&vl?Yt:bs.right):(yl=pe?ml(ma,Ia,"before"):qt,Ps=!pe&&Ua&&Co?Yt:Rs.right,Ba=!pe&&Xo&&vl?qt:bs.left,qu=pe?ml(ol,Ia,"after"):Yt),Je(yl,Rs.top,Ps-yl,Rs.bottom),Rs.bottom<bs.top&&Je(qt,Rs.bottom,null,bs.top),Je(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 Ln=st.from(),Bn=st.to();if(Ln.line==Bn.line)ve(Ln.line,Ln.ch,Bn.ch);else{var Bi=Ai(gt,Ln.line),Li=Ai(gt,Bn.line),ji=mn(Bi)==mn(Li),or=ve(Ln.line,Ln.ch,ji?Bi.text.length+1:null).end,Mr=ve(Bn.line,ji?0:null,Bn.ch).start;ji&&(or.top<Mr.top-2?(Je(or.right,or.top,null,or.bottom),Je(qt,Mr.top,Mr.left,Mr.bottom)):Je(or.right,or.top,Mr.left-or.right,or.bottom)),or.bottom<Mr.top&&Je(qt,or.bottom,null,Mr.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||(mi(it,"focus",it,st),it.state.focused=!0,En(it.display.wrapper,"CodeMirror-focused"),!it.curOp&&it.display.selForContextMenu!=it.doc.sel&&(it.display.input.reset(),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&&(mi(it,"blur",it,st),it.state.focused=!1,Ot(it.display.wrapper,"CodeMirror-focused")),clearInterval(it.display.blinker),setTimeout(function(){it.state.focused||(it.display.shift=!1)},150))}function _r(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,Kt=void 0,qt=0;if(!gt.hidden){if(de&&Ht<8){var Yt=gt.node.offsetTop+gt.node.offsetHeight;Kt=Yt-dt,dt=Yt}else{var pe=gt.node.getBoundingClientRect();Kt=pe.bottom-pe.top,!Nt&&gt.text.firstChild&&(qt=gt.text.firstChild.getBoundingClientRect().right-pe.left-1)}var Je=gt.line.height-Kt;if((Je>.005||Je<-.005)&&(ai(gt.line,Kt),ju(gt.line),gt.rest))for(var ve=0;ve<gt.rest.length;ve++)ju(gt.rest[ve]);if(qt>it.display.sizerWidth){var Ln=Math.ceil(qt/vu(it.display));Ln>it.display.maxLineLength&&(it.display.maxLineLength=Ln,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=an(st,ht),Kt=an(st,gt);if(dt&&dt.ensure){var qt=dt.ensure.from.line,Yt=dt.ensure.to.line;qt<Nt?(Nt=qt,Kt=an(st,Di(Ai(st,qt))+it.wrapper.clientHeight)):Math.min(Yt,st.lastLine())>=Kt&&(Nt=an(st,Di(Ai(st,Yt))-it.wrapper.clientHeight),Kt=Yt)}return{from:Nt,to:Math.max(Kt,Nt+1)}}function Oh(it,st){if(!Mi(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&&!be){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?ln(st.line,st.sticky=="before"?st.ch-1:st.ch,"after"):st,dt=st.sticky=="before"?ln(st.line,st.ch+1,"before"):st);for(var Nt=0;Nt<5;Nt++){var Kt=!1,qt=mo(it,st),Yt=!dt||dt==st?qt:mo(it,dt);gt={left:Math.min(qt.left,Yt.left),top:Math.min(qt.top,Yt.top)-ht,right:Math.max(qt.left,Yt.left),bottom:Math.max(qt.bottom,Yt.bottom)+ht};var pe=Hh(it,gt),Je=it.doc.scrollTop,ve=it.doc.scrollLeft;if(pe.scrollTop!=null&&(yu(it,pe.scrollTop),Math.abs(it.doc.scrollTop-Je)>1&&(Kt=!0)),pe.scrollLeft!=null&&(wu(it,pe.scrollLeft),Math.abs(it.doc.scrollLeft-ve)>1&&(Kt=!0)),!Kt)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),Kt={};st.bottom-st.top>Nt&&(st.bottom=st.top+Nt);var qt=it.doc.height+Vo(dt),Yt=st.top<ht,pe=st.bottom>qt-ht;if(st.top<gt)Kt.scrollTop=Yt?0:st.top;else if(st.bottom>gt+Nt){var Je=Math.min(st.top,(pe?qt:st.bottom)-Nt);Je!=gt&&(Kt.scrollTop=Je)}var ve=it.options.fixedGutter?0:dt.gutters.offsetWidth,Ln=it.curOp&&it.curOp.scrollLeft!=null?it.curOp.scrollLeft:dt.scroller.scrollLeft-ve,Bn=ys(it)-dt.gutters.offsetWidth,Bi=st.right-st.left>Bn;return Bi&&(st.right=st.left+Bn),st.left<10?Kt.scrollLeft=0:st.left<Ln?Kt.scrollLeft=Math.max(0,st.left+ve-(Bi?0:10)):st.right>Bn+Ln-3&&(Kt.scrollLeft=st.right+(Bi?0:10)-Bn),Kt}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),Sn(ht,"scroll",function(){ht.clientHeight&&st(ht.scrollTop,"vertical")}),Sn(gt,"scroll",function(){gt.clientWidth&&st(gt.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,de&&Ht<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&&!Jt?"12px":"18px";this.horiz.style.height=this.vert.style.width=it,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ie,this.disableVert=new ie},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&&_r(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&&Ot(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),Sn(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&&En(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 Kt=0;Kt<st.length;Kt++)NA(st[Kt])}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&&_r(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==qe();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,ii(ht,it.scrollToPos.from),ii(ht,it.scrollToPos.to),it.scrollToPos.margin);Oh(st,gt)}var Nt=it.maybeHiddenMarkers,Kt=it.maybeUnhiddenMarkers;if(Nt)for(var qt=0;qt<Nt.length;++qt)Nt[qt].lines.length||mi(Nt[qt],"hide");if(Kt)for(var Yt=0;Yt<Kt.length;++Yt)Kt[Yt].lines.length&&mi(Kt[Yt],"unhide");dt.wrapper.offsetHeight&&(ht.scrollTop=st.display.scroller.scrollTop),it.changeObjs&&mi(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,ni(ua,it))}function ua(it){var st=it.doc;if(!(st.highlightFrontier>=it.display.viewTo)){var dt=+new Date+it.options.workTime,ht=Ur(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 Kt=Nt.styles,qt=Nt.text.length>it.options.maxHighlightLength?gi(st.mode,ht.state):null,Yt=Lr(it,Nt,ht,!0);qt&&(ht.state=qt),Nt.styles=Yt.styles;var pe=Nt.styleClasses,Je=Yt.classes;Je?Nt.styleClasses=Je:pe&&(Nt.styleClasses=null);for(var ve=!Kt||Kt.length!=Nt.styles.length||pe!=Je&&(!pe||!Je||pe.bgClass!=Je.bgClass||pe.textClass!=Je.textClass),Ln=0;!ve&&Ln<Kt.length;++Ln)ve=Kt[Ln]!=Nt.styles[Ln];ve&&gt.push(ht.line),Nt.stateAfter=ht.save(),ht.nextLine()}else Nt.text.length<=it.options.maxHighlightLength&&rn(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){ki(it,st)&&this.events.push(arguments)},fh.prototype.finish=function(){for(var it=0;it<this.events.length;it++)mi.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=qe();if(!st||!nn(it.display.lineDiv,st))return null;var dt={activeElt:st};if(window.getSelection){var ht=window.getSelection();ht.anchorNode&&ht.extend&&nn(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==qe())&&(it.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(it.activeElt.nodeName)&&it.anchorNode&&nn(document.body,it.anchorNode)&&nn(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),Kt=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>Kt&&dt.viewTo-Kt<20&&(Kt=Math.min(gt,dt.viewTo)),ee&&(Nt=zn(it.doc,Nt),Kt=Xn(it.doc,Kt));var qt=Nt!=dt.viewFrom||Kt!=dt.viewTo||dt.lastWrapHeight!=st.wrapperHeight||dt.lastWrapWidth!=st.wrapperWidth;ns(it,Nt,Kt),dt.viewOffset=Di(Ai(it.doc,dt.viewFrom)),it.display.mover.style.top=dt.viewOffset+"px";var Yt=nl(it);if(!qt&&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),Wt(dt.cursorDiv),Wt(dt.selectionDiv),dt.gutters.style.height=dt.sizer.style.minHeight=0,qt&&(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;_r(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)){_r(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,Kt=Nt.firstChild;function qt(Bi){var Li=Bi.nextSibling;return ne&&At&&it.display.currentWheelTarget==Bi?Bi.style.display="none":Bi.parentNode.removeChild(Bi),Li}for(var Yt=ht.view,pe=ht.viewFrom,Je=0;Je<Yt.length;Je++){var ve=Yt[Je];if(!ve.hidden)if(!ve.node||ve.node.parentNode!=Nt){var Ln=Ts(it,ve,pe,dt);Nt.insertBefore(Ln,Kt)}else{for(;Kt!=ve.node;)Kt=qt(Kt);var Bn=gt&&st!=null&&st<=pe&&ve.lineNumber;ve.changes&&(Pn(ve.changes,"gutter")>-1&&(Bn=!1),os(it,ve,pe,dt)),Bn&&(Wt(ve.lineNumber),ve.lineNumber.appendChild(document.createTextNode(vi(it.options,pe)))),Kt=ve.node.nextSibling}pe+=ve.size}for(;Kt;)Kt=qt(Kt)}function IA(it){var st=it.gutters.offsetWidth;it.sizer.style.marginLeft=st+"px"}function UA(it,st){it.display.sizer.style.minHeight=st.docHeight+"px",it.display.heightForcer.style.top=st.docHeight+"px",it.display.gutters.style.height=st.docHeight+it.display.barHeight+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",Kt=0;Kt<dt.length;Kt++)if(!dt[Kt].hidden){it.options.fixedGutter&&(dt[Kt].gutter&&(dt[Kt].gutter.style.left=Nt),dt[Kt].gutterBackground&&(dt[Kt].gutterBackground.style.left=Nt));var qt=dt[Kt].alignable;if(qt)for(var Yt=0;Yt<qt.length;Yt++)qt[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=vi(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,Kt=gt.offsetWidth-Nt;return ht.lineGutter.style.width="",ht.lineNumInnerWidth=Math.max(Nt,ht.lineGutter.offsetWidth-Kt)+1,ht.lineNumWidth=ht.lineNumInnerWidth+Kt,ht.lineNumChars=ht.lineNumInnerWidth?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],Kt=null;if(typeof Nt!="string"&&(Kt=Nt.style,Nt=Nt.className),Nt=="CodeMirror-linenumbers")if(st)ht=!0;else continue;dt.push({className:Nt,style:Kt})}return st&&!ht&&dt.push({className:"CodeMirror-linenumbers",style:null}),dt}function gh(it){var st=it.gutters,dt=it.gutterSpecs;Wt(st),it.lineGutter=null;for(var ht=0;ht<dt.length;++ht){var gt=dt[ht],Nt=gt.className,Kt=gt.style,qt=st.appendChild($t("div",null,"CodeMirror-gutter "+Nt));Kt&&(qt.style.cssText=Kt),Nt=="CodeMirror-linenumbers"&&(it.lineGutter=qt,qt.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=Ce("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=Ce("div",[gt.measure,gt.lineMeasure,gt.selectionDiv,gt.cursorDiv,gt.lineDiv],null,"position: relative; outline: none");var Nt=Ce("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: "+pi+"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&&Ht<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:De&&(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,Kt=Nt.scroller,qt=Kt.scrollWidth>Kt.clientWidth,Yt=Kt.scrollHeight>Kt.clientHeight;if(ht&&qt||gt&&Yt){if(gt&&At&&ne){t:for(var pe=st.target,Je=Nt.view;pe!=Kt;pe=pe.parentNode)for(var ve=0;ve<Je.length;ve++)if(Je[ve].node==pe){it.display.currentWheelTarget=pe;break t}}if(ht&&!Pt&&!Vt&&ia!=null){gt&&Yt&&yu(it,Math.max(0,Kt.scrollTop+gt*ia)),wu(it,Math.max(0,Kt.scrollLeft+ht*ia)),(!gt||gt&&Yt)&&Vi(st),Nt.wheelStartX=null;return}if(gt&&ia!=null){var Ln=gt*ia,Bn=it.doc.scrollTop,Bi=Bn+Nt.wrapper.clientHeight;Ln<0?Bn=Math.max(0,Bn+Ln-50):Bi=Math.min(it.doc.height,Bi+Ln+50),Su(it,{top:Bn,bottom:Bi})}El<20&&(Nt.wheelStartX==null?(Nt.wheelStartX=Kt.scrollLeft,Nt.wheelStartY=Kt.scrollTop,Nt.wheelDX=ht,Nt.wheelDY=gt,setTimeout(function(){if(Nt.wheelStartX!=null){var Li=Kt.scrollLeft-Nt.wheelStartX,ji=Kt.scrollTop-Nt.wheelStartY,or=ji&&Nt.wheelDY&&ji/Nt.wheelDY||Li&&Nt.wheelDX&&Li/Nt.wheelDX;Nt.wheelStartX=Nt.wheelStartY=null,or&&(ia=(ia*El+or)/(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(!li(dt.anchor,ht.anchor)||!li(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(Xe(this.ranges[st].anchor),Xe(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(qn(st,ht.from())>=0&&qn(it,ht.to())<=0)return dt}return-1};var fs=function(it,st){this.anchor=it,this.head=st};fs.prototype.from=function(){return wn(this.anchor,this.head)},fs.prototype.to=function(){return sn(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(Ln,Bn){return qn(Ln.from(),Bn.from())}),dt=Pn(st,gt);for(var Nt=1;Nt<st.length;Nt++){var Kt=st[Nt],qt=st[Nt-1],Yt=qn(qt.to(),Kt.from());if(ht&&!Kt.empty()?Yt>0:Yt>=0){var pe=wn(qt.from(),Kt.from()),Je=sn(qt.to(),Kt.to()),ve=qt.empty()?Kt.from()==Kt.head:qt.from()==qt.head;Nt<=dt&&--dt,st.splice(--Nt,2,new fs(ve?Je:pe,ve?pe:Je))}}return new Jl(st,dt)}function gA(it,st){return new Jl([new fs(it,st||it)],0)}function OA(it){return it.text?ln(it.from.line+it.text.length-1,Le(it.text).length+(it.text.length==1?it.from.ch:0)):it.to}function HA(it,st){if(qn(it,st.from)<0)return it;if(qn(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),ln(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?ln(dt.line,it.ch-st.ch+dt.ch):ln(dt.line+(it.line-st.line),it.ch)}function Oc(it,st,dt){for(var ht=[],gt=ln(it.first,0),Nt=gt,Kt=0;Kt<st.length;Kt++){var qt=st[Kt],Yt=Rh(qt.from,gt,Nt),pe=Rh(OA(qt),gt,Nt);if(gt=qt.to,Nt=pe,dt=="around"){var Je=it.sel.ranges[Kt],ve=qn(Je.head,Je.anchor)<0;ht[Kt]=new fs(ve?pe:Yt,ve?Yt:pe)}else ht[Kt]=new fs(Yt,Yt)}return new Jl(ht,it.sel.primIndex)}function Lo(it){it.doc.mode=_e(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&&Le(st.text)==""&&(!it.cm||it.cm.options.wholeLineUpdateBefore)}function Ld(it,st,dt,ht){function gt(Mr){return dt?dt[Mr]:null}function Nt(Mr,Sr,Hr){dr(Mr,Sr,Hr,ht),lr(Mr,"change",Mr,st)}function Kt(Mr,Sr){for(var Hr=[],uo=Mr;uo<Sr;++uo)Hr.push(new fr(pe[uo],gt(uo),ht));return Hr}var qt=st.from,Yt=st.to,pe=st.text,Je=Ai(it,qt.line),ve=Ai(it,Yt.line),Ln=Le(pe),Bn=gt(pe.length-1),Bi=Yt.line-qt.line;if(st.full)it.insert(0,Kt(0,pe.length)),it.remove(pe.length,it.size-pe.length);else if(df(it,st)){var Li=Kt(0,pe.length-1);Nt(ve,ve.text,Bn),Bi&&it.remove(qt.line,Bi),Li.length&&it.insert(qt.line,Li)}else if(Je==ve)if(pe.length==1)Nt(Je,Je.text.slice(0,qt.ch)+Ln+Je.text.slice(Yt.ch),Bn);else{var ji=Kt(1,pe.length-1);ji.push(new fr(Ln+Je.text.slice(Yt.ch),Bn,ht)),Nt(Je,Je.text.slice(0,qt.ch)+pe[0],gt(0)),it.insert(qt.line+1,ji)}else if(pe.length==1)Nt(Je,Je.text.slice(0,qt.ch)+pe[0]+ve.text.slice(Yt.ch),gt(0)),it.remove(qt.line+1,Bi);else{Nt(Je,Je.text.slice(0,qt.ch)+pe[0],gt(0)),Nt(ve,Ln+ve.text.slice(Yt.ch),Bn);var or=Kt(1,pe.length-1);Bi>1&&it.remove(qt.line+1,Bi-1),it.insert(qt.line+1,or)}lr(it,"change",it,st)}function Cu(it,st,dt){function ht(gt,Nt,Kt){if(gt.linked)for(var qt=0;qt<gt.linked.length;++qt){var Yt=gt.linked[qt];if(Yt.doc!=Nt){var pe=Kt&&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,Kr(it),Lo(it),Rc(it),it.options.lineWrapping||Ji(it),it.options.mode=st.modeOption,ms(it)}function Rc(it){(it.doc.direction=="rtl"?En:Ot)(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:Xe(st.from),to:OA(st),text:Ve(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=Le(it);if(st.ranges)it.pop();else break}}function Gh(it,st){if(st)return Kh(it.done),Le(it.done);if(it.done.length&&!Le(it.done).ranges)return Le(it.done);if(it.done.length>1&&!it.done[it.done.length-2].ranges)return it.done.pop(),Le(it.done)}function _c(it,st,dt,ht){var gt=it.history;gt.undone.length=0;var Nt=+new Date,Kt,qt;if((gt.lastOp==ht||gt.lastOrigin==st.origin&&st.origin&&(st.origin.charAt(0)=="+"&&gt.lastModTime>Nt-(it.cm?it.cm.options.historyEventDelay:500)||st.origin.charAt(0)=="*"))&&(Kt=Gh(gt,gt.lastOp==ht)))qt=Le(Kt.changes),qn(st.from,st.to)==0&&qn(st.from,qt.to)==0?qt.to=OA(st):Kt.changes.push(Md(it,st));else{var Yt=Le(gt.done);for((!Yt||!Yt.ranges)&&zh(it.sel,gt.done),Kt={changes:[Md(it,st)],generation:gt.generation},gt.done.push(Kt);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,qt||mi(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&&gt.lastSelOrigin==Nt&&(gt.lastModTime==gt.lastSelTime&&gt.lastOrigin==Nt||ff(it,Nt,Le(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=Le(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(Kt){Kt.markedSpans&&((gt||(gt=st["spans_"+it.id]={}))[Nt]=Kt.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=wi(it,st);if(!dt)return ht;if(!ht)return dt;for(var gt=0;gt<dt.length;++gt){var Nt=dt[gt],Kt=ht[gt];if(Nt&&Kt)t:for(var qt=0;qt<Kt.length;++qt){for(var Yt=Kt[qt],pe=0;pe<Nt.length;++pe)if(Nt[pe].marker==Yt.marker)continue t;Nt.push(Yt)}else Kt&&(dt[gt]=Kt)}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 Kt=Nt.changes,qt=[];ht.push({changes:qt});for(var Yt=0;Yt<Kt.length;++Yt){var pe=Kt[Yt],Je=void 0;if(qt.push({from:pe.from,to:pe.to,text:pe.text}),st)for(var ve in pe)(Je=ve.match(/^spans_(\d+)$/))&&Pn(st,Number(Je[1]))>-1&&(Le(qt)[ve]=pe[ve],delete pe[ve])}}return ht}function bd(it,st,dt,ht){if(ht){var gt=it.anchor;if(dt){var Nt=qn(st,gt)<0;Nt!=qn(dt,gt)<0?(gt=st,st=dt):Nt!=qn(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 Kt=gl(it.cm,ht,it.sel.primIndex);Ka(it,Kt,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(ii(it,gt[Nt].anchor),ii(it,gt[Nt].head))},origin:dt&&dt.origin};return mi(it,"beforeSelectionChange",it,ht),it.cm&&mi(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=Le(ht);gt&&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){(ki(it,"beforeSelectionChange")||it.cm&&ki(it.cm,"beforeSelectionChange"))&&(st=Vh(it,st,dt));var ht=dt&&dt.bias||(qn(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,yr(it.cm)),lr(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 Kt=st.ranges[Nt],qt=st.ranges.length==it.sel.ranges.length&&it.sel.ranges[Nt],Yt=Gc(it,Kt.anchor,qt&&qt.anchor,dt,ht),pe=Gc(it,Kt.head,qt&&qt.head,dt,ht);(gt||Yt!=Kt.anchor||pe!=Kt.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 Kt=0;Kt<Nt.markedSpans.length;++Kt){var qt=Nt.markedSpans[Kt],Yt=qt.marker,pe="selectLeft"in Yt?!Yt.selectLeft:Yt.inclusiveLeft,Je="selectRight"in Yt?!Yt.selectRight:Yt.inclusiveRight;if((qt.from==null||(pe?qt.from<=st.ch:qt.from<st.ch))&&(qt.to==null||(Je?qt.to>=st.ch:qt.to>st.ch))){if(gt&&(mi(Yt,"beforeCursorEnter"),Yt.explicitlyCleared))if(Nt.markedSpans){--Kt;continue}else break;if(!Yt.atomic)continue;if(dt){var ve=Yt.find(ht<0?1:-1),Ln=void 0;if((ht<0?Je:pe)&&(ve=kd(it,ve,-ht,ve&&ve.line==st.line?Nt:null)),ve&&ve.line==st.line&&(Ln=qn(ve,dt))&&(ht<0?Ln<0:Ln>0))return Lu(it,ve,st,ht,gt)}var Bn=Yt.find(ht<0?-1:1);return(ht<0?pe:Je)&&(Bn=kd(it,Bn,ht,Bn.line==st.line?Nt:null)),Bn?Lu(it,Bn,st,ht,gt):null}}return st}function Gc(it,st,dt,ht,gt){var Nt=ht||1,Kt=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 Kt||(it.cantEdit=!0,ln(it.first,0))}function kd(it,st,dt,ht){return dt<0&&st.ch==0?st.line>it.first?ii(it,ln(st.line-1)):null:dt>0&&st.ch==(ht||Ai(it,st.line)).text.length?st.line<it.first+it.size-1?ln(st.line+1,0):null:new ln(st.line,st.ch+dt)}function ra(it){it.setSelection(ln(it.firstLine(),0),ln(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,Kt,qt){gt&&(ht.from=ii(it,gt)),Nt&&(ht.to=ii(it,Nt)),Kt&&(ht.text=Kt),qt!==void 0&&(ht.origin=qt)}),mi(it,"beforeChange",it,ht),it.cm&&mi(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(!((ki(it,"beforeChange")||it.cm&&ki(it.cm,"beforeChange"))&&(st=yh(it,st,!0),!st))){var ht=ae&&!dt&&hn(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]==""&&qn(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,wi(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,wi(gt,st))})}}function zc(it,st,dt){var ht=it.cm&&it.cm.state.suppressEdits;if(!(ht&&!dt)){for(var gt=it.history,Nt,Kt=it.sel,qt=st=="undo"?gt.done:gt.undone,Yt=st=="undo"?gt.undone:gt.done,pe=0;pe<qt.length&&(Nt=qt[pe],!(dt?Nt.ranges&&!Nt.equals(it.sel):!Nt.ranges));pe++);if(pe!=qt.length){for(gt.lastOrigin=gt.lastSelOrigin=null;;)if(Nt=qt.pop(),Nt.ranges){if(zh(Nt,Yt),dt&&!Nt.equals(it.sel)){Ka(it,Nt,{clearRedo:!1});return}Kt=Nt}else if(ht){qt.push(Nt);return}else break;var Je=[];zh(Kt,Yt),Yt.push({changes:Je,generation:gt.generation}),gt.generation=Nt.generation||++gt.maxGeneration;for(var ve=ki(it,"beforeChange")||it.cm&&ki(it.cm,"beforeChange"),Ln=function(Li){var ji=Nt.changes[Li];if(ji.origin=st,ve&&!yh(it,ji,!1))return qt.length=0,{};Je.push(Md(it,ji));var or=Li?Qc(it,ji):Le(qt);Wh(it,ji,or,zr(it,ji)),!Li&&it.cm&&it.cm.scrollIntoView({from:ji.from,to:OA(ji)});var Mr=[];Cu(it,function(Sr,Hr){!Hr&&Pn(Mr,Sr.history)==-1&&(vf(Sr.history,ji),Mr.push(Sr.history)),Wh(Sr,ji,null,zr(Sr,ji))})},Bn=Nt.changes.length-1;Bn>=0;--Bn){var Bi=Ln(Bn);if(Bi)return Bi.v}}}}function pf(it,st){if(st!=0&&(it.first+=st,it.sel=new Jl(fi(it.sel.ranges,function(gt){return new fs(ln(gt.anchor.line+st,gt.anchor.ch),ln(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:ln(it.first,0),to:ln(st.to.line+gt,st.to.ch),text:[Le(st.text)],origin:st.origin}}var Nt=it.lastLine();st.to.line>Nt&&(st={from:st.from,to:ln(Nt,Ai(it,Nt).text.length),text:[st.text[0]],origin:st.origin}),st.removed=Ve(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,ln(it.firstLine(),0))&&(it.cantEdit=!1)}}function ug(it,st,dt){var ht=it.doc,gt=it.display,Nt=st.from,Kt=st.to,qt=!1,Yt=Nt.line;it.options.lineWrapping||(Yt=he(mn(Ai(ht,Nt.line))),ht.iter(Yt,Kt.line+1,function(Bn){if(Bn==gt.maxLine)return qt=!0,!0})),ht.sel.contains(st.from,st.to)>-1&&yr(it),Ld(ht,st,dt,Ss(it)),it.options.lineWrapping||(ht.iter(Yt,Nt.line+st.text.length,function(Bn){var Bi=ir(Bn);Bi>gt.maxLineLength&&(gt.maxLine=Bn,gt.maxLineLength=Bi,gt.maxLineChanged=!0,qt=!1)}),qt&&(it.curOp.updateMaxLine=!0)),oe(ht,Nt.line),DA(it,400);var pe=st.text.length-(Kt.line-Nt.line)-1;st.full?ms(it):Nt.line==Kt.line&&st.text.length==1&&!df(it.doc,st)?po(it,Nt.line,"text"):ms(it,Nt.line,Kt.line+1,pe);var Je=ki(it,"changes"),ve=ki(it,"change");if(ve||Je){var Ln={from:Nt,to:Kt,text:st.text,removed:st.removed,origin:st.origin};ve&&lr(it,"change",it,Ln),Je&&(it.curOp.changeObjs||(it.curOp.changeObjs=[])).push(Ln)}it.display.selForContextMenu=null}function xh(it,st,dt,ht,gt){var Nt;ht||(ht=dt),qn(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],Kt=!0;if(Nt.ranges){Nt.copied||(Nt=it[gt]=Nt.deepCopy(),Nt.copied=!0);for(var qt=0;qt<Nt.ranges.length;qt++)ql(Nt.ranges[qt].anchor,st,dt,ht),ql(Nt.ranges[qt].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=ln(pe.from.line+ht,pe.from.ch),pe.to=ln(pe.to.line+ht,pe.to.ch);else if(st<=pe.to.line){Kt=!1;break}}Kt||(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,Mn(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,Er(gt),lr(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),Kt=ht.height;if(ht.removeInner(it,Nt),this.height-=Kt-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 qt=[];this.collapse(qt),this.children=[new Zh(qt)],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&&gt.lines.length>50){for(var Kt=gt.lines.length%25+25,qt=Kt;qt<gt.lines.length;){var Yt=new Zh(gt.lines.slice(qt,qt+=25));gt.height-=Yt.height,this.children.splice(++ht,0,Yt),Yt.parent=this}gt.lines=gt.lines.slice(0,Kt),this.maybeSpill()}break}it-=Nt}},maybeSpill:function(){if(!(this.children.length<=10)){var it=this;do{var st=it.children.splice(it.children.length-5,5),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 Kt=Math.min(st,Nt-it);if(gt.iterN(it,Kt,dt))return!0;if((st-=Kt)==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=so(this);ai(dt,Math.max(0,dt.height-Nt)),it&&(rs(it,function(){jc(it,dt,-Nt),po(it,ht,"widget")}),lr(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=so(this)-st;gt&&(cn(this.doc,ht)||ai(ht,ht.height+gt),dt&&rs(dt,function(){dt.curOp.forceUpdate=!0,jc(dt,ht,gt),lr(dt,"lineWidgetChanged",dt,it,he(ht))}))},Ri(mA);function jc(it,st,dt){Di(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&&gt.noHScroll&&(Nt.display.alignWidgets=!0),Sh(it,st,"widget",function(Kt){var qt=Kt.widgets||(Kt.widgets=[]);if(gt.insertAt==null?qt.push(gt):qt.splice(Math.min(qt.length-1,Math.max(0,gt.insertAt)),0,gt),gt.line=Kt,Nt&&!cn(it,Kt)){var Yt=Di(Kt)<it.scrollTop;ai(Kt,Kt.height+so(gt)),Yt&&ch(Nt,gt.height),Nt.curOp.forceUpdate=!0}return!0}),Nt&&lr(Nt,"lineWidgetAdded",Nt,gt,typeof st=="number"?st:he(st)),gt}var Nd=0,Ke=function(it,st){this.lines=[],this.type=st,this.doc=it,this.id=++Nd};Ke.prototype.clear=function(){if(!this.explicitlyCleared){var it=this.doc.cm,st=it&&!it.curOp;if(st&&Hl(it),ki(this,"clear")){var dt=this.find();dt&&lr(this,"clear",dt.from,dt.to)}for(var ht=null,gt=null,Nt=0;Nt<this.lines.length;++Nt){var Kt=this.lines[Nt],qt=Nn(Kt.markedSpans,this);it&&!this.collapsed?po(it,he(Kt),"text"):it&&(qt.to!=null&&(gt=he(Kt)),qt.from!=null&&(ht=he(Kt))),Kt.markedSpans=Vn(Kt.markedSpans,qt),qt.from==null&&this.collapsed&&!cn(this.doc,Kt)&&it&&ai(Kt,dl(it.display))}if(it&&this.collapsed&&!it.options.lineWrapping)for(var Yt=0;Yt<this.lines.length;++Yt){var pe=mn(this.lines[Yt]),Je=ir(pe);Je>it.display.maxLineLength&&(it.display.maxLine=pe,it.display.maxLineLength=Je,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&&lr(it,"markerCleared",it,this,ht,gt),st&&Au(it),this.parent&&this.parent.clear()}},Ke.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],Kt=Nn(Nt.markedSpans,this);if(Kt.from!=null&&(dt=ln(st?Nt:he(Nt),Kt.from),it==-1))return dt;if(Kt.to!=null&&(ht=ln(st?Nt:he(Nt),Kt.to),it==1))return ht}return dt&&{from:dt,to:ht}},Ke.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),Kt=hl(ht,Nt);if(Kt&&(AA(Kt),ht.curOp.selectionChanged=ht.curOp.forceUpdate=!0),ht.curOp.updateMaxLine=!0,!cn(dt.doc,gt)&&dt.height!=null){var qt=dt.height;dt.height=null;var Yt=so(dt)-qt;Yt&&ai(gt,gt.height+Yt)}lr(ht,"markerChanged",ht,it)})},Ke.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)},Ke.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)}},Ri(Ke);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 Ke(it,gt),Kt=qn(st,dt);if(ht&&In(ht,Nt,!1),Kt>0||Kt==0&&Nt.clearWhenEmpty!==!1)return Nt;if(Nt.replacedWith&&(Nt.collapsed=!0,Nt.widgetNode=Ce("span",[Nt.replacedWith],"CodeMirror-widget"),ht.handleMouseEvents||Nt.widgetNode.setAttribute("cm-ignore-events","true"),ht.insertLeft&&(Nt.widgetNode.insertLeft=!0)),Nt.collapsed){if(gn(it,st.line,st,dt,Nt)||st.line!=dt.line&&gn(it,dt.line,st,dt,Nt))throw new Error("Inserting collapsed marker partially overlapping an existing one");Se()}Nt.addToHistory&&_c(it,{from:st,to:dt,origin:"markText"},it.sel,NaN);var qt=st.line,Yt=it.cm,pe;if(it.iter(qt,dt.line+1,function(ve){Yt&&Nt.collapsed&&!Yt.options.lineWrapping&&mn(ve)==Yt.display.maxLine&&(pe=!0),Nt.collapsed&&qt!=st.line&&ai(ve,0),Qi(ve,new An(Nt,qt==st.line?st.ch:null,qt==dt.line?dt.ch:null)),++qt}),Nt.collapsed&&it.iter(st.line,dt.line+1,function(ve){cn(it,ve)&&ai(ve,0)}),Nt.clearOnEnter&&Sn(Nt,"beforeCursorEnter",function(){return Nt.clear()}),Nt.readOnly&&(je(),(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 Je=st.line;Je<=dt.line;Je++)po(Yt,Je,"text");Nt.atomic&&Eu(Yt.doc),lr(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();lr(this,"clear")}},Mu.prototype.find=function(it,st){return this.primary.find(it,st)},Ri(Mu);function Ag(it,st,dt,ht,gt){ht=In(ht),ht.shared=!1;var Nt=[zA(it,st,dt,ht,gt)],Kt=Nt[0],qt=ht.widgetNode;return Cu(it,function(Yt){qt&&(ht.widgetNode=qt.cloneNode(!0)),Nt.push(zA(Yt,ii(Yt,st),ii(Yt,dt),ht,gt));for(var pe=0;pe<Yt.linked.length;++pe)if(Yt.linked[pe].isParent)return;Kt=Le(Nt)}),new Mu(Nt,Kt)}function Dd(it){return it.findMarks(ln(it.first,0),it.clipPos(ln(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),Kt=it.clipPos(gt.to);if(qn(Nt,Kt)){var qt=zA(it,Nt,Kt,ht.primary,ht.primary.type);ht.markers.push(qt),qt.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 Kt=0;Kt<gt.markers.length;Kt++){var qt=gt.markers[Kt];Pn(Nt,qt.doc)==-1&&(qt.parent=null,gt.markers.splice(Kt--,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=ln(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=Mt(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=ze(this,this.first,this.first+this.size);return it===!1?st:st.join(it||this.lineSeparator())},setValue:Fa(function(it){var st=ln(this.first,0),dt=this.first+this.size-1;GA(this,{from:st,to:ln(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=ii(this,st),dt=dt?ii(this,dt):st,xh(this,it,st,dt,ht)},getRange:function(it,st,dt){var ht=Ve(this,ii(this,it),ii(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(Yn(this,it))return Ai(this,it)},getLineNumber:function(it){return he(it)},getLineHandleVisualStart:function(it){return typeof it=="number"&&(it=Ai(this,it)),mn(it)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(it){return ii(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,ii(this,typeof it=="number"?ln(it,st||0):it),null,dt)}),setSelection:Fa(function(it,st,dt){KA(this,ii(this,it),ii(this,st||it),dt)}),extendSelection:Fa(function(it,st,dt){jh(this,ii(this,it),st&&ii(this,st),dt)}),extendSelections:Fa(function(it,st){Fu(this,Ki(this,it),st)}),extendSelectionsBy:Fa(function(it,st){var dt=fi(this.sel.ranges,it);Fu(this,Ki(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(ii(this,it[gt].anchor),ii(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(ii(this,it),ii(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=Ve(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=Ve(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 Kt=gt.ranges[Nt];ht[Nt]={from:Kt.from(),to:Kt.to(),text:this.splitLines(it[Nt]),origin:dt}}for(var qt=st&&st!="end"&&Oc(this,ht,st),Yt=ht.length-1;Yt>=0;Yt--)GA(this,ht[Yt]);qt?ph(this,qt):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(!Yn(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(Rt(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 Kt=Nt.match(Rt(dt));if(!Kt)return!1;var qt=Kt.index+Kt[0].length;ht[gt]=Nt.slice(0,Kt.index)+(!Kt.index||qt==Nt.length?"":" ")+Nt.slice(qt)||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,ii(this,it),ii(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=ii(this,it),zA(this,it,it,dt,"bookmark")},findMarksAt:function(it){it=ii(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=ii(this,it),st=ii(this,st);var ht=[],gt=it.line;return this.iter(it.line,st.line+1,function(Nt){var Kt=Nt.markedSpans;if(Kt)for(var qt=0;qt<Kt.length;qt++){var Yt=Kt[qt];!(Yt.to!=null&&gt==it.line&&it.ch>=Yt.to||Yt.from==null&&gt!=it.line||Yt.from!=null&&gt==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}),ii(this,ln(dt,st))},indexFromPos:function(it){it=ii(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(ze(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(ze(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):ro(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),!(Mi(st,it)||ts(st.display,it))){Vi(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),Kt=0,qt=function(){++Kt==gt&&ga(st,function(){dt=ii(st.doc,dt);var Bn={from:dt,to:dt,text:st.doc.splitLines(Nt.filter(function(Bi){return Bi!=null}).join(st.doc.lineSeparator())),origin:"paste"};GA(st.doc,Bn),ph(st.doc,gA(ii(st.doc,dt),ii(st.doc,OA(Bn))))})()},Yt=function(Bn,Bi){if(st.options.allowDropFileTypes&&Pn(st.options.allowDropFileTypes,Bn.type)==-1){qt();return}var Li=new FileReader;Li.onerror=function(){return qt()},Li.onload=function(){var ji=Li.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ji)){qt();return}Nt[Bi]=ji,qt()},Li.readAsText(Bn)},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 Je=it.dataTransfer.getData("Text");if(Je){var ve;if(st.state.draggingText&&!st.state.draggingText.copy&&(ve=st.listSelections()),mh(st.doc,gA(dt,dt)),ve)for(var Ln=0;Ln<ve.length;++Ln)xh(st.doc,"",ve[Ln].anchor,ve[Ln].head,"drag");st.replaceSelection(Je,"around","paste"),st.display.input.focus()}}catch(Bn){}}}}function Qd(it,st){if(de&&(!it.state.draggingText||+new Date-Yh<100)){Cr(st);return}if(!(Mi(it,st)||ts(it.display,st))&&(st.dataTransfer.setData("Text",it.getSelection()),st.dataTransfer.effectAllowed="copyMove",st.dataTransfer.setDragImage&&!De)){var dt=$t("img",null,null,"position: fixed; left: 0; top: 0;");dt.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Vt&&(dt.width=dt.height=1,it.display.wrapper.appendChild(dt),dt._top=dt.offsetTop),st.dataTransfer.setDragImage(dt,0,0),Vt&&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;Sn(window,"resize",function(){it==null&&(it=setTimeout(function(){it=null,fg(yf)},100))}),Sn(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,Kt=0;Kt<st.length-1;Kt++){var qt=st[Kt];if(/^(cmd|meta|m)$/i.test(qt))Nt=!0;else if(/^a(lt)?$/i.test(qt))dt=!0;else if(/^(c|ctrl|control)$/i.test(qt))ht=!0;else if(/^s(hift)?$/i.test(qt))gt=!0;else throw new Error("Unrecognized modifier name: "+qt)}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=fi(dt.split(" "),wf),Nt=0;Nt<gt.length;Nt++){var Kt=void 0,qt=void 0;Nt==gt.length-1?(qt=gt.join(" "),Kt=ht):(qt=gt.slice(0,Nt+1).join(" "),Kt="...");var Yt=st[qt];if(!Yt)st[qt]=Kt;else if(Yt!=Kt)throw new Error("Inconsistent bindings for "+qt)}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 Kt=Kl(it,st.fallthrough[Nt],dt,ht);if(Kt)return Kt}}}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(Vt&&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&&qn(Nt.from,Le(ht).to)<=0;){var Kt=ht.pop();if(qn(Kt.from,Nt.from)<0){Nt.from=Kt.from;break}}ht.push(Nt)}rs(it,function(){for(var qt=ht.length-1;qt>=0;qt--)xh(it.doc,"",ht[qt].from,ht[qt].to,"+delete");lu(it)})}function Bf(it,st,dt){var ht=ye(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 ln(st.line,ht,dt<0?"after":"before")}function qh(it,st,dt,ht,gt){if(it){st.doc.direction=="rtl"&&(gt=-gt);var Nt=yn(dt,st.doc.direction);if(Nt){var Kt=gt<0?Le(Nt):Nt[0],qt=gt<0==(Kt.level==1),Yt=qt?"after":"before",pe;if(Kt.level>0||st.doc.direction=="rtl"){var Je=Zo(st,dt);pe=gt<0?dt.text.length-1:0;var ve=Ta(st,Je,pe).top;pe=Ye(function(Ln){return Ta(st,Je,Ln).top==ve},gt<0==(Kt.level==1)?Kt.from:Kt.to-1,pe),Yt=="before"&&(pe=Bf(dt,pe,1))}else pe=gt<0?Kt.to:Kt.from;return new ln(ht,pe,Yt)}}return new ln(ht,gt<0?dt.text.length:0,gt<0?"before":"after")}function $h(it,st,dt,ht){var gt=yn(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=Oe(gt,dt.ch,dt.sticky),Kt=gt[Nt];if(it.doc.direction=="ltr"&&Kt.level%2==0&&(ht>0?Kt.to>dt.ch:Kt.from<dt.ch))return oa(st,dt,ht);var qt=function(or,Mr){return Bf(st,or instanceof ln?or.ch:or,Mr)},Yt,pe=function(or){return it.options.lineWrapping?(Yt=Yt||Zo(it,st),cl(it,st,Yt,or)):{begin:0,end:st.text.length}},Je=pe(dt.sticky=="before"?qt(dt,-1):dt.ch);if(it.doc.direction=="rtl"||Kt.level==1){var ve=Kt.level==1==ht<0,Ln=qt(dt,ve?1:-1);if(Ln!=null&&(ve?Ln<=Kt.to&&Ln<=Je.end:Ln>=Kt.from&&Ln>=Je.begin)){var Bn=ve?"before":"after";return new ln(dt.line,Ln,Bn)}}var Bi=function(or,Mr,Sr){for(var Hr=function(Hs,Sa){return Sa?new ln(dt.line,qt(Hs,1),"before"):new ln(dt.line,Hs,"after")};or>=0&&or<gt.length;or+=Mr){var uo=gt[or],wr=Mr>0==(uo.level!=1),Mo=wr?Sr.begin:qt(Sr.end,-1);if(uo.from<=Mo&&Mo<uo.to||(Mo=wr?uo.from:qt(uo.to,-1),Sr.begin<=Mo&&Mo<Sr.end))return Hr(Mo,wr)}},Li=Bi(Nt+ht,ht,Je);if(Li)return Li;var ji=ht>0?Je.end:qt(Je.begin,-1);return ji!=null&&!(ht>0&&ji==st.text.length)&&(Li=Bi(ht>0?0:gt.length-1,ht,pe(ji)),Li)?Li: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:ln(st.head.line+1,0)}:{from:st.head,to:ln(st.head.line,dt)}}else return{from:st.from(),to:st.to()}})},deleteLine:function(it){return Da(it,function(st){return{from:ln(st.from().line,0),to:ii(it.doc,ln(st.to().line+1,0))}})},delLineLeft:function(it){return Da(it,function(st){return{from:ln(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(ln(it.firstLine(),0))},goDocEnd:function(it){return it.extendSelection(ln(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(),Kt=Ee(it.getLine(Nt.line),Nt.ch,ht);st.push(ri(ht-Kt%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 ln(gt.line,gt.ch-1)),gt.ch>0)gt=new ln(gt.line,gt.ch+1),it.replaceRange(Nt.charAt(gt.ch-1)+Nt.charAt(gt.ch-2),ln(gt.line,gt.ch-2),gt,"+transpose");else if(gt.line>it.doc.first){var Kt=Ai(it.doc,gt.line-1).text;Kt&&(gt=new ln(gt.line,1),it.replaceRange(Nt.charAt(0)+it.doc.lineSeparator()+Kt.charAt(Kt.length-1),ln(gt.line-1,Kt.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=mn(dt);return ht!=dt&&(st=he(ht)),qh(!0,it,ht,st,1)}function ec(it,st){var dt=Ai(it.doc,st),ht=xn(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=yn(ht,it.doc.direction);if(!gt||gt[0].level==0){var Nt=Math.max(dt.ch,ht.text.search(/\S/)),Kt=st.line==dt.line&&st.ch<=Nt&&st.ch;return ln(dt.line,Kt?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)!=Wn}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 ie;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"&&lr(it,"keyHandled",it,st,dt),(gt=="handled"||gt=="multi")&&(Vi(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=qe(),!Mi(st,it))){de&&Ht<11&&it.keyCode==27&&(it.returnValue=!1);var dt=it.keyCode;st.display.shift=dt==16||it.shiftKey;var ht=Jc(st,it);Vt&&(VA=ht?dt:null,!ht&&dt==88&&!Gi&&(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;En(st,"CodeMirror-crosshair");function dt(ht){(ht.keyCode==18||!ht.altKey)&&(Ot(st,"CodeMirror-crosshair"),ci(document,"keyup",dt),ci(document,"mouseover",dt))}Sn(document,"keyup",dt),Sn(document,"mouseover",dt)}function Ef(it){it.keyCode==16&&(this.doc.sel.shift=!1),Mi(this,it)}function bu(it){var st=this;if(!(it.target&&it.target!=st.display.input.getField())&&!(ts(st.display,it)||Mi(st,it)||it.ctrlKey&&!it.altKey||At&&it.metaKey)){var dt=it.keyCode,ht=it.charCode;if(Vt&&dt==VA){VA=null,Vi(it);return}if(!(Vt&&(!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&&qn(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(!(Mi(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=Wr(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):xr(it)==dt.scroller&&Vi(it):gt==2?(ht&&jh(st.doc,ht),setTimeout(function(){return dt.input.focus()},20)):gt==3&&(bt?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(Kt){if(typeof Kt=="string"&&(Kt=jA[Kt]),!Kt)return!1;var qt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),qt=Kt(it,dt)!=Wn}finally{it.state.suppressEdits=!1}return qt})}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(ni(cs,it),0):it.curOp.focus=qe();var gt=td(it,dt,ht),Nt=it.doc.sel,Kt;it.options.dragDrop&&$i&&!it.isReadOnly()&&dt=="single"&&(Kt=Nt.contains(st))>-1&&(qn((Kt=Nt.ranges[Kt]).from(),st)<0||st.xRel>0)&&(qn(Kt.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,Kt=ga(it,function(pe){ne&&(gt.scroller.draggable=!1),it.state.draggingText=!1,ci(gt.wrapper.ownerDocument,"mouseup",Kt),ci(gt.wrapper.ownerDocument,"mousemove",qt),ci(gt.scroller,"dragstart",Yt),ci(gt.scroller,"drop",Kt),Nt||(Vi(pe),ht.addNew||jh(it.doc,dt,null,null,ht.extend),ne&&!De||de&&Ht==9?setTimeout(function(){gt.wrapper.ownerDocument.body.focus({preventScroll:!0}),gt.input.focus()},20):gt.input.focus())}),qt=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=Kt,Kt.copy=!ht.moveOnDrag,gt.scroller.dragDrop&&gt.scroller.dragDrop(),Sn(gt.wrapper.ownerDocument,"mouseup",Kt),Sn(gt.wrapper.ownerDocument,"mousemove",qt),Sn(gt.scroller,"dragstart",Yt),Sn(gt.scroller,"drop",Kt),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(ln(st.line,0),ii(it.doc,ln(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;Vi(st);var Kt,qt,Yt=Nt.sel,pe=Yt.ranges;if(ht.addNew&&!ht.extend?(qt=Nt.sel.contains(dt),qt>-1?Kt=pe[qt]:Kt=new fs(dt,dt)):(Kt=Nt.sel.primary(),qt=Nt.sel.primIndex),ht.unit=="rectangle")ht.addNew||(Kt=new fs(dt,dt)),dt=xa(it,st,!0,!0),qt=-1;else{var Je=rc(it,dt,ht.unit);ht.extend?Kt=bd(Kt,Je.anchor,Je.head,ht.extend):Kt=Je}ht.addNew?qt==-1?(qt=pe.length,Ka(Nt,gl(it,pe.concat([Kt]),qt),{scroll:!1,origin:"*mouse"})):pe.length>1&&pe[qt].empty()&&ht.unit=="char"&&!ht.extend?(Ka(Nt,gl(it,pe.slice(0,qt).concat(pe.slice(qt+1)),0),{scroll:!1,origin:"*mouse"}),Yt=Nt.sel):_A(Nt,qt,Kt,Zn):(qt=0,Ka(Nt,new Jl([Kt],0),Zn),Yt=Nt.sel);var ve=dt;function Ln(Sr){if(qn(ve,Sr)!=0)if(ve=Sr,ht.unit=="rectangle"){for(var Hr=[],uo=it.options.tabSize,wr=Ee(Ai(Nt,dt.line).text,dt.ch,uo),Mo=Ee(Ai(Nt,Sr.line).text,Sr.ch,uo),Hs=Math.min(wr,Mo),Sa=Math.max(wr,Mo),Ws=Math.min(dt.line,Sr.line),ml=Math.min(it.lastLine(),Math.max(dt.line,Sr.line));Ws<=ml;Ws++){var ba=Ai(Nt,Ws).text,ma=Oi(ba,Hs,uo);Hs==Sa?Hr.push(new fs(ln(Ws,ma),ln(Ws,ma))):ba.length>ma&&Hr.push(new fs(ln(Ws,ma),ln(Ws,Oi(ba,Sa,uo))))}Hr.length||Hr.push(new fs(dt,dt)),Ka(Nt,gl(it,Yt.ranges.slice(0,qt).concat(Hr),qt),{origin:"*mouse",scroll:!1}),it.scrollIntoView(Sr)}else{var ol=Kt,Ia=rc(it,Sr,ht.unit),mr=ol.anchor,jo;qn(Ia.anchor,mr)>0?(jo=Ia.head,mr=wn(ol.from(),Ia.anchor)):(jo=Ia.anchor,mr=sn(ol.to(),Ia.head));var Rs=Yt.ranges.slice(0);Rs[qt]=bf(it,new fs(ii(Nt,mr),jo)),Ka(Nt,gl(it,Rs,qt),Zn)}}var Bn=gt.wrapper.getBoundingClientRect(),Bi=0;function Li(Sr){var Hr=++Bi,uo=xa(it,Sr,!0,ht.unit=="rectangle");if(uo)if(qn(uo,ve)!=0){it.curOp.focus=qe(),Ln(uo);var wr=Bo(gt,Nt);(uo.line>=wr.to||uo.line<wr.from)&&setTimeout(ga(it,function(){Bi==Hr&&Li(Sr)}),150)}else{var Mo=Sr.clientY<Bn.top?-20:Sr.clientY>Bn.bottom?20:0;Mo&&setTimeout(ga(it,function(){Bi==Hr&&(gt.scroller.scrollTop+=Mo,Li(Sr))}),50)}}function ji(Sr){it.state.selectingText=!1,Bi=1/0,Sr&&(Vi(Sr),gt.input.focus()),ci(gt.wrapper.ownerDocument,"mousemove",or),ci(gt.wrapper.ownerDocument,"mouseup",Mr),Nt.history.lastSelOrigin=null}var or=ga(it,function(Sr){Sr.buttons===0||!Wr(Sr)?ji(Sr):Li(Sr)}),Mr=ga(it,ji);it.state.selectingText=Mr,Sn(gt.wrapper.ownerDocument,"mousemove",or),Sn(gt.wrapper.ownerDocument,"mouseup",Mr)}function bf(it,st){var dt=st.anchor,ht=st.head,gt=Ai(it.doc,dt.line);if(qn(dt,ht)==0&&dt.sticky==ht.sticky)return st;var Nt=yn(gt);if(!Nt)return st;var Kt=Oe(Nt,dt.ch,dt.sticky),qt=Nt[Kt];if(qt.from!=dt.ch&&qt.to!=dt.ch)return st;var Yt=Kt+(qt.from==dt.ch==(qt.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 Je=Oe(Nt,ht.ch,ht.sticky),ve=Je-Kt||(ht.ch-dt.ch)*(qt.level==1?-1:1);Je==Yt-1||Je==Yt?pe=ve<0:pe=ve>0}var Ln=Nt[Yt+(pe?-1:0)],Bn=pe==(Ln.level==1),Bi=Bn?Ln.from:Ln.to,Li=Bn?"after":"before";return dt.ch==Bi&&dt.sticky==Li?st:new fs(new ln(dt.line,Bi,Li),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(Ln){return!1}if(gt>=Math.floor(it.display.gutters.getBoundingClientRect().right))return!1;ht&&Vi(st);var Kt=it.display,qt=Kt.lineDiv.getBoundingClientRect();if(Nt>qt.bottom||!ki(it,dt))return qi(st);Nt-=qt.top-Kt.viewOffset;for(var Yt=0;Yt<it.display.gutterSpecs.length;++Yt){var pe=Kt.gutters.childNodes[Yt];if(pe&&pe.getBoundingClientRect().right>=gt){var Je=an(it.doc,Nt),ve=it.display.gutterSpecs[Yt];return mi(it,dt,it,Je,ve.className,st),qi(st)}}}function Kd(it,st){return _d(it,st,"gutterClick",!0)}function ed(it,st){ts(it.display,st)||Ph(it,st)||Mi(it,st,"contextmenu")||bt||it.display.input.onContextMenu(st)}function Ph(it,st){return ki(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,Kt){it.defaults[ht]=gt,Nt&&(st[ht]=Kt?function(qt,Yt,pe){pe!=ku&&Nt(qt,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=[],Kt=ht.doc.first;ht.doc.iter(function(Yt){for(var pe=0;;){var Je=Yt.text.indexOf(gt,pe);if(Je==-1)break;pe=Je+gt.length,Nt.push(ln(Kt,Je))}Kt++});for(var qt=Nt.length-1;qt>=0;qt--)xh(ht.doc,gt,Nt[qt],ln(Nt[qt].line,Nt[qt].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 Kt=ha(gt),qt=Nt!=ku&&ha(Nt);qt&&qt.detach&&qt.detach(ht,Kt),Kt.attach&&Kt.attach(ht,qt||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?Sn:ci;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?(En(it.display.wrapper,"CodeMirror-wrap"),it.display.sizer.style.minWidth="",it.display.sizerWidth=null):(Ot(it.display.wrapper,"CodeMirror-wrap"),Ji(it)),Kr(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?In(st):{},In(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 ie,keySeq:null,specialChars:null},st.autofocus&&!et&&Nt.input.focus(),de&&Ht<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 Kt in nd)nd.hasOwnProperty(Kt)&&nd[Kt](this,st[Kt],ku);Aa(this),st.finishInit&&st.finishInit(this);for(var qt=0;qt<WA.length;++qt)WA[qt](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;Sn(st.scroller,"mousedown",ga(it,$l)),de&&Ht<11?Sn(st.scroller,"dblclick",ga(it,function(Yt){if(!Mi(it,Yt)){var pe=xa(it,Yt);if(!(!pe||Kd(it,Yt)||ts(it.display,Yt))){Vi(Yt);var Je=it.findWordAt(pe);jh(it.doc,Je.anchor,Je.head)}}})):Sn(st.scroller,"dblclick",function(Yt){return Mi(it,Yt)||Vi(Yt)}),Sn(st.scroller,"contextmenu",function(Yt){return ed(it,Yt)}),Sn(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 Kt(Yt,pe){if(pe.left==null)return!0;var Je=pe.left-Yt.left,ve=pe.top-Yt.top;return Je*Je+ve*ve>20*20}Sn(st.scroller,"touchstart",function(Yt){if(!Mi(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)}}),Sn(st.scroller,"touchmove",function(){st.activeTouch&&(st.activeTouch.moved=!0)}),Sn(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 Je=it.coordsChar(st.activeTouch,"page"),ve;!pe.prev||Kt(pe,pe.prev)?ve=new fs(Je,Je):!pe.prev.prev||Kt(pe,pe.prev.prev)?ve=it.findWordAt(Je):ve=new fs(ln(Je.line,0),ii(it.doc,ln(Je.line+1,0))),it.setSelection(ve.anchor,ve.head),it.focus(),Vi(Yt)}gt()}),Sn(st.scroller,"touchcancel",gt),Sn(st.scroller,"scroll",function(){st.scroller.clientHeight&&(yu(it,st.scroller.scrollTop),wu(it,st.scroller.scrollLeft,!0),mi(it,"scroll",it))}),Sn(st.scroller,"mousewheel",function(Yt){return La(it,Yt)}),Sn(st.scroller,"DOMMouseScroll",function(Yt){return La(it,Yt)}),Sn(st.wrapper,"scroll",function(){return st.wrapper.scrollTop=st.wrapper.scrollLeft=0}),st.dragFunctions={enter:function(Yt){Mi(it,Yt)||Cr(Yt)},over:function(Yt){Mi(it,Yt)||(cg(it,Yt),Cr(Yt))},start:function(Yt){return Qd(it,Yt)},drop:ga(it,Ud),leave:function(Yt){Mi(it,Yt)||dg(it)}};var qt=st.input.getField();Sn(qt,"keyup",function(Yt){return Ef.call(it,Yt)}),Sn(qt,"keydown",ga(it,$c)),Sn(qt,"keypress",ga(it,bu)),Sn(qt,"focus",function(Yt){return _o(it,Yt)}),Sn(qt,"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=Ur(it,st).state:dt="prev");var Kt=it.options.tabSize,qt=Ai(gt,st),Yt=Ee(qt.text,null,Kt);qt.stateAfter&&(qt.stateAfter=null);var pe=qt.text.match(/^\s*/)[0],Je;if(!ht&&!/\S/.test(qt.text))Je=0,dt="not";else if(dt=="smart"&&(Je=gt.mode.indent(Nt,qt.text.slice(pe.length),qt.text),Je==Wn||Je>150)){if(!ht)return;dt="prev"}dt=="prev"?st>gt.first?Je=Ee(Ai(gt,st-1).text,null,Kt):Je=0:dt=="add"?Je=Yt+it.options.indentUnit:dt=="subtract"?Je=Yt-it.options.indentUnit:typeof dt=="number"&&(Je=Yt+dt),Je=Math.max(0,Je);var ve="",Ln=0;if(it.options.indentWithTabs)for(var Bn=Math.floor(Je/Kt);Bn;--Bn)Ln+=Kt,ve+=" ";if(Ln<Je&&(ve+=ri(Je-Ln)),ve!=pe)return xh(gt,ve,ln(st,0),ln(st,pe.length),"+input"),qt.stateAfter=null,!0;for(var Bi=0;Bi<gt.sel.ranges.length;Bi++){var Li=gt.sel.ranges[Bi];if(Li.head.line==st&&Li.head.ch<pe.length){var ji=ln(st,pe.length);_A(gt,Bi,new fs(ji,ji));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 Kt=+new Date-200,qt=gt=="paste"||it.state.pasteIncoming>Kt,Yt=ro(st),pe=null;if(qt&&ht.ranges.length>1)if(rl&&rl.text.join(`
`)==st){if(ht.ranges.length%rl.text.length==0){pe=[];for(var Je=0;Je<rl.text.length;Je++)pe.push(Nt.splitLines(rl.text[Je]))}}else Yt.length==ht.ranges.length&&it.options.pasteLinesPerSelection&&(pe=fi(Yt,function(or){return[or]}));for(var ve=it.curOp.updateInput,Ln=ht.ranges.length-1;Ln>=0;Ln--){var Bn=ht.ranges[Ln],Bi=Bn.from(),Li=Bn.to();Bn.empty()&&(dt&&dt>0?Bi=ln(Bi.line,Bi.ch-dt):it.state.overwrite&&!qt?Li=ln(Li.line,Math.min(Ai(Nt,Li.line).text.length,Li.ch+Le(Yt).length)):qt&&rl&&rl.lineWise&&rl.text.join(`
`)==Yt.join(`
`)&&(Bi=Li=ln(Bi.line,0)));var ji={from:Bi,to:Li,text:pe?pe[Ln%pe.length]:Yt,origin:gt||(qt?"paste":it.state.cutIncoming>Kt?"cut":"+input")};GA(it.doc,ji),lr(it,"inputRead",it,ji)}st&&!qt&&ac(it,st),lu(it),it.curOp.updateInput<2&&(it.curOp.updateInput=ve),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),Kt=!1;if(Nt.electricChars){for(var qt=0;qt<Nt.electricChars.length;qt++)if(st.indexOf(Nt.electricChars.charAt(qt))>-1){Kt=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))&&(Kt=ca(it,gt.head.line,"smart"));Kt&&lr(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:ln(gt,0),head:ln(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"),It&&(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,Kt=Nt[ht];Nt[ht]==gt&&ht!="mode"||(Nt[ht]=gt,st.hasOwnProperty(ht)&&ga(this,st[ht])(this,gt,Kt),mi(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&&gt.opaque,priority:gt&&gt.priority||0},function(Kt){return Kt.priority}),this.state.modeGen++,ms(this)}),removeOverlay:Pa(function(ht){for(var gt=this.state.overlays,Nt=0;Nt<gt.length;++Nt){var Kt=gt[Nt].modeSpec;if(Kt==ht||typeof ht=="string"&&Kt.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"),Yn(this.doc,ht)&&ca(this,ht,gt,Nt)}),indentSelection:Pa(function(ht){for(var gt=this.doc.sel.ranges,Nt=-1,Kt=0;Kt<gt.length;Kt++){var qt=gt[Kt];if(qt.empty())qt.head.line>Nt&&(ca(this,qt.head.line,ht,!0),Nt=qt.head.line,Kt==this.doc.sel.primIndex&&lu(this));else{var Yt=qt.from(),pe=qt.to(),Je=Math.max(Nt,Yt.line);Nt=Math.min(this.lastLine(),pe.line-(pe.ch?0:1))+1;for(var ve=Je;ve<Nt;++ve)ca(this,ve,ht);var Ln=this.doc.sel.ranges;Yt.ch==0&&gt.length==Ln.length&&Ln[Kt].from().ch>0&&_A(this.doc,Kt,new fs(Yt,Ln[Kt].to()),un)}}}),getTokenAt:function(ht,gt){return xi(this,ht,gt)},getLineTokens:function(ht,gt){return xi(this,ln(ht),gt,!0)},getTokenTypeAt:function(ht){ht=ii(this.doc,ht);var gt=cr(this,Ai(this.doc,ht.line)),Nt=0,Kt=(gt.length-1)/2,qt=ht.ch,Yt;if(qt==0)Yt=gt[2];else for(;;){var pe=Nt+Kt>>1;if((pe?gt[pe*2-1]:0)>=qt)Kt=pe;else if(gt[pe*2+1]<qt)Nt=pe+1;else{Yt=gt[pe*2+2];break}}var Je=Yt?Yt.indexOf("overlay "):-1;return Je<0?Yt:Je==0?null:Yt.slice(0,Je-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 Kt=dt[gt],qt=this.getModeAt(ht);if(typeof qt[gt]=="string")Kt[qt[gt]]&&Nt.push(Kt[qt[gt]]);else if(qt[gt])for(var Yt=0;Yt<qt[gt].length;Yt++){var pe=Kt[qt[gt][Yt]];pe&&Nt.push(pe)}else qt.helperType&&Kt[qt.helperType]?Nt.push(Kt[qt.helperType]):Kt[qt.name]&&Nt.push(Kt[qt.name]);for(var Je=0;Je<Kt._global.length;Je++){var ve=Kt._global[Je];ve.pred(qt,this)&&Pn(Nt,ve.val)==-1&&Nt.push(ve.val)}return Nt},getStateAfter:function(ht,gt){var Nt=this.doc;return ht=Mn(Nt,ht==null?Nt.first+Nt.size-1:ht),Ur(this,ht+1,gt).state},cursorCoords:function(ht,gt){var Nt,Kt=this.doc.sel.primary();return ht==null?Nt=Kt.head:typeof ht=="object"?Nt=ii(this.doc,ht):Nt=ht?Kt.from():Kt.to(),mo(this,Nt,gt||"page")},charCoords:function(ht,gt){return ao(this,ii(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,an(this.doc,ht+this.display.viewOffset)},heightAtLine:function(ht,gt,Nt){var Kt=!1,qt;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,Kt=!0),qt=Ai(this.doc,ht)}else qt=ht;return js(this,qt,{top:0,left:0},gt||"page",Nt||Kt).top+(Kt?this.doc.height-Di(qt):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,Kt,qt){var Yt=this.display;ht=mo(this,ii(this.doc,ht));var pe=ht.bottom,Je=ht.left;if(gt.style.position="absolute",gt.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(gt),Yt.sizer.appendChild(gt),Kt=="over")pe=ht.top;else if(Kt=="above"||Kt=="near"){var ve=Math.max(Yt.wrapper.clientHeight,this.doc.height),Ln=Math.max(Yt.sizer.clientWidth,Yt.lineSpace.clientWidth);(Kt=="above"||ht.bottom+gt.offsetHeight>ve)&&ht.top>gt.offsetHeight?pe=ht.top-gt.offsetHeight:ht.bottom+gt.offsetHeight<=ve&&(pe=ht.bottom),Je+gt.offsetWidth>Ln&&(Je=Ln-gt.offsetWidth)}gt.style.top=pe+"px",gt.style.left=gt.style.right="",qt=="right"?(Je=Yt.sizer.clientWidth-gt.offsetWidth,gt.style.right="0px"):(qt=="left"?Je=0:qt=="middle"&&(Je=(Yt.sizer.clientWidth-gt.offsetWidth)/2),gt.style.left=Je+"px"),Nt&&TA(this,{left:Je,top:pe,right:Je+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,Kt){var qt=1;gt<0&&(qt=-1,gt=-gt);for(var Yt=ii(this.doc,ht),pe=0;pe<gt&&(Yt=lc(this.doc,Yt,qt,Nt,Kt),!Yt.hitSide);++pe);return Yt},moveH:Pa(function(ht,gt){var Nt=this;this.extendSelectionsBy(function(Kt){return Nt.display.shift||Nt.doc.extend||Kt.empty()?lc(Nt.doc,Kt.head,ht,gt,Nt.options.rtlMoveVisually):ht<0?Kt.from():Kt.to()},si)}),deleteH:Pa(function(ht,gt){var Nt=this.doc.sel,Kt=this.doc;Nt.somethingSelected()?Kt.replaceSelection("",null,"+delete"):Da(this,function(qt){var Yt=lc(Kt,qt.head,ht,gt,!1);return ht<0?{from:Yt,to:qt.head}:{from:qt.head,to:Yt}})}),findPosV:function(ht,gt,Nt,Kt){var qt=1,Yt=Kt;gt<0&&(qt=-1,gt=-gt);for(var pe=ii(this.doc,ht),Je=0;Je<gt;++Je){var ve=mo(this,pe,"div");if(Yt==null?Yt=ve.left:ve.left=Yt,pe=YA(this,ve,qt,Nt),pe.hitSide)break}return pe},moveV:Pa(function(ht,gt){var Nt=this,Kt=this.doc,qt=[],Yt=!this.display.shift&&!Kt.extend&&Kt.sel.somethingSelected();if(Kt.extendSelectionsBy(function(Je){if(Yt)return ht<0?Je.from():Je.to();var ve=mo(Nt,Je.head,"div");Je.goalColumn!=null&&(ve.left=Je.goalColumn),qt.push(ve.left);var Ln=YA(Nt,ve,ht,gt);return gt=="page"&&Je==Kt.sel.primary()&&ch(Nt,ao(Nt,Ln,"div").top-ve.top),Ln},si),qt.length)for(var pe=0;pe<Kt.sel.ranges.length;pe++)Kt.sel.ranges[pe].goalColumn=qt[pe]}),findWordAt:function(ht){var gt=this.doc,Nt=Ai(gt,ht.line).text,Kt=ht.ch,qt=ht.ch;if(Nt){var Yt=this.getHelper(ht,"wordChars");(ht.sticky=="before"||qt==Nt.length)&&Kt?--Kt:++qt;for(var pe=Nt.charAt(Kt),Je=Lt(pe,Yt)?function(ve){return Lt(ve,Yt)}:/\s/.test(pe)?function(ve){return/\s/.test(ve)}:function(ve){return!/\s/.test(ve)&&!Lt(ve)};Kt>0&&Je(Nt.charAt(Kt-1));)--Kt;for(;qt<Nt.length&&Je(Nt.charAt(qt));)++qt}return new fs(ln(ht.line,Kt),ln(ht.line,qt))},toggleOverwrite:function(ht){ht!=null&&ht==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?En(this.display.cursorDiv,"CodeMirror-overwrite"):Ot(this.display.cursorDiv,"CodeMirror-overwrite"),mi(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==qe()},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:ln(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,Kt=function(Yt){return typeof Yt=="number"||/^\d+$/.test(String(Yt))?Yt+"px":Yt};ht!=null&&(this.display.wrapper.style.width=Kt(ht)),gt!=null&&(this.display.wrapper.style.height=Kt(gt)),this.options.lineWrapping&&wa(this);var qt=this.display.viewFrom;this.doc.iter(qt,this.display.viewTo,function(Yt){if(Yt.widgets){for(var pe=0;pe<Yt.widgets.length;pe++)if(Yt.widgets[pe].noHScroll){po(Nt,qt,"widget");break}}++qt}),this.curOp.forceUpdate=!0,mi(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)&&Kr(this),mi(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,lr(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}},Ri(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,Kt){it.registerHelper(ht,gt,Kt),dt[ht]._global.push({pred:Nt,val:Kt})}}function lc(it,st,dt,ht,gt){var Nt=st,Kt=dt,qt=Ai(it,st.line),Yt=gt&&it.direction=="rtl"?-dt:dt;function pe(){var Mr=st.line+Yt;return Mr<it.first||Mr>=it.first+it.size?!1:(st=new ln(Mr,st.ch,st.sticky),qt=Ai(it,Mr))}function Je(Mr){var Sr;if(ht=="codepoint"){var Hr=qt.text.charCodeAt(st.ch+(ht>0?0:-1));isNaN(Hr)?Sr=null:Sr=new ln(st.line,Math.max(0,Math.min(qt.text.length,st.ch+dt*(Hr>=55296&&Hr<56320?2:1))),-dt)}else gt?Sr=$h(it.cm,qt,st,dt):Sr=oa(qt,st,dt);if(Sr==null)if(!Mr&&pe())st=qh(gt,it.cm,qt,st.line,Yt);else return!1;else st=Sr;return!0}if(ht=="char"||ht=="codepoint")Je();else if(ht=="column")Je(!0);else if(ht=="word"||ht=="group")for(var ve=null,Ln=ht=="group",Bn=it.cm&&it.cm.getHelper(st,"wordChars"),Bi=!0;!(dt<0&&!Je(!Bi));Bi=!1){var Li=qt.text.charAt(st.ch)||`
`,ji=Lt(Li,Bn)?"w":Ln&&Li==`
`?"n":!Ln||/\s/.test(Li)?null:"p";if(Ln&&!Bi&&!ji&&(ji="s"),ve&&ve!=ji){dt<0&&(dt=1,Je(),st.sticky="after");break}if(ji&&(ve=ji),dt>0&&!Je(!Bi))break}var or=Gc(it,st,Nt,Kt,!0);return li(Nt,or)&&(or.hitSide=!0),or}function YA(it,st,dt,ht){var gt=it.doc,Nt=st.left,Kt;if(ht=="page"){var qt=Math.min(it.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Yt=Math.max(qt-.5*dl(it.display),3);Kt=(dt>0?st.bottom:st.top)+dt*Yt}else ht=="line"&&(Kt=dt>0?st.bottom+3:st.top-3);for(var pe;pe=ss(it,Nt,Kt),!!pe.outside;){if(dt<0?Kt<=0:Kt>=gt.height){pe.hitSide=!0;break}Kt+=dt*5}return pe}var Cs=function(it){this.cm=it,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ie,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(qt){for(var Yt=qt.target;Yt;Yt=Yt.parentNode){if(Yt==gt)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Yt.className))break}return!1}Sn(gt,"paste",function(qt){!Nt(qt)||Mi(ht,qt)||sc(qt,ht)||Ht<=11&&setTimeout(ga(ht,function(){return st.updateFromDOM()}),20)}),Sn(gt,"compositionstart",function(qt){st.composing={data:qt.data,done:!1}}),Sn(gt,"compositionupdate",function(qt){st.composing||(st.composing={data:qt.data,done:!1})}),Sn(gt,"compositionend",function(qt){st.composing&&(qt.data!=st.composing.data&&st.readFromDOMSoon(),st.composing.done=!0)}),Sn(gt,"touchstart",function(){return dt.forceCompositionEnd()}),Sn(gt,"input",function(){st.composing||st.readFromDOMSoon()});function Kt(qt){if(!(!Nt(qt)||Mi(ht,qt))){if(ht.somethingSelected())ZA({lineWise:!1,text:ht.getSelections()}),qt.type=="cut"&&ht.replaceSelection("",null,"cut");else if(ht.options.lineWiseCopyCut){var Yt=zd(ht);ZA({lineWise:!0,text:Yt.text}),qt.type=="cut"&&ht.operation(function(){ht.setSelections(Yt.ranges,0,un),ht.replaceSelection("",null,"cut")})}else return;if(qt.clipboardData){qt.clipboardData.clearData();var pe=rl.text.join(`
`);if(qt.clipboardData.setData("Text",pe),qt.clipboardData.getData("Text")==pe){qt.preventDefault();return}}var Je=Nf(),ve=Je.firstChild;ht.display.lineSpace.insertBefore(Je,ht.display.lineSpace.firstChild),ve.value=rl.text.join(`
`);var Ln=document.activeElement;bn(ve),setTimeout(function(){ht.display.lineSpace.removeChild(Je),Ln.focus(),Ln==gt&&dt.showPrimarySelection()},50)}}Sn(gt,"copy",Kt),Sn(gt,"cut",Kt)},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),Kt=Xu(st,it.focusNode,it.focusOffset);if(!(Nt&&!Nt.bad&&Kt&&!Kt.bad&&qn(wn(Nt,Kt),ht)==0&&qn(sn(Nt,Kt),gt)==0)){var qt=st.display.view,Yt=ht.line>=st.display.viewFrom&&wA(st,ht)||{node:qt[0].measure.map[2],offset:0},pe=gt.line<st.display.viewTo&&wA(st,gt);if(!pe){var Je=qt[qt.length-1].measure,ve=Je.maps?Je.maps[Je.maps.length-1]:Je.map;pe={node:ve[ve.length-1],offset:ve[ve.length-2]-ve[ve.length-3]}}if(!Yt||!pe){it.removeAllRanges();return}var Ln=it.rangeCount&&it.getRangeAt(0),Bn;try{Bn=ge(Yt.node,Yt.offset,pe.offset,pe.node)}catch(Bi){}Bn&&(!Pt&&st.state.focused?(it.collapse(Yt.node,Yt.offset),Bn.collapsed||(it.removeAllRanges(),it.addRange(Bn))):(it.removeAllRanges(),it.addRange(Bn)),Ln&&it.anchorNode==null?it.addRange(Ln):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 nn(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=ln(ht.line-1,Ai(it.doc,ht.line-1).length)),gt.ch==Ai(it.doc,gt.line).text.length&&gt.line<it.lastLine()&&(gt=ln(gt.line+1,0)),ht.line<st.viewFrom||gt.line>st.viewTo-1)return!1;var Nt,Kt,qt;ht.line==st.viewFrom||(Nt=el(it,ht.line))==0?(Kt=he(st.view[0].line),qt=st.view[0].node):(Kt=he(st.view[Nt].line),qt=st.view[Nt-1].node.nextSibling);var Yt=el(it,gt.line),pe,Je;if(Yt==st.view.length-1?(pe=st.viewTo-1,Je=st.lineDiv.lastChild):(pe=he(st.view[Yt+1].line)-1,Je=st.view[Yt+1].node.previousSibling),!qt)return!1;for(var ve=it.doc.splitLines(hu(it,qt,Je,Kt,pe)),Ln=Ve(it.doc,ln(Kt,0),ln(pe,Ai(it.doc,pe).text.length));ve.length>1&&Ln.length>1;)if(Le(ve)==Le(Ln))ve.pop(),Ln.pop(),pe--;else if(ve[0]==Ln[0])ve.shift(),Ln.shift(),Kt++;else break;for(var Bn=0,Bi=0,Li=ve[0],ji=Ln[0],or=Math.min(Li.length,ji.length);Bn<or&&Li.charCodeAt(Bn)==ji.charCodeAt(Bn);)++Bn;for(var Mr=Le(ve),Sr=Le(Ln),Hr=Math.min(Mr.length-(ve.length==1?Bn:0),Sr.length-(Ln.length==1?Bn:0));Bi<Hr&&Mr.charCodeAt(Mr.length-Bi-1)==Sr.charCodeAt(Sr.length-Bi-1);)++Bi;if(ve.length==1&&Ln.length==1&&Kt==ht.line)for(;Bn&&Bn>ht.ch&&Mr.charCodeAt(Mr.length-Bi-1)==Sr.charCodeAt(Sr.length-Bi-1);)Bn--,Bi++;ve[ve.length-1]=Mr.slice(0,Mr.length-Bi).replace(/^\u200b+/,""),ve[0]=ve[0].slice(Bn).replace(/\u200b+$/,"");var uo=ln(Kt,Bn),wr=ln(pe,Ln.length?Le(Ln).length-Bi:0);if(ve.length>1||ve[0]||qn(uo,wr))return xh(it.doc,ve,uo,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=lo(dt,ht,st.line),Nt=yn(ht,it.doc.direction),Kt="left";if(Nt){var qt=Oe(Nt,st.ch);Kt=qt%2?"right":"left"}var Yt=uA(gt.map,st.ch,Kt);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="",Kt=!1,qt=it.doc.lineSeparator(),Yt=!1;function pe(Bn){return function(Bi){return Bi.id==Bn}}function Je(){Kt&&(Nt+=qt,Yt&&(Nt+=qt),Kt=Yt=!1)}function ve(Bn){Bn&&(Je(),Nt+=Bn)}function Ln(Bn){if(Bn.nodeType==1){var Bi=Bn.getAttribute("cm-text");if(Bi){ve(Bi);return}var Li=Bn.getAttribute("cm-marker"),ji;if(Li){var or=it.findMarks(ln(ht,0),ln(gt+1,0),pe(+Li));or.length&&(ji=or[0].find(0))&&ve(Ve(it.doc,ji.from,ji.to).join(qt));return}if(Bn.getAttribute("contenteditable")=="false")return;var Mr=/^(pre|div|p|li|table|br)$/i.test(Bn.nodeName);if(!/^br$/i.test(Bn.nodeName)&&Bn.textContent.length==0)return;Mr&&Je();for(var Sr=0;Sr<Bn.childNodes.length;Sr++)Ln(Bn.childNodes[Sr]);/^(pre|p)$/i.test(Bn.nodeName)&&(Yt=!0),Mr&&(Kt=!0)}else Bn.nodeType==3&&ve(Bn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Ln(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(ln(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||!nn(ht,st))return Js(ln(he(it.line),0),!0);if(st==ht&&(gt=!0,st=ht.childNodes[dt],dt=0,!st)){var Nt=it.rest?Le(it.rest):it.line;return Js(ln(he(Nt),Nt.text.length),gt)}var Kt=st.nodeType==3?st:null,qt=st;for(!Kt&&st.childNodes.length==1&&st.firstChild.nodeType==3&&(Kt=st.firstChild,dt&&(dt=Kt.nodeValue.length));qt.parentNode!=ht;)qt=qt.parentNode;var Yt=it.measure,pe=Yt.maps;function Je(ji,or,Mr){for(var Sr=-1;Sr<(pe?pe.length:0);Sr++)for(var Hr=Sr<0?Yt.map:pe[Sr],uo=0;uo<Hr.length;uo+=3){var wr=Hr[uo+2];if(wr==ji||wr==or){var Mo=he(Sr<0?it.line:it.rest[Sr]),Hs=Hr[uo]+Mr;return(Mr<0||wr!=ji)&&(Hs=Hr[uo+(Mr?1:0)]),ln(Mo,Hs)}}}var ve=Je(Kt,qt,dt);if(ve)return Js(ve,gt);for(var Ln=qt.nextSibling,Bn=Kt?Kt.nodeValue.length-dt:0;Ln;Ln=Ln.nextSibling){if(ve=Je(Ln,Ln.firstChild,0),ve)return Js(ln(ve.line,ve.ch-Bn),gt);Bn+=Ln.textContent.length}for(var Bi=qt.previousSibling,Li=dt;Bi;Bi=Bi.previousSibling){if(ve=Je(Bi,Bi.firstChild,-1),ve)return Js(ln(ve.line,ve.ch+Li),gt);Li+=Bi.textContent.length}}var Os=function(it){this.cm=it,this.prevInput="",this.pollingFast=!1,this.polling=new ie,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),It&&(gt.style.width="0px"),Sn(gt,"input",function(){de&&Ht>=9&&st.hasSelection&&(st.hasSelection=null),dt.poll()}),Sn(gt,"paste",function(Kt){Mi(ht,Kt)||sc(Kt,ht)||(ht.state.pasteIncoming=+new Date,dt.fastPoll())});function Nt(Kt){if(!Mi(ht,Kt)){if(ht.somethingSelected())ZA({lineWise:!1,text:ht.getSelections()});else if(ht.options.lineWiseCopyCut){var qt=zd(ht);ZA({lineWise:!0,text:qt.text}),Kt.type=="cut"?ht.setSelections(qt.ranges,null,un):(dt.prevInput="",gt.value=qt.text.join(`
`),bn(gt))}else return;Kt.type=="cut"&&(ht.state.cutIncoming=+new Date)}}Sn(gt,"cut",Nt),Sn(gt,"copy",Nt),Sn(it.scroller,"paste",function(Kt){if(!(ts(it,Kt)||Mi(ht,Kt))){if(!gt.dispatchEvent){ht.state.pasteIncoming=+new Date,dt.focus();return}var qt=new Event("paste");qt.clipboardData=Kt.clipboardData,gt.dispatchEvent(qt)}}),Sn(it.lineSpace,"selectstart",function(Kt){ts(it,Kt)||Vi(Kt)}),Sn(gt,"compositionstart",function(){var Kt=ht.getCursor("from");dt.composing&&dt.composing.range.clear(),dt.composing={start:Kt,range:ht.markText(Kt,ht.getCursor("to"),{className:"CodeMirror-composing"})}}),Sn(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(),Kt=st.lineDiv.getBoundingClientRect();ht.teTop=Math.max(0,Math.min(st.wrapper.clientHeight-10,gt.top+Kt.top-Nt.top)),ht.teLeft=Math.max(0,Math.min(st.wrapper.clientWidth-10,gt.left+Kt.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&&bn(this.textarea),de&&Ht>=9&&(this.hasSelection=dt)}else it||(this.prevInput=this.textarea.value="",de&&Ht>=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||qe()!=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||Tt(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&&Ht>=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 Kt=0,qt=Math.min(ht.length,gt.length);Kt<qt&&ht.charCodeAt(Kt)==gt.charCodeAt(Kt);)++Kt;return rs(st,function(){id(st,gt.slice(Kt),ht.length-Kt,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&&Ht>=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),Kt=ht.scroller.scrollTop;if(!Nt||Vt)return;var qt=dt.options.resetSelectionOnContextMenu;qt&&dt.doc.sel.contains(Nt)==-1&&ga(dt,Ka)(dt.doc,gA(Nt),un);var Yt=gt.style.cssText,pe=st.wrapper.style.cssText,Je=st.wrapper.offsetParent.getBoundingClientRect();st.wrapper.style.cssText="position: static",gt.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(it.clientY-Je.top-5)+"px; left: "+(it.clientX-Je.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 ve;ne&&(ve=window.scrollY),ht.input.focus(),ne&&window.scrollTo(null,ve),ht.input.reset(),dt.somethingSelected()||(gt.value=st.prevInput=" "),st.contextMenuPending=Bn,ht.selForContextMenu=dt.doc.sel,clearTimeout(ht.detectingSelectAll);function Ln(){if(gt.selectionStart!=null){var Li=dt.somethingSelected(),ji="\u200B"+(Li?gt.value:"");gt.value="\u21DA",gt.value=ji,st.prevInput=Li?"":"\u200B",gt.selectionStart=1,gt.selectionEnd=ji.length,ht.selForContextMenu=dt.doc.sel}}function Bn(){if(st.contextMenuPending==Bn&&(st.contextMenuPending=!1,st.wrapper.style.cssText=pe,gt.style.cssText=Yt,de&&Ht<9&&ht.scrollbars.setScrollTop(ht.scroller.scrollTop=Kt),gt.selectionStart!=null)){(!de||de&&Ht<9)&&Ln();var Li=0,ji=function(){ht.selForContextMenu==dt.doc.sel&&gt.selectionStart==0&&gt.selectionEnd>0&&st.prevInput=="\u200B"?ga(dt,ra)(dt):Li++<10?ht.detectingSelectAll=setTimeout(ji,500):(ht.selForContextMenu=null,ht.input.reset())};ht.detectingSelectAll=setTimeout(ji,200)}}if(de&&Ht>=9&&Ln(),bt){Cr(it);var Bi=function(){ci(window,"mouseup",Bi),setTimeout(Bn,20)};Sn(window,"mouseup",Bi)}else setTimeout(Bn,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?In(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=qe();st.autofocus=dt==it||it.getAttribute("autofocus")!=null&&dt==document.body}function ht(){it.value=qt.getValue()}var gt;if(it.form&&(Sn(it.form,"submit",ht),!st.leaveSubmitMethodAlone)){var Nt=it.form;gt=Nt.submit;try{var Kt=Nt.submit=function(){ht(),Nt.submit=gt,Nt.submit(),Nt.submit=Kt}}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&&(ci(it.form,"submit",ht),!st.leaveSubmitMethodAlone&&typeof it.form.submit=="function"&&(it.form.submit=gt))}},it.style.display="none";var qt=Yo(function(Yt){return it.parentNode.insertBefore(Yt,it.nextSibling)},st);return qt}function Gl(it){it.off=ci,it.on=Sn,it.wheelEventPixels=Ll,it.Doc=Ma,it.splitLines=ro,it.countColumn=Ee,it.findColumn=Oi,it.isWordChar=vt,it.Pass=Wn,it.signal=mi,it.Line=fr,it.changeEnd=OA,it.scrollbarModel=Vu,it.Pos=ln,it.cmpPos=qn,it.modes=bo,it.mimeModes=ko,it.resolveMode=Ni,it.getMode=_e,it.modeExtensions=Re,it.extendMode=Ue,it.copyState=gi,it.startState=Hi,it.innerMode=xe,it.commands=jA,it.keyMap=Ml,it.keyName=Sf,it.isModifierKey=Jh,it.lookupKey=Kl,it.normalizeKeyMap=xf,it.StringStream=Dn,it.SharedTextMarker=Mu,it.TextMarker=Ke,it.LineWidget=mA,it.e_preventDefault=Vi,it.e_stopPropagation=Or,it.e_stop=Cr,it.addClass=En,it.contains=nn,it.rmClass=Ot,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 Ri(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=Xi,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(Cn,We,Qt){(function(Pt){Pt(Qt(89780),Qt(15525),Qt(98101))})(function(Pt){"use strict";Pt.defineMode("markdown",function(te,Ae){var Be=Pt.getMode(te,"text/html"),de=Be.name=="null";function Ht(Ee){if(Pt.findModeByName){var ie=Pt.findModeByName(Ee);ie&&(Ee=ie.mime||ie.mimes[0])}var Pn=Pt.getMode(te,Ee);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*$/,Vt=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,De=/^\[(x| )\](?=\s)/i,Jt=Ae.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,be=/^ {0,3}(?:\={1,}|-{2,})\s*$/,It=/^[^#!\[\]*_\\<>` "'(~:]+/,nt=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,et=/^\s*\[[^\]]+?\]:.*$/,At=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,at=" ";function ct(Ee,ie,Pn){return ie.f=ie.inline=Pn,Pn(Ee,ie)}function pt(Ee,ie,Pn){return ie.f=ie.block=Pn,Pn(Ee,ie)}function xt(Ee){return!Ee||!/\S/.test(Ee.string)}function bt(Ee){if(Ee.linkTitle=!1,Ee.linkHref=!1,Ee.linkText=!1,Ee.em=!1,Ee.strong=!1,Ee.strikethrough=!1,Ee.quote=0,Ee.indentedCode=!1,Ee.f==Ot){var ie=de;if(!ie){var Pn=Pt.innerMode(Be,Ee.htmlState);ie=Pn.mode.name=="xml"&&Pn.state.tagStart===null&&!Pn.state.context&&Pn.state.tokenize.isInText}ie&&(Ee.f=Ce,Ee.block=Rt,Ee.htmlState=null)}return Ee.trailingSpace=0,Ee.trailingSpaceNewLine=!1,Ee.prevLine=Ee.thisLine,Ee.thisLine={stream:null},null}function Rt(Ee,ie){var Pn=Ee.column()===ie.indentation,pi=xt(ie.prevLine.stream),Wn=ie.indentedCode,un=ie.prevLine.hr,Zn=ie.list!==!1,si=(ie.listStack[ie.listStack.length-1]||0)+3;ie.indentedCode=!1;var Oi=ie.indentation;if(ie.indentationDiff===null&&(ie.indentationDiff=ie.indentation,Zn)){for(ie.list=null;Oi<ie.listStack[ie.listStack.length-1];)ie.listStack.pop(),ie.listStack.length?ie.indentation=ie.listStack[ie.listStack.length-1]:ie.list=!1;ie.list!==!1&&(ie.indentationDiff=Oi-ie.listStack[ie.listStack.length-1])}var on=!pi&&!un&&!ie.prevLine.header&&(!Zn||!Wn)&&!ie.prevLine.fencedCodeEnd,ri=(ie.list===!1||un||pi)&&ie.indentation<=si&&Ee.match(ce),Le=null;if(ie.indentationDiff>=4&&(Wn||ie.prevLine.fencedCodeEnd||ie.prevLine.header||pi))return Ee.skipToEnd(),ie.indentedCode=!0,ne.code;if(Ee.eatSpace())return null;if(Pn&&ie.indentation<=si&&(Le=Ee.match(Jt))&&Le[1].length<=6)return ie.quote=0,ie.header=Le[1].length,ie.thisLine.header=!0,Ae.highlightFormatting&&(ie.formatting="header"),ie.f=ie.inline,Zt(ie);if(ie.indentation<=si&&Ee.eat(">"))return ie.quote=Pn?1:ie.quote+1,Ae.highlightFormatting&&(ie.formatting="quote"),Ee.eatSpace(),Zt(ie);if(!ri&&!ie.setext&&Pn&&ie.indentation<=si&&(Le=Ee.match(Vt))){var fi=Le[1]?"ol":"ul";return ie.indentation=Oi+Ee.current().length,ie.list=!0,ie.quote=0,ie.listStack.push(ie.indentation),ie.em=!1,ie.strong=!1,ie.code=!1,ie.strikethrough=!1,Ae.taskLists&&Ee.match(De,!1)&&(ie.taskList=!0),ie.f=ie.inline,Ae.highlightFormatting&&(ie.formatting=["list","list-"+fi]),Zt(ie)}else{if(Pn&&ie.indentation<=si&&(Le=Ee.match(nt,!0)))return ie.quote=0,ie.fencedEndRE=new RegExp(Le[1]+"+ *$"),ie.localMode=Ae.fencedCodeBlockHighlighting&&Ht(Le[2]||Ae.fencedCodeBlockDefaultMode),ie.localMode&&(ie.localState=Pt.startState(ie.localMode)),ie.f=ie.block=Wt,Ae.highlightFormatting&&(ie.formatting="code-block"),ie.code=-1,Zt(ie);if(ie.setext||(!on||!Zn)&&!ie.quote&&ie.list===!1&&!ie.code&&!ri&&!et.test(Ee.string)&&(Le=Ee.lookAhead(1))&&(Le=Le.match(be)))return ie.setext?(ie.header=ie.setext,ie.setext=0,Ee.skipToEnd(),Ae.highlightFormatting&&(ie.formatting="header")):(ie.header=Le[0].charAt(0)=="="?1:2,ie.setext=ie.header),ie.thisLine.header=!0,ie.f=ie.inline,Zt(ie);if(ri)return Ee.skipToEnd(),ie.hr=!0,ie.thisLine.hr=!0,ne.hr;if(Ee.peek()==="[")return ct(Ee,ie,Tn)}return ct(Ee,ie,ie.inline)}function Ot(Ee,ie){var Pn=Be.token(Ee,ie.htmlState);if(!de){var pi=Pt.innerMode(Be,ie.htmlState);(pi.mode.name=="xml"&&pi.state.tagStart===null&&!pi.state.context&&pi.state.tokenize.isInText||ie.md_inside&&Ee.current().indexOf(">")>-1)&&(ie.f=Ce,ie.block=Rt,ie.htmlState=null)}return Pn}function Wt(Ee,ie){var Pn=ie.listStack[ie.listStack.length-1]||0,pi=ie.indentation<Pn,Wn=Pn+3;if(ie.fencedEndRE&&ie.indentation<=Wn&&(pi||Ee.match(ie.fencedEndRE))){Ae.highlightFormatting&&(ie.formatting="code-block");var un;return pi||(un=Zt(ie)),ie.localMode=ie.localState=null,ie.block=Rt,ie.f=Ce,ie.fencedEndRE=null,ie.code=0,ie.thisLine.fencedCodeEnd=!0,pi?pt(Ee,ie,ie.block):un}else return ie.localMode?ie.localMode.token(Ee,ie.localState):(Ee.skipToEnd(),ne.code)}function Zt(Ee){var ie=[];if(Ee.formatting){ie.push(ne.formatting),typeof Ee.formatting=="string"&&(Ee.formatting=[Ee.formatting]);for(var Pn=0;Pn<Ee.formatting.length;Pn++)ie.push(ne.formatting+"-"+Ee.formatting[Pn]),Ee.formatting[Pn]==="header"&&ie.push(ne.formatting+"-"+Ee.formatting[Pn]+"-"+Ee.header),Ee.formatting[Pn]==="quote"&&(!Ae.maxBlockquoteDepth||Ae.maxBlockquoteDepth>=Ee.quote?ie.push(ne.formatting+"-"+Ee.formatting[Pn]+"-"+Ee.quote):ie.push("error"))}if(Ee.taskOpen)return ie.push("meta"),ie.length?ie.join(" "):null;if(Ee.taskClosed)return ie.push("property"),ie.length?ie.join(" "):null;if(Ee.linkHref?ie.push(ne.linkHref,"url"):(Ee.strong&&ie.push(ne.strong),Ee.em&&ie.push(ne.em),Ee.strikethrough&&ie.push(ne.strikethrough),Ee.emoji&&ie.push(ne.emoji),Ee.linkText&&ie.push(ne.linkText),Ee.code&&ie.push(ne.code),Ee.image&&ie.push(ne.image),Ee.imageAltText&&ie.push(ne.imageAltText,"link"),Ee.imageMarker&&ie.push(ne.imageMarker)),Ee.header&&ie.push(ne.header,ne.header+"-"+Ee.header),Ee.quote&&(ie.push(ne.quote),!Ae.maxBlockquoteDepth||Ae.maxBlockquoteDepth>=Ee.quote?ie.push(ne.quote+"-"+Ee.quote):ie.push(ne.quote+"-"+Ae.maxBlockquoteDepth)),Ee.list!==!1){var pi=(Ee.listStack.length-1)%3;pi?pi===1?ie.push(ne.list2):ie.push(ne.list3):ie.push(ne.list1)}return Ee.trailingSpaceNewLine?ie.push("trailing-space-new-line"):Ee.trailingSpace&&ie.push("trailing-space-"+(Ee.trailingSpace%2?"a":"b")),ie.length?ie.join(" "):null}function $t(Ee,ie){if(Ee.match(It,!0))return Zt(ie)}function Ce(Ee,ie){var Pn=ie.text(Ee,ie);if(typeof Pn!="undefined")return Pn;if(ie.list)return ie.list=null,Zt(ie);if(ie.taskList){var pi=Ee.match(De,!0)[1]===" ";return pi?ie.taskOpen=!0:ie.taskClosed=!0,Ae.highlightFormatting&&(ie.formatting="task"),ie.taskList=!1,Zt(ie)}if(ie.taskOpen=!1,ie.taskClosed=!1,ie.header&&Ee.match(/^#+$/,!0))return Ae.highlightFormatting&&(ie.formatting="header"),Zt(ie);var Wn=Ee.next();if(ie.linkTitle){ie.linkTitle=!1;var un=Wn;Wn==="("&&(un=")"),un=(un+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Zn="^\\s*(?:[^"+un+"\\\\]+|\\\\\\\\|\\\\.)"+un;if(Ee.match(new RegExp(Zn),!0))return ne.linkHref}if(Wn==="`"){var si=ie.formatting;Ae.highlightFormatting&&(ie.formatting="code"),Ee.eatWhile("`");var Oi=Ee.current().length;if(ie.code==0&&(!ie.quote||Oi==1))return ie.code=Oi,Zt(ie);if(Oi==ie.code){var on=Zt(ie);return ie.code=0,on}else return ie.formatting=si,Zt(ie)}else if(ie.code)return Zt(ie);if(Wn==="\\"&&(Ee.next(),Ae.highlightFormatting)){var ri=Zt(ie),Le=ne.formatting+"-escape";return ri?ri+" "+Le:Le}if(Wn==="!"&&Ee.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return ie.imageMarker=!0,ie.image=!0,Ae.highlightFormatting&&(ie.formatting="image"),Zt(ie);if(Wn==="["&&ie.imageMarker&&Ee.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return ie.imageMarker=!1,ie.imageAltText=!0,Ae.highlightFormatting&&(ie.formatting="image"),Zt(ie);if(Wn==="]"&&ie.imageAltText){Ae.highlightFormatting&&(ie.formatting="image");var ri=Zt(ie);return ie.imageAltText=!1,ie.image=!1,ie.inline=ie.f=nn,ri}if(Wn==="["&&!ie.image)return ie.linkText&&Ee.match(/^.*?\]/)||(ie.linkText=!0,Ae.highlightFormatting&&(ie.formatting="link")),Zt(ie);if(Wn==="]"&&ie.linkText){Ae.highlightFormatting&&(ie.formatting="link");var ri=Zt(ie);return ie.linkText=!1,ie.inline=ie.f=Ee.match(/\(.*?\)| ?\[.*?\]/,!1)?nn:Ce,ri}if(Wn==="<"&&Ee.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){ie.f=ie.inline=ge,Ae.highlightFormatting&&(ie.formatting="link");var ri=Zt(ie);return ri?ri+=" ":ri="",ri+ne.linkInline}if(Wn==="<"&&Ee.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){ie.f=ie.inline=ge,Ae.highlightFormatting&&(ie.formatting="link");var ri=Zt(ie);return ri?ri+=" ":ri="",ri+ne.linkEmail}if(Ae.xml&&Wn==="<"&&Ee.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var fi=Ee.string.indexOf(">",Ee.pos);if(fi!=-1){var Pi=Ee.string.substring(Ee.start,fi);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Pi)&&(ie.md_inside=!0)}return Ee.backUp(1),ie.htmlState=Pt.startState(Be),pt(Ee,ie,Ot)}if(Ae.xml&&Wn==="<"&&Ee.match(/^\/\w*?>/))return ie.md_inside=!1,"tag";if(Wn==="*"||Wn==="_"){for(var jt=1,Mt=Ee.pos==1?" ":Ee.string.charAt(Ee.pos-2);jt<3&&Ee.eat(Wn);)jt++;var mt=Ee.peek()||" ",vt=!/\s/.test(mt)&&(!At.test(mt)||/\s/.test(Mt)||At.test(Mt)),Lt=!/\s/.test(Mt)&&(!At.test(Mt)||/\s/.test(mt)||At.test(mt)),Bt=null,_t=null;if(jt%2&&(!ie.em&&vt&&(Wn==="*"||!Lt||At.test(Mt))?Bt=!0:ie.em==Wn&&Lt&&(Wn==="*"||!vt||At.test(mt))&&(Bt=!1)),jt>1&&(!ie.strong&&vt&&(Wn==="*"||!Lt||At.test(Mt))?_t=!0:ie.strong==Wn&&Lt&&(Wn==="*"||!vt||At.test(mt))&&(_t=!1)),_t!=null||Bt!=null){Ae.highlightFormatting&&(ie.formatting=Bt==null?"strong":_t==null?"em":"strong em"),Bt===!0&&(ie.em=Wn),_t===!0&&(ie.strong=Wn);var on=Zt(ie);return Bt===!1&&(ie.em=!1),_t===!1&&(ie.strong=!1),on}}else if(Wn===" "&&(Ee.eat("*")||Ee.eat("_"))){if(Ee.peek()===" ")return Zt(ie);Ee.backUp(1)}if(Ae.strikethrough){if(Wn==="~"&&Ee.eatWhile(Wn)){if(ie.strikethrough){Ae.highlightFormatting&&(ie.formatting="strikethrough");var on=Zt(ie);return ie.strikethrough=!1,on}else if(Ee.match(/^[^\s]/,!1))return ie.strikethrough=!0,Ae.highlightFormatting&&(ie.formatting="strikethrough"),Zt(ie)}else if(Wn===" "&&Ee.match(/^~~/,!0)){if(Ee.peek()===" ")return Zt(ie);Ee.backUp(2)}}if(Ae.emoji&&Wn===":"&&Ee.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){ie.emoji=!0,Ae.highlightFormatting&&(ie.formatting="emoji");var Me=Zt(ie);return ie.emoji=!1,Me}return Wn===" "&&(Ee.match(/^ +$/,!1)?ie.trailingSpace++:ie.trailingSpace&&(ie.trailingSpaceNewLine=!0)),Zt(ie)}function ge(Ee,ie){var Pn=Ee.next();if(Pn===">"){ie.f=ie.inline=Ce,Ae.highlightFormatting&&(ie.formatting="link");var pi=Zt(ie);return pi?pi+=" ":pi="",pi+ne.linkInline}return Ee.match(/^[^>]+/,!0),ne.linkInline}function nn(Ee,ie){if(Ee.eatSpace())return null;var Pn=Ee.next();return Pn==="("||Pn==="["?(ie.f=ie.inline=En(Pn==="("?")":"]"),Ae.highlightFormatting&&(ie.formatting="link-string"),ie.linkHref=!0,Zt(ie)):"error"}var qe={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function En(Ee){return function(ie,Pn){var pi=ie.next();if(pi===Ee){Pn.f=Pn.inline=Ce,Ae.highlightFormatting&&(Pn.formatting="link-string");var Wn=Zt(Pn);return Pn.linkHref=!1,Wn}return ie.match(qe[Ee]),Pn.linkHref=!0,Zt(Pn)}}function Tn(Ee,ie){return Ee.match(/^([^\]\\]|\\.)*\]:/,!1)?(ie.f=bn,Ee.next(),Ae.highlightFormatting&&(ie.formatting="link"),ie.linkText=!0,Zt(ie)):ct(Ee,ie,Ce)}function bn(Ee,ie){if(Ee.match(/^\]:/,!0)){ie.f=ie.inline=ni,Ae.highlightFormatting&&(ie.formatting="link");var Pn=Zt(ie);return ie.linkText=!1,Pn}return Ee.match(/^([^\]\\]|\\.)+/,!0),ne.linkText}function ni(Ee,ie){return Ee.eatSpace()?null:(Ee.match(/^[^\s]+/,!0),Ee.peek()===void 0?ie.linkTitle=!0:Ee.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),ie.f=ie.inline=Ce,ne.linkHref+" url")}var In={startState:function(){return{f:Rt,prevLine:{stream:null},thisLine:{stream:null},block:Rt,htmlState:null,indentation:0,inline:Ce,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(Ee){return{f:Ee.f,prevLine:Ee.prevLine,thisLine:Ee.thisLine,block:Ee.block,htmlState:Ee.htmlState&&Pt.copyState(Be,Ee.htmlState),indentation:Ee.indentation,localMode:Ee.localMode,localState:Ee.localMode?Pt.copyState(Ee.localMode,Ee.localState):null,inline:Ee.inline,text:Ee.text,formatting:!1,linkText:Ee.linkText,linkTitle:Ee.linkTitle,linkHref:Ee.linkHref,code:Ee.code,em:Ee.em,strong:Ee.strong,strikethrough:Ee.strikethrough,emoji:Ee.emoji,header:Ee.header,setext:Ee.setext,hr:Ee.hr,taskList:Ee.taskList,list:Ee.list,listStack:Ee.listStack.slice(0),quote:Ee.quote,indentedCode:Ee.indentedCode,trailingSpace:Ee.trailingSpace,trailingSpaceNewLine:Ee.trailingSpaceNewLine,md_inside:Ee.md_inside,fencedEndRE:Ee.fencedEndRE}},token:function(Ee,ie){if(ie.formatting=!1,Ee!=ie.thisLine.stream){if(ie.header=0,ie.hr=!1,Ee.match(/^\s*$/,!0))return bt(ie),null;if(ie.prevLine=ie.thisLine,ie.thisLine={stream:Ee},ie.taskList=!1,ie.trailingSpace=0,ie.trailingSpaceNewLine=!1,!ie.localState&&(ie.f=ie.block,ie.f!=Ot)){var Pn=Ee.match(/^\s*/,!0)[0].replace(/\t/g,at).length;if(ie.indentation=Pn,ie.indentationDiff=null,Pn>0)return null}}return ie.f(Ee,ie)},innerMode:function(Ee){return Ee.block==Ot?{state:Ee.htmlState,mode:Be}:Ee.localState?{state:Ee.localState,mode:Ee.localMode}:{state:Ee,mode:In}},indent:function(Ee,ie,Pn){return Ee.block==Ot&&Be.indent?Be.indent(Ee.htmlState,ie,Pn):Ee.localState&&Ee.localMode.indent?Ee.localMode.indent(Ee.localState,ie,Pn):Pt.Pass},blankLine:bt,getType:Zt,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return In},"xml"),Pt.defineMIME("text/markdown","markdown"),Pt.defineMIME("text/x-markdown","markdown")})},98101:function(Cn,We,Qt){(function(Pt){Pt(Qt(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(Be){Be=Be.toLowerCase();for(var de=0;de<Pt.modeInfo.length;de++){var Ht=Pt.modeInfo[de];if(Ht.mime==Be)return Ht;if(Ht.mimes){for(var ne=0;ne<Ht.mimes.length;ne++)if(Ht.mimes[ne]==Be)return Ht}}if(/\+xml$/.test(Be))return Pt.findModeByMIME("application/xml");if(/\+json$/.test(Be))return Pt.findModeByMIME("application/json")},Pt.findModeByExtension=function(Be){Be=Be.toLowerCase();for(var de=0;de<Pt.modeInfo.length;de++){var Ht=Pt.modeInfo[de];if(Ht.ext){for(var ne=0;ne<Ht.ext.length;ne++)if(Ht.ext[ne]==Be)return Ht}}},Pt.findModeByFileName=function(Be){for(var de=0;de<Pt.modeInfo.length;de++){var Ht=Pt.modeInfo[de];if(Ht.file&&Ht.file.test(Be))return Ht}var ne=Be.lastIndexOf("."),ue=ne>-1&&Be.substring(ne+1,Be.length);if(ue)return Pt.findModeByExtension(ue)},Pt.findModeByName=function(Be){Be=Be.toLowerCase();for(var de=0;de<Pt.modeInfo.length;de++){var Ht=Pt.modeInfo[de];if(Ht.name.toLowerCase()==Be)return Ht;if(Ht.alias){for(var ne=0;ne<Ht.alias.length;ne++)if(Ht.alias[ne].toLowerCase()==Be)return Ht}}}})},67549:function(Cn,We,Qt){(function(Pt){Pt(Qt(89780))})(function(Pt){"use strict";Pt.defineMode("stex",function(te,Ae){"use strict";function Be(It,nt){It.cmdState.push(nt)}function de(It){return It.cmdState.length>0?It.cmdState[It.cmdState.length-1]:null}function Ht(It){var nt=It.cmdState.pop();nt&&nt.closeBracket()}function ne(It){for(var nt=It.cmdState,et=nt.length-1;et>=0;et--){var At=nt[et];if(At.name!="DEFAULT")return At}return{styleIdentifier:function(){return null}}}function ue(It,nt,et){return function(){this.name=It,this.bracketNo=0,this.style=nt,this.styles=et,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var 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 Vt(It,nt){It.f=nt}function De(It,nt){var et;if(It.match(/^\\[a-zA-Z@]+/)){var At=It.current().slice(1);return et=ce.hasOwnProperty(At)?ce[At]:ce.DEFAULT,et=new et,Be(nt,et),Vt(nt,be),et.style}if(It.match(/^\\[$&%#{}_]/)||It.match(/^\\[,;!\/\\]/))return"tag";if(It.match("\\["))return Vt(nt,function(ct,pt){return Jt(ct,pt,"\\]")}),"keyword";if(It.match("\\("))return Vt(nt,function(ct,pt){return Jt(ct,pt,"\\)")}),"keyword";if(It.match("$$"))return Vt(nt,function(ct,pt){return Jt(ct,pt,"$$")}),"keyword";if(It.match("$"))return Vt(nt,function(ct,pt){return Jt(ct,pt,"$")}),"keyword";var at=It.next();if(at=="%")return It.skipToEnd(),"comment";if(at=="}"||at=="]"){if(et=de(nt),et)et.closeBracket(at),Vt(nt,be);else return"error";return"bracket"}else return at=="{"||at=="["?(et=ce.DEFAULT,et=new et,Be(nt,et),"bracket"):/\d/.test(at)?(It.eatWhile(/[\w.%]/),"atom"):(It.eatWhile(/[\w\-_]/),et=ne(nt),et.name=="begin"&&(et.argument=It.current()),et.styleIdentifier())}function Jt(It,nt,et){if(It.eatSpace())return null;if(et&&It.match(et))return Vt(nt,De),"keyword";if(It.match(/^\\[a-zA-Z@]+/))return"tag";if(It.match(/^[a-zA-Z]+/))return"variable-2";if(It.match(/^\\[$&%#{}_]/)||It.match(/^\\[,;!\/]/)||It.match(/^[\^_&]/))return"tag";if(It.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(It.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var At=It.next();return At=="{"||At=="}"||At=="["||At=="]"||At=="("||At==")"?"bracket":At=="%"?(It.skipToEnd(),"comment"):"error"}function be(It,nt){var et=It.peek(),At;return et=="{"||et=="["?(At=de(nt),At.openBracket(et),It.eat(et),Vt(nt,De),"bracket"):/[ \t\r]/.test(et)?(It.eat(et),null):(Vt(nt,De),Ht(nt),De(It,nt))}return{startState:function(){var It=Ae.inMathMode?function(nt,et){return Jt(nt,et)}:De;return{cmdState:[],f:It}},copyState:function(It){return{cmdState:It.cmdState.slice(),f:It.f}},token:function(It,nt){return nt.f(It,nt)},blankLine:function(It){It.f=De,It.cmdState.length=0},lineComment:"%"}}),Pt.defineMIME("text/x-stex","stex"),Pt.defineMIME("text/x-latex","stex")})},15525:function(Cn,We,Qt){(function(Pt){Pt(Qt(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(Be,de){var Ht=Be.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 Vt,De;function Jt(ge,nn){function qe(bn){return nn.tokenize=bn,bn(ge,nn)}var En=ge.next();if(En=="<")return ge.eat("!")?ge.eat("[")?ge.match("CDATA[")?qe(nt("atom","]]>")):null:ge.match("--")?qe(nt("comment","-->")):ge.match("DOCTYPE",!0,!0)?(ge.eatWhile(/[\w\._\-]/),qe(et(1))):null:ge.eat("?")?(ge.eatWhile(/[\w\._\-]/),nn.tokenize=nt("meta","?>"),"meta"):(Vt=ge.eat("/")?"closeTag":"openTag",nn.tokenize=be,"tag bracket");if(En=="&"){var Tn;return ge.eat("#")?ge.eat("x")?Tn=ge.eatWhile(/[a-fA-F\d]/)&&ge.eat(";"):Tn=ge.eatWhile(/[\d]/)&&ge.eat(";"):Tn=ge.eatWhile(/[\w\.\-:]/)&&ge.eat(";"),Tn?"atom":"error"}else return ge.eatWhile(/[^&<]/),null}Jt.isInText=!0;function be(ge,nn){var qe=ge.next();if(qe==">"||qe=="/"&&ge.eat(">"))return nn.tokenize=Jt,Vt=qe==">"?"endTag":"selfcloseTag","tag bracket";if(qe=="=")return Vt="equals",null;if(qe=="<"){nn.tokenize=Jt,nn.state=pt,nn.tagName=nn.tagStart=null;var En=nn.tokenize(ge,nn);return En?En+" tag error":"tag error"}else return/[\'\"]/.test(qe)?(nn.tokenize=It(qe),nn.stringStartCol=ge.column(),nn.tokenize(ge,nn)):(ge.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function It(ge){var nn=function(qe,En){for(;!qe.eol();)if(qe.next()==ge){En.tokenize=be;break}return"string"};return nn.isInAttribute=!0,nn}function nt(ge,nn){return function(qe,En){for(;!qe.eol();){if(qe.match(nn)){En.tokenize=Jt;break}qe.next()}return ge}}function et(ge){return function(nn,qe){for(var En;(En=nn.next())!=null;){if(En=="<")return qe.tokenize=et(ge+1),qe.tokenize(nn,qe);if(En==">")if(ge==1){qe.tokenize=Jt;break}else return qe.tokenize=et(ge-1),qe.tokenize(nn,qe)}return"meta"}}function At(ge,nn,qe){this.prev=ge.context,this.tagName=nn,this.indent=ge.indented,this.startOfLine=qe,(ne.doNotIndent.hasOwnProperty(nn)||ge.context&&ge.context.noIndent)&&(this.noIndent=!0)}function at(ge){ge.context&&(ge.context=ge.context.prev)}function ct(ge,nn){for(var qe;;){if(!ge.context||(qe=ge.context.tagName,!ne.contextGrabbers.hasOwnProperty(qe)||!ne.contextGrabbers[qe].hasOwnProperty(nn)))return;at(ge)}}function pt(ge,nn,qe){return ge=="openTag"?(qe.tagStart=nn.column(),xt):ge=="closeTag"?bt:pt}function xt(ge,nn,qe){return ge=="word"?(qe.tagName=nn.current(),De="tag",Wt):ne.allowMissingTagName&&ge=="endTag"?(De="tag bracket",Wt(ge,nn,qe)):(De="error",xt)}function bt(ge,nn,qe){if(ge=="word"){var En=nn.current();return qe.context&&qe.context.tagName!=En&&ne.implicitlyClosed.hasOwnProperty(qe.context.tagName)&&at(qe),qe.context&&qe.context.tagName==En||ne.matchClosing===!1?(De="tag",Rt):(De="tag error",Ot)}else return ne.allowMissingTagName&&ge=="endTag"?(De="tag bracket",Rt(ge,nn,qe)):(De="error",Ot)}function Rt(ge,nn,qe){return ge!="endTag"?(De="error",Rt):(at(qe),pt)}function Ot(ge,nn,qe){return De="error",Rt(ge,nn,qe)}function Wt(ge,nn,qe){if(ge=="word")return De="attribute",Zt;if(ge=="endTag"||ge=="selfcloseTag"){var En=qe.tagName,Tn=qe.tagStart;return qe.tagName=qe.tagStart=null,ge=="selfcloseTag"||ne.autoSelfClosers.hasOwnProperty(En)?ct(qe,En):(ct(qe,En),qe.context=new At(qe,En,Tn==qe.indented)),pt}return De="error",Wt}function Zt(ge,nn,qe){return ge=="equals"?$t:(ne.allowMissing||(De="error"),Wt(ge,nn,qe))}function $t(ge,nn,qe){return ge=="string"?Ce:ge=="word"&&ne.allowUnquoted?(De="string",Wt):(De="error",Wt(ge,nn,qe))}function Ce(ge,nn,qe){return ge=="string"?Ce:Wt(ge,nn,qe)}return{startState:function(ge){var nn={tokenize:Jt,state:pt,indented:ge||0,tagName:null,tagStart:null,context:null};return ge!=null&&(nn.baseIndent=ge),nn},token:function(ge,nn){if(!nn.tagName&&ge.sol()&&(nn.indented=ge.indentation()),ge.eatSpace())return null;Vt=null;var qe=nn.tokenize(ge,nn);return(qe||Vt)&&qe!="comment"&&(De=null,nn.state=nn.state(Vt||qe,ge,nn),De&&(qe=De=="error"?qe+" error":De)),qe},indent:function(ge,nn,qe){var En=ge.context;if(ge.tokenize.isInAttribute)return ge.tagStart==ge.indented?ge.stringStartCol+1:ge.indented+Ht;if(En&&En.noIndent)return Pt.Pass;if(ge.tokenize!=be&&ge.tokenize!=Jt)return qe?qe.match(/^(\s*)/)[0].length:0;if(ge.tagName)return ne.multilineTagIndentPastTag!==!1?ge.tagStart+ge.tagName.length+2:ge.tagStart+Ht*(ne.multilineTagIndentFactor||1);if(ne.alignCDATA&&/<!\[CDATA\[/.test(nn))return 0;var Tn=nn&&/^<(\/)?([\w_:\.-]*)/.exec(nn);if(Tn&&Tn[1])for(;En;)if(En.tagName==Tn[2]){En=En.prev;break}else if(ne.implicitlyClosed.hasOwnProperty(En.tagName))En=En.prev;else break;else if(Tn)for(;En;){var bn=ne.contextGrabbers[En.tagName];if(bn&&bn.hasOwnProperty(Tn[2]))En=En.prev;else break}for(;En&&En.prev&&!En.startOfLine;)En=En.prev;return En?En.indent+Ht:ge.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:ne.htmlMode?"html":"xml",helperType:ne.htmlMode?"html":"xml",skipAttribute:function(ge){ge.state==$t&&(ge.state=Wt)},xmlCurrentTag:function(ge){return ge.tagName?{name:ge.tagName,close:ge.type=="closeTag"}:null},xmlCurrentContext:function(ge){for(var nn=[],qe=ge.context;qe;qe=qe.prev)qe.tagName&&nn.push(qe.tagName);return nn.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(Cn,We,Qt){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.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=Qt(59301),Be=De(Ae),de=Qt(12708),Ht=De(de),ne=Qt(53291),ue=De(ne),ce=Qt(47242),Vt=Qt(65429);function De(et){return et&&et.__esModule?et:{default:et}}function Jt(et,At){if(!(et instanceof At))throw new TypeError("Cannot call a class as a function")}function be(et,At){if(!et)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return At&&(typeof At=="object"||typeof At=="function")?At:et}function It(et,At){if(typeof At!="function"&&At!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof At);et.prototype=Object.create(At&&At.prototype,{constructor:{value:et,enumerable:!1,writable:!0,configurable:!0}}),At&&(Object.setPrototypeOf?Object.setPrototypeOf(et,At):et.__proto__=At)}var nt=function(et){It(At,et);function At(at){Jt(this,At);var ct=be(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,bt=pt.onChartReady,Rt=ct.renderEchartDom();ct.bindEvents(Rt,xt||{}),typeof bt=="function"&&ct.props.onChartReady(Rt),ct.echartsElement&&(0,ce.bind)(ct.echartsElement,function(){try{Rt.resize()}catch(Ot){console.warn(Ot)}})},ct.bindEvents=function(pt,xt){var bt=function(Wt,Zt){typeof Wt=="string"&&typeof Zt=="function"&&pt.on(Wt,function($t){Zt($t,pt)})};for(var Rt in xt)Object.prototype.hasOwnProperty.call(xt,Rt)&&bt(Rt,xt[Rt])},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,Vt.pick)(this.props,pt),(0,Vt.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(bt){console.warn(bt)}}}}},{key:"componentWillUnmount",value:function(){this.dispose()}},{key:"render",value:function(){var ct=this,pt=this.props,xt=pt.style,bt=pt.className,Rt=Pt({height:300},xt);return Be.default.createElement("div",{ref:function(Wt){ct.echartsElement=Wt},style:Rt,className:"echarts-for-react "+bt})}}]),At}(Ae.Component);We.default=nt,nt.propTypes={option:Ht.default.object.isRequired,echarts:Ht.default.object,notMerge:Ht.default.bool,lazyUpdate:Ht.default.bool,style:Ht.default.object,className:Ht.default.string,theme:Ht.default.oneOfType([Ht.default.string,Ht.default.object]),onChartReady:Ht.default.func,showLoading:Ht.default.bool,loadingOption:Ht.default.object,onEvents:Ht.default.object,opts:Ht.default.shape({devicePixelRatio:Ht.default.number,renderer:Ht.default.oneOf(["canvas","svg"]),width:Ht.default.oneOfType([Ht.default.number,Ht.default.oneOf([null,void 0,"auto"])]),height:Ht.default.oneOfType([Ht.default.number,Ht.default.oneOf([null,void 0,"auto"])])}),shouldSetOption:Ht.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(Cn,We,Qt){"use strict";var Pt;Pt={value:!0},We.Z=void 0;var te=Qt(76411),Ae=Ht(te),Be=Qt(97774),de=Ht(Be);function Ht(De){return De&&De.__esModule?De:{default:De}}function ne(De,Jt){if(!(De instanceof Jt))throw new TypeError("Cannot call a class as a function")}function ue(De,Jt){if(!De)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Jt&&(typeof Jt=="object"||typeof Jt=="function")?Jt:De}function ce(De,Jt){if(typeof Jt!="function"&&Jt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Jt);De.prototype=Object.create(Jt&&Jt.prototype,{constructor:{value:De,enumerable:!1,writable:!0,configurable:!0}}),Jt&&(Object.setPrototypeOf?Object.setPrototypeOf(De,Jt):De.__proto__=Jt)}var Vt=function(De){ce(Jt,De);function Jt(be){ne(this,Jt);var It=ue(this,(Jt.__proto__||Object.getPrototypeOf(Jt)).call(this,be));return It.echartsLib=Ae.default,It}return Jt}(de.default);We.Z=Vt},65429:function(Cn,We){"use strict";Object.defineProperty(We,"__esModule",{value:!0});var Qt=We.pick=function(te,Ae){var Be={};return Ae.forEach(function(de){Be[de]=te[de]}),Be}},86204:function(Cn){"use strict";var We=typeof Reflect=="object"?Reflect:null,Qt=We&&typeof We.apply=="function"?We.apply:function(pt,xt,bt){return Function.prototype.apply.call(pt,xt,bt)},Pt;We&&typeof We.ownKeys=="function"?Pt=We.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 Be(){Be.init.call(this)}Cn.exports=Be,Cn.exports.once=et,Be.EventEmitter=Be,Be.prototype._events=void 0,Be.prototype._eventsCount=0,Be.prototype._maxListeners=void 0;var de=10;function Ht(ct){if(typeof ct!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof ct)}Object.defineProperty(Be,"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}}),Be.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},Be.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?Be.defaultMaxListeners:ct._maxListeners}Be.prototype.getMaxListeners=function(){return ne(this)},Be.prototype.emit=function(pt){for(var xt=[],bt=1;bt<arguments.length;bt++)xt.push(arguments[bt]);var Rt=pt==="error",Ot=this._events;if(Ot!==void 0)Rt=Rt&&Ot.error===void 0;else if(!Rt)return!1;if(Rt){var Wt;if(xt.length>0&&(Wt=xt[0]),Wt instanceof Error)throw Wt;var Zt=new Error("Unhandled error."+(Wt?" ("+Wt.message+")":""));throw Zt.context=Wt,Zt}var $t=Ot[pt];if($t===void 0)return!1;if(typeof $t=="function")Qt($t,this,xt);else for(var Ce=$t.length,ge=be($t,Ce),bt=0;bt<Ce;++bt)Qt(ge[bt],this,xt);return!0};function ue(ct,pt,xt,bt){var Rt,Ot,Wt;if(Ht(xt),Ot=ct._events,Ot===void 0?(Ot=ct._events=Object.create(null),ct._eventsCount=0):(Ot.newListener!==void 0&&(ct.emit("newListener",pt,xt.listener?xt.listener:xt),Ot=ct._events),Wt=Ot[pt]),Wt===void 0)Wt=Ot[pt]=xt,++ct._eventsCount;else if(typeof Wt=="function"?Wt=Ot[pt]=bt?[xt,Wt]:[Wt,xt]:bt?Wt.unshift(xt):Wt.push(xt),Rt=ne(ct),Rt>0&&Wt.length>Rt&&!Wt.warned){Wt.warned=!0;var Zt=new Error("Possible EventEmitter memory leak detected. "+Wt.length+" "+String(pt)+" listeners added. Use emitter.setMaxListeners() to increase limit");Zt.name="MaxListenersExceededWarning",Zt.emitter=ct,Zt.type=pt,Zt.count=Wt.length,te(Zt)}return ct}Be.prototype.addListener=function(pt,xt){return ue(this,pt,xt,!1)},Be.prototype.on=Be.prototype.addListener,Be.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 Vt(ct,pt,xt){var bt={fired:!1,wrapFn:void 0,target:ct,type:pt,listener:xt},Rt=ce.bind(bt);return Rt.listener=xt,bt.wrapFn=Rt,Rt}Be.prototype.once=function(pt,xt){return Ht(xt),this.on(pt,Vt(this,pt,xt)),this},Be.prototype.prependOnceListener=function(pt,xt){return Ht(xt),this.prependListener(pt,Vt(this,pt,xt)),this},Be.prototype.removeListener=function(pt,xt){var bt,Rt,Ot,Wt,Zt;if(Ht(xt),Rt=this._events,Rt===void 0)return this;if(bt=Rt[pt],bt===void 0)return this;if(bt===xt||bt.listener===xt)--this._eventsCount===0?this._events=Object.create(null):(delete Rt[pt],Rt.removeListener&&this.emit("removeListener",pt,bt.listener||xt));else if(typeof bt!="function"){for(Ot=-1,Wt=bt.length-1;Wt>=0;Wt--)if(bt[Wt]===xt||bt[Wt].listener===xt){Zt=bt[Wt].listener,Ot=Wt;break}if(Ot<0)return this;Ot===0?bt.shift():It(bt,Ot),bt.length===1&&(Rt[pt]=bt[0]),Rt.removeListener!==void 0&&this.emit("removeListener",pt,Zt||xt)}return this},Be.prototype.off=Be.prototype.removeListener,Be.prototype.removeAllListeners=function(pt){var xt,bt,Rt;if(bt=this._events,bt===void 0)return this;if(bt.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):bt[pt]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete bt[pt]),this;if(arguments.length===0){var Ot=Object.keys(bt),Wt;for(Rt=0;Rt<Ot.length;++Rt)Wt=Ot[Rt],Wt!=="removeListener"&&this.removeAllListeners(Wt);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(xt=bt[pt],typeof xt=="function")this.removeListener(pt,xt);else if(xt!==void 0)for(Rt=xt.length-1;Rt>=0;Rt--)this.removeListener(pt,xt[Rt]);return this};function De(ct,pt,xt){var bt=ct._events;if(bt===void 0)return[];var Rt=bt[pt];return Rt===void 0?[]:typeof Rt=="function"?xt?[Rt.listener||Rt]:[Rt]:xt?nt(Rt):be(Rt,Rt.length)}Be.prototype.listeners=function(pt){return De(this,pt,!0)},Be.prototype.rawListeners=function(pt){return De(this,pt,!1)},Be.listenerCount=function(ct,pt){return typeof ct.listenerCount=="function"?ct.listenerCount(pt):Jt.call(ct,pt)},Be.prototype.listenerCount=Jt;function Jt(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}Be.prototype.eventNames=function(){return this._eventsCount>0?Pt(this._events):[]};function be(ct,pt){for(var xt=new Array(pt),bt=0;bt<pt;++bt)xt[bt]=ct[bt];return xt}function It(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,bt){function Rt(Wt){ct.removeListener(pt,Ot),bt(Wt)}function Ot(){typeof ct.removeListener=="function"&&ct.removeListener("error",Rt),xt([].slice.call(arguments))}at(ct,pt,Ot,{once:!0}),pt!=="error"&&At(ct,Rt,{once:!0})})}function At(ct,pt,xt){typeof ct.on=="function"&&at(ct,"error",pt,xt)}function at(ct,pt,xt,bt){if(typeof ct.on=="function")bt.once?ct.once(pt,xt):ct.on(pt,xt);else if(typeof ct.addEventListener=="function")ct.addEventListener(pt,function Rt(Ot){bt.once&&ct.removeEventListener(pt,Rt),xt(Ot)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof ct)}},53291:function(Cn){"use strict";var We=Array.isArray,Qt=Object.keys,Pt=Object.prototype.hasOwnProperty;Cn.exports=function te(Ae,Be){if(Ae===Be)return!0;if(Ae&&Be&&typeof Ae=="object"&&typeof Be=="object"){var de=We(Ae),Ht=We(Be),ne,ue,ce;if(de&&Ht){if(ue=Ae.length,ue!=Be.length)return!1;for(ne=ue;ne--!==0;)if(!te(Ae[ne],Be[ne]))return!1;return!0}if(de!=Ht)return!1;var Vt=Ae instanceof Date,De=Be instanceof Date;if(Vt!=De)return!1;if(Vt&&De)return Ae.getTime()==Be.getTime();var Jt=Ae instanceof RegExp,be=Be instanceof RegExp;if(Jt!=be)return!1;if(Jt&&be)return Ae.toString()==Be.toString();var It=Qt(Ae);if(ue=It.length,ue!==Qt(Be).length)return!1;for(ne=ue;ne--!==0;)if(!Pt.call(Be,It[ne]))return!1;for(ne=ue;ne--!==0;)if(ce=It[ne],!te(Ae[ce],Be[ce]))return!1;return!0}return Ae!==Ae&&Be!==Be}},6330:function(Cn,We,Qt){"use strict";Qt.d(We,{HT:function(){return xe},iZ:function(){return _e}});var Pt={},te=function(oe,ae,ee,je,Se){var An=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 An.onmessage=function(Nn){var Vn=Nn.data,Qi=Vn.$e$;if(Qi){var Si=new Error(Qi[0]);Si.code=Qi[1],Si.stack=Qi[2],Se(Si,null)}else Se(null,Vn)},An.postMessage(ee,je),An},Ae=Uint8Array,Be=Uint16Array,de=Int32Array,Ht=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 Be(31),je=0;je<31;++je)ee[je]=ae+=1<<oe[je-1];for(var Se=new de(ee[30]),je=1;je<30;++je)for(var An=ee[je];An<ee[je+1];++An)Se[An]=An-ee[je]<<5|je;return{b:ee,r:Se}},Vt=ce(Ht,2),De=Vt.b,Jt=Vt.r;De[28]=258,Jt[258]=28;for(var be=ce(ne,0),It=be.b,nt=be.r,et=new Be(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 je=oe.length,Se=0,An=new Be(ae);Se<je;++Se)oe[Se]&&++An[oe[Se]-1];var Nn=new Be(ae);for(Se=1;Se<ae;++Se)Nn[Se]=Nn[Se-1]+An[Se-1]<<1;var Vn;if(ee){Vn=new Be(1<<ae);var Qi=15-ae;for(Se=0;Se<je;++Se)if(oe[Se])for(var Si=Se<<4|oe[Se],Ne=ae-oe[Se],wi=Nn[oe[Se]-1]++<<Ne,ke=wi|(1<<Ne)-1;wi<=ke;++wi)Vn[et[wi]>>Qi]=Si}else for(Vn=new Be(je),Se=0;Se<je;++Se)oe[Se]&&(Vn[Se]=et[Nn[oe[Se]-1]++]>>15-oe[Se]);return Vn},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 bt=ct(pt,9,0),Rt=ct(pt,9,1),Ot=ct(xt,5,0),Wt=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 je=ae/8|0;return(oe[je]|oe[je+1]<<8)>>(ae&7)&ee},Ce=function(oe,ae){var ee=ae/8|0;return(oe[ee]|oe[ee+1]<<8|oe[ee+2]<<16)>>(ae&7)},ge=function(oe){return(oe+7)/8|0},nn=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))},qe={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},En=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Tn=function(oe,ae,ee){var je=new Error(ae||En[oe]);if(je.code=oe,Error.captureStackTrace&&Error.captureStackTrace(je,Tn),!ee)throw je;return je},bn=function(oe,ae,ee,je){var Se=oe.length,An=je?je.length:0;if(!Se||ae.f&&!ae.l)return ee||new Ae(0);var Nn=!ee,Vn=Nn||ae.i!=2,Qi=ae.i;Nn&&(ee=new Ae(Se*3));var Si=function(Jr){var Nr=ee.length;if(Jr>Nr){var co=new Ae(Math.max(Nr*2,Jr));co.set(ee),ee=co}},Ne=ae.f||0,wi=ae.p||0,ke=ae.b||0,hn=ae.l,Qe=ae.d,Ut=ae.m,pn=ae.n,fn=Se*8;do{if(!hn){Ne=$t(oe,wi,1);var Qn=$t(oe,wi+1,3);if(wi+=3,Qn)if(Qn==1)hn=Rt,Qe=Wt,Ut=9,pn=5;else if(Qn==2){var tn=$t(oe,wi,31)+257,gn=$t(oe,wi+10,15)+4,mn=tn+$t(oe,wi+5,31)+1;wi+=14;for(var xn=new Ae(mn),hi=new Ae(19),zn=0;zn<gn;++zn)hi[ue[zn]]=$t(oe,wi+zn*3,7);wi+=gn*3;for(var Xn=Zt(hi),cn=(1<<Xn)-1,ti=ct(hi,Xn,1),zn=0;zn<mn;){var Di=ti[$t(oe,wi,cn)];wi+=Di&15;var Gn=Di>>4;if(Gn<16)xn[zn++]=Gn;else{var ir=0,Ji=0;for(Gn==16?(Ji=3+$t(oe,wi,3),wi+=2,ir=xn[zn-1]):Gn==17?(Ji=3+$t(oe,wi,7),wi+=3):Gn==18&&(Ji=11+$t(oe,wi,127),wi+=7);Ji--;)xn[zn++]=ir}}var fr=xn.subarray(0,tn),dr=xn.subarray(tn);Ut=Zt(fr),pn=Zt(dr),hn=ct(fr,Ut,1),Qe=ct(dr,pn,1)}else Tn(1);else{var Gn=ge(wi)+4,jn=oe[Gn-4]|oe[Gn-3]<<8,dn=Gn+jn;if(dn>Se){Qi&&Tn(0);break}Vn&&Si(ke+jn),ee.set(oe.subarray(Gn,dn),ke),ae.b=ke+=jn,ae.p=wi=dn*8,ae.f=Ne;continue}if(wi>fn){Qi&&Tn(0);break}}Vn&&Si(ke+131072);for(var Er=(1<<Ut)-1,Gr=(1<<pn)-1,Tr=wi;;Tr=wi){var ir=hn[Ce(oe,wi)&Er],oo=ir>>4;if(wi+=ir&15,wi>fn){Qi&&Tn(0);break}if(ir||Tn(2),oo<256)ee[ke++]=oo;else if(oo==256){Tr=wi,hn=null;break}else{var He=oo-254;if(oo>264){var zn=oo-257,gr=Ht[zn];He=$t(oe,wi,(1<<gr)-1)+De[zn],wi+=gr}var Dr=Qe[Ce(oe,wi)&Gr],nr=Dr>>4;Dr||Tn(3),wi+=Dr&15;var dr=It[nr];if(nr>3){var gr=ne[nr];dr+=Ce(oe,wi)&(1<<gr)-1,wi+=gr}if(wi>fn){Qi&&Tn(0);break}Vn&&Si(ke+131072);var Qr=ke+He;if(ke<dr){var ar=An-dr,vo=Math.min(dr,Qr);for(ar+ke<0&&Tn(3);ke<vo;++ke)ee[ke]=je[ar+ke]}for(;ke<Qr;++ke)ee[ke]=ee[ke-dr]}}ae.l=hn,ae.p=Tr,ae.b=ke,ae.f=Ne,hn&&(Ne=1,ae.m=Ut,ae.d=Qe,ae.n=pn)}while(!Ne);return ke!=ee.length&&Nn?nn(ee,0,ke):ee.subarray(0,ke)},ni=function(oe,ae,ee){ee<<=ae&7;var je=ae/8|0;oe[je]|=ee,oe[je+1]|=ee>>8},In=function(oe,ae,ee){ee<<=ae&7;var je=ae/8|0;oe[je]|=ee,oe[je+1]|=ee>>8,oe[je+2]|=ee>>16},Ee=function(oe,ae){for(var ee=[],je=0;je<oe.length;++je)oe[je]&&ee.push({s:je,f:oe[je]});var Se=ee.length,An=ee.slice();if(!Se)return{t:si,l:0};if(Se==1){var Nn=new Ae(ee[0].s+1);return Nn[ee[0].s]=1,{t:Nn,l:1}}ee.sort(function(dn,tn){return dn.f-tn.f}),ee.push({s:-1,f:25001});var Vn=ee[0],Qi=ee[1],Si=0,Ne=1,wi=2;for(ee[0]={s:-1,f:Vn.f+Qi.f,l:Vn,r:Qi};Ne!=Se-1;)Vn=ee[ee[Si].f<ee[wi].f?Si++:wi++],Qi=ee[Si!=Ne&&ee[Si].f<ee[wi].f?Si++:wi++],ee[Ne++]={s:-1,f:Vn.f+Qi.f,l:Vn,r:Qi};for(var ke=An[0].s,je=1;je<Se;++je)An[je].s>ke&&(ke=An[je].s);var hn=new Be(ke+1),Qe=ie(ee[Ne-1],hn,0);if(Qe>ae){var je=0,Ut=0,pn=Qe-ae,fn=1<<pn;for(An.sort(function(tn,gn){return hn[gn.s]-hn[tn.s]||tn.f-gn.f});je<Se;++je){var Qn=An[je].s;if(hn[Qn]>ae)Ut+=fn-(1<<Qe-hn[Qn]),hn[Qn]=ae;else break}for(Ut>>=pn;Ut>0;){var Gn=An[je].s;hn[Gn]<ae?Ut-=1<<ae-hn[Gn]++-1:++je}for(;je>=0&&Ut;--je){var jn=An[je].s;hn[jn]==ae&&(--hn[jn],++Ut)}Qe=ae}return{t:new Ae(hn),l:Qe}},ie=function(oe,ae,ee){return oe.s==-1?Math.max(ie(oe.l,ae,ee+1),ie(oe.r,ae,ee+1)):ae[oe.s]=ee},Pn=function(oe){for(var ae=oe.length;ae&&!oe[--ae];);for(var ee=new Be(++ae),je=0,Se=oe[0],An=1,Nn=function(Qi){ee[je++]=Qi},Vn=1;Vn<=ae;++Vn)if(oe[Vn]==Se&&Vn!=ae)++An;else{if(!Se&&An>2){for(;An>138;An-=138)Nn(32754);An>2&&(Nn(An>10?An-11<<5|28690:An-3<<5|12305),An=0)}else if(An>3){for(Nn(Se),--An;An>6;An-=6)Nn(8304);An>2&&(Nn(An-3<<5|8208),An=0)}for(;An--;)Nn(Se);An=1,Se=oe[Vn]}return{c:ee.subarray(0,je),n:ae}},pi=function(oe,ae){for(var ee=0,je=0;je<ae.length;++je)ee+=oe[je]*ae[je];return ee},Wn=function(oe,ae,ee){var je=ee.length,Se=ge(ae+2);oe[Se]=je&255,oe[Se+1]=je>>8,oe[Se+2]=oe[Se]^255,oe[Se+3]=oe[Se+1]^255;for(var An=0;An<je;++An)oe[Se+An+4]=ee[An];return(Se+4+je)*8},un=function(oe,ae,ee,je,Se,An,Nn,Vn,Qi,Si,Ne){ni(ae,Ne++,ee),++Se[256];for(var wi=Ee(Se,15),ke=wi.t,hn=wi.l,Qe=Ee(An,15),Ut=Qe.t,pn=Qe.l,fn=Pn(ke),Qn=fn.c,Gn=fn.n,jn=Pn(Ut),dn=jn.c,tn=jn.n,gn=new Be(19),mn=0;mn<Qn.length;++mn)++gn[Qn[mn]&31];for(var mn=0;mn<dn.length;++mn)++gn[dn[mn]&31];for(var xn=Ee(gn,7),hi=xn.t,zn=xn.l,Xn=19;Xn>4&&!hi[ue[Xn-1]];--Xn);var cn=Si+5<<3,ti=pi(Se,pt)+pi(An,xt)+Nn,Di=pi(Se,ke)+pi(An,Ut)+Nn+14+3*Xn+pi(gn,hi)+2*gn[16]+3*gn[17]+7*gn[18];if(Qi>=0&&cn<=ti&&cn<=Di)return Wn(ae,Ne,oe.subarray(Qi,Qi+Si));var ir,Ji,fr,dr;if(ni(ae,Ne,1+(Di<ti)),Ne+=2,Di<ti){ir=ct(ke,hn,0),Ji=ke,fr=ct(Ut,pn,0),dr=Ut;var Er=ct(hi,zn,0);ni(ae,Ne,Gn-257),ni(ae,Ne+5,tn-1),ni(ae,Ne+10,Xn-4),Ne+=14;for(var mn=0;mn<Xn;++mn)ni(ae,Ne+3*mn,hi[ue[mn]]);Ne+=3*Xn;for(var Gr=[Qn,dn],Tr=0;Tr<2;++Tr)for(var oo=Gr[Tr],mn=0;mn<oo.length;++mn){var He=oo[mn]&31;ni(ae,Ne,Er[He]),Ne+=hi[He],He>15&&(ni(ae,Ne,oo[mn]>>5&127),Ne+=oo[mn]>>12)}}else ir=bt,Ji=pt,fr=Ot,dr=xt;for(var mn=0;mn<Vn;++mn){var gr=je[mn];if(gr>255){var He=gr>>18&31;In(ae,Ne,ir[He+257]),Ne+=Ji[He+257],He>7&&(ni(ae,Ne,gr>>23&31),Ne+=Ht[He]);var Dr=gr&31;In(ae,Ne,fr[Dr]),Ne+=dr[Dr],Dr>3&&(In(ae,Ne,gr>>5&8191),Ne+=ne[Dr])}else In(ae,Ne,ir[gr]),Ne+=Ji[gr]}return In(ae,Ne,ir[256]),Ne+Ji[256]},Zn=new de([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),si=new Ae(0),Oi=function(oe,ae,ee,je,Se,An){var Nn=An.z||oe.length,Vn=new Ae(je+Nn+5*(1+Math.ceil(Nn/7e3))+Se),Qi=Vn.subarray(je,Vn.length-Se),Si=An.l,Ne=(An.r||0)&7;if(ae){Ne&&(Qi[0]=An.r>>3);for(var wi=Zn[ae-1],ke=wi>>13,hn=wi&8191,Qe=(1<<ee)-1,Ut=An.p||new Be(32768),pn=An.h||new Be(Qe+1),fn=Math.ceil(ee/3),Qn=2*fn,Gn=function(ks){return(oe[ks]^oe[ks+1]<<fn^oe[ks+2]<<Qn)&Qe},jn=new de(25e3),dn=new Be(288),tn=new Be(32),gn=0,mn=0,xn=An.i||0,hi=0,zn=An.w||0,Xn=0;xn+2<Nn;++xn){var cn=Gn(xn),ti=xn&32767,Di=pn[cn];if(Ut[ti]=Di,pn[cn]=ti,zn<=xn){var ir=Nn-xn;if((gn>7e3||hi>24576)&&(ir>423||!Si)){Ne=un(oe,Qi,0,jn,dn,tn,mn,hi,Xn,xn-Xn,Ne),hi=gn=mn=0,Xn=xn;for(var Ji=0;Ji<286;++Ji)dn[Ji]=0;for(var Ji=0;Ji<30;++Ji)tn[Ji]=0}var fr=2,dr=0,Er=hn,Gr=ti-Di&32767;if(ir>2&&cn==Gn(xn-Gr))for(var Tr=Math.min(ke,ir)-1,oo=Math.min(32767,xn),He=Math.min(258,ir);Gr<=oo&&--Er&&ti!=Di;){if(oe[xn+fr]==oe[xn+fr-Gr]){for(var gr=0;gr<He&&oe[xn+gr]==oe[xn+gr-Gr];++gr);if(gr>fr){if(fr=gr,dr=Gr,gr>Tr)break;for(var Dr=Math.min(Gr,gr-2),nr=0,Ji=0;Ji<Dr;++Ji){var Qr=xn-Gr+Ji&32767,ar=Ut[Qr],vo=Qr-ar&32767;vo>nr&&(nr=vo,Di=Qr)}}}ti=Di,Di=Ut[ti],Gr+=ti-Di&32767}if(dr){jn[hi++]=268435456|Jt[fr]<<18|nt[dr];var Jr=Jt[fr]&31,Nr=nt[dr]&31;mn+=Ht[Jr]+ne[Nr],++dn[257+Jr],++tn[Nr],zn=xn+fr,++gn}else jn[hi++]=oe[xn],++dn[oe[xn]]}}for(xn=Math.max(xn,zn);xn<Nn;++xn)jn[hi++]=oe[xn],++dn[oe[xn]];Ne=un(oe,Qi,Si,jn,dn,tn,mn,hi,Xn,xn-Xn,Ne),Si||(An.r=Ne&7|Qi[Ne/8|0]<<3,Ne-=7,An.h=pn,An.p=Ut,An.i=xn,An.w=zn)}else{for(var xn=An.w||0;xn<Nn+Si;xn+=65535){var co=xn+65535;co>=Nn&&(Qi[Ne/8|0]=Si,co=Nn),Ne=Wn(Qi,Ne+1,oe.subarray(xn,co))}An.i=Nn}return nn(Vn,0,je+ge(Ne)+Se)},on=null,ri=function(){var oe=-1;return{p:function(ae){for(var ee=oe,je=0;je<ae.length;++je)ee=on[ee&255^ae[je]]^ee>>>8;oe=ee},d:function(){return~oe}}},Le=function(){var oe=1,ae=0;return{p:function(ee){for(var je=oe,Se=ae,An=ee.length|0,Nn=0;Nn!=An;){for(var Vn=Math.min(Nn+2655,An);Nn<Vn;++Nn)Se+=je+=ee[Nn];je=(je&65535)+15*(je>>16),Se=(Se&65535)+15*(Se>>16)}oe=je,ae=Se},d:function(){return oe%=65521,ae%=65521,(oe&255)<<24|(oe&65280)<<8|(ae&255)<<8|ae>>8}}},fi=function(oe,ae,ee,je,Se){if(!Se&&(Se={l:1},ae.dictionary)){var An=ae.dictionary.subarray(-32768),Nn=new Ae(An.length+oe.length);Nn.set(An),Nn.set(oe,An.length),oe=Nn,Se.w=An.length}return Oi(oe,ae.level==null?6:ae.level,ae.mem==null?Se.l?Math.ceil(Math.max(8,Math.min(13,Math.log(oe.length)))*1.5):20:12+ae.mem,ee,je,Se)},Pi=function(oe,ae){var ee={};for(var je in oe)ee[je]=oe[je];for(var je in ae)ee[je]=ae[je];return ee},jt=function(oe,ae,ee){for(var je=oe(),Se=oe.toString(),An=Se.slice(Se.indexOf("[")+1,Se.lastIndexOf("]")).replace(/\s+/g,"").split(","),Nn=0;Nn<je.length;++Nn){var Vn=je[Nn],Qi=An[Nn];if(typeof Vn=="function"){ae+=";"+Qi+"=";var Si=Vn.toString();if(Vn.prototype)if(Si.indexOf("[native code]")!=-1){var Ne=Si.indexOf(" ",8)+1;ae+=Si.slice(Ne,Si.indexOf("(",Ne))}else{ae+=Si;for(var wi in Vn.prototype)ae+=";"+Qi+".prototype."+wi+"="+Vn.prototype[wi].toString()}else ae+=Si}else ee[Qi]=Vn}return ae},Mt=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,je){if(!Mt[ee]){for(var Se="",An={},Nn=oe.length-1,Vn=0;Vn<Nn;++Vn)Se=jt(oe[Vn],Se,An);Mt[ee]={c:jt(oe[Nn],Se,An),e:An}}var Qi=Pi({},Mt[ee].e);return te(Mt[ee].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+ae.toString()+"}",ee,Qi,mt(Qi),je)},Lt=function(){return[Ae,Be,de,Ht,ne,ue,De,It,Rt,Wt,et,En,ct,Zt,$t,Ce,ge,nn,Tn,bn,Zr,Fe,Te]},Bt=function(){return[Ae,Be,de,Ht,ne,ue,Jt,nt,bt,pt,Ot,xt,et,Zn,si,ct,ni,In,Ee,ie,Pn,pi,Wn,un,ge,nn,Oi,fi,Wr,Fe]},_t=function(){return[mi,ki,ci,ri,on]},Me=function(){return[Mi,yr]},ye=function(){return[Ri,ci,Le]},Ye=function(){return[Vi]},Fe=function(oe){return postMessage(oe,[oe.buffer])},Te=function(oe){return oe&&{out:oe.size&&new Ae(oe.size),dictionary:oe.dictionary}},Oe=function(oe,ae,ee,je,Se,An){var Nn=vt(ee,je,Se,function(Vn,Qi){Nn.terminate(),An(Vn,Qi)});return Nn.postMessage([oe,ae],ae.consume?[oe.buffer]:[]),function(){Nn.terminate()}},$e=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()}},yn=function(oe,ae,ee,je,Se,An,Nn){var Vn,Qi=vt(oe,je,Se,function(Si,Ne){Si?(Qi.terminate(),ae.ondata.call(ae,Si)):Array.isArray(Ne)?Ne.length==1?(ae.queuedSize-=Ne[0],ae.ondrain&&ae.ondrain(Ne[0])):(Ne[1]&&Qi.terminate(),ae.ondata.call(ae,Si,Ne[0],Ne[1])):Nn(Ne)});Qi.postMessage(ee),ae.queuedSize=0,ae.push=function(Si,Ne){ae.ondata||Tn(5),Vn&&ae.ondata(Tn(4,0,1),null,!!Ne),ae.queuedSize+=Si.length,Qi.postMessage([Si,Vn=Ne],[Si.buffer])},ae.terminate=function(){Qi.terminate()},An&&(ae.flush=function(){Qi.postMessage([])})},Kn=function(oe,ae){return oe[ae]|oe[ae+1]<<8},Sn=function(oe,ae){return(oe[ae]|oe[ae+1]<<8|oe[ae+2]<<16|oe[ae+3]<<24)>>>0},ui=function(oe,ae){return Sn(oe,ae)+Sn(oe,ae+4)*4294967296},ci=function(oe,ae,ee){for(;ee;++ae)oe[ae]=ee,ee>>>=8},mi=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&&ci(oe,4,Math.floor(new Date(ae.mtime||Date.now())/1e3)),ee){oe[3]=8;for(var je=0;je<=ee.length;++je)oe[je+10]=ee.charCodeAt(je)}},Mi=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 je=(ae>>3&1)+(ae>>4&1);je>0;je-=!oe[ee++]);return ee+(ae&2)},yr=function(oe){var ae=oe.length;return(oe[ae-4]|oe[ae-3]<<8|oe[ae-2]<<16|oe[ae-1]<<24)>>>0},ki=function(oe){return 10+(oe.filename?oe.filename.length+1:0)},Ri=function(oe,ae){var ee=ae.level,je=ee==0?0:ee<6?1:ee==9?3:2;if(oe[0]=120,oe[1]=je<<6|(ae.dictionary&&32),oe[1]|=31-(oe[0]<<8|oe[1])%31,ae.dictionary){var Se=Le();Se.p(ae.dictionary),ci(oe,2,Se.d())}},Vi=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 Or(oe,ae){return typeof oe=="function"&&(ae=oe,oe={}),this.ondata=ae,oe}var qi=null,Cr=null;function xr(oe,ae,ee){return ee||(ee=ae,ae={}),typeof ee!="function"&&Tn(7),Oe(oe,ae,[Bt],function(je){return Fe(Wr(je.data[0],je.data[1]))},0,ee)}function Wr(oe,ae){return fi(oe,ae||{},0,0)}var $i=null,eo=null;function fo(oe,ae,ee){return ee||(ee=ae,ae={}),typeof ee!="function"&&Tn(7),Oe(oe,ae,[Lt],function(je){return Fe(Zr(je.data[0],Te(je.data[1])))},1,ee)}function Zr(oe,ae){return bn(oe,{i:2},ae&&ae.out,ae&&ae.dictionary)}var Fr=null,ro=null;function Tt(oe,ae,ee){return ee||(ee=ae,ae={}),typeof ee!="function"&&Tn(7),Oe(oe,ae,[Bt,_t,function(){return[Gi]}],function(je){return Fe(Gi(je.data[0],je.data[1]))},2,ee)}function Gi(oe,ae){ae||(ae={});var ee=ri(),je=oe.length;ee.p(oe);var Se=fi(oe,ae,ki(ae),8),An=Se.length;return mi(Se,ae),ci(Se,An-8,ee.d()),ci(Se,An-4,je),Se}var Zi=null,Yr=null;function bo(oe,ae,ee){return ee||(ee=ae,ae={}),typeof ee!="function"&&Tn(7),Oe(oe,ae,[Lt,Me,function(){return[ko]}],function(je){return Fe(ko(je.data[0],je.data[1]))},3,ee)}function ko(oe,ae){var ee=Mi(oe);return ee+8>oe.length&&Tn(6,"invalid gzip data"),bn(oe.subarray(ee,-8),{i:2},ae&&ae.out||new Ae(yr(oe)),ae&&ae.dictionary)}var $o=null,Xi=null;function Ni(oe,ae,ee){return ee||(ee=ae,ae={}),typeof ee!="function"&&Tn(7),Oe(oe,ae,[Bt,ye,function(){return[_e]}],function(je){return Fe(_e(je.data[0],je.data[1]))},4,ee)}function _e(oe,ae){ae||(ae={});var ee=Le();ee.p(oe);var je=fi(oe,ae,ae.dictionary?6:2,4);return Ri(je,ae),ci(je,je.length-4,ee.d()),je}var Re=null,Ue=null;function gi(oe,ae,ee){return ee||(ee=ae,ae={}),typeof ee!="function"&&Tn(7),Oe(oe,ae,[Lt,Ye,function(){return[xe]}],function(je){return Fe(xe(je.data[0],Te(je.data[1])))},5,ee)}function xe(oe,ae){return bn(oe.subarray(Vi(oe,ae&&ae.dictionary),-4),{i:2},ae&&ae.out,ae&&ae.dictionary)}var Hi=null,Dn=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?bo(oe,ae,ee):(oe[0]&15)!=8||oe[0]>>4>7||(oe[0]<<8|oe[1])%31?fo(oe,ae,ee):gi(oe,ae,ee)}function Ve(oe,ae){return oe[0]==31&&oe[1]==139&&oe[2]==8?ko(oe,ae):(oe[0]&15)!=8||oe[0]>>4>7||(oe[0]<<8|oe[1])%31?Zr(oe,ae):xe(oe,ae)}var ze=function(oe,ae,ee,je){for(var Se in oe){var An=oe[Se],Nn=ae+Se,Vn=je;Array.isArray(An)&&(Vn=Pi(je,An[1]),An=An[0]),An instanceof Ae?ee[Nn]=[An,Vn]:(ee[Nn+="/"]=[new Ae(0),Vn],ze(An,Nn,ee,je))}},ai=typeof TextEncoder!="undefined"&&new TextEncoder,he=typeof TextDecoder!="undefined"&&new TextDecoder,an=0;try{he.decode(si,{stream:!0}),an=1}catch(oe){}var Yn=function(oe){for(var ae="",ee=0;;){var je=oe[ee++],Se=(je>127)+(je>223)+(je>239);if(ee+Se>oe.length)return{s:ae,r:nn(oe,ee-1)};Se?Se==3?(je=((je&15)<<18|(oe[ee++]&63)<<12|(oe[ee++]&63)<<6|oe[ee++]&63)-65536,ae+=String.fromCharCode(55296|je>>10,56320|je&1023)):Se&1?ae+=String.fromCharCode((je&31)<<6|oe[ee++]&63):ae+=String.fromCharCode((je&15)<<12|(oe[ee++]&63)<<6|oe[ee++]&63):ae+=String.fromCharCode(je)}},vi=null,ln=null;function qn(oe,ae){if(ae){for(var ee=new Ae(oe.length),je=0;je<oe.length;++je)ee[je]=oe.charCodeAt(je);return ee}if(ai)return ai.encode(oe);for(var Se=oe.length,An=new Ae(oe.length+(oe.length>>1)),Nn=0,Vn=function(Ne){An[Nn++]=Ne},je=0;je<Se;++je){if(Nn+5>An.length){var Qi=new Ae(Nn+8+(Se-je<<1));Qi.set(An),An=Qi}var Si=oe.charCodeAt(je);Si<128||ae?Vn(Si):Si<2048?(Vn(192|Si>>6),Vn(128|Si&63)):Si>55295&&Si<57344?(Si=65536+(Si&1047552)|oe.charCodeAt(++je)&1023,Vn(240|Si>>18),Vn(128|Si>>12&63),Vn(128|Si>>6&63),Vn(128|Si&63)):(Vn(224|Si>>12),Vn(128|Si>>6&63),Vn(128|Si&63))}return nn(An,0,Nn)}function li(oe,ae){if(ae){for(var ee="",je=0;je<oe.length;je+=16384)ee+=String.fromCharCode.apply(null,oe.subarray(je,je+16384));return ee}else{if(he)return he.decode(oe);var Se=Yn(oe),An=Se.s,ee=Se.r;return ee.length&&Tn(8),An}}var Xe=function(oe){return oe==1?3:oe<6?2:oe==9?1:0},sn=function(oe,ae){return ae+30+Kn(oe,ae+26)+Kn(oe,ae+28)},wn=function(oe,ae,ee){var je=Kn(oe,ae+28),Se=li(oe.subarray(ae+46,ae+46+je),!(Kn(oe,ae+8)&2048)),An=ae+46+je,Nn=Sn(oe,ae+20),Vn=ee&&Nn==4294967295?Mn(oe,An):[Nn,Sn(oe,ae+24),Sn(oe,ae+42)],Qi=Vn[0],Si=Vn[1],Ne=Vn[2];return[Kn(oe,ae+10),Qi,Si,Se,An+Kn(oe,ae+30)+Kn(oe,ae+32),Ne]},Mn=function(oe,ae){for(;Kn(oe,ae)!=1;ae+=4+Kn(oe,ae+2));return[ui(oe,ae+12),ui(oe,ae+4),ui(oe,ae+20)]},ii=function(oe){var ae=0;if(oe)for(var ee in oe){var je=oe[ee].length;je>65535&&Tn(9),ae+=je+4}return ae},_i=function(oe,ae,ee,je,Se,An,Nn,Vn){var Qi=je.length,Si=ee.extra,Ne=Vn&&Vn.length,wi=ii(Si);ci(oe,ae,Nn!=null?33639248:67324752),ae+=4,Nn!=null&&(oe[ae++]=20,oe[ae++]=ee.os),oe[ae]=20,ae+=2,oe[ae++]=ee.flag<<1|(An<0&&8),oe[ae++]=Se&&8,oe[ae++]=ee.compression&255,oe[ae++]=ee.compression>>8;var ke=new Date(ee.mtime==null?Date.now():ee.mtime),hn=ke.getFullYear()-1980;if((hn<0||hn>119)&&Tn(10),ci(oe,ae,hn<<25|ke.getMonth()+1<<21|ke.getDate()<<16|ke.getHours()<<11|ke.getMinutes()<<5|ke.getSeconds()>>1),ae+=4,An!=-1&&(ci(oe,ae,ee.crc),ci(oe,ae+4,An<0?-An-2:An),ci(oe,ae+8,ee.size)),ci(oe,ae+12,Qi),ci(oe,ae+14,wi),ae+=16,Nn!=null&&(ci(oe,ae,Ne),ci(oe,ae+6,ee.attrs),ci(oe,ae+10,Nn),ae+=14),oe.set(je,ae),ae+=Qi,wi)for(var Qe in Si){var Ut=Si[Qe],pn=Ut.length;ci(oe,ae,+Qe),ci(oe,ae+2,pn),oe.set(Ut,ae+4),ae+=4+pn}return Ne&&(oe.set(Vn,ae),ae+=Ne),ae},Ki=function(oe,ae,ee,je,Se){ci(oe,ae,101010256),ci(oe,ae+8,ee),ci(oe,ae+10,ee),ci(oe,ae+12,je),ci(oe,ae+16,Se)},Ti=null,en=null,Lr=null,cr=null;function Ur(oe,ae,ee){ee||(ee=ae,ae={}),typeof ee!="function"&&Tn(7);var je={};ze(oe,"",je,ae);var Se=Object.keys(je),An=Se.length,Nn=0,Vn=0,Qi=An,Si=new Array(An),Ne=[],wi=function(){for(var pn=0;pn<Ne.length;++pn)Ne[pn]()},ke=function(pn,fn){Ei(function(){ee(pn,fn)})};Ei(function(){ke=ee});var hn=function(){var pn=new Ae(Vn+22),fn=Nn,Qn=Vn-Nn;Vn=0;for(var Gn=0;Gn<Qi;++Gn){var jn=Si[Gn];try{var dn=jn.c.length;_i(pn,Vn,jn,jn.f,jn.u,dn);var tn=30+jn.f.length+ii(jn.extra),gn=Vn+tn;pn.set(jn.c,gn),_i(pn,Nn,jn,jn.f,jn.u,dn,Vn,jn.m),Nn+=16+tn+(jn.m?jn.m.length:0),Vn=gn+dn}catch(mn){return ke(mn,null)}}Ki(pn,Nn,Si.length,Qn,fn),ke(null,pn)};An||hn();for(var Qe=function(pn){var fn=Se[pn],Qn=je[fn],Gn=Qn[0],jn=Qn[1],dn=ri(),tn=Gn.length;dn.p(Gn);var gn=qn(fn),mn=gn.length,xn=jn.comment,hi=xn&&qn(xn),zn=hi&&hi.length,Xn=ii(jn.extra),cn=jn.level==0?0:8,ti=function(Di,ir){if(Di)wi(),ke(Di,null);else{var Ji=ir.length;Si[pn]=Pi(jn,{size:tn,crc:dn.d(),c:ir,f:gn,m:hi,u:mn!=fn.length||hi&&xn.length!=zn,compression:cn}),Nn+=30+mn+Xn+Ji,Vn+=76+2*(mn+Xn)+(zn||0)+Ji,--An||hn()}};if(mn>65535&&ti(Tn(11,0,1),null),!cn)ti(null,Gn);else if(tn<16e4)try{ti(null,Wr(Gn,jn))}catch(Di){ti(Di,null)}else Ne.push(xr(Gn,jn,ti))},Ut=0;Ut<Qi;++Ut)Qe(Ut);return wi}function rn(oe,ae){ae||(ae={});var ee={},je=[];ze(oe,"",ee,ae);var Se=0,An=0;for(var Nn in ee){var Vn=ee[Nn],Qi=Vn[0],Si=Vn[1],Ne=Si.level==0?0:8,wi=qn(Nn),ke=wi.length,hn=Si.comment,Qe=hn&&qn(hn),Ut=Qe&&Qe.length,pn=ii(Si.extra);ke>65535&&Tn(11);var fn=Ne?Wr(Qi,Si):Qi,Qn=fn.length,Gn=ri();Gn.p(Qi),je.push(Pi(Si,{size:Qi.length,crc:Gn.d(),c:fn,f:wi,m:Qe,u:ke!=Nn.length||Qe&&hn.length!=Ut,o:Se,compression:Ne})),Se+=30+ke+pn+Qn,An+=76+2*(ke+pn)+(Ut||0)+Qn}for(var jn=new Ae(An+22),dn=Se,tn=An-Se,gn=0;gn<je.length;++gn){var wi=je[gn];_i(jn,wi.o,wi,wi.f,wi.u,wi.c.length);var mn=30+wi.f.length+ii(wi.extra);jn.set(wi.c,wi.o+mn),_i(jn,Se,wi,wi.f,wi.u,wi.c.length,wi.o,wi.m),Se+=16+mn+(wi.m?wi.m.length:0)}return Ki(jn,Se,je.length,tn,dn),jn}var oi=null,Ci=null,bi=null,xi=null,Ei=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(oe){oe()};function Yi(oe,ae,ee){ee||(ee=ae,ae={}),typeof ee!="function"&&Tn(7);var je=[],Se=function(){for(var pn=0;pn<je.length;++pn)je[pn]()},An={},Nn=function(pn,fn){Ei(function(){ee(pn,fn)})};Ei(function(){Nn=ee});for(var Vn=oe.length-22;Sn(oe,Vn)!=101010256;--Vn)if(!Vn||oe.length-Vn>65558)return Nn(Tn(13,0,1),null),Se;var Qi=Kn(oe,Vn+8);if(Qi){var Si=Qi,Ne=Sn(oe,Vn+16),wi=Ne==4294967295||Si==65535;if(wi){var ke=Sn(oe,Vn-12);wi=Sn(oe,ke)==101075792,wi&&(Si=Qi=Sn(oe,ke+32),Ne=Sn(oe,ke+48))}for(var hn=ae&&ae.filter,Qe=function(pn){var fn=wn(oe,Ne,wi),Qn=fn[0],Gn=fn[1],jn=fn[2],dn=fn[3],tn=fn[4],gn=fn[5],mn=sn(oe,gn);Ne=tn;var xn=function(zn,Xn){zn?(Se(),Nn(zn,null)):(Xn&&(An[dn]=Xn),--Qi||Nn(null,An))};if(!hn||hn({name:dn,size:Gn,originalSize:jn,compression:Qn}))if(!Qn)xn(null,nn(oe,mn,mn+Gn));else if(Qn==8){var hi=oe.subarray(mn,mn+Gn);if(jn<524288||Gn>.8*jn)try{xn(null,Zr(hi,{out:new Ae(jn)}))}catch(zn){xn(zn,null)}else je.push(fo(hi,{size:jn},xn))}else xn(Tn(14,"unknown compression type "+Qn,1),null);else xn(null,null)},Ut=0;Ut<Si;++Ut)Qe(Ut)}else Nn(null,{});return Se}function sr(oe,ae){for(var ee={},je=oe.length-22;Sn(oe,je)!=101010256;--je)(!je||oe.length-je>65558)&&Tn(13);var Se=Kn(oe,je+8);if(!Se)return{};var An=Sn(oe,je+16),Nn=An==4294967295||Se==65535;if(Nn){var Vn=Sn(oe,je-12);Nn=Sn(oe,Vn)==101075792,Nn&&(Se=Sn(oe,Vn+32),An=Sn(oe,Vn+48))}for(var Qi=ae&&ae.filter,Si=0;Si<Se;++Si){var Ne=wn(oe,An,Nn),wi=Ne[0],ke=Ne[1],hn=Ne[2],Qe=Ne[3],Ut=Ne[4],pn=Ne[5],fn=sn(oe,pn);An=Ut,(!Qi||Qi({name:Qe,size:ke,originalSize:hn,compression:wi}))&&(wi?wi==8?ee[Qe]=Zr(oe.subarray(fn,fn+ke),{out:new Ae(hn)}):Tn(14,"unknown compression type "+wi):ee[Qe]=nn(oe,fn,fn+ke))}return ee}},12378:function(Cn,We,Qt){"use strict";Qt.d(We,{$u:function(){return ce},BD:function(){return jt},E9:function(){return ue},FF:function(){return eo},FJ:function(){return pt},Hn:function(){return ct},KX:function(){return bt},NB:function(){return Fe},S0:function(){return Le},UL:function(){return Vt},Vk:function(){return at},Vm:function(){return Oe},YI:function(){return fi},ZA:function(){return Ae},Zt:function(){return De},al:function(){return Bt},bn:function(){return Lt},bx:function(){return Mt},g2:function(){return Pi},h1:function(){return $t},hD:function(){return Ri},l4:function(){return Ht},rU:function(){return Te},s_:function(){return mt},uz:function(){return Ye},z6:function(){return Jt}}),Cn=Qt.hmd(Cn),function(){var Tt;function Gi(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Zi(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Gi(a)}}function Yr(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var bo=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},ko;if(typeof Object.setPrototypeOf=="function")ko=Object.setPrototypeOf;else{var $o;t:{var Xi={a:!0},Ni={};try{Ni.__proto__=Xi,$o=Ni.a;break t}catch(a){}$o=!1}ko=$o?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var _e=ko;function Re(a,y){if(a.prototype=bo(y.prototype),a.prototype.constructor=a,_e)_e(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 Qt.g!="undefined"&&Qt.g!=null?Qt.g:self,gi=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},xe=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function Hi(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&&xe(x,a,{writable:!0,value:y})}}Hi("Object.assign",function(a){return a||gi}),Hi("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 Dn=typeof globalThis=="object"&&globalThis||typeof Qt.g=="object"&&Qt.g.global===Qt.g&&Qt.g||typeof self=="object"&&self.self===self&&self||{};Dn.requestAnimationFrame===void 0&&(Dn.setImmediate===void 0?Dn.requestAnimationFrame=function(a){Dn.setTimeout(a,0)}:Dn.requestAnimationFrame=Dn.setImmediate);function Ai(){}function Ve(a,y){var x=-1;return function(){var E=this,b=arguments;x!==-1&&Dn.clearTimeout(x),x=ze(function(){x=-1,a.apply(E,b)},y)}}function ze(a,y){return Dn.setTimeout(a,y)}function ai(a){return Dn.document.createElement(a)}function he(a){throw Error(a)}function an(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 Yn(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 vi(a){Dn.console&&Dn.console.log(a)}function ln(a){return typeof a=="object"&&a!==null}function qn(a){return Array.isArray(a)||Dn.NodeList&&a instanceof Dn.NodeList||Dn.HTMLCollection&&a instanceof Dn.HTMLCollection}function li(a){return Array.prototype.slice.call(a)}function Xe(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 sn(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 wn(){var a=Ur.pop();return a===void 0?[]:a}function Mn(a){a.length=0,Ur.push(a)}function ii(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(ln(a)&&a.constructor)return ii(a.constructor);return typeof a}function _i(a){var y=a;return ln(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 Ki(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 Lr=Dn.navigator!==void 0&&0<Dn.navigator.userAgent.indexOf("Trident/7"),cr=Dn.navigator!==void 0&&Dn.navigator.platform!==void 0&&Dn.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Ur=[];Object.freeze([]),Ai.className="Util",Ai.Dx="32ab5ff3b26f42dc0ed90f21472913b5",Ai.adym="gojs.net",Ai.vfo="28e645fdb266",Ai.className="Util";function rn(a,y,x){An(this),this.j=a,this.xa=y,this.o=x}rn.prototype.toString=function(){return"EnumValue."+this.xa};function oi(a,y){return y==null||y===""?null:a[y]}Ue.Object.defineProperties(rn.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),rn.className="EnumValue";function Ci(){this.ew=[]}Ci.prototype.toString=function(){return this.ew.join("")},Ci.prototype.add=function(a){a!==""&&this.ew.push(a)},Ci.className="StringBuilder";function bi(){}bi.className="PropertyCollection";var xi={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){Dn.console&&Dn.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 Ei(){}Ei.prototype.reset=function(){},Ei.prototype.next=function(){return!1},Ei.prototype.Ad=function(){return!1},Ei.prototype.first=function(){return null},Ei.prototype.any=function(){return!1},Ei.prototype.all=function(){return!0},Ei.prototype.each=function(){return this},Ei.prototype.map=function(){return this},Ei.prototype.filter=function(){return this},Ei.prototype.de=function(){},Ei.prototype.toString=function(){return"EmptyIterator"},Ue.Object.defineProperties(Ei.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Ei.prototype.first=Ei.prototype.first,Ei.prototype.hasNext=Ei.prototype.Ad,Ei.prototype.next=Ei.prototype.next,Ei.prototype.reset=Ei.prototype.reset;var Yi=null;Ei.className="EmptyIterator",Yi=new Ei;function sr(a){this.key=-1,this.value=a}sr.prototype.reset=function(){this.key=-1},sr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},sr.prototype.Ad=function(){return this.next()},sr.prototype.first=function(){return this.key=0,this.value},sr.prototype.any=function(a){return this.key=-1,a(this.value)},sr.prototype.all=function(a){return this.key=-1,a(this.value)},sr.prototype.each=function(a){return this.key=-1,a(this.value),this},sr.prototype.map=function(a){return new sr(a(this.value))},sr.prototype.filter=function(a){return a(this.value)?new sr(this.value):Yi},sr.prototype.de=function(){this.value=null},sr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Ue.Object.defineProperties(sr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),sr.prototype.first=sr.prototype.first,sr.prototype.hasNext=sr.prototype.Ad,sr.prototype.next=sr.prototype.next,sr.prototype.reset=sr.prototype.reset,sr.className="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){An(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)}Tt=ee.prototype,Tt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return this._isFrozen=!1,this},Tt.toString=function(){return"List()#"+Vn(this)},Tt.add=function(a){return a===null?this:(this._isFrozen&&an(this,a),this.s.push(a),this.xb(),this)},Tt.push=function(a){this.add(a)},Tt.addAll=function(a){if(a===null)return this;this._isFrozen&&an(this);var y=this.s;if(qn(a))for(var x=a.length,E=0;E<x;E++)y.push(a[E]);else for(a=a.iterator;a.next();)y.push(a.value);return this.xb(),this},Tt.clear=function(){this._isFrozen&&an(this),this.s.length=0,this.xb()},Tt.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},Tt.has=function(a){return this.contains(a)},Tt.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},Tt.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Yn(a,"0 <= i < length",ee,"elt:i"),y[a]},Tt.get=function(a){return this.M(a)},Tt.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Yn(a,"0 <= i < length",ee,"setElt:i"),this._isFrozen&&an(this,a),x[a]=y},Tt.set=function(a,y){this.cd(a,y)},Tt.first=function(){var a=this.s;return a.length===0?null:a[0]},Tt.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},Tt.pop=function(){this._isFrozen&&an(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},Tt=ee.prototype,Tt.Gb=function(a,y){0>a&&Yn(a,">= 0",ee,"insertAt:i"),this._isFrozen&&an(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},Tt.remove=function(a){if(a===null)return!1;this._isFrozen&&an(this,a);var y=this.s;return a=y.indexOf(a),a===-1?!1:(a===y.length-1?y.pop():y.splice(a,1),this.xb(),!0)},Tt.delete=function(a){return this.remove(a)},Tt.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Yn(a,"0 <= i < length",ee,"removeAt:i"),this._isFrozen&&an(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Tt.removeRange=function(a,y){var x=this.s,E=x.length;if(0>a)a=0;else if(a>=E)return this;if(0>y)return this;if(y>=E&&(y=E-1),a>y)return this;this._isFrozen&&an(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},Tt=ee.prototype,Tt.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),E=0;E<y;E++)x[E]=a[E];return x},Tt.Iv=function(){for(var a=new Se,y=this.s,x=this.count,E=0;E<x;E++)a.add(y[E]);return a},Tt.sort=function(a){return this._isFrozen&&an(this),this.s.sort(a),this.xb(),this},Tt.zi=function(a,y,x){var E=this.s,b=E.length;y===void 0&&(y=0),x===void 0&&(x=b),this._isFrozen&&an(this);var z=x-y;if(1>=z)return this;if((0>y||y>=b-1)&&Yn(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},Tt.reverse=function(){return this._isFrozen&&an(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 Yi;var a=this.Sa;return a!==null?(a.reset(),a):new oe(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Yi;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 je(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}je.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},je.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)},je.prototype.Ad=function(){return this.next()},je.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},je.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},je.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},je.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},je.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},je.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},je.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},je.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Ue.Object.defineProperties(je.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),je.prototype.first=je.prototype.first,je.prototype.hasNext=je.prototype.Ad,je.prototype.next=je.prototype.next,je.prototype.reset=je.prototype.reset,je.className="SetIterator";function Se(a){An(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&he("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Tt=Se.prototype,Tt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return this._isFrozen=!1,this},Tt.toString=function(){return"Set()#"+Vn(this)},Tt.add=function(a){if(a===null)return this;this._isFrozen&&an(this,a);var y=a;return ln(a)&&(y=Nn(a)),this.Tb[y]===void 0&&(this.Sb++,a=new ke(a,a),this.Tb[y]=a,y=this.kf,y===null?this.ea=a:(a.ll=y,y.va=a),this.kf=a,this.xb()),this},Tt.addAll=function(a){if(a===null)return this;if(this._isFrozen&&an(this),qn(a))for(var y=a.length,x=0;x<y;x++)this.add(a[x]);else for(a=a.iterator;a.next();)this.add(a.value);return this},Tt.contains=function(a){if(a===null)return!1;var y=a;return ln(a)&&(y=Vn(a),y===void 0)?!1:this.Tb[y]!==void 0},Tt.has=function(a){return this.contains(a)},Tt.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},Tt.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},Tt.first=function(){var a=this.ea;return a===null?null:a.value},Se.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Se.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Se.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},Se.prototype.map=function(a){for(var y=new Se,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},Se.prototype.filter=function(a){for(var y=new Se,x=this.ea;x!==null;){var E=x.value;a(E)&&y.add(E),x=x.va}return y},Tt=Se.prototype,Tt.remove=function(a){if(a===null)return!1;this._isFrozen&&an(this,a);var y=a;if(ln(a)&&(y=Vn(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,E=a.ll;return x!==null&&(x.ll=E),E!==null&&(E.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=E),delete this.Tb[y],this.Sb--,this.xb(),!0},Tt.delete=function(a){return this.remove(a)},Tt.hp=function(a){if(a===null)return this;if(this._isFrozen&&an(this),qn(a))for(var y=a.length,x=0;x<y;x++)this.remove(a[x]);else for(a=a.iterator;a.next();)this.remove(a.value);return this},Tt.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&an(this);var y=new Se;y.addAll(a),a=[];for(var x=this.iterator;x.next();){var E=x.value;y.contains(E)||a.push(E)}return this.hp(a),this},Tt.clear=function(){this._isFrozen&&an(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},Se.prototype.copy=function(){var a=new Se,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},Se.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},Se.prototype.Hv=function(){var a=new ee,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function An(a){a.__gohashid=Qi++}function Nn(a){var y=a.__gohashid;return y===void 0&&(y=Qi++,a.__gohashid=y),y}function Vn(a){return a.__gohashid}Ue.Object.defineProperties(Se.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return Yi;var a=this.Sa;return a!==null?(a.reset(),a):new je(this)}}}),Se.prototype.toList=Se.prototype.Hv,Se.prototype.toArray=Se.prototype.Fa,Se.prototype.clear=Se.prototype.clear,Se.prototype.retainAll=Se.prototype.pA,Se.prototype.removeAll=Se.prototype.hp,Se.prototype.delete=Se.prototype.delete,Se.prototype.remove=Se.prototype.remove,Se.prototype.first=Se.prototype.first,Se.prototype.containsAny=Se.prototype.Ty,Se.prototype.containsAll=Se.prototype.Sy,Se.prototype.has=Se.prototype.has,Se.prototype.contains=Se.prototype.contains,Se.prototype.addAll=Se.prototype.addAll,Se.prototype.add=Se.prototype.add,Se.prototype.thaw=Se.prototype.ka,Se.prototype.freeze=Se.prototype.freeze;var Qi=1;Se.className="Set",Se.uniqueHash=An,Se.hashIdUnique=Nn,Se.hashId=Vn;function Si(a){this.ma=a,this.qa=a.Ja,this.sa=null}Si.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},Si.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)},Si.prototype.Ad=function(){return this.next()},Si.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},Si.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},Si.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},Si.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},Si.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},Si.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},Si.prototype.de=function(){this.value=this.key=null,this.qa=-1},Si.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Ue.Object.defineProperties(Si.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Si.prototype.first=Si.prototype.first,Si.prototype.hasNext=Si.prototype.Ad,Si.prototype.next=Si.prototype.next,Si.prototype.reset=Si.prototype.reset,Si.className="MapKeySetIterator";function Ne(a){Se.call(this),An(this),this._isFrozen=!0,this.ma=a}Re(Ne,Se),Tt=Ne.prototype,Tt.freeze=function(){return this},Tt.ka=function(){return this},Tt.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Tt.add=function(){he("This Set is read-only: "+this.toString())},Tt.contains=function(a){return this.ma.contains(a)},Tt.has=function(a){return this.contains(a)},Tt.remove=function(){he("This Set is read-only: "+this.toString())},Tt.delete=function(a){return this.remove(a)},Tt.clear=function(){he("This Set is read-only: "+this.toString())},Tt.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Ne.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Ne.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Ne.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Ne.prototype.map=function(a){for(var y=new Se,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Ne.prototype.filter=function(a){for(var y=new Se,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},Ne.prototype.copy=function(){return new Ne(this.ma)},Ne.prototype.Iv=function(){var a=new Se,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Ne.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},Ne.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(Ne.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?Yi:new Si(this.ma)}}}),Ne.prototype.toList=Ne.prototype.Hv,Ne.prototype.toArray=Ne.prototype.Fa,Ne.prototype.toSet=Ne.prototype.Iv,Ne.prototype.first=Ne.prototype.first,Ne.prototype.clear=Ne.prototype.clear,Ne.prototype.delete=Ne.prototype.delete,Ne.prototype.remove=Ne.prototype.remove,Ne.prototype.has=Ne.prototype.has,Ne.prototype.contains=Ne.prototype.contains,Ne.prototype.add=Ne.prototype.add,Ne.prototype.thaw=Ne.prototype.ka,Ne.prototype.freeze=Ne.prototype.freeze,Ne.className="MapKeySet";function wi(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}wi.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},wi.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=y.value,this.key=y.key,!0):(this.de(),!1)},wi.prototype.Ad=function(){return this.next()},wi.prototype.first=function(){var a=this.ma;if(this.qa=a.Ja,a=a.ea,a!==null){this.sa=a;var y=a.value;return this.key=a.key,this.value=y}return null},wi.prototype.any=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},wi.prototype.all=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},wi.prototype.each=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;)a(y.value),y=y.va;return this},wi.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new ee;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},wi.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new ee;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},wi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},wi.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Ue.Object.defineProperties(wi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),wi.prototype.first=wi.prototype.first,wi.prototype.hasNext=wi.prototype.Ad,wi.prototype.next=wi.prototype.next,wi.prototype.reset=wi.prototype.reset,wi.className="MapValueSetIterator";function ke(a,y){this.key=a,this.value=y,this.ll=this.va=null}ke.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},ke.className="KeyValuePair";function hn(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}hn.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},hn.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)},hn.prototype.Ad=function(){return this.next()},hn.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},hn.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},hn.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},hn.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},hn.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},hn.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},hn.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},hn.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Ue.Object.defineProperties(hn.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),hn.prototype.first=hn.prototype.first,hn.prototype.hasNext=hn.prototype.Ad,hn.prototype.next=hn.prototype.next,hn.prototype.reset=hn.prototype.reset,hn.className="MapIterator";function Qe(a){An(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.jf=this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&he("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Tt=Qe.prototype,Tt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return this._isFrozen=!1,this},Tt.toString=function(){return"Map()#"+Vn(this)},Tt.add=function(a,y){this._isFrozen&&an(this,a);var x=a;ln(a)&&(x=Nn(a));var E=this.Tb[x];return E===void 0?(this.Sb++,a=new ke(a,y),this.Tb[x]=a,x=this.kf,x===null?this.ea=a:(a.ll=x,x.va=a),this.kf=a,this.xb()):E.value=y,this},Tt.set=function(a,y){return this.add(a,y)},Tt.addAll=function(a){if(a===null)return this;if(qn(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},Tt.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},Tt=Qe.prototype,Tt.contains=function(a){var y=a;return ln(a)&&(y=Vn(a),y===void 0)?!1:this.Tb[y]!==void 0},Tt.has=function(a){return this.contains(a)},Tt.I=function(a){var y=a;return ln(a)&&(y=Vn(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},Tt.get=function(a){return this.I(a)},Tt.remove=function(a){if(a===null)return!1;this._isFrozen&&an(this,a);var y=a;if(ln(a)&&(y=Vn(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,E=a.ll;return x!==null&&(x.ll=E),E!==null&&(E.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=E),delete this.Tb[y],this.Sb--,this.xb(),!0},Tt.delete=function(a){return this.remove(a)},Tt.clear=function(){this._isFrozen&&an(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 ke(b.key,b.value),x++}return y},Qe.prototype.Lf=function(){return new Ne(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 Yi;var a=this.Sa;return a!==null?(a.reset(),a):new hn(this)}},iteratorKeys:{get:function(){return 0>=this.count?Yi:new Si(this)}},iteratorValues:{get:function(){if(0>=this.count)return Yi;var a=this.jf;return a!==null?(a.reset(),a):new wi(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 Ut(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 pn,fn,Qn,Gn,jn;Ut.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Ut.prototype.h=function(a,y){return this.x=a,this.y=y,this},Ut.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Ut.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Ut.prototype.copy=function(){var a=new Ut;return a.x=this.x,a.y=this.y,a},Tt=Ut.prototype,Tt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Tt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return Object.isFrozen(this)&&he("cannot thaw constant: "+this),this._isFrozen=!1,this};function dn(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 Ut(x,b)}return new Ut}function tn(a){return a.x.toString()+" "+a.y.toString()}Tt.toString=function(){return"Point("+this.x+","+this.y+")"},Tt.D=function(a){return a instanceof Ut?this.x===a.x&&this.y===a.y:!1},Tt.hi=function(a,y){return this.x===a&&this.y===y},Tt.Xa=function(a){return we.B(this.x,a.x)&&we.B(this.y,a.y)},Tt.add=function(a){return this.x+=a.x,this.y+=a.y,this},Tt.re=function(a){return this.x-=a.x,this.y-=a.y,this},Tt.offset=function(a,y){return this.x+=a,this.y+=y,this},Ut.prototype.rotate=function(a){if(a===0)return this;var y=this.x,x=this.y;if(y===0&&x===0)return this;if(360<=a?a-=360:0>a&&(a+=360),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));return this.x=a*y-E*x,this.y=E*y+a*x,this},Tt=Ut.prototype,Tt.scale=function(a,y){return this.x*=a,this.y*=y,this},Tt.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},Tt.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},Tt.normalize=function(){var a=this.x,y=this.y,x=Math.sqrt(a*a+y*y);return 0<x&&(this.x=a/x,this.y=y/x),this},Tt.ab=function(a){return gn(a.x-this.x,a.y-this.y)},Tt.direction=function(a,y){return gn(a-this.x,y-this.y)};function gn(a,y){if(a===0)return 0<y?90:0>y?270:0;if(y===0)return 0<a?0:180;if(isNaN(a)||isNaN(y))return 0;var x=180*Math.atan(Math.abs(y/a))/Math.PI;return 0>a?x=0>y?x+180:180-x:0>y&&(x=360-x),x}Tt.Ry=function(a,y){return we.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Tt.fA=function(a,y,x,E){return we.qh(a,y,x,E,this.x,this.y,this),this},Tt.gA=function(a,y){return we.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Tt.uA=function(a,y,x,E){return we.No(this.x,this.y,a,y,x,E,this),this},Tt.vA=function(a,y){return we.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Tt.xi=function(a,y){return this.x=a.x+y.x*a.width+y.offsetX,this.y=a.y+y.y*a.height+y.offsetY,this},Tt.yi=function(a,y,x,E,b){return this.x=a+b.x*x+b.offsetX,this.y=y+b.y*E+b.offsetY,this},Tt.transform=function(a){return a.Ga(this),this};function mn(a,y){return y.Cd(a),a}function xn(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 hi(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function zn(a,y,x,E){return a=x-a,y=E-y,a===0?0<y?90:0>y?270:0:y===0?0<a?0:180:isNaN(a)||isNaN(y)?0:(E=180*Math.atan(Math.abs(y/a))/Math.PI,0>a?E=0>y?E+180:180-E:0>y&&(E=360-E),E)}Tt.w=function(){return isFinite(this.x)&&isFinite(this.y)},Ut.alloc=function(){var a=Xn.pop();return a===void 0?new Ut:a},Ut.allocAt=function(a,y){var x=Xn.pop();return x===void 0?new Ut(a,y):(x.x=a,x.y=y,x)},Ut.free=function(a){Xn.push(a)},Ut.prototype.isReal=Ut.prototype.w,Ut.prototype.setSpot=Ut.prototype.yi,Ut.prototype.setRectSpot=Ut.prototype.xi,Ut.prototype.snapToGridPoint=Ut.prototype.vA,Ut.prototype.snapToGrid=Ut.prototype.uA,Ut.prototype.projectOntoLineSegmentPoint=Ut.prototype.gA,Ut.prototype.projectOntoLineSegment=Ut.prototype.fA,Ut.intersectingLineSegments=function(a,y,x,E,b,z,tt,rt){return we.Rl(a,y,x,E,b,z,tt,rt)},Ut.prototype.compareWithLineSegmentPoint=Ut.prototype.Ry,Ut.compareWithLineSegment=function(a,y,x,E,b,z){return we.Fl(a,y,x,E,b,z)},Ut.prototype.direction=Ut.prototype.direction,Ut.prototype.directionPoint=Ut.prototype.ab,Ut.prototype.normalize=Ut.prototype.normalize,Ut.prototype.distanceSquared=Ut.prototype.zd,Ut.prototype.distanceSquaredPoint=Ut.prototype.Bf,Ut.prototype.scale=Ut.prototype.scale,Ut.prototype.rotate=Ut.prototype.rotate,Ut.prototype.offset=Ut.prototype.offset,Ut.prototype.subtract=Ut.prototype.re,Ut.prototype.add=Ut.prototype.add,Ut.prototype.equalsApprox=Ut.prototype.Xa,Ut.prototype.equalTo=Ut.prototype.hi,Ut.prototype.equals=Ut.prototype.D,Ut.prototype.set=Ut.prototype.set,Ut.prototype.setTo=Ut.prototype.sg;var Xn=[];Ut.className="Point",Ut.parse=dn,Ut.stringify=tn,Ut.distanceLineSegmentSquared=xn,Ut.distanceSquared=hi,Ut.direction=zn,Ut.Origin=pn=new Ut(0,0).ja(),Ut.InfiniteTopLeft=fn=new Ut(-1/0,-1/0).ja(),Ut.InfiniteBottomRight=Qn=new Ut(1/0,1/0).ja(),Ut.SixPoint=Gn=new Ut(6,6).ja(),Ut.NoPoint=jn=new Ut(NaN,NaN).ja(),Ut.parse=dn,Ut.stringify=tn,Ut.distanceLineSegmentSquared=xn,Ut.distanceSquared=hi,Ut.direction=zn;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 ti,Di,ir,Ji,fr,dr,Er;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},Tt=cn.prototype,Tt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Tt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return Object.isFrozen(this)&&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()}Tt.toString=function(){return"Size("+this.width+","+this.height+")"},Tt.D=function(a){return a instanceof cn?this.width===a.width&&this.height===a.height:!1},Tt.hi=function(a,y){return this.width===a&&this.height===y},Tt.Xa=function(a){return we.B(this.width,a.width)&&we.B(this.height,a.height)},Tt.Bc=function(a,y){return a=this.width+a,this.width=0<=a?a:0,y=this.height+y,this.height=0<=y?y:0,this},Tt.w=function(){return isFinite(this.width)&&isFinite(this.height)},cn.alloc=function(){var a=oo.pop();return a===void 0?new cn:a},cn.free=function(a){oo.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 oo=[];cn.className="Size",cn.parse=Gr,cn.stringify=Tr,cn.ZeroSize=ti=new cn(0,0).ja(),cn.OneSize=Di=new cn(1,1).ja(),cn.SixSize=ir=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=Er=new cn(NaN,NaN).ja(),cn.parse=Gr,cn.stringify=Tr;function He(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 Ut?(x=a.x,a=a.y,y instanceof Ut?(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}Tt=He.prototype,Tt.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Tt.h=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this};function gr(a,y,x){a.width=y,a.height=x}Tt.sg=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this},Tt.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Tt.dd=function(a){return this.x=a.x,this.y=a.y,this},Tt.tA=function(a){return this.width=a.width,this.height=a.height,this},He.prototype.copy=function(){var a=new He;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Tt=He.prototype,Tt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Tt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return Object.isFrozen(this)&&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 He(x,b,z,tt)}return new He}function nr(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}Tt.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},Tt.D=function(a){return a instanceof He?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Tt.hi=function(a,y,x,E){return this.x===a&&this.y===y&&this.width===x&&this.height===E},Tt.Xa=function(a){return we.B(this.x,a.x)&&we.B(this.y,a.y)&&we.B(this.width,a.width)&&we.B(this.height,a.height)};function Qr(a,y){return we.$(a.x,y.x)&&we.$(a.y,y.y)&&we.$(a.width,y.width)&&we.$(a.height,y.height)}Tt.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Tt.Re=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height},Tt.contains=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+E<=this.y+this.height},Tt.offset=function(a,y){return this.x+=a,this.y+=y,this},Tt.Bc=function(a,y){return ar(this,y,a,y,a)},Tt.Co=function(a){return ar(this,a.top,a.right,a.bottom,a.left)},Tt.Fv=function(a){return ar(this,-a.top,-a.right,-a.bottom,-a.left)},Tt.Hz=function(a,y,x,E){return ar(this,a,y,x,E)};function ar(a,y,x,E,b){var z=a.width;return x+b<=-z?(a.x+=z/2,a.width=0):(a.x-=b,a.width+=x+b),x=a.height,y+E<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+E),a}Tt.Ex=function(a){return vo(this,a.x,a.y,a.width,a.height)},Tt.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}Tt.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Tt.Vu=function(a,y,x,E){var b=this.width,z=this.x;return b!==1/0&&x!==1/0&&(b+=z,x+=a,isNaN(x)||isNaN(b)||z>x||a>b)?!1:(a=this.height,x=this.y,!(a!==1/0&&E!==1/0&&(a+=x,E+=y,isNaN(E)||isNaN(a)||x>E||y>a)))};function Jr(a,y){var x=a.width,E=a.x,b=y.x-10;return E>y.width+10+10+b||b>x+E?!1:(x=a.height,a=a.y,E=y.y-10,!(a>y.height+10+10+E||E>x+a))}Tt.Ye=function(a){return Nr(this,a.x,a.y,0,0)},Tt.ed=function(a){return Nr(this,a.x,a.y,a.width,a.height)},Tt.Kv=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),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}Tt.yi=function(a,y,x){return this.x=a-x.offsetX-x.x*this.width,this.y=y-x.offsetY-x.y*this.height,this};function co(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)}Tt.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Tt.Mz=function(){return this.width===0&&this.height===0},He.alloc=function(){var a=Is.pop();return a===void 0?new He:a},He.allocAt=function(a,y,x,E){var b=Is.pop();return b===void 0?new He(a,y,x,E):b.h(a,y,x,E)},He.free=function(a){Is.push(a)},Ue.Object.defineProperties(He.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 Ut(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 Ut(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}}}),He.prototype.isEmpty=He.prototype.Mz,He.prototype.isReal=He.prototype.w,He.intersectsLineSegment=function(a,y,x,E,b,z,tt,rt){return we.Fx(a,y,x,E,b,z,tt,rt)},He.prototype.setSpot=He.prototype.yi,He.prototype.union=He.prototype.Kv,He.prototype.unionRect=He.prototype.ed,He.prototype.unionPoint=He.prototype.Ye,He.prototype.intersects=He.prototype.Vu,He.prototype.intersectsRect=He.prototype.Yc,He.prototype.intersect=He.prototype.Uu,He.prototype.intersectRect=He.prototype.Ex,He.prototype.grow=He.prototype.Hz,He.prototype.subtractMargin=He.prototype.Fv,He.prototype.addMargin=He.prototype.Co,He.prototype.inflate=He.prototype.Bc,He.prototype.offset=He.prototype.offset,He.prototype.contains=He.prototype.contains,He.prototype.containsRect=He.prototype.Re,He.prototype.containsPoint=He.prototype.ca,He.prototype.equalsApprox=He.prototype.Xa,He.prototype.equalTo=He.prototype.hi,He.prototype.equals=He.prototype.D,He.prototype.setSize=He.prototype.tA,He.prototype.setPoint=He.prototype.dd,He.prototype.set=He.prototype.set,He.prototype.setTo=He.prototype.sg;var ls=null,la=null,Is=[];He.className="Rect",He.parse=Dr,He.stringify=nr,He.contains=co,He.intersects=ks,He.ZeroRect=ls=new He(0,0,0,0).ja(),He.NoRect=la=new He(NaN,NaN,NaN,NaN).ja(),He.parse=Dr,He.stringify=nr,He.contains=co,He.intersects=ks;function lr(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}lr.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},lr.prototype.sg=function(a,y,x,E){return this.top=a,this.right=y,this.bottom=x,this.left=E,this},lr.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},lr.prototype.copy=function(){var a=new lr;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Tt=lr.prototype,Tt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Tt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return Object.isFrozen(this)&&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 lr;for(var b=NaN;a[y]==="";)y++;if((E=a[y++])&&(b=parseFloat(E)),isNaN(b))return new lr(x);for(var z=NaN;a[y]==="";)y++;if((E=a[y++])&&(z=parseFloat(E)),isNaN(z))return new lr(x,b);for(var tt=NaN;a[y]==="";)y++;return(E=a[y++])&&(tt=parseFloat(E)),isNaN(tt)?new lr(x,b):new lr(x,b,z,tt)}return new lr}function os(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}Tt.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},Tt.D=function(a){return a instanceof lr?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Tt.hi=function(a,y,x,E){return this.top===a&&this.right===y&&this.bottom===x&&this.left===E},Tt.Xa=function(a){return we.B(this.top,a.top)&&we.B(this.right,a.right)&&we.B(this.bottom,a.bottom)&&we.B(this.left,a.left)},Tt.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},lr.alloc=function(){var a=rr.pop();return a===void 0?new lr:a},lr.free=function(a){rr.push(a)},lr.prototype.isReal=lr.prototype.w,lr.prototype.equalsApprox=lr.prototype.Xa,lr.prototype.equalTo=lr.prototype.hi,lr.prototype.equals=lr.prototype.D,lr.prototype.set=lr.prototype.set,lr.prototype.setTo=lr.prototype.sg;var zi=null,Wi=null,rr=[];lr.className="Margin",lr.parse=Eo,lr.stringify=os,lr.ZeroMargin=zi=new lr(0,0,0,0).ja(),lr.TwoMargin=Wi=new lr(2,2,2,2).ja(),lr.parse=Eo,lr.stringify=os;function _n(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,Pr,$r,so,ts,yo,Vo,zo,Io,ys,Wo,Fl,lo,da,_a,hl,Zo,Ta,$a,uA,Ku,ws,Gu,AA,wa,tl,Gs,es,hs,js,Oo,ao;_n.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},_n.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},_n.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},_n.prototype.copy=function(){var a=new _n;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Tt=_n.prototype,Tt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Tt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return Object.isFrozen(this)&&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 Pr;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return $r;if(a==="BottomLeft")return so;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 lo;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 _n(x,b,z,tt)}return new _n}function xs(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}Tt.toString=function(){return this.sb()?this.offsetX===0&&this.offsetY===0?"Spot("+this.x+","+this.y+")":"Spot("+this.x+","+this.y+","+this.offsetX+","+this.offsetY+")":this.D(Ar)?"None":this.D(kr)?"TopLeft":this.D(xo)?"Top":this.D(Ts)?"TopRight":this.D(ps)?"Left":this.D(Pr)?"Center":this.D($r)?"Right":this.D(so)?"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(lo)?"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"},Tt.D=function(a){return a instanceof _n?(this.x===a.x||isNaN(this.x)&&isNaN(a.x))&&(this.y===a.y||isNaN(this.y)&&isNaN(a.y))&&this.offsetX===a.offsetX&&this.offsetY===a.offsetY:!1},Tt.gv=function(){return new _n(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},Tt.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(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},Tt.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},Tt.Mc=function(){return isNaN(this.x)||isNaN(this.y)},Tt.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},Tt.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},Tt.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},_n.alloc=function(){var a=ss.pop();return a===void 0?new _n:a},_n.free=function(a){ss.push(a)},_n.prototype.isDefault=_n.prototype.Xb,_n.prototype.isNone=_n.prototype.ys,_n.prototype.isSide=_n.prototype.$c,_n.prototype.isNoSpot=_n.prototype.Mc,_n.prototype.isSpot=_n.prototype.sb,_n.prototype.includesSide=_n.prototype.Hf,_n.prototype.opposite=_n.prototype.gv,_n.prototype.equals=_n.prototype.D,_n.prototype.set=_n.prototype.set,_n.prototype.setTo=_n.prototype.sg;var ss=[];_n.className="Spot",_n.parse=Xs,_n.stringify=xs,_n.None=Ar=mo(new _n(0,0,0,0),0).ja(),_n.Default=ws=mo(new _n(0,0,-1,0),-1).ja(),_n.TopLeft=kr=new _n(0,0,0,0).ja(),_n.TopCenter=xo=new _n(.5,0,0,0).ja(),_n.TopRight=Ts=new _n(1,0,0,0).ja(),_n.LeftCenter=ps=new _n(0,.5,0,0).ja(),_n.Center=Pr=new _n(.5,.5,0,0).ja(),_n.RightCenter=$r=new _n(1,.5,0,0).ja(),_n.BottomLeft=so=new _n(0,1,0,0).ja(),_n.BottomCenter=ts=new _n(.5,1,0,0).ja(),_n.BottomRight=yo=new _n(1,1,0,0).ja(),_n.MiddleTop=Gs=xo,_n.MiddleLeft=es=ps,_n.MiddleRight=hs=$r,_n.MiddleBottom=js=ts,_n.Top=wa=xo,_n.Left=Gu=ps,_n.Right=AA=$r,_n.Bottom=tl=ts,_n.TopSide=Vo=mo(new _n(0,0,1,1),1).ja(),_n.LeftSide=zo=mo(new _n(0,0,1,2),1).ja(),_n.RightSide=Io=mo(new _n(0,0,1,4),1).ja(),_n.BottomSide=ys=mo(new _n(0,0,1,8),1).ja(),_n.TopBottomSides=Wo=mo(new _n(0,0,1,9),1).ja(),_n.LeftRightSides=Fl=mo(new _n(0,0,1,6),1).ja(),_n.TopLeftSides=lo=mo(new _n(0,0,1,3),1).ja(),_n.TopRightSides=da=mo(new _n(0,0,1,5),1).ja(),_n.BottomLeftSides=_a=mo(new _n(0,0,1,10),1).ja(),_n.BottomRightSides=hl=mo(new _n(0,0,1,12),1).ja(),_n.NotTopSide=Zo=mo(new _n(0,0,1,14),1).ja(),_n.NotLeftSide=Ta=mo(new _n(0,0,1,13),1).ja(),_n.NotRightSide=$a=mo(new _n(0,0,1,11),1).ja(),_n.NotBottomSide=uA=mo(new _n(0,0,1,7),1).ja(),_n.AllSides=Ku=mo(new _n(0,0,1,15),1).ja(),Oo=new _n(.156,.156).ja(),ao=new _n(.844,.844).ja(),_n.parse=Xs,_n.stringify=xs;function er(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}er.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},er.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},er.prototype.copy=function(){var a=new er;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},er.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},er.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},er.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},er.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},er.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},er.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},er.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},er.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a===0)return this;if(this.translate(y,x),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.m12*a+this.m22*E,z=this.m11*-E+this.m21*a,tt=this.m12*-E+this.m22*a;return this.m11=this.m11*a+this.m21*E,this.m12=b,this.m21=z,this.m22=tt,this.translate(-y,-x),this},Tt=er.prototype,Tt.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Tt.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Tt.Ga=function(a){var y=a.x,x=a.y;return a.h(y*this.m11+x*this.m21+this.dx,y*this.m12+x*this.m22+this.dy)},Tt.Cd=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=a.x,E=a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Tt.Eu=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=1.25*a.x,E=1.2*a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Tt.pp=function(a){var y=a.x,x=a.y,E=y+a.width,b=x+a.height,z=this.m11,tt=this.m12,rt=this.m21,ot=this.m22,lt=this.dx,ut=this.dy,ft=y*z+x*rt+lt,yt=y*tt+x*ot+ut,Et=E*z+x*rt+lt,kt=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,kt),yt=Math.max(yt,kt),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},er.alloc=function(){var a=cl.pop();return a===void 0?new er:a},er.free=function(a){cl.push(a)},er.prototype.transformRect=er.prototype.pp,er.prototype.transformPoint=er.prototype.Ga,er.prototype.scale=er.prototype.scale,er.prototype.translate=er.prototype.translate,er.prototype.rotate=er.prototype.rotate,er.prototype.invert=er.prototype.Vj,er.prototype.multiplyInverted=er.prototype.bv,er.prototype.multiply=er.prototype.multiply,er.prototype.reset=er.prototype.reset,er.prototype.isIdentity=er.prototype.ws,er.prototype.equals=er.prototype.D,er.prototype.setTransform=er.prototype.setTransform,er.prototype.set=er.prototype.set;var cl=[];er.className="Transform",er.xF="54a702f3e53909c447824c6706603faf4c";var we={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=we.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);we.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(we.Yb(a,y,tt,rt,ft,x,E)&&we.Yb(a,y,tt,rt,ft,b,z))return we.Yb(a,y,tt,rt,ft,lt,ut);var yt=(a+x)/2,Et=(y+E)/2,kt=(x+b)/2,Dt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(yt+kt)/2,x=(Et+Dt)/2,kt=(kt+b)/2,Dt=(Dt+z)/2;var Xt=(E+kt)/2,zt=(x+Dt)/2;return we.cs(a,y,yt,Et,E,x,Xt,zt,ot,lt,ut,ft)||we.cs(Xt,zt,kt,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 zn(((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(we.Yb(a,y,tt,rt,ot,x,E)&&we.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 kt=(E+yt)/2,Dt=(x+Et)/2;we.Dl(a,y,ut,ft,E,x,kt,Dt,ot,lt),we.Dl(kt,Dt,yt,Et,b,z,tt,rt,ot,lt)}return lt},Qe:function(a,y,x,E,b,z,tt,rt,ot,lt){if(we.Yb(a,y,tt,rt,ot,x,E)&&we.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 kt=(E+yt)/2,Dt=(x+Et)/2;we.Qe(a,y,ut,ft,E,x,kt,Dt,ot,lt),we.Qe(kt,Dt,yt,Et,b,z,tt,rt,ot,lt)}return lt},jv:function(a,y,x,E,b,z,tt,rt,ot,lt){if(we.Yb(a,y,b,z,lt,x,E))return we.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 we.jv(a,y,ut,ft,yt,Et,tt,rt,ot,lt)||we.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(we.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;we.iv(a,y,ot,lt,ut,ft,tt,rt),we.iv(ut,ft,x,E,b,z,tt,rt)}return rt},ep:function(a,y,x,E,b,z,tt,rt){if(we.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;we.ep(a,y,ot,lt,ut,ft,tt,rt),we.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(we.Yb(a,y,tt,rt,yt,x,E)&&we.Yb(a,y,tt,rt,yt,b,z))return!we.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 kt=(a+x)/2,Dt=(y+E)/2,Xt=(x+b)/2,zt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(kt+Xt)/2,x=(Dt+zt)/2,Xt=(Xt+b)/2,zt=(zt+z)/2;var re=(E+Xt)/2,le=(x+zt)/2,fe=1/0,me=!1,Ge=0,Jn=0;return we.Eo(a,y,kt,Dt,E,x,re,le,ot,lt,ut,ft,yt,Et)&&(a=(Et.x-ot)*(Et.x-ot)+(Et.y-lt)*(Et.y-lt),a<fe&&(fe=a,me=!0,Ge=Et.x,Jn=Et.y)),we.Eo(re,le,Xt,zt,b,z,tt,rt,ot,lt,ut,ft,yt,Et)&&(Et.x-ot)*(Et.x-ot)+(Et.y-lt)*(Et.y-lt)<fe&&(me=!0,Ge=Et.x,Jn=Et.y),me&&(Et.x=Ge,Et.y=Jn),me},Fo:function(a,y,x,E,b,z,tt,rt,ot,lt,ut,ft,yt){var Et=0;if(we.Yb(a,y,tt,rt,yt,x,E)&&we.Yb(a,y,tt,rt,yt,b,z)){if(yt=(a-tt)*(lt-ft)-(y-rt)*(ot-ut),yt===0)return Et;var kt=((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(kt>=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,kt<ot||kt>a)return Et;0<yt?Et++:0>yt&&Et--}else{kt=(a+x)/2,Dt=(y+E)/2;var Xt=(x+b)/2,zt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(kt+Xt)/2,x=(Dt+zt)/2,Xt=(Xt+b)/2,zt=(zt+z)/2;var re=(E+Xt)/2,le=(x+zt)/2;Et+=we.Fo(a,y,kt,Dt,E,x,re,le,ot,lt,ut,ft,yt),Et+=we.Fo(re,le,Xt,zt,b,z,tt,rt,ot,lt,ut,ft,yt)}return Et},qh:function(a,y,x,E,b,z,tt){return we.$(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)):we.$(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 we.B(a,x)&&we.B(y,E)?(ot.h(a,y),!1):we.$(b,tt)?we.$(a,x)?(we.qh(a,y,x,E,b,z,ot),!1):we.qh(a,y,x,E,b,(E-y)/(x-a)*(b-a)+y,ot):(rt=(rt-z)/(tt-b),we.$(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),we.$(rt,tt)?(we.qh(a,y,x,E,b,z,ot),!1):(b=(tt*a-rt*b+z-y)/(tt-rt),we.$(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)):we.qh(a,y,x,E,b,tt*(b-a)+y,ot))))},MA:function(a,y,x,E,b){return we.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,zt){var re=(Xt-a)*(Xt-a)+(zt-y)*(zt-y);re<ft&&(ft=re,ot.h(Xt,zt))}var ft=1/0;ut(ot.x,ot.y);var yt=0,Et=0,kt=0,Dt=0;if(b<tt?(yt=b,Et=tt):(yt=tt,Et=b),z<rt?(kt=b,Dt=tt):(kt=tt,Dt=b),yt=(Et-yt)/2+lt,lt=(Dt-kt)/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(we.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 we.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)),we.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)),we.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 we.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):!!(co(a,y,x,E,b,z)||co(a,y,x,E,tt,rt)||we.Rl(a,y,ot,y,b,z,tt,rt)||we.Rl(ot,y,ot,lt,b,z,tt,rt)||we.Rl(ot,lt,a,lt,b,z,tt,rt)||we.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>=we.Fl(a,y,x,E,b,z)*we.Fl(a,y,x,E,tt,rt)&&0>=we.Fl(b,z,tt,rt,a,y)*we.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(we.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),we.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 bi,um:new bi,Mf:new bi,Nf:0,vm:100};we.za=we.AA;function Un(a){An(this),this.l=2,a===void 0&&(a=Un.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===Un.o?this.ee=new ee:(Un.V===null&&(Un.V=new ee().freeze()),this.ee=Un.V),this.aq=this.ee.Ja,this.Ip=new He().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=kr,this.gg=yo,this.Rk=this.Sk=NaN,this.Uf=Ln}Un.prototype.copy=function(){var a=new Un;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===Un.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},Un.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},Un.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==Un.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},Un.prototype.ka=function(){if(Object.isFrozen(this)&&he("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==Un.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},Un.prototype.Xa=function(a){if(!(a instanceof Un))return!1;if(this.type!==a.type)return this.type===Un.j&&a.type===Un.o?su(this,a):a.type===Un.j&&this.type===Un.o?su(a,this):!1;if(this.type===Un.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 we.B(this.startX,a.startX)&&we.B(this.startY,a.startY)&&we.B(this.endX,a.endX)&&we.B(this.endY,a.endY)};function su(a,y){return a.type!==Un.j||y.type!==Un.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&we.B(a.startX,y.startX)&&we.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===po&&we.B(a.endX,y.endX)&&we.B(a.endY,y.endY))))}Un.ia=function(a){return a.toString()},Un.prototype.qb=function(a){a.classType===Un&&(this.type=a)},Un.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Un.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 Un.u:var y=new He(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 Un.F:if(y=new He(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 Un.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()}},Un.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},Un.parse=function(a,y){function x(){return Dt>=fe-1?!0:lt[Dt+1].match(me)!==null}function E(){return Dt++,lt[Dt]}function b(ur){var tr=parseFloat(E()),Xr=parseFloat(E());Xt===Xt.toLowerCase()&&(tr=le.x+tr,Xr=le.y+Xr),ur.h(tr,Xr)}function z(){return b(le),le}function tt(){return b(re),re}function rt(){var ur=zt.toLowerCase();return ur!=="c"&&ur!=="s"&&ur!=="q"&&ur!=="t"?le:new Ut(2*le.x-re.x,2*le.y-re.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=wn();for(var ft="",yt=!1,Et=0;Et<ut.length;Et++){var kt=ut[Et];kt!=="."||yt?kt==="."?(ot.push(ft),ft="."):ft+=kt:(yt=!0,ft+=kt)}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,Mn(ot)}}var Dt=-1,Xt="",zt="";ot=new Ut(0,0);var re=new Ut(0,0),le=new Ut(0,0),fe=lt.length;a=Dy(null),yt=ft=ut=!1,Et=!0,kt=null;for(var me=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(Dt>=fe-1);)if(zt=Xt,Xt=E(),Xt!=="")switch(Xt.toUpperCase()){case"X":Et=!0,ft=ut=!1;break;case"M":for(kt=z(),a.mc===null||Et===!0?(Pg(a,kt.x,kt.y,ut,!ft,yt),Et=!1):a.moveTo(kt.x,kt.y),ot.assign(le);!x();)kt=z(),a.lineTo(kt.x,kt.y);break;case"L":for(;!x();)kt=z(),a.lineTo(kt.x,kt.y);break;case"H":for(;!x();)le=new Ut((Xt===Xt.toLowerCase()?le.x:0)+parseFloat(E()),le.y),a.lineTo(le.x,le.y);break;case"V":for(;!x();)le=new Ut(le.x,(Xt===Xt.toLowerCase()?le.y:0)+parseFloat(E())),a.lineTo(le.x,le.y);break;case"C":for(;!x();){kt=new Ut,b(kt);var Ge=tt(),Jn=z();yc(a,kt.x,kt.y,Ge.x,Ge.y,Jn.x,Jn.y)}break;case"S":for(;!x();)kt=rt(),Ge=tt(),Jn=z(),yc(a,kt.x,kt.y,Ge.x,Ge.y,Jn.x,Jn.y);break;case"Q":for(;!x();)kt=tt(),Ge=z(),m0(a,kt.x,kt.y,Ge.x,Ge.y);break;case"T":for(;!x();)re=kt=rt(),Ge=z(),m0(a,kt.x,kt.y,Ge.x,Ge.y);break;case"B":for(;!x();){kt=parseFloat(E()),Ge=parseFloat(E()),Jn=parseFloat(E());var yi=parseFloat(E()),di=parseFloat(E()),Hn=di,vn=!1;x()||(Hn=parseFloat(E()),x()||(vn=parseFloat(E())!==0)),Xt===Xt.toLowerCase()&&(Jn+=le.x,yi+=le.y),a.arcTo(kt,Ge,Jn,yi,di,Hn,vn)}break;case"A":for(;!x();)kt=Math.abs(parseFloat(E())),Ge=Math.abs(parseFloat(E())),Jn=parseFloat(E()),di=yi=!1,vn=Hn=0,Hn=E(),Hn.length===1?(yi=!!parseFloat(Hn),di=!!parseFloat(E()),Hn=parseFloat(E())):Hn.length===2?(yi=!!parseFloat(Hn[0]),di=!!parseFloat(Hn[1]),Hn=parseFloat(E())):(yi=!!parseFloat(Hn[0]),di=!!parseFloat(Hn[1]),Hn=parseFloat(Hn.slice(2))),vn=parseFloat(E()),Xt===Xt.toLowerCase()&&(Hn=le.x+Hn,vn=le.y+vn),le.h(Hn,vn),Mw(a,kt,Ge,Jn,yi,di,Hn,vn);break;case"Z":Lw(a),le.assign(ot);break;case"F":for(kt="",Ge=1;lt[Dt+Ge];)if(lt[Dt+Ge]==="0")yt=!0,Ge++;else if(lt[Dt+Ge].match(/[Uu]/)!==null)Ge++;else if(lt[Dt+Ge].match(me)===null)Ge++;else{kt=lt[Dt+Ge];break}kt.match(/[Mm]/)?ut=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(kt="",Ge=1;lt[Dt+Ge];)if(lt[Dt+Ge].match(/[Ff]/)!==null)Ge++;else if(lt[Dt+Ge].match(me)===null)Ge++;else{kt=lt[Dt+Ge];break}kt.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},Un.Ha=function(a,y){for(var x=a.length,E=Ut.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}Ut.free(E)},Un.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===Un.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},Un.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===Un.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()},Un.prototype.ix=function(){var a=new He;return hA(this,a,!0),a};function hA(a,y,x){switch(a.type){case Un.j:case Un.u:case Un.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 Un.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:we.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:we.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 kt=0;kt<Et;kt++)ft=yt[kt],we.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)}}Un.prototype.normalize=function(){this._isFrozen&&an(this);var a=this.ix();return this.offset(-a.x,-a.y),new Ut(-a.x,-a.y)},Un.prototype.offset=function(a,y){return this._isFrozen&&an(this),this.transform(1,0,0,1,a,y),this},Un.prototype.scale=function(a,y){return this._isFrozen&&an(this),this.transform(a,0,0,y,0,0),this},Un.prototype.rotate=function(a,y,x){this._isFrozen&&an(this),y===void 0&&(y=0),x===void 0&&(x=0);var E=er.alloc();return E.reset(),E.rotate(a,y,x),this.transform(E.m11,E.m12,E.m21,E.m22,E.dx,E.dy),er.free(E),this},Tt=Un.prototype,Tt.transform=function(a,y,x,E,b,z){switch(this.type){case Un.j:case Un.u:case Un.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 Un.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 kt=ft[Et];switch(kt.type){case po:case ms:tt=kt.endX,rt=kt.endY,kt.endX=tt*a+rt*x+b,kt.endY=tt*y+rt*E+z;break;case Bs:tt=kt.point1X,rt=kt.point1Y,kt.point1X=tt*a+rt*x+b,kt.point1Y=tt*y+rt*E+z,tt=kt.point2X,rt=kt.point2Y,kt.point2X=tt*a+rt*x+b,kt.point2Y=tt*y+rt*E+z,tt=kt.endX,rt=kt.endY,kt.endX=tt*a+rt*x+b,kt.endY=tt*y+rt*E+z;break;case Na:tt=kt.point1X,rt=kt.point1Y,kt.point1X=tt*a+rt*x+b,kt.point1Y=tt*y+rt*E+z,tt=kt.endX,rt=kt.endY,kt.endX=tt*a+rt*x+b,kt.endY=tt*y+rt*E+z;break;case ns:tt=kt.centerX,rt=kt.centerY,kt.centerX=tt*a+rt*x+b,kt.centerY=tt*y+rt*E+z,y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),kt.startAngle+=tt),0>a&&(kt.startAngle=180-kt.startAngle,kt.sweepAngle=-kt.sweepAngle),0>E&&(kt.startAngle=-kt.startAngle,kt.sweepAngle=-kt.sweepAngle),kt.radiusX*=Math.sqrt(a*a+x*x),kt.radiusY!==void 0&&(kt.radiusY*=Math.sqrt(y*y+E*E));break;case nl:if(tt=kt.endX,rt=kt.endY,kt.endX=tt*a+rt*x+b,kt.endY=tt*y+rt*E+z,kt.radiusX===0||kt.radiusY===0)break;y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),kt.xAxisRotation+=tt),0>a&&(kt.xAxisRotation=180-kt.xAxisRotation,kt.isClockwiseArc=!kt.isClockwiseArc),0>E&&(kt.xAxisRotation=-kt.xAxisRotation,kt.isClockwiseArc=!kt.isClockwiseArc),kt.radiusX*=Math.sqrt(a*a+x*x),kt.radiusY*=Math.sqrt(y*y+E*E);break;default:he("Unknown Segment type: "+kt.type)}}}}return this._isInvalidBounds=!0,this},Tt.ca=function(a,y){y===void 0&&(y=0);var x=this.od,E=this.pd,b=this.Dc,z=this.Ec;switch(this.type){case Un.j:return we.Yb(x,E,b,z,y,a.x,a.y);case Un.u:var tt=He.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),He.free(tt),a;case Un.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 Un.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,kt=0;kt<Et;kt++){var Dt=yt[kt],Xt=!Dt.isEvenOdd;if(Dt.isFilled){if(E&&Dt.ca(z,y,x))return!0;var zt=Dt.segments;ot=Dt.startX,lt=Dt.startY;for(var re=ot,le=lt,fe=zt.s,me=0;me<=zt.length;me++){var Ge=void 0;if(me!==zt.length){Ge=fe[me];var Jn=Ge.type;a=Ge.endX,ft=Ge.endY}else Jn=po,a=re,ft=le;switch(Jn){case ms:if(re=dl(z,y,tt,y,ot,lt,re,le),isNaN(re))return!0;rt+=re,re=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=we.Fo(ot,lt,Ge.point1X,Ge.point1Y,Ge.point2X,Ge.point2Y,a,ft,tt,y,z,y,.5),rt+=ut;break;case Na:ut=we.Fo(ot,lt,(ot+2*Ge.point1X)/3,(lt+2*Ge.point1Y)/3,(2*Ge.point1X+a)/3,(2*Ge.point1Y+ft)/3,a,ft,tt,y,z,y,.5),rt+=ut;break;case ns:case nl:Jn=Ge.type===ns?xa(Ge,Dt):el(Ge,Dt,ot,lt);var yi=Jn.length;if(yi===0){if(ot=dl(z,y,tt,y,ot,lt,Ge.type===ns?Ge.centerX:Ge.endX,Ge.type===ns?Ge.centerY:Ge.endY),isNaN(ot))return!0;rt+=ot;break}Ge=null;for(var di=0;di<yi;di++){if(Ge=Jn[di],di===0){if(ut=dl(z,y,tt,y,ot,lt,Ge[0],Ge[1]),isNaN(ut))return!0;rt+=ut}ut=we.Fo(Ge[0],Ge[1],Ge[2],Ge[3],Ge[4],Ge[5],Ge[6],Ge[7],tt,y,z,y,.5),rt+=ut}Ge!==null&&(a=Ge[6],ft=Ge[7]);break;default:he("Unknown Segment type: "+Ge.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(we.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}Tt.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new Ut),this.type===Un.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,tt=0,rt=0;rt<b;rt++){var ot=E[rt],lt=ot.length;for(a=0;a<lt;a++){var ut=ot[a];if(tt+ut>=z)return E=z-tt,E=ut===0?0:E/ut,x=x[rt],rt=x[2*a],b=x[2*a+1],y.h(rt+(x[2*a+2]-rt)*E,b+(x[2*a+3]-b)*E),y;tt+=ut}}return y},Tt.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===Un.j)return 180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI;for(var y=this.flattenedSegments,x=this.flattenedLengths,E=y.length,b=this.flattenedTotalLength*a,z=0,tt=0;tt<E;tt++){var rt=x[tt],ot=rt.length;for(a=0;a<ot;a++){var lt=rt[a];if(z+lt>=b)return b=y[tt],y=b[2*a],x=b[2*a+1],E=b[2*a+2],a=b[2*a+3],1>Math.abs(E-y)&&1>Math.abs(a-x)?0:1>Math.abs(E-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=E-y?0:180:180*Math.atan2(a-x,E-y)/Math.PI;z+=lt}}return NaN},Tt.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===Un.j)return y[0]=this.startX+a*(this.endX-this.startX),y[1]=this.startY+a*(this.endY-this.startY),y[2]=180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI,y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,tt=0,rt=0;rt<b;rt++){var ot=E[rt],lt=ot.length;for(a=0;a<lt;a++){var ut=ot[a];if(tt+ut>=z)return E=z-tt,E=ut===0?0:E/ut,ut=x[rt],x=ut[2*a],rt=ut[2*a+1],b=ut[2*a+2],a=ut[2*a+3],y[0]=x+(b-x)*E,y[1]=rt+(a-rt)*E,y[2]=1>Math.abs(b-x)&&1>Math.abs(a-rt)?0:1>Math.abs(b-x)?0<=a-rt?90:270:1>Math.abs(a-rt)?0<=b-x?0:180:180*Math.atan2(a-rt,b-x)/Math.PI,y;tt+=ut}}return y},Tt.xx=function(a){if(this.type===Un.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=Ut.alloc();return we.qh(y,x,E,b,z,a,rt),a=rt.x,z=rt.y,Ut.free(rt),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/tt)}}else if(this.type===Un.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=Ut.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],kt=yt.length,Dt=0;Dt<kt;Dt+=2){var Xt=yt[Dt],zt=yt[Dt+1];if(Dt!==0){we.qh(lt,ut,Xt,zt,a.x,a.y,E);var re=(E.x-a.x)*(E.x-a.x)+(E.y-a.y)*(E.y-a.y);re<b&&(b=re,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=zt}return Ut.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===Un.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===Un.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===Un.F){var z=new Ss;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var tt=new Kr(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];we.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:we.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:we.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),kt=Et.length;if(kt===0){E.push(yt.centerX),E.push(yt.centerY),tt=yt.centerX,z=yt.centerY;break}for(var Dt=0;Dt<kt;Dt++){var Xt=Et[Dt];we.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),kt=Et.length,Dt=yt.endX,Xt=yt.endY,kt===0){E.push(Dt),E.push(Xt),tt=Dt,z=Xt;break}for(Dt=0;Dt<kt;Dt++)Xt=Et[Dt],we.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(hi(x,E,tt,rt))),x=tt,E=rt}return y}Tt.add=function(a){return this.ee.add(a),this},Tt.pm=function(a,y,x,E,b,z,tt,rt){return this._isFrozen&&an(this),this.fg=new _n(a,y,b,z).freeze(),this.gg=new _n(x,E,tt,rt).freeze(),this},Ue.Object.defineProperties(Un.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===Un.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===Un.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&&an(this,a),this.na=a,a===Un.o?this.ee=new ee:(Un.V===null&&(Un.V=new ee().freeze()),this.ee=Un.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&an(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&an(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&an(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&an(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&an(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&an(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&an(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&an(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),Un.prototype.setSpots=Un.prototype.pm,Un.prototype.add=Un.prototype.add,Un.prototype.getFractionForPoint=Un.prototype.xx,Un.prototype.getPointAndAngleAlongPath=Un.prototype.Qu,Un.prototype.getAngleAlongPath=Un.prototype.wx,Un.prototype.getPointAlongPath=Un.prototype.Pu,Un.prototype.containsPoint=Un.prototype.ca,Un.prototype.transform=Un.prototype.transform,Un.prototype.rotate=Un.prototype.rotate,Un.prototype.scale=Un.prototype.scale,Un.prototype.offset=Un.prototype.offset,Un.prototype.normalize=Un.prototype.normalize,Un.prototype.computeBoundsWithoutOrigin=Un.prototype.ix,Un.prototype.equalsApprox=Un.prototype.Xa,Un.className="Geometry",Un.j=new rn(Un,"Line",0),Un.u=new rn(Un,"Rectangle",1),Un.F=new rn(Un,"Ellipse",2),Un.o=new rn(Un,"Path",3),Un.V=null,Un.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",Un.className="Geometry",Un.stringify=Un.ia,Un.fillPath=Un.nb,Un.parse=Un.parse,Un.Line=Un.j,Un.Rectangle=Un.u,Un.Ellipse=Un.F,Un.Path=Un.o;function Ss(a,y,x,E,b){An(this),x===void 0&&(x=!0),E===void 0&&(E=!0),b===void 0&&(b=!1),this.l=2|(x?4:0)|(E?8:0)|(b?16:0),a!==void 0?this.od=a:this.od=0,y!==void 0?this.pd=y:this.pd=0,this.pl=new 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},Tt=Ss.prototype,Tt.Xa=function(a){if(!(a instanceof Ss&&we.B(this.startX,a.startX)&&we.B(this.startY,a.startY)))return!1;var y=this.segments.s;a=a.segments.s;var x=y.length;if(x!==a.length)return!1;for(var E=0;E<x;E++)if(!y[E].Xa(a[E]))return!1;return!0},Tt.toString=function(a){a===void 0&&(a=-1);for(var y=0>a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a),x=this.segments.s,E=x.length,b=0;b<E;b++)y+=" "+x[b].toString(a);return y},Tt.freeze=function(){this._isFrozen=!0;var a=this.segments;a.freeze();var y=a.s;a=a.length;for(var x=0;x<a;x++)y[x].freeze();return this},Tt.ka=function(){this._isFrozen=!1;var a=this.segments;a.ka(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].ka();return this},Tt.Zu=function(){if(this._isInvalidBounds)return!0;var a=this.segments;if(this.sr!==a.Ja)return!0;a=a.s;for(var y=a.length,x=0;x<y;x++)if(a[x]._isInvalidBounds)return!0;return!1},Tt.add=function(a){return this.pl.add(a),this},Tt.ca=function(a,y,x){for(var E=this.startX,b=this.startY,z=E,tt=b,rt=this.segments.s,ot=rt.length,lt=0;lt<ot;lt++){var ut=rt[lt];switch(ut.type){case ms:z=ut.endX,tt=ut.endY,E=ut.endX,b=ut.endY;break;case po:if(we.Yb(E,b,ut.endX,ut.endY,x,a,y))return!0;E=ut.endX,b=ut.endY;break;case Bs:if(we.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(we.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,kt=ut.type===ns?ut.centerY:ut.endY;if(yt===0){if(we.Yb(E,b,Et,kt,x,a,y))return!0;E=Et,b=kt;break}for(Et=null,kt=0;kt<yt;kt++)if(Et=ft[kt],kt===0&&we.Yb(E,b,Et[0],Et[1],x,a,y)||we.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)&&we.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&&an(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&an(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&an(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&an(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&an(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&an(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Ss.prototype.add=Ss.prototype.add,Ss.prototype.equalsApprox=Ss.prototype.Xa,Ss.className="PathFigure";function Kr(a,y,x,E,b,z,tt,rt){An(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}Kr.prototype.copy=function(){var a=new Kr;return a.na=this.na,a.l=this.l&-2,a.Dc=this.Dc,a.Ec=this.Ec,a.Ne=this.Ne,a.Vh=this.Vh,a.Wh=this.Wh,a.Pg=this.Pg,a},Tt=Kr.prototype,Tt.Xa=function(a){if(!(a instanceof Kr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case ms:case po:return we.B(this.endX,a.endX)&&we.B(this.endY,a.endY);case Bs:return we.B(this.endX,a.endX)&&we.B(this.endY,a.endY)&&we.B(this.point1X,a.point1X)&&we.B(this.point1Y,a.point1Y)&&we.B(this.point2X,a.point2X)&&we.B(this.point2Y,a.point2Y);case Na:return we.B(this.endX,a.endX)&&we.B(this.endY,a.endY)&&we.B(this.point1X,a.point1X)&&we.B(this.point1Y,a.point1Y);case ns:return we.B(this.startAngle,a.startAngle)&&we.B(this.sweepAngle,a.sweepAngle)&&we.B(this.centerX,a.centerX)&&we.B(this.centerY,a.centerY)&&we.B(this.radiusX,a.radiusX)&&we.B(this.radiusY,a.radiusY);case nl:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&we.B(this.xAxisRotation,a.xAxisRotation)&&we.B(this.endX,a.endX)&&we.B(this.endY,a.endY)&&we.B(this.radiusX,a.radiusX)&&we.B(this.radiusY,a.radiusY);default:return!1}},Tt.qb=function(a){a.classType===Kr&&(this.type=a)},Tt.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":"")},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return this._isFrozen=!1,this},Tt.close=function(){return this.isClosed=!0,this};function 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=we.jx(0,0,x<E?x:E,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==E){var tt=er.alloc();tt.reset(),x<E?tt.scale(1,E/x):tt.scale(x/E,1),Un.Ha(z,tt),er.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,zt,re){return(Dt*re<Xt*zt?-1:1)*Math.acos((Dt*zt+Xt*re)/(Math.sqrt(Dt*Dt+Xt*Xt)*Math.sqrt(zt*zt+re*re)))}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 kt=Et*Et/(y*y)+tt*tt/(z*z);return 1<kt&&(y*=Math.sqrt(kt),z*=Math.sqrt(kt)),kt=(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(kt)&&(kt=0),rt=kt*y*tt/z,kt=kt*-z*Et/y,isNaN(rt)&&(rt=0),isNaN(kt)&&(kt=0),x=(x+lt)/2+ft*rt-yt*kt,E=(E+ut)/2+yt*rt+ft*kt,ut=b(1,0,(Et-rt)/y,(tt-kt)/z),ft=(Et-rt)/y,lt=(tt-kt)/z,Et=(-Et-rt)/y,rt=(-tt-kt)/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=we.jx(0,0,y>z?y:z,ut,ut+tt,!0),z=er.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(ot,Et),Un.Ha(y,z),er.free(z),a.ae=y,a.ae}Ue.Object.defineProperties(Kr.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&&an(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&an(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&an(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&an(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&an(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&an(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&an(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&an(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&an(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Yn(a,">= zero",Kr,"radiusX"),this._isFrozen&&an(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Yn(a,">= zero",Kr,"radiusY"),this._isFrozen&&an(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&an(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&&an(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&&an(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&&an(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&&an(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Kr.prototype.equalsApprox=Kr.prototype.Xa;var ms=new rn(Kr,"Move",0),po=new rn(Kr,"Line",1),Bs=new rn(Kr,"Bezier",2),Na=new rn(Kr,"QuadraticBezier",3),ns=new rn(Kr,"Arc",4),nl=new rn(Kr,"SvgArc",4);Kr.className="PathSegment",Kr.Move=ms,Kr.Line=po,Kr.Bezier=Bs,Kr.QuadraticBezier=Na,Kr.Arc=ns,Kr.SvgArc=nl;function Vs(){this.H=null,this.xu=new Ut(0,0).freeze(),this.mt=new Ut(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=No,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=ln(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=ln(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=ln(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=ln(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===No?a+(this.model!==null?"!m":"!d"):a+((this.model!==null?"!m":"!d")+this.change),this.propertyName&&typeof this.propertyName=="string"&&(a+=" "+this.propertyName),this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange),a+=": ",this.change===ea?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=_i(this.object)),this.oldValue!==null&&(a+=" old: "+_i(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+_i(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 rn(Uo,"Transaction",-1),No=new rn(Uo,"Property",0),is=new rn(Uo,"Insert",1),cs=new rn(Uo,"Remove",2);Uo.className="ChangedEvent",Uo.Transaction=ea,Uo.Property=No,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===No&&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 Se,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},Tt=_o.prototype,Tt.Xw=function(a){this.Pt.add(a)},Tt.Rx=function(a){this.Pt.remove(a)},Tt.Ea=function(a){if(a===void 0&&(a=""),a===null&&(a=""),this.isUndoingRedoing)return!1;this.tt===!0&&(this.tt=!1,this.bi++,this.isInternalTransaction||this.Ob("StartingFirstTransaction",a,this.currentTransaction),0<this.bi&&this.bi--),this.isEnabled&&(this.Ie.ka(),this.Ie.add(a),this.Ie.freeze(),this.currentTransaction===null?this.hl.add(0):this.hl.add(this.currentTransaction.changes.count)),this.bi++;var y=this.transactionLevel===1;return y&&(this.isInternalTransaction||this.Ob("StartedTransaction",a,this.currentTransaction)),y},Tt.eb=function(a){return a===void 0&&(a=""),dA(this,!0,a)},Tt.Kf=function(){return dA(this,!1,"")};function dA(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&vi("Ending transaction without having started a transaction: "+x);var E=a.transactionLevel===1,b=a.currentTransaction;E&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,b));var z=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var tt=a.Ie.count;0<tt&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(tt-1),a.Ie.freeze()),tt=a.hl.count,0<tt&&(z=a.hl.M(tt-1),a.hl.mb(tt-1))}if(E){if(y)a.rq=!1,b===null&&x!==""&&(b=a.currentTransaction),a.isEnabled&&b!==null&&(b.isComplete||(b.isComplete=!0,b.name=x),a.lx(),y=a.history,y.ka(),E=a.maxHistoryLength,0<=E&&(E===0?y.clear():y.count>=E&&(z=y.M(0),z!==null&&z.clear(),y.mb(0),a.Ce--)),E===0||y.count!==0&&y.get(y.count-1)===b||(y.add(b),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,b);else{a.Fe=!0;try{a.isEnabled&&b!==null&&(b.isComplete=!0,b.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,b),a.Fe=!1}b!==null&&b.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&b!==null){for(a=z,x=b.changes,b=x.count-1;b>=a;b--)y=x.M(b),y!==null&&y.undo(),x.ka(),x.mb(b);x.freeze()}return!1}Tt.lx=function(){if(!this.isUndoingRedoing&&this.canRedo()){var a=this.history;a.ka();for(var y=a.count-1;y>this.historyIndex;y--){var x=a.M(y);x!==null&&x.clear(),a.mb(y),this.rq=!0}a.freeze()}},_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){vi("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){vi("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||vi("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 _r(){An(this),this.H=Mu,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new Vs,this.Zr=-1}_r.prototype.toString=function(){return this.name!==""?this.name+" Tool":ii(this.constructor)},_r.prototype.updateAdornments=function(){},_r.prototype.canStart=function(){return this.isEnabled},_r.prototype.doStart=function(){},_r.prototype.doActivate=function(){this.isActive=!0},_r.prototype.doDeactivate=function(){this.isActive=!1},_r.prototype.doStop=function(){},_r.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},_r.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},_r.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},_r.prototype.doMouseMove=function(){},_r.prototype.doMouseUp=function(){this.stopTool()},_r.prototype.doMouseWheel=function(){},_r.prototype.canStartMultiTouch=function(){return!0},_r.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Ut.allocAt(NaN,NaN)),E=y.So(1,Ut.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}Ut.free(x),Ut.free(E)},_r.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Ut.allocAt(NaN,NaN)),E=y.So(1,Ut.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 Ut((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}Ut.free(x),Ut.free(E)},_r.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},_r.prototype.doKeyUp=function(){},_r.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},_r.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},_r.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(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()}},_r.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)}}}_r.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}},_r.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},_r.prototype.doCurrentObjectChanged=function(){},_r.prototype.standardMouseWheel=function(){var a=this.diagram,y=a.lastInput,x=y.delta;if(x!==0&&a.documentBounds.w()){var 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)}}},_r.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},_r.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,E=y.clone(this.yy);this.Zr=ze(function(){x.doWaitAfter(E)},a)},_r.prototype.cancelWaitAfter=function(){this.Zr!==-1&&Dn.clearTimeout(this.Zr),this.Zr=-1},_r.prototype.doWaitAfter=function(){},_r.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof Vr);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},_r.prototype.isBeyondDragSize=function(a,y){var x=this.diagram;a===void 0&&(a=x.firstInput.viewPoint),y===void 0&&(y=x.lastInput.viewPoint);var 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(_r.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Ke&&(this.H=a)}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},isActive:{get:function(){return this.nb},set:function(a){this.nb=a}},transactionResult:{get:function(){return this.wm},set:function(a){this.wm=a}}}),_r.prototype.startTransaction=_r.prototype.Ea,_r.className="Tool";function Bo(){_r.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}Re(Bo,_r),Bo.prototype.initializeStandardTools=function(){},Bo.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Vr&&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 Vr&&(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 Vr)||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 Vr){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&&(Dn.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var b=this;this.zj=ze(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&&(Dn.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof Vr?(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 Vr?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 rn(Bo,"WheelScroll",0),TA=new rn(Bo,"WheelZoom",1),Hh=new rn(Bo,"WheelNone",2),ch=new rn(Bo,"GestureZoom",3),lu=new rn(Bo,"GestureCancel",4),uu=new rn(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(){_r.call(this),this.name="Dragging",this.u=this.Sw=this.ob=!0,this.o=this.Ha=this.V=this.Oe=null,this.Ym=this.Hb=!1,this.tl=new Ut(NaN,NaN),this.Fr=new Ut,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new Se().freeze(),this.ia=new st,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var Ol;Re(Ho,_r),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 Rn?(a.draggedLink=y.first(),a.draggedLink.canRelinkFrom()&&a.draggedLink.canRelinkTo()&&a.draggedLink.Ej(),a.Oe=x.toolManager.findTool("Relinking"),a.Oe===null&&(a.Oe=new 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(pn):this.isGridSnapEnabled?new Ju(new Ut(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=_r.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 Rn&&E.canCopy()&&x.add(E,a.Pd());a.copiedParts=x,dh(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Sc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function 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 Rn&&(x.value.point=new Ut(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=Ut.alloc();z.assign(E.lastInput.documentPoint),a.moveParts(y,z.re(b),x),Ut.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 Rn&&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 Vr||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 Ui&&!(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=Ut.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(Pr,a);ot=y.Bf(ot),ot<z&&(tt=rt,z=ot)}}return Ut.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 $n&&z.linksConnected.each(function(rt){rt.suspendsRouting=!1});if(a.doDropOnto(y,E),a.isActive||Qs!==null){for(a=He.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof $n&&$g(x,E,a);He.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 Rn},!0,function(b){return b instanceof Rn},E),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}Ho.prototype.doDropOnto=function(){},Ho.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,y=a.lastInput;this.simulatedMouseMove(y.event,y.documentPoint,y.targetDiagram)||this.currentPart===null||this.draggedParts===null||(this.mayCopy()?(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 Ke||(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 Ut),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 $n&&(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 Se;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=He.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,He.free(z),z=a.Fr,tt=new Qe,rt=Ut.alloc(),ot=y.iterator;ot.next();)lt=ot.value,lt instanceof Rn&&lt.canCopy()&&(ut=x.I(lt),ut!==null&&(ut.points=lt.points,Sc(ut,z.x-E,z.y-b),ut.suspendsRouting=!0,tt.add(ut,a.Pd())));for(y=y.iterator;y.next();)lt=y.value,lt.Zc()&&lt.canCopy()&&(ot=x.I(lt),ot!==null&&(lt=lt.location,rt.h(z.x-(E-lt.x),z.y-(b-lt.y)),ot.location=rt,ot.Va(),tt.add(ot,a.Pd(rt))));Ut.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 Ut},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(),_r.prototype.doCancel.call(this)};function rs(){_r.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Rn,y=new vr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new vr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new $n,y=new vr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Di,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new $n,y=new vr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Di,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}Re(rs,_r),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=Pr,z=Ut.alloc(),x.location=y.ga(Pr,z),Ut.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=Di,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 $n){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 $n))return null;for(;a!==null;){var E=y?a.toLinkable:a.fromLinkable;if(E===!0&&(a.portId!==null||a instanceof $n)&&(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 $n){var ot=tt.ga(Pr,Ut.alloc()),lt=x.x-ot.x,ut=x.y-ot.y;Ut.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 $n&&(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 $n))return!1;a=a.portId,a===null&&(a="");var E=y.part;if(!(E instanceof $n))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 Se;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 Se,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 Se,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}Re(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 $n)))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 $n&&(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 $n&&(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 $n&&(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 Rn)return a.isTreeLink;var y=this.diagram;return y===null?!0:(a=y.partManager.getLinkCategoryForData(a),y=y.partManager.findLinkTemplateForCategory(a),y!==null?y.isTreeLink:!0)},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 rn(ua,"Either",0),ag=new rn(ua,"ForwardsOnly",0),lg=new rn(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 vr;a.figure="Diamond",a.desiredSize=Ji,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new vr,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 He}Re(fl,rs),fl.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Rn){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var E=a.selectionObject;E!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(E,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(E=a.selectionObject,E!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(E,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},fl.prototype.makeAdornment=function(a,y){var x=new Vr;return x.type=Fn.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 Vr&&x.adornedPart instanceof Rn))return;this.handle=y,this.isForwards=x===null||x.category==="RelinkTo",this.originalLink=x.adornedPart}this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.originalFromPort=this.originalLink.fromPort,this.originalFromNode=this.originalLink.fromNode,this.originalToPort=this.originalLink.toPort,this.originalToNode=this.originalLink.toNode,this.Ew.set(this.originalLink.actualBounds),this.originalLink!==null&&0<this.originalLink.pointsCount&&(this.originalLink.fromNode===null&&(this.temporaryFromPort!==null&&(this.temporaryFromPort.desiredSize=ti),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=ti),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 $n&&(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 Vr))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(){_r.call(this),this.name="LinkReshaping";var a=new vr;a.figure="Rectangle",a.desiredSize=ir,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new vr,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 Ut,this.Yq=new ee}Re(ds,_r),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 Rn){var y=null;if(a.isSelected&&!this.diagram.isReadOnly){var x=a.path;x!==null&&a.canReshape()&&a.actualBounds.w()&&a.isVisible()&&x.actualBounds.w()&&x.Ed()&&(y=a.Pj(this.name),y===null||y.Aw!==a.pointsCount||y.Uw!==a.resegmentable)&&(y=this.makeAdornment(x),y!==null&&(y.Aw=a.pointsCount,y.Uw=a.resegmentable,a.bh(this.name,y)))}y===null&&a.Jf(this.name)}},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 Vr,b.type=Fn.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);we.B(ot.x,lt.x)&&we.B(ot.y,lt.y)&&(lt=y.i(x-1)),we.B(ot.x,lt.x)?(this.om(rt,UA),rt.cursor="n-resize"):we.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),we.B(ot.x,lt.x)&&we.B(ot.y,lt.y)&&(ot=y.i(z+1)),we.B(ot.x,lt.x)?(this.om(rt,UA),rt.cursor="n-resize"):we.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 Rn){if(this.Ts=y,a.isMouseCaptured=!0,this.Ea(this.name),y.resegmentable&&this.handle.fromMaxLinks===999){var x=y.points.copy(),E=this.getResegmentingPoint();if(x.Gb(this.handle.segmentIndex+1,E),y.isOrthogonal&&x.Gb(this.handle.segmentIndex+1,E),y.points=x,y.Wb(),y.updateAdornments(),this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name),this.handle===null){this.doDeactivate();return}}this.Fw=y.i(this.handle.segmentIndex),this.Yq=y.points.copy(),this.isActive=!0}}},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=_r.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(Pr)},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 Ut(tt.x,(z.y+tt.y)/2)),rt.cd(x+1,new Ut(z.x,(z.y+tt.y)/2))):(rt.cd(x-2,new Ut((z.x+tt.x)/2,tt.y)),rt.cd(x+1,new Ut((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 Ut(E.x,(E.y+tt.y)/2)),rt.cd(x+2,new Ut(tt.x,(E.y+tt.y)/2))):(rt.cd(x-1,new Ut((E.x+tt.x)/2,E.y)),rt.cd(x+2,new Ut((E.x+tt.x)/2,tt.y))),rt.mb(x+1),rt.mb(x),y.points=rt,y.Wb())}}else tt=Ut.alloc(),we.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()),Ut.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);we.B(z.x,b.x)&&we.B(b.y,tt.y)?(we.B(z.x,y.i(E-2).x)&&!we.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),we.B(tt.y,y.i(E+2).y)&&!we.B(tt.x,y.i(E+2).x)?y.m(E+1,tt.x,a.y):y.L(E+1,tt.x,a.y)):we.B(z.y,b.y)&&we.B(b.x,tt.x)?(we.B(z.y,y.i(E-2).y)&&!we.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),we.B(tt.x,y.i(E+2).x)&&!we.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):we.B(z.x,b.x)&&we.B(b.x,tt.x)?(we.B(z.x,y.i(E-2).x)&&!we.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),we.B(tt.x,y.i(E+2).x)&&!we.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):we.B(z.y,b.y)&&we.B(b.y,tt.y)&&(we.B(z.y,y.i(E-2).y)&&!we.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),we.B(tt.y,y.i(E+2).y)&&!we.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(Pr,Ut.alloc()),E=y.getLinkPointFromPoint(E,b,z,a,!0,Ut.alloc()),y.L(0,E.x,E.y),Ut.free(z),Ut.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(Pr,Ut.alloc()),a=y.getLinkPointFromPoint(E,b,x,a,!1,Ut.alloc()),y.L(y.pointsCount-1,a.x,a.y),Ut.free(x),Ut.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 Ut(y.i(x).x,a.y);case IA:return new Ut(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 Vr))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 rn(ds,"None",0),IA=new rn(ds,"Horizontal",1),UA=new rn(ds,"Vertical",2),Ed=new rn(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(){_r.call(this),this.name="Resizing",this.o=new cn(1,1).freeze(),this.j=new cn(9999,9999).freeze(),this.yg=new cn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new vr;a.alignmentFocus=Pr,a.figure="Rectangle",a.desiredSize=ir,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new Ut,this.Dw=new cn,this.Tn=new Ut,this.rt=new cn(0,0),this.qt=new cn(1/0,1/0),this.pt=new cn(1,1)}Re(Aa,_r),Aa.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Rn)){if(a.isSelected&&!this.diagram.isReadOnly){var y=a.resizeObject,x=a.Pj(this.name);if(y!==null&&a.canResize()&&a.actualBounds.w()&&a.isVisible()&&y.actualBounds.w()&&y.Ed()&&((x===null||x.adornedObject!==y)&&(x=this.makeAdornment(y)),x!==null)){y=y.li(),od(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},Aa.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Vr,y.type=Fn.Spot,y.locationSpot=Pr;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,so)),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=Pr),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 Fn)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=_r.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,Ut.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),Ut.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,Ut.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),Ut.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=Pr);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=Ut.alloc(),we.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))),Ut.free(yt),a},Aa.prototype.computeReshape=function(){var a=Bn;return this.adornedObject instanceof vr&&(a=_m(this.adornedObject)),!(a===Bi||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 Vr))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 Vr)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(){_r.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Ut,this.ue=null;var a=new vr;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 Ut(NaN,NaN),this.u=0,this.F=50}Re(Ea,_r),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 Vr,y.type=Fn.Position,y.locationSpot=Pr;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(Pr)},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 Ut(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Ea.prototype.stopTransaction=function(){var a=this.diagram,y=_r.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 Vr))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 Vr)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(){_r.call(this),this.name="ClickSelecting"}Re(gh,_r),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(){_r.call(this),this.name="Action",this.pk=null}Re(Rl,_r),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(){_r.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Ut(0,0)}Re(QA,_r),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 Ui)x.Zc()&&(cu(x),E=x.copy(),E!==null&&y.add(E));else if(x!==null){var b=y.model.copyNodeData(x);ln(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=Ut.allocAt(a.x,a.y);this.isGridSnapEnabled&&Jc(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),Ut.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(){_r.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Ui;a.layerName="Tool",a.selectable=!1;var y=new vr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Re(El,_r),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 He(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(){_r.call(this),this.name="Panning",this.Xt=new Ut,this.xy=new Ut,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(Dn.document,"scroll",a.Kw,!1),a.stopTool()}}Re(ia,_r),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(Dn.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(){_r.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new Ut,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Re(La,_r);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=ai("div");var x=ai("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=ai("style");Dn.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",Dn.document.body&&(Dn.document.body.appendChild(y),Dn.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 Ke||(a instanceof ve?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(_r.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof Vr){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 Vr){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 ve?x:null,a.showContextMenu(E,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof Vr&&!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 Vr){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 Vr?(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=ai("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=ai("li"),z.className="goCXli";var tt=ai("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 Vr?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(){_r.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)}Re(Lo,_r);function Hc(a,y){if(Yo){var x=ai("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(Pr),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 He(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 rn(Lo,"LostFocus",0),Cu=new rn(Lo,"MouseDown",1),pa=new rn(Lo,"Tab",2),Rc=new rn(Lo,"Enter",3),ep=new rn(Lo,"SingleClick",0),_h=new rn(Lo,"SingleClickSelected",1),Md=new rn(Lo,"DoubleClick",2),Kh=new rn(Lo,"StateNone",0),Gh=new rn(Lo,"StateActive",1),_c=new rn(Lo,"StateEditing",2),ff=new rn(Lo,"StateValidating",3),Kc=new rn(Lo,"StateInvalid",4),zh=new rn(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 Se,this.ce=new ra,this.ce.Yd=this,this.Ei=new Se,this.pu=new Se,this.Sr=new Se,this.pr=new Se,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),Dn.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 Rn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,E,!1)}Tt=il.prototype,Tt.fv=function(a){return this.ce.fv(a)},Tt.Xu=function(a){return this.ce.Xu(a)};function jh(a,y){function x(){if(0<b.Sr.count&&(E.addAll(b.Sr),b.Sr.clear(),b.bc=!0),b.bc!==!1&&E.count!==0){b.pu.addAll(E);for(var z=b.pu.iterator;z.next();){var tt=z.value;if(tt.bc!==!1){t:if(0<tt.yl.count)var rt=!0;else{for(rt=tt.vc.iterator;rt.next();){var ot=rt.key;if(ot instanceof ve&&ot.diagram!==null||ot instanceof Ke){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)),Dn.requestAnimationFrame(x)}}var E=a.Ei,b=a;a.bc?a.Sr.add(y):(a.bc=!0,E.add(y),Dn.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}Tt.Cc=function(a){var y=this.ce;if(this.zb===!0&&(this.Ok=this.zb=!1,this.Zd.clear(),0<y.vc.count&&this.H.$b()),this.bc){if(y.Ml(!0),y.vc.clear(),yh(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),yh(y,this.H)},Tt.Ml=function(a){a===this.defaultAnimation&&this.defaultAnimation.vc.clear(),this.Ei.remove(a),this.Ei.count===0&&(this.bc=!1,this.H.$b()),a===this.defaultAnimation&&(this.defaultAnimation.vc.clear(),this.H.R("AnimationFinished",this))},Tt.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),Ka(this,a))},Tt.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),GA(this.ce,y,"position",y.position,y.position),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 Ut(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 Ut(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 Ut(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 Ut(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 Ut(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 He(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&&Yn(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 rn(il,"Default",1),Gc=new rn(il,"AnimateLocations",2),kd=new rn(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=pn,this.vc=new Qe,this.Tt=new Qe,this.yl=new Se,this.Ut=new Se,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}Tt=ra.prototype,Tt.start=function(){if(this.vc.count===0||this.bc)return this;for(var a=this.H,y=this.vc.iterator;y.next();){var x=y.key;a===null&&(x instanceof Ke?a=x:x instanceof ve&&(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)},Tt.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},Tt.add=function(a,y,x,E,b){if(y==="position"&&x.Xa(E))return this;if(this.H===null&&(a instanceof Ke?this.H=a:a instanceof ve&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Ui){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 Ke&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(BA(E),ip(),E=[kn.j,kn.u,kn.o,kn.F],BA(b),ip(),b=[kn.j,kn.u,kn.o,kn.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 ve&&rt instanceof Ut&&!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 Ut&&!tt.w()&&tt.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof Ui?rt.Ku.location=wh(y.location):z&&(rt.Ku[x]=wh(E))}function wh(a){return a instanceof Ut||a instanceof cn?a.copy():a}Tt.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},Tt.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function zc(a,y){if(!a.Xk||y){var x=a.Yd;if(a.bc!==!1){var E=+new Date,b=E>a.cn?a.Gd:E-a.Qd;y&&(b=a.gw,b<a.Gd?(a.Qd=+new Date-b,a.cn=a.Qd+a.Gd):b=a.Gd),_A(x),pf(a,b),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 ve&&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)}}}Tt.stop=function(){return this.bc?(this.Ml(!0),this):this},Tt.Ml=function(a){if(this.vu!==null&&this.vu.jo.remove(this.Nw),this.bc){var y=this.H,x=this.Yd;this.Xk=this.bc=x.Ok=!1,_A(x);for(var E=this.vc,b=this.yl.iterator;b.next();)y.remove(b.value);for(b=this.Ut.iterator;b.next();)b.value.v();b=this.ho,E=E.iterator;for(var z=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 Ui&&(tt.location=ut.location),rt.nv&&tt instanceof Ui&&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())}},Tt.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 Ut(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 $n&&this.Cj(E,y)},Tt.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 $n&&this.Aj(E,y)}},Tt.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&&Yn(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 rn(ql,"Default",1),Sh=new rn(ql,"Immediate",2),Zh=new rn(ql,"Bundled",3);ql.className="AnimationTrigger",ql.Default=vf,ql.Immediate=Sh,ql.Bundled=Zh;function zs(a){An(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)}Tt=zs.prototype,Tt.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,mr(x)}a.clear(),this.Zq.length=0},Tt.Xe=function(a){this.H=a},Tt.toString=function(a){a===void 0&&(a=0);var y='Layer "'+this.name+'"';if(0>=a)return y;for(var x=0,E=0,b=0,z=0,tt=0,rt=this.Pa.iterator;rt.next();){var ot=rt.value;ot instanceof hr?b++:ot instanceof $n?E++:ot instanceof Rn?z++:ot instanceof Vr?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&&Vn(E)&&(rt+=" #"+Vn(E)),x instanceof $n?rt+=" "+_i(E):x instanceof Rn&&(rt+=" "+_i(x.fromNode)+" "+_i(x.toNode));return y+" "+this.Pa.count+": "+rt},Tt.ic=function(a,y,x){if(y===void 0&&(y=null),x===void 0&&(x=null),this.Uh===!1)return null;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var b=Ut.alloc(),z=this.Pa.s,tt=z.length;tt--;){var rt=z[tt];if((E!==!0||od(rt)!==!1)&&rt.isVisible()&&(b.assign(a),mn(b,rt.oe),rt=rt.ic(b,y,x),rt!==null&&(y!==null&&(rt=y(rt)),rt!==null&&(x===null||x(rt)))))return Ut.free(b),rt}return Ut.free(b),null},Tt.ji=function(a,y,x,E){if(y===void 0&&(y=null),x===void 0&&(x=null),E instanceof ee||E instanceof Se||(E=new Se),this.Uh===!1)return E;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var z=Ut.alloc(),tt=this.Pa.s,rt=tt.length;rt--;){var ot=tt[rt];if((b!==!0||od(ot)!==!1)&&ot.isVisible()){z.assign(a),mn(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 Ut.free(z),E},Tt.Cf=function(a,y,x,E,b){if(y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof ee||b instanceof Se||(b=new Se),this.Uh===!1)return b;var z=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(z=!0);for(var tt=this.Pa.s,rt=tt.length;rt--;){var ot=tt[rt];if((z!==!0||od(ot)!==!1)&&ot.isVisible()){var lt=ot;ot.Cf(a,y,x,E,b)&&(y!==null&&(lt=y(lt)),lt===null||x!==null&&!x(lt)||b.add(lt))}}return b},Tt.Nu=function(a,y,x,E,b,z,tt){if(this.Uh===!1)return b;for(var rt=this.Pa.s,ot=rt.length;ot--;){var lt=rt[ot];if((tt!==!0||od(lt)!==!1)&&z(lt)&&lt.isVisible()){var ut=lt;lt.Cf(a,y,x,E,b)&&(y!==null&&(ut=y(ut)),ut===null||x!==null&&!x(ut)||b.add(ut))}}return b},Tt.og=function(a,y,x,E,b,z){if(x===void 0&&(x=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof ee||b instanceof Se)&&(z=b),b=!0),z instanceof ee||z instanceof Se||(z=new Se),this.Uh===!1)return z;var tt=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(tt=!0);for(var rt=Ut.alloc(),ot=Ut.alloc(),lt=this.Pa.s,ut=lt.length;ut--;){var ft=lt[ut];if((tt!==!0||od(ft)!==!1)&&ft.isVisible()){rt.assign(a),mn(rt,ft.oe),ot.h(a.x+y,a.y),mn(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 Ut.free(rt),Ut.free(ot),z},Tt.Fd=function(a,y){if(this.visible){var x=this.Pa.s,E=x.length;if(E!==0){a=wn();for(var b=wn(),z=0;z<E;z++){var tt=x[z];if(tt.vw=z,tt instanceof Rn){if(tt.fd===!1)continue}else if(tt instanceof Vr&&tt.adornedPart!==null)continue;var rt=tt.actualBounds;tt.isVisible()&&Jr(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]);Mn(a),Mn(b)}}};function mA(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}Tt.gc=function(a,y,x){if(this.visible&&this.pb!==0&&(x===void 0&&(x=!0),x||!this.isTemporary)){x=this.Pa.s;var E=x.length;if(E!==0){if(a.isTemporary)for(var b=0;b<E;b++)x[b].Gj();b=mA(this,a);var z=this.Zq;z.length=0;for(var tt=y.scale,rt=He.alloc(),ot=0;ot<E;ot++)this.Oj(a,x[ot],y,z,tt,rt,!0);if(He.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=He.alloc(),ut=0;ut<z;ut++){var ft=b[ut];E.contains(ft)&&a.Oj(y,ft,x,rt,ot,lt,!1)}He.free(lt),y.globalAlpha=tt}}}Tt.Oj=function(a,y,x,E,b,z,tt){if(tt&&!od(y))a.Hs(y);else{if(E!==null&&y instanceof Rn&&(y.isOrthogonal&&E.push(y),y.fd===!1)){a.Hs(y);return}for(tt=!1,E=y.containingGroup;E!==null;)tt?E.tb!==null&&z.Ex(E.tb):E.tb!==null&&(tt=!0,z.assign(E.tb)),E=E.containingGroup;var rt=y.actualBounds;if(E=!1,tt&&y.isVisible()){if(!z.Yc(rt)){a.Hs(y);return}E=!z.Re(rt)}E&&(a.save(),a instanceof 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))}},Tt.g=function(a,y,x,E,b){var z=this.diagram;z!==null&&z.cb(No,a,this,y,x,E,b)},Tt.oi=function(a,y,x){var E=this.Pa;if(y.Ig=this,this===null&&mr(y),a>=E.count)a=E.count;else if(E.M(a)===y)return-1;return E.Gb(a,y),y.Vo(x),E=this.diagram,E!==null&&(x?E.N():E.oi(y)),Td(this,a,y),a},Tt.pc=function(a,y,x){if(!x&&y.layer!==this&&y.layer!==null)return y.layer.pc(a,y,x);var E=this.Pa;if(0>a||a>=E.length){if(a=E.indexOf(y),0>a)return-1}else if(E.M(a)!==y&&(a=E.indexOf(y),0>a))return-1;return y.Wo(x),E.mb(a),E=this.diagram,E!==null&&(x?E.N():E.pc(y)),y.Ig=null,mr(y),a};function Td(a,y,x){if(y=Nd(a,y,x),x instanceof 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)&&Yn(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 Ke(a,y){if(xA||(Os(),xA=!0),An(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(Dn.document,"DOMContentLoaded",E,!1),x.setRTL()};Dn.document.body!==null?this.setRTL():x.addEventListener(Dn.document,"DOMContentLoaded",E,!1)}this.ol=null,Gd.add("Model",Ao);var b=this;return this.Hb=function(z){var tt=b.partManager;if(z.model===tt.diagram.model&&tt.diagram.aa){tt.diagram.aa=!1;try{var rt=z.change;z.modelChange===""&&rt===No&&tt.updateDataBindings(z.object,z.propertyName)}finally{tt.diagram.aa=!0}}},this.Oc=function(z){b.partManager.doModelChanged(z)},this.hu=this.ku=null,Ag(this),this.model=Ev(),this.Wg=!0,Qd(this),this.layout=new 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"||Dn.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 Ut(NaN,NaN).freeze(),a.du=new Ut(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new Ut(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new er,a.zu=new Ut(NaN,NaN).freeze(),a.ut=new He(NaN,NaN,NaN,NaN).freeze(),a.rj=new lr(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 Se,a.Eh=new Qe,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new lr(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 Se,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 lr(5).freeze(),a.Hw=new Se().freeze(),a.Nt=999999999,a.nw=new Se().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 Se,a.ow=new Se,a.Xh=null,a.aw=new cn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Ut,bounds:new He,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 He(NaN,NaN,NaN,NaN).freeze(),a.wo=new cn(NaN,NaN).freeze(),a.Sp=new He(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new Qe;var y=new $n,x=new Po;x.bind(new Fs("text","",_i)),y.add(x),a.ny=y,a.Lg.add("",y),y=new $n,x=new Po,x.stroke="brown",x.bind(new Fs("text","",_i)),y.add(x),a.Lg.add("Comment",y),y=new $n,y.selectable=!1,y.avoidable=!1,x=new vr,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=Fn.Vertical,x=new Po,x.font="bold 12pt sans-serif",x.bind(new Fs("text","",_i)),y.add(x),x=new Fn(Fn.Auto),x.name="GROUPPANEL";var E=new vr;E.figure="Rectangle",E.fill="rgba(128,128,128,0.2)",E.stroke="black",x.add(E),E=new ja,E.padding=new lr(5,5,5,5).ja(),x.add(E),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new Qe,y=new Rn,x=new vr,x.isPanelMain=!0,y.add(x),x=new vr,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Rn,x=new vr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Vr,y.type=Fn.Auto,x=new vr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new ja,x.margin=new lr(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new Vr,y.type=Fn.Link,x=new vr,x.isPanelMain=!0,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),a.Kt=y,a.fe=null,a.mq=!1,a.Ck=null,a.partManager=new Ao,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 Ut,a.zy=500,a.wp=new Ut,a.wq=!1}Ke.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 Se().freeze(),a.nw=new Se().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(),Ur=[],b!==null&&(a.add(b),a.partManager.parts.remove(b)),E&&(a.skipsUndoManager=x),z}function Id(){return null}Ke.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()},Ke.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=Dn.document.body);var y=ai("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},Ke.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=Dn.document.body);var y=0;if(Yo){var x=Tf;y=zA,x===null&&(x=Tf=ai("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=zA=ai("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},Ke.prototype.qb=function(a){a.classType===Ke&&(this.autoScale=a)},Ke.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=Dn.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&&Dn.ResizeObserver){var x=Ve(function(){a.$b()},250);a.ol=new Dn.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}Dn.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=Dn.go;var b=new jl(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",Dn.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=ai("div");var z=ai("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=Ve(function(){a.Yh=null,a.N()},300),a.Ov=Ve(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=Dn.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=Dn.document.elementFromPoint(tt.clientX,tt.clientY)||null;lt!==null&&lt.shadowRoot!==void 0&&lt.shadowRoot!==null&&(lt=lt.shadowRoot.elementFromPoint(tt.clientX,tt.clientY)),lt!==null&&lt.H instanceof Ke&&lt.H!==a&&Jh(lt.H,tt,ot),lt===null&&(lt=tt.target),Jh(a,tt,ot),ot.clickCount=a.yq,ot.targetDiagram=wf(tt,lt),ot.targetObject=null,a.doMouseUp(),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)}}Ke.prototype.addEventListener=function(a,y,x,E){a.addEventListener(y,x,{capture:E,passive:!1})},Ke.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(Dn,"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(),xi&&xi.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}Ke.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:Dn.devicePixelRatio||1},Ke.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},Ke.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},Ke.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},Ke.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},Ke.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},Ke.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},Ke.prototype.doFocus=function(){this.focus()},Ke.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=Dn.scrollX||Dn.pageXOffset,y=Dn.scrollY||Dn.pageYOffset;this.ta.focus(),Dn.scrollTo(a,y)}},Ke.prototype.Oy=function(){this.H.R("GainedFocus")},Ke.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 Fn(Fn.Grid);y.name="GRID";var x=new vr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new vr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new vr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new vr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new vr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new vr,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Ui,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)}Ke.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,kt=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 zt=Xt;yt<ot||Et<lt?(Xt=Ut.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==zt&&(Xt.x=zt/b+tt,this.ju=zt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Xt.y=a.scrollTop/b+rt,this.lu=a.scrollTop),this.position=Xt,Ut.free(Xt),this.Ee=this.qr=!1):(Xt=Ut.alloc(),a.uy&&this.allowHorizontalScroll&&(tt<ft&&(this.position=Xt.h(zt+tt,this.position.y)),ut>kt&&(this.position=Xt.h(-(y.scrollWidth-this.Aa)+zt-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))),Ut.free(Xt),this.vd=!0,this.Ee=this.qr=!1,E=this.documentBounds,b=this.viewportBounds,ut=E.right,kt=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<=kt&&(x.style.width="1px"),Et>=lt&&rt>=E&&z<=Dt&&(x.style.height="1px"))}},Ke.prototype.computeBounds=function(a){return a===void 0&&(a=new He),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&&lt.isVisible()&&(lt=lt.actualBounds,lt.w()&&(x?(x=!1,y.assign(lt)):y.ed(lt)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}Ke.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(qn(a))for(var E=0;E<a.length;E++){var b=a[E];!y&&b instanceof Rn||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds))}else for(a=a.iterator;a.next();)E=a.value,!y&&E instanceof Rn||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds));return x===null?new He(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=Ut.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var E=a.viewportBounds;E=He.allocAt(0,0,E.width,E.height);var b=Ut.alloc();b.xi(E,a.initialViewportSpot),b.h(x.x-b.x,x.y-b.y),a.position=b,He.free(E),Ut.free(b),Ut.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()?Pr:ot),yf(a,a.documentBounds,b,tt,rt,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,we.B(z.x,x)&&we.B(z.y,E)&&we.B(z.width,b)&&we.B(z.height,tt)||a.onViewportBoundsChanged(new He(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}Ke.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},Tt=Ke.prototype,Tt.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 Ut(a.x,a.y)}},Tt.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new Ut(x.x+(a.x*x.width+a.offsetX)-(y.x*E.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*E.height-y.offsetY))},Tt.zz=function(a){if(a instanceof ve){this.eq=a;var y=Ut.alloc();this.fq=this.op(a.ga(kr,y)),Ut.free(y)}else this.eq=null,this.fq=jn};function yf(a,y,x,E,b,z){var tt=Ut.allocAt(a.pa.x,a.pa.y),rt=tt.x,ot=tt.y;if(a.eq!==null){var lt=Ut.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,Ut.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),Ut.free(tt)}Tt.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 Ui)return a}else if(a=Zu(this,a,function(x){return x.part}),a instanceof Ui)return a;return null},Tt.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}Tt.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 Ui&&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 Se||(b=new Se),oa(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,E,b)}return b}Tt.ji=function(a,y,x,E){y===void 0&&(y=null),x===void 0&&(x=null),E instanceof ee||E instanceof Se||(E=new Se),oa(this);for(var b=this.Wa.iteratorBackwards;b.next();){var z=b.value;z.visible&&z.ji(a,y,x,E)}return E},Tt.ux=function(a,y,x,E){return y===void 0&&(y=!1),x===void 0&&(x=!0),Od(this,a,function(b){return b instanceof Ui&&(!x||b.canSelect())},y,E)},Tt.Cf=function(a,y,x,E,b){y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof ee||b instanceof Se||(b=new Se),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},Tt.Nu=function(a,y,x,E,b,z){var tt=new Se;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 Se||(b=new Se),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}Tt.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 Ui&&(!E||z.canSelect())},x,b)},Tt.og=function(a,y,x,E,b,z){x===void 0&&(x=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof ee||b instanceof Se)&&(z=b),b=!0),z instanceof ee||z instanceof Se||(z=new Se),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 Se)&&(z=b),b=!0),z instanceof ee||z instanceof Se||(z=new Se),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}Ke.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)}Ke.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)},Ke.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)},Ke.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)},Ke.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)},Ke.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new Ut(0,0);var x=y.getBoundingClientRect();return y=a.clientX-this.Aa/x.width*x.left,a=a.clientY-this.ya/x.height*x.top,this.Ab!==null?mn(new Ut(y,a),this.Ab):new Ut(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=Ut.allocAt(tt,rt),a.Ab.Cd(y),x.documentPoint.assign(y),Ut.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))}}Ke.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function Sf(a){a.ld||oa(a),a.Va()}Ke.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Tt=Ke.prototype,Tt.Pz=function(){return this.kg},Tt.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Da(this),this.hf=!1,this.du=new Ut(NaN,NaN),y.isEnabled=x,this.ld=!0;var E=this;a!==null&&ze(function(){E.ld=!1,Pu(y,"Model"),a(E)},1)},Tt.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;Dn.requestAnimationFrame(function(){y.kg&&y.bd()})}},Tt.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=He.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),He.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 Se,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof hr&&E.U&65536&&(E.U=E.U^65536)})}}Tt.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof 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 Rn&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x));for(a.reset();a.next();)x=a.value,x instanceof Vr&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function qh(a,y){for(var x=wn(),E=wn(),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 Rn?z.fromNode===y||z.toNode===y?E.push(z):x.push(z):(z.measure(1/0,1/0),z.arrange()))}for(a=x.length,b=0;b<a;b++)z=x[b],z.measure(1/0,1/0),z.arrange();for(Mn(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();Mn(E)}Tt.Fd=function(a,y,x,E){if(this.vd||this.animationManager.isAnimating)for(var b=0;b<y;b++)a[b].Fd(x,E)},Tt.gc=function(a){if(this.Ka!==null){if(this.ta===null&&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&&(er.prototype.Cd=er.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&&(er.prototype.Cd=er.prototype.Eu),E?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,E=xi&&xi.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 He(z.x,z.y,E.width/b,E.height/b),kt=Et.copy();kt.Co(x),bu(a,kt),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=er.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),er.free(Xt),jA(a,y),y.globalAlpha=a.pb;var zt=a.Qj("Grid");if(tt){var re=new Se,le=tt.iterator;for(le.reset();le.next();){var fe=le.value;fe instanceof Ui&&(lt||fe.layer!==zt)&&(fe.Gj(),re.add(fe))}for(lt=0;lt<yt;lt++)jc(ft[lt],y,a,re,ot);re.each(function(Ge){return Ge.Gj()})}else for(re=0;re<yt;re++){var me=ft[re];me===zt?lt&&me.gc(y,a,!0):me.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())}}}Tt.Gf=function(a){return this.Rg[a]},Tt.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},Tt.Tx=function(){this.Rg=new bi,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(cr||Lr),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function jA(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}Tt.Ql=function(a){return this.on[a]},Tt.sA=function(a,y){this.on[a]=y},Tt.Sx=function(){this.on=new bi,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},Tt.set=function(a){return Object.assign(this,a),this},Tt.Du=function(a){return this.nm(a)},Tt.nm=function(a){return tc(this,a),this};function tc(a,y){var x=a instanceof Fn,E=a instanceof Ke,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])),ln(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]!=="_"&&!Ki(z,tt))if(E&&tt==="ModelChanged"){a.Yw(y[tt]);continue}else if(E&&tt==="Changed"){a.Pe(y[tt]);continue}else if(E&&Ki(a.toolManager,tt))z=a.toolManager;else if(E&&bf(a,tt)){a.Bj(tt,y[tt]);continue}else if(a instanceof Fi&&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 ve&&z.Vw(tt)}}Tt.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new Qe,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},Tt.N=function(a){if(a===void 0)this.Fc=!0,this.$b();else{var y=this.viewportBounds;a.w()&&y.Yc(a)&&(this.Fc=!0,this.$b())}this.R("InvalidateDraw")},Ke.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=He.alloc(),Rd(this,this.computeBounds(E)),He.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=wn(),a=wn(),Et=Math.abs(z),yt=Math.abs(y);var kt=ut===0?0:b-Et;ut=Ut.allocAt(kt,0),Et=Ut.allocAt(Et+kt,rt),a.push(new He(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),mn(ut,Dt),mn(Et,Dt),E.push(new He(Math.min(ut.x,Et.x),Math.min(ut.y,Et.y),Math.abs(ut.x-Et.x),Math.abs(ut.y-Et.y))),kt=ft===0?0:rt-yt,ut.h(0,kt),Et.h(b,yt+kt),a.push(new He(Math.min(ut.x,Et.x),Math.min(ut.y,Et.y),Math.abs(ut.x-Et.x),Math.abs(ut.y-Et.y))),mn(ut,Dt),mn(Et,Dt),E.push(new He(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 He(Math.min(ut.x,Et.x),Math.min(ut.y,Et.y),Math.abs(ut.x-Et.x),Math.abs(ut.y-Et.y))),mn(ut,Dt),mn(Et,Dt),E.push(new He(Math.min(ut.x,Et.x),Math.min(ut.y,Et.y),Math.abs(ut.x-Et.x),Math.abs(ut.y-Et.y)))),Ut.free(ut),Ut.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=He.alloc(),Et=tt.Pa.s,Dt=Et.length,kt=ot.length;for(var Xt=0;Xt<Dt;Xt++){var zt=Et[Xt],re=$d(zt,zt.actualBounds);t:{for(var le=2/ut,fe=4/ut,me=0;me<kt;me++){var Ge=ot[me];if(Ge.width!==0&&Ge.height!==0&&re.Vu(Ge.x-le,Ge.y-le,Ge.width+fe,Ge.height+fe)){re=!0;break t}}re=!1}re&&tt.Oj(b,zt,this,ft,ut,yt,!0)}He.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()}Mn(E),Mn(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 kt=a.ku,Dt=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var Xt=a.documentBounds,zt=0,re=0,le=0,fe=0,me=ut.width,Ge=ut.height,Jn=a.rj;a.contentAlignment.sb()?(Xt.width>me&&(zt=Jn.left,re=Jn.right),Xt.height>Ge&&(le=Jn.top,fe=Jn.bottom)):(zt=Jn.left,re=Jn.right,le=Jn.top,fe=Jn.bottom);var yi=Xt.width+zt+re,di=Xt.height+le+fe;Jn=a.scale;var Hn=yi>ot/Jn,vn=di>lt/Jn;if(!(z||a.gf||a.Be||Hn||vn))return!0;zt=Xt.x-zt,ot=ut.x,re=Xt.right+re,lt=ut.right+tt,le=Xt.y-le;var ur=ut.y;Xt=Xt.bottom+fe,ut=ut.bottom+rt;var tr="1px";if(fe="1px",a.scrollMode===yA&&(Hn||vn)&&(Hn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Hn=1,zt+1<ot&&(Hn=Math.max((ot-zt)*Jn+a.Aa,Hn)),re>lt+1&&(Hn=Math.max((re-lt)*Jn+a.Aa,Hn)),me+tt+1<yi&&(Hn=Math.max((yi-me)*Jn+a.Aa,Hn)),tr=Hn.toString()+"px"),vn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Hn=1,le+1<ur&&(Hn=Math.max((ur-le)*Jn+a.ya,Hn)),Xt>ut+1&&(Hn=Math.max((Xt-ut)*Jn+a.ya,Hn)),Ge+rt+1<di&&(Hn=Math.max((di-Ge)*Jn+a.ya,Hn)),fe=Hn.toString()+"px")),Hn=tr!=="1px",vn=fe!=="1px",Hn&&vn||!Hn&&!vn||(vn&&(lt-=a.Db),Hn&&(ut-=a.Db),yi<me+tt||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(tt=1,zt+1<ot&&(tt=Math.max((ot-zt)*Jn+a.Aa,tt)),re>lt+1&&(tt=Math.max((re-lt)*Jn+a.Aa,tt)),me+1<yi&&(tt=Math.max((yi-me)*Jn+a.Aa,tt)),tr=tt.toString()+"px"),Hn=tr!=="1px",tt=a.ya,Hn!==a.Be&&(tt=Hn?a.ya-a.Db:a.ya+a.Db),di<Ge+rt||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(rt=1,le+1<ur&&(rt=Math.max((ur-le)*Jn+tt,rt)),Xt>ut+1&&(rt=Math.max((Xt-ut)*Jn+tt,rt)),Ge+1<di&&(rt=Math.max((di-Ge)*Jn+tt,rt)),fe=rt.toString()+"px"),vn=fe!=="1px"),a.qr&&Hn===a.Be&&vn===a.gf)return x===a.Aa&&E===a.ya||a.bd(),!1;if(Hn!==a.Be&&(tr==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=Hn,Dt.style.width=tr,vn!==a.gf&&(fe==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(rt=Ut.alloc(),vn?(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)),Ut.free(rt))),z&&$l(a),a.gf=vn,Dt.style.height=fe,a.gu=!0,z&&(a.pn=!0),y=kt.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(me+1<yi?y=(a.position.x-zt)*Jn:zt+1<ot?y=kt.scrollWidth-kt.clientWidth:re>lt+1&&(y=a.position.x*Jn)),a.tn)switch(a.bu){case"negative":y=-(kt.scrollWidth-y-kt.clientWidth);break;case"reverse":y=kt.scrollWidth-y-kt.clientWidth}return kt.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Ge+1<di?kt.scrollTop=(a.position.y-le)*Jn:le+1<ur?kt.scrollTop=kt.scrollHeight-kt.clientHeight:Xt>ut+1&&(kt.scrollTop=a.position.y*Jn)),ot=a.Aa,lt=a.ya,kt.style.width=ot+(a.gf?a.Db:0)+"px",kt.style.height=lt+(a.Be?a.Db:0)+"px",x!==ot||E!==lt||a.animationManager.zb?(x=He.allocAt(b,ft,yt,Et),a.onViewportBoundsChanged(x,a.viewportBounds,Jn,z),He.free(x),!1):!0}Tt=Ke.prototype,Tt.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)}},Tt.oi=function(a){this.partManager.oi(a);var y=this;Nu(a,function(x){vA(y,x)}),(a instanceof Vr||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()},Tt.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()},Tt.remove=function(a){Pf(this,a,!0)};function Pf(a,y,x){var E=y.layer;E!==null&&E.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=E.pc(-1,y,!1),0<=x&&a.cb(cs,"parts",E,y,null,x,null),a=y.layerChanged,a!==null&&a(y,E,null))}Tt.Is=function(a,y){if(y===void 0&&(y=!1),qn(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 Se,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},Tt.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},Ke.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(qn(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 $n){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 Rn)for(y.add(x,a.Pd(b,x)),x=x.labelNodes;x.next();)Yu(a,y,x.value,E,b);else x instanceof Vr||y.add(x,a.Pd(b,x,x.location))}function Bh(a,y,x,E,b){if(y!==null&&y.count!==0){var z=Ut.alloc(),tt=Ut.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=wn(),ot=wn(),lt=y.iterator,ut=Ut.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 Ut),yt.shifted.assign(ut.re(Et)))}else lt.key instanceof Rn&&ot.push(lt.sa)}for(Ut.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 Ut),ft.node.location=z.add(ft.Su.shifted);for(b=Ut.alloc(),lt=Ut.alloc(),ft=ot.length,yt=0;yt<ft;yt++){var kt=ot[yt];if(Et=kt.key,Et instanceof Rn)if(Et.suspendsRouting){Et.Tg=null,ut=Et.fromNode;var Dt=Et.toNode;if(a.draggedLink!==null&&E.dragsLink)if(Dt=kt.value.point,Et.dragComputation===null)y.add(Et,a.Pd(E,Et,tt)),Sc(Et,tt.x-Dt.x,tt.y-Dt.y);else{kt=Ut.allocAt(0,0),(ut=Et.i(0))&&ut.w()&&kt.assign(ut);var Xt=ut=Ut.alloc().assign(kt).add(tt);E.isGridSnapEnabled&&(E.isGridSnapRealtime||a.lastInput.up)&&(Xt=Ut.alloc(),Jc(a,Et,ut,Xt,E)),ut.assign(Et.dragComputation(Et,ut,Xt)).re(kt),y.add(Et,a.Pd(E,Et,ut)),Sc(Et,ut.x-Dt.x,ut.y-Dt.y),Ut.free(kt),Ut.free(ut),Xt!==ut&&Ut.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&&lt.re(Xt.point)),ut!==null&&Dt!==null?b.Xa(lt)?(ut=kt.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()):(kt=kt.value.point,ut=ut!==null?b:Dt!==null?lt:tt,y.add(Et,a.Pd(E,Et,ut)),Sc(Et,ut.x-kt.x,ut.y-kt.y))}else(Et.fromNode===null||Et.toNode===null)&&(ut=kt.value.point,y.add(Et,a.Pd(E,Et,tt)),Sc(Et,tt.x-ut.x,tt.y-ut.y))}Ut.free(z),Ut.free(tt),Ut.free(b),Ut.free(lt),Mn(rt),Mn(ot),x||(oa(a),VA(a,y))}}Ke.prototype.computeMove=function(a,y,x,E){if(E===void 0&&(E=new Ut),E.assign(y),a===null)return E;var b=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(b=Ut.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&&Ut.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=Ut.allocAt(0,0),z.yi(0,0,a,y,b),we.No(x.x,x.y,rt+z.x,tt+z.y,a,y,E),Ut.free(z)}}function qc(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Rn&&(y.suspendsRouting=!0)}function VA(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Rn&&(x.suspendsRouting=!1,Av(x)&&x.bb())}a.Mr=!1}}function $c(a,y,x){return y=y.containingGroup,y!==null&&(a=$c(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}Tt=Ke.prototype,Tt.Pd=function(a,y,x){if(x===void 0)return new Ju(pn);var E=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(E=!1),E?new Ju(new Ut(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.")}}Tt.Al=function(a){Ff(this,a,null),a.Xe(this);var y=this.Wa,x=y.count-1;if(!a.isTemporary)for(;0<=x&&y.M(x).isTemporary;)x--;return y.Gb(x+1,a),this.cc!==null&&this.cb(is,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},Tt.Ww=function(a,y){Ff(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(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},Tt.Cy=function(a,y){Ff(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(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},Tt.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()}}},Tt.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},Tt.Yw=function(a){return this.pf===null&&(this.pf=new ee),this.pf.add(a),this.model.Pe(a),this},Tt.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},Tt.Pe=function(a){return this.zg===null&&(this.zg=new ee),this.zg.add(a),this},Tt.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},Tt.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==ea&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,E=0;E<x;E++)y.M(E)(a)},Tt.cb=function(a,y,x,E,b,z,tt){z===void 0&&(z=null),tt===void 0&&(tt=null);var rt=new 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)},Tt.g=function(a,y,x,E,b){this.cb(No,a,this,y,x,E,b)},Ke.prototype.changeState=function(a,y){if(a!==null&&a.diagram===this){var x=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var E=a.change;if(E===No){var b=a.object;if(Ro(b,a.propertyName,a.I(y)),b instanceof ve){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 Fn)if(typeof rt=="number"&&ot instanceof ve){y?tt.pc(rt):tt.Gb(rt,ot);var lt=tt.part;lt!==null&&lt.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 Ui&&(y?(ot.isSelected=!1,ot.isHighlighted=!1,ot.Wb(),tt.pc(ut?rt:-1,ot,ut)):tt.oi(rt,ot,ut))}else tt instanceof Ke?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 Fn)typeof yt=="number"&&Et instanceof ve?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 kt=a.newParam===!0;typeof yt=="number"&&Et instanceof Ui&&(y?0>ft.Pa.indexOf(Et)&&ft.oi(yt,Et,kt):(Et.isSelected=!1,Et.isHighlighted=!1,Et.Wb(),ft.pc(kt?yt:-1,Et,kt)))}else ft instanceof Ke?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}}},Ke.prototype.Ea=function(a){return this.undoManager.Ea(a)},Ke.prototype.eb=function(a){return this.undoManager.eb(a)},Ke.prototype.Kf=function(){return this.undoManager.Kf()},Ke.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}},Ke.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},Ke.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=Ut.allocAt(a.pa.x+rt/y-rt/x,a.pa.y+ot/y-ot/x),a.position=z,Ut.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))}}Ke.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/we.vx(z,ut):b=b*ut/we.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=He.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){He.free(y);return}b=y.width,z=y.height,a=y.x,tt=y.y,He.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=Ut.alloc(),we.No(a,tt,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),cn.free(E),x.part.location=y,Ut.free(y)}}Ke.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)}},Ke.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))},Ke.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),qn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];E instanceof Ui||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 Ui||he("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},Ke.prototype.clearHighlighteds=function(){var a=this.highlighteds;if(0<a.count){for(var y=a.Fa(),x=y.length,E=0;E<x;E++)y[E].isHighlighted=!1;a.ka(),a.clear(),a.freeze()}},Tt=Ke.prototype,Tt.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},Tt.Jz=function(a){a=new Se().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 Ui||he("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},Tt.scroll=function(a,y,x){x===void 0&&(x=1);var E=y==="up"||y==="down",b=0,z=Ut.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)),Ut.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),Ut.free(z)},Tt.tv=function(a){var y=this.viewportBounds;y.Re(a)||(a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a)},Tt.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},Tt.op=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),a.copy().transform(this.Ab)},Tt.zA=function(a){var y=this.Ab,x=a.x,E=a.y,b=x+a.width,z=E+a.height,tt=y.m11,rt=y.m12,ot=y.m21,lt=y.m22,ut=y.dx,ft=y.dy,yt=x*tt+E*ot+ut;y=x*rt+E*lt+ft;var 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 He(z,Et,yt-z,y-Et)},Tt.Ps=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),mn(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 Ao}Ke.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;ze(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 Se&&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 Se&&x.Bg.remove(a),Bg(E));break}}}}}Ke.prototype.Wd=function(){this.partManager.Wd()},Ke.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},Ke.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},Ke.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},Ke.prototype.Vb=function(a){return this.partManager.Vb(a)},Ke.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Tt=Ke.prototype,Tt.Lc=function(a){return this.partManager.Lc(a)},Tt.ii=function(a){return this.partManager.ii(a)},Tt.Kc=function(a){return this.partManager.Kc(a)},Tt.ms=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ms.apply(this.partManager,y instanceof Array?y:Yr(Zi(y)))},Tt.ls=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ls.apply(this.partManager,y instanceof Array?y:Yr(Zi(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())}Tt.Va=function(){if(this.Zi){var a=He.alloc();Rd(this,this.computeBounds(a)),He.free(a)}},Tt.rz=function(){for(var a=new Se,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&a.add(x)}for(y=this.links;y.next();)x=y.value,x.isTopLevel&&a.add(x);return a.iterator},Tt.qz=function(){return this.ai.iterator},Tt.Uz=function(a){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)}}Tt.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)}Tt.Bj=function(a,y){return a=_d(this,a),a!==null&&a.add(y),this},Tt.am=function(a,y){a=_d(this,a),a!==null&&a.remove(y)},Tt.R=function(a,y,x){var E=_d(this,a),b=new 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}Tt.Yj=function(a,y){return ed(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},Ke.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=He.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)}He.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),b.initialize(y)),y=He.alloc(),z=x.memberParts;z.next();)tt=z.value,tt instanceof $n&&oc(a,tt,E,y);He.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 $n&&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)}Ke.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=ze(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=He.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Rd(a,y),He.free(y),a.Fc=!0,a.bd(),kf(a))}},a.vp))}Ke.prototype.ug=function(){this.vk!==-1&&(Dn.clearTimeout(this.vk),this.vk=-1)},Ke.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=He.allocAt(0,0,E.width*b,E.height*b);var z=Ut.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(pn)||(y=new Ut(y.x+z.x/b,y.y+z.y/b)),He.free(E),Ut.free(z),y},Tt=Ke.prototype,Tt.Cs=function(){return null},Tt.av=function(){return null},Tt.bs=function(a,y){this.pj.add(a,y)},Tt.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof 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):Dn.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 Dn.requestAnimationFrame(function(){E()}),null}Tt.Wz=function(a){return Yo?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Tt.Jx=function(a){return a===void 0&&(a={}),nd(this,this.Xz,a)},Tt.Xz=function(a,y,x){var E=mg(x,a,"canvas",null);if(E===null)return null;x=E.Z.canvas;var b=null;if(x!==null)switch(b=a.returnType,b===void 0?b="string":b=b.toLowerCase(),b){case 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,kt=y.showTemporary;kt===void 0&&(kt=!ft),y=y.showGrid,y===void 0&&(y=kt),b!==null&&isNaN(b.width)&&isNaN(b.height)&&(b=null),typeof lt=="number"?lt=new lr(lt):lt instanceof lr||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,kt,y),E.context):(a.Xm=!1,$h(a,Dt,lt,new cn(ft.width,ft.height),a.Ca,a.pa,ot,ut,kt,y),a.Xm=!0,ft.context);var Xt=a.Pp,zt=a.documentBounds.copy();if(zt.Fv(a.yb),kt)for(var re=a.Wa.s,le=re.length,fe=0;fe<le;fe++){var me=re[fe];if(me.visible&&me.isTemporary){me=me.Pa.s;for(var Ge=me.length,Jn=0;Jn<Ge;Jn++){var yi=me[Jn];yi.isInDocumentBounds&&yi.isVisible()&&(yi=yi.actualBounds,yi.w()&&zt.ed(yi))}}}if(re=new Ut(zt.x,zt.y),ot!==null){for(le=new He(0,0,0,0),fe=!0,me=ot.iterator,me.reset();me.next();)Ge=me.value,Ge instanceof Ui&&(Jn=Ge.layer,Jn!==null&&!Jn.visible||Jn!==null&&!kt&&Jn.isTemporary||!Ge.isVisible()||(Ge=Ge.actualBounds,Ge.w()&&(fe?(fe=!1,le.assign(Ge)):le.ed(Ge))));zt.width=le.width,zt.height=le.height,re.x=le.x,re.y=le.y}return rt!==null&&rt.w()&&(re=rt,z||(z=Xt)),le=rt=0,lt!==null&&(rt=lt.left+lt.right,le=lt.top+lt.bottom),fe=me=0,b!==null&&(me=b.width,fe=b.height,isFinite(me)&&(me=Math.max(0,me-rt)),isFinite(fe)&&(fe=Math.max(0,fe-le))),b!==null&&z!==null?(z==="NaN"&&(z=Xt),b.w()?(b=me,zt=fe):isNaN(fe)?(b=me,zt=zt.height*z):(b=zt.width*z,zt=fe)):b!==null?b.w()?(z=Math.min(me/zt.width,fe/zt.height),b=me,zt=fe):isNaN(fe)?(z=me/zt.width,b=me,zt=zt.height*z):(z=fe/zt.height,b=zt.width*z,zt=fe):z!==null?z==="NaN"&&tt.w()?(z=Math.min((tt.width-rt)/zt.width,(tt.height-le)/zt.height),z>Xt?(z=Xt,b=zt.width,zt=zt.height):(b=tt.width,zt=tt.height)):(b=zt.width*z,zt=zt.height*z):(z=Xt,b=zt.width,zt=zt.height),lt!==null?(b+=rt,zt+=le):lt=new lr(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)&&(zt=Math.min(zt,tt))),ft.width=Math.ceil(b),ft.height=Math.ceil(zt),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(zt)),z,re,ot,ut,kt,y),E.context):(a.Xm=!1,$h(a,Dt,lt,new cn(Math.ceil(b),Math.ceil(zt)),z,re,ot,ut,kt,y),a.Xm=!0,ft.context)}Ue.Object.defineProperties(Ke.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,Dn.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,Dn.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(Dn,"resize",this.Ov,!1),this.removeEventListener(Dn,"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)&&Yn(a,"0 <= value <= 1",Ke,"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&&Yn(a,">= 0",Ke,"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&&Yn(a,">= 0",Ke,"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 Yn(a,">= 0",Ke,"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(Dn,"pointermove",this.dk,!0),this.addEventListener(Dn,"pointerdown",this.ui,!0),this.addEventListener(Dn,"pointerup",this.fk,!0),this.addEventListener(Dn,"pointerout",this.ek,!0),this.addEventListener(Dn,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(Dn,"wheel",this.$j,!0),this.addEventListener(Dn,"selectstart",this.preventDefault,!1)):(this.removeEventListener(Dn,"pointermove",this.dk,!0),this.removeEventListener(Dn,"pointerdown",this.ui,!0),this.removeEventListener(Dn,"pointerup",this.fk,!0),this.removeEventListener(Dn,"pointerout",this.ek,!0),this.removeEventListener(Dn,"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(Dn,"wheel",this.$j,!0),this.removeEventListener(Dn,"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=Ut.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)}Ut.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!==Fn.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 lr(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)):Yn(a,"> 0",Ke,"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)):Yn(a,"> 0",Ke,"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 lr(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 lr(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Ue.Object.defineProperties(Ke,{licenseKey:{get:function(){return Vd.jc()},set:function(a){Vd.add(a.replace(/\s/g,""))}},version:{get:function(){return Js}}}),Ke.prototype.makeImageData=Ke.prototype.Jx,Ke.prototype.makeImage=Ke.prototype.Wz,Ke.prototype.cacheGroupExternalLinks=Ke.prototype.Fu,Ke.prototype.addRenderer=Ke.prototype.bs,Ke.prototype.makeSVG=Ke.prototype.av,Ke.prototype.makeSvg=Ke.prototype.Cs,Ke.prototype.stopAutoScroll=Ke.prototype.ug,Ke.prototype.doAutoScroll=Ke.prototype.gs,Ke.prototype.isUnoccupied=Ke.prototype.Yj,Ke.prototype.raiseDiagramEvent=Ke.prototype.R,Ke.prototype.removeDiagramListener=Ke.prototype.am,Ke.prototype.addDiagramListener=Ke.prototype.Bj,Ke.prototype.findTreeRoots=Ke.prototype.yz,Ke.prototype.layoutDiagram=Ke.prototype.Uz,Ke.prototype.findTopLevelGroups=Ke.prototype.qz,Ke.prototype.findTopLevelNodesAndLinks=Ke.prototype.rz,Ke.prototype.ensureBounds=Ke.prototype.Va,Ke.prototype.findLinksByExample=Ke.prototype.ls,Ke.prototype.findNodesByExample=Ke.prototype.ms,Ke.prototype.findLinkForData=Ke.prototype.Kc,Ke.prototype.findNodeForData=Ke.prototype.ii,Ke.prototype.findPartForData=Ke.prototype.Lc,Ke.prototype.findLinkForKey=Ke.prototype.findLinkForKey,Ke.prototype.findNodeForKey=Ke.prototype.Vb,Ke.prototype.findPartForKey=Ke.prototype.findPartForKey,Ke.prototype.rebuildParts=Ke.prototype.Wd,Ke.prototype.transformViewToDoc=Ke.prototype.Ps,Ke.prototype.transformRectDocToView=Ke.prototype.zA,Ke.prototype.transformDocToView=Ke.prototype.op,Ke.prototype.centerRect=Ke.prototype.es,Ke.prototype.scrollToRect=Ke.prototype.tv,Ke.prototype.scroll=Ke.prototype.scroll,Ke.prototype.highlightCollection=Ke.prototype.Jz,Ke.prototype.highlight=Ke.prototype.Iz,Ke.prototype.selectCollection=Ke.prototype.rA,Ke.prototype.select=Ke.prototype.select,Ke.prototype.updateAllRelationshipsFromData=Ke.prototype.rp,Ke.prototype.updateAllTargetBindings=Ke.prototype.updateAllTargetBindings,Ke.prototype.commit=Ke.prototype.commit,Ke.prototype.rollbackTransaction=Ke.prototype.Kf,Ke.prototype.commitTransaction=Ke.prototype.eb,Ke.prototype.startTransaction=Ke.prototype.Ea,Ke.prototype.raiseChanged=Ke.prototype.g,Ke.prototype.raiseChangedEvent=Ke.prototype.cb,Ke.prototype.removeChangedListener=Ke.prototype.ik,Ke.prototype.addChangedListener=Ke.prototype.Pe,Ke.prototype.removeModelChangedListener=Ke.prototype.mA,Ke.prototype.addModelChangedListener=Ke.prototype.Yw,Ke.prototype.findLayer=Ke.prototype.Qj,Ke.prototype.removeLayer=Ke.prototype.kA,Ke.prototype.addLayerAfter=Ke.prototype.Cy,Ke.prototype.addLayerBefore=Ke.prototype.Ww,Ke.prototype.addLayer=Ke.prototype.Al,Ke.prototype.moveParts=Ke.prototype.moveParts,Ke.prototype.copyParts=Ke.prototype.Kj,Ke.prototype.removeParts=Ke.prototype.Is,Ke.prototype.remove=Ke.prototype.remove,Ke.prototype.add=Ke.prototype.add,Ke.prototype.clearDelayedGeometries=Ke.prototype.bx,Ke.prototype.setProperties=Ke.prototype.nm,Ke.prototype.attach=Ke.prototype.Du,Ke.prototype.set=Ke.prototype.set,Ke.prototype.resetInputOptions=Ke.prototype.Sx,Ke.prototype.setInputOption=Ke.prototype.sA,Ke.prototype.getInputOption=Ke.prototype.Ql,Ke.prototype.resetRenderingHints=Ke.prototype.Tx,Ke.prototype.setRenderingHint=Ke.prototype.Xx,Ke.prototype.getRenderingHint=Ke.prototype.Gf,Ke.prototype.maybeUpdate=Ke.prototype.bd,Ke.prototype.requestUpdate=Ke.prototype.$b,Ke.prototype.delayInitialization=Ke.prototype.Xy,Ke.prototype.isUpdateRequested=Ke.prototype.Pz,Ke.prototype.invalidateDocumentBounds=Ke.prototype.Ya,Ke.prototype.findObjectsNear=Ke.prototype.og,Ke.prototype.findPartsNear=Ke.prototype.mz,Ke.prototype.findObjectsIn=Ke.prototype.Cf,Ke.prototype.findPartsIn=Ke.prototype.ux,Ke.prototype.findObjectsAt=Ke.prototype.ji,Ke.prototype.findPartsAt=Ke.prototype.lz,Ke.prototype.findObjectAt=Ke.prototype.ic,Ke.prototype.findPartAt=Ke.prototype.Ol,Ke.prototype.focusObject=Ke.prototype.zz,Ke.prototype.alignDocument=Ke.prototype.Jy,Ke.prototype.zoomToRect=Ke.prototype.BA,Ke.prototype.zoomToFit=Ke.prototype.zoomToFit,Ke.prototype.diagramScroll=Ke.prototype.kx,Ke.prototype.focus=Ke.prototype.focus;var Gd=new Qe,Tf=null,Yo=Dn.document!==void 0,Fh=null,WA="",ca=new rn(Ke,"None",0),rl=new rn(Ke,"Uniform",1),ZA=new rn(Ke,"UniformToFill",2),id=new rn(Ke,"CycleAll",10),sc=new rn(Ke,"CycleNotDirected",11),ac=new rn(Ke,"CycleNotDirectedFast",12),zd=new rn(Ke,"CycleNotUndirected",13),jd=new rn(Ke,"CycleDestinationTree",14),Nf=new rn(Ke,"CycleSourceTree",15),yA=new rn(Ke,"DocumentScroll",1),lc=new rn(Ke,"InfiniteScroll",2),YA=new rn(Ke,"TreeParentCollapsed",21),Cs=new rn(Ke,"AllParentsCollapsed",22),wA=new rn(Ke,"AnyParentsCollapsed",23),Vd=new ee,Js="2.3.10",hu="image",Xu=null,xA=!1;function Os(){if(Yo){var a=Dn.document.createElement("canvas"),y=a.getContext("2d"),x=en("7ca11abfd022028846");y[x]=en("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",Ai.Dx+"4ae6247590da4bb21c324ba3a84e385776",er.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",we.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")&&(er.prototype.Cd=er.prototype.Eu),Xu=a}}Ke.className="Diagram",Ke.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=Dn.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof Ke?y.H:null},Ke.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},Ke.useDOM=function(a){Yo=a?Dn.document!==void 0:!1},Ke.isUsingDOM=function(){return Yo},Ke.None=ca,Ke.Uniform=rl,Ke.UniformToFill=ZA,Ke.CycleAll=id,Ke.CycleNotDirected=sc,Ke.CycleNotDirectedFast=ac,Ke.CycleNotUndirected=zd,Ke.CycleDestinationTree=jd,Ke.CycleSourceTree=Nf,Ke.DocumentScroll=yA,Ke.InfiniteScroll=lc,Ke.TreeParentCollapsed=YA,Ke.AllParentsCollapsed=Cs,Ke.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=Dn[en("76a715b2f73f148a")][en("72ba13b5")]||"";if(a.Rc=!0,Yo){var E=Ke[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=Dn[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=Dn[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=Dn.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,Dn.document[en("78a712aa")]){Dn.document[en("78a712aa")][en("7bb806b6ed32388c4a875b")](tt),ot=Dn.getComputedStyle(tt).getPropertyValue(en("78a704b7e62456904c9b12701b6532a8"));var lt=Dn.getComputedStyle(tt).getPropertyValue(en("75b817b0ea2202"));if(Dn.document[en("78a712aa")][en("68ad1bbcf533388c4a875b")](tt),ot){if(tt=Dn[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 Ut:a,this.o=new Ut}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 Ut(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"||Dn.Element&&a instanceof Element)var x=Ke.call(this,a)||this;else x=Ke.call(this)||this,y=a;return ht(x),y&&x.nm(y),x}Re(dt,Ke);function ht(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=xo,a.layout=new sa}dt.prototype.reset=function(){Ke.prototype.reset.call(this),ht(this)},dt.className="Palette";function gt(a,y){if(typeof a=="string"||Dn.Element&&a instanceof Element)var x=Ke.call(this,a)||this;else x=Ke.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 Ui;var b=new vr;return b.stroke="magenta",b.strokeWidth=2,b.fill="transparent",b.name="BOXSHAPE",a.selectable=!0,a.selectionAdorned=!1,a.selectionObjectName="BOXSHAPE",a.locationObjectName="BOXSHAPE",a.resizeObjectName="BOXSHAPE",a.cursor="move",a.add(b),x.j=a,x.allowCopy=!1,x.allowDelete=!1,x.allowSelect=!0,x.autoScrollRegion=new lr(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new qt,x.toolManager.mouseMoveTools),x.click=function(){var z=E.observed;if(z!==null){var tt=z.viewportBounds,rt=E.lastInput.documentPoint;z.position=new Ut(rt.x-tt.width/2,rt.y-tt.height/2)}},x.Pf=function(){E.Ya(),Kt(E)},x.Xd=function(){E.observed!==null&&(E.Ya(),E.N())},x.Ha=function(){1>E.updateDelay?E.N():E.o||(E.o=!0,setTimeout(function(){return E.redraw()},E.updateDelay))},x.Of=function(){E.observed!==null&&Kt(E)},x.autoScale=rl,x.vb=!1,y&&Object.assign(x,y),x}Re(gt,Ke),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}}}Ke.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=He.alloc().assign(a.viewportBounds).ed(y.viewportBounds),bu(y,b),He.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&&lt.layer===rt&&(rt=mA(rt,b),lt.gc(b,ot),b.globalAlpha=rt);else{for(var ut=mA(rt,b),ft=ot.scale,yt=He.alloc(),Et=rt.Pa.s,kt=Et.length,Dt=0;Dt<kt;Dt++){var Xt=Et[Dt];(E||Xt!==lt)&&rt.Oj(b,Xt,ot,null,ft,yt,!1)}He.free(yt),b.globalAlpha=ut}}}}}function Kt(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var E=y.selectionObject,b=cn.alloc();b.h(x.width,x.height),E.desiredSize=b,cn.free(b),a=2/a.scale,E instanceof vr&&(E.strokeWidth=a),y.location=new Ut(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(),Kt(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.Oz=E,this.R("ViewportBoundsChanged",this.fc,a))},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),Kt(this),this.N();this.g("observed",y,a)}}},box:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.remove(y),this.add(this.j),Kt(this),this.g("box",y,a))}},drawsTemporaryLayers:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a,this.redraw())}},drawsGrid:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a,this.redraw())}},updateDelay:{get:function(){return this.ia},set:function(a){0>a&&(a=0),this.ia!==a&&(this.ia=a)}}}),gt.className="Overview";function qt(){Ho.call(this),this.j=null}Re(qt,Ho),qt.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 Ut(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new Ut(a.x-this.j.x,a.y-this.j.y)),!0)},qt.prototype.doActivate=function(){this.j=null,Ho.prototype.doActivate.call(this)},qt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},qt.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 Ut(E.x-x.x,E.y-x.y)}a=a.lastInput.documentPoint,y.position=new Ut(a.x-this.j.x,a.y-this.j.y)}}},qt.className="OverviewDraggingTool";function Yt(){An(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 Se,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 Se;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 Se,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 Ut(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 $n&&ot.isTreeExpanded&&(!(ot instanceof hr)||ot.isSubGraphExpanded);)ot=b.pop();0<b.length?(ot instanceof Ui&&y.tv(ot.actualBounds),ot instanceof $n&&!ot.isTreeExpanded&&(ot.isTreeExpanded=!0),ot instanceof hr&&!ot.isSubGraphExpanded&&(ot.isSubGraphExpanded=!0)):(ot instanceof Ui&&y.es(ot.actualBounds),y.am("LayoutCompleted",tt)),y.eb("Scroll To Part")},tt=function(){ze(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 Vr)pe(a,y.adornedPart,x);else if(y instanceof Rn){var E=y.fromNode;E!==null&&pe(a,E,x),y=y.toNode,y!==null&&pe(a,y,x)}else y instanceof $n&&(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 Ui)?!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 $n&&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 $n&&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 $n&&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 $n&&!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 $n)||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 $n&&!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);ln(Et)&&(y.xf(Et),E=a.ii(Et))}if(E!==null){ft!==null&&this.isValidMember(ft,E)&&(E.containingGroup=ft);for(var kt=rt.iterator;kt.next();){var Dt=kt.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 Je(a){var y=wn();for(a=a.iterator;a.next();){var x=a.value;x instanceof Rn||y.push(x)}a=new Se,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 Mn(y),a}Yt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Rn)return!1;if(a!==null){if(a===y||a.Td(y))return!1;var x=a.memberValidation;if(x!==null&&!x(a,y)||a.data===null&&y.data!==null||a.data!==null&&y.data===null)return!1}return x=this.memberValidation,x!==null?x(a,y):!0},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&&lt.data!==null?x.wa(lt.data):void 0;tt.addAll(ot.memberParts);for(var ft=tt.iterator;ft.next();){var yt=ft.value;if(yt.isSelected=!0,!(yt instanceof Rn)){var 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=Je(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 ve?b=a.ga(Pr):y.viewportBounds.ca(E.documentPoint)||(b=y.viewportBounds,b=new Ut(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 Rn&&(y=a.fromNode,y===null||E.contains(y)?(y=a.toNode,y===null||E.contains(y)||E.remove(a)):E.remove(a));return E},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 ve(){An(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Ut(NaN,NaN).freeze(),this.jd=Er,this.Ab=new er,this.wh=new er,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=zi,this.uc=new He(NaN,NaN,NaN,NaN).freeze(),this.Ib=new He(NaN,NaN,NaN,NaN).freeze(),this.dc=new He(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 Ln,Bn,Bi,Li,ji,or,Mr,Sr,Hr,uo;ve.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=li(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},ve.prototype.Vw=function(a){var y=this.Dh;if(qn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},ve.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},ve.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},ve.prototype.copy=function(){return this.clone()},Tt=ve.prototype,Tt.qb=function(a){a.classType===Rn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:he("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===ve&&(this.stretch=a)},Tt.toString=function(){return ii(this.constructor)+"#"+Vn(this)},Tt.th=function(){this.A!==null&&(this.A.nc=!0)};function wr(a){a.A===null?a.A=new hc:a.A.nc&&(a.A=a.A.copy())}Tt.Xc=function(){if(this.ba===null){var a=new If;a.Xi=Ar,a.yj=Ar,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},Tt.cb=function(a,y,x,E,b,z,tt){var rt=this.part;if(rt!==null&&(rt.gk(a,y,x,E,b,z,tt),x===this&&a===No&&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 Fn&&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 Fn&&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))}}Tt.ks=function(a){return this.bindingId===a?this:null},Tt.g=function(a,y,x){this.cb(No,a,this,y,x)},Tt.Ge=function(a,y,x,E){var b=this.uc;if(b.h(a,y,x,E),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new er);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))}Tt.tx=function(a,y,x){if(this.pickable===!1)return!1;var E=this.naturalBounds;return y=a.Bf(y),x?xn(a.x,a.y,0,0,0,E.height)<=y||xn(a.x,a.y,0,E.height,E.width,E.height)<=y||xn(a.x,a.y,E.width,E.height,E.width,0)<=y||xn(a.x,a.y,E.width,0,0,0)<=y:a.zd(0,0)<=y&&a.zd(0,E.height)<=y&&a.zd(E.width,0)<=y&&a.zd(E.width,E.height)<=y},Tt.se=function(){return!0},Tt.ca=function(a){var y=Ut.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return Ut.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=co(x.x-tt*ot,x.y-tt*ot,x.width+z*ot,x.height+z*ot,y.x,y.y),Ut.free(y),a}return b=!1,(this instanceof Vr||this instanceof vr?co(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)),Ut.free(y),b},Tt.gh=function(a){var y=this.naturalBounds;return co(0,0,y.width,y.height,a.x,a.y)},Tt.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=He.allocAt(0,0,y.width,y.height);var x=this.transform,E=!1,b=Ut.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)))),Ut.free(b),He.free(y),E},Tt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,E=!1,b=Ut.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)))),Ut.free(b),E},Tt.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,E=Ut.allocAt(0,0),b=Ut.allocAt(0,x.height),z=Ut.allocAt(x.width,x.height),tt=Ut.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=He.allocAt(0,0,x.width,x.height);var ot=Ut.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)))),Ut.free(ot),He.free(x),!rt&&(we.us(a,E,b)||we.us(a,b,z)||we.us(a,z,tt)||we.us(a,tt,E))&&(rt=!0)}return Ut.free(E),Ut.free(b),Ut.free(z),Ut.free(tt),rt},Tt.ga=function(a,y){if(y===void 0&&(y=new Ut),a instanceof _n){var x=this.naturalBounds;y.h(a.x*x.width+a.offsetX,a.y*x.height+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},Tt.mi=function(a){a===void 0&&(a=new He);var y=this.naturalBounds,x=this.oe,E=Ut.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),Ut.free(E),a},Tt.li=function(){var a=this.oe;return a.m11===1&&a.m12===0?a=0:(a=180*Math.atan2(a.m12,a.m11)/Math.PI,0>a&&(a+=360)),a},Tt.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},Tt.qs=function(a,y){return y===void 0&&(y=new Ut),y.assign(a),this.oe.Cd(y),y},Tt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Tt.Sj=function(a,y,x,E,b){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),rt=z.m22*tt,ot=-z.m12*tt,lt=-z.m21*tt,ut=z.m11*tt,ft=tt*(z.m21*z.dy-z.m22*z.dx),yt=tt*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,we.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=we.Ff(0,0,E.width,E.height,tt,a,y,x,b),b.transform(z),x)},ve.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 Fn;switch(Ua(this,!0)){case Bn:tt=b=0,rt&&(y=a=1/0);break;case Ln:isFinite(a)&&a>x&&(b=a),isFinite(y)&&y>E&&(tt=y);break;case Li:isFinite(a)&&a>x&&(b=a),tt=0,rt&&(y=1/0);break;case ji: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)}},ve.prototype.Wl=function(){},ve.prototype.Dd=function(){return!1},ve.prototype.arrange=function(a,y,x,E,b){this.Uk();var z=He.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),He.free(z)},Tt=ve.prototype,Tt.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=Bn),y){case Bn:(x>E||z>b)&&(Ps(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case Ln:Ps(a,!0),a.measure(E,b,0,0);break;case Li:Ps(a,!0),a.measure(E,z,0,0);break;case ji:Ps(a,!0),a.measure(x,b,0,0)}}}Tt.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||ev(x,!0),this.N(),Qr(a,y)||(x.oh(),this.Pn(x)))},Tt.Pn=function(a){this.portId!==null&&(ev(a,!0),a instanceof $n&&Wy(a,this))},Tt.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 Fn&&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&&lt.type===Br?(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===Br?(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 kt=yt.m11,Dt=yt.m21,Xt=yt.dx,zt=yt.m12,re=yt.m22,le=yt.dy,fe,me=fe=0;yt=fe*kt+me*Dt+Xt;var Ge=fe*zt+me*re+le;fe=Et.width+ft,me=0;var Jn=fe*kt+me*Dt+Xt;fe=fe*zt+me*re+le,me=Math.min(yt,Jn);var yi=Math.min(Ge,fe),di=Math.max(yt+0,Jn)-me,Hn=Math.max(Ge+0,fe)-yi;yt=me,Ge=yi,fe=Et.width+ft,me=Et.height+ft,Jn=fe*kt+me*Dt+Xt,fe=fe*zt+me*re+le,me=Math.min(yt,Jn),yi=Math.min(Ge,fe),di=Math.max(yt+di,Jn)-me,Hn=Math.max(Ge+Hn,fe)-yi,yt=me,Ge=yi,fe=0,me=Et.height+ft,Jn=fe*kt+me*Dt+Xt,fe=fe*zt+me*re+le,me=Math.min(yt,Jn),yi=Math.min(Ge,fe),di=Math.max(yt+di,Jn)-me,Hn=Math.max(Ge+Hn,fe)-yi,yt=me,Ge=yi,ft=y.viewportBounds,Et=ft.x,kt=ft.y,yt=!(yt>ft.width+Et||Et>di+yt||Ge>ft.height+kt||kt>Hn+Ge)}if(yt){if(yt=(this.l&256)!==0,a.clipInsteadOfFill&&(yt=!1),this instanceof Po&&(a.font=this.font),yt){if(Ge=rt.se()?rt.naturalBounds:rt.actualBounds,di=Math.max(tt.x,Ge.x),Hn=Math.max(tt.y,Ge.y),ft=Math.min(tt.right,Ge.right)-di,Et=Math.min(tt.bottom,Ge.bottom)-Hn,kt=this.tb,kt!==null&&(di=kt.x,Hn=kt.y,ft=kt.width,Et=kt.height),di>tt.width+tt.x||tt.x>Ge.width+Ge.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect(di,Hn,ft,Et),a.clip()}if(ut){if(!lt.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}ot&&(Ge=lt.shadowOffset,a.Ev(Ge.x*y.scale*this.scale*y.Mb,Ge.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 Fn)),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===Fn.Auto||y.type===Fn.Spot)&&y.Pb()!==a)}Tt.Dv=function(){};function ml(a,y,x,E){jo(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof no&&a.areaBackground.type===Br?(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===Br?(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===Fn.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 Fn;var rt=a instanceof Fn?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&&lt!==null&&rt!==lt&&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)}Tt.$o=function(a,y,x,E){var b=(this.l&256)!==0;if(a.clipInsteadOfFill&&(b=!1),b){var z=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,z.x),b=Math.max(x.y,z.y);var tt=Math.min(x.right,z.right)-y;x=Math.min(x.bottom,z.bottom)-b,z=this.tb,z!==null&&(y=z.x,b=z.y,tt=z.width,x=z.height),z=E.getAttribute("clip-path");var rt=null;z!==null&&(rt=a.svg.getElementById(z.split("#")[1].slice(0,-1))),rt===null?(z="CLIP"+Qi++,rt=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:b,width:tt,height:x}),this instanceof Fn&&(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 mr(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Zi(y);for(var E=y.next();!E.done;E=y.next())E=x.getElementById(E.value.split("#")[1].slice(0,-1)),E!==null&&E.remove()}a.svg.remove()}}Tt.hh=function(){},Tt.lv=function(){this.Uc=!0},Tt.kk=function(a,y,x){if(this.Uc)return this.lv(),this.Uc=!1;if(y=this.svg,y===null)return!1;if(!this.visible)return y.remove(),!1;if(y.nodeName!=="g"&&x||y.nodeName==="g"&&!x)return!1;var E=this.transform,b=this instanceof Fn?vc(this):!1;if(!(this instanceof Fn&&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 Fn)y.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");else if(this instanceof vr){z=y.getElementsByTagName("path");for(var tt=0;tt<z.length;tt++)z[tt].setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")}else y.lastElementChild.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");return z=this.Dd()?this.opacity*a.globalAlpha:this.opacity,z===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",z.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(z=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(tt=E.copy().Vj(),a.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy],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 Fn))&&(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},Tt.nk=function(a){if(this.background!==null||this.areaBackground!==null)return!0;var y=(this.l&256)!==0;return a.clipInsteadOfFill&&(y=!1),!!y};function 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,kt=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,kt=x.end.y*ot+x.end.offsetY,ft+=Dt,Et+=Dt,yt+=Xt,kt+=Xt,x.type===pr)ut=y.createLinearGradient(ft,yt,Et,kt);else if(x.type===Br)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,kt,Xt);else if(x.type===Ko)try{ut=y.createPattern(x.pattern,"repeat")}catch(re){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 zt=a.diagram;zt!==null&&x.yk===-1&&ze(function(){zt.redraw()},600)}}E?y.fillStyle=ut:y.strokeStyle=ut}}}Tt.rg=function(a){if(a instanceof Fn)t:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break t}y=y.panel}a=!1}else a=!1;return a},Tt.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},Tt.If=function(){for(var a=this instanceof Fn?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)))}Tt.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Ut.alloc();z.yi(y,x,E,b,Pr),a.rotate(this.Kb,z.x,z.y),Ut.free(z)}},Tt.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()}},Tt.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 $n&&a.Bd(),y.$b())),qu(a,!0)}}Tt.Uk=function(){!(this.l&2048)&&(zl(this,!0),Ga(this,!0))},Tt.Wu=function(){Ga(this,!0)},Tt.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===Fn.Table?Xo(a,E.Fb(a.row),E.Eb(a.column),y):E!==null&&E.type===Fn.Auto&&E.Pb()===a?Co(a,Ln,y):x===or?E!==null?E.type===Fn.Spot&&E.Pb()===a?Co(a,Ln,y):(x=E.defaultStretch,x===or?Co(a,Bn,y):Co(a,x,y)):Co(a,Bn,y):Co(a,x,y)}function Xo(a,y,x,E){var b=a.stretch;if(b!==or)return Co(a,b,E);var z=b=null;switch(y.stretch){case ji:z=!0;break;case Ln:z=!0}switch(x.stretch){case Li:b=!0;break;case Ln:b=!0}return y=a.panel.defaultStretch,b===null&&(b=y===Li||y===Ln),z===null&&(z=y===ji||y===Ln),b===!0&&z===!0?Co(a,Ln,E):b===!0?Co(a,Li,E):z===!0?Co(a,ji,E):Co(a,Bn,E)}function Co(a,y,x){if(x)return y;if(y===Bn||(x=a.desiredSize,x.w()))return Bn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===Li)return Bn;if(y===Ln)return ji}else{if(y===ji)return Bn;if(y===Ln)return Li}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===ji)return Bn;if(y===Ln)return Li}else{if(y===Li)return Bn;if(y===Ln)return ji}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}Tt.Gj=function(){this.svg=null},Tt.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},Tt.Av=function(){},Tt.zv=function(a){return this.pa=a,bs(this),!0},Tt.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},Tt.kq=function(){return 0};function Eh(a){var y=a.part;if(y instanceof $n&&(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 Fn?a instanceof $n?a.Bd():a.qm(a,function(x){Eh(x)}):Eh(a))}Tt.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new 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},Tt.set=function(a){return Object.assign(this,a),this},Tt.Du=function(a){return vg(this,a),this},Tt.apply=function(a){return a(this),this},Tt.nm=function(a){return tc(this,a),this},Tt.pz=function(){return this.ih()},Tt.ih=function(){for(var a=this instanceof Fn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},Tt.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new 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=li(arguments),E=z(x),ln(E)||he('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):b=Dn.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 Ke&&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 vr)a.figure=y;else if(a instanceof ll)a.source=y;else if(a instanceof Fn)y=Du.I(y),y!==null&&(a.type=y);else if(a instanceof no){var x=oi(no,y);x!==null?a.type=x:he("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof Un?(y=oi(Un,y),y!==null&&(a.type=y)):a instanceof Kr&&(y=oi(Kr,y),y!==null&&(a.type=y));else if(y instanceof ve)a instanceof Fn||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 rn)typeof a.qb=="function"&&a.qb(y);else if(y instanceof io)a.type=y;else if(y instanceof Fs)a instanceof ve||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 ve?a.Jv(y):he("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Ss)a instanceof Un&&a.type===Un.o?a.figures.add(y):he("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Kr)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 Ke||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 bi;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 bi;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(ve.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:pn},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new Lh),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:or},set:function(a){var y=this.stretch;y!==a&&(wr(this),this.A.hg=a,this.v(),this.g("stretch",y,a))}},name:{get:function(){return this.A!==null?this.A.xa:""},set:function(a){var y=this.name;y!==a&&(wr(this),this.A.xa=a,this.part!==null&&(this.part.Rh=null),this.g("name",y,a))}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&Yn(a,"0 <= value <= 1",ve,"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 Ui)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 Ut(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 vr&&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 vr&&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 vr&&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:ti},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 lr(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:Bn},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&&Yn(a,">= 0",ve,"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&&Yn(a,">= 1",ve,"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&&Yn(a,">= 0",ve,"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&&Yn(a,">= 1",ve,"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 $n||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&&Yn(a,">= 0",ve,"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&&Yn(a,">= 0",ve,"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&&Yn(a,">= 0",ve,"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&&Yn(a,">= 0",ve,"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))}}}),ve.prototype.trigger=ve.prototype.Jv,ve.prototype.findBindingPanel=ve.prototype.ih,ve.prototype.findTemplateBinder=ve.prototype.pz,ve.prototype.setProperties=ve.prototype.nm,ve.prototype.apply=ve.prototype.apply,ve.prototype.attach=ve.prototype.Du,ve.prototype.set=ve.prototype.set,ve.prototype.isEnabledObject=ve.prototype.If,ve.prototype.isVisibleObject=ve.prototype.Ed,ve.prototype.isContainedBy=ve.prototype.rg,ve.prototype.getNearestIntersectionPoint=ve.prototype.rs,ve.prototype.getLocalPoint=ve.prototype.qs,ve.prototype.getDocumentScale=ve.prototype.Df,ve.prototype.getDocumentAngle=ve.prototype.li,ve.prototype.getDocumentBounds=ve.prototype.mi,ve.prototype.getDocumentPoint=ve.prototype.ga,ve.prototype.intersectsRect=ve.prototype.Yc,ve.prototype.containedInRect=ve.prototype.fh,ve.prototype.containsRect=ve.prototype.Re,ve.prototype.containsPoint=ve.prototype.ca,ve.prototype.raiseChanged=ve.prototype.g,ve.prototype.raiseChangedEvent=ve.prototype.cb,ve.prototype.addCopyProperty=ve.prototype.Vw;var Wd=null;ve.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(Fn,Fn.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof Fn){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(vr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new _n(0,0,2.76142374915397,2.761423749153969),spot2:new _n(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 Fn&&(x=E.fb("ButtonBorder"),x instanceof vr)){var b=E._buttonFillOver;E._buttonFillNormal=x.fill,x.fill=b,b=E._buttonStrokeOver,E._buttonStrokeNormal=x.stroke,x.stroke=b}},y.mouseLeave=function(x,E){E.If()&&E instanceof Fn&&(x=E.fb("ButtonBorder"),x instanceof vr&&(x.fill=E._buttonFillNormal,x.stroke=E._buttonStrokeNormal))},y.actionDown=function(x,E){if(E.If()&&E instanceof Fn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof vr){x=x.diagram;var z=x.skipsUndoManager;x.skipsUndoManager=!0;var tt=E._buttonFillPressed;E._buttonFillOver=b.fill,b.fill=tt,tt=E._buttonStrokePressed,E._buttonStrokeOver=b.stroke,b.stroke=tt,x.skipsUndoManager=z}}},y.actionUp=function(x,E){if(E.If()&&E instanceof Fn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof vr){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionCancel=function(x,E){if(E.If()&&E instanceof Fn&&E._buttonFillPressed!==null){var b=E.fb("ButtonBorder");if(b instanceof vr){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionMove=function(x,E){if(E.If()&&E instanceof Fn&&E._buttonFillPressed!==null){var b=x.diagram;if(b.firstInput.button===0&&(b.currentTool.standardMouseOver(),a(x,E)&&(x=E.fb("ButtonBorder"),x instanceof vr))){var z=b.skipsUndoManager;b.skipsUndoManager=!0;var tt=E._buttonFillPressed;x.fill!==tt&&(x.fill=tt),tt=E._buttonStrokePressed,x.stroke!==tt&&(x.stroke=tt),b.skipsUndoManager=z}}},y}),$u("TreeExpanderButton",function(){var a=wl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},wl(vr,{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 Vr&&(x=x.adornedPart),x instanceof $n){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(vr,{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 Vr&&(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(Vr,Fn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Ut(0,3),shadowBlur:5},wl(vr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new _n(0,0,4,6),spot2:new _n(1,1,-4,-4)}))}),$u("ContextMenu",function(){return wl(Vr,Fn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Ut(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=Li;var y=a.fb("ButtonBorder");return y instanceof vr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new _n(0,0,2,3),y.spot2=new _n(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(vr,{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 vr&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(E,b){var z=b.diagram;if(z!==null&&!z.isReadOnly){var tt=b.ih();tt===null&&(tt=b.part),tt!==null&&(b=tt.fb(y),b!==null&&(E.handled=!0,z.Ea("Collapse/Expand Panel"),b.visible=!b.visible,z.eb("Collapse/Expand Panel")))}},x}),$u("CheckBoxButton",function(a){var y=Df(a);return a=wl("Button",{desiredSize:new cn(14,14)},wl(vr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Ln,geometryStretch:Bi,visible:!1},y!==""?new Fs("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof Fn){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 lr(0,1,0,0)});var y=wl(Fn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new lr(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}),ve.None=Bn=new rn(ve,"None",0),ve.Default=or=new rn(ve,"Default",0),ve.Vertical=ji=new rn(ve,"Vertical",4),ve.Horizontal=Li=new rn(ve,"Horizontal",5),ve.Fill=Ln=new rn(ve,"Fill",3),ve.Uniform=Bi=new rn(ve,"Uniform",1),ve.UniformToFill=Mr=new rn(ve,"UniformToFill",2),ve.FlipVertical=Sr=new rn(ve,"FlipVertical",1),ve.FlipHorizontal=Hr=new rn(ve,"FlipHorizontal",2),ve.FlipBoth=uo=new rn(ve,"FlipBoth",3),ve.make=wl,ve.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},ve.defineBuilder=$u,ve.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 ve))return y&&E.set(y),E;he('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},ve.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=ti,this.o=dr,this.hg=or,this.ob=this.Bi=1,this.Pf=Bn,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=pn,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?Dn.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),ln(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=Qi++,E=this.Ud("clipPath",{id:"mainClip"+x});E.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=E,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(E),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function Uf(a,y,x,E,b,z,tt){a.Nj===void 0?Of(a,y,x,E,b,z,tt):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+E+", "+b+", "+z+", "+tt+")")}Tt=za.prototype,Tt.arc=function(a,y,x,E,b,z,tt,rt){var ot=2*Math.PI,lt=ot-1e-6,ut=x*Math.cos(E),ft=x*Math.sin(E),yt=a+ut,Et=y+ft,kt=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,kt,a-ut,y-ft]),this.path.push(["A",x,x,0,1,kt,yt,Et])):1e-6<E&&this.path.push(["A",x,x,0,+(E>=Math.PI),kt,a+x*Math.cos(b),y+x*Math.sin(b)])},Tt.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},Tt.Se=function(a){this.addPath(this.path,this.rb,a||0)},Tt.bezierCurveTo=function(a,y,x,E,b,z){this.path.push(["C",a,y,x,E,b,z])},Tt.clearRect=function(){},Tt.clip=function(){this.Yl.clipPath=!0},Tt.closePath=function(){this.path.push(["z"])},Tt.createLinearGradient=function(a,y,x,E){var b=new JA("linear");return b.x1=a,b.y1=y,b.x2=x,b.y2=E,b},Tt.createPattern=function(a){var y="";a instanceof HTMLCanvasElement&&(y=a.toDataURL()),a instanceof HTMLImageElement&&(y=a.getAttribute("src"));var x=this.eA;if(x[y])return"url(#"+x[y]+")";var E="PATTERN"+Qi++,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+")"},Tt.createRadialGradient=function(a,y,x,E,b,z){var tt=new JA("radial");return tt.x1=a,tt.y1=y,tt.r1=x,tt.x2=E,tt.y2=b,tt.r2=z,tt};function $p(a,y,x,E,b,z,tt,rt,ot){E=rt/E,b=ot/b,z===0&&tt===0||a.rb.translate(z,tt),E===1&&b===1||a.rb.scale(E,b),y===0&&x===0||a.rb.translate(-y,-x)}Tt.drawImage=function(a,y,x,E,b,z,tt,rt,ot){var lt="";a instanceof HTMLCanvasElement&&(lt=a.toDataURL()),a instanceof HTMLImageElement&&(lt=a.getAttribute("src"));var ut=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,E===void 0&&(z=y,tt=x,rt=E=ut,ot=b=a),E=E||0,b=b||0,rt=rt||0,ot=ot||0,$p(this,y,x,E,b,z||0,tt||0,rt,ot),z={x:0,y:0,width:ut||E,height:a||b,href:lt},we.$(E,rt)&&we.$(b,ot)?lt.toLowerCase().indexOf(".svg")===-1&&lt.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||E!==ut||b!==a)&&(E+=y,b+=x,z["clip-path"]="path('M "+y+","+x+" L "+E+" "+x+" L "+E+" "+b+" L "+y+" "+b+" z')"),dc(this,hu,z,this.rb),this.addElement(hu,z)},Tt.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),fc(this,this.Yl)},Tt.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Tt.fillRect=function(a,y,x,E){a=[a,y,x,E],a={x:a[0],y:a[1],width:a[2],height:a[3]},dc(this,"fill",a,this.rb),this.addElement("rect",a)},Tt.ox=function(a,y,x,E){a={x:a,y,width:x,height:E},dc(this,"fill",a,this.rb),fc(this,a),this.svg.prepend(this.Ud("rect",a))},Tt.fillText=function(a,y,x){a=[a,y,x],y=this.textAlign,y==="left"?y="start":y==="right"?y="end":y==="center"&&(y="middle"),y={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":y},dc(this,"fill",y,this.rb),this.addElement("text",y,a[0])},Tt.lineTo=function(a,y){this.path.push(["L",a,y])},Tt.moveTo=function(a,y){this.path.push(["M",a,y])},Tt.quadraticCurveTo=function(a,y,x,E){this.path.push(["Q",a,y,x,E])},Tt.rect=function(a,y,x,E){this.path.push(["M",a,y],["L",a+x,y],["L",a+x,y+E],["L",a,y+E],["z"])},Tt.restore=function(){this.rb=this.stack.pop(),this.path=this.stack.pop();var a=this.stack.pop();this.fillStyle=a.fillStyle,this.font=a.font,this.globalAlpha=a.globalAlpha,this.lineCap=a.lineCap,this.lineDashOffset=a.lineDashOffset,this.lineJoin=a.lineJoin,this.lineWidth=a.lineWidth,this.miterLimit=a.miterLimit,this.shadowBlur=a.shadowBlur,this.shadowColor=a.shadowColor,this.shadowOffsetX=a.shadowOffsetX,this.shadowOffsetY=a.shadowOffsetY,this.strokeStyle=a.strokeStyle,this.textAlign=a.textAlign,this.bk=a.bk},Tt.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign,bk:this.bk});for(var a=[],y=0;y<this.path.length;y++)a.push(this.path[y]);this.stack.push(a),this.stack.push(this.rb.copy())},Tt.setTransform=function(a,y,x,E,b,z){a===1&&y===0&&x===0&&E===1&&b===0&&z===0||Of(this,a,y,x,E,b,z)};function t0(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}Tt.scale=function(a,y){this.rb.scale(a,y)},Tt.translate=function(a,y){this.rb.translate(a,y)},Tt.transform=function(){},Tt.yc=function(){},Tt.stroke=function(){e0(this,this.Yl)},Tt.jk=function(){this.clipInsteadOfFill||this.stroke()},Tt.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},Tt.addElement=function(a,y,x){return a=this.Ud(a,y,x),this.yd!==null?this.yd.appendChild(a):this.yd=a,this.ad=a};function dc(a,y,x,E){y==="fill"?fc(a,x):y==="stroke"&&e0(a,x),E!==null&&(a=E.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function fc(a,y){a.fillStyle instanceof JA?y.fill=gc(a,a.fillStyle,!0):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.fill="rgb("+a[1]+","+a[2]+","+a[3]+")",y["fill-opacity"]=a[4]):y.fill=a.fillStyle}function Qf(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof JA?y.setAttributeNS(null,"fill",gc(a,a.fillStyle,!0)):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.setAttributeNS(null,x,"rgb("+a[1]+","+a[2]+","+a[3]+")"),y.setAttributeNS(null,x+"-opacity",a[4])):y.setAttributeNS(null,x,a.fillStyle)}function e0(a,y){if(a.strokeStyle instanceof JA)y.stroke=gc(a,a.strokeStyle,!1);else if(/^rgba\(/.test(a.strokeStyle)){var x=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.strokeStyle);y.stroke="rgb("+x[1]+","+x[2]+","+x[3]+")",y["stroke-opacity"]=x[4]}else y.stroke=a.strokeStyle;y["stroke-width"]=a.lineWidth,y["stroke-linecap"]=a.lineCap,y["stroke-linejoin"]=a.lineJoin,y["stroke-miterlimit"]=a.miterLimit,a.Ct&&(y["stroke-dasharray"]=a.Yg.toString(),y["stroke-dashoffset"]=a.uj)}function gc(a,y,x){var E="";if(E=a.Hl!==null?a.Hl.getAttribute(x?"fill":"stroke"):null,E!==null&&E.indexOf("GRAD")!==-1?(E=E.split("#")[1].slice(0,-1),x=a.svg.getElementById(E),x!==null&&x.remove()):E="GRAD"+Qi++,y.type==="linear")x=a.Ud("linearGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,id:E,gradientUnits:"userSpaceOnUse"});else if(y.type==="radial")x=a.Ud("radialGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,r1:y.r1,r2:y.r2,id:E});else throw Error("invalid gradient");var b=y.gx;y=b.length;for(var z=[],tt=0;tt<y;tt++){var rt=b[tt],ot=rt.color;rt={offset:rt.offset,"stop-color":ot},/^rgba\(/.test(ot)&&(ot=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(ot),rt["stop-color"]="rgb("+ot[1]+","+ot[2]+","+ot[3]+")",rt["stop-opacity"]=ot[4]),z.push(rt)}for(z.sort(function(lt,ut){return lt.offset>ut.offset?1:-1}),b=0;b<y;b++)x.appendChild(a.Ud("stop",z[b]));return a.svg.appendChild(x),"url(#"+E+")"}Tt.addPath=function(a,y,x){for(var E=[],b=0;b<a.length;b++){var z=li(a[b]),tt=[z.shift()];if(tt[0]==="A")tt.push(z.shift()+","+z.shift(),z.shift(),z.shift()+","+z.shift(),z.shift()+","+z.shift());else for(;z.length;)tt.push(z.shift()+","+z.shift());E.push(tt.join(" "))}if(E=E.join(" "),a=this.Yl,a.clipPath)0<this.nh.length&&this.nh[this.nh.length-1].setAttributeNS(null,"clip-path",'path("'+E+'")');else if(a.d=E,dc(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var rt in a)rt!=="transform"&&y.setAttributeNS(null,rt,a[rt]);else{rt=y.getElementsByTagName("path");for(var ot in a)ot!=="transform"&&rt[x].setAttributeNS(null,ot,a[ot])}else this.addElement("path",a)};function Of(a,y,x,E,b,z,tt){var rt=new cc;rt.ha=[y,x,E,b,z,tt],y={},dc(a,"g",y,rt),rt=a.addElement("g",y),a.nh.push(rt)}function yg(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}Tt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function 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}Tt.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},Tt.fs=function(){this.Ct=!1},Tt.Vc=function(){},Tt.Wx=function(){},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",Ke.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new va(this,Dn.document));var y=new va(this,Dn.document,!0);a===void 0&&(a=new bi);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)},Ke.prototype.makeSvg=Ke.prototype.Cs,Ke.prototype.av=function(a){return this.Cs(a)},Ke.prototype.makeSVG=Ke.prototype.av;function jl(a,y,x,E){this.ownerDocument=y=y===void 0?Dn.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 er,this.isTemporary=!!x}Tt=pc.prototype,Tt.Wx=function(a){this.Z.imageSmoothingEnabled=a},Tt.arc=function(a,y,x,E,b,z){this.Z.arc(a,y,x,E,b,z)},Tt.beginPath=function(){this.Z.beginPath()},Tt.Se=function(){},Tt.bezierCurveTo=function(a,y,x,E,b,z){this.Z.bezierCurveTo(a,y,x,E,b,z)},Tt.clearRect=function(a,y,x,E){this.yc(),this.Z.clearRect(a,y,x,E)},Tt.clip=function(){this.Z.clip()},Tt.closePath=function(){this.Z.closePath()},Tt.createLinearGradient=function(a,y,x,E){return this.Z.createLinearGradient(a,y,x,E)},Tt.createPattern=function(a,y){return this.Z.createPattern(a,y)},Tt.createRadialGradient=function(a,y,x,E,b,z){return this.Z.createRadialGradient(a,y,x,E,b,z)},Tt.drawImage=function(a,y,x,E,b,z,tt,rt,ot){E===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,E,b,z,tt,rt,ot)},Tt.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},Tt.fillRect=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Tt.ox=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Tt.fillText=function(a,y,x){this.Z.fillText(a,y,x)},Tt.getImageData=function(a,y,x,E){return this.Z.getImageData(a,y,x,E)},Tt.lineTo=function(a,y){this.Z.lineTo(a,y)},Tt.measureText=function(a){return this.Z.measureText(a)},Tt.moveTo=function(a,y){this.Z.moveTo(a,y)},Tt.quadraticCurveTo=function(a,y,x,E){this.Z.quadraticCurveTo(a,y,x,E)},Tt.rect=function(a,y,x,E){this.Z.rect(a,y,x,E)},Tt.restore=function(){this.Z.restore()},Tt.save=function(){this.yc(),this.Z.save()},pc.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Tt=pc.prototype,Tt.setTransform=function(a,y,x,E,b,z){this.El.setTransform(a,y,x,E,b,z)},Tt.scale=function(a,y){this.El.scale(a,y)},Tt.translate=function(a,y){this.El.translate(a,y)},Tt.stroke=function(){this.Z.stroke()},Tt.transform=function(a,y,x,E,b,z){if(a!==1||y!==0||x!==0||E!==1||b!==0||z!==0){var tt=this.El,rt=tt.m11*a+tt.m21*y;a=tt.m12*a+tt.m22*y,y=tt.m11*x+tt.m21*E,x=tt.m12*x+tt.m22*E,tt.dx=tt.m11*b+tt.m21*z+tt.dx,tt.dy=tt.m12*b+tt.m22*z+tt.dy,tt.m11=rt,tt.m12=a,tt.m21=y,tt.m22=x}},Tt.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},Tt.ng=function(a,y){if(a instanceof no&&a.type===Br){var x=a.yk;a=a.ft,a>x?(this.scale(x/a,1),this.translate((a-x)/2,0)):x>a&&(this.scale(1,a/x),this.translate(0,(x-a)/2)),this.Hm?this.clip():this.fill(y),a>x?(this.translate(-(a-x)/2,0),this.scale(1/(x/a),1)):x>a&&(this.translate(0,-(x-a)/2),this.scale(1,1/(a/x)))}else this.Hm?this.clip():this.fill(y)},Tt.jk=function(){this.Hm||this.stroke()},Tt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},Tt.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},Tt.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(Tm),a.lineDashOffset=0)},Tt.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Tt.Hs=function(){},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){Ii||(Ct(),Ii=!0),An(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===Br?this.Qd=Pr: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},Tt=no.prototype,Tt.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Tt.ka=function(){return Object.isFrozen(this)&&he("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Tt.qb=function(a){a.classType===no&&(this.type=a)},Tt.toString=function(){var a="Brush(";if(this.type===Ir)a+=this.color;else if(a=this.type===pr?a+"Linear ":this.type===Br?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+")"},Tt.addColorStop=function(a,y){return this._isFrozen&&an(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Yn(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},Tt.Vz=function(a,y){if(this._isFrozen&&an(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?qr:y,this.type===Ir)BA(this.color),this.color=Yd(a,y);else if((this.type===pr||this.type===Br)&&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?qr:x,BA(a),Yd(y,x)}Tt.Wy=function(a,y){if(this._isFrozen&&an(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?qr:y,this.type===Ir)BA(this.color),this.color=Yd(-a,y);else if((this.type===pr||this.type===Br)&&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?qr: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)+")"}Tt.Gx=function(){if(this.type===Ir)return Zd(this.color);if((this.type===pr||this.type===Br)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Br)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 qr:y=100*rp(Ie.j);var x=100*rp(Ie.u),E=100*rp(Ie.o);return On.j=.4124564*y+.3575761*x+.1804375*E,On.u=.2126729*y+.7151522*x+.072175*E,On.o=.0193339*y+.119192*x+.9503041*E,On.F=Ie.F,y=St(On.j/Pe[0]),x=St(On.u/Pe[1]),E=St(On.o/Pe[2]),ei.j=116*x-16,ei.u=500*(y-x),ei.o=200*(x-E),ei.F=On.F,ei.j=Math.min(100,Math.max(0,ei.j+100*a)),a=(ei.j+16)/116,y=a-ei.o/200,On.j=Pe[0]*wt(ei.u/500+a),On.u=Pe[1]*(ei.j>se*Gt?Math.pow(a,3):ei.j/se),On.o=Pe[2]*wt(y),On.F=ei.F,a=-.969266*On.j+1.8760108*On.u+.041556*On.o,y=.0556434*On.j+-.2040259*On.u+1.0572252*On.o,Ie.j=255*op((3.2404542*On.j+-1.5371385*On.u+-.4985314*On.o)/100),Ie.u=255*op(a/100),Ie.o=255*op(y/100),Ie.F=On.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 to:return ip(),kn.o=Math.min(100,Math.max(0,kn.o+100*a)),"hsla("+kn.j+", "+kn.u+"%, "+kn.o+"%, "+kn.F+")";default:he("Unknown color space: "+y)}}function BA(a){Ii||(Ct(),Ii=!0);var y=Ze;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))}kn.j=Math.round(tt),kn.u=Math.round(100*a),kn.o=Math.round(100*b),kn.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>Gt?Math.pow(a,1/3):(se*a+16)/116}function wt(a){var y=a*a*a;return y>Gt?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(){Ze=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&&an(this,a),this.na=a,this.start.Mc()&&(a===pr?this.start=xo:a===Br&&(this.start=Pr)),this.end.Mc()&&(a===pr?this.end=ts:a===Br&&(this.end=Pr)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&an(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&an(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&an(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&an(this,a),0>a&&Yn(a,">= zero",no,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&an(this,a),0>a&&Yn(a,">= zero",no,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&an(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&an(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 Gt=216/24389,se=24389/27,Pe=[95.047,100,108.883],Ze=null,Ie=new Rf,kn=new Rf,On=new Rf,ei=new Rf,Ii=!1;no.className="Brush";var Ir;no.Solid=Ir=new rn(no,"Solid",0);var pr;no.Linear=pr=new rn(no,"Linear",1);var Br;no.Radial=Br=new rn(no,"Radial",2);var Ko;no.Pattern=Ko=new rn(no,"Pattern",4);var qr;no.Lab=qr=new rn(no,"Lab",5);var to;no.HSL=to=new rn(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;Ii||(Ct(),Ii=!0);var y=Ze;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 Fn}}}),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"}Re(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 vr&&lt.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 vr&&z.isGeometryPositioned){var ut=z.strokeWidth/2;ot-=ut,lt-=ut}z.visible&&z.arrange(ot+rt.left,lt+rt.top,tt.width,tt.height)}};function To(){this.xa="Base"}Re(To,io),To.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length;y=wn(),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!==Bn&&ut!==Li)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));Mn(y)},To.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.top,tt=a.isOpposite,rt=tt?x.width:b.left,ot=0;ot<E;ot++){var lt=z,ut=y[ot];if(ut.visible){var ft=ut.measuredBounds,yt=ut.margin,Et=yt.top+yt.bottom,kt=z+b.bottom,Dt=ft.height,Xt=Ua(ut,!1);(isNaN(ut.desiredSize.height)&&Xt===Ln||Xt===ji)&&(Dt=Math.max(x.height-Et-kt,0)),Et=Dt+Et+kt,kt=ut.alignment,kt.Xb()&&(kt=a.defaultAlignment),kt.sb()||(kt=Pr),tt&&(rt-=ft.width+yt.left+yt.right),ut.arrange(rt+kt.offsetX+yt.left,lt+kt.offsetY+yt.top+(x.height*kt.y-Et*kt.y),ft.width,Dt),tt||(rt+=ft.width+yt.left+yt.right)}}};function jr(){this.xa="Base"}Re(jr,io),jr.prototype.measure=function(a,y,x,E,b,z){var tt=E.length;x=wn();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!==Bn&&ut!==ji)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);Mn(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,kt=z+b.right,Dt=ft.width,Xt=Ua(ut,!1);(isNaN(ut.desiredSize.width)&&Xt===Ln||Xt===Li)&&(Dt=Math.max(x.width-Et-kt,0)),Et=Dt+Et+kt,kt=ut.alignment,kt.Xb()&&(kt=a.defaultAlignment),kt.sb()||(kt=Pr),tt&&(rt-=ft.height+yt.bottom+yt.top),ut.arrange(lt+kt.offsetX+yt.left+(x.width*kt.x-Et*kt.x),rt+kt.offsetY+yt.top,Dt,ft.height),tt||(rt+=ft.height+yt.bottom+yt.top)}}};function us(){this.xa="Base"}Re(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),kt=Math.max(tt+ft,0),Dt=a.isClipping,Xt=He.allocAt(-lt.left,-lt.top,Et,kt),zt=He.allocAt(0,0,z,tt);gs(ot,zt,!0),z=zt.width,tt=zt.height;for(var re=!0,le=sl(a),fe=0;fe<rt;fe++){var me=E[fe];yt=y;var Ge=x;if(me!==ot&&(me.visible||me===le)){lt=me.margin;var Jn=lt.left,yi=lt.top;switch(Et=lt.right+lt.left,kt=lt.top+lt.bottom,lt=Ua(me,!1),lt){case Ln:yt=z,Ge=tt,yi=Jn=kt=Et=0;break;case Li:yt=z,Jn=Et=0;break;case ji:Ge=tt,yi=kt=0}me.measure(yt,Ge,0,0),yt=me.measuredBounds,Et=Math.max(yt.width+Et,0),kt=Math.max(yt.height+kt,0),lt=me.alignment,lt.Xb()&&(lt=a.defaultAlignment),lt.sb()||(lt=Pr);var di=me.alignmentFocus;if(di.Xb()&&(di=Pr),Ge=null,me instanceof Fn&&me.$e!==""&&(Ge=me.fb(me.$e),Ge===me&&(Ge=null)),Jn=zt.x-Jn,yi=zt.y-yi,Ge!==null){for(me.arrange(0,0,yt.width,yt.height),yt=Ge.actualBounds,yt=Ut.allocAt(yt.x+(di.x*yt.width-di.offsetX),yt.y+(di.y*yt.height-di.offsetY)),Ge=Ge.panel;Ge!==me;)Ge.transform.Ga(yt),Ge=Ge.panel;Jn+=lt.x*z+lt.offsetX-yt.x,yi+=lt.y*tt+lt.offsetY-yt.y,Ut.free(yt)}else Jn+=lt.x*z+lt.offsetX-(di.x*yt.width+di.offsetX),yi+=lt.y*tt+lt.offsetY-(di.y*yt.height+di.offsetY);re?(re=!1,b.h(Jn,yi,Et,kt)):Nr(b,Jn,yi,Et,kt)}}switch(re?b.assign(Xt):Dt?b.Uu(zt.x,zt.y,zt.width,zt.height):Nr(b,Xt.x,Xt.y,Xt.width,Xt.height),He.free(Xt),He.free(zt),lt=ot.stretch,lt===or&&(lt=Ua(ot,!1)),lt){case Bn:return;case Ln:if(!isFinite(y)&&!isFinite(x))return;break;case Li:if(!isFinite(y))return;break;case ji:if(!isFinite(x))return}for(yt=ot.measuredBounds,z=yt.width,tt=yt.height,Et=Math.max(z+ut,0),kt=Math.max(tt+ft,0),lt=ot.margin,zt=He.allocAt(-lt.left,-lt.top,Et,kt),gs(ot,zt,!0),z=zt.width,tt=zt.height,y=0;y<rt;y++)x=E[y],x===ot||!x.visible&&x!==le||(lt=x.margin,Et=lt.right+lt.left,kt=lt.top+lt.bottom,yt=x.measuredBounds,Et=Math.max(yt.width+Et,0),kt=Math.max(yt.height+kt,0),ut=x.alignment,ut.Xb()&&(ut=a.defaultAlignment),ut.sb()||(ut=Pr),x=x.alignmentFocus,x.Xb()&&(x=Pr),re?(re=!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,kt)):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,kt));re?b.assign(Xt):Dt?b.Uu(zt.x,zt.y,zt.width,zt.height):Nr(b,Xt.x,Xt.y,Xt.width,Xt.height),He.free(zt)},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=He.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=Pr);var kt=ft.alignmentFocus;if(kt.Xb()&&(kt=Pr),lt=null,ft instanceof Fn&&ft.$e!==""&&(lt=ft.fb(ft.$e),lt===ft&&(lt=null)),lt!==null){var Dt=lt.actualBounds;for(kt=Ut.allocAt(Dt.x+(kt.x*Dt.width-kt.offsetX),Dt.y+(kt.y*Dt.height-kt.offsetY)),lt=lt.panel;lt!==ft;)lt.transform.Ga(kt),lt=lt.panel;lt=ut.x*tt.width+ut.offsetX-kt.x,ut=ut.y*tt.height+ut.offsetY-kt.y,Ut.free(kt)}else lt=ut.x*tt.width+ut.offsetX-(kt.x*yt+kt.offsetX),ut=ut.y*tt.height+ut.offsetY-(kt.y*Et+kt.offsetY);lt+=tt.x-x.x,ut+=tt.y-x.y,ft.visible&&ft.arrange(z+lt,ot+ut,yt,Et)}}He.free(tt)};function gs(a,y,x){var E=null;if(a instanceof Fn&&a.$e!==""&&(E=a.fb(a.$e),E===a&&(E=null)),E!==null)for(x&&a.arrange(0,0,y.width,y.height),y.assign(E.actualBounds),E=E.panel;E!==a;)E.transform.pp(y),E=E.panel}function Do(){this.xa="Base"}Re(Do,io),Do.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length,ot=a.Pb(),lt=ot.margin,ut=y,ft=x,yt=lt.right+lt.left,Et=lt.top+lt.bottom;ot.measure(y,x,z,tt),lt=ot.measuredBounds;var kt=0,Dt=null;ot instanceof vr&&(Dt=ot,kt=Dt.strokeWidth*Dt.scale);var Xt=Math.max(lt.width+yt,0);lt=Math.max(lt.height+Et,0);var zt=Dm(ot),re=zt.x*Xt+zt.offsetX;zt=zt.y*lt+zt.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(re-fe)-kt,0)),isFinite(x)&&(ft=Math.max(Math.abs(zt-le)-kt,0)),kt=cn.alloc(),kt.h(0,0),a=sl(a),le=0;le<rt;le++)zt=E[le],zt===ot||!zt.visible&&zt!==a||(lt=zt.margin,Xt=lt.right+lt.left,re=lt.top+lt.bottom,zt.measure(ut,ft,0,0),lt=zt.measuredBounds,Xt=Math.max(lt.width+Xt,0),lt=Math.max(lt.height+re,0),kt.h(Math.max(Xt,kt.width),Math.max(lt,kt.height)));if(rt===1)b.width=Xt,b.height=lt,cn.free(kt);else{switch(zt=Dm(ot),le=Im(ot),rt=E=0,le.x!==zt.x&&le.y!==zt.y&&(E=kt.width/Math.abs(le.x-zt.x),rt=kt.height/Math.abs(le.y-zt.y)),cn.free(kt),kt=0,Dt!==null&&(kt=Dt.strokeWidth*Dt.scale,_m(Dt)===Bi&&(E=rt=Math.max(E,rt))),E+=Math.abs(zt.offsetX)+Math.abs(le.offsetX)+kt,rt+=Math.abs(zt.offsetY)+Math.abs(le.offsetY)+kt,Dt=ot.stretch,Dt===or&&(Dt=Ua(ot,!1)),Dt){case Bn:tt=z=0;break;case Ln:isFinite(y)&&(E=y),isFinite(x)&&(rt=x);break;case Li:isFinite(y)&&(E=y),tt=0;break;case ji: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}},Do.prototype.arrange=function(a,y){var x=y.length,E=a.Pb(),b=E.measuredBounds,z=He.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=Pr),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&&(co(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 He(z.x,z.y,z.width,z.height))));He.free(z)};function Ca(){this.xa="Base",this.name="Table"}Re(Ca,io),Ca.prototype.measure=function(a,y,x,E,b){for(var z=E.length,tt=wn(),rt=wn(),ot=0;ot<z;ot++){var lt=E[ot],ut=lt instanceof Fn?lt:null;if(ut!==null&&vc(ut)&&lt.visible){rt.push(ut);for(var ft=ut.O.s,yt=ft.length,Et=0;Et<yt;Et++){var kt=ft[Et];ut.type===Fn.TableRow?kt.row=lt.row:ut.type===Fn.TableColumn&&(kt.column=lt.column),tt.push(kt)}}else tt.push(lt)}z=tt.length,z===0&&(a.Fb(0),a.Eb(0));for(var Dt=[],Xt=0;Xt<z;Xt++){var zt=tt[Xt];zt.visible&&(Ps(zt,!0),qu(zt,!0),Dt[zt.row]||(Dt[zt.row]=[]),Dt[zt.row][zt.column]||(Dt[zt.row][zt.column]=[]),Dt[zt.row][zt.column].push(zt))}Mn(tt);var re=wn(),le=wn(),fe=wn(),me={count:0},Ge={count:0},Jn=y,yi=x,di=a.rowDefs,Hn=a.colDefs,vn=null;z=di.length;for(var ur=0;ur<z;ur++)vn=di[ur],vn!==void 0&&(vn.actual=0);z=Hn.length;for(var tr=0;tr<z;tr++)vn=Hn[tr],vn!==void 0&&(vn.actual=0);for(var Xr=Dt.length,So=0,Zs=0;Zs<Xr;Zs++)Dt[Zs]&&(So=Math.max(So,Dt[Zs].length));var $s=Math.min(a.topIndex,Xr-1),Oa=Math.min(a.leftIndex,So-1),Ys=0;Xr=Dt.length;for(var Lc=sl(a),Es=0;Es<Xr;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);re[Ha]===void 0&&(Mc.actual=0,Mc.oc=0,re[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===Bn||LA||Es<$s||Ha<Oa||(me[Ha]!==void 0||Ra!==Ln&&Ra!==Li||(me[Ha]=-1,me.count++),Ge[Es]!==void 0||Ra!==Ln&&Ra!==ji||(Ge[Es]=-1,Ge.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===Bn||Ra===Li)){vn=a.Fb(Es);var vd=vn.Wc();Ys=Math.max(Ul-vn.actual,0),Ys+vd>yi&&(Ys=Math.max(yi-vd,0));var wm=vn.oa===0;vn.oc=vn.oc+Ys,vn.actual=vn.oa+Ys,yi=Math.max(yi-(Ys+(wm?vd:0)),0)}if(Sl.columnSpan===1&&(Ra===Bn||Ra===ji)){vn=a.Eb(Ha);var jp=vn.Wc();Ys=Math.max(of-vn.actual,0),Ys+jp>Jn&&(Ys=Math.max(Jn-jp,0));var iy=vn.oa===0;vn.oc=vn.oc+Ys,vn.actual=vn.oa+Ys,Jn=Math.max(Jn-(Ys+(iy?jp:0)),0)}md&&Sl.Uj()}}}}}Mn(re);var uh=0,Th=0;z=a.columnCount;for(var $f=0;$f<z;$f++){var yd=Hn[$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=di[Gg];wd!==void 0&&(Th+=isNaN(wd.Hc)?wd.oc:wd.Hc,wd.oc!==0&&(Th+=wd.Wc()))}Jn=Math.max(y-uh,0);var Ah=yi=Math.max(x-Th,0),bc=Jn;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;me[MA.column]=Nh.oc===0&&me[MA.column]!==void 0?Math.max(zg.width+sf,me[MA.column]):null,Ge[MA.row]=xm.oc===0&&Ge[MA.row]!==void 0?Math.max(zg.height+bA,Ge[MA.row]):null}var tg=0,jg=0,Ru;for(Ru in Ge)Ru!=="count"&&(tg+=Ge[Ru]);for(Ru in me)Ru!=="count"&&(jg+=me[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(Jn)&&me[Ja.column]!==null?jg===0?Dh=qa.actual+Jn:Dh=me[Ja.column]/jg*bc:me[Ja.column]!==null?Dh=Jn:Dh=qa.actual||Jn,Dh=Math.max(0,Dh-qa.Wc()));var kc=0;switch(isFinite(Ls.height)?kc=Ls.height:(isFinite(yi)&&Ge[Ja.row]!==null?tg===0?kc=Ls.actual+yi:kc=Ge[Ja.row]/tg*Ah:Ge[Ja.row]!==null?kc=yi:kc=Ls.actual||yi,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 Li:aa.height=Math.max(aa.height,Ls.actual+yi);break;case ji:aa.width=Math.max(aa.width,qa.actual+Jn)}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(Jn)&&(lf=Math.min(lf,aa.width)),isFinite(yi)&&(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,yi=Math.max(yi-Ys,0),Ge[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,Jn=Math.max(Jn-Ys,0),me[Ja.column]===null&&(bc=Math.max(bc-Ys,0))}}Mn(fe);var Ih=cn.alloc(),aA=wn(),ou=wn();if(z=le.length,z!==0){for(var xd=0;xd<Xr;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 Ln: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 Li:ou[pu.index]!==0&&(aa.width=Math.min(aa.width,ou[pu.index]));break;case ji: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++)vn=a.Fb(As.row+Tc),Ys=0,Ys=Ra===Ln||Ra===ji?Math.max(vn.minimum,aA[As.row+Tc]===0?vn.maximum:Math.min(aA[As.row+Tc],vn.maximum)):Math.max(vn.minimum,isNaN(vn.Hc)?vn.maximum:Math.min(vn.Hc,vn.maximum)),Ih.height+=Ys,Ql+=vn.minimum;for(var mu=1;mu<As.columnSpan&&!(As.column+mu>=a.columnCount);mu++)vn=a.Eb(As.column+mu),Ys=0,Ys=Ra===Ln||Ra===Li?Math.max(vn.minimum,ou[As.column+mu]===0?vn.maximum:Math.min(ou[As.column+mu],vn.maximum)):Math.max(vn.minimum,isNaN(vn.Hc)?vn.maximum:Math.min(vn.Hc,vn.maximum)),Ih.width+=Ys,Cm+=vn.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++)vn=a.Fb(As.row+Jg),Cd+=vn.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++){vn=a.Fb(As.row+Uh);var Ic=vn.oa||0,Af=Dc(As,vn,hh);vn.actual=Math.min(vn.maximum,Ic+Af),vn.oa!==Ic&&(Nc-=vn.oa-Ic)}for(;0<Nc;){var lA=vn.oa||0;if(isNaN(vn.height)&&vn.maximum>lA&&(vn.actual=Math.min(vn.maximum,lA+Nc),vn.oa!==lA&&(Nc-=vn.oa-lA)),vn.index===0)break;vn=a.Fb(vn.index-1)}}for(var ng=0,Uc=0;Uc<As.columnSpan&&!(As.column+Uc>=a.columnCount);Uc++)vn=a.Eb(As.column+Uc),ng+=vn.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++){vn=a.Eb(As.column+hf);var Zp=vn.oa||0,sy=Qh(As,vn,oy);vn.actual=Math.min(vn.maximum,Zp+sy),vn.oa!==Zp&&(ig-=vn.oa-Zp)}for(;0<ig;){var Pm=vn.oa||0;if(isNaN(vn.width)&&vn.maximum>Pm&&(vn.actual=Math.min(vn.maximum,Pm+ig),vn.oa!==Pm&&(ig-=vn.oa-Pm)),vn.index===0)break;vn=a.Eb(vn.index-1)}}}}Mn(le),cn.free(Ih),cn.free(aa),aA!==void 0&&Mn(aA),ou!==void 0&&Mn(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++)Hn[Em]!==void 0&&(vn=a.Eb(Em),isFinite(vn.width)?(Yp+=vn.width,Yp+=vn.Wc()):a0(vn)===ap?(Yp+=vn.oa,Yp+=vn.Wc()):vn.oa!==0&&(uh+=vn.oa,uh+=vn.Wc()));isFinite(Fm.width)?rg=Math.min(Fm.width,vw.width):rg=Ra!==Bn&&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++)Hn[Lm]!==void 0&&(vn=a.Eb(Lm),isFinite(vn.width)||a0(vn)===ap||(vn.actual=vn.oa*rx),vn.position=b.width,vn.oa!==0&&(b.width+=vn.oa,b.width+=vn.Wc()));z=a.rowCount;for(var Mm=0;Mm<z;Mm++)di[Mm]!==void 0&&(vn=a.Fb(Mm),isFinite(vn.height)?(Xp+=vn.height,Xp+=vn.Wc()):a0(vn)===ap?(Xp+=vn.oa,Xp+=vn.Wc()):vn.oa!==0&&(Th+=vn.oa,Th+=vn.Wc()));isFinite(Fm.height)?og=Math.min(Fm.height,vw.height):og=Ra!==Bn&&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++)di[bm]!==void 0&&(vn=a.Fb(bm),isFinite(vn.height)||a0(vn)===ap||(vn.actual=vn.oa*ox),vn.position=b.height,vn.oa!==0&&(b.height+=vn.oa,b.height+=vn.Wc()));z=rt.length;for(var ay=0;ay<z;ay++){var Jp=rt[ay],ly=0,uy=0;Jp.type===Fn.TableRow?(ly=b.width,vn=a.Fb(Jp.row),uy=vn.actual):(vn=a.Eb(Jp.column),ly=vn.actual,uy=b.height),Jp.measuredBounds.h(0,0,ly,uy),Ps(Jp,!1)}Mn(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 kt=Math.min(a.leftIndex,ut-1);if(0<rt.length){for(;kt!==ut&&(rt[kt]===void 0||rt[kt].oa===0);)kt++;kt=Math.max(Math.min(kt,ut-1),0),yt=-rt[kt].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 zt=0;zt<y.length;zt++){var re=y[zt];if(re instanceof Fn&&re.visible&&vc(re)){if(re.type===Fn.TableRow){rt=a.Fb(re.row);var le=a.Eb(Xt)}else rt=a.Fb(Dt),le=a.Eb(re.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,kt))),le=re.measuredBounds,re.Uk(),re.actualBounds.ka();var fe=re.actualBounds,me=He.allocAt(fe.x,fe.y,fe.width,fe.height);fe.x=re.type===Fn.TableRow?z:rt,fe.y=re.type===Fn.TableColumn?b:ot,fe.width=le.width,fe.height=le.height,re.actualBounds.freeze(),qu(re,!1),Qr(me,fe)||ut===null||(ut.oh(),re.Pn(ut)),He.free(me)}}for(zt=cn.alloc(),re=0;re<lt;re++)if(tt[re]){for(ut=tt[re].length,le=a.Fb(re),ot=le.position+ft+b,le.oa!==0&&(ot+=le.Io(Math.max(Dt,Et))),fe=0;fe<ut;fe++)if(tt[re][fe]){me=a.Eb(fe),rt=me.position+yt+z,me.oa!==0&&(rt+=me.Io(Math.max(Xt,kt)));for(var Ge=tt[re][fe],Jn=Ge.length,yi=0;yi<Jn;yi++){var di=Ge[yi],Hn=di.measuredBounds;zt.h(0,0);for(var vn=1;vn<di.rowSpan&&!(re+vn>=a.rowCount);vn++){var ur=a.Fb(re+vn);ur.oa!==0&&(zt.height+=ur.total)}for(vn=1;vn<di.columnSpan&&!(fe+vn>=a.columnCount);vn++)ur=a.Eb(fe+vn),ur.oa!==0&&(zt.width+=ur.total);var tr=me.oa+zt.width,Xr=le.oa+zt.height;vn=rt,ur=ot;var So=tr,Zs=Xr,$s=rt,Oa=ot,Ys=tr,Lc=Xr;rt+tr>x.width&&(Ys=Math.max(x.width-rt,0)),ot+Xr>x.height&&(Lc=Math.max(x.height-ot,0));var Es=di.alignment;if(Es.Xb()){Es=a.defaultAlignment,Es.sb()||(Es=Pr);var rA=Es.x,Ha=Es.y,Mc=Es.offsetX;Es=Es.offsetY;var Yl=me.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=Hn.width,gu=Hn.height;var Dl=di.margin,Sl=Dl.left+Dl.right,md=Dl.top+Dl.bottom,oA=Xo(di,le,me,!1);!isNaN(di.desiredSize.width)||oA!==Ln&&oA!==Li||(Yl=Math.max(tr-Sl,0)),!isNaN(di.desiredSize.height)||oA!==Ln&&oA!==ji||(gu=Math.max(Xr-md,0)),tr=di.maxSize,Xr=di.minSize,Yl=Math.min(tr.width,Yl),gu=Math.min(tr.height,gu),Yl=Math.max(Xr.width,Yl),gu=Math.max(Xr.height,gu),tr=gu+md,vn+=So*rA-(Yl+Sl)*rA+Mc+Dl.left,ur+=Zs*Ha-tr*Ha+Es+Dl.top,di.visible&&(co($s,Oa,Ys,Lc,vn,ur,Hn.width,Hn.height)?di.arrange(vn,ur,Yl,gu):di.arrange(vn,ur,Yl,gu,new He($s,Oa,Ys,Lc)))}}}for(cn.free(zt),a=0;a<E;a++)x=y[a],z=x instanceof Fn?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"}Re(bl,io),bl.prototype.measure=function(){},bl.prototype.arrange=function(){};function Vl(){this.xa="Base"}Re(Vl,io),Vl.prototype.measure=function(){},Vl.prototype.arrange=function(){};function _s(){this.xa="Base"}Re(_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),kt=1;a.viewboxStretch===Bi?ft!==0&&rt!==0&&(kt=Math.min(yt/ft,Et/rt)):ft!==0&&rt!==0&&(kt=Math.max(yt/ft,Et/rt)),kt===0&&(kt=1e-4),E.Ca*=kt,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=Pr),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"}Re(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=[],kt=a.O.s,Dt=kt.length,Xt=0;Xt<Dt;Xt++){var zt=kt[Xt],re=[];if(Et.push(re),zt.visible){var le=zt.interval;if(!(0>le)){zt=Mh(zt.figure);for(var fe=0;fe<Dt;fe++)if(fe!==Xt){var me=kt[fe];me.visible&&Mh(me.figure)===zt&&(me=me.interval,me>le&&re.push(me))}}}}for(kt=a.O.s,Dt=kt.length,Xt=0;Xt<Dt;Xt++){var Ge=kt[Xt];if(Ge.visible&&(re=Ge.interval||1,zt=Math.abs(re),!(2>b*zt*x))){if(le=Ge.segmentIndex,(!isFinite(le)||isNaN(le))&&(le=0),0>le&&(le=zt-Math.min(-le,zt)),le=Math.round(le%zt),zt=Ge.opacity,fe=1,zt!==1){if(zt===0)continue;fe=y.globalAlpha,y.globalAlpha=fe*zt}me=Et[Xt];var Jn=!1,yi=Ge.strokeDashArray;if(yi!==null&&(Jn=!0,y.js(yi,Ge.strokeDashOffset)),Ge.figure==="LineV"&&Ge.stroke!==null&&0<Ge.strokeWidth){for(y.lineWidth=Ge.strokeWidth,jo(a,y,Ge.stroke,!1,!1,z,tt),y.beginPath(),yi=Ge=Math.floor((yt-b)/b);yi<=Ge+lt;yi++){var di=yi*b+yt;0<=di&&di<=rt&&CA(yi,re,le,me)&&(y.moveTo(di,0),y.lineTo(di,ot))}y.stroke(),y.Se()}else if(Ge.figure==="LineH"&&Ge.stroke!==null&&0<Ge.strokeWidth){for(y.lineWidth=Ge.strokeWidth,jo(a,y,Ge.stroke,!1,!1,z,tt),y.beginPath(),yi=Ge=Math.floor((ft-E)/E);yi<=Ge+ut;yi++)di=yi*E+ft,0<=di&&di<=ot&&CA(yi,re,le,me)&&(y.moveTo(0,di),y.lineTo(rt,di));y.stroke(),y.Se()}else if(Ge.figure==="BarV"&&Ge.fill!==null)for(jo(a,y,Ge.fill,!0,!1,z,tt),Ge=Ge.width,isNaN(Ge)&&(Ge=b),di=yi=Math.floor((yt-b)/b);di<=yi+lt;di++){var Hn=di*b+yt;0<=Hn+Ge&&Hn<=rt&&CA(di,re,le,me)&&y.fillRect(Hn,0,Ge,ot)}else if(Ge.figure==="BarH"&&Ge.fill!==null)for(jo(a,y,Ge.fill,!0,!1,z,tt),Ge=Ge.height,isNaN(Ge)&&(Ge=E),di=yi=Math.floor((ft-E)/E);di<=yi+ut;di++)Hn=di*E+ft,0<=Hn+Ge&&Hn<=ot&&CA(di,re,le,me)&&y.fillRect(0,Hn,rt,Ge);Jn&&y.fs(),zt!==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"}Re(kl,io),kl.prototype.measure=function(a,y,x,E,b){var z=E.length;if(a instanceof Vr||a instanceof Rn){var tt=null,rt=null;if(a instanceof Rn&&(tt=a),a instanceof Vr&&(rt=a,tt=rt.adornedPart,a.j===null&&(a.j=[])),tt instanceof Rn){var ot=tt;if(z===0)gr(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var lt=a instanceof Vr?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 kt=lt.measuredBounds;x.ed(kt),Et.push(kt)}kt=er.alloc();for(var Dt=Ut.alloc(),Xt=Ut.alloc(),zt=0;zt<z;zt++){var re=E[zt];if(re!==lt)if(re.isPanelMain&&re instanceof vr){tu(a,rt,yt,re);var le=re.measuredBounds;x.ed(le),Et.push(le)}else if(2>ft)re.measure(1/0,1/0,0,0),le=re.measuredBounds,x.ed(le),Et.push(le);else{var fe=re.segmentIndex,me=re.segmentFraction,Ge=re.alignmentFocus;Ge.Mc()&&(Ge=Pr);var Jn=re.segmentOrientation,yi=re.segmentOffset;if(isNaN(fe)){var di=ot.ua;le=wn(),di.Qu(me,le);var Hn=Ut.allocAt(le[0],le[1]);if(Hn.add(ot.i(0)),di.type===Un.j?Hn.offset(-di.startX,-di.startY):(di=di.figures.first(),di!==null&&Hn.offset(-di.startX,-di.startY)),di=le[2],Jn!==Va){var vn=ot.computeAngle(re,Jn,di);re.Kb=vn}vn=Hn.x-y.x;var ur=Hn.y-y.y;Ut.free(Hn),Mn(le)}else if(fe<-ft||fe>=ft)le=Ut.alloc(),ot.vg(),ot.computeMidPoint(le),di=ot.midAngle,Jn!==Va&&(vn=ot.computeAngle(re,Jn,di),re.Kb=vn),vn=le.x-y.x,ur=le.y-y.y,Ut.free(le);else{if(vn=0,0<=fe?(ur=ut.M(fe),le=fe<ft-1?ut.M(fe+1):ur):(vn=ft+fe,ur=ut.M(vn),le=0<vn?ut.M(vn-1):ur),ur.Xa(le)){0<=fe?(di=0<fe?ut.M(fe-1):ur,vn=fe<ft-2?ut.M(fe+2):le):(di=vn<ft-1?ut.M(vn+1):ur,vn=1<vn?ut.M(vn-2):le),Hn=di.Bf(ur);var tr=le.Bf(vn);di=Hn>tr+10?0<=fe?di.ab(ur):ur.ab(di):tr>Hn+10?0<=fe?le.ab(vn):vn.ab(le):0<=fe?di.ab(vn):vn.ab(di)}else di=0<=fe?ur.ab(le):le.ab(ur);Jn!==Va&&(vn=ot.computeAngle(re,Jn,di),re.Kb=vn),vn=ur.x+(le.x-ur.x)*me-y.x,ur=ur.y+(le.y-ur.y)*me-y.y}re.measure(1/0,1/0,0,0),le=re.measuredBounds,Hn=re.naturalBounds;var Xr=0;re instanceof vr&&(Xr=re.strokeWidth),tr=Hn.width+Xr;var So=Hn.height+Xr;kt.reset(),kt.translate(-le.x,-le.y),kt.scale(re.scale,re.scale),kt.rotate(Jn===Va?re.angle:di,tr/2,So/2),Jn!==mp&&Jn!==yp||kt.rotate(90,tr/2,So/2),Jn!==vp&&Jn!==wp||kt.rotate(-90,tr/2,So/2),Jn===T0&&(45<di&&135>di||225<di&&315>di)&&kt.rotate(-di,tr/2,So/2),Hn=new He(0,0,tr,So),Dt.xi(Hn,Ge),kt.Ga(Dt),Ge=-Dt.x+Xr/2*re.scale,re=-Dt.y+Xr/2*re.scale,Xt.assign(yi),Xr=isNaN(yi.x);var Zs=isNaN(yi.y);if(Xr||Zs){tr=tr/2+3,So=So/2+3;var $s=45<=di&&135>=di,Oa=225<=di&&315>=di;Jn===Va&&($s||Oa)?(Xt.x=Zs?tr:yi.y,Xt.y=Xr?So:yi.x,$s?0<=fe||isNaN(fe)&&.5>me||!Xr||(Xt.y=-So):Oa&&((0<=fe||isNaN(fe)&&.5>me)&&Xr&&(Xt.y=-So),Zs&&(Xt.x=-tr))):(Xr&&(Xt.x=0<=fe||isNaN(fe)&&.5>me?tr:-tr),Zs&&(Xt.y=-So),Xt.rotate(di))}else Xt.rotate(di);vn+=Xt.x,ur+=Xt.y,Hn.set(le),Hn.h(vn+Ge,ur+re,le.width,le.height),Et.push(Hn),x.ed(Hn)}}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),er.free(kt),Ut.free(Dt),Ut.free(Xt)}}}},kl.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Vr||a instanceof Rn){var E=a,b=null;a instanceof Vr&&(b=a,E=b.adornedPart);var z=a instanceof Vr?null:E.path,tt=a.j;if(tt.length!==0){var rt=0;if(z!==null&&rt<tt.length){var ot=tt[rt];rt++,z.arrange(ot.x-a.jg.x,ot.y-a.jg.y,ot.width,ot.height)}for(ot=0;ot<x;ot++){var lt=y[ot];if(lt!==z&&rt<tt.length){var ut=tt[rt];rt++,lt.arrange(ut.x-a.jg.x,ut.y-a.jg.y,ut.width,ut.height)}}}if(y=E.points,x=y.count,2<=x&&a instanceof Rn)for(z=a.labelNodes;z.next();){var ft=a;tt=z.value,rt=tt.segmentIndex,ot=tt.segmentFraction;var yt=tt.alignmentFocus;if(lt=tt.segmentOrientation,ut=tt.segmentOffset,isNaN(rt)){var Et=ft.ua,kt=wn();Et.Qu(ot,kt);var Dt=Ut.allocAt(kt[0],kt[1]);Dt.add(ft.i(0)),Et.type===Un.j||(Et=Et.figures.first()),Dt.offset(-Et.startX,-Et.startY),Et=kt[2],lt!==Va&&(ft=ft.computeAngle(tt,lt,Et),tt.angle=ft),ft=Dt.x;var Xt=Dt.y;Ut.free(Dt),Mn(kt)}else if(rt<-x||rt>=x)kt=Ut.alloc(),Et=ft,Xt=kt,Et.vg(),Et.computeMidPoint(Xt),Et=ft.midAngle,lt!==Va&&(ft=ft.computeAngle(tt,lt,Et),tt.angle=ft),ft=kt.x,Xt=kt.y,Ut.free(kt);else{if(Dt=0,0<=rt?(kt=y.s[rt],Xt=rt<x-1?y.s[rt+1]:kt):(Dt=x+rt,kt=y.s[Dt],Xt=0<Dt?y.s[Dt-1]:kt),kt.Xa(Xt)){0<=rt?(Et=0<rt?y.s[rt-1]:kt,Dt=rt<x-2?y.s[rt+2]:Xt):(Et=Dt<x-1?y.s[Dt+1]:kt,Dt=1<Dt?y.s[Dt-2]:Xt);var zt=Et.Bf(kt),re=Xt.Bf(Dt);Et=zt>re+10?0<=rt?Et.ab(kt):kt.ab(Et):re>zt+10?0<=rt?Xt.ab(Dt):Dt.ab(Xt):0<=rt?Et.ab(Dt):Dt.ab(Et)}else Et=0<=rt?kt.ab(Xt):Xt.ab(kt);lt!==Va&&(ft=ft.computeAngle(tt,lt,Et),tt.angle=ft),ft=kt.x+(Xt.x-kt.x)*ot,Xt=kt.y+(Xt.y-kt.y)*ot}if(yt.ys())tt.location=new Ut(ft,Xt);else{yt.Mc()&&(yt=Pr),kt=er.alloc(),kt.reset(),kt.scale(tt.scale,tt.scale),kt.rotate(tt.angle,0,0);var le=tt.naturalBounds;Dt=He.allocAt(0,0,le.width,le.height),zt=Ut.alloc(),zt.xi(Dt,yt),kt.Ga(zt),yt=-zt.x,re=-zt.y;var fe=le.width,me=le.height;le=Ut.alloc(),le.assign(ut);var Ge=isNaN(ut.x),Jn=isNaN(ut.y);if(Ge||Jn){fe=fe/2+3,me=me/2+3;var yi=45<=Et&&135>=Et,di=225<=Et&&315>=Et;lt===Va&&(yi||di)?(le.x=Jn?fe:ut.y,le.y=Ge?me:ut.x,yi?0<=rt||isNaN(rt)&&.5>ot||!Ge||(le.y=-me):di&&((0<=rt||isNaN(rt)&&.5>ot)&&Ge&&(le.y=-me),Jn&&(le.x=-fe))):(Ge&&(le.x=0<=rt||isNaN(rt)&&.5>ot?fe:-fe),Jn&&(le.y=-me),le.rotate(Et))}else le.rotate(Et);ft+=le.x,Xt+=le.y,kt.pp(Dt),yt+=Dt.x,re+=Dt.y,rt=Ut.allocAt(ft+yt,Xt+re),tt.move(rt),Ut.free(rt),Ut.free(le),Ut.free(zt),He.free(Dt),er.free(kt)}}b!==null?b.Ul(!1):E.Ul(!1),E=Uy(a),a.location.h(a.position.x+E.x,a.position.y+E.y),Ut.free(E)}};function tu(a,y,x,E){if(yl(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof Vr&&a.type===Fn.Link&&a.adornedObject instanceof vr&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof Rn&&a.ua!==null?(a=a.geometry.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):a instanceof Vr&&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"}Re(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 He(-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,kt=rt.strokeWidth,Dt=Et.flattenedSegments,Xt=Et.flattenedLengths,zt=Et.flattenedTotalLength,re=Dt.length,le=0,fe=0,me=wn(),Ge=0;Ge<re;Ge++){var Jn=Dt[Ge],yi=[];fe=le=0;for(var di=Jn.length,Hn=0;Hn<di;Hn+=2){var vn=Jn[Hn],ur=Jn[Hn+1];if(Hn!==0){var tr=180*Math.atan2(ur-fe,vn-le)/Math.PI;0>tr&&(tr+=360),yi.push(tr)}le=vn,fe=ur}me.push(yi)}if(a.graduatedIntervals===null){for(var Xr=[],So=a.O.s,Zs=So.length,$s=0;$s<Zs;$s++){var Oa=So[$s],Ys=[];if(Xr.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=Xr}var Mc=a.graduatedIntervals,Yl=a.O.s,gu=Yl.length,Dl=0,Sl=0,md=zt;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*zt/a.graduatedRange&&Il.graduatedSkip===null)){var qf=Xt[0][0],LA=0,Bl=0;Sl=zt*Il.graduatedStart-1e-4,md=zt*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 vr&&!Il.graduatedSkip(Ul,Il))&&(Dl=(Ul-a.graduatedMin)*zt/a.graduatedRange,Dl>zt&&(Dl=zt),Sl<=Dl&&Dl<=md)){for(var Ah=me[LA][Bl],bc=Xt[LA][Bl];LA<Xt.length;){for(;Dl>qf&&Bl<Xt[LA].length-1;)Bl++,Ah=me[LA][Bl],bc=Xt[LA][Bl],qf+=bc;if(Dl<=qf)break;LA++,Bl=0,Ah=me[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 Ut(MA+(Cl[2*Bl+2]-MA)*Nh+kt/2-Et.bounds.x,xm+(Cl[2*Bl+3]-xm)*Nh+kt/2-Et.bounds.y);zg.scale(rt.scale,rt.scale);t:{var sA=Ah,sf=me[LA];if(!(.5005>Nh&&.4995<Nh)){var bA=sA;if(.5>Nh?0<Bl?bA=sf[Bl-1]:we.$(Cl[0],Cl[Cl.length-2])&&we.$(Cl[1],Cl[Cl.length-1])&&(bA=sf[sf.length-1]):.5<Nh&&(Bl+1<sf.length?bA=sf[Bl+1]:we.$(Cl[0],Cl[Cl.length-2])&&we.$(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)}Mn(me);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 vr){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=He.allocAt(0,0,Vg,lf),Pl=Ut.alloc();Pl.xi(eg,af),He.free(eg);for(var Ih=-Pl.x,aA=-Pl.y,ou=new He,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)}Ut.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 He,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=Rn.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=er.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=He.allocAt(0,0,Ic,Af),Uc=Ut.alloc();Uc.xi(ng,Tc),lA.Ga(Uc);var ig=-Uc.x,oy=-Uc.y,Qh=Ut.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 He(Wp,Xg,Dc.width,Dc.height),Zp=new He(Dc.x,Dc.y,Dc.width,Dc.height),sy=new He(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),Ut.free(Qh),Ut.free(Uc),He.free(ng),er.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],kt=Et.length;if(yt.visible&&yt!==z&&Et.length!==0){if(yt instanceof vr){if(!(2>a.graduatedTickUnit*yt.interval*z.geometry.flattenedTotalLength/a.graduatedRange*tt&&yt.graduatedSkip===null)){var Dt=yt.measuredBounds,Xt=yt.strokeWidth*yt.scale,zt=yt.alignmentFocus;zt.Mc()&&(zt=xo);for(var re=0;re<kt;re++){var le=Et[re].$l,fe=Et[re].angle,me=zt,Ge=yt.Ab;Ge.reset(),Ge.translate(le.x+rt.x,le.y+rt.y),Ge.rotate(fe+yt.angle,0,0),Ge.translate(-Dt.width*me.x+me.offsetX+Xt/2,-Dt.height*me.y+me.offsetY+Xt/2),Ge.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<kt;Xt++)zt=Et[Xt],zt.actualBounds&&zt.measuredBounds&&zt.naturalBounds&&(Dt.ec=zt.text||"",Dt.Kb=zt.Sz||0,Dt.Gc=zt.lineCount||0,re=zt.lines,re!==void 0&&(Dt.Cb=re[0],Dt.Ih=re[1],Dt.df=re[2],Dt.Le=re[3],Dt.Qc=re[4],Dt.Qb=re[5],Dt.ze=re[6]),zt.naturalBounds&&(Dt.dc=zt.naturalBounds),zt.actualBounds&&(re=zt.actualBounds,Dt.arrange(re.x,re.y,re.width,re.height)),re=zt.actualBounds,Dt.arrange(re.x,re.y,re.width,re.height),le=zt.measuredBounds,zt=zt.naturalBounds,fe=Dt.Ab,fe.reset(),fe.translate(re.x+rt.x,re.y+rt.y),fe.translate(-le.x,-le.y),Dt.no(fe,zt.x,zt.y,zt.width,zt.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 Fn(a,y){if(ve.call(this),this.na=null,a===void 0)this.na=Fn.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=Fn.Position,y=a);this.na===null&&he("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Fn.Grid?1048576:0),this.O=new ee,this.yb=zi,this.Tm=ws,this.Uf=or,this.$g=null,this.$e="",this.jg=new He(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=Bi,this.jn=fr,this.kn=pn,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Re(Fn,ve),Fn.prototype.cloneProtected=function(a){ve.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},Fn.prototype.Af=function(a){ve.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},Fn.prototype.copy=function(){var a=ve.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 $n&&(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},Tt=Fn.prototype,Tt.toString=function(){return"Panel("+this.type.name+")#"+Vn(this)},Tt.Pn=function(a){ve.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,E=0;E<x;E++)y[E].Pn(a)},Tt.hh=function(a,y){if(this.na===Fn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Fn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Fn.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===Fn.Spot)&&a.save();for(var E=this.Pb(),b=this.O.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];x&&rt===E&&(a.clipInsteadOfFill=!0),rt.gc(a,y),x&&rt===E&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function qA(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,E=0<a.columnCount?a.colDefs:null;x!==null&&$A(a,y,!0,x,!0),E!==null&&$A(a,y,!1,E,!0),x!==null&&mc(a,y,!0,x),E!==null&&mc(a,y,!1,E),x!==null&&$A(a,y,!0,x,!1),E!==null&&$A(a,y,!1,E,!1)}function mc(a,y,x,E){for(var b=E.length,z=a.actualBounds,tt=a.naturalBounds,rt=!0,ot=0;ot<b;ot++){var lt=E[ot];if(lt!==void 0&&lt.actual!==0)if(rt)rt=!1;else{if(x){if(lt.position>tt.height)continue}else if(lt.position>tt.width)continue;var ut=lt.separatorStrokeWidth;isNaN(ut)&&(ut=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ft=lt.separatorStroke;if(ft===null&&(ft=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ut!==0&&ft!==null){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(),kt=ft.separatorStrokeWidth;isNaN(kt)&&(kt=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Dt=ft.separatorStroke;Dt===null&&(Dt=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(Dt===null||ft.index===(x?ot:lt))&&(kt=0),Et-=kt,kt=ft.position+kt,Et+=ft.actual,kt+Et>yt&&(Et=yt-kt),0>=Et||(yt=a.yb,jo(a,y,ft.background,!0,!1,rt,tt),x?y.fillRect(yt.left,kt+yt.top,tt.width-(yt.left+yt.right),Et):y.fillRect(kt+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"}Tt.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},Tt.kk=function(a,y,x){if(!ve.prototype.kk.call(this,a,y,x))return!1;if(this.type===Fn.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===Fn.Grid||this.na===Fn.Graduated)return this.svg.innerHTML="",this.svg.remove(),!1;x=this.O.s;for(var E=x.length,b=0;b<E;b++)x[b].gc(a,y);return!0},Tt.nk=function(){return!0},Tt.$o=function(a,y,x,E){if(!this.isClipping)if(this.Dd()&&a.bk!==null){a=a.bk,y=this.O.s;for(var b=0,z=0,tt=0;tt<y.length;tt++)if(y[tt].Ed()){var rt=y[tt].actualBounds;b=tt===0?rt.x:Math.min(rt.x,b),z=tt===0?rt.y:Math.min(rt.y,z)}E.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-b)+","+(a.y-x.y-z)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else ve.prototype.$o.call(this,a,y,x,E)},Tt.Sj=function(a,y,x,E,b){var z=this.se(),tt=this.transform,rt=1/(tt.m11*tt.m22-tt.m12*tt.m21),ot=tt.m22*rt,lt=-tt.m12*rt,ut=-tt.m21*rt,ft=tt.m11*rt,yt=rt*(tt.m21*tt.dy-tt.m22*tt.dx),Et=rt*(tt.m12*tt.dx-tt.m11*tt.dy);if(this.areaBackground!==null)return tt=this.actualBounds,we.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=we.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=Ut.alloc(),yt=null,y=1/0;var kt=null,Dt=this.isClipping&&this.na===Fn.Spot;Dt&&(kt=Ut.alloc(),yt=this.Pb(),(lt=yt.Sj(rt,a,ot,x,kt))&&(y=(rt-kt.x)*(rt-kt.x)+(a-kt.y)*(a-kt.y)));for(var Xt=0;Xt<Et;Xt++){var zt=ft[Xt];zt.visible&&zt!==yt&&zt.Sj(rt,a,ot,x,ut)&&(lt=!0,zt=(rt-ut.x)*(rt-ut.x)+(a-ut.y)*(a-ut.y),zt<E&&(E=zt,b.set(ut)))}return Dt&&(y>E&&b.set(kt),Ut.free(kt)),Ut.free(ut),z&&b.transform(tt),lt},Tt.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();ve.prototype.Gj.call(this)},Tt.v=function(a){if(!yl(this)){ve.prototype.v.call(this,a),a=null,(this.na===Fn.Auto||this.na===Fn.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 Fn||b instanceof Po||z!==Bn)&&b.v(!0)}}}},Tt.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()}},Tt.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()}},Tt.Wu=function(){Ga(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},Tt.Wl=function(a,y,x,E){var b=this.jg;b.h(0,0,0,0);var z=this.desiredSize,tt=this.minSize;x===void 0&&(x=tt.width,E=tt.height),x=Math.max(x,tt.width),E=Math.max(E,tt.height);var rt=this.maxSize;isNaN(z.width)||(a=Math.min(z.width,rt.width)),isNaN(z.height)||(y=Math.min(z.height,rt.height)),a=Math.max(x,a),y=Math.max(E,y);var ot=this.yb;a=Math.max(a-ot.left-ot.right,0),y=Math.max(y-ot.top-ot.bottom,0);var lt=this.O.s;lt.length!==0&&this.na.measure(this,a,y,lt,b,x,E),a=b.width+ot.left+ot.right,ot=b.height+ot.top+ot.bottom,isFinite(z.width)&&(a=z.width),isFinite(z.height)&&(ot=z.height),a=Math.min(rt.width,a),ot=Math.min(rt.height,ot),a=Math.max(tt.width,a),ot=Math.max(tt.height,ot),a=Math.max(x,a),ot=Math.max(E,ot),gr(b,a,ot),gr(this.naturalBounds,a,ot),this.Ge(0,0,a,ot)},Tt.Pb=function(){if(this.$g===null){var a=this.O.s,y=a.length;if(y===0)return null;for(var x=0;x<y;x++){var E=a[x];if(E.isPanelMain===!0)return this.$g=E}this.$g=a[0]}return this.$g};function sl(a){return a.part!==null?a.part.locationObject:null}Tt.eh=function(a,y,x,E){var b=this.O.s;if(this.actualBounds.h(a,y,x,E),b.length!==0){if(!this.desiredSize.w()){a=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=Bn),a){case Bn:(y>x||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case Ln:this.v(!0),this.measure(x+rt,E+tt,0,0);break;case Li:this.v(!0),this.measure(x+rt,z+tt,0,0);break;case ji:this.v(!0),this.measure(y+rt,E+tt,0,0)}}this.na.arrange(this,b,this.jg)}},Tt.gh=function(a){var y=this.naturalBounds,x=sl(this);if(co(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var E=y.length,b=Ut.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(mn(b.set(a),z.transform),z.ca(b)))return Ut.free(b),!0}return Ut.free(b),!(this.Ma===null&&this.areaBackground===null)}return!1},Tt.ks=function(a){if(this.bindingId===a)return this;for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E].ks(a);if(b!==null)return b}return null},Tt.qm=function(a,y){if(y(this,a),a instanceof Fn){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 Fn&&Xd(a,z,x)}}function Cw(a,y){hy(a,a,y)}function hy(a,y,x){if(x(y),y instanceof Fn){y=y.O.s;for(var E=y.length,b=0;b<E;b++)hy(a,y[b],x)}}Tt.Nl=function(a){return cy(this,this,a)};function cy(a,y,x){if(x(y))return y;if(y instanceof Fn){y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=cy(a,y[b],x);if(z!==null)return z}}return null}Tt.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=sp(this));for(var E=0;E<x;E++){var b=y[E];if(b instanceof Fn){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 Fn?x=Math.max(x,dy(b)):b instanceof vr&&(x=Math.max(x,b.ig/2*b.strokeMiterLimit*b.Df()))}return x}Tt.se=function(){return!(this.type===Fn.TableRow||this.type===Fn.TableColumn)};function vc(a){return a.type===Fn.TableRow||a.type===Fn.TableColumn}Tt.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:mn(Ut.allocAt(a.x,a.y),this.transform),rt=this.diagram,ot=10,lt=5;if(rt!==null&&(ot=rt.Ql("extraTouchArea"),lt=ot/2),co(-(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=Ut.alloc(),lt=(ot=this.isClipping&&this.na===Fn.Spot)?this.Pb():null,ot&&(lt.se()?mn(rt.set(a),lt.transform):rt.set(a),!lt.ca(rt)))return Ut.free(rt),z||Ut.free(tt),null;for(var ft=sl(this);ut--;){var yt=b[ut];if((yt.visible||yt===ft)&&(yt.se()?mn(rt.set(a),yt.transform):rt.set(a),!ot||yt!==lt)){var Et=null;if(yt instanceof Fn?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 Ut.free(rt),z||Ut.free(tt),Et}}Ut.free(rt)}return this.background===null&&this.areaBackground===null?(z||Ut.free(tt),null):(a=co(0,0,E.width,E.height,tt.x,tt.y)?this:null,z||Ut.free(tt),a)}return z||Ut.free(tt),null},Tt.ji=function(a,y,x,E){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var b=this.naturalBounds,z=this.se(),tt=z?a:mn(Ut.allocAt(a.x,a.y),this.transform);if(b=co(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=Ut.alloc(),ut=sl(this);ot--;){var ft=rt[ot];if(ft.visible||ft===ut){ft.se()?mn(lt.set(a),ft.transform):lt.set(a);var yt=ft;ft=ft instanceof Fn?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))}}Ut.free(lt)}return z||Ut.free(tt),b&&(this.background!==null||this.areaBackground!==null)}return z||Ut.free(tt),!1},Tt.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=er.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return Nm(this,y,x,b),z===void 0&&er.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 Fn?ut:null,yt=er.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)),er.free(yt))}}return z===void 0&&er.free(tt),E}return z===void 0&&er.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 Fn&&Nm(tt,y,x,E),y!==null&&(tt=y(tt)),tt===null||x!==null&&!x(tt)||E.add(tt))}}}Tt.og=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;x===void 0&&(x=null),E===void 0&&(E=null);var tt=this.naturalBounds,rt=this.se(),ot=rt?a:mn(Ut.allocAt(a.x,a.y),this.transform),lt=rt?y:mn(Ut.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||xn(ot.x,ot.y,0,0,0,tt.height)<=ut||xn(ot.x,ot.y,0,tt.height,tt.width,tt.height)<=ut||xn(ot.x,ot.y,tt.width,tt.height,tt.width,0)<=ut||xn(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||(Ut.free(ot),Ut.free(lt)),ft){if(!this.isAtomic){ot=Ut.alloc(),lt=Ut.alloc(),ut=sl(this);for(var yt=this.O.s,Et=yt.length;Et--;){var kt=yt[Et];if(kt.visible||kt===ut){var Dt=kt.actualBounds,Xt=this.naturalBounds;(!rt||!(Dt.x>Xt.width||Dt.y>Xt.height||0>Dt.x+Dt.width||0>Dt.y+Dt.height))&&(kt.se()?(Dt=kt.transform,mn(ot.set(a),Dt),mn(lt.set(y),Dt)):(ot.set(a),lt.set(y)),Dt=kt,kt=kt instanceof Fn?kt:null,(kt!==null?kt.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)))}}Ut.free(ot),Ut.free(lt)}return b?ft:tt}return!1};function Dm(a){var y=null;return a instanceof vr&&(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 vr&&(y=a.spot2,y===ws&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=yo),y}Tt.add=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];for(x=0;x<y.length;x++)this.Gb(this.O.count,y[x]);return this},Tt.M=function(a){return this.O.M(a)},Tt.Gb=function(a,y){y instanceof Ui&&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!==Fn.Grid||y instanceof vr||he("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Fn.Graduated||y instanceof vr||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 Fn&&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 $n&&(x.Te=!0),x.Te&&x instanceof $n&&(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}Tt.remove=function(a){for(var y=this.O.s,x=y.length,E=-1,b=0;b<x;b++)if(y[b]===a){E=b;break}E!==-1&&this.pc(E,!0)},Tt.mb=function(a){0<=a&&this.pc(a,!0)},Tt.pc=function(a,y){var x=this.O,E=x.M(a);if(E.Ng=null,E.wi(null),this.ge!==null){var b=E.data;typeof b=="object"&&this.ge.remove(b)}x.mb(a),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 $n&&(E instanceof Fn?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))},Tt.Fb=function(a){0>a&&Yn(a,">= 0",Fn,"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]},Tt.oA=function(a){if(0>a&&Yn(a,">= 0",Fn,"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()}}Tt.Eb=function(a){0>a&&Yn(a,">= 0",Fn,"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]},Tt.jA=function(a){if(0>a&&Yn(a,">= 0",Fn,"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()}}Tt.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&s0(y,a),this},Tt.Hy=function(a,y){return(a=this.Fb(a))&&s0(a,new Ns(y)),this},Tt.By=function(a,y){return(a=this.Eb(a))&&s0(a,new Ns(y)),this},Tt.nz=function(a){if(0>a||this.type!==Fn.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,E=x.length,b=this.topIndex;b<E;b++){var z=x[b];if(z!==void 0&&(y+=z.total,a<y))break}return b},Tt.fz=function(a){if(0>a||this.type!==Fn.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,E=x.length,b=this.leftIndex;b<E;b++){var z=x[b];if(z!==void 0&&(y+=z.total,a<y))break}return b},Tt.Fz=function(a,y){if(y===void 0&&(y=new Ut(NaN,NaN)),this.type!==Fn.Graduated)return y.h(NaN,NaN),y;a=Math.min(Math.max(a,this.graduatedMin),this.graduatedMax);var x=this.Pb();return x.geometry.Pu((a-this.graduatedMin)/this.graduatedRange,y),x.transform.Ga(y)},Tt.Gz=function(a){if(this.type!==Fn.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 Fn&&ut.type===Fn.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 kt=Et.be.iterator;kt.next();){var Dt=kt.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();)kt=Et.value,kt.xd=yt,kt.to=1,kt.wl=yt.index,y.add(kt)}}});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 Fn&&(tt=rt.substring(0,ot),rt=rt.substr(ot+1),ot=z.fb(tt),ot!==null?(z=ot,b.targetProperty=rt):vi('Warning: unable to find GraphObject named "'+tt+'" for Binding: '+b.toString())),z instanceof Ns?(tt=Vn(z.panel),b.Ai=tt===void 0?-1:tt,z.panel.bindingId=b.Ai):z instanceof ve?(tt=Vn(z),b.Ai=tt===void 0?-1:tt,z.bindingId=b.Ai):he("Unknown type of binding target: "+z)}y.freeze(),a instanceof Ui&&a.Zc()&&a.Va()}Tt.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return Cw(y,function(x){x instanceof Fn&&(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},Tt.La=function(a){var y=this.allBindings;if(y!==null)for(a===void 0&&(a=""),y=y.iterator;y.next();){var x=y.value,E=x.sourceProperty;if((a===""||E===""||E===a)&&(E=x.targetProperty,x.converter!==null||E!=="")){E=this.data;var b=x.sourceName;if(b!==null){if(b==="")E=this;else if(b==="/")E=this;else if(b===".")E=this;else if(b==="..")E=this;else if(E=this.fb(b),E===null)continue}else if(x.isToModel)if(E=this.diagram,E!==null)E=E.model.modelData;else continue;var z=this,tt=x.Ai;if(tt!==-1){if(z=this.ks(tt),z===null)continue}else x.xd!==null&&(z=x.xd);if(b==="/"?E=z.part:b==="."?E=z:b===".."&&(E=z.panel),b=x.to,b!==0){if(!(z instanceof Fn))continue;b===1?z=z.Eb(x.wl):b===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,E)}}},Tt.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function Pw(a,y){a=a.O.s;for(var x=a.length,E=y.length,b=0,z=null;b<x&&(z=a[b],!(z instanceof Fn&&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 Fn)||z.data!==y[tt])return!0;b++,tt++}return!1}function sp(a){if(a.type===Fn.Spot||a.type===Fn.Auto)return Math.min(a.O.length,1);if(a.type===Fn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var E=a.M(x);if(!(E instanceof vr&&E.isPanelMain))break}return x}return a.type===Fn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Fn&&vc(a))?1:0}Tt.mv=function(){for(var a=sp(this);this.O.length>a;)this.pc(this.O.length-1,!1);my(this,this.itemArray)};function my(a,y){var x=sp(a);if(y===null||y.length===0)for(;a.O.length>x;)a.pc(a.O.length-1,!1);else if(a.O.length<=x){x=y.length;for(var E=0;E<x;E++)r0(a,y[E],E,!0)}else{E=x;for(var b=0;b<y.length;b++,E++){var z=y[b],tt=E<a.O.length?a.O.M(E):null;if(tt instanceof Fn){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 $n&&(y.Te=!0),y.Te&&y instanceof $n&&(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 Fn){var b=y,z=x;E.type===Fn.TableRow?E.row=b:E.type===Fn.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,vi('No item template Panel found for category "'+y+'" on '+a),vi(" Using default item template."),a=new Fn,y=new Po,y.bind(new Fs("text","",_i)),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 Fn){y=y.O.s,E=y.length;for(var b=0;b<E;b++){var z=y[b];x&&z instanceof Fn&&!z.isEnabled||o0(a,z,x)}}}function FA(a,y){y.name=a,Du.add(a,y)}Ue.Object.defineProperties(Fn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Fn.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&&Yn(a,">= 0",Fn,"padding"),a=new lr(a)):(0>a.left&&Yn(a.left,">= 0",Fn,"padding:value.left"),0>a.right&&Yn(a.right,">= 0",Fn,"padding:value.right"),0>a.top&&Yn(a.top,">= 0",Fn,"padding:value.top"),0>a.bottom&&Yn(a.bottom,">= 0",Fn,"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:zi},set:function(a){typeof a=="number"&&(a=new lr(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 Ui&&!(this instanceof Vr);cu(this),this.ub=a;var E=this.diagram;E!==null&&(x?(x=E.partManager,this instanceof Rn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Ui&&(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 Ui||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(Fn,{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")}}}),Fn.prototype.rebuildItemElements=Fn.prototype.mv,Fn.prototype.findItemPanelForData=Fn.prototype.sx,Fn.prototype.updateTargetBindings=Fn.prototype.La,Fn.prototype.copyTemplate=Fn.prototype.Uy,Fn.prototype.graduatedValueForPoint=Fn.prototype.Gz,Fn.prototype.graduatedPointForValue=Fn.prototype.Fz,Fn.prototype.findColumnForLocalX=Fn.prototype.fz,Fn.prototype.findRowForLocalY=Fn.prototype.nz,Fn.prototype.addColumnDefinition=Fn.prototype.By,Fn.prototype.addRowDefinition=Fn.prototype.Hy,Fn.prototype.addRowColumnDefinition=Fn.prototype.Gy,Fn.prototype.removeColumnDefinition=Fn.prototype.jA,Fn.prototype.getColumnDefinition=Fn.prototype.Eb,Fn.prototype.removeRowDefinition=Fn.prototype.oA,Fn.prototype.getRowDefinition=Fn.prototype.Fb,Fn.prototype.removeAt=Fn.prototype.mb,Fn.prototype.remove=Fn.prototype.remove,Fn.prototype.insertAt=Fn.prototype.Gb,Fn.prototype.elt=Fn.prototype.M,Fn.prototype.add=Fn.prototype.add,Fn.prototype.findObject=Fn.prototype.fb,Fn.prototype.findInVisualTree=Fn.prototype.Nl,Fn.prototype.walkVisualTreeFrom=Fn.prototype.qm,Fn.prototype.findMainElement=Fn.prototype.Pb;var vy=!1,yy=null,Du=new Qe;Fn.className="Panel",Fn.definePanelLayout=FA,FA("Position",new Jo),FA("Vertical",new jr),FA("Auto",new Do),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=zi,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){An(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=or,this.lo=this.dg=null,this.mo=NaN,this.Ma=this.tj=null,this.Pm=!1,a&&(Object.assign(this,a),a.column!==void 0?(this.isRow=!1,this.index=a.column):a.row!==void 0&&(this.isRow=!0,this.index=a.row))}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=li(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=li(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Tt=Ns.prototype,Tt.qb=function(a){a.classType===Ns&&(this.sizing=a)},Tt.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Vn(this)},Tt.wi=function(a){this.Me=a},Tt.Io=function(a){var y=0,x=this.Me;if(this.index!==a&&(a=this.separatorStroke,a===null&&x!==null&&(a=this.isRow?x.defaultRowSeparatorStroke:x.defaultColumnSeparatorStroke),a!==null&&(y=this.separatorStrokeWidth,isNaN(y)&&(x!==null?y=this.isRow?x.defaultRowSeparatorStrokeWidth:x.defaultColumnSeparatorStrokeWidth:y=0))),a=this.dg,a===null)if(x!==null)a=x.defaultSeparatorPadding;else return y;return y+(this.isRow?a.top:a.left)},Tt.Wc=function(){var a=0,y=this.Me,x=0,E=this.isRow;if(y!==null&&y.type===Fn.Table)for(var b=E?y.rowDefs.length:y.colDefs.length,z=0;z<b;z++){var tt=E?y.rowDefs[z]:y.colDefs[z];if(tt!==void 0&&tt.oa!==0){x=tt.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=E?y.defaultRowSeparatorStroke:y.defaultColumnSeparatorStroke),x!==null&&(a=this.separatorStrokeWidth,isNaN(a)&&(y!==null?a=E?y.defaultRowSeparatorStrokeWidth:y.defaultColumnSeparatorStrokeWidth:a=0))),E=this.dg,E===null)if(y!==null)E=y.defaultSeparatorPadding;else return a;return a+(this.isRow?E.top+E.bottom:E.left+E.right)},Tt.Ob=function(a,y,x){var E=this.Me;if(E!==null&&(E.cb(No,a,this,y,x,void 0,void 0),this.be!==null&&(y=E.diagram,y!==null&&!y.skipsModelSourceBindings&&(E=E.ih(),E!==null&&(y=E.data,y!==null)))))for(x=this.be.iterator;x.next();)x.value.sp(this,y,a,E)};function a0(a){if(a.sizing===Rm){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}Tt.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new 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&&Yn(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&&Yn(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))&&Yn(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&&Yn(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 lr(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 rn(Ns,"Default",0),ap=new rn(Ns,"None",1),l0=new rn(Ns,"ProportionalExtra",2);Ns.className="RowColumnDefinition",Ns.Default=Rm,Ns.None=ap,Ns.ProportionalExtra=l0;function vr(a,y){ve.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)}Re(vr,ve),vr.prototype.cloneProtected=function(a){ve.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=li(this.Yg)),this.Na!==null&&(a.Na=this.Na.nc?this.Na:this.Na.copy()),a.Un=this.Un,a.Vn=this.Vn,this.fa!==null&&(a.fa=this.fa.copy())};function Jd(a){a.Na===null?a.Na=new Gm:a.Na.nc&&(a.Na=a.Na.copy())}Tt=vr.prototype,Tt.th=function(){ve.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Tt.qb=function(a){a===Bn||a===Bi||a===Mr||a===or?this.geometryStretch=a:ve.prototype.qb.call(this,a)},Tt.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Vn(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,kt,Dt=0,Xt=wn(),zt=2;zt<b;zt+=2)lt=x[zt],ut=x[zt+1],ft=lt-rt,rt=ut-ot,ft===0&&(ft=.001),yt=rt/ft,Et=Math.atan2(rt,ft),kt=Math.sqrt(ft*ft+rt*rt),Xt.push([ft,Et,yt,kt]),Dt+=kt,rt=lt,ot=ut;rt=x[0],ot=x[1],ft=E.measuredBounds.width,E instanceof vr&&(ft-=E.strokeWidth),1>ft&&(ft=1),b=x=ft,lt=tt/2,ut=lt!==0,zt=0,kt=Xt[zt],ft=kt[0],Et=kt[1],yt=kt[2],kt=kt[3];for(var re=0;.1<=Dt;){if(re===0&&(ut?(b=x,b-=lt,Dt-=lt,ut=!1):b=x,b===0&&(b=1)),b>Dt){Mn(Xt);return}b>kt?(re=b-kt,b=kt):re=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)),re===0&&E.hh(a,y),a.translate(tt/2,z/2),a.rotate(-Et),a.translate(-rt,-ot),Dt-=b,kt-=b,re!==0){if(zt++,zt===Xt.length){Mn(Xt);return}kt=Xt[zt],ft=kt[0],Et=kt[1],yt=kt[2],kt=kt[3],b=re}}Mn(Xt)}}Tt.hh=function(a,y){var x=this.xc,E=this.Ui;if(x!==null||E!==null){var b=this.ua;if(b!==null){a.yc();var z=this.actualBounds,tt=this.naturalBounds;E!==null&&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===Fn.Link&&rt instanceof Vr&&rt.category==="Selection"&&rt.adornedObject instanceof vr&&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===Un.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===Un.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===Un.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+we.wg*b,ot-yt,lt+b,ot-we.wg*yt,lt+b,ot),a.bezierCurveTo(lt+b,ot+we.wg*yt,lt+we.wg*b,ot+yt,lt,ot+yt),a.bezierCurveTo(lt-we.wg*b,ot+yt,lt-b,ot+we.wg*yt,lt-b,ot),a.bezierCurveTo(lt-b,ot-we.wg*yt,lt-we.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===Un.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,kt=0;kt<ft;kt++){var Dt=ut[kt];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 zt=0;zt<Xt;zt++){var re=Et[zt];zt===0&&a.lineTo(re[0],re[1]),a.bezierCurveTo(re[2],re[3],re[4],re[5],re[6],re[7])}break;case nl:if(zt=Xt=0,Et!==null&&Et.type===ns){if(Et=xa(Et,lt),re=Et.length,re===0){a.lineTo(Dt.endX,Dt.endY);break}Et=Et[re-1]||null,Et!==null&&(Xt=Et[6],zt=Et[7])}else Xt=Et!==null?Et.endX:lt.startX,zt=Et!==null?Et.endY:lt.startY;if(Et=el(Dt,lt,Xt,zt),Xt=Et.length,Xt===0){a.lineTo(Dt.endX,Dt.endY);break}for(zt=0;zt<Xt;zt++)re=Et[zt],a.bezierCurveTo(re[2],re[3],re[4],re[5],re[6],re[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=wn(),z.type===Un.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===Un.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(kt=lt[ft],kt.type){case ms:wg(a,y,E,x),E.length=0,E.push(kt.endX),E.push(kt.endY),tt=kt.endX,b=kt.endY,ot=tt,yt=b;break;case po:E.push(kt.endX),E.push(kt.endY),tt=kt.endX,b=kt.endY;break;case Bs:we.Qe(tt,b,kt.point1X,kt.point1Y,kt.point2X,kt.point2Y,kt.endX,kt.endY,.5,E),tt=kt.endX,b=kt.endY;break;case Na:we.ep(tt,b,kt.point1X,kt.point1Y,kt.endX,kt.endY,.5,E),tt=kt.endX,b=kt.endY;break;case ns:if(Dt=xa(kt,rt),Et=Dt.length,Et===0){E.push(kt.centerX),E.push(kt.centerY),tt=kt.centerX,b=kt.centerY;break}for(Xt=0;Xt<Et;Xt++)zt=Dt[Xt],we.Qe(tt,b,zt[2],zt[3],zt[4],zt[5],zt[6],zt[7],.5,E),tt=zt[6],b=zt[7];break;case nl:if(Dt=el(kt,rt,tt,b),Et=Dt.length,Et===0){E.push(kt.endX),E.push(kt.endY),tt=kt.endX,b=kt.endY;break}for(Xt=0;Xt<Et;Xt++)zt=Dt[Xt],we.Qe(tt,b,zt[2],zt[3],zt[4],zt[5],zt[6],zt[7],.5,E),tt=zt[6],b=zt[7];break;default:he("Segment not of valid type: "+kt.type)}kt.isClosed&&(E.push(ot),E.push(yt),wg(a,y,E,x))}wg(a,y,E,x)}else if(z.type===Un.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===Un.F){if(b=new Ss,b.startX=z.endX,b.startY=(z.startY+z.endY)/2,tt=new Kr(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],we.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)}Mn(E),a.restore(),a.Vc(!1)}}}},Tt.kk=function(a,y,x){return!ve.prototype.kk.call(this,a,y,x)||this.xc===null&&this.Ui===null||this.ua===null||this.pathPattern!==null||this.geometry.figures.length!==this.svg.getElementsByTagName("path").length?!1:(a.Hl=this.svg,this.hh(a,y),a.Hl=null,!0)},Tt.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:ve.prototype.nk.call(this,a)},Tt.Dv=function(a,y){if(a.nodeName!=="g")a.setAttributeNS(null,"filter",y);else{a=a.getElementsByTagName("path");for(var x=0;x<a.length;x++)a[x].setAttributeNS(null,"filter",y)}},Tt.ga=function(a,y){if(y===void 0&&(y=new Ut),a instanceof _n){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},Tt.mi=function(a){a===void 0&&(a=new He);var y=this.naturalBounds,x=this.oe;y=He.allocAt(y.x,y.y,y.width,y.height);var E=this.strokeWidth;return y.Bc(E/2,E/2),E=Ut.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),He.free(y),Ut.free(E),a},Tt.gh=function(a,y){var x=this.geometry;if(x===null||this.fill===null&&this.stroke===null)return!1;var E=x.bounds,b=this.strokeWidth/2;x.type!==Un.j||y||(b+=2);var z=He.alloc();if(z.assign(E),z.Bc(b+2,b+2),!z.ca(a))return He.free(z),!1;if(E=b+1e-4,x.type===Un.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:(He.free(z),we.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===Un.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 He.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),He.free(z),a}if(x.type===Un.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 He.free(z),!1;tt+=E,b+=E}return this.stroke!==null&&(tt+=E,b+=E),He.free(z),0>=tt||0>=b?!1:1>=x*x/(tt*tt)+y*y/(b*b)}if(x.type===Un.o)return He.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)},Tt.Wl=function(a,y,x,E){var b=this.desiredSize,z=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var tt=this.geometry.bounds;else{var rt=this.figure,ot=Km[rt];if(ot===void 0){var lt=we.Ze[rt];typeof lt=="string"&&(lt=we.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 Bn:E=x=0;break;case Ln:lt=Math.max(a-z,0),ut=Math.max(y-z,0);break;case Li:lt=Math.max(a-z,0),E=0;break;case ji: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 Bn:break;case Ln:rt=lt,ot=ut;break;case Bi: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&&we.$(this.ua.Sk,a-z)&&we.$(this.ua.Rk,y-z)||(this.ua=vr.makeGeometry(this,rt,ot)),tt=this.ua.bounds,a===1/0||y===1/0?this.Ge(tt.x-z/2,tt.y-z/2,a===0&&rt===0?0:tt.width+z,y===0&&ot===0?0:tt.height+z):this.Ge(-(z/2),-(z/2),lt+z,ut+z),b.w()?(lt=b.width,ut=b.height,lt=Math.min(ft.width,lt),ut=Math.min(ft.height,ut),lt=Math.max(yt.width,lt),ut=Math.max(yt.height,ut),this.dc.h(0,0,lt,ut)):this.dc.assign(tt)};function _m(a){var y=a.geometryStretch;return a.Rd!==null?y===or?Ln:y:y===or?Km[a.figure].defaultStretch:y}Tt.eh=function(a,y,x,E){Sa(this,a,y,x,E)},Tt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Tt.Sj=function(a,y,x,E,b){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),rt=z.m22*tt,ot=-z.m12*tt,lt=-z.m21*tt,ut=z.m11*tt,ft=tt*(z.m21*z.dy-z.m22*z.dx),yt=tt*(z.m12*z.dx-z.m11*z.dy);z=a*rt+y*lt+ft,tt=a*ot+y*ut+yt,rt=x*rt+E*lt+ft,ot=x*ot+E*ut+yt,ft=this.ig/2,lt=this.ua,lt===null&&(this.measure(1/0,1/0),lt=this.ua);var Et=lt.bounds;if(ut=!1,lt.type===Un.j)if(1.5>=this.strokeWidth)ut=we.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=wn(),a=new Ut,we.Ve(lt.startX+E,lt.startY+ut,lt.endX+E,lt.endY+ut,z,tt,rt,ot,a)&&y.push(a),a=new Ut,we.Ve(lt.startX-E,lt.startY-ut,lt.endX-E,lt.endY-ut,z,tt,rt,ot,a)&&y.push(a),a=new Ut,we.Ve(lt.startX+E,lt.startY+ut,lt.startX-E,lt.startY-ut,z,tt,rt,ot,a)&&y.push(a),a=new Ut,we.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 Mn(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);Mn(y)}else if(lt.type===Un.u)ut=we.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===Un.F){y=He.allocAt(Et.x,Et.y,Et.width,Et.height).Bc(ft,ft);t:if(y.width===0)ut=we.Ve(y.x,y.y,y.x,y.y+y.height,z,tt,rt,ot,b);else if(y.height===0)ut=we.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}He.free(y)}else if(lt.type===Un.o){yt=Ut.alloc();var kt=rt-z,Dt=ot-tt,Xt=kt*kt+Dt*Dt,zt=z,re=tt;if(0<Xt&&Et.contains(zt,re)&&(yt.x=zt,yt.y=re,this.ca(yt)))for(kt!==0&&.5>Math.abs(kt)?(Dt*=.5/kt,kt=.5):Dt!==0&&.5>Math.abs(Dt)&&(kt*=.5/Dt,Dt=.5),zt-=kt,re-=Dt;Et.contains(zt,re);)zt-=kt,re-=Dt;for(b.x=rt,b.y=ot,Dt=0;Dt<lt.figures.count;Dt++){var le=lt.figures.s[Dt],fe=le.isFilled?zt:z,me=le.isFilled?re:tt,Ge=le.segments;Et=le.startX,kt=le.startY;for(var Jn=Et,yi=kt,di=0;di<Ge.count;di++){var Hn=Ge.s[di],vn=Hn.type,ur=Hn.endX,tr=Hn.endY,Xr=!1;switch(vn){case ms:Jn=ur,yi=tr;break;case po:Xr=A0(Et,kt,ur,tr,fe,me,rt,ot,yt);break;case Bs:Xr=we.Eo(Et,kt,Hn.point1X,Hn.point1Y,Hn.point2X,Hn.point2Y,ur,tr,fe,me,rt,ot,.6,yt);break;case Na:Xr=we.Eo(Et,kt,Et+2/3*(Hn.point1X-Et),kt+2/3*(Hn.point1Y-kt),ur+2/3*(Hn.point1X-ur),tr+2/3*(Hn.point1Y-tr),ur,tr,fe,me,rt,ot,.6,yt);break;case ns:case nl:vn=Hn.type===ns?xa(Hn,le):el(Hn,le,Et,kt);var So=vn.length;if(So===0){Xr=A0(Et,kt,Hn.type===ns?Hn.centerX:Hn.endX,Hn.type===ns?Hn.centerY:Hn.endY,fe,me,rt,ot,yt);break}for(tr=null,ur=0;ur<So;ur++){if(tr=vn[ur],ur===0&&A0(Et,kt,tr[0],tr[1],fe,me,rt,ot,yt)){var Zs=u0(fe,me,yt,Xt,b);Zs<Xt&&(Xt=Zs,ut=!0)}we.Eo(tr[0],tr[1],tr[2],tr[3],tr[4],tr[5],tr[6],tr[7],fe,me,rt,ot,.6,yt)&&(Zs=u0(fe,me,yt,Xt,b),Zs<Xt&&(Xt=Zs,ut=!0))}ur=tr[6],tr=tr[7];break;default:he("Unknown Segment type: "+vn)}Et=ur,kt=tr,Xr&&(Xr=u0(fe,me,yt,Xt,b),Xr<Xt&&(Xt=Xr,ut=!0)),Hn.isClosed&&(ur=Jn,tr=yi,A0(Et,kt,ur,tr,fe,me,rt,ot,yt)&&(Hn=u0(fe,me,yt,Xt,b),Hn<Xt&&(Xt=Hn,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,Ut.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(we.$(a,x)&&we.$(y,E)||we.$(b,tt)&&we.$(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||we.$(ot.y,a))&&(ot.y<y||we.$(ot.y,y))&&(lt=!0)):(y=a<x?a:x,a=a<x?x:a,(ot.x>y||we.$(ot.x,y))&&(ot.x<a||we.$(ot.x,a))&&(lt=!0)),lt)}Tt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.ua;x===null&&(this.measure(1/0,1/0),x=this.ua),x=x.bounds;var E=this.strokeWidth/2,b=!1,z=Ut.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)))),Ut.free(z),b},Tt.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=er.alloc();x.set(y),x.Vj();var E=a.left,b=a.right,z=a.top;a=a.bottom;var tt=Ut.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 Ut.free(tt),!0;var rt=Ut.alloc(),ot=Ut.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)))),Ut.free(tt),er.free(x),Ut.free(rt),Ut.free(ot),y};function qd(a,y,x,E){if(!a.rs(y,x,E))return!1;a=y.x,y=y.y;var b=x.x,z=x.y;return x=E.x,E=E.y,a===b?(y<z?(a=y,y=z):a=z,E>=a&&E<=y):(a<b?(E=a,a=b):E=b,x>=E&&x<=a)}Tt.tx=function(a,y,x){function E(Xt,zt){for(var re=Xt.length,le=0;le<re;le+=2)if(zt.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,hi(a.x,a.y,rt,ot)<=b&&hi(a.x,a.y,lt,ot)<=b&&hi(a.x,a.y,rt,tt)<=b&&hi(a.x,a.y,lt,tt)<=b)return!0}if(rt=y.startX,ot=y.startY,lt=y.endX,tt=y.endY,y.type===Un.j){if(x=(rt-lt)*(a.x-lt)+(ot-tt)*(a.y-tt),xn(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===Un.u)return y=!1,x&&(y=xn(a.x,a.y,rt,ot,rt,tt)<=b||xn(a.x,a.y,rt,ot,lt,ot)<=b||xn(a.x,a.y,lt,ot,lt,tt)<=b||xn(a.x,a.y,rt,tt,lt,tt)<=b),y;if(y.type===Un.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 xn(a.x,a.y,rt,ot,lt,tt)<=b;if(x){if(a=we.$y(ut,ft,y,z),a*a<=b)return!0}else return!(hi(y,z,-ut,0)>=b||hi(y,z,0,-ft)>=b||hi(y,z,0,ft)>=b||hi(y,z,ut,0)>=b)}else if(y.type===Un.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&&xn(a.x,a.y,z,rt,z,lt)>b&&xn(a.x,a.y,z,rt,ot,rt)>b&&xn(a.x,a.y,ot,lt,z,lt)>b&&xn(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=wn();if(we.Qe(tt,ut,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.8,yt),tt=E(yt,a),Mn(yt),tt||(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b))return!1;break;case Na:if(yt=wn(),we.ep(tt,ut,ft.point1X,ft.point1Y,ft.endX,ft.endY,.8,yt),tt=E(yt,a),Mn(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 kt=wn(),Dt=0;Dt<Et;Dt++)if(ft=yt[Dt],kt.length=0,we.Qe(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.8,kt),E(kt,a))return Mn(kt),!1;Mn(kt),ft!==null&&(tt=ft[6],ut=ft[7]);break;default:he("Unknown Segment type: "+ft.type)}}return!0}}}return!1},Tt.qc=function(){this.ua=null},Tt.kq=function(){return this.ig};function wy(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=pp,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=hs):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new _n(1-hs.x,hs.y)))}vr.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var E=eh[a.toArrow];else a.fromArrow!=="None"?E=eh[a.fromArrow]:(E=we.Ze[a.figure],typeof E=="string"&&(E=we.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=we.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 we.um)if(b.toLowerCase()===x){E=b;break}if(E!==null)return a=Un.parse(we.um[E],!1),eh[E]=a,x!==E&&(eh[x]=E),E}}return typeof y=="string"?y:y instanceof Un?a:null}Ue.Object.defineProperties(vr.prototype,{geometry:{get:function(){return this.ua!==null?this.ua:this.Rd},set:function(a){var y=this.ua,x=this.Rd;if(y!==a){a!==null?this.Rd=this.ua=a.freeze():this.Rd=this.ua=null;var E=this.part;E!==null&&(E.ag=NaN),this.v(),this.g("geometry",y||x,a),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=Un.parse(a);var y=a.normalize();this.geometry=a,this.position=a=Ut.allocAt(-y.x,-y.y),Ut.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 Yn(a,"value >= 0",vr,"strokeWidth:value")}},strokeCap:{get:function(){return this.Na!==null?this.Na.Hr:"butt"},set:function(a){var y=this.strokeCap;y!==a&&(typeof a!="string"||a!=="butt"&&a!=="round"&&a!=="square"?Yn(a,'"butt", "round", or "square"',vr,"strokeCap"):(Jd(this),this.Na.Hr=a,this.N(),this.g("strokeCap",y,a)))}},strokeJoin:{get:function(){return this.Na!==null?this.Na.Ir:"miter"},set:function(a){var y=this.strokeJoin;y!==a&&(typeof a!="string"||a!=="miter"&&a!=="bevel"&&a!=="round"?Yn(a,'"miter", "bevel", or "round"',vr,"strokeJoin"):(Jd(this),this.Na.Ir=a,this.N(),this.g("strokeJoin",y,a)))}},strokeMiterLimit:{get:function(){return this.Na!==null?this.Na.Jr:10},set:function(a){var y=this.strokeMiterLimit;if(y!==a&&1<=a){Jd(this),this.Na.Jr=a,this.N();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeMiterLimit",y,a)}}},strokeDashArray:{get:function(){return this.Yg},set:function(a){var y=this.Yg;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];0<=z&&isFinite(z)||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=we.Ze[a];typeof x=="function"?x=a:(x=we.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:or},set:function(a){var y=this.geometryStretch;y!==a&&(Jd(this),this.Na.jq=a,this.v(),this.g("geometryStretch",y,a))}},interval:{get:function(){return this.fa!==null?this.fa.Tk:1},set:function(a){var y=this.interval;if(a=Math.round(a),y!==a&&a!==0&&isFinite(a)){this.fa===null&&(this.fa=new nh),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&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))}}}),vr.prototype.intersectsRect=vr.prototype.Yc,vr.prototype.containedInRect=vr.prototype.fh,vr.prototype.getNearestIntersectionPoint=vr.prototype.rs,vr.prototype.getDocumentBounds=vr.prototype.mi,vr.prototype.getDocumentPoint=vr.prototype.ga;var eh=new bi,Km=new bi;vr.className="Shape",vr.getFigureGenerators=function(){var a=new Qe,y;for(y in we.Ze)y!==y.toLowerCase()&&a.add(y,we.Ze[y]);return a.freeze(),a},vr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),E=we.Ze;E[a]=y,E[x]=a},vr.getArrowheadGeometries=function(){var a=new Qe;for(E in we.um)if(eh[E]===void 0){var y=Un.parse(we.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 Un&&a.add(x,E)}return a.freeze(),a},vr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=Un.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=or,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 ve.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}Re(Po,ve),Po.prototype.cloneProtected=function(a){ve.prototype.cloneProtected.call(this,a),a.ec=this.ec,a.xc=this.xc,a.Ae=this.Ae,a.Gc=this.Gc,a.Cb=this.Cb,a.Lq=this.Lq,a.Gm=this.Gm,this.fa!==null&&(a.fa=this.fa.copy()),this.da!==null&&(a.da=this.da.nc?this.da:this.da.copy()),a.Ih=this.Ih,a.df=this.df,a.Le=this.Le,a.Qc=this.Qc,a.Qb=this.Qb,a.ze=this.ze};function EA(a){a.da===null?a.da=new Xm:a.da.nc&&(a.da=a.da.copy())}Tt=Po.prototype,Tt.th=function(){ve.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function Sy(a,y){a.l=y.l|6144,a.pb=y.opacity,a.Ma=y.background,a.areaBackground=y.areaBackground,a.jd=y.desiredSize.J(),a.minSize=y.minSize.J(),a.maxSize=y.maxSize.J(),y.Lb!==null?a.Lb=y.Lb.copy():a.Lb=null,a.Ca=y.scale,a.Kb=y.angle,a.stretch=y.stretch,a.Kg=y.margin.J(),a.Jb=y.alignment.J(),a.sk=y.alignmentFocus.J(),a.segmentFraction=y.segmentFraction,a.segmentOffset=y.segmentOffset.J(),a.segmentOrientation=y.segmentOrientation,y.tb!==null&&(a.tb=y.tb.copy()),a.shadowVisible=y.shadowVisible,a.ec=y.ec,a.xc=y.xc,a.Ae=y.Ae,a.fa!==null&&(a.fa=y.fa.copy()),y.da!==null&&(a.da=y.da.nc?y.da:y.da.copy()),a.Ih=y.Ih}Tt.qb=function(a){a.classType===Po?this.wrap=a:ve.prototype.qb.call(this,a)},Tt.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},Tt.v=function(){ve.prototype.v.call(this)},Tt.hh=function(a,y){if(this.xc!==null&&this.ec.length!==0&&this.Ae!==null){var x=this.naturalBounds,E=this.actualBounds,b=x.width,z=x.height,tt=up(this),rt=a.textAlign=this.textAlign,ot=y.tn;rt==="start"?rt=ot?"right":"left":rt==="end"&&(rt=ot?"left":"right"),ot=this.isUnderline;var lt=this.isStrikethrough;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 Hr:a.translate(b,0),a.scale(-1,1);break;case Sr:a.translate(0,z),a.scale(1,-1);break;case uo: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 Hr:a.scale(-1,1),a.translate(-b,0);break;case Sr:a.scale(1,-1),a.translate(0,-z);break;case uo:a.scale(-1,-1),a.translate(-b,-z)}}},Tt.Oj=function(a,y,x,E,b,z,tt,rt,ot,lt,ut){var ft=0;if(rt)ot==="left"?ft=0:ot==="right"?ft=b-tt:ot==="center"&&(ft=(b-tt)/2),y.fillRect(x+ft,E+.25*z,tt,1);else{if(ot==="left"?ft=0:ot==="right"?ft=b:ot==="center"&&(ft=b/2),b=h0!==null?h0(this,z):.75*z,y.fillText(a,x+ft,E+b),a=z/20|0,a===0&&(a=1),ot==="right"?ft-=tt:ot==="center"&&(ft-=tt/2),lt){rt=c0!==null?c0(this,z):.8*z,ot=x+ft,lt=E+rt,b=x+ft+tt,rt=E+rt;var yt=a;y.beginPath(),y.lineWidth=yt,y.moveTo(ot,lt),y.lineTo(b,rt),y.stroke(),y.Se(),y instanceof 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"))}},Tt.kk=function(a,y,x){if(!ve.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},Tt.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:ve.prototype.nk.call(this,a)},Tt.Dv=function(a,y){if(a.nodeName!=="g")a.setAttributeNS(null,"filter",y);else{a=a.getElementsByTagName("text");for(var x=0;x<a.length;x++)a[x].setAttributeNS(null,"filter",y)}},Tt.Wl=function(a,y,x,E){var b=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;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)},Tt.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&&lt<=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&&lt<=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:Bn},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&&Yn(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 rn(Po,"None",0),Py=new rn(Po,"WrapFit",1),Vm=new rn(Po,"WrapDesiredSize",2),Fy=new rn(Po,"WrapBreakAll",3),Wm=new rn(Po,"OverflowClip",0),d0=new rn(Po,"OverflowEllipsis",1),Ap=new rn(Po,"FormatTrim",0),Ey=new rn(Po,"FormatNone",0),Fw=/[ \u200b\u00ad]/,Zm=new bi,Ly=0,f0=new bi,Ym=0,hp="...",My="",al=null,g0=!1;Po.className="TextBlock";function Xm(){this.nc=!1,this.Hd=null,this.Xf=Bn,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 bi,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){ve.call(this),this.Eg=null,this.qo="",this.Xg=la,this.Nk=Ln,this.Zg=this.Hd=null,this.Mk=Pr,this.Xf=Bn,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;Re(ll,ve),ll.prototype.cloneProtected=function(a){ve.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===Bn||a===Bi||a===Mr?this.imageStretch=a:ve.prototype.qb.call(this,a)},ll.prototype.toString=function(){return"Picture("+this.source+")#"+Vn(this)};function Bg(a){a===void 0&&(a=""),a!==""?Sg[a]&&(delete Sg[a],p0--):(Sg=new bi,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=wn();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);Mn(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,kt=this.Mk;switch(Et){case Bn:if(this.sourceRect.w())break;ft>=E.width&&(z=z+kt.offsetX+(ft*kt.x-E.width*kt.x)),yt>=E.height&&(tt=tt+kt.offsetY+(yt*kt.y-E.height*kt.y)),ot=Math.min(E.width,ft),rt=Math.min(E.height,yt);break;case Ln:ft=E.width,yt=E.height;break;case Bi:case Mr:Et===Bi?(Et=Math.min(E.height/yt,E.width/ft),ft*=Et,yt*=Et):Et===Mr&&(Et=Math.max(E.height/yt,E.width/ft),ft*=Et,yt*=Et,ft>=E.width&&(z=(z+kt.offsetX+(ft*kt.x-E.width*kt.x)/ft)*ot),yt>=E.height&&(tt=(tt+kt.offsetY+(yt*kt.y-E.height*kt.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,zt=x.__goCache;Et=null;var re=Ew;if(!b){if(x.sq&&zt!==void 0&&4<Dt&&Xt>re*re)for(zt.gi===null&&(Ty(zt,4,lt,ut,x),Ty(zt,16,lt,ut,x)),b=zt.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?kt.offsetX+(E.width*kt.x-ft*kt.x):0,kt=yt<E.height?kt.offsetY+(E.height*kt.y-yt*kt.y):0,this.flip){case Hr:a.translate(Math.min(E.width,ft),0),a.scale(-1,1);break;case Sr:a.translate(0,Math.min(E.height,yt)),a.scale(1,-1);break;case uo:a.translate(Math.min(E.width,ft),Math.min(E.height,yt)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&zt!==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,kt,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,kt,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,kt,Math.min(E.width,ft),Math.min(E.height,yt)),a instanceof za&&(this.bt=[z,tt,ot,rt,b,kt,Math.min(E.width,ft),Math.min(E.height,yt)])}catch(le){this.en=!1}switch(this.flip){case Hr:a.scale(-1,1),a.translate(-Math.min(E.width,ft),0);break;case Sr:a.scale(1,-1),a.translate(0,-Math.min(E.height,yt));break;case uo: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===Ln||z===Li?(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===Ln||z===ji?(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 Se),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=ai("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 bi,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 Un,this.mc=null}Cg.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new Un,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 Kr(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 Kr(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 Kr(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 Kr(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 Kr(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 Kr(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=we.Ze;E[a]=y,E[x]=a}ka("Rectangle",function(a,y,x){a="r"+y+","+x;var E=we.Mf[a];return E!==void 0||(E=new Un(Un.u),E.endX=y,E.endY=x,we.Nf<we.vm&&(we.Mf[a]=E,we.Nf++)),E}),ka("Square",function(a,y,x){a="s"+y+","+x;var E=we.Mf[a];return E!==void 0||(E=new Un(Un.u),E.endX=y,E.endY=x,E.defaultStretch=Bi,we.Nf<we.vm&&(we.Mf[a]=E,we.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=we.Mf[E];if(b!==void 0)return b;var z=a*we.wg;return b=new Un().add(new Ss(a,0,!0).add(new Kr(po,y-a,0)).add(new Kr(Bs,y,a,y-z,0,y,z)).add(new Kr(po,y,x-a)).add(new Kr(Bs,y-a,x,y,x-z,y-z,x)).add(new Kr(po,a,x)).add(new Kr(Bs,0,x-a,z,x,0,x-z)).add(new Kr(po,0,a)).add(new Kr(Bs,a,0,0,z,z,0).close())),1<z&&(b.spot1=new _n(0,0,z,z),b.spot2=new _n(1,1,-z,-z)),we.Nf<we.vm&&(we.Mf[E]=b,we.Nf++),b}),ka("Border","RoundedRectangle"),ka("Ellipse",function(a,y,x){a="e"+y+","+x;var E=we.Mf[a];return E!==void 0||(E=new Un(Un.F),E.endX=y,E.endY=x,E.spot1=Oo,E.spot2=ao,we.Nf<we.vm&&(we.Mf[a]=E,we.Nf++)),E}),ka("Circle",function(a,y,x){a="c"+y+","+x;var E=we.Mf[a];return E!==void 0||(E=new Un(Un.F),E.endX=y,E.endY=x,E.spot1=Oo,E.spot2=ao,E.defaultStretch=Bi,we.Nf<we.vm&&(we.Mf[a]=E,we.Nf++)),E}),ka("TriangleRight",function(a,y,x){return new Un().add(new Ss(0,0).add(new Kr(po,y,.5*x)).add(new Kr(po,0,x).close())).pm(0,.25,.5,.75)}),ka("TriangleDown",function(a,y,x){return new Un().add(new Ss(0,0).add(new Kr(po,y,0)).add(new Kr(po,.5*y,x).close())).pm(.25,0,.75,.5)}),ka("TriangleLeft",function(a,y,x){return new Un().add(new Ss(y,x).add(new Kr(po,0,.5*x)).add(new Kr(po,y,0).close())).pm(.5,.25,1,.75)}),ka("TriangleUp",function(a,y,x){return new Un().add(new Ss(y,x).add(new Kr(po,0,x)).add(new Kr(po,.5*y,0).close())).pm(.25,.5,.75,1)}),ka("Triangle","TriangleUp"),ka("Diamond",function(a,y,x){return new Un().add(new Ss(.5*y,0).add(new Kr(po,0,.5*x)).add(new Kr(po,.5*y,x)).add(new Kr(po,y,.5*x).close())).pm(.25,.25,.75,.75)}),ka("LineH",function(a,y,x){return a=new Un(Un.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 Un(Un.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 Un().add(new Ss(0,x/2,!1).add(new Kr(po,y,x/2)).add(new Kr(ms,y/2,0)).add(new Kr(po,y/2,x)))}),ka("XLine",function(a,y,x){return new Un().add(new Ss(0,x,!1).add(new Kr(po,y,0)).add(new Kr(ms,0,0)).add(new Kr(po,y,x)))}),ka("LineRight",function(a,y,x){return new Un().add(new Ss(.25*y,0,!1).add(new Kr(po,.75*y,.5*x)).add(new Kr(po,.25*y,x)))}),ka("LineDown",function(a,y,x){return new Un().add(new Ss(0,.25*x,!1).add(new Kr(po,.5*y,.75*x)).add(new Kr(po,y,.25*x)))}),ka("LineLeft",function(a,y,x){return new Un().add(new Ss(.75*y,0,!1).add(new Kr(po,.25*y,.5*x)).add(new Kr(po,.75*y,x)))}),ka("LineUp",function(a,y,x){return new Un().add(new Ss(0,.75*x,!1).add(new Kr(po,.5*y,.25*x)).add(new Kr(po,y,.75*x)))}),we.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=Er,this.ir=null,this.jr="",this.lr=ws,this.Gq="",this.Hq=kr,this.Pq=fn,this.Kq=Qn,this.Up=null,this.Cq=127,this.zr=Gn,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 Ui(a,y){a===void 0||a instanceof io||typeof a=="string"?Fn.call(this,a):(Fn.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 Ut(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new He,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Re(Ui,Fn),Ui.prototype.cloneProtected=function(a){Fn.prototype.cloneProtected.call(this,a),a.G=this.G&-4097|49152,a.Tf=this.Tf,this.P!==null&&(a.P=this.P.nc?this.P:this.P.copy()),a.Jg=this.Jg,a.Qf=null,a.ec=this.ec,a.ke.assign(this.ke),a.Ao=this.Ao},Tt=Ui.prototype,Tt.Af=function(a){Fn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Tt.toString=function(){var a=ii(this.constructor)+"#"+Vn(this);return this.data!==null&&(a+="("+_i(this.data)+")"),a};function ul(a){a.P===null?a.P=new Jm:a.P.nc&&(a.P=a.P.copy())}Tt.th=function(){Fn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},Tt.gk=function(a,y,x,E,b,z,tt){var rt=this.diagram;rt!==null&&(a===is&&y==="elements"?b instanceof Fn?Nu(b,function(ot){Cv(rt.partManager,ot),vA(rt,ot)}):Ch(rt,b):a===cs&&y==="elements"&&(b instanceof Fn?Nu(b,function(ot){Pv(rt.partManager,ot,rt)}):Hd(rt,b)),rt.cb(a,y,x,E,b,z,tt))},Tt.La=function(a){if(Fn.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 Fn&&Nu(b,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Ui.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Ui.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Ui.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)))}}},Ui.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)}},Ui.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=wn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Mn(y)}},Ui.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 Vr))break t;cu(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Fn.Link),x.adornedObject=y)}if(x!==null){x.type===Fn.Link&&x.v(),this.bh("Selection",x);break t}}this.Jf("Selection")}for(bw(this,a),y=this.adornments;y.next();)y.value.La()}},Ui.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=He.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(E,x),He.free(E),tv(a,!1)}}Ui.prototype.Ge=function(a,y,x,E){var b=this.uc;b.h(a,y,x,E),this.Lb===null&&(this.Lb=new er);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),this.Lb=z,z.ws()||z.pp(b)},Ui.prototype.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Pr;this.locationSpot.sb()&&(z=this.locationSpot);var tt=Ut.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),Ut.free(tt)}},Ui.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Ui.prototype.moveTo=function(a,y,x){a=Ut.allocAt(a,y),this.move(a,x),Ut.free(a)},Ui.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())},Ui.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())},Ui.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=Fn.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 Ut),x=x.Mc()?Pr: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}Ui.prototype.mi=function(a){return a===void 0&&(a=new He),a.assign(this.actualBounds)},Ui.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function Uy(a){var y=Ut.alloc(),x=a.locationObject,E=x.naturalBounds,b=x instanceof vr?x.strokeWidth:0;if(y.yi(0,0,E.width+b,E.height+b,a.locationSpot),x!==a)for(y.offset(-b/2,-b/2),x.transform.Ga(y),x=x.panel;x!==null&&x!==a;)x.transform.Ga(y),x=x.panel;return a.Lb!==null&&a.Lb.Ga(y),y.offset(-a.uc.x,-a.uc.y),y}function $d(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=dy(a));var E=a.ag,b=2*E;if(!a.isShadowed)return x.h(y.x-1-E,y.y-1-E,y.width+2+b,y.height+2+b),x;E=y.x,b=y.y;var z=y.width;y=y.height;var tt=a.shadowBlur;return a=a.shadowOffset,z+=tt,y+=tt,E-=tt/2,b-=tt/2,0<a.x?z+=a.x:(E+=a.x,z-=a.x),0<a.y?y+=a.y:(b+=a.y,y-=a.y),x.h(E-1,b-1,z+2,y+2),x}Ui.prototype.arrange=function(){if(Ba(this)===!1)Iy(this);else{qu(this,!1);var a=this.Ib,y=He.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()||we.B(y.width,a.width)&&we.B(y.height,a.height)||0<=this.vw&&this.C(16),He.free(y),tv(this,!1)}},Tt=Ui.prototype,Tt.Xl=function(a,y){var x=this.diagram;if(x!==null){var E=!1;if(x.Zi===!1&&a.w()){var b=He.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),He.free(b)}!(this.G&65536)&&a.D(y)||_y(this,E,x),x.N(),!a.w()&&!y.w()||Qr(a,y)||(this instanceof $n&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},Tt.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var E=this.diagram;return E!==null&&Qy(this,E,a,y,x),this.pa=a,this.G&=-2097153,!this.ke.w()||E!==null&&!E.animationManager.isTicking&&E.undoManager.isUndoingRedoing||(E=this.ke,this.ke=new Ut(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 Vr||(y=y.animationManager,y.zb&&bd(y,a,new Ut(E,b),x))}Tt.mm=function(a,y,x){var E=this.ke,b=this.pa;if(x){if(E.x===a&&E.y===y)return;rd(this)||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)},Tt.Av=function(){this.G&=-2097153,y0(this)};function Oy(a,y,x){var E=Uy(a),b=a.diagram,z=x.w(),tt=y.w();z&&tt?a.G&2097152?Hy(a,y,x,b,E):Ry(a,y,x,b,E):z?Hy(a,y,x,b,E):tt&&Ry(a,y,x,b,E),a.G|=2097152,Ut.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 Vr||bd(x,a,new Ut(z,tt),y),E||y.x===z&&y.y===tt||a.g("position",new Ut(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 $n&&ku(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var E=x.viewportBounds;E.w()?od(a)?(Jr(y,E)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(E)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}Tt.si=function(){return!0},Tt.Zc=function(){return!0},Tt.ph=function(){return!1},Tt.Dd=function(){return!0};function $m(a,y,x,E){y.constructor===a.constructor||zy||(zy=!0,vi('Should not change the class of the Part when changing category from "'+x+'" to "'+E+'"'),vi(" Old class: "+ii(a.constructor)+", new class: "+ii(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 $n&&(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 $n&&(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)}Ui.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},Ui.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},Ui.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},Ui.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},Ui.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},Ui.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},Ui.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},Ui.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},Ui.prototype.canSelect=function(){if(!this.selectable)return!1;var a=this.layer;return a===null?!0:a.allowSelect?(a=a.diagram,a===null?!0:!!a.allowSelect):!1};function rd(a){return(a.G&32768)!==0}function tv(a,y){a.G=y?a.G|32768:a.G&-32769}function ev(a,y){a.G=y?a.G|65536:a.G&-65537}function od(a){return(a.G&131072)!==0}Tt=Ui.prototype,Tt.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function w0(a,y){a.G=y?a.G|1048576:a.G&-1048577}Tt.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},Tt.N=function(){var a=this.diagram;a!==null&&!Ba(this)&&!rd(this)&&this.isVisible()&&this.Ib.w()&&a.N($d(this,this.Ib))},Tt.v=function(){Fn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof $n&&this.labeledLink!==null&&bs(this.labeledLink),a.$b(!0))},Tt.Vo=function(a){a||(a=this.Ah,a!==null&&av(a,this))},Tt.Wo=function(a){a||(a=this.Ah,a!==null&&lv(a,this))},Tt.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},Tt.oz=function(){return nv(this,this)};function nv(a,y){var x=y.containingGroup;return x!==null?1+nv(a,x):y instanceof $n&&(y=y.labeledLink,y!==null)?nv(a,y):0}Tt.sz=function(){return Ky(this,this)};function Ky(a,y){var x=y.containingGroup;return x!==null||y instanceof $n&&(x=y.labeledLink,x!==null)?Ky(a,x):y}Tt.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 $n&&(y=y.labeledLink,y!==null)?iv(a,y,x):!1:!0}Tt.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof hr&&w0(y,!0),y instanceof $n){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 $n&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof hr&&w0(y,!1),y instanceof $n&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Ui.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof $n&&this.isLinkLabel)},Ui.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 $n&&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 Vr)){if(a.add(y),y instanceof $n){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&&lt:ot||lt)&&sd(a,rt,x,E,b,z)}}if(1<E)for(y=y.Ou();y.next();)sd(a,y.value,x,E-1,b,z)}else if(y instanceof Rn)for(y=y.labelNodes;y.next();)sd(a,y.value,x,E,b,z)}}Ue.Object.defineProperties(Ui.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?Yi: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 Vr?this.type!==Fn.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:fn},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 Vr)){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 Vr?this instanceof Vr&&(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 Rn||(E=this.location.copy(),$m(this,x,y,a),this.location.w()||(this.location=E)))),b!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",b,y))))}}},self:{get:function(){return this},set:function(a){$m(this,a,this.category,a.category)}},copyable:{get:function(){return(this.G&1)!==0},set:function(a){var y=(this.G&1)!==0;y!==a&&(this.G^=1,this.g("copyable",y,a))}},deletable:{get:function(){return(this.G&2)!==0},set:function(a){var y=(this.G&2)!==0;y!==a&&(this.G^=2,this.g("deletable",y,a))}},textEditable:{get:function(){return(this.G&4)!==0},set:function(a){var y=(this.G&4)!==0;y!==a&&(this.G^=4,this.g("textEditable",y,a),this.Wb())}},groupable:{get:function(){return(this.G&8)!==0},set:function(a){var y=(this.G&8)!==0;y!==a&&(this.G^=8,this.g("groupable",y,a))}},movable:{get:function(){return(this.G&16)!==0},set:function(a){var y=(this.G&16)!==0;y!==a&&(this.G^=16,this.g("movable",y,a))}},selectionAdorned:{get:function(){return(this.G&32)!==0},set:function(a){var y=(this.G&32)!==0;y!==a&&(this.G^=32,this.g("selectionAdorned",y,a),this.Wb())}},isInDocumentBounds:{get:function(){return(this.G&64)!==0},set:function(a){var y=(this.G&64)!==0;if(y!==a){this.G^=64;var x=this.diagram;x!==null&&x.Ya(),this.g("isInDocumentBounds",y,a)}}},isLayoutPositioned:{get:function(){return(this.G&128)!==0},set:function(a){var y=(this.G&128)!==0;y!==a&&(this.G^=128,this.g("isLayoutPositioned",y,a),this.C(a?4:8))}},selectable:{get:function(){return(this.G&256)!==0},set:function(a){var y=(this.G&256)!==0;y!==a&&(this.G^=256,this.g("selectable",y,a),this.Wb())}},reshapable:{get:function(){return(this.G&512)!==0},set:function(a){var y=(this.G&512)!==0;y!==a&&(this.G^=512,this.g("reshapable",y,a),this.Wb())}},resizable:{get:function(){return(this.G&1024)!==0},set:function(a){var y=(this.G&1024)!==0;y!==a&&(this.G^=1024,this.g("resizable",y,a),this.Wb())}},rotatable:{get:function(){return(this.G&2048)!==0},set:function(a){var y=(this.G&2048)!==0;y!==a&&(this.G^=2048,this.g("rotatable",y,a),this.Wb())}},isSelected:{get:function(){return(this.G&4096)!==0},set:function(a){var y=(this.G&4096)!==0;if(y!==a){var x=this.diagram;if(!a||this.canSelect()&&!(x!==null&&x.selection.count>=x.maxSelectionCount)){this.G^=4096;var E=!1;if(x!==null){E=x.skipsUndoManager,x.skipsUndoManager=!0;var b=x.selection;b.ka(),a?b.add(this):b.remove(this),b.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=E)}}}},isHighlighted:{get:function(){return(this.G&524288)!==0},set:function(a){var y=(this.G&524288)!==0;if(y!==a){this.G^=524288;var x=this.diagram;x!==null&&(x=x.highlighteds,x.ka(),a?x.add(this):x.remove(this),x.freeze()),this.g("isHighlighted",y,a),this.N(),a=this.highlightedChanged,a!==null&&a(this)}}},isShadowed:{get:function(){return(this.G&8192)!==0},set:function(a){var y=(this.G&8192)!==0;y!==a&&(this.G^=8192,this.Uc=!0,this.g("isShadowed",y,a),this.N())}},isAnimated:{get:function(){return(this.G&262144)!==0},set:function(a){var y=(this.G&262144)!==0;y!==a&&(this.G^=262144,this.g("isAnimated",y,a))}},highlightedChanged:{get:function(){return this.P!==null?this.P.oq:null},set:function(a){var y=this.highlightedChanged;y!==a&&(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 Rn?(a=this.path,a!==null?this.Ug=a:this.Ug=this):this.Ug=this}return this.Ug}},selectionChanged:{get:function(){return this.P!==null?this.P.ur:null},set:function(a){var y=this.selectionChanged;y!==a&&(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:Er},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 Se,sd(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof $n)for(E=E.linksConnected;E.next();)Fg(E.value)}if(this instanceof $n){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 $n&&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:Gn},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))}}}),Ui.prototype.invalidateLayout=Ui.prototype.C,Ui.prototype.findCommonContainingGroup=Ui.prototype.px,Ui.prototype.isMemberOf=Ui.prototype.Td,Ui.prototype.findTopLevelPart=Ui.prototype.sz,Ui.prototype.findSubGraphLevel=Ui.prototype.oz,Ui.prototype.ensureBounds=Ui.prototype.Va,Ui.prototype.getDocumentBounds=Ui.prototype.mi,Ui.prototype.findObject=Ui.prototype.fb,Ui.prototype.moveTo=Ui.prototype.moveTo,Ui.prototype.invalidateAdornments=Ui.prototype.Wb,Ui.prototype.clearAdornments=Ui.prototype.Ej,Ui.prototype.removeAdornment=Ui.prototype.Jf,Ui.prototype.addAdornment=Ui.prototype.bh,Ui.prototype.findAdornment=Ui.prototype.Pj,Ui.prototype.updateTargetBindings=Ui.prototype.La;var zy=!1;Ui.className="Part",Ui.LayoutNone=0,Ui.LayoutAdded=1,Ui.LayoutRemoved=2,Ui.LayoutShown=4,Ui.LayoutHidden=8,Ui.LayoutNodeSized=16,Ui.LayoutGroupLayout=32,Ui.LayoutNodeReplaced=64,Ui.LayoutStandard=127,Ui.LayoutAll=16777215;function Vr(a,y){a===void 0||a instanceof io||typeof a=="string"?Ui.call(this,a):(Ui.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)}Re(Vr,Ui),Vr.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Vr.prototype.updateRelationshipsFromData=function(){},Vr.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Rn&&y instanceof vr){y=x.path,x.Ul(a),a=y.geometry,x=this.O.s,y=x.length;for(var E=0;E<y;E++){var b=x[E];b.isPanelMain&&b instanceof vr&&(b.ua=a)}}},Vr.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!Ba(a))},Vr.prototype.Zc=function(){return!1},Vr.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 Fn){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 Fn&&this.$a.rg(E)&&(this.$a=null));Ui.prototype.gk.call(this,a,y,x,E,b,z,tt)},Vr.prototype.updateAdornments=function(){},Vr.prototype.Lj=function(){},Ue.Object.defineProperties(Vr.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}}}),Vr.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 $n(a,y){a===void 0||a instanceof io||typeof a=="string"?Ui.call(this,a):(Ui.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)}Re($n,Ui),$n.prototype.cloneProtected=function(a){Ui.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Tt=$n.prototype,Tt.Af=function(a){Ui.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function xc(a){a.Ba===null?a.Ba=new rv:a.Ba.nc&&(a.Ba=a.Ba.copy())}Tt.th=function(){Ui.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function jy(a,y){y!==null&&(a.af===null&&(a.af=new Se),a.af.add(y))}function Vy(a,y,x,E){if(y===null||a.af===null)return null;for(var b=a.af.iterator;b.next();){var z=b.value;if(z.Ds===a&&z.cv===y&&z.Ox===x&&z.Px===E||z.Ds===y&&z.cv===a&&z.Ox===E&&z.Px===x)return z}return null}Tt.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=Vy(this,a,y,x),a!==null&&a.Sl()},Tt.gk=function(a,y,x,E,b,z,tt){a===is&&y==="elements"?this.wc=null:a===cs&&y==="elements"&&(this.wc=null),Ui.prototype.gk.call(this,a,y,x,E,b,z,tt)},Tt.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(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)}}Tt.si=function(){return!0},$n.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},$n.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},$n.prototype.isVisible=function(){if(!Ui.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},$n.prototype.Zb=function(a){Ui.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)}},$n.prototype.qx=function(){var a=new Se,y=new Se;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)})}}$n.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},Tt=$n.prototype,Tt.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},Tt.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},Tt.Mu=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode===this?(a===null||b.fromPortId===a)&&(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Se,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 Se,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new sr(x):Yi},Tt.Po=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode!==this||a!==null&&b.fromPortId!==a||(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Se,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new sr(x):Yi},Tt.Oo=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.toNode!==this||a!==null&&b.toPortId!==a||(b=b.fromNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Se,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new sr(x):Yi},Tt.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},Tt.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}}}$n.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Tt=$n.prototype,Tt.Vo=function(a){Ui.prototype.Vo.call(this,a),a||(cp(this),a=this.Yk,a!==null&&i1(a,this))},Tt.Wo=function(a){Ui.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},Tt.Lj=function(){if(0<this.jb.count){var a=this.diagram;if(a!==null)for(var y=a.commandHandler!==null?a.commandHandler.deletesConnectedLinks:!0,x=this.jb.copy().iterator;x.next();){var E=x.value;y?a.remove(E):(E.fromNode===this&&(E.fromNode=null),E.toNode===this&&(E.toNode=null))}}this.labeledLink=null,Ui.prototype.Lj.call(this)},Tt.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;Yy(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function Yy(a){a.wc===null?a.wc=new 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=wn()),x.push(E);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Mn(x)}}}Tt.Nz=function(a){if(a===null||a===this)return!1;var y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this,y)for(;x!==a;){y=null;for(var E=x.jb.iterator;E.next();){var b=E.value;if(b.isTreeLink&&(y=b.fromNode,y!==x&&y!==this))break}if(y===this||y===null||y===x)return!1;x=y}else for(;x!==a;){for(y=null,E=x.jb.iterator;E.next()&&(b=E.value,!b.isTreeLink||(y=b.toNode,y===x||y===this)););if(y===this||y===null||y===x)return!1;x=y}return!0},Tt.xz=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this,a)for(;;){a=null;for(var x=y.jb.iterator;x.next();){var E=x.value;if(E.isTreeLink&&(a=E.fromNode,a!==y&&a!==this))break}if(a===this)return this;if(a===null||a===y)return y;y=a}else for(;;){for(a=null,x=y.jb.iterator;x.next()&&(E=x.value,!E.isTreeLink||(a=E.toNode,a===y||a===this)););if(a===this)return this;if(a===null||a===y)return y;y=a}},Tt.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)w0(y,!0),y=y.pg();var x=null;for(y=a;y!==null;){if(y.G&1048576){x=y;break}y=y.pg()}for(y=this;y!==null;)w0(y,!1),y=y.pg();return x},Tt.kh=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this.jb.iterator,a){for(;y.next();)if(a=y.value,a.isTreeLink&&a.fromNode!==this)return a}else for(;y.next();)if(a=y.value,a.isTreeLink&&a.toNode!==this)return a;return null},Tt.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof $n)return a;a=this.diagram,a=a!==null?a.isTreePathToChildren:!0;for(var y=this.jb.iterator;y.next();){var x=y.value;if(x.isTreeLink&&(x=a?x.fromNode:x.toNode,x!==this))return this.ci=x}return this.ci=null},Tt.vz=function(){function a(x,E){E.add(x);var b=x.kh();b!==null&&(E.add(b),x=x.pg(),x!==null&&a(x,E))}var y=new Se;return a(this,y),y},Tt.uz=function(){return Jy(this,this)};function Jy(a,y){return y=y.pg(),y===null?0:1+Jy(a,y)}Tt.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new 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},Tt.Ou=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren);var x=y=null,E=this.jb.iterator;if(a)for(;E.next();)a=E.value,a.isTreeLink&&a.fromNode===this&&(a=a.toNode,y!==null?y.add(a):x!==null&&x!==a?(y=new 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 sr(x):Yi},Tt.wz=function(a){a===void 0&&(a=1/0);var y=new Se;return sd(y,this,!1,a,!0),y},$n.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 Se;x.add(this),qy(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===YA),y.Ue=!1}};function qy(a,y,x,E,b,z,tt){if(1<E)for(var rt=x?a.Mo():a.Sd();rt.next();){var ot=rt.value;ot.isTreeLink&&(ot=ot.To(a),ot===null||ot===a||y.contains(ot)||(y.add(ot),qy(ot,y,x,E-1,b,z,tt)))}else $y(a,y,x,b,z,tt)}function $y(a,y,x,E,b,z){for(var tt=b===a?!0:a.isTreeExpanded,rt=x?a.Mo():a.Sd(),ot={};rt.next();){var lt=rt.value;if(lt.isTreeLink&&(lt=lt.To(a),lt!==null&&lt!==a)){var ut=y.contains(lt);if(ut||y.add(lt),tt){var ft=x?lt.Oo():lt.Po();ot.uv=a,ft.all(function(yt){return function(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}$n.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 Se;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($n.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 lr(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))}}}),$n.prototype.expandTree=$n.prototype.expandTree,$n.prototype.collapseTree=$n.prototype.collapseTree,$n.prototype.findTreeParts=$n.prototype.wz,$n.prototype.findTreeChildrenNodes=$n.prototype.Ou,$n.prototype.findTreeChildrenLinks=$n.prototype.Qo,$n.prototype.findTreeLevel=$n.prototype.uz,$n.prototype.findTreeParentChain=$n.prototype.vz,$n.prototype.findTreeParentNode=$n.prototype.pg,$n.prototype.findTreeParentLink=$n.prototype.kh,$n.prototype.findCommonTreeParent=$n.prototype.gz,$n.prototype.findTreeRoot=$n.prototype.xz,$n.prototype.isInTreeOf=$n.prototype.Nz,$n.prototype.findPort=$n.prototype.ns,$n.prototype.findLinksTo=$n.prototype.kz,$n.prototype.findLinksBetween=$n.prototype.jz,$n.prototype.findNodesInto=$n.prototype.Oo,$n.prototype.findNodesOutOf=$n.prototype.Po,$n.prototype.findNodesConnected=$n.prototype.Mu,$n.prototype.findLinksInto=$n.prototype.Sd,$n.prototype.findLinksOutOf=$n.prototype.Mo,$n.prototype.findExternalTreeLinksConnected=$n.prototype.qx,$n.prototype.invalidateConnectedLinks=$n.prototype.Bd,$n.prototype.invalidateLinkBundle=$n.prototype.Lz;var kw=new rn($n,"SpreadingNone",10),B0=new rn($n,"SpreadingEvenly",11),sv=new rn($n,"SpreadingPacked",12);$n.className="Node",$n.SpreadingNone=kw,$n.SpreadingEvenly=B0,$n.SpreadingPacked=sv;function hr(a,y){a===void 0||a instanceof io||typeof a=="string"?$n.call(this,a):($n.call(this),a&&(y=a)),this.U|=4608,this.Gn=new Se,this.$a=null,this.Sc=new Go,this.Sc.group=this,this.gl=new Se,this.tb=this.$p=null,y&&Object.assign(this,y)}Re(hr,$n),hr.prototype.cloneProtected=function(a){$n.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())},Tt=hr.prototype,Tt.Af=function(a){$n.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 $n)x.Bd(y);else if(x instanceof Rn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Tt.gk=function(a,y,x,E,b,z,tt){if(a===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 Fn){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 Fn&&this.$a.rg(E)&&(this.$a=null));$n.prototype.gk.call(this,a,y,x,E,b,z,tt)},Tt.Xl=function(a,y){$n.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Fn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Fn&&(a=a.Pb()),this.tb===null&&(this.tb=new He),a.mi(this.tb),a instanceof vr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Tt.eh=function(a,y,x,E){this.nf=this.$a,$n.prototype.eh.call(this,a,y,x,E)},Tt.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Rn||y.Va()}),$n.prototype.Va.call(this)},Tt.si=function(){if(!$n.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof $n){if(y.isVisible()&&Ba(y))return!1}else if(y instanceof Rn&&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 Rn&&!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 Rn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}Tt.Lj=function(){if(0<this.Gn.count){var a=this.diagram;if(a!==null)for(var y=this.Gn.copy().iterator;y.next();)a.remove(y.value)}$n.prototype.Lj.call(this)},hr.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=Je(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=Je(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))},Tt=hr.prototype,Tt.Bd=function(a){var y=(this.U&65536)!==0;if($n.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()))}}},Tt.Lu=function(){var a=this.diagram!==null&&this.diagram.Pw;if(a&&this.$p!==null)return this.$p.iterator;var y=this.Rj();y.add(this);for(var x=new Se,E=y.iterator;E.next();){var b=E.value;if(b instanceof $n)for(b=b.linksConnected;b.next();){var z=b.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},Tt.iz=function(){var a=this.Rj();a.add(this);for(var y=new Se,x=a.iterator;x.next();){var E=x.value;if(E instanceof $n)for(E=E.linksConnected;E.next();){var b=E.value,z=b.fromNode;z===null||a.contains(z)&&z!==this||y.add(z),b=b.toNode,b===null||a.contains(b)&&b!==this||y.add(b)}}return y.iterator},Tt.hz=function(){function a(x,E){x!==null&&(E.add(x),a(x.containingGroup,E))}var y=new Se;return a(this,y),y},Tt.Rj=function(){var a=new Se;return sd(a,this,!0,0,!0),a.remove(this),a},Tt.Zb=function(a){$n.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 $n)z.Bd(y),x.Aj(z,E);else if(z instanceof Rn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}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 $n)z.Bd(y),x.Cj(z,E);else if(z instanceof Rn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}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=Ut.alloc(),$n.prototype.move.call(this,a,y),a=new Se,y=this.Rj().iterator;y.next();)b=y.value,b instanceof Rn&&(b.suspendsRouting&&a.add(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(b.suspendsRouting=!0);for(y.reset();y.next();)if(b=y.value,!(b.ph()||b instanceof $n&&b.isLinkLabel)){var tt=b.position,rt=b.location;tt.w()?(z.x=tt.x+E,z.y=tt.y+x,b.position=z):rt.w()&&(z.x=rt.x+E,z.y=rt.y+x,b.location=z)}for(y.reset();y.next();)b=y.value,b instanceof Rn&&(b.suspendsRouting=a.contains(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(tt=b.position,z.x=tt.x+E,z.y=tt.y+x,z.w()?b.move(z):b.bb(),Av(b)&&b.bb());Ut.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){ve.call(this),this.yb=zi,this.ko=new He(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Re(ja,ve),ja.prototype.cloneProtected=function(a){ve.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 co(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 Vr)||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=Ut.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),Ut.free(x))}else{y=this.dc,x=this.yb,E=x.left+x.right;var b=x.top+x.bottom,z=a.adornedObject;a.angle=z.li();var tt=0;z instanceof vr&&(tt=z.strokeWidth);var rt=z.Df(),ot=z.naturalBounds,lt=(ot.width+tt)*rt;tt=(ot.height+tt)*rt,a.type!==Fn.Link&&(rt=z.ga(a.category==="Selection"?kr:a.locationSpot,Ut.alloc()),a.location=rt,Ut.free(rt)),isNaN(lt)||isNaN(tt)?(a=z.ga(kr,Ut.alloc()),lt=He.allocAt(a.x,a.y,0,0),lt.Ye(z.ga(yo,a)),lt.Ye(z.ga(Ts,a)),lt.Ye(z.ga(so,a)),gr(y,lt.width+E||0,lt.height+b||0),this.Ge(-x.left,-x.top,y.width,y.height),Ut.free(a),He.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=He.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)),He.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 Rn&&(!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 lr(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),ja.className="Placeholder";function Rn(a){Ui.call(this,Fn.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 He,this.ua=new Un,this.u=this.o=this.Sf=this.Wf=null,this.su=new Ut,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Re(Rn,Ui),Rn.prototype.cloneProtected=function(a){Ui.prototype.cloneProtected.call(this,a),a.Qa=this.Qa&-113,a.ff=this.ff,a.gn=this.gn,a.vf=this.vf,a.uo=this.uo,a.qk=this.qk,a.Om=this.Om,a.Qm=this.Qm,a.Rm=this.Rm,a.qj=this.qj,a.po=this.po,this.ba!==null&&(a.ba=this.ba.copy())},Tt=Rn.prototype,Tt.Af=function(a){Ui.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)},Tt.qb=function(a){a.classType===Rn?(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):Ui.prototype.qb.call(this,a)},Tt.Xc=function(){this.ba===null&&(this.ba=new If)},Tt.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Ba(a)||rd(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Ba(a)||rd(a)))},Tt.zv=function(){return!1},Tt.Av=function(){},Tt.Zc=function(){return!1},Rn.prototype.computeAngle=function(a,y,x){return Rn.computeAngle(y,x)},Rn.computeAngle=function(a,y){switch(a){default:case 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=we.bp(y),90<a&&270>a&&(a-=180);break;case yp:a=we.bp(y+90),90<a&&270>a&&(a-=180);break;case wp:a=we.bp(y-90),90<a&&270>a&&(a-=180);break;case T0:if(a=we.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return we.bp(a)};function Fg(a){var y=a.fromNode,x=a.toNode,E=null;if(y!==null?E=x!==null?y.px(x):y.containingGroup:x!==null?E=x.containingGroup:E=null,y=E,x=a.Ah,x!==y){x!==null&&lv(x,a),a.Ah=y,y!==null&&av(y,a);var b=a.containingGroupChanged;if(b!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),b(a,x,y),tt!==null&&(tt.aa=z)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=E}Tt=Rn.prototype,Tt.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Ui.prototype.oh.call(this)},Tt.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},Tt.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function i1(a,y){a.wd===null&&(a.wd=new Se),a.wd.add(y),a.v()}Tt.Vo=function(a){if(Ui.prototype.Vo.call(this,a),tf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,x0(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||x0(x,this,E)}dp(this)}},Tt.Wo=function(a){if(Ui.prototype.Wo.call(this,a),tf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,S0(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||S0(x,this,E)}fp(this)}},Tt.Lj=function(){if(this.fd=!0,this.wd!==null){var a=this.diagram;if(a!==null)for(var y=this.wd.copy().iterator;y.next();)a.remove(y.value)}this.data!==null&&(a=this.diagram,a!==null&&a.partManager.removeDataForLink(this))},Rn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Rn.prototype.move=function(a,y){var x=y?this.location:this.position,E=x.x;isNaN(E)&&(E=0);var b=x.y;for(isNaN(b)&&(b=0),E=a.x-E,b=a.y-b,y===!0?Ui.prototype.move.call(this,a,!1):(a=Ut.allocAt(x.x+E,x.y+b),Ui.prototype.move.call(this,a,!1),Ut.free(a)),Sc(this,E,b),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+E,x.y+b)},Rn.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},Rn.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},Rn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(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 we.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),we.ax(E.x,E.y,b.x,b.y,z.x,z.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var tt=this.flattenedLengths;for(x=this.flattenedTotalLength,b=z=E=0;E<x/2&&z<y&&(b=tt[z],!(E+b>x/2));)E+=b,z++;return y=this.i(z),z=this.i(z+1),1>Math.abs(y.x-z.x)?y.y>z.y?a.h(y.x,y.y-(x/2-E)):a.h(y.x,y.y+(x/2-E)):1>Math.abs(y.y-z.y)?y.x>z.x?a.h(y.x-(x/2-E),y.y):a.h(y.x+(x/2-E),y.y):(x=(x/2-E)/b,a.h(y.x+x*(z.x-y.x),y.y+x*(z.y-y.y))),a},Rn.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(a===2)return this.i(0).ab(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===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),we.My(a.x,a.y,y.x,y.y,E.x,E.y,x.x,x.y)}if(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,E=this.flattenedTotalLength;var b=0;x=0;for(var z;b<E/2&&x<a&&(z=y[x],!(b+z>E/2));)b+=z,x++;if(y=this.i(x),E=this.i(x+1),1>Math.abs(y.x-E.x)&&1>Math.abs(y.y-E.y)){if(0<x&&x+2<a)return this.i(x-1).ab(this.i(x+2))}else{if(1>Math.abs(y.x-E.x))return y.y>E.y?270:90;if(1>Math.abs(y.y-E.y))return y.x>E.x?180:0}return y.ab(E)},Tt=Rn.prototype,Tt.i=function(a){return this.Nb.s[a]},Tt.dd=function(a,y){this.Nb.cd(a,y)},Tt.L=function(a,y,x){this.Nb.cd(a,new Ut(y,x))},Tt.Kz=function(a,y){this.Nb.Gb(a,y)},Tt.m=function(a,y,x){this.Nb.Gb(a,new Ut(y,x))},Tt.ne=function(a){this.Nb.add(a)},Tt.yf=function(a,y){this.Nb.add(new Ut(a,y))},Tt.pv=function(a){this.Nb.mb(a)},Tt.Fj=function(){this.Nb.clear()};function Sc(a,y,x){if(y!==0||x!==0)if(a.pointsCount===0)a.defaultFromPoint&&a.defaultFromPoint.offset(y,x),a.defaultToPoint&&a.defaultToPoint.offset(y,x);else{for(var E=a.fd,b=new ee,z=a.Nb.iterator;z.next();){var tt=z.value;b.add(new Ut(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)}}Tt.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},Tt.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,E=1/0,b=a.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];x=Math.min(rt.x,x),E=Math.min(rt.y,E)}rt=tt=1/0;for(var ot=y.s,lt=ot.length,ut=0;ut<lt;ut++){var ft=ot[ut];tt=Math.min(ft.x,tt),rt=Math.min(ft.y,rt),ft.freeze()}if(y.freeze(),lt===z){for(z=0;z<lt;z++)if(ut=b[z],ft=ot[z],ut.x-x!==ft.x-tt||ut.y-E!==ft.y-rt){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&ph(x.animationManager,this,y),C0(this),this.g("points",a,y)}},Tt.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function C0(a){a.Nb.count===0?a.fd=!1:(a.fd=!0,a.cq=null,a.vt=NaN,a.defaultFromPoint=a.i(0),a.defaultToPoint=a.i(a.pointsCount-1),L0(a,!1))}Tt.bb=function(){if(!this.suspendsRouting){var a=this.diagram;if(a){if(a.As.contains(this)||a.undoManager.isUndoingRedoing||(a=a.animationManager,a.isTicking&&!a.isAnimating))return;this.Tg===null||a.isTicking||(this.Tg=null)}a=this.path,a!==null&&(this.fd=!1,this.v(),a.v())}},Tt.vg=function(){if(!this.fd&&!this.computingPoints){var a=!0;try{this.computingPoints=!0,this.uh(),a=this.computePoints()}catch(y){this.computingPoints=!1,this.rv()}finally{this.computingPoints=!1,a?this.zf():this.rv()}}},Rn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Gf||(Gf=new $n,Gf.desiredSize=ti,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 $n,zf.desiredSize=ti,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,kt=z.y+ot/3,Dt=Et,Xt=kt;we.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)+kt),Et=z.x+2*rt/3,kt=z.y+2*ot/3;var zt=Et,re=kt;we.B(ot,0)?re=0<rt?re-lt:re+lt:(zt=(0>ot?-1:1)*ft+Et,re=ut*(zt-Et)+kt),this.Fj(),this.ne(z),this.yf(Dt,Xt),this.yf(zt,re),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,we.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=He.alloc(),y.mi(rt),ot=rt.ca(b),yt.mi(rt),lt=rt.ca(E),(ot||lt)&&(tt=y.ga(F0(tt),new Ut),this.dd(0,this.getLinkPointFromPoint(a,y,tt,b,!0,tt)),x=yt.ga(F0(x),new Ut),this.dd(1,this.getLinkPointFromPoint(z,yt,x,E,!1,x))),He.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=kt=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?kt=Xt:Et===90?Dt=Xt:Et===180?kt=-Xt:Et===270?Dt=-Xt:(kt=Xt*Math.cos(Et*Math.PI/180),Dt=Xt*Math.sin(Et*Math.PI/180)),tt.Mc()&&lt&&(Xt=y.ga(Pr,Ut.alloc()),zt=Ut.allocAt(Xt.x+1e3*kt,Xt.y+1e3*Dt),this.getLinkPointFromPoint(a,y,Xt,zt,!0,ft),Ut.free(Xt),Ut.free(zt))),Xt=this.getLinkPoint(E,b,x,!1,ut,a,y);var fe=re=zt=0;if(ut||!ot||lt){var me=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&&(me+=Math.abs(le)*(ut?1:2)),fe===0?zt=me:fe===90?re=me:fe===180?zt=-me:fe===270?re=-me:(zt=me*Math.cos(fe*Math.PI/180),re=me*Math.sin(fe*Math.PI/180)),x.Mc()&&lt&&(x=b.ga(Pr,Ut.alloc()),tt=Ut.allocAt(x.x+1e3*zt,x.y+1e3*re),this.getLinkPointFromPoint(E,b,x,tt,!1,Xt),Ut.free(x),Ut.free(tt))}x=ft,(ut||!rt||lt)&&(x=new Ut(ft.x+kt,ft.y+Dt)),tt=Xt,(ut||!ot||lt)&&(tt=new Ut(Xt.x+zt,Xt.y+re)),!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}Rn.prototype.getLinkPointFromPoint=function(a,y,x,E,b,z){if(z===void 0&&(z=new Ut),a===null||y===null)return z.assign(x),z;if(a.isVisible()||(b=a.findVisibleNode(),b!==null&&b!==a&&(y=b.port)),a=null,b=y.panel,b===null||b.se()||(b=b.panel),b===null){b=E.x,E=E.y;var tt=x.x;x=x.y}else{a=b.oe,b=1/(a.m11*a.m22-a.m12*a.m21),tt=a.m22*b;var rt=-a.m12*b,ot=-a.m21*b,lt=a.m11*b,ut=b*(a.m21*a.dy-a.m22*a.dx),ft=b*(a.m12*a.dx-a.m11*a.dy);b=E.x*tt+E.y*ot+ut,E=E.x*rt+E.y*lt+ft,tt=x.x*tt+x.y*ot+ut,x=x.x*rt+x.y*lt+ft}return y.Sj(b,E,tt,x,z),a!==null&&z.transform(a),z};function P0(a,y){var x=y.Zn;return x===null&&(x=new jf,x.port=y,x.node=y.part,y.Zn=x),h1(x,a)}Rn.prototype.getLinkPoint=function(a,y,x,E,b,z,tt,rt){if(rt===void 0&&(rt=new Ut),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=Ut.alloc(),lt=Ut.alloc();var ut=new He(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),Ut.free(ot),Ut.free(lt)}}return rt}}return x=y.ga(F0(x),Ut.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=Ut.alloc(),tt=tt.ga(F0(ot),z),b&&(tt=uv(x,tt)),Ut.free(z)),this.getLinkPointFromPoint(a,y,x,tt,E,rt),Ut.free(x),rt},Rn.prototype.getLinkDirection=function(a,y,x,E,b,z,tt,rt){t:if(E.sb())var ot=E.x>E.y?E.x>1-E.y?0:E.x<1-E.y?270:315:E.x<E.y?E.x>1-E.y?90:E.x<1-E.y?180:135:.5>E.x?225:.5<E.x?45:0;else{if(E.$c()&&(ot=P0(this,y),ot!==null))switch(ot.Nc){case 1:ot=270;break t;case 2:ot=180;break t;default:case 4:ot=0;break t;case 8:ot=90;break t}ot=y.ga(Pr,Ut.alloc()),this.pointsCount>(z?6:2)?(rt=b?this.i(1):this.i(this.pointsCount-2),rt=z?uv(ot,rt.copy()):x):(x=Ut.alloc(),rt=rt.ga(Pr,x),Ut.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,Ut.free(ot),ot=x}return E.Mc()&&tt.Td(a)&&(ot+=180,360<=ot&&(ot-=360)),Eg(E)||(a=y.li(),a===0)||(45<=a&&135>a?ot+=90:135<=a&&225>a?ot+=180:225<=a&&315>a&&(ot+=270),360<=ot&&(ot-=360)),ot},Rn.prototype.computeEndSegmentLength=function(a,y,x,E){return y!==null&&x.$c()&&(a=P0(this,y),a!==null)?a.Ju:(a=E?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=E?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},Rn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Pr:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===ws?Ar:y)):(a=y||this.toPort,a===null?a=Pr:(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:Pr}Rn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Va&&4<this.pointsCount?this.computeMidPoint(new Ut):(a=y.Zn,a=a!==null?h1(a,this):null,a!==null?a.Zo:y.ga(Pr))},Rn.prototype.computeShortLength=function(a){if(a){if(a=this.fromShortLength,isNaN(a)){var y=this.fromPort;y!==null&&(a=y.fromShortLength)}return isNaN(a)?0:a}return a=this.toShortLength,isNaN(a)&&(y=this.toPort,y!==null&&(a=y.toShortLength)),isNaN(a)?0:a},Rn.prototype.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=er.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return Nm(this,y,x,b),z===void 0&&er.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=er.alloc(),ft.set(tt),ut instanceof Fn)rt=ut.Cf(a,y,x,E,b,ft);else if(this.path===ut){if(ut instanceof vr)if(rt=a,yt=E,ut.pickable===!1)rt=!1;else if(ft.multiply(ut.transform),yt)t:{var Et=rt,kt=ft;if(ut.fh(Et,kt))rt=!0;else{if(kt===void 0&&(kt=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=Ut.alloc(),zt=Ut.alloc(),re=Ut.alloc(),le=er.alloc();le.set(kt),le.bv(ut.transform),le.Vj(),zt.x=yt,zt.y=Dt,zt.transform(le),Xt.x=rt,Xt.y=Dt,Xt.transform(le),kt=!1,qd(ut,Xt,zt,re)?kt=!0:(Xt.x=yt,Xt.y=Et,Xt.transform(le),qd(ut,Xt,zt,re)?kt=!0:(zt.x=rt,zt.y=Et,zt.transform(le),qd(ut,Xt,zt,re)?kt=!0:(Xt.x=rt,Xt.y=Dt,Xt.transform(le),qd(ut,Xt,zt,re)&&(kt=!0)))),er.free(le),Ut.free(Xt),Ut.free(zt),Ut.free(re),rt=kt}}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)),er.free(ft)}}}return z===void 0&&er.free(tt),rt||this.background!==null||this.areaBackground!==null}return z===void 0&&er.free(tt),!1},Rn.prototype.computeCurve=function(){if(this.Wf===null){var a=this.fromPort,y=this.isOrthogonal;this.Wf=a!==null&&a===this.toPort&&!y}return this.Wf?Wl:this.curve},Rn.prototype.computeCorner=function(){if(this.curve===Wl)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Rn.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];if(b!==a&&!b.isPanelMain&&(b.segmentIndex===-1/0||isNaN(b.segmentIndex)))return b}for(a=this.labelNodes;a.next();)if(y=a.value,y.segmentIndex===-1/0||isNaN(y.segmentIndex))return y;return null},Rn.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=a1;a=Math.max(a,this.computeThickness());var y=this.fromPort,x=this.toPort;if(y!==null&&x!==null){var E=this.findMidLabel();if(E!==null){var b=E.naturalBounds,z=E.margin,tt=isNaN(b.width)?30:b.width*E.scale+z.left+z.right;b=isNaN(b.height)?14:b.height*E.scale+z.top+z.bottom,E=E.segmentOrientation,E===pp||E===k0||E===fv?a=Math.max(a,b):E===vp||E===wp||E===mp||E===yp?a=Math.max(a,tt):(y=y.ga(Pr).ab(x.ga(Pr))/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},Rn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Va&&x.bb()}},Rn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=s1;var y=this.Sf;if(y!==null){for(var x=wn(),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),Mn(x)}}return a},Rn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Rn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Rn.prototype.adjustPoints=function(a,y,x,E){var b=this.computeAdjusting();if(this.isOrthogonal){if(b===M0)return!1;b===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(!we.$(lt,0)){if(we.$(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),we.$(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),we.$(y,0)||(we.$(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 kt=(yt-ut)/(ot-rt);Et=Math.sqrt(1+1/(kt*kt))}else kt=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var Dt=y.x,Xt=y.y,zt=.5;lt!==0&&(zt=((b-Dt)*(b-tt)+(z-Xt)*(z-ft))/lt);var re=b+zt*(tt-b),le=z+zt*(ft-z);y=Math.sqrt((Dt-re)*(Dt-re)+(Xt-le)*(Xt-le)),Xt<kt*(Dt-re)+le&&(y=-y),0<kt&&(y=-y),Dt=rt+zt*(ot-rt),zt=ut+zt*(yt-ut),kt!==0?(y=Dt+y/Et,this.L(a,y,zt-(y-Dt)/kt)):this.L(a,Dt,zt+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,we.B(b.y,z.y)?we.B(z.x,tt.x)?ut=y.y:we.B(z.y,tt.y)&&(rt=y.x):we.B(b.x,z.x)&&(we.B(z.y,tt.y)?rt=y.x:we.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,we.B(b.y,z.y)?we.B(z.x,tt.x)?ut=E.y:we.B(z.y,tt.y)&&(rt=E.x):we.B(b.x,z.x)&&(we.B(z.y,tt.y)?rt=E.x:we.B(z.x,tt.x)&&(ut=E.y)),this.L(x-1,rt,ut),Av(this))){this.L(a+1,ft,lt),this.L(x-1,ot,yt),x=!1;break t}this.dd(a,y),this.dd(x,E),x=!0}return x;default:return!1}},Rn.prototype.addOrthoPoints=function(a,y,x,E,b,z){0>y?y+=360:360<=y&&(y-=360),0>E?E+=360:360<=E&&(E-=360);var tt=E;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,E=315<=E||45>E?0:45<=E&&135>E?90:135<=E&&225>E?180:270;var rt=b.actualBounds.copy(),ot=z.actualBounds.copy();if(rt.w()&&ot.w()){rt.Bc(xp,xp),ot.Bc(xp,xp),rt.Ye(a),ot.Ye(x);var lt=Ut.alloc(),ut=Ut.alloc();y===0?x.x>a.x||E===270&&x.y<a.y&&ot.right>a.x||E===90&&x.y>a.y&&ot.right>a.x?(lt.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),E===180?(lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ut.x=lt.x,ut.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(lt.x=a.x<ot.left?this.computeMidOrthoPosition(a.x,a.y,ot.left,x.y,!1):a.x<ot.right&&(E===270&&a.y<ot.top||E===90&&a.y>ot.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ot.right,ut.x=lt.x,ut.y=x.y):E===0&&a.x<ot.left&&a.y>ot.top&&a.y<ot.bottom&&(lt.x=a.x,lt.y=a.y<x.y?Math.min(x.y,ot.top):Math.max(x.y,ot.bottom),ut.y=lt.y)):(lt.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),(E===180||E===90&&x.y<rt.top||E===270&&x.y>rt.bottom)&&(E===180&&(ot.ca(a)||rt.ca(x))?lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===180||E===90)?lt.y=this.computeMidOrthoPosition(a.x,rt.top,x.x,Math.max(x.y,ot.bottom),!0):x.y>a.y&&(E===180||E===270)&&(lt.y=this.computeMidOrthoPosition(a.x,rt.bottom,x.x,Math.min(x.y,ot.top),!0)),ut.x=x.x,ut.y=lt.y),lt.y>rt.top&&lt.y<rt.bottom&&(x.x>=rt.left&&x.x<=a.x||a.x<=ot.right&&a.x>=x.x?(E===90||E===270)&&(lt.h(Math.max((a.x+x.x)/2,a.x),a.y),ut.h(lt.x,x.y)):(lt.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===0?rt.top:Math.min(rt.top,ot.top)):Math.max(x.y,E===0?rt.bottom:Math.max(rt.bottom,ot.bottom)),ut.x=x.x,ut.y=lt.y))):y===180?x.x<a.x||E===270&&x.y<a.y&&ot.left<a.x||E===90&&x.y>a.y&&ot.left<a.x?(lt.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),E===0?(lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ut.x=lt.x,ut.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(lt.x=a.x>ot.right?this.computeMidOrthoPosition(a.x,a.y,ot.right,x.y,!1):a.x>ot.left&&(E===270&&a.y<ot.top||E===90&&a.y>ot.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ot.left,ut.x=lt.x,ut.y=x.y):E===180&&a.x>ot.right&&a.y>ot.top&&a.y<ot.bottom&&(lt.x=a.x,lt.y=a.y<x.y?Math.min(x.y,ot.top):Math.max(x.y,ot.bottom),ut.y=lt.y)):(lt.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),(E===0||E===90&&x.y<rt.top||E===270&&x.y>rt.bottom)&&(E===0&&(ot.ca(a)||rt.ca(x))?lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===0||E===90)?lt.y=this.computeMidOrthoPosition(a.x,rt.top,x.x,Math.max(x.y,ot.bottom),!0):x.y>a.y&&(E===0||E===270)&&(lt.y=this.computeMidOrthoPosition(a.x,rt.bottom,x.x,Math.min(x.y,ot.top),!0)),ut.x=x.x,ut.y=lt.y),lt.y>rt.top&&lt.y<rt.bottom&&(x.x<=rt.right&&x.x>=a.x||a.x>=ot.left&&a.x<=x.x?(E===90||E===270)&&(lt.h(Math.min((a.x+x.x)/2,a.x),a.y),ut.h(lt.x,x.y)):(lt.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===180?rt.top:Math.min(rt.top,ot.top)):Math.max(x.y,E===180?rt.bottom:Math.max(rt.bottom,ot.bottom)),ut.x=x.x,ut.y=lt.y))):y===90?x.y>a.y||E===180&&x.x<a.x&&ot.bottom>a.y||E===0&&x.x>a.x&&ot.bottom>a.y?(lt.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),E===270?(lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ut.x=x.x,ut.y=lt.y):E===180&&x.x<a.x||E===0&&x.x>a.x?(lt.y=a.y<ot.top?this.computeMidOrthoPosition(a.x,a.y,x.x,ot.top,!0):a.y<ot.bottom&&(E===180&&a.x<ot.left||E===0&&a.x>ot.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ot.bottom,ut.x=x.x,ut.y=lt.y):E===90&&a.y<ot.top&&a.x>ot.left&&a.x<ot.right&&(lt.x=a.x<x.x?Math.min(x.x,ot.left):Math.max(x.x,ot.right),lt.y=a.y,ut.x=lt.x)):(lt.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),(E===270||E===0&&x.x<rt.left||E===180&&x.x>rt.right)&&(E===270&&(ot.ca(a)||rt.ca(x))?lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===270||E===0)?lt.x=this.computeMidOrthoPosition(rt.left,a.y,Math.max(x.x,ot.right),x.y,!1):x.x>a.x&&(E===270||E===180)&&(lt.x=this.computeMidOrthoPosition(rt.right,a.y,Math.min(x.x,ot.left),x.y,!1)),ut.x=lt.x,ut.y=x.y),lt.x>rt.left&&lt.x<rt.right&&(x.y>=rt.top&&x.y<=a.y||a.y<=ot.bottom&&a.y>=x.y?(E===0||E===180)&&(lt.h(a.x,Math.max((a.y+x.y)/2,a.y)),ut.h(x.x,lt.y)):(lt.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===90?rt.left:Math.min(rt.left,ot.left)):Math.max(x.x,E===90?rt.right:Math.max(rt.right,ot.right)),ut.x=lt.x,ut.y=x.y))):x.y<a.y||E===180&&x.x<a.x&&ot.top<a.y||E===0&&x.x>a.x&&ot.top<a.y?(lt.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),E===90?(lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ut.x=x.x,ut.y=lt.y):E===180&&x.x<a.x||E===0&&x.x>=a.x?(lt.y=a.y>ot.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,ot.bottom,!0):a.y>ot.top&&(E===180&&a.x<ot.left||E===0&&a.x>ot.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ot.top,ut.x=x.x,ut.y=lt.y):E===270&&a.y>ot.bottom&&a.x>ot.left&&a.x<ot.right&&(lt.x=a.x<x.x?Math.min(x.x,ot.left):Math.max(x.x,ot.right),lt.y=a.y,ut.x=lt.x)):(lt.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),(E===90||E===0&&x.x<rt.left||E===180&&x.x>rt.right)&&(E===90&&(ot.ca(a)||rt.ca(x))?lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===90||E===0)?lt.x=this.computeMidOrthoPosition(rt.left,a.y,Math.max(x.x,ot.right),x.y,!1):x.x>a.x&&(E===90||E===180)&&(lt.x=this.computeMidOrthoPosition(rt.right,a.y,Math.min(x.x,ot.left),x.y,!1)),ut.x=lt.x,ut.y=x.y),lt.x>rt.left&&lt.x<rt.right&&(x.y<=rt.bottom&&x.y>=a.y||a.y>=ot.top&&a.y<=x.y?(E===0||E===180)&&(lt.h(a.x,Math.min((a.y+x.y)/2,a.y)),ut.h(x.x,lt.y)):(lt.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===270?rt.left:Math.min(rt.left,ot.left)):Math.max(x.x,E===270?rt.right:Math.max(rt.right,ot.right)),ut.x=lt.x,ut.y=x.y)));var ft=x;if(this.isAvoiding){var yt=this.diagram;if(yt===null||b===z||this.layer.isTemporary||!Kd(yt)||rt.ca(ft)&&!z.Td(b)||ot.ca(a)&&!b.Td(z))y=!1;else{var 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 kt=x=null;if(yt.isVirtualized){yt=Et.bounds.copy(),yt.Bc(-Et.Ho,-Et.Go);var Dt=Ut.alloc();Mg(Et,a.x,a.y)||(we.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)):we.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)):we.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)||(we.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,ft.x,ft.y,ut.x,ut.y,Dt)?(kt=ft=Dt.copy(),E=ut.ab(Dt)):we.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,ut.x,ut.y,lt.x,lt.y,Dt)?(kt=ft=Dt.copy(),E=lt.ab(Dt)):we.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,lt.x,lt.y,a.x,a.y,Dt)&&(kt=ft=Dt.copy(),E=a.ab(Dt))),Ut.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?we.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)):we.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)&&(we.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)):we.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)),kt!==null&&(E===0||E===180?this.yf(z.x,kt.y):this.yf(kt.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(lt.copy()),this.ne(ut.copy())),Ut.free(lt),Ut.free(ut)}},Rn.prototype.computeMidOrthoPosition=function(a,y,x,E,b){var z=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(z=this.computeCurviness()),b?(y+E)/2+z:(a+x)/2+z};function Av(a){if(a.diagram===null||!a.isAvoiding||!Kd(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=ed(a.diagram,!0,a.containingGroup,null);for(var E=1;E<x-2;E++){var b=y[E],z=y[E+1];if(!a.Yj(Math.min(b.x,z.x),Math.min(b.y,z.y),Math.abs(b.x-z.x),Math.abs(b.y-z.y)))return!0}return!1}function hv(a,y,x,E,b,z,tt){var rt=y.Ho,ot=y.Go,lt=ih(y,x,E),ut=x,ft=E;for(b===0?ut+=rt:b===90?ft+=ot:b===180?ut-=rt:ft-=ot,b!==tt&&lt>ef&&ih(y,ut,ft)!==lt-1&&(ih(y,x-rt,E)===lt-1?(b=180,ut=x-rt,ft=E):ih(y,x+rt,E)===lt-1?(b=0,ut=x+rt,ft=E):ih(y,x,E-ot)===lt-1?(b=270,ut=x,ft=E-ot):ih(y,x,E+ot)===lt-1&&(b=90,ut=x,ft=E+ot));lt>ef&&ih(y,ut,ft)===lt-1;)x=ut,E=ft,b===0?ut+=rt:b===90?ft+=ot:b===180?ut-=rt:ft-=ot,--lt;z?lt>ef&&(b===180||b===0?x=Math.floor(x/rt)*rt+rt/2:(b===90||b===270)&&(E=Math.floor(E/ot)*ot+ot/2)):(x=Math.floor(x/rt)*rt+rt/2,E=Math.floor(E/ot)*ot+ot/2),lt>ef&&(z=b,tt=x,ut=E,b===0?(z=90,ut+=ot):b===90?(z=180,tt-=rt):b===180?(z=270,ut-=ot):b===270&&(z=0,tt+=rt),ih(y,tt,ut)===lt-1?hv(a,y,tt,ut,z,!1,z):(tt=x,ut=E,b===0?(z=270,ut-=ot):b===90?(z=0,tt+=rt):b===180?(z=90,ut+=ot):b===270&&(z=180,tt-=rt),ih(y,tt,ut)===lt-1&&hv(a,y,tt,ut,z,!1,z))),a.yf(x,E)}Rn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),E=this.i(1),b=xn(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=xn(y,a,E.x,E.y,x.x,x.y);E=x,rt<b&&(z=tt,b=rt)}return z},Rn.prototype.qc=function(){this.lk=!1,this.v()},Rn.prototype.Ul=function(a){if(!(!a&&(this.fd===!1||(a=this.Pb(),this.lk&&(a===null||a.geometry!==null))))&&(2>this.pointsCount?this.lk=!0:this.ua=this.makeGeometry(),a=this.path,a!==null)){a.ua=this.ua;for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];b!==a&&b.isPanelMain&&b instanceof vr&&(b.ua=this.ua)}}},Rn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,E=this.diagram;E!==null&&tf(this)&&E.Eh.contains(this)&&(this.ml.width!==0||this.ml.height!==0)&&(E.animationManager.isAnimating||E.currentTool!==E.toolManager)&&(x=!0);var b=this.i(0).copy(),z=b.copy();E=this.Nb.s;var tt=this.computeCurve();if(tt===Wl&&3<=y&&!we.$(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=Un.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&&!we.$(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=Ut.allocAt(E,ot),x=Ut.alloc(),x.assign(this.i(1)),z=Ut.allocAt(E,ot),b=Ut.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,kt=this.i(cv(this,lt,ft,!1));if((!we.$(yt.x,Et.x)||!we.$(Et.x,kt.x))&&(!we.$(yt.y,Et.y)||!we.$(Et.y,kt.y))){var Dt=ut;isNaN(Dt)&&(Dt=this.smoothness/3);var Xt=yt.x;yt=yt.y;var zt=Et.x;Et=Et.y;var re=kt.x;kt=kt.y;var le=Dt*E0(Xt,yt,zt,Et);Dt*=E0(zt,Et,re,kt),we.$(yt,Et)&&we.$(zt,re)&&(zt>Xt?kt>Et?(z.x=zt-le,z.y=Et-le,b.x=zt+Dt,b.y=Et+Dt):(z.x=zt-le,z.y=Et+le,b.x=zt+Dt,b.y=Et-Dt):kt>Et?(z.x=zt+le,z.y=Et-le,b.x=zt-Dt,b.y=Et+Dt):(z.x=zt+le,z.y=Et+le,b.x=zt-Dt,b.y=Et-Dt)),we.$(Xt,zt)&&we.$(Et,kt)&&(Et>yt?(re>zt?(z.x=zt-le,z.y=Et-le,b.x=zt+Dt):(z.x=zt+le,z.y=Et-le,b.x=zt-Dt),b.y=Et+Dt):(re>zt?(z.x=zt-le,z.y=Et+le,b.x=zt+Dt):(z.x=zt+le,z.y=Et+le,b.x=zt-Dt),b.y=Et-Dt)),(we.$(Xt,zt)&&we.$(zt,re)||we.$(yt,Et)&&we.$(Et,kt))&&(Xt=.5*(Xt+re),yt=.5*(yt+kt),z.x=Xt,z.y=yt,b.x=Xt,b.y=yt),(ft===1||ft===2&&we.$(tt.x,this.i(0).x)&&we.$(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,pn)),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),Ut.free(y),Ut.free(x),Ut.free(z),Ut.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,pn)),yc(rt,z.x-E,z.y-ot,b.x-E,b.y-ot,tt.x-E,tt.y-ot);else{for(z=Ut.alloc(),z.assign(this.i(0)),b=Ut.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,pn)),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,zt=this.i(lt),Dt=x,we.B(z.y,yt.y)&&we.B(yt.x,zt.x))if(kt=Math.min(tt,Math.abs(yt.x-b.x)/2),kt=le=Math.min(kt,Math.abs(zt.y-yt.y)/2),we.B(kt,0))Kf(this,rt,ft,Xt,z,yt,Dt),z.assign(yt);else{var fe=yt.x,me=yt.y;Et=fe,re=me,yt.x>z.x?fe=yt.x-kt:fe=yt.x+kt,zt.y>yt.y?re=yt.y+le:re=yt.y-le,zt=Ut.allocAt(fe,me),Kf(this,rt,ft,Xt,z,zt,Dt),Ut.free(zt),m0(rt,yt.x+ft,yt.y+Xt,Et+ft,re+Xt),z.h(Et,re)}else we.B(z.x,yt.x)&&we.B(yt.y,zt.y)?(kt=Math.min(tt,Math.abs(yt.y-b.y)/2),kt=le=Math.min(kt,Math.abs(zt.x-yt.x)/2),we.B(le,0)?(Kf(this,rt,ft,Xt,z,yt,Dt),z.assign(yt)):(fe=yt.x,me=yt.y,Et=fe,re=me,yt.y>z.y?me=yt.y-kt:me=yt.y+kt,zt.x>yt.x?Et=yt.x+le:Et=yt.x-le,zt=Ut.allocAt(fe,me),Kf(this,rt,ft,Xt,z,zt,Dt),Ut.free(zt),m0(rt,yt.x+ft,yt.y+Xt,Et+ft,re+Xt),z.h(Et,re))):(Kf(this,rt,ft,Xt,z,yt,Dt),z.assign(yt));b.assign(ut),ft=lt}Ut.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=Un.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),we.$(a,0)?y:we.$(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;we.$(y.x,z.x)&&we.$(y.y,z.y);){if(x>=b)return b-1;z=a.i(x++)}if(!we.$(y.x,z.x)&&!we.$(y.y,z.y))return x-1;for(var tt=z;we.$(y.x,z.x)&&we.$(z.x,tt.x)&&(!E||(y.y>=z.y?z.y>=tt.y:z.y<=tt.y))||we.$(y.y,z.y)&&we.$(z.y,tt.y)&&(!E||(y.x>=z.x?z.x>=tt.x:z.x<=tt.x));){if(x>=b)return b-1;tt=a.i(x++)}return x-2}Rn.prototype.computeJumpLength=function(){return 10};function Kf(a,y,x,E,b,z,tt){if(!tt&&tf(a)){tt=a.computeJumpLength();var rt=tt/2,ot=[],lt=0;if(a.isVisible()&&(lt=Tw(a,b,z,ot)),0<lt){if(we.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 kt=z.y+E;a.curve===Bc?Pg(y,Et,kt,!1):yc(y,yt,ft,Et,ft,Et,kt)}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(we.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,kt=z.x+x,ft+=E,a.curve===Bc?Pg(y,kt,ft,!1):yc(y,Et,yt,Et,ft,kt,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 Rn){if(ot===a)return 0<E.length&&E.sort(function(ut,ft){return ut-ft}),E.length;if(ot.isVisible()&&tf(ot)){var lt=ot.routeBounds;lt.w()&&a.routeBounds.Yc(lt)&&!a.usesSamePort(ot)&&(lt=ot.path,lt!==null&&lt.Ed()&&Nw(y,x,E,ot))}}}}}return 0<E.length&&E.sort(function(ut,ft){return ut-ft}),E.length}function Nw(a,y,x,E){for(var b=we.B(a.y,y.y),z=E.pointsCount,tt=E.i(0),rt=Ut.alloc(),ot=1;ot<z;ot++){var lt=E.i(ot);if(ot<z-1){var ut=E.i(ot+1);if(tt.y===lt.y&&lt.y===ut.y){if(lt.x>tt.x&&ut.x>=lt.x||lt.x<tt.x&&ut.x<=lt.x)continue}else if(tt.x===lt.x&&lt.x===ut.x&&(lt.y>tt.y&&ut.y>=lt.y||lt.y<tt.y&&ut.y<=lt.y))continue}t:{ut=a.x;var ft=a.y,yt=y.x,Et=y.y,kt=tt.x;tt=tt.y;var Dt=lt.x,Xt=lt.y;if(we.B(ut,yt)){if(!we.B(ft,Et)&&we.B(tt,Xt)&&Math.min(ft,Et)<tt&&Math.max(ft,Et)>tt&&Math.min(kt,Dt)<ut&&Math.max(kt,Dt)>ut&&!we.B(kt,Dt)){rt.x=ut,rt.y=tt,ut=!0;break t}}else if(we.B(ft,Et)&&we.B(kt,Dt)&&Math.min(ut,yt)<kt&&Math.max(ut,yt)>kt&&Math.min(tt,Xt)<ft&&Math.max(tt,Xt)>ft&&!we.B(tt,Xt)){rt.x=kt,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}Ut.free(rt)}function tf(a){return a=a.curve,a===Lg||a===Bc}function L0(a,y){(y||tf(a))&&(y=a.diagram,y===null||y.animationManager.isTicking||y.Eh.contains(a)||a.ml.width===0&&a.ml.height===0||y.Eh.add(a,a.ml.copy()))}Rn.prototype.Xo=function(a){var y=this.layer;if(y!==null&&y.visible&&!y.isTemporary){var x=y.diagram;if(x!==null&&!x.animationManager.isTicking){var E=!1;for(x=x.layers;x.next();){var b=x.value;if(b.visible){if(b===y){E=!0;var z=!1;b=b.Pa.s;for(var tt=b.length,rt=0;rt<tt;rt++){var ot=b[rt];ot instanceof Rn&&(ot===this?z=!0:z&&r1(this,ot,a))}}else if(E)for(z=b.Pa.s,b=z.length,tt=0;tt<b;tt++)rt=z[tt],rt instanceof Rn&&r1(this,rt,a)}}}}};function r1(a,y,x){if(y!==null&&y.lk&&y.fd&&tf(y)){var E=y.routeBounds;E.w()&&(a.routeBounds.Yc(E)||x.Yc(E))&&(a.usesSamePort(y)||y.qc())}}Rn.prototype.usesSamePort=function(a){var y=this.pointsCount,x=a.pointsCount;if(0<y&&0<x){var E=this.i(0),b=a.i(0);if(E.Xa(b)||(y=this.i(y-1),a=a.i(x-1),y.Xa(a)||E.Xa(a)||y.Xa(b)))return!0}else if(this.fromNode===a.fromNode||this.toNode===a.toNode||this.fromNode===a.toNode||this.toNode===a.fromNode)return!0;return!1},Rn.prototype.isVisible=function(){if(!Ui.prototype.isVisible.call(this))return!1;var a=this.containingGroup,y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this.fromNode,x!==null){if(this.isTreeLink&&y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(var E=x;E!==null;){if(E.labeledLink===this)return!0;E=E.containingGroup}if(x=x.findVisibleNode(),x===null||x===a)return!1}if(x=this.toNode,x!==null){if(this.isTreeLink&&!y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(y=x;y!==null;){if(y.labeledLink===this)return!0;y=y.containingGroup}if(y=x.findVisibleNode(),y===null||y===a)return!1}return!0},Rn.prototype.Zb=function(a){if(Ui.prototype.Zb.call(this,a),a&&L0(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},Rn.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?gp:this.qk};function dp(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var E=a.ff,b=a.vf,z=a=null,tt=y.jb.s,rt=tt.length,ot=0;ot<rt;ot++){var lt=tt[ot];(lt.ef===y&&lt.ff===E&&lt.uf===x&&lt.vf===b||lt.ef===x&&lt.ff===b&&lt.uf===y&&lt.vf===E)&&(z===null?z=lt:(a===null&&(a=[],a.push(z)),a.push(lt)))}if(a!==null){for(z=Vy(y,x,E,b),z===null&&(z=new N0(y,E,x,b),jy(y,z),jy(x,z)),z.links=a,y=0;y<a.length;y++)a[y].Sf=z;z.Sl()}}}}function fp(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(sn(y.links,a),y.Sl()))}Rn.prototype.ph=function(){return!0},Ue.Object.defineProperties(Rn.prototype,{fromNode:{get:function(){return this.ef},set:function(a){var y=this.ef;if(y!==a){var x=this.fromPort;y!==null&&(this.uf!==y&&S0(y,this,x),fp(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var E=this.diagram;E!==null&&E.aa&&E.partManager.setFromNodeForLink(this,a,y);var b=this.fromPort,z=this.fromPortChanged;if(z!==null){var tt=!0;E!==null&&(tt=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=tt)}a!==null&&(this.uf!==a&&x0(a,this,b),dp(this),this.C(1)),this.g("fromNode",y,a),Fg(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&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&&Yn(a,">= 0",Rn,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),this.bb())}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:NaN},set:function(a){var y=this.fromShortLength;y!==a&&(this.Xc(),this.ba.Wi=a,this.qc(),this.g("fromShortLength",y,a))}},toSpot:{get:function(){return this.ba!==null?this.ba.yj: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&&Yn(a,">= 0",Rn,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),this.bb())}},toShortLength:{get:function(){return this.ba!==null?this.ba.xj:NaN},set:function(a){var y=this.toShortLength;y!==a&&(this.Xc(),this.ba.xj=a,this.qc(),this.g("toShortLength",y,a))}},isLabeledLink:{get:function(){return this.wd===null?!1:0<this.wd.count}},labelNodes:{get:function(){return this.wd===null?Yi:this.wd.iterator}},relinkableFrom:{get:function(){return(this.Qa&1)!==0},set:function(a){var y=(this.Qa&1)!==0;y!==a&&(this.Qa^=1,this.g("relinkableFrom",y,a),this.Wb())}},relinkableTo:{get:function(){return(this.Qa&2)!==0},set:function(a){var y=(this.Qa&2)!==0;y!==a&&(this.Qa^=2,this.g("relinkableTo",y,a),this.Wb())}},resegmentable:{get:function(){return(this.Qa&4)!==0},set:function(a){var y=(this.Qa&4)!==0;y!==a&&(this.Qa^=4,this.g("resegmentable",y,a),this.Wb())}},isTreeLink:{get:function(){return(this.Qa&8)!==0},set:function(a){var y=(this.Qa&8)!==0;y!==a&&(this.Qa^=8,this.g("isTreeLink",y,a),this.fromNode!==null&&cp(this.fromNode),this.toNode!==null&&cp(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof vr?a:null}},routeBounds:{get:function(){this.vg();var a=this.ml,y=1/0,x=1/0,E=this.pointsCount;if(E===0)a.h(NaN,NaN,0,0);else{if(E===1)E=this.i(0),y=Math.min(E.x,y),x=Math.min(E.y,x),a.h(E.x,E.y,0,0);else if(E===2){E=this.i(0);var b=this.i(1);y=Math.min(E.x,b.x),x=Math.min(E.y,b.y),a.h(E.x,E.y,0,0),a.Ye(b)}else if(this.computeCurve()===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),we.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);we.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 Ut)}},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);we.$(E.x,b.x)?(E=b.y-E.y,0>E&&(E=-E)):we.$(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 Ut(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(!ln(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 Ut(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)}}}),Rn.prototype.invalidateOtherJumpOvers=Rn.prototype.Xo,Rn.prototype.findClosestSegment=Rn.prototype.ez,Rn.prototype.updateRoute=Rn.prototype.vg,Rn.prototype.invalidateRoute=Rn.prototype.bb,Rn.prototype.rollbackRoute=Rn.prototype.rv,Rn.prototype.commitRoute=Rn.prototype.zf,Rn.prototype.startRoute=Rn.prototype.uh,Rn.prototype.clearPoints=Rn.prototype.Fj,Rn.prototype.removePoint=Rn.prototype.pv,Rn.prototype.addPointAt=Rn.prototype.yf,Rn.prototype.addPoint=Rn.prototype.ne,Rn.prototype.insertPointAt=Rn.prototype.m,Rn.prototype.insertPoint=Rn.prototype.Kz,Rn.prototype.setPointAt=Rn.prototype.L,Rn.prototype.setPoint=Rn.prototype.dd,Rn.prototype.getPoint=Rn.prototype.i,Rn.prototype.getOtherPort=Rn.prototype.Cz,Rn.prototype.getOtherNode=Rn.prototype.To;var Gf=null,zf=null,dv=new rn(Rn,"Normal",1),Dw=new rn(Rn,"Orthogonal",2),Iw=new rn(Rn,"AvoidsNodes",6),o1=new rn(Rn,"AvoidsNodesStraight",7),Va=new rn(Rn,"None",0),Wl=new rn(Rn,"Bezier",9),Bc=new rn(Rn,"JumpGap",10),Lg=new rn(Rn,"JumpOver",11),gp=new rn(Rn,"End",17),M0=new rn(Rn,"Scale",18),b0=new rn(Rn,"Stretch",19),pp=new rn(Rn,"OrientAlong",21),mp=new rn(Rn,"OrientPlus90",22),vp=new rn(Rn,"OrientMinus90",23),fv=new rn(Rn,"OrientOpposite",24),k0=new rn(Rn,"OrientUpright",25),yp=new rn(Rn,"OrientPlus90Upright",26),wp=new rn(Rn,"OrientMinus90Upright",27),T0=new rn(Rn,"OrientUpright45",28),s1=16,a1=14,xp=8;Rn.className="Link",Rn.Normal=dv,Rn.Orthogonal=Dw,Rn.AvoidsNodes=Iw,Rn.AvoidsNodesStraight=o1,Rn.None=Va,Rn.Bezier=Wl,Rn.JumpGap=Bc,Rn.JumpOver=Lg,Rn.End=gp,Rn.Scale=M0,Rn.Stretch=b0,Rn.OrientAlong=pp,Rn.OrientPlus90=mp,Rn.OrientMinus90=vp,Rn.OrientOpposite=fv,Rn.OrientUpright=k0,Rn.OrientPlus90Upright=yp,Rn.OrientMinus90Upright=wp,Rn.OrientUpright45=T0,Rn.EndSegmentStep=8,Rn.CurvinessStart=s1,Rn.SpacingMin=a1,Rn.OrthoShortCut=xp;function N0(a,y,x,E){An(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=E,this.links=[]}N0.prototype.Sl=function(){if(!this.qq){var a=this.links;0<a.length&&(a=a[0].diagram,a!==null&&(a.ow.add(this),this.Fe=a.undoManager.isUndoingRedoing))}this.qq=!0},N0.prototype.Nv=function(){if(this.qq){this.qq=!1;var a=this.links;if(0<a.length){var y=a[0],x=y.diagram;x=x===null||x.pi&&!this.Fe,this.Fe=!1,y.arrangeBundledLinks(a,x),a.length===1&&(y.Sf=null,a.length=0)}a.length===0&&(a=this.Ds,this!==null&&a.af!==null&&a.af.remove(this),a=this.cv,this!==null&&a.af!==null&&a.af.remove(this))}},N0.className="LinkBundle";function Sp(a){An(this),this.Yx=this.group=null,this.vs=!0,this.abort=!1,this.Od=this.Nd=1,this.Fn=this.En=-1,this.rc=a.width,this.sc=a.height,this.ac=null,this.ei=this.di=0,this.Os=11,this.Ix=this.Hx=22}Sp.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,E=a.y+a.height;if(this.Nd=Math.floor((a.x-this.rc)/this.rc)*this.rc,this.Od=Math.floor((y-this.sc)/this.sc)*this.sc,this.En=Math.ceil((x+2*this.rc)/this.rc)*this.rc,this.Fn=Math.ceil((E+2*this.sc)/this.sc)*this.sc,a=1+(Math.ceil((this.En-this.Nd)/this.rc)|0),y=1+(Math.ceil((this.Fn-this.Od)/this.sc)|0),this.ac===null||this.di<a-1||this.ei<y-1){for(x=[],E=0;E<=a;E++)x[E]=new Uint32Array(y);this.ac=x,this.di=a-1,this.ei=y-1}if(a=gv,this.ac!==null)for(y=0;y<=this.di;y++)if(x=this.ac[y],x.fill)x.fill(a);else for(E=0;E<=this.ei;E++)x[E]=a}};function Mg(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function ih(a,y,x){return Mg(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):gv}function l1(a){if(a.ac!==null)for(var y=0;y<=a.di;y++)for(var x=a.ac[y],E=0;E<=a.ei;E++)x[E]>=ef&&(x[E]=gv)}Sp.prototype.Yj=function(a,y,x,E){if(a>this.En||a+x<this.Nd||y>this.Fn||y+E<this.Od)return!0;a=(a-this.Nd)/this.rc|0,y=(y-this.Od)/this.sc|0,x=Math.max(0,x)/this.rc+1|0;var b=Math.max(0,E)/this.sc+1|0;if(0>a&&(x+=a,a=0),0>y&&(b+=y,y=0),0>x||0>b)return!0;for(E=Math.min(a+x-1,this.di)|0,x=Math.min(y+b-1,this.ei)|0;a<=E;a++){b=this.ac[a];for(var z=y;z<=x;z++)if(b[z]===Cc)return!1}return!0};function rh(a,y,x,E,b,z,tt,rt,ot){if(!(y<z||y>tt||x<rt||x>ot)){var lt=y|0,ut=x|0,ft=a.ac[lt][ut];if(ft>=ef&&ft<bg)for(b?ut+=E:lt+=E,ft+=1;z<=lt&&lt<=tt&&rt<=ut&&ut<=ot&&!(ft>=a.ac[lt][ut]);)a.ac[lt][ut]=ft,ft+=1,b?ut+=E:lt+=E;if(lt=b?ut:lt,b)if(0<E)for(x+=E;x<lt;x+=E)rh(a,y,x,1,!b,z,tt,rt,ot),rh(a,y,x,-1,!b,z,tt,rt,ot);else for(x+=E;x>lt;x+=E)rh(a,y,x,1,!b,z,tt,rt,ot),rh(a,y,x,-1,!b,z,tt,rt,ot);else if(0<E)for(y+=E;y<lt;y+=E)rh(a,y,x,1,!b,z,tt,rt,ot),rh(a,y,x,-1,!b,z,tt,rt,ot);else for(y+=E;y>lt;y+=E)rh(a,y,x,1,!b,z,tt,rt,ot),rh(a,y,x,-1,!b,z,tt,rt,ot)}}function D0(a,y,x,E,b,z,tt,rt,ot){y|=0,x|=0;var lt=Cc,ut=ef;for(a.ac[y][x]=ut;lt===Cc&&y>z&&y<tt&&x>rt&&x<ot;)ut+=1,a.ac[y][x]=ut,b?x+=E:y+=E,lt=a.ac[y][x]}function I0(a,y,x,E,b,z,tt,rt,ot){y|=0,x|=0;var lt=Cc,ut=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=wn(),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);Mn(x)}}}}function A1(a,y,x,E,b,z,tt){for(var rt=a.ac,ot=y,lt=x;;){if(ot===b&&lt===z)return!0;var ut=ot,ft=lt;if(E===0)if(ut<b)ut++;else break;else if(E===90)if(ft<z)ft++;else break;else if(E===180)if(ut>b)ut--;else break;else if(ft>z)ft--;else break;var yt=rt[ut][ft];if(yt===0||yt===pv)break;ot=ut,lt=ft}for(;;){if(ut=E,ft=ot,yt=lt,E===0?yt<z?(ut=90,yt++):yt>z&&(ut=270,yt--):E===90?ft<b?(ut=0,ft++):ft>b&&(ut=180,ft--):E===180?yt<z?(ut=90,yt++):yt>z&&(ut=270,yt--):ft<b?(ut=0,ft++):ft>b&&(ut=180,ft--),ft=rt[ft][yt],ut!==E&&ft!==0&&ft!==pv){if(tt.push(ot),tt.push(lt),A1(a,ot,lt,ut,b,z,tt))return!0;tt.pop(),tt.pop()}if(rt[ot][lt]=pv,E===0){if(ot===y)return!1;ot--}else if(E===90){if(lt===x)return!1;lt--}else if(E===180){if(ot===y)return!1;ot++}else{if(lt===x)return!1;lt++}}}Ue.Object.defineProperties(Sp.prototype,{bounds:{get:function(){return new He(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(){An(this),this.port=this.node=null,this.pe=[],this.ap=!1}jf.prototype.toString=function(){for(var a=this.pe,y=this.node.toString()+" "+a.length.toString()+":",x=0;x<a.length;x++){var E=a[x];E!==null&&(y+=`
`+E.toString())}return y};function Uw(a,y,x,E){switch(y=y.offsetY,y){case 8:return 90;case 2:return 180;case 1:return 270;case 4:return 0}switch(y){case 9:return 180<x?270:90;case 6:return 90<x&&270>=x?180:0}switch(a=180*Math.atan2(a.height,a.width)/Math.PI,y){case 3:return x>a&&x<=180+a?180:270;case 5:return x>180-a&&x<=360-a?270:0;case 12:return x>a&&x<=180+a?90:0;case 10:return x>180-a&&x<=360-a?180:90;case 7:return 90<x&&x<=180+a?180:x>180+a&&x<=360-a?270:0;case 13:return 180<x&&x<=360-a?270:x>a&&180>=x?90:0;case 14:return x>a&&x<=180-a?90:x>180-a&&270>=x?180:0;case 11:return x>180-a&&x<=180+a?180:x>180+a?270:90}return E&&y!==15&&(x-=15,0>x&&(x+=360)),x>a&&x<180-a?90:x>=180-a&&x<=180+a?180:x>180+a&&x<360-a?270:0}jf.prototype.Sl=function(){this.pe.length=0};function h1(a,y){var x=a.pe;if(x.length===0){t:if(!a.ap){x=a.ap,a.ap=!0;var E=null,b=a.node,z=b instanceof 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,Ut.alloc()),ot=a.port.ga(yo,Ut.alloc());for(b=He.allocAt(rt.x,rt.y,0,0),b.Ye(ot),Ut.free(rt),Ut.free(ot),rt=Ut.allocAt(b.x+b.width/2,b.y+b.height/2),ot=a.port.li(),tt=tt.iterator;tt.next();){var lt=tt.value;if(lt.isVisible()&&lt.fromPort!==lt.toPort){var ut=lt.fromPort===a.port||lt.fromNode!==null&&lt.fromNode.Td(E),ft=lt.computeSpot(ut,a.port);if(ft.$c()&&(ut=ut?lt.toPort:lt.fromPort,ut!==null)){var yt=ut.part;if(yt!==null){var 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(Ut.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=Ut.alloc(),ot=Ut.alloc(),tt=Ut.alloc(),lt=Ut.alloc(),ft.ga(kr,rt),ft.ga(Ts,ot),ft.ga(yo,tt),ft.ga(so,lt),Et=yt=ut=ft=0,E===sv)for(var kt=0;kt<z.length;kt++){var Dt=z[kt];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 zt=kt=0,re=1,le=Dt=0;for(Xt=0;Xt<z.length;Xt++){var fe=z[Xt];if(fe!==null){if(kt!==fe.Nc){switch(kt=fe.Nc,kt){case 8:var me=tt;zt=lt;break;case 2:me=lt,zt=rt;break;case 1:me=rt,zt=ot;break;default:case 4:me=ot,zt=tt}switch(Dt=zt.x-me.x,le=zt.y-me.y,kt){case 8:yt>Math.abs(Dt)?(re=Math.abs(Dt)/yt,yt=Math.abs(Dt)):re=1;break;case 2:Et>Math.abs(le)?(re=Math.abs(le)/Et,Et=Math.abs(le)):re=1;break;case 1:ft>Math.abs(Dt)?(re=Math.abs(Dt)/ft,ft=Math.abs(Dt)):re=1;break;default:case 4:ut>Math.abs(le)?(re=Math.abs(le)/ut,ut=Math.abs(le)):re=1}zt=0}var Ge=fe.Zo;if(E===sv){switch(fe=fe.link.computeThickness(),fe*=re,Ge.set(me),kt){case 8:Ge.x=me.x+Dt/2+yt/2-zt-fe/2;break;case 2:Ge.y=me.y+le/2+Et/2-zt-fe/2;break;case 1:Ge.x=me.x+Dt/2-ft/2+zt+fe/2;break;default:case 4:Ge.y=me.y+le/2-ut/2+zt+fe/2}zt+=fe}else{var Jn=.5;E===B0&&(Jn=(fe.Uo+1)/(fe.Gl+1)),Ge.x=me.x+Dt*Jn,Ge.y=me.y+le*Jn}}}for(Ut.free(rt),Ut.free(ot),Ut.free(tt),Ut.free(lt),me=a.pe,z=0;z<me.length;z++)E=me[z],E!==null&&(E.Ju=a.computeEndSegmentLength(E));a.ap=x,He.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 Ut,this.Gl=this.Uo=0,this.Zo=new Ut,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){An(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new Ut(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=ii(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 Ke?(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 Se;a instanceof Ke?(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 Rn)&&(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 $n?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 Rn?y.add(ot):!rt||!ot.Zc()||ot instanceof $n||(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 He),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},Go.prototype.ex=function(a){var y=new Se;return a instanceof Ke?(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){An(this),this.Sc=a,this.wf=new Se,this.ye=new Se,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 Se,this.ye=new Se,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 $n)return!tt.isLinkLabel;if(tt instanceof Rn){var rt=tt.fromNode;return rt===null||rt.isLinkLabel?!1:(tt=tt.toNode,!(tt===null||tt.isLinkLabel))}return!1}),a=a.iterator;a.next();){var E=a.value;if(E instanceof $n&&(!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 Rn&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)&&this.Lo(E)===null){var z=E.fromNode;b=E.toNode,z!==null&&b!==null&&z!==b&&(z=this.findGroupVertex(z),b=this.findGroupVertex(b),z!==null&&b!==null&&this.Zj(z,b,E))}}},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},Tt=Fo.prototype,Tt.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},Tt.Bl=function(a){if(a===null)return null;var y=this.ki(a);return y===null&&(y=this.createVertex(),y.node=a,this.dh(y)),y},Tt.Iu=function(a){if(a!==null&&c1(this,a)){for(var y=a.tg,x=y.count-1;0<=x;x--){var E=y.M(x);this.Mj(E)}for(y=a.mg,a=y.count-1;0<=a;a--)x=y.M(a),this.Mj(x)}};function c1(a,y){if(y===null)return!1;var x=a.wf.remove(y);return x&&(y=y.node,y!==null&&a.Es.remove(y)),x}Tt.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},Tt.ki=function(a){return a===null?null:this.Es.I(a)},Tt.Bo=function(a){if(a!==null){vv(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function vv(a,y){if(y!==null){a.ye.add(y);var x=y.link;x!==null&&a.Lo(x)===null&&a.zs.add(x,y),y.network=a}}Tt.Dy=function(a){if(a===null)return null;var y=a.fromNode,x=a.toNode,E=this.Lo(a);return E===null?(E=this.createEdge(),E.link=a,y!==null&&(E.fromVertex=this.Bl(y)),x!==null&&(E.toVertex=this.Bl(x)),this.Bo(E)):(y!==null?E.fromVertex=this.Bl(y):E.fromVertex=null,x!==null?E.toVertex=this.Bl(x):E.toVertex=null),E},Tt.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),yv(this,a)}};function yv(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}Tt.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},Tt.Lo=function(a){return a===null?null:this.zs.I(a)},Tt.Zj=function(a,y,x){if(a===null||y===null)return null;if(a.network===this&&y.network===this){var E=this.createEdge();return E.link=x,E.fromVertex=a,E.toVertex=y,this.Bo(E),E}return null},Tt.gm=function(a){if(a!==null){var y=a.fromVertex,x=a.toVertex;y!==null&&x!==null&&(y.Jl(a),x.Kl(a),a.gm(),y.Cl(a),x.zl(a))}},Tt.Ko=function(){for(var a=wn(),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]);Mn(a)},Fo.prototype.deleteArtificialVertexes=function(){for(var a=wn(),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=wn(),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]);Mn(a),Mn(y)};function Qw(a){for(var y=wn(),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]);Mn(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 Se,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){An(this),this.ob=a,this.j=new He(0,0,10,10).freeze(),this.o=new Ut(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#"+Vn(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;ln(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=He.alloc(),a.Va();var E=this.network.layout.ni(a,x),b=a.locationObject.ga(Pr);if(E.w()&&b.w()){a.moveTo(y.x+this.focusX-(b.x-E.x),y.y+this.focusY-(b.y-E.y)),He.free(x);return}He.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=He.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),He.free(x),!(a instanceof hr)&&(a=a.locationObject.ga(Pr),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 Se,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new Se,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new Se,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){An(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#"+Vn(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)}Re(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=He.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 kt=Et=this.arrangementOrigin.x,Dt=this.arrangementOrigin.y,Xt=0,zt=0,re=0;re<b.length;re++){var le=b[re],fe=this.ni(le,lt),me=Math.ceil((fe.width+rt)/ut)*ut,Ge=Math.ceil((fe.height+ot)/ft)*ft;switch(yt){case tA:var Jn=Math.abs(kt-fe.width);break;default:Jn=kt+fe.width}switch((0<z&&Xt>z-1||0<tt&&0<Xt&&Jn-Et>tt)&&(E.push(new He(0,Dt,tt+rt,zt)),Xt=0,kt=Et,Dt+=zt,zt=0),zt=Math.max(zt,Ge),yt){case tA:fe=-fe.width;break;default:fe=0}switch(le.moveTo(kt+fe,Dt),yt){case tA:kt-=me;break;default:kt+=me}Xt++}E.push(new He(0,Dt,tt+rt,zt)),He.free(lt);break;case Cp:for(ot=tt,ut=z,ft=y,yt=x,tt=He.alloc(),Et=Math.max(this.cellSize.width,1),z=Dt=lt=0,rt=Ut.alloc(),kt=0;kt<b.length;kt++)zt=b[kt],Xt=this.ni(zt,tt),zt=wc(zt,zt.locationObject,zt.locationSpot,rt),lt=Math.max(lt,zt.x),Dt=Math.max(Dt,Xt.width-zt.x),z=Math.max(z,zt.y);switch(kt=this.arrangement,kt){case tA:lt+=ft;break;default:Dt+=ft}Et=isFinite(Et)?Math.max(Et+ft,1):Math.max(lt+Dt,1);var yi=zt=this.arrangementOrigin.x;for(re=this.arrangementOrigin.y,Dt=0,ot>=lt&&(ot-=lt),lt=le=0,me=Math.max(this.cellSize.height,1),fe=z=0,Ge=!0,Xt=Ut.alloc(),Jn=0;Jn<b.length;Jn++){var di=b[Jn],Hn=this.ni(di,tt),vn=wc(di,di.locationObject,di.locationSpot,rt);if(0<Dt)switch(kt){case tA:yi=(yi-zt-(Hn.width-vn.x))/Et,yi=we.$(Math.round(yi),yi)?Math.round(yi):Math.floor(yi),yi=yi*Et+zt;break;default:yi=(yi-zt+vn.x)/Et,yi=we.$(Math.round(yi),yi)?Math.round(yi):Math.ceil(yi),yi=yi*Et+zt}else switch(kt){case tA:le=yi+vn.x+Hn.width;break;default:le=yi-vn.x}switch(kt){case tA:var ur=-(yi+vn.x)+le;break;default:ur=yi+Hn.width-vn.x-le}if(0<ut&&Dt>ut-1||0<ot&&0<Dt&&ur>ot){for(E.push(new He(0,Ge?re-z:re,ot+ft,fe+z+yt)),yi=0;yi<Dt&&Jn!==Dt;yi++){ur=b[Jn-Dt+yi];var tr=wc(ur,ur.locationObject,ur.locationSpot,Xt);ur.moveTo(ur.position.x,ur.position.y+z-tr.y)}fe+=yt,re=Ge?re+fe:re+(fe+z),Dt=fe=z=0,yi=zt,Ge=!1}switch(yi===zt&&(lt=kt===tA?Math.max(lt,Hn.width-vn.x):Math.min(lt,-vn.x)),z=Math.max(z,vn.y),fe=Math.max(fe,Hn.height-vn.y),isFinite(me)&&(fe=Math.max(fe,Math.max(Hn.height,me)-vn.y)),Ge?di.moveTo(yi-vn.x,re-vn.y):di.moveTo(yi-vn.x,re),kt){case tA:yi-=vn.x+ft;break;default:yi+=Hn.width-vn.x+ft}Dt++}if(E.push(new He(0,re,ot+ft,(Ge?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(Ut.free(rt),Ut.free(Xt),kt===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);He.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 Ut(b+y/2-(z+b),tt-x/2)):this.commitLayers(E,new Ut(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 rn(sa,"Position",0),Cp=new rn(sa,"Location",1),Q0=new rn(sa,"LeftToRight",2),tA=new rn(sa,"RightToLeft",3),Sv=new rn(sa,"Forward",4),O0=new rn(sa,"Reverse",5),Pp=new rn(sa,"Ascending",6),H0=new rn(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 Ao(){this.On=new Se,this.Dn=new Se,this.Pa=new Se,this.cf=new Qe,this.bf=new Qe,this.aj=new Qe,this.H=null,this.tp=!1}Tt=Ao.prototype,Tt.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},Tt.Xe=function(a){this.H=a},Tt.oi=function(a){if(a instanceof $n){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 Rn?this.Dn.add(a):a instanceof Vr||this.Pa.add(a);y=a.data,y===null||a instanceof Vr||(a instanceof Rn?this.bf.add(y,a):this.cf.add(y,a))},Tt.pc=function(a){if(a.Ej(),a instanceof $n){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 Rn?this.Dn.remove(a):a instanceof Vr||this.Pa.remove(a);y=a.data,y===null||a instanceof Vr||(a instanceof Rn?this.bf.remove(y):this.cf.remove(y))},Tt.Wd=function(){var a=this.H;if(a!==null){for(var y=a.nodeTemplateMap.iterator;y.next();){var x=y.value,E=y.key;(!x.Zc()||x instanceof 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 Rn||he('Invalid link template in Diagram.linkTemplateMap: template for "'+E+'" must be a Link, not a normal Node or simple Part: '+x);for(y=wn(),x=a.selection.iterator;x.next();)(E=x.value.data)&&y.push(E);for(x=wn(),a=a.highlighteds.iterator;a.next();)(E=a.value.data)&&x.push(E);for(a=wn(),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]);Mn(y),Mn(x),Mn(a)}},Ao.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},Ao.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)}}Ao.prototype.insertLink=function(){return null},Ao.prototype.resolveReferencesForData=function(){},Ao.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,vi('No Group template found for category "'+x+'"'),vi(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(m1||(m1=!0,vi('No Node template found for category "'+x+'"'),vi(" Using default node template")),y=a.ny))),y}Ao.prototype.getLinkCategoryForData=function(){return""},Ao.prototype.setLinkCategoryForData=function(){},Ao.prototype.setFromNodeForLink=function(){},Ao.prototype.setToNodeForLink=function(){},Ao.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,vi('No Link template found for category "'+a+'"'),vi(" Using default link template")),x=y.my)),x},Ao.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},Ao.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},Ao.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Pf(this.diagram,a,!1),this.unresolveReferencesForPart(a))},Ao.prototype.unresolveReferencesForPart=function(){},Ao.prototype.removeDataForLink=function(){},Ao.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},Ao.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof $n?a:null)},Ao.prototype.findLinkForKey=function(){return null},Tt=Ao.prototype,Tt.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},Tt.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof $n?a:null)},Tt.Kc=function(a){return a===null?null:this.bf.I(a)},Tt.ms=function(a){for(var y=0;y<arguments.length;++y);y=new Se;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(ln(tt)&&Bv(this,b,tt)){y.add(E);break}}}return y.iterator},Tt.ls=function(a){for(var y=0;y<arguments.length;++y);y=new Se;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(ln(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(qn(z)){if(!qn(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(ln(y)&&ln(x)){if(!Bv(a,y,x))return!1}else if(y!==x)return!1;return!0}Ao.prototype.doModelChanged=function(a){if(this.H){var y=this.H;if(a.model===y.model){var x=a.change;if(y.doModelChanged(a),y.aa){y.aa=!1;try{var E=a.modelChange;if(E!=="")if(x===No){if(E==="nodeCategory"){var b=this.Lc(a.object),z=a.newValue;b!==null&&typeof z=="string"&&(b.category=z)}else E==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===is){var tt=a.newValue;E==="nodeDataArray"&&ln(tt)&&f1(this,tt),y.isModified=!0}else if(x===cs){var rt=a.oldValue;E==="nodeDataArray"&&ln(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===No){var ot=a.propertyName,lt=a.object;lt===y.model?(ot==="nodeKeyProperty"||ot==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(lt,ot),y.isModified=!0}else if(x===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 kt=Et[a];if(ut)r0(kt,yt,ft,!0);else if(!(0>ft)){var Dt=ft+sp(kt);kt.pc(Dt,!0),Qm(kt,Dt,ft)}}y.isModified=!0}}finally{y.aa=!0}}}}},Ao.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)},Ao.prototype.rp=function(){for(var a=this.H.model,y=new Se,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()},Ao.prototype.refreshDataBoundLinks=function(){},Ao.prototype.updateRelationshipsFromData=function(){},Ao.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=wn()),x.push(tt))}if(x!==null)break}if(x!==null){for(E=0;E<x.length;E++)x[E].La(y);Mn(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function Cv(a,y){var x=y.Hh;if(qn(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(qn(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}}}}Ao.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var E=new Qe;if(qn(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 Se;for(var z=new Qe,tt=E.iterator;tt.next();){var rt=tt.value;if(rt instanceof Rn)a||rt.fromNode!==null&&rt.toNode!==null||b.add(rt);else if(rt instanceof $n&&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 Ui))return null;if(z.isSelected=!1,z.isHighlighted=!1,E.add(y,z),y instanceof $n){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 Rn||tt===null||(tt.containingGroup=z)}else if(y instanceof Rn&&z instanceof Rn)for(tt=y.fromNode,tt!==null&&(tt=E.I(tt),tt!==null&&(z.fromNode=tt)),tt=y.toNode,tt!==null&&(tt=E.I(tt),tt!==null&&(z.toNode=tt)),y=y.labelNodes;y.next();)tt=R0(a,y.value,x,E,b),tt!==null&&tt instanceof $n&&(tt.labeledLink=z);return z}Ao.prototype.copyPartData=function(a,y){var x=null,E=a.data;if(E!==null&&y!==null){var b=y.model;a instanceof Rn||(E=b.copyNodeData(E),ln(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 Rn||(b=y.copyNodeData(E)),ln(b)&&(x.data=b)));return x},Ue.Object.defineProperties(Ao.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}}}),Ao.prototype.updateAllRelationshipsFromData=Ao.prototype.rp,Ao.prototype.findLinksByExample=Ao.prototype.ls,Ao.prototype.findNodesByExample=Ao.prototype.ms,Ao.prototype.findLinkForData=Ao.prototype.Kc,Ao.prototype.findNodeForData=Ao.prototype.ii,Ao.prototype.findPartForData=Ao.prototype.Lc,Ao.prototype.findNodeForKey=Ao.prototype.Vb,Ao.prototype.removeModeledPart=Ao.prototype.ip,Ao.prototype.removeModeledParts=Ao.prototype.Gs,Ao.prototype.rebuildParts=Ao.prototype.Wd;var m1=!1,v1=!1,y1=!1;Ao.className="PartManager";function qs(a){Ao.apply(this,arguments)}Re(qs,Ao),qs.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),w1(this,a.linkDataArray)},qs.prototype.addModeledParts=function(a){for(Ao.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 $n&&(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 $n&&(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=Ao.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(Ao.prototype.doModelChanged.call(this,a),this.diagram){var x=this.diagram;if(a.model===x.model){var E=a.change;if(x.aa){x.aa=!1;try{var b=a.modelChange;if(b!==""){if(E===No){if(b==="linkFromKey"){var z=this.Kc(a.object);if(z!==null){var tt=this.Vb(a.newValue);z.fromNode=tt}}else if(b==="linkToKey"){var rt=this.Kc(a.object);if(rt!==null){var ot=this.Vb(a.newValue);rt.toNode=ot}}else if(b==="linkFromPortId"){var lt=this.Kc(a.object);if(lt!==null){var ut=a.newValue;typeof ut=="string"&&(lt.fromPortId=ut)}}else if(b==="linkToPortId"){var ft=this.Kc(a.object);if(ft!==null){var yt=a.newValue;typeof yt=="string"&&(ft.toPortId=yt)}}else if(b==="nodeGroupKey"){var Et=this.Lc(a.object);if(Et!==null){var kt=a.newValue;if(kt!==void 0){var Dt=this.Vb(kt);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 zt=a.oldValue,re=a.newValue;Array.isArray(zt)&&zt.forEach(function(vn){0<=re.indexOf(vn)||(vn=y.Vb(vn),vn!==null&&(vn.labeledLink=null))}),Array.isArray(re)&&re.forEach(function(vn){vn=y.Vb(vn),vn!==null&&(vn.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 me=a.newValue;if(b==="linkDataArray"&&typeof me=="object"&&me!==null)x1(this,me);else if(b==="linkLabelKeys"&&ud(me)){var Ge=this.Kc(a.object),Jn=this.Vb(me);Ge!==null&&Jn!==null&&(Jn.labeledLink=Ge)}x.isModified=!0}else if(E===cs){var yi=a.oldValue;if(b==="linkDataArray"&&typeof yi=="object"&&yi!==null)this.ip(yi);else if(b==="linkLabelKeys"&&ud(yi)){var di=this.Vb(yi);di!==null&&(di.labeledLink=null)}x.isModified=!0}}else if(E===No){var Hn=a.propertyName;a.object!==x.model||Hn!=="linkFromKeyProperty"&&Hn!=="linkToKeyProperty"&&Hn!=="linkFromPortIdProperty"&&Hn!=="linkToPortIdProperty"&&Hn!=="linkLabelKeysProperty"&&Hn!=="nodeIsGroupProperty"&&Hn!=="nodeGroupKeyProperty"&&Hn!=="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 Se,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 Rn){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 Se().addAll(y);var tt=new Se;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 Vr)&&(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 $n&&(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 $n){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=Ao.prototype.copyPartData.call(this,a,y);if(a instanceof Rn)if(a=a.data,a!==null&&y!==null){var E=y.model;a=E.Jo(a),typeof a=="object"&&a!==null&&(E.fi(a),x=y.Kc(a))}else x!==null&&(y=this.diagram,a!==null&&y!==null&&y.commandHandler!==null&&y.commandHandler.copiesClipboardData&&(y=y.model.Jo(a),typeof y=="object"&&y!==null&&(x.data=y)));return x},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 Rn){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 $n&&(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 $n||(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(){Ao.apply(this,arguments),this.Sg=null}Re(nu,Ao);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(Ao.prototype.doModelChanged.call(this,a),this.diagram){var y=this.diagram;if(a.model===y.model){var x=a.change;if(y.aa){y.aa=!1;try{var E=a.modelChange;if(E!==""){if(x===No){if(E==="nodeParentKey"){var b=a.object,z=this.Vb(a.newValue),tt=this.ii(b);if(this.Sg!==null)z!==null&&(this.Sg.data=b,this.Sg.category=this.getLinkCategoryForData(b));else if(tt!==null){var rt=tt.kh();rt!==null?z===null?y.remove(rt):y.isTreePathToChildren?rt.fromNode=z:rt.toNode=z:_0(this,z,tt)}}else if(E==="parentLinkCategory"){var ot=this.ii(a.object),lt=a.newValue;if(ot!==null&&typeof lt=="string"){var ut=ot.kh();ut!==null&&(ut.category=lt)}}y.isModified=!0}}else if(x===No){var ft=a.propertyName;a.object===y.model&&ft==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},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 $n&&(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){Ao.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 $n&&y.mh(z)===x&&_0(this,b,this.ii(z))}nA(y,x)}a=y.mh(a),a!==void 0&&b instanceof $n&&(a=this.Vb(a),_0(this,a,b))}},nu.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof $n){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 Fi(a,y){this.kl=new Se,this.il=new Se,this.Wv=`,
"insertedNodeKeys": `,this.jy=`,
"modifiedNodeData": `,this.Yv=`,
"removedNodeKeys": `,this.vh=null,An(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new 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&&(qn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Fi.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},Fi.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Fi.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},Fi.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)+":"+_i(b)}}return y},Fi.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},Fi.prototype.Qv=function(a,y){var x=this,E=!1,b=new Se,z=new Se,tt=new Se,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!==No||x.modelData!==ft.object&&ft.propertyName!=="modelData"?ft.object!==null&&(rt&&rt.contains(ft.object)?rt.get(ft.object).each(function(yt){x.lb(yt)&&z.add(yt)}):ft.object instanceof Fi||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},Fi.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=Qi++,E.set(ft,yt),b.set(ft,y))}if(!ln(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 Ut||y instanceof cn||y instanceof He||y instanceof lr||y instanceof _n)ot=y.copy(),tt(y,ot);else{if(y instanceof no||y instanceof Un||y instanceof rn)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 Se)ot=new Se().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}Tt=Fi.prototype,Tt.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},Tt.rm=function(){var a="";return this.name!==""&&(a+=`,
"name": `+this.quote(this.name)),this.dataFormat!==""&&(a+=`,
"dataFormat": `+this.quote(this.dataFormat)),this.isReadOnly&&(a+=`,
"isReadOnly": `+this.isReadOnly),this.nodeKeyProperty!=="key"&&typeof this.nodeKeyProperty=="string"&&(a+=`,
"nodeKeyProperty": `+this.quote(this.nodeKeyProperty)),this.copiesArrays&&(a+=`,
"copiesArrays": true`),this.copiesArrayObjects&&(a+=`,
"copiesArrayObjects": true`),this.copiesKey||(a+=`,
"copiesKey": false`),this.nodeCategoryProperty!=="category"&&typeof this.nodeCategoryProperty=="string"&&(a+=`,
"nodeCategoryProperty": `+this.quote(this.nodeCategoryProperty)),a},Tt.gp=function(a){a.name&&(this.name=a.name),a.dataFormat&&(this.dataFormat=a.dataFormat),a.isReadOnly&&(this.isReadOnly=!0),a.nodeKeyProperty&&(this.nodeKeyProperty=a.nodeKeyProperty),a.copiesArrays&&(this.copiesArrays=!0),a.copiesArrayObjects&&(this.copiesArrayObjects=!0),a.copiesKey===!1&&(this.copiesKey=!1),a.nodeCategoryProperty&&(this.nodeCategoryProperty=a.nodeCategoryProperty)};function B1(a,y){y=y.modelData,ln(y)&&(a.dm(y),a.modelData=y)}Tt.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!F1(x,a[x])){y=!0;break}return a="",y&&(a=`,
"modelData": `+Fv(this,this.modelData)),a+`,
"nodeDataArray": `+ld(this,this.nodeDataArray,!0)},Tt.kv=function(a){B1(this,a),a=a.nodeDataArray,qn(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 Se,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===No?(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 Se,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(ln(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(tt=x[z],tt===y)return b.add(E),!0;if(K0(a,y,tt,E,b))return!0}return!1}Tt.Pv=function(a,y){var x=this,E=!1,b=new Se,z=new Se,tt=new Se,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!==No||x.modelData!==ut.object&&ut.propertyName!=="modelData"?ut.object!==null&&(rt&&rt.contains(ut.object)?rt.get(ut.object).each(function(ft){x.lb(ft)&&z.add(ft)}):ut.object instanceof Fi||x.ri()&&x.Jc(ut.object)||P1(x,ut.object).each(function(ft){z.add(ft)})):E=!0)});var ot=this.il;ot.clear(),b.each(function(ut){ot.add(x.wa(ut)),y||z.add(ut)});var lt=this.kl;return lt.clear(),tt.each(function(ut){lt.add(x.wa(ut)),y&&z.add(ut)}),a="",E&&(a+=`,
"modelData": `+Fv(this,this.modelData)),0<ot.count&&(a+=(y?this.Yv:this.Wv)+ld(this,ot.Fa(),!0)),0<z.count&&(a+=this.jy+ld(this,z.Fa(),!0)),0<lt.count&&(a+=(y?this.Wv:this.Yv)+ld(this,lt.Fa(),!0)),lt.clear(),ot.clear(),a},Tt.fp=function(a){(a.name!==void 0&&a.name!==this.name||a.dataFormat!==void 0&&a.dataFormat!==this.dataFormat||a.isReadOnly!==void 0&&a.isReadOnly!==this.isReadOnly||a.nodeKeyProperty!==void 0&&a.nodeKeyProperty!==this.nodeKeyProperty||a.copiesArrays!==void 0&&a.copiesArrays!==this.copiesArrays||a.copiesArrayObjects!==void 0&&a.copiesArrayObjects!==this.copiesArrayObjects||a.copiesKey!==void 0&&a.copiesKey!==this.copiesKey||a.nodeCategoryProperty!==void 0&&a.nodeCategoryProperty!==this.nodeCategoryProperty)&&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)},Tt.$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 }'},Tt.yA=function(a,y){return this.$x(a,y)},Tt.np=function(a){return a===void 0&&(a=Ep(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},Tt.toJSON=function(a){return this.np(a)},Tt.Zw=function(a){var y=null;if(typeof a=="string")try{y=Dn.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"))},Tt.Ky=function(a){return this.Zw(a)},Fi.constructGraphLinksModel=function(){return new Fi},Tt=Fi.prototype,Tt.dm=function(a){if(qn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];if(ln(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(ln(a)){for(y in a)if(x=a[y],ln(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 Ut(x[2*E],x[2*E+1]));b.freeze(),a[y]=b}}return Ow(a)}return a},Tt.sm=function(a){return a===void 0?"undefined":a===null?"null":a===!0?"true":a===!1?"false":typeof a=="string"?this.quote(a):typeof a=="number"?a===1/0?"9e9999":a===-1/0?"-9e9999":isNaN(a)?'{"class":"NaN"}':a.toString():a instanceof Date?'{"class":"Date", "value":"'+a.toJSON()+'"}':a instanceof Number?this.sm(a.valueOf()):qn(a)?ld(this,a):ln(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 Ci;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 Ut)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 He)y={class:"go.Rect",x:Wa(x.x),y:Wa(x.y),width:Wa(x.width),height:Wa(x.height)};else if(x instanceof lr)y={class:"go.Margin",top:Wa(x.top),right:Wa(x.right),bottom:Wa(x.bottom),left:Wa(x.left)};else if(x instanceof _n)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===Br)&&(y.start=x.start,y.end=x.end,x.type===Br&&(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 Un?(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===Un.o&&(y.path=Un.ia(x))):x instanceof rn&&(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 Ut(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 He(Za(a.x),Za(a.y),Za(a.width),Za(a.height));else if(y==="Margin")x=new lr(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 _n(Za(a.x),Za(a.y),Za(a.offsetX),Za(a.offsetY));else if(y==="Brush"){if(x=new no,x.type=oi(no,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof _n&&(x.start=a.start),a.end instanceof _n&&(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,ln(a))for(var E in a)x.addColorStop(parseFloat(E),a[E])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=Un.parse(a.path):x=new Un,x.type=oi(Un,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 _n&&(x.spot1=a.spot1),a.spot2 instanceof _n&&(x.spot2=a.spot2)):y==="EnumValue"&&(E=a.classType,E.indexOf("go.")===0&&(E=E.substr(3)),E=Lv(E),typeof E=="function"&&(x=oi(E,a.name)));return x}Tt.Pe=function(a){return this.Lt.add(a),this},Tt.ik=function(a){this.Lt.remove(a)},Tt.ds=function(a){this.skipsUndoManager||this.undoManager.Tu(a);for(var y=this.Lt,x=y.length,E=0;E<x;E++)y.M(E)(a)},Tt.cb=function(a,y,x,E,b,z,tt){Ds(this,"",a,y,x,E,b,z,tt)},Tt.g=function(a,y,x,E,b){Ds(this,"",No,a,this,y,x,E,b)},Tt.Fs=function(a,y,x,E,b,z){Ds(this,"",No,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)}Fi.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===No){var x=a.object,E=a.propertyName,b=a.I(y);E===this.nodeKeyProperty&&this.lb(x)&&(y=a.I(!y),y!==void 0&&this.kb.remove(y),b!==void 0&&this.kb.add(b,x)),Ro(x,E,b)}else a.change===is?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,ln(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]===a&&sn(this.Tc,x),E!==void 0&&this.kb.remove(E)):(this.Tc[x]!==a&&Xe(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)))):a.modelChange===""?((E=a.object)&&!qn(E)&&a.propertyName&&(E=vs(a.object,a.propertyName)),qn(E)&&typeof x=="number"&&(a=a.newValue,y?sn(E,x):Xe(E,x,a))):he("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===cs?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,ln(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]!==a&&Xe(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)):(this.Tc[x]===a&&sn(this.Tc,x),E!==void 0&&this.kb.remove(E)))):a.modelChange===""?((E=a.object)&&!qn(E)&&a.propertyName&&(E=vs(a.object,a.propertyName)),qn(E)&&typeof x=="number"&&(a=a.oldValue,y?Xe(E,x,a):sn(E,x))):he("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==ea&&he("unknown ChangedEvent: "+a.toString())},Fi.prototype.Ea=function(a){return this.undoManager.Ea(a)},Fi.prototype.eb=function(a){return this.undoManager.eb(a)},Fi.prototype.Kf=function(){return this.undoManager.Kf()},Fi.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Tt=Fi.prototype,Tt.La=function(a,y){y===void 0&&(y=""),Ds(this,"SourceChanged",ea,y,a,null,null)},Tt.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)}}},Tt.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",No,x,a,E,y),typeof x=="string"&&this.La(a,x),this.jp(E,y))}else Ro(a,x,y)}};function ud(a){return typeof a=="number"||typeof a=="string"}Tt.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},Tt.hc=function(a){return a===null&&he("Model.findNodeDataForKey:key must not be null"),a!==void 0&&ud(a)?this.kb.I(a):null},Tt.$u=function(a){if(a!==null){var y=this.Th;if(y!==""){var x=this.wa(a);if(x===void 0||this.kb.contains(x)){var E=this.bl;if(E!==null&&(x=E(this,a),x!=null&&!this.kb.contains(x))){Ro(a,y,x);return}if(typeof x=="string"){for(E=2;this.kb.contains(x+E);)E++;Ro(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;Ro(a,y,x)}}}}},Tt.xf=function(a){a!==null&&(Nn(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,Xe(a.Tc,E,y)),Ds(a,"nodeDataArray",is,"nodeDataArray",a,null,y,null,E),a.fm(y),a.em(y))}Tt.Fy=function(a){if(qn(a))for(var y=a.length,x=0;x<y;x++)this.xf(a[x]);else for(a=a.iterator;a.next();)this.xf(a.value)},Tt.cm=function(a){a!==null&&L1(this,a,!0)};function L1(a,y,x){var E=a.wa(y);if(E!==void 0&&a.kb.remove(E),E=null,x){t:if(x=a.Tc,Array.isArray(x))E=x.indexOf(y);else{E=x.length;for(var b=0;b<E;b++)if(x[b]===y){E=b;break t}E=-1}if(0>E)return;sn(a.Tc,E)}Ds(a,"nodeDataArray",cs,"nodeDataArray",a,y,null,E,null),a.qp(y)}Tt.nA=function(a){if(qn(a))for(var y=a.length,x=0;x<y;x++)this.cm(a[x]);else for(a=a.iterator;a.next();)this.cm(a.value)},Tt.$z=function(a){if(a!==this.nodeDataArray&&qn(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var E=a.length,b=0;b<E;b++){var z=a[b],tt=this.wa(z);if(tt!==void 0){x.add(tt);var rt=this.hc(tt);rt!==z&&(rt!==null?(this.Do(rt,z),this.lm(z,rt)):(z=this.cloneDeep(z),this.km(z,tt),this.xf(z)))}else tt=this.cloneDeep(z),this.xf(tt),x.add(this.wa(tt))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.hc(E))&&this.cm(E);y.clear(),x.clear()}},Tt.jp=function(a,y){y!==void 0&&(a=Fp(this,a),a instanceof Se&&this.Vf.add(y,a))},Tt.Lv=function(){},Tt.fm=function(){},Tt.em=function(){},Tt.qp=function(){};function eA(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E===null&&(E=new Se,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 Se&&(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 Se?a:null)}Tt.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},Fi.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):G0(this,a,!0),ln(a)&&An(a),a};function G0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var E=[];for(x=0;x<y.length;x++){var b=G0(a,y[x],a.copiesArrayObjects);E.push(b)}return An(E),E}if(x&&ln(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 Fi||z instanceof _o||z instanceof Ms||z instanceof Uo||(z=G0(a,z,!1)),Ro(x,E,z)}return An(x),x}return y instanceof Ut||y instanceof cn||y instanceof He||y instanceof _n||y instanceof lr?y.copy():y}Fi.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 ve&&(M1=!0,vi('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),vi(" Is that really your intent?"));var E=vs(a,y);E!==x&&(Ro(a,y,x),this.Fs(a,y,E,x))},Tt=Fi.prototype,Tt.set=function(a,y,x){this.setDataProperty(a,y,x)},Tt.Do=function(a,y){if(y){var x=this.lb(a),E;for(E in y)E==="__gohashid"||x&&E===this.nodeKeyProperty||this.setDataProperty(a,E,y[E])}},Tt.Ay=function(a,y){this.ts(a,-1,y)},Tt.ts=function(a,y,x){0>y&&(y=a.length),Xe(a,y,x),Ds(this,"",is,"",a,null,x,null,y)},Tt.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];sn(a,y),Ds(this,"",cs,"",a,x,null,y,null)},Tt.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)},Tt.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",No,x,a,E,y))}else Ro(a,x,y)}},Tt.lm=function(a,y){this.jm(y,this.Ro(a))},Tt.Tl=function(){return!1},Tt.Wj=function(){return!1},Tt.ri=function(){return!1},Tt.xs=function(){return!1},Tt.Xj=function(){return!1};function Ev(){return new Fi}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]:Dn.go!==void 0&&Dn.go[a]?Dn.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(Fi.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];ln(b)||he("Model.nodeDataArray must only contain Objects, not: "+b),Nn(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",No,"nodeDataArray",this,y,a),y=0;y<x;y++)E=a[y],this.fm(E),this.em(E);Array.isArray(a)||(this.isReadOnly=!0)}}},copyNodeDataFunction:{get:function(){return this.Bk},set:function(a){var y=this.Bk;y!==a&&(this.Bk=a,this.g("copyNodeDataFunction",y,a))}},copiesArrays:{get:function(){return this.Km},set:function(a){var y=this.Km;y!==a&&(this.Km=a,this.g("copiesArrays",y,a))}},copiesArrayObjects:{get:function(){return this.Jm},set:function(a){var y=this.Jm;y!==a&&(this.Jm=a,this.g("copiesArrayObjects",y,a))}},copiesKey:{get:function(){return this.Mm},set:function(a){var y=this.Mm;y!==a&&(this.Mm=a,this.g("copiesKey",y,a))}},afterCopyFunction:{get:function(){return this.xm},set:function(a){var y=this.xm;y!==a&&(this.xm=a,this.g("afterCopyFunction",y,a))}},nodeCategoryProperty:{get:function(){return this.lj},set:function(a){var y=this.lj;y!==a&&(this.lj=a,this.g("nodeCategoryProperty",y,a))}},type:{get:function(){return"Model"}}}),Fi.prototype.setCategoryForNodeData=Fi.prototype.jm,Fi.prototype.getCategoryForNodeData=Fi.prototype.Ro,Fi.prototype.removeArrayItem=Fi.prototype.ov,Fi.prototype.insertArrayItem=Fi.prototype.ts,Fi.prototype.addArrayItem=Fi.prototype.Ay,Fi.prototype.assignAllDataProperties=Fi.prototype.Do,Fi.prototype.set=Fi.prototype.set,Fi.prototype.clearUnresolvedReferences=Fi.prototype.Qy,Fi.prototype.mergeNodeDataArray=Fi.prototype.$z,Fi.prototype.removeNodeDataCollection=Fi.prototype.nA,Fi.prototype.removeNodeData=Fi.prototype.cm,Fi.prototype.addNodeDataCollection=Fi.prototype.Fy,Fi.prototype.addNodeData=Fi.prototype.xf,Fi.prototype.makeNodeDataKeyUnique=Fi.prototype.$u,Fi.prototype.findNodeDataForKey=Fi.prototype.hc,Fi.prototype.containsNodeData=Fi.prototype.lb,Fi.prototype.setKeyForNodeData=Fi.prototype.km,Fi.prototype.getKeyForNodeData=Fi.prototype.wa,Fi.prototype.updateTargetBindings=Fi.prototype.La,Fi.prototype.commit=Fi.prototype.commit,Fi.prototype.rollbackTransaction=Fi.prototype.Kf,Fi.prototype.commitTransaction=Fi.prototype.eb,Fi.prototype.startTransaction=Fi.prototype.Ea,Fi.prototype.raiseDataChanged=Fi.prototype.Fs,Fi.prototype.raiseChanged=Fi.prototype.g,Fi.prototype.raiseChangedEvent=Fi.prototype.cb,Fi.prototype.removeChangedListener=Fi.prototype.ik,Fi.prototype.addChangedListener=Fi.prototype.Pe,Fi.prototype.writeJsonValue=Fi.prototype.sm,Fi.prototype.replaceJsonObjects=Fi.prototype.dm,Fi.prototype.applyIncrementalJSON=Fi.prototype.Ky,Fi.prototype.applyIncrementalJson=Fi.prototype.Zw,Fi.prototype.toJSON=Fi.prototype.toJSON,Fi.prototype.toJson=Fi.prototype.np,Fi.prototype.toIncrementalJSON=Fi.prototype.yA,Fi.prototype.toIncrementalJson=Fi.prototype.$x,Fi.prototype.toIncrementalData=Fi.prototype.xA,Fi.prototype.clear=Fi.prototype.clear;var M1=!1,Uu={};Fi.className="Model",Fi.fromJSON=Fi.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=Dn.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=Dn[E])),typeof b=="function"&&(a=new b)}catch(z){}a===null||a instanceof Fi?y=a:he("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=Fi.constructGraphLinksModel()),y.gp(x),y.kv(x),y},Fi.safePropertyValue=vs,Fi.safePropertySet=Ro,Uu.Brush=no,Uu.ChangedEvent=Uo,Uu.Geometry=Un,Uu.Margin=lr,Uu.Panel=Fn,Uu.Point=Ut,Uu.Rect=He,Uu.Size=cn,Uu.Spot=_n,Uu.Transaction=Ms,Uu.UndoManager=_o;function Fs(a,y,x,E){An(this),this._isFrozen=!1,a===void 0&&(a=""),y===void 0&&(y=a),x===void 0&&(x=null),this.j=-1,this.xd=null,this.xl=a,this.wl=this.to=0,this.Cr=null,this.wn=!1,this.sl=y,this.Im=x,E===void 0?(this.el=k1,this.wk=null):(this.el=Lp,this.wk=E),this.st=new Se}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},Tt=Fs.prototype,Tt.qb=function(a){a.classType===Fs&&(this.mode=a)},Tt.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},Tt.freeze=function(){return this._isFrozen=!0,this},Tt.ka=function(){return this._isFrozen=!1,this},Tt.Kx=function(a){return a===void 0&&(a=null),this.mode=Lp,this.backConverter=a,this},Tt.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},Tt.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function b1(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}Tt.Mv=function(a,y,x){var E=this.sl;if(x===void 0||E===""||E===x){x=this.xl;var b=this.Im;if(b===null&&x==="")vi("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){}}}},Tt.sp=function(a,y,x,E){if(this.el===Lp){var b=this.xl;if(x===void 0||b===x){x=this.sl;var z=this.wk,tt=a;if(b!==""&&(tt=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,kt=E.panel.itemArray;ot.ov(kt,Et),ot.ts(kt,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&&an(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&an(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&an(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&an(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&an(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&an(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&an(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&an(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 rn(Fs,"OneWay",1),Lp=new rn(Fs,"TwoWay",2);Fs.className="Binding",Fs.parseEnum=function(a,y){return function(x){return x=oi(a,x),x===null?y:x}},Fs.toString=_i,Fs.OneWay=k1,Fs.TwoWay=Lp;function Rr(a,y,x){Fi.call(this),this.Vv=`,
"insertedLinkKeys": `,this.iy=`,
"modifiedLinkData": `,this.Xv=`,
"removedLinkKeys": `,this.md=[],this.$f=new Se,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&&(qn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Re(Rr,Fi),Rr.constructGraphLinksModel=Fi.constructGraphLinksModel,Rr.prototype.cloneProtected=function(a){Fi.prototype.cloneProtected.call(this,a),a.Jh=this.Jh,a.cl=this.cl,a.Ak=this.Ak,a.lf=this.lf,a.mf=this.mf,a.ej=this.ej,a.fj=this.fj,a.dj=this.dj,a.je=this.je,a.jl=this.jl,a.Je=this.Je,a.Lm=this.Lm},Tt=Rr.prototype,Tt.clear=function(){Fi.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},Tt.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" GraphLinksModel";if(0<a){y+=`
node data:`,a=this.nodeDataArray;var x=a.length,E;for(E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+_i(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},Tt.Qv=function(a,y){this.linkKeyProperty===""&&he("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=Fi.prototype.Qv.call(this,a,y),E=this,b=new Se,z=new Se,tt=new Se,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 Fi||E.lb(ut.object)||T1(E,ut.object).each(function(ft){z.add(ft)})))});var ot=this.il;ot.clear(),b.each(function(ut){ot.add(E.Ac(ut)),y||z.add(ut)});var lt=this.kl;return lt.clear(),tt.each(function(ut){lt.add(E.Ac(ut)),y&&z.add(ut)}),a=E.cloneDeep(z.Fa()),0<ot.count&&(x===null&&(x={}),y?x.removedLinkKeys=ot.Fa():x.insertedLinkKeys=ot.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<lt.count&&(x===null&&(x={}),y?x.insertedLinkKeys=lt.Fa():x.removedLinkKeys=lt.Fa()),lt.clear(),ot.clear(),x},Tt.rm=function(){var a=Fi.prototype.rm.call(this),y="";return this.linkCategoryProperty!=="category"&&typeof this.linkCategoryProperty=="string"&&(y+=`,
"linkCategoryProperty": `+this.quote(this.linkCategoryProperty)),this.linkKeyProperty!==""&&typeof this.linkKeyProperty=="string"&&(y+=`,
"linkKeyProperty": `+this.quote(this.linkKeyProperty)),this.linkFromKeyProperty!=="from"&&typeof this.linkFromKeyProperty=="string"&&(y+=`,
"linkFromKeyProperty": `+this.quote(this.linkFromKeyProperty)),this.linkToKeyProperty!=="to"&&typeof this.linkToKeyProperty=="string"&&(y+=`,
"linkToKeyProperty": `+this.quote(this.linkToKeyProperty)),this.linkFromPortIdProperty!==""&&typeof this.linkFromPortIdProperty=="string"&&(y+=`,
"linkFromPortIdProperty": `+this.quote(this.linkFromPortIdProperty)),this.linkToPortIdProperty!==""&&typeof this.linkToPortIdProperty=="string"&&(y+=`,
"linkToPortIdProperty": `+this.quote(this.linkToPortIdProperty)),this.linkLabelKeysProperty!==""&&typeof this.linkLabelKeysProperty=="string"&&(y+=`,
"linkLabelKeysProperty": `+this.quote(this.linkLabelKeysProperty)),this.nodeIsGroupProperty!=="isGroup"&&typeof this.nodeIsGroupProperty=="string"&&(y+=`,
"nodeIsGroupProperty": `+this.quote(this.nodeIsGroupProperty)),this.nodeGroupKeyProperty!=="group"&&typeof this.nodeGroupKeyProperty=="string"&&(y+=`,
"nodeGroupKeyProperty": `+this.quote(this.nodeGroupKeyProperty)),a+y},Tt.gp=function(a){Fi.prototype.gp.call(this,a),a.linkKeyProperty&&(this.linkKeyProperty=a.linkKeyProperty),a.linkFromKeyProperty&&(this.linkFromKeyProperty=a.linkFromKeyProperty),a.linkToKeyProperty&&(this.linkToKeyProperty=a.linkToKeyProperty),a.linkFromPortIdProperty&&(this.linkFromPortIdProperty=a.linkFromPortIdProperty),a.linkToPortIdProperty&&(this.linkToPortIdProperty=a.linkToPortIdProperty),a.linkCategoryProperty&&(this.linkCategoryProperty=a.linkCategoryProperty),a.linkLabelKeysProperty&&(this.linkLabelKeysProperty=a.linkLabelKeysProperty),a.nodeIsGroupProperty&&(this.nodeIsGroupProperty=a.nodeIsGroupProperty),a.nodeGroupKeyProperty&&(this.nodeGroupKeyProperty=a.nodeGroupKeyProperty)},Tt.Rv=function(){var a=Fi.prototype.Rv.call(this),y=`,
"linkDataArray": `+ld(this,this.linkDataArray,!0);return a+y},Tt.kv=function(a){Fi.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 Se,E=0;E<a.linkDataArray.length;E++){var b=a.linkDataArray[E];K0(a,y,b,b,x)}return x}Tt.Pv=function(a,y){this.linkKeyProperty===""&&he("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=Fi.prototype.Pv.call(this,a,y),E=this,b=new Se,z=new Se,tt=new Se,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 Fi||E.lb(ut.object)||T1(E,ut.object).each(function(ft){z.add(ft)})))});var ot=this.il;ot.clear(),b.each(function(ut){ot.add(E.Ac(ut)),y||z.add(ut)});var lt=this.kl;return lt.clear(),tt.each(function(ut){lt.add(E.Ac(ut)),y&&z.add(ut)}),a=x,0<ot.count&&(a+=(y?this.Xv:this.Vv)+ld(this,ot.Fa(),!0)),0<z.count&&(a+=this.iy+ld(this,z.Fa(),!0)),0<lt.count&&(a+=(y?this.Vv:this.Xv)+ld(this,lt.Fa(),!0)),lt.clear(),ot.clear(),a},Tt.fp=function(a){(a.linkCategoryProperty!==void 0&&a.linkCategoryProperty!==this.linkCategoryProperty||a.linkKeyProperty!==void 0&&a.linkKeyProperty!==this.linkKeyProperty||a.linkFromKeyProperty!==void 0&&a.linkFromKeyProperty!==this.linkFromKeyProperty||a.linkToKeyProperty!==void 0&&a.linkToKeyProperty!==this.linkToKeyProperty||a.linkFromPortIdProperty!==void 0&&a.linkFromPortIdProperty!==this.linkFromPortIdProperty||a.linkToPortIdProperty!==void 0&&a.linkToPortIdProperty!==this.linkToPortIdProperty||a.linkLabelKeysProperty!==void 0&&a.linkLabelKeysProperty!==this.linkLabelKeysProperty||a.nodeIsGroupProperty!==void 0&&a.nodeIsGroupProperty!==this.nodeIsGroupProperty||a.nodeGroupKeyProperty!==void 0&&a.nodeGroupKeyProperty!==this.nodeGroupKeyProperty)&&he("applyIncrementalJson cannot change Model properties"),Fi.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)},Rr.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===No){var x=a.object,E=a.propertyName;if(E===this.linkKeyProperty&&this.Jc(x)){var b=a.I(y);y=a.I(!y),y!==void 0&&this.wb.remove(y),b!==void 0&&this.wb.add(b,x),Ro(x,E,b);return}}else if(a.change===is){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,ln(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,ln(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}}Fi.prototype.changeState.call(this,a,y)}},Tt=Rr.prototype,Tt.Vl=function(a){if(a!==void 0){var y=this.Ri;if(y!==null){var x=this.hc(a);x===null&&(x=this.copyNodeData(y),Ro(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Tt.yx=function(a){return Zl(this,a,!0)},Tt.wv=function(a,y){Tg(this,a,y,!0)},Tt.Bx=function(a){return Zl(this,a,!1)},Tt.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",No,b,y,z,x),typeof b=="string"&&a.La(y,b))}else Ro(y,b,x)}}Tt.zx=function(a){return z0(this,a,!0)},Tt.xv=function(a,y){Ng(this,a,y,!0)},Tt.Cx=function(a){return z0(this,a,!1)},Tt.Cv=function(a,y){Ng(this,a,y,!1)};function z0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=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",No,b,y,z,x),typeof b=="string"&&a.La(y,b))}else Ro(y,b,x)}}Tt.Ef=function(a){if(a===null)return j0;var y=this.je;return y===""?j0:(a=vs(a,y),a===void 0?j0:a)},Tt.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var E=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",No,x,a,E,y),typeof x=="string"&&this.La(a,x)}}else Ro(a,x,y)}},Tt.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=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)}}},Tt.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)}}},Tt.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)}}},Tt.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",No,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Ro(a,x,y)}},Tt.jh=function(a){return a===null&&he("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&ud(a)?this.wb.I(a):null},Tt.Bs=function(a){if(a!==null){var y=this.Jh;if(y!==""){var x=this.Ac(a);if(x===void 0||this.wb.contains(x)){var E=this.cl;if(E!==null&&(x=E(this,a),x!=null&&!this.wb.contains(x))){Ro(a,y,x);return}if(typeof x=="string"){for(E=2;this.wb.contains(x+E);)E++;Ro(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;Ro(a,y,x)}}}}},Tt.Jc=function(a){return a===null?!1:this.$f.contains(a)},Tt.fi=function(a){a!==null&&(Nn(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)}Tt.Ey=function(a){if(Array.isArray(a))for(var y=a.length,x=0;x<y;x++)this.fi(a[x]);else for(a=a.iterator;a.next();)this.fi(a.value)},Tt.bm=function(a){a!==null&&D1(this,a,!0)};function D1(a,y,x){a.$f.remove(y);var E=a.Ac(y);if(E!==void 0&&a.wb.remove(E),E=null,x){if(E=a.md.indexOf(y),0>E)return;a.md.splice(E,1)}if(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)}Tt.lA=function(a){if(Array.isArray(a))for(var y=a.length,x=0;x<y;x++)this.bm(a[x]);else for(a=a.iterator;a.next();)this.bm(a.value)},Tt.Zz=function(a){if(this.linkKeyProperty===""&&he("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&qn(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)}Tt.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):G0(this,a,!0),ln(a)&&(An(a),this.lf!==""&&Ro(a,this.lf,void 0),this.mf!==""&&Ro(a,this.mf,void 0),this.je!==""&&Ro(a,this.je,[])),a},Tt.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!vs(a,y)},Tt.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)}}},Tt.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var E=vs(a,x);E!==y&&(nA(this,E,a),Ro(a,x,y),this.hc(y)===null&&eA(this,y,a),Ds(this,"nodeGroupKey",No,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Ro(a,x,y)}},Rr.prototype.copyNodeData=function(a){return a===null?null:(a=Fi.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||vs(a,this.Je)===void 0||Ro(a,this.Je,void 0),a)},Rr.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))},Tt=Rr.prototype,Tt.Do=function(a,y){if(y){var x=this.lb(a),E=this.Jc(a),b;for(b in y)b==="__gohashid"||x&&b===this.nodeKeyProperty||x&&b===this.nodeIsGroupProperty&&vs(a,b)===y[b]||E&&b===this.linkKeyProperty||this.setDataProperty(a,b,y[b])}},Tt.jp=function(a,y){Fi.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",No,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",No,tt,E,b,z),typeof tt=="string"&&this.La(E,tt)),tt=this.Ef(E),Array.isArray(tt))for(var rt=tt.length,ot=this.je,lt=0;lt<rt;lt++)tt[lt]===b&&(tt[lt]=z,Ds(this,"linkLabelKeys",is,ot,E,b,z,lt,lt))}},Tt.qv=function(a,y,x){if(this.lh(a)===y){var E=this.Je;Ro(a,E,x),Ds(this,"nodeGroupKey",No,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Tt.Lv=function(){Fi.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)Mv(this,a[x])},Tt.fm=function(a){Fi.prototype.fm.call(this,a),a=this.wa(a);var y=Fp(this,a);if(y!==null){var x=wn();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",No,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",No,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",No,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),b=this.Ef(E),Array.isArray(b))for(var z=b.length,tt=this.je,rt=0;rt<z;rt++)b[rt]===a&&(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]);Mn(x)}},Tt.em=function(a){Fi.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&eA(this,y,a)},Tt.qp=function(a){Fi.prototype.qp.call(this,a);var y=this.lh(a);nA(this,y,a)},Tt.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)},Rr.prototype.getLinkCategoryForData=function(a){return this.ps(a)},Rr.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",No,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Ro(a,x,y)}},Rr.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Tt=Rr.prototype,Tt.lm=function(a,y){Fi.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function I1(a,y,x){a.lp(x,a.ps(y)),a.wv(x,a.yx(y)),a.Bv(x,a.Bx(y)),a.Ls(x,a.Ef(y)),a.xv(x,a.zx(y)),a.Cv(x,a.Cx(y))}Tt.Wj=function(){return!0},Tt.ri=function(){return!0},Tt.xs=function(){return!0},Tt.Xj=function(){return!0},Ue.Object.defineProperties(Rr.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];ln(b)||he("GraphLinksModel.linkDataArray must only contain Objects, not: "+b),Nn(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 Se,b=0;b<x;b++)E.add(a[b]);for(this.$f=E,Ds(this,"linkDataArray",No,"linkDataArray",this,y,a),y=0;y<x;y++)Mv(this,a[y])}}},linkKeyProperty:{get:function(){return this.Jh},set:function(a){var y=this.Jh;if(y!==a){this.Jh=a,this.wb.clear();for(var x=this.linkDataArray.length,E=0;E<x;E++){var b=this.linkDataArray[E],z=this.Ac(b);z===void 0&&(this.Bs(b),z=this.Ac(b)),z!==void 0&&this.wb.add(z,b)}this.g("linkKeyProperty",y,a)}}},makeUniqueLinkKeyFunction:{get:function(){return this.cl},set:function(a){var y=this.cl;y!==a&&(this.cl=a,this.g("makeUniqueLinkKeyFunction",y,a))}},copyLinkDataFunction:{get:function(){return this.Ak},set:function(a){var y=this.Ak;y!==a&&(this.Ak=a,this.g("copyLinkDataFunction",y,a))}},nodeIsGroupProperty:{get:function(){return this.jl},set:function(a){var y=this.jl;y!==a&&(this.jl=a,this.g("nodeIsGroupProperty",y,a))}},nodeGroupKeyProperty:{get:function(){return this.Je},set:function(a){var y=this.Je;y!==a&&(this.Je=a,this.g("nodeGroupKeyProperty",y,a))}},Ij:{get:function(){return this.Lm},set:function(a){this.Lm!==a&&(this.Lm=a)}},linkCategoryProperty:{get:function(){return this.dj},set:function(a){var y=this.dj;y!==a&&(this.dj=a,this.g("linkCategoryProperty",y,a))}},type:{get:function(){return"GraphLinksModel"}}}),Rr.prototype.setCategoryForLinkData=Rr.prototype.lp,Rr.prototype.getCategoryForLinkData=Rr.prototype.ps,Rr.prototype.assignAllDataProperties=Rr.prototype.Do,Rr.prototype.setGroupKeyForNodeData=Rr.prototype.mp,Rr.prototype.getGroupKeyForNodeData=Rr.prototype.lh,Rr.prototype.isGroupForNodeData=Rr.prototype.Yu,Rr.prototype.copyLinkData=Rr.prototype.Jo,Rr.prototype.mergeLinkDataArray=Rr.prototype.Zz,Rr.prototype.removeLinkDataCollection=Rr.prototype.lA,Rr.prototype.removeLinkData=Rr.prototype.bm,Rr.prototype.addLinkDataCollection=Rr.prototype.Ey,Rr.prototype.addLinkData=Rr.prototype.fi,Rr.prototype.containsLinkData=Rr.prototype.Jc,Rr.prototype.makeLinkDataKeyUnique=Rr.prototype.Bs,Rr.prototype.findLinkDataForKey=Rr.prototype.jh,Rr.prototype.setKeyForLinkData=Rr.prototype.Ks,Rr.prototype.getKeyForLinkData=Rr.prototype.Ac,Rr.prototype.removeLabelKeyForLinkData=Rr.prototype.Qx,Rr.prototype.addLabelKeyForLinkData=Rr.prototype.Bu,Rr.prototype.setLabelKeysForLinkData=Rr.prototype.Ls,Rr.prototype.getLabelKeysForLinkData=Rr.prototype.Ef,Rr.prototype.setToPortIdForLinkData=Rr.prototype.Cv,Rr.prototype.getToPortIdForLinkData=Rr.prototype.Cx,Rr.prototype.setFromPortIdForLinkData=Rr.prototype.xv,Rr.prototype.getFromPortIdForLinkData=Rr.prototype.zx,Rr.prototype.setToKeyForLinkData=Rr.prototype.Bv,Rr.prototype.getToKeyForLinkData=Rr.prototype.Bx,Rr.prototype.setFromKeyForLinkData=Rr.prototype.wv,Rr.prototype.getFromKeyForLinkData=Rr.prototype.yx,Rr.prototype.clear=Rr.prototype.clear;var j0=Object.freeze([]);Rr.className="GraphLinksModel",Uu.GraphLinksModel=Rr,Fi.constructGraphLinksModel=Fi.constructGraphLinksModel=function(){return new Rr},Fi.initDiagramModel=Ev=function(){return new Rr};function Ya(a,y){Fi.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(qn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Re(Ya,Fi),Ya.constructGraphLinksModel=Fi.constructGraphLinksModel,Ya.prototype.cloneProtected=function(a){Fi.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Tt=Ya.prototype,Tt.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" TreeModel";if(0<a){y+=`
node data:`,a=this.nodeDataArray;for(var x=a.length,E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+_i(b)}}return y},Tt.rm=function(){var a=Fi.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},Tt.gp=function(a){Fi.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Tt.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&he("applyIncrementalJson cannot change Model properties"),Fi.prototype.fp.call(this,a)},Tt.Vl=function(a){return a},Tt.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=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)}}},Tt.qe=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Ke;if(x!=="")if(y=this.Vl(y),this.lb(a)){var E=vs(a,x);E!==y&&(nA(this,E,a),Ro(a,x,y),this.hc(y)===null&&eA(this,y,a),Ds(this,"nodeParentKey",No,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Ro(a,x,y)}},Tt.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=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",No,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=Fi.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))},Tt=Ya.prototype,Tt.jp=function(a,y){Fi.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},Tt.qv=function(a,y,x){if(this.mh(a)===y){var E=this.Ke;Ro(a,E,x),Ds(this,"nodeParentKey",No,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Tt.fm=function(a){Fi.prototype.fm.call(this,a),a=this.wa(a);var y=Fp(this,a);if(y!==null){var x=wn();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",No,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]);Mn(x)}},Tt.em=function(a){Fi.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&eA(this,y,a)},Tt.qp=function(a){Fi.prototype.qp.call(this,a);var y=this.mh(a);nA(this,y,a)},Tt.lm=function(a,y){Fi.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},Tt.Tl=function(){return!0},Tt.xs=function(){return!0},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 Ut,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)}Re(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 kt=ft+yt*z*(this.direction===Xa?1:-1)/ot,Dt=E.M(Et).diameter;isNaN(Dt)&&(Dt=cd(E.M(Et),kt)),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++)kt=E.M(b),Dt=E.M(b===ot-1?0:b+1),isNaN(kt.diameter)&&cd(kt,0),isNaN(Dt.diameter)&&cd(Dt,0),tt=Math.max(tt,(kt.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=Ut.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(Ut.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=Ut.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(Ut.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 Ut(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=[],kt=0;kt<x.length;kt++)0>y[x[kt]].indexOf(x[kt===x.length-1?0:kt+1])&&Et.push(kt===x.length-1?0:kt+1);if(Et.length===0)for(kt=0;kt<x.length;kt++)Et.push(kt);for(kt=0;kt<Et.length;kt++){for(var Dt=Et[kt],Xt=y[lt],zt=0,re=0;re<tt.length;re++){var le=z[tt[re]],fe=z[rt[re]];if(le<fe){var me=le;le=fe}else me=fe;if(me<Dt&&Dt<=le)for(fe=0;fe<Xt.length;fe++){var Ge=Xt[fe];0>x.indexOf(Ge)||me<z[Ge]&&z[Ge]<le||me===z[Ge]||le===z[Ge]||zt++}else for(fe=0;fe<Xt.length;fe++)Ge=Xt[fe],0>x.indexOf(Ge)||me<z[Ge]&&z[Ge]<le&&me!==z[Ge]&&le!==z[Ge]&&zt++}for(Xt=zt,re=zt=0;re<y[lt].length;re++)me=x.indexOf(y[lt][re]),0<=me&&(me=Math.abs(Dt-(me>=Dt?me+1:me)),zt+=me<x.length+1-me?me:x.length+1-me);for(re=0;re<tt.length;re++)me=z[tt[re]],le=z[rt[re]],me>=Dt&&me++,le>=Dt&&le++,me>le&&(fe=le,le=me,me=fe),le-me<(x.length+2)/2==(me<Dt&&Dt<=le)&&zt++;(Xt<ut||Xt===ut&&zt<ft)&&(ut=Xt,ft=zt,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||(kt=Et>ut?Et-ut:ut-Et,ft+=Et<ut!=kt>tt-kt?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 rn(qo,"ConstantSpacing",0),Ad=new rn(qo,"ConstantDistance",1),Pc=new rn(qo,"ConstantAngle",2),Ou=new rn(qo,"Packed",3),Xa=new rn(qo,"Clockwise",4),hd=new rn(qo,"Counterclockwise",5),nf=new rn(qo,"BidirectionalLeft",6),Dg=new rn(qo,"BidirectionalRight",7),Z0=new rn(qo,"Forwards",8),Y0=new rn(qo,"Reverse",9),X0=new rn(qo,"Ascending",10),J0=new rn(qo,"Descending",11),Ig=new rn(qo,"Optimized",12),q0=new rn(qo,"Pythagorean",13),Vf=new rn(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)}Re(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}Re(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)}Re($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)}Re(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=wn(),ut=0;ut<rt+y.vertexes.count+2;ut++)lt[ut]=null;rt=0,tt.reset();for(var ft=He.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 Ut(ft.x+ft.width+E.width,ft.y),lt[1]=new Ut(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],kt=new Ut(Et.x+ft.width+E.width,Et.y),Dt=new Ut(Et.x,Et.y+ft.height+E.height);for(yt+1<rt&&lt.splice(yt+1,0,null),lt[yt]=kt,lt[yt+1]=Dt,rt++,yt=Et.x-ft.x,Et=Et.y-ft.y,ut=ut.vertexes.iterator;ut.next();)kt=ut.value,kt.centerX+=yt,kt.centerY+=Et}for(He.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 Ut(yt.x+yt.width+E.width,yt.y),lt[1]=new Ut(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 Ut(ft.x+yt.width+E.width,ft.y),yt=new Ut(ft.x,ft.y+yt.height+E.height),ot+1<rt&&lt.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(Mn(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,we.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=we.sqrt((rt+Et+lt*lt*4/(tt*tt))/Et),tt=(rt-1)*ut/2,rt=(rt-1)*ft/2,b.bounds=new He(z-yt.x-tt,ot-yt.y-rt,ut+2*tt,ft+2*rt),b.focus=new Ut(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 He(E.centerX-z,E.centerY-tt,b.Ss,b.Qs),E.focus=new Ut(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=we.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,kt){return Et===null||kt===null||Et===kt?0:kt.width*kt.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=we.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,we.sqrt(x*x+a*a)):a+x<y?(E=E+b-tt,a=a+x-y,we.sqrt(E*E+a*a)):tt-(E+b):E>tt+rt?a>y+z?(x=E-tt-rt,a=a-y-z,we.sqrt(x*x+a*a)):a+x<y?(E=E-tt-rt,a=a+x-y,we.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 kt=G1(tt,yt);1>kt?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new tm),kt=E.random(),rt=E.random(),ot>lt?(E=Math.abs(yt.bounds.right-tt.bounds.x),E=(1+E)*kt):ot<lt?(E=Math.abs(yt.bounds.x-tt.bounds.right),E=-(1+E)*kt):(E=Math.max(yt.width,tt.width),E=(1+E)*kt-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)/(kt*kt),E=(lt-ot)/kt*rt,lt=(Et-ut)/kt*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=He.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,He.free(x)}x=He.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()}He.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)}Re(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}Re(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}Re(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 ho(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 Ut,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Re(ho,Go),ho.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},ho.prototype.qb=function(a){a.classType===ho?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)},ho.prototype.createNetwork=function(){return new Og(this)},ho.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 kt=b.focus;lt=z.focus;var Dt=E.rev?z.bounds:b.bounds;Et=Ut.alloc(),ut!==ft?Dt.w()&&ft.isVisible()?ft.actualBounds.w()?(wc(ft,yt,Pr,Et),Et.x+=ft.actualBounds.x-Dt.x,Et.y+=ft.actualBounds.y-Dt.y):(wc(ft,yt,Pr,Et),Et.w()||Et.assign(kt)):Et.assign(kt):Dt.w()?(wc(ft,yt,Pr,Et),Et.w()||Et.assign(kt)):Et.assign(kt),ft=E.rev?b.bounds:z.bounds,ut=Ut.alloc(),tt!==ot?ft.w()&&ot.isVisible()?ot.actualBounds.w()?(wc(ot,rt,Pr,ut),ut.x+=ot.actualBounds.x-ft.x,ut.y+=ot.actualBounds.y-ft.y):(wc(ot,rt,Pr,ut),ut.w()||ut.assign(lt)):ut.assign(lt):ft.w()?(wc(ot,rt,Pr,ut),ut.w()||ut.assign(lt)):ut.assign(lt),this.K===90||this.K===270?(tt=Math.round((Et.x-kt.x)/this.kc),ot=Et.x,rt=Math.round((ut.x-lt.x)/this.kc),lt=ut.x):(tt=Math.round((Et.y-kt.y)/this.kc),ot=Et.y,rt=Math.round((ut.y-lt.y)/this.kc),lt=ut.y),Ut.free(Et),Ut.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,zt=Dt.toPort;if(Xt!==null&&zt!==null){var re=Dt.fromNode;if(yt=Dt.toNode,re!==null&&yt!==null){var le=rm(this,!0),fe=rm(this,!1),me=this.setsPortSpots?le:Dt.computeSpot(!0,Xt);kt=this.setsPortSpots?fe:Dt.computeSpot(!1,zt);var Ge=Dt.isOrthogonal;me.$c()&&me.Hf(fe)&&kt.$c()&&kt.Hf(le)?ft=0:(le=Dt.getLinkPoint(re,Xt,me,!0,Ge,yt,zt,Ut.alloc()),fe=Dt.getLinkDirection(re,Xt,le,me,!0,Ge,yt,zt),Ut.free(le),me.ys()||fe!==tw(this,E,!0)?this.setsPortSpots&&re!==null&&re.ports.count===1&&E.rev&&(ft+=1):ft+=1,me=Dt.getLinkPoint(yt,zt,kt,!1,Ge,re,Xt,Ut.alloc()),Dt=Dt.getLinkDirection(yt,zt,me,kt,!1,Ge,re,Xt),Ut.free(me),kt.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)&&(kt=a.createVertex(),kt.node=null,kt.Dj=1,kt.layer=Et,kt.near=b,a.dh(kt),b=a.Zj(b,kt,E.link),b.valid=!1,b.rev=E.rev,b.portFromColOffset=tt,b.portToColOffset=0,b.portFromPos=ot,b.portToPos=0,b=kt),Dt=1,ft&&Dt--,Et-ut>Dt&&0<Et){for(E.valid=!1,kt=a.createVertex(),kt.node=null,kt.Dj=2,kt.layer=Et-1,a.dh(kt),b=a.Zj(b,kt,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=kt,Et--;Et-ut>Dt&&0<Et;)kt=a.createVertex(),kt.node=null,kt.Dj=3,kt.layer=Et-1,a.dh(kt),b=a.Zj(b,kt,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=0,b.portFromPos=0,b.portToPos=0,b=kt,Et--;b=a.Zj(kt,z,E.link),b.valid=!ft,ft&&(kt.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},ho.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}ho.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},ho.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&&lt.layer===ot.layer)if(ot=lt.index,ot>tt)for(var ut=tt+1;ut<ot;ut++){var ft=E[ut];ft.near===lt&&ft.Dj===lt.Dj||rt++}else for(ut=tt-1;ut>ot;ut--)ft=E[ut],ft.near===lt&&ft.Dj===lt.Dj||rt++;var yt;if(0<=x)for(ot=E[tt].sourceEdgesArrayAccess,lt=0;lt<ot.length;lt++){var 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 kt=ot[yt];if(kt.valid&&kt.fromVertex.layer!==y){var Dt=kt.fromVertex.index,Xt=kt.portToPos;kt=kt.portFromPos,ut<Xt&&(ft>Dt||ft===Dt&&Et>kt)&&rt++,Xt<ut&&(Dt>ft||Dt===ft&&kt>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++)kt=ot[yt],kt.valid&&kt.toVertex.layer!==y&&(Dt=kt.toVertex.index,Xt=kt.portToPos,kt=kt.portFromPos,Et<kt&&(ft>Dt||ft===Dt&&ut>Xt)&&rt++,kt<Et&&(Dt>ft||Dt===ft&&Xt>ut)&&rt++)}for(z[tt*b+tt]=rt,ot=tt+1;ot<b;ot++){var zt=0,re=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++)kt=le[yt],kt.valid&&kt.fromVertex.layer!==y&&(Dt=kt.fromVertex.index,kt=kt.portFromPos,(ft<Dt||ft===Dt&&Et<kt)&&re++,(Dt<ft||Dt===ft&&kt<Et)&&zt++)}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++)kt=le[yt],kt.valid&&kt.toVertex.layer!==y&&(Dt=kt.toVertex.index,Xt=kt.portToPos,(ft<Dt||ft===Dt&&ut<Xt)&&re++,(Dt<ft||Dt===ft&&Xt<ut)&&zt++)}z[tt*b+ot]=zt,z[ot*b+tt]=re}}return fd(a,y,E),z}ho.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}ho.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(kt,Dt){return kt-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)}}ho.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&&lt++;(b===null||z<ot-lt)&&(b=rt,z=ot-lt)}}b!==null&&(E[y]=b,y++,b.valid=!1)}for(y=0;y<a.vertexes.count;y++)E[y].index=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case om:for(E=this.network.vertexes.iterator;E.next();)a=E.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,E.reset();E.next();)y=E.value,y.sourceEdges.count===0&&Dv(this,y);for(E.reset();E.next();)y=E.value,y.Ll===-1&&Dv(this,y);for(a.reset();a.next();)E=a.value,E.forest||(y=E.fromVertex,x=y.finish,b=E.toVertex,z=b.finish,b.Ll<y.Ll&&x<z&&(this.network.gm(E),E.rev=!0));break;case Qp:for(a=this.network,y=a.vertexes.iterator,E=1/0;y.next();)E=Math.min(E,y.value.layer);if(1/0>E){if(0>E)for(y.reset();y.next();)y.value.layer-=E;for(E=[],y.reset();y.next();)x=y.value,b=E[x.layer],b===void 0?E[x.layer]=[x]:b.push(x);for(x=y=0;x<E.length;x++)if(b=E[x],!b||b.length===0)y++;else if(0<x)for(z=0;z<b.length;z++)b[z].layer-=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.layer<y.toVertex.layer&&(a.gm(y),y.rev=!0)}}};function Vw(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function 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++}ho.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 kt=yt[Et],Dt=kt.fromVertex;ut+=1,Dt.component!==1&&(z+=1,Dt=Dt.layer-lt.layer,kt=a.linkMinLength(kt),E=Math.min(E,Dt-kt))}for(yt=lt.destinationEdgesArrayAccess,b=yt.length,Et=0;Et<b;Et++)kt=yt[Et].toVertex,--ut,kt.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++)kt=yt[Et].fromVertex,lt+=1,kt.component!==1?E+=1:ut=!0;for(yt=tt.destinationEdgesArrayAccess,ft=yt.length,Et=0;Et<ft;Et++)kt=yt[Et],Dt=kt.toVertex,--lt,Dt.component!==1&&(--E,Dt=tt.layer-Dt.layer,kt=a.linkMinLength(kt),b=Math.min(b,Dt-kt));(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}ho.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))}ho.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,kt=E[z].column,Dt=E[z+1].column,Xt=a.nodeMinColumnSpace(E[z],!0),zt=a.nodeMinColumnSpace(E[z],!1),re=a.nodeMinColumnSpace(E[z+1],!0),le=a.nodeMinColumnSpace(E[z+1],!1);Xt=kt-Xt+re,zt=Dt-zt+le;var fe=E[z].sourceEdges.iterator;for(fe.reset();fe.next();)if(re=fe.value,le=re.fromVertex,re.valid&&le.layer===y){for(re=0;E[re]!==le;)re++;re<z&&(yt+=2*(z-re),Et+=2*(z+1-re)),re===z+1&&(yt+=1),re>z+1&&(yt+=4*(re-z),Et+=4*(re-(z+1)))}for(fe=E[z].destinationEdges.iterator,fe.reset();fe.next();)if(re=fe.value,le=re.toVertex,re.valid&&le.layer===y){for(re=0;E[re]!==le;)re++;re===z+1&&(Et+=1)}for(fe=E[z+1].sourceEdges.iterator,fe.reset();fe.next();)if(re=fe.value,le=re.fromVertex,re.valid&&le.layer===y){for(re=0;E[re]!==le;)re++;re<z&&(yt+=2*(z+1-re),Et+=2*(z-re)),re===z&&(Et+=1),re>z+1&&(yt+=4*(re-(z+1)),Et+=4*(re-z))}for(fe=E[z+1].destinationEdges.iterator,fe.reset();fe.next();)if(re=fe.value,le=re.toVertex,re.valid&&le.layer===y){for(re=0;E[re]!==le;)re++;re===z&&(yt+=1)}re=le=0,fe=tt[E[z].index];var me=rt[E[z].index],Ge=tt[E[z+1].index],Jn=rt[E[z+1].index];fe!==-1&&(le+=Math.abs(fe-kt),re+=Math.abs(fe-zt)),me!==-1&&(le+=Math.abs(me-kt),re+=Math.abs(me-zt)),Ge!==-1&&(le+=Math.abs(Ge-Dt),re+=Math.abs(Ge-Xt)),Jn!==-1&&(le+=Math.abs(Jn-Dt),re+=Math.abs(Jn-Xt)),(Et<yt-.5||Et===yt&&ft<ut-.5||Et===yt&&ft===ut&&re<le-.5)&&(lt=ot=!0,E[z].column=zt,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}ho.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 kt=yt=0,Dt=0;if(0>=x)for(var Xt=b[E].sourceEdges.iterator;Xt.next();){var zt=Xt.value,re=zt.fromVertex;if(zt.valid&&re.layer!==y){var le=kv(zt),fe=zt.portFromColOffset;zt=zt.portToColOffset,re=re.column,yt+=(Math.abs(ut+zt-(re+fe))+1)*le,kt+=(Math.abs(Et+zt-(re+fe))+1)*le,Dt+=(Math.abs(ft+zt-(re+fe))+1)*le}}if(0<=x)for(Xt=b[E].destinationEdges.iterator;Xt.next();)zt=Xt.value,re=zt.toVertex,zt.valid&&re.layer!==y&&(le=kv(zt),fe=zt.portFromColOffset,zt=zt.portToColOffset,re=re.column,yt+=(Math.abs(ut+fe-(re+zt))+1)*le,kt+=(Math.abs(Et+fe-(re+zt))+1)*le,Dt+=(Math.abs(ft+fe-(re+zt))+1)*le);zt=fe=le=0,Xt=tt[b[E].index],re=rt[b[E].index],Xt!==-1&&(le+=Math.abs(Xt-ut),fe+=Math.abs(Xt-Et),zt+=Math.abs(Xt-ft)),re!==-1&&(le+=Math.abs(re-ut),fe+=Math.abs(re-Et),zt+=Math.abs(re-ft)),kt<yt||kt===yt&&fe<le?(lt=ot=!0,b[E].column=Et):(Dt<yt||Dt===yt&&zt<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=wn(),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 Se,Jw(y,x);var z=null,tt=null,rt=null,ot=null,lt=(a.ve&1)!==0,ut=(a.ve&2)!==0,ft=(a.ve&4)!==0,yt=(a.ve&8)!==0;for(lt&&(a.verticalAlignment(y,x,!0),z=im(a,y,!0,!1)),y.reverse(),ft&&(a.verticalAlignment(y,x,!1),rt=im(a,y,!1,!1)),E=Zi(y),b=E.next();!b.done;b=E.next())b.value.reverse();yt&&(a.verticalAlignment(y,x,!1),ot=im(a,y,!1,!0)),y.reverse(),ut&&(a.verticalAlignment(y,x,!0),tt=im(a,y,!0,!0)),Mn(y),a.u(z,tt,rt,ot),a.network.vertexes.each(function(Et){var kt=wn();lt&&kt.push(z.get(Et)),ut&&kt.push(tt.get(Et)),ft&&kt.push(rt.get(Et)),yt&&kt.push(ot.get(Et)),kt.sort(function(Xt,zt){return Xt-zt});var Dt=kt.length;Dt=(kt[Math.floor((Dt-1)/2)]+kt[Math.ceil((Dt-1)/2)])/2,Mn(kt),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=Zi(lt.sourceEdgesArrayAccess),Et=yt.next();!Et.done;Et=yt.next())Et=Et.value,Et.valid&&ft.push(Et);lt.bo=ft}for(lt=Zi(lt.bo),ft=lt.next();!ft.done;ft=lt.next())ft=ft.value,yt=ft.fromVertex.index,(yt<b||yt>ut)&&y.add(ft);z++}b=ut}}}ho.prototype.verticalAlignment=function(a,y,x){qw(a),a=Zi(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=Zi(E.value);for(var z=E.next();!z.done;z=E.next()){z=z.value;var tt=x?Gv(z):ex(z),rt=tt.length;if(0<rt){tt.sort(function(ft,yt){return ft.vi-yt.vi});var ot=(rt-1)/2;for(rt=Math.floor(ot),ot=Math.ceil(ot);rt<=ot;rt++)if(z.align===z){var lt=tt[rt],ut=void 0;ut=x?um(lt,z):um(z,lt),!y.contains(ut)&&b<lt.vi&&(lt.align=z,z.root=lt.root,z.align=lt.root,b=lt.vi)}}}}};function qw(a){for(var y=0;y<a.length;y++)for(var x=a[y],E=0;E<x.length;E++){var b=x[E];b.root=b,b.align=b,b.Tz=y,b.vi=E}}function im(a,y,x,E){for(var b=a.K===90||a.K===270,z=Zi(y),tt=z.next();!tt.done;tt=z.next()){var rt=Zi(tt.value);for(tt=rt.next();!tt.done;tt=rt.next())tt=tt.value,tt.sd=tt,tt.shift=1/0,tt.zc=NaN,tt.qg=0}for(tt=a.K===90||a.K===270,z=Zi(y),rt=z.next();!rt.done;rt=z.next()){rt=Zi(rt.value);for(var ot=rt.next();!ot.done;ot=rt.next())if(ot=ot.value,ot.root===ot){for(var lt=0,ut=ot;ut.align!==ot;){var ft=ut.align,yt=tt?ut.width:ut.height,Et=tt?ft.width:ft.height;if(x){var kt=um(ut,ft),Dt=kt.portFromPos,Xt=kt.portToPos;kt.link!==null&&(ut.node&&ut.node!==kt.link.fromNode&&(Dt=tt?ut.focusX:ut.focusY),ft.node&&ft.node!==kt.link.toNode&&(Xt=tt?ft.focusX:ft.focusY))}else kt=um(ft,ut),Dt=kt.portToPos,Xt=kt.portFromPos,kt.link!==null&&(ut.node&&ut.node!==kt.link.toNode&&(Dt=tt?ut.focusX:ut.focusY),ft.node&&ft.node!==kt.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=Zi(y),tt=x.next();!tt.done;tt=x.next())for(z=Zi(tt.value),tt=z.next();!tt.done;tt=z.next())tt=tt.value,tt.root===tt&&ow(a,tt,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(tt=y[x][0],tt.sd===tt)){tt.sd.shift===1/0&&(tt.sd.shift=0),tt=x,rt=0;do{for(z=y[tt][rt];z.align!==z.root;)z=z.align,tt++,0<z.vi&&(rt=sw(z,y),rt.sd.shift=Math.min(rt.sd.shift,z.sd.shift+z.zc+z.qg-(rt.zc+rt.qg+(b?rt.width:rt.height)+a.columnSpacing)));rt=z.vi+1}while(tt<y.length&&rt<y[tt].length&&z.sd===y[tt][rt].sd)}for(a=new Qe,y=Zi(y),tt=y.next();!tt.done;tt=y.next())for(x=Zi(tt.value),tt=x.next();!tt.done;tt=x.next())tt=tt.value,tt.zc=tt.zc+tt.sd.shift+tt.qg,z=b?tt.width:tt.height,a.add(tt,E?-tt.zc-z:tt.zc);return a}function ow(a,y,x){if(isNaN(y.zc)){y.zc=0;var E=y;do{if(0<E.vi){var b=sw(E,x),z=b.root;ow(a,z,x),y.sd===y&&(y.sd=z.sd);var tt=a.K===90||a.K===270?b.width:b.height;y.sd===z.sd&&(y.zc=Math.max(y.zc,z.zc+b.qg+tt-E.qg+a.columnSpacing))}E=E.align}while(E!==y);for(;E.align!==y;)E=E.align,E.zc=y.zc,E.sd=y.sd}}function sw(a,y){var x=a.Tz;return a=a.vi,1>a&&he("Could not determine previous vertex in layer"),y[x][a-1]}ho.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var E=wn(),b=wn(),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)));Mn(E),Mn(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}ho.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}ho.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 Ut(x&&E?0:z,x&&!E?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},ho.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 He(0,0,x,Math.abs(this.Ta[0]))):y.push(new He(0,this.Ta[E-1],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===90?E===0?y.push(new He(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new He(0,this.Ta[E],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===180?E===0?y.push(new He(0,0,Math.abs(this.Ta[0]),x)):y.push(new He(this.Ta[E-1],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x)):E===0?y.push(new He(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new He(this.Ta[E],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x));this.commitLayers(y,this.Rf)},ho.prototype.commitLayers=function(){},ho.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&&lt===Ar&&(E=!0),rt!==null&&ot===Ar&&(x=!0),(E||x)&&(ot=null,E&&(ot=y.getLinkPointFromPoint(b,tt,tt.ga(Pr),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(Pr),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,kt=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 zt=lt===Ar,re=ot===Ar;2<Xt&&zt&&re?y.points.removeRange(1,Xt-2):3<Xt&&zt&&!re?y.points.removeRange(1,Xt-3):3<Xt&&!zt&&re?y.points.removeRange(2,Xt-2):4<Xt&&!zt&&!re&&y.points.removeRange(2,Xt-3)}if(x.rev){for(;ft!==null&&ut!==ft;){var le=Xt=null;for(zt=ft.sourceEdges.iterator;zt.next()&&(re=zt.value,re.link!==x.link||(Xt=re.fromVertex,le=re.toVertex,Xt.node!==null)););if(Xt===null)break;if(Xt!==ut){zt=y.i(Dt-1).x,re=y.i(Dt-1).y;var fe=Xt.centerX,me=Xt.centerY;if(Et)this.K===180||this.K===0?Dt===y.firstPickIndex+1?(y.m(Dt++,zt,re),y.m(Dt++,zt,me)):(le!==null?le.centerY:re)!==me&&(le=this.Ta[Xt.layer-1]+this.Rf.x,y.m(Dt++,le,re),y.m(Dt++,le,me)):Dt===y.firstPickIndex+1?(y.m(Dt++,zt,re),y.m(Dt++,fe,re)):(le!==null?le.centerX:zt)!==fe&&(le=this.Ta[Xt.layer-1]+this.Rf.y,y.m(Dt++,zt,le),y.m(Dt++,fe,le));else if(Dt===y.firstPickIndex+1){le=Math.max(10,this.he[ft.layer]);var Ge=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,me),y.m(Dt++,ft,me),y.m(Dt++,ft+Ge,me)):(y.m(Dt++,fe-le,me),y.m(Dt++,fe,me),y.m(Dt++,fe+Ge,me)):this.K===90?me>=ft.bounds.bottom?(ft=ft.bounds.y+ft.bounds.height,y.m(Dt++,fe,ft+Ge),y.m(Dt++,fe,ft),y.m(Dt++,fe,ft-le)):(y.m(Dt++,fe,me+Ge),y.m(Dt++,fe,me),y.m(Dt++,fe,me-le)):this.K===270?me<=ft.bounds.y?(ft=ft.bounds.y,y.m(Dt++,fe,ft-le),y.m(Dt++,fe,ft),y.m(Dt++,fe,ft+Ge)):(y.m(Dt++,fe,me-le),y.m(Dt++,fe,me),y.m(Dt++,fe,me+Ge)):this.K===0&&(fe>=ft.bounds.right?(ft=ft.bounds.x+ft.bounds.width,y.m(Dt++,ft+Ge,me),y.m(Dt++,ft,me),y.m(Dt++,ft-le,me)):(y.m(Dt++,fe+Ge,me),y.m(Dt++,fe,me),y.m(Dt++,fe-le,me)));else{y.m(Dt++,zt,re);var Jn=0;this.K===180||this.K===0?((this.K===180?fe>=ft.bounds.right:fe<=ft.bounds.x)&&(Jn=(this.K===0?-le:Ge)/2),y.m(Dt++,zt+Jn,me)):((this.K===270?me>=ft.bounds.bottom:me<=ft.bounds.y)&&(Jn=(this.K===90?-le:Ge)/2),y.m(Dt++,fe,re+Jn)),y.m(Dt++,fe,me)}}else le=Math.max(10,this.he[Xt.layer]),Ge=Math.max(10,this.Ld[Xt.layer]),yt?this.K===180?(y.m(Dt++,fe-le-kt,me),y.m(Dt++,Math.min(fe-le+kt/2,fe),me),y.m(Dt++,fe,me),y.m(Dt++,fe,me),y.m(Dt++,Math.max(fe+Ge-kt/2,fe),me),y.m(Dt++,fe+Ge+kt,me)):this.K===90?(y.m(Dt++,fe,me+Ge+kt),y.m(Dt++,fe,Math.max(me+Ge-kt/2,me)),y.m(Dt++,fe,me),y.m(Dt++,fe,me),y.m(Dt++,fe,Math.min(me-le+kt/2,me)),y.m(Dt++,fe,me-le-kt)):this.K===270?(y.m(Dt++,fe,me-le-kt),y.m(Dt++,fe,Math.min(me-le+kt/2,me)),y.m(Dt++,fe,me),y.m(Dt++,fe,me),y.m(Dt++,fe,Math.max(me+Ge-kt/2,me)),y.m(Dt++,fe,me+Ge+kt)):(y.m(Dt++,fe+Ge+kt,me),y.m(Dt++,Math.max(fe+Ge-kt/2,fe),me),y.m(Dt++,fe,me),y.m(Dt++,fe,me),y.m(Dt++,Math.min(fe-le+kt/2,fe),me),y.m(Dt++,fe-le-kt,me)):y.m(Dt++,fe,me)}ft=Xt}(rt===null||lt!==Ar||Et)&&(zt=y.i(Dt-1).x,re=y.i(Dt-1).y,fe=y.i(Dt).x,me=y.i(Dt).y,Et?(kt=this.Ld[ut.layer],this.K===180||this.K===0?(Et=re,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?-kt:kt),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,re),y.m(Dt++,ft,Et)),y.m(Dt++,fe,Et)):(Et=zt,Et>=ut.bounds.x&&Et<=ut.bounds.right&&(this.K===270?me>=ut.bounds.y:me<=ut.bounds.bottom)&&(ft=ut.centerY+(this.K===270?-kt:kt),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++,zt,ft),y.m(Dt++,Et,ft)),y.m(Dt++,Et,me)),y.m(Dt++,fe,me)):yt?(le=Math.max(10,this.he[ut.layer]),Ge=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,re),y.L(Dt-1,ft+Ge,re)):this.K===90&&me<=ut.bounds.bottom?(ft=ut.bounds.y,y.L(Dt-2,zt,ft),y.L(Dt-1,zt,ft-le)):this.K===270&&me>=ut.bounds.y?(ft=ut.bounds.y+ut.bounds.height,y.L(Dt-2,zt,ft),y.L(Dt-1,zt,ft+Ge)):this.K===0&&fe<=ut.bounds.right&&(ft=ut.bounds.x,y.L(Dt-2,ft,re),y.L(Dt-1,ft-le,re))):(le=Math.max(10,this.he[ut.layer]),Ge=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?Ge:-le)/2),y.m(Dt++,fe+Et,re)):((this.K===270?me<=ut.bounds.y:me>=ut.bounds.bottom)&&(Et=(this.K===90?Ge:-le)/2),y.m(Dt++,zt,me+Et)),y.m(Dt++,fe,me)))}else{for(;ut!==null&&ut!==ft;){for(le=Xt=null,ut=ut.destinationEdges.iterator;ut.next()&&(zt=ut.value,zt.link!==x.link||(Xt=zt.toVertex,le=zt.fromVertex,le.node!==null&&(le=null),Xt.node!==null)););if(Xt===null)break;Xt!==ft&&(zt=y.i(Dt-1).x,re=y.i(Dt-1).y,fe=Xt.centerX,me=Xt.centerY,Et?this.K===180||this.K===0?(le!==null?le.centerY:re)!==me&&(le=this.Ta[Xt.layer]+this.Rf.x,Dt===y.firstPickIndex+1&&(le=this.K===0?Math.max(le,zt):Math.min(le,zt)),y.m(Dt++,le,re),y.m(Dt++,le,me)):(le!==null?le.centerX:zt)!==fe&&(le=this.Ta[Xt.layer]+this.Rf.y,Dt===y.firstPickIndex+1&&(le=this.K===90?Math.max(le,re):Math.min(le,re)),y.m(Dt++,zt,le),y.m(Dt++,fe,le)):(le=Math.max(10,this.he[Xt.layer]),Ge=Math.max(10,this.Ld[Xt.layer]),yt?this.K===180?(y.m(Dt++,fe+Ge+kt,me),y.m(Dt++,Math.max(fe+Ge-kt/2,fe),me),y.m(Dt++,fe,me),y.m(Dt++,fe,me),y.m(Dt++,Math.min(fe-le+kt/2,fe),me),y.m(Dt++,fe-le-kt,me)):this.K===90?(y.m(Dt++,fe,me-le-kt),y.m(Dt++,fe,Math.min(me-le+kt/2,me)),y.m(Dt++,fe,me),y.m(Dt++,fe,me),y.m(Dt++,fe,Math.max(me+Ge-kt/2,me)),y.m(Dt++,fe,me+Ge+kt)):this.K===270?(y.m(Dt++,fe,me+Ge+kt),y.m(Dt++,fe,Math.max(me+Ge-kt/2,me)),y.m(Dt++,fe,me),y.m(Dt++,fe,me),y.m(Dt++,fe,Math.min(me-le+kt/2,me)),y.m(Dt++,fe,me-le-kt)):(y.m(Dt++,fe-le-kt,me),y.m(Dt++,Math.min(fe-le+kt/2,fe),me),y.m(Dt++,fe,me),y.m(Dt++,fe,me),y.m(Dt++,Math.max(fe+Ge-kt/2,fe),me),y.m(Dt++,fe+Ge+kt,me)):this.K===180?(y.m(Dt++,fe+Ge,me),y.m(Dt++,fe-le,me)):this.K===90?(y.m(Dt++,fe,me-le),y.m(Dt++,fe,me+Ge)):this.K===270?(y.m(Dt++,fe,me+Ge),y.m(Dt++,fe,me-le)):(y.m(Dt++,fe-le,me),y.m(Dt++,fe+Ge,me)))),ut=Xt}Et&&(zt=y.i(Dt-1).x,re=y.i(Dt-1).y,fe=y.i(Dt).x,me=y.i(Dt).y,this.K===180||this.K===0?re!==me&&(le=this.K===0?Math.min(Math.max((fe+zt)/2,this.Ta[ft.layer]+this.Rf.x),fe):Math.max(Math.min((fe+zt)/2,this.Ta[ft.layer]+this.Rf.x),fe),y.m(Dt++,le,re),y.m(Dt++,le,me)):zt!==fe&&(le=this.K===90?Math.min(Math.max((me+re)/2,this.Ta[ft.layer]+this.Rf.y),me):Math.max(Math.min((me+re)/2,this.Ta[ft.layer]+this.Rf.y),me),y.m(Dt++,zt,le),y.m(Dt++,fe,le)))}E!==null&&yt&&4<=y.pointsCount&&(tt!==null&&(tt=lt===Ar?y.getLinkPointFromPoint(b,tt,tt.ga(Pr),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(Pr),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()},ho.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 kt=this.linkSpacing*(ut-(lt-1)/2);y++,Et.uh(),Et.L(yt.index,z.x,z.y+kt),Et.L(yt.index+1,tt.x,tt.y+kt),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),kt=this.linkSpacing*(ut-(lt-1)/2),y++,Et.uh(),Et.L(yt.index,z.x+kt,z.y),Et.L(yt.index+1,tt.x+kt,tt.y),Et.zf()}z=b}a=E}}}},Tt=ho.prototype,Tt.Vx=function(a,y){return a instanceof gd&&y instanceof gd&&a!==y?a.layer<y.layer?-1:a.layer>y.layer?1:a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Tt.Ux=function(a,y){return a instanceof gd&&y instanceof gd&&a!==y?a.first<y.first?-1:a.first>y.first||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Tt.Js=function(a,y){return a instanceof gd&&y instanceof gd&&a!==y?a.jc<y.jc?-1:a.jc>y.jc||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Tt.B=function(a,y){return a-=y,-1<a&&1>a},Tt.zi=function(a,y,x,E){var b=a.length,z=E-x;if(!(1>=z))if((0>x||x>=b-1)&&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(ho.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 rn(ho,"CycleDepthFirst",0),Uv=new rn(ho,"CycleGreedy",1),Qp=new rn(ho,"CycleFromLayers",2),sm=new rn(ho,"LayerOptimalLinkLength",0),Qv=new rn(ho,"LayerLongestPathSink",1),Ov=new rn(ho,"LayerLongestPathSource",2),am=new rn(ho,"InitDepthFirstOut",0),Hv=new rn(ho,"InitDepthFirstIn",1),Rv=new rn(ho,"InitNaive",2),_v=new rn(ho,"AggressiveNone",0),lm=new rn(ho,"AggressiveLess",1),Kv=new rn(ho,"AggressiveMore",2),tx=8;ho.className="LayeredDigraphLayout",ho.CycleDepthFirst=om,ho.CycleGreedy=Uv,ho.CycleFromLayers=Qp,ho.LayerOptimalLinkLength=sm,ho.LayerLongestPathSink=Qv,ho.LayerLongestPathSource=Ov,ho.InitDepthFirstOut=am,ho.InitDepthFirstIn=Hv,ho.InitNaive=Rv,ho.AggressiveNone=_v,ho.AggressiveLess=lm,ho.AggressiveMore=Kv,ho.PackNone=0,ho.PackExpand=1,ho.PackStraighten=2,ho.PackMedian=4,ho.PackAll=15,ho.AlignNone=0,ho.AlignUpperLeft=1,ho.AlignUpperRight=2,ho.AlignLowerLeft=4,ho.AlignLowerRight=8,ho.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)}Re(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}Re(ru,Ks);function aw(a,y){return a.index-y.index}function um(a,y){if(!a.$n){for(var x=[],E=Zi(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=Zi(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;he("Unable to find destination edge to given vertex")}function Gv(a){if(!a.co){for(var y=[],x=Zi(a.sourceEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.fromVertex);y.sort(aw),a.co=y}return a.co}function ex(a){if(!a.ao){for(var y=[],x=Zi(a.destinationEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.toVertex);y.sort(aw),a.ao=y}return a.ao}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}Re(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 br(a){Go.call(this),this.Ub=new Se,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)}Re(br,Go),br.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)},br.prototype.qb=function(a){a.classType===br?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)},br.prototype.createNetwork=function(){return new Jf(this)},br.prototype.makeNetwork=function(a){function y(E){if(E instanceof $n)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof Rn){var b=E.fromNode;return b===null||b.isLinkLabel||b.category==="Comment"?!1:(E=E.toNode,!(E===null||E.isLinkLabel||E.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof Ke?(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},br.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 Ke&&(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 Se,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof $n?(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 Se,this.isValidLayout=!0};function nx(a){var y=new Se;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}br.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}br.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}}br.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])}}br.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])}}br.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())}},br.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},br.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=He.allocAt(0,0,a.bounds.width+z,a.bounds.height+tt),a.bounds=b,He.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}br.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=Ut.alloc(),yt=0;yt<ut;yt++){var Et=lt[yt],kt=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-kt.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-kt.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+(kt.height+a.commentSpacing):ot+(a.commentSpacing-kt.height)}else{if(135<b&&!z||!x&&rt)if(0<=a.commentMargin)for(ft.h(a.bounds.x+ot,a.bounds.y-a.commentMargin-kt.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-kt.height),Et.move(ft),Et=Et.Sd();Et.next();)Dt=Et.value,Dt.fromSpot=Gs,Dt.toSpot=js;ot=0<=a.commentSpacing?ot+(kt.width+a.commentSpacing):ot+(a.commentSpacing-kt.width)}}if(Ut.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)}},br.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),kt=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,zt=0,re=0,le=0,fe=null,me=null,Ge=0,Jn=0,yi=0,di=0,Hn=0,vn=0,ur=0,tr=0;if(ut&&!Hp(ot)&&135<b&&tt.reverse(),Hp(ot))if(1<rt)for(var Xr=0;Xr<rt;Xr++)Xr%2===0&&Xr!==rt-1&&(tr=Math.max(tr,y?tt[Xr].Da.width:tt[Xr].Da.height));else rt===1&&(tr=y?tt[0].Da.width:tt[0].Da.height);if(ut){switch(ot){case Fc:re=135>b?fw(this,a,tt,tr,zt,re):gw(this,a,tt,tr,zt,re),tr=re.x,zt=re.width,re=re.height;break;case Ec:for(fe=0;fe<rt;fe++)me=tt[fe],ft=me.Da,le=vn===0?0:kt,y?(me.S.h(z-ft.width,di+le),zt=Math.max(zt,ft.width),re=Math.max(re,di+le+ft.height),di+=le+ft.height):(me.S.h(yi+le,z-ft.height),zt=Math.max(zt,yi+le+ft.width),re=Math.max(re,ft.height),yi+=le+ft.width),vn++;break;case kh:for(fe=0;fe<rt;fe++)me=tt[fe],z=me.Da,ft=vn===0?0:kt,y?(me.S.h(yt/2+a.focus.x,di+ft),zt=Math.max(zt,z.width),re=Math.max(re,di+ft+z.height),di+=ft+z.height):(me.S.h(yi+ft,yt/2+a.focus.y),zt=Math.max(zt,yi+ft+z.width),re=Math.max(re,z.height),yi+=ft+z.width),vn++}fe=xl(this,2),me=xl(this,2),y?(fe[0].h(0,0),fe[1].h(0,re),me[0].h(zt,0)):(fe[0].h(0,0),fe[1].h(zt,0),me[0].h(0,re)),me[1].h(zt,re)}else for(Xr=0;Xr<rt;Xr++){var So=tt[Xr],Zs=So.Da;if(y){0<ft&&0<vn&&yi+yt+Zs.width>ft&&(yi<z&&rf(a,ot,z-yi,0,ur,Xr-1),Hn++,vn=0,ur=Xr,le=re,yi=0,di=135<b?-re-kt:re+kt),hm(this,So,0,di);var $s=0;if(vn===0)fe=So.Yo,me=So.kp,Ge=Zs.width,Jn=Zs.height,(fe===null||me===null||b!==Hu(So))&&(fe=xl(this,2),me=xl(this,2),fe[0].h(0,0),fe[1].h(0,Jn),me[0].h(Ge,0),me[1].h(Ge,Jn));else{var Oa=wn();Jn=pw(this,a,So,fe,me,Ge,Jn,Oa),$s=Jn.x,fe=Oa[0],me=Oa[1],Ge=Jn.width,Jn=Jn.height,Mn(Oa),yi<Zs.width&&0>$s&&(Zf(a,-$s,0,ur,Xr-1),cm(fe,-$s,0),cm(me,-$s,0),$s=0)}So.S.h($s,di),zt=Math.max(zt,Ge),re=Math.max(re,le+(Hn===0?0:kt)+Zs.height),yi=Ge}else 0<ft&&0<vn&&di+yt+Zs.height>ft&&(di<z&&rf(a,ot,0,z-di,ur,Xr-1),Hn++,vn=0,ur=Xr,le=zt,di=0,yi=135<b?-zt-kt:zt+kt),hm(this,So,yi,0),$s=0,vn===0?(fe=So.Yo,me=So.kp,Ge=Zs.width,Jn=Zs.height,(fe===null||me===null||b!==Hu(So))&&(fe=xl(this,2),me=xl(this,2),fe[0].h(0,0),fe[1].h(Ge,0),me[0].h(0,Jn),me[1].h(Ge,Jn))):(Oa=wn(),Jn=pw(this,a,So,fe,me,Ge,Jn,Oa),$s=Jn.x,fe=Oa[0],me=Oa[1],Ge=Jn.width,Jn=Jn.height,Mn(Oa),di<Zs.height&&0>$s&&(Zf(a,0,-$s,ur,Xr-1),cm(fe,0,-$s),cm(me,0,-$s),$s=0)),So.S.h(yi,$s),re=Math.max(re,Jn),zt=Math.max(zt,le+(Hn===0?0:kt)+Zs.width),di=Jn;vn++}switch(0<Hn&&(y?(re+=Math.max(0,x),yi<zt&&rf(a,ot,zt-yi,0,ur,rt-1),0<Dt&&(lt||Zf(a,Dt,0,0,rt-1),zt+=Dt)):(zt+=Math.max(0,x),di<re&&rf(a,ot,0,re-di,ur,rt-1),0<Dt&&(lt||Zf(a,0,Dt,0,rt-1),re+=Dt))),Dt=lt=0,ot){case Rg:y?lt+=zt/2-a.focus.x-Et/2:Dt+=re/2-a.focus.y-Et/2;break;case Xf:0<Hn?y?lt+=zt/2-a.focus.x-Et/2:Dt+=re/2-a.focus.y-Et/2:y?(tr=tt[0].S.x+tt[0].la.x,lt+=tr+(tt[rt-1].S.x+tt[rt-1].la.x+2*tt[rt-1].focus.x-tr)/2-a.focus.x-Et/2):(tr=tt[0].S.y+tt[0].la.y,Dt+=tr+(tt[rt-1].S.y+tt[rt-1].la.y+2*tt[rt-1].focus.y-tr)/2-a.focus.y-Et/2);break;case sh:y?(lt-=Et,zt+=Et):(Dt-=Et,re+=Et);break;case ah:y?(lt+=zt-a.width+Et,zt+=Et):(Dt+=re-a.height+Et,re+=Et);break;case Fc:y?1<rt?lt+=tr+yt/2-a.focus.x:lt+=tt[0].focus.x-a.focus.x+tt[0].la.x:1<rt?Dt+=tr+yt/2-a.focus.y:Dt+=tt[0].focus.y-a.focus.y+tt[0].la.y;break;case Ec:y?lt+=zt+yt/2-a.focus.x:Dt+=re+yt/2-a.focus.y;break;case kh:break;default:re=this.customAlignment(a,lt,Dt,zt,re),lt=re[0],Dt=re[1],zt=re[2],re=re[3]}for(Et=0;Et<rt;Et++)tr=tt[Et],y?tr.S.h(tr.S.x+tr.la.x-lt,tr.S.y+(135<b?(ut?-re:-tr.Da.height)+tr.la.y-x:Xt+x+tr.la.y)):tr.S.h(tr.S.x+(135<b?(ut?-zt:-tr.Da.width)+tr.la.x-x:E+x+tr.la.x),tr.S.y+tr.la.y-Dt);if(rt=tt=0,ut?y?(zt=Vv(a,zt,lt),0>lt&&(lt=0),135<b&&(Dt+=re+x),re+=Xt+x,ot===kh&&(tt+=yt/2+a.focus.x),rt+=Xt+x):(135<b&&(lt+=zt+x),zt+=E+x,re=Wv(a,re,Dt),0>Dt&&(Dt=0),ot===kh&&(rt+=yt/2+a.focus.y),tt+=E+x):y?(a.comments===null?E>zt&&(zt=Zv(ot,E-zt,0),tt=zt.x,rt=zt.y,zt=E,lt=0):zt=Vv(a,zt,lt),0>lt&&(tt-=lt,lt=0),135<b&&(Dt+=re+x),re=Math.max(Math.max(re,Xt),re+Xt+x),rt+=Xt+x):(135<b&&(lt+=zt+x),zt=Math.max(Math.max(zt,E),zt+E+x),a.comments===null?Xt>re&&(re=Zv(ot,0,Xt-re),tt=re.x,rt=re.y,re=Xt,Dt=0):re=Wv(a,re,Dt),0>Dt&&(rt-=Dt,Dt=0),tt+=E+x),0<Hn)b=xl(this,4),Hn=xl(this,4),y?(b[2].h(0,Xt+x),b[3].h(b[2].x,re),Hn[2].h(zt,b[2].y),Hn[3].h(Hn[2].x,b[3].y)):(b[2].h(E+x,0),b[3].h(zt,b[2].y),Hn[2].h(b[2].x,re),Hn[3].h(b[3].x,Hn[2].y));else{for(b=xl(this,fe.length+2),Hn=xl(this,me.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<me.length;ot++)ut=me[ot],Hn[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])),Hn[0].h(lt+E,0),Hn[1].h(Hn[0].x,Xt),Hn[2].y<Hn[1].y&&(Hn[2].x<Hn[0].x?Hn[2].assign(Hn[1]):Hn[1].assign(Hn[2])),Hn[3].y<Hn[2].y&&(Hn[3].x<Hn[0].x?Hn[3].assign(Hn[2]):Hn[2].assign(Hn[3])),b[2].y-=x/2,Hn[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])),Hn[0].h(0,Dt+Xt),Hn[1].h(E,Hn[0].y),Hn[2].x<Hn[1].x&&(Hn[2].y<Hn[0].y?Hn[2].assign(Hn[1]):Hn[1].assign(Hn[2])),Hn[3].x<Hn[2].x&&(Hn[3].y<Hn[0].y?Hn[3].assign(Hn[2]):Hn[2].assign(Hn[3])),b[2].x-=x/2,Hn[2].x-=x/2),iA(this,fe),iA(this,me),a.Yo=b,a.kp=Hn,a.la.h(lt,Dt),a.Da.h(zt,re)}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,kt=a.computeNodeIndent(y),Dt=ut||ft?0:kt/2,Xt=y.rowSpacing,zt=0;(ut||ft||y.hm||y.im&&y.maxGenerationCount===1)&&(zt=Math.max(0,y.rowIndent)),ut=y.width;var re=y.height,le=0,fe=0,me=0,Ge=0,Jn=0,yi=0,di=0,Hn=0,vn=0,ur=0;if(rt&&!Hp(lt)&&135<E&&b.reverse(),Hp(lt))if(1<tt)for(var tr=0;tr<tt;tr++){var Xr=b[tr],So=Xr.Da;tr%2===0&&tr!==tt-1?vn=Math.max(vn,(x?So.width:So.height)+a.computeBusNodeSpacing(Xr)-Et):tr%2!==0&&(ur=Math.max(ur,(x?So.width:So.height)+a.computeBusNodeSpacing(Xr)-Et))}else tt===1&&(vn=x?b[0].Da.width:b[0].Da.height);if(rt)switch(lt){case Fc:case lh:fe=135>E?fw(a,y,b,vn,le,fe):gw(a,y,b,vn,le,fe),vn=fe.x,le=fe.width,fe=fe.height;break;case Ec:for(yt=0;yt<tt;yt++)Dt=b[yt],me=Dt.Da,ur=di===0?0:Xt,x?(Dt.S.h(z-me.width,Jn+ur),le=Math.max(le,me.width),fe=Math.max(fe,Jn+ur+me.height),Jn+=ur+me.height):(Dt.S.h(Ge+ur,z-me.height),le=Math.max(le,Ge+ur+me.width),fe=Math.max(fe,me.height),Ge+=ur+me.width),di++;break;case kh:for(z=0;z<tt;z++)yt=b[z],Dt=yt.Da,me=di===0?0:Xt,x?(yt.S.h(Et/2+y.focus.x,Jn+me),le=Math.max(le,Dt.width),fe=Math.max(fe,Jn+me+Dt.height),Jn+=me+Dt.height):(yt.S.h(Ge+me,Et/2+y.focus.y),le=Math.max(le,Ge+me+Dt.width),fe=Math.max(fe,Dt.height),Ge+=me+Dt.width),di++}else for(ur=0;ur<tt;ur++)tr=b[ur],Xr=tr.Da,x?(0<yt&&0<di&&Ge+Et+Xr.width>yt&&(Ge<z&&rf(y,lt,z-Ge,0,Hn,ur-1),yi++,di=0,Hn=ur,me=fe,Ge=0,Jn=135<E?-fe-Xt:fe+Xt),So=di===0?Dt:Et,hm(a,tr,0,Jn),tr.S.h(Ge+So,Jn),le=Math.max(le,Ge+So+Xr.width),fe=Math.max(fe,me+(yi===0?0:Xt)+Xr.height),Ge+=So+Xr.width):(0<yt&&0<di&&Jn+Et+Xr.height>yt&&(Jn<z&&rf(y,lt,0,z-Jn,Hn,ur-1),yi++,di=0,Hn=ur,me=le,Jn=0,Ge=135<E?-le-Xt:le+Xt),So=di===0?Dt:Et,hm(a,tr,Ge,0),tr.S.h(Ge,Jn+So),fe=Math.max(fe,Jn+So+Xr.height),le=Math.max(le,me+(yi===0?0:Xt)+Xr.width),Jn+=So+Xr.height),di++;switch(0<yi&&(x?(fe+=Math.max(0,ot),Ge<le&&rf(y,lt,le-Ge,0,Hn,tt-1),0<zt&&(ft||Zf(y,zt,0,0,tt-1),le+=zt)):(le+=Math.max(0,ot),Jn<fe&&rf(y,lt,0,fe-Jn,Hn,tt-1),0<zt&&(ft||Zf(y,0,zt,0,tt-1),fe+=zt))),zt=ft=0,lt){case Rg:x?ft+=le/2-y.focus.x-kt/2:zt+=fe/2-y.focus.y-kt/2;break;case Xf:0<yi?x?ft+=le/2-y.focus.x-kt/2:zt+=fe/2-y.focus.y-kt/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-kt/2):(a=b[0].S.y+b[0].la.y,zt+=a+(b[tt-1].S.y+b[tt-1].la.y+2*b[tt-1].focus.y-a)/2-y.focus.y-kt/2);break;case sh:x?(ft-=kt,le+=kt):(zt-=kt,fe+=kt);break;case ah:x?(ft+=le-y.width+kt,le+=kt):(zt+=fe-y.height+kt,fe+=kt);break;case Fc:case lh:x?1<tt?ft+=vn+Et/2-y.focus.x:ft+=b[0].focus.x-y.focus.x+b[0].la.x:1<tt?zt+=vn+Et/2-y.focus.y:zt+=b[0].focus.y-y.focus.y+b[0].la.y;break;case Ec:x?ft+=le+Et/2-y.focus.x:zt+=fe+Et/2-y.focus.y;break;case kh:break;default:a=a.customAlignment(y,ft,zt,le,fe),ft=a[0],zt=a[1],le=a[2],fe=a[3]}for(a=0;a<tt;a++)kt=b[a],x?kt.S.h(kt.S.x+kt.la.x-ft,kt.S.y+(135<E?(rt?-fe:-kt.Da.height)+kt.la.y-ot:re+ot+kt.la.y)):kt.S.h(kt.S.x+(135<E?(rt?-le:-kt.Da.width)+kt.la.x-ot:ut+ot+kt.la.x),kt.S.y+kt.la.y-zt);x?(le=Vv(y,le,ft),0>ft&&(ft=0),135<E&&(zt+=fe+ot),fe=Math.max(Math.max(fe,re),fe+re+ot)):(135<E&&(ft+=le+ot),le=Math.max(Math.max(le,ut),le+ut+ot),fe=Wv(y,fe,zt),0>zt&&(zt=0)),y.la.h(ft,zt),y.Da.h(le,fe)}}br.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 He(E,0,b,z);if(tt===1)return y=x[0],b=y.Da.width,z=y.Da.height,new He(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 kt=x[Et],Dt=kt.Da,Xt=ut===0?0:ot;if(lt){var zt=a.computeBusNodeSpacing(kt)-rt;kt.S.h(E-(Dt.width+zt),yt+Xt),b=Math.max(b,Dt.width+zt),z=Math.max(z,yt+Xt+Dt.height),yt+=Xt+Dt.height}else zt=a.computeBusNodeSpacing(kt)-rt,kt.S.h(ft+Xt,E-(Dt.height+zt)),z=Math.max(z,Dt.height+zt),b=Math.max(b,ft+Xt+Dt.width),ft+=Xt+Dt.width;ut++}for(ut=0,kt=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],zt=Xt.Da;var re=ut===0?0:ot;if(lt){var le=a.computeBusNodeSpacing(Xt)-rt;Xt.S.h(ft+le,yt+re),b=Math.max(b,ft+zt.width+le),z=Math.max(z,yt+re+zt.height),yt+=re+zt.height}else le=a.computeBusNodeSpacing(Xt)-rt,Xt.S.h(ft+re,yt+le),b=Math.max(b,ft+re+zt.width),z=Math.max(z,yt+zt.height+le),ft+=re+zt.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(kt),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(kt,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 He(E,0,b,z)}function gw(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new He(E,0,b,z);if(tt===1)return x=x[0],b=x.Da.width,z=x.Da.height,new He(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 kt=x[Et],Dt=kt.Da,Xt=ut===0?0:ot;if(lt){var zt=a.computeBusNodeSpacing(kt)-rt;yt-=Xt+Dt.height,kt.S.h(E-(Dt.width+zt),yt),b=Math.max(b,Dt.width+zt),z=Math.max(z,Math.abs(yt))}else zt=a.computeBusNodeSpacing(kt)-rt,ft-=Xt+Dt.width,kt.S.h(ft,E-(Dt.height+zt)),z=Math.max(z,Dt.height+zt),b=Math.max(b,Math.abs(ft));ut++}for(ut=0,kt=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],zt=Xt.Da;var re=ut===0?0:ot;if(lt){var le=a.computeBusNodeSpacing(Xt)-rt;yt-=re+zt.height,Xt.S.h(ft+le,yt),b=Math.max(b,ft+zt.width+le),z=Math.max(z,Math.abs(yt))}else le=a.computeBusNodeSpacing(Xt)-rt,ft-=re+zt.width,Xt.S.h(ft,yt+le),z=Math.max(z,yt+zt.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(kt),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(kt,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 He(E,0,b,z)}br.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},br.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 Ut(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,kt=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),kt=xl(a,2),lt?(Et[0].h(0,0),Et[1].h(0,tt.height),kt[0].h(tt.width,0),kt[1].h(kt[0].x,Et[1].y)):(Et[0].h(0,0),Et[1].h(tt.width,0),kt[0].h(0,tt.height),kt[1].h(Et[1].x,kt[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 zt=z;x+1<ft.length&&(zt=ft[x+1]);var re=Xt;Xt=re.x,re=re.y,b+1<Et.length&&(re=Et[b+1],Xt=re.x,re=re.y,Xt+=E);var le=yt;z.y===lt?le=ot-z.x:z.y>lt&&z.y<re?le=ot+(z.y-lt)/(re-lt)*(Xt-ot)-z.x:lt>z.y&&lt<zt.y&&(le=ot-(z.x+(lt-z.y)/(zt.y-z.y)*(zt.x-z.x))),le<yt&&(yt=le),zt.y<=z.y?x++:re<=lt?b++:(zt.y<=re&&x++,re<=zt.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=kt,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;)zt=ft[x++],ut[b++].h(zt.x,zt.y);for(;lt<z.length;)zt=z[lt++],ut[b++].h(zt.x+ot,zt.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,kt),rt[0]=E,rt[1]=b,new He(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,zt=z,x+1<ft.length&&(zt=ft[x+1]),re=Xt,Xt=re.x,re=re.y,b+1<Et.length&&(re=Et[b+1],Xt=re.x,re=re.y,re+=yt),le=E,z.x===ot?le=lt-z.y:z.x>ot&&z.x<Xt?le=lt+(z.x-ot)/(Xt-ot)*(re-lt)-z.y:ot>z.x&&ot<zt.x&&(le=lt-(z.y+(ot-z.x)/(zt.x-z.x)*(zt.y-z.y))),le<E&&(E=le),zt.x<=z.x?x++:Xt<=ot?b++:(zt.x<=Xt&&x++,Xt<=zt.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=kt,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;)zt=ft[x++],ut[b++].h(zt.x,zt.y);for(;lt<z.length;)zt=z[lt++],ut[b++].h(zt.x,zt.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,kt),rt[0]=E,rt[1]=b,new He(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 Ut;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)}br.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)}}}br.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},br.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},br.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 Ut(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),E=new Ut(-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 He(0,z,x,rt))):this.angle===90?(b.push(new He(0,z,x,rt)),z+=rt):this.angle===180?(z-=rt,b.push(new He(z,0,rt,x))):(b.push(new He(z,0,rt,x)),z+=rt)}this.commitLayers(b,E)}},br.prototype.commitLayers=function(){},br.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},br.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])}}br.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}br.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},br.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(br.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 rn(br,"PathDefault",-1),oh=new rn(br,"PathDestination",0),Yf=new rn(br,"PathSource",1),Hg=new rn(br,"SortingForwards",10),Rp=new rn(br,"SortingReverse",11),_p=new rn(br,"SortingAscending",12),Kp=new rn(br,"SortingDescending",13),Rg=new rn(br,"AlignmentCenterSubtrees",20),Xf=new rn(br,"AlignmentCenterChildren",21),sh=new rn(br,"AlignmentStart",22),ah=new rn(br,"AlignmentEnd",23),Fc=new rn(br,"AlignmentBus",24),lh=new rn(br,"AlignmentBusBranching",25),Ec=new rn(br,"AlignmentTopLeftBus",26),kh=new rn(br,"AlignmentBottomRightBus",27),fm=new rn(br,"CompactionNone",30),Gp=new rn(br,"CompactionBlock",31),gm=new rn(br,"StyleLayered",40),Xv=new rn(br,"StyleLastParents",41),Jv=new rn(br,"StyleAlternating",42),qv=new rn(br,"StyleRootOnly",43),pm=new rn(br,"ArrangementVertical",50),$v=new rn(br,"ArrangementHorizontal",51),mm=new rn(br,"ArrangementFixedRoots",52),ty=new rn(br,"LayerIndividual",60),ey=new rn(br,"LayerSiblings",61),vm=new rn(br,"LayerUniform",62);br.className="TreeLayout",br.PathDefault=dm,br.PathDestination=oh,br.PathSource=Yf,br.SortingForwards=Hg,br.SortingReverse=Rp,br.SortingAscending=_p,br.SortingDescending=Kp,br.AlignmentCenterSubtrees=Rg,br.AlignmentCenterChildren=Xf,br.AlignmentStart=sh,br.AlignmentEnd=ah,br.AlignmentBus=Fc,br.AlignmentBusBranching=lh,br.AlignmentTopLeftBus=Ec,br.AlignmentBottomRightBus=kh,br.CompactionNone=fm,br.CompactionBlock=Gp,br.StyleLayered=gm,br.StyleLastParents=Xv,br.StyleAlternating=Jv,br.StyleRootOnly=qv,br.ArrangementVertical=pm,br.ArrangementHorizontal=$v,br.ArrangementFixedRoots=mm,br.LayerIndividual=ty,br.LayerSiblings=ey,br.LayerUniform=vm;function Jf(a){Fo.call(this,a)}Re(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 Ut(0,0),this.Da=new cn(0,0),this.la=new Ut(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}Re(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 Ut(0,0)}Re(_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 To),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=Dn.go,ny={get licenseKey(){return Ke.licenseKey},set licenseKey(a){Ke.licenseKey=a},get version(){return Ke.version},Group:hr,EnumValue:rn,List:ee,Set:Se,Map:Qe,Point:Ut,Size:cn,Rect:He,Margin:lr,Spot:_n,Geometry:Un,PathFigure:Ss,PathSegment:Kr,InputEvent:Vs,DiagramEvent:zu,ChangedEvent:Uo,Model:Fi,GraphLinksModel:Rr,TreeModel:Ya,Binding:Fs,Transaction:Ms,UndoManager:_o,CommandHandler:Yt,Tool:_r,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:Ke,Palette:dt,Overview:gt,Brush:no,GraphObject:ve,Panel:Fn,RowColumnDefinition:Ns,Shape:vr,TextBlock:Po,Picture:ll,Part:Ui,Adornment:Vr,Node:$n,Link:Rn,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:ho,LayeredDigraphNetwork:Og,LayeredDigraphVertex:ru,LayeredDigraphEdge:Op,TreeLayout:br,TreeNetwork:Jf,TreeVertex:fu,TreeEdge:_g};typeof ym=="object"&&ym.version&&vi("WARNING: a `go` object on the root object is already defined. "+("Debug"in ym?"debug ":"")+"version: "+ym.version+", replaced with version: "+ny.version),Ke.prototype.go=ny,Dn.go=ny,typeof Cn.exports=="object"&&(Cn.exports=typeof Qt.g!="undefined"?Qt.g.go:self.go)}();var Pt=typeof Qt.g!="undefined"?Qt.g.go:self.go;const te=typeof Qt.g!="undefined"?Qt.g.go:self.go,Ae=te.Group,Be=te.EnumValue,de=te.List,Ht=te.Set,ne=te.Map,ue=te.Point,ce=te.Size,Vt=te.Rect,De=te.Margin,Jt=te.Spot,be=te.Geometry,It=te.PathFigure,nt=te.PathSegment,et=te.InputEvent,At=te.DiagramEvent,at=te.ChangedEvent,ct=te.Model,pt=te.GraphLinksModel,xt=te.TreeModel,bt=te.Binding,Rt=te.Transaction,Ot=te.UndoManager,Wt=te.CommandHandler,Zt=te.Tool,$t=te.DraggingTool,Ce=te.DraggingInfo,ge=te.LinkingBaseTool,nn=te.LinkingTool,qe=te.RelinkingTool,En=te.LinkReshapingTool,Tn=te.ResizingTool,bn=te.RotatingTool,ni=te.ClickSelectingTool,In=te.ActionTool,Ee=te.ClickCreatingTool,ie=te.HTMLInfo,Pn=te.ContextMenuTool,pi=te.DragSelectingTool,Wn=te.PanningTool,un=te.TextEditingTool,Zn=te.ToolManager,si=te.Animation,Oi=te.AnimationManager,on=te.AnimationTrigger,ri=te.Layer,Le=te.Diagram,fi=te.Palette,Pi=te.Overview,jt=te.Brush,Mt=te.GraphObject,mt=te.Panel,vt=te.RowColumnDefinition,Lt=te.Shape,Bt=te.TextBlock,_t=te.TextBlockMetrics,Me=te.Picture,ye=te.Part,Ye=te.Adornment,Fe=te.Node,Te=te.Link,Oe=te.Placeholder,$e=te.Layout,yn=te.LayoutNetwork,Kn=te.LayoutVertex,Sn=te.LayoutEdge,ui=te.GridLayout,ci=te.PanelLayout,mi=te.CircularLayout,Mi=te.CircularNetwork,yr=te.CircularVertex,ki=te.CircularEdge,Ri=te.ForceDirectedLayout,Vi=te.ForceDirectedNetwork,Or=te.ForceDirectedVertex,qi=te.ForceDirectedEdge,Cr=te.LayeredDigraphLayout,xr=te.LayeredDigraphNetwork,Wr=te.LayeredDigraphVertex,$i=te.LayeredDigraphEdge,eo=te.TreeLayout,fo=te.TreeNetwork,Zr=te.TreeVertex,Fr=te.TreeEdge,ro=te.version},64270:function(Cn){(function(We,Qt){Cn.exports=Qt()})(this,function(){"use strict";var We=function(St,wt){return We=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ft,Ct){Ft.__proto__=Ct}||function(Ft,Ct){for(var Gt in Ct)Object.prototype.hasOwnProperty.call(Ct,Gt)&&(Ft[Gt]=Ct[Gt])},We(St,wt)};function Qt(St,wt){if(typeof wt!="function"&&wt!==null)throw new TypeError("Class extends value "+String(wt)+" is not a constructor or null");We(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,Gt=arguments.length;Ct<Gt;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 Gt(se){return se instanceof Ft?se:new Ft(function(Pe){Pe(se)})}return new(Ft||(Ft=Promise))(function(se,Pe){function Ze(On){try{kn(Ct.next(On))}catch(ei){Pe(ei)}}function Ie(On){try{kn(Ct.throw(On))}catch(ei){Pe(ei)}}function kn(On){On.done?se(On.value):Gt(On.value).then(Ze,Ie)}kn((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,Gt,se,Pe;return Pe={next:Ze(0),throw:Ze(1),return:Ze(2)},typeof Symbol=="function"&&(Pe[Symbol.iterator]=function(){return this}),Pe;function Ze(kn){return function(On){return Ie([kn,On])}}function Ie(kn){if(Ct)throw new TypeError("Generator is already executing.");for(;Ft;)try{if(Ct=1,Gt&&(se=kn[0]&2?Gt.return:kn[0]?Gt.throw||((se=Gt.return)&&se.call(Gt),0):Gt.next)&&!(se=se.call(Gt,kn[1])).done)return se;switch(Gt=0,se&&(kn=[kn[0]&2,se.value]),kn[0]){case 0:case 1:se=kn;break;case 4:return Ft.label++,{value:kn[1],done:!1};case 5:Ft.label++,Gt=kn[1],kn=[0];continue;case 7:kn=Ft.ops.pop(),Ft.trys.pop();continue;default:if(se=Ft.trys,!(se=se.length>0&&se[se.length-1])&&(kn[0]===6||kn[0]===2)){Ft=0;continue}if(kn[0]===3&&(!se||kn[1]>se[0]&&kn[1]<se[3])){Ft.label=kn[1];break}if(kn[0]===6&&Ft.label<se[1]){Ft.label=se[1],se=kn;break}if(se&&Ft.label<se[2]){Ft.label=se[2],Ft.ops.push(kn);break}se[2]&&Ft.ops.pop(),Ft.trys.pop();continue}kn=wt.call(St,Ft)}catch(On){kn=[6,On],Gt=0}finally{Ct=se=0}if(kn[0]&5)throw kn[1];return{value:kn[0]?kn[1]:void 0,done:!0}}}function Be(St,wt,Ft){if(Ft||arguments.length===2)for(var Ct=0,Gt=wt.length,se;Ct<Gt;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,Gt){this.left=wt,this.top=Ft,this.width=Ct,this.height=Gt}return St.prototype.add=function(wt,Ft,Ct,Gt){return new St(this.left+wt,this.top+Ft,this.width+Ct,this.height+Gt)},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(Gt){return Gt.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}(),Ht=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)),Gt=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,Gt)},ue=function(St){for(var wt=[],Ft=0,Ct=St.length;Ft<Ct;){var Gt=St.charCodeAt(Ft++);if(Gt>=55296&&Gt<=56319&&Ft<Ct){var se=St.charCodeAt(Ft++);(se&64512)===56320?wt.push(((Gt&1023)<<10)+(se&1023)+65536):(wt.push(Gt),Ft--)}else wt.push(Gt)}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=[],Gt=-1,se="";++Gt<Ft;){var Pe=St[Gt];Pe<=65535?Ct.push(Pe):(Pe-=65536,Ct.push((Pe>>10)+55296,Pe%1024+56320)),(Gt+1===Ft||Ct.length>16384)&&(se+=String.fromCharCode.apply(String,Ct),Ct.length=0)}return se},Vt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",De=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Jt=0;Jt<Vt.length;Jt++)De[Vt.charCodeAt(Jt)]=Jt;for(var be="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",It=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),nt=0;nt<be.length;nt++)It[be.charCodeAt(nt)]=nt;for(var et=function(St){var wt=St.length*.75,Ft=St.length,Ct,Gt=0,se,Pe,Ze,Ie;St[St.length-1]==="="&&(wt--,St[St.length-2]==="="&&wt--);var kn=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(wt):new Array(wt),On=Array.isArray(kn)?kn:new Uint8Array(kn);for(Ct=0;Ct<Ft;Ct+=4)se=It[St.charCodeAt(Ct)],Pe=It[St.charCodeAt(Ct+1)],Ze=It[St.charCodeAt(Ct+2)],Ie=It[St.charCodeAt(Ct+3)],On[Gt++]=se<<2|Pe>>4,On[Gt++]=(Pe&15)<<4|Ze>>2,On[Gt++]=(Ze&3)<<6|Ie&63;return kn},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,bt=pt-ct,Rt=65536>>ct,Ot=1<<ct,Wt=Ot-1,Zt=1024>>ct,$t=Rt+Zt,Ce=$t,ge=32,nn=Ce+ge,qe=65536>>pt,En=1<<bt,Tn=En-1,bn=function(St,wt,Ft){return St.slice?St.slice(wt,Ft):new Uint16Array(Array.prototype.slice.call(St,wt,Ft))},ni=function(St,wt,Ft){return St.slice?St.slice(wt,Ft):new Uint32Array(Array.prototype.slice.call(St,wt,Ft))},In=function(St,wt){var Ft=et(St),Ct=Array.isArray(Ft)?at(Ft):new Uint32Array(Ft),Gt=Array.isArray(Ft)?At(Ft):new Uint16Array(Ft),se=24,Pe=bn(Gt,se/2,Ct[4]/2),Ze=Ct[5]===2?bn(Gt,(se+Ct[4])/2):ni(Ct,Math.ceil((se+Ct[4])/4));return new Ee(Ct[0],Ct[1],Ct[2],Ct[3],Pe,Ze)},Ee=function(){function St(wt,Ft,Ct,Gt,se,Pe){this.initialValue=wt,this.errorValue=Ft,this.highStart=Ct,this.highValueIndex=Gt,this.index=se,this.data=Pe}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&Wt),this.data[Ft];if(wt<=65535)return Ft=this.index[Rt+(wt-55296>>ct)],Ft=(Ft<<xt)+(wt&Wt),this.data[Ft];if(wt<this.highStart)return Ft=nn-qe+(wt>>pt),Ft=this.index[Ft],Ft+=wt>>ct&Tn,Ft=this.index[Ft],Ft=(Ft<<xt)+(wt&Wt),this.data[Ft];if(wt<=1114111)return this.data[this.highValueIndex]}return this.errorValue},St}(),ie="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pn=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),pi=0;pi<ie.length;pi++)Pn[ie.charCodeAt(pi)]=pi;var Wn="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,Zn=1,si=2,Oi=3,on=4,ri=5,Le=7,fi=8,Pi=9,jt=10,Mt=11,mt=12,vt=13,Lt=14,Bt=15,_t=16,Me=17,ye=18,Ye=19,Fe=20,Te=21,Oe=22,$e=23,yn=24,Kn=25,Sn=26,ui=27,ci=28,mi=29,Mi=30,yr=31,ki=32,Ri=33,Vi=34,Or=35,qi=36,Cr=37,xr=38,Wr=39,$i=40,eo=41,fo=42,Zr=43,Fr=[9001,65288],ro="!",Tt="\xD7",Gi="\xF7",Zi=In(Wn),Yr=[Mi,qi],bo=[Zn,si,Oi,ri],ko=[jt,fi],$o=[ui,Sn],Xi=bo.concat(ko),Ni=[xr,Wr,$i,Vi,Or],_e=[Bt,vt],Re=function(St,wt){wt===void 0&&(wt="strict");var Ft=[],Ct=[],Gt=[];return St.forEach(function(se,Pe){var Ze=Zi.get(se);if(Ze>un?(Gt.push(!0),Ze-=un):Gt.push(!1),["normal","auto","loose"].indexOf(wt)!==-1&&[8208,8211,12316,12448].indexOf(se)!==-1)return Ct.push(Pe),Ft.push(_t);if(Ze===on||Ze===Mt){if(Pe===0)return Ct.push(Pe),Ft.push(Mi);var Ie=Ft[Pe-1];return Xi.indexOf(Ie)===-1?(Ct.push(Ct[Pe-1]),Ft.push(Ie)):(Ct.push(Pe),Ft.push(Mi))}if(Ct.push(Pe),Ze===yr)return Ft.push(wt==="strict"?Te:Cr);if(Ze===fo||Ze===mi)return Ft.push(Mi);if(Ze===Zr)return se>=131072&&se<=196605||se>=196608&&se<=262141?Ft.push(Cr):Ft.push(Mi);Ft.push(Ze)}),[Ct,Ft,Gt]},Ue=function(St,wt,Ft,Ct){var Gt=Ct[Ft];if(Array.isArray(St)?St.indexOf(Gt)!==-1:St===Gt)for(var se=Ft;se<=Ct.length;){se++;var Pe=Ct[se];if(Pe===wt)return!0;if(Pe!==jt)break}if(Gt===jt)for(var se=Ft;se>0;){se--;var Ze=Ct[se];if(Array.isArray(St)?St.indexOf(Ze)!==-1:St===Ze)for(var Ie=Ft;Ie<=Ct.length;){Ie++;var Pe=Ct[Ie];if(Pe===wt)return!0;if(Pe!==jt)break}if(Ze!==jt)break}return!1},gi=function(St,wt){for(var Ft=St;Ft>=0;){var Ct=wt[Ft];if(Ct===jt)Ft--;else return Ct}return 0},xe=function(St,wt,Ft,Ct,Gt){if(Ft[Ct]===0)return Tt;var se=Ct-1;if(Array.isArray(Gt)&&Gt[se]===!0)return Tt;var Pe=se-1,Ze=se+1,Ie=wt[se],kn=Pe>=0?wt[Pe]:0,On=wt[Ze];if(Ie===si&&On===Oi)return Tt;if(bo.indexOf(Ie)!==-1)return ro;if(bo.indexOf(On)!==-1||ko.indexOf(On)!==-1)return Tt;if(gi(se,wt)===fi)return Gi;if(Zi.get(St[se])===Mt||(Ie===ki||Ie===Ri)&&Zi.get(St[Ze])===Mt||Ie===Le||On===Le||Ie===Pi||[jt,vt,Bt].indexOf(Ie)===-1&&On===Pi||[Me,ye,Ye,yn,ci].indexOf(On)!==-1||gi(se,wt)===Oe||Ue($e,Oe,se,wt)||Ue([Me,ye],Te,se,wt)||Ue(mt,mt,se,wt))return Tt;if(Ie===jt)return Gi;if(Ie===$e||On===$e)return Tt;if(On===_t||Ie===_t)return Gi;if([vt,Bt,Te].indexOf(On)!==-1||Ie===Lt||kn===qi&&_e.indexOf(Ie)!==-1||Ie===ci&&On===qi||On===Fe||Yr.indexOf(On)!==-1&&Ie===Kn||Yr.indexOf(Ie)!==-1&&On===Kn||Ie===ui&&[Cr,ki,Ri].indexOf(On)!==-1||[Cr,ki,Ri].indexOf(Ie)!==-1&&On===Sn||Yr.indexOf(Ie)!==-1&&$o.indexOf(On)!==-1||$o.indexOf(Ie)!==-1&&Yr.indexOf(On)!==-1||[ui,Sn].indexOf(Ie)!==-1&&(On===Kn||[Oe,Bt].indexOf(On)!==-1&&wt[Ze+1]===Kn)||[Oe,Bt].indexOf(Ie)!==-1&&On===Kn||Ie===Kn&&[Kn,ci,yn].indexOf(On)!==-1)return Tt;if([Kn,ci,yn,Me,ye].indexOf(On)!==-1)for(var ei=se;ei>=0;){var Ii=wt[ei];if(Ii===Kn)return Tt;if([ci,yn].indexOf(Ii)!==-1)ei--;else break}if([ui,Sn].indexOf(On)!==-1)for(var ei=[Me,ye].indexOf(Ie)!==-1?Pe:se;ei>=0;){var Ii=wt[ei];if(Ii===Kn)return Tt;if([ci,yn].indexOf(Ii)!==-1)ei--;else break}if(xr===Ie&&[xr,Wr,Vi,Or].indexOf(On)!==-1||[Wr,Vi].indexOf(Ie)!==-1&&[Wr,$i].indexOf(On)!==-1||[$i,Or].indexOf(Ie)!==-1&&On===$i||Ni.indexOf(Ie)!==-1&&[Fe,Sn].indexOf(On)!==-1||Ni.indexOf(On)!==-1&&Ie===ui||Yr.indexOf(Ie)!==-1&&Yr.indexOf(On)!==-1||Ie===yn&&Yr.indexOf(On)!==-1||Yr.concat(Kn).indexOf(Ie)!==-1&&On===Oe&&Fr.indexOf(St[Ze])===-1||Yr.concat(Kn).indexOf(On)!==-1&&Ie===ye)return Tt;if(Ie===eo&&On===eo){for(var Ir=Ft[se],pr=1;Ir>0&&(Ir--,wt[Ir]===eo);)pr++;if(pr%2!==0)return Tt}return Ie===ki&&On===Ri?Tt:Gi},Hi=function(St,wt){wt||(wt={lineBreak:"normal",wordBreak:"normal"});var Ft=Re(St,wt.lineBreak),Ct=Ft[0],Gt=Ft[1],se=Ft[2];(wt.wordBreak==="break-all"||wt.wordBreak==="break-word")&&(Gt=Gt.map(function(Ze){return[Kn,Mi,fo].indexOf(Ze)!==-1?Cr:Ze}));var Pe=wt.wordBreak==="keep-all"?se.map(function(Ze,Ie){return Ze&&St[Ie]>=19968&&St[Ie]<=40959}):void 0;return[Ct,Gt,Pe]},Dn=function(){function St(wt,Ft,Ct,Gt){this.codePoints=wt,this.required=Ft===ro,this.start=Ct,this.end=Gt}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=Hi(Ft,wt),Gt=Ct[0],se=Ct[1],Pe=Ct[2],Ze=Ft.length,Ie=0,kn=0;return{next:function(){if(kn>=Ze)return{done:!0,value:null};for(var On=Tt;kn<Ze&&(On=xe(Ft,se,Gt,++kn,Pe))===Tt;);if(On!==Tt||kn===Ze){var ei=new Dn(Ft,On,Ie,kn);return Ie=kn,{value:ei,done:!1}}return{done:!0,value:null}}}},Ve=1,ze=2,ai=4,he=8,an=10,Yn=47,vi=92,ln=9,qn=32,li=34,Xe=61,sn=35,wn=36,Mn=37,ii=39,_i=40,Ki=41,Ti=95,en=45,Lr=33,cr=60,Ur=62,rn=64,oi=91,Ci=93,bi=61,xi=123,Ei=63,Yi=125,sr=124,oe=126,ae=128,ee=65533,je=42,Se=43,An=44,Nn=58,Vn=59,Qi=46,Si=0,Ne=8,wi=11,ke=14,hn=31,Qe=127,Ut=-1,pn=48,fn=97,Qn=101,Gn=102,jn=117,dn=122,tn=65,gn=69,mn=70,xn=85,hi=90,zn=function(St){return St>=pn&&St<=57},Xn=function(St){return St>=55296&&St<=57343},cn=function(St){return zn(St)||St>=tn&&St<=mn||St>=fn&&St<=Gn},ti=function(St){return St>=fn&&St<=dn},Di=function(St){return St>=tn&&St<=hi},ir=function(St){return ti(St)||Di(St)},Ji=function(St){return St>=ae},fr=function(St){return St===an||St===ln||St===qn},dr=function(St){return ir(St)||Ji(St)||St===Ti},Er=function(St){return dr(St)||zn(St)||St===en},Gr=function(St){return St>=Si&&St<=Ne||St===wi||St>=ke&&St<=hn||St===Qe},Tr=function(St,wt){return St!==vi?!1:wt!==an},oo=function(St,wt,Ft){return St===en?dr(wt)||Tr(wt,Ft):dr(St)?!0:!!(St===vi&&Tr(St,wt))},He=function(St,wt,Ft){return St===Se||St===en?zn(wt)?!0:wt===Qi&&zn(Ft):zn(St===Qi?wt:St)},gr=function(St){var wt=0,Ft=1;(St[wt]===Se||St[wt]===en)&&(St[wt]===en&&(Ft=-1),wt++);for(var Ct=[];zn(St[wt]);)Ct.push(St[wt++]);var Gt=Ct.length?parseInt(ce.apply(void 0,Ct),10):0;St[wt]===Qi&&wt++;for(var se=[];zn(St[wt]);)se.push(St[wt++]);var Pe=se.length,Ze=Pe?parseInt(ce.apply(void 0,se),10):0;(St[wt]===gn||St[wt]===Qn)&&wt++;var Ie=1;(St[wt]===Se||St[wt]===en)&&(St[wt]===en&&(Ie=-1),wt++);for(var kn=[];zn(St[wt]);)kn.push(St[wt++]);var On=kn.length?parseInt(ce.apply(void 0,kn),10):0;return Ft*(Gt+Ze*Math.pow(10,-Pe))*Math.pow(10,Ie*On)},Dr={type:2},nr={type:3},Qr={type:4},ar={type:13},vo={type:8},Jr={type:21},Nr={type:9},co={type:10},ks={type:11},ls={type:12},la={type:14},Is={type:23},lr={type:1},Eo={type:25},os={type:24},zi={type:26},Wi={type:27},rr={type:28},_n={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 li:return this.consumeStringToken(li);case sn:var Ft=this.peekCodePoint(0),Ct=this.peekCodePoint(1),Gt=this.peekCodePoint(2);if(Er(Ft)||Tr(Ct,Gt)){var se=oo(Ft,Ct,Gt)?ze:Ve,Pe=this.consumeName();return{type:5,value:Pe,flags:se}}break;case wn:if(this.peekCodePoint(0)===Xe)return this.consumeCodePoint(),ar;break;case ii:return this.consumeStringToken(ii);case _i:return Dr;case Ki:return nr;case je:if(this.peekCodePoint(0)===Xe)return this.consumeCodePoint(),la;break;case Se:if(He(wt,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(wt),this.consumeNumericToken();break;case An:return Qr;case en:var Ze=wt,Ie=this.peekCodePoint(0),kn=this.peekCodePoint(1);if(He(Ze,Ie,kn))return this.reconsumeCodePoint(wt),this.consumeNumericToken();if(oo(Ze,Ie,kn))return this.reconsumeCodePoint(wt),this.consumeIdentLikeToken();if(Ie===en&&kn===Ur)return this.consumeCodePoint(),this.consumeCodePoint(),os;break;case Qi:if(He(wt,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(wt),this.consumeNumericToken();break;case Yn:if(this.peekCodePoint(0)===je)for(this.consumeCodePoint();;){var On=this.consumeCodePoint();if(On===je&&(On=this.consumeCodePoint(),On===Yn))return this.consumeToken();if(On===Ut)return this.consumeToken()}break;case Nn:return zi;case Vn:return Wi;case cr:if(this.peekCodePoint(0)===Lr&&this.peekCodePoint(1)===en&&this.peekCodePoint(2)===en)return this.consumeCodePoint(),this.consumeCodePoint(),Eo;break;case rn:var ei=this.peekCodePoint(0),Ii=this.peekCodePoint(1),Ir=this.peekCodePoint(2);if(oo(ei,Ii,Ir)){var Pe=this.consumeName();return{type:7,value:Pe}}break;case oi:return rr;case vi:if(Tr(wt,this.peekCodePoint(0)))return this.reconsumeCodePoint(wt),this.consumeIdentLikeToken();break;case Ci:return _n;case bi:if(this.peekCodePoint(0)===Xe)return this.consumeCodePoint(),vo;break;case xi:return ks;case Yi:return ls;case jn:case xn:var pr=this.peekCodePoint(0),Br=this.peekCodePoint(1);return pr===Se&&(cn(Br)||Br===Ei)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(wt),this.consumeIdentLikeToken();case sr:if(this.peekCodePoint(0)===Xe)return this.consumeCodePoint(),Nr;if(this.peekCodePoint(0)===sr)return this.consumeCodePoint(),Jr;break;case oe:if(this.peekCodePoint(0)===Xe)return this.consumeCodePoint(),co;break;case Ut:return kr}return fr(wt)?(this.consumeWhiteSpace(),Ar):zn(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===Ei&&wt.length<6;)wt.push(Ft),Ft=this.consumeCodePoint(),Ct=!0;if(Ct){var Gt=parseInt(ce.apply(void 0,wt.map(function(Ie){return Ie===Ei?pn:Ie})),16),se=parseInt(ce.apply(void 0,wt.map(function(Ie){return Ie===Ei?mn:Ie})),16);return{type:30,start:Gt,end:se}}var Pe=parseInt(ce.apply(void 0,wt),16);if(this.peekCodePoint(0)===en&&cn(this.peekCodePoint(1))){this.consumeCodePoint(),Ft=this.consumeCodePoint();for(var Ze=[];cn(Ft)&&Ze.length<6;)Ze.push(Ft),Ft=this.consumeCodePoint();var se=parseInt(ce.apply(void 0,Ze),16);return{type:30,start:Pe,end:se}}else return{type:30,start:Pe,end:Pe}},St.prototype.consumeIdentLikeToken=function(){var wt=this.consumeName();return wt.toLowerCase()==="url"&&this.peekCodePoint(0)===_i?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===_i?(this.consumeCodePoint(),{type:19,value:wt}):{type:20,value:wt}},St.prototype.consumeUrlToken=function(){var wt=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ut)return{type:22,value:""};var Ft=this.peekCodePoint(0);if(Ft===ii||Ft===li){var Ct=this.consumeStringToken(this.consumeCodePoint());return Ct.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ut||this.peekCodePoint(0)===Ki)?(this.consumeCodePoint(),{type:22,value:Ct.value}):(this.consumeBadUrlRemnants(),Is)}for(;;){var Gt=this.consumeCodePoint();if(Gt===Ut||Gt===Ki)return{type:22,value:ce.apply(void 0,wt)};if(fr(Gt))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Ut||this.peekCodePoint(0)===Ki?(this.consumeCodePoint(),{type:22,value:ce.apply(void 0,wt)}):(this.consumeBadUrlRemnants(),Is);if(Gt===li||Gt===ii||Gt===_i||Gr(Gt))return this.consumeBadUrlRemnants(),Is;if(Gt===vi)if(Tr(Gt,this.peekCodePoint(0)))wt.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Is;else wt.push(Gt)}},St.prototype.consumeWhiteSpace=function(){for(;fr(this.peekCodePoint(0));)this.consumeCodePoint()},St.prototype.consumeBadUrlRemnants=function(){for(;;){var wt=this.consumeCodePoint();if(wt===Ki||wt===Ut)return;Tr(wt,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},St.prototype.consumeStringSlice=function(wt){for(var Ft=5e4,Ct="";wt>0;){var Gt=Math.min(Ft,wt);Ct+=ce.apply(void 0,this._value.splice(0,Gt)),wt-=Gt}return this._value.shift(),Ct},St.prototype.consumeStringToken=function(wt){var Ft="",Ct=0;do{var Gt=this._value[Ct];if(Gt===Ut||Gt===void 0||Gt===wt)return Ft+=this.consumeStringSlice(Ct),{type:0,value:Ft};if(Gt===an)return this._value.splice(0,Ct),lr;if(Gt===vi){var se=this._value[Ct+1];se!==Ut&&se!==void 0&&(se===an?(Ft+=this.consumeStringSlice(Ct),Ct=-1,this._value.shift()):Tr(Gt,se)&&(Ft+=this.consumeStringSlice(Ct),Ft+=ce(this.consumeEscapedCodePoint()),Ct=-1))}Ct++}while(!0)},St.prototype.consumeNumber=function(){var wt=[],Ft=ai,Ct=this.peekCodePoint(0);for((Ct===Se||Ct===en)&&wt.push(this.consumeCodePoint());zn(this.peekCodePoint(0));)wt.push(this.consumeCodePoint());Ct=this.peekCodePoint(0);var Gt=this.peekCodePoint(1);if(Ct===Qi&&zn(Gt))for(wt.push(this.consumeCodePoint(),this.consumeCodePoint()),Ft=he;zn(this.peekCodePoint(0));)wt.push(this.consumeCodePoint());Ct=this.peekCodePoint(0),Gt=this.peekCodePoint(1);var se=this.peekCodePoint(2);if((Ct===gn||Ct===Qn)&&((Gt===Se||Gt===en)&&zn(se)||zn(Gt)))for(wt.push(this.consumeCodePoint(),this.consumeCodePoint()),Ft=he;zn(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],Gt=this.peekCodePoint(0),se=this.peekCodePoint(1),Pe=this.peekCodePoint(2);if(oo(Gt,se,Pe)){var Ze=this.consumeName();return{type:15,number:Ft,flags:Ct,unit:Ze}}return Gt===Mn?(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||Xn(Ct)||Ct>1114111?ee:Ct}return wt===Ut?ee:wt},St.prototype.consumeName=function(){for(var wt="";;){var Ft=this.consumeCodePoint();if(Er(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},Pr=function(St){return St.type===17},$r=function(St){return St.type===20},so=function(St){return St.type===0},ts=function(St,wt){return $r(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]]},lo={type:17,number:0,flags:ai},da={type:16,number:50,flags:ai},_a={type:16,number:100,flags:ai},hl=function(St,wt,Ft){var Ct=St[0],Gt=St[1];return[Zo(Ct,wt),Zo(typeof Gt!="undefined"?Gt: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($r).map(function(Ft){return Ft.value}).join(" ");switch(wt){case"to bottom right":case"to right bottom":case"left top":case"top left":return[lo,lo];case"to top":case"bottom":return wa(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[lo,_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,lo];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),Gt=wt.value.substring(1,2),se=wt.value.substring(2,3);return hs(parseInt(Ct+Ct,16),parseInt(Gt+Gt,16),parseInt(se+se,16),1)}if(wt.value.length===4){var Ct=wt.value.substring(0,1),Gt=wt.value.substring(1,2),se=wt.value.substring(2,3),Pe=wt.value.substring(3,4);return hs(parseInt(Ct+Ct,16),parseInt(Gt+Gt,16),parseInt(se+se,16),parseInt(Pe+Pe,16)/255)}if(wt.value.length===6){var Ct=wt.value.substring(0,2),Gt=wt.value.substring(2,4),se=wt.value.substring(4,6);return hs(parseInt(Ct,16),parseInt(Gt,16),parseInt(se,16),1)}if(wt.value.length===8){var Ct=wt.value.substring(0,2),Gt=wt.value.substring(2,4),se=wt.value.substring(4,6),Pe=wt.value.substring(6,8);return hs(parseInt(Ct,16),parseInt(Gt,16),parseInt(se,16),parseInt(Pe,16)/255)}}if(wt.type===20){var Ze=ss[wt.value.toUpperCase()];if(typeof Ze!="undefined")return Ze}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,Gt=255&St>>24;return wt<255?"rgba("+Gt+","+Ct+","+Ft+","+wt/255+")":"rgb("+Gt+","+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),Gt=Ct[0],se=Ct[1],Pe=Ct[2];return hs(Gt,se,Pe,1)}if(Ft.length===4){var Ze=Ft.map(js),Gt=Ze[0],se=Ze[1],Pe=Ze[2],Ie=Ze[3];return hs(Gt,se,Pe,Ie)}return 0};function ao(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],Gt=Ft[1],se=Ft[2],Pe=Ft[3],Ze=(Ct.type===17?wa(Ct.number):ws.parse(St,Ct))/(Math.PI*2),Ie=Wo(Gt)?Gt.number/100:0,kn=Wo(se)?se.number/100:0,On=typeof Pe!="undefined"&&Wo(Pe)?Zo(Pe,1):1;if(Ie===0)return hs(kn*255,kn*255,kn*255,1);var ei=kn<=.5?kn*(Ie+1):kn+Ie-kn*Ie,Ii=kn*2-ei,Ir=ao(Ii,ei,Ze+1/3),pr=ao(Ii,ei,Ze),Br=ao(Ii,ei,Ze-1/3);return hs(Ir*255,pr*255,Br*255,On)},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},er={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(St,wt){return wt.map(function(Ft){if($r(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"},we=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}},Un=function(St,wt){var Ft=St[0],Ct=St[St.length-1];Ft.stop===null&&(Ft.stop=lo),Ct.stop===null&&(Ct.stop=_a);for(var Gt=[],se=0,Pe=0;Pe<St.length;Pe++){var Ze=St[Pe].stop;if(Ze!==null){var Ie=Zo(Ze,wt);Ie>se?Gt.push(Ie):Gt.push(se),se=Ie}else Gt.push(null)}for(var kn=null,Pe=0;Pe<Gt.length;Pe++){var On=Gt[Pe];if(On===null)kn===null&&(kn=Pe);else if(kn!==null){for(var ei=Pe-kn,Ii=Gt[kn-1],Ir=(On-Ii)/(ei+1),pr=1;pr<=ei;pr++)Gt[kn+pr-1]=Ir*pr;kn=null}}return St.map(function(Br,Ko){var qr=Br.color;return{color:qr,stop:Math.max(Math.min(1,Gt[Ko]/wt),0)}})},su=function(St,wt,Ft){var Ct=wt/2,Gt=Ft/2,se=Zo(St[0],wt)-Ct,Pe=Gt-Zo(St[1],Ft);return(Math.atan2(Pe,se)+Math.PI*2)%(Math.PI*2)},hA=function(St,wt,Ft){var Ct=typeof St=="number"?St:su(St,wt,Ft),Gt=Math.abs(wt*Math.sin(Ct))+Math.abs(Ft*Math.cos(Ct)),se=wt/2,Pe=Ft/2,Ze=Gt/2,Ie=Math.sin(Ct-Math.PI/2)*Ze,kn=Math.cos(Ct-Math.PI/2)*Ze;return[Gt,se-kn,se+kn,Pe-Ie,Pe+Ie]},as=function(St,wt){return Math.sqrt(St*St+wt*wt)},dl=function(St,wt,Ft,Ct,Gt){var se=[[0,0],[0,wt],[St,0],[St,wt]];return se.reduce(function(Pe,Ze){var Ie=Ze[0],kn=Ze[1],On=as(Ft-Ie,Ct-kn);return(Gt?On<Pe.optimumDistance:On>Pe.optimumDistance)?{optimumCorner:Ze,optimumDistance:On}:Pe},{optimumDistance:Gt?1/0:-1/0,optimumCorner:null}).optimumCorner},vu=function(St,wt,Ft,Ct,Gt){var se=0,Pe=0;switch(St.size){case 0:St.shape===0?se=Pe=Math.min(Math.abs(wt),Math.abs(wt-Ct),Math.abs(Ft),Math.abs(Ft-Gt)):St.shape===1&&(se=Math.min(Math.abs(wt),Math.abs(wt-Ct)),Pe=Math.min(Math.abs(Ft),Math.abs(Ft-Gt)));break;case 2:if(St.shape===0)se=Pe=Math.min(as(wt,Ft),as(wt,Ft-Gt),as(wt-Ct,Ft),as(wt-Ct,Ft-Gt));else if(St.shape===1){var Ze=Math.min(Math.abs(Ft),Math.abs(Ft-Gt))/Math.min(Math.abs(wt),Math.abs(wt-Ct)),Ie=dl(Ct,Gt,wt,Ft,!0),kn=Ie[0],On=Ie[1];se=as(kn-wt,(On-Ft)/Ze),Pe=Ze*se}break;case 1:St.shape===0?se=Pe=Math.max(Math.abs(wt),Math.abs(wt-Ct),Math.abs(Ft),Math.abs(Ft-Gt)):St.shape===1&&(se=Math.max(Math.abs(wt),Math.abs(wt-Ct)),Pe=Math.max(Math.abs(Ft),Math.abs(Ft-Gt)));break;case 3:if(St.shape===0)se=Pe=Math.max(as(wt,Ft),as(wt,Ft-Gt),as(wt-Ct,Ft),as(wt-Ct,Ft-Gt));else if(St.shape===1){var Ze=Math.max(Math.abs(Ft),Math.abs(Ft-Gt))/Math.max(Math.abs(wt),Math.abs(wt-Ct)),ei=dl(Ct,Gt,wt,Ft,!1),kn=ei[0],On=ei[1];se=as(kn-wt,(On-Ft)/Ze),Pe=Ze*se}break}return Array.isArray(St.size)&&(se=Zo(St.size[0],Ct),Pe=St.size.length===2?Zo(St.size[1],Gt):se),[se,Pe]},cA=function(St,wt){var Ft=wa(180),Ct=[];return zo(wt).forEach(function(Gt,se){if(se===0){var Pe=Gt[0];if(Pe.type===20&&Pe.value==="to"){Ft=AA(Gt);return}else if(Gu(Pe)){Ft=ws.parse(St,Pe);return}}var Ze=we(St,Gt);Ct.push(Ze)}),{angle:Ft,stops:Ct,type:1}},au=function(St,wt){var Ft=wa(180),Ct=[];return zo(wt).forEach(function(Gt,se){if(se===0){var Pe=Gt[0];if(Pe.type===20&&["top","left","right","bottom"].indexOf(Pe.value)!==-1){Ft=AA(Gt);return}else if(Gu(Pe)){Ft=(ws.parse(St,Pe)+wa(270))%wa(360);return}}var Ze=we(St,Gt);Ct.push(Ze)}),{angle:Ft,stops:Ct,type:1}},Ss=function(St,wt){var Ft=wa(180),Ct=[],Gt=1,se=0,Pe=3,Ze=[];return zo(wt).forEach(function(Ie,kn){var On=Ie[0];if(kn===0){if($r(On)&&On.value==="linear"){Gt=1;return}else if($r(On)&&On.value==="radial"){Gt=2;return}}if(On.type===18){if(On.name==="from"){var ei=tl.parse(St,On.values[0]);Ct.push({stop:lo,color:ei})}else if(On.name==="to"){var ei=tl.parse(St,On.values[0]);Ct.push({stop:_a,color:ei})}else if(On.name==="color-stop"){var Ii=On.values.filter(Vo);if(Ii.length===2){var ei=tl.parse(St,Ii[1]),Ir=Ii[0];Pr(Ir)&&Ct.push({stop:{type:16,number:Ir.number*100,flags:Ir.flags},color:ei})}}}}),Gt===1?{angle:(Ft+wa(180))%wa(360),stops:Ct,type:Gt}:{size:Pe,shape:se,stops:Ct,position:Ze,type:Gt}},Kr="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,Gt=[],se=[];return zo(wt).forEach(function(Pe,Ze){var Ie=!0;if(Ze===0){var kn=!1;Ie=Pe.reduce(function(ei,Ii){if(kn)if($r(Ii))switch(Ii.value){case"center":return se.push(da),ei;case"top":case"left":return se.push(lo),ei;case"right":case"bottom":return se.push(_a),ei}else(Wo(Ii)||ys(Ii))&&se.push(Ii);else if($r(Ii))switch(Ii.value){case po:return Ft=0,!1;case Bs:return Ft=1,!1;case"at":return kn=!0,!1;case Kr: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(Ii)||Wo(Ii))return Array.isArray(Ct)||(Ct=[]),Ct.push(Ii),!1;return ei},Ie)}if(Ie){var On=we(St,Pe);Gt.push(On)}}),{size:Ct,shape:Ft,stops:Gt,position:se,type:2}},Vs=function(St,wt){var Ft=0,Ct=3,Gt=[],se=[];return zo(wt).forEach(function(Pe,Ze){var Ie=!0;if(Ze===0?Ie=Pe.reduce(function(On,ei){if($r(ei))switch(ei.value){case"center":return se.push(da),!1;case"top":case"left":return se.push(lo),!1;case"right":case"bottom":return se.push(_a),!1}else if(Wo(ei)||ys(ei))return se.push(ei),!1;return On},Ie):Ze===1&&(Ie=Pe.reduce(function(On,ei){if($r(ei))switch(ei.value){case po:return Ft=0,!1;case Bs:return Ft=1,!1;case ns:case Kr: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 On},Ie)),Ie){var kn=we(St,Pe);Gt.push(kn)}}),{size:Ct,shape:Ft,stops:Gt,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 No(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)&&No(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($r(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($r).map(function(Ct){return Ct.value}).join(" ")}).map(_r)}},_r=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 $r(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($r).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 $r(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($r).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:lo,offsetY:lo,blur:lo},Gt=0,se=0;se<Ft.length;se++){var Pe=Ft[se];ys(Pe)?(Gt===0?Ct.offsetX=Pe:Gt===1?Ct.offsetY=Pe:Ct.blur=Pe,Gt++):Ct.color=tl.parse(St,Pe)}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 Gt=wt[4],se=wt[5];wt[6],wt[7],wt[8],wt[9],wt[10],wt[11];var Pe=wt[12],Ze=wt[13];return wt[14],wt[15],wt.length===16?[Ft,Ct,Gt,se,Pe,Ze]:null},Bu={matrix:El,matrix3d:ia},Ll={type:16,number:50,flags:ai},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(Pr(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 Pr(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($r).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(Gt){switch(Gt.type){case 20:case 0:Ft.push(Gt.value);break;case 17:Ft.push(Gt.number.toString());break;case 4:Ct.push(Ft.join(" ")),Ft.length=0;break}}),Ft.length&&Ct.push(Ft.join(" ")),Ct.map(function(Gt){return Gt.indexOf(" ")===-1?Gt:"'"+Gt+"'"})}},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(Pr(wt))return wt.number;if($r(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($r).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=[],Gt=wt.filter(yo),se=0;se<Gt.length;se++){var Pe=Gt[se],Ze=Gt[se+1];if(Pe.type===20){var Ie=Ze&&Pr(Ze)?Ze.number:1;Ct.push({counter:Pe.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),Gt=0;Gt<Ct.length;Gt++){var se=Ct[Gt],Pe=Ct[Gt+1];if($r(se)&&se.value!=="none"){var Ze=Pe&&Pr(Pe)?Pe.number:0;Ft.push({counter:se.value,reset:Ze})}}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=[],Gt=wt.filter(so);if(Gt.length%2!==0)return null;for(var se=0;se<Gt.length;se+=2){var Pe=Gt[se].value,Ze=Gt[se+1].value;Ct.push({open:Pe,close:Ze})}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:lo,offsetY:lo,blur:lo,spread:lo,inset:!1},Gt=0,se=0;se<Ft.length;se++){var Pe=Ft[se];ts(Pe,"inset")?Ct.inset=!0:ys(Pe)?(Gt===0?Ct.offsetX=Pe:Gt===1?Ct.offsetY=Pe:Gt===2?Ct.blur=Pe:Ct.spread=Pe,Gt++):Ct.color=tl.parse(St,Pe)}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($r).forEach(function(Gt){switch(Gt.value){case"stroke":Ct.push(1);break;case"fill":Ct.push(0);break;case"markers":Ct.push(2);break}}),Ft.forEach(function(Gt){Ct.indexOf(Gt)===-1&&Ct.push(Gt)}),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,Gt;this.animationDuration=zr(wt,Md,Ft.animationDuration),this.backgroundClip=zr(wt,er,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,(Gt=Ft.textDecorationLine)!==null&&Gt!==void 0?Gt: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,Gt=Ft!==null&&typeof Ft!="undefined"?Ft.toString():wt.initialValue;Ct.write(Gt);var se=new Ts(Ct.read());switch(wt.type){case 2:var Pe=se.parseComponentValue();return wt.parse(St,$r(Pe)?Pe.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 Ze=se.parseComponentValue();return ys(Ze)?Ze:lo;case"length-percentage":var Ie=se.parseComponentValue();return Wo(Ie)?Ie:lo;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=Ht(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,Gt=0,se,Pe,Ze,Ie;St[St.length-1]==="="&&(wt--,St[St.length-2]==="="&&wt--);var kn=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(wt):new Array(wt),On=Array.isArray(kn)?kn:new Uint8Array(kn);for(Ct=0;Ct<Ft;Ct+=4)se=Vh[St.charCodeAt(Ct)],Pe=Vh[St.charCodeAt(Ct+1)],Ze=Vh[St.charCodeAt(Ct+2)],Ie=Vh[St.charCodeAt(Ct+3)],On[Gt++]=se<<2|Pe>>4,On[Gt++]=(Pe&15)<<4|Ze>>2,On[Gt++]=(Ze&3)<<6|Ie&63;return kn},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),Gt=Array.isArray(Ft)?mh(Ft):new Uint16Array(Ft),se=24,Pe=mf(Gt,se/2,Ct[4]/2),Ze=Ct[5]===2?mf(Gt,(se+Ct[4])/2):vf(Ct,Math.ceil((se+Ct[4])/4));return new Zh(Ct[0],Ct[1],Ct[2],Ct[3],Pe,Ze)},Zh=function(){function St(wt,Ft,Ct,Gt,se,Pe){this.initialValue=wt,this.errorValue=Ft,this.highStart=Ct,this.highValueIndex=Gt,this.index=se,this.data=Pe}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,Ke=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 Gt=St.charCodeAt(Ft++);if(Gt>=55296&&Gt<=56319&&Ft<Ct){var se=St.charCodeAt(Ft++);(se&64512)===56320?wt.push(((Gt&1023)<<10)+(se&1023)+65536):(wt.push(Gt),Ft--)}else wt.push(Gt)}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=[],Gt=-1,se="";++Gt<Ft;){var Pe=St[Gt];Pe<=65535?Ct.push(Pe):(Pe-=65536,Ct.push((Pe>>10)+55296,Pe%1024+56320)),(Gt+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,Gt=wt[Ct],se=wt[Ft-1],Pe=wt[Ft];if(se===Nd&&Pe===Ke)return _l;if(se===Nd||se===Ke||se===zA||Pe===Nd||Pe===Ke||Pe===zA)return pl;if(se===Dd&&[Dd,Id,hg,Ma].indexOf(Pe)!==-1||(se===hg||se===Id)&&(Pe===Id||Pe===Vc)||(se===Ma||se===Vc)&&Pe===Vc||Pe===Yh||Pe===Mu||Pe===Ag||se===Td)return _l;if(se===Yh&&Pe===Ud){for(;Gt===Mu;)Gt=wt[--Ct];if(Gt===Ud)return _l}if(se===Qd&&Pe===Qd){for(var Ze=0;Gt===Qd;)Ze++,Gt=wt[--Ct];if(Ze%2===0)return _l}return pl},Zu=function(St){var wt=cg(St),Ft=wt.length,Ct=0,Gt=0,se=wt.map(Xh);return{next:function(){if(Ct>=Ft)return{done:!0,value:null};for(var Pe=_l;Ct<Ft&&(Pe=yf(wt,se,++Ct))===_l;);if(Pe!==_l||Ct===Ft){var Ze=dg.apply(null,wt.slice(Gt,Ct));return Gt=Ct,{value:Ze,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 Gt=Ft.getBoundingClientRect(),se=Math.round(Gt.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"?"&#128104;".repeat(10):"";var Ct=wt.firstChild,Gt=ue(Ct.data).map(function(Ie){return ce(Ie)}),se=0,Pe={},Ze=Gt.every(function(Ie,kn){Ft.setStart(Ct,se),Ft.setEnd(Ct,se+Ie.length);var On=Ft.getBoundingClientRect();se+=Ie.length;var ei=On.x>Pe.x||On.y>Pe.y;return Pe=On,kn===0?!0:ei});return St.body.removeChild(wt),Ze},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(Gt){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 Gt=new Image,se=wt.toDataURL();Gt.src=se;var Pe=Yc(Ft,Ft,0,0,Gt);return Ct.fillStyle="red",Ct.fillRect(0,0,Ft,Ft),Sf(Pe).then(function(Ze){Ct.drawImage(Ze,0,0);var Ie=Ct.getImageData(0,0,Ft,Ft).data;Ct.fillStyle="red",Ct.fillRect(0,0,Ft,Ft);var kn=St.createElement("div");return kn.style.backgroundImage="url("+se+")",kn.style.height=Ft+"px",Kl(Ie)?Sf(Yc(Ft,Ft,0,0,kn)):Promise.reject(!1)}).then(function(Ze){return Ct.drawImage(Ze,0,0),Kl(Ct.getImageData(0,0,Ft,Ft).data)}).catch(function(){return!1})},Yc=function(St,wt,Ft,Ct,Gt){var se="http://www.w3.org/2000/svg",Pe=document.createElementNS(se,"svg"),Ze=document.createElementNS(se,"foreignObject");return Pe.setAttributeNS(null,"width",St.toString()),Pe.setAttributeNS(null,"height",wt.toString()),Ze.setAttributeNS(null,"width","100%"),Ze.setAttributeNS(null,"height","100%"),Ze.setAttributeNS(null,"x",Ft.toString()),Ze.setAttributeNS(null,"y",Ct.toString()),Ze.setAttributeNS(null,"externalResourcesRequired","true"),Pe.appendChild(Ze),Ze.appendChild(Gt),Pe},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 Gt=tc(wt,Ft),se=[],Pe=0;return Gt.forEach(function(Ze){if(Ft.textDecorationLine.length||Ze.trim().length>0)if(ha.SUPPORT_RANGE_BOUNDS){var Ie=qh(Ct,Pe,Ze.length).getClientRects();if(Ie.length>1){var kn=$h(Ze),On=0;kn.forEach(function(Ii){se.push(new Da(Ii,de.fromDOMRectList(St,qh(Ct,On+Pe,Ii.length).getClientRects()))),On+=Ii.length})}else se.push(new Da(Ze,de.fromDOMRectList(St,Ie)))}else{var ei=Ct.splitText(Ze.length);se.push(new Da(Ze,oa(St,Ct))),Ct=ei}else ha.SUPPORT_RANGE_BOUNDS||(Ct=Ct.splitText(Ze.length));Pe+=Ze.length}),se},oa=function(St,wt){var Ft=wt.ownerDocument;if(Ft){var Ct=Ft.createElement("html2canvaswrapper");Ct.appendChild(wt.cloneNode(!0));var Gt=wt.parentNode;if(Gt){Gt.replaceChild(Ct,wt);var se=Ht(St,Ct);return Ct.firstChild&&Gt.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 Gt=Ct.createRange();return Gt.setStart(St,wt),Gt.setEnd(St,wt+Ft),Gt},$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=[],Gt,se=function(){if(Gt.value){var Pe=Gt.value.slice(),Ze=ue(Pe),Ie="";Ze.forEach(function(kn){ec.indexOf(kn)===-1?Ie+=ce(kn):(Ie.length&&Ct.push(Ie),Ct.push(ce(kn)),Ie="")}),Ie.length&&Ct.push(Ie)}};!(Gt=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){Qt(wt,St);function wt(Ft,Ct){var Gt=St.call(this,Ft,Ct)||this;return Gt.src=Ct.currentSrc||Ct.src,Gt.intrinsicWidth=Ct.naturalWidth,Gt.intrinsicHeight=Ct.naturalHeight,Gt.context.cache.addImage(Gt.src),Gt}return wt}(Fu),Jc=function(St){Qt(wt,St);function wt(Ft,Ct){var Gt=St.call(this,Ft,Ct)||this;return Gt.canvas=Ct,Gt.intrinsicWidth=Ct.width,Gt.intrinsicHeight=Ct.height,Gt}return wt}(Fu),qc=function(St){Qt(wt,St);function wt(Ft,Ct){var Gt=St.call(this,Ft,Ct)||this,se=new XMLSerializer,Pe=Ht(Ft,Ct);return Ct.setAttribute("width",Pe.width+"px"),Ct.setAttribute("height",Pe.height+"px"),Gt.svg="data:image/svg+xml,"+encodeURIComponent(se.serializeToString(Ct)),Gt.intrinsicWidth=Ct.width.baseVal.value,Gt.intrinsicHeight=Ct.height.baseVal.value,Gt.context.cache.addImage(Gt.svg),Gt}return wt}(Fu),VA=function(St){Qt(wt,St);function wt(Ft,Ct){var Gt=St.call(this,Ft,Ct)||this;return Gt.value=Ct.value,Gt}return wt}(Fu),$c=function(St){Qt(wt,St);function wt(Ft,Ct){var Gt=St.call(this,Ft,Ct)||this;return Gt.start=Ct.start,Gt.reversed=typeof Ct.reversed=="boolean"&&Ct.reversed===!0,Gt}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){Qt(wt,St);function wt(Ft,Ct){var Gt=St.call(this,Ft,Ct)||this;switch(Gt.type=Ct.type.toLowerCase(),Gt.checked=Ct.checked,Gt.value=gg(Ct),(Gt.type===ic||Gt.type===vA)&&(Gt.styles.backgroundColor=3739148031,Gt.styles.borderTopColor=Gt.styles.borderRightColor=Gt.styles.borderBottomColor=Gt.styles.borderLeftColor=2779096575,Gt.styles.borderTopWidth=Gt.styles.borderRightWidth=Gt.styles.borderBottomWidth=Gt.styles.borderLeftWidth=1,Gt.styles.borderTopStyle=Gt.styles.borderRightStyle=Gt.styles.borderBottomStyle=Gt.styles.borderLeftStyle=1,Gt.styles.backgroundClip=[0],Gt.styles.backgroundOrigin=[0],Gt.bounds=bu(Gt.bounds)),Gt.type){case ic:Gt.styles.borderTopRightRadius=Gt.styles.borderTopLeftRadius=Gt.styles.borderBottomRightRadius=Gt.styles.borderBottomLeftRadius=Ff;break;case vA:Gt.styles.borderTopRightRadius=Gt.styles.borderTopLeftRadius=Gt.styles.borderBottomRightRadius=Gt.styles.borderBottomLeftRadius=Ef;break}return Gt}return wt}(Fu),Rd=function(St){Qt(wt,St);function wt(Ft,Ct){var Gt=St.call(this,Ft,Ct)||this,se=Ct.options[Ct.selectedIndex||0];return Gt.value=se&&se.text||"",Gt}return wt}(Fu),td=function(St){Qt(wt,St);function wt(Ft,Ct){var Gt=St.call(this,Ft,Ct)||this;return Gt.value=Ct.value,Gt}return wt}(Fu),Lf=function(St){Qt(wt,St);function wt(Ft,Ct){var Gt=St.call(this,Ft,Ct)||this;Gt.src=Ct.src,Gt.width=parseInt(Ct.width,10)||0,Gt.height=parseInt(Ct.height,10)||0,Gt.backgroundColor=Gt.styles.backgroundColor;try{if(Ct.contentWindow&&Ct.contentWindow.document&&Ct.contentWindow.document.documentElement){Gt.tree=bf(Ft,Ct.contentWindow.document.documentElement);var se=Ct.contentWindow.document.documentElement?xs(Ft,getComputedStyle(Ct.contentWindow.document.documentElement).backgroundColor):ss.TRANSPARENT,Pe=Ct.contentWindow.document.body?xs(Ft,getComputedStyle(Ct.contentWindow.document.body).backgroundColor):ss.TRANSPARENT;Gt.backgroundColor=Gs(se)?Gs(Pe)?Gt.styles.backgroundColor:Pe:se}}catch(Ze){}return Gt}return wt}(Fu),Mf=["OL","UL","MENU"],rc=function(St,wt,Ft,Ct){for(var Gt=wt.firstChild,se=void 0;Gt;Gt=se)if(se=Gt.nextSibling,ed(Gt)&&Gt.data.trim().length>0)Ft.textNodes.push(new nc(St,Gt,Ft.styles));else if(Ph(Gt))if(zd(Gt)&&Gt.assignedNodes)Gt.assignedNodes().forEach(function(Ze){return rc(St,Ze,Ft,Ct)});else{var Pe=pg(St,Gt);Pe.styles.isVisible()&&(_d(Gt,Pe,Ct)?Pe.flags|=4:Kd(Pe.styles)&&(Pe.flags|=2),Mf.indexOf(Gt.tagName)!==-1&&(Pe.flags|=8),Ft.elements.push(Pe),Gt.slot,Gt.shadowRoot?rc(St,Gt.shadowRoot,Pe,Ct):!sc(Gt)&&!Tf(Gt)&&!ac(Gt)&&rc(St,Gt,Pe,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,Gt=wt.counterReset,se=!0;Ct!==null&&Ct.forEach(function(Ze){var Ie=Ft.counters[Ze.counter];Ie&&Ze.increment!==0&&(se=!1,Ie.length||Ie.push(1),Ie[Math.max(0,Ie.length-1)]+=Ze.increment)});var Pe=[];return se&&Gt.forEach(function(Ze){var Ie=Ft.counters[Ze.counter];Pe.push(Ze.counter),Ie||(Ie=Ft.counters[Ze.counter]=[]),Ie.push(Ze.reset)}),Pe},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,Gt,se){return St<wt||St>Ft?dt(St,Gt,se.length>0):Ct.integers.reduce(function(Pe,Ze,Ie){for(;St>=Ze;)St-=Ze,Pe+=Ct.values[Ie];return Pe},"")+se},Vd=function(St,wt,Ft,Ct){var Gt="";do Ft||St--,Gt=Ct(St)+Gt,St/=wt;while(St*wt>=wt);return Gt},Js=function(St,wt,Ft,Ct,Gt){var se=Ft-wt+1;return(St<0?"-":"")+(Vd(Math.abs(St),se,Ct,function(Pe){return ce(Math.floor(Pe%se)+wt)})+Gt)},hu=function(St,wt,Ft){Ft===void 0&&(Ft=". ");var Ct=wt.length;return Vd(Math.abs(St),Ct,!1,function(Gt){return wt[Math.floor(Gt%Ct)]})+Ft},Xu=1,xA=2,Os=4,uc=8,Gl=function(St,wt,Ft,Ct,Gt,se){if(St<-9999||St>9999)return dt(St,4,Gt.length>0);var Pe=Math.abs(St),Ze=Gt;if(Pe===0)return wt[0]+Ze;for(var Ie=0;Pe>0&&Ie<=4;Ie++){var kn=Pe%10;kn===0&&pa(se,Xu)&&Ze!==""?Ze=wt[kn]+Ze:kn>1||kn===1&&Ie===0||kn===1&&Ie===1&&pa(se,xA)||kn===1&&Ie===1&&pa(se,Os)&&St>100||kn===1&&Ie>1&&pa(se,uc)?Ze=wt[kn]+(Ie>0?Ft[Ie-1]:"")+Ze:kn===1&&Ie>0&&(Ze=Ft[Ie-1]+Ze),Pe=Math.floor(Pe/10)}return(St<0?Ct:"")+Ze},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?". ":"",Gt=Ft?"\u3001":"",se=Ft?", ":"",Pe=Ft?" ":"";switch(wt){case 0:return"\u2022"+Pe;case 1:return"\u25E6"+Pe;case 2:return"\u25FE"+Pe;case 5:var Ze=Js(St,48,57,!0,Ct);return Ze.length<4?"0"+Ze:Ze;case 4:return hu(St,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Gt);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",Gt);case 16:return hu(St,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",Gt);case 17:case 48:return Gl(St,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Ju,"\u8CA0",Gt,xA|Os|uc);case 47:return Gl(St,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",Ac,"\u8CA0",Gt,Xu|xA|Os|uc);case 42:return Gl(St,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Ju,"\u8D1F",Gt,xA|Os|uc);case 41:return Gl(St,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",Ac,"\u8D1F",Gt,Xu|xA|Os|uc);case 26:return Gl(St,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",it,Gt,0);case 25:return Gl(St,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",it,Gt,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",Gt);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",Gt);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,Gt=Kt(wt,Ft);if(!Gt.contentWindow)return Promise.reject("Unable to find iframe window");var se=wt.defaultView.pageXOffset,Pe=wt.defaultView.pageYOffset,Ze=Gt.contentWindow,Ie=Ze.document,kn=pe(Gt).then(function(){return te(Ct,void 0,void 0,function(){var On,ei;return Ae(this,function(Ii){switch(Ii.label){case 0:return this.scrolledElements.forEach(Bi),Ze&&(Ze.scrollTo(Ft.left,Ft.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(Ze.scrollY!==Ft.top||Ze.scrollX!==Ft.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(Ze.scrollX-Ft.left,Ze.scrollY-Ft.top,0,0))),On=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:Ii.sent(),Ii.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Yt(Ie)]:[3,4];case 3:Ii.sent(),Ii.label=4;case 4:return typeof On=="function"?[2,Promise.resolve().then(function(){return On(Ie,ei)}).then(function(){return Gt})]:[2,Gt]}})})});return Ie.open(),Ie.write(Ln(document.doctype)+"<html></html>"),Bn(this.referenceElement.ownerDocument,se,Pe),Ie.replaceChild(Ie.adoptNode(this.documentElement),Ie.documentElement),Ie.close(),kn},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 ve(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,Pe){return Pe&&typeof Pe.cssText=="string"?se+Pe.cssText:se},""),Gt=wt.cloneNode(!1);return Gt.textContent=Ct,Gt}}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(kn){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",wt)}}var Gt=wt.cloneNode(!1);try{Gt.width=wt.width,Gt.height=wt.height;var se=wt.getContext("2d"),Pe=Gt.getContext("2d");if(Pe)if(!this.options.allowTaint&&se)Pe.putImageData(se.getImageData(0,0,wt.width,wt.height),0,0);else{var Ze=(Ft=wt.getContext("webgl2"))!==null&&Ft!==void 0?Ft:wt.getContext("webgl");if(Ze){var Ie=Ze.getContextAttributes();(Ie==null?void 0:Ie.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",wt)}Pe.drawImage(wt,0,0)}return Gt}catch(kn){this.context.logger.info("Unable to clone canvas as it is tainted",wt)}return Gt},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 Gt=wt.ownerDocument.createElement("canvas");return Gt.width=wt.offsetWidth,Gt.height=wt.offsetHeight,Gt},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 Gt=this,se=wt.shadowRoot?wt.shadowRoot.firstChild:wt.firstChild;se;se=se.nextSibling)if(Ph(se)&&zd(se)&&typeof se.assignedNodes=="function"){var Pe=se.assignedNodes();Pe.length&&Pe.forEach(function(Ze){return Gt.appendChildNode(Ft,Ze,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 Gt=this.createElementClone(wt);Gt.style.transitionProperty="none";var se=Ct.getComputedStyle(wt),Pe=Ct.getComputedStyle(wt,":before"),Ze=Ct.getComputedStyle(wt,":after");this.referenceElement===wt&&oc(Gt)&&(this.clonedReferenceElement=Gt),Yo(Gt)&&Hr(Gt);var Ie=this.counters.parse(new Pu(this.context,se)),kn=this.resolvePseudoContent(wt,Gt,Pe,Nt.BEFORE);jd(wt)&&(Ft=!0),WA(wt)||this.cloneChildNodes(wt,Gt,Ft),kn&&Gt.insertBefore(kn,Gt.firstChild);var On=this.resolvePseudoContent(wt,Gt,Ze,Nt.AFTER);return On&&Gt.appendChild(On),this.counters.pop(Ie),(se&&(this.options.copyStyles||ku(wt))&&!rl(wt)||Ft)&&ve(se,Gt),(wt.scrollTop!==0||wt.scrollLeft!==0)&&this.scrolledElements.push([Gt,wt.scrollLeft,wt.scrollTop]),(sc(wt)||ac(wt))&&(sc(Gt)||ac(Gt))&&(Gt.value=wt.value),Gt}return wt.cloneNode(!1)},St.prototype.resolvePseudoContent=function(wt,Ft,Ct,Gt){var se=this;if(Ct){var Pe=Ct.content,Ze=Ft.ownerDocument;if(!(!Ze||!Pe||Pe==="none"||Pe==="-moz-alt-content"||Ct.display==="none")){this.counters.parse(new Pu(this.context,Ct));var Ie=new il(this.context,Ct),kn=Ze.createElement("html2canvaspseudoelement");ve(Ct,kn),Ie.content.forEach(function(ei){if(ei.type===0)kn.appendChild(Ze.createTextNode(ei.value));else if(ei.type===22){var Ii=Ze.createElement("img");Ii.src=ei.value,Ii.style.opacity="1",kn.appendChild(Ii)}else if(ei.type===18){if(ei.name==="attr"){var Ir=ei.values.filter($r);Ir.length&&kn.appendChild(Ze.createTextNode(wt.getAttribute(Ir[0].value)||""))}else if(ei.name==="counter"){var pr=ei.values.filter(Vo),Br=pr[0],Ko=pr[1];if(Br&&$r(Br)){var qr=se.counters.getCounterValue(Br.value),to=Ko&&$r(Ko)?DA.parse(se.context,Ko.value):3;kn.appendChild(Ze.createTextNode(dt(qr,to,!1)))}}else if(ei.name==="counters"){var io=ei.values.filter(Vo),Br=io[0],Jo=io[1],Ko=io[2];if(Br&&$r(Br)){var To=se.counters.getCounterValues(Br.value),jr=Ko&&$r(Ko)?DA.parse(se.context,Ko.value):3,us=Jo&&Jo.type===0?Jo.value:"",gs=To.map(function(bl){return dt(bl,jr,!1)}).join(us);kn.appendChild(Ze.createTextNode(gs))}}}else if(ei.type===20)switch(ei.value){case"open-quote":kn.appendChild(Ze.createTextNode(Gh(Ie.quotes,se.quoteDepth++,!0)));break;case"close-quote":kn.appendChild(Ze.createTextNode(Gh(Ie.quotes,--se.quoteDepth,!1)));break;default:kn.appendChild(Ze.createTextNode(ei.value))}}),kn.className=or+" "+Mr;var On=Gt===Nt.BEFORE?" "+or:" "+Mr;return ku(Ft)?Ft.className.baseValue+=On:Ft.className+=On,kn}}},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 Kt=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},qt=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(qt))},pe=function(St){return new Promise(function(wt,Ft){var Ct=St.contentWindow;if(!Ct)return Ft("No window assigned for iframe");var Gt=Ct.document;Ct.onload=St.onload=function(){Ct.onload=St.onload=null;var se=setInterval(function(){Gt.body.childNodes.length>0&&Gt.readyState==="complete"&&(clearInterval(se),wt(St))},50)}})},Je=["all","d","content"],ve=function(St,wt){for(var Ft=St.length-1;Ft>=0;Ft--){var Ct=St.item(Ft);Je.indexOf(Ct)===-1&&wt.style.setProperty(Ct,St.getPropertyValue(Ct))}return wt},Ln=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},Bn=function(St,wt,Ft){St&&St.defaultView&&(wt!==St.defaultView.pageXOffset||Ft!==St.defaultView.pageYOffset)&&St.defaultView.scrollTo(wt,Ft)},Bi=function(St){var wt=St[0],Ft=St[1],Ct=St[2];wt.scrollLeft=Ft,wt.scrollTop=Ct},Li=":before",ji=":after",or="___html2canvas___pseudoelement_before",Mr="___html2canvas___pseudoelement_after",Sr=`{
content: "" !important;
display: none !important;
}`,Hr=function(St){uo(St,"."+or+Li+Sr+`
.`+Mr+ji+Sr)},uo=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,Gt,se,Pe=this;return Ae(this,function(Ze){switch(Ze.label){case 0:return Ft=wr.isSameOrigin(wt),Ct=!ba(wt)&&this._options.useCORS===!0&&ha.SUPPORT_CORS_IMAGES&&!Ft,Gt=!ba(wt)&&!Ft&&!ol(wt)&&typeof this._options.proxy=="string"&&ha.SUPPORT_CORS_XHR&&!Ct,!Ft&&this._options.allowTaint===!1&&!ba(wt)&&!ol(wt)&&!Gt&&!Ct?[2]:(se=wt,Gt?[4,this.proxy(se)]:[3,2]);case 1:se=Ze.sent(),Ze.label=2;case 2:return this.context.logger.debug("Added image "+wt.substring(0,256)),[4,new Promise(function(Ie,kn){var On=new Image;On.onload=function(){return Ie(On)},On.onerror=kn,(ma(se)||Ct)&&(On.crossOrigin="anonymous"),On.src=se,On.complete===!0&&setTimeout(function(){return Ie(On)},500),Pe._options.imageTimeout>0&&setTimeout(function(){return kn("Timed out ("+Pe._options.imageTimeout+"ms) loading image")},Pe._options.imageTimeout)})];case 3:return[2,Ze.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 Gt=wt.substring(0,256);return new Promise(function(se,Pe){var Ze=ha.SUPPORT_RESPONSE_TYPE?"blob":"text",Ie=new XMLHttpRequest;Ie.onload=function(){if(Ie.status===200)if(Ze==="text")se(Ie.response);else{var ei=new FileReader;ei.addEventListener("load",function(){return se(ei.result)},!1),ei.addEventListener("error",function(Ii){return Pe(Ii)},!1),ei.readAsDataURL(Ie.response)}else Pe("Failed to proxy resource "+Gt+" with status code "+Ie.status)},Ie.onerror=Pe;var kn=Ct.indexOf("?")>-1?"&":"?";if(Ie.open("GET",""+Ct+kn+"url="+encodeURIComponent(wt)+"&responseType="+Ze),Ze!=="text"&&Ie instanceof XMLHttpRequest&&(Ie.responseType=Ze),Ft._options.imageTimeout){var On=Ft._options.imageTimeout;Ie.timeout=On,Ie.ontimeout=function(){return Pe("Timed out ("+On+"ms) proxying "+Gt)}}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)},mr=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 mr(St.x+(wt.x-St.x)*Ft,St.y+(wt.y-St.y)*Ft)},Rs=function(){function St(wt,Ft,Ct,Gt){this.type=1,this.start=wt,this.startControl=Ft,this.endControl=Ct,this.end=Gt}return St.prototype.subdivide=function(wt,Ft){var Ct=jo(this.start,this.startControl,wt),Gt=jo(this.startControl,this.endControl,wt),se=jo(this.endControl,this.end,wt),Pe=jo(Ct,Gt,wt),Ze=jo(Gt,se,wt),Ie=jo(Pe,Ze,wt);return Ft?new St(this.start,Ct,Pe,Ie):new St(Ie,Ze,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,Gt=hl(Ft.borderTopLeftRadius,Ct.width,Ct.height),se=Gt[0],Pe=Gt[1],Ze=hl(Ft.borderTopRightRadius,Ct.width,Ct.height),Ie=Ze[0],kn=Ze[1],On=hl(Ft.borderBottomRightRadius,Ct.width,Ct.height),ei=On[0],Ii=On[1],Ir=hl(Ft.borderBottomLeftRadius,Ct.width,Ct.height),pr=Ir[0],Br=Ir[1],Ko=[];Ko.push((se+Ie)/Ct.width),Ko.push((pr+ei)/Ct.width),Ko.push((Pe+Br)/Ct.height),Ko.push((kn+Ii)/Ct.height);var qr=Math.max.apply(Math,Ko);qr>1&&(se/=qr,Pe/=qr,Ie/=qr,kn/=qr,ei/=qr,Ii/=qr,pr/=qr,Br/=qr);var to=Ct.width-Ie,io=Ct.height-Ii,Jo=Ct.width-ei,To=Ct.height-Br,jr=Ft.borderTopWidth,us=Ft.borderRightWidth,gs=Ft.borderBottomWidth,Do=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||Pe>0?Co(Ct.left+Do/3,Ct.top+jr/3,se-Do/3,Pe-jr/3,Xo.TOP_LEFT):new mr(Ct.left+Do/3,Ct.top+jr/3),this.topRightBorderDoubleOuterBox=se>0||Pe>0?Co(Ct.left+to,Ct.top+jr/3,Ie-us/3,kn-jr/3,Xo.TOP_RIGHT):new mr(Ct.left+Ct.width-us/3,Ct.top+jr/3),this.bottomRightBorderDoubleOuterBox=ei>0||Ii>0?Co(Ct.left+Jo,Ct.top+io,ei-us/3,Ii-gs/3,Xo.BOTTOM_RIGHT):new mr(Ct.left+Ct.width-us/3,Ct.top+Ct.height-gs/3),this.bottomLeftBorderDoubleOuterBox=pr>0||Br>0?Co(Ct.left+Do/3,Ct.top+To,pr-Do/3,Br-gs/3,Xo.BOTTOM_LEFT):new mr(Ct.left+Do/3,Ct.top+Ct.height-gs/3),this.topLeftBorderDoubleInnerBox=se>0||Pe>0?Co(Ct.left+Do*2/3,Ct.top+jr*2/3,se-Do*2/3,Pe-jr*2/3,Xo.TOP_LEFT):new mr(Ct.left+Do*2/3,Ct.top+jr*2/3),this.topRightBorderDoubleInnerBox=se>0||Pe>0?Co(Ct.left+to,Ct.top+jr*2/3,Ie-us*2/3,kn-jr*2/3,Xo.TOP_RIGHT):new mr(Ct.left+Ct.width-us*2/3,Ct.top+jr*2/3),this.bottomRightBorderDoubleInnerBox=ei>0||Ii>0?Co(Ct.left+Jo,Ct.top+io,ei-us*2/3,Ii-gs*2/3,Xo.BOTTOM_RIGHT):new mr(Ct.left+Ct.width-us*2/3,Ct.top+Ct.height-gs*2/3),this.bottomLeftBorderDoubleInnerBox=pr>0||Br>0?Co(Ct.left+Do*2/3,Ct.top+To,pr-Do*2/3,Br-gs*2/3,Xo.BOTTOM_LEFT):new mr(Ct.left+Do*2/3,Ct.top+Ct.height-gs*2/3),this.topLeftBorderStroke=se>0||Pe>0?Co(Ct.left+Do/2,Ct.top+jr/2,se-Do/2,Pe-jr/2,Xo.TOP_LEFT):new mr(Ct.left+Do/2,Ct.top+jr/2),this.topRightBorderStroke=se>0||Pe>0?Co(Ct.left+to,Ct.top+jr/2,Ie-us/2,kn-jr/2,Xo.TOP_RIGHT):new mr(Ct.left+Ct.width-us/2,Ct.top+jr/2),this.bottomRightBorderStroke=ei>0||Ii>0?Co(Ct.left+Jo,Ct.top+io,ei-us/2,Ii-gs/2,Xo.BOTTOM_RIGHT):new mr(Ct.left+Ct.width-us/2,Ct.top+Ct.height-gs/2),this.bottomLeftBorderStroke=pr>0||Br>0?Co(Ct.left+Do/2,Ct.top+To,pr-Do/2,Br-gs/2,Xo.BOTTOM_LEFT):new mr(Ct.left+Do/2,Ct.top+Ct.height-gs/2),this.topLeftBorderBox=se>0||Pe>0?Co(Ct.left,Ct.top,se,Pe,Xo.TOP_LEFT):new mr(Ct.left,Ct.top),this.topRightBorderBox=Ie>0||kn>0?Co(Ct.left+to,Ct.top,Ie,kn,Xo.TOP_RIGHT):new mr(Ct.left+Ct.width,Ct.top),this.bottomRightBorderBox=ei>0||Ii>0?Co(Ct.left+Jo,Ct.top+io,ei,Ii,Xo.BOTTOM_RIGHT):new mr(Ct.left+Ct.width,Ct.top+Ct.height),this.bottomLeftBorderBox=pr>0||Br>0?Co(Ct.left,Ct.top+To,pr,Br,Xo.BOTTOM_LEFT):new mr(Ct.left,Ct.top+Ct.height),this.topLeftPaddingBox=se>0||Pe>0?Co(Ct.left+Do,Ct.top+jr,Math.max(0,se-Do),Math.max(0,Pe-jr),Xo.TOP_LEFT):new mr(Ct.left+Do,Ct.top+jr),this.topRightPaddingBox=Ie>0||kn>0?Co(Ct.left+Math.min(to,Ct.width-us),Ct.top+jr,to>Ct.width+us?0:Math.max(0,Ie-us),Math.max(0,kn-jr),Xo.TOP_RIGHT):new mr(Ct.left+Ct.width-us,Ct.top+jr),this.bottomRightPaddingBox=ei>0||Ii>0?Co(Ct.left+Math.min(Jo,Ct.width-Do),Ct.top+Math.min(io,Ct.height-gs),Math.max(0,ei-us),Math.max(0,Ii-gs),Xo.BOTTOM_RIGHT):new mr(Ct.left+Ct.width-us,Ct.top+Ct.height-gs),this.bottomLeftPaddingBox=pr>0||Br>0?Co(Ct.left+Do,Ct.top+Math.min(To,Ct.height-gs),Math.max(0,pr-Do),Math.max(0,Br-gs),Xo.BOTTOM_LEFT):new mr(Ct.left+Do,Ct.top+Ct.height-gs),this.topLeftContentBox=se>0||Pe>0?Co(Ct.left+Do+_s,Ct.top+jr+Ca,Math.max(0,se-(Do+_s)),Math.max(0,Pe-(jr+Ca)),Xo.TOP_LEFT):new mr(Ct.left+Do+_s,Ct.top+jr+Ca),this.topRightContentBox=Ie>0||kn>0?Co(Ct.left+Math.min(to,Ct.width+Do+_s),Ct.top+jr+Ca,to>Ct.width+Do+_s?0:Ie-Do+_s,kn-(jr+Ca),Xo.TOP_RIGHT):new mr(Ct.left+Ct.width-(us+bl),Ct.top+jr+Ca),this.bottomRightContentBox=ei>0||Ii>0?Co(Ct.left+Math.min(Jo,Ct.width-(Do+_s)),Ct.top+Math.min(io,Ct.height+jr+Ca),Math.max(0,ei-(us+bl)),Ii-(gs+Vl),Xo.BOTTOM_RIGHT):new mr(Ct.left+Ct.width-(us+bl),Ct.top+Ct.height-(gs+Vl)),this.bottomLeftContentBox=pr>0||Br>0?Co(Ct.left+Do+_s,Ct.top+To,Math.max(0,pr-(Do+_s)),Br-(gs+Vl),Xo.BOTTOM_LEFT):new mr(Ct.left+Do+_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,Gt){var se=4*((Math.sqrt(2)-1)/3),Pe=Ft*se,Ze=Ct*se,Ie=St+Ft,kn=wt+Ct;switch(Gt){case Xo.TOP_LEFT:return new Rs(new mr(St,kn),new mr(St,kn-Ze),new mr(Ie-Pe,wt),new mr(Ie,wt));case Xo.TOP_RIGHT:return new Rs(new mr(St,wt),new mr(St+Pe,wt),new mr(Ie,kn-Ze),new mr(Ie,kn));case Xo.BOTTOM_RIGHT:return new Rs(new mr(Ie,wt),new mr(Ie,wt+Ze),new mr(St+Pe,kn),new mr(St,kn));case Xo.BOTTOM_LEFT:default:return new Rs(new mr(Ie,kn),new mr(Ie-Pe,kn),new mr(St,wt+Ze),new mr(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,Gt){return St.map(function(se,Pe){switch(Pe){case 0:return se.add(wt,Ft);case 1:return se.add(wt+Ct,Ft);case 2:return se.add(wt+Ct,Ft+Gt);case 3:return se.add(wt,Ft+Gt)}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,Gt=this.container.bounds.top+this.container.styles.transformOrigin[1].number,se=this.container.styles.transform;this.effects.push(new zl(Ct,Gt,se))}if(this.container.styles.overflowX!==0){var Pe=vl(this.curves),Ze=XA(this.curves);Eh(Pe,Ze)?this.effects.push(new Ga(Pe,6)):(this.effects.push(new Ga(Pe,2)),this.effects.push(new Ga(Ze,4)))}}return St.prototype.getEffects=function(wt){for(var Ft=[2,3].indexOf(this.container.styles.position)===-1,Ct=this.parent,Gt=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(Gt.unshift.apply(Gt,se),Ft=[2,3].indexOf(Ct.container.styles.position)===-1,Ct.container.styles.overflowX!==0){var Pe=vl(Ct.curves),Ze=XA(Ct.curves);Eh(Pe,Ze)||Gt.unshift(new Ga(Ze,6))}}else Gt.unshift.apply(Gt,se);Ct=Ct.parent}return Gt.filter(function(Ie){return pa(Ie.target,wt)})},St}(),$u=function(St,wt,Ft,Ct){St.container.elements.forEach(function(Gt){var se=pa(Gt.flags,4),Pe=pa(Gt.flags,2),Ze=new vg(Gt,St);pa(Gt.styles.display,2048)&&Ct.push(Ze);var Ie=pa(Gt.flags,8)?[]:Ct;if(se||Pe){var kn=se||Gt.styles.isPositioned()?Ft:wt,On=new wl(Ze);if(Gt.styles.isPositioned()||Gt.styles.opacity<1||Gt.styles.isTransformed()){var ei=Gt.styles.zIndex.order;if(ei<0){var Ii=0;kn.negativeZIndex.some(function(pr,Br){return ei>pr.element.container.styles.zIndex.order?(Ii=Br,!1):Ii>0}),kn.negativeZIndex.splice(Ii,0,On)}else if(ei>0){var Ir=0;kn.positiveZIndex.some(function(pr,Br){return ei>=pr.element.container.styles.zIndex.order?(Ir=Br+1,!1):Ir>0}),kn.positiveZIndex.splice(Ir,0,On)}else kn.zeroOrAutoZIndexOrTransformedOrOpacity.push(On)}else Gt.styles.isFloating()?kn.nonPositionedFloats.push(On):kn.nonPositionedInlineLevel.push(On);$u(Ze,On,se?On:Ft,Ie)}else Gt.styles.isInlineLevel()?wt.inlineLevel.push(Ze):wt.nonInlineLevel.push(Ze),$u(Ze,wt,Ft,Ie);pa(Gt.flags,8)&&Df(Gt,Ie)})},Df=function(St,wt){for(var Ft=St instanceof $c?St.start:1,Ct=St instanceof $c?St.reversed:!1,Gt=0;Gt<wt.length;Gt++){var se=wt[Gt];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 Gt=[];return bs(St)?Gt.push(St.subdivide(.5,!1)):Gt.push(St),bs(Ft)?Gt.push(Ft.subdivide(.5,!0)):Gt.push(Ft),bs(Ct)?Gt.push(Ct.subdivide(.5,!0).reverse()):Gt.push(Ct),bs(wt)?Gt.push(wt.subdivide(.5,!1).reverse()):Gt.push(wt),Gt},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),Gt=Zo(wt.paddingRight,Ft.width),se=Zo(wt.paddingTop,Ft.width),Pe=Zo(wt.paddingBottom,Ft.width);return Ft.add(Ct+wt.borderLeftWidth,se+wt.borderTopWidth,-(wt.borderRightWidth+wt.borderLeftWidth+Ct+Gt),-(wt.borderTopWidth+wt.borderBottomWidth+se+Pe))},$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),Gt=t0(gc(St.styles.backgroundClip,wt),St),se=e0(gc(St.styles.backgroundSize,wt),Ft,Ct),Pe=se[0],Ze=se[1],Ie=hl(gc(St.styles.backgroundPosition,wt),Ct.width-Pe,Ct.height-Ze),kn=Of(gc(St.styles.backgroundRepeat,wt),Ie,se,Ct,Gt),On=Math.round(Ct.left+Ie[0]),ei=Math.round(Ct.top+Ie[1]);return[kn,On,ei,Pe,Ze]},fc=function(St){return $r(St)&&St.value===ju.AUTO},Qf=function(St){return typeof St=="number"},e0=function(St,wt,Ft){var Ct=wt[0],Gt=wt[1],se=wt[2],Pe=St[0],Ze=St[1];if(!Pe)return[0,0];if(Wo(Pe)&&Ze&&Wo(Ze))return[Zo(Pe,Ft.width),Zo(Ze,Ft.height)];var Ie=Qf(se);if($r(Pe)&&(Pe.value===ju.CONTAIN||Pe.value===ju.COVER)){if(Qf(se)){var kn=Ft.width/Ft.height;return kn<se!=(Pe.value===ju.COVER)?[Ft.width,Ft.width/se]:[Ft.height*se,Ft.height]}return[Ft.width,Ft.height]}var On=Qf(Ct),ei=Qf(Gt),Ii=On||ei;if(fc(Pe)&&(!Ze||fc(Ze))){if(On&&ei)return[Ct,Gt];if(!Ie&&!Ii)return[Ft.width,Ft.height];if(Ii&&Ie){var Ir=On?Ct:Gt*se,pr=ei?Gt:Ct/se;return[Ir,pr]}var Br=On?Ct:Ft.width,Ko=ei?Gt:Ft.height;return[Br,Ko]}if(Ie){var qr=0,to=0;return Wo(Pe)?qr=Zo(Pe,Ft.width):Wo(Ze)&&(to=Zo(Ze,Ft.height)),fc(Pe)?qr=to*se:(!Ze||fc(Ze))&&(to=qr/se),[qr,to]}var io=null,Jo=null;if(Wo(Pe)?io=Zo(Pe,Ft.width):Ze&&Wo(Ze)&&(Jo=Zo(Ze,Ft.height)),io!==null&&(!Ze||fc(Ze))&&(Jo=On&&ei?io/Ct*Gt:Ft.height),Jo!==null&&fc(Pe)&&(io=On&&ei?Jo/Gt*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,Gt){var se=wt[0],Pe=wt[1],Ze=Ft[0],Ie=Ft[1];switch(St){case 2:return[new mr(Math.round(Ct.left),Math.round(Ct.top+Pe)),new mr(Math.round(Ct.left+Ct.width),Math.round(Ct.top+Pe)),new mr(Math.round(Ct.left+Ct.width),Math.round(Ie+Ct.top+Pe)),new mr(Math.round(Ct.left),Math.round(Ie+Ct.top+Pe))];case 3:return[new mr(Math.round(Ct.left+se),Math.round(Ct.top)),new mr(Math.round(Ct.left+se+Ze),Math.round(Ct.top)),new mr(Math.round(Ct.left+se+Ze),Math.round(Ct.height+Ct.top)),new mr(Math.round(Ct.left+se),Math.round(Ct.height+Ct.top))];case 1:return[new mr(Math.round(Ct.left+se),Math.round(Ct.top+Pe)),new mr(Math.round(Ct.left+se+Ze),Math.round(Ct.top+Pe)),new mr(Math.round(Ct.left+se+Ze),Math.round(Ct.top+Pe+Ie)),new mr(Math.round(Ct.left+se),Math.round(Ct.top+Pe+Ie))];default:return[new mr(Math.round(Gt.left),Math.round(Gt.top)),new mr(Math.round(Gt.left+Gt.width),Math.round(Gt.top)),new mr(Math.round(Gt.left+Gt.width),Math.round(Gt.height+Gt.top)),new mr(Math.round(Gt.left),Math.round(Gt.height+Gt.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"),Gt=this._document.createElement("img"),se=this._document.createElement("span"),Pe=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",Pe.appendChild(Ct),Gt.src=yg,Gt.width=1,Gt.height=1,Gt.style.margin="0",Gt.style.padding="0",Gt.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(Gt);var Ze=Gt.offsetTop-se.offsetTop+2;Ct.removeChild(se),Ct.appendChild(this._document.createTextNode(Tu)),Ct.style.lineHeight="normal",Gt.style.verticalAlign="super";var Ie=Gt.offsetTop-Ct.offsetTop+2;return Pe.removeChild(Ct),{baseline:Ze,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){Qt(wt,St);function wt(Ft,Ct){var Gt=St.call(this,Ft,Ct)||this;return Gt._activeEffects=[],Gt.canvas=Ct.canvas?Ct.canvas:document.createElement("canvas"),Gt.ctx=Gt.canvas.getContext("2d"),Ct.canvas||(Gt.canvas.width=Math.floor(Ct.width*Ct.scale),Gt.canvas.height=Math.floor(Ct.height*Ct.scale),Gt.canvas.style.width=Ct.width+"px",Gt.canvas.style.height=Ct.height+"px"),Gt.fontMetrics=new SA(document),Gt.ctx.scale(Gt.options.scale,Gt.options.scale),Gt.ctx.translate(-Ct.x,-Ct.y),Gt.ctx.textBaseline="bottom",Gt._activeEffects=[],Gt.context.logger.debug("Canvas renderer initialized ("+Ct.width+"x"+Ct.height+") with scale "+Ct.scale),Gt}return wt.prototype.applyEffects=function(Ft){for(var Ct=this;this._activeEffects.length;)this.popEffect();Ft.forEach(function(Gt){return Ct.applyEffect(Gt)})},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(Gt){switch(Gt.label){case 0:return Ct=Ft.element.container.styles,Ct.isVisible()?[4,this.renderStackContent(Ft)]:[3,2];case 1:Gt.sent(),Gt.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,Gt){var se=this;if(Ct===0)this.ctx.fillText(Ft.text,Ft.bounds.left,Ft.bounds.top+Gt);else{var Pe=$h(Ft.text);Pe.reduce(function(Ze,Ie){return se.ctx.fillText(Ie,Ze,Ft.bounds.top+Gt),Ze+se.ctx.measureText(Ie).width},Ft.bounds.left)}},wt.prototype.createFontStyle=function(Ft){var Ct=Ft.fontVariant.filter(function(Pe){return Pe==="normal"||Pe==="small-caps"}).join(""),Gt=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,Gt].join(" "),Gt,se]},wt.prototype.renderTextNode=function(Ft,Ct){return te(this,void 0,void 0,function(){var Gt,se,Pe,Ze,Ie,kn,On,ei,Ii=this;return Ae(this,function(Ir){return Gt=this.createFontStyle(Ct),se=Gt[0],Pe=Gt[1],Ze=Gt[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(Pe,Ze),kn=Ie.baseline,On=Ie.middle,ei=Ct.paintOrder,Ft.textBounds.forEach(function(pr){ei.forEach(function(Br){switch(Br){case 0:Ii.ctx.fillStyle=es(Ct.color),Ii.renderTextWithLetterSpacing(pr,Ct.letterSpacing,kn);var Ko=Ct.textShadow;Ko.length&&pr.text.trim().length&&(Ko.slice(0).reverse().forEach(function(qr){Ii.ctx.shadowColor=es(qr.color),Ii.ctx.shadowOffsetX=qr.offsetX.number*Ii.options.scale,Ii.ctx.shadowOffsetY=qr.offsetY.number*Ii.options.scale,Ii.ctx.shadowBlur=qr.blur.number,Ii.renderTextWithLetterSpacing(pr,Ct.letterSpacing,kn)}),Ii.ctx.shadowColor="",Ii.ctx.shadowOffsetX=0,Ii.ctx.shadowOffsetY=0,Ii.ctx.shadowBlur=0),Ct.textDecorationLine.length&&(Ii.ctx.fillStyle=es(Ct.textDecorationColor||Ct.color),Ct.textDecorationLine.forEach(function(qr){switch(qr){case 1:Ii.ctx.fillRect(pr.bounds.left,Math.round(pr.bounds.top+kn),pr.bounds.width,1);break;case 2:Ii.ctx.fillRect(pr.bounds.left,Math.round(pr.bounds.top),pr.bounds.width,1);break;case 3:Ii.ctx.fillRect(pr.bounds.left,Math.ceil(pr.bounds.top+On),pr.bounds.width,1);break}}));break;case 1:Ct.webkitTextStrokeWidth&&pr.text.trim().length&&(Ii.ctx.strokeStyle=es(Ct.webkitTextStrokeColor),Ii.ctx.lineWidth=Ct.webkitTextStrokeWidth,Ii.ctx.lineJoin=window.chrome?"miter":"round",Ii.ctx.strokeText(pr.text,pr.bounds.left,pr.bounds.top+kn)),Ii.ctx.strokeStyle="",Ii.ctx.lineWidth=0,Ii.ctx.lineJoin="miter";break}})}),[2]})})},wt.prototype.renderReplacedElement=function(Ft,Ct,Gt){if(Gt&&Ft.intrinsicWidth>0&&Ft.intrinsicHeight>0){var se=Uf(Ft),Pe=XA(Ct);this.path(Pe),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(Gt,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,Gt,se,Pe,Ze,Ie,to,to,kn,On,ei,Ii,Jo,Ir,pr,To,Br,Ko,qr,to,io,Jo,To;return Ae(this,function(jr){switch(jr.label){case 0:this.applyEffects(Ft.getEffects(4)),Ct=Ft.container,Gt=Ft.curves,se=Ct.styles,Pe=0,Ze=Ct.textNodes,jr.label=1;case 1:return Pe<Ze.length?(Ie=Ze[Pe],[4,this.renderTextNode(Ie,se)]):[3,4];case 2:jr.sent(),jr.label=3;case 3:return Pe++,[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 to=jr.sent(),this.renderReplacedElement(Ct,Gt,to),[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,Gt,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 to=jr.sent(),this.renderReplacedElement(Ct,Gt,to),[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?(kn=new wt(this.context,{scale:this.options.scale,backgroundColor:Ct.backgroundColor,x:0,y:0,width:Ct.width,height:Ct.height}),[4,kn.render(Ct.tree)]):[3,14];case 13:On=jr.sent(),Ct.width&&Ct.height&&this.ctx.drawImage(On,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 mr(Ct.bounds.left+ei*.39363,Ct.bounds.top+ei*.79),new mr(Ct.bounds.left+ei*.16,Ct.bounds.top+ei*.5549),new mr(Ct.bounds.left+ei*.27347,Ct.bounds.top+ei*.44071),new mr(Ct.bounds.left+ei*.39694,Ct.bounds.top+ei*.5649),new mr(Ct.bounds.left+ei*.72983,Ct.bounds.top+ei*.23),new mr(Ct.bounds.left+ei*.84,Ct.bounds.top+ei*.34085),new mr(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(Ii=this.createFontStyle(se),Jo=Ii[0],Ir=Ii[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),To=Uf(Ct),Br=0,Ct.styles.textAlign){case 1:Br+=To.width/2;break;case 2:Br+=To.width;break}Ko=To.add(Br,0,0,-To.height/2+1),this.ctx.save(),this.path([new mr(To.left,To.top),new mr(To.left+To.width,To.top),new mr(To.left+To.width,To.top+To.height),new mr(To.left,To.top+To.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new 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(qr=Ct.styles.listStyleImage,qr.type!==0)return[3,18];to=void 0,io=qr.url,jr.label=15;case 15:return jr.trys.push([15,17,,18]),[4,this.context.cache.match(io)];case 16:return to=jr.sent(),this.ctx.drawImage(to,Ct.bounds.left-(to.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",To=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,To),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,Gt,qr,se,Pe,qr,Ze,Ie,qr,kn,On,qr,ei,Ii,qr,Ir,pr,qr,Br,Ko,qr;return Ae(this,function(to){switch(to.label){case 0:if(pa(Ft.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(Ft.element)];case 1:to.sent(),Ct=0,Gt=Ft.negativeZIndex,to.label=2;case 2:return Ct<Gt.length?(qr=Gt[Ct],[4,this.renderStack(qr)]):[3,5];case 3:to.sent(),to.label=4;case 4:return Ct++,[3,2];case 5:return[4,this.renderNodeContent(Ft.element)];case 6:to.sent(),se=0,Pe=Ft.nonInlineLevel,to.label=7;case 7:return se<Pe.length?(qr=Pe[se],[4,this.renderNode(qr)]):[3,10];case 8:to.sent(),to.label=9;case 9:return se++,[3,7];case 10:Ze=0,Ie=Ft.nonPositionedFloats,to.label=11;case 11:return Ze<Ie.length?(qr=Ie[Ze],[4,this.renderStack(qr)]):[3,14];case 12:to.sent(),to.label=13;case 13:return Ze++,[3,11];case 14:kn=0,On=Ft.nonPositionedInlineLevel,to.label=15;case 15:return kn<On.length?(qr=On[kn],[4,this.renderStack(qr)]):[3,18];case 16:to.sent(),to.label=17;case 17:return kn++,[3,15];case 18:ei=0,Ii=Ft.inlineLevel,to.label=19;case 19:return ei<Ii.length?(qr=Ii[ei],[4,this.renderNode(qr)]):[3,22];case 20:to.sent(),to.label=21;case 21:return ei++,[3,19];case 22:Ir=0,pr=Ft.zeroOrAutoZIndexOrTransformedOrOpacity,to.label=23;case 23:return Ir<pr.length?(qr=pr[Ir],[4,this.renderStack(qr)]):[3,26];case 24:to.sent(),to.label=25;case 25:return Ir++,[3,23];case 26:Br=0,Ko=Ft.positiveZIndex,to.label=27;case 27:return Br<Ko.length?(qr=Ko[Br],[4,this.renderStack(qr)]):[3,30];case 28:to.sent(),to.label=29;case 29:return Br++,[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(Gt,se){var Pe=bs(Gt)?Gt.start:Gt;se===0?Ct.ctx.moveTo(Pe.x,Pe.y):Ct.ctx.lineTo(Pe.x,Pe.y),bs(Gt)&&Ct.ctx.bezierCurveTo(Gt.startControl.x,Gt.startControl.y,Gt.endControl.x,Gt.endControl.y,Gt.end.x,Gt.end.y)})},wt.prototype.renderRepeat=function(Ft,Ct,Gt,se){this.path(Ft),this.ctx.fillStyle=Ct,this.ctx.translate(Gt,se),this.ctx.fill(),this.ctx.translate(-Gt,-se)},wt.prototype.resizeImage=function(Ft,Ct,Gt){var se;if(Ft.width===Ct&&Ft.height===Gt)return Ft;var Pe=(se=this.canvas.ownerDocument)!==null&&se!==void 0?se:document,Ze=Pe.createElement("canvas");Ze.width=Math.max(1,Ct),Ze.height=Math.max(1,Gt);var Ie=Ze.getContext("2d");return Ie.drawImage(Ft,0,0,Ft.width,Ft.height,0,0,Ct,Gt),Ze},wt.prototype.renderBackgroundImage=function(Ft){return te(this,void 0,void 0,function(){var Ct,Gt,se,Pe,Ze,Ie;return Ae(this,function(kn){switch(kn.label){case 0:Ct=Ft.styles.backgroundImage.length-1,Gt=function(On){var ei,Ii,Ir,Ca,kl,tu,_s,Qa,gs,pr,Ca,kl,tu,_s,Qa,Br,Ko,qr,to,io,Jo,To,jr,us,gs,Do,Ca,bl,Vl,_s,Qa,CA,kl,tu,PA,Fn,qA,mc,$A,th,Mh,sl;return Ae(this,function(Nu){switch(Nu.label){case 0:if(On.type!==0)return[3,5];ei=void 0,Ii=On.url,Nu.label=1;case 1:return Nu.trys.push([1,3,,4]),[4,se.context.cache.match(Ii)];case 2:return ei=Nu.sent(),[3,4];case 3:return Nu.sent(),se.context.logger.error("Error loading background-image "+Ii),[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(On)?(pr=dc(Ft,Ct,[null,null,null]),Ca=pr[0],kl=pr[1],tu=pr[2],_s=pr[3],Qa=pr[4],Br=hA(On.angle,_s,Qa),Ko=Br[0],qr=Br[1],to=Br[2],io=Br[3],Jo=Br[4],To=document.createElement("canvas"),To.width=_s,To.height=Qa,jr=To.getContext("2d"),us=jr.createLinearGradient(qr,io,to,Jo),Un(On.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(To,"repeat"),se.renderRepeat(Ca,gs,kl,tu))):Uo(On)&&(Do=dc(Ft,Ct,[null,null,null]),Ca=Do[0],bl=Do[1],Vl=Do[2],_s=Do[3],Qa=Do[4],CA=On.position.length===0?[da]:On.position,kl=Zo(CA[0],_s),tu=Zo(CA[CA.length-1],Qa),PA=vu(On,kl,tu,_s,Qa),Fn=PA[0],qA=PA[1],Fn>0&&qA>0&&(mc=se.ctx.createRadialGradient(bl+kl,Vl+tu,0,bl+kl,Vl+tu,Fn),Un(On.stops,Fn*2).forEach(function(Xd){return mc.addColorStop(Xd.stop,es(Xd.color))}),se.path(Ca),se.ctx.fillStyle=mc,Fn!==qA?($A=Ft.bounds.left+.5*Ft.bounds.width,th=Ft.bounds.top+.5*Ft.bounds.height,Mh=qA/Fn,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,Pe=0,Ze=Ft.styles.backgroundImage.slice(0).reverse(),kn.label=1;case 1:return Pe<Ze.length?(Ie=Ze[Pe],[5,Gt(Ie)]):[3,4];case 2:kn.sent(),kn.label=3;case 3:return Pe++,[3,1];case 4:return[2]}})})},wt.prototype.renderSolidBorder=function(Ft,Ct,Gt){return te(this,void 0,void 0,function(){return Ae(this,function(se){return this.path(hc(Gt,Ct)),this.ctx.fillStyle=es(Ft),this.ctx.fill(),[2]})})},wt.prototype.renderDoubleBorder=function(Ft,Ct,Gt,se){return te(this,void 0,void 0,function(){var Pe,Ze;return Ae(this,function(Ie){switch(Ie.label){case 0:return Ct<3?[4,this.renderSolidBorder(Ft,Gt,se)]:[3,2];case 1:return Ie.sent(),[2];case 2:return Pe=Lh(se,Gt),this.path(Pe),this.ctx.fillStyle=es(Ft),this.ctx.fill(),Ze=If(se,Gt),this.path(Ze),this.ctx.fill(),[2]}})})},wt.prototype.renderNodeBackgroundAndBorders=function(Ft){return te(this,void 0,void 0,function(){var Ct,Gt,se,Pe,Ze,Ie,kn,On,ei=this;return Ae(this,function(Ii){switch(Ii.label){case 0:return this.applyEffects(Ft.getEffects(2)),Ct=Ft.container.styles,Gt=!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}],Pe=Rf(gc(Ct.backgroundClip,0),Ft.curves),Gt||Ct.boxShadow.length?(this.ctx.save(),this.path(Pe),this.ctx.clip(),Gs(Ct.backgroundColor)||(this.ctx.fillStyle=es(Ct.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(Ft.container)]):[3,2];case 1:Ii.sent(),this.ctx.restore(),Ct.boxShadow.slice(0).reverse().forEach(function(Ir){ei.ctx.save();var pr=vl(Ft.curves),Br=Ir.inset?0:jl,Ko=qp(pr,-Br+(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+Br,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()}),Ii.label=2;case 2:Ze=0,Ie=0,kn=se,Ii.label=3;case 3:return Ie<kn.length?(On=kn[Ie],On.style!==0&&!Gs(On.color)&&On.width>0?On.style!==2?[3,5]:[4,this.renderDashedDottedBorder(On.color,On.width,Ze,Ft.curves,2)]:[3,11]):[3,13];case 4:return Ii.sent(),[3,11];case 5:return On.style!==3?[3,7]:[4,this.renderDashedDottedBorder(On.color,On.width,Ze,Ft.curves,3)];case 6:return Ii.sent(),[3,11];case 7:return On.style!==4?[3,9]:[4,this.renderDoubleBorder(On.color,On.width,Ze,Ft.curves)];case 8:return Ii.sent(),[3,11];case 9:return[4,this.renderSolidBorder(On.color,Ze,Ft.curves)];case 10:Ii.sent(),Ii.label=11;case 11:Ze++,Ii.label=12;case 12:return Ie++,[3,3];case 13:return[2]}})})},wt.prototype.renderDashedDottedBorder=function(Ft,Ct,Gt,se,Pe){return te(this,void 0,void 0,function(){var Ze,Ie,kn,On,ei,Ii,Ir,pr,Br,Ko,qr,to,io,Jo,To,jr,To,jr;return Ae(this,function(us){return this.ctx.save(),Ze=cc(se,Gt),Ie=hc(se,Gt),Pe===2&&(this.path(Ie),this.ctx.clip()),bs(Ie[0])?(kn=Ie[0].start.x,On=Ie[0].start.y):(kn=Ie[0].x,On=Ie[0].y),bs(Ie[1])?(ei=Ie[1].end.x,Ii=Ie[1].end.y):(ei=Ie[1].x,Ii=Ie[1].y),Gt===0||Gt===2?Ir=Math.abs(kn-ei):Ir=Math.abs(On-Ii),this.ctx.beginPath(),Pe===3?this.formatPath(Ze):this.formatPath(Ie.slice(0,2)),pr=Ct<3?Ct*3:Ct*2,Br=Ct<3?Ct*2:Ct,Pe===3&&(pr=Ct,Br=Ct),Ko=!0,Ir<=pr*2?Ko=!1:Ir<=pr*2+Br?(qr=Ir/(2*pr+Br),pr*=qr,Br*=qr):(to=Math.floor((Ir+Br)/(pr+Br)),io=(Ir-to*pr)/(to-1),Jo=(Ir-(to+1)*pr)/to,Br=Jo<=0||Math.abs(Br-io)<Math.abs(Br-Jo)?io:Jo),Ko&&(Pe===3?this.ctx.setLineDash([0,pr+Br]):this.ctx.setLineDash([pr,Br])),Pe===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([]),Pe===2&&(bs(Ie[0])&&(To=Ie[3],jr=Ie[0],this.ctx.beginPath(),this.formatPath([new mr(To.end.x,To.end.y),new mr(jr.start.x,jr.start.y)]),this.ctx.stroke()),bs(Ie[1])&&(To=Ie[1],jr=Ie[2],this.ctx.beginPath(),this.formatPath([new mr(To.end.x,To.end.y),new mr(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(Gt){switch(Gt.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 Gt.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){Qt(wt,St);function wt(Ft,Ct){var Gt=St.call(this,Ft,Ct)||this;return Gt.canvas=Ct.canvas?Ct.canvas:document.createElement("canvas"),Gt.ctx=Gt.canvas.getContext("2d"),Gt.options=Ct,Gt.canvas.width=Math.floor(Ct.width*Ct.scale),Gt.canvas.height=Math.floor(Ct.height*Ct.scale),Gt.canvas.style.width=Ct.width+"px",Gt.canvas.style.height=Ct.height+"px",Gt.ctx.scale(Gt.options.scale,Gt.options.scale),Gt.ctx.translate(-Ct.x,-Ct.y),Gt.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+Ct.width+"x"+Ct.height+" at "+Ct.x+","+Ct.y+") with scale "+Ct.scale),Gt}return wt.prototype.render=function(Ft){return te(this,void 0,void 0,function(){var Ct,Gt;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 Gt=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(Gt,-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,Be([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,Be([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,Be([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,Be([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,Gt,se,Pe,Ze,Ie,kn,On,ei,Ii,Ir,pr,Br,Ko,qr,to,io,Jo,To,us,jr,us,gs,Do,Ca,bl,Vl,_s,Qa,CA,kl,tu,PA,Fn,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 Gt={allowTaint:(gs=wt.allowTaint)!==null&&gs!==void 0?gs:!1,imageTimeout:(Do=wt.imageTimeout)!==null&&Do!==void 0?Do: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},Gt),Pe={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},Ze=new de(Pe.scrollX,Pe.scrollY,Pe.windowWidth,Pe.windowHeight),Ie=new BA(se,Ze),kn=(kl=wt.foreignObjectRendering)!==null&&kl!==void 0?kl:!1,On={allowTaint:(tu=wt.allowTaint)!==null&&tu!==void 0?tu:!1,onclone:wt.onclone,ignoreElements:wt.ignoreElements,inlineImages:kn,copyStyles:kn},Ie.logger.debug("Starting document clone with size "+Ze.width+"x"+Ze.height+" scrolled to "+-Ze.left+","+-Ze.top),ei=new gt(Ie,St,On),Ii=ei.clonedReferenceElement,Ii?[4,ei.toIFrame(Ft,Ze)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return Ir=sl.sent(),pr=Yo(Ii)||Gd(Ii)?ne(Ii.ownerDocument):Ht(Ie,Ii),Br=pr.width,Ko=pr.height,qr=pr.left,to=pr.top,io=op(Ie,Ii,wt.backgroundColor),Jo={canvas:wt.canvas,backgroundColor:io,scale:(Fn=(PA=wt.scale)!==null&&PA!==void 0?PA:Ct.devicePixelRatio)!==null&&Fn!==void 0?Fn:1,x:((qA=wt.x)!==null&&qA!==void 0?qA:0)+qr,y:((mc=wt.y)!==null&&mc!==void 0?mc:0)+to,width:($A=wt.width)!==null&&$A!==void 0?$A:Math.ceil(Br),height:(th=wt.height)!==null&&th!==void 0?th:Math.ceil(Ko)},kn?(Ie.logger.debug("Document cloned, using foreign object rendering"),us=new np(Ie,Jo),[4,us.render(Ii)]):[3,3];case 2:return To=sl.sent(),[3,5];case 3:return Ie.logger.debug("Document cloned, element located at "+qr+","+to+" with size "+Br+"x"+Ko+" using computed rendering"),Ie.logger.debug("Starting DOM parsing"),jr=bf(Ie,Ii),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:To=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,To]}})})},op=function(St,wt,Ft){var Ct=wt.ownerDocument,Gt=Ct.documentElement?xs(St,getComputedStyle(Ct.documentElement).backgroundColor):ss.TRANSPARENT,se=Ct.body?xs(St,getComputedStyle(Ct.body).backgroundColor):ss.TRANSPARENT,Pe=typeof Ft=="string"?xs(St,Ft):Ft===null?ss.TRANSPARENT:4294967295;return wt===Ct.documentElement?Gs(Gt)?Gs(se)?Pe:se:Gt:Pe};return ip})},67467:function(Cn,We){We.read=function(Qt,Pt,te,Ae,Be){var de,Ht,ne=Be*8-Ae-1,ue=(1<<ne)-1,ce=ue>>1,Vt=-7,De=te?Be-1:0,Jt=te?-1:1,be=Qt[Pt+De];for(De+=Jt,de=be&(1<<-Vt)-1,be>>=-Vt,Vt+=ne;Vt>0;de=de*256+Qt[Pt+De],De+=Jt,Vt-=8);for(Ht=de&(1<<-Vt)-1,de>>=-Vt,Vt+=Ae;Vt>0;Ht=Ht*256+Qt[Pt+De],De+=Jt,Vt-=8);if(de===0)de=1-ce;else{if(de===ue)return Ht?NaN:(be?-1:1)*(1/0);Ht=Ht+Math.pow(2,Ae),de=de-ce}return(be?-1:1)*Ht*Math.pow(2,de-Ae)},We.write=function(Qt,Pt,te,Ae,Be,de){var Ht,ne,ue,ce=de*8-Be-1,Vt=(1<<ce)-1,De=Vt>>1,Jt=Be===23?Math.pow(2,-24)-Math.pow(2,-77):0,be=Ae?0:de-1,It=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,Ht=Vt):(Ht=Math.floor(Math.log(Pt)/Math.LN2),Pt*(ue=Math.pow(2,-Ht))<1&&(Ht--,ue*=2),Ht+De>=1?Pt+=Jt/ue:Pt+=Jt*Math.pow(2,1-De),Pt*ue>=2&&(Ht++,ue/=2),Ht+De>=Vt?(ne=0,Ht=Vt):Ht+De>=1?(ne=(Pt*ue-1)*Math.pow(2,Be),Ht=Ht+De):(ne=Pt*Math.pow(2,De-1)*Math.pow(2,Be),Ht=0));Be>=8;Qt[te+be]=ne&255,be+=It,ne/=256,Be-=8);for(Ht=Ht<<Be|ne,ce+=Be;ce>0;Qt[te+be]=Ht&255,be+=It,Ht/=256,ce-=8);Qt[te+be-It]|=nt*128}},2859:function(Cn,We,Qt){"use strict";Qt.d(We,{hP:function(){return Pi}});var Pt=function(jt,Mt){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])})(jt,Mt)};function te(jt,Mt){function mt(){this.constructor=jt}Pt(jt,Mt),jt.prototype=Mt===null?Object.create(Mt):(mt.prototype=Mt.prototype,new mt)}function Ae(jt,Mt,mt,vt){return new(mt||(mt=Promise))(function(Lt,Bt){function _t(Ye){try{ye(vt.next(Ye))}catch(Fe){Bt(Fe)}}function Me(Ye){try{ye(vt.throw(Ye))}catch(Fe){Bt(Fe)}}function ye(Ye){var Fe;Ye.done?Lt(Ye.value):(Fe=Ye.value,Fe instanceof mt?Fe:new mt(function(Te){Te(Fe)})).then(_t,Me)}ye((vt=vt.apply(jt,Mt||[])).next())})}function Be(jt,Mt){var mt,vt,Lt,Bt,_t={label:0,sent:function(){if(1&Lt[0])throw Lt[1];return Lt[1]},trys:[],ops:[]};return Bt={next:Me(0),throw:Me(1),return:Me(2)},typeof Symbol=="function"&&(Bt[Symbol.iterator]=function(){return this}),Bt;function Me(ye){return function(Ye){return function(Fe){if(mt)throw new TypeError("Generator is already executing.");for(;_t;)try{if(mt=1,vt&&(Lt=2&Fe[0]?vt.return:Fe[0]?vt.throw||((Lt=vt.return)&&Lt.call(vt),0):vt.next)&&!(Lt=Lt.call(vt,Fe[1])).done)return Lt;switch(vt=0,Lt&&(Fe=[2&Fe[0],Lt.value]),Fe[0]){case 0:case 1:Lt=Fe;break;case 4:return _t.label++,{value:Fe[1],done:!1};case 5:_t.label++,vt=Fe[1],Fe=[0];continue;case 7:Fe=_t.ops.pop(),_t.trys.pop();continue;default:if(Lt=_t.trys,!((Lt=Lt.length>0&&Lt[Lt.length-1])||Fe[0]!==6&&Fe[0]!==2)){_t=0;continue}if(Fe[0]===3&&(!Lt||Fe[1]>Lt[0]&&Fe[1]<Lt[3])){_t.label=Fe[1];break}if(Fe[0]===6&&_t.label<Lt[1]){_t.label=Lt[1],Lt=Fe;break}if(Lt&&_t.label<Lt[2]){_t.label=Lt[2],_t.ops.push(Fe);break}Lt[2]&&_t.ops.pop(),_t.trys.pop();continue}Fe=Mt.call(jt,_t)}catch(Te){Fe=[6,Te],vt=0}finally{mt=Lt=0}if(5&Fe[0])throw Fe[1];return{value:Fe[0]?Fe[1]:void 0,done:!0}}([ye,Ye])}}}function de(){for(var jt=0,Mt=0,mt=arguments.length;Mt<mt;Mt++)jt+=arguments[Mt].length;var vt=Array(jt),Lt=0;for(Mt=0;Mt<mt;Mt++)for(var Bt=arguments[Mt],_t=0,Me=Bt.length;_t<Me;_t++,Lt++)vt[Lt]=Bt[_t];return vt}var Ht=function(){function jt(){}return jt.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},jt.setAttributes=function(Mt,mt){for(var vt=0,Lt=mt;vt<Lt.length;vt++){var Bt=Lt[vt],_t=Bt[0],Me=Bt[1];Mt.setAttribute(_t,Me)}},jt.createRect=function(Mt,mt,vt){var Lt=document.createElementNS("http://www.w3.org/2000/svg","rect");return Lt.setAttribute("width",Mt.toString()),Lt.setAttribute("height",mt.toString()),vt&&jt.setAttributes(Lt,vt),Lt},jt.createLine=function(Mt,mt,vt,Lt,Bt){var _t=document.createElementNS("http://www.w3.org/2000/svg","line");return _t.setAttribute("x1",Mt.toString()),_t.setAttribute("y1",mt.toString()),_t.setAttribute("x2",vt.toString()),_t.setAttribute("y2",Lt.toString()),Bt&&jt.setAttributes(_t,Bt),_t},jt.createPolygon=function(Mt,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","polygon");return vt.setAttribute("points",Mt),mt&&jt.setAttributes(vt,mt),vt},jt.createCircle=function(Mt,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","circle");return vt.setAttribute("cx",(Mt/2).toString()),vt.setAttribute("cy",(Mt/2).toString()),vt.setAttribute("r",Mt.toString()),mt&&jt.setAttributes(vt,mt),vt},jt.createEllipse=function(Mt,mt,vt){var Lt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Lt.setAttribute("cx",(Mt/2).toString()),Lt.setAttribute("cy",(mt/2).toString()),Lt.setAttribute("rx",(Mt/2).toString()),Lt.setAttribute("ry",(mt/2).toString()),vt&&jt.setAttributes(Lt,vt),Lt},jt.createGroup=function(Mt){var mt=document.createElementNS("http://www.w3.org/2000/svg","g");return Mt&&jt.setAttributes(mt,Mt),mt},jt.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},jt.createMarker=function(Mt,mt,vt,Lt,Bt,_t,Me){var ye=document.createElementNS("http://www.w3.org/2000/svg","marker");return jt.setAttributes(ye,[["id",Mt],["orient",mt],["markerWidth",vt.toString()],["markerHeight",Lt.toString()],["refX",Bt.toString()],["refY",_t.toString()]]),ye.appendChild(Me),ye},jt.createText=function(Mt){var mt=document.createElementNS("http://www.w3.org/2000/svg","text");return mt.setAttribute("x","0"),mt.setAttribute("y","0"),Mt&&jt.setAttributes(mt,Mt),mt},jt.createTSpan=function(Mt,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","tspan");return vt.textContent=Mt,mt&&jt.setAttributes(vt,mt),vt},jt.createImage=function(Mt){var mt=document.createElementNS("http://www.w3.org/2000/svg","image");return Mt&&jt.setAttributes(mt,Mt),mt},jt.createPoint=function(Mt,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return vt.x=Mt,vt.y=mt,vt},jt.createPath=function(Mt,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","path");return vt.setAttribute("d",Mt),mt&&jt.setAttributes(vt,mt),vt},jt}(),ne=function(){function jt(){}return jt.addKey=function(Mt){jt.key=Mt},Object.defineProperty(jt,"isLicensed",{get:function(){return!!jt.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(jt.key)},enumerable:!1,configurable:!0}),jt}(),ue=function(){function jt(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return jt.prototype.rasterize=function(Mt,mt,vt){var Lt=this;return new Promise(function(Bt){var _t=vt!==void 0?vt:document.createElement("canvas");Mt===null&&(Lt.markersOnly=!0,Lt.naturalSize=!1);var Me=document.createElementNS("http://www.w3.org/2000/svg","svg");Me.setAttribute("xmlns","http://www.w3.org/2000/svg"),Me.setAttribute("width",mt.width.baseVal.valueAsString),Me.setAttribute("height",mt.height.baseVal.valueAsString),Me.setAttribute("viewBox","0 0 "+mt.viewBox.baseVal.width.toString()+" "+mt.viewBox.baseVal.height.toString()),Me.innerHTML=mt.innerHTML,Lt.naturalSize===!0?(Me.width.baseVal.value=Mt.naturalWidth,Me.height.baseVal.value=Mt.naturalHeight):Lt.width!==void 0&&Lt.height!==void 0&&(Me.width.baseVal.value=Lt.width,Me.height.baseVal.value=Lt.height),_t.width=Me.width.baseVal.value,_t.height=Me.height.baseVal.value;var ye=Me.outerHTML,Ye=_t.getContext("2d");Lt.markersOnly!==!0&&Ye.drawImage(Mt,0,0,_t.width,_t.height);var Fe=window.URL,Te=new Image(_t.width,_t.height);Te.setAttribute("crossOrigin","anonymous");var Oe=new Blob([ye],{type:"image/svg+xml"}),$e=Fe.createObjectURL(Oe);Te.onload=function(){Ye.drawImage(Te,0,0),Fe.revokeObjectURL($e);var yn=_t.toDataURL(Lt.imageType,Lt.imageQuality);Bt(yn)},Te.src=$e})},jt}(),ce=function(){},Vt=function(){function jt(Mt){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Mt+"_"}return Object.defineProperty(jt.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(jt.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(jt.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),jt.prototype.addClass=function(Mt){return this.styleSheet===void 0&&this.addStyleSheet(),Mt.name=""+this.classNamePrefix+Mt.localName,this.classes.push(Mt),this.styleSheet.sheet.insertRule("."+Mt.name+" {"+Mt.style+"}",this.styleSheet.sheet.cssRules.length),Mt},jt.prototype.addRule=function(Mt){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Mt),this.styleSheet.sheet.insertRule(Mt.selector+" {"+Mt.style+"}",this.styleSheet.sheet.cssRules.length)},jt.prototype.addStyleSheet=function(){var Mt;this.styleSheet=document.createElement("style"),((Mt=this.styleSheetRoot)!==null&&Mt!==void 0?Mt:document.head).appendChild(this.styleSheet),this.addRule(new De("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new De("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new De("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Jt("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Jt("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},jt.prototype.removeStyleSheet=function(){var Mt;this.styleSheet&&(((Mt=this.styleSheetRoot)!==null&&Mt!==void 0?Mt:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},jt}(),De=function(jt,Mt){this.selector=jt,this.style=Mt},Jt=function(jt,Mt){this.localName=jt,this.style=Mt},be=function(){function jt(Mt,mt,vt,Lt,Bt){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Mt,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 jt.prototype.show=function(Mt){var mt=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Mt,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 _t=document.createElement("div");_t.className=""+mt.toolbarButtonStyleClass.name,_t.setAttribute("data-type-name",Bt.typeName),_t.innerHTML=Bt.icon,_t.addEventListener("click",function(){mt.markerToolbarButtonClicked(_t,Bt)}),mt.buttons.push(_t),mt.markerButtons.push(_t)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var Lt=document.createElement("div");Lt.className=this.toolbarBlockStyleClass.name,Lt.style.whiteSpace="nowrap",Lt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Lt),this.addActionButton(Lt,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(Lt,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},jt.prototype.addButtonClickListener=function(Mt){this.buttonClickListeners.push(Mt)},jt.prototype.removeButtonClickListener=function(Mt){this.buttonClickListeners.indexOf(Mt)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Mt),1)},jt.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},jt.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Mt=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<Mt||mt===Mt&&this.markerButtons.length-1===Mt?this.markerButtonBlock.appendChild(this.markerButtons[mt]):(mt===Mt&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[mt]))}},jt.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")},jt.prototype.resetButtonStyles=function(){var Mt=this;this.buttons.forEach(function(mt){mt.className=mt.className.replace(Mt.uiStyleSettings.toolbarButtonStyleColorsClassName?Mt.uiStyleSettings.toolbarButtonStyleColorsClassName:Mt.toolbarButtonStyleColorsClass.name,"").trim(),mt.className=mt.className.replace(Mt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Mt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Mt.toolbarActiveButtonStyleColorsClass.name,"").trim(),mt.className+=" "+(Mt.uiStyleSettings.toolbarButtonStyleColorsClassName?Mt.uiStyleSettings.toolbarButtonStyleColorsClassName:Mt.toolbarButtonStyleColorsClass.name)})},jt.prototype.addActionButton=function(Mt,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}Mt.appendChild(Bt),this.buttons.push(Bt)},jt.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Jt("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 Jt("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Jt("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Jt("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 Jt("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var Mt=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Jt("toolbar_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.toolbarButtonStyleColorsClass=this.styles.addClass(new Jt("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Jt("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new De("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new De("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},jt.prototype.markerToolbarButtonClicked=function(Mt,mt){this.setActiveButton(Mt),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(vt){return vt("marker",mt)}),this.markerButtonOverflowBlock.style.display="none"},jt.prototype.actionToolbarButtonClicked=function(Mt,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])},jt.prototype.setActiveButton=function(Mt){this.resetButtonStyles(),Mt.className=Mt.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Mt.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},jt.prototype.setActiveMarkerButton=function(Mt){var mt=this.markerButtons.find(function(vt){return vt.getAttribute("data-type-name")===Mt});mt&&this.setActiveButton(mt)},jt.prototype.setCurrentMarker=function(Mt){var mt=this;this.currentMarker=Mt,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")})},jt}(),It=function(){function jt(Mt,mt,vt,Lt){this.panels=[],this.panelButtons=[],this.markerjsContainer=Mt,this.displayMode=mt,this.uiStyleSettings=vt,this.styles=Lt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return jt.prototype.addStyles=function(){var Mt;this.toolboxStyleClass=this.styles.addClass(new Jt("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 Jt("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var mt=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Jt("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Jt("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Jt("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 Jt("toolbox-panel-row_colors",`
background-color: `+((Mt=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Mt!==void 0?Mt:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Jt("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 Jt("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Jt("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new De("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new De("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},jt.prototype.show=function(Mt){var mt;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Mt,this.uiContainer.className=this.toolboxStyleClass.name+" "+((mt=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&mt!==void 0?mt:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},jt.prototype.setPanelButtons=function(Mt){var mt,vt,Lt=this;this.panels=Mt,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 _t;Bt.uiStyleSettings=Lt.uiStyleSettings;var Me=document.createElement("div");Me.className=Lt.toolboxButtonStyleClass.name+" "+((_t=Lt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&_t!==void 0?_t:Lt.toolboxButtonStyleColorsClass.name),Me.innerHTML=Bt.icon,Me.title=Bt.title,Me.addEventListener("click",function(){Lt.panelButtonClick(Bt)}),Lt.panelButtons.push(Me),Lt.buttonRow.appendChild(Me)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},jt.prototype.panelButtonClick=function(Mt){var mt=this,vt=-1;if(Mt!==this.activePanel){vt=this.panels.indexOf(Mt),this.panelRow.innerHTML="";var Lt=Mt.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=Mt}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,_t){var Me,ye;Bt.className=mt.toolboxButtonStyleClass.name+" "+(_t===vt?""+((Me=mt.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Me!==void 0?Me:mt.toolboxActiveButtonStyleColorsClass.name):""+((ye=mt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ye!==void 0?ye:mt.toolboxButtonStyleColorsClass.name))})},jt}(),nt=function(jt,Mt){this.title=jt,this.icon=Mt},et=function(jt){function Mt(mt,vt,Lt,Bt){var _t=jt.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 _t.colors=[],_t.addTransparent=!1,_t.colorBoxes=[],_t.colors=vt,_t.currentColor=Lt,_t.setCurrentColor=_t.setCurrentColor.bind(_t),_t.getColorBox=_t.getColorBox.bind(_t),_t}return te(Mt,jt),Mt.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},Mt.prototype.getColorBox=function(mt){var vt=this,Lt=this.uiStyleSettings.toolbarHeight/4,Bt=this.uiStyleSettings.toolbarHeight-Lt,_t=document.createElement("div");_t.style.display="inline-block",_t.style.boxSizing="content-box",_t.style.width=Bt-2+"px",_t.style.height=Bt-2+"px",_t.style.padding="1px",_t.style.marginRight="2px",_t.style.marginBottom="2px",_t.style.borderWidth="2px",_t.style.borderStyle="solid",_t.style.borderRadius=(Bt+2)/2+"px",_t.style.borderColor=mt===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",_t.addEventListener("click",function(){vt.setCurrentColor(mt,_t)});var Me=document.createElement("div");return Me.style.display="inline-block",Me.style.width=Bt-2+"px",Me.style.height=Bt-2+"px",Me.style.backgroundColor=mt,Me.style.borderRadius=Bt/2+"px",mt==="transparent"&&(Me.style.fill=this.uiStyleSettings.toolboxAccentColor,Me.innerHTML=`<svg viewBox="0 0 24 24">
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
</svg>`),_t.appendChild(Me),_t},Mt.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)},Mt}(nt),At=function(){function jt(Mt,mt,vt){this._state="new",this._isSelected=!1,this._container=Mt,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(jt.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),jt.prototype.ownsTarget=function(Mt){return!1},Object.defineProperty(jt.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),jt.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},jt.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},jt.prototype.pointerDown=function(Mt,mt){},jt.prototype.dblClick=function(Mt,mt){},jt.prototype.manipulate=function(Mt){},jt.prototype.pointerUp=function(Mt){this.stateChanged()},jt.prototype.dispose=function(){},jt.prototype.addMarkerVisualToContainer=function(Mt){this.container.childNodes.length>0?this.container.insertBefore(Mt,this.container.childNodes[0]):this.container.appendChild(Mt)},jt.prototype.getState=function(){return{typeName:jt.typeName,state:this.state,notes:this.notes}},jt.prototype.restoreState=function(Mt){this._state=Mt.state,this.notes=Mt.notes},jt.prototype.scale=function(Mt,mt){},jt.prototype.colorChanged=function(Mt){this.onColorChanged&&this.onColorChanged(Mt),this.stateChanged()},jt.prototype.fillColorChanged=function(Mt){this.onFillColorChanged&&this.onFillColorChanged(Mt),this.stateChanged()},jt.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Mt=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Mt.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Mt)&&this.onStateChanged(this)}},jt.typeName="MarkerBase",jt}(),at=function(){function jt(){this.findGripByVisual=this.findGripByVisual.bind(this)}return jt.prototype.findGripByVisual=function(Mt){return this.topLeft.ownsTarget(Mt)?this.topLeft:this.topCenter.ownsTarget(Mt)?this.topCenter:this.topRight.ownsTarget(Mt)?this.topRight:this.centerLeft.ownsTarget(Mt)?this.centerLeft:this.centerRight.ownsTarget(Mt)?this.centerRight:this.bottomLeft.ownsTarget(Mt)?this.bottomLeft:this.bottomCenter.ownsTarget(Mt)?this.bottomCenter:this.bottomRight.ownsTarget(Mt)?this.bottomRight:void 0},jt}(),ct=function(){function jt(){this.GRIP_SIZE=10,this.visual=Ht.createGroup(),this.visual.appendChild(Ht.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ht.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return jt.prototype.ownsTarget=function(Mt){return Mt===this.visual||Mt===this.visual.childNodes[0]||Mt===this.visual.childNodes[1]},jt}(),pt=function(){function jt(){}return jt.toITransformMatrix=function(Mt){return{a:Mt.a,b:Mt.b,c:Mt.c,d:Mt.d,e:Mt.e,f:Mt.f}},jt.toSVGMatrix=function(Mt,mt){return Mt.a=mt.a,Mt.b=mt.b,Mt.c=mt.c,Mt.d=mt.d,Mt.e=mt.e,Mt.f=mt.f,Mt},jt}(),xt=function(jt){function Mt(mt,vt,Lt){var Bt=jt.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(Ht.createTransform()),Bt.setupControlBox(),Bt}return te(Mt,jt),Object.defineProperty(Mt.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Mt.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Mt.prototype,"visual",{get:function(){return this._visual},set:function(mt){this._visual=mt;var vt=Ht.createTransform();this._visual.transform.baseVal.appendItem(vt)},enumerable:!1,configurable:!0}),Mt.prototype.ownsTarget=function(mt){return!!jt.prototype.ownsTarget.call(this,mt)||!!(this.controlGrips.findGripByVisual(mt)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(mt))},Mt.prototype.pointerDown=function(mt,vt){jt.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 _t=this.container.transform.baseVal.getItem(0);_t.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(_t,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Mt.prototype.pointerUp=function(mt){var vt=this.state;jt.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)},Mt.prototype.moveVisual=function(mt){this.visual.style.transform="translate("+mt.x+"px, "+mt.y+"px)"},Mt.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)},Mt.prototype.resize=function(mt){var vt=this.manipulationStartLeft,Lt=this.manipulationStartWidth,Bt=this.manipulationStartTop,_t=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:vt=this.manipulationStartLeft+mt.x-this.manipulationStartX,Lt=this.manipulationStartWidth+this.manipulationStartLeft-vt;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Lt=this.manipulationStartWidth+mt.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Bt=this.manipulationStartTop+mt.y-this.manipulationStartY,_t=this.manipulationStartHeight+this.manipulationStartTop-Bt;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:_t=this.manipulationStartHeight+mt.y-this.manipulationStartY}Lt>=0?(this.left=vt,this.width=Lt):(this.left=vt+Lt,this.width=-Lt),_t>=0?(this.top=Bt,this.height=_t):(this.top=Bt+_t,this.height=-_t),this.setSize()},Mt.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Mt.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()}},Mt.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)},Mt.prototype.rotatePoint=function(mt){if(this.rotationAngle===0)return mt;var vt=this.container.getCTM(),Lt=Ht.createPoint(mt.x,mt.y);return{x:(Lt=Lt.matrixTransform(vt)).x,y:Lt.y}},Mt.prototype.unrotatePoint=function(mt){if(this.rotationAngle===0)return mt;var vt=this.container.getCTM();vt=vt.inverse();var Lt=Ht.createPoint(mt.x,mt.y);return{x:(Lt=Lt.matrixTransform(vt)).x,y:Lt.y}},Mt.prototype.select=function(){jt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Mt.prototype.deselect=function(){jt.prototype.deselect.call(this),this.controlBox.style.display="none"},Mt.prototype.setupControlBox=function(){this.controlBox=Ht.createGroup();var mt=Ht.createTransform();mt.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(mt),this.container.appendChild(this.controlBox),this.controlRect=Ht.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=Ht.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"},Mt.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()},Mt.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()},Mt.prototype.createGrip=function(){var mt=new ct;return mt.visual.transform.baseVal.appendItem(Ht.createTransform()),this.controlBox.appendChild(mt.visual),mt},Mt.prototype.positionGrips=function(){var mt=this.controlGrips.topLeft.GRIP_SIZE,vt=-mt/2,Lt=vt,Bt=(this.width+this.CB_DISTANCE)/2-mt/2,_t=(this.height+this.CB_DISTANCE)/2-mt/2,Me=this.height+this.CB_DISTANCE-mt/2,ye=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,ye,Lt),this.positionGrip(this.controlGrips.centerLeft.visual,vt,_t),this.positionGrip(this.controlGrips.centerRight.visual,ye,_t),this.positionGrip(this.controlGrips.bottomLeft.visual,vt,Me),this.positionGrip(this.controlGrips.bottomCenter.visual,Bt,Me),this.positionGrip(this.controlGrips.bottomRight.visual,ye,Me),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Bt,Lt-3*this.CB_DISTANCE)},Mt.prototype.positionGrip=function(mt,vt,Lt){var Bt=mt.transform.baseVal.getItem(0);Bt.setTranslate(vt,Lt),mt.transform.baseVal.replaceItem(Bt,0)},Mt.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Mt.prototype.showControlBox=function(){this.controlBox.style.display=""},Mt.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)},jt.prototype.getState.call(this))},Mt.prototype.restoreState=function(mt){jt.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))},Mt.prototype.scale=function(mt,vt){jt.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()},Mt}(At),bt=function(jt){function Mt(mt,vt,Lt){var Bt=jt.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(Mt,jt),Mt.prototype.ownsTarget=function(mt){return!(!jt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual)},Mt.prototype.createVisual=function(){this.visual=Ht.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)},Mt.prototype.pointerDown=function(mt,vt){jt.prototype.pointerDown.call(this,mt,vt),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},Mt.prototype.manipulate=function(mt){jt.prototype.manipulate.call(this,mt)},Mt.prototype.resize=function(mt){jt.prototype.resize.call(this,mt),this.setSize()},Mt.prototype.setSize=function(){jt.prototype.setSize.call(this),Ht.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Mt.prototype.pointerUp=function(mt){jt.prototype.pointerUp.call(this,mt),this.setSize()},Mt.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.visual&&Ht.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},Mt.prototype.setFillColor=function(mt){this.fillColor=mt,this.visual&&Ht.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Mt.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.visual&&Ht.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Mt.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.visual&&Ht.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Mt.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},jt.prototype.getState.call(this))},Mt.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(),jt.prototype.restoreState.call(this,mt),this.setSize()},Mt.prototype.scale=function(mt,vt){jt.prototype.scale.call(this,mt,vt),this.setSize()},Mt.title="Rectangle marker",Mt}(xt),Rt=function(jt){function Mt(mt,vt,Lt,Bt){var _t=jt.call(this,mt,Bt||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return _t.widths=[],_t.widthBoxes=[],_t.widths=vt,_t.currentWidth=Lt,_t.setCurrentWidth=_t.setCurrentWidth.bind(_t),_t}return te(Mt,jt),Mt.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 _t=document.createElement("div");_t.innerText=Lt.toString(),_t.style.marginRight="5px",Bt.appendChild(_t);var Me=document.createElement("div");Me.style.minHeight="20px",Me.style.flexGrow="2",Me.style.display="flex",Me.style.alignItems="center";var ye=document.createElement("hr");ye.style.minWidth="20px",ye.style.border="0px",ye.style.borderTop=Lt+"px solid "+mt.uiStyleSettings.toolboxColor,ye.style.flexGrow="2",Me.appendChild(ye),Bt.appendChild(Me),mt.widthBoxes.push(Bt)}),vt},Mt.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)},Mt}(nt),Ot=function(jt){function Mt(mt,vt,Lt,Bt){var _t=jt.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 _t.styles=[],_t.styleBoxes=[],_t.styles=vt,_t.currentStyle=Lt,_t.setCurrentStyle=_t.setCurrentStyle.bind(_t),_t}return te(Mt,jt),Mt.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 _t=document.createElement("div");_t.style.minHeight="20px",_t.style.flexGrow="2",_t.style.overflow="hidden";var Me=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+mt.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Lt!==""?'stroke-dasharray="'+Lt+'"':"")+` />
</svg>`;_t.innerHTML=Me,Bt.appendChild(_t),mt.styleBoxes.push(Bt)}),vt},Mt.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)},Mt}(nt),Wt=function(jt){function Mt(mt,vt,Lt){var Bt=jt.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 Rt("Line width",Lt.defaultStrokeWidths,Lt.defaultStrokeWidth),Bt.strokeWidthPanel.onWidthChanged=Bt.setStrokeWidth,Bt.strokeStylePanel=new Ot("Line style",Lt.defaultStrokeDasharrays,Lt.defaultStrokeDasharray),Bt.strokeStylePanel.onStyleChanged=Bt.setStrokeDasharray,Bt}return te(Mt,jt),Object.defineProperty(Mt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Mt.prototype.getState=function(){var mt=jt.prototype.getState.call(this);return mt.typeName=Mt.typeName,mt},Mt.typeName="FrameMarker",Mt.title="Frame marker",Mt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Mt}(bt),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(jt){function Mt(mt,vt,Lt){var Bt=jt.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(Mt,jt),Mt.prototype.ownsTarget=function(mt){return!!jt.prototype.ownsTarget.call(this,mt)||!(!this.grip1.ownsTarget(mt)&&!this.grip2.ownsTarget(mt))},Mt.prototype.pointerDown=function(mt,vt){jt.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")},Mt.prototype.pointerUp=function(mt){var vt=this.state;jt.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)},Mt.prototype.adjustVisual=function(){},Mt.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)},Mt.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()},Mt.prototype.select=function(){jt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Mt.prototype.deselect=function(){jt.prototype.deselect.call(this),this.controlBox.style.display="none"},Mt.prototype.setupControlBox=function(){this.controlBox=Ht.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Mt.prototype.adjustControlBox=function(){this.positionGrips()},Mt.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Mt.prototype.createGrip=function(){var mt=new ct;return mt.visual.transform.baseVal.appendItem(Ht.createTransform()),this.controlBox.appendChild(mt.visual),mt},Mt.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)},Mt.prototype.positionGrip=function(mt,vt,Lt){var Bt=mt.transform.baseVal.getItem(0);Bt.setTranslate(vt,Lt),mt.transform.baseVal.replaceItem(Bt,0)},Mt.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},jt.prototype.getState.call(this))},Mt.prototype.restoreState=function(mt){jt.prototype.restoreState.call(this,mt);var vt=mt;this.x1=vt.x1,this.y1=vt.y1,this.x2=vt.x2,this.y2=vt.y2},Mt.prototype.scale=function(mt,vt){jt.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()},Mt}(At),Ce=function(jt){function Mt(mt,vt,Lt){var Bt=jt.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 Rt("Line width",Lt.defaultStrokeWidths,Lt.defaultStrokeWidth),Bt.strokeWidthPanel.onWidthChanged=Bt.setStrokeWidth,Bt.strokeStylePanel=new Ot("Line style",Lt.defaultStrokeDasharrays,Lt.defaultStrokeDasharray),Bt.strokeStylePanel.onStyleChanged=Bt.setStrokeDasharray,Bt}return te(Mt,jt),Mt.prototype.ownsTarget=function(mt){return!(!jt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.selectorLine&&mt!==this.visibleLine)},Mt.prototype.createVisual=function(){this.visual=Ht.createGroup(),this.selectorLine=Ht.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Ht.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)},Mt.prototype.pointerDown=function(mt,vt){jt.prototype.pointerDown.call(this,mt,vt),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Mt.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()),Ht.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Ht.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Ht.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Mt.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.adjustVisual(),this.colorChanged(mt)},Mt.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.adjustVisual()},Mt.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Mt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Mt.prototype.getState=function(){var mt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},jt.prototype.getState.call(this));return mt.typeName=Mt.typeName,mt},Mt.prototype.restoreState=function(mt){jt.prototype.restoreState.call(this,mt);var vt=mt;this.strokeColor=vt.strokeColor,this.strokeWidth=vt.strokeWidth,this.strokeDasharray=vt.strokeDasharray,this.createVisual(),this.adjustVisual()},Mt.typeName="LineMarker",Mt.title="Line marker",Mt.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Mt}($t),ge=function(jt){function Mt(mt,vt,Lt,Bt){var _t=jt.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 _t.fonts=[],_t.fontBoxes=[],_t.fonts=vt,_t.currentFont=Lt,_t.setCurrentFont=_t.setCurrentFont.bind(_t),_t}return te(Mt,jt),Mt.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 _t=document.createElement("div");_t.style.display="flex",_t.style.minHeight="20px",_t.style.flexGrow="2",_t.style.fontFamily=Lt,_t.style.overflow="hidden";var Me=document.createElement("div");Me.style.whiteSpace="nowrap",Me.style.overflow="hidden",Me.style.textOverflow="ellipsis",Me.innerHTML="The quick brown fox jumps over the lazy dog",_t.appendChild(Me),Bt.appendChild(_t),mt.fontBoxes.push(Bt)}),vt},Mt.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)},Mt}(nt),nn=function(jt){function Mt(mt,vt,Lt){var Bt=jt.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 ge("Font",Lt.defaultFontFamilies,Lt.defaultFontFamily),Bt.fontFamilyPanel.onFontChanged=Bt.setFont,Bt}return te(Mt,jt),Mt.prototype.ownsTarget=function(mt){if(jt.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},Mt.prototype.createVisual=function(){this.visual=Ht.createGroup(),this.bgRectangle=Ht.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Ht.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Ht.createTransform()),this.textElement.transform.baseVal.appendItem(Ht.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Mt.prototype.pointerDown=function(mt,vt){jt.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")},Mt.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(Ht.createTSpan(vt.trim()===""?" ":vt.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Mt.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},Mt.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}},Mt.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))},Mt.prototype.manipulate=function(mt){jt.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)},Mt.prototype.resize=function(mt){jt.prototype.resize.call(this,mt),this.isMoved=!0,this.setSize(),this.sizeText()},Mt.prototype.setSize=function(){jt.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Ht.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ht.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Mt.prototype.pointerUp=function(mt){var vt=this.state;vt==="creating"&&(this._suppressMarkerCreateEvent=!0),jt.prototype.pointerUp.call(this,mt),this.setSize(),(vt==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Mt.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")},Mt.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"}},Mt.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()},Mt.prototype.select=function(){jt.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Mt.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),jt.prototype.deselect.call(this)},Mt.prototype.dblClick=function(mt,vt){jt.prototype.dblClick.call(this,mt,vt),this.showTextEditor()},Mt.prototype.setColor=function(mt){this.textElement&&Ht.setAttributes(this.textElement,[["fill",mt]]),this.color=mt,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(mt)},Mt.prototype.setFont=function(mt){this.textElement&&Ht.setAttributes(this.textElement,[["font-family",mt]]),this.fontFamily=mt,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Mt.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Mt.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Mt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Mt.prototype.getState=function(){var mt=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},jt.prototype.getState.call(this));return mt.typeName=Mt.typeName,mt},Mt.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(),jt.prototype.restoreState.call(this,mt),this.setSize()},Mt.prototype.scale=function(mt,vt){jt.prototype.scale.call(this,mt,vt),this.setSize(),this.sizeText(),this.positionTextEditor()},Mt.typeName="TextMarker",Mt.title="Text marker",Mt.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>',Mt}(xt),qe=function(jt){function Mt(mt,vt,Lt){var Bt=jt.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 Rt("Line width",Lt.defaultStrokeWidths,Lt.defaultStrokeWidth),Bt.lineWidthPanel.onWidthChanged=Bt.setLineWidth,Bt}return te(Mt,jt),Mt.prototype.ownsTarget=function(mt){return!(!jt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.drawingImage)},Mt.prototype.createVisual=function(){this.visual=Ht.createGroup(),this.drawingImage=Ht.createImage(),this.visual.appendChild(this.drawingImage);var mt=Ht.createTransform();this.visual.transform.baseVal.appendItem(mt),this.addMarkerVisualToContainer(this.visual)},Mt.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):jt.prototype.pointerDown.call(this,mt,vt)},Mt.prototype.manipulate=function(mt){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(mt.x,mt.y),this.canvasContext.stroke()):jt.prototype.manipulate.call(this,mt)},Mt.prototype.resize=function(mt){jt.prototype.resize.call(this,mt),Ht.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ht.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Mt.prototype.pointerUp=function(mt){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):jt.prototype.pointerUp.call(this,mt)},Mt.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)},Mt.prototype.select=function(){this.state==="creating"&&this.finishCreation(),jt.prototype.select.call(this)},Mt.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),jt.prototype.deselect.call(this)},Mt.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],_t=vt[2],Me=vt[3],ye=!1,Ye=0;Ye<this.canvasElement.height;Ye++)for(var Fe=0;Fe<this.canvasElement.width;Fe++)mt.data[Ye*this.canvasElement.width*4+4*Fe+3]>0&&(ye=!0,Ye<Bt&&(Bt=Ye),Fe<Lt&&(Lt=Fe),Ye>Me&&(Me=Ye),Fe>_t&&(_t=Fe));if(ye){this.left=Lt/this.pixelRatio,this.top=Bt/this.pixelRatio,this.width=(_t-Lt)/this.pixelRatio,this.height=(Me-Bt)/this.pixelRatio;var Te=document.createElement("canvas");Te.width=_t-Lt,Te.height=Me-Bt,Te.getContext("2d").putImageData(this.canvasContext.getImageData(Lt,Bt,_t-Lt,Me-Bt),0,0),this.drawingImgUrl=Te.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Mt.prototype.setDrawingImage=function(){Ht.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Ht.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Mt.prototype.setColor=function(mt){this.color=mt,this.colorChanged(mt)},Mt.prototype.setLineWidth=function(mt){this.lineWidth=mt},Object.defineProperty(Mt.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Mt.prototype.getState=function(){var mt=Object.assign({drawingImgUrl:this.drawingImgUrl},jt.prototype.getState.call(this));return mt.typeName=Mt.typeName,mt},Mt.prototype.restoreState=function(mt){this.createVisual(),jt.prototype.restoreState.call(this,mt),this.drawingImgUrl=mt.drawingImgUrl,this.setDrawingImage()},Mt.prototype.scale=function(mt,vt){jt.prototype.scale.call(this,mt,vt),this.setDrawingImage()},Mt.typeName="FreehandMarker",Mt.title="Freehand marker",Mt.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>',Mt}(xt),En=function(jt){function Mt(mt,vt,Lt){var Bt=jt.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(Mt,jt),Mt.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(Me){var ye="both";switch(Me){case 0:ye="both";break;case 1:ye="start";break;case 2:ye="end";break;case 3:ye="none"}var Ye=document.createElement("div");if(Ye.style.display="flex",Ye.style.flexGrow="2",Ye.style.alignItems="center",Ye.style.justifyContent="space-between",Ye.style.padding="5px",Ye.style.borderWidth="2px",Ye.style.borderStyle="solid",Ye.style.borderColor=ye===Bt.currentType?Bt.uiStyleSettings.toolboxAccentColor:"transparent",Ye.addEventListener("click",function(){mt.setCurrentType(ye,Ye)}),vt.appendChild(Ye),ye==="both"||ye==="start"){var Fe=document.createElement("div");Fe.style.display="flex",Fe.style.alignItems="center",Fe.style.minHeight="20px",Fe.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>`,Fe.style.marginLeft="5px",Ye.appendChild(Fe)}var Te=document.createElement("div");Te.style.display="flex",Te.style.alignItems="center",Te.style.minHeight="20px",Te.style.flexGrow="2";var Oe=document.createElement("hr");if(Oe.style.minWidth="20px",Oe.style.border="0px",Oe.style.borderTop="3px solid "+(Bt.uiStyleSettings!==void 0?Bt.uiStyleSettings.toolboxColor:"#eeeeee"),Oe.style.flexGrow="2",Te.appendChild(Oe),Ye.appendChild(Te),ye==="both"||ye==="end"){var $e=document.createElement("div");$e.style.display="flex",$e.style.alignItems="center",$e.style.minHeight="20px",$e.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>`,$e.style.marginRight="5px",Ye.appendChild($e)}Bt.typeBoxes.push(Ye)},Bt=this,_t=0;_t<4;_t++)Lt(_t);return vt},Mt.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)},Mt}(nt),Tn=function(jt){function Mt(mt,vt,Lt){var Bt=jt.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 En("Arrow type","end"),Bt.arrowTypePanel.onArrowTypeChanged=Bt.setArrowType,Bt}return te(Mt,jt),Mt.prototype.ownsTarget=function(mt){return!(!jt.prototype.ownsTarget.call(this,mt)&&mt!==this.arrow1&&mt!==this.arrow2)},Mt.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)},Mt.prototype.createTips=function(){this.arrow1=Ht.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Ht.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Ht.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Ht.createTransform()),this.visual.appendChild(this.arrow2)},Mt.prototype.pointerDown=function(mt,vt){jt.prototype.pointerDown.call(this,mt,vt),this.state==="creating"&&this.createTips()},Mt.prototype.adjustVisual=function(){if(jt.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",Ht.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Ht.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)}},Mt.prototype.setArrowType=function(mt){this.arrowType=mt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Mt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Mt.prototype.getState=function(){var mt=Object.assign({arrowType:this.arrowType},jt.prototype.getState.call(this));return mt.typeName=Mt.typeName,mt},Mt.prototype.restoreState=function(mt){jt.prototype.restoreState.call(this,mt);var vt=mt;this.arrowType=vt.arrowType,this.createTips(),this.adjustVisual()},Mt.typeName="ArrowMarker",Mt.title="Arrow marker",Mt.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Mt}(Ce),bn=function(jt){function Mt(mt,vt,Lt){var Bt=jt.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(Mt,jt),Object.defineProperty(Mt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Mt.prototype.getState=function(){var mt=jt.prototype.getState.call(this);return mt.typeName=Mt.typeName,mt},Mt.typeName="CoverMarker",Mt.title="Cover marker",Mt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Mt}(bt),ni=function(jt){function Mt(mt,vt,Lt,Bt){var _t=jt.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 _t.opacities=[],_t.opacityBoxes=[],_t.opacities=vt,_t.currentOpacity=Lt,_t.setCurrentOpacity=_t.setCurrentOpacity.bind(_t),_t}return te(Mt,jt),Mt.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 _t=document.createElement("div");_t.innerText=100*Lt+"%",Bt.appendChild(_t),mt.opacityBoxes.push(Bt)}),vt},Mt.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)},Mt}(nt),In=function(jt){function Mt(mt,vt,Lt){var Bt=jt.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 ni("Opacity",Lt.defaultOpacitySteps,Bt.opacity),Bt.opacityPanel.onOpacityChanged=Bt.setOpacity,Bt}return te(Mt,jt),Mt.prototype.setOpacity=function(mt){this.opacity=mt,this.visual&&Ht.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Mt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Mt.prototype.getState=function(){var mt=jt.prototype.getState.call(this);return mt.typeName=Mt.typeName,mt},Mt.typeName="HighlightMarker",Mt.title="Highlight marker",Mt.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>',Mt}(bn),Ee='<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>',ie='<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(jt){function Mt(mt,vt,Lt){var Bt=jt.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,Ee),Bt.colorPanel.onColorChanged=Bt.setColor,Bt.bgColorPanel=new et("Fill color",Lt.defaultColorSet,Bt.bgColor,ie),Bt.bgColorPanel.onColorChanged=Bt.setBgColor,Bt.fontFamilyPanel=new ge("Font",Lt.defaultFontFamilies,Lt.defaultFontFamily),Bt.fontFamilyPanel.onFontChanged=Bt.setFont,Bt.tipGrip=new ct,Bt.tipGrip.visual.transform.baseVal.appendItem(Ht.createTransform()),Bt.controlBox.appendChild(Bt.tipGrip.visual),Bt}return te(Mt,jt),Mt.prototype.ownsTarget=function(mt){return jt.prototype.ownsTarget.call(this,mt)||this.tipGrip.ownsTarget(mt)||this.tip===mt},Mt.prototype.createTip=function(){Ht.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Ht.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Mt.prototype.pointerDown=function(mt,vt){this.state==="new"&&jt.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):jt.prototype.pointerDown.call(this,mt,vt)},Mt.prototype.pointerUp=function(mt){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,jt.prototype.pointerUp.call(this,mt);else{var vt=this.state==="creating";jt.prototype.pointerUp.call(this,mt),this.setTipPoints(vt),this.positionTip()}},Mt.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 jt.prototype.manipulate.call(this,mt)},Mt.prototype.setBgColor=function(mt){this.bgRectangle&&this.tip&&(Ht.setAttributes(this.bgRectangle,[["fill",mt]]),Ht.setAttributes(this.tip,[["fill",mt]])),this.bgColor=mt,this.fillColorChanged(mt)},Mt.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},Mt.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})},Mt.prototype.resize=function(mt){jt.prototype.resize.call(this,mt),this.positionTip()},Mt.prototype.positionTip=function(){Ht.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(Mt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Mt.prototype.select=function(){this.positionTip(),jt.prototype.select.call(this)},Mt.prototype.getState=function(){var mt=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},jt.prototype.getState.call(this));return mt.typeName=Mt.typeName,mt},Mt.prototype.restoreState=function(mt){var vt=mt;this.bgColor=vt.bgColor,this.tipPosition=vt.tipPosition,jt.prototype.restoreState.call(this,mt),this.createTip(),this.setTipPoints()},Mt.prototype.scale=function(mt,vt){jt.prototype.scale.call(this,mt,vt),this.tipPosition={x:this.tipPosition.x*mt,y:this.tipPosition.y*vt},this.positionTip()},Mt.typeName="CalloutMarker",Mt.title="Callout marker",Mt.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>',Mt}(nn),pi=function(jt){function Mt(mt,vt,Lt){var Bt=jt.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,ie),Bt.fillPanel.onColorChanged=Bt.setFillColor,Bt.strokeWidthPanel=new Rt("Line width",Lt.defaultStrokeWidths,Lt.defaultStrokeWidth),Bt.strokeWidthPanel.onWidthChanged=Bt.setStrokeWidth,Bt.strokeStylePanel=new Ot("Line style",Lt.defaultStrokeDasharrays,Lt.defaultStrokeDasharray),Bt.strokeStylePanel.onStyleChanged=Bt.setStrokeDasharray,Bt.opacityPanel=new ni("Opacity",Lt.defaultOpacitySteps,Bt.opacity),Bt.opacityPanel.onOpacityChanged=Bt.setOpacity,Bt}return te(Mt,jt),Mt.prototype.ownsTarget=function(mt){return!(!jt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual)},Mt.prototype.createVisual=function(){this.visual=Ht.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)},Mt.prototype.pointerDown=function(mt,vt){jt.prototype.pointerDown.call(this,mt,vt),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},Mt.prototype.manipulate=function(mt){jt.prototype.manipulate.call(this,mt)},Mt.prototype.resize=function(mt){jt.prototype.resize.call(this,mt),this.setSize()},Mt.prototype.setSize=function(){jt.prototype.setSize.call(this),Ht.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},Mt.prototype.pointerUp=function(mt){jt.prototype.pointerUp.call(this,mt),this.setSize()},Mt.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.visual&&Ht.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},Mt.prototype.setFillColor=function(mt){this.fillColor=mt,this.visual&&Ht.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(mt),this.stateChanged()},Mt.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.visual&&Ht.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Mt.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.visual&&Ht.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Mt.prototype.setOpacity=function(mt){this.opacity=mt,this.visual&&Ht.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Mt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Mt.prototype.getState=function(){var mt=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},jt.prototype.getState.call(this));return mt.typeName=Mt.typeName,mt},Mt.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(),jt.prototype.restoreState.call(this,mt),this.setSize()},Mt.prototype.scale=function(mt,vt){jt.prototype.scale.call(this,mt,vt),this.setSize()},Mt.typeName="EllipseMarker",Mt.title="Ellipse marker",Mt.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>',Mt}(xt),Wn=function(jt){function Mt(mt,vt,Lt){return jt.call(this,mt,vt,Lt)||this}return te(Mt,jt),Object.defineProperty(Mt.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Mt.prototype.ownsTarget=function(mt){return!(!jt.prototype.ownsTarget.call(this,mt)&&mt!==this.tip1&&mt!==this.tip2)},Mt.prototype.createTips=function(){this.tip1=Ht.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(Ht.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Ht.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(Ht.createTransform()),this.visual.appendChild(this.tip2)},Mt.prototype.pointerDown=function(mt,vt){jt.prototype.pointerDown.call(this,mt,vt),this.state==="creating"&&this.createTips()},Mt.prototype.adjustVisual=function(){if(jt.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Ht.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()]]),Ht.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(Mt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Mt.prototype.getState=function(){var mt=jt.prototype.getState.call(this);return mt.typeName=Mt.typeName,mt},Mt.prototype.restoreState=function(mt){jt.prototype.restoreState.call(this,mt),this.createTips(),this.adjustVisual()},Mt.typeName="MeasurementMarker",Mt.title="Measurement marker",Mt.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>',Mt}(Ce),un=function(jt){function Mt(mt,vt,Lt){var Bt=jt.call(this,mt,vt,Lt)||this;return Bt.strokePanel.colors=Lt.defaultColorSet,Bt.fillColor="transparent",Bt}return te(Mt,jt),Object.defineProperty(Mt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Mt.prototype.getState=function(){var mt=jt.prototype.getState.call(this);return mt.typeName=Mt.typeName,mt},Mt.typeName="EllipseFrameMarker",Mt.title="Ellipse frame marker",Mt.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>',Mt}(pi),Zn=function(){function jt(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(jt.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),jt.prototype.addUndoStep=function(Mt){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Mt)||(this.undoStack.push(Mt),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Mt)&&this.redoStack.splice(0,this.redoStack.length))},jt.prototype.replaceLastUndoStep=function(Mt){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Mt)},jt.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},jt.prototype.undo=function(){if(this.undoStack.length>1){var Mt=this.undoStack.pop();return Mt!==void 0&&this.redoStack.push(Mt),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},jt.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},jt}(),si=function(jt){function Mt(mt,vt,Lt){var Bt=jt.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 Rt("Line width",Lt.defaultStrokeWidths,Lt.defaultStrokeWidth),Bt.strokeWidthPanel.onWidthChanged=Bt.setStrokeWidth,Bt.strokeStylePanel=new Ot("Line style",Lt.defaultStrokeDasharrays,Lt.defaultStrokeDasharray),Bt.strokeStylePanel.onStyleChanged=Bt.setStrokeDasharray,Bt}return te(Mt,jt),Mt.prototype.ownsTarget=function(mt){return!(!jt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.selectorCurve&&mt!==this.visibleCurve&&!this.curveGrip.ownsTarget(mt))},Mt.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Mt.prototype.createVisual=function(){this.visual=Ht.createGroup(),this.selectorCurve=Ht.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Ht.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)},Mt.prototype.pointerDown=function(mt,vt){jt.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")},Mt.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Ht.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Ht.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Ht.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Mt.prototype.setupControlBox=function(){jt.prototype.setupControlBox.call(this),this.curveControlLine1=Ht.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Ht.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)},Mt.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,jt.prototype.addControlGrips.call(this)},Mt.prototype.positionGrips=function(){jt.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()))},Mt.prototype.manipulate=function(mt){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+mt.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+mt.y-this.manipulationStartY),jt.prototype.manipulate.call(this,mt)},Mt.prototype.resize=function(mt){this.activeGrip===this.curveGrip&&(this.curveX=mt.x,this.curveY=mt.y),jt.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)},Mt.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.adjustVisual(),this.colorChanged(mt)},Mt.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.adjustVisual()},Mt.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.adjustVisual()},Mt.prototype.scale=function(mt,vt){this.curveX=this.curveX*mt,this.curveY=this.curveY*vt,jt.prototype.scale.call(this,mt,vt)},Object.defineProperty(Mt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Mt.prototype.getState=function(){var mt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},jt.prototype.getState.call(this));return mt.typeName=Mt.typeName,mt},Mt.prototype.restoreState=function(mt){jt.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()},Mt.typeName="CurveMarker",Mt.title="Curve marker",Mt.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>',Mt}($t),Oi=function(jt){function Mt(mt,vt,Lt){var Bt=jt.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,ie),Bt.fillPanel.onColorChanged=Bt.setFillColor,Bt.strokeWidthPanel=new Rt("Line width",Lt.defaultStrokeWidths,Lt.defaultStrokeWidth),Bt.strokeWidthPanel.onWidthChanged=Bt.setStrokeWidth,Bt.strokeStylePanel=new Ot("Line style",Lt.defaultStrokeDasharrays,Lt.defaultStrokeDasharray),Bt.strokeStylePanel.onStyleChanged=Bt.setStrokeDasharray,Bt.fontFamilyPanel=new ge("Font",Lt.defaultFontFamilies,Lt.defaultFontFamily),Bt.fontFamilyPanel.onFontChanged=Bt.setFont,Bt.textColorPanel=new et("Text color",Lt.defaultColorSet,Bt.textColor,Ee),Bt.textColorPanel.onColorChanged=Bt.setTextColor,Bt}return te(Mt,jt),Mt.prototype.ownsTarget=function(mt){return!(!jt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.frame&&mt!==this.captionBg&&mt!==this.captionElement)},Mt.prototype.createVisual=function(){this.visual=Ht.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Ht.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Ht.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=Ht.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()},Mt.prototype.setCaptionText=function(mt){this.captionText=mt,this.captionElement.textContent=this.captionText,this.sizeCaption()},Mt.prototype.pointerDown=function(mt,vt){jt.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")},Mt.prototype.manipulate=function(mt){jt.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)},Mt.prototype.resize=function(mt){jt.prototype.resize.call(this,mt),this.setSize()},Mt.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),Ht.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')"]]),Ht.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')"]])},Mt.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()},Mt.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"))},Mt.prototype.finishTextEditing=function(mt){this.setCaptionText(mt.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Mt.prototype.setFont=function(mt){this.captionElement&&Ht.setAttributes(this.captionElement,[["font-family",mt]]),this.fontFamily=mt,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Mt.prototype.setTextColor=function(mt){this.captionElement&&Ht.setAttributes(this.captionElement,[["fill",mt]]),this.textColor=mt,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Mt.prototype.setSize=function(){jt.prototype.setSize.call(this),Ht.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Mt.prototype.pointerUp=function(mt){jt.prototype.pointerUp.call(this,mt),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Mt.prototype.dblClick=function(mt,vt){jt.prototype.dblClick.call(this,mt,vt),this.showTextEditor()},Mt.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.frame&&Ht.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},Mt.prototype.setFillColor=function(mt){this.fillColor=mt,this.captionBg&&Ht.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(mt),this.stateChanged()},Mt.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.frame&&Ht.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Mt.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.frame&&Ht.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Mt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Mt.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},jt.prototype.getState.call(this));return mt.typeName=this.typeName,mt},Mt.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(),jt.prototype.restoreState.call(this,mt),this.setSize()},Mt.prototype.scale=function(mt,vt){jt.prototype.scale.call(this,mt,vt),this.setSize()},Mt.typeName="CaptionFrameMarker",Mt.title="Caption frame marker",Mt.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>',Mt}(xt),on=function(){function jt(Mt,mt){mt===void 0&&(mt=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Mt,this.cancelable=mt}return Object.defineProperty(jt.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),jt.prototype.preventDefault=function(){this._defaultPrevented=!0},jt}(),ri=function(jt){function Mt(mt,vt,Lt){var Bt=jt.call(this,mt,!1)||this;return Bt.dataUrl=vt,Bt.state=Lt,Bt}return te(Mt,jt),Mt}(on),Le=function(jt){function Mt(mt,vt,Lt){Lt===void 0&&(Lt=!1);var Bt=jt.call(this,mt,Lt)||this;return Bt.marker=vt,Bt}return te(Mt,jt),Mt}(on),fi=function(){function jt(){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 jt.prototype.addEventListener=function(Mt,mt){this[Mt].push(mt)},jt.prototype.removeEventListener=function(Mt,mt){var vt=this[Mt].indexOf(mt);vt>-1&&this[Mt].splice(vt,1)},jt}(),Pi=function(){function jt(Mt){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 Zn,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 fi,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=jt.instanceCounter++,this.styles=new Vt(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Mt,this.targetRoot=document.body,this.width=Mt.clientWidth,this.height=Mt.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(jt.prototype,"ALL_MARKER_TYPES",{get:function(){return[Wt,qe,Tn,nn,un,pi,In,Pn,Wn,bn,Ce,si,Oi]},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Wt,qe,Tn,nn,pi,In,Pn]},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Wt,qe,Tn,nn,In]},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Mt){var mt=this;this._availableMarkerTypes.splice(0),Mt.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(jt.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(jt.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Mt){this._zoomLevel=Mt,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(jt.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),jt.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},jt.prototype.show=function(){var Mt=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 on(Mt))})},jt.prototype.render=function(){return Ae(this,void 0,void 0,function(){var Mt;return Be(this,function(mt){switch(mt.label){case 0:return this.setCurrentMarker(),(Mt=new ue).naturalSize=this.renderAtNaturalSize,Mt.imageType=this.renderImageType,Mt.imageQuality=this.renderImageQuality,Mt.markersOnly=this.renderMarkersOnly,Mt.width=this.renderWidth,Mt.height=this.renderHeight,[4,Mt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return mt.sent(),[4,Mt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,mt.sent()]}})})},jt.prototype.close=function(Mt){var mt=this;if(Mt===void 0&&(Mt=!1),this.isOpen){var vt=!1;Mt||this.eventListeners.beforeclose.forEach(function(Lt){var Bt=new on(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 on(mt))}),this.detachEvents(),this._isOpen=!1)}},jt.prototype.addMarkersToToolbar=function(){for(var Mt,mt=[],vt=0;vt<arguments.length;vt++)mt[vt]=arguments[vt];(Mt=this._availableMarkerTypes).push.apply(Mt,mt)},jt.prototype.addRenderEventListener=function(Mt){this.addEventListener("render",function(mt){Mt(mt.dataUrl,mt.state)})},jt.prototype.removeRenderEventListener=function(Mt){},jt.prototype.addCloseEventListener=function(Mt){this.addEventListener("close",function(){Mt()})},jt.prototype.removeCloseEventListener=function(Mt){},jt.prototype.setupResizeObserver=function(){var Mt=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Mt.resize(Mt.target.clientWidth,Mt.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Mt.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},jt.prototype.onPopupTargetResize=function(){var Mt=1*this.target.clientWidth/this.target.clientHeight,mt=this.editorCanvas.clientWidth/Mt>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Mt:this.editorCanvas.clientWidth,vt=mt<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Mt;this.resize(mt,vt)},jt.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},jt.prototype.resize=function(Mt,mt){this._isResizing=!0;var vt=Mt/this.imageWidth,Lt=mt/this.imageHeight;this.imageWidth=Math.round(Mt),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},jt.prototype.scaleMarkers=function(Mt,mt){var vt,Lt=this;this._currentMarker&&this._currentMarker instanceof nn?this._currentMarker.scale(Mt,mt):(vt=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Bt){Bt!==Lt._currentMarker&&Bt.scale(Mt,mt)}),vt!==void 0&&this.setCurrentMarker(vt)},jt.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"},jt.prototype.setTopLeft=function(){var Mt=this.editingTarget.getBoundingClientRect(),mt=this.editorCanvas.getBoundingClientRect();this.left=Mt.left-mt.left,this.top=Mt.top-mt.top},jt.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)},jt.prototype.addDefs=function(){for(var Mt,mt=[],vt=0;vt<arguments.length;vt++)mt[vt]=arguments[vt];this.defs=Ht.createDefs(),this.addDefsToImage(),(Mt=this.defs).append.apply(Mt,mt)},jt.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},jt.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)},jt.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},jt.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},jt.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)},jt.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},jt.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)},jt.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 Mt=document.createElement("a");Mt.href="https://markerjs.com/",Mt.target="_blank",Mt.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>',Mt.title="Powered by marker.js",Mt.style.display="grid",Mt.style.alignItems="center",Mt.style.justifyItems="center",Mt.style.padding="3px",Mt.style.width="20px",Mt.style.height="20px",this.logoUI.appendChild(Mt),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},jt.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")},jt.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"},jt.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},jt.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 Mt=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=Mt+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new be(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.uiOffsetTop===void 0&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new It(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},jt.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},jt.prototype.removeMarker=function(Mt){this.markerImage.removeChild(Mt.container),this.markers.indexOf(Mt)>-1&&this.markers.splice(this.markers.indexOf(Mt),1),Mt.dispose()},jt.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())},jt.prototype.toolbarButtonClicked=function(Mt,mt){if(Mt==="marker"&&mt!==void 0)this.createNewMarker(mt);else if(Mt==="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()}},jt.prototype.deleteSelectedMarker=function(){var Mt=this;if(this._currentMarker!==void 0){var mt=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Lt){var Bt=new Le(Mt,Mt._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 Le(Mt,vt))})}}},jt.prototype.clear=function(){var Mt=this,mt=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(_t){var Me=new Le(Mt,void 0,!0);_t(Me),Me.defaultPrevented&&(mt=!0)}),!mt)){this.setCurrentMarker();for(var vt=function(_t){var Me=Lt.markers[_t];Lt.setCurrentMarker(Lt.markers[_t]),Lt._currentMarker.dispose(),Lt.markerImage.removeChild(Lt._currentMarker.container),Lt.markers.splice(Lt.markers.indexOf(Lt._currentMarker),1),Lt.eventListeners.markerdelete.forEach(function(ye){return ye(new Le(Mt,Me))})},Lt=this,Bt=this.markers.length-1;Bt>=0;Bt--)vt(Bt);this.addUndoStep()}},Object.defineProperty(jt.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),jt.prototype.showNotesEditor=function(){var Mt;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=(Mt=this._currentMarker.notes)!==null&&Mt!==void 0?Mt:"",this.overlayContainer.appendChild(this.notesArea))},jt.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)},jt.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},jt.prototype.addUndoStep=function(){var Mt=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 on(Mt))})}else this.undoRedoManager.replaceLastUndoStep(mt),this.eventListeners.statechange.forEach(function(Bt){return Bt(new on(Mt))})}},jt.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},jt.prototype.undoStep=function(){var Mt=this,mt=this.undoRedoManager.undo();mt!==void 0&&(this.restoreState(mt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(vt){return vt(new on(Mt))}))},jt.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},jt.prototype.redoStep=function(){var Mt=this,mt=this.undoRedoManager.redo();mt!==void 0&&(this.restoreState(mt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(vt){return vt(new on(Mt))}))},jt.prototype.stepZoom=function(){var Mt=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Mt<this.zoomSteps.length-1?this.zoomSteps[Mt+1]:this.zoomSteps[0]},jt.prototype.panTo=function(Mt){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Mt.x,top:this.prevPanPoint.y-Mt.y}),this.prevPanPoint=Mt},jt.prototype.startRenderAndClose=function(){return Ae(this,void 0,void 0,function(){var Mt,mt,vt=this;return Be(this,function(Lt){switch(Lt.label){case 0:return[4,this.render()];case 1:return Mt=Lt.sent(),mt=this.getState(),this.eventListeners.render.forEach(function(Bt){return Bt(new ri(vt,Mt,mt))}),this.close(!0),[2]}})})},jt.prototype.getState=function(Mt){Mt===!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},jt.prototype.restoreState=function(Mt){var mt=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Mt.markers.forEach(function(vt){var Lt=mt._availableMarkerTypes.find(function(_t){return _t.typeName===vt.typeName});if(Lt!==void 0){var Bt=mt.addNewMarker(Lt);Bt.restoreState(vt),mt.markers.push(Bt)}}),Mt.width&&Mt.height&&(Mt.width!==this.imageWidth||Mt.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Mt.width,this.imageHeight/Mt.height),this.eventListeners.restorestate.forEach(function(vt){return vt(new on(mt))})},jt.prototype.addNewMarker=function(Mt){var mt=Ht.createGroup();return this.markerImage.appendChild(mt),new Mt(mt,this.overlayContainer,this.settings)},jt.prototype.createNewMarker=function(Mt){var mt,vt=this;(mt=typeof Mt=="string"?this._availableMarkerTypes.find(function(Lt){return Lt.typeName===Mt}):Mt)&&(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 Le(vt,vt._currentMarker))}))},jt.prototype.markerCreated=function(Mt){var mt=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Mt),this.setCurrentMarker(Mt),Mt instanceof qe&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(qe):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(vt){return vt(new Le(mt,mt._currentMarker))})},jt.prototype.colorChanged=function(Mt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Mt,this.settings.defaultStrokeColor=Mt)},jt.prototype.fillColorChanged=function(Mt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Mt)},jt.prototype.markerStateChanged=function(Mt){var mt=this;this.eventListeners.markerchange.forEach(function(vt){return vt(new Le(mt,Mt))})},jt.prototype.setCurrentMarker=function(Mt){var mt=this;this._currentMarker!==Mt&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(vt){return vt(new Le(mt,mt._currentMarker))})),this._currentMarker=Mt,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 Le(mt,mt._currentMarker))}))},jt.prototype.onPointerDown=function(Mt){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Mt.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(Mt.target)});mt!==void 0?(this.setCurrentMarker(mt),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Mt.clientX,Mt.clientY),Mt.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Mt.clientX,y:Mt.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Mt.clientX,Mt.clientY))},jt.prototype.onDblClick=function(Mt){if(this._isFocused||this.focus(),this.mode==="select"){var mt=this.markers.find(function(vt){return vt.ownsTarget(Mt.target)});mt!==void 0&&mt!==this._currentMarker&&this.setCurrentMarker(mt),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Mt.clientX,Mt.clientY),Mt.target):this.setCurrentMarker()}},jt.prototype.onPointerMove=function(Mt){this.touchPoints!==1&&Mt.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Mt.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Mt.clientX,Mt.clientY)):this.zoomLevel>1&&this.panTo({x:Mt.clientX,y:Mt.clientY}))},jt.prototype.onPointerUp=function(Mt){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Mt.clientX,Mt.clientY)),this.isDragging=!1,this.addUndoStep()},jt.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},jt.prototype.onKeyUp=function(Mt){this._currentMarker===void 0||this.notesArea!==void 0||Mt.key!=="Delete"&&Mt.key!=="Backspace"||this.deleteSelectedMarker()},jt.prototype.clientToLocalCoordinates=function(Mt,mt){var vt=this.markerImage.getBoundingClientRect();return{x:(Mt-vt.left)/this.zoomLevel,y:(mt-vt.top)/this.zoomLevel}},jt.prototype.onWindowResize=function(){this.positionUI()},jt.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Mt=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Mt+"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()},jt.prototype.addLicenseKey=function(Mt){ne.addKey(Mt)},jt.prototype.addEventListener=function(Mt,mt){this.eventListeners.addEventListener(Mt,mt)},jt.prototype.removeEventListener=function(Mt,mt){this.eventListeners.removeEventListener(Mt,mt)},jt.prototype.renderState=function(Mt){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Mt),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(jt.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),jt.prototype.focus=function(){var Mt=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 on(Mt))}))},jt.prototype.blur=function(){var Mt=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(mt){return mt(new on(Mt))}))},jt.instanceCounter=0,jt}()},23425:function(Cn,We,Qt){"use strict";Qt.d(We,{Z:function(){return Ot}});var Pt=Qt(18082),te=Qt(5016),Ae=Qt(10928),Be=Qt(20049),de=Qt(52456),Ht=Qt(92310),ne=Qt.n(Ht),ue=Qt(18929),ce=Qt(10228),Vt=Qt(26112),De=Qt(48736),Jt=Qt(59301),be=Qt(17119),It=[10,20,50,100],nt=function(Zt){var $t=Zt.pageSizeOptions,Ce=$t===void 0?It:$t,ge=Zt.locale,nn=Zt.changeSize,qe=Zt.pageSize,En=Zt.goButton,Tn=Zt.quickGo,bn=Zt.rootPrefixCls,ni=Zt.disabled,In=Zt.buildOptionText,Ee=Zt.showSizeChanger,ie=Zt.sizeChangerRender,Pn=Jt.useState(""),pi=(0,de.Z)(Pn,2),Wn=pi[0],un=pi[1],Zn=function(){return!Wn||Number.isNaN(Wn)?void 0:Number(Wn)},si=typeof In=="function"?In:function(mt){return"".concat(mt," ").concat(ge.items_per_page)},Oi=function(vt){un(vt.target.value)},on=function(vt){En||Wn===""||(un(""),!(vt.relatedTarget&&(vt.relatedTarget.className.indexOf("".concat(bn,"-item-link"))>=0||vt.relatedTarget.className.indexOf("".concat(bn,"-item"))>=0))&&(Tn==null||Tn(Zn())))},ri=function(vt){Wn!==""&&(vt.keyCode===ce.Z.ENTER||vt.type==="click")&&(un(""),Tn==null||Tn(Zn()))},Le=function(){return Ce.some(function(vt){return vt.toString()===qe.toString()})?Ce:Ce.concat([qe]).sort(function(vt,Lt){var Bt=Number.isNaN(Number(vt))?0:Number(vt),_t=Number.isNaN(Number(Lt))?0:Number(Lt);return Bt-_t})},fi="".concat(bn,"-options");if(!Ee&&!Tn)return null;var Pi=null,jt=null,Mt=null;return Ee&&ie&&(Pi=ie({disabled:ni,size:qe,onSizeChange:function(vt){nn==null||nn(Number(vt))},"aria-label":ge.page_size,className:"".concat(fi,"-size-changer"),options:Le().map(function(mt){return{label:si(mt),value:mt}})})),Tn&&(En&&(Mt=typeof En=="boolean"?Jt.createElement("button",{type:"button",onClick:ri,onKeyUp:ri,disabled:ni,className:"".concat(fi,"-quick-jumper-button")},ge.jump_to_confirm):Jt.createElement("span",{onClick:ri,onKeyUp:ri},En)),jt=Jt.createElement("div",{className:"".concat(fi,"-quick-jumper")},ge.jump_to,Jt.createElement("input",{disabled:ni,type:"text",value:Wn,onChange:Oi,onKeyUp:ri,onBlur:on,"aria-label":ge.page}),ge.page,Mt)),Jt.createElement("li",{className:fi},Pi,jt)},et=nt,At=function(Zt){var $t=Zt.rootPrefixCls,Ce=Zt.page,ge=Zt.active,nn=Zt.className,qe=Zt.showTitle,En=Zt.onClick,Tn=Zt.onKeyPress,bn=Zt.itemRender,ni="".concat($t,"-item"),In=ne()(ni,"".concat(ni,"-").concat(Ce),(0,Pt.Z)((0,Pt.Z)({},"".concat(ni,"-active"),ge),"".concat(ni,"-disabled"),!Ce),nn),Ee=function(){En(Ce)},ie=function(Wn){Tn(Wn,En,Ce)},Pn=bn(Ce,"page",Jt.createElement("a",{rel:"nofollow"},Ce));return Pn?Jt.createElement("li",{title:qe?String(Ce):null,className:In,onClick:Ee,onKeyDown:ie,tabIndex:0},Pn):null},at=At,ct=function(Zt,$t,Ce){return Ce};function pt(){}function xt(Wt){var Zt=Number(Wt);return typeof Zt=="number"&&!Number.isNaN(Zt)&&isFinite(Zt)&&Math.floor(Zt)===Zt}function bt(Wt,Zt,$t){var Ce=typeof Wt=="undefined"?Zt:Wt;return Math.floor(($t-1)/Ce)+1}var Rt=function(Zt){var $t=Zt.prefixCls,Ce=$t===void 0?"rc-pagination":$t,ge=Zt.selectPrefixCls,nn=ge===void 0?"rc-select":ge,qe=Zt.className,En=Zt.current,Tn=Zt.defaultCurrent,bn=Tn===void 0?1:Tn,ni=Zt.total,In=ni===void 0?0:ni,Ee=Zt.pageSize,ie=Zt.defaultPageSize,Pn=ie===void 0?10:ie,pi=Zt.onChange,Wn=pi===void 0?pt:pi,un=Zt.hideOnSinglePage,Zn=Zt.align,si=Zt.showPrevNextJumpers,Oi=si===void 0?!0:si,on=Zt.showQuickJumper,ri=Zt.showLessItems,Le=Zt.showTitle,fi=Le===void 0?!0:Le,Pi=Zt.onShowSizeChange,jt=Pi===void 0?pt:Pi,Mt=Zt.locale,mt=Mt===void 0?be.Z:Mt,vt=Zt.style,Lt=Zt.totalBoundaryShowSizeChanger,Bt=Lt===void 0?50:Lt,_t=Zt.disabled,Me=Zt.simple,ye=Zt.showTotal,Ye=Zt.showSizeChanger,Fe=Ye===void 0?In>Bt:Ye,Te=Zt.sizeChangerRender,Oe=Zt.pageSizeOptions,$e=Zt.itemRender,yn=$e===void 0?ct:$e,Kn=Zt.jumpPrevIcon,Sn=Zt.jumpNextIcon,ui=Zt.prevIcon,ci=Zt.nextIcon,mi=Jt.useRef(null),Mi=(0,ue.Z)(10,{value:Ee,defaultValue:Pn}),yr=(0,de.Z)(Mi,2),ki=yr[0],Ri=yr[1],Vi=(0,ue.Z)(1,{value:En,defaultValue:bn,postState:function(Nn){return Math.max(1,Math.min(Nn,bt(void 0,ki,In)))}}),Or=(0,de.Z)(Vi,2),qi=Or[0],Cr=Or[1],xr=Jt.useState(qi),Wr=(0,de.Z)(xr,2),$i=Wr[0],eo=Wr[1];(0,Jt.useEffect)(function(){eo(qi)},[qi]);var fo=Wn!==pt,Zr="current"in Zt,Fr=Math.max(1,qi-(ri?3:5)),ro=Math.min(bt(void 0,ki,In),qi+(ri?3:5));function Tt(An,Nn){var Vn=An||Jt.createElement("button",{type:"button","aria-label":Nn,className:"".concat(Ce,"-item-link")});return typeof An=="function"&&(Vn=Jt.createElement(An,(0,Be.Z)({},Zt))),Vn}function Gi(An){var Nn=An.target.value,Vn=bt(void 0,ki,In),Qi;return Nn===""?Qi=Nn:Number.isNaN(Number(Nn))?Qi=$i:Nn>=Vn?Qi=Vn:Qi=Number(Nn),Qi}function Zi(An){return xt(An)&&An!==qi&&xt(In)&&In>0}var Yr=In>ki?on:!1;function bo(An){(An.keyCode===ce.Z.UP||An.keyCode===ce.Z.DOWN)&&An.preventDefault()}function ko(An){var Nn=Gi(An);switch(Nn!==$i&&eo(Nn),An.keyCode){case ce.Z.ENTER:Ni(Nn);break;case ce.Z.UP:Ni(Nn-1);break;case ce.Z.DOWN:Ni(Nn+1);break;default:break}}function $o(An){Ni(Gi(An))}function Xi(An){var Nn=bt(An,ki,In),Vn=qi>Nn&&Nn!==0?Nn:qi;Ri(An),eo(Vn),jt==null||jt(qi,An),Cr(Vn),Wn==null||Wn(Vn,An)}function Ni(An){if(Zi(An)&&!_t){var Nn=bt(void 0,ki,In),Vn=An;return An>Nn?Vn=Nn:An<1&&(Vn=1),Vn!==$i&&eo(Vn),Cr(Vn),Wn==null||Wn(Vn,ki),Vn}return qi}var _e=qi>1,Re=qi<bt(void 0,ki,In);function Ue(){_e&&Ni(qi-1)}function gi(){Re&&Ni(qi+1)}function xe(){Ni(Fr)}function Hi(){Ni(ro)}function Dn(An,Nn){if(An.key==="Enter"||An.charCode===ce.Z.ENTER||An.keyCode===ce.Z.ENTER){for(var Vn=arguments.length,Qi=new Array(Vn>2?Vn-2:0),Si=2;Si<Vn;Si++)Qi[Si-2]=arguments[Si];Nn.apply(void 0,Qi)}}function Ai(An){Dn(An,Ue)}function Ve(An){Dn(An,gi)}function ze(An){Dn(An,xe)}function ai(An){Dn(An,Hi)}function he(An){var Nn=yn(An,"prev",Tt(ui,"prev page"));return Jt.isValidElement(Nn)?Jt.cloneElement(Nn,{disabled:!_e}):Nn}function an(An){var Nn=yn(An,"next",Tt(ci,"next page"));return Jt.isValidElement(Nn)?Jt.cloneElement(Nn,{disabled:!Re}):Nn}function Yn(An){(An.type==="click"||An.keyCode===ce.Z.ENTER)&&Ni($i)}var vi=null,ln=(0,Vt.Z)(Zt,{aria:!0,data:!0}),qn=ye&&Jt.createElement("li",{className:"".concat(Ce,"-total-text")},ye(In,[In===0?0:(qi-1)*ki+1,qi*ki>In?In:qi*ki])),li=null,Xe=bt(void 0,ki,In);if(un&&In<=ki)return null;var sn=[],wn={rootPrefixCls:Ce,onClick:Ni,onKeyPress:Dn,showTitle:fi,itemRender:yn,page:-1},Mn=qi-1>0?qi-1:0,ii=qi+1<Xe?qi+1:Xe,_i=on&&on.goButton,Ki=(0,Ae.Z)(Me)==="object"?Me.readOnly:!Me,Ti=_i,en=null;Me&&(_i&&(typeof _i=="boolean"?Ti=Jt.createElement("button",{type:"button",onClick:Yn,onKeyUp:Yn},mt.jump_to_confirm):Ti=Jt.createElement("span",{onClick:Yn,onKeyUp:Yn},_i),Ti=Jt.createElement("li",{title:fi?"".concat(mt.jump_to).concat(qi,"/").concat(Xe):null,className:"".concat(Ce,"-simple-pager")},Ti)),en=Jt.createElement("li",{title:fi?"".concat(qi,"/").concat(Xe):null,className:"".concat(Ce,"-simple-pager")},Ki?$i:Jt.createElement("input",{type:"text","aria-label":mt.jump_to,value:$i,disabled:_t,onKeyDown:bo,onKeyUp:ko,onChange:ko,onBlur:$o,size:3}),Jt.createElement("span",{className:"".concat(Ce,"-slash")},"/"),Xe));var Lr=ri?1:2;if(Xe<=3+Lr*2){Xe||sn.push(Jt.createElement(at,(0,te.Z)({},wn,{key:"noPager",page:1,className:"".concat(Ce,"-item-disabled")})));for(var cr=1;cr<=Xe;cr+=1)sn.push(Jt.createElement(at,(0,te.Z)({},wn,{key:cr,page:cr,active:qi===cr})))}else{var Ur=ri?mt.prev_3:mt.prev_5,rn=ri?mt.next_3:mt.next_5,oi=yn(Fr,"jump-prev",Tt(Kn,"prev page")),Ci=yn(ro,"jump-next",Tt(Sn,"next page"));Oi&&(vi=oi?Jt.createElement("li",{title:fi?Ur:null,key:"prev",onClick:xe,tabIndex:0,onKeyDown:ze,className:ne()("".concat(Ce,"-jump-prev"),(0,Pt.Z)({},"".concat(Ce,"-jump-prev-custom-icon"),!!Kn))},oi):null,li=Ci?Jt.createElement("li",{title:fi?rn:null,key:"next",onClick:Hi,tabIndex:0,onKeyDown:ai,className:ne()("".concat(Ce,"-jump-next"),(0,Pt.Z)({},"".concat(Ce,"-jump-next-custom-icon"),!!Sn))},Ci):null);var bi=Math.max(1,qi-Lr),xi=Math.min(qi+Lr,Xe);qi-1<=Lr&&(xi=1+Lr*2),Xe-qi<=Lr&&(bi=Xe-Lr*2);for(var Ei=bi;Ei<=xi;Ei+=1)sn.push(Jt.createElement(at,(0,te.Z)({},wn,{key:Ei,page:Ei,active:qi===Ei})));if(qi-1>=Lr*2&&qi!==3&&(sn[0]=Jt.cloneElement(sn[0],{className:ne()("".concat(Ce,"-item-after-jump-prev"),sn[0].props.className)}),sn.unshift(vi)),Xe-qi>=Lr*2&&qi!==Xe-2){var Yi=sn[sn.length-1];sn[sn.length-1]=Jt.cloneElement(Yi,{className:ne()("".concat(Ce,"-item-before-jump-next"),Yi.props.className)}),sn.push(li)}bi!==1&&sn.unshift(Jt.createElement(at,(0,te.Z)({},wn,{key:1,page:1}))),xi!==Xe&&sn.push(Jt.createElement(at,(0,te.Z)({},wn,{key:Xe,page:Xe})))}var sr=he(Mn);if(sr){var oe=!_e||!Xe;sr=Jt.createElement("li",{title:fi?mt.prev_page:null,onClick:Ue,tabIndex:oe?null:0,onKeyDown:Ai,className:ne()("".concat(Ce,"-prev"),(0,Pt.Z)({},"".concat(Ce,"-disabled"),oe)),"aria-disabled":oe},sr)}var ae=an(ii);if(ae){var ee,je;Me?(ee=!Re,je=_e?0:null):(ee=!Re||!Xe,je=ee?null:0),ae=Jt.createElement("li",{title:fi?mt.next_page:null,onClick:gi,tabIndex:je,onKeyDown:Ve,className:ne()("".concat(Ce,"-next"),(0,Pt.Z)({},"".concat(Ce,"-disabled"),ee)),"aria-disabled":ee},ae)}var Se=ne()(Ce,qe,(0,Pt.Z)((0,Pt.Z)((0,Pt.Z)((0,Pt.Z)((0,Pt.Z)({},"".concat(Ce,"-start"),Zn==="start"),"".concat(Ce,"-center"),Zn==="center"),"".concat(Ce,"-end"),Zn==="end"),"".concat(Ce,"-simple"),Me),"".concat(Ce,"-disabled"),_t));return Jt.createElement("ul",(0,te.Z)({className:Se,style:vt,ref:mi},ln),qn,sr,Me?en:sn,ae,Jt.createElement(et,{locale:mt,rootPrefixCls:Ce,disabled:_t,selectPrefixCls:nn,changeSize:Xi,pageSize:ki,pageSizeOptions:Oe,quickGo:Yr?Ni:null,goButton:Ti,showSizeChanger:Fe,sizeChangerRender:Te}))},Ot=Rt},738:function(Cn,We,Qt){"use strict";Qt.d(We,{Z:function(){return pt}});var Pt=Qt(5016),te=Qt(18082),Ae=Qt(52456),Be=Qt(5883),de=Qt(92310),Ht=Qt.n(de),ne=Qt(18929),ue=Qt(10228),ce=Qt(26112),Vt=Qt(59301);function De(xt,bt){var Rt=xt.disabled,Ot=xt.prefixCls,Wt=xt.character,Zt=xt.characterRender,$t=xt.index,Ce=xt.count,ge=xt.value,nn=xt.allowHalf,qe=xt.focused,En=xt.onHover,Tn=xt.onClick,bn=function(un){En(un,$t)},ni=function(un){Tn(un,$t)},In=function(un){un.keyCode===ue.Z.ENTER&&Tn(un,$t)},Ee=$t+1,ie=new Set([Ot]);ge===0&&$t===0&&qe?ie.add("".concat(Ot,"-focused")):nn&&ge+.5>=Ee&&ge<Ee?(ie.add("".concat(Ot,"-half")),ie.add("".concat(Ot,"-active")),qe&&ie.add("".concat(Ot,"-focused"))):(Ee<=ge?ie.add("".concat(Ot,"-full")):ie.add("".concat(Ot,"-zero")),Ee===ge&&qe&&ie.add("".concat(Ot,"-focused")));var Pn=typeof Wt=="function"?Wt(xt):Wt,pi=Vt.createElement("li",{className:Ht()(Array.from(ie)),ref:bt},Vt.createElement("div",{onClick:Rt?null:ni,onKeyDown:Rt?null:In,onMouseMove:Rt?null:bn,role:"radio","aria-checked":ge>$t?"true":"false","aria-posinset":$t+1,"aria-setsize":Ce,tabIndex:Rt?-1:0},Vt.createElement("div",{className:"".concat(Ot,"-first")},Pn),Vt.createElement("div",{className:"".concat(Ot,"-second")},Pn)));return Zt&&(pi=Zt(pi,xt)),pi}var Jt=Vt.forwardRef(De);function be(){var xt=Vt.useRef({});function bt(Ot){return xt.current[Ot]}function Rt(Ot){return function(Wt){xt.current[Ot]=Wt}}return[bt,Rt]}function It(xt){var bt=xt.pageXOffset,Rt="scrollLeft";if(typeof bt!="number"){var Ot=xt.document;bt=Ot.documentElement[Rt],typeof bt!="number"&&(bt=Ot.body[Rt])}return bt}function nt(xt){var bt,Rt,Ot=xt.ownerDocument,Wt=Ot.body,Zt=Ot&&Ot.documentElement,$t=xt.getBoundingClientRect();return bt=$t.left,Rt=$t.top,bt-=Zt.clientLeft||Wt.clientLeft||0,Rt-=Zt.clientTop||Wt.clientTop||0,{left:bt,top:Rt}}function et(xt){var bt=nt(xt),Rt=xt.ownerDocument,Ot=Rt.defaultView||Rt.parentWindow;return bt.left+=It(Ot),bt.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,bt){var Rt=xt.prefixCls,Ot=Rt===void 0?"rc-rate":Rt,Wt=xt.className,Zt=xt.defaultValue,$t=xt.value,Ce=xt.count,ge=Ce===void 0?5:Ce,nn=xt.allowHalf,qe=nn===void 0?!1:nn,En=xt.allowClear,Tn=En===void 0?!0:En,bn=xt.keyboard,ni=bn===void 0?!0:bn,In=xt.character,Ee=In===void 0?"\u2605":In,ie=xt.characterRender,Pn=xt.disabled,pi=xt.direction,Wn=pi===void 0?"ltr":pi,un=xt.tabIndex,Zn=un===void 0?0:un,si=xt.autoFocus,Oi=xt.onHoverChange,on=xt.onChange,ri=xt.onFocus,Le=xt.onBlur,fi=xt.onKeyDown,Pi=xt.onMouseLeave,jt=(0,Be.Z)(xt,At),Mt=be(),mt=(0,Ae.Z)(Mt,2),vt=mt[0],Lt=mt[1],Bt=Vt.useRef(null),_t=function(){if(!Pn){var Fr;(Fr=Bt.current)===null||Fr===void 0||Fr.focus()}};Vt.useImperativeHandle(bt,function(){return{focus:_t,blur:function(){if(!Pn){var Fr;(Fr=Bt.current)===null||Fr===void 0||Fr.blur()}}}});var Me=(0,ne.Z)(Zt||0,{value:$t}),ye=(0,Ae.Z)(Me,2),Ye=ye[0],Fe=ye[1],Te=(0,ne.Z)(null),Oe=(0,Ae.Z)(Te,2),$e=Oe[0],yn=Oe[1],Kn=function(Fr,ro){var Tt=Wn==="rtl",Gi=Fr+1;if(qe){var Zi=vt(Fr),Yr=et(Zi),bo=Zi.clientWidth;(Tt&&ro-Yr>bo/2||!Tt&&ro-Yr<bo/2)&&(Gi-=.5)}return Gi},Sn=function(Fr){Fe(Fr),on==null||on(Fr)},ui=Vt.useState(!1),ci=(0,Ae.Z)(ui,2),mi=ci[0],Mi=ci[1],yr=function(){Mi(!0),ri==null||ri()},ki=function(){Mi(!1),Le==null||Le()},Ri=Vt.useState(null),Vi=(0,Ae.Z)(Ri,2),Or=Vi[0],qi=Vi[1],Cr=function(Fr,ro){var Tt=Kn(ro,Fr.pageX);Tt!==$e&&(qi(Tt),yn(null)),Oi==null||Oi(Tt)},xr=function(Fr){Pn||(qi(null),yn(null),Oi==null||Oi(void 0)),Fr&&(Pi==null||Pi(Fr))},Wr=function(Fr,ro){var Tt=Kn(ro,Fr.pageX),Gi=!1;Tn&&(Gi=Tt===Ye),xr(),Sn(Gi?0:Tt),yn(Gi?Tt:null)},$i=function(Fr){var ro=Fr.keyCode,Tt=Wn==="rtl",Gi=qe?.5:1;ni&&(ro===ue.Z.RIGHT&&Ye<ge&&!Tt?(Sn(Ye+Gi),Fr.preventDefault()):ro===ue.Z.LEFT&&Ye>0&&!Tt||ro===ue.Z.RIGHT&&Ye>0&&Tt?(Sn(Ye-Gi),Fr.preventDefault()):ro===ue.Z.LEFT&&Ye<ge&&Tt&&(Sn(Ye+Gi),Fr.preventDefault())),fi==null||fi(Fr)};Vt.useEffect(function(){si&&!Pn&&_t()},[]);var eo=new Array(ge).fill(0).map(function(Zr,Fr){return Vt.createElement(Jt,{ref:Lt(Fr),index:Fr,count:ge,disabled:Pn,prefixCls:"".concat(Ot,"-star"),allowHalf:qe,value:Or===null?Ye:Or,onClick:Wr,onHover:Cr,key:Zr||Fr,character:Ee,characterRender:ie,focused:mi})}),fo=Ht()(Ot,Wt,(0,te.Z)((0,te.Z)({},"".concat(Ot,"-disabled"),Pn),"".concat(Ot,"-rtl"),Wn==="rtl"));return Vt.createElement("ul",(0,Pt.Z)({className:fo,onMouseLeave:xr,tabIndex:Pn?-1:Zn,onFocus:Pn?null:yr,onBlur:Pn?null:ki,onKeyDown:Pn?null:$i,ref:Bt},(0,ce.Z)(jt,{aria:!0,data:!0,attr:!0})),eo)}var ct=Vt.forwardRef(at),pt=ct},90317:function(Cn,We,Qt){"use strict";Qt.d(We,{ZP:function(){return ne}});var Pt=Qt(52456),te=Qt(59301),Ae=Qt(47273),Be=0,de=(0,Ae.Z)();function Ht(){var ue;return de?(ue=Be,Be+=1):ue="TEST_OR_SSR",ue}function ne(ue){var ce=te.useState(),Vt=(0,Pt.Z)(ce,2),De=Vt[0],Jt=Vt[1];return te.useEffect(function(){Jt("rc_select_".concat(Ht()))},[]),ue||De}},7526:function(Cn,We,Qt){"use strict";Qt.d(We,{Ac:function(){return ui},Xo:function(){return mi},Wx:function(){return yr},ZP:function(){return Ai},lk:function(){return pt}});var Pt=Qt(5016),te=Qt(92393),Ae=Qt(18082),Be=Qt(20049),de=Qt(52456),Ht=Qt(5883),ne=Qt(10928),ue=Qt(18929),ce=Qt(48736),Vt=Qt(59301),De=Qt(92310),Jt=Qt.n(De),be=Qt(34280),It=Qt(49658),nt=Qt(8654),et=function(ze){var ai=ze.className,he=ze.customizeIcon,an=ze.customizeIconProps,Yn=ze.children,vi=ze.onMouseDown,ln=ze.onClick,qn=typeof he=="function"?he(an):he;return Vt.createElement("span",{className:ai,onMouseDown:function(Xe){Xe.preventDefault(),vi==null||vi(Xe)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:ln,"aria-hidden":!0},qn!==void 0?qn:Vt.createElement("span",{className:Jt()(ai.split(/\s+/).map(function(li){return"".concat(li,"-icon")}))},Yn))},At=et,at=function(ze,ai,he,an,Yn){var vi=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,ln=arguments.length>6?arguments[6]:void 0,qn=arguments.length>7?arguments[7]:void 0,li=Vt.useMemo(function(){if((0,ne.Z)(an)==="object")return an.clearIcon;if(Yn)return Yn},[an,Yn]),Xe=Vt.useMemo(function(){return!!(!vi&&an&&(he.length||ln)&&!(qn==="combobox"&&ln===""))},[an,vi,he.length,ln,qn]);return{allowClear:Xe,clearIcon:Vt.createElement(At,{className:"".concat(ze,"-clear"),onMouseDown:ai,customizeIcon:li},"\xD7")}},ct=Vt.createContext(null);function pt(){return Vt.useContext(ct)}function xt(){var Ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,ze=Vt.useState(!1),ai=(0,de.Z)(ze,2),he=ai[0],an=ai[1],Yn=Vt.useRef(null),vi=function(){window.clearTimeout(Yn.current)};Vt.useEffect(function(){return vi},[]);var ln=function(li,Xe){vi(),Yn.current=window.setTimeout(function(){an(li),Xe&&Xe()},Ve)};return[he,ln,vi]}function bt(){var Ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,ze=Vt.useRef(null),ai=Vt.useRef(null);Vt.useEffect(function(){return function(){window.clearTimeout(ai.current)}},[]);function he(an){(an||ze.current===null)&&(ze.current=an),window.clearTimeout(ai.current),ai.current=window.setTimeout(function(){ze.current=null},Ve)}return[function(){return ze.current},he]}function Rt(Ve,ze,ai,he){var an=Vt.useRef(null);an.current={open:ze,triggerOpen:ai,customizedTrigger:he},Vt.useEffect(function(){function Yn(vi){var ln;if(!((ln=an.current)!==null&&ln!==void 0&&ln.customizedTrigger)){var qn=vi.target;qn.shadowRoot&&vi.composed&&(qn=vi.composedPath()[0]||qn),an.current.open&&Ve().filter(function(li){return li}).every(function(li){return!li.contains(qn)&&li!==qn})&&an.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Yn),function(){return window.removeEventListener("mousedown",Yn)}},[])}var Ot=Qt(10228);function Wt(Ve){return Ve&&![Ot.Z.ESC,Ot.Z.SHIFT,Ot.Z.BACKSPACE,Ot.Z.TAB,Ot.Z.WIN_KEY,Ot.Z.ALT,Ot.Z.META,Ot.Z.WIN_KEY_RIGHT,Ot.Z.CTRL,Ot.Z.SEMICOLON,Ot.Z.EQUALS,Ot.Z.CAPS_LOCK,Ot.Z.CONTEXT_MENU,Ot.Z.F1,Ot.Z.F2,Ot.Z.F3,Ot.Z.F4,Ot.Z.F5,Ot.Z.F6,Ot.Z.F7,Ot.Z.F8,Ot.Z.F9,Ot.Z.F10,Ot.Z.F11,Ot.Z.F12].includes(Ve)}var Zt=Qt(26112),$t=Qt(11780),Ce=function(ze,ai){var he,an=ze.prefixCls,Yn=ze.id,vi=ze.inputElement,ln=ze.disabled,qn=ze.tabIndex,li=ze.autoFocus,Xe=ze.autoComplete,sn=ze.editable,wn=ze.activeDescendantId,Mn=ze.value,ii=ze.maxLength,_i=ze.onKeyDown,Ki=ze.onMouseDown,Ti=ze.onChange,en=ze.onPaste,Lr=ze.onCompositionStart,cr=ze.onCompositionEnd,Ur=ze.onBlur,rn=ze.open,oi=ze.attrs,Ci=vi||Vt.createElement("input",null),bi=Ci,xi=bi.ref,Ei=bi.props,Yi=Ei.onKeyDown,sr=Ei.onChange,oe=Ei.onMouseDown,ae=Ei.onCompositionStart,ee=Ei.onCompositionEnd,je=Ei.onBlur,Se=Ei.style;return(0,ce.Kp)(!("maxLength"in Ci.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Ci=Vt.cloneElement(Ci,(0,Be.Z)((0,Be.Z)((0,Be.Z)({type:"search"},Ei),{},{id:Yn,ref:(0,nt.sQ)(ai,xi),disabled:ln,tabIndex:qn,autoComplete:Xe||"off",autoFocus:li,className:Jt()("".concat(an,"-selection-search-input"),(he=Ci)===null||he===void 0||(he=he.props)===null||he===void 0?void 0:he.className),role:"combobox","aria-expanded":rn||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Yn,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Yn,"_list"),"aria-activedescendant":rn?wn:void 0},oi),{},{value:sn?Mn:"",maxLength:ii,readOnly:!sn,unselectable:sn?null:"on",style:(0,Be.Z)((0,Be.Z)({},Se),{},{opacity:sn?null:0}),onKeyDown:function(Nn){_i(Nn),Yi&&Yi(Nn)},onMouseDown:function(Nn){Ki(Nn),oe&&oe(Nn)},onChange:function(Nn){Ti(Nn),sr&&sr(Nn)},onCompositionStart:function(Nn){Lr(Nn),ae&&ae(Nn)},onCompositionEnd:function(Nn){cr(Nn),ee&&ee(Nn)},onPaste:en,onBlur:function(Nn){Ur(Nn),je&&je(Nn)}})),Ci},ge=Vt.forwardRef(Ce),nn=ge;function qe(Ve){return Array.isArray(Ve)?Ve:Ve!==void 0?[Ve]:[]}var En=typeof window!="undefined"&&window.document&&window.document.documentElement,Tn=En;function bn(Ve){return Ve!=null}function ni(Ve){return!Ve&&Ve!==0}function In(Ve){return["string","number"].includes((0,ne.Z)(Ve))}function Ee(Ve){var ze=void 0;return Ve&&(In(Ve.title)?ze=Ve.title.toString():In(Ve.label)&&(ze=Ve.label.toString())),ze}function ie(Ve,ze){Tn?Vt.useLayoutEffect(Ve,ze):Vt.useEffect(Ve,ze)}function Pn(Ve){var ze;return(ze=Ve.key)!==null&&ze!==void 0?ze:Ve.value}var pi=function(ze){ze.preventDefault(),ze.stopPropagation()},Wn=function(ze){var ai=ze.id,he=ze.prefixCls,an=ze.values,Yn=ze.open,vi=ze.searchValue,ln=ze.autoClearSearchValue,qn=ze.inputRef,li=ze.placeholder,Xe=ze.disabled,sn=ze.mode,wn=ze.showSearch,Mn=ze.autoFocus,ii=ze.autoComplete,_i=ze.activeDescendantId,Ki=ze.tabIndex,Ti=ze.removeIcon,en=ze.maxTagCount,Lr=ze.maxTagTextLength,cr=ze.maxTagPlaceholder,Ur=cr===void 0?function(jn){return"+ ".concat(jn.length," ...")}:cr,rn=ze.tagRender,oi=ze.onToggleOpen,Ci=ze.onRemove,bi=ze.onInputChange,xi=ze.onInputPaste,Ei=ze.onInputKeyDown,Yi=ze.onInputMouseDown,sr=ze.onInputCompositionStart,oe=ze.onInputCompositionEnd,ae=ze.onInputBlur,ee=Vt.useRef(null),je=(0,Vt.useState)(0),Se=(0,de.Z)(je,2),An=Se[0],Nn=Se[1],Vn=(0,Vt.useState)(!1),Qi=(0,de.Z)(Vn,2),Si=Qi[0],Ne=Qi[1],wi="".concat(he,"-selection"),ke=Yn||sn==="multiple"&&ln===!1||sn==="tags"?vi:"",hn=sn==="tags"||sn==="multiple"&&ln===!1||wn&&(Yn||Si);ie(function(){Nn(ee.current.scrollWidth)},[ke]);var Qe=function(dn,tn,gn,mn,xn){return Vt.createElement("span",{title:Ee(dn),className:Jt()("".concat(wi,"-item"),(0,Ae.Z)({},"".concat(wi,"-item-disabled"),gn))},Vt.createElement("span",{className:"".concat(wi,"-item-content")},tn),mn&&Vt.createElement(At,{className:"".concat(wi,"-item-remove"),onMouseDown:pi,onClick:xn,customizeIcon:Ti},"\xD7"))},Ut=function(dn,tn,gn,mn,xn,hi){var zn=function(cn){pi(cn),oi(!Yn)};return Vt.createElement("span",{onMouseDown:zn},rn({label:tn,value:dn,disabled:gn,closable:mn,onClose:xn,isMaxTag:!!hi}))},pn=function(dn){var tn=dn.disabled,gn=dn.label,mn=dn.value,xn=!Xe&&!tn,hi=gn;if(typeof Lr=="number"&&(typeof gn=="string"||typeof gn=="number")){var zn=String(hi);zn.length>Lr&&(hi="".concat(zn.slice(0,Lr),"..."))}var Xn=function(ti){ti&&ti.stopPropagation(),Ci(dn)};return typeof rn=="function"?Ut(mn,hi,tn,xn,Xn):Qe(dn,hi,tn,xn,Xn)},fn=function(dn){if(!an.length)return null;var tn=typeof Ur=="function"?Ur(dn):Ur;return typeof rn=="function"?Ut(void 0,tn,!1,!1,void 0,!0):Qe({title:tn},tn,!1)},Qn=Vt.createElement("div",{className:"".concat(wi,"-search"),style:{width:An},onFocus:function(){Ne(!0)},onBlur:function(){Ne(!1)}},Vt.createElement(nn,{ref:qn,open:Yn,prefixCls:he,id:ai,inputElement:null,disabled:Xe,autoFocus:Mn,autoComplete:ii,editable:hn,activeDescendantId:_i,value:ke,onKeyDown:Ei,onMouseDown:Yi,onChange:bi,onPaste:xi,onCompositionStart:sr,onCompositionEnd:oe,onBlur:ae,tabIndex:Ki,attrs:(0,Zt.Z)(ze,!0)}),Vt.createElement("span",{ref:ee,className:"".concat(wi,"-search-mirror"),"aria-hidden":!0},ke,"\xA0")),Gn=Vt.createElement($t.Z,{prefixCls:"".concat(wi,"-overflow"),data:an,renderItem:pn,renderRest:fn,suffix:Qn,itemKey:Pn,maxCount:en});return Vt.createElement("span",{className:"".concat(wi,"-wrap")},Gn,!an.length&&!ke&&Vt.createElement("span",{className:"".concat(wi,"-placeholder")},li))},un=Wn,Zn=function(ze){var ai=ze.inputElement,he=ze.prefixCls,an=ze.id,Yn=ze.inputRef,vi=ze.disabled,ln=ze.autoFocus,qn=ze.autoComplete,li=ze.activeDescendantId,Xe=ze.mode,sn=ze.open,wn=ze.values,Mn=ze.placeholder,ii=ze.tabIndex,_i=ze.showSearch,Ki=ze.searchValue,Ti=ze.activeValue,en=ze.maxLength,Lr=ze.onInputKeyDown,cr=ze.onInputMouseDown,Ur=ze.onInputChange,rn=ze.onInputPaste,oi=ze.onInputCompositionStart,Ci=ze.onInputCompositionEnd,bi=ze.onInputBlur,xi=ze.title,Ei=Vt.useState(!1),Yi=(0,de.Z)(Ei,2),sr=Yi[0],oe=Yi[1],ae=Xe==="combobox",ee=ae||_i,je=wn[0],Se=Ki||"";ae&&Ti&&!sr&&(Se=Ti),Vt.useEffect(function(){ae&&oe(!1)},[ae,Ti]);var An=Xe!=="combobox"&&!sn&&!_i?!1:!!Se,Nn=xi===void 0?Ee(je):xi,Vn=Vt.useMemo(function(){return je?null:Vt.createElement("span",{className:"".concat(he,"-selection-placeholder"),style:An?{visibility:"hidden"}:void 0},Mn)},[je,An,Mn,he]);return Vt.createElement("span",{className:"".concat(he,"-selection-wrap")},Vt.createElement("span",{className:"".concat(he,"-selection-search")},Vt.createElement(nn,{ref:Yn,prefixCls:he,id:an,open:sn,inputElement:ai,disabled:vi,autoFocus:ln,autoComplete:qn,editable:ee,activeDescendantId:li,value:Se,onKeyDown:Lr,onMouseDown:cr,onChange:function(Si){oe(!0),Ur(Si)},onPaste:rn,onCompositionStart:oi,onCompositionEnd:Ci,onBlur:bi,tabIndex:ii,attrs:(0,Zt.Z)(ze,!0),maxLength:ae?en:void 0})),!ae&&je?Vt.createElement("span",{className:"".concat(he,"-selection-item"),title:Nn,style:An?{visibility:"hidden"}:void 0},je.label):null,Vn)},si=Zn,Oi=function(ze,ai){var he=(0,Vt.useRef)(null),an=(0,Vt.useRef)(!1),Yn=ze.prefixCls,vi=ze.open,ln=ze.mode,qn=ze.showSearch,li=ze.tokenWithEnter,Xe=ze.disabled,sn=ze.prefix,wn=ze.autoClearSearchValue,Mn=ze.onSearch,ii=ze.onSearchSubmit,_i=ze.onToggleOpen,Ki=ze.onInputKeyDown,Ti=ze.onInputBlur,en=ze.domRef;Vt.useImperativeHandle(ai,function(){return{focus:function(Nn){he.current.focus(Nn)},blur:function(){he.current.blur()}}});var Lr=bt(0),cr=(0,de.Z)(Lr,2),Ur=cr[0],rn=cr[1],oi=function(Nn){var Vn=Nn.which,Qi=he.current instanceof HTMLTextAreaElement;!Qi&&vi&&(Vn===Ot.Z.UP||Vn===Ot.Z.DOWN)&&Nn.preventDefault(),Ki&&Ki(Nn),Vn===Ot.Z.ENTER&&ln==="tags"&&!an.current&&!vi&&(ii==null||ii(Nn.target.value)),!(Qi&&!vi&&~[Ot.Z.UP,Ot.Z.DOWN,Ot.Z.LEFT,Ot.Z.RIGHT].indexOf(Vn))&&Wt(Vn)&&_i(!0)},Ci=function(){rn(!0)},bi=(0,Vt.useRef)(null),xi=function(Nn){Mn(Nn,!0,an.current)!==!1&&_i(!0)},Ei=function(){an.current=!0},Yi=function(Nn){an.current=!1,ln!=="combobox"&&xi(Nn.target.value)},sr=function(Nn){var Vn=Nn.target.value;if(li&&bi.current&&/[\r\n]/.test(bi.current)){var Qi=bi.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Vn=Vn.replace(Qi,bi.current)}bi.current=null,xi(Vn)},oe=function(Nn){var Vn=Nn.clipboardData,Qi=Vn==null?void 0:Vn.getData("text");bi.current=Qi||""},ae=function(Nn){var Vn=Nn.target;if(Vn!==he.current){var Qi=document.body.style.msTouchAction!==void 0;Qi?setTimeout(function(){he.current.focus()}):he.current.focus()}},ee=function(Nn){var Vn=Ur();Nn.target!==he.current&&!Vn&&!(ln==="combobox"&&Xe)&&Nn.preventDefault(),(ln!=="combobox"&&(!qn||!Vn)||!vi)&&(vi&&wn!==!1&&Mn("",!0,!1),_i())},je={inputRef:he,onInputKeyDown:oi,onInputMouseDown:Ci,onInputChange:sr,onInputPaste:oe,onInputCompositionStart:Ei,onInputCompositionEnd:Yi,onInputBlur:Ti},Se=ln==="multiple"||ln==="tags"?Vt.createElement(un,(0,Pt.Z)({},ze,je)):Vt.createElement(si,(0,Pt.Z)({},ze,je));return Vt.createElement("div",{ref:en,className:"".concat(Yn,"-selector"),onClick:ae,onMouseDown:ee},sn&&Vt.createElement("div",{className:"".concat(Yn,"-prefix")},sn),Se)},on=Vt.forwardRef(Oi),ri=on,Le=Qt(65352),fi=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Pi=function(ze){var ai=ze===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:ai,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:ai,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:ai,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:ai,adjustY:1},htmlRegion:"scroll"}}},jt=function(ze,ai){var he=ze.prefixCls,an=ze.disabled,Yn=ze.visible,vi=ze.children,ln=ze.popupElement,qn=ze.animation,li=ze.transitionName,Xe=ze.dropdownStyle,sn=ze.dropdownClassName,wn=ze.direction,Mn=wn===void 0?"ltr":wn,ii=ze.placement,_i=ze.builtinPlacements,Ki=ze.dropdownMatchSelectWidth,Ti=ze.dropdownRender,en=ze.dropdownAlign,Lr=ze.getPopupContainer,cr=ze.empty,Ur=ze.getTriggerDOMNode,rn=ze.onPopupVisibleChange,oi=ze.onPopupMouseEnter,Ci=(0,Ht.Z)(ze,fi),bi="".concat(he,"-dropdown"),xi=ln;Ti&&(xi=Ti(ln));var Ei=Vt.useMemo(function(){return _i||Pi(Ki)},[_i,Ki]),Yi=qn?"".concat(bi,"-").concat(qn):li,sr=typeof Ki=="number",oe=Vt.useMemo(function(){return sr?null:Ki===!1?"minWidth":"width"},[Ki,sr]),ae=Xe;sr&&(ae=(0,Be.Z)((0,Be.Z)({},ae),{},{width:Ki}));var ee=Vt.useRef(null);return Vt.useImperativeHandle(ai,function(){return{getPopupElement:function(){var Se;return(Se=ee.current)===null||Se===void 0?void 0:Se.popupElement}}}),Vt.createElement(Le.Z,(0,Pt.Z)({},Ci,{showAction:rn?["click"]:[],hideAction:rn?["click"]:[],popupPlacement:ii||(Mn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Ei,prefixCls:bi,popupTransitionName:Yi,popup:Vt.createElement("div",{onMouseEnter:oi},xi),ref:ee,stretch:oe,popupAlign:en,popupVisible:Yn,getPopupContainer:Lr,popupClassName:Jt()(sn,(0,Ae.Z)({},"".concat(bi,"-empty"),cr)),popupStyle:ae,getTriggerDOMNode:Ur,onPopupVisibleChange:rn}),vi)},Mt=Vt.forwardRef(jt),mt=Mt,vt=Qt(74604);function Lt(Ve,ze){var ai=Ve.key,he;return"value"in Ve&&(he=Ve.value),ai!=null?ai:he!==void 0?he:"rc-index-key-".concat(ze)}function Bt(Ve){return typeof Ve!="undefined"&&!Number.isNaN(Ve)}function _t(Ve,ze){var ai=Ve||{},he=ai.label,an=ai.value,Yn=ai.options,vi=ai.groupLabel,ln=he||(ze?"children":"label");return{label:ln,value:an||"value",options:Yn||"options",groupLabel:vi||ln}}function Me(Ve){var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ai=ze.fieldNames,he=ze.childrenAsData,an=[],Yn=_t(ai,!1),vi=Yn.label,ln=Yn.value,qn=Yn.options,li=Yn.groupLabel;function Xe(sn,wn){Array.isArray(sn)&&sn.forEach(function(Mn){if(wn||!(qn in Mn)){var ii=Mn[ln];an.push({key:Lt(Mn,an.length),groupOption:wn,data:Mn,label:Mn[vi],value:ii})}else{var _i=Mn[li];_i===void 0&&he&&(_i=Mn.label),an.push({key:Lt(Mn,an.length),group:!0,data:Mn,label:_i}),Xe(Mn[qn],!0)}})}return Xe(Ve,!1),an}function ye(Ve){var ze=(0,Be.Z)({},Ve);return"props"in ze||Object.defineProperty(ze,"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`."),ze}}),ze}var Ye=function(ze,ai,he){if(!ai||!ai.length)return null;var an=!1,Yn=function ln(qn,li){var Xe=(0,vt.Z)(li),sn=Xe[0],wn=Xe.slice(1);if(!sn)return[qn];var Mn=qn.split(sn);return an=an||Mn.length>1,Mn.reduce(function(ii,_i){return[].concat((0,te.Z)(ii),(0,te.Z)(ln(_i,wn)))},[]).filter(Boolean)},vi=Yn(ze,ai);return an?typeof he!="undefined"?vi.slice(0,he):vi:null},Fe=Vt.createContext(null),Te=Fe;function Oe(Ve){var ze=Ve.visible,ai=Ve.values;if(!ze)return null;var he=50;return Vt.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(ai.slice(0,he).map(function(an){var Yn=an.label,vi=an.value;return["number","string"].includes((0,ne.Z)(Yn))?Yn:vi}).join(", ")),ai.length>he?", ...":null)}var $e=["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"],yn=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Kn=function(ze){return ze==="tags"||ze==="multiple"},Sn=Vt.forwardRef(function(Ve,ze){var ai,he=Ve.id,an=Ve.prefixCls,Yn=Ve.className,vi=Ve.showSearch,ln=Ve.tagRender,qn=Ve.direction,li=Ve.omitDomProps,Xe=Ve.displayValues,sn=Ve.onDisplayValuesChange,wn=Ve.emptyOptions,Mn=Ve.notFoundContent,ii=Mn===void 0?"Not Found":Mn,_i=Ve.onClear,Ki=Ve.mode,Ti=Ve.disabled,en=Ve.loading,Lr=Ve.getInputElement,cr=Ve.getRawInputElement,Ur=Ve.open,rn=Ve.defaultOpen,oi=Ve.onDropdownVisibleChange,Ci=Ve.activeValue,bi=Ve.onActiveValueChange,xi=Ve.activeDescendantId,Ei=Ve.searchValue,Yi=Ve.autoClearSearchValue,sr=Ve.onSearch,oe=Ve.onSearchSplit,ae=Ve.tokenSeparators,ee=Ve.allowClear,je=Ve.prefix,Se=Ve.suffixIcon,An=Ve.clearIcon,Nn=Ve.OptionList,Vn=Ve.animation,Qi=Ve.transitionName,Si=Ve.dropdownStyle,Ne=Ve.dropdownClassName,wi=Ve.dropdownMatchSelectWidth,ke=Ve.dropdownRender,hn=Ve.dropdownAlign,Qe=Ve.placement,Ut=Ve.builtinPlacements,pn=Ve.getPopupContainer,fn=Ve.showAction,Qn=fn===void 0?[]:fn,Gn=Ve.onFocus,jn=Ve.onBlur,dn=Ve.onKeyUp,tn=Ve.onKeyDown,gn=Ve.onMouseDown,mn=(0,Ht.Z)(Ve,$e),xn=Kn(Ki),hi=(vi!==void 0?vi:xn)||Ki==="combobox",zn=(0,Be.Z)({},mn);yn.forEach(function(Oo){delete zn[Oo]}),li==null||li.forEach(function(Oo){delete zn[Oo]});var Xn=Vt.useState(!1),cn=(0,de.Z)(Xn,2),ti=cn[0],Di=cn[1];Vt.useEffect(function(){Di((0,It.Z)())},[]);var ir=Vt.useRef(null),Ji=Vt.useRef(null),fr=Vt.useRef(null),dr=Vt.useRef(null),Er=Vt.useRef(null),Gr=Vt.useRef(!1),Tr=xt(),oo=(0,de.Z)(Tr,3),He=oo[0],gr=oo[1],Dr=oo[2];Vt.useImperativeHandle(ze,function(){var Oo,ao;return{focus:(Oo=dr.current)===null||Oo===void 0?void 0:Oo.focus,blur:(ao=dr.current)===null||ao===void 0?void 0:ao.blur,scrollTo:function(Xs){var xs;return(xs=Er.current)===null||xs===void 0?void 0:xs.scrollTo(Xs)},nativeElement:ir.current||Ji.current}});var nr=Vt.useMemo(function(){var Oo;if(Ki!=="combobox")return Ei;var ao=(Oo=Xe[0])===null||Oo===void 0?void 0:Oo.value;return typeof ao=="string"||typeof ao=="number"?String(ao):""},[Ei,Ki,Xe]),Qr=Ki==="combobox"&&typeof Lr=="function"&&Lr()||null,ar=typeof cr=="function"&&cr(),vo=(0,nt.x1)(Ji,ar==null||(ai=ar.props)===null||ai===void 0?void 0:ai.ref),Jr=Vt.useState(!1),Nr=(0,de.Z)(Jr,2),co=Nr[0],ks=Nr[1];(0,be.Z)(function(){ks(!0)},[]);var ls=(0,ue.Z)(!1,{defaultValue:rn,value:Ur}),la=(0,de.Z)(ls,2),Is=la[0],lr=la[1],Eo=co?Is:!1,os=!ii&&wn;(Ti||os&&Eo&&Ki==="combobox")&&(Eo=!1);var zi=os?!1:Eo,Wi=Vt.useCallback(function(Oo){var ao=Oo!==void 0?Oo:!Eo;Ti||(lr(ao),Eo!==ao&&(oi==null||oi(ao)))},[Ti,Eo,lr,oi]),rr=Vt.useMemo(function(){return(ae||[]).some(function(Oo){return[`
`,`\r
`].includes(Oo)})},[ae]),_n=Vt.useContext(Te)||{},Ar=_n.maxCount,kr=_n.rawValues,xo=function(ao,mo,Xs){if(!(xn&&Bt(Ar)&&(kr==null?void 0:kr.size)>=Ar)){var xs=!0,ss=ao;bi==null||bi(null);var er=Ye(ao,ae,Bt(Ar)?Ar-kr.size:void 0),cl=Xs?null:er;return Ki!=="combobox"&&cl&&(ss="",oe==null||oe(cl),Wi(!1),xs=!1),sr&&nr!==ss&&sr(ss,{source:mo?"typing":"effect"}),xs}},Ts=function(ao){!ao||!ao.trim()||sr(ao,{source:"submit"})};Vt.useEffect(function(){!Eo&&!xn&&Ki!=="combobox"&&xo("",!1,!1)},[Eo]),Vt.useEffect(function(){Is&&Ti&&lr(!1),Ti&&!Gr.current&&gr(!1)},[Ti]);var ps=bt(),Pr=(0,de.Z)(ps,2),$r=Pr[0],so=Pr[1],ts=Vt.useRef(!1),yo=function(ao){var mo=$r(),Xs=ao.key,xs=Xs==="Enter";if(xs&&(Ki!=="combobox"&&ao.preventDefault(),Eo||Wi(!0)),so(!!nr),Xs==="Backspace"&&!mo&&xn&&!nr&&Xe.length){for(var ss=(0,te.Z)(Xe),er=null,cl=ss.length-1;cl>=0;cl-=1){var we=ss[cl];if(!we.disabled){ss.splice(cl,1),er=we;break}}er&&sn(ss,{type:"remove",values:[er]})}for(var Un=arguments.length,su=new Array(Un>1?Un-1:0),hA=1;hA<Un;hA++)su[hA-1]=arguments[hA];if(Eo&&(!xs||!ts.current)){var as;xs&&(ts.current=!0),(as=Er.current)===null||as===void 0||as.onKeyDown.apply(as,[ao].concat(su))}tn==null||tn.apply(void 0,[ao].concat(su))},Vo=function(ao){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=Er.current)===null||ss===void 0||ss.onKeyUp.apply(ss,[ao].concat(Xs))}ao.key==="Enter"&&(ts.current=!1),dn==null||dn.apply(void 0,[ao].concat(Xs))},zo=function(ao){var mo=Xe.filter(function(Xs){return Xs!==ao});sn(mo,{type:"remove",values:[ao]})},Io=function(){ts.current=!1},ys=Vt.useRef(!1),Wo=function(){gr(!0),Ti||(Gn&&!ys.current&&Gn.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&&(nr&&(Ki==="tags"?sr(nr,{source:"submit"}):Ki==="multiple"&&sr("",{source:"blur"})),jn&&jn.apply(void 0,arguments))},lo=[];Vt.useEffect(function(){return function(){lo.forEach(function(Oo){return clearTimeout(Oo)}),lo.splice(0,lo.length)}},[]);var da=function(ao){var mo,Xs=ao.target,xs=(mo=fr.current)===null||mo===void 0?void 0:mo.getPopupElement();if(xs&&xs.contains(Xs)){var ss=setTimeout(function(){var Un=lo.indexOf(ss);if(Un!==-1&&lo.splice(Un,1),Dr(),!ti&&!xs.contains(document.activeElement)){var su;(su=dr.current)===null||su===void 0||su.focus()}});lo.push(ss)}for(var er=arguments.length,cl=new Array(er>1?er-1:0),we=1;we<er;we++)cl[we-1]=arguments[we];gn==null||gn.apply(void 0,[ao].concat(cl))},_a=Vt.useState({}),hl=(0,de.Z)(_a,2),Zo=hl[1];function Ta(){Zo({})}var $a;ar&&($a=function(ao){Wi(ao)}),Rt(function(){var Oo;return[ir.current,(Oo=fr.current)===null||Oo===void 0?void 0:Oo.getPopupElement()]},zi,Wi,!!ar);var uA=Vt.useMemo(function(){return(0,Be.Z)((0,Be.Z)({},Ve),{},{notFoundContent:ii,open:Eo,triggerOpen:zi,id:he,showSearch:hi,multiple:xn,toggleOpen:Wi})},[Ve,ii,zi,Eo,he,hi,xn,Wi]),Ku=!!Se||en,ws;Ku&&(ws=Vt.createElement(At,{className:Jt()("".concat(an,"-arrow"),(0,Ae.Z)({},"".concat(an,"-arrow-loading"),en)),customizeIcon:Se,customizeIconProps:{loading:en,searchValue:nr,open:Eo,focused:He,showSearch:hi}}));var Gu=function(){var ao;_i==null||_i(),(ao=dr.current)===null||ao===void 0||ao.focus(),sn([],{type:"clear",values:Xe}),xo("",!1,!1)},AA=at(an,Gu,Xe,ee,An,Ti,nr,Ki),wa=AA.allowClear,tl=AA.clearIcon,Gs=Vt.createElement(Nn,{ref:Er}),es=Jt()(an,Yn,(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(an,"-focused"),He),"".concat(an,"-multiple"),xn),"".concat(an,"-single"),!xn),"".concat(an,"-allow-clear"),ee),"".concat(an,"-show-arrow"),Ku),"".concat(an,"-disabled"),Ti),"".concat(an,"-loading"),en),"".concat(an,"-open"),Eo),"".concat(an,"-customize-input"),Qr),"".concat(an,"-show-search"),hi)),hs=Vt.createElement(mt,{ref:fr,disabled:Ti,prefixCls:an,visible:zi,popupElement:Gs,animation:Vn,transitionName:Qi,dropdownStyle:Si,dropdownClassName:Ne,direction:qn,dropdownMatchSelectWidth:wi,dropdownRender:ke,dropdownAlign:hn,placement:Qe,builtinPlacements:Ut,getPopupContainer:pn,empty:wn,getTriggerDOMNode:function(ao){return Ji.current||ao},onPopupVisibleChange:$a,onPopupMouseEnter:Ta},ar?Vt.cloneElement(ar,{ref:vo}):Vt.createElement(ri,(0,Pt.Z)({},Ve,{domRef:Ji,prefixCls:an,inputElement:Qr,ref:dr,id:he,prefix:je,showSearch:hi,autoClearSearchValue:Yi,mode:Ki,activeDescendantId:xi,tagRender:ln,values:Xe,open:Eo,onToggleOpen:Wi,activeValue:Ci,searchValue:nr,onSearch:xo,onSearchSubmit:Ts,onRemove:zo,tokenWithEnter:rr,onInputBlur:Io}))),js;return ar?js=hs:js=Vt.createElement("div",(0,Pt.Z)({className:es},zn,{ref:ir,onMouseDown:da,onKeyDown:yo,onKeyUp:Vo,onFocus:Wo,onBlur:Fl}),Vt.createElement(Oe,{visible:He&&!Eo,values:Xe}),hs,ws,wa&&tl),Vt.createElement(ct.Provider,{value:uA},js)}),ui=Sn,ci=function(){return null};ci.isSelectOptGroup=!0;var mi=ci,Mi=function(){return null};Mi.isSelectOption=!0;var yr=Mi,ki=Qt(80547),Ri=Qt(2738),Vi=Qt(65283);function Or(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var qi=["disabled","title","children","style","className"];function Cr(Ve){return typeof Ve=="string"||typeof Ve=="number"}var xr=function(ze,ai){var he=pt(),an=he.prefixCls,Yn=he.id,vi=he.open,ln=he.multiple,qn=he.mode,li=he.searchValue,Xe=he.toggleOpen,sn=he.notFoundContent,wn=he.onPopupScroll,Mn=Vt.useContext(Te),ii=Mn.maxCount,_i=Mn.flattenOptions,Ki=Mn.onActiveValue,Ti=Mn.defaultActiveFirstOption,en=Mn.onSelect,Lr=Mn.menuItemSelectedIcon,cr=Mn.rawValues,Ur=Mn.fieldNames,rn=Mn.virtual,oi=Mn.direction,Ci=Mn.listHeight,bi=Mn.listItemHeight,xi=Mn.optionRender,Ei="".concat(an,"-item"),Yi=(0,ki.Z)(function(){return _i},[vi,_i],function(fn,Qn){return Qn[0]&&fn[1]!==Qn[1]}),sr=Vt.useRef(null),oe=Vt.useMemo(function(){return ln&&Bt(ii)&&(cr==null?void 0:cr.size)>=ii},[ln,ii,cr==null?void 0:cr.size]),ae=function(Qn){Qn.preventDefault()},ee=function(Qn){var Gn;(Gn=sr.current)===null||Gn===void 0||Gn.scrollTo(typeof Qn=="number"?{index:Qn}:Qn)},je=Vt.useCallback(function(fn){return qn==="combobox"?!1:cr.has(fn)},[qn,(0,te.Z)(cr).toString(),cr.size]),Se=function(Qn){for(var Gn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,jn=Yi.length,dn=0;dn<jn;dn+=1){var tn=(Qn+dn*Gn+jn)%jn,gn=Yi[tn]||{},mn=gn.group,xn=gn.data;if(!mn&&!(xn!=null&&xn.disabled)&&(je(xn.value)||!oe))return tn}return-1},An=Vt.useState(function(){return Se(0)}),Nn=(0,de.Z)(An,2),Vn=Nn[0],Qi=Nn[1],Si=function(Qn){var Gn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Qi(Qn);var jn={source:Gn?"keyboard":"mouse"},dn=Yi[Qn];if(!dn){Ki(null,-1,jn);return}Ki(dn.value,Qn,jn)};(0,Vt.useEffect)(function(){Si(Ti!==!1?Se(0):-1)},[Yi.length,li]);var Ne=Vt.useCallback(function(fn){return qn==="combobox"?String(fn).toLowerCase()===li.toLowerCase():cr.has(fn)},[qn,li,(0,te.Z)(cr).toString(),cr.size]);(0,Vt.useEffect)(function(){var fn=setTimeout(function(){if(!ln&&vi&&cr.size===1){var Gn=Array.from(cr)[0],jn=Yi.findIndex(function(dn){var tn=dn.data;return li?String(tn.value).startsWith(li):tn.value===Gn});jn!==-1&&(Si(jn),ee(jn))}});if(vi){var Qn;(Qn=sr.current)===null||Qn===void 0||Qn.scrollTo(void 0)}return function(){return clearTimeout(fn)}},[vi,li]);var wi=function(Qn){Qn!==void 0&&en(Qn,{selected:!cr.has(Qn)}),ln||Xe(!1)};if(Vt.useImperativeHandle(ai,function(){return{onKeyDown:function(Qn){var Gn=Qn.which,jn=Qn.ctrlKey;switch(Gn){case Ot.Z.N:case Ot.Z.P:case Ot.Z.UP:case Ot.Z.DOWN:{var dn=0;if(Gn===Ot.Z.UP?dn=-1:Gn===Ot.Z.DOWN?dn=1:Or()&&jn&&(Gn===Ot.Z.N?dn=1:Gn===Ot.Z.P&&(dn=-1)),dn!==0){var tn=Se(Vn+dn,dn);ee(tn),Si(tn,!0)}break}case Ot.Z.TAB:case Ot.Z.ENTER:{var gn,mn=Yi[Vn];mn&&!(mn!=null&&(gn=mn.data)!==null&&gn!==void 0&&gn.disabled)&&!oe?wi(mn.value):wi(void 0),vi&&Qn.preventDefault();break}case Ot.Z.ESC:Xe(!1),vi&&Qn.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Qn){ee(Qn)}}}),Yi.length===0)return Vt.createElement("div",{role:"listbox",id:"".concat(Yn,"_list"),className:"".concat(Ei,"-empty"),onMouseDown:ae},sn);var ke=Object.keys(Ur).map(function(fn){return Ur[fn]}),hn=function(Qn){return Qn.label};function Qe(fn,Qn){var Gn=fn.group;return{role:Gn?"presentation":"option",id:"".concat(Yn,"_list_").concat(Qn)}}var Ut=function(Qn){var Gn=Yi[Qn];if(!Gn)return null;var jn=Gn.data||{},dn=jn.value,tn=Gn.group,gn=(0,Zt.Z)(jn,!0),mn=hn(Gn);return Gn?Vt.createElement("div",(0,Pt.Z)({"aria-label":typeof mn=="string"&&!tn?mn:null},gn,{key:Qn},Qe(Gn,Qn),{"aria-selected":Ne(dn)}),dn):null},pn={role:"listbox",id:"".concat(Yn,"_list")};return Vt.createElement(Vt.Fragment,null,rn&&Vt.createElement("div",(0,Pt.Z)({},pn,{style:{height:0,width:0,overflow:"hidden"}}),Ut(Vn-1),Ut(Vn),Ut(Vn+1)),Vt.createElement(Vi.Z,{itemKey:"key",ref:sr,data:Yi,height:Ci,itemHeight:bi,fullHeight:!1,onMouseDown:ae,onScroll:wn,virtual:rn,direction:oi,innerProps:rn?null:pn},function(fn,Qn){var Gn=fn.group,jn=fn.groupOption,dn=fn.data,tn=fn.label,gn=fn.value,mn=dn.key;if(Gn){var xn,hi=(xn=dn.title)!==null&&xn!==void 0?xn:Cr(tn)?tn.toString():void 0;return Vt.createElement("div",{className:Jt()(Ei,"".concat(Ei,"-group"),dn.className),title:hi},tn!==void 0?tn:mn)}var zn=dn.disabled,Xn=dn.title,cn=dn.children,ti=dn.style,Di=dn.className,ir=(0,Ht.Z)(dn,qi),Ji=(0,Ri.Z)(ir,ke),fr=je(gn),dr=zn||!fr&&oe,Er="".concat(Ei,"-option"),Gr=Jt()(Ei,Er,Di,(0,Ae.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({},"".concat(Er,"-grouped"),jn),"".concat(Er,"-active"),Vn===Qn&&!dr),"".concat(Er,"-disabled"),dr),"".concat(Er,"-selected"),fr)),Tr=hn(fn),oo=!Lr||typeof Lr=="function"||fr,He=typeof Tr=="number"?Tr:Tr||gn,gr=Cr(He)?He.toString():void 0;return Xn!==void 0&&(gr=Xn),Vt.createElement("div",(0,Pt.Z)({},(0,Zt.Z)(Ji),rn?{}:Qe(fn,Qn),{"aria-selected":Ne(gn),className:Gr,title:gr,onMouseMove:function(){Vn===Qn||dr||Si(Qn)},onClick:function(){dr||wi(gn)},style:ti}),Vt.createElement("div",{className:"".concat(Er,"-content")},typeof xi=="function"?xi(fn,{index:Qn}):He),Vt.isValidElement(Lr)||fr,oo&&Vt.createElement(At,{className:"".concat(Ei,"-option-state"),customizeIcon:Lr,customizeIconProps:{value:gn,disabled:dr,isSelected:fr}},fr?"\u2713":null))}))},Wr=Vt.forwardRef(xr),$i=Wr,eo=function(Ve,ze){var ai=Vt.useRef({values:new Map,options:new Map}),he=Vt.useMemo(function(){var Yn=ai.current,vi=Yn.values,ln=Yn.options,qn=Ve.map(function(sn){if(sn.label===void 0){var wn;return(0,Be.Z)((0,Be.Z)({},sn),{},{label:(wn=vi.get(sn.value))===null||wn===void 0?void 0:wn.label})}return sn}),li=new Map,Xe=new Map;return qn.forEach(function(sn){li.set(sn.value,sn),Xe.set(sn.value,ze.get(sn.value)||ln.get(sn.value))}),ai.current.values=li,ai.current.options=Xe,qn},[Ve,ze]),an=Vt.useCallback(function(Yn){return ze.get(Yn)||ai.current.options.get(Yn)},[ze]);return[he,an]};function fo(Ve,ze){return qe(Ve).join("").toUpperCase().includes(ze)}var Zr=function(Ve,ze,ai,he,an){return Vt.useMemo(function(){if(!ai||he===!1)return Ve;var Yn=ze.options,vi=ze.label,ln=ze.value,qn=[],li=typeof he=="function",Xe=ai.toUpperCase(),sn=li?he:function(Mn,ii){return an?fo(ii[an],Xe):ii[Yn]?fo(ii[vi!=="children"?vi:"label"],Xe):fo(ii[ln],Xe)},wn=li?function(Mn){return ye(Mn)}:function(Mn){return Mn};return Ve.forEach(function(Mn){if(Mn[Yn]){var ii=sn(ai,wn(Mn));if(ii)qn.push(Mn);else{var _i=Mn[Yn].filter(function(Ki){return sn(ai,wn(Ki))});_i.length&&qn.push((0,Be.Z)((0,Be.Z)({},Mn),{},(0,Ae.Z)({},Yn,_i)))}return}sn(ai,wn(Mn))&&qn.push(Mn)}),qn},[Ve,he,an,ai,ze])},Fr=Qt(90317),ro=Qt(11592),Tt=["children","value"],Gi=["children"];function Zi(Ve){var ze=Ve,ai=ze.key,he=ze.props,an=he.children,Yn=he.value,vi=(0,Ht.Z)(he,Tt);return(0,Be.Z)({key:ai,value:Yn!==void 0?Yn:ai,children:an},vi)}function Yr(Ve){var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,ro.Z)(Ve).map(function(ai,he){if(!Vt.isValidElement(ai)||!ai.type)return null;var an=ai,Yn=an.type.isSelectOptGroup,vi=an.key,ln=an.props,qn=ln.children,li=(0,Ht.Z)(ln,Gi);return ze||!Yn?Zi(ai):(0,Be.Z)((0,Be.Z)({key:"__RC_SELECT_GRP__".concat(vi===null?he:vi,"__"),label:vi},li),{},{options:Yr(qn)})}).filter(function(ai){return ai})}var bo=function(ze,ai,he,an,Yn){return Vt.useMemo(function(){var vi=ze,ln=!ze;ln&&(vi=Yr(ai));var qn=new Map,li=new Map,Xe=function(Mn,ii,_i){_i&&typeof _i=="string"&&Mn.set(ii[_i],ii)},sn=function wn(Mn){for(var ii=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,_i=0;_i<Mn.length;_i+=1){var Ki=Mn[_i];!Ki[he.options]||ii?(qn.set(Ki[he.value],Ki),Xe(li,Ki,he.label),Xe(li,Ki,an),Xe(li,Ki,Yn)):wn(Ki[he.options],!0)}};return sn(vi),{options:vi,valueOptions:qn,labelOptions:li}},[ze,ai,he,an,Yn])},ko=bo;function $o(Ve){var ze=Vt.useRef();ze.current=Ve;var ai=Vt.useCallback(function(){return ze.current.apply(ze,arguments)},[]);return ai}function Xi(Ve){var ze=Ve.mode,ai=Ve.options,he=Ve.children,an=Ve.backfill,Yn=Ve.allowClear,vi=Ve.placeholder,ln=Ve.getInputElement,qn=Ve.showSearch,li=Ve.onSearch,Xe=Ve.defaultOpen,sn=Ve.autoFocus,wn=Ve.labelInValue,Mn=Ve.value,ii=Ve.inputValue,_i=Ve.optionLabelProp,Ki=isMultiple(ze),Ti=qn!==void 0?qn:Ki||ze==="combobox",en=ai||convertChildrenToData(he);if(warning(ze!=="tags"||en.every(function(rn){return!rn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),ze==="tags"||ze==="combobox"){var Lr=en.some(function(rn){return rn.options?rn.options.some(function(oi){return typeof("value"in oi?oi.value:oi.key)=="number"}):typeof("value"in rn?rn.value:rn.key)=="number"});warning(!Lr,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(ze!=="combobox"||!_i,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(ze==="combobox"||!an,"`backfill` only works with `combobox` mode."),warning(ze==="combobox"||!ln,"`getInputElement` only work with `combobox` mode."),noteOnce(ze!=="combobox"||!ln||!Yn||!vi,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),li&&!Ti&&ze!=="combobox"&&ze!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Xe||sn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Mn!=null){var cr=toArray(Mn);warning(!wn||cr.every(function(rn){return _typeof(rn)==="object"&&("key"in rn||"value"in rn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Ki||Array.isArray(Mn),"`value` should be array when `mode` is `multiple` or `tags`")}if(he){var Ur=null;toNodeArray(he).some(function(rn){if(!React.isValidElement(rn)||!rn.type)return!1;var oi=rn,Ci=oi.type;if(Ci.isSelectOption)return!1;if(Ci.isSelectOptGroup){var bi=toNodeArray(rn.props.children).every(function(xi){return!React.isValidElement(xi)||!rn.type||xi.type.isSelectOption?!0:(Ur=xi.type,!1)});return!bi}return Ur=Ci,!0}),Ur&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ur.displayName||Ur.name||Ur,"`.")),warning(ii===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Ni(Ve,ze){if(Ve){var ai=function he(an){for(var Yn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,vi=0;vi<an.length;vi++){var ln=an[vi];if(ln[ze==null?void 0:ze.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Yn&&Array.isArray(ln[ze==null?void 0:ze.options])&&he(ln[ze==null?void 0:ze.options],!0))break}};ai(Ve)}}var _e=null,Re=["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 gi(Ve){return!Ve||(0,ne.Z)(Ve)!=="object"}var xe=Vt.forwardRef(function(Ve,ze){var ai=Ve.id,he=Ve.mode,an=Ve.prefixCls,Yn=an===void 0?"rc-select":an,vi=Ve.backfill,ln=Ve.fieldNames,qn=Ve.inputValue,li=Ve.searchValue,Xe=Ve.onSearch,sn=Ve.autoClearSearchValue,wn=sn===void 0?!0:sn,Mn=Ve.onSelect,ii=Ve.onDeselect,_i=Ve.dropdownMatchSelectWidth,Ki=_i===void 0?!0:_i,Ti=Ve.filterOption,en=Ve.filterSort,Lr=Ve.optionFilterProp,cr=Ve.optionLabelProp,Ur=Ve.options,rn=Ve.optionRender,oi=Ve.children,Ci=Ve.defaultActiveFirstOption,bi=Ve.menuItemSelectedIcon,xi=Ve.virtual,Ei=Ve.direction,Yi=Ve.listHeight,sr=Yi===void 0?200:Yi,oe=Ve.listItemHeight,ae=oe===void 0?20:oe,ee=Ve.labelRender,je=Ve.value,Se=Ve.defaultValue,An=Ve.labelInValue,Nn=Ve.onChange,Vn=Ve.maxCount,Qi=(0,Ht.Z)(Ve,Re),Si=(0,Fr.ZP)(ai),Ne=Kn(he),wi=!!(!Ur&&oi),ke=Vt.useMemo(function(){return Ti===void 0&&he==="combobox"?!1:Ti},[Ti,he]),hn=Vt.useMemo(function(){return _t(ln,wi)},[JSON.stringify(ln),wi]),Qe=(0,ue.Z)("",{value:li!==void 0?li:qn,postState:function(rr){return rr||""}}),Ut=(0,de.Z)(Qe,2),pn=Ut[0],fn=Ut[1],Qn=ko(Ur,oi,hn,Lr,cr),Gn=Qn.valueOptions,jn=Qn.labelOptions,dn=Qn.options,tn=Vt.useCallback(function(Wi){var rr=qe(Wi);return rr.map(function(_n){var Ar,kr,xo,Ts,ps;if(gi(_n))Ar=_n;else{var Pr;xo=_n.key,kr=_n.label,Ar=(Pr=_n.value)!==null&&Pr!==void 0?Pr:xo}var $r=Gn.get(Ar);if($r){var so;if(kr===void 0&&(kr=$r==null?void 0:$r[cr||hn.label]),xo===void 0&&(xo=(so=$r==null?void 0:$r.key)!==null&&so!==void 0?so:Ar),Ts=$r==null?void 0:$r.disabled,ps=$r==null?void 0:$r.title,0)var ts}return{label:kr,value:Ar,key:xo,disabled:Ts,title:ps}})},[hn,cr,Gn]),gn=(0,ue.Z)(Se,{value:je}),mn=(0,de.Z)(gn,2),xn=mn[0],hi=mn[1],zn=Vt.useMemo(function(){var Wi,rr=Ne&&xn===null?[]:xn,_n=tn(rr);return he==="combobox"&&ni((Wi=_n[0])===null||Wi===void 0?void 0:Wi.value)?[]:_n},[xn,tn,he,Ne]),Xn=eo(zn,Gn),cn=(0,de.Z)(Xn,2),ti=cn[0],Di=cn[1],ir=Vt.useMemo(function(){if(!he&&ti.length===1){var Wi=ti[0];if(Wi.value===null&&(Wi.label===null||Wi.label===void 0))return[]}return ti.map(function(rr){var _n;return(0,Be.Z)((0,Be.Z)({},rr),{},{label:(_n=typeof ee=="function"?ee(rr):rr.label)!==null&&_n!==void 0?_n:rr.value})})},[he,ti,ee]),Ji=Vt.useMemo(function(){return new Set(ti.map(function(Wi){return Wi.value}))},[ti]);Vt.useEffect(function(){if(he==="combobox"){var Wi,rr=(Wi=ti[0])===null||Wi===void 0?void 0:Wi.value;fn(bn(rr)?String(rr):"")}},[ti]);var fr=$o(function(Wi,rr){var _n=rr!=null?rr:Wi;return(0,Ae.Z)((0,Ae.Z)({},hn.value,Wi),hn.label,_n)}),dr=Vt.useMemo(function(){if(he!=="tags")return dn;var Wi=(0,te.Z)(dn),rr=function(Ar){return Gn.has(Ar)};return(0,te.Z)(ti).sort(function(_n,Ar){return _n.value<Ar.value?-1:1}).forEach(function(_n){var Ar=_n.value;rr(Ar)||Wi.push(fr(Ar,_n.label))}),Wi},[fr,dn,Gn,ti,he]),Er=Zr(dr,hn,pn,ke,Lr),Gr=Vt.useMemo(function(){return he!=="tags"||!pn||Er.some(function(Wi){return Wi[Lr||"value"]===pn})||Er.some(function(Wi){return Wi[hn.value]===pn})?Er:[fr(pn)].concat((0,te.Z)(Er))},[fr,Lr,he,Er,pn,hn]),Tr=function Wi(rr){var _n=(0,te.Z)(rr).sort(function(Ar,kr){return en(Ar,kr,{searchValue:pn})});return _n.map(function(Ar){return Array.isArray(Ar.options)?(0,Be.Z)((0,Be.Z)({},Ar),{},{options:Ar.options.length>0?Wi(Ar.options):Ar.options}):Ar})},oo=Vt.useMemo(function(){return en?Tr(Gr):Gr},[Gr,en,pn]),He=Vt.useMemo(function(){return Me(oo,{fieldNames:hn,childrenAsData:wi})},[oo,hn,wi]),gr=function(rr){var _n=tn(rr);if(hi(_n),Nn&&(_n.length!==ti.length||_n.some(function(xo,Ts){var ps;return((ps=ti[Ts])===null||ps===void 0?void 0:ps.value)!==(xo==null?void 0:xo.value)}))){var Ar=An?_n:_n.map(function(xo){return xo.value}),kr=_n.map(function(xo){return ye(Di(xo.value))});Nn(Ne?Ar:Ar[0],Ne?kr:kr[0])}},Dr=Vt.useState(null),nr=(0,de.Z)(Dr,2),Qr=nr[0],ar=nr[1],vo=Vt.useState(0),Jr=(0,de.Z)(vo,2),Nr=Jr[0],co=Jr[1],ks=Ci!==void 0?Ci:he!=="combobox",ls=Vt.useCallback(function(Wi,rr){var _n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ar=_n.source,kr=Ar===void 0?"keyboard":Ar;co(rr),vi&&he==="combobox"&&Wi!==null&&kr==="keyboard"&&ar(String(Wi))},[vi,he]),la=function(rr,_n,Ar){var kr=function(){var zo,Io=Di(rr);return[An?{label:Io==null?void 0:Io[hn.label],value:rr,key:(zo=Io==null?void 0:Io.key)!==null&&zo!==void 0?zo:rr}:rr,ye(Io)]};if(_n&&Mn){var xo=kr(),Ts=(0,de.Z)(xo,2),ps=Ts[0],Pr=Ts[1];Mn(ps,Pr)}else if(!_n&&ii&&Ar!=="clear"){var $r=kr(),so=(0,de.Z)($r,2),ts=so[0],yo=so[1];ii(ts,yo)}},Is=$o(function(Wi,rr){var _n,Ar=Ne?rr.selected:!0;Ar?_n=Ne?[].concat((0,te.Z)(ti),[Wi]):[Wi]:_n=ti.filter(function(kr){return kr.value!==Wi}),gr(_n),la(Wi,Ar),he==="combobox"?ar(""):(!Kn||wn)&&(fn(""),ar(""))}),lr=function(rr,_n){gr(rr);var Ar=_n.type,kr=_n.values;(Ar==="remove"||Ar==="clear")&&kr.forEach(function(xo){la(xo.value,!1,Ar)})},Eo=function(rr,_n){if(fn(rr),ar(null),_n.source==="submit"){var Ar=(rr||"").trim();if(Ar){var kr=Array.from(new Set([].concat((0,te.Z)(Ji),[Ar])));gr(kr),la(Ar,!0),fn("")}return}_n.source!=="blur"&&(he==="combobox"&&gr(rr),Xe==null||Xe(rr))},os=function(rr){var _n=rr;he!=="tags"&&(_n=rr.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)(_n))));gr(Ar),Ar.forEach(function(kr){la(kr,!0)})},zi=Vt.useMemo(function(){var Wi=xi!==!1&&Ki!==!1;return(0,Be.Z)((0,Be.Z)({},Qn),{},{flattenOptions:He,onActiveValue:ls,defaultActiveFirstOption:ks,onSelect:Is,menuItemSelectedIcon:bi,rawValues:Ji,fieldNames:hn,virtual:Wi,direction:Ei,listHeight:sr,listItemHeight:ae,childrenAsData:wi,maxCount:Vn,optionRender:rn})},[Vn,Qn,He,ls,ks,Is,bi,Ji,hn,xi,Ki,Ei,sr,ae,wi,rn]);return Vt.createElement(Te.Provider,{value:zi},Vt.createElement(ui,(0,Pt.Z)({},Qi,{id:Si,prefixCls:Yn,ref:ze,omitDomProps:Ue,mode:he,displayValues:ir,onDisplayValuesChange:lr,direction:Ei,searchValue:pn,onSearch:Eo,autoClearSearchValue:wn,onSearchSplit:os,dropdownMatchSelectWidth:Ki,OptionList:$i,emptyOptions:!He.length,activeValue:Qr,activeDescendantId:"".concat(Si,"_list_").concat(Nr)})))}),Hi=xe;Hi.Option=yr,Hi.OptGroup=mi;var Dn=Hi,Ai=Dn},63158:function(Cn,We,Qt){"use strict";var Pt=Qt(5016),te=Qt(18082),Ae=Qt(52456),Be=Qt(5883),de=Qt(59301),Ht=Qt(92310),ne=Qt.n(Ht),ue=Qt(18929),ce=Qt(10228),Vt=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],De=de.forwardRef(function(Jt,be){var It,nt=Jt.prefixCls,et=nt===void 0?"rc-switch":nt,At=Jt.className,at=Jt.checked,ct=Jt.defaultChecked,pt=Jt.disabled,xt=Jt.loadingIcon,bt=Jt.checkedChildren,Rt=Jt.unCheckedChildren,Ot=Jt.onClick,Wt=Jt.onChange,Zt=Jt.onKeyDown,$t=(0,Be.Z)(Jt,Vt),Ce=(0,ue.Z)(!1,{value:at,defaultValue:ct}),ge=(0,Ae.Z)(Ce,2),nn=ge[0],qe=ge[1];function En(In,Ee){var ie=nn;return pt||(ie=In,qe(ie),Wt==null||Wt(ie,Ee)),ie}function Tn(In){In.which===ce.Z.LEFT?En(!1,In):In.which===ce.Z.RIGHT&&En(!0,In),Zt==null||Zt(In)}function bn(In){var Ee=En(!nn,In);Ot==null||Ot(Ee,In)}var ni=ne()(et,At,(It={},(0,te.Z)(It,"".concat(et,"-checked"),nn),(0,te.Z)(It,"".concat(et,"-disabled"),pt),It));return de.createElement("button",(0,Pt.Z)({},$t,{type:"button",role:"switch","aria-checked":nn,disabled:pt,className:ni,ref:be,onKeyDown:Tn,onClick:bn}),xt,de.createElement("span",{className:"".concat(et,"-inner")},de.createElement("span",{className:"".concat(et,"-inner-checked")},bt),de.createElement("span",{className:"".concat(et,"-inner-unchecked")},Rt)))});De.displayName="Switch",We.Z=De},67204:function(Cn,We,Qt){"use strict";Qt.d(We,{R:function(){return te},w:function(){return Pt}});var Pt={},te="rc-table-internal-hook"},78612:function(Cn,We,Qt){"use strict";Qt.d(We,{L:function(){return et},Z:function(){return xt}});var Pt=Qt(52456),te=Qt(18082),Ae=Qt(92393),Be=Qt(10928),de=Qt(20049),Ht=Qt(5883),ne=Qt(11592),ue=Qt(48736),ce=Qt(59301),Vt=Qt(67204),De=Qt(90494);function Jt(bt){var Rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof Rt=="number"?Rt:Rt.endsWith("%")?bt*parseFloat(Rt)/100:null}function be(bt,Rt,Ot){return ce.useMemo(function(){if(Rt&&Rt>0){var Wt=0,Zt=0;bt.forEach(function(bn){var ni=Jt(Rt,bn.width);ni?Wt+=ni:Zt+=1});var $t=Math.max(Rt,Ot),Ce=Math.max($t-Wt,Zt),ge=Zt,nn=Ce/Zt,qe=0,En=bt.map(function(bn){var ni=(0,de.Z)({},bn),In=Jt(Rt,ni.width);if(In)ni.width=In;else{var Ee=Math.floor(nn);ni.width=ge===1?Ce:Ee,Ce-=Ee,ge-=1}return qe+=ni.width,ni});if(qe<$t){var Tn=$t/qe;Ce=$t,En.forEach(function(bn,ni){var In=Math.floor(bn.width*Tn);bn.width=ni===En.length-1?Ce:In,Ce-=In})}return[En,Math.max(qe,$t)]}return[bt,Rt]},[bt,Rt,Ot])}var It=["children"],nt=["fixed"];function et(bt){return(0,ne.Z)(bt).filter(function(Rt){return ce.isValidElement(Rt)}).map(function(Rt){var Ot=Rt.key,Wt=Rt.props,Zt=Wt.children,$t=(0,Ht.Z)(Wt,It),Ce=(0,de.Z)({key:Ot},$t);return Zt&&(Ce.children=et(Zt)),Ce})}function At(bt){return bt.filter(function(Rt){return Rt&&(0,Be.Z)(Rt)==="object"&&!Rt.hidden}).map(function(Rt){var Ot=Rt.children;return Ot&&Ot.length>0?(0,de.Z)((0,de.Z)({},Rt),{},{children:At(Ot)}):Rt})}function at(bt){var Rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return bt.filter(function(Ot){return Ot&&(0,Be.Z)(Ot)==="object"}).reduce(function(Ot,Wt,Zt){var $t=Wt.fixed,Ce=$t===!0?"left":$t,ge="".concat(Rt,"-").concat(Zt),nn=Wt.children;return nn&&nn.length>0?[].concat((0,Ae.Z)(Ot),(0,Ae.Z)(at(nn,ge).map(function(qe){return(0,de.Z)({fixed:Ce},qe)}))):[].concat((0,Ae.Z)(Ot),[(0,de.Z)((0,de.Z)({key:ge},Wt),{},{fixed:Ce})])},[])}function ct(bt){return bt.map(function(Rt){var Ot=Rt.fixed,Wt=(0,Ht.Z)(Rt,nt),Zt=Ot;return Ot==="left"?Zt="right":Ot==="right"&&(Zt="left"),(0,de.Z)({fixed:Zt},Wt)})}function pt(bt,Rt){var Ot=bt.prefixCls,Wt=bt.columns,Zt=bt.children,$t=bt.expandable,Ce=bt.expandedKeys,ge=bt.columnTitle,nn=bt.getRowKey,qe=bt.onTriggerExpand,En=bt.expandIcon,Tn=bt.rowExpandable,bn=bt.expandIconColumnIndex,ni=bt.direction,In=bt.expandRowByClick,Ee=bt.columnWidth,ie=bt.fixed,Pn=bt.scrollWidth,pi=bt.clientWidth,Wn=ce.useMemo(function(){var Pi=Wt||et(Zt)||[];return At(Pi.slice())},[Wt,Zt]),un=ce.useMemo(function(){if($t){var Pi=Wn.slice();if(!Pi.includes(Vt.w)){var jt=bn||0;jt>=0&&(jt||ie==="left"||!ie)&&Pi.splice(jt,0,Vt.w),ie==="right"&&Pi.splice(Wn.length,0,Vt.w)}var Mt=Pi.indexOf(Vt.w);Pi=Pi.filter(function(Bt,_t){return Bt!==Vt.w||_t===Mt});var mt=Wn[Mt],vt;ie?vt=ie: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)({},De.v,{className:"".concat(Ot,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",ge),"fixed",vt),"className","".concat(Ot,"-row-expand-icon-cell")),"width",Ee),"render",function(_t,Me,ye){var Ye=nn(Me,ye),Fe=Ce.has(Ye),Te=Tn?Tn(Me):!0,Oe=En({prefixCls:Ot,expanded:Fe,expandable:Te,record:Me,onExpand:qe});return In?ce.createElement("span",{onClick:function(yn){return yn.stopPropagation()}},Oe):Oe});return Pi.map(function(Bt){return Bt===Vt.w?Lt:Bt})}return Wn.filter(function(Bt){return Bt!==Vt.w})},[$t,Wn,nn,Ce,En,ni]),Zn=ce.useMemo(function(){var Pi=un;return Rt&&(Pi=Rt(Pi)),Pi.length||(Pi=[{render:function(){return null}}]),Pi},[Rt,un,ni]),si=ce.useMemo(function(){return ni==="rtl"?ct(at(Zn)):at(Zn)},[Zn,ni,Pn]),Oi=ce.useMemo(function(){for(var Pi=-1,jt=si.length-1;jt>=0;jt-=1){var Mt=si[jt].fixed;if(Mt==="left"||Mt===!0){Pi=jt;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(Me){var ye=Me.fixed;return ye==="right"});if(Lt>=0)for(var Bt=Lt;Bt<si.length;Bt+=1){var _t=si[Bt].fixed;if(_t!=="right")return!0}return!1},[si]),on=be(si,Pn,pi),ri=(0,Pt.Z)(on,2),Le=ri[0],fi=ri[1];return[Zn,Le,fi,Oi]}var xt=pt},16596:function(Cn,We,Qt){"use strict";Qt.d(We,{w2:function(){return Pt.w},vP:function(){return $i.v},RQ:function(){return Pt.R},ER:function(){return Ye},Q$:function(){return cr},TN:function(){return Si}});var Pt=Qt(67204),te=Qt(52456),Ae=Qt(6089),Be=Qt(34280),de=Qt(13697),Ht=Qt(59301),ne=Qt(4676);function ue(ke){var hn=Ht.createContext(void 0),Qe=function(pn){var fn=pn.value,Qn=pn.children,Gn=Ht.useRef(fn);Gn.current=fn;var jn=Ht.useState(function(){return{getValue:function(){return Gn.current},listeners:new Set}}),dn=(0,te.Z)(jn,1),tn=dn[0];return(0,Be.Z)(function(){(0,ne.unstable_batchedUpdates)(function(){tn.listeners.forEach(function(gn){gn(fn)})})},[fn]),Ht.createElement(hn.Provider,{value:tn},Qn)};return{Context:hn,Provider:Qe,defaultValue:ke}}function ce(ke,hn){var Qe=(0,Ae.Z)(typeof hn=="function"?hn:function(gn){if(hn===void 0)return gn;if(!Array.isArray(hn))return gn[hn];var mn={};return hn.forEach(function(xn){mn[xn]=gn[xn]}),mn}),Ut=Ht.useContext(ke==null?void 0:ke.Context),pn=Ut||{},fn=pn.listeners,Qn=pn.getValue,Gn=Ht.useRef();Gn.current=Qe(Ut?Qn():ke==null?void 0:ke.defaultValue);var jn=Ht.useState({}),dn=(0,te.Z)(jn,2),tn=dn[1];return(0,Be.Z)(function(){if(!Ut)return;function gn(mn){var xn=Qe(mn);(0,de.Z)(Gn.current,xn,!0)||tn({})}return fn.add(gn),function(){fn.delete(gn)}},[Ut]),Gn.current}var Vt=Qt(5016),De=Qt(8654);function Jt(){var ke=Ht.createContext(null);function hn(){return Ht.useContext(ke)}function Qe(pn,fn){var Qn=(0,De.Yr)(pn),Gn=function(dn,tn){var gn=Qn?{ref:tn}:{},mn=Ht.useRef(0),xn=Ht.useRef(dn),hi=hn();return hi!==null?Ht.createElement(pn,(0,Vt.Z)({},dn,gn)):((!fn||fn(xn.current,dn))&&(mn.current+=1),xn.current=dn,Ht.createElement(ke.Provider,{value:mn.current},Ht.createElement(pn,(0,Vt.Z)({},dn,gn))))};return Qn?Ht.forwardRef(Gn):Gn}function Ut(pn,fn){var Qn=(0,De.Yr)(pn),Gn=function(dn,tn){var gn=Qn?{ref:tn}:{};return hn(),Ht.createElement(pn,(0,Vt.Z)({},dn,gn))};return Qn?Ht.memo(Ht.forwardRef(Gn),fn):Ht.memo(Gn,fn)}return{makeImmutable:Qe,responseImmutable:Ut,useImmutableMark:hn}}var be=Jt(),It=be.makeImmutable,nt=be.responseImmutable,et=be.useImmutableMark,At=Jt(),at=At.makeImmutable,ct=At.responseImmutable,pt=At.useImmutableMark,xt=ue(),bt=xt;function Rt(ke,hn){var Qe=React.useRef(0);Qe.current+=1;var Ut=React.useRef(ke),pn=[];Object.keys(ke||{}).map(function(Qn){var Gn;(ke==null?void 0:ke[Qn])!==((Gn=Ut.current)===null||Gn===void 0?void 0:Gn[Qn])&&pn.push(Qn)}),Ut.current=ke;var fn=React.useRef([]);return pn.length&&(fn.current=pn),React.useDebugValue(Qe.current),React.useDebugValue(fn.current.join(", ")),hn&&console.log("".concat(hn,":"),Qe.current,fn.current),Qe.current}var Ot=null,Wt=null,Zt=Qt(10928),$t=Qt(20049),Ce=Qt(18082),ge=Qt(92310),nn=Qt.n(ge),qe=Qt(80547),En=Qt(97938),Tn=Qt(48736),bn=Ht.createContext({renderWithProps:!1}),ni=bn,In="RC_TABLE_KEY";function Ee(ke){return ke==null?[]:Array.isArray(ke)?ke:[ke]}function ie(ke){var hn=[],Qe={};return ke.forEach(function(Ut){for(var pn=Ut||{},fn=pn.key,Qn=pn.dataIndex,Gn=fn||Ee(Qn).join("-")||In;Qe[Gn];)Gn="".concat(Gn,"_next");Qe[Gn]=!0,hn.push(Gn)}),hn}function Pn(ke){return ke!=null}function pi(ke){return typeof ke=="number"&&!Number.isNaN(ke)}function Wn(ke){return ke&&(0,Zt.Z)(ke)==="object"&&!Array.isArray(ke)&&!Ht.isValidElement(ke)}function un(ke,hn,Qe,Ut,pn,fn){var Qn=Ht.useContext(ni),Gn=pt(),jn=(0,qe.Z)(function(){if(Pn(Ut))return[Ut];var dn=hn==null||hn===""?[]:Array.isArray(hn)?hn:[hn],tn=(0,En.Z)(ke,dn),gn=tn,mn=void 0;if(pn){var xn=pn(tn,ke,Qe);Wn(xn)?(gn=xn.children,mn=xn.props,Qn.renderWithProps=!0):gn=xn}return[gn,mn]},[Gn,ke,Ut,hn,pn,Qe],function(dn,tn){if(fn){var gn=(0,te.Z)(dn,2),mn=gn[1],xn=(0,te.Z)(tn,2),hi=xn[1];return fn(hi,mn)}return Qn.renderWithProps?!0:!(0,de.Z)(dn,tn,!0)});return jn}function Zn(ke,hn,Qe,Ut){var pn=ke+hn-1;return ke<=Ut&&pn>=Qe}function si(ke,hn){return ce(bt,function(Qe){var Ut=Zn(ke,hn||1,Qe.hoverStartRow,Qe.hoverEndRow);return[Ut,Qe.onHover]})}var Oi=Qt(70425),on=function(hn){var Qe=hn.ellipsis,Ut=hn.rowType,pn=hn.children,fn,Qn=Qe===!0?{showTitle:!0}:Qe;return Qn&&(Qn.showTitle||Ut==="header")&&(typeof pn=="string"||typeof pn=="number"?fn=pn.toString():Ht.isValidElement(pn)&&typeof pn.props.children=="string"&&(fn=pn.props.children)),fn};function ri(ke){var hn,Qe,Ut,pn,fn,Qn,Gn,jn,dn=ke.component,tn=ke.children,gn=ke.ellipsis,mn=ke.scope,xn=ke.prefixCls,hi=ke.className,zn=ke.align,Xn=ke.record,cn=ke.render,ti=ke.dataIndex,Di=ke.renderIndex,ir=ke.shouldCellUpdate,Ji=ke.index,fr=ke.rowType,dr=ke.colSpan,Er=ke.rowSpan,Gr=ke.fixLeft,Tr=ke.fixRight,oo=ke.firstFixLeft,He=ke.lastFixLeft,gr=ke.firstFixRight,Dr=ke.lastFixRight,nr=ke.appendNode,Qr=ke.additionalProps,ar=Qr===void 0?{}:Qr,vo=ke.isSticky,Jr="".concat(xn,"-cell"),Nr=ce(bt,["supportSticky","allColumnsFixedLeft","rowHoverable"]),co=Nr.supportSticky,ks=Nr.allColumnsFixedLeft,ls=Nr.rowHoverable,la=un(Xn,ti,Di,tn,cn,ir),Is=(0,te.Z)(la,2),lr=Is[0],Eo=Is[1],os={},zi=typeof Gr=="number"&&co,Wi=typeof Tr=="number"&&co;zi&&(os.position="sticky",os.left=Gr),Wi&&(os.position="sticky",os.right=Tr);var rr=(hn=(Qe=(Ut=Eo==null?void 0:Eo.colSpan)!==null&&Ut!==void 0?Ut:ar.colSpan)!==null&&Qe!==void 0?Qe:dr)!==null&&hn!==void 0?hn:1,_n=(pn=(fn=(Qn=Eo==null?void 0:Eo.rowSpan)!==null&&Qn!==void 0?Qn:ar.rowSpan)!==null&&fn!==void 0?fn:Er)!==null&&pn!==void 0?pn:1,Ar=si(Ji,_n),kr=(0,te.Z)(Ar,2),xo=kr[0],Ts=kr[1],ps=(0,Oi.zX)(function(zo){var Io;Xn&&Ts(Ji,Ji+_n-1),ar==null||(Io=ar.onMouseEnter)===null||Io===void 0||Io.call(ar,zo)}),Pr=(0,Oi.zX)(function(zo){var Io;Xn&&Ts(-1,-1),ar==null||(Io=ar.onMouseLeave)===null||Io===void 0||Io.call(ar,zo)});if(rr===0||_n===0)return null;var $r=(Gn=ar.title)!==null&&Gn!==void 0?Gn:on({rowType:fr,ellipsis:gn,children:lr}),so=nn()(Jr,hi,(jn={},(0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)(jn,"".concat(Jr,"-fix-left"),zi&&co),"".concat(Jr,"-fix-left-first"),oo&&co),"".concat(Jr,"-fix-left-last"),He&&co),"".concat(Jr,"-fix-left-all"),He&&ks&&co),"".concat(Jr,"-fix-right"),Wi&&co),"".concat(Jr,"-fix-right-first"),gr&&co),"".concat(Jr,"-fix-right-last"),Dr&&co),"".concat(Jr,"-ellipsis"),gn),"".concat(Jr,"-with-append"),nr),"".concat(Jr,"-fix-sticky"),(zi||Wi)&&vo&&co),(0,Ce.Z)(jn,"".concat(Jr,"-row-hover"),!Eo&&xo)),ar.className,Eo==null?void 0:Eo.className),ts={};zn&&(ts.textAlign=zn);var yo=(0,$t.Z)((0,$t.Z)((0,$t.Z)((0,$t.Z)({},Eo==null?void 0:Eo.style),os),ts),ar.style),Vo=lr;return(0,Zt.Z)(Vo)==="object"&&!Array.isArray(Vo)&&!Ht.isValidElement(Vo)&&(Vo=null),gn&&(He||gr)&&(Vo=Ht.createElement("span",{className:"".concat(Jr,"-content")},Vo)),Ht.createElement(dn,(0,Vt.Z)({},Eo,ar,{className:so,style:yo,title:$r,scope:mn,onMouseEnter:ls?ps:void 0,onMouseLeave:ls?Pr:void 0,colSpan:rr!==1?rr:null,rowSpan:_n!==1?_n:null}),nr,Vo)}var Le=Ht.memo(ri);function fi(ke,hn,Qe,Ut,pn){var fn=Qe[ke]||{},Qn=Qe[hn]||{},Gn,jn;fn.fixed==="left"?Gn=Ut.left[pn==="rtl"?hn:ke]:Qn.fixed==="right"&&(jn=Ut.right[pn==="rtl"?ke:hn]);var dn=!1,tn=!1,gn=!1,mn=!1,xn=Qe[hn+1],hi=Qe[ke-1],zn=xn&&!xn.fixed||hi&&!hi.fixed||Qe.every(function(ir){return ir.fixed==="left"});if(pn==="rtl"){if(Gn!==void 0){var Xn=hi&&hi.fixed==="left";mn=!Xn&&zn}else if(jn!==void 0){var cn=xn&&xn.fixed==="right";gn=!cn&&zn}}else if(Gn!==void 0){var ti=xn&&xn.fixed==="left";dn=!ti&&zn}else if(jn!==void 0){var Di=hi&&hi.fixed==="right";tn=!Di&&zn}return{fixLeft:Gn,fixRight:jn,lastFixLeft:dn,firstFixRight:tn,lastFixRight:gn,firstFixLeft:mn,isSticky:Ut.isSticky}}var Pi=Ht.createContext({}),jt=Pi;function Mt(ke){var hn=ke.className,Qe=ke.index,Ut=ke.children,pn=ke.colSpan,fn=pn===void 0?1:pn,Qn=ke.rowSpan,Gn=ke.align,jn=ce(bt,["prefixCls","direction"]),dn=jn.prefixCls,tn=jn.direction,gn=Ht.useContext(jt),mn=gn.scrollColumnIndex,xn=gn.stickyOffsets,hi=gn.flattenColumns,zn=Qe+fn-1,Xn=zn+1===mn?fn+1:fn,cn=fi(Qe,Qe+Xn-1,hi,xn,tn);return Ht.createElement(Le,(0,Vt.Z)({className:hn,index:Qe,component:"td",prefixCls:dn,record:null,dataIndex:null,align:Gn,colSpan:Xn,rowSpan:Qn,render:function(){return Ut}},cn))}var mt=Qt(5883),vt=["children"];function Lt(ke){var hn=ke.children,Qe=(0,mt.Z)(ke,vt);return Ht.createElement("tr",Qe,hn)}function Bt(ke){var hn=ke.children;return hn}Bt.Row=Lt,Bt.Cell=Mt;var _t=Bt;function Me(ke){var hn=ke.children,Qe=ke.stickyOffsets,Ut=ke.flattenColumns,pn=ce(bt,"prefixCls"),fn=Ut.length-1,Qn=Ut[fn],Gn=Ht.useMemo(function(){return{stickyOffsets:Qe,flattenColumns:Ut,scrollColumnIndex:Qn!=null&&Qn.scrollbar?fn:null}},[Qn,Ut,fn,Qe]);return Ht.createElement(jt.Provider,{value:Gn},Ht.createElement("tfoot",{className:"".concat(pn,"-summary")},hn))}var ye=ct(Me),Ye=_t,Fe=Qt(29301),Te=Qt(29194),Oe=Qt(24514),$e=Qt(75152),yn=Qt(26112);function Kn(ke,hn,Qe,Ut,pn,fn,Qn){ke.push({record:hn,indent:Qe,index:Qn});var Gn=fn(hn),jn=pn==null?void 0:pn.has(Gn);if(hn&&Array.isArray(hn[Ut])&&jn)for(var dn=0;dn<hn[Ut].length;dn+=1)Kn(ke,hn[Ut][dn],Qe+1,Ut,pn,fn,dn)}function Sn(ke,hn,Qe,Ut){var pn=Ht.useMemo(function(){if(Qe!=null&&Qe.size){for(var fn=[],Qn=0;Qn<(ke==null?void 0:ke.length);Qn+=1){var Gn=ke[Qn];Kn(fn,Gn,0,hn,Qe,Ut,Qn)}return fn}return ke==null?void 0:ke.map(function(jn,dn){return{record:jn,indent:0,index:dn}})},[ke,hn,Qe,Ut]);return pn}function ui(ke,hn,Qe,Ut){var pn=ce(bt,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),fn=pn.flattenColumns,Qn=pn.expandableType,Gn=pn.expandedKeys,jn=pn.childrenColumnName,dn=pn.onTriggerExpand,tn=pn.rowExpandable,gn=pn.onRow,mn=pn.expandRowByClick,xn=pn.rowClassName,hi=Qn==="nest",zn=Qn==="row"&&(!tn||tn(ke)),Xn=zn||hi,cn=Gn&&Gn.has(hn),ti=jn&&ke&&ke[jn],Di=(0,Oi.zX)(dn),ir=gn==null?void 0:gn(ke,Qe),Ji=ir==null?void 0:ir.onClick,fr=function(Tr){mn&&Xn&&dn(ke,Tr);for(var oo=arguments.length,He=new Array(oo>1?oo-1:0),gr=1;gr<oo;gr++)He[gr-1]=arguments[gr];Ji==null||Ji.apply(void 0,[Tr].concat(He))},dr;typeof xn=="string"?dr=xn:typeof xn=="function"&&(dr=xn(ke,Qe,Ut));var Er=ie(fn);return(0,$t.Z)((0,$t.Z)({},pn),{},{columnsKey:Er,nestExpandable:hi,expanded:cn,hasNestChildren:ti,record:ke,onTriggerExpand:Di,rowSupportExpand:zn,expandable:Xn,rowProps:(0,$t.Z)((0,$t.Z)({},ir),{},{className:nn()(dr,ir==null?void 0:ir.className),onClick:fr})})}function ci(ke){var hn=ke.prefixCls,Qe=ke.children,Ut=ke.component,pn=ke.cellComponent,fn=ke.className,Qn=ke.expanded,Gn=ke.colSpan,jn=ke.isEmpty,dn=ce(bt,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),tn=dn.scrollbarSize,gn=dn.fixHeader,mn=dn.fixColumn,xn=dn.componentWidth,hi=dn.horizonScroll,zn=Qe;return(jn?hi&&xn:mn)&&(zn=Ht.createElement("div",{style:{width:xn-(gn&&!jn?tn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(hn,"-expanded-row-fixed")},zn)),Ht.createElement(Ut,{className:fn,style:{display:Qn?null:"none"}},Ht.createElement(Le,{component:pn,prefixCls:hn,colSpan:Gn},zn))}var mi=ci;function Mi(ke){var hn=ke.prefixCls,Qe=ke.record,Ut=ke.onExpand,pn=ke.expanded,fn=ke.expandable,Qn="".concat(hn,"-row-expand-icon");if(!fn)return Ht.createElement("span",{className:nn()(Qn,"".concat(hn,"-row-spaced"))});var Gn=function(dn){Ut(Qe,dn),dn.stopPropagation()};return Ht.createElement("span",{className:nn()(Qn,(0,Ce.Z)((0,Ce.Z)({},"".concat(hn,"-row-expanded"),pn),"".concat(hn,"-row-collapsed"),!pn)),onClick:Gn})}function yr(ke,hn,Qe){var Ut=[];function pn(fn){(fn||[]).forEach(function(Qn,Gn){Ut.push(hn(Qn,Gn)),pn(Qn[Qe])})}return pn(ke),Ut}function ki(ke,hn,Qe,Ut){return typeof ke=="string"?ke:typeof ke=="function"?ke(hn,Qe,Ut):""}function Ri(ke,hn,Qe,Ut,pn){var fn=ke.record,Qn=ke.prefixCls,Gn=ke.columnsKey,jn=ke.fixedInfoList,dn=ke.expandIconColumnIndex,tn=ke.nestExpandable,gn=ke.indentSize,mn=ke.expandIcon,xn=ke.expanded,hi=ke.hasNestChildren,zn=ke.onTriggerExpand,Xn=Gn[Qe],cn=jn[Qe],ti;Qe===(dn||0)&&tn&&(ti=Ht.createElement(Ht.Fragment,null,Ht.createElement("span",{style:{paddingLeft:"".concat(gn*Ut,"px")},className:"".concat(Qn,"-row-indent indent-level-").concat(Ut)}),mn({prefixCls:Qn,expanded:xn,expandable:hi,record:fn,onExpand:zn})));var Di;return hn.onCell&&(Di=hn.onCell(fn,pn)),{key:Xn,fixedInfo:cn,appendCellNode:ti,additionalCellProps:Di||{}}}function Vi(ke){var hn=ke.className,Qe=ke.style,Ut=ke.record,pn=ke.index,fn=ke.renderIndex,Qn=ke.rowKey,Gn=ke.indent,jn=Gn===void 0?0:Gn,dn=ke.rowComponent,tn=ke.cellComponent,gn=ke.scopeCellComponent,mn=ui(Ut,Qn,pn,jn),xn=mn.prefixCls,hi=mn.flattenColumns,zn=mn.expandedRowClassName,Xn=mn.expandedRowRender,cn=mn.rowProps,ti=mn.expanded,Di=mn.rowSupportExpand,ir=Ht.useRef(!1);ir.current||(ir.current=ti);var Ji=ki(zn,Ut,pn,jn),fr=Ht.createElement(dn,(0,Vt.Z)({},cn,{"data-row-key":Qn,className:nn()(hn,"".concat(xn,"-row"),"".concat(xn,"-row-level-").concat(jn),cn==null?void 0:cn.className,(0,Ce.Z)({},Ji,jn>=1)),style:(0,$t.Z)((0,$t.Z)({},Qe),cn==null?void 0:cn.style)}),hi.map(function(Gr,Tr){var oo=Gr.render,He=Gr.dataIndex,gr=Gr.className,Dr=Ri(mn,Gr,Tr,jn,pn),nr=Dr.key,Qr=Dr.fixedInfo,ar=Dr.appendCellNode,vo=Dr.additionalCellProps;return Ht.createElement(Le,(0,Vt.Z)({className:gr,ellipsis:Gr.ellipsis,align:Gr.align,scope:Gr.rowScope,component:Gr.rowScope?gn:tn,prefixCls:xn,key:nr,record:Ut,index:pn,renderIndex:fn,dataIndex:He,render:oo,shouldCellUpdate:Gr.shouldCellUpdate},Qr,{appendNode:ar,additionalProps:vo}))})),dr;if(Di&&(ir.current||ti)){var Er=Xn(Ut,pn,jn+1,ti);dr=Ht.createElement(mi,{expanded:ti,className:nn()("".concat(xn,"-expanded-row"),"".concat(xn,"-expanded-row-level-").concat(jn+1),Ji),prefixCls:xn,component:dn,cellComponent:tn,colSpan:hi.length,isEmpty:!1},Er)}return Ht.createElement(Ht.Fragment,null,fr,dr)}var Or=ct(Vi);function qi(ke){var hn=ke.columnKey,Qe=ke.onColumnResize,Ut=Ht.useRef();return Ht.useEffect(function(){Ut.current&&Qe(hn,Ut.current.offsetWidth)},[]),Ht.createElement(Fe.Z,{data:hn},Ht.createElement("td",{ref:Ut,style:{padding:0,border:0,height:0}},Ht.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function Cr(ke){var hn=ke.prefixCls,Qe=ke.columnsKey,Ut=ke.onColumnResize;return Ht.createElement("tr",{"aria-hidden":"true",className:"".concat(hn,"-measure-row"),style:{height:0,fontSize:0}},Ht.createElement(Fe.Z.Collection,{onBatchResize:function(fn){fn.forEach(function(Qn){var Gn=Qn.data,jn=Qn.size;Ut(Gn,jn.offsetWidth)})}},Qe.map(function(pn){return Ht.createElement(qi,{key:pn,columnKey:pn,onColumnResize:Ut})})))}function xr(ke){var hn=ke.data,Qe=ke.measureColumnWidth,Ut=ce(bt,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),pn=Ut.prefixCls,fn=Ut.getComponent,Qn=Ut.onColumnResize,Gn=Ut.flattenColumns,jn=Ut.getRowKey,dn=Ut.expandedKeys,tn=Ut.childrenColumnName,gn=Ut.emptyNode,mn=Sn(hn,tn,dn,jn),xn=Ht.useRef({renderWithProps:!1}),hi=fn(["body","wrapper"],"tbody"),zn=fn(["body","row"],"tr"),Xn=fn(["body","cell"],"td"),cn=fn(["body","cell"],"th"),ti;hn.length?ti=mn.map(function(ir,Ji){var fr=ir.record,dr=ir.indent,Er=ir.index,Gr=jn(fr,Ji);return Ht.createElement(Or,{key:Gr,rowKey:Gr,record:fr,index:Ji,renderIndex:Er,rowComponent:zn,cellComponent:Xn,scopeCellComponent:cn,indent:dr})}):ti=Ht.createElement(mi,{expanded:!0,className:"".concat(pn,"-placeholder"),prefixCls:pn,component:zn,cellComponent:Xn,colSpan:Gn.length,isEmpty:!0},gn);var Di=ie(Gn);return Ht.createElement(ni.Provider,{value:xn.current},Ht.createElement(hi,{className:"".concat(pn,"-tbody")},Qe&&Ht.createElement(Cr,{prefixCls:pn,columnsKey:Di,onColumnResize:Qn}),ti))}var Wr=ct(xr),$i=Qt(90494),eo=["columnType"];function fo(ke){for(var hn=ke.colWidths,Qe=ke.columns,Ut=ke.columCount,pn=ce(bt,["tableLayout"]),fn=pn.tableLayout,Qn=[],Gn=Ut||Qe.length,jn=!1,dn=Gn-1;dn>=0;dn-=1){var tn=hn[dn],gn=Qe&&Qe[dn],mn=void 0,xn=void 0;if(gn&&(mn=gn[$i.v],fn==="auto"&&(xn=gn.minWidth)),tn||xn||mn||jn){var hi=mn||{},zn=hi.columnType,Xn=(0,mt.Z)(hi,eo);Qn.unshift(Ht.createElement("col",(0,Vt.Z)({key:dn,style:{width:tn,minWidth:xn}},Xn))),jn=!0}}return Ht.createElement("colgroup",null,Qn)}var Zr=fo,Fr=Qt(92393),ro=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Tt(ke,hn){return(0,Ht.useMemo)(function(){for(var Qe=[],Ut=0;Ut<hn;Ut+=1){var pn=ke[Ut];if(pn!==void 0)Qe[Ut]=pn;else return null}return Qe},[ke.join("_"),hn])}var Gi=Ht.forwardRef(function(ke,hn){var Qe=ke.className,Ut=ke.noData,pn=ke.columns,fn=ke.flattenColumns,Qn=ke.colWidths,Gn=ke.columCount,jn=ke.stickyOffsets,dn=ke.direction,tn=ke.fixHeader,gn=ke.stickyTopOffset,mn=ke.stickyBottomOffset,xn=ke.stickyClassName,hi=ke.onScroll,zn=ke.maxContentScroll,Xn=ke.children,cn=(0,mt.Z)(ke,ro),ti=ce(bt,["prefixCls","scrollbarSize","isSticky","getComponent"]),Di=ti.prefixCls,ir=ti.scrollbarSize,Ji=ti.isSticky,fr=ti.getComponent,dr=fr(["header","table"],"table"),Er=Ji&&!tn?0:ir,Gr=Ht.useRef(null),Tr=Ht.useCallback(function(vo){(0,De.mH)(hn,vo),(0,De.mH)(Gr,vo)},[]);Ht.useEffect(function(){var vo;function Jr(Nr){var co=Nr,ks=co.currentTarget,ls=co.deltaX;ls&&(hi({currentTarget:ks,scrollLeft:ks.scrollLeft+ls}),Nr.preventDefault())}return(vo=Gr.current)===null||vo===void 0||vo.addEventListener("wheel",Jr,{passive:!1}),function(){var Nr;(Nr=Gr.current)===null||Nr===void 0||Nr.removeEventListener("wheel",Jr)}},[]);var oo=Ht.useMemo(function(){return fn.every(function(vo){return vo.width})},[fn]),He=fn[fn.length-1],gr={fixed:He?He.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Di,"-cell-scrollbar")}}},Dr=(0,Ht.useMemo)(function(){return Er?[].concat((0,Fr.Z)(pn),[gr]):pn},[Er,pn]),nr=(0,Ht.useMemo)(function(){return Er?[].concat((0,Fr.Z)(fn),[gr]):fn},[Er,fn]),Qr=(0,Ht.useMemo)(function(){var vo=jn.right,Jr=jn.left;return(0,$t.Z)((0,$t.Z)({},jn),{},{left:dn==="rtl"?[].concat((0,Fr.Z)(Jr.map(function(Nr){return Nr+Er})),[0]):Jr,right:dn==="rtl"?vo:[].concat((0,Fr.Z)(vo.map(function(Nr){return Nr+Er})),[0]),isSticky:Ji})},[Er,jn,Ji]),ar=Tt(Qn,Gn);return Ht.createElement("div",{style:(0,$t.Z)({overflow:"hidden"},Ji?{top:gn,bottom:mn}:{}),ref:Tr,className:nn()(Qe,(0,Ce.Z)({},xn,!!xn))},Ht.createElement(dr,{style:{tableLayout:"fixed",visibility:Ut||ar?null:"hidden"}},(!Ut||!zn||oo)&&Ht.createElement(Zr,{colWidths:ar?[].concat((0,Fr.Z)(ar),[Er]):[],columCount:Gn+1,columns:nr}),Xn((0,$t.Z)((0,$t.Z)({},cn),{},{stickyOffsets:Qr,columns:Dr,flattenColumns:nr}))))}),Zi=Ht.memo(Gi),Yr=function(hn){var Qe=hn.cells,Ut=hn.stickyOffsets,pn=hn.flattenColumns,fn=hn.rowComponent,Qn=hn.cellComponent,Gn=hn.onHeaderRow,jn=hn.index,dn=ce(bt,["prefixCls","direction"]),tn=dn.prefixCls,gn=dn.direction,mn;Gn&&(mn=Gn(Qe.map(function(hi){return hi.column}),jn));var xn=ie(Qe.map(function(hi){return hi.column}));return Ht.createElement(fn,mn,Qe.map(function(hi,zn){var Xn=hi.column,cn=fi(hi.colStart,hi.colEnd,pn,Ut,gn),ti;return Xn&&Xn.onHeaderCell&&(ti=hi.column.onHeaderCell(Xn)),Ht.createElement(Le,(0,Vt.Z)({},hi,{scope:Xn.title?hi.colSpan>1?"colgroup":"col":null,ellipsis:Xn.ellipsis,align:Xn.align,component:Qn,prefixCls:tn,key:xn[zn]},cn,{additionalProps:ti,rowType:"header"}))}))},bo=Yr;function ko(ke){var hn=[];function Qe(Qn,Gn){var jn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;hn[jn]=hn[jn]||[];var dn=Gn,tn=Qn.filter(Boolean).map(function(gn){var mn={key:gn.key,className:gn.className||"",children:gn.title,column:gn,colStart:dn},xn=1,hi=gn.children;return hi&&hi.length>0&&(xn=Qe(hi,dn,jn+1).reduce(function(zn,Xn){return zn+Xn},0),mn.hasSubColumns=!0),"colSpan"in gn&&(xn=gn.colSpan),"rowSpan"in gn&&(mn.rowSpan=gn.rowSpan),mn.colSpan=xn,mn.colEnd=mn.colStart+xn-1,hn[jn].push(mn),dn+=xn,xn});return tn}Qe(ke,0);for(var Ut=hn.length,pn=function(Gn){hn[Gn].forEach(function(jn){!("rowSpan"in jn)&&!jn.hasSubColumns&&(jn.rowSpan=Ut-Gn)})},fn=0;fn<Ut;fn+=1)pn(fn);return hn}var $o=function(hn){var Qe=hn.stickyOffsets,Ut=hn.columns,pn=hn.flattenColumns,fn=hn.onHeaderRow,Qn=ce(bt,["prefixCls","getComponent"]),Gn=Qn.prefixCls,jn=Qn.getComponent,dn=Ht.useMemo(function(){return ko(Ut)},[Ut]),tn=jn(["header","wrapper"],"thead"),gn=jn(["header","row"],"tr"),mn=jn(["header","cell"],"th");return Ht.createElement(tn,{className:"".concat(Gn,"-thead")},dn.map(function(xn,hi){var zn=Ht.createElement(bo,{key:hi,flattenColumns:pn,cells:xn,stickyOffsets:Qe,rowComponent:gn,cellComponent:mn,onHeaderRow:fn,index:hi});return zn}))},Xi=ct($o),Ni=Qt(78612);function _e(ke,hn,Qe){var Ut=(0,$i.g)(ke),pn=Ut.expandIcon,fn=Ut.expandedRowKeys,Qn=Ut.defaultExpandedRowKeys,Gn=Ut.defaultExpandAllRows,jn=Ut.expandedRowRender,dn=Ut.onExpand,tn=Ut.onExpandedRowsChange,gn=Ut.childrenColumnName,mn=pn||Mi,xn=gn||"children",hi=Ht.useMemo(function(){return jn?"row":ke.expandable&&ke.internalHooks===Pt.R&&ke.expandable.__PARENT_RENDER_ICON__||hn.some(function(Ji){return Ji&&(0,Zt.Z)(Ji)==="object"&&Ji[xn]})?"nest":!1},[!!jn,hn]),zn=Ht.useState(function(){return Qn||(Gn?yr(hn,Qe,xn):[])}),Xn=(0,te.Z)(zn,2),cn=Xn[0],ti=Xn[1],Di=Ht.useMemo(function(){return new Set(fn||cn||[])},[fn,cn]),ir=Ht.useCallback(function(Ji){var fr=Qe(Ji,hn.indexOf(Ji)),dr,Er=Di.has(fr);Er?(Di.delete(fr),dr=(0,Fr.Z)(Di)):dr=[].concat((0,Fr.Z)(Di),[fr]),ti(dr),dn&&dn(!Er,Ji),tn&&tn(dr)},[Qe,Di,hn,dn,tn]);return[Ut,hi,Di,mn,xn,ir]}function Re(ke,hn,Qe){var Ut=ke.map(function(pn,fn){return fi(fn,fn,ke,hn,Qe)});return(0,qe.Z)(function(){return Ut},[Ut],function(pn,fn){return!(0,de.Z)(pn,fn)})}function Ue(ke){var hn=(0,Ht.useRef)(ke),Qe=(0,Ht.useState)({}),Ut=(0,te.Z)(Qe,2),pn=Ut[1],fn=(0,Ht.useRef)(null),Qn=(0,Ht.useRef)([]);function Gn(jn){Qn.current.push(jn);var dn=Promise.resolve();fn.current=dn,dn.then(function(){if(fn.current===dn){var tn=Qn.current,gn=hn.current;Qn.current=[],tn.forEach(function(mn){hn.current=mn(hn.current)}),fn.current=null,gn!==hn.current&&pn({})}})}return(0,Ht.useEffect)(function(){return function(){fn.current=null}},[]),[hn.current,Gn]}function gi(ke){var hn=(0,Ht.useRef)(ke||null),Qe=(0,Ht.useRef)();function Ut(){window.clearTimeout(Qe.current)}function pn(Qn){hn.current=Qn,Ut(),Qe.current=window.setTimeout(function(){hn.current=null,Qe.current=void 0},100)}function fn(){return hn.current}return(0,Ht.useEffect)(function(){return Ut},[]),[pn,fn]}function xe(){var ke=Ht.useState(-1),hn=(0,te.Z)(ke,2),Qe=hn[0],Ut=hn[1],pn=Ht.useState(-1),fn=(0,te.Z)(pn,2),Qn=fn[0],Gn=fn[1],jn=Ht.useCallback(function(dn,tn){Ut(dn),Gn(tn)},[]);return[Qe,Qn,jn]}var Hi=Qt(47273),Dn=(0,Hi.Z)()?window:null;function Ai(ke,hn){var Qe=(0,Zt.Z)(ke)==="object"?ke:{},Ut=Qe.offsetHeader,pn=Ut===void 0?0:Ut,fn=Qe.offsetSummary,Qn=fn===void 0?0:fn,Gn=Qe.offsetScroll,jn=Gn===void 0?0:Gn,dn=Qe.getContainer,tn=dn===void 0?function(){return Dn}:dn,gn=tn()||Dn,mn=!!ke;return Ht.useMemo(function(){return{isSticky:mn,stickyClassName:mn?"".concat(hn,"-sticky-holder"):"",offsetHeader:pn,offsetSummary:Qn,offsetScroll:jn,container:gn}},[mn,jn,pn,Qn,hn,gn])}function Ve(ke,hn,Qe){var Ut=(0,Ht.useMemo)(function(){var pn=hn.length,fn=function(dn,tn,gn){for(var mn=[],xn=0,hi=dn;hi!==tn;hi+=gn)mn.push(xn),hn[hi].fixed&&(xn+=ke[hi]||0);return mn},Qn=fn(0,pn,1),Gn=fn(pn-1,-1,-1).reverse();return Qe==="rtl"?{left:Gn,right:Qn}:{left:Qn,right:Gn}},[ke,hn,Qe]);return Ut}var ze=Ve;function ai(ke){var hn=ke.className,Qe=ke.children;return Ht.createElement("div",{className:hn},Qe)}var he=ai,an=Qt(8224),Yn=Qt(16089),vi=Qt(76846);function ln(ke){var hn=(0,vi.bn)(ke),Qe=hn.getBoundingClientRect(),Ut=document.documentElement;return{left:Qe.left+(window.pageXOffset||Ut.scrollLeft)-(Ut.clientLeft||document.body.clientLeft||0),top:Qe.top+(window.pageYOffset||Ut.scrollTop)-(Ut.clientTop||document.body.clientTop||0)}}var qn=function(hn,Qe){var Ut,pn,fn=hn.scrollBodyRef,Qn=hn.onScroll,Gn=hn.offsetScroll,jn=hn.container,dn=hn.direction,tn=ce(bt,"prefixCls"),gn=((Ut=fn.current)===null||Ut===void 0?void 0:Ut.scrollWidth)||0,mn=((pn=fn.current)===null||pn===void 0?void 0:pn.clientWidth)||0,xn=gn&&mn*(mn/gn),hi=Ht.useRef(),zn=Ue({scrollLeft:0,isHiddenScrollBar:!0}),Xn=(0,te.Z)(zn,2),cn=Xn[0],ti=Xn[1],Di=Ht.useRef({delta:0,x:0}),ir=Ht.useState(!1),Ji=(0,te.Z)(ir,2),fr=Ji[0],dr=Ji[1],Er=Ht.useRef(null);Ht.useEffect(function(){return function(){Yn.Z.cancel(Er.current)}},[]);var Gr=function(){dr(!1)},Tr=function(nr){nr.persist(),Di.current.delta=nr.pageX-cn.scrollLeft,Di.current.x=0,dr(!0),nr.preventDefault()},oo=function(nr){var Qr,ar=nr||((Qr=window)===null||Qr===void 0?void 0:Qr.event),vo=ar.buttons;if(!fr||vo===0){fr&&dr(!1);return}var Jr=Di.current.x+nr.pageX-Di.current.x-Di.current.delta,Nr=dn==="rtl";Jr=Math.max(Nr?xn-mn:0,Math.min(Nr?0:mn-xn,Jr));var co=!Nr||Math.abs(Jr)+Math.abs(xn)<mn;co&&(Qn({scrollLeft:Jr/mn*(gn+2)}),Di.current.x=nr.pageX)},He=function(){Yn.Z.cancel(Er.current),Er.current=(0,Yn.Z)(function(){if(fn.current){var nr=ln(fn.current).top,Qr=nr+fn.current.offsetHeight,ar=jn===window?document.documentElement.scrollTop+window.innerHeight:ln(jn).top+jn.clientHeight;Qr-(0,$e.Z)()<=ar||nr>=ar-Gn?ti(function(vo){return(0,$t.Z)((0,$t.Z)({},vo),{},{isHiddenScrollBar:!0})}):ti(function(vo){return(0,$t.Z)((0,$t.Z)({},vo),{},{isHiddenScrollBar:!1})})}})},gr=function(nr){ti(function(Qr){return(0,$t.Z)((0,$t.Z)({},Qr),{},{scrollLeft:nr/gn*mn||0})})};return Ht.useImperativeHandle(Qe,function(){return{setScrollLeft:gr,checkScrollBarVisible:He}}),Ht.useEffect(function(){var Dr=(0,an.Z)(document.body,"mouseup",Gr,!1),nr=(0,an.Z)(document.body,"mousemove",oo,!1);return He(),function(){Dr.remove(),nr.remove()}},[xn,fr]),Ht.useEffect(function(){if(fn.current){for(var Dr=[],nr=(0,vi.bn)(fn.current);nr;)Dr.push(nr),nr=nr.parentElement;return Dr.forEach(function(Qr){return Qr.addEventListener("scroll",He,!1)}),window.addEventListener("resize",He,!1),window.addEventListener("scroll",He,!1),jn.addEventListener("scroll",He,!1),function(){Dr.forEach(function(Qr){return Qr.removeEventListener("scroll",He)}),window.removeEventListener("resize",He),window.removeEventListener("scroll",He),jn.removeEventListener("scroll",He)}}},[jn]),Ht.useEffect(function(){cn.isHiddenScrollBar||ti(function(Dr){var nr=fn.current;return nr?(0,$t.Z)((0,$t.Z)({},Dr),{},{scrollLeft:nr.scrollLeft/nr.scrollWidth*nr.clientWidth}):Dr})},[cn.isHiddenScrollBar]),gn<=mn||!xn||cn.isHiddenScrollBar?null:Ht.createElement("div",{style:{height:(0,$e.Z)(),width:mn,bottom:Gn},className:"".concat(tn,"-sticky-scroll")},Ht.createElement("div",{onMouseDown:Tr,ref:hi,className:nn()("".concat(tn,"-sticky-scroll-bar"),(0,Ce.Z)({},"".concat(tn,"-sticky-scroll-bar-active"),fr)),style:{width:"".concat(xn,"px"),transform:"translate3d(".concat(cn.scrollLeft,"px, 0, 0)")}}))},li=Ht.forwardRef(qn);function Xe(ke){return null}var sn=Xe;function wn(ke){return null}var Mn=wn,ii="rc-table",_i=[],Ki={};function Ti(){return"No Data"}function en(ke,hn){var Qe=(0,$t.Z)({rowKey:"key",prefixCls:ii,emptyText:Ti},ke),Ut=Qe.prefixCls,pn=Qe.className,fn=Qe.rowClassName,Qn=Qe.style,Gn=Qe.data,jn=Qe.rowKey,dn=Qe.scroll,tn=Qe.tableLayout,gn=Qe.direction,mn=Qe.title,xn=Qe.footer,hi=Qe.summary,zn=Qe.caption,Xn=Qe.id,cn=Qe.showHeader,ti=Qe.components,Di=Qe.emptyText,ir=Qe.onRow,Ji=Qe.onHeaderRow,fr=Qe.onScroll,dr=Qe.internalHooks,Er=Qe.transformColumns,Gr=Qe.internalRefs,Tr=Qe.tailor,oo=Qe.getContainerWidth,He=Qe.sticky,gr=Qe.rowHoverable,Dr=gr===void 0?!0:gr,nr=Gn||_i,Qr=!!nr.length,ar=dr===Pt.R,vo=Ht.useCallback(function(wo,Qo){return(0,En.Z)(ti,wo)||Qo},[ti]),Jr=Ht.useMemo(function(){return typeof jn=="function"?jn:function(wo){var Qo=wo&&wo[jn];return Qo}},[jn]),Nr=vo(["body"]),co=xe(),ks=(0,te.Z)(co,3),ls=ks[0],la=ks[1],Is=ks[2],lr=_e(Qe,nr,Jr),Eo=(0,te.Z)(lr,6),os=Eo[0],zi=Eo[1],Wi=Eo[2],rr=Eo[3],_n=Eo[4],Ar=Eo[5],kr=dn==null?void 0:dn.x,xo=Ht.useState(0),Ts=(0,te.Z)(xo,2),ps=Ts[0],Pr=Ts[1],$r=(0,Ni.Z)((0,$t.Z)((0,$t.Z)((0,$t.Z)({},Qe),os),{},{expandable:!!os.expandedRowRender,columnTitle:os.columnTitle,expandedKeys:Wi,getRowKey:Jr,onTriggerExpand:Ar,expandIcon:rr,expandIconColumnIndex:os.expandIconColumnIndex,direction:gn,scrollWidth:ar&&Tr&&typeof kr=="number"?kr:null,clientWidth:ps}),ar?Er:null),so=(0,te.Z)($r,4),ts=so[0],yo=so[1],Vo=so[2],zo=so[3],Io=Vo!=null?Vo:kr,ys=Ht.useMemo(function(){return{columns:ts,flattenColumns:yo}},[ts,yo]),Wo=Ht.useRef(),Fl=Ht.useRef(),lo=Ht.useRef(),da=Ht.useRef();Ht.useImperativeHandle(hn,function(){return{nativeElement:Wo.current,scrollTo:function(Qo){var Us;if(lo.current instanceof HTMLElement){var na=Qo.index,fa=Qo.top,Vu=Qo.key;if(pi(fa)){var xu;(xu=lo.current)===null||xu===void 0||xu.scrollTo({top:fa})}else{var Wu,Hl=Vu!=null?Vu:Jr(nr[na]);(Wu=lo.current.querySelector('[data-row-key="'.concat(Hl,'"]')))===null||Wu===void 0||Wu.scrollIntoView()}}else(Us=lo.current)!==null&&Us!==void 0&&Us.scrollTo&&lo.current.scrollTo(Qo)}}});var _a=Ht.useRef(),hl=Ht.useState(!1),Zo=(0,te.Z)(hl,2),Ta=Zo[0],$a=Zo[1],uA=Ht.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=ie(yo),hs=es.map(function(wo){return tl.get(wo)}),js=Ht.useMemo(function(){return hs},[hs.join("_")]),Oo=ze(js,yo,gn),ao=dn&&Pn(dn.y),mo=dn&&Pn(Io)||!!os.fixed,Xs=mo&&yo.some(function(wo){var Qo=wo.fixed;return Qo}),xs=Ht.useRef(),ss=Ai(He,Ut),er=ss.isSticky,cl=ss.offsetHeader,we=ss.offsetSummary,Un=ss.offsetScroll,su=ss.stickyClassName,hA=ss.container,as=Ht.useMemo(function(){return hi==null?void 0:hi(nr)},[hi,nr]),dl=(ao||er)&&Ht.isValidElement(as)&&as.type===_t&&as.props.fixed,vu,cA,au;ao&&(cA={overflowY:Qr?"scroll":"auto",maxHeight:dn.y}),mo&&(vu={overflowX:"auto"},ao||(cA={overflowY:"hidden"}),au={width:Io===!0?"auto":Io,minWidth:"100%"});var Ss=Ht.useCallback(function(wo,Qo){(0,Te.Z)(Wo.current)&&Gs(function(Us){if(Us.get(wo)!==Qo){var na=new Map(Us);return na.set(wo,Qo),na}return Us})},[]),Kr=gi(null),xa=(0,te.Z)(Kr,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=gn==="rtl",fa=typeof Us=="number"?Us:Qo.scrollLeft,Vu=Qo||Ki;if(!ms()||ms()===Vu){var xu;el(Vu),po(fa,Fl.current),po(fa,lo.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=ar&&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&&lo.current){var Qo;Bs({currentTarget:(0,vi.bn)(lo.current),scrollLeft:(Qo=lo.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;ar&&oo&&Wo.current&&(fa=oo(Wo.current,fa)||fa),fa!==ps&&(ns(),Pr(fa))},Vs=Ht.useRef(!1);Ht.useEffect(function(){Vs.current&&ns()},[mo,Gn,ts.length]),Ht.useEffect(function(){Vs.current=!0},[]);var zu=Ht.useState(0),Uo=(0,te.Z)(zu,2),ea=Uo[0],No=Uo[1],is=Ht.useState(!0),cs=(0,te.Z)(is,2),Ms=cs[0],_o=cs[1];Ht.useEffect(function(){(!Tr||!ar)&&(lo.current instanceof Element?No((0,$e.o)(lo.current).width):No((0,$e.o)(da.current).width)),_o((0,Oe.G)("position","sticky"))},[]),Ht.useEffect(function(){ar&&Gr&&(Gr.body.current=lo.current)});var dA=Ht.useCallback(function(wo){return Ht.createElement(Ht.Fragment,null,Ht.createElement(Xi,wo),dl==="top"&&Ht.createElement(ye,wo,as))},[dl,as]),_r=Ht.useCallback(function(wo){return Ht.createElement(ye,wo,as)},[as]),ju=vo(["table"],"table"),Bo=Ht.useMemo(function(){return tn||(Xs?Io==="max-content"?"auto":"fixed":ao||er||yo.some(function(wo){var Qo=wo.ellipsis;return Qo})?"fixed":"auto")},[ao,Xs,yo,tn,er]),Oh,Xl={colWidths:js,columCount:yo.length,stickyOffsets:Oo,onHeaderRow:Ji,fixHeader:ao,scroll:dn},TA=Ht.useMemo(function(){return Qr?null:typeof Di=="function"?Di():Di},[Qr,Di]),Hh=Ht.createElement(Wr,{data:nr,measureColumnWidth:ao||mo||er}),ch=Ht.createElement(Zr,{colWidths:yo.map(function(wo){var Qo=wo.width;return Qo}),columns:yo}),lu=zn!=null?Ht.createElement("caption",{className:"".concat(Ut,"-caption")},zn):void 0,uu=(0,yn.Z)(Qe,{data:!0}),Ho=(0,yn.Z)(Qe,{aria:!0});if(ao||er){var Ol;typeof Nr=="function"?(Ol=Nr(nr,{scrollbarSize:ea,ref:lo,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=Ht.createElement("div",{style:(0,$t.Z)((0,$t.Z)({},vu),cA),onScroll:Na,ref:lo,className:nn()("".concat(Ut,"-body"))},Ht.createElement(ju,(0,Vt.Z)({style:(0,$t.Z)((0,$t.Z)({},au),{},{tableLayout:Bo})},Ho),lu,ch,Hh,!dl&&as&&Ht.createElement(ye,{stickyOffsets:Oo,flattenColumns:yo},as)));var dh=(0,$t.Z)((0,$t.Z)((0,$t.Z)({noData:!nr.length,maxContentScroll:mo&&Io==="max-content"},Xl),ys),{},{direction:gn,stickyClassName:su,onScroll:Bs});Oh=Ht.createElement(Ht.Fragment,null,cn!==!1&&Ht.createElement(Zi,(0,Vt.Z)({},dh,{stickyTopOffset:cl,className:"".concat(Ut,"-header"),ref:Fl}),dA),Ol,dl&&dl!=="top"&&Ht.createElement(Zi,(0,Vt.Z)({},dh,{stickyBottomOffset:we,className:"".concat(Ut,"-summary"),ref:_a}),_r),er&&lo.current&&lo.current instanceof Element&&Ht.createElement(li,{ref:xs,offsetScroll:Un,scrollBodyRef:lo,onScroll:Bs,container:hA,direction:gn}))}else Oh=Ht.createElement("div",{style:(0,$t.Z)((0,$t.Z)({},vu),cA),className:nn()("".concat(Ut,"-content")),onScroll:Bs,ref:lo},Ht.createElement(ju,(0,Vt.Z)({style:(0,$t.Z)((0,$t.Z)({},au),{},{tableLayout:Bo})},Ho),lu,ch,cn!==!1&&Ht.createElement(Xi,(0,Vt.Z)({},Xl,ys)),Hh,as&&Ht.createElement(ye,{stickyOffsets:Oo,flattenColumns:yo},as)));var yu=Ht.createElement("div",(0,Vt.Z)({className:nn()(Ut,pn,(0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)({},"".concat(Ut,"-rtl"),gn==="rtl"),"".concat(Ut,"-ping-left"),Ta),"".concat(Ut,"-ping-right"),ws),"".concat(Ut,"-layout-fixed"),tn==="fixed"),"".concat(Ut,"-fixed-header"),ao),"".concat(Ut,"-fixed-column"),Xs),"".concat(Ut,"-fixed-column-gapped"),Xs&&zo),"".concat(Ut,"-scroll-horizontal"),mo),"".concat(Ut,"-has-fix-left"),yo[0]&&yo[0].fixed),"".concat(Ut,"-has-fix-right"),yo[yo.length-1]&&yo[yo.length-1].fixed==="right")),style:Qn,id:Xn,ref:Wo},uu),mn&&Ht.createElement(he,{className:"".concat(Ut,"-title")},mn(nr)),Ht.createElement("div",{ref:da,className:"".concat(Ut,"-container")},Oh),xn&&Ht.createElement(he,{className:"".concat(Ut,"-footer")},xn(nr)));mo&&(yu=Ht.createElement(Fe.Z,{onResize:nl},yu));var fA=Re(yo,Oo,gn),wu=Ht.useMemo(function(){return{scrollX:Io,prefixCls:Ut,getComponent:vo,scrollbarSize:ea,direction:gn,fixedInfoList:fA,isSticky:er,supportSticky:Ms,componentWidth:ps,fixHeader:ao,fixColumn:Xs,horizonScroll:mo,tableLayout:Bo,rowClassName:fn,expandedRowClassName:os.expandedRowClassName,expandIcon:rr,expandableType:zi,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:ir,getRowKey:Jr,expandedKeys:Wi,childrenColumnName:_n,rowHoverable:Dr}},[Io,Ut,vo,ea,gn,fA,er,Ms,ps,ao,Xs,mo,Bo,fn,os.expandedRowClassName,rr,zi,os.expandRowByClick,os.expandedRowRender,Ar,os.expandIconColumnIndex,os.indentSize,TA,ts,yo,Ss,ls,la,Is,os.rowExpandable,ir,Jr,Wi,_n,Dr]);return Ht.createElement(bt.Provider,{value:wu},yu)}var Lr=Ht.forwardRef(en);function cr(ke){return at(Lr,ke)}var Ur=cr();Ur.EXPAND_COLUMN=Pt.w,Ur.INTERNAL_HOOKS=Pt.R,Ur.Column=sn,Ur.ColumnGroup=Mn,Ur.Summary=Ye;var rn=Ur,oi=Qt(65283),Ci=ue(null),bi=ue(null);function xi(ke,hn,Qe){var Ut=hn||1;return Qe[ke+Ut]-(Qe[ke]||0)}function Ei(ke){var hn=ke.rowInfo,Qe=ke.column,Ut=ke.colIndex,pn=ke.indent,fn=ke.index,Qn=ke.component,Gn=ke.renderIndex,jn=ke.record,dn=ke.style,tn=ke.className,gn=ke.inverse,mn=ke.getHeight,xn=Qe.render,hi=Qe.dataIndex,zn=Qe.className,Xn=Qe.width,cn=ce(bi,["columnsOffset"]),ti=cn.columnsOffset,Di=Ri(hn,Qe,Ut,pn,fn),ir=Di.key,Ji=Di.fixedInfo,fr=Di.appendCellNode,dr=Di.additionalCellProps,Er=dr.style,Gr=dr.colSpan,Tr=Gr===void 0?1:Gr,oo=dr.rowSpan,He=oo===void 0?1:oo,gr=Ut-1,Dr=xi(gr,Tr,ti),nr=Tr>1?Xn-Dr:0,Qr=(0,$t.Z)((0,$t.Z)((0,$t.Z)({},Er),dn),{},{flex:"0 0 ".concat(Dr,"px"),width:"".concat(Dr,"px"),marginRight:nr,pointerEvents:"auto"}),ar=Ht.useMemo(function(){return gn?He<=1:Tr===0||He===0||He>1},[He,Tr,gn]);ar?Qr.visibility="hidden":gn&&(Qr.height=mn==null?void 0:mn(He));var vo=ar?function(){return null}:xn,Jr={};return(He===0||Tr===0)&&(Jr.rowSpan=1,Jr.colSpan=1),Ht.createElement(Le,(0,Vt.Z)({className:nn()(zn,tn),ellipsis:Qe.ellipsis,align:Qe.align,scope:Qe.rowScope,component:Qn,prefixCls:hn.prefixCls,key:ir,record:jn,index:fn,renderIndex:Gn,dataIndex:hi,render:vo,shouldCellUpdate:Qe.shouldCellUpdate},Ji,{appendNode:fr,additionalProps:(0,$t.Z)((0,$t.Z)({},dr),{},{style:Qr},Jr)}))}var Yi=Ei,sr=["data","index","className","rowKey","style","extra","getHeight"],oe=Ht.forwardRef(function(ke,hn){var Qe=ke.data,Ut=ke.index,pn=ke.className,fn=ke.rowKey,Qn=ke.style,Gn=ke.extra,jn=ke.getHeight,dn=(0,mt.Z)(ke,sr),tn=Qe.record,gn=Qe.indent,mn=Qe.index,xn=ce(bt,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),hi=xn.scrollX,zn=xn.flattenColumns,Xn=xn.prefixCls,cn=xn.fixColumn,ti=xn.componentWidth,Di=ce(Ci,["getComponent"]),ir=Di.getComponent,Ji=ui(tn,fn,Ut,gn),fr=ir(["body","row"],"div"),dr=ir(["body","cell"],"div"),Er=Ji.rowSupportExpand,Gr=Ji.expanded,Tr=Ji.rowProps,oo=Ji.expandedRowRender,He=Ji.expandedRowClassName,gr;if(Er&&Gr){var Dr=oo(tn,Ut,gn+1,Gr),nr=ki(He,tn,Ut,gn),Qr={};cn&&(Qr={style:(0,Ce.Z)({},"--virtual-width","".concat(ti,"px"))});var ar="".concat(Xn,"-expanded-row-cell");gr=Ht.createElement(fr,{className:nn()("".concat(Xn,"-expanded-row"),"".concat(Xn,"-expanded-row-level-").concat(gn+1),nr)},Ht.createElement(Le,{component:dr,prefixCls:Xn,className:nn()(ar,(0,Ce.Z)({},"".concat(ar,"-fixed"),cn)),additionalProps:Qr},Dr))}var vo=(0,$t.Z)((0,$t.Z)({},Qn),{},{width:hi});Gn&&(vo.position="absolute",vo.pointerEvents="none");var Jr=Ht.createElement(fr,(0,Vt.Z)({},Tr,dn,{"data-row-key":fn,ref:Er?null:hn,className:nn()(pn,"".concat(Xn,"-row"),Tr==null?void 0:Tr.className,(0,Ce.Z)({},"".concat(Xn,"-row-extra"),Gn)),style:(0,$t.Z)((0,$t.Z)({},vo),Tr==null?void 0:Tr.style)}),zn.map(function(Nr,co){return Ht.createElement(Yi,{key:co,component:dr,rowInfo:Ji,column:Nr,colIndex:co,indent:gn,index:Ut,renderIndex:mn,record:tn,inverse:Gn,getHeight:jn})}));return Er?Ht.createElement("div",{ref:hn},Jr,gr):Jr}),ae=ct(oe),ee=ae,je=Ht.forwardRef(function(ke,hn){var Qe=ke.data,Ut=ke.onScroll,pn=ce(bt,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),fn=pn.flattenColumns,Qn=pn.onColumnResize,Gn=pn.getRowKey,jn=pn.expandedKeys,dn=pn.prefixCls,tn=pn.childrenColumnName,gn=pn.scrollX,mn=pn.direction,xn=ce(Ci),hi=xn.sticky,zn=xn.scrollY,Xn=xn.listItemHeight,cn=xn.getComponent,ti=xn.onScroll,Di=Ht.useRef(),ir=Sn(Qe,tn,jn,Gn),Ji=Ht.useMemo(function(){var gr=0;return fn.map(function(Dr){var nr=Dr.width,Qr=Dr.key;return gr+=nr,[Qr,nr,gr]})},[fn]),fr=Ht.useMemo(function(){return Ji.map(function(gr){return gr[2]})},[Ji]);Ht.useEffect(function(){Ji.forEach(function(gr){var Dr=(0,te.Z)(gr,2),nr=Dr[0],Qr=Dr[1];Qn(nr,Qr)})},[Ji]),Ht.useImperativeHandle(hn,function(){var gr,Dr={scrollTo:function(Qr){var ar;(ar=Di.current)===null||ar===void 0||ar.scrollTo(Qr)},nativeElement:(gr=Di.current)===null||gr===void 0?void 0:gr.nativeElement};return Object.defineProperty(Dr,"scrollLeft",{get:function(){var Qr;return((Qr=Di.current)===null||Qr===void 0?void 0:Qr.getScrollInfo().x)||0},set:function(Qr){var ar;(ar=Di.current)===null||ar===void 0||ar.scrollTo({left:Qr})}}),Dr});var dr=function(Dr,nr){var Qr,ar=(Qr=ir[nr])===null||Qr===void 0?void 0:Qr.record,vo=Dr.onCell;if(vo){var Jr,Nr=vo(ar,nr);return(Jr=Nr==null?void 0:Nr.rowSpan)!==null&&Jr!==void 0?Jr:1}return 1},Er=function(Dr){var nr=Dr.start,Qr=Dr.end,ar=Dr.getSize,vo=Dr.offsetY;if(Qr<0)return null;for(var Jr=fn.filter(function(rr){return dr(rr,nr)===0}),Nr=nr,co=function(_n){if(Jr=Jr.filter(function(Ar){return dr(Ar,_n)===0}),!Jr.length)return Nr=_n,1},ks=nr;ks>=0&&!co(ks);ks-=1);for(var ls=fn.filter(function(rr){return dr(rr,Qr)!==1}),la=Qr,Is=function(_n){if(ls=ls.filter(function(Ar){return dr(Ar,_n)!==1}),!ls.length)return la=Math.max(_n-1,Qr),1},lr=Qr;lr<ir.length&&!Is(lr);lr+=1);for(var Eo=[],os=function(_n){var Ar=ir[_n];if(!Ar)return 1;fn.some(function(kr){return dr(kr,_n)>1})&&Eo.push(_n)},zi=Nr;zi<=la;zi+=1)os(zi);var Wi=Eo.map(function(rr){var _n=ir[rr],Ar=Gn(_n.record,rr),kr=function(ps){var Pr=rr+ps-1,$r=Gn(ir[Pr].record,Pr),so=ar(Ar,$r);return so.bottom-so.top},xo=ar(Ar);return Ht.createElement(ee,{key:rr,data:_n,rowKey:Ar,index:rr,style:{top:-vo+xo.top},extra:!0,getHeight:kr})});return Wi},Gr=Ht.useMemo(function(){return{columnsOffset:fr}},[fr]),Tr="".concat(dn,"-tbody"),oo=cn(["body","wrapper"]),He={};return hi&&(He.position="sticky",He.bottom=0,(0,Zt.Z)(hi)==="object"&&hi.offsetScroll&&(He.bottom=hi.offsetScroll)),Ht.createElement(bi.Provider,{value:Gr},Ht.createElement(oi.Z,{fullHeight:!1,ref:Di,prefixCls:"".concat(Tr,"-virtual"),styles:{horizontalScrollBar:He},className:Tr,height:zn,itemHeight:Xn||24,data:ir,itemKey:function(Dr){return Gn(Dr.record)},component:oo,scrollWidth:gn,direction:mn,onVirtualScroll:function(Dr){var nr,Qr=Dr.x;Ut({currentTarget:(nr=Di.current)===null||nr===void 0?void 0:nr.nativeElement,scrollLeft:Qr})},onScroll:ti,extraRender:Er},function(gr,Dr,nr){var Qr=Gn(gr.record,Dr);return Ht.createElement(ee,{data:gr,rowKey:Qr,index:Dr,style:nr.style})}))}),Se=ct(je),An=Se,Nn=function(hn,Qe){var Ut=Qe.ref,pn=Qe.onScroll;return Ht.createElement(An,{ref:Ut,data:hn,onScroll:pn})};function Vn(ke,hn){var Qe=ke.data,Ut=ke.columns,pn=ke.scroll,fn=ke.sticky,Qn=ke.prefixCls,Gn=Qn===void 0?ii:Qn,jn=ke.className,dn=ke.listItemHeight,tn=ke.components,gn=ke.onScroll,mn=pn||{},xn=mn.x,hi=mn.y;typeof xn!="number"&&(xn=1),typeof hi!="number"&&(hi=500);var zn=(0,Oi.zX)(function(ti,Di){return(0,En.Z)(tn,ti)||Di}),Xn=(0,Oi.zX)(gn),cn=Ht.useMemo(function(){return{sticky:fn,scrollY:hi,listItemHeight:dn,getComponent:zn,onScroll:Xn}},[fn,hi,dn,zn,Xn]);return Ht.createElement(Ci.Provider,{value:cn},Ht.createElement(rn,(0,Vt.Z)({},ke,{className:nn()(jn,"".concat(Gn,"-virtual")),scroll:(0,$t.Z)((0,$t.Z)({},pn),{},{x:xn}),components:(0,$t.Z)((0,$t.Z)({},tn),{},{body:Qe!=null&&Qe.length?Nn:void 0}),columns:Ut,internalHooks:Pt.R,tailor:!0,ref:hn})))}var Qi=Ht.forwardRef(Vn);function Si(ke){return at(Qi,ke)}var Ne=Si(),wi=null},90494:function(Cn,We,Qt){"use strict";Qt.d(We,{g:function(){return Ht},v:function(){return de}});var Pt=Qt(20049),te=Qt(5883),Ae=Qt(48736),Be=["expandable"],de="RC_TABLE_INTERNAL_COL_DEFINE";function Ht(ne){var ue=ne.expandable,ce=(0,te.Z)(ne,Be),Vt;return"expandable"in ne?Vt=(0,Pt.Z)((0,Pt.Z)({},ce),ue):Vt=ce,Vt.showExpandColumn===!1&&(Vt.expandIconColumnIndex=-1),Vt}},22711:function(Cn,We,Qt){"use strict";Qt.r(We),Qt.d(We,{ResizableTextArea:function(){return ge},default:function(){return Tn}});var Pt=Qt(5016),te=Qt(18082),Ae=Qt(20049),Be=Qt(92393),de=Qt(52456),Ht=Qt(5883),ne=Qt(92310),ue=Qt.n(ne),ce=Qt(36901),Vt=Qt(66003),De=Qt(30292),Jt=Qt(18929),be=Qt(59301),It=Qt(10928),nt=Qt(29301),et=Qt(34280),At=Qt(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 bt(bn){var ni=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,In=bn.getAttribute("id")||bn.getAttribute("data-reactid")||bn.getAttribute("name");if(ni&&pt[In])return pt[In];var Ee=window.getComputedStyle(bn),ie=Ee.getPropertyValue("box-sizing")||Ee.getPropertyValue("-moz-box-sizing")||Ee.getPropertyValue("-webkit-box-sizing"),Pn=parseFloat(Ee.getPropertyValue("padding-bottom"))+parseFloat(Ee.getPropertyValue("padding-top")),pi=parseFloat(Ee.getPropertyValue("border-bottom-width"))+parseFloat(Ee.getPropertyValue("border-top-width")),Wn=ct.map(function(Zn){return"".concat(Zn,":").concat(Ee.getPropertyValue(Zn))}).join(";"),un={sizingStyle:Wn,paddingSize:Pn,borderSize:pi,boxSizing:ie};return ni&&In&&(pt[In]=un),un}function Rt(bn){var ni=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,In=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ee=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)),bn.getAttribute("wrap")?xt.setAttribute("wrap",bn.getAttribute("wrap")):xt.removeAttribute("wrap");var ie=bt(bn,ni),Pn=ie.paddingSize,pi=ie.borderSize,Wn=ie.boxSizing,un=ie.sizingStyle;xt.setAttribute("style","".concat(un,";").concat(at)),xt.value=bn.value||bn.placeholder||"";var Zn=void 0,si=void 0,Oi,on=xt.scrollHeight;if(Wn==="border-box"?on+=pi:Wn==="content-box"&&(on-=Pn),In!==null||Ee!==null){xt.value=" ";var ri=xt.scrollHeight-Pn;In!==null&&(Zn=ri*In,Wn==="border-box"&&(Zn=Zn+Pn+pi),on=Math.max(Zn,on)),Ee!==null&&(si=ri*Ee,Wn==="border-box"&&(si=si+Pn+pi),Oi=on>si?"":"hidden",on=Math.min(si,on))}var Le={height:on,overflowY:Oi,resize:"none"};return Zn&&(Le.minHeight=Zn),si&&(Le.maxHeight=si),Le}var Ot=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Wt=0,Zt=1,$t=2,Ce=be.forwardRef(function(bn,ni){var In=bn,Ee=In.prefixCls,ie=In.defaultValue,Pn=In.value,pi=In.autoSize,Wn=In.onResize,un=In.className,Zn=In.style,si=In.disabled,Oi=In.onChange,on=In.onInternalAutoSize,ri=(0,Ht.Z)(In,Ot),Le=(0,Jt.Z)(ie,{value:Pn,postState:function(Vi){return Vi!=null?Vi:""}}),fi=(0,de.Z)(Le,2),Pi=fi[0],jt=fi[1],Mt=function(Vi){jt(Vi.target.value),Oi==null||Oi(Vi)},mt=be.useRef();be.useImperativeHandle(ni,function(){return{textArea:mt.current}});var vt=be.useMemo(function(){return pi&&(0,It.Z)(pi)==="object"?[pi.minRows,pi.maxRows]:[]},[pi]),Lt=(0,de.Z)(vt,2),Bt=Lt[0],_t=Lt[1],Me=!!pi,ye=function(){try{if(document.activeElement===mt.current){var Vi=mt.current,Or=Vi.selectionStart,qi=Vi.selectionEnd,Cr=Vi.scrollTop;mt.current.setSelectionRange(Or,qi),mt.current.scrollTop=Cr}}catch(xr){}},Ye=be.useState($t),Fe=(0,de.Z)(Ye,2),Te=Fe[0],Oe=Fe[1],$e=be.useState(),yn=(0,de.Z)($e,2),Kn=yn[0],Sn=yn[1],ui=function(){Oe(Wt)};(0,et.Z)(function(){Me&&ui()},[Pn,Bt,_t,Me]),(0,et.Z)(function(){if(Te===Wt)Oe(Zt);else if(Te===Zt){var Ri=Rt(mt.current,!1,Bt,_t);Oe($t),Sn(Ri)}else ye()},[Te]);var ci=be.useRef(),mi=function(){At.Z.cancel(ci.current)},Mi=function(Vi){Te===$t&&(Wn==null||Wn(Vi),pi&&(mi(),ci.current=(0,At.Z)(function(){ui()})))};be.useEffect(function(){return mi},[]);var yr=Me?Kn:null,ki=(0,Ae.Z)((0,Ae.Z)({},Zn),yr);return(Te===Wt||Te===Zt)&&(ki.overflowY="hidden",ki.overflowX="hidden"),be.createElement(nt.Z,{onResize:Mi,disabled:!(pi||Wn)},be.createElement("textarea",(0,Pt.Z)({},ri,{ref:mt,style:ki,className:ue()(Ee,un,(0,te.Z)({},"".concat(Ee,"-disabled"),si)),disabled:si,value:Pi,onChange:Mt})))}),ge=Ce,nn=["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"],qe=be.forwardRef(function(bn,ni){var In,Ee=bn.defaultValue,ie=bn.value,Pn=bn.onFocus,pi=bn.onBlur,Wn=bn.onChange,un=bn.allowClear,Zn=bn.maxLength,si=bn.onCompositionStart,Oi=bn.onCompositionEnd,on=bn.suffix,ri=bn.prefixCls,Le=ri===void 0?"rc-textarea":ri,fi=bn.showCount,Pi=bn.count,jt=bn.className,Mt=bn.style,mt=bn.disabled,vt=bn.hidden,Lt=bn.classNames,Bt=bn.styles,_t=bn.onResize,Me=bn.onClear,ye=bn.onPressEnter,Ye=bn.readOnly,Fe=bn.autoSize,Te=bn.onKeyDown,Oe=(0,Ht.Z)(bn,nn),$e=(0,Jt.Z)(Ee,{value:ie,defaultValue:Ee}),yn=(0,de.Z)($e,2),Kn=yn[0],Sn=yn[1],ui=Kn==null?"":String(Kn),ci=be.useState(!1),mi=(0,de.Z)(ci,2),Mi=mi[0],yr=mi[1],ki=be.useRef(!1),Ri=be.useState(null),Vi=(0,de.Z)(Ri,2),Or=Vi[0],qi=Vi[1],Cr=(0,be.useRef)(null),xr=(0,be.useRef)(null),Wr=function(){var Ve;return(Ve=xr.current)===null||Ve===void 0?void 0:Ve.textArea},$i=function(){Wr().focus()};(0,be.useImperativeHandle)(ni,function(){var Ai;return{resizableTextArea:xr.current,focus:$i,blur:function(){Wr().blur()},nativeElement:((Ai=Cr.current)===null||Ai===void 0?void 0:Ai.nativeElement)||Wr()}}),(0,be.useEffect)(function(){yr(function(Ai){return!mt&&Ai})},[mt]);var eo=be.useState(null),fo=(0,de.Z)(eo,2),Zr=fo[0],Fr=fo[1];be.useEffect(function(){if(Zr){var Ai;(Ai=Wr()).setSelectionRange.apply(Ai,(0,Be.Z)(Zr))}},[Zr]);var ro=(0,Vt.Z)(Pi,fi),Tt=(In=ro.max)!==null&&In!==void 0?In:Zn,Gi=Number(Tt)>0,Zi=ro.strategy(ui),Yr=!!Tt&&Zi>Tt,bo=function(Ve,ze){var ai=ze;!ki.current&&ro.exceedFormatter&&ro.max&&ro.strategy(ze)>ro.max&&(ai=ro.exceedFormatter(ze,{max:ro.max}),ze!==ai&&Fr([Wr().selectionStart||0,Wr().selectionEnd||0])),Sn(ai),(0,De.rJ)(Ve.currentTarget,Ve,Wn,ai)},ko=function(Ve){ki.current=!0,si==null||si(Ve)},$o=function(Ve){ki.current=!1,bo(Ve,Ve.currentTarget.value),Oi==null||Oi(Ve)},Xi=function(Ve){bo(Ve,Ve.target.value)},Ni=function(Ve){Ve.key==="Enter"&&ye&&ye(Ve),Te==null||Te(Ve)},_e=function(Ve){yr(!0),Pn==null||Pn(Ve)},Re=function(Ve){yr(!1),pi==null||pi(Ve)},Ue=function(Ve){Sn(""),$i(),(0,De.rJ)(Wr(),Ve,Wn)},gi=on,xe;ro.show&&(ro.showFormatter?xe=ro.showFormatter({value:ui,count:Zi,maxLength:Tt}):xe="".concat(Zi).concat(Gi?" / ".concat(Tt):""),gi=be.createElement(be.Fragment,null,gi,be.createElement("span",{className:ue()("".concat(Le,"-data-count"),Lt==null?void 0:Lt.count),style:Bt==null?void 0:Bt.count},xe)));var Hi=function(Ve){var ze;_t==null||_t(Ve),(ze=Wr())!==null&&ze!==void 0&&ze.style.height&&qi(!0)},Dn=!Fe&&!fi&&!un;return be.createElement(ce.BaseInput,{ref:Cr,value:ui,allowClear:un,handleReset:Ue,suffix:gi,prefixCls:Le,classNames:(0,Ae.Z)((0,Ae.Z)({},Lt),{},{affixWrapper:ue()(Lt==null?void 0:Lt.affixWrapper,(0,te.Z)((0,te.Z)({},"".concat(Le,"-show-count"),fi),"".concat(Le,"-textarea-allow-clear"),un))}),disabled:mt,focused:Mi,className:ue()(jt,Yr&&"".concat(Le,"-out-of-range")),style:(0,Ae.Z)((0,Ae.Z)({},Mt),Or&&!Dn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof xe=="string"?xe:void 0}},hidden:vt,readOnly:Ye,onClear:Me},be.createElement(ge,(0,Pt.Z)({},Oe,{autoSize:Fe,maxLength:Zn,onKeyDown:Ni,onChange:Xi,onFocus:_e,onBlur:Re,onCompositionStart:ko,onCompositionEnd:$o,className:ue()(Lt==null?void 0:Lt.textarea),style:(0,Ae.Z)((0,Ae.Z)({},Bt==null?void 0:Bt.textarea),{},{resize:Mt==null?void 0:Mt.resize}),disabled:mt,prefixCls:Le,onResize:Hi,ref:xr,readOnly:Ye})))}),En=qe,Tn=En},639:function(Cn,We,Qt){"use strict";Qt.d(We,{Z:function(){return pt}});var Pt=Qt(5016),te=Qt(18082),Ae=Qt(20049),Be=Qt(52456),de=Qt(5883),Ht=Qt(59301),ne=Qt(92310),ue=Qt.n(ne),ce=Qt(26112),Vt=Qt(30699),De=function(bt){for(var Rt=bt.prefixCls,Ot=bt.level,Wt=bt.isStart,Zt=bt.isEnd,$t="".concat(Rt,"-indent-unit"),Ce=[],ge=0;ge<Ot;ge+=1)Ce.push(Ht.createElement("span",{key:ge,className:ue()($t,(0,te.Z)((0,te.Z)({},"".concat($t,"-start"),Wt[ge]),"".concat($t,"-end"),Zt[ge]))}));return Ht.createElement("span",{"aria-hidden":"true",className:"".concat(Rt,"-indent")},Ce)},Jt=Ht.memo(De),be=Qt(65065),It=Qt(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(bt){var Rt,Ot,Wt,Zt=bt.eventKey,$t=bt.className,Ce=bt.style,ge=bt.dragOver,nn=bt.dragOverGapTop,qe=bt.dragOverGapBottom,En=bt.isLeaf,Tn=bt.isStart,bn=bt.isEnd,ni=bt.expanded,In=bt.selected,Ee=bt.checked,ie=bt.halfChecked,Pn=bt.loading,pi=bt.domRef,Wn=bt.active,un=bt.data,Zn=bt.onMouseMove,si=bt.selectable,Oi=(0,de.Z)(bt,nt),on=Ht.useContext(Vt.k),ri=Ht.useContext(Vt.y),Le=Ht.useRef(null),fi=Ht.useState(!1),Pi=(0,Be.Z)(fi,2),jt=Pi[0],Mt=Pi[1],mt=!!(on.disabled||bt.disabled||(Rt=ri.nodeDisabled)!==null&&Rt!==void 0&&Rt.call(ri,un)),vt=Ht.useMemo(function(){return!on.checkable||bt.checkable===!1?!1:on.checkable},[on.checkable,bt.checkable]),Lt=function(Zi){mt||on.onNodeSelect(Zi,(0,It.F)(bt))},Bt=function(Zi){mt||!vt||bt.disableCheckbox||on.onNodeCheck(Zi,(0,It.F)(bt),!Ee)},_t=Ht.useMemo(function(){return typeof si=="boolean"?si:on.selectable},[si,on.selectable]),Me=function(Zi){on.onNodeClick(Zi,(0,It.F)(bt)),_t?Lt(Zi):Bt(Zi)},ye=function(Zi){on.onNodeDoubleClick(Zi,(0,It.F)(bt))},Ye=function(Zi){on.onNodeMouseEnter(Zi,(0,It.F)(bt))},Fe=function(Zi){on.onNodeMouseLeave(Zi,(0,It.F)(bt))},Te=function(Zi){on.onNodeContextMenu(Zi,(0,It.F)(bt))},Oe=Ht.useMemo(function(){return!!(on.draggable&&(!on.draggable.nodeDraggable||on.draggable.nodeDraggable(un)))},[on.draggable,un]),$e=function(Zi){Zi.stopPropagation(),Mt(!0),on.onNodeDragStart(Zi,bt);try{Zi.dataTransfer.setData("text/plain","")}catch(Yr){}},yn=function(Zi){Zi.preventDefault(),Zi.stopPropagation(),on.onNodeDragEnter(Zi,bt)},Kn=function(Zi){Zi.preventDefault(),Zi.stopPropagation(),on.onNodeDragOver(Zi,bt)},Sn=function(Zi){Zi.stopPropagation(),on.onNodeDragLeave(Zi,bt)},ui=function(Zi){Zi.stopPropagation(),Mt(!1),on.onNodeDragEnd(Zi,bt)},ci=function(Zi){Zi.preventDefault(),Zi.stopPropagation(),Mt(!1),on.onNodeDrop(Zi,bt)},mi=function(Zi){Pn||on.onNodeExpand(Zi,(0,It.F)(bt))},Mi=Ht.useMemo(function(){var Gi=(0,be.Z)(on.keyEntities,Zt)||{},Zi=Gi.children;return!!(Zi||[]).length},[on.keyEntities,Zt]),yr=Ht.useMemo(function(){return En===!1?!1:En||!on.loadData&&!Mi||on.loadData&&bt.loaded&&!Mi},[En,on.loadData,Mi,bt.loaded]);Ht.useEffect(function(){Pn||typeof on.loadData=="function"&&ni&&!yr&&!bt.loaded&&on.onNodeLoad((0,It.F)(bt))},[Pn,on.loadData,on.onNodeLoad,ni,yr,bt]);var ki=Ht.useMemo(function(){var Gi;return(Gi=on.draggable)!==null&&Gi!==void 0&&Gi.icon?Ht.createElement("span",{className:"".concat(on.prefixCls,"-draggable-icon")},on.draggable.icon):null},[on.draggable]),Ri=function(Zi){var Yr=bt.switcherIcon||on.switcherIcon;return typeof Yr=="function"?Yr((0,Ae.Z)((0,Ae.Z)({},bt),{},{isLeaf:Zi})):Yr},Vi=function(){if(yr){var Zi=Ri(!0);return Zi!==!1?Ht.createElement("span",{className:ue()("".concat(on.prefixCls,"-switcher"),"".concat(on.prefixCls,"-switcher-noop"))},Zi):null}var Yr=Ri(!1);return Yr!==!1?Ht.createElement("span",{onClick:mi,className:ue()("".concat(on.prefixCls,"-switcher"),"".concat(on.prefixCls,"-switcher_").concat(ni?et:At))},Yr):null},Or=Ht.useMemo(function(){if(!vt)return null;var Gi=typeof vt!="boolean"?vt:null;return Ht.createElement("span",{className:ue()("".concat(on.prefixCls,"-checkbox"),(0,te.Z)((0,te.Z)((0,te.Z)({},"".concat(on.prefixCls,"-checkbox-checked"),Ee),"".concat(on.prefixCls,"-checkbox-indeterminate"),!Ee&&ie),"".concat(on.prefixCls,"-checkbox-disabled"),mt||bt.disableCheckbox)),onClick:Bt,role:"checkbox","aria-checked":ie?"mixed":Ee,"aria-disabled":mt||bt.disableCheckbox,"aria-label":"Select ".concat(typeof bt.title=="string"?bt.title:"tree node")},Gi)},[vt,Ee,ie,mt,bt.disableCheckbox,bt.title]),qi=Ht.useMemo(function(){return yr?null:ni?et:At},[yr,ni]),Cr=Ht.useMemo(function(){return Ht.createElement("span",{className:ue()("".concat(on.prefixCls,"-iconEle"),"".concat(on.prefixCls,"-icon__").concat(qi||"docu"),(0,te.Z)({},"".concat(on.prefixCls,"-icon_loading"),Pn))})},[on.prefixCls,qi,Pn]),xr=Ht.useMemo(function(){var Gi=!!on.draggable,Zi=!bt.disabled&&Gi&&on.dragOverNodeKey===Zt;return Zi?on.dropIndicatorRender({dropPosition:on.dropPosition,dropLevelOffset:on.dropLevelOffset,indent:on.indent,prefixCls:on.prefixCls,direction:on.direction}):null},[on.dropPosition,on.dropLevelOffset,on.indent,on.prefixCls,on.direction,on.draggable,on.dragOverNodeKey,on.dropIndicatorRender]),Wr=Ht.useMemo(function(){var Gi=bt.title,Zi=Gi===void 0?at:Gi,Yr="".concat(on.prefixCls,"-node-content-wrapper"),bo;if(on.showIcon){var ko=bt.icon||on.icon;bo=ko?Ht.createElement("span",{className:ue()("".concat(on.prefixCls,"-iconEle"),"".concat(on.prefixCls,"-icon__customize"))},typeof ko=="function"?ko(bt):ko):Cr}else on.loadData&&Pn&&(bo=Cr);var $o;return typeof Zi=="function"?$o=Zi(un):on.titleRender?$o=on.titleRender(un):$o=Zi,Ht.createElement("span",{ref:Le,title:typeof Zi=="string"?Zi:"",className:ue()(Yr,"".concat(Yr,"-").concat(qi||"normal"),(0,te.Z)({},"".concat(on.prefixCls,"-node-selected"),!mt&&(In||jt))),onMouseEnter:Ye,onMouseLeave:Fe,onContextMenu:Te,onClick:Me,onDoubleClick:ye},bo,Ht.createElement("span",{className:"".concat(on.prefixCls,"-title")},$o),xr)},[on.prefixCls,on.showIcon,bt,on.icon,Cr,on.titleRender,un,qi,Ye,Fe,Te,Me,ye]),$i=(0,ce.Z)(Oi,{aria:!0,data:!0}),eo=(0,be.Z)(on.keyEntities,Zt)||{},fo=eo.level,Zr=bn[bn.length-1],Fr=!mt&&Oe,ro=on.draggingNodeKey===Zt,Tt=si!==void 0?{"aria-selected":!!si}:void 0;return Ht.createElement("div",(0,Pt.Z)({ref:pi,role:"treeitem","aria-expanded":En?void 0:ni,className:ue()($t,"".concat(on.prefixCls,"-treenode"),(Wt={},(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)(Wt,"".concat(on.prefixCls,"-treenode-disabled"),mt),"".concat(on.prefixCls,"-treenode-switcher-").concat(ni?"open":"close"),!En),"".concat(on.prefixCls,"-treenode-checkbox-checked"),Ee),"".concat(on.prefixCls,"-treenode-checkbox-indeterminate"),ie),"".concat(on.prefixCls,"-treenode-selected"),In),"".concat(on.prefixCls,"-treenode-loading"),Pn),"".concat(on.prefixCls,"-treenode-active"),Wn),"".concat(on.prefixCls,"-treenode-leaf-last"),Zr),"".concat(on.prefixCls,"-treenode-draggable"),Oe),"dragging",ro),(0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)(Wt,"drop-target",on.dropTargetKey===Zt),"drop-container",on.dropContainerKey===Zt),"drag-over",!mt&&ge),"drag-over-gap-top",!mt&&nn),"drag-over-gap-bottom",!mt&&qe),"filter-node",(Ot=on.filterTreeNode)===null||Ot===void 0?void 0:Ot.call(on,(0,It.F)(bt))),"".concat(on.prefixCls,"-treenode-leaf"),yr))),style:Ce,draggable:Fr,onDragStart:Fr?$e:void 0,onDragEnter:Oe?yn:void 0,onDragOver:Oe?Kn:void 0,onDragLeave:Oe?Sn:void 0,onDrop:Oe?ci:void 0,onDragEnd:Oe?ui:void 0,onMouseMove:Zn},Tt,$i),Ht.createElement(Jt,{prefixCls:on.prefixCls,level:fo,isStart:Tn,isEnd:bn}),ki,Vi(),Or,Wr)};ct.isTreeNode=1;var pt=ct},30699:function(Cn,We,Qt){"use strict";Qt.d(We,{k:function(){return te},y:function(){return Ae}});var Pt=Qt(59301),te=Pt.createContext(null),Ae=Pt.createContext({})},28390:function(Cn,We,Qt){"use strict";Qt.d(We,{OF:function(){return Zt.Z},y6:function(){return At.y},ZP:function(){return mt}});var Pt=Qt(5016),te=Qt(10928),Ae=Qt(20049),Be=Qt(92393),de=Qt(6487),Ht=Qt(56789),ne=Qt(41281),ue=Qt(7942),ce=Qt(76773),Vt=Qt(18082),De=Qt(92310),Jt=Qt.n(De),be=Qt(10228),It=Qt(26112),nt=Qt(48736),et=Qt(59301),At=Qt(30699),at=function(Lt){var Bt=Lt.dropPosition,_t=Lt.dropLevelOffset,Me=Lt.indent,ye={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Bt){case-1:ye.top=0,ye.left=-_t*Me;break;case 1:ye.bottom=0,ye.left=-_t*Me;break;case 0:ye.bottom=0,ye.left=Me;break}return et.createElement("div",{style:ye})},ct=at;function pt(vt){if(vt==null)throw new TypeError("Cannot destructure "+vt)}var xt=Qt(52456),bt=Qt(5883),Rt=Qt(34280),Ot=Qt(65283),Wt=Qt(77900),Zt=Qt(639);function $t(vt,Lt){var Bt=et.useState(!1),_t=(0,xt.Z)(Bt,2),Me=_t[0],ye=_t[1];(0,Rt.Z)(function(){if(Me)return vt(),function(){Lt()}},[Me]),(0,Rt.Z)(function(){return ye(!0),function(){ye(!1)}},[])}var Ce=$t,ge=Qt(34061),nn=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],qe=et.forwardRef(function(vt,Lt){var Bt=vt.className,_t=vt.style,Me=vt.motion,ye=vt.motionNodes,Ye=vt.motionType,Fe=vt.onMotionStart,Te=vt.onMotionEnd,Oe=vt.active,$e=vt.treeNodeRequiredProps,yn=(0,bt.Z)(vt,nn),Kn=et.useState(!0),Sn=(0,xt.Z)(Kn,2),ui=Sn[0],ci=Sn[1],mi=et.useContext(At.k),Mi=mi.prefixCls,yr=ye&&Ye!=="hide";(0,Rt.Z)(function(){ye&&yr!==ui&&ci(yr)},[ye]);var ki=function(){ye&&Fe()},Ri=et.useRef(!1),Vi=function(){ye&&!Ri.current&&(Ri.current=!0,Te())};Ce(ki,Vi);var Or=function(Cr){yr===Cr&&Vi()};return ye?et.createElement(Wt.default,(0,Pt.Z)({ref:Lt,visible:ui},Me,{motionAppear:Ye==="show",onVisibleChanged:Or}),function(qi,Cr){var xr=qi.className,Wr=qi.style;return et.createElement("div",{ref:Cr,className:Jt()("".concat(Mi,"-treenode-motion"),xr),style:Wr},ye.map(function($i){var eo=Object.assign({},(pt($i.data),$i.data)),fo=$i.title,Zr=$i.key,Fr=$i.isStart,ro=$i.isEnd;delete eo.children;var Tt=(0,ge.H8)(Zr,$e);return et.createElement(Zt.Z,(0,Pt.Z)({},eo,Tt,{title:fo,active:Oe,data:$i.data,key:Zr,isStart:Fr,isEnd:ro}))}))}):et.createElement(Zt.Z,(0,Pt.Z)({domRef:Lt,className:Bt,style:_t},yn,{active:Oe}))}),En=qe;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,_t=Lt.length;if(Math.abs(Bt-_t)!==1)return{add:!1,key:null};function Me(ye,Ye){var Fe=new Map;ye.forEach(function(Oe){Fe.set(Oe,!0)});var Te=Ye.filter(function(Oe){return!Fe.has(Oe)});return Te.length===1?Te[0]:null}return Bt<_t?{add:!0,key:Me(vt,Lt)}:{add:!1,key:Me(Lt,vt)}}function bn(vt,Lt,Bt){var _t=vt.findIndex(function(Fe){return Fe.key===Bt}),Me=vt[_t+1],ye=Lt.findIndex(function(Fe){return Fe.key===Bt});if(Me){var Ye=Lt.findIndex(function(Fe){return Fe.key===Me.key});return Lt.slice(ye+1,Ye)}return Lt.slice(ye+1)}var ni=["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"],In={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Ee=function(){},ie="RC_TREE_MOTION_".concat(Math.random()),Pn={key:ie},pi={key:ie,level:0,index:0,pos:"0",node:Pn,nodes:[Pn]},Wn={parent:null,children:[],pos:pi.pos,data:Pn,title:null,key:ie,isStart:[],isEnd:[]};function un(vt,Lt,Bt,_t){return Lt===!1||!Bt?vt:vt.slice(0,Math.ceil(Bt/_t)+1)}function Zn(vt){var Lt=vt.key,Bt=vt.pos;return(0,ge.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 Oi=et.forwardRef(function(vt,Lt){var Bt=vt.prefixCls,_t=vt.data,Me=vt.selectable,ye=vt.checkable,Ye=vt.expandedKeys,Fe=vt.selectedKeys,Te=vt.checkedKeys,Oe=vt.loadedKeys,$e=vt.loadingKeys,yn=vt.halfCheckedKeys,Kn=vt.keyEntities,Sn=vt.disabled,ui=vt.dragging,ci=vt.dragOverNodeKey,mi=vt.dropPosition,Mi=vt.motion,yr=vt.height,ki=vt.itemHeight,Ri=vt.virtual,Vi=vt.scrollWidth,Or=vt.focusable,qi=vt.activeItem,Cr=vt.focused,xr=vt.tabIndex,Wr=vt.onKeyDown,$i=vt.onFocus,eo=vt.onBlur,fo=vt.onActiveChange,Zr=vt.onListChangeStart,Fr=vt.onListChangeEnd,ro=(0,bt.Z)(vt,ni),Tt=et.useRef(null),Gi=et.useRef(null);et.useImperativeHandle(Lt,function(){return{scrollTo:function(Xe){Tt.current.scrollTo(Xe)},getIndentWidth:function(){return Gi.current.offsetWidth}}});var Zi=et.useState(Ye),Yr=(0,xt.Z)(Zi,2),bo=Yr[0],ko=Yr[1],$o=et.useState(_t),Xi=(0,xt.Z)($o,2),Ni=Xi[0],_e=Xi[1],Re=et.useState(_t),Ue=(0,xt.Z)(Re,2),gi=Ue[0],xe=Ue[1],Hi=et.useState([]),Dn=(0,xt.Z)(Hi,2),Ai=Dn[0],Ve=Dn[1],ze=et.useState(null),ai=(0,xt.Z)(ze,2),he=ai[0],an=ai[1],Yn=et.useRef(_t);Yn.current=_t;function vi(){var li=Yn.current;_e(li),xe(li),Ve([]),an(null),Fr()}(0,Rt.Z)(function(){ko(Ye);var li=Tn(bo,Ye);if(li.key!==null)if(li.add){var Xe=Ni.findIndex(function(Ki){var Ti=Ki.key;return Ti===li.key}),sn=un(bn(Ni,_t,li.key),Ri,yr,ki),wn=Ni.slice();wn.splice(Xe+1,0,Wn),xe(wn),Ve(sn),an("show")}else{var Mn=_t.findIndex(function(Ki){var Ti=Ki.key;return Ti===li.key}),ii=un(bn(_t,Ni,li.key),Ri,yr,ki),_i=_t.slice();_i.splice(Mn+1,0,Wn),xe(_i),Ve(ii),an("hide")}else Ni!==_t&&(_e(_t),xe(_t))},[Ye,_t]),et.useEffect(function(){ui||vi()},[ui]);var ln=Mi?gi:_t,qn={expandedKeys:Ye,selectedKeys:Fe,loadedKeys:Oe,loadingKeys:$e,checkedKeys:Te,halfCheckedKeys:yn,dragOverNodeKey:ci,dropPosition:mi,keyEntities:Kn};return et.createElement(et.Fragment,null,Cr&&qi&&et.createElement("span",{style:In,"aria-live":"assertive"},si(qi)),et.createElement("div",null,et.createElement("input",{style:In,disabled:Or===!1||Sn,tabIndex:Or!==!1?xr:null,onKeyDown:Wr,onFocus:$i,onBlur:eo,value:"",onChange:Ee,"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:Gi,className:"".concat(Bt,"-indent-unit")}))),et.createElement(Ot.Z,(0,Pt.Z)({},ro,{data:ln,itemKey:Zn,height:yr,fullHeight:!1,virtual:Ri,itemHeight:ki,scrollWidth:Vi,prefixCls:"".concat(Bt,"-list"),ref:Tt,role:"tree",onVisibleChange:function(Xe){Xe.every(function(sn){return Zn(sn)!==ie})&&vi()}}),function(li){var Xe=li.pos,sn=Object.assign({},(pt(li.data),li.data)),wn=li.title,Mn=li.key,ii=li.isStart,_i=li.isEnd,Ki=(0,ge.km)(Mn,Xe);delete sn.key,delete sn.children;var Ti=(0,ge.H8)(Ki,qn);return et.createElement(En,(0,Pt.Z)({},sn,Ti,{title:wn,active:!!qi&&Mn===qi.key,pos:Xe,data:li.data,isStart:ii,isEnd:_i,motion:Mi,motionNodes:Mn===ie?Ai:null,motionType:he,onMotionStart:Zr,onMotionEnd:vi,treeNodeRequiredProps:qn,onMouseMove:function(){fo(null)}}))}))}),on=Oi,ri=Qt(82661),Le=Qt(34643),fi=Qt(65065),Pi=10,jt=function(vt){(0,ue.Z)(Bt,vt);var Lt=(0,ce.Z)(Bt);function Bt(){var _t;(0,de.Z)(this,Bt);for(var Me=arguments.length,ye=new Array(Me),Ye=0;Ye<Me;Ye++)ye[Ye]=arguments[Ye];return _t=Lt.call.apply(Lt,[this].concat(ye)),(0,Vt.Z)((0,ne.Z)(_t),"destroyed",!1),(0,Vt.Z)((0,ne.Z)(_t),"delayedDragEnterLogic",void 0),(0,Vt.Z)((0,ne.Z)(_t),"loadingRetryTimes",{}),(0,Vt.Z)((0,ne.Z)(_t),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,ge.w$)()}),(0,Vt.Z)((0,ne.Z)(_t),"dragStartMousePosition",null),(0,Vt.Z)((0,ne.Z)(_t),"dragNodeProps",null),(0,Vt.Z)((0,ne.Z)(_t),"currentMouseOverDroppableNodeKey",null),(0,Vt.Z)((0,ne.Z)(_t),"listRef",et.createRef()),(0,Vt.Z)((0,ne.Z)(_t),"onNodeDragStart",function(Fe,Te){var Oe=_t.state,$e=Oe.expandedKeys,yn=Oe.keyEntities,Kn=_t.props.onDragStart,Sn=Te.eventKey;_t.dragNodeProps=Te,_t.dragStartMousePosition={x:Fe.clientX,y:Fe.clientY};var ui=(0,ri._5)($e,Sn);_t.setState({draggingNodeKey:Sn,dragChildrenKeys:(0,ri.wA)(Sn,yn),indent:_t.listRef.current.getIndentWidth()}),_t.setExpandedKeys(ui),window.addEventListener("dragend",_t.onWindowDragEnd),Kn==null||Kn({event:Fe,node:(0,ge.F)(Te)})}),(0,Vt.Z)((0,ne.Z)(_t),"onNodeDragEnter",function(Fe,Te){var Oe=_t.state,$e=Oe.expandedKeys,yn=Oe.keyEntities,Kn=Oe.dragChildrenKeys,Sn=Oe.flattenNodes,ui=Oe.indent,ci=_t.props,mi=ci.onDragEnter,Mi=ci.onExpand,yr=ci.allowDrop,ki=ci.direction,Ri=Te.pos,Vi=Te.eventKey;if(_t.currentMouseOverDroppableNodeKey!==Vi&&(_t.currentMouseOverDroppableNodeKey=Vi),!_t.dragNodeProps){_t.resetDragState();return}var Or=(0,ri.OM)(Fe,_t.dragNodeProps,Te,ui,_t.dragStartMousePosition,yr,Sn,yn,$e,ki),qi=Or.dropPosition,Cr=Or.dropLevelOffset,xr=Or.dropTargetKey,Wr=Or.dropContainerKey,$i=Or.dropTargetPos,eo=Or.dropAllowed,fo=Or.dragOverNodeKey;if(Kn.includes(xr)||!eo){_t.resetDragState();return}if(_t.delayedDragEnterLogic||(_t.delayedDragEnterLogic={}),Object.keys(_t.delayedDragEnterLogic).forEach(function(Zr){clearTimeout(_t.delayedDragEnterLogic[Zr])}),_t.dragNodeProps.eventKey!==Te.eventKey&&(Fe.persist(),_t.delayedDragEnterLogic[Ri]=window.setTimeout(function(){if(_t.state.draggingNodeKey!==null){var Zr=(0,Be.Z)($e),Fr=(0,fi.Z)(yn,Te.eventKey);Fr&&(Fr.children||[]).length&&(Zr=(0,ri.L0)($e,Te.eventKey)),_t.props.hasOwnProperty("expandedKeys")||_t.setExpandedKeys(Zr),Mi==null||Mi(Zr,{node:(0,ge.F)(Te),expanded:!0,nativeEvent:Fe.nativeEvent})}},800)),_t.dragNodeProps.eventKey===xr&&Cr===0){_t.resetDragState();return}_t.setState({dragOverNodeKey:fo,dropPosition:qi,dropLevelOffset:Cr,dropTargetKey:xr,dropContainerKey:Wr,dropTargetPos:$i,dropAllowed:eo}),mi==null||mi({event:Fe,node:(0,ge.F)(Te),expandedKeys:$e})}),(0,Vt.Z)((0,ne.Z)(_t),"onNodeDragOver",function(Fe,Te){var Oe=_t.state,$e=Oe.dragChildrenKeys,yn=Oe.flattenNodes,Kn=Oe.keyEntities,Sn=Oe.expandedKeys,ui=Oe.indent,ci=_t.props,mi=ci.onDragOver,Mi=ci.allowDrop,yr=ci.direction;if(_t.dragNodeProps){var ki=(0,ri.OM)(Fe,_t.dragNodeProps,Te,ui,_t.dragStartMousePosition,Mi,yn,Kn,Sn,yr),Ri=ki.dropPosition,Vi=ki.dropLevelOffset,Or=ki.dropTargetKey,qi=ki.dropContainerKey,Cr=ki.dropTargetPos,xr=ki.dropAllowed,Wr=ki.dragOverNodeKey;$e.includes(Or)||!xr||(_t.dragNodeProps.eventKey===Or&&Vi===0?_t.state.dropPosition===null&&_t.state.dropLevelOffset===null&&_t.state.dropTargetKey===null&&_t.state.dropContainerKey===null&&_t.state.dropTargetPos===null&&_t.state.dropAllowed===!1&&_t.state.dragOverNodeKey===null||_t.resetDragState():Ri===_t.state.dropPosition&&Vi===_t.state.dropLevelOffset&&Or===_t.state.dropTargetKey&&qi===_t.state.dropContainerKey&&Cr===_t.state.dropTargetPos&&xr===_t.state.dropAllowed&&Wr===_t.state.dragOverNodeKey||_t.setState({dropPosition:Ri,dropLevelOffset:Vi,dropTargetKey:Or,dropContainerKey:qi,dropTargetPos:Cr,dropAllowed:xr,dragOverNodeKey:Wr}),mi==null||mi({event:Fe,node:(0,ge.F)(Te)}))}}),(0,Vt.Z)((0,ne.Z)(_t),"onNodeDragLeave",function(Fe,Te){_t.currentMouseOverDroppableNodeKey===Te.eventKey&&!Fe.currentTarget.contains(Fe.relatedTarget)&&(_t.resetDragState(),_t.currentMouseOverDroppableNodeKey=null);var Oe=_t.props.onDragLeave;Oe==null||Oe({event:Fe,node:(0,ge.F)(Te)})}),(0,Vt.Z)((0,ne.Z)(_t),"onWindowDragEnd",function(Fe){_t.onNodeDragEnd(Fe,null,!0),window.removeEventListener("dragend",_t.onWindowDragEnd)}),(0,Vt.Z)((0,ne.Z)(_t),"onNodeDragEnd",function(Fe,Te){var Oe=_t.props.onDragEnd;_t.setState({dragOverNodeKey:null}),_t.cleanDragState(),Oe==null||Oe({event:Fe,node:(0,ge.F)(Te)}),_t.dragNodeProps=null,window.removeEventListener("dragend",_t.onWindowDragEnd)}),(0,Vt.Z)((0,ne.Z)(_t),"onNodeDrop",function(Fe,Te){var Oe,$e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,yn=_t.state,Kn=yn.dragChildrenKeys,Sn=yn.dropPosition,ui=yn.dropTargetKey,ci=yn.dropTargetPos,mi=yn.dropAllowed;if(mi){var Mi=_t.props.onDrop;if(_t.setState({dragOverNodeKey:null}),_t.cleanDragState(),ui!==null){var yr=(0,Ae.Z)((0,Ae.Z)({},(0,ge.H8)(ui,_t.getTreeNodeRequiredProps())),{},{active:((Oe=_t.getActiveItem())===null||Oe===void 0?void 0:Oe.key)===ui,data:(0,fi.Z)(_t.state.keyEntities,ui).node}),ki=Kn.includes(ui);(0,nt.ZP)(!ki,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Ri=(0,ri.yx)(ci),Vi={event:Fe,node:(0,ge.F)(yr),dragNode:_t.dragNodeProps?(0,ge.F)(_t.dragNodeProps):null,dragNodesKeys:[_t.dragNodeProps.eventKey].concat(Kn),dropToGap:Sn!==0,dropPosition:Sn+Number(Ri[Ri.length-1])};$e||Mi==null||Mi(Vi),_t.dragNodeProps=null}}}),(0,Vt.Z)((0,ne.Z)(_t),"cleanDragState",function(){var Fe=_t.state.draggingNodeKey;Fe!==null&&_t.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),_t.dragStartMousePosition=null,_t.currentMouseOverDroppableNodeKey=null}),(0,Vt.Z)((0,ne.Z)(_t),"triggerExpandActionExpand",function(Fe,Te){var Oe=_t.state,$e=Oe.expandedKeys,yn=Oe.flattenNodes,Kn=Te.expanded,Sn=Te.key,ui=Te.isLeaf;if(!(ui||Fe.shiftKey||Fe.metaKey||Fe.ctrlKey)){var ci=yn.filter(function(Mi){return Mi.key===Sn})[0],mi=(0,ge.F)((0,Ae.Z)((0,Ae.Z)({},(0,ge.H8)(Sn,_t.getTreeNodeRequiredProps())),{},{data:ci.data}));_t.setExpandedKeys(Kn?(0,ri._5)($e,Sn):(0,ri.L0)($e,Sn)),_t.onNodeExpand(Fe,mi)}}),(0,Vt.Z)((0,ne.Z)(_t),"onNodeClick",function(Fe,Te){var Oe=_t.props,$e=Oe.onClick,yn=Oe.expandAction;yn==="click"&&_t.triggerExpandActionExpand(Fe,Te),$e==null||$e(Fe,Te)}),(0,Vt.Z)((0,ne.Z)(_t),"onNodeDoubleClick",function(Fe,Te){var Oe=_t.props,$e=Oe.onDoubleClick,yn=Oe.expandAction;yn==="doubleClick"&&_t.triggerExpandActionExpand(Fe,Te),$e==null||$e(Fe,Te)}),(0,Vt.Z)((0,ne.Z)(_t),"onNodeSelect",function(Fe,Te){var Oe=_t.state.selectedKeys,$e=_t.state,yn=$e.keyEntities,Kn=$e.fieldNames,Sn=_t.props,ui=Sn.onSelect,ci=Sn.multiple,mi=Te.selected,Mi=Te[Kn.key],yr=!mi;yr?ci?Oe=(0,ri.L0)(Oe,Mi):Oe=[Mi]:Oe=(0,ri._5)(Oe,Mi);var ki=Oe.map(function(Ri){var Vi=(0,fi.Z)(yn,Ri);return Vi?Vi.node:null}).filter(Boolean);_t.setUncontrolledState({selectedKeys:Oe}),ui==null||ui(Oe,{event:"select",selected:yr,node:Te,selectedNodes:ki,nativeEvent:Fe.nativeEvent})}),(0,Vt.Z)((0,ne.Z)(_t),"onNodeCheck",function(Fe,Te,Oe){var $e=_t.state,yn=$e.keyEntities,Kn=$e.checkedKeys,Sn=$e.halfCheckedKeys,ui=_t.props,ci=ui.checkStrictly,mi=ui.onCheck,Mi=Te.key,yr,ki={event:"check",node:Te,checked:Oe,nativeEvent:Fe.nativeEvent};if(ci){var Ri=Oe?(0,ri.L0)(Kn,Mi):(0,ri._5)(Kn,Mi),Vi=(0,ri._5)(Sn,Mi);yr={checked:Ri,halfChecked:Vi},ki.checkedNodes=Ri.map(function($i){return(0,fi.Z)(yn,$i)}).filter(Boolean).map(function($i){return $i.node}),_t.setUncontrolledState({checkedKeys:Ri})}else{var Or=(0,Le.S)([].concat((0,Be.Z)(Kn),[Mi]),!0,yn),qi=Or.checkedKeys,Cr=Or.halfCheckedKeys;if(!Oe){var xr=new Set(qi);xr.delete(Mi);var Wr=(0,Le.S)(Array.from(xr),{checked:!1,halfCheckedKeys:Cr},yn);qi=Wr.checkedKeys,Cr=Wr.halfCheckedKeys}yr=qi,ki.checkedNodes=[],ki.checkedNodesPositions=[],ki.halfCheckedKeys=Cr,qi.forEach(function($i){var eo=(0,fi.Z)(yn,$i);if(eo){var fo=eo.node,Zr=eo.pos;ki.checkedNodes.push(fo),ki.checkedNodesPositions.push({node:fo,pos:Zr})}}),_t.setUncontrolledState({checkedKeys:qi},!1,{halfCheckedKeys:Cr})}mi==null||mi(yr,ki)}),(0,Vt.Z)((0,ne.Z)(_t),"onNodeLoad",function(Fe){var Te,Oe=Fe.key,$e=_t.state.keyEntities,yn=(0,fi.Z)($e,Oe);if(!(yn!=null&&(Te=yn.children)!==null&&Te!==void 0&&Te.length)){var Kn=new Promise(function(Sn,ui){_t.setState(function(ci){var mi=ci.loadedKeys,Mi=mi===void 0?[]:mi,yr=ci.loadingKeys,ki=yr===void 0?[]:yr,Ri=_t.props,Vi=Ri.loadData,Or=Ri.onLoad;if(!Vi||Mi.includes(Oe)||ki.includes(Oe))return null;var qi=Vi(Fe);return qi.then(function(){var Cr=_t.state.loadedKeys,xr=(0,ri.L0)(Cr,Oe);Or==null||Or(xr,{event:"load",node:Fe}),_t.setUncontrolledState({loadedKeys:xr}),_t.setState(function(Wr){return{loadingKeys:(0,ri._5)(Wr.loadingKeys,Oe)}}),Sn()}).catch(function(Cr){if(_t.setState(function(Wr){return{loadingKeys:(0,ri._5)(Wr.loadingKeys,Oe)}}),_t.loadingRetryTimes[Oe]=(_t.loadingRetryTimes[Oe]||0)+1,_t.loadingRetryTimes[Oe]>=Pi){var xr=_t.state.loadedKeys;(0,nt.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),_t.setUncontrolledState({loadedKeys:(0,ri.L0)(xr,Oe)}),Sn()}ui(Cr)}),{loadingKeys:(0,ri.L0)(ki,Oe)}})});return Kn.catch(function(){}),Kn}}),(0,Vt.Z)((0,ne.Z)(_t),"onNodeMouseEnter",function(Fe,Te){var Oe=_t.props.onMouseEnter;Oe==null||Oe({event:Fe,node:Te})}),(0,Vt.Z)((0,ne.Z)(_t),"onNodeMouseLeave",function(Fe,Te){var Oe=_t.props.onMouseLeave;Oe==null||Oe({event:Fe,node:Te})}),(0,Vt.Z)((0,ne.Z)(_t),"onNodeContextMenu",function(Fe,Te){var Oe=_t.props.onRightClick;Oe&&(Fe.preventDefault(),Oe({event:Fe,node:Te}))}),(0,Vt.Z)((0,ne.Z)(_t),"onFocus",function(){var Fe=_t.props.onFocus;_t.setState({focused:!0});for(var Te=arguments.length,Oe=new Array(Te),$e=0;$e<Te;$e++)Oe[$e]=arguments[$e];Fe==null||Fe.apply(void 0,Oe)}),(0,Vt.Z)((0,ne.Z)(_t),"onBlur",function(){var Fe=_t.props.onBlur;_t.setState({focused:!1}),_t.onActiveChange(null);for(var Te=arguments.length,Oe=new Array(Te),$e=0;$e<Te;$e++)Oe[$e]=arguments[$e];Fe==null||Fe.apply(void 0,Oe)}),(0,Vt.Z)((0,ne.Z)(_t),"getTreeNodeRequiredProps",function(){var Fe=_t.state,Te=Fe.expandedKeys,Oe=Fe.selectedKeys,$e=Fe.loadedKeys,yn=Fe.loadingKeys,Kn=Fe.checkedKeys,Sn=Fe.halfCheckedKeys,ui=Fe.dragOverNodeKey,ci=Fe.dropPosition,mi=Fe.keyEntities;return{expandedKeys:Te||[],selectedKeys:Oe||[],loadedKeys:$e||[],loadingKeys:yn||[],checkedKeys:Kn||[],halfCheckedKeys:Sn||[],dragOverNodeKey:ui,dropPosition:ci,keyEntities:mi}}),(0,Vt.Z)((0,ne.Z)(_t),"setExpandedKeys",function(Fe){var Te=_t.state,Oe=Te.treeData,$e=Te.fieldNames,yn=(0,ge.oH)(Oe,Fe,$e);_t.setUncontrolledState({expandedKeys:Fe,flattenNodes:yn},!0)}),(0,Vt.Z)((0,ne.Z)(_t),"onNodeExpand",function(Fe,Te){var Oe=_t.state.expandedKeys,$e=_t.state,yn=$e.listChanging,Kn=$e.fieldNames,Sn=_t.props,ui=Sn.onExpand,ci=Sn.loadData,mi=Te.expanded,Mi=Te[Kn.key];if(!yn){var yr=Oe.includes(Mi),ki=!mi;if((0,nt.ZP)(mi&&yr||!mi&&!yr,"Expand state not sync with index check"),Oe=ki?(0,ri.L0)(Oe,Mi):(0,ri._5)(Oe,Mi),_t.setExpandedKeys(Oe),ui==null||ui(Oe,{node:Te,expanded:ki,nativeEvent:Fe.nativeEvent}),ki&&ci){var Ri=_t.onNodeLoad(Te);Ri&&Ri.then(function(){var Vi=(0,ge.oH)(_t.state.treeData,Oe,Kn);_t.setUncontrolledState({flattenNodes:Vi})}).catch(function(){var Vi=_t.state.expandedKeys,Or=(0,ri._5)(Vi,Mi);_t.setExpandedKeys(Or)})}}}),(0,Vt.Z)((0,ne.Z)(_t),"onListChangeStart",function(){_t.setUncontrolledState({listChanging:!0})}),(0,Vt.Z)((0,ne.Z)(_t),"onListChangeEnd",function(){setTimeout(function(){_t.setUncontrolledState({listChanging:!1})})}),(0,Vt.Z)((0,ne.Z)(_t),"onActiveChange",function(Fe){var Te=_t.state.activeKey,Oe=_t.props,$e=Oe.onActiveChange,yn=Oe.itemScrollOffset,Kn=yn===void 0?0:yn;Te!==Fe&&(_t.setState({activeKey:Fe}),Fe!==null&&_t.scrollTo({key:Fe,offset:Kn}),$e==null||$e(Fe))}),(0,Vt.Z)((0,ne.Z)(_t),"getActiveItem",function(){var Fe=_t.state,Te=Fe.activeKey,Oe=Fe.flattenNodes;return Te===null?null:Oe.find(function($e){var yn=$e.key;return yn===Te})||null}),(0,Vt.Z)((0,ne.Z)(_t),"offsetActiveKey",function(Fe){var Te=_t.state,Oe=Te.flattenNodes,$e=Te.activeKey,yn=Oe.findIndex(function(ui){var ci=ui.key;return ci===$e});yn===-1&&Fe<0&&(yn=Oe.length),yn=(yn+Fe+Oe.length)%Oe.length;var Kn=Oe[yn];if(Kn){var Sn=Kn.key;_t.onActiveChange(Sn)}else _t.onActiveChange(null)}),(0,Vt.Z)((0,ne.Z)(_t),"onKeyDown",function(Fe){var Te=_t.state,Oe=Te.activeKey,$e=Te.expandedKeys,yn=Te.checkedKeys,Kn=Te.fieldNames,Sn=_t.props,ui=Sn.onKeyDown,ci=Sn.checkable,mi=Sn.selectable;switch(Fe.which){case be.Z.UP:{_t.offsetActiveKey(-1),Fe.preventDefault();break}case be.Z.DOWN:{_t.offsetActiveKey(1),Fe.preventDefault();break}}var Mi=_t.getActiveItem();if(Mi&&Mi.data){var yr=_t.getTreeNodeRequiredProps(),ki=Mi.data.isLeaf===!1||!!(Mi.data[Kn.children]||[]).length,Ri=(0,ge.F)((0,Ae.Z)((0,Ae.Z)({},(0,ge.H8)(Oe,yr)),{},{data:Mi.data,active:!0}));switch(Fe.which){case be.Z.LEFT:{ki&&$e.includes(Oe)?_t.onNodeExpand({},Ri):Mi.parent&&_t.onActiveChange(Mi.parent.key),Fe.preventDefault();break}case be.Z.RIGHT:{ki&&!$e.includes(Oe)?_t.onNodeExpand({},Ri):Mi.children&&Mi.children.length&&_t.onActiveChange(Mi.children[0].key),Fe.preventDefault();break}case be.Z.ENTER:case be.Z.SPACE:{ci&&!Ri.disabled&&Ri.checkable!==!1&&!Ri.disableCheckbox?_t.onNodeCheck({},Ri,!yn.includes(Oe)):!ci&&mi&&!Ri.disabled&&Ri.selectable!==!1&&_t.onNodeSelect({},Ri);break}}}ui==null||ui(Fe)}),(0,Vt.Z)((0,ne.Z)(_t),"setUncontrolledState",function(Fe){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!_t.destroyed){var $e=!1,yn=!0,Kn={};Object.keys(Fe).forEach(function(Sn){if(_t.props.hasOwnProperty(Sn)){yn=!1;return}$e=!0,Kn[Sn]=Fe[Sn]}),$e&&(!Te||yn)&&_t.setState((0,Ae.Z)((0,Ae.Z)({},Kn),Oe))}}),(0,Vt.Z)((0,ne.Z)(_t),"scrollTo",function(Fe){_t.listRef.current.scrollTo(Fe)}),_t}return(0,Ht.Z)(Bt,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Me=this.props,ye=Me.activeKey,Ye=Me.itemScrollOffset,Fe=Ye===void 0?0:Ye;ye!==void 0&&ye!==this.state.activeKey&&(this.setState({activeKey:ye}),ye!==null&&this.scrollTo({key:ye,offset:Fe}))}},{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 Me=this.state,ye=Me.focused,Ye=Me.flattenNodes,Fe=Me.keyEntities,Te=Me.draggingNodeKey,Oe=Me.activeKey,$e=Me.dropLevelOffset,yn=Me.dropContainerKey,Kn=Me.dropTargetKey,Sn=Me.dropPosition,ui=Me.dragOverNodeKey,ci=Me.indent,mi=this.props,Mi=mi.prefixCls,yr=mi.className,ki=mi.style,Ri=mi.showLine,Vi=mi.focusable,Or=mi.tabIndex,qi=Or===void 0?0:Or,Cr=mi.selectable,xr=mi.showIcon,Wr=mi.icon,$i=mi.switcherIcon,eo=mi.draggable,fo=mi.checkable,Zr=mi.checkStrictly,Fr=mi.disabled,ro=mi.motion,Tt=mi.loadData,Gi=mi.filterTreeNode,Zi=mi.height,Yr=mi.itemHeight,bo=mi.scrollWidth,ko=mi.virtual,$o=mi.titleRender,Xi=mi.dropIndicatorRender,Ni=mi.onContextMenu,_e=mi.onScroll,Re=mi.direction,Ue=mi.rootClassName,gi=mi.rootStyle,xe=(0,It.Z)(this.props,{aria:!0,data:!0}),Hi;eo&&((0,te.Z)(eo)==="object"?Hi=eo:typeof eo=="function"?Hi={nodeDraggable:eo}:Hi={});var Dn={prefixCls:Mi,selectable:Cr,showIcon:xr,icon:Wr,switcherIcon:$i,draggable:Hi,draggingNodeKey:Te,checkable:fo,checkStrictly:Zr,disabled:Fr,keyEntities:Fe,dropLevelOffset:$e,dropContainerKey:yn,dropTargetKey:Kn,dropPosition:Sn,dragOverNodeKey:ui,indent:ci,direction:Re,dropIndicatorRender:Xi,loadData:Tt,filterTreeNode:Gi,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:Dn},et.createElement("div",{className:Jt()(Mi,yr,Ue,(0,Vt.Z)((0,Vt.Z)((0,Vt.Z)({},"".concat(Mi,"-show-line"),Ri),"".concat(Mi,"-focused"),ye),"".concat(Mi,"-active-focused"),Oe!==null)),style:gi},et.createElement(on,(0,Pt.Z)({ref:this.listRef,prefixCls:Mi,style:ki,data:Ye,disabled:Fr,selectable:Cr,checkable:!!fo,motion:ro,dragging:Te!==null,height:Zi,itemHeight:Yr,virtual:ko,focusable:Vi,focused:ye,tabIndex:qi,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Ni,onScroll:_e,scrollWidth:bo},this.getTreeNodeRequiredProps(),xe))))}}],[{key:"getDerivedStateFromProps",value:function(Me,ye){var Ye=ye.prevProps,Fe={prevProps:Me};function Te(qi){return!Ye&&Me.hasOwnProperty(qi)||Ye&&Ye[qi]!==Me[qi]}var Oe,$e=ye.fieldNames;if(Te("fieldNames")&&($e=(0,ge.w$)(Me.fieldNames),Fe.fieldNames=$e),Te("treeData")?Oe=Me.treeData:Te("children")&&((0,nt.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Oe=(0,ge.zn)(Me.children)),Oe){Fe.treeData=Oe;var yn=(0,ge.I8)(Oe,{fieldNames:$e});Fe.keyEntities=(0,Ae.Z)((0,Vt.Z)({},ie,pi),yn.keyEntities)}var Kn=Fe.keyEntities||ye.keyEntities;if(Te("expandedKeys")||Ye&&Te("autoExpandParent"))Fe.expandedKeys=Me.autoExpandParent||!Ye&&Me.defaultExpandParent?(0,ri.r7)(Me.expandedKeys,Kn):Me.expandedKeys;else if(!Ye&&Me.defaultExpandAll){var Sn=(0,Ae.Z)({},Kn);delete Sn[ie];var ui=[];Object.keys(Sn).forEach(function(qi){var Cr=Sn[qi];Cr.children&&Cr.children.length&&ui.push(Cr.key)}),Fe.expandedKeys=ui}else!Ye&&Me.defaultExpandedKeys&&(Fe.expandedKeys=Me.autoExpandParent||Me.defaultExpandParent?(0,ri.r7)(Me.defaultExpandedKeys,Kn):Me.defaultExpandedKeys);if(Fe.expandedKeys||delete Fe.expandedKeys,Oe||Fe.expandedKeys){var ci=(0,ge.oH)(Oe||ye.treeData,Fe.expandedKeys||ye.expandedKeys,$e);Fe.flattenNodes=ci}if(Me.selectable&&(Te("selectedKeys")?Fe.selectedKeys=(0,ri.BT)(Me.selectedKeys,Me):!Ye&&Me.defaultSelectedKeys&&(Fe.selectedKeys=(0,ri.BT)(Me.defaultSelectedKeys,Me))),Me.checkable){var mi;if(Te("checkedKeys")?mi=(0,ri.E6)(Me.checkedKeys)||{}:!Ye&&Me.defaultCheckedKeys?mi=(0,ri.E6)(Me.defaultCheckedKeys)||{}:Oe&&(mi=(0,ri.E6)(Me.checkedKeys)||{checkedKeys:ye.checkedKeys,halfCheckedKeys:ye.halfCheckedKeys}),mi){var Mi=mi,yr=Mi.checkedKeys,ki=yr===void 0?[]:yr,Ri=Mi.halfCheckedKeys,Vi=Ri===void 0?[]:Ri;if(!Me.checkStrictly){var Or=(0,Le.S)(ki,!0,Kn);ki=Or.checkedKeys,Vi=Or.halfCheckedKeys}Fe.checkedKeys=ki,Fe.halfCheckedKeys=Vi}}return Te("loadedKeys")&&(Fe.loadedKeys=Me.loadedKeys),Fe}}]),Bt}(et.Component);(0,Vt.Z)(jt,"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,Vt.Z)(jt,"TreeNode",Zt.Z);var Mt=jt,mt=Mt},82661:function(Cn,We,Qt){"use strict";Qt.d(We,{BT:function(){return et},E6:function(){return ct},L0:function(){return Vt},OM:function(){return nt},_5:function(){return ce},r7:function(){return pt},wA:function(){return Jt},yx:function(){return De}});var Pt=Qt(92393),te=Qt(10928),Ae=Qt(48736),Be=Qt(59301),de=Qt(639),Ht=Qt(65065),ne=Qt(34061),ue=null;function ce(xt,bt){if(!xt)return[];var Rt=xt.slice(),Ot=Rt.indexOf(bt);return Ot>=0&&Rt.splice(Ot,1),Rt}function Vt(xt,bt){var Rt=(xt||[]).slice();return Rt.indexOf(bt)===-1&&Rt.push(bt),Rt}function De(xt){return xt.split("-")}function Jt(xt,bt){var Rt=[],Ot=(0,Ht.Z)(bt,xt);function Wt(){var Zt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Zt.forEach(function($t){var Ce=$t.key,ge=$t.children;Rt.push(Ce),Wt(ge)})}return Wt(Ot.children),Rt}function be(xt){if(xt.parent){var bt=De(xt.pos);return Number(bt[bt.length-1])===xt.parent.children.length-1}return!1}function It(xt){var bt=De(xt.pos);return Number(bt[bt.length-1])===0}function nt(xt,bt,Rt,Ot,Wt,Zt,$t,Ce,ge,nn){var qe,En=xt.clientX,Tn=xt.clientY,bn=xt.target.getBoundingClientRect(),ni=bn.top,In=bn.height,Ee=(nn==="rtl"?-1:1)*(((Wt==null?void 0:Wt.x)||0)-En),ie=(Ee-12)/Ot,Pn=ge.filter(function(mt){var vt;return(vt=Ce[mt])===null||vt===void 0||(vt=vt.children)===null||vt===void 0?void 0:vt.length}),pi=(0,Ht.Z)(Ce,Rt.eventKey);if(Tn<ni+In/2){var Wn=$t.findIndex(function(mt){return mt.key===pi.key}),un=Wn<=0?0:Wn-1,Zn=$t[un].key;pi=(0,Ht.Z)(Ce,Zn)}var si=pi.key,Oi=pi,on=pi.key,ri=0,Le=0;if(!Pn.includes(si))for(var fi=0;fi<ie&&be(pi);fi+=1)pi=pi.parent,Le+=1;var Pi=bt.data,jt=pi.node,Mt=!0;return It(pi)&&pi.level===0&&Tn<ni+In/2&&Zt({dragNode:Pi,dropNode:jt,dropPosition:-1})&&pi.key===Rt.eventKey?ri=-1:(Oi.children||[]).length&&Pn.includes(on)?Zt({dragNode:Pi,dropNode:jt,dropPosition:0})?ri=0:Mt=!1:Le===0?ie>-1.5?Zt({dragNode:Pi,dropNode:jt,dropPosition:1})?ri=1:Mt=!1:Zt({dragNode:Pi,dropNode:jt,dropPosition:0})?ri=0:Zt({dragNode:Pi,dropNode:jt,dropPosition:1})?ri=1:Mt=!1:Zt({dragNode:Pi,dropNode:jt,dropPosition:1})?ri=1:Mt=!1,{dropPosition:ri,dropLevelOffset:Le,dropTargetKey:pi.key,dropTargetPos:pi.pos,dragOverNodeKey:on,dropContainerKey:ri===0?null:((qe=pi.parent)===null||qe===void 0?void 0:qe.key)||null,dropAllowed:Mt}}function et(xt,bt){if(xt){var Rt=bt.multiple;return Rt?xt.slice():xt.length?[xt[0]]:xt}}var At=function(bt){return bt};function at(xt,bt){if(!xt)return[];var Rt=bt||{},Ot=Rt.processProps,Wt=Ot===void 0?At:Ot,Zt=Array.isArray(xt)?xt:[xt];return Zt.map(function($t){var Ce=$t.children,ge=_objectWithoutProperties($t,ue),nn=at(Ce,bt);return React.createElement(TreeNode,_extends({key:ge.key},Wt(ge)),nn)})}function ct(xt){if(!xt)return null;var bt;if(Array.isArray(xt))bt={checkedKeys:xt,halfCheckedKeys:void 0};else if((0,te.Z)(xt)==="object")bt={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 bt}function pt(xt,bt){var Rt=new Set;function Ot(Wt){if(!Rt.has(Wt)){var Zt=(0,Ht.Z)(bt,Wt);if(Zt){Rt.add(Wt);var $t=Zt.parent,Ce=Zt.node;Ce.disabled||$t&&Ot($t.key)}}}return(xt||[]).forEach(function(Wt){Ot(Wt)}),(0,Pt.Z)(Rt)}},34643:function(Cn,We,Qt){"use strict";Qt.d(We,{S:function(){return ne}});var Pt=Qt(48736),te=Qt(65065);function Ae(ue,ce){var Vt=new Set;return ue.forEach(function(De){ce.has(De)||Vt.add(De)}),Vt}function Be(ue){var ce=ue||{},Vt=ce.disabled,De=ce.disableCheckbox,Jt=ce.checkable;return!!(Vt||De)||Jt===!1}function de(ue,ce,Vt,De){for(var Jt=new Set(ue),be=new Set,It=0;It<=Vt;It+=1){var nt=ce.get(It)||new Set;nt.forEach(function(ct){var pt=ct.key,xt=ct.node,bt=ct.children,Rt=bt===void 0?[]:bt;Jt.has(pt)&&!De(xt)&&Rt.filter(function(Ot){return!De(Ot.node)}).forEach(function(Ot){Jt.add(Ot.key)})})}for(var et=new Set,At=Vt;At>=0;At-=1){var at=ce.get(At)||new Set;at.forEach(function(ct){var pt=ct.parent,xt=ct.node;if(!(De(xt)||!ct.parent||et.has(ct.parent.key))){if(De(ct.parent.node)){et.add(pt.key);return}var bt=!0,Rt=!1;(pt.children||[]).filter(function(Ot){return!De(Ot.node)}).forEach(function(Ot){var Wt=Ot.key,Zt=Jt.has(Wt);bt&&!Zt&&(bt=!1),!Rt&&(Zt||be.has(Wt))&&(Rt=!0)}),bt&&Jt.add(pt.key),Rt&&be.add(pt.key),et.add(pt.key)}})}return{checkedKeys:Array.from(Jt),halfCheckedKeys:Array.from(Ae(be,Jt))}}function Ht(ue,ce,Vt,De,Jt){for(var be=new Set(ue),It=new Set(ce),nt=0;nt<=De;nt+=1){var et=Vt.get(nt)||new Set;et.forEach(function(pt){var xt=pt.key,bt=pt.node,Rt=pt.children,Ot=Rt===void 0?[]:Rt;!be.has(xt)&&!It.has(xt)&&!Jt(bt)&&Ot.filter(function(Wt){return!Jt(Wt.node)}).forEach(function(Wt){be.delete(Wt.key)})})}It=new Set;for(var At=new Set,at=De;at>=0;at-=1){var ct=Vt.get(at)||new Set;ct.forEach(function(pt){var xt=pt.parent,bt=pt.node;if(!(Jt(bt)||!pt.parent||At.has(pt.parent.key))){if(Jt(pt.parent.node)){At.add(xt.key);return}var Rt=!0,Ot=!1;(xt.children||[]).filter(function(Wt){return!Jt(Wt.node)}).forEach(function(Wt){var Zt=Wt.key,$t=be.has(Zt);Rt&&!$t&&(Rt=!1),!Ot&&($t||It.has(Zt))&&(Ot=!0)}),Rt||be.delete(xt.key),Ot&&It.add(xt.key),At.add(xt.key)}})}return{checkedKeys:Array.from(be),halfCheckedKeys:Array.from(Ae(It,be))}}function ne(ue,ce,Vt,De){var Jt=[],be;De?be=De:be=Be;var It=new Set(ue.filter(function(at){var ct=!!(0,te.Z)(Vt,at);return ct||Jt.push(at),ct})),nt=new Map,et=0;Object.keys(Vt).forEach(function(at){var ct=Vt[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)(!Jt.length,"Tree missing follow keys: ".concat(Jt.slice(0,100).map(function(at){return"'".concat(at,"'")}).join(", ")));var At;return ce===!0?At=de(It,nt,et,be):At=Ht(It,ce.halfCheckedKeys,nt,et,be),At}},65065:function(Cn,We,Qt){"use strict";Qt.d(We,{Z:function(){return Pt}});function Pt(te,Ae){return te[Ae]}},34061:function(Cn,We,Qt){"use strict";Qt.d(We,{F:function(){return pt},H8:function(){return ct},I8:function(){return at},km:function(){return Jt},oH:function(){return et},w$:function(){return be},zn:function(){return nt}});var Pt=Qt(10928),te=Qt(92393),Ae=Qt(20049),Be=Qt(5883),de=Qt(11592),Ht=Qt(2738),ne=Qt(48736),ue=Qt(65065),ce=["children"];function Vt(xt,bt){return"".concat(xt,"-").concat(bt)}function De(xt){return xt&&xt.type&&xt.type.isTreeNode}function Jt(xt,bt){return xt!=null?xt:bt}function be(xt){var bt=xt||{},Rt=bt.title,Ot=bt._title,Wt=bt.key,Zt=bt.children,$t=Rt||"title";return{title:$t,_title:Ot||[$t],key:Wt||"key",children:Zt||"children"}}function It(xt,bt){var Rt=new Map;function Ot(Wt){var Zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Wt||[]).forEach(function($t){var Ce=$t[bt.key],ge=$t[bt.children];warning(Ce!=null,"Tree node must have a certain key: [".concat(Zt).concat(Ce,"]"));var nn=String(Ce);warning(!Rt.has(nn)||Ce===null||Ce===void 0,"Same 'key' exist in the Tree: ".concat(nn)),Rt.set(nn,!0),Ot(ge,"".concat(Zt).concat(nn," > "))})}Ot(xt)}function nt(xt){function bt(Rt){var Ot=(0,de.Z)(Rt);return Ot.map(function(Wt){if(!De(Wt))return(0,ne.ZP)(!Wt,"Tree/TreeNode can only accept TreeNode as children."),null;var Zt=Wt.key,$t=Wt.props,Ce=$t.children,ge=(0,Be.Z)($t,ce),nn=(0,Ae.Z)({key:Zt},ge),qe=bt(Ce);return qe.length&&(nn.children=qe),nn}).filter(function(Wt){return Wt})}return bt(xt)}function et(xt,bt,Rt){var Ot=be(Rt),Wt=Ot._title,Zt=Ot.key,$t=Ot.children,Ce=new Set(bt===!0?[]:bt),ge=[];function nn(qe){var En=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return qe.map(function(Tn,bn){for(var ni=Vt(En?En.pos:"0",bn),In=Jt(Tn[Zt],ni),Ee,ie=0;ie<Wt.length;ie+=1){var Pn=Wt[ie];if(Tn[Pn]!==void 0){Ee=Tn[Pn];break}}var pi=Object.assign((0,Ht.Z)(Tn,[].concat((0,te.Z)(Wt),[Zt,$t])),{title:Ee,key:In,parent:En,pos:ni,children:null,data:Tn,isStart:[].concat((0,te.Z)(En?En.isStart:[]),[bn===0]),isEnd:[].concat((0,te.Z)(En?En.isEnd:[]),[bn===qe.length-1])});return ge.push(pi),bt===!0||Ce.has(In)?pi.children=nn(Tn[$t]||[],pi):pi.children=[],pi})}return nn(xt),ge}function At(xt,bt,Rt){var Ot={};(0,Pt.Z)(Rt)==="object"?Ot=Rt:Ot={externalGetKey:Rt},Ot=Ot||{};var Wt=Ot,Zt=Wt.childrenPropName,$t=Wt.externalGetKey,Ce=Wt.fieldNames,ge=be(Ce),nn=ge.key,qe=ge.children,En=Zt||qe,Tn;$t?typeof $t=="string"?Tn=function(In){return In[$t]}:typeof $t=="function"&&(Tn=function(In){return $t(In)}):Tn=function(In,Ee){return Jt(In[nn],Ee)};function bn(ni,In,Ee,ie){var Pn=ni?ni[En]:xt,pi=ni?Vt(Ee.pos,In):"0",Wn=ni?[].concat((0,te.Z)(ie),[ni]):[];if(ni){var un=Tn(ni,pi),Zn={node:ni,index:In,pos:pi,key:un,parentPos:Ee.node?Ee.pos:null,level:Ee.level+1,nodes:Wn};bt(Zn)}Pn&&Pn.forEach(function(si,Oi){bn(si,Oi,{node:ni,pos:pi,level:Ee?Ee.level+1:-1},Wn)})}bn(null)}function at(xt){var bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Rt=bt.initWrapper,Ot=bt.processEntity,Wt=bt.onProcessFinished,Zt=bt.externalGetKey,$t=bt.childrenPropName,Ce=bt.fieldNames,ge=arguments.length>2?arguments[2]:void 0,nn=Zt||ge,qe={},En={},Tn={posEntities:qe,keyEntities:En};return Rt&&(Tn=Rt(Tn)||Tn),At(xt,function(bn){var ni=bn.node,In=bn.index,Ee=bn.pos,ie=bn.key,Pn=bn.parentPos,pi=bn.level,Wn=bn.nodes,un={node:ni,nodes:Wn,index:In,key:ie,pos:Ee,level:pi},Zn=Jt(ie,Ee);qe[Ee]=un,En[Zn]=un,un.parent=qe[Pn],un.parent&&(un.parent.children=un.parent.children||[],un.parent.children.push(un)),Ot&&Ot(un,Tn)},{externalGetKey:nn,childrenPropName:$t,fieldNames:Ce}),Wt&&Wt(Tn),Tn}function ct(xt,bt){var Rt=bt.expandedKeys,Ot=bt.selectedKeys,Wt=bt.loadedKeys,Zt=bt.loadingKeys,$t=bt.checkedKeys,Ce=bt.halfCheckedKeys,ge=bt.dragOverNodeKey,nn=bt.dropPosition,qe=bt.keyEntities,En=(0,ue.Z)(qe,xt),Tn={eventKey:xt,expanded:Rt.indexOf(xt)!==-1,selected:Ot.indexOf(xt)!==-1,loaded:Wt.indexOf(xt)!==-1,loading:Zt.indexOf(xt)!==-1,checked:$t.indexOf(xt)!==-1,halfChecked:Ce.indexOf(xt)!==-1,pos:String(En?En.pos:""),dragOver:ge===xt&&nn===0,dragOverGapTop:ge===xt&&nn===-1,dragOverGapBottom:ge===xt&&nn===1};return Tn}function pt(xt){var bt=xt.data,Rt=xt.expanded,Ot=xt.selected,Wt=xt.checked,Zt=xt.loaded,$t=xt.loading,Ce=xt.halfChecked,ge=xt.dragOver,nn=xt.dragOverGapTop,qe=xt.dragOverGapBottom,En=xt.pos,Tn=xt.active,bn=xt.eventKey,ni=(0,Ae.Z)((0,Ae.Z)({},bt),{},{expanded:Rt,selected:Ot,checked:Wt,loaded:Zt,loading:$t,halfChecked:Ce,dragOver:ge,dragOverGapTop:nn,dragOverGapBottom:qe,pos:En,active:Tn,key:bn});return"props"in ni||Object.defineProperty(ni,"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}}),ni}},8224:function(Cn,We,Qt){"use strict";Qt.d(We,{Z:function(){return te}});var Pt=Qt(4676);function te(Ae,Be,de,Ht){var ne=Pt.unstable_batchedUpdates?function(ce){Pt.unstable_batchedUpdates(de,ce)}:de;return Ae!=null&&Ae.addEventListener&&Ae.addEventListener(Be,ne,Ht),{remove:function(){Ae!=null&&Ae.removeEventListener&&Ae.removeEventListener(Be,ne,Ht)}}}},24514:function(Cn,We,Qt){"use strict";Qt.d(We,{G:function(){return Be}});var Pt=Qt(47273),te=function(Ht){if((0,Pt.Z)()&&window.document.documentElement){var ne=Array.isArray(Ht)?Ht:[Ht],ue=window.document.documentElement;return ne.some(function(ce){return ce in ue.style})}return!1},Ae=function(Ht,ne){if(!te(Ht))return!1;var ue=document.createElement("div"),ce=ue.style[Ht];return ue.style[Ht]=ne,ue.style[Ht]!==ce};function Be(de,Ht){return!Array.isArray(de)&&Ht!==void 0?Ae(de,Ht):te(de)}},65283:function(Cn,We,Qt){"use strict";Qt.d(We,{Z:function(){return Pi}});var Pt=Qt(5016),te=Qt(10928),Ae=Qt(20049),Be=Qt(18082),de=Qt(52456),Ht=Qt(5883),ne=Qt(92310),ue=Qt.n(ne),ce=Qt(29301),Vt=Qt(70425),De=Qt(34280),Jt=Qt(59301),be=Qt(4676),It=Jt.forwardRef(function(jt,Mt){var mt=jt.height,vt=jt.offsetY,Lt=jt.offsetX,Bt=jt.children,_t=jt.prefixCls,Me=jt.onInnerResize,ye=jt.innerProps,Ye=jt.rtl,Fe=jt.extra,Te={},Oe={display:"flex",flexDirection:"column"};return vt!==void 0&&(Te={height:mt,position:"relative",overflow:"hidden"},Oe=(0,Ae.Z)((0,Ae.Z)({},Oe),{},(0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)((0,Be.Z)({transform:"translateY(".concat(vt,"px)")},Ye?"marginRight":"marginLeft",-Lt),"position","absolute"),"left",0),"right",0),"top",0))),Jt.createElement("div",{style:Te},Jt.createElement(ce.Z,{onResize:function(yn){var Kn=yn.offsetHeight;Kn&&Me&&Me()}},Jt.createElement("div",(0,Pt.Z)({style:Oe,className:ue()((0,Be.Z)({},"".concat(_t,"-holder-inner"),_t)),ref:Mt},ye),Bt,Fe)))});It.displayName="Filler";var nt=It;function et(jt){var Mt=jt.children,mt=jt.setRef,vt=Jt.useCallback(function(Lt){mt(Lt)},[]);return Jt.cloneElement(Mt,{ref:vt})}function At(jt,Mt,mt,vt,Lt,Bt,_t,Me){var ye=Me.getKey;return jt.slice(Mt,mt+1).map(function(Ye,Fe){var Te=Mt+Fe,Oe=_t(Ye,Te,{style:{width:vt},offsetX:Lt}),$e=ye(Ye);return Jt.createElement(et,{key:$e,setRef:function(Kn){return Bt(Ye,Kn)}},Oe)})}function at(jt,Mt,mt,vt){var Lt=mt-jt,Bt=Mt-mt,_t=Math.min(Lt,Bt)*2;if(vt<=_t){var Me=Math.floor(vt/2);return vt%2?mt+Me+1:mt-Me}return Lt>Bt?mt-(vt-Bt):mt+(vt-Lt)}function ct(jt,Mt,mt){var vt=jt.length,Lt=Mt.length,Bt,_t;if(vt===0&&Lt===0)return null;vt<Lt?(Bt=jt,_t=Mt):(Bt=Mt,_t=jt);var Me={__EMPTY_ITEM__:!0};function ye(yn){return yn!==void 0?mt(yn):Me}for(var Ye=null,Fe=Math.abs(vt-Lt)!==1,Te=0;Te<_t.length;Te+=1){var Oe=ye(Bt[Te]),$e=ye(_t[Te]);if(Oe!==$e){Ye=Te,Fe=Fe||Oe!==ye(_t[Te+1]);break}}return Ye===null?null:{index:Ye,multiple:Fe}}function pt(jt,Mt,mt){var vt=Jt.useState(jt),Lt=(0,de.Z)(vt,2),Bt=Lt[0],_t=Lt[1],Me=Jt.useState(null),ye=(0,de.Z)(Me,2),Ye=ye[0],Fe=ye[1];return Jt.useEffect(function(){var Te=ct(Bt||[],jt||[],Mt);(Te==null?void 0:Te.index)!==void 0&&(mt==null||mt(Te.index),Fe(jt[Te.index])),_t(jt)},[jt]),[Ye]}var xt=Qt(16089),bt=(typeof navigator=="undefined"?"undefined":(0,te.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Rt=bt,Ot=function(jt,Mt,mt,vt){var Lt=(0,Jt.useRef)(!1),Bt=(0,Jt.useRef)(null);function _t(){clearTimeout(Bt.current),Lt.current=!0,Bt.current=setTimeout(function(){Lt.current=!1},50)}var Me=(0,Jt.useRef)({top:jt,bottom:Mt,left:mt,right:vt});return Me.current.top=jt,Me.current.bottom=Mt,Me.current.left=mt,Me.current.right=vt,function(ye,Ye){var Fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Te=ye?Ye<0&&Me.current.left||Ye>0&&Me.current.right:Ye<0&&Me.current.top||Ye>0&&Me.current.bottom;return Fe&&Te?(clearTimeout(Bt.current),Lt.current=!1):(!Te||Lt.current)&&_t(),!Lt.current&&Te}};function Wt(jt,Mt,mt,vt,Lt,Bt,_t){var Me=(0,Jt.useRef)(0),ye=(0,Jt.useRef)(null),Ye=(0,Jt.useRef)(null),Fe=(0,Jt.useRef)(!1),Te=Ot(Mt,mt,vt,Lt);function Oe(ci,mi){if(xt.Z.cancel(ye.current),!Te(!1,mi)){var Mi=ci;if(!Mi._virtualHandled)Mi._virtualHandled=!0;else return;Me.current+=mi,Ye.current=mi,Rt||Mi.preventDefault(),ye.current=(0,xt.Z)(function(){var yr=Fe.current?10:1;_t(Me.current*yr,!1),Me.current=0})}}function $e(ci,mi){_t(mi,!0),Rt||ci.preventDefault()}var yn=(0,Jt.useRef)(null),Kn=(0,Jt.useRef)(null);function Sn(ci){if(jt){xt.Z.cancel(Kn.current),Kn.current=(0,xt.Z)(function(){yn.current=null},2);var mi=ci.deltaX,Mi=ci.deltaY,yr=ci.shiftKey,ki=mi,Ri=Mi;(yn.current==="sx"||!yn.current&&yr&&Mi&&!mi)&&(ki=Mi,Ri=0,yn.current="sx");var Vi=Math.abs(ki),Or=Math.abs(Ri);yn.current===null&&(yn.current=Bt&&Vi>Or?"x":"y"),yn.current==="y"?Oe(ci,Ri):$e(ci,ki)}}function ui(ci){jt&&(Fe.current=ci.detail===Ye.current)}return[Sn,ui]}function Zt(jt,Mt,mt,vt){var Lt=Jt.useMemo(function(){return[new Map,[]]},[jt,mt.id,vt]),Bt=(0,de.Z)(Lt,2),_t=Bt[0],Me=Bt[1],ye=function(Fe){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fe,Oe=_t.get(Fe),$e=_t.get(Te);if(Oe===void 0||$e===void 0)for(var yn=jt.length,Kn=Me.length;Kn<yn;Kn+=1){var Sn,ui=jt[Kn],ci=Mt(ui);_t.set(ci,Kn);var mi=(Sn=mt.get(ci))!==null&&Sn!==void 0?Sn:vt;if(Me[Kn]=(Me[Kn-1]||0)+mi,ci===Fe&&(Oe=Kn),ci===Te&&($e=Kn),Oe!==void 0&&$e!==void 0)break}return{top:Me[Oe-1]||0,bottom:Me[$e]}};return ye}var $t=Qt(6487),Ce=Qt(56789),ge=function(){function jt(){(0,$t.Z)(this,jt),(0,Be.Z)(this,"maps",void 0),(0,Be.Z)(this,"id",0),(0,Be.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,Ce.Z)(jt,[{key:"set",value:function(mt,vt){this.diffRecords.set(mt,this.maps[mt]),this.maps[mt]=vt,this.id+=1}},{key:"get",value:function(mt){return this.maps[mt]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),jt}(),nn=ge;function qe(jt){var Mt=parseFloat(jt);return isNaN(Mt)?0:Mt}function En(jt,Mt,mt){var vt=Jt.useState(0),Lt=(0,de.Z)(vt,2),Bt=Lt[0],_t=Lt[1],Me=(0,Jt.useRef)(new Map),ye=(0,Jt.useRef)(new nn),Ye=(0,Jt.useRef)(0);function Fe(){Ye.current+=1}function Te(){var $e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Fe();var yn=function(){var ui=!1;Me.current.forEach(function(ci,mi){if(ci&&ci.offsetParent){var Mi=ci.offsetHeight,yr=getComputedStyle(ci),ki=yr.marginTop,Ri=yr.marginBottom,Vi=qe(ki),Or=qe(Ri),qi=Mi+Vi+Or;ye.current.get(mi)!==qi&&(ye.current.set(mi,qi),ui=!0)}}),ui&&_t(function(ci){return ci+1})};if($e)yn();else{Ye.current+=1;var Kn=Ye.current;Promise.resolve().then(function(){Kn===Ye.current&&yn()})}}function Oe($e,yn){var Kn=jt($e),Sn=Me.current.get(Kn);yn?(Me.current.set(Kn,yn),Te()):Me.current.delete(Kn),!Sn!=!yn&&(yn?Mt==null||Mt($e):mt==null||mt($e))}return(0,Jt.useEffect)(function(){return Fe},[]),[Oe,Te,ye.current,Bt]}var Tn=14/15;function bn(jt,Mt,mt){var vt=(0,Jt.useRef)(!1),Lt=(0,Jt.useRef)(0),Bt=(0,Jt.useRef)(0),_t=(0,Jt.useRef)(null),Me=(0,Jt.useRef)(null),ye,Ye=function($e){if(vt.current){var yn=Math.ceil($e.touches[0].pageX),Kn=Math.ceil($e.touches[0].pageY),Sn=Lt.current-yn,ui=Bt.current-Kn,ci=Math.abs(Sn)>Math.abs(ui);ci?Lt.current=yn:Bt.current=Kn;var mi=mt(ci,ci?Sn:ui,!1,$e);mi&&$e.preventDefault(),clearInterval(Me.current),mi&&(Me.current=setInterval(function(){ci?Sn*=Tn:ui*=Tn;var Mi=Math.floor(ci?Sn:ui);(!mt(ci,Mi,!0)||Math.abs(Mi)<=.1)&&clearInterval(Me.current)},16))}},Fe=function(){vt.current=!1,ye()},Te=function($e){ye(),$e.touches.length===1&&!vt.current&&(vt.current=!0,Lt.current=Math.ceil($e.touches[0].pageX),Bt.current=Math.ceil($e.touches[0].pageY),_t.current=$e.target,_t.current.addEventListener("touchmove",Ye,{passive:!1}),_t.current.addEventListener("touchend",Fe,{passive:!0}))};ye=function(){_t.current&&(_t.current.removeEventListener("touchmove",Ye),_t.current.removeEventListener("touchend",Fe))},(0,De.Z)(function(){return jt&&Mt.current.addEventListener("touchstart",Te,{passive:!0}),function(){var Oe;(Oe=Mt.current)===null||Oe===void 0||Oe.removeEventListener("touchstart",Te),ye(),clearInterval(Me.current)}},[jt])}function ni(jt){return Math.floor(Math.pow(jt,.5))}function In(jt,Mt){var mt="touches"in jt?jt.touches[0]:jt;return mt[Mt?"pageX":"pageY"]-window[Mt?"scrollX":"scrollY"]}function Ee(jt,Mt,mt){Jt.useEffect(function(){var vt=Mt.current;if(jt&&vt){var Lt=!1,Bt,_t,Me=function(){xt.Z.cancel(Bt)},ye=function Oe(){Me(),Bt=(0,xt.Z)(function(){mt(_t),Oe()})},Ye=function($e){if(!($e.target.draggable||$e.button!==0)){var yn=$e;yn._virtualHandled||(yn._virtualHandled=!0,Lt=!0)}},Fe=function(){Lt=!1,Me()},Te=function($e){if(Lt){var yn=In($e,!1),Kn=vt.getBoundingClientRect(),Sn=Kn.top,ui=Kn.bottom;if(yn<=Sn){var ci=Sn-yn;_t=-ni(ci),ye()}else if(yn>=ui){var mi=yn-ui;_t=ni(mi),ye()}else Me()}};return vt.addEventListener("mousedown",Ye),vt.ownerDocument.addEventListener("mouseup",Fe),vt.ownerDocument.addEventListener("mousemove",Te),function(){vt.removeEventListener("mousedown",Ye),vt.ownerDocument.removeEventListener("mouseup",Fe),vt.ownerDocument.removeEventListener("mousemove",Te),Me()}}},[jt])}var ie=10;function Pn(jt,Mt,mt,vt,Lt,Bt,_t,Me){var ye=Jt.useRef(),Ye=Jt.useState(null),Fe=(0,de.Z)(Ye,2),Te=Fe[0],Oe=Fe[1];return(0,De.Z)(function(){if(Te&&Te.times<ie){if(!jt.current){Oe(function(ro){return(0,Ae.Z)({},ro)});return}Bt();var $e=Te.targetAlign,yn=Te.originAlign,Kn=Te.index,Sn=Te.offset,ui=jt.current.clientHeight,ci=!1,mi=$e,Mi=null;if(ui){for(var yr=$e||yn,ki=0,Ri=0,Vi=0,Or=Math.min(Mt.length-1,Kn),qi=0;qi<=Or;qi+=1){var Cr=Lt(Mt[qi]);Ri=ki;var xr=mt.get(Cr);Vi=Ri+(xr===void 0?vt:xr),ki=Vi}for(var Wr=yr==="top"?Sn:ui-Sn,$i=Or;$i>=0;$i-=1){var eo=Lt(Mt[$i]),fo=mt.get(eo);if(fo===void 0){ci=!0;break}if(Wr-=fo,Wr<=0)break}switch(yr){case"top":Mi=Ri-Sn;break;case"bottom":Mi=Vi-ui+Sn;break;default:{var Zr=jt.current.scrollTop,Fr=Zr+ui;Ri<Zr?mi="top":Vi>Fr&&(mi="bottom")}}Mi!==null&&_t(Mi),Mi!==Te.lastTop&&(ci=!0)}ci&&Oe((0,Ae.Z)((0,Ae.Z)({},Te),{},{times:Te.times+1,targetAlign:mi,lastTop:Mi}))}},[Te,jt.current]),function($e){if($e==null){Me();return}if(xt.Z.cancel(ye.current),typeof $e=="number")_t($e);else if($e&&(0,te.Z)($e)==="object"){var yn,Kn=$e.align;"index"in $e?yn=$e.index:yn=Mt.findIndex(function(ci){return Lt(ci)===$e.key});var Sn=$e.offset,ui=Sn===void 0?0:Sn;Oe({times:0,index:yn,offset:ui,originAlign:Kn})}}}var pi=Jt.forwardRef(function(jt,Mt){var mt=jt.prefixCls,vt=jt.rtl,Lt=jt.scrollOffset,Bt=jt.scrollRange,_t=jt.onStartMove,Me=jt.onStopMove,ye=jt.onScroll,Ye=jt.horizontal,Fe=jt.spinSize,Te=jt.containerSize,Oe=jt.style,$e=jt.thumbStyle,yn=jt.showScrollBar,Kn=Jt.useState(!1),Sn=(0,de.Z)(Kn,2),ui=Sn[0],ci=Sn[1],mi=Jt.useState(null),Mi=(0,de.Z)(mi,2),yr=Mi[0],ki=Mi[1],Ri=Jt.useState(null),Vi=(0,de.Z)(Ri,2),Or=Vi[0],qi=Vi[1],Cr=!vt,xr=Jt.useRef(),Wr=Jt.useRef(),$i=Jt.useState(yn),eo=(0,de.Z)($i,2),fo=eo[0],Zr=eo[1],Fr=Jt.useRef(),ro=function(){yn===!0||yn===!1||(clearTimeout(Fr.current),Zr(!0),Fr.current=setTimeout(function(){Zr(!1)},3e3))},Tt=Bt-Te||0,Gi=Te-Fe||0,Zi=Jt.useMemo(function(){if(Lt===0||Tt===0)return 0;var Ue=Lt/Tt;return Ue*Gi},[Lt,Tt,Gi]),Yr=function(gi){gi.stopPropagation(),gi.preventDefault()},bo=Jt.useRef({top:Zi,dragging:ui,pageY:yr,startTop:Or});bo.current={top:Zi,dragging:ui,pageY:yr,startTop:Or};var ko=function(gi){ci(!0),ki(In(gi,Ye)),qi(bo.current.top),_t(),gi.stopPropagation(),gi.preventDefault()};Jt.useEffect(function(){var Ue=function(Dn){Dn.preventDefault()},gi=xr.current,xe=Wr.current;return gi.addEventListener("touchstart",Ue,{passive:!1}),xe.addEventListener("touchstart",ko,{passive:!1}),function(){gi.removeEventListener("touchstart",Ue),xe.removeEventListener("touchstart",ko)}},[]);var $o=Jt.useRef();$o.current=Tt;var Xi=Jt.useRef();Xi.current=Gi,Jt.useEffect(function(){if(ui){var Ue,gi=function(Dn){var Ai=bo.current,Ve=Ai.dragging,ze=Ai.pageY,ai=Ai.startTop;xt.Z.cancel(Ue);var he=xr.current.getBoundingClientRect(),an=Te/(Ye?he.width:he.height);if(Ve){var Yn=(In(Dn,Ye)-ze)*an,vi=ai;!Cr&&Ye?vi-=Yn:vi+=Yn;var ln=$o.current,qn=Xi.current,li=qn?vi/qn:0,Xe=Math.ceil(li*ln);Xe=Math.max(Xe,0),Xe=Math.min(Xe,ln),Ue=(0,xt.Z)(function(){ye(Xe,Ye)})}},xe=function(){ci(!1),Me()};return window.addEventListener("mousemove",gi,{passive:!0}),window.addEventListener("touchmove",gi,{passive:!0}),window.addEventListener("mouseup",xe,{passive:!0}),window.addEventListener("touchend",xe,{passive:!0}),function(){window.removeEventListener("mousemove",gi),window.removeEventListener("touchmove",gi),window.removeEventListener("mouseup",xe),window.removeEventListener("touchend",xe),xt.Z.cancel(Ue)}}},[ui]),Jt.useEffect(function(){return ro(),function(){clearTimeout(Fr.current)}},[Lt]),Jt.useImperativeHandle(Mt,function(){return{delayHidden:ro}});var Ni="".concat(mt,"-scrollbar"),_e={position:"absolute",visibility:fo?null:"hidden"},Re={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Ye?(_e.height=8,_e.left=0,_e.right=0,_e.bottom=0,Re.height="100%",Re.width=Fe,Cr?Re.left=Zi:Re.right=Zi):(_e.width=8,_e.top=0,_e.bottom=0,Cr?_e.right=0:_e.left=0,Re.width="100%",Re.height=Fe,Re.top=Zi),Jt.createElement("div",{ref:xr,className:ue()(Ni,(0,Be.Z)((0,Be.Z)((0,Be.Z)({},"".concat(Ni,"-horizontal"),Ye),"".concat(Ni,"-vertical"),!Ye),"".concat(Ni,"-visible"),fo)),style:(0,Ae.Z)((0,Ae.Z)({},_e),Oe),onMouseDown:Yr,onMouseMove:ro},Jt.createElement("div",{ref:Wr,className:ue()("".concat(Ni,"-thumb"),(0,Be.Z)({},"".concat(Ni,"-thumb-moving"),ui)),style:(0,Ae.Z)((0,Ae.Z)({},Re),$e),onMouseDown:ko}))}),Wn=pi,un=20;function Zn(){var jt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,mt=jt/Mt*jt;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"],Oi=[],on={overflowY:"auto",overflowAnchor:"none"};function ri(jt,Mt){var mt=jt.prefixCls,vt=mt===void 0?"rc-virtual-list":mt,Lt=jt.className,Bt=jt.height,_t=jt.itemHeight,Me=jt.fullHeight,ye=Me===void 0?!0:Me,Ye=jt.style,Fe=jt.data,Te=jt.children,Oe=jt.itemKey,$e=jt.virtual,yn=jt.direction,Kn=jt.scrollWidth,Sn=jt.component,ui=Sn===void 0?"div":Sn,ci=jt.onScroll,mi=jt.onVirtualScroll,Mi=jt.onVisibleChange,yr=jt.innerProps,ki=jt.extraRender,Ri=jt.styles,Vi=jt.showScrollBar,Or=Vi===void 0?"optional":Vi,qi=(0,Ht.Z)(jt,si),Cr=Jt.useCallback(function(dn){return typeof Oe=="function"?Oe(dn):dn==null?void 0:dn[Oe]},[Oe]),xr=En(Cr,null,null),Wr=(0,de.Z)(xr,4),$i=Wr[0],eo=Wr[1],fo=Wr[2],Zr=Wr[3],Fr=!!($e!==!1&&Bt&&_t),ro=Jt.useMemo(function(){return Object.values(fo.maps).reduce(function(dn,tn){return dn+tn},0)},[fo.id,fo.maps]),Tt=Fr&&Fe&&(Math.max(_t*Fe.length,ro)>Bt||!!Kn),Gi=yn==="rtl",Zi=ue()(vt,(0,Be.Z)({},"".concat(vt,"-rtl"),Gi),Lt),Yr=Fe||Oi,bo=(0,Jt.useRef)(),ko=(0,Jt.useRef)(),$o=(0,Jt.useRef)(),Xi=(0,Jt.useState)(0),Ni=(0,de.Z)(Xi,2),_e=Ni[0],Re=Ni[1],Ue=(0,Jt.useState)(0),gi=(0,de.Z)(Ue,2),xe=gi[0],Hi=gi[1],Dn=(0,Jt.useState)(!1),Ai=(0,de.Z)(Dn,2),Ve=Ai[0],ze=Ai[1],ai=function(){ze(!0)},he=function(){ze(!1)},an={getKey:Cr};function Yn(dn){Re(function(tn){var gn;typeof dn=="function"?gn=dn(tn):gn=dn;var mn=Ei(gn);return bo.current.scrollTop=mn,mn})}var vi=(0,Jt.useRef)({start:0,end:Yr.length}),ln=(0,Jt.useRef)(),qn=pt(Yr,Cr),li=(0,de.Z)(qn,1),Xe=li[0];ln.current=Xe;var sn=Jt.useMemo(function(){if(!Fr)return{scrollHeight:void 0,start:0,end:Yr.length-1,offset:void 0};if(!Tt){var dn;return{scrollHeight:((dn=ko.current)===null||dn===void 0?void 0:dn.offsetHeight)||0,start:0,end:Yr.length-1,offset:void 0}}for(var tn=0,gn,mn,xn,hi=Yr.length,zn=0;zn<hi;zn+=1){var Xn=Yr[zn],cn=Cr(Xn),ti=fo.get(cn),Di=tn+(ti===void 0?_t:ti);Di>=_e&&gn===void 0&&(gn=zn,mn=tn),Di>_e+Bt&&xn===void 0&&(xn=zn),tn=Di}return gn===void 0&&(gn=0,mn=0,xn=Math.ceil(Bt/_t)),xn===void 0&&(xn=Yr.length-1),xn=Math.min(xn+1,Yr.length-1),{scrollHeight:tn,start:gn,end:xn,offset:mn}},[Tt,Fr,_e,Yr,Zr,Bt]),wn=sn.scrollHeight,Mn=sn.start,ii=sn.end,_i=sn.offset;vi.current.start=Mn,vi.current.end=ii,Jt.useLayoutEffect(function(){var dn=fo.getRecord();if(dn.size===1){var tn=Array.from(dn.keys())[0],gn=dn.get(tn),mn=Yr[Mn];if(mn&&gn===void 0){var xn=Cr(mn);if(xn===tn){var hi=fo.get(tn),zn=hi-_t;Yn(function(Xn){return Xn+zn})}}}fo.resetRecord()},[wn]);var Ki=Jt.useState({width:0,height:Bt}),Ti=(0,de.Z)(Ki,2),en=Ti[0],Lr=Ti[1],cr=function(tn){Lr({width:tn.offsetWidth,height:tn.offsetHeight})},Ur=(0,Jt.useRef)(),rn=(0,Jt.useRef)(),oi=Jt.useMemo(function(){return Zn(en.width,Kn)},[en.width,Kn]),Ci=Jt.useMemo(function(){return Zn(en.height,wn)},[en.height,wn]),bi=wn-Bt,xi=(0,Jt.useRef)(bi);xi.current=bi;function Ei(dn){var tn=dn;return Number.isNaN(xi.current)||(tn=Math.min(tn,xi.current)),tn=Math.max(tn,0),tn}var Yi=_e<=0,sr=_e>=bi,oe=xe<=0,ae=xe>=Kn,ee=Ot(Yi,sr,oe,ae),je=function(){return{x:Gi?-xe:xe,y:_e}},Se=(0,Jt.useRef)(je()),An=(0,Vt.zX)(function(dn){if(mi){var tn=(0,Ae.Z)((0,Ae.Z)({},je()),dn);(Se.current.x!==tn.x||Se.current.y!==tn.y)&&(mi(tn),Se.current=tn)}});function Nn(dn,tn){var gn=dn;tn?((0,be.flushSync)(function(){Hi(gn)}),An()):Yn(gn)}function Vn(dn){var tn=dn.currentTarget.scrollTop;tn!==_e&&Yn(tn),ci==null||ci(dn),An()}var Qi=function(tn){var gn=tn,mn=Kn?Kn-en.width:0;return gn=Math.max(gn,0),gn=Math.min(gn,mn),gn},Si=(0,Vt.zX)(function(dn,tn){tn?((0,be.flushSync)(function(){Hi(function(gn){var mn=gn+(Gi?-dn:dn);return Qi(mn)})}),An()):Yn(function(gn){var mn=gn+dn;return mn})}),Ne=Wt(Fr,Yi,sr,oe,ae,!!Kn,Si),wi=(0,de.Z)(Ne,2),ke=wi[0],hn=wi[1];bn(Fr,bo,function(dn,tn,gn,mn){var xn=mn;return ee(dn,tn,gn)?!1:!xn||!xn._virtualHandled?(xn&&(xn._virtualHandled=!0),ke({preventDefault:function(){},deltaX:dn?tn:0,deltaY:dn?0:tn}),!0):!1}),Ee(Tt,bo,function(dn){Yn(function(tn){return tn+dn})}),(0,De.Z)(function(){function dn(gn){var mn=Yi&&gn.detail<0,xn=sr&&gn.detail>0;Fr&&!mn&&!xn&&gn.preventDefault()}var tn=bo.current;return tn.addEventListener("wheel",ke,{passive:!1}),tn.addEventListener("DOMMouseScroll",hn,{passive:!0}),tn.addEventListener("MozMousePixelScroll",dn,{passive:!1}),function(){tn.removeEventListener("wheel",ke),tn.removeEventListener("DOMMouseScroll",hn),tn.removeEventListener("MozMousePixelScroll",dn)}},[Fr,Yi,sr]),(0,De.Z)(function(){if(Kn){var dn=Qi(xe);Hi(dn),An({x:dn})}},[en.width,Kn]);var Qe=function(){var tn,gn;(tn=Ur.current)===null||tn===void 0||tn.delayHidden(),(gn=rn.current)===null||gn===void 0||gn.delayHidden()},Ut=Pn(bo,Yr,fo,_t,Cr,function(){return eo(!0)},Yn,Qe);Jt.useImperativeHandle(Mt,function(){return{nativeElement:$o.current,getScrollInfo:je,scrollTo:function(tn){function gn(mn){return mn&&(0,te.Z)(mn)==="object"&&("left"in mn||"top"in mn)}gn(tn)?(tn.left!==void 0&&Hi(Qi(tn.left)),Ut(tn.top)):Ut(tn)}}}),(0,De.Z)(function(){if(Mi){var dn=Yr.slice(Mn,ii+1);Mi(dn,Yr)}},[Mn,ii,Yr]);var pn=Zt(Yr,Cr,fo,_t),fn=ki==null?void 0:ki({start:Mn,end:ii,virtual:Tt,offsetX:xe,offsetY:_i,rtl:Gi,getSize:pn}),Qn=At(Yr,Mn,ii,Kn,xe,$i,Te,an),Gn=null;Bt&&(Gn=(0,Ae.Z)((0,Be.Z)({},ye?"height":"maxHeight",Bt),on),Fr&&(Gn.overflowY="hidden",Kn&&(Gn.overflowX="hidden"),Ve&&(Gn.pointerEvents="none")));var jn={};return Gi&&(jn.dir="rtl"),Jt.createElement("div",(0,Pt.Z)({ref:$o,style:(0,Ae.Z)((0,Ae.Z)({},Ye),{},{position:"relative"}),className:Zi},jn,qi),Jt.createElement(ce.Z,{onResize:cr},Jt.createElement(ui,{className:"".concat(vt,"-holder"),style:Gn,ref:bo,onScroll:Vn,onMouseEnter:Qe},Jt.createElement(nt,{prefixCls:vt,height:wn,offsetX:xe,offsetY:_i,scrollWidth:Kn,onInnerResize:eo,ref:ko,innerProps:yr,rtl:Gi,extra:fn},Qn))),Tt&&wn>Bt&&Jt.createElement(Wn,{ref:Ur,prefixCls:vt,scrollOffset:_e,scrollRange:wn,rtl:Gi,onScroll:Nn,onStartMove:ai,onStopMove:he,spinSize:Ci,containerSize:en.height,style:Ri==null?void 0:Ri.verticalScrollBar,thumbStyle:Ri==null?void 0:Ri.verticalScrollBarThumb,showScrollBar:Or}),Tt&&Kn>en.width&&Jt.createElement(Wn,{ref:rn,prefixCls:vt,scrollOffset:xe,scrollRange:Kn,rtl:Gi,onScroll:Nn,onStartMove:ai,onStopMove:he,spinSize:oi,containerSize:en.width,horizontal:!0,style:Ri==null?void 0:Ri.horizontalScrollBar,thumbStyle:Ri==null?void 0:Ri.horizontalScrollBarThumb,showScrollBar:Or}))}var Le=Jt.forwardRef(ri);Le.displayName="List";var fi=Le,Pi=fi},2637:function(Cn,We,Qt){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),Object.defineProperty(We,"DraggableCore",{enumerable:!0,get:function(){return ue.default}}),We.default=void 0;var Pt=Jt(Qt(59301)),te=Vt(Qt(12708)),Ae=Vt(Qt(4676)),Be=Vt(Qt(57780)),de=Qt(13957),Ht=Qt(60976),ne=Qt(36641),ue=Vt(Qt(80486)),ce=Vt(Qt(94187));function Vt(at){return at&&at.__esModule?at:{default:at}}function De(at){if(typeof WeakMap!="function")return null;var ct=new WeakMap,pt=new WeakMap;return(De=function(xt){return xt?pt:ct})(at)}function Jt(at,ct){if(!ct&&at&&at.__esModule)return at;if(at===null||typeof at!="object"&&typeof at!="function")return{default:at};var pt=De(ct);if(pt&&pt.has(at))return pt.get(at);var xt={},bt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Rt in at)if(Rt!=="default"&&Object.prototype.hasOwnProperty.call(at,Rt)){var Ot=bt?Object.getOwnPropertyDescriptor(at,Rt):null;Ot&&(Ot.get||Ot.set)?Object.defineProperty(xt,Rt,Ot):xt[Rt]=at[Rt]}return xt.default=at,pt&&pt.set(at,xt),xt}function be(){return be=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},be.apply(this,arguments)}function It(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:bt}=pt;return xt&&(!bt||xt.x!==bt.x||xt.y!==bt.y)?((0,ce.default)("Draggable: getDerivedStateFromProps %j",{position:xt,prevPropsPosition:bt}),{x:xt.x,y:xt.y,prevPropsPosition:Pd({},xt)}):null}constructor(ct){super(ct),It(this,"onDragStart",(pt,xt)=>{if((0,ce.default)("Draggable: onDragStart: %j",xt),this.props.onStart(pt,(0,Ht.createDraggableData)(this,xt))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),It(this,"onDrag",(pt,xt)=>{if(!this.state.dragging)return!1;(0,ce.default)("Draggable: onDrag: %j",xt);const bt=(0,Ht.createDraggableData)(this,xt),Rt={x:bt.x,y:bt.y,slackX:0,slackY:0};if(this.props.bounds){const{x:Wt,y:Zt}=Rt;Rt.x+=this.state.slackX,Rt.y+=this.state.slackY;const[$t,Ce]=(0,Ht.getBoundPosition)(this,Rt.x,Rt.y);Rt.x=$t,Rt.y=Ce,Rt.slackX=this.state.slackX+(Wt-Rt.x),Rt.slackY=this.state.slackY+(Zt-Rt.y),bt.x=Rt.x,bt.y=Rt.y,bt.deltaX=Rt.x-this.state.x,bt.deltaY=Rt.y-this.state.y}if(this.props.onDrag(pt,bt)===!1)return!1;this.setState(Rt)}),It(this,"onDragStop",(pt,xt)=>{if(!this.state.dragging||this.props.onStop(pt,(0,Ht.createDraggableData)(this,xt))===!1)return!1;(0,ce.default)("Draggable: onDragStop: %j",xt);const Rt={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:Wt,y:Zt}=this.props.position;Rt.x=Wt,Rt.y=Zt}this.setState(Rt)}),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 Ee=this.props,{axis:ct,bounds:pt,children:xt,defaultPosition:bt,defaultClassName:Rt,defaultClassNameDragging:Ot,defaultClassNameDragged:Wt,position:Zt,positionOffset:$t,scale:Ce}=Ee,ge=Sw(Ee,["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"]);let nn={},qe=null;const Tn=!!!Zt||this.state.dragging,bn=Zt||bt,ni={x:(0,Ht.canDragX)(this)&&Tn?this.state.x:bn.x,y:(0,Ht.canDragY)(this)&&Tn?this.state.y:bn.y};this.state.isElementSVG?qe=(0,de.createSVGTransform)(ni,$t):nn=(0,de.createCSSTransform)(ni,$t);const In=(0,Be.default)(xt.props.className||"",Rt,{[Ot]:this.state.dragging,[Wt]:this.state.dragged});return Pt.createElement(ue.default,be({},ge,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),Pt.cloneElement(Pt.Children.only(xt),{className:In,style:Pd(Pd({},xt.props.style),nn),transform:qe}))}}We.default=At,It(At,"displayName","Draggable"),It(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})),It(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(Cn,We,Qt){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.default=void 0;var Pt=Vt(Qt(59301)),te=ue(Qt(12708)),Ae=ue(Qt(4676)),Be=Qt(13957),de=Qt(60976),Ht=Qt(36641),ne=ue(Qt(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 Vt(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 bt in At)if(bt!=="default"&&Object.prototype.hasOwnProperty.call(At,bt)){var Rt=xt?Object.getOwnPropertyDescriptor(At,bt):null;Rt&&(Rt.get||Rt.set)?Object.defineProperty(pt,bt,Rt):pt[bt]=At[bt]}return pt.default=At,ct&&ct.set(At,pt),pt}function De(At,at,ct){return at=Jt(at),at in At?Object.defineProperty(At,at,{value:ct,enumerable:!0,configurable:!0,writable:!0}):At[at]=ct,At}function Jt(At){var at=be(At,"string");return typeof at=="symbol"?at:String(at)}function be(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 It={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let nt=It.mouse;class et extends Pt.Component{constructor(){super(...arguments),De(this,"dragging",!1),De(this,"lastX",NaN),De(this,"lastY",NaN),De(this,"touchIdentifier",null),De(this,"mounted",!1),De(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,Be.matchesSelectorAndParentsTo)(at.target,this.props.handle,ct)||this.props.cancel&&(0,Be.matchesSelectorAndParentsTo)(at.target,this.props.cancel,ct))return;at.type==="touchstart"&&at.preventDefault();const xt=(0,Be.getTouchIdentifier)(at);this.touchIdentifier=xt;const bt=(0,de.getControlPosition)(at,xt,this);if(bt==null)return;const{x:Rt,y:Ot}=bt,Wt=(0,de.createCoreData)(this,Rt,Ot);(0,ne.default)("DraggableCore: handleDragStart: %j",Wt),(0,ne.default)("calling",this.props.onStart),!(this.props.onStart(at,Wt)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,Be.addUserSelectStyles)(pt),this.dragging=!0,this.lastX=Rt,this.lastY=Ot,(0,Be.addEvent)(pt,nt.move,this.handleDrag),(0,Be.addEvent)(pt,nt.stop,this.handleDragStop))}),De(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 Ot=pt-this.lastX,Wt=xt-this.lastY;if([Ot,Wt]=(0,de.snapToGrid)(this.props.grid,Ot,Wt),!Ot&&!Wt)return;pt=this.lastX+Ot,xt=this.lastY+Wt}const bt=(0,de.createCoreData)(this,pt,xt);if((0,ne.default)("DraggableCore: handleDrag: %j",bt),this.props.onDrag(at,bt)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch(Ot){const Wt=document.createEvent("MouseEvents");Wt.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(Wt)}return}this.lastX=pt,this.lastY=xt}),De(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 Wt=pt-this.lastX||0,Zt=xt-this.lastY||0;[Wt,Zt]=(0,de.snapToGrid)(this.props.grid,Wt,Zt),pt=this.lastX+Wt,xt=this.lastY+Zt}const bt=(0,de.createCoreData)(this,pt,xt);if(this.props.onStop(at,bt)===!1||this.mounted===!1)return!1;const Ot=this.findDOMNode();Ot&&this.props.enableUserSelectHack&&(0,Be.removeUserSelectStyles)(Ot.ownerDocument),(0,ne.default)("DraggableCore: handleDragStop: %j",bt),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,Ot&&((0,ne.default)("DraggableCore: Removing handlers"),(0,Be.removeEvent)(Ot.ownerDocument,nt.move,this.handleDrag),(0,Be.removeEvent)(Ot.ownerDocument,nt.stop,this.handleDragStop))}),De(this,"onMouseDown",at=>(nt=It.mouse,this.handleDragStart(at))),De(this,"onMouseUp",at=>(nt=It.mouse,this.handleDragStop(at))),De(this,"onTouchStart",at=>(nt=It.touch,this.handleDragStart(at))),De(this,"onTouchEnd",at=>(nt=It.touch,this.handleDragStop(at)))}componentDidMount(){this.mounted=!0;const at=this.findDOMNode();at&&(0,Be.addEvent)(at,It.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const at=this.findDOMNode();if(at){const{ownerDocument:ct}=at;(0,Be.removeEvent)(ct,It.mouse.move,this.handleDrag),(0,Be.removeEvent)(ct,It.touch.move,this.handleDrag),(0,Be.removeEvent)(ct,It.mouse.stop,this.handleDragStop),(0,Be.removeEvent)(ct,It.touch.stop,this.handleDragStop),(0,Be.removeEvent)(at,It.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,Be.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})}}We.default=et,De(et,"displayName","DraggableCore"),De(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:Ht.dontSetMe,style:Ht.dontSetMe,transform:Ht.dontSetMe}),De(et,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},12911:function(Cn,We,Qt){"use strict";const{default:Pt,DraggableCore:te}=Qt(2637);Cn.exports=Pt,Cn.exports.default=Pt,Cn.exports.DraggableCore=te},13957:function(Cn,We,Qt){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.addClassName=bt,We.addEvent=ue,We.addUserSelectStyles=pt,We.createCSSTransform=nt,We.createSVGTransform=et,We.getTouch=at,We.getTouchIdentifier=ct,We.getTranslation=At,We.innerHeight=Jt,We.innerWidth=be,We.matchesSelector=Ht,We.matchesSelectorAndParentsTo=ne,We.offsetXYFromParent=It,We.outerHeight=Vt,We.outerWidth=De,We.removeClassName=Rt,We.removeEvent=ce,We.removeUserSelectStyles=xt;var Pt=Qt(36641),te=Be(Qt(32092));function Ae(Ot){if(typeof WeakMap!="function")return null;var Wt=new WeakMap,Zt=new WeakMap;return(Ae=function($t){return $t?Zt:Wt})(Ot)}function Be(Ot,Wt){if(!Wt&&Ot&&Ot.__esModule)return Ot;if(Ot===null||typeof Ot!="object"&&typeof Ot!="function")return{default:Ot};var Zt=Ae(Wt);if(Zt&&Zt.has(Ot))return Zt.get(Ot);var $t={},Ce=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var ge in Ot)if(ge!=="default"&&Object.prototype.hasOwnProperty.call(Ot,ge)){var nn=Ce?Object.getOwnPropertyDescriptor(Ot,ge):null;nn&&(nn.get||nn.set)?Object.defineProperty($t,ge,nn):$t[ge]=Ot[ge]}return $t.default=Ot,Zt&&Zt.set(Ot,$t),$t}let de="";function Ht(Ot,Wt){return de||(de=(0,Pt.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(Zt){return(0,Pt.isFunction)(Ot[Zt])})),(0,Pt.isFunction)(Ot[de])?Ot[de](Wt):!1}function ne(Ot,Wt,Zt){let $t=Ot;do{if(Ht($t,Wt))return!0;if($t===Zt)return!1;$t=$t.parentNode}while($t);return!1}function ue(Ot,Wt,Zt,$t){if(!Ot)return;const Ce=Pd({capture:!0},$t);Ot.addEventListener?Ot.addEventListener(Wt,Zt,Ce):Ot.attachEvent?Ot.attachEvent("on"+Wt,Zt):Ot["on"+Wt]=Zt}function ce(Ot,Wt,Zt,$t){if(!Ot)return;const Ce=Pd({capture:!0},$t);Ot.removeEventListener?Ot.removeEventListener(Wt,Zt,Ce):Ot.detachEvent?Ot.detachEvent("on"+Wt,Zt):Ot["on"+Wt]=null}function Vt(Ot){let Wt=Ot.clientHeight;const Zt=Ot.ownerDocument.defaultView.getComputedStyle(Ot);return Wt+=(0,Pt.int)(Zt.borderTopWidth),Wt+=(0,Pt.int)(Zt.borderBottomWidth),Wt}function De(Ot){let Wt=Ot.clientWidth;const Zt=Ot.ownerDocument.defaultView.getComputedStyle(Ot);return Wt+=(0,Pt.int)(Zt.borderLeftWidth),Wt+=(0,Pt.int)(Zt.borderRightWidth),Wt}function Jt(Ot){let Wt=Ot.clientHeight;const Zt=Ot.ownerDocument.defaultView.getComputedStyle(Ot);return Wt-=(0,Pt.int)(Zt.paddingTop),Wt-=(0,Pt.int)(Zt.paddingBottom),Wt}function be(Ot){let Wt=Ot.clientWidth;const Zt=Ot.ownerDocument.defaultView.getComputedStyle(Ot);return Wt-=(0,Pt.int)(Zt.paddingLeft),Wt-=(0,Pt.int)(Zt.paddingRight),Wt}function It(Ot,Wt,Zt){const Ce=Wt===Wt.ownerDocument.body?{left:0,top:0}:Wt.getBoundingClientRect(),ge=(Ot.clientX+Wt.scrollLeft-Ce.left)/Zt,nn=(Ot.clientY+Wt.scrollTop-Ce.top)/Zt;return{x:ge,y:nn}}function nt(Ot,Wt){const Zt=At(Ot,Wt,"px");return{[(0,te.browserPrefixToKey)("transform",te.default)]:Zt}}function et(Ot,Wt){return At(Ot,Wt,"")}function At(Ot,Wt,Zt){let{x:$t,y:Ce}=Ot,ge="translate(".concat($t).concat(Zt,",").concat(Ce).concat(Zt,")");if(Wt){const nn="".concat(typeof Wt.x=="string"?Wt.x:Wt.x+Zt),qe="".concat(typeof Wt.y=="string"?Wt.y:Wt.y+Zt);ge="translate(".concat(nn,", ").concat(qe,")")+ge}return ge}function at(Ot,Wt){return Ot.targetTouches&&(0,Pt.findInArray)(Ot.targetTouches,Zt=>Wt===Zt.identifier)||Ot.changedTouches&&(0,Pt.findInArray)(Ot.changedTouches,Zt=>Wt===Zt.identifier)}function ct(Ot){if(Ot.targetTouches&&Ot.targetTouches[0])return Ot.targetTouches[0].identifier;if(Ot.changedTouches&&Ot.changedTouches[0])return Ot.changedTouches[0].identifier}function pt(Ot){if(!Ot)return;let Wt=Ot.getElementById("react-draggable-style-el");Wt||(Wt=Ot.createElement("style"),Wt.type="text/css",Wt.id="react-draggable-style-el",Wt.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
`,Wt.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
`,Ot.getElementsByTagName("head")[0].appendChild(Wt)),Ot.body&&bt(Ot.body,"react-draggable-transparent-selection")}function xt(Ot){if(Ot)try{if(Ot.body&&Rt(Ot.body,"react-draggable-transparent-selection"),Ot.selection)Ot.selection.empty();else{const Wt=(Ot.defaultView||window).getSelection();Wt&&Wt.type!=="Caret"&&Wt.removeAllRanges()}}catch(Wt){}}function bt(Ot,Wt){Ot.classList?Ot.classList.add(Wt):Ot.className.match(new RegExp("(?:^|\\s)".concat(Wt,"(?!\\S)")))||(Ot.className+=" ".concat(Wt))}function Rt(Ot,Wt){Ot.classList?Ot.classList.remove(Wt):Ot.className=Ot.className.replace(new RegExp("(?:^|\\s)".concat(Wt,"(?!\\S)"),"g"),"")}},32092:function(Cn,We){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.browserPrefixToKey=te,We.browserPrefixToStyle=Ae,We.default=void 0,We.getPrefix=Pt;const Qt=["Moz","Webkit","O","ms"];function Pt(){var Ht;let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window=="undefined")return"";const ue=(Ht=window.document)===null||Ht===void 0||(Ht=Ht.documentElement)===null||Ht===void 0?void 0:Ht.style;if(!ue||ne in ue)return"";for(let ce=0;ce<Qt.length;ce++)if(te(ne,Qt[ce])in ue)return Qt[ce];return""}function te(Ht,ne){return ne?"".concat(ne).concat(Be(Ht)):Ht}function Ae(Ht,ne){return ne?"-".concat(ne.toLowerCase(),"-").concat(Ht):Ht}function Be(Ht){let ne="",ue=!0;for(let ce=0;ce<Ht.length;ce++)ue?(ne+=Ht[ce].toUpperCase(),ue=!1):Ht[ce]==="-"?ue=!0:ne+=Ht[ce];return ne}var de=We.default=Pt()},94187:function(Cn,We){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.default=Qt;function Qt(){}},60976:function(Cn,We,Qt){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.canDragX=de,We.canDragY=Ht,We.createCoreData=ue,We.createDraggableData=ce,We.getBoundPosition=Ae,We.getControlPosition=ne,We.snapToGrid=Be;var Pt=Qt(36641),te=Qt(13957);function Ae(Jt,be,It){if(!Jt.props.bounds)return[be,It];let{bounds:nt}=Jt.props;nt=typeof nt=="string"?nt:Vt(nt);const et=De(Jt);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),bt=at.getComputedStyle(pt);nt={left:-et.offsetLeft+(0,Pt.int)(bt.paddingLeft)+(0,Pt.int)(xt.marginLeft),top:-et.offsetTop+(0,Pt.int)(bt.paddingTop)+(0,Pt.int)(xt.marginTop),right:(0,te.innerWidth)(pt)-(0,te.outerWidth)(et)-et.offsetLeft+(0,Pt.int)(bt.paddingRight)-(0,Pt.int)(xt.marginRight),bottom:(0,te.innerHeight)(pt)-(0,te.outerHeight)(et)-et.offsetTop+(0,Pt.int)(bt.paddingBottom)-(0,Pt.int)(xt.marginBottom)}}return(0,Pt.isNum)(nt.right)&&(be=Math.min(be,nt.right)),(0,Pt.isNum)(nt.bottom)&&(It=Math.min(It,nt.bottom)),(0,Pt.isNum)(nt.left)&&(be=Math.max(be,nt.left)),(0,Pt.isNum)(nt.top)&&(It=Math.max(It,nt.top)),[be,It]}function Be(Jt,be,It){const nt=Math.round(be/Jt[0])*Jt[0],et=Math.round(It/Jt[1])*Jt[1];return[nt,et]}function de(Jt){return Jt.props.axis==="both"||Jt.props.axis==="x"}function Ht(Jt){return Jt.props.axis==="both"||Jt.props.axis==="y"}function ne(Jt,be,It){const nt=typeof be=="number"?(0,te.getTouch)(Jt,be):null;if(typeof be=="number"&&!nt)return null;const et=De(It),At=It.props.offsetParent||et.offsetParent||et.ownerDocument.body;return(0,te.offsetXYFromParent)(nt||Jt,At,It.props.scale)}function ue(Jt,be,It){const nt=!(0,Pt.isNum)(Jt.lastX),et=De(Jt);return nt?{node:et,deltaX:0,deltaY:0,lastX:be,lastY:It,x:be,y:It}:{node:et,deltaX:be-Jt.lastX,deltaY:It-Jt.lastY,lastX:Jt.lastX,lastY:Jt.lastY,x:be,y:It}}function ce(Jt,be){const It=Jt.props.scale;return{node:be.node,x:Jt.state.x+be.deltaX/It,y:Jt.state.y+be.deltaY/It,deltaX:be.deltaX/It,deltaY:be.deltaY/It,lastX:Jt.state.x,lastY:Jt.state.y}}function Vt(Jt){return{left:Jt.left,top:Jt.top,right:Jt.right,bottom:Jt.bottom}}function De(Jt){const be=Jt.findDOMNode();if(!be)throw new Error("<DraggableCore>: Unmounted during event!");return be}},36641:function(Cn,We){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.dontSetMe=Be,We.findInArray=Qt,We.int=Ae,We.isFunction=Pt,We.isNum=te;function Qt(de,Ht){for(let ne=0,ue=de.length;ne<ue;ne++)if(Ht.apply(Ht,[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 Be(de,Ht,ne){if(de[Ht])return new Error("Invalid prop ".concat(Ht," passed to ").concat(ne," - do not set this, set it on the child."))}},27774:function(Cn,We){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.SizeSensorId=We.SensorTabIndex=We.SensorClassName=void 0;var Qt="size-sensor-id";We.SizeSensorId=Qt;var Pt="size-sensor-object";We.SensorClassName=Pt;var te="-1";We.SensorTabIndex=te},79301:function(Cn,We){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.default=void 0;var Qt=function(te){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,Be=null;return function(){for(var de=this,Ht=arguments.length,ne=new Array(Ht),ue=0;ue<Ht;ue++)ne[ue]=arguments[ue];clearTimeout(Be),Be=setTimeout(function(){te.apply(de,ne)},Ae)}};We.default=Qt},79789:function(Cn,We){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.default=void 0;var Qt=1,Pt=function(){return"".concat(Qt++)};We.default=Pt},47242:function(Cn,We,Qt){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.ver=We.clear=We.bind=void 0;var Pt=Qt(95270),te=function(Ht,ne){var ue=(0,Pt.getSensor)(Ht);return ue.bind(ne),function(){ue.unbind(ne)}};We.bind=te;var Ae=function(Ht){var ne=(0,Pt.getSensor)(Ht);(0,Pt.removeSensor)(ne)};We.clear=Ae;var Be="1.0.2";We.ver=Be},95270:function(Cn,We,Qt){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.removeSensor=We.getSensor=We.Sensors=void 0;var Pt=Be(Qt(79789)),te=Qt(57829),Ae=Qt(27774);function Be(ce){return ce&&ce.__esModule?ce:{default:ce}}var de={};We.Sensors=de;function Ht(ce){ce&&de[ce]&&delete de[ce]}var ne=function(Vt){var De=Vt.getAttribute(Ae.SizeSensorId);if(De&&de[De])return de[De];var Jt=(0,Pt.default)();Vt.setAttribute(Ae.SizeSensorId,Jt);var be=(0,te.createSensor)(Vt,function(){return Ht(Jt)});return de[Jt]=be,be};We.getSensor=ne;var ue=function(Vt){var De=Vt.element.getAttribute(Ae.SizeSensorId);Vt.destroy(),Ht(De)};We.removeSensor=ue},57829:function(Cn,We,Qt){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.createSensor=void 0;var Pt=Qt(20953),te=Qt(55202),Ae=typeof ResizeObserver!="undefined"?te.createSensor:Pt.createSensor;We.createSensor=Ae},20953:function(Cn,We,Qt){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.createSensor=void 0;var Pt=Ae(Qt(79301)),te=Qt(27774);function Ae(de){return de&&de.__esModule?de:{default:de}}var Be=function(Ht,ne){var ue=void 0,ce=[],Vt=function(){getComputedStyle(Ht).position==="static"&&(Ht.style.position="relative");var et=document.createElement("object");return et.onload=function(){et.contentDocument.defaultView.addEventListener("resize",De),De()},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",Ht.appendChild(et),et.data="about:blank",et},De=(0,Pt.default)(function(){ce.forEach(function(nt){nt(Ht)})}),Jt=function(et){ue||(ue=Vt()),ce.indexOf(et)===-1&&ce.push(et)},be=function(){ue&&ue.parentNode&&(ue.contentDocument&&ue.contentDocument.defaultView.removeEventListener("resize",De),ue.parentNode.removeChild(ue),Ht.removeAttribute(te.SizeSensorId),ue=void 0,ce=[],ne&&ne())},It=function(et){var At=ce.indexOf(et);At!==-1&&ce.splice(At,1),ce.length===0&&ue&&be()};return{element:Ht,bind:Jt,destroy:be,unbind:It}};We.createSensor=Be},55202:function(Cn,We,Qt){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.createSensor=void 0;var Pt=Qt(27774),te=Ae(Qt(79301));function Ae(de){return de&&de.__esModule?de:{default:de}}var Be=function(Ht,ne){var ue=void 0,ce=[],Vt=(0,te.default)(function(){ce.forEach(function(nt){nt(Ht)})}),De=function(){var et=new ResizeObserver(Vt);return et.observe(Ht),Vt(),et},Jt=function(et){ue||(ue=De()),ce.indexOf(et)===-1&&ce.push(et)},be=function(){ue.disconnect(),ce=[],ue=void 0,Ht.removeAttribute(Pt.SizeSensorId),ne&&ne()},It=function(et){var At=ce.indexOf(et);At!==-1&&ce.splice(At,1),ce.length===0&&ue&&be()};return{element:Ht,bind:Jt,destroy:be,unbind:It}};We.createSensor=Be},93314:function(Cn){"use strict";Cn.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(Cn){"use strict";Cn.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(Cn){"use strict";Cn.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(Cn){"use strict";Cn.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(Cn,We,Qt){"use strict";Qt.d(We,{Z:function(){return ue}});const Pt=ce=>typeof ce=="object"&&ce!=null&&ce.nodeType===1,te=(ce,Vt)=>(!Vt||ce!=="hidden")&&ce!=="visible"&&ce!=="clip",Ae=(ce,Vt)=>{if(ce.clientHeight<ce.scrollHeight||ce.clientWidth<ce.scrollWidth){const De=getComputedStyle(ce,null);return te(De.overflowY,Vt)||te(De.overflowX,Vt)||(Jt=>{const be=(It=>{if(!It.ownerDocument||!It.ownerDocument.defaultView)return null;try{return It.ownerDocument.defaultView.frameElement}catch(nt){return null}})(Jt);return!!be&&(be.clientHeight<Jt.scrollHeight||be.clientWidth<Jt.scrollWidth)})(ce)}return!1},Be=(ce,Vt,De,Jt,be,It,nt,et)=>It<ce&&nt>Vt||It>ce&&nt<Vt?0:It<=ce&&et<=De||nt>=Vt&&et>=De?It-ce-Jt:nt>Vt&&et<De||It<ce&&et>De?nt-Vt+be:0,de=ce=>{const Vt=ce.parentElement;return Vt==null?ce.getRootNode().host||null:Vt},Ht=(ce,Vt)=>{var De,Jt,be,It;if(typeof document=="undefined")return[];const{scrollMode:nt,block:et,inline:At,boundary:at,skipOverflowHiddenElements:ct}=Vt,pt=typeof at=="function"?at:Wn=>Wn!==at;if(!Pt(ce))throw new TypeError("Invalid target");const xt=document.scrollingElement||document.documentElement,bt=[];let Rt=ce;for(;Pt(Rt)&&pt(Rt);){if(Rt=de(Rt),Rt===xt){bt.push(Rt);break}Rt!=null&&Rt===document.body&&Ae(Rt)&&!Ae(document.documentElement)||Rt!=null&&Ae(Rt,ct)&&bt.push(Rt)}const Ot=(Jt=(De=window.visualViewport)==null?void 0:De.width)!=null?Jt:innerWidth,Wt=(It=(be=window.visualViewport)==null?void 0:be.height)!=null?It:innerHeight,{scrollX:Zt,scrollY:$t}=window,{height:Ce,width:ge,top:nn,right:qe,bottom:En,left:Tn}=ce.getBoundingClientRect(),{top:bn,right:ni,bottom:In,left:Ee}=(Wn=>{const un=window.getComputedStyle(Wn);return{top:parseFloat(un.scrollMarginTop)||0,right:parseFloat(un.scrollMarginRight)||0,bottom:parseFloat(un.scrollMarginBottom)||0,left:parseFloat(un.scrollMarginLeft)||0}})(ce);let ie=et==="start"||et==="nearest"?nn-bn:et==="end"?En+In:nn+Ce/2-bn+In,Pn=At==="center"?Tn+ge/2-Ee+ni:At==="end"?qe+ni:Tn-Ee;const pi=[];for(let Wn=0;Wn<bt.length;Wn++){const un=bt[Wn],{height:Zn,width:si,top:Oi,right:on,bottom:ri,left:Le}=un.getBoundingClientRect();if(nt==="if-needed"&&nn>=0&&Tn>=0&&En<=Wt&&qe<=Ot&&(un===xt&&!Ae(un)||nn>=Oi&&En<=ri&&Tn>=Le&&qe<=on))return pi;const fi=getComputedStyle(un),Pi=parseInt(fi.borderLeftWidth,10),jt=parseInt(fi.borderTopWidth,10),Mt=parseInt(fi.borderRightWidth,10),mt=parseInt(fi.borderBottomWidth,10);let vt=0,Lt=0;const Bt="offsetWidth"in un?un.offsetWidth-un.clientWidth-Pi-Mt:0,_t="offsetHeight"in un?un.offsetHeight-un.clientHeight-jt-mt:0,Me="offsetWidth"in un?un.offsetWidth===0?0:si/un.offsetWidth:0,ye="offsetHeight"in un?un.offsetHeight===0?0:Zn/un.offsetHeight:0;if(xt===un)vt=et==="start"?ie:et==="end"?ie-Wt:et==="nearest"?Be($t,$t+Wt,Wt,jt,mt,$t+ie,$t+ie+Ce,Ce):ie-Wt/2,Lt=At==="start"?Pn:At==="center"?Pn-Ot/2:At==="end"?Pn-Ot:Be(Zt,Zt+Ot,Ot,Pi,Mt,Zt+Pn,Zt+Pn+ge,ge),vt=Math.max(0,vt+$t),Lt=Math.max(0,Lt+Zt);else{vt=et==="start"?ie-Oi-jt:et==="end"?ie-ri+mt+_t:et==="nearest"?Be(Oi,ri,Zn,jt,mt+_t,ie,ie+Ce,Ce):ie-(Oi+Zn/2)+_t/2,Lt=At==="start"?Pn-Le-Pi:At==="center"?Pn-(Le+si/2)+Bt/2:At==="end"?Pn-on+Mt+Bt:Be(Le,on,si,Pi,Mt+Bt,Pn,Pn+ge,ge);const{scrollLeft:Ye,scrollTop:Fe}=un;vt=ye===0?0:Math.max(0,Math.min(Fe+vt/ye,un.scrollHeight-Zn/ye+_t)),Lt=Me===0?0:Math.max(0,Math.min(Ye+Lt/Me,un.scrollWidth-si/Me+Bt)),ie+=Fe-vt,Pn+=Ye-Lt}pi.push({el:un,top:vt,left:Lt})}return pi},ne=ce=>ce===!1?{block:"end",inline:"nearest"}:(Vt=>Vt===Object(Vt)&&Object.keys(Vt).length!==0)(ce)?ce:{block:"start",inline:"nearest"};function ue(ce,Vt){if(!ce.isConnected||!(be=>{let It=be;for(;It&&It.parentNode;){if(It.parentNode===document)return!0;It=It.parentNode instanceof ShadowRoot?It.parentNode.host:It.parentNode}return!1})(ce))return;const De=(be=>{const It=window.getComputedStyle(be);return{top:parseFloat(It.scrollMarginTop)||0,right:parseFloat(It.scrollMarginRight)||0,bottom:parseFloat(It.scrollMarginBottom)||0,left:parseFloat(It.scrollMarginLeft)||0}})(ce);if((be=>typeof be=="object"&&typeof be.behavior=="function")(Vt))return Vt.behavior(Ht(ce,Vt));const Jt=typeof Vt=="boolean"||Vt==null?void 0:Vt.behavior;for(const{el:be,top:It,left:nt}of Ht(ce,ne(Vt))){const et=It-De.top+De.bottom,At=nt-De.left+De.right;be.scroll({top:et,left:At,behavior:Jt})}}}}]);
}());