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__Question__AddOrEdit__ind...

1245 lines
2.6 MiB

(self.webpackChunk=self.webpackChunk||[]).push([[6913],{65363:function(mn,dn,st){"use strict";st.d(dn,{Z:function(){return ke}});var pt=st(72308),Dt=st(59301),oe={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"}}]},name:"close-circle",theme:"outlined"},Ge=oe,De=st(7657),fe=function(Se,Me){return Dt.createElement(De.Z,(0,pt.Z)({},Se,{ref:Me,icon:Ge}))},me=Dt.forwardRef(fe),ke=me},76618:function(mn,dn,st){"use strict";st.d(dn,{Z:function(){return ke}});var pt=st(72308),Dt=st(59301),oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"}}]},name:"poweroff",theme:"outlined"},Ge=oe,De=st(7657),fe=function(Se,Me){return Dt.createElement(De.Z,(0,pt.Z)({},Se,{ref:Me,icon:Ge}))},me=Dt.forwardRef(fe),ke=me},39060:function(){"use strict"},76596:function(){"use strict"},25346:function(mn,dn){"use strict";dn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},30434:function(){"use strict"},74042:function(){"use strict";function mn(de,z,ee,ae){ee===void 0&&(ee=0),ae===void 0&&(ae=1/0),this._name=de,this._defaultValue=z,this._minimum=ee,this._maximum=ae}Object.defineProperty(mn.prototype,"name",{get:function(){return this._name},set:function(de){if(typeof de!="string"||de==="")throw new Error("Shape name must be a valid string.");this._name=de}}),Object.defineProperty(mn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(de){if(typeof de!="number"||isNaN(de))throw new Error("The default value must be a real number, not: "+de);this._defaultValue=de}}),Object.defineProperty(mn.prototype,"minimum",{get:function(){return this._minimum},set:function(de){if(typeof de!="number"||isNaN(de))throw new Error("Minimum must be a real number, not: "+de);this._minimum=de}}),Object.defineProperty(mn.prototype,"maximum",{get:function(){return this._maximum},set:function(de){if(typeof de!="number"||isNaN(de))throw new Error("Maximum must be a real number, not: "+de);this._maximum=de}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(de,z){var ee=go.Shape._FigureParameters[de];return ee?ee[z]:null},go.Shape.setFigureParameter=function(de,z,ee){if(!(ee instanceof mn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+ee);if(ee.defaultValue<ee.minimum||ee.defaultValue>ee.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+ee.defaultValue);var ae=go.Shape._FigureParameters[de];ae||(ae=[],go.Shape._FigureParameters[de]=ae),ae[z]=ee};var dn=[];function st(de,z){var ee=dn.pop();return ee===void 0?new go.Point(de,z):(ee.x=de,ee.y=z,ee)}function pt(){var de=dn.pop();return de===void 0?new go.Point:de}function Dt(de){dn.push(de)}function oe(de,z,ee,ae,ie,le,ue,ge,Pe){Pe||(Pe=new go.Point);var je=de-ee,Be=ie-ue,Fe=NaN,Ne=NaN;if(je===0)if(Be===0)de===ee&&(Fe=de,Ne=z);else{var Ae=(le-ge)/Be,Re=le-Ae*ie;Fe=de,Ne=Ae*Fe+Re}else if(Be===0){var We=(z-ae)/je,Ye=z-We*de;Fe=ie,Ne=We*Fe+Ye}else{var We=(z-ae)/je,Ae=(le-ge)/Be,Ye=z-We*de,Re=le-Ae*ie;Fe=(Re-Ye)/(We-Ae),Ne=We*Fe+Ye}return Pe.x=Fe,Pe.y=Ne,Pe}function Ge(de,z,ee,ae,ie,le,ue,ge,Pe,je,Be,Fe,Ne,Ae){var Re=1-Pe,We=Pe,Ye=de*Re+ee*We,Ue=z*Re+ae*We,Ke=ee*Re+ie*We,ot=ae*Re+le*We,ut=ie*Re+ue*We,ft=le*Re+ge*We,wt=Ye*Re+Ke*We,Je=Ue*Re+ot*We,nt=Ke*Re+ut*We,xt=ot*Re+ft*We,Pt=wt*Re+nt*We,Ct=Je*Re+xt*We;je.x=Ye,je.y=Ue,Be.x=wt,Be.y=Je,Fe.x=Pt,Fe.y=Ct,Ne.x=nt,Ne.y=xt,Ae.x=ut,Ae.y=ft}var De=new go.Spot(.156,.156),fe=new go.Spot(.844,.844),me=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new mn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=5),ae=Math.min(ae,z/3),ae=Math.min(ae,ee/3);var ie=ae*me,le=new go.Geometry().add(new go.PathFigure(ae,0,!0).add(new go.PathSegment(go.PathSegment.Line,z-ae,0)).add(new go.PathSegment(go.PathSegment.Bezier,z,ae,z-ie,0,z,ie)).add(new go.PathSegment(go.PathSegment.Line,z,ee-ae)).add(new go.PathSegment(go.PathSegment.Bezier,z-ae,ee,z,ee-ie,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,ae,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ae,ie,ee,0,ee-ie)).add(new go.PathSegment(go.PathSegment.Line,0,ae)).add(new go.PathSegment(go.PathSegment.Bezier,ae,0,0,ie,ie,0).close()));return ie>1&&(le.spot1=new go.Spot(0,0,ie,ie),le.spot2=new go.Spot(1,1,-ie,-ie)),le}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(z,ee).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(z,ee).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(.5*z,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(de,z,ee){var ae=new go.Geometry(go.Geometry.Line);return ae.startX=0,ae.startY=ee/2,ae.endX=z,ae.endY=ee/2,ae}),go.Shape.defineFigureGenerator("LineV",function(de,z,ee){var ae=new go.Geometry(go.Geometry.Line);return ae.startX=z/2,ae.startY=0,ae.endX=z/2,ae.endY=ee,ae}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,ee/2,!1).add(new go.PathSegment(go.PathSegment.Line,z,ee/2)).add(new go.PathSegment(go.PathSegment.Move,z/2,0)).add(new go.PathSegment(go.PathSegment.Line,z/2,ee)))}),go.Shape.defineFigureGenerator("XLine",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)))}),go.Shape.defineFigureGenerator("LineRight",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(.25*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*z,ee)))}),go.Shape.defineFigureGenerator("LineDown",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,.25*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,.75*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)))}),go.Shape.defineFigureGenerator("LineLeft",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(.75*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*z,ee)))}),go.Shape.defineFigureGenerator("LineUp",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,.75*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(de,z,ee){var ae=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ae*z,(1-ae)*ee,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,ae*ee)).add(new go.PathSegment(go.PathSegment.Move,ae*z,ae*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,(1-ae)*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee/2)).add(new go.PathSegment(go.PathSegment.Line,z,ee/2)).add(new go.PathSegment(go.PathSegment.Move,z/2,0)).add(new go.PathSegment(go.PathSegment.Line,z/2,ee)))}),go.Shape.defineFigureGenerator("CircleLine",function(de,z,ee){var ae=z/2,ie=new go.Geometry().add(new go.PathFigure(z,z/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ae,ae,ae,ae).close()));return ie.spot1=De,ie.spot2=fe,ie.defaultStretch=go.GraphObject.Uniform,ie}),go.Shape.defineFigureGenerator("Line1",function(de,z,ee){var ae=new go.Geometry(go.Geometry.Line);return ae.startX=0,ae.startY=0,ae.endX=z,ae.endY=ee,ae}),go.Shape.defineFigureGenerator("Line2",function(de,z,ee){var ae=new go.Geometry(go.Geometry.Line);return ae.startX=z,ae.startY=0,ae.endX=0,ae.endY=ee,ae}),go.Shape.defineFigureGenerator("Curve1",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,z,ee,me*z,0,z,(1-me)*ee)))}),go.Shape.defineFigureGenerator("Curve2",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,z,ee,0,me*ee,(1-me)*z,ee)))}),go.Shape.defineFigureGenerator("Curve3",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,z,me*ee,me*z,ee)))}),go.Shape.defineFigureGenerator("Curve4",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,(1-me)*z,0,0,(1-me)*ee)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(z,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new mn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)?ae=.1:ae<-1?ae=-1:ae>1&&(ae=1);var ie=Math.abs(ae)*z;if(ae===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=ee,le}else{var le=new go.Geometry;return ae>0?le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,ee).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new mn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)?ae=10:ae<-z?ae=-z:ae>z&&(ae=z);var ie=Math.abs(ae);if(ae===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=ee,le}else{var le=new go.Geometry;return ae>0?le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,ee).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}}),go.Shape.setFigureParameter("Trapezoid1",0,new mn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)?ae=.2:ae<.5?ae=-.5:ae>.5&&(ae=.5);var ie=Math.abs(ae)*z;if(ae===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=ee,le}else{var le=new go.Geometry;return ae>0?le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,ee).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new mn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)?ae=20:ae<-z?ae=-z/2:ae>z&&(ae=z/2);var ie=Math.abs(ae);if(ae===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=ee,le}else{var le=new go.Geometry;return ae>0?le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,ee).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}}),go.Shape.setFigureParameter("ManualOperation",0,new mn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)?ae=10:ae<-z?ae=-z/2:ae>z&&(ae=z/2);var ie=Math.abs(ae);if(ae===0){var le=new go.Geometry(go.Geometry.Rectangle);return le.startX=0,le.startY=0,le.endX=z,le.endY=ee,le}else{var le=new go.Geometry;return ae>0?le.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,ee).close())):le.add(new go.PathFigure(ie,0).add(new go.PathSegment(go.PathSegment.Line,z-ie,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())),ie<z/2&&le.setSpots(ie/z,0,(z-ie)/z,1),le}});var ke=[];function Ce(){var de=ke.pop();return de===void 0?[]:de}function Se(de){de.length=0,ke.push(de)}function Me(de){for(var z=Ce(),ee=.5,ae=.5,ie=Math.PI*1.5,le=0,ue=0;ue<de;ue++)le=2*Math.PI/de*ue+ie,z[ue]=new go.Point(ae+ee*Math.cos(le),ae+ee*Math.sin(le));return z.push(z[0]),z}function ve(de){var z=we(de),ee=Ce();ee[0]=z[0];for(var ae=1,ie=1;ae<z.length;ae+=2,ie+=3)ee[ie]=z[ae],ee[ie+1]=z[ae],ee[ie+2]=z[ae+1];return Se(z),ee}function we(de){for(var z=Me(de),ee=Ce(),ae=Math.floor(z.length/2),ie=z.length-1,le=de%2===0?2:1,ue=0;ue<ie;ue++){var ge=z[ue],Pe=z[ue+1],je=z[(ae+ue-1)%ie],Be=z[(ae+ue+le)%ie];ee[ue*2]=ge,ee[ue*2+1]=oe(ge.x,ge.y,je.x,je.y,Pe.x,Pe.y,Be.x,Be.y,new go.Point)}return ee[ee.length]=ee[0],Se(z),ee}go.Shape.defineFigureGenerator("Pentagon",function(de,z,ee){var ae=Me(5),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<5;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.2,.22),ie.spot2=new go.Spot(.8,.9),ie}),go.Shape.defineFigureGenerator("Hexagon",function(de,z,ee){var ae=Me(6),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<6;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.07,.25),ie.spot2=new go.Spot(.93,.75),ie}),go.Shape.defineFigureGenerator("Heptagon",function(de,z,ee){var ae=Me(7),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<7;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.2,.15),ie.spot2=new go.Spot(.8,.85),ie}),go.Shape.defineFigureGenerator("Octagon",function(de,z,ee){var ae=Me(8),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<8;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.15,.15),ie.spot2=new go.Spot(.85,.85),ie}),go.Shape.defineFigureGenerator("Nonagon",function(de,z,ee){var ae=Me(9),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<9;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.17,.13),ie.spot2=new go.Spot(.82,.82),ie}),go.Shape.defineFigureGenerator("Decagon",function(de,z,ee){var ae=Me(10),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<10;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.16,.16),ie.spot2=new go.Spot(.84,.84),ie}),go.Shape.defineFigureGenerator("Dodecagon",function(de,z,ee){var ae=Me(12),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<12;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.16,.16),ie.spot2=new go.Spot(.84,.84),ie}),go.Shape.defineFigureGenerator("FivePointedStar",function(de,z,ee){var ae=we(5),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<10;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.266,.333),ie.spot2=new go.Spot(.733,.733),ie}),go.Shape.defineFigureGenerator("SixPointedStar",function(de,z,ee){var ae=we(6),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<12;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.17,.25),ie.spot2=new go.Spot(.83,.75),ie}),go.Shape.defineFigureGenerator("SevenPointedStar",function(de,z,ee){var ae=we(7),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<14;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.666),ie}),go.Shape.defineFigureGenerator("EightPointedStar",function(de,z,ee){var ae=we(8),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<16;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.25,.25),ie.spot2=new go.Spot(.75,.75),ie}),go.Shape.defineFigureGenerator("NinePointedStar",function(de,z,ee){var ae=we(9),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<18;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.666),ie}),go.Shape.defineFigureGenerator("TenPointedStar",function(de,z,ee){var ae=we(10),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<20;ue++)le.add(new go.PathSegment(go.PathSegment.Line,ae[ue].x*z,ae[ue].y*ee));return le.add(new go.PathSegment(go.PathSegment.Line,ae[0].x*z,ae[0].y*ee).close()),Se(ae),ie.spot1=new go.Spot(.281,.261),ie.spot2=new go.Spot(.723,.748),ie}),go.Shape.defineFigureGenerator("FivePointedBurst",function(de,z,ee){var ae=ve(5),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<ae.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,ae[ue+2].x*z,ae[ue+2].y*ee,ae[ue].x*z,ae[ue].y*ee,ae[ue+1].x*z,ae[ue+1].y*ee));return le.segments.last().close(),Se(ae),ie.spot1=new go.Spot(.222,.277),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("SixPointedBurst",function(de,z,ee){var ae=ve(6),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<ae.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,ae[ue+2].x*z,ae[ue+2].y*ee,ae[ue].x*z,ae[ue].y*ee,ae[ue+1].x*z,ae[ue+1].y*ee));return le.segments.last().close(),Se(ae),ie.spot1=new go.Spot(.17,.222),ie.spot2=new go.Spot(.833,.777),ie}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(de,z,ee){var ae=ve(7),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<ae.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,ae[ue+2].x*z,ae[ue+2].y*ee,ae[ue].x*z,ae[ue].y*ee,ae[ue+1].x*z,ae[ue+1].y*ee));return le.segments.last().close(),Se(ae),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("EightPointedBurst",function(de,z,ee){var ae=ve(8),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<ae.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,ae[ue+2].x*z,ae[ue+2].y*ee,ae[ue].x*z,ae[ue].y*ee,ae[ue+1].x*z,ae[ue+1].y*ee));return le.segments.last().close(),Se(ae),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("NinePointedBurst",function(de,z,ee){var ae=ve(9),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<ae.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,ae[ue+2].x*z,ae[ue+2].y*ee,ae[ue].x*z,ae[ue].y*ee,ae[ue+1].x*z,ae[ue+1].y*ee));return le.segments.last().close(),Se(ae),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.defineFigureGenerator("TenPointedBurst",function(de,z,ee){var ae=ve(10),ie=new go.Geometry,le=new go.PathFigure(ae[0].x*z,ae[0].y*ee,!0);ie.add(le);for(var ue=1;ue<ae.length;ue+=3)le.add(new go.PathSegment(go.PathSegment.Bezier,ae[ue+2].x*z,ae[ue+2].y*ee,ae[ue].x*z,ae[ue].y*ee,ae[ue+1].x*z,ae[ue+1].y*ee));return le.segments.last().close(),Se(ae),ie.spot1=new go.Spot(.222,.222),ie.spot2=new go.Spot(.777,.777),ie}),go.Shape.setFigureParameter("FramedRectangle",0,new mn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new mn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(de,z,ee){var ae=de?de.parameter1:NaN,ie=de?de.parameter2:NaN;isNaN(ae)&&(ae=8),isNaN(ie)&&(ie=8);var le=new go.Geometry,ue=new go.PathFigure(0,0,!0);return le.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae<z/2&&ie<ee/2&&(ue.add(new go.PathSegment(go.PathSegment.Move,ae,ie)),ue.add(new go.PathSegment(go.PathSegment.Line,ae,ee-ie)),ue.add(new go.PathSegment(go.PathSegment.Line,z-ae,ee-ie)),ue.add(new go.PathSegment(go.PathSegment.Line,z-ae,ie).close())),le.setSpots(0,0,1,1,ae,ie,-ae,-ie),le}),go.Shape.setFigureParameter("Ring",0,new mn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=8);var ie=z/2,le=new go.Geometry,ue=new go.PathFigure(z,z/2,!0);le.add(ue),ue.add(new go.PathSegment(go.PathSegment.Arc,0,360,ie,ie,ie,ie).close());var ge=Math.max(ie-ae,0);return ge>0&&(ue.add(new go.PathSegment(go.PathSegment.Move,z/2+ge,z/2)),ue.add(new go.PathSegment(go.PathSegment.Arc,0,-360,ie,ie,ge,ge).close())),le.spot1=De,le.spot2=fe,le.defaultStretch=go.GraphObject.Uniform,le}),go.Shape.defineFigureGenerator("Cloud",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(.08034461*z,.1944299*ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*z,.05349299*ee,-.09239631*z,.07836421*ee,.1406031*z,-.0542823*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*z,.074219*ee,.2450511*z,-.00697547*ee,.3776197*z,-.01112067*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*z,.07004196*ee,.4539471*z,0,.6066018*z,-.02526587*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*z,.08370865*ee,.6914277*z,-.01904177*ee,.8921095*z,-.01220843*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*z,.3194596*ee,1.036446*z,.04105738*ee,1.020377*z,.3022052*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*z,.562044*ee,1.04448*z,.360238*ee,.992256*z,.5219009*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*z,.8217117*ee,1.032337*z,.5771781*ee,1.018411*z,.8120651*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*z,.9156953*ee,1.028411*z,.9571472*ee,.8556702*z,1.052487*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*z,.9310455*ee,.7431877*z,1.009325*ee,.5624123*z,1.021761*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*z,.9344623*ee,.4820677*z,1.031761*ee,.3030112*z,1.002796*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*z,.870098*ee,.2329994*z,1.01518*ee,.03213784*z,1.01518*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*z,.6545475*ee,-.02812061*z,.9032597*ee,-.01205169*z,.6835638*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*z,.4265613*ee,-.01812061*z,.6089503*ee,-.00606892*z,.4555777*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*z,.1944299*ee,-.01606892*z,.3892545*ee,-.01205169*z,.1944299*ee))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(de,z,ee){var ae=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ae*z,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ae*ee)).add(new go.PathSegment(go.PathSegment.Line,z,(1-ae)*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,ee)).add(new go.PathSegment(go.PathSegment.Line,ae*z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ae)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ae*ee).close())).setSpots(ae/2,ae/2,1-ae/2,1-ae/2)}),go.Shape.setFigureParameter("Pie",0,new mn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new mn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(de,z,ee){var ae=de?de.parameter1:NaN,ie=de?de.parameter2:NaN;isNaN(ae)&&(ae=0),isNaN(ie)&&(ie=315);var le=ae%360;le<0&&(le+=360);var ue=ie%360,ge=Math.min(z,ee)/2;return new go.Geometry().add(new go.PathFigure(ge,ge).add(new go.PathSegment(go.PathSegment.Arc,le,ue,ge,ge,ge,ge).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(de,z,ee){var ae=me/Math.SQRT2*.5,ie=Math.SQRT2/2,le=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(z,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,ie*z,le*ee,z,(1-ae)*ee,(ie+ae)*z,(le+ae)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()))}),go.Shape.setFigureParameter("ThickCross",0,new mn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=30);var ie=Math.min(ae,z)/2,le=z/2,ue=ee/2;return new go.Geometry().add(new go.PathFigure(le-ie,0,!0).add(new go.PathSegment(go.PathSegment.Line,le+ie,0)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ee)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ue-ie).close()))}),go.Shape.setFigureParameter("ThinCross",0,new mn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=10);var ie=Math.min(ae,z)/2,le=z/2,ue=ee/2;return new go.Geometry().add(new go.PathFigure(le-ie,0,!0).add(new go.PathSegment(go.PathSegment.Line,le+ie,0)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,z,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,le+ie,ee)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ee)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ue+ie)).add(new go.PathSegment(go.PathSegment.Line,0,ue-ie)).add(new go.PathSegment(go.PathSegment.Line,le-ie,ue-ie).close()))}),go.Shape.setFigureParameter("ThickX",0,new mn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(de,z,ee){var ae=de?de.parameter1:NaN;if((isNaN(ae)||ae<0)&&(ae=30),z===0||ee===0){var ie=new go.Geometry(go.Geometry.Rectangle);return ie.startX=0,ie.startY=0,ie.endX=z,ie.endY=ee,ie}else{var le=z/2,ue=ee/2,ge=Math.atan2(ee,z),Pe=ae-Math.min(Math.cos(ge)*ae/2,le),je=ae-Math.min(Math.sin(ge)*ae/2,ue),ie=new go.Geometry,Be=new go.PathFigure(Pe,0,!0);return ie.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,le,.2*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,z-Pe,0)),Be.add(new go.PathSegment(go.PathSegment.Line,z,je)),Be.add(new go.PathSegment(go.PathSegment.Line,.8*z,ue)),Be.add(new go.PathSegment(go.PathSegment.Line,z,ee-je)),Be.add(new go.PathSegment(go.PathSegment.Line,z-Pe,ee)),Be.add(new go.PathSegment(go.PathSegment.Line,le,.8*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,Pe,ee)),Be.add(new go.PathSegment(go.PathSegment.Line,0,ee-je)),Be.add(new go.PathSegment(go.PathSegment.Line,.2*z,ue)),Be.add(new go.PathSegment(go.PathSegment.Line,0,je).close()),ie}}),go.Shape.setFigureParameter("ThinX",0,new mn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=10);var ie=new go.Geometry,le=new go.PathFigure(.1*z,0,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee).close()),ie}),go.Shape.setFigureParameter("SquareIBeam",0,new mn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.2);var ie=new go.Geometry,le=new go.PathFigure(0,0,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ae*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5+ae/2)*z,ae*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5+ae/2)*z,(1-ae)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,(1-ae)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,(1-ae)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5-ae/2)*z,(1-ae)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(.5-ae/2)*z,ae*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ae*ee).close()),ie}),go.Shape.setFigureParameter("RoundedIBeam",0,new mn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.5);var ie=new go.Geometry,le=new go.PathFigure(0,0,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,ee,Math.abs(1-ae)*z,.25*ee,Math.abs(1-ae)*z,.75*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ae*z,.75*ee,ae*z,.25*ee).close()),ie}),go.Shape.defineFigureGenerator("HalfEllipse",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,me*z,0,z,(.5-me/2)*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,z,(.5+me/2)*ee,me*z,ee).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,z,0,z,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*z,.75*ee,.5*z,.25*ee).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(.5*z,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,.1*z,.8*ee,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,0,0,.45*z,0)).add(new go.PathSegment(go.PathSegment.Bezier,z,.3*ee,.55*z,0,z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,.5*ee,.9*z,.8*ee).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(.5*z,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*z,.01*ee)).add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,.6*z,.2*ee,z,.25*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.7*ee,z,.8*ee,.6*z,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.75*z,ee,.5*z,.75*ee,.55*z,.95*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*z,ee)).add(new go.PathSegment(go.PathSegment.Bezier,.45*z,.7*ee,.45*z,.95*ee,.5*z,.75*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.4*z,.8*ee,0,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.49*z,.01*ee,0,.25*ee,.4*z,.2*ee).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.4*z,.6*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.15*z,ee,.5*z,.75*ee,.45*z,.95*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.6*z,.6*ee,.55*z,.95*ee,.5*z,.75*ee));var le=.2,ue=.3,ge=0,Pe=le*me;return ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5+le+ge)*ee,(.5-le+ue)*z,(.5+Pe+ge)*ee,(.5-Pe+ue)*z,(.5+le+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+le+ue)*z,(.5+ge)*ee,(.5+Pe+ue)*z,(.5+le+ge)*ee,(.5+le+ue)*z,(.5+Pe+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-le+ge)*ee,(1-.5+le+ue)*z,(.5-Pe+ge)*ee,(.5+Pe+ue)*z,(.5-le+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.65*z,.36771243*ee,(.5-Pe+ue)*z,(.5-le+ge)*ee,(.5-le+ue+.05)*z,(.5-Pe+ge-.02)*ee)),le=.2,ue=0,ge=-.3,Pe=le*me,ie.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+le+ue)*z,(.5+ge)*ee,(.5+Pe+ue)*z,(.5+le+ge)*ee,(.5+le+ue)*z,(.5+Pe+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-le+ge)*ee,(1-.5+le+ue)*z,(.5-Pe+ge)*ee,(.5+Pe+ue)*z,(.5-le+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-le+ue)*z,(.5+ge)*ee,(.5-Pe+ue)*z,(.5-le+ge)*ee,(.5-le+ue)*z,(.5-Pe+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Pe+ue)*z,(.5+le+ge)*ee,(.5-le+ue)*z,(.5+Pe+ge)*ee,(.5-Pe+ue)*z,(.5+le+ge)*ee)),le=.2,ue=-.3,ge=0,Pe=le*me,ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5-le+ge)*ee,(1-.5+le+ue-.05)*z,(.5-Pe+ge-.02)*ee,(.5+Pe+ue)*z,(.5-le+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5-le+ue)*z,(.5+ge)*ee,(.5-Pe+ue)*z,(.5-le+ge)*ee,(.5-le+ue)*z,(.5-Pe+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ue)*z,(.5+le+ge)*ee,(.5-le+ue)*z,(.5+Pe+ge)*ee,(.5-Pe+ue)*z,(.5+le+ge)*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.6*ee,(.5+Pe+ue)*z,(.5+le+ge)*ee,(.5+le+ue)*z,(.5+Pe+ge)*ee).close()),ae.setSpots(.06,.33,.93,.68),ae}),go.Shape.defineFigureGenerator("YinYang",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*.5,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,z*.5,z*.5,z*.5,z*.5)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,-180,z*.5,z*.75,z*.25,z*.25)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,180,z*.5,z*.25,z*.25,z*.25));var le=.1,ue=.5,ge=.25;return ie.add(new go.PathSegment(go.PathSegment.Move,(ue+le)*z,ge*ee)),ie.add(new go.PathSegment(go.PathSegment.Arc,0,-360,z*ue,ee*ge,le*z,le*z).close()),ie=new go.PathFigure(z*.5,0,!1),ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,-180,z*.5,z*.5,z*.5,z*.5)),ge=.75,ie=new go.PathFigure((ue+le)*z,ge*ee,!0),ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,0,360,z*ue,ee*ge,le*z,le*z).close()),ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("Peace",function(de,z,ee){var ae=.8535533905932737,ie=.5*z,le=.5*ee;return new go.Geometry().add(new go.PathFigure(ie,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,ie,le,ie,le)).add(new go.PathSegment(go.PathSegment.Line,ie,ee)).add(new go.PathSegment(go.PathSegment.Move,ie,le)).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,ae*ee)).add(new go.PathSegment(go.PathSegment.Move,ie,le)).add(new go.PathSegment(go.PathSegment.Line,ae*z,ae*ee)))}),go.Shape.defineFigureGenerator("NotAllowed",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=.5,ue=.5,ge=.5,Pe=new go.PathFigure(ue*z,(ge-le)*ee);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,ge*ee,(ue-ie)*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+le)*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,ge*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-le)*ee,(ue+le)*z,(ge-ie)*ee,(ue+ie)*z,(ge-le)*ee)),le=.4,ie=me*.4;var je=pt(),Be=pt(),Fe=pt(),Ne=pt();Ge(ue,ge-le,ue+ie,ge-le,ue+le,ge-ie,ue+le,ge,.42,je,Be,Fe,Ne,Ne);var Ae=pt(),Re=pt(),We=pt();Ge(ue,ge-le,ue+ie,ge-le,ue+le,ge-ie,ue+le,ge,.58,Ne,Ne,We,Ae,Re);var Ye=pt(),Ue=pt(),Ke=pt();Ge(ue,ge+le,ue-ie,ge+le,ue-le,ge+ie,ue-le,ge,.42,Ye,Ue,Ke,Ne,Ne);var ot=pt(),ut=pt(),ft=pt();return Ge(ue,ge+le,ue-ie,ge+le,ue-le,ge+ie,ue-le,ge,.58,Ne,Ne,ft,ot,ut),Pe.add(new go.PathSegment(go.PathSegment.Move,ft.x*z,ft.y*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,ge*ee,ot.x*z,ot.y*ee,ut.x*z,ut.y*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Fe.x*z,Fe.y*ee,je.x*z,je.y*ee,Be.x*z,Be.y*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,ft.x*z,ft.y*ee).close()),Pe.add(new go.PathSegment(go.PathSegment.Move,Ke.x*z,Ke.y*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,We.x*z,We.y*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,ge*ee,Ae.x*z,Ae.y*ee,Re.x*z,Re.y*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Ke.x*z,Ke.y*ee,Ye.x*z,Ye.y*ee,Ue.x*z,Ue.y*ee).close()),Dt(je),Dt(Be),Dt(Fe),Dt(Ne),Dt(Ae),Dt(Re),Dt(We),Dt(Ye),Dt(Ue),Dt(Ke),Dt(ot),Dt(ut),Dt(ft),ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("Fragile",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*z,0)).add(new go.PathSegment(go.PathSegment.Line,.2*z,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.29*z,.33*ee)).add(new go.PathSegment(go.PathSegment.Line,.35*z,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.5*ee,z,.25*ee,.75*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.55*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.5*ee,0,.25*ee).close()))}),go.Shape.setFigureParameter("HourGlass",0,new mn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=30),ae>z&&(ae=z);var ie=(z-ae)/2,le=ie+ae;return new go.Geometry().add(new go.PathFigure(le,.5*ee).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,ie,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,z,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,.55*ee).add(new go.PathSegment(go.PathSegment.Line,.6*z,0)).add(new go.PathSegment(go.PathSegment.Line,.3*z,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.55*ee).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(de,z,ee){var ae=new go.Geometry,ie=me*.4,le=.4,ue=.5,ge=.5,Pe=pt(),je=pt(),Be=pt(),Fe=pt(),Ne=new go.PathFigure((ue-le)*z,ge*ee,!1);ae.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee)),Ge(ue,ge-le,ue+ie,ge-le,ue+le,ge-ie,ue+le,ge,.44,Be,Fe,je,Pe,Pe),Ne.add(new go.PathSegment(go.PathSegment.Bezier,je.x*z,je.y*ee,Be.x*z,Be.y*ee,Fe.x*z,Fe.y*ee));var Ae=st(je.x,je.y);Ge(ue,ge-le,ue+ie,ge-le,ue+le,ge-ie,ue+le,ge,.56,Pe,Pe,je,Be,Fe);var Re=st(je.x,je.y);Ne.add(new go.PathSegment(go.PathSegment.Line,(Ae.x*.1+.95*.9)*z,Ae.y*.1*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.85*z,Ae.y*.1*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.85*z,0)),Ne.add(new go.PathSegment(go.PathSegment.Line,z,0)),Ne.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,(Re.x*.1+.9)*z,.15*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,(Re.x*.1+.9)*z,(Re.y*.1+.05*.9)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,Re.x*z,Re.y*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,ge*ee,Be.x*z,Be.y*ee,Fe.x*z,Fe.y*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,ge*ee,(ue-ie)*z,(ge+le)*ee,(ue-le)*z,(ge+ie)*ee)),le=.35,ie=me*.35;var We=new go.PathFigure(ue*z,(ge-le)*ee,!1);ae.add(We),We.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,ge*ee,(ue-ie)*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee)),We.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+le)*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee)),We.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,ge*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),We.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-le)*ee,(ue+le)*z,(ge-ie)*ee,(ue+ie)*z,(ge-le)*ee));var Ye=new go.PathFigure((ue-le)*z,ge*ee,!1);return ae.add(Ye),Dt(Pe),Dt(je),Dt(Be),Dt(Fe),Dt(Ae),Dt(Re),ae.spot1=new go.Spot(.202,.257),ae.spot2=new go.Spot(.792,.739),ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("GenderFemale",function(de,z,ee){var ae=new go.Geometry,ie=.375,le=0,ue=-.125,ge=ie*me,Pe=new go.PathFigure((.525+le)*z,(.5+ie+ue)*ee,!1);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+le)*z,(.5+ue)*ee,(.5+ge+le)*z,(.5+ie+ue)*ee,(.5+ie+le)*z,(.5+ge+ue)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5-ie+ue)*ee,(1-.5+ie+le)*z,(.5-ge+ue)*ee,(.5+ge+le)*z,(.5-ie+ue)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+le)*z,(.5+ue)*ee,(.5-ge+le)*z,(.5-ie+ue)*ee,(.5-ie+le)*z,(.5-ge+ue)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.475+le)*z,(.5+ie+ue)*ee,(.5-ie+le)*z,(.5+ge+ue)*ee,(.5-ge+le)*z,(.5+ie+ue)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.475*z,.85*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.425*z,.85*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.425*z,.9*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.475*z,.9*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.475*z,ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.525*z,ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.525*z,.9*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.575*z,.9*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.575*z,.85*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.525*z,.85*ee).close()),ie=.325,le=0,ue=-.125,ge=ie*me;var Pe=new go.PathFigure((1-.5+ie+le)*z,(.5+ue)*ee,!1);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5+ie+ue)*ee,(.5+ie+le)*z,(.5+ge+ue)*ee,(.5+ge+le)*z,(.5+ie+ue)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+le)*z,(.5+ue)*ee,(.5-ge+le)*z,(.5+ie+ue)*ee,(.5-ie+le)*z,(.5+ge+ue)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+le)*z,(.5-ie+ue)*ee,(.5-ie+le)*z,(.5-ge+ue)*ee,(.5-ge+le)*z,(.5-ie+ue)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ie+le)*z,(.5+ue)*ee,(.5+ge+le)*z,(.5-ie+ue)*ee,(1-.5+ie+le)*z,(.5-ge+ue)*ee));var Pe=new go.PathFigure((.525+le)*z,(.5+ie+ue)*ee,!1);return ae.add(Pe),ae.spot1=new go.Spot(.232,.136),ae.spot2=new go.Spot(.682,.611),ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("LogicImplies",function(de,z,ee){var ae=de?de.parameter1:NaN;return isNaN(ae)&&(ae=.2),new go.Geometry().add(new go.PathFigure((1-ae)*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(de,z,ee){var ae=de?de.parameter1:NaN;return isNaN(ae)&&(ae=.2),new go.Geometry().add(new go.PathFigure((1-ae)*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ae)*z,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,ae*z,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,ae*z,ee))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)))}),go.Shape.defineFigureGenerator("LogicAnd",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Line,z,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(de,z,ee){var ae=new go.Geometry().add(new go.PathFigure(.5*z,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*z,.5*ee,.5*z,.5*ee)));return ae.defaultStretch=go.GraphObject.Uniform,ae}),go.Shape.defineFigureGenerator("LogicTruth",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,.5*z,0)).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Move,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)))}),go.Shape.defineFigureGenerator("LogicForAll",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,.25*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*ee))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee)).add(new go.PathSegment(go.PathSegment.Line,z,ee))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(de,z,ee){var ae=.5;return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,0,ae*ee)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ae*z,ae*ee,ae*z,ae*ee)).add(new go.PathSegment(go.PathSegment.Line,z,ee))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(de,z,ee){var ae=.5;return new go.Geometry().add(new go.PathFigure(z,0,!1).add(new go.PathSegment(go.PathSegment.Line,z,ae*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ae*z,ae*ee,ae*z,ae*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new mn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new mn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.3);var ie=de?de.parameter2:NaN;isNaN(ie)&&(ie=.3);var le=(1-ae)*z,ue=(.5-ie/2)*ee,ge=(.5+ie/2)*ee,Pe=new go.Geometry,je=new go.PathFigure(0,ue,!0);Pe.add(je),je.add(new go.PathSegment(go.PathSegment.Line,le,ue)),je.add(new go.PathSegment(go.PathSegment.Line,le,0)),je.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),je.add(new go.PathSegment(go.PathSegment.Line,le,ee)),je.add(new go.PathSegment(go.PathSegment.Line,le,ge)),je.add(new go.PathSegment(go.PathSegment.Line,0,ge).close()),Pe.spot1=new go.Spot(0,ue/ee);var Be=oe(0,ge/ee,1,ge/ee,le/z,1,1,.5,pt());return Pe.spot2=new go.Spot(Be.x,Be.y),Dt(Be),Pe}),go.Shape.setFigureParameter("Arrow2",0,new mn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new mn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=30),ae>z&&(ae=z);var ie=de?de.parameter2:NaN;isNaN(ie)&&(ie=30),ie=Math.min(ie,ee/2);var le=z-ae,ue=(ee-ie)/2,ge=ue+ie,Pe=new go.Geometry,je=new go.PathFigure(0,ue,!0);Pe.add(je),je.add(new go.PathSegment(go.PathSegment.Line,le,ue)),je.add(new go.PathSegment(go.PathSegment.Line,le,0)),je.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),je.add(new go.PathSegment(go.PathSegment.Line,le,ee)),je.add(new go.PathSegment(go.PathSegment.Line,le,ge)),je.add(new go.PathSegment(go.PathSegment.Line,0,ge).close()),Pe.spot1=new go.Spot(0,ue/ee);var Be=oe(0,ge/ee,1,ge/ee,le/z,1,1,.5,pt());return Pe.spot2=new go.Spot(Be.x,Be.y),Dt(Be),Pe}),go.Shape.defineFigureGenerator("Chevron",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee).close()),ae}),go.Shape.defineFigureGenerator("DoubleArrow",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.214*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,1*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.786*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,1*ee).close()),ae}),go.Shape.setFigureParameter("DoubleEndArrow",0,new mn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.3);var ie=(.5-ae/2)*ee,le=(.5+ae/2)*ee,ue=new go.Geometry,ge=new go.PathFigure(z,.5*ee,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),ge.add(new go.PathSegment(go.PathSegment.Line,.3*z,le)),ge.add(new go.PathSegment(go.PathSegment.Line,.3*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),ge.add(new go.PathSegment(go.PathSegment.Line,.3*z,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close());var Pe=oe(0,.5,.3,0,0,ie/ee,.1,ie/ee,pt());return ue.spot1=new go.Spot(Pe.x,Pe.y),Pe=oe(.7,1,1,.5,0,le/ee,1,le/ee,Pe),ue.spot2=new go.Spot(Pe.x,Pe.y),Dt(Pe),ue}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new mn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new mn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=40);var ie=de?de.parameter2:NaN;isNaN(ie)&&(ie=100);var le=(ee-ae)/2,ue=le+ae,ge=(ee-ie)/2,Pe=ge+ie;(ae>ee||ie>ee)&&(ie>ae?(ae=ae*ee/ie,le=(ee-ae)/2,ue=le+ae,ge=0,Pe=ee):(le=0,ue=ee,ge=0,Pe=ee));var je=new go.Geometry,Be=new go.PathFigure(z,.5*ee,!0);je.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,.7*z,Pe)),Be.add(new go.PathSegment(go.PathSegment.Line,.7*z,ue)),Be.add(new go.PathSegment(go.PathSegment.Line,.3*z,ue)),Be.add(new go.PathSegment(go.PathSegment.Line,.3*z,Pe)),Be.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.3*z,ge)),Be.add(new go.PathSegment(go.PathSegment.Line,.3*z,le)),Be.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),Be.add(new go.PathSegment(go.PathSegment.Line,.7*z,ge).close());var Fe=oe(0,.5,.3,ge/ee,0,le/ee,1,le/ee,pt());return je.spot1=new go.Spot(Fe.x,Fe.y),Fe=oe(.7,Pe/ee,1,.5,0,ue/ee,1,ue/ee,Fe),je.spot2=new go.Spot(Fe.x,Fe.y),Dt(Fe),je}),go.Shape.setFigureParameter("IBeamArrow",0,new mn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.3);var ie=(.5-ae/2)*ee,le=(.5+ae/2)*ee,ue=new go.Geometry,ge=new go.PathFigure(z,.5*ee,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),ge.add(new go.PathSegment(go.PathSegment.Line,.2*z,le)),ge.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,0,0)),ge.add(new go.PathSegment(go.PathSegment.Line,.2*z,0)),ge.add(new go.PathSegment(go.PathSegment.Line,.2*z,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ue.spot1=new go.Spot(0,ie/ee);var Pe=oe(.7,1,1,.5,0,le/ee,1,le/ee,pt());return ue.spot2=new go.Spot(Pe.x,Pe.y),Dt(Pe),ue}),go.Shape.setFigureParameter("IBeamArrow2",0,new mn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new mn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=40);var ie=de?de.parameter2:NaN;isNaN(ie)&&(ie=100);var le=(ee-ae)/2,ue=le+ae,ge=(ee-ie)/2,Pe=ge+ie;(ae>ee||ie>ee)&&(ie>ae?(ae=ae*ee/ie,le=(ee-ae)/2,ue=le+ae,ge=0,Pe=ee):(le=0,ue=ee,ge=0,Pe=ee));var je=new go.Geometry,Be=new go.PathFigure(z,.5*ee,!0);je.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,.7*z,Pe)),Be.add(new go.PathSegment(go.PathSegment.Line,.7*z,ue)),Be.add(new go.PathSegment(go.PathSegment.Line,.2*z,ue)),Be.add(new go.PathSegment(go.PathSegment.Line,.2*z,Pe)),Be.add(new go.PathSegment(go.PathSegment.Line,0,Pe)),Be.add(new go.PathSegment(go.PathSegment.Line,0,ge)),Be.add(new go.PathSegment(go.PathSegment.Line,.2*z,ge)),Be.add(new go.PathSegment(go.PathSegment.Line,.2*z,le)),Be.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),Be.add(new go.PathSegment(go.PathSegment.Line,.7*z,ge).close()),je.spot1=new go.Spot(0,le/ee);var Fe=oe(.7,Pe/ee,1,.5,0,ue/ee,1,ue/ee,pt());return je.spot2=new go.Spot(Fe.x,Fe.y),Dt(Fe),je}),go.Shape.setFigureParameter("Pointer",0,new mn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.1);var ie=new go.Geometry,le=new go.PathFigure(z,.5*ee,!0);ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,ae*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),ie.spot1=new go.Spot(ae,.35);var ue=oe(.2,.65,1,.65,0,1,1,.5,pt());return ie.spot2=new go.Spot(ue.x,ue.y),Dt(ue),ie}),go.Shape.setFigureParameter("RoundedPointer",0,new mn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.3);var ie=new go.Geometry,le=new go.PathFigure(z,.5*ee,!0);ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ae*z,.75*ee,ae*z,.25*ee).close()),ie.spot1=new go.Spot(ae,.35);var ue=oe(0,.65,1,.65,0,1,1,.5,pt());return ie.spot2=new go.Spot(ue.x,ue.y),Dt(ue),ie}),go.Shape.setFigureParameter("SplitEndArrow",0,new mn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.4);var ie=(.5-ae/2)*ee,le=(.5+ae/2)*ee,ue=new go.Geometry,ge=new go.PathFigure(z,.5*ee,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),ge.add(new go.PathSegment(go.PathSegment.Line,0,le)),ge.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,0,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ue.spot1=new go.Spot(.2,.3);var Pe=oe(.7,1,1,.5,0,le/ee,1,le/ee,pt());return ue.spot2=new go.Spot(Pe.x,Pe.y),Dt(Pe),ue}),go.Shape.setFigureParameter("SplitEndArrow2",0,new mn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=50);var ie=(ee-ae)/2,le=ie+ae;ae>ee&&(ie=0,le=ee);var ue=new go.Geometry,ge=new go.PathFigure(z,.5*ee,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,le)),ge.add(new go.PathSegment(go.PathSegment.Line,0,le)),ge.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,0,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*z,0).close()),ue.spot1=new go.Spot(.2,ie/ee);var Pe=oe(.7,1,1,.5,0,le/ee,1,le/ee,pt());return ue.spot2=new go.Spot(Pe.x,Pe.y),Dt(Pe),ue}),go.Shape.setFigureParameter("SquareArrow",0,new mn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.7);var ie=new go.Geometry,le=new go.PathFigure(z,.5*ee,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,ae*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,0)),le.add(new go.PathSegment(go.PathSegment.Line,ae*z,0).close()),ie.spot1=go.Spot.TopLeft,ie.spot2=new go.Spot(ae,1),ie}),go.Shape.defineFigureGenerator("Cone1",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=me*.1,ue=new go.PathFigure(0,.9*ee,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+le)*ee,(.5+ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-ie)*z,ee,0,(.9+le)*ee).close()),ae.spot1=new go.Spot(.25,.5),ae.spot2=new go.Spot(.75,.97),ae}),go.Shape.defineFigureGenerator("Cone2",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.9*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.9*ee,(1-.85/.9)*z,ee,.85/.9*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee).close());var le=new go.PathFigure(0,.9*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.9*ee,(1-.85/.9)*z,.8*ee,.85/.9*z,.8*ee)),ae.spot1=new go.Spot(.25,.5),ae.spot2=new go.Spot(.75,.82),ae}),go.Shape.defineFigureGenerator("Cube1",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var le=new go.PathFigure(.5*z,ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.5*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),ae.spot1=new go.Spot(0,.3),ae.spot2=new go.Spot(.5,.85),ae}),go.Shape.defineFigureGenerator("Cube2",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.3*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,0).close());var le=new go.PathFigure(0,.3*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.7*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Move,.7*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.7*z,ee)),ae.spot1=new go.Spot(0,.3),ae.spot2=new go.Spot(.7,1),ae}),go.Shape.defineFigureGenerator("Cylinder1",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=5),ae=Math.min(ae,ee/3);var ie=new go.Geometry,le=me*.5,ue=new go.PathFigure(0,ae,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,me*ae,(.5-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,1*z,ae,(.5+le)*z,0,1*z,me*ae)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-ae)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,1*ee,1*z,ee-me*ae,(.5+le)*z,1*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ae,(.5-le)*z,1*ee,0,ee-me*ae)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ae));var ge=new go.PathFigure(z,ae,!1);return ie.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,2*ae,1*z,2*ae-me*ae,(.5+le)*z,2*ae)),ge.add(new go.PathSegment(go.PathSegment.Bezier,0,ae,(.5-le)*z,2*ae,0,2*ae-me*ae)),ie.spot1=new go.Spot(0,0,0,2*ae),ie.spot2=new go.Spot(1,1),ie}),go.Shape.defineFigureGenerator("Cylinder2",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=5),ae=Math.min(ae,ee/3);var ie=new go.Geometry,le=me*.5,ue=new go.PathFigure(0,ee-ae,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,0,ae)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,me*ae,(.5-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,ae,(.5+le)*z,0,z,me*ae)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-ae)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,ee-me*ae,(.5+le)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ae,(.5-le)*z,ee,0,ee-me*ae));var ge=new go.PathFigure(0,ee-ae,!1);return ie.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee-2*ae,0,ee-ae-me*ae,(.5-le)*z,ee-2*ae)),ge.add(new go.PathSegment(go.PathSegment.Bezier,z,ee-ae,(.5+le)*z,ee-2*ae,z,ee-ae-me*ae)),ie.spot1=new go.Spot(0,0),ie.spot2=new go.Spot(1,1,0,-2*ae),ie}),go.Shape.defineFigureGenerator("Cylinder3",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=5),ae=Math.min(ae,z/3);var ie=new go.Geometry,le=me*.5,ue=new go.PathFigure(ae,0,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z-ae,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,z-me*ae,0,z,(.5-le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-ae,ee,z,(.5+le)*ee,z-me*ae,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,ae,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,me*ae,ee,0,(.5+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ae,0,0,(.5-le)*ee,me*ae,0));var ge=new go.PathFigure(ae,0,!1);return ie.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,2*ae,.5*ee,ae+me*ae,0,2*ae,(.5-le)*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,ae,ee,2*ae,(.5+le)*ee,ae+me*ae,ee)),ie.spot1=new go.Spot(0,0,2*ae,0),ie.spot2=new go.Spot(1,1),ie}),go.Shape.defineFigureGenerator("Cylinder4",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=5),ae=Math.min(ae,z/3);var ie=new go.Geometry,le=me*.5,ue=new go.PathFigure(z-ae,0,!0);ie.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,z-me*ae,0,z,(.5-le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-ae,ee,z,(.5+le)*ee,z-me*ae,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,ae,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,me*ae,ee,0,(.5+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ae,0,0,(.5-le)*ee,me*ae,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z-ae,0));var ge=new go.PathFigure(z-ae,0,!1);return ie.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,z-2*ae,.5*ee,z-ae-me*ae,0,z-2*ae,(.5-le)*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,z-ae,ee,z-2*ae,(.5+le)*ee,z-ae-me*ae,ee)),ie.spot1=new go.Spot(0,0),ie.spot2=new go.Spot(1,1,-2*ae,0),ie}),go.Shape.defineFigureGenerator("Prism1",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.25*z,.25*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var le=new go.PathFigure(.25*z,.25*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ae.spot1=new go.Spot(.408,.172),ae.spot2=new go.Spot(.833,.662),ae}),go.Shape.defineFigureGenerator("Prism2",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.25*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var le=new go.PathFigure(0,ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),le.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.25*z,.5*ee)),ae.spot1=new go.Spot(.25,.5),ae.spot2=new go.Spot(.75,.75),ae}),go.Shape.defineFigureGenerator("Pyramid1",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee).close());var le=new go.PathFigure(.5*z,0,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ae.spot1=new go.Spot(.25,.367),ae.spot2=new go.Spot(.75,.875),ae}),go.Shape.defineFigureGenerator("Pyramid2",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var le=new go.PathFigure(.5*z,0,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.7*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),ae.spot1=new go.Spot(.25,.367),ae.spot2=new go.Spot(.75,.875),ae}),go.Shape.defineFigureGenerator("Actor",function(de,z,ee){var ae=new go.Geometry,ie=.2,le=.1,ue=me*ie,ge=me*le,Pe=.5,je=.1,Be=new go.PathFigure(Pe*z,(je+le)*ee,!0);ae.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ie)*z,je*ee,(Pe-ue)*z,(je+le)*ee,(Pe-ie)*z,(je+ge)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je-le)*ee,(Pe-ie)*z,(je-ge)*ee,(Pe-ue)*z,(je-le)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ie)*z,je*ee,(Pe+ue)*z,(je-le)*ee,(Pe+ie)*z,(je-ge)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je+le)*ee,(Pe+ie)*z,(je+ge)*ee,(Pe+ue)*z,(je+le)*ee));var Fe=.05,Ne=me*Fe;Pe=.05,je=.25;var Ae=new go.PathFigure(.5*z,.2*ee,!0);return ae.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,.95*z,.2*ee)),Pe=.95,je=.25,Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+Fe)*z,je*ee,(Pe+Ne)*z,(je-Fe)*ee,(Pe+Fe)*z,(je-Ne)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,z,.6*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.85*z,.35*ee)),Fe=.025,Ne=me*Fe,Pe=.825,je=.35,Ae.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je-Fe)*ee,(Pe+Fe)*z,(je-Ne)*ee,(Pe+Ne)*z,(je-Fe)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-Fe)*z,je*ee,(Pe-Ne)*z,(je-Fe)*ee,(Pe-Fe)*z,(je-Ne)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.55*z,ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*ee)),Fe=.05,Ne=me*Fe,Pe=.5,je=.7,Ae.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je-Fe)*ee,(Pe+Fe)*z,(je-Ne)*ee,(Pe+Ne)*z,(je-Fe)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-Fe)*z,je*ee,(Pe-Ne)*z,(je-Fe)*ee,(Pe-Fe)*z,(je-Ne)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.45*z,ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*z,.35*ee)),Fe=.025,Ne=me*Fe,Pe=.175,je=.35,Ae.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je-Fe)*ee,(Pe+Fe)*z,(je-Ne)*ee,(Pe+Ne)*z,(je-Fe)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-Fe)*z,je*ee,(Pe-Ne)*z,(je-Fe)*ee,(Pe-Fe)*z,(je-Ne)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),Fe=.05,Ne=me*Fe,Pe=.05,je=.25,Ae.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je-Fe)*ee,(Pe-Fe)*z,(je-Ne)*ee,(Pe-Ne)*z,(je-Fe)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.5*z,.2*ee)),ae.spot1=new go.Spot(.2,.2),ae.spot2=new go.Spot(.8,.65),ae}),go.Shape.setFigureParameter("Card",0,new mn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(de,z,ee){var ae=de?de.parameter1:NaN;isNaN(ae)&&(ae=.2);var ie=new go.Geometry,le=new go.PathFigure(z,0,!0);return ie.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ae*ee)),le.add(new go.PathSegment(go.PathSegment.Line,ae*z,0).close()),ie.spot1=new go.Spot(0,ae),ie.spot2=go.Spot.BottomRight,ie}),go.Shape.defineFigureGenerator("Collate",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,.5*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee));var le=new go.PathFigure(.5*z,.5*ee,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),ae.spot1=new go.Spot(.25,0),ae.spot2=new go.Spot(.75,.25),ae}),go.Shape.defineFigureGenerator("CreateRequest",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure(0,ie*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,ie*ee)),ue.add(new go.PathSegment(go.PathSegment.Move,0,(1-ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,(1-ie)*ee)),ae}),go.Shape.defineFigureGenerator("Database",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=me*.1,ue=new go.PathFigure(z,.1*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+le)*ee,(.5+ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-ie)*z,ee,0,(.9+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-le)*ee,(.5-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*ee,(.5+ie)*z,0,z,(.1-le)*ee));var ge=new go.PathFigure(z,.1*ee,!1);return ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,z,(.1+le)*ee,(.5+ie)*z,.2*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-ie)*z,.2*ee,0,(.1+le)*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,z,.2*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,z,(.2+le)*ee,(.5+ie)*z,.3*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-ie)*z,.3*ee,0,(.2+le)*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,z,.3*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.4*ee,z,(.3+le)*ee,(.5+ie)*z,.4*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,(.5-ie)*z,.4*ee,0,(.3+le)*ee)),ae.spot1=new go.Spot(0,.4),ae.spot2=new go.Spot(1,.9),ae}),go.Shape.defineFigureGenerator("DataStorage",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,ee,z,0,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.9*ee,.25*z,.1*ee).close()),ae.spot1=new go.Spot(.226,0),ae.spot2=new go.Spot(.81,1),ae}),go.Shape.defineFigureGenerator("DiskStorage",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=me*.1,ue=new go.PathFigure(z,.1*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.9+le)*ee,(.5+ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-ie)*z,ee,0,(.9+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,(.1-le)*ee,(.5-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*ee,(.5+ie)*z,0,z,(.1-le)*ee));var ge=new go.PathFigure(z,.1*ee,!1);return ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,z,(.1+le)*ee,(.5+ie)*z,.2*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-ie)*z,.2*ee,0,(.1+le)*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,z,.2*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.3*ee,z,(.2+le)*ee,(.5+ie)*z,.3*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-ie)*z,.3*ee,0,(.2+le)*ee)),ae.spot1=new go.Spot(0,.3),ae.spot2=new go.Spot(1,.9),ae}),go.Shape.defineFigureGenerator("Display",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.25*z,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,ee,z,0,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close()),ae.spot1=new go.Spot(.25,0),ae.spot2=new go.Spot(.75,1),ae}),go.Shape.defineFigureGenerator("DividedEvent",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)?ie=.2:ie<.15&&(ie=.15);var le=me*.2,ue=new go.PathFigure(0,.2*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,0,(.2-le)*ee,(.2-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.2*ee,(.8+le)*z,0,z,(.2-le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,ee,z,(.8+le)*ee,(.8+le)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*ee,(.2-le)*z,ee,0,(.8+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee));var ge=new go.PathFigure(0,ie*ee,!1);return ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z,ie*ee)),ae}),go.Shape.defineFigureGenerator("DividedProcess",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;(isNaN(ie)||ie<.1)&&(ie=.1);var le=new go.PathFigure(0,0,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure(0,ie*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,ie*ee)),ae}),go.Shape.defineFigureGenerator("Document",function(de,z,ee){var ae=new go.Geometry;ee=ee/.8;var ie=new go.PathFigure(0,.7*ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*z,.4*ee,.5*z,ee).close()),ae.spot1=go.Spot.TopLeft,ae.spot2=new go.Spot(1,.6),ae}),go.Shape.defineFigureGenerator("ExternalOrganization",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;(isNaN(ie)||ie<.2)&&(ie=.2);var le=new go.PathFigure(0,0,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure(ie*z,0,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,0,ie*ee)),ue.add(new go.PathSegment(go.PathSegment.Move,z,ie*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Move,0,(1-ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Move,(1-ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,(1-ie)*ee)),ae}),go.Shape.defineFigureGenerator("ExternalProcess",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var le=new go.PathFigure(.1*z,.4*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.9*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.6*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.4*z,.9*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.9*ee)),ae.spot1=new go.Spot(.25,.25),ae.spot2=new go.Spot(.75,.75),ae}),go.Shape.defineFigureGenerator("File",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var le=new go.PathFigure(.75*z,0,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.75*z,.25*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),ae.spot1=new go.Spot(0,.25),ae.spot2=go.Spot.BottomRight,ae}),go.Shape.defineFigureGenerator("Interrupt",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z,.5*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee));var le=new go.PathFigure(z,.5*ee,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,ee));var ue=new go.PathFigure(z,.5*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(.5,.75),ae}),go.Shape.defineFigureGenerator("InternalStorage",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN,le=de?de.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(le)&&(le=.1);var ue=new go.PathFigure(0,0,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ge=new go.PathFigure(ie*z,0,!1);return ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Move,0,le*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,z,le*ee)),ae}),go.Shape.defineFigureGenerator("Junction",function(de,z,ee){var ae=new go.Geometry,ie=1/Math.SQRT2,le=(1-1/Math.SQRT2)/2,ue=me*.5,ge=.5,Pe=new go.PathFigure(z,ge*ee,!0);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ge*z,ee,z,(ge+ue)*ee,(ge+ue)*z,ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,0,ge*ee,(ge-ue)*z,ee,0,(ge+ue)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ge*z,0,0,(ge-ue)*ee,(ge-ue)*z,0)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,z,ge*ee,(ge+ue)*z,0,z,(ge-ue)*ee));var je=new go.PathFigure((le+ie)*z,(le+ie)*ee,!1);return ae.add(je),je.add(new go.PathSegment(go.PathSegment.Line,le*z,le*ee)),je.add(new go.PathSegment(go.PathSegment.Move,le*z,(le+ie)*ee)),je.add(new go.PathSegment(go.PathSegment.Line,(le+ie)*z,le*ee)),ae}),go.Shape.defineFigureGenerator("LinedDocument",function(de,z,ee){var ae=new go.Geometry;ee=ee/.8;var ie=new go.PathFigure(0,.7*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*z,.4*ee,.5*z,ee).close());var le=new go.PathFigure(.1*z,0,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,.75*ee)),ae.spot1=new go.Spot(.1,0),ae.spot2=new go.Spot(1,.6),ae}),go.Shape.defineFigureGenerator("LoopLimit",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee).close()),ae.spot1=new go.Spot(0,.25),ae.spot2=go.Spot.BottomRight,ae}),go.Shape.defineFigureGenerator("MagneticTape",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=.5,ue=new go.PathFigure(.5*z,ee,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,le*ee,(le-ie)*z,ee,0,(le+ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*z,0,0,(le-ie)*ee,(le-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,le*ee,(le+ie)*z,0,z,(le-ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,(le+.1)*z,.9*ee,z,(le+ie)*ee,(le+ie)*z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ae.spot1=new go.Spot(.15,.15),ae.spot2=new go.Spot(.85,.8),ae}),go.Shape.defineFigureGenerator("ManualInput",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee).close()),ae.spot1=new go.Spot(0,.25),ae.spot2=go.Spot.BottomRight,ae}),go.Shape.defineFigureGenerator("MessageFromUser",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.7);var le=new go.PathFigure(0,0,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,ie*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae.spot1=go.Spot.TopLeft,ae}),go.Shape.defineFigureGenerator("MicroformProcessing",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.25);var le=new go.PathFigure(0,0,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,ie*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,(1-ie)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae}),go.Shape.defineFigureGenerator("MicroformRecording",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(1,.75),ae}),go.Shape.defineFigureGenerator("MultiDocument",function(de,z,ee){var ae=new go.Geometry;ee=ee/.8;var ie=new go.PathFigure(z,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.44*ee,.96*z,.47*ee,.93*z,.45*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.54*ee,.86*z,.57*ee,.83*z,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.4*z,.4*ee,.4*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,0).close());var le=new go.PathFigure(.1*z,.2*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.54*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.44*ee)),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(.8,.77),ae}),go.Shape.defineFigureGenerator("MultiProcess",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.1*z,.1*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*ee).close());var le=new go.PathFigure(.2*z,.1*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.1*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.1*z,.2*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.9*ee)),ae.spot1=new go.Spot(0,.2),ae.spot2=new go.Spot(.8,1),ae}),go.Shape.defineFigureGenerator("OfflineStorage",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=1-ie,ue=new go.PathFigure(0,0,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee).close());var ge=new go.PathFigure(.5*ie*z,ie*ee,!1);return ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,(1-.5*ie)*z,ie*ee)),ae}),go.Shape.defineFigureGenerator("OffPageConnector",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae.spot1=go.Spot.TopLeft,ae.spot2=new go.Spot(.75,1),ae}),go.Shape.defineFigureGenerator("Or",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=.5,ue=new go.PathFigure(z,le*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*z,ee,z,(le+ie)*ee,(le+ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,le*ee,(le-ie)*z,ee,0,(le+ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*z,0,0,(le-ie)*ee,(le-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,le*ee,(le+ie)*z,0,z,(le-ie)*ee));var ge=new go.PathFigure(z,.5*ee,!1);return ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,.5*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ae}),go.Shape.defineFigureGenerator("PaperTape",function(de,z,ee){var ae=new go.Geometry;ee=ee/.8;var ie=new go.PathFigure(0,.7*ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.3*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.3*ee,.5*z,.6*ee,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*z,.4*ee,.5*z,ee).close()),ae.spot1=new go.Spot(0,.49),ae.spot2=new go.Spot(1,.75),ae}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN,le=de?de.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(le)&&(le=.3);var ue=new go.PathFigure(0,0,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-le)*z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN,le=de?de.parameter2:NaN;isNaN(ie)&&(ie=.1),isNaN(le)&&(le=.3);var ue=new go.PathFigure(0,0,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,(1-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-le)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae}),go.Shape.defineFigureGenerator("Procedure",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure((1-ie)*z,0,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Move,ie*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),ae}),go.Shape.defineFigureGenerator("Process",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ue=new go.PathFigure(ie*z,0,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),ae.spot2=go.Spot.BottomRight,ae}),go.Shape.defineFigureGenerator("Sort",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var le=new go.PathFigure(0,.5*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ae.spot1=new go.Spot(.25,.25),ae.spot2=new go.Spot(.75,.5),ae}),go.Shape.defineFigureGenerator("Start",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.25);var le=new go.PathFigure(ie*z,0,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*z,.5*ee,.25*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*z,.5*ee,.25*z,.5*ee));var ue=new go.PathFigure(ie*z,0,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,ie*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Move,(1-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,(1-ie)*z,ee)),ae.spot1=new go.Spot(ie,0),ae.spot2=new go.Spot(1-ie,1),ae}),go.Shape.defineFigureGenerator("Terminator",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.25*z,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*z,.5*ee,.25*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*z,.5*ee,.25*z,.5*ee)),ae.spot1=new go.Spot(.23,0),ae.spot2=new go.Spot(.77,1),ae}),go.Shape.defineFigureGenerator("TransmittalTape",function(de,z,ee){var ae=new go.Geometry,ie=de?de.parameter1:NaN;isNaN(ie)&&(ie=.1);var le=new go.PathFigure(0,0,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.75*z,(1-ie)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,(1-ie)*ee).close()),ae.spot1=go.Spot.TopLeft,ae}),go.Shape.defineFigureGenerator("AndGate",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=new go.PathFigure(0,0,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(.5+ie)*z,0,z,(.5-ie)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,(.5+ie)*ee,(.5+ie)*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae.spot1=go.Spot.TopLeft,ae.spot2=new go.Spot(.55,1),ae}),go.Shape.defineFigureGenerator("Buffer",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(.5,.75),ae}),go.Shape.defineFigureGenerator("Clock",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=.5,ue=new go.PathFigure(z,le*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*z,ee,z,(le+ie)*ee,(le+ie)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,le*ee,(le-ie)*z,ee,0,(le+ie)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,le*z,0,0,(le-ie)*ee,(le-ie)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,le*ee,(le+ie)*z,0,z,(le-ie)*ee));var ge=new go.PathFigure(z,le*ee,!1);ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z,le*ee));var Pe=new go.PathFigure(.8*z,.75*ee,!1);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,.8*z,.25*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.6*z,.25*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.6*z,.75*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.4*z,.75*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.4*z,.25*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,.25*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,.2*z,.75*ee)),ae}),go.Shape.defineFigureGenerator("Ground",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,0,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.3*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.4*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,ee)),ae}),go.Shape.defineFigureGenerator("Inverter",function(de,z,ee){var ae=new go.Geometry,ie=me*.1,le=.1,ue=.9,ge=.5,Pe=new go.PathFigure(.8*z,.5*ee,!0);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,0,ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,0,0)),Pe.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*ee));var je=new go.PathFigure((ue+le)*z,ge*ee,!0);return ae.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,ge*ee,(ue-ie)*z,(ge+le)*ee,(ue-le)*z,(ge+ie)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,ge*ee,(ue+ie)*z,(ge-le)*ee,(ue+le)*z,(ge-ie)*ee)),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(.4,.75),ae}),go.Shape.defineFigureGenerator("NandGate",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=me*.4,ue=me*.1,ge=.1,Pe=.9,je=.5,Be=new go.PathFigure(.8*z,.5*ee,!0);ae.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,ee,.8*z,(.5+le)*ee,(.4+ie)*z,ee)),Be.add(new go.PathSegment(go.PathSegment.Line,0,ee)),Be.add(new go.PathSegment(go.PathSegment.Line,0,0)),Be.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),Be.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(.4+ie)*z,0,.8*z,(.5-le)*ee));var Fe=new go.PathFigure((Pe+ge)*z,je*ee,!0);return ae.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je+ge)*ee,(Pe+ge)*z,(je+ue)*ee,(Pe+ue)*z,(je+ge)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ge)*z,je*ee,(Pe-ue)*z,(je+ge)*ee,(Pe-ge)*z,(je+ue)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je-ge)*ee,(Pe-ge)*z,(je-ue)*ee,(Pe-ue)*z,(je-ge)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ge)*z,je*ee,(Pe+ue)*z,(je-ge)*ee,(Pe+ge)*z,(je-ue)*ee)),ae.spot1=new go.Spot(0,.05),ae.spot2=new go.Spot(.55,.95),ae}),go.Shape.defineFigureGenerator("NorGate",function(de,z,ee){var ae=new go.Geometry,ie=.5,le=me*ie,ue=0,ge=.5,Pe=new go.PathFigure(.8*z,.5*ee,!0);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.7*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.75*ee,.25*z,.25*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(ue+le)*z,(ge-ie)*ee,.7*z,(ge-le)*ee)),ie=.1,le=me*.1,ue=.9,ge=.5;var je=new go.PathFigure((ue-ie)*z,ge*ee,!0);return ae.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,ge*ee,(ue+le)*z,(ge-ie)*ee,(ue+ie)*z,(ge-le)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,ge*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee)),ae.spot1=new go.Spot(.2,.25),ae.spot2=new go.Spot(.6,.75),ae}),go.Shape.defineFigureGenerator("OrGate",function(de,z,ee){var ae=new go.Geometry,ie=.5,le=me*ie,ue=0,ge=.5,Pe=new go.PathFigure(0,0,!0);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(ue+le+le)*z,(ge-ie)*ee,.8*z,(ge-le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.8*z,(ge+le)*ee,(ue+le+le)*z,(ge+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*z,.75*ee,.25*z,.25*ee).close()),ae.spot1=new go.Spot(.2,.25),ae.spot2=new go.Spot(.75,.75),ae}),go.Shape.defineFigureGenerator("XnorGate",function(de,z,ee){var ae=new go.Geometry,ie=.5,le=me*ie,ue=.2,ge=.5,Pe=new go.PathFigure(.1*z,0,!1);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,ee,.35*z,.25*ee,.35*z,.75*ee));var je=new go.PathFigure(.8*z,.5*ee,!0);ae.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,ee,.7*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*ee,.45*z,.25*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.5*ee,(ue+le)*z,(ge-ie)*ee,.7*z,(ge-le)*ee)),ie=.1,le=me*.1,ue=.9,ge=.5;var Be=new go.PathFigure((ue-ie)*z,ge*ee,!0);return ae.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,ge*ee,(ue+le)*z,(ge-ie)*ee,(ue+ie)*z,(ge-le)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,ge*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee)),ae.spot1=new go.Spot(.4,.25),ae.spot2=new go.Spot(.65,.75),ae}),go.Shape.defineFigureGenerator("XorGate",function(de,z,ee){var ae=new go.Geometry,ie=.5,le=me*ie,ue=.2,ge=.5,Pe=new go.PathFigure(.1*z,0,!1);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,ee,.35*z,.25*ee,.35*z,.75*ee));var je=new go.PathFigure(.2*z,0,!0);return ae.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,(ue+le)*z,(ge-ie)*ee,.9*z,(ge-le)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,ee,.9*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,.2*z,0,.45*z,.75*ee,.45*z,.25*ee).close()),ae.spot1=new go.Spot(.4,.25),ae.spot2=new go.Spot(.8,.75),ae}),go.Shape.defineFigureGenerator("Capacitor",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ae}),go.Shape.defineFigureGenerator("Resistor",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.5*ee)),ae}),go.Shape.defineFigureGenerator("Inductor",function(de,z,ee){var ae=new go.Geometry,ie=me*.1,le=.1,ue=.1,ge=.5,Pe=new go.PathFigure((ue-ie*.5)*z,ee,!1);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,0,(ue-ie)*z,ee,(ue-le)*z,0)),ue=.3,Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,ee,(ue+le)*z,0,(ue+ie)*z,ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,0,(ue-ie)*z,ee,(ue-le)*z,0)),ue=.5,Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,ee,(ue+le)*z,0,(ue+ie)*z,ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,0,(ue-ie)*z,ee,(ue-le)*z,0)),ue=.7,Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,ee,(ue+le)*z,0,(ue+ie)*z,ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,0,(ue-ie)*z,ee,(ue-le)*z,0)),ue=.9,Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie*.5)*z,ee,(ue+le)*z,0,(ue+ie)*z,ee)),ae}),go.Shape.defineFigureGenerator("ACvoltageSource",function(de,z,ee){var ae=new go.Geometry,ie=me*.5,le=.5,ue=.5,ge=.5,Pe=new go.PathFigure((ue-le)*z,ge*ee,!1);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,ge*ee,(ue+ie)*z,(ge-le)*ee,(ue+le)*z,(ge-ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,ge*ee,(ue-ie)*z,(ge+le)*ee,(ue-le)*z,(ge+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Move,(ue-le+.1)*z,ge*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le-.1)*z,ge*ee,ue*z,(ge-le)*ee,ue*z,(ge+le)*ee)),ae}),go.Shape.defineFigureGenerator("DCvoltageSource",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.75*ee,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ae}),go.Shape.defineFigureGenerator("Diode",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z,0,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ae.spot1=new go.Spot(0,.25),ae.spot2=new go.Spot(.5,.75),ae}),go.Shape.defineFigureGenerator("Wifi",function(de,z,ee){var ae=new go.Geometry,ie=z,le=ee;z=z*.38,ee=ee*.6;var ue=me*.8,ge=.8,Pe=0,je=.5,Be=(ie-z)/2,Fe=(le-ee)/2,Ne=new go.PathFigure(Pe*z+Be,(je+ge)*ee+Fe,!0);ae.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ge)*z+Be,je*ee+Fe,(Pe-ue)*z+Be,(je+ge)*ee+Fe,(Pe-ge)*z+Be,(je+ue)*ee+Fe)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je-ge)*ee+Fe,(Pe-ge)*z+Be,(je-ue)*ee+Fe,(Pe-ue)*z+Be,(je-ge)*ee+Fe)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ge+ue*.5)*z+Be,je*ee+Fe,Pe*z+Be,(je-ge)*ee+Fe,(Pe-ge+ue*.5)*z+Be,(je-ue)*ee+Fe)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je+ge)*ee+Fe,(Pe-ge+ue*.5)*z+Be,(je+ue)*ee+Fe,Pe*z+Be,(je+ge)*ee+Fe).close()),ue=me*.4,ge=.4,Pe=.2,je=.5;var Ae=new go.PathFigure(Pe*z+Be,(je+ge)*ee+Fe,!0);ae.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ge)*z+Be,je*ee+Fe,(Pe-ue)*z+Be,(je+ge)*ee+Fe,(Pe-ge)*z+Be,(je+ue)*ee+Fe)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je-ge)*ee+Fe,(Pe-ge)*z+Be,(je-ue)*ee+Fe,(Pe-ue)*z+Be,(je-ge)*ee+Fe)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ge+ue*.5)*z+Be,je*ee+Fe,Pe*z+Be,(je-ge)*ee+Fe,(Pe-ge+ue*.5)*z+Be,(je-ue)*ee+Fe)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je+ge)*ee+Fe,(Pe-ge+ue*.5)*z+Be,(je+ue)*ee+Fe,Pe*z+Be,(je+ge)*ee+Fe).close()),ue=me*.2,ge=.2,Pe=.5,je=.5;var Re=new go.PathFigure((Pe-ge)*z+Be,je*ee+Fe,!0);ae.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je-ge)*ee+Fe,(Pe-ge)*z+Be,(je-ue)*ee+Fe,(Pe-ue)*z+Be,(je-ge)*ee+Fe)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ge)*z+Be,je*ee+Fe,(Pe+ue)*z+Be,(je-ge)*ee+Fe,(Pe+ge)*z+Be,(je-ue)*ee+Fe)),Re.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je+ge)*ee+Fe,(Pe+ge)*z+Be,(je+ue)*ee+Fe,(Pe+ue)*z+Be,(je+ge)*ee+Fe)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ge)*z+Be,je*ee+Fe,(Pe-ue)*z+Be,(je+ge)*ee+Fe,(Pe-ge)*z+Be,(je+ue)*ee+Fe)),ue=me*.4,ge=.4,Pe=.8,je=.5;var We=new go.PathFigure(Pe*z+Be,(je-ge)*ee+Fe,!0);ae.add(We),We.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ge)*z+Be,je*ee+Fe,(Pe+ue)*z+Be,(je-ge)*ee+Fe,(Pe+ge)*z+Be,(je-ue)*ee+Fe)),We.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je+ge)*ee+Fe,(Pe+ge)*z+Be,(je+ue)*ee+Fe,(Pe+ue)*z+Be,(je+ge)*ee+Fe)),We.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ge-ue*.5)*z+Be,je*ee+Fe,Pe*z+Be,(je+ge)*ee+Fe,(Pe+ge-ue*.5)*z+Be,(je+ue)*ee+Fe)),We.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je-ge)*ee+Fe,(Pe+ge-ue*.5)*z+Be,(je-ue)*ee+Fe,Pe*z+Be,(je-ge)*ee+Fe).close()),ue=me*.8,ge=.8,Pe=1,je=.5;var Ye=new go.PathFigure(Pe*z+Be,(je-ge)*ee+Fe,!0);return ae.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ge)*z+Be,je*ee+Fe,(Pe+ue)*z+Be,(je-ge)*ee+Fe,(Pe+ge)*z+Be,(je-ue)*ee+Fe)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je+ge)*ee+Fe,(Pe+ge)*z+Be,(je+ue)*ee+Fe,(Pe+ue)*z+Be,(je+ge)*ee+Fe)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ge-ue*.5)*z+Be,je*ee+Fe,Pe*z+Be,(je+ge)*ee+Fe,(Pe+ge-ue*.5)*z+Be,(je+ue)*ee+Fe)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z+Be,(je-ge)*ee+Fe,(Pe+ge-ue*.5)*z+Be,(je-ue)*ee+Fe,Pe*z+Be,(je-ge)*ee+Fe).close()),ae}),go.Shape.defineFigureGenerator("Email",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(0,0,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,0)),le.add(new go.PathSegment(go.PathSegment.Move,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.54*ee)),le.add(new go.PathSegment(go.PathSegment.Move,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.54*ee)),ae}),go.Shape.defineFigureGenerator("Ethernet",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.35*z,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,0).close());var le=new go.PathFigure(.1*z,ee,!0,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.1*z,ee).close());var ue=new go.PathFigure(.6*z,ee,!0,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,.6*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.6*z,.6*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.6*z,ee).close());var ge=new go.PathFigure(0,.5*ee,!1);return ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.5*z,.4*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,.75*z,.5*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.75*z,.6*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,.25*z,.5*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.25*z,.6*ee)),ae}),go.Shape.defineFigureGenerator("Power",function(de,z,ee){var ae=new go.Geometry,ie=me*.4,le=.4,ue=.5,ge=.5,Pe=pt(),je=pt(),Be=pt(),Fe=pt();Ge(ue,ge-le,ue+ie,ge-le,ue+le,ge-ie,ue+le,ge,.5,Pe,Pe,je,Be,Fe);var Ne=st(je.x,je.y),Ae=new go.PathFigure(je.x*z,je.y*ee,!0);ae.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,ge*ee,Be.x*z,Be.y*ee,Fe.x*z,Fe.y*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,ge*ee,(ue-ie)*z,(ge+le)*ee,(ue-le)*z,(ge+ie)*ee)),Ge(ue-le,ge,ue-le,ge-ie,ue-ie,ge-le,ue,ge-le,.5,Be,Fe,je,Pe,Pe),Ae.add(new go.PathSegment(go.PathSegment.Bezier,je.x*z,je.y*ee,Be.x*z,Be.y*ee,Fe.x*z,Fe.y*ee)),ie=me*.3,le=.3,Ge(ue-le,ge,ue-le,ge-ie,ue-ie,ge-le,ue,ge-le,.5,Be,Fe,je,Pe,Pe),Ae.add(new go.PathSegment(go.PathSegment.Line,je.x*z,je.y*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue-le)*z,ge*ee,Fe.x*z,Fe.y*ee,Be.x*z,Be.y*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+le)*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(ue+le)*z,ge*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),Ge(ue,ge-le,ue+ie,ge-le,ue+le,ge-ie,ue+le,ge,.5,Pe,Pe,je,Be,Fe),Ae.add(new go.PathSegment(go.PathSegment.Bezier,je.x*z,je.y*ee,Fe.x*z,Fe.y*ee,Be.x*z,Be.y*ee).close());var Ae=new go.PathFigure(.45*z,0,!0);return ae.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,.45*z,.5*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.55*z,.5*ee)),Ae.add(new go.PathSegment(go.PathSegment.Line,.55*z,0).close()),Dt(Pe),Dt(je),Dt(Be),Dt(Fe),Dt(Ne),ae.spot1=new go.Spot(.25,.45),ae.spot2=new go.Spot(.75,.8),ae}),go.Shape.defineFigureGenerator("Fallout",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee/2,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,180,360,z/2,ee/2,z/2,ee/2));function le(ue,ge,Pe){ue.add(new go.PathSegment(go.PathSegment.Move,(.3+ge)*z,(.8+Pe)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.5+ge)*z,(.5+Pe)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.1+ge)*z,(.5+Pe)*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,(.3+ge)*z,(.8+Pe)*ee).close())}return le(ie,0,0),le(ie,.4,0),le(ie,.2,-.3),ae}),go.Shape.defineFigureGenerator("IrritationHazard",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.2*z,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.3*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close()),ae.spot1=new go.Spot(.3,.3),ae.spot2=new go.Spot(.7,.7),ae}),go.Shape.defineFigureGenerator("ElectricalHazard",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.37*z,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.11*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.77*z,.04*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,.49*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.37*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.63*z,.86*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.77*z,.91*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.34*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.34*z,.78*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.44*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,.56*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee).close()),ae}),go.Shape.defineFigureGenerator("FireHazard",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.1*z,ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.29*z,0,-.25*z,.63*ee,.45*z,.44*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.51*z,.42*ee,.48*z,.17*ee,.54*z,.35*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.59*z,.18*ee,.59*z,.29*ee,.58*z,.28*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.75*z,.6*ee,.8*z,.34*ee,.88*z,.43*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.88*z,.31*ee,.87*z,.48*ee,.88*z,.43*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,ee,1.17*z,.76*ee,.82*z,.8*ee).close()),ae.spot1=new go.Spot(.07,.445),ae.spot2=new go.Spot(.884,.958),ae}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(de,z,ee){var ae=new go.Geometry,ie=.5,le=0,ue=0,ge=ie*me,Pe=.4*Math.SQRT2/2+.5,je=.5-.5*Math.SQRT2/2,Be=1,Fe=.5,Ne=.5,Ae=0,Re=new go.PathFigure(Pe*z,(1-je)*ee,!1);return ae.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,Be*z,Fe*ee,Be*z,.7*ee,Be*z,Fe*ee)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+le)*z,(Ae+le)*ee,(.5+ie+le)*z,(.5-ge+le)*ee,(.5+ge+le)*z,(.5-ie+le)*ee)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ie+le)*z,(.5+ue)*ee,(.5-ge+le)*z,(.5-ie+ue)*ee,(.5-ie+le)*z,(.5-ge+ue)*ee)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(.35+le)*z,.9*ee,(.5-ie+le)*z,(.5+ge+ue)*ee,(.5-ge+le)*z,.9*ee)),Re.add(new go.PathSegment(go.PathSegment.Move,(.25+le)*z,.8*ee)),Re.add(new go.PathSegment(go.PathSegment.Line,(.35+le)*z,.9*ee)),Re.add(new go.PathSegment(go.PathSegment.Line,(.2+le)*z,.95*ee)),ae}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ae}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ae}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!1);ae.add(ie);var le=new go.PathFigure(z,ee,!1);ae.add(le);var ue=new go.PathFigure(0,.5*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*ee,.2*z,.35*ee,.3*z,.35*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,.7*z,.65*ee,.8*z,.65*ee)),ae}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee).close()),ae}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.2*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee).close());var ie=new go.PathFigure(0,.2*ee,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),ae}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.7*z,ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,0,.6*z,.5*ee,0,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,ee,.4*z,.5*ee,z,.5*ee).close());var le=new go.PathFigure(.45*z,.73*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.7*z,.73*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.38*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.63*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.31*z,.27*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.56*z,.27*ee)),ae}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!1);ae.add(ie);var le=new go.PathFigure(.335*z,(1-.555)*ee,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.335*z,(1-.405)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.405)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.555)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,z,.68*ee,(1-.12)*z,.46*ee,(1-.02)*z,.54*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.335*z,(1-.555)*ee,.02*z,.54*ee,.12*z,.46*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.365*z,(1-.595)*ee));var ue=.5-.285,ge=.5,Pe=ue,je=Math.PI/4,Be=4*(1-Math.cos(je))/(3*Math.sin(je)),Fe=Be*.5,Ne=ue,Ae=ue,Re=Be*Ne,We=Be*Ae;le.add(new go.PathSegment(go.PathSegment.Bezier,(ge-Ne)*z,Pe*ee,(ge-(Re+Ne)/2)*z,(Pe+(Ae+We)/2)*ee,(ge-Ne)*z,(Pe+We)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,ge*z,(Pe-Ae)*ee,(ge-Ne)*z,(Pe-We)*ee,(ge-Re)*z,(Pe-Ae)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,(ge+Ne)*z,Pe*ee,(ge+Re)*z,(Pe-Ae)*ee,(ge+Ne)*z,(Pe-We)*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*z,(1-.595)*ee,(ge+Ne)*z,(Pe+We)*ee,(ge+(Re+Ne)/2)*z,(Pe+(Ae+We)/2)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*z,(1-.595)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.555)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*z,(1-.405)*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.335*z,(1-.405)*ee));var Ye=new go.PathFigure(.2*z,ee,!1);ae.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Line,.2*z,.8*ee));var Ue=new go.PathFigure(.8*z,ee,!1);return ae.add(Ue),Ue.add(new go.PathSegment(go.PathSegment.Line,.8*z,.8*ee)),ae}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.1*z,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,ee).close());var le=new go.PathFigure(.2*z,.2*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.8*ee)),ae}),go.Shape.defineFigureGenerator("BpmnEventError",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,.5*ee).close()),ae}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!1);ae.add(ie);var le=new go.PathFigure(z,ee,!1);ae.add(le);var ue=new go.PathFigure(.1*z,ee,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee).close()),ae}),go.Shape.defineFigureGenerator("Caution",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.05*z,ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,.8*ee,0,ee,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.55*z,.1*ee,.5*z,0,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.95*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,ee,z,ee,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*z,ee));var le=.05;return ie.add(new go.PathSegment(go.PathSegment.Move,(.5-le)*z,.875*ee)),ie.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*z,.875*ee,le*z,le*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.325*ee,.575*z,.725*ee,.625*z,.375*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.75*ee,.375*z,.375*ee,.425*z,.725*ee)),ae}),go.Shape.defineFigureGenerator("Recycle",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.45*z,.95*ee,!1);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.95*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.185*z,.85*ee,.17*z,.95*ee,.15*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.235*z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.3*z,.625*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.275*z,.45*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*z,.45*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.05*z,.575*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1875*z,.95*ee,0,.675*ee,0,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.45*z,.95*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.775*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.22*z,.775*ee));var le=new go.PathFigure(.475*z,.2*ee,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.4*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.225*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.275*z,.175*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.325*z,.05*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,.05*ee,.35*z,0,.375*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.575*z,.375*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.525*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.75*z,.475*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.85*z,.315*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.32*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.65*z,.05*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.575*z,0,.65*z,.05*ee,.625*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.38*z,.0105*ee));var ue=new go.PathFigure(.675*z,.575*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.875*z,.525*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,.85*z,.95*ee,z,.8*ee,z,.85*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,.95*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.85*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,.725*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.65*z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.7*z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,z,.775*ee)),ue.add(new go.PathSegment(go.PathSegment.Move,.675*z,.575*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.775*z,.775*ee)),ae}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(de,z,ee){var ae=new go.Geometry,ie=.5,le=me*.5,ue=new go.PathFigure(z,ie*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Bezier,ie*z,ee,z,(ie+le)*ee,(ie+le)*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ie*ee,(ie-le)*z,ee,0,(ie+le)*ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ie*z,0,0,(ie-le)*ee,(ie-le)*z,0)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z,ie*ee,(ie+le)*z,0,z,(ie-le)*ee));var ge=new go.PathFigure(ie*z,0,!1);return ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ie*z,.15*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,ie*z,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,ie*z,.85*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,0,ie*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.15*z,ie*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,z,ie*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.85*z,ie*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,ie*z,ie*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.58*z,.1*ee)),ge.add(new go.PathSegment(go.PathSegment.Move,ie*z,ie*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.78*z,.54*ee)),ae}),go.Shape.defineFigureGenerator("Package",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.15*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,.15*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var le=new go.PathFigure(0,.15*ee,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,0)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.65*z,.15*ee).close()),ae.spot1=new go.Spot(0,.1),ae.spot2=new go.Spot(1,1),ae}),go.Shape.defineFigureGenerator("Class",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(0,.2*ee,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee).close());var ue=new go.PathFigure(0,.5*ee,!1);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee).close()),ae}),go.Shape.defineFigureGenerator("Component",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z,ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee).close());var le=new go.PathFigure(0,.2*ee,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.2*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.45*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close());var ue=new go.PathFigure(0,.6*ee,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.45*z,.6*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.45*z,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee).close()),ae}),go.Shape.defineFigureGenerator("Boat Shipment",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.15*z,.6*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,.6*ee));var le=new go.PathFigure(.15*z,.6*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.85*z,.6*ee)),ae}),go.Shape.defineFigureGenerator("Customer/Supplier",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z,ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.66*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.33*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee).close()),ae}),go.Shape.defineFigureGenerator("Workcell",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.65*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.35*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ae}),go.Shape.defineFigureGenerator("Supermarket",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,z,.33*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.66*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.66*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,z,.66*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ae}),go.Shape.defineFigureGenerator("TruckShipment",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(z,.8*ee,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.6*z,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee).close());var ue=.1,ge=me*.1,Pe=.2,je=.9,Be=new go.PathFigure((Pe-ue)*z,je*ee,!0);ae.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je-ue)*ee,(Pe-ue)*z,(je-ge)*ee,(Pe-ge)*z,(je-ue)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ue)*z,je*ee,(Pe+ge)*z,(je-ue)*ee,(Pe+ue)*z,(je-ge)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je+ue)*ee,(Pe+ue)*z,(je+ge)*ee,(Pe+ge)*z,(je+ue)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ue)*z,je*ee,(Pe-ge)*z,(je+ue)*ee,(Pe-ue)*z,(je+ge)*ee).close()),ue=.1,ge=me*.1,Pe=.8,je=.9;var Fe=new go.PathFigure((Pe-ue)*z,je*ee,!0);return ae.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je-ue)*ee,(Pe-ue)*z,(je-ge)*ee,(Pe-ge)*z,(je-ue)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ue)*z,je*ee,(Pe+ge)*z,(je-ue)*ee,(Pe+ue)*z,(je-ge)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,Pe*z,(je+ue)*ee,(Pe+ue)*z,(je+ge)*ee,(Pe+ge)*z,(je+ue)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ue)*z,je*ee,(Pe-ge)*z,(je+ue)*ee,(Pe-ue)*z,(je+ge)*ee).close()),ae}),go.Shape.defineFigureGenerator("KanbanPost",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.2*z,0,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,ee)),ae}),go.Shape.defineFigureGenerator("Forklift",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0));var le=new go.PathFigure(0,.5*ee,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.8*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var ue=new go.PathFigure(.5*z,.8*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.1*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.8*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.5*z,.8*ee));var ge=new go.PathFigure(.5*z,.7*ee,!1);ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z,.7*ee));var Pe=.1,je=me*.1,Be=.1,Fe=.9,Ne=new go.PathFigure((Be-Pe)*z,Fe*ee,!0);ae.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Be*z,(Fe-Pe)*ee,(Be-Pe)*z,(Fe-je)*ee,(Be-je)*z,(Fe-Pe)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Be+Pe)*z,Fe*ee,(Be+je)*z,(Fe-Pe)*ee,(Be+Pe)*z,(Fe-je)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Be*z,(Fe+Pe)*ee,(Be+Pe)*z,(Fe+je)*ee,(Be+je)*z,(Fe+Pe)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Be-Pe)*z,Fe*ee,(Be-je)*z,(Fe+Pe)*ee,(Be-Pe)*z,(Fe+je)*ee)),Pe=.1,je=me*.1,Be=.4,Fe=.9;var Ae=new go.PathFigure((Be-Pe)*z,Fe*ee,!0);return ae.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Be*z,(Fe-Pe)*ee,(Be-Pe)*z,(Fe-je)*ee,(Be-je)*z,(Fe-Pe)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Be+Pe)*z,Fe*ee,(Be+je)*z,(Fe-Pe)*ee,(Be+Pe)*z,(Fe-je)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Be*z,(Fe+Pe)*ee,(Be+Pe)*z,(Fe+je)*ee,(Be+je)*z,(Fe+Pe)*ee)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Be-Pe)*z,Fe*ee,(Be-je)*z,(Fe+Pe)*ee,(Be-Pe)*z,(Fe+je)*ee)),ae}),go.Shape.defineFigureGenerator("RailShipment",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.1*z,.4*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.45*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.9*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.4*ee).close());var le=new go.PathFigure(.45*z,.7*ee,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.55*z,.7*ee));var ue=new go.PathFigure(.55*z,.4*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.9*z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.9*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.55*z,.4*ee).close());var Be=.05,Fe=me*.05,Ne=.175,Ae=.95,ge=new go.PathFigure((Ne-Be)*z,Ae*ee,!0);ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae-Be)*ee,(Ne-Be)*z,(Ae-Fe)*ee,(Ne-Fe)*z,(Ae-Be)*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+Be)*z,Ae*ee,(Ne+Fe)*z,(Ae-Be)*ee,(Ne+Be)*z,(Ae-Fe)*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae+Be)*ee,(Ne+Be)*z,(Ae+Fe)*ee,(Ne+Fe)*z,(Ae+Be)*ee)),ge.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-Be)*z,Ae*ee,(Ne-Fe)*z,(Ae+Be)*ee,(Ne-Be)*z,(Ae+Fe)*ee));var Be=.05,Fe=me*.05,Ne=.375,Ae=.95,Pe=new go.PathFigure((Ne-Be)*z,Ae*ee,!0);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae-Be)*ee,(Ne-Be)*z,(Ae-Fe)*ee,(Ne-Fe)*z,(Ae-Be)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+Be)*z,Ae*ee,(Ne+Fe)*z,(Ae-Be)*ee,(Ne+Be)*z,(Ae-Fe)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae+Be)*ee,(Ne+Be)*z,(Ae+Fe)*ee,(Ne+Fe)*z,(Ae+Be)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-Be)*z,Ae*ee,(Ne-Fe)*z,(Ae+Be)*ee,(Ne-Be)*z,(Ae+Fe)*ee));var Be=.05,Fe=me*.05,Ne=.625,Ae=.95,je=new go.PathFigure((Ne-Be)*z,Ae*ee,!0);ae.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae-Be)*ee,(Ne-Be)*z,(Ae-Fe)*ee,(Ne-Fe)*z,(Ae-Be)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+Be)*z,Ae*ee,(Ne+Fe)*z,(Ae-Be)*ee,(Ne+Be)*z,(Ae-Fe)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae+Be)*ee,(Ne+Be)*z,(Ae+Fe)*ee,(Ne+Fe)*z,(Ae+Be)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-Be)*z,Ae*ee,(Ne-Fe)*z,(Ae+Be)*ee,(Ne-Be)*z,(Ae+Fe)*ee));var Be=.05,Fe=me*.05,Ne=.825,Ae=.95,Re=new go.PathFigure((Ne-Be)*z,Ae*ee,!0);ae.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae-Be)*ee,(Ne-Be)*z,(Ae-Fe)*ee,(Ne-Fe)*z,(Ae-Be)*ee)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+Be)*z,Ae*ee,(Ne+Fe)*z,(Ae-Be)*ee,(Ne+Be)*z,(Ae-Fe)*ee)),Re.add(new go.PathSegment(go.PathSegment.Bezier,Ne*z,(Ae+Be)*ee,(Ne+Be)*z,(Ae+Fe)*ee,(Ne+Fe)*z,(Ae+Be)*ee)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-Be)*z,Ae*ee,(Ne-Fe)*z,(Ae+Be)*ee,(Ne-Be)*z,(Ae+Fe)*ee).close());var We=new go.PathFigure(0,ee,!1);return ae.add(We),We.add(new go.PathSegment(go.PathSegment.Line,z,ee).close()),ae}),go.Shape.defineFigureGenerator("Warehouse",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var le=new go.PathFigure(0,.2*ee,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee).close());var ue=new go.PathFigure(.15*z,ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.15*z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.4*z,.5*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.4*z,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.15*z,ee).close());var ge=.05,Pe=me*.05,je=.35,Be=.775,Fe=new go.PathFigure((je-ge)*z,Be*ee,!0);return ae.add(Fe),Fe.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(Be-ge)*ee,(je-ge)*z,(Be-Pe)*ee,(je-Pe)*z,(Be-ge)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(je+ge)*z,Be*ee,(je+Pe)*z,(Be-ge)*ee,(je+ge)*z,(Be-Pe)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,je*z,(Be+ge)*ee,(je+ge)*z,(Be+Pe)*ee,(je+Pe)*z,(Be+ge)*ee)),Fe.add(new go.PathSegment(go.PathSegment.Bezier,(je-ge)*z,Be*ee,(je-Pe)*z,(Be+ge)*ee,(je-ge)*z,(Be+Pe)*ee).close()),ae}),go.Shape.defineFigureGenerator("ControlCenter",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.1*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee).close()),ae}),go.Shape.defineFigureGenerator("Bluetooth",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.75*ee,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),ae}),go.Shape.defineFigureGenerator("Bookmark",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*ee)),ae}),go.Shape.defineFigureGenerator("Bookmark",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,0,0)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.2*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.8*z,.4*ee)),ae}),go.Shape.defineFigureGenerator("Globe",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,0,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.5*ee,.75*z,0,z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,z,.75*ee,.75*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.25*z,ee,0,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,0,.25*ee,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,ee,.15*z,.25*ee,.15*z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.85*z,.75*ee,.85*z,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.1675*z,.15*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8325*z,.15*ee,.35*z,.3*ee,.65*z,.3*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.1675*z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8325*z,.85*ee,.35*z,.7*ee,.65*z,.7*ee)),ae}),go.Shape.defineFigureGenerator("Wave",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.25*ee,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.25*ee,.1*z,0,.2*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,.25*ee,.425*z,.5*ee,.575*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.25*ee,.8*z,0,.9*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.75*ee,.1*z,.5*ee,.2*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.7*z,.75*ee,.425*z,ee,.575*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.75*ee,.8*z,.5*ee,.9*z,.5*ee)),ae}),go.Shape.defineFigureGenerator("Operator",function(de,z,ee){var ae=new go.Geometry,ie=.3,le=me*.3,ue=.5,ge=.7,Pe=new go.PathFigure((ue-ie)*z,ge*ee,!0);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,ge*ee,(ue+le)*z,(ge-ie)*ee,(ue+ie)*z,(ge-le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,ge*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee));var je=new go.PathFigure(0,.7*ee,!1);return ae.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,z,.7*ee,0,0,z,0)),ae}),go.Shape.defineFigureGenerator("TripleFanBlades",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.5*z,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*ee,.65*z,.3*ee,.65*z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.35*z,.5*ee,.35*z,.3*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.3*z,.6*ee,.1*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*ee,.2*z,ee,.35*z,.95*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,ee,.7*z,.6*ee,.9*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.65*ee,.8*z,ee,.65*z,.95*ee)),ae}),go.Shape.defineFigureGenerator("CentrifugalPump",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z,0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,0,.075*ee,0,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.4*z,ee,0,ee,.4*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.4*ee,.8*z,ee,.85*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,0)),ae}),go.Shape.defineFigureGenerator("Battery",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.4*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.1*ee));var le=new go.PathFigure(0,.6*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Move,0,.4*ee)),le.add(new go.PathSegment(go.PathSegment.Line,z,.4*ee)),ae}),go.Shape.defineFigureGenerator("Delete",function(de,z,ee){var ae=new go.Geometry,ie=.5,le=me*.5,ue=.5,ge=.5,Pe=new go.PathFigure((ue-ie)*z,ge*ee,!0);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,ge*ee,(ue+le)*z,(ge-ie)*ee,(ue+ie)*z,(ge-le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,ge*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee));var je=new go.PathFigure(.15*z,.5*ee,!1);return ae.add(je),je.add(new go.PathSegment(go.PathSegment.Line,.85*z,.5*ee)),ae}),go.Shape.defineFigureGenerator("Flag",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.1*ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,0,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.1*ee,.15*z,0,.35*z,0)),ie.add(new go.PathSegment(go.PathSegment.Bezier,z,.1*ee,.65*z,.2*ee,.85*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.5*ee,.85*z,.6*ee,.65*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.35*z,.4*ee,.15*z,.4*ee).close()),ae}),go.Shape.defineFigureGenerator("Help",function(de,z,ee){var ae=new go.Geometry,ie=.5,le=me*.5,ue=.5,ge=.5,Pe=new go.PathFigure((ue-ie)*z,ge*ee,!1);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,ge*ee,(ue+le)*z,(ge-ie)*ee,(ue+ie)*z,(ge-le)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,ge*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee).close()),ie=.05,le=me*.05,ue=.5,ge=.8;var je=new go.PathFigure((ue-ie)*z,ge*ee,!1);return ae.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge-ie)*ee,(ue-ie)*z,(ge-le)*ee,(ue-le)*z,(ge-ie)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ue+ie)*z,ge*ee,(ue+le)*z,(ge-ie)*ee,(ue+ie)*z,(ge-le)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,ue*z,(ge+ie)*ee,(ue+ie)*z,(ge+le)*ee,(ue+le)*z,(ge+ie)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ue-ie)*z,ge*ee,(ue-le)*z,(ge+ie)*ee,(ue-ie)*z,(ge+le)*ee).close()),je.add(new go.PathSegment(go.PathSegment.Move,.5*z,.7*ee)),je.add(new go.PathSegment(go.PathSegment.Line,.5*z,.5*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,.5*z,.2*ee,.75*z,.475*ee,.75*z,.225*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.35*ee,.4*z,.2*ee,.3*z,.25*ee)),ae}),go.Shape.defineFigureGenerator("Location",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(.5*z,ee,!0).add(new go.PathSegment(go.PathSegment.Line,.75*z,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*z,0,.975*z,.025*ee,.5*z,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*z,.5*ee,.5*z,0,.025*z,.025*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*z,.2*ee)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*z,.3*ee,.1*z,.1*ee).close()))}),go.Shape.defineFigureGenerator("Lock",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var le=new go.PathFigure(.2*z,.5*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.2*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.3*ee,.25*z,0,.75*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.3*ee)),ae}),go.Shape.defineFigureGenerator("Unlocked",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.5*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var le=new go.PathFigure(.2*z,.5*ee,!1);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Move,.2*z,.5*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.2*z,.3*ee)),le.add(new go.PathSegment(go.PathSegment.Bezier,.8*z,.3*ee,.25*z,0,.75*z,0)),le.add(new go.PathSegment(go.PathSegment.Line,.8*z,.35*ee)),ae}),go.Shape.defineFigureGenerator("Gear",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(.9375*z,.56246875*ee,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*z,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.80621875*z,.4375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.763*z,.3316875*ee,.79840625*z,.39915625*ee,.7834375*z,.3635*ee)).add(new go.PathSegment(go.PathSegment.Line,.8566875*z,.23796875*ee)).add(new go.PathSegment(go.PathSegment.Line,.76825*z,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.67596875*z,.24184375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*z,.19378125*ee,.64228125*z,.2188125*ee,.603875*z,.2021875*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*z,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*z,.19378125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*z,.239375*ee,.39759375*z,.20190625*ee,.36053125*z,.2176875*ee)).add(new go.PathSegment(go.PathSegment.Line,.2379375*z,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.14953125*z,.2379375*ee)).add(new go.PathSegment(go.PathSegment.Line,.23934375*z,.3278125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*z,.4375*ee,.21765625*z,.36059375*ee,.201875*z,.397625*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*z,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*z,.5625*ee)).add(new go.PathSegment(go.PathSegment.Line,.1938125*z,.5625*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*z,.67596875*ee,.20221875*z,.603875*ee,.21884375*z,.64228125*ee)).add(new go.PathSegment(go.PathSegment.Line,.1495625*z,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.238*z,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.3316875*z,.76296875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*z,.80621875*ee,.36353125*z,.78340625*ee,.3991875*z,.79840625*ee)).add(new go.PathSegment(go.PathSegment.Line,.43753125*z,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*z,.80621875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*z,.760625*ee,.602375*z,.79809375*ee,.63946875*z,.78234375*ee)).add(new go.PathSegment(go.PathSegment.Line,.76828125*z,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.85671875*z,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.76065625*z,.67221875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*z,.56246875*ee,.78234375*z,.63940625*ee,.798125*z,.602375*ee)).add(new go.PathSegment(go.PathSegment.Line,.9375*z,.56246875*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*z,.6*ee)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*z,.5*ee,.1*z,.1*ee).close()))}),go.Shape.defineFigureGenerator("Hand",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.5*ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Bezier,.1*z,.3*ee,0,.375*ee,.05*z,.325*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.45*z,.075*ee,.3*z,.225*ee,.4*z,.175*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.525*z,.075*ee,.46*z,.05*ee,.525*z,.05*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.3*z,.4*ee,.525*z,.275*ee,.475*z,.325*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.55*ee,z,.4*ee,z,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.425*z,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.6*z,.7*ee,.675*z,.55*ee,.675*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.575*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.575*z,.85*ee,.65*z,.7*ee,.65*z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.525*z,.85*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.535*z,ee,.61*z,.85*ee,.61*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,.435*z,ee,0,ee).close()),ae}),go.Shape.defineFigureGenerator("Map",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,.2*ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ie.add(new go.PathSegment(go.PathSegment.Move,.25*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.25*z,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.5*z,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee)),ie.add(new go.PathSegment(go.PathSegment.Move,.75*z,0)),ie.add(new go.PathSegment(go.PathSegment.Line,.75*z,.8*ee)),ae}),go.Shape.defineFigureGenerator("Eject",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee*.7)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*.7).close());var le=new go.PathFigure(0,ee*.6,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z,.6*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.5*z,0).close()),ae}),go.Shape.defineFigureGenerator("Pencil",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*z,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*z,ee)).add(new go.PathSegment(go.PathSegment.Line,.1*z,.2*ee).close()))}),go.Shape.defineFigureGenerator("Building",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*1,ee*1,!1);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*z,ee*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*z,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,.046*z,ee*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,ee*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee*.3)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*z,ee*.85)),ie.add(new go.PathSegment(go.PathSegment.Line,z,ee*.85).close());var le=new go.PathFigure(.126*z,.85*ee,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,.126*z,.45*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.322*z,.45*ee)),le.add(new go.PathSegment(go.PathSegment.Line,.322*z,.85*ee).close());var ue=new go.PathFigure(.402*z,.85*ee,!1);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,.402*z,.45*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.598*z,.45*ee)),ue.add(new go.PathSegment(go.PathSegment.Line,.598*z,.85*ee).close());var ge=new go.PathFigure(.678*z,.85*ee,!1);ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.678*z,.45*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.874*z,.45*ee)),ge.add(new go.PathSegment(go.PathSegment.Line,.874*z,.85*ee).close());var Pe=new go.PathFigure(.5*z,.1*ee,!1);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*z,.3*ee)),Pe.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*z,.3*ee).close()),ae}),go.Shape.defineFigureGenerator("Staircase",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee*1,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*.8)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.8)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.6)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.6)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.4)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*.4)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*.2)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.2)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.15)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.15)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*.95).close()),ae}),go.Shape.defineFigureGenerator("5Bars",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,ee*1,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.184,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.184,ee*(1-.184)).close());var le=new go.PathFigure(z*.204,ee,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.204,ee*(1-.184))),le.add(new go.PathSegment(go.PathSegment.Line,z*.388,ee*(1-.184*2))),le.add(new go.PathSegment(go.PathSegment.Line,z*.388,ee*1).close());var ue=new go.PathFigure(z*.408,ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.408,ee*(1-.184*2))),ue.add(new go.PathSegment(go.PathSegment.Line,z*.592,ee*(1-.184*3))),ue.add(new go.PathSegment(go.PathSegment.Line,z*.592,ee*1).close());var ge=new go.PathFigure(z*.612,ee,!0);ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z*.612,ee*(1-.184*3))),ge.add(new go.PathSegment(go.PathSegment.Line,z*.796,ee*(1-.184*4))),ge.add(new go.PathSegment(go.PathSegment.Line,z*.796,ee*1).close());var Pe=new go.PathFigure(z*.816,ee,!0);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.816,ee*(1-.184*4))),Pe.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-.184*5))),Pe.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1).close()),ae}),go.Shape.defineFigureGenerator("PC",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,0).close());var le=new go.PathFigure(z*.055,.07*ee,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.07)),le.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.055,ee*.1).close());var ue=new go.PathFigure(z*.055,.13*ee,!0);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.13)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.16)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.055,ee*.16).close());var ge=new go.PathFigure(z*.055,.18*ee,!0);ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.18)),ge.add(new go.PathSegment(go.PathSegment.Line,z*.245,ee*.21)),ge.add(new go.PathSegment(go.PathSegment.Line,z*.055,ee*.21).close());var Pe=new go.PathFigure(z*1,0,!0);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.4,0)),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.65)),Pe.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.65).close()),ae}),go.Shape.defineFigureGenerator("Plane",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(.55*z,ee,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.7*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.1*z,.475*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.35*z,.525*ee,0,.4*ee,.225*z,.45*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.4*z,.475*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.15*z,.35*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.2*z,.325*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.325*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.85*z,.1*ee)),ie.add(new go.PathSegment(go.PathSegment.Bezier,.9*z,.2*ee,.975*z,0,z,.08*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.7*z,.45*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.6*z,.95*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,.55*z,ee).close()),ae}),go.Shape.defineFigureGenerator("Key",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*1,ee*.5,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.9,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.4*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.35*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,.35*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,.2*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.35*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,0,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.15,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,.8*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.65*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.7,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,.55*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,.6*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.85,.575*ee)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.9,.6*ee).close()),ie.add(new go.PathSegment(go.PathSegment.Move,.17*z,.425*ee)),ie.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*z,.5*ee,.075*z,.075*ee).close()),ae}),go.Shape.defineFigureGenerator("FilmTape",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(0,0,!1);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Arc,270,180,z*0,z*.3,z*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.08,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.08,ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*1),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*1),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*2),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*2),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*3),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*3),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*4),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*4),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*5),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*5),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*6),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*6),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*7),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*7),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*8),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*8),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*9),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*9),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*10),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*10),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*11),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*11),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*12),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*12),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*13),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*13),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*14),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*14),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*15),ee*.95)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(.08+.056*15),ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1));var le=new go.PathFigure(0,0,!1);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*0)),le.add(new go.PathSegment(go.PathSegment.Arc,270,-180,z*1,z*.3,z*.055)),le.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1));var ue=new go.PathFigure(z*.11,ee*.1,!1);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),ee*.1)),ue.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*0),ee*.8)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.11,ee*.8).close());var ge=new go.PathFigure(z*(.11+.24133333*1+.028*1),ee*.1,!1);ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),ee*.1)),ge.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*1),ee*.8)),ge.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*1+.028*1),ee*.8).close());var Pe=new go.PathFigure(z*(.11+.24133333*2+.028*2),ee*.1,!1);return ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),ee*.1)),Pe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*3+.028*2),ee*.8)),Pe.add(new go.PathSegment(go.PathSegment.Line,z*(.11+.24133333*2+.028*2),ee*.8).close()),ae}),go.Shape.defineFigureGenerator("FloppyDisk",function(de,z,ee){var ae=new go.Geometry,ie=8,le=ie*me,ue=new go.PathFigure(ie,0,!1);ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.86,0)),ue.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.14)),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-ie)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-ie,ee,z,ee-le,z-le,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,ie,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ie,le,ee,0,ee-le)),ue.add(new go.PathSegment(go.PathSegment.Line,0,ie)),ue.add(new go.PathSegment(go.PathSegment.Bezier,ie,0,0,le,le,0).close());var ge=new go.PathFigure(z*.83,0,!1);ae.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z*.83,ee*.3)),ge.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*.3)),ge.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*0).close());var Pe=new go.PathFigure(z*.83,ee*1,!1);ae.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.83,ee*.5)),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*.5)),Pe.add(new go.PathSegment(go.PathSegment.Line,z*.17,ee*1).close());var je=new go.PathFigure(z*.78,ee*.05,!1);return ae.add(je),je.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.05)),je.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.25)),je.add(new go.PathSegment(go.PathSegment.Line,z*.78,ee*.25).close()),ae}),go.Shape.defineFigureGenerator("SpeechBubble",function(de,z,ee){var ae=de?de.parameter1:NaN;(isNaN(ae)||ae<0)&&(ae=15),ae=Math.min(ae,z/3),ae=Math.min(ae,ee/3);var ie=ae*me,le=ee*.8,ue=new go.Geometry,ge=new go.PathFigure(ae,0,!0);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,z-ae,0)),ge.add(new go.PathSegment(go.PathSegment.Bezier,z,ae,z-ie,0,z,ie)),ge.add(new go.PathSegment(go.PathSegment.Line,z,le-ae)),ge.add(new go.PathSegment(go.PathSegment.Bezier,z-ae,le,z,le-ie,z-ie,le)),ge.add(new go.PathSegment(go.PathSegment.Line,z*.7,le)),ge.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee)),ge.add(new go.PathSegment(go.PathSegment.Line,z*.55,le)),ge.add(new go.PathSegment(go.PathSegment.Line,ae,le)),ge.add(new go.PathSegment(go.PathSegment.Bezier,0,le-ae,ie,le,0,le-ie)),ge.add(new go.PathSegment(go.PathSegment.Line,0,ae)),ge.add(new go.PathSegment(go.PathSegment.Bezier,ae,0,0,ie,ie,0).close()),ie>1?(ue.spot1=new go.Spot(0,0,ie,ie),ue.spot2=new go.Spot(1,.8,-ie,-ie)):(ue.spot1=go.Spot.TopLeft,ue.spot2=new go.Spot(1,.8)),ue}),go.Shape.defineFigureGenerator("Repeat",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*0,ee*.45,!0);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.2,ee*.45).close());var le=new go.PathFigure(z*1,ee*.55,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.55)),le.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*.55)),le.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*.1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.1)),le.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*0)),le.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),le.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*.55).close()),ae}),go.Shape.defineFigureGenerator("Windows",function(de,z,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,z,0)).add(new go.PathSegment(go.PathSegment.Line,z,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()).add(new go.PathSegment(go.PathSegment.Move,.4*z,.4*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*z,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*z,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*z,.4*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.2*z,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,.2*z,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*z,.1*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.1*z,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.1*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*z,.6*ee).close()))}),go.Shape.defineFigureGenerator("Terminal",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*0,ee*.1,!1);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.9)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*.9).close());var le=new go.PathFigure(z*.1,ee*.2,!0);ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.1,ee*.25)),le.add(new go.PathSegment(go.PathSegment.Line,z*.22,ee*.285)),le.add(new go.PathSegment(go.PathSegment.Line,z*.1,ee*.32)),le.add(new go.PathSegment(go.PathSegment.Line,z*.1,ee*.37)),le.add(new go.PathSegment(go.PathSegment.Line,z*.275,ee*.32)),le.add(new go.PathSegment(go.PathSegment.Line,z*.275,ee*.25).close());var ue=new go.PathFigure(z*.28,ee*.37,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.37)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.41)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.28,ee*.41).close()),ae}),go.Shape.defineFigureGenerator("Beaker",function(de,z,ee){var ae=new go.Geometry,ie=15,le=ie*me,ue=new go.PathFigure(z*.62,ee*.475,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z,ee-ie)),ue.add(new go.PathSegment(go.PathSegment.Bezier,z-ie,ee,z,ee-le,z-le,ee)),ue.add(new go.PathSegment(go.PathSegment.Line,ie,ee)),ue.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ie,le,ee,0,ee-le)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.38,ee*.475)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.38,ee*.03)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*0)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*0)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.62,ee*.03).close()),le>1?(ae.spot1=new go.Spot(0,0,le,le),ae.spot2=new go.Spot(1,1,-le,-le)):(ae.spot1=go.Spot.TopLeft,ae.spot2=go.Spot.BottomRight),ae}),go.Shape.defineFigureGenerator("Download",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*0,ee*1,!0);ae.add(ie);var le=.1/.3;ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.755,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.93,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.61,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.39,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.07,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*(1-le)).close());var ue=new go.PathFigure(z*.4,ee*0,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.26,ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.66)),ue.add(new go.PathSegment(go.PathSegment.Line,z*(1-.26),ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.44)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*0).close()),ae}),go.Shape.defineFigureGenerator("Bin",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*0,ee*1,!0);ae.add(ie);var le=.1/.3;return ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.755,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.93,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.61,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.39,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.07,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*(1-le)).close()),ae}),go.Shape.defineFigureGenerator("Upload",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*0,ee*1,!0);ae.add(ie);var le=.1/.3;ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.8,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.66,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.755,ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.93,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.64,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.61,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.39,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.36,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*.07,ee*(1-le))),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.755),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*.055)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.66),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*(1-.8),ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*(1-le)).close());var ue=new go.PathFigure(z*.5,ee*0,!0);return ae.add(ue),ue.add(new go.PathSegment(go.PathSegment.Line,z*.26,ee*.25)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.25)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.4,ee*.63)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.63)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.6,ee*.25)),ue.add(new go.PathSegment(go.PathSegment.Line,z*.74,ee*.25).close()),ae}),go.Shape.defineFigureGenerator("EmptyDrink",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*.15,ee*0,!1);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.85,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*1).close()),ae}),go.Shape.defineFigureGenerator("Drink",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*.15,ee*0,!1);ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.85,ee*0)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.7,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.3,ee*1).close());var le=new go.PathFigure(z*.235,ee*.28,!0);return ae.add(le),le.add(new go.PathSegment(go.PathSegment.Line,z*.765,ee*.28)),le.add(new go.PathSegment(go.PathSegment.Line,z*.655,ee*.97)),le.add(new go.PathSegment(go.PathSegment.Line,z*.345,ee*.97).close()),ae}),go.Shape.defineFigureGenerator("4Arrows",function(de,z,ee){var ae=new go.Geometry,ie=new go.PathFigure(z*.5,ee*0,!0);return ae.add(ie),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,ee*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*1,ee*.5)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.65)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.75,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.55,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.65,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.5,ee*1)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.75)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.55)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.65)),ie.add(new go.PathSegment(go.PathSegment.Line,z*0,ee*.5)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.35)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.25,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.45)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.45,ee*.25)),ie.add(new go.PathSegment(go.PathSegment.Line,z*.35,ee*.25).close()),ae}),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 mn={},dn="5.0",st={},pt=null,Dt=!1,oe=!1,Ge=null,De=!1,fe=null,me=null,ke=0;ke<arguments.length;ke++){var Ce=arguments[ke];if(Ce!==null)switch(typeof Ce){case"number":dn=Ce.toFixed(1);break;case"string":Ce.match(new RegExp("^[0-9]\\.[0-9]+$"))?dn=Ce:Ge=Ce;break;case"object":typeof Ce.is3D!="undefined"?pt=Ce:st=Ce;break;case"boolean":Dt=Ce,oe=!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},st.material_id!==void 0&&!oe&&(Dt=!0)),Ge!==null&&st.id===void 0&&(st.id=Ge);var Se="",Me="",ve=!1,we=null,de=null,z=null,ee=!1,ae=null,ie=null,le=null,ue=null,ge=null;st.height!==void 0&&(st.height=Math.round(st.height)),st.width!==void 0&&(st.width=Math.round(st.width));var Pe=function(gt){return parseFloat(gt)>4?parseFloat(gt):5};mn.setHTML5Codebase=function(gt,dt){me=gt,xt(gt,dt)},mn.setJavaCodebase=mn.setJavaCodebaseVersion=mn.isCompiledInstalled=mn.setPreCompiledScriptPath=mn.setPreCompiledResourcePath=function(){},mn.setHTML5CodebaseVersion=function(gt,dt){var ht=parseFloat(gt);if(ht!==NaN&&ht<5){console.log("The GeoGebra HTML5 codebase version "+ht+" is deprecated. Using version latest instead.");return}fe=gt,nt(gt,dt)},mn.getHTML5CodebaseVersion=function(){return de},mn.getParameters=function(){return st},mn.setFontsCSSURL=function(gt){ue=gt},mn.setGiacJSURL=function(gt){},mn.setJNLPFile=function(gt){Se=gt},mn.setJNLPBaseDir=function(gt){},mn.inject=function(){function gt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var dt="auto",ht=st.id,Et,St=!1,Ft=0;Ft<arguments.length;Ft++){var mt=arguments[Ft];typeof mt=="string"?(mt=mt.toLowerCase(),mt.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?dt=mt:ht=arguments[Ft]):typeof mt=="boolean"?St=mt:mt instanceof HTMLElement&&(Et=mt)}yt();function yt(){if(!De){setTimeout(yt,200);return}dt=wt(dt);var tt=Et||document.getElementById(ht);if(!tt){console.log("possibly bug on ajax loading? ");return}if(mn.removeExistingApplet(tt,!1),st.width===void 0&&tt.clientWidth&&(st.width=tt.clientWidth),st.height===void 0&&tt.clientHeight&&(st.height=tt.clientHeight),!(st.width&&st.height)&&dt==="html5"&&(delete st.width,delete st.height),we=dt,dt==="screenshot")Ue(tt,st);else{var Ve=!1;st.hasOwnProperty("playButton")&&st.playButton||st.hasOwnProperty("clickToLoad")&&st.clickToLoad?Ve=!0:st.hasOwnProperty("playButtonAutoDecide")&&st.playButtonAutoDecide&&(Ve=(!je()||gt())&&Be()),Ve?(we="screenshot",ot(tt,st,St,dt)):Ye(tt,st,St)}}};function je(){try{return window.self!==window.top}catch(gt){return!0}}function Be(){return st.hasOwnProperty("screenshotGenerator")&&st.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}mn.getViews=function(){return pt},mn.isJavaInstalled=function(){return!1};var Fe=function(gt){var dt=function(Ft){var mt=JSON.parse(Ft),yt=function(xe){return xe.type=="G"||xe.type=="E"},tt=mt.elements?mt.elements.filter(yt)[0]:mt;if(!tt||!tt.url){ht();return}st.fileName=tt.url,Ne(tt.settings||{}),pt.is3D=!0;var Ve="https://www.geogebra.org/images/";mn.setPreviewImage(ae||tt.previewUrl,Ve+"GeoGebra_loading.png",Ve+"applet_play.png"),gt()},ht=function(){st.onError&&st.onError(),Pt("Error: Fetching material (id "+st.material_id+") failed.",st)},Et=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",St="/materials/"+st.material_id+"?scope=basic";Ae("https://"+Et+"/api/proxy.php?path="+encodeURIComponent(St),dt,ht)};function Ne(gt){var dt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(ht){gt[ht]=!!gt[ht]}),dt.forEach(function(ht){st[ht]===void 0&&gt[ht]!==void 0&&(st[ht]=gt[ht])}),st.showToolBarHelp===void 0&&(st.showToolBarHelp=st.showToolBar)}function Ae(gt,dt,ht){var Et=new XMLHttpRequest;Et.open("GET",gt),Et.onload=function(){dt(Et.responseText)},Et.onerror=ht,Et.send()}mn.isHTML5Installed=function(){return!0},mn.getLoadedAppletType=function(){return we},mn.setPreviewImage=function(gt,dt,ht){ae=gt,ie=dt,le=ht},mn.removeExistingApplet=function(gt,dt){var ht;typeof gt=="string"&&(gt=document.getElementById(gt)),we=null;var Et=null;for(ht=0;ht<gt.childNodes.length;ht++){var St=gt.childNodes[ht],Ft=St.className;Ft==="applet_screenshot"?dt?(St.style.display="block",we="screenshot"):St.style.display="none":Ft!=="applet_scaler prerender"&&(gt.removeChild(St),Et=Ft&&Ft.indexOf("appletParameters")!=-1?St.id:null,ht--)}var mt=st.id!==void 0?st.id:Et,yt=window[mt];yt&&typeof yt.getBase64=="function"&&(yt.remove(),window[mt]=null)},mn.refreshHitPoints=function(){if(Pe(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var gt=mn.getAppletObject();return gt&&typeof gt.recalculateEnvironments=="function"?(gt.recalculateEnvironments(),!0):!1},mn.startAnimation=function(){var gt=mn.getAppletObject();return gt&&typeof gt.startAnimation=="function"?(gt.startAnimation(),!0):!1},mn.stopAnimation=function(){var gt=mn.getAppletObject();return gt&&typeof gt.stopAnimation=="function"?(gt.stopAnimation(),!0):!1},mn.getAppletObject=function(){var gt=st.id!==void 0?st.id:"ggbApplet";return window[gt]},mn.resize=function(){};var Re=function(gt,dt,ht){var Et=document.createElement("param");Et.setAttribute("name",dt),Et.setAttribute("value",ht),gt.appendChild(Et)},We=function(gt){return gt&&gt!=="false"},Ye=function(gt,dt,ht){Pe(de)<=4.2&&(ht=!0);var Et=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==de||ggbHTML5LoadedCodebaseIsWebSimple&&!ee)&&(Et=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var St=document.createElement("div");St.classList.add("appletParameters","notranslate");var Ft=dt.width,mt=dt.height;if(dt.disableAutoScale=dt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():dt.disableAutoScale,dt.width!==void 0)if(Pe(de)<=4.4)We(dt.showToolBar)&&(dt.height-=7),We(dt.showAlgebraInput)&&(dt.height-=37),dt.width<605&&We(dt.showToolBar)&&(dt.width=605,Ft=605);else{var yt=100;(We(dt.showToolBar)||We(dt.showMenuBar))&&(dt.hasOwnProperty("customToolBar")&&(dt.customToolbar=dt.customToolBar),yt=We(dt.showMenuBar)?245:155),Ft<yt&&(dt.width=yt,Ft=yt)}St.style.border="none",St.style.display="inline-block";for(var tt in dt)dt.hasOwnProperty(tt)&&tt!=="appletOnLoad"&&St.setAttribute("data-param-"+tt,dt[tt]);ue&&St.setAttribute("data-param-fontscssurl",ue),mn.resize=function(){GGBAppletUtils.responsiveResize(gt,dt)},window.addEventListener("resize",function(Lt){mn.resize()});var Ve=typeof dt.appletOnLoad=="function"?dt.appletOnLoad:function(){};if(!ht&&dt.width!==void 0){dt.hasOwnProperty("showSplash")||St.setAttribute("data-param-showSplash","false");var xe=gt.querySelector(".applet_scaler.prerender"),Le=xe!==null;if(Le)var Xe=xe.querySelector(".ggb_preview");else{var Xe=ft(Ft,mt,dt.borderColor,!1);xe=document.createElement("div"),xe.className="applet_scaler",xe.style.position="relative",xe.style.display="block",xe.style.width=Ft+"px",xe.style.height=mt+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(xe,"66%"),Pe(de)>=5?(dt.appletOnLoad=function(Lt){var It=gt.querySelector(".ggb_preview");It&&It.parentNode.removeChild(It),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(xe),window.GGBT_wsf_view&&$(window).trigger("resize"),Ve(Lt)},Le||xe.appendChild(Xe)):St.appendChild(Xe),xe.appendChild(St),Le||gt.appendChild(xe),setTimeout(function(){mn.resize()},1)}else{var rt=document.createElement("div");rt.className="applet_scaler",rt.style.position="relative",rt.style.display="block",rt.appendChild(St),gt.appendChild(rt),dt.appletOnLoad=function(Lt){mn.resize(),Ve(Lt)}}function Ie(Lt,It){It&&typeof It.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Lt,It.appletOnLoad):renderGGBElement(Lt),Pt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",It)}function _e(Lt,It){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Lt,params:It}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Kt){Ie(Kt.article,Kt.params)}),html5AppletsToProcess=null)},Pe(de)<5&&(Lt.className+=" geogebraweb")):Ie(Lt,It)}if(Et){scriptLoadStarted=!0;for(var He=0;He<St.childNodes.length;He++){var Qe=St.childNodes[He].tagName;Qe==="TABLE"&&(St.removeChild(St.childNodes[He]),He--)}if(ggbHTML5LoadedScript!==null){var ct=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');ct!=null&&ct.parentNode.removeChild(ct)}var at=document.createElement("script"),At=function(){_e(St,dt)};at.src=Me+z,ggbHTML5LoadedCodebaseIsWebSimple=ee,ggbHTML5LoadedCodebaseVersion=de,ggbHTML5LoadedScript=at.src,Pt("GeoGebra HTML5 codebase loaded: '"+Me+"'.",dt),!me&&(!fe||fe=="5.0")?(ee?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),At()):Me.requirejs?__webpack_require__.e(822).then(function(){var Lt=[__webpack_require__(20822)];At.apply(null,Lt)}.bind(this)).catch(__webpack_require__.oe):(at.onload=At,gt.appendChild(at))}else _e(St,dt);dt.height=mt,dt.width=Ft},Ue=function(gt,dt,ht){var Et=ft(dt.width,dt.height,dt.borderColor,ht),St=document.createElement("div");St.style.position="relative",St.style.display="block",St.style.width=dt.width+"px",St.style.height=dt.height+"px",St.className="applet_screenshot applet_scaler"+(ht?" applet_screenshot_play":""),St.appendChild(Et);var Ft=GGBAppletUtils.getScale(dt,gt,ht);ht?(gt.appendChild(ut()),window.GGBT_wsf_view||(gt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(St,"66%"),gt.appendChild(St),Ft!==1&&!isNaN(Ft)&&(GGBAppletUtils.scaleElement(St,Ft),St.style.width=dt.width+"px",St.style.height=dt.height+"px",St.parentNode.style.width=dt.width*Ft+"px",St.parentNode.style.height=dt.height*Ft+"px"),mn.resize=function(){Ke(gt,Et,St,ht)},window.addEventListener("resize",function(mt){mn.resize()}),mn.resize()};function Ke(gt,dt,ht,Et){if(gt.contains(dt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(gt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(gt)}var St=GGBAppletUtils.getScale(st,gt,Et);ht.parentNode!==null&&(!isNaN(St)&&St!==1?(GGBAppletUtils.scaleElement(ht,St),ht.parentNode.style.width=st.width*St+"px",ht.parentNode.style.height=st.height*St+"px"):(GGBAppletUtils.scaleElement(ht,1),ht.parentNode.style.width=st.width+"px",ht.parentNode.style.height=st.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(gt),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}mn.onExitFullscreen=function(gt,dt){dt.appendChild(gt)};var ot=function(gt,dt,ht,Et){Ue(gt,dt,!0);for(var St=function(){var yt=[];for(mt=0;mt<gt.childNodes.length;mt++)yt.push(gt.childNodes[mt]);if(window.GGBT_wsf_view){var tt=window.GGBT_wsf_view.renderFullScreen(gt,dt.id),Ve=document.getElementById("fullscreencontainer"),xe=jQuery(gt).find(".fullscreencontent");xe.length>0?(tt.remove(),xe.attr("id","fullscreencontent").show(),jQuery(Ve).append(xe),window.dispatchEvent(new Event("resize"))):Ye(tt,dt,!1),window.GGBT_wsf_view.launchFullScreen(Ve)}else we=Et,Ye(gt,dt,!1);if(!window.GGBT_wsf_view)for(mt=0;mt<yt.length;mt++)gt.removeChild(yt[mt])},Ft=gt.getElementsByClassName("ggb_preview_play"),mt=0;mt<Ft.length;mt++)Ft[mt].addEventListener("click",St,!1),Ft[mt].addEventListener("ontouchstart",St,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(gt),Be()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},ut=function(){var gt=document.createElement("div");if(gt.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var dt='.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");}',ht=document.createElement("style");ht.styleSheet?ht.styleSheet.cssText=dt:ht.appendChild(document.createTextNode(dt)),document.getElementsByTagName("head")[0].appendChild(ht)}return gt},ft=function(gt,dt,ht,Et){var St=document.createElement("div");St.className="ggb_preview",St.style.position="absolute",St.style.zIndex="90",St.style.width=gt-2+"px",St.style.height=dt-2+"px",St.style.top="0px",St.style.left="0px",St.style.overflow="hidden",St.style.backgroundColor="white";var Ft="lightgrey";ht!==void 0&&(ht==="none"?Ft="transparent":Ft=ht),St.style.border="1px solid "+Ft;var mt=document.createElement("img");if(mt.style.position="relative",mt.style.zIndex="1000",mt.style.top="-1px",mt.style.left="-1px",ae!==null&&mt.setAttribute("src",ae),mt.style.opacity=.7,ie!==null){var yt,tt,Ve;if(!Et){yt=document.createElement("img"),yt.style.position="absolute",yt.style.zIndex="1001",yt.style.opacity=1,mt.style.opacity=.3,tt=360,tt>gt/4*3&&(tt=gt/4*3),Ve=tt/5.8,yt.setAttribute("src",ie),yt.setAttribute("width",tt),yt.setAttribute("height",Ve);var xe=(gt-tt)/2,Le=(dt-Ve)/2;yt.style.left=xe+"px",yt.style.top=Le+"px",St.appendChild(yt)}}return St.appendChild(mt),St},wt=function(gt){return gt=gt.toLowerCase(),gt==="html5"||gt==="screenshot"?gt:"html5"},Je=["web","webSimple","web3d","tablet","tablet3d","phone"],nt=function(gt,dt){if(de=gt,dt){xt(de,!0);return}var ht=!Dt;if(ht){var Et=Pe(de);!isNaN(Et)&&Et<4.4&&(ht=!1)}var St,Ft;window.location.protocol.substr(0,4)==="http"?St=window.location.protocol:St="http:";var mt=de.indexOf("//");mt>0?Ft=de:mt===0?Ft=St+de:Ft="https://www.geogebra.org/apps/5.2.814.0/";for(var yt in Je)if(de.slice(Je[yt].length*-1)===Je[yt]||de.slice((Je[yt].length+1)*-1)===Je[yt]+"/"){xt(Ft,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&ht&&!pt.is3D&&!pt.AV&&!pt.SV&&!pt.CV&&!pt.EV2&&!pt.CP&&!pt.PC&&!pt.DA&&!pt.FI&&!pt.PV&&!We(st.showToolBar)&&!We(st.showMenuBar)&&!We(st.showAlgebraInput)&&!We(st.enableRightClick)&&(!st.appName||st.appName=="classic")?Ft+="webSimple/":Ft+="web3d/",xt(Ft,!1)},xt=function(gt,dt){if(gt.requirejs){Me=gt;return}gt.slice(-1)!=="/"&&(gt+="/"),Me=gt,dt===null&&(dt=gt.indexOf("http")===-1),ve=dt,z="web.nocache.js",ee=!1;var ht=Me.split("/");ht.length>1&&(!dt&&ht[ht.length-2]==="webSimple"?(z="webSimple.nocache.js",ee=!0):Je.indexOf(ht[ht.length-2])>=0&&(z=ht[ht.length-2]+".nocache.js")),ht=gt.split("/"),de=ht[ht.length-3],de.substr(0,4)==="test"?de=de.substr(4,1)+"."+de.substr(5,1):(de.substr(0,3)==="war"||de.substr(0,4)==="beta")&&(de="5.0");var Et=parseFloat(de);Et!==NaN&&Et<5&&gt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Et+" is deprecated. Using version latest instead."),nt("5.0",dt))},Pt=function(gt,dt){window.console&&window.console.log&&(!dt||typeof dt.showLogging=="undefined"||dt.showLogging&&dt.showLogging!=="false")&&console.log(gt)};st.material_id!==void 0?Fe(Ct):Ct();function Ct(){var gt=dn;fe!==null?gt=fe:parseFloat(gt)<5&&(gt="5.0"),nt(gt,!1),me!==null&&xt(me,ve),De=!0}return mn},GGBAppletUtils=function(){"use strict";function mn(){return window.GGBT_wsf_edit!==void 0}function dn(De,fe){fe!=1?(De.style.transformOrigin="0% 0% 0px",De.style.webkitTransformOrigin="0% 0% 0px",De.style.transform="scale("+fe+","+fe+")",De.style.webkitTransform="scale("+fe+","+fe+")",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 st(De,fe,me,ke,Ce,Se){var Me=null;if(Se!=null&&Se!="")for(var ve=De.parentNode;ve!=null;)if((" "+ve.className+" ").indexOf(" "+Se+" ")>-1){Me=ve;break}else ve=ve.parentNode;var we=0,de=0,z=0,ee=0,ae=0,ie=0,le=0;if(Me)we=Me.offsetWidth,de=Math.max(ke?Me.offsetWidth:0,Me.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(we=Math.min(window.innerWidth,document.documentElement.clientWidth),de=Math.min(window.innerHeight,document.documentElement.clientHeight),z=we):(we=window.innerWidth,de=window.innerHeight,z=window.innerWidth),De){var ue=De.getBoundingClientRect();ue.left>0&&ue.left<=we&&(Ce===void 0||!Ce)&&(document.dir==="rtl"?(ae=we-ue.width-ue.left,ie=z<=480?10:30):(ie=ue.left,ae=z<=480?10:30),ee=ie+ae)}if(De&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var ge=De.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ee=40,le=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ee=0,le=40)}}return De&&((me===void 0||!me)&&fe>0&&fe+ee<we?we=fe:we-=ee,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(me===void 0||!me)&&(de-=le)),{width:we,height:de}}function pt(De,fe,me,ke,Ce){if(De.isScreenshoGenerator)return 1;var Se=ke!==void 0&&ke,Me=De.noScaleMargin!=null&&De.noScaleMargin,ve=function(ge){return ge&&ge!=="false"},we=ve(De.autoHeight),de=st(fe,De.width,me,we,Se&&window.GGBT_wsf_view||Me,Ce),z=parseInt(de.width),ee=De.width,ae=De.height;if(ee===void 0){var ie=fe.querySelector(".appletParameters");ie&&(ee=ie.offsetWidth,ae=ie.offsetHeight)}var le=z/ee,ue=Se?1:de.height/ae;return me!==void 0&&!me&&(le=Math.min(1,le),ue=Math.min(1,ue)),Math.min(le,ue)}function Dt(De,fe,me){var ke=1,Ce,Se=!1;if(De.hasOwnProperty("allowUpscale")&&(Se=De.allowUpscale),De.hasOwnProperty("scale")&&(ke=parseFloat(De.scale),(isNaN(ke)||ke===null||ke===0)&&(ke=1),ke>1&&(Se=!0)),fe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Se=!0),!(De.hasOwnProperty("disableAutoScale")&&De.disableAutoScale))Ce=pt(De,fe,Se,me,De.scaleContainerClass);else return ke;return Se&&(!De.hasOwnProperty("scale")||ke===1)?Ce:Math.min(ke,Ce)}function oe(De){var fe=Math.min(window.innerWidth,document.documentElement.clientWidth),me=Math.min(window.innerHeight,document.documentElement.clientHeight),ke=De.getBoundingClientRect(),Ce=(fe-ke.width)/2,Se=(me-ke.height)/2;Se<0&&(Se=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=Se+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Se<40?De.style.top="40px":De.style.top=Se+"px",De.style.left=Ce+"px")}function Ge(De,fe){var me=De.querySelector(".appletParameters");if(me){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(fe.id!==me.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(De)}if(me.parentElement&&/fullscreen/.test(me.parentElement.className))return;var ke=Dt(fe,De);mn()&&me.setAttribute("data-param-scale",ke);for(var Ce=null,Se=0;Se<De.childNodes.length;Se++)if(De.childNodes[Se].className!==void 0&&De.childNodes[Se].className.match(/^applet_scaler/)){Ce=De.childNodes[Se];break}if(Ce!==null&&Ce.querySelector(".noscale")!==null)return;var Me=fe.id!==void 0?fe.id:"ggbApplet",ve=window[Me];(ve==null||!ve.recalculateEnvironments)&&Ce!==null&&!Ce.className.match(/fullscreen/)&&(Ce.parentNode.style.transform="",!isNaN(ke)&&ke!==1?(Ce.parentNode.style.width=fe.width*ke+"px",Ce.parentNode.style.height=fe.height*ke+"px",dn(Ce,ke)):(dn(Ce,1),Ce.parentNode.style.width=fe.width+"px",Ce.parentNode.style.height=fe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&oe(De),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(me).parents(".content-added-content"))}}return{responsiveResize:Ge,isFlexibleWorksheetEditor:mn,positionCenter:oe,getScale:Dt,scaleElement:dn}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var mn=n.location.search;return mn.indexOf(J)!=-1||mn.indexOf(K)!=-1}function q(mn,dn){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(mn){var dn=s[L].bindings;s[L].bindings=function(){for(var st=dn?dn():{},pt=mn[webModule.__softPermutationId],Dt=O;Dt<pt.length;Dt++){var oe=pt[Dt];st[oe[O]]=oe[P]}return st}};var t;function u(){return v(),t}function v(){if(!t){var mn=o.createElement(Q);if(mn.id=L,mn.style.cssText=R+S,mn.tabIndex=-1,o.body.appendChild(mn),t=mn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var dn=document.compatMode==U?V:W;t.write(dn+X),t.close()}}}function w(mn){function dn(pt){function Dt(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var oe=Dt();if(oe){pt();return}function Ge(){if(!oe){if(!Dt())return;oe=!0,pt(),o.removeEventListener&&o.removeEventListener(Z,Ge,!1),De&&clearInterval(De)}}o.addEventListener&&o.addEventListener(Z,Ge,!1);var De=setInterval(function(){Ge()},$)}function st(pt){var Dt=u(),oe=Dt.body,Ge=Dt.createElement(_);Ge.language=ab,Ge.crossOrigin=W,Ge.src=pt,webModule.__errFn&&(Ge.onerror=function(){webModule.__errFn(L,new Error(bb+pt))}),oe.appendChild(Ge)}dn(function(){st(mn)})}webModule.__startLoadingFragment=function(mn){return C(mn)},webModule.__installRunAsyncCode=function(mn){var dn=u(),st=dn.body,pt=dn.createElement(_);pt.language=ab,pt.text=mn,st.appendChild(pt),st.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(mn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(mn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(mn){var dn=c[mn];return dn==null?null:dn},r=d,webModule.__errFn=e}function B(){function mn(De){var fe=De.lastIndexOf(rb);fe==-1&&(fe=De.length);var me=De.indexOf(sb);me==-1&&(me=De.length);var ke=De.lastIndexOf(tb,Math.min(me,fe));return ke>=O?De.substring(O,ke+P):W}function dn(De){if(!De.match(/^\w+:\/\//)){var fe=o.createElement(ub);fe.src=De+vb,De=mn(fe.src)}return De}function st(){var De=__gwt_getMetaProperty(wb);return De!=null?De:W}function pt(){for(var De=o.getElementsByTagName(_),fe=O;fe<De.length;++fe)if(De[fe].src.indexOf(xb)!=-1)return mn(De[fe].src);return W}function Dt(){var De=o.getElementsByTagName(yb);return De.length>O?De[De.length-P].href:W}function oe(){var De=o.location;return De.href==De.protocol+zb+De.host+De.pathname+De.search+De.hash}var Ge=st();return Ge==W&&(Ge=pt()),Ge==W&&(Ge=Dt()),Ge==W&&oe()&&(Ge=mn(o.location.href)),Ge=dn(Ge),Ge}function C(mn){return mn.match(/^\//)||mn.match(/^[a-zA-Z]+:\/\//)?mn:webModule.__moduleBase+mn}function D(){var mn=[],dn=O,st=[],pt=[];function Dt(De){var fe=pt[De](),me=st[De];if(fe in me)return fe;var ke=[];for(var Ce in me)ke[me[Ce]]=Ce;throw r&&r(De,ke,fe),null}if(__gwt_isKnownPropertyValue=function(De,fe){return fe in st[De]},webModule.__getPropMap=function(){var De={};for(var fe in st)st.hasOwnProperty(fe)&&(De[fe]=Dt(fe));return De},webModule.__computePropValue=Dt,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var oe;try{oe=Cb;var Ge=oe.indexOf(Db);Ge!=-1&&(dn=parseInt(oe.substring(Ge+P),$),oe=oe.substring(O,Ge))}catch(De){}return webModule.__softPermutationId=dn,C(oe+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},77665:function(mn,dn,st){"use strict";st.d(dn,{Ax:function(){return Ge},Ds:function(){return De},KI:function(){return me},SI:function(){return oe},f1:function(){return Dt}});var pt=st(13952);function Dt(ke){let Ce=!0;if(ke.length>0){for(let Se=0;Se<ke.length;Se++)if(ke[Se].compile_success==0||!ke[Se].compile_success){Ce=!1;break}}else Ce=!1;return Ce}function oe(ke,Ce=""){let Se=[];for(let Me=0;Me<ke.length;Me++){let ve=ke[Me],we=Ce?`${Ce}/${ve.name}`:`${ve.name}`;Se.push({title:ve.name,type:ve.type,isLeaf:ve.type!=="tree",key:we})}return Se}function Ge(ke,Ce,Se){for(let Me=0;Me<ke.length;Me++){let ve=ke[Me];if(ve.key===Ce){ve.children=Se;break}ve.children&&Ge(ve.children,Ce,Se)}return ke}function De(ke,Ce,Se){let Me;return function(){let ve=this,we=arguments,de=function(){Me=null,Se||ke.apply(ve,we)},z=Se&&!Me;clearTimeout(Me),Me=setTimeout(de,Ce),z&&ke.apply(ve,we)}}const fe=!0,me=pt.Z.API_SERVER},89837:function(mn,dn,st){"use strict";st.d(dn,{Z:function(){return Me}});var pt=st(59301),Dt={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},oe=st(92310),Ge=st.n(oe),De=st(29787),fe=st(2859),me=st(52430),ke=st(89299),Ce=(ve,we,de)=>new Promise((z,ee)=>{var ae=ue=>{try{le(de.next(ue))}catch(ge){ee(ge)}},ie=ue=>{try{le(de.throw(ue))}catch(ge){ee(ge)}},le=ue=>ue.done?z(ue.value):Promise.resolve(ue.value).then(ae,ie);le((de=de.apply(ve,we)).next())}),Me=({data:ve,className:we,fullWidth:de,style:z={},onClose:ee,onOk:ae,showFullTools:ie,noAssociationId:le})=>{const ue=(0,pt.useRef)(null),ge=(0,pt.useRef)(null),Pe=(0,pt.useRef)(null),je=(0,pt.useRef)(null),[Be,Fe]=(0,pt.useState)(!1),[Ne,Ae]=(0,pt.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,pt.useEffect)(()=>(Pe.current||(Pe.current=document.createElement("style"),document.head.appendChild(Pe.current)),ve!=null&&ve.visible?(document.body.setAttribute("data-custom","y-hidden"),Pe.current.innerHTML=" html { overflow-y: hidden; }",ve!=null&&ve.src&&Re()):(document.body.removeAttribute("data-custom"),Pe.current&&(document.head.removeChild(Pe.current),Pe.current=null)),()=>{document.body.removeAttribute("data-custom"),Pe.current&&(document.head.removeChild(Pe.current),Pe.current=null)}),[ve==null?void 0:ve.visible]);const Re=()=>Ce(void 0,null,function*(){Fe(!0),Ae("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Ke=yield(0,ke.ZJ)(ve==null?void 0:ve.src);ue.current.src="",ue.current.src=Ke,ue.current.onload=function(){Ue()},Fe(!1),Ae("")}),We=Ke=>Ce(void 0,null,function*(){Fe(!0),Ae("\u6B63\u5728\u4FDD\u5B58\u4E2D");const ot=yield(0,me.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:ve.title,file:Ke.dataUrl}});ot!=null&&ot.id&&!le?(yield(0,me.ZP)(`/api/attachments/${ve.id}/add_subitem.json`,{method:"post",body:{subitem_id:ot==null?void 0:ot.id,settings:JSON.stringify(Ke.state)}})).status===0&&ae():ot!=null&&ot.id&&ae(ot),Fe(!1),Ae("")}),Ye=()=>{const Ke=document.querySelector('a[href="https://markerjs.com/"]');Ke&&Ke.parentNode&&(Ke.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(ut=>{const ft=document.querySelector(ut.name);ft&&ft.setAttribute("title",ut.title)})},Ue=()=>{ge.current=new fe.hP(ue.current),ge.current.targetRoot=je.current,ge.current.addEventListener("render",We),ge.current.addEventListener("beforeclose",ee),ie&&(ge.current.availableMarkerTypes=ge.current.ALL_MARKER_TYPES,ge.current.uiStyleSettings.redoButtonVisible=!0,ge.current.uiStyleSettings.notesButtonVisible=!0,ge.current.uiStyleSettings.zoomButtonVisible=!0,ge.current.uiStyleSettings.zoomOutButtonVisible=!0,ge.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=ge.current.uiStyleSettings,ge.current.show(),ve!=null&&ve.snapshotData&&ge.current.restoreState(ve.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Ye()},300)};return pt.createElement(pt.Fragment,null,(ve==null?void 0:ve.visible)&&pt.createElement(De.Z,{spinning:Be,tip:Ne,style:{position:"absolute",width:"100vw"}},pt.createElement("div",{ref:je,className:Ge()(Dt.imageDimensions,we,de?Dt.fullWidth:""),style:z},pt.createElement("img",{className:Dt.img,ref:ue}))))}},53267:function(mn,dn,st){"use strict";var pt=st(59301),Dt=st(77019),oe=st(5269),Ge=st(20554),De=st(99571),fe=st(98573),me=st(25346),ke=st(48136),Ce=st(59301);const Se=(0,pt.forwardRef)(({callback:Me,showSaveButton:ve,value:we=""},de)=>{const z=(0,pt.useRef)(),ee=[{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 "}]}]}],ae=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
x=a + r\\text{cos}\\theta \\ \r
y=b + r\\text{sin}\\theta \r
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
\\end{array} `},{value:`\\begin{array}{l} \r
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
\\left\\{\\begin{matrix} \r
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
\\end{matrix}\\right. \r
\\end{array} `},{value:`\\begin{array}{l} \r
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
a \\perp \\alpha \\ \r
b \\perp \\alpha \r
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
a \\parallel \\partial ,b \\parallel \\partial \r
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
a \\perp m,a \\perp n \r
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
a^{2}+b^{2}=c^{2} \r
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
a,b \\in R^{+} \\ \r
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
\\end{array}`},{value:`\\begin{array}{c} \r
a,b \\in R \\ \r
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
\\end{array}`},{value:`\\begin{array}{c} \r
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
P \\left( \\emptyset \\right) =0 \\\\ \r
P \\left( S \\right) =1 \r
\\end{array}`},{value:`\\begin{array}{c} \r
\\forall A \\in S \\\\ \r
P \\left( A \\right) \\ge 0 \r
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
\\end{array}`},{value:`\\begin{array}{c} \r
P_{n}=n! \\\\ \r
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
\\end{array}`}]}]}],ie=ge=>{z.current.setValue(z.current.getValue()+" "+ge.value+" ")},le=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Ce.createElement(Dt.Z,{className:me.Z.lists,gutter:[10,10]},ee.map((ge,Pe)=>Ce.createElement(oe.Z,{flex:"110px",className:me.Z.item},Ce.createElement("div",null,Ce.createElement(fe.Z,{value:`$$${ge.value}$$`}),ge.name),Ce.createElement("div",{className:me.Z.children},ge.children.map((je,Be)=>Ce.createElement("div",{key:Be},Ce.createElement("h1",null,je.name),Ce.createElement(Dt.Z,{gutter:[10,10]},je.data.map((Fe,Ne)=>Ce.createElement(oe.Z,{key:Ne,onClick:()=>ie(Fe),className:me.Z.diamond},Ce.createElement(fe.Z,{value:"`$$"+Fe.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Ce.createElement(Dt.Z,{className:me.Z.lists,gutter:[10,10]},ae.map((ge,Pe)=>Ce.createElement(oe.Z,{flex:"110px",className:me.Z.item},Ce.createElement("div",null,Ce.createElement(fe.Z,{value:"`$$"+ge.value+"$$`"}),ge.name),Ce.createElement("div",{className:me.Z.children},ge.children.map((je,Be)=>Ce.createElement("div",{key:Be},je.name&&Ce.createElement("h1",null,je.name),Ce.createElement(Dt.Z,{gutter:[10,10]},je.data.map((Fe,Ne)=>Ce.createElement(oe.Z,{key:Ne,onClick:()=>ie(Fe),className:me.Z.diamond},Ce.createElement(fe.Z,{value:"`$$"+Fe.value+"$$`"}))))))))))}],ue=()=>{var ge=document.createElement("div");ge.innerHTML=z.current.getValue();var Pe=ge.innerText;return Me&&Me(Pe),Pe};return(0,pt.useImperativeHandle)(de,()=>({getData:ue})),Ce.createElement("div",{className:me.Z.mathWrap},Ce.createElement(Ge.default,{defaultActiveKey:"1",items:le}),Ce.createElement("math-field",{locale:"zh_cn",className:me.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:z,style:{width:800,marginTop:30,fontSize:18}},we||""),ve&&Ce.createElement("div",{className:me.Z.button},Ce.createElement(De.ZP,{size:"large",onClick:ue,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});dn.Z=Se},63604:function(mn,dn,st){"use strict";var pt=st(59301),Dt=st(93314),oe=st(99571),Ge=Object.defineProperty,De=Object.defineProperties,fe=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,Se=(de,z,ee)=>z in de?Ge(de,z,{enumerable:!0,configurable:!0,writable:!0,value:ee}):de[z]=ee,Me=(de,z)=>{for(var ee in z||(z={}))ke.call(z,ee)&&Se(de,ee,z[ee]);if(me)for(var ee of me(z))Ce.call(z,ee)&&Se(de,ee,z[ee]);return de},ve=(de,z)=>De(de,fe(z));const we=({img:de,buttonProps:z={},styles:ee={},customText:ae,ButtonText:ie,ButtonClick:le,Buttonclass:ue,ButtonTwo:ge,imgStyles:Pe,loading:je=!1,className:Be=""})=>pt.createElement("section",{className:`tc animated fadeIn ${Be}`,style:Me({color:"#999",margin:"100px auto",visibility:je?"hidden":"visible"},ee)},pt.createElement("img",{src:de||Dt,style:ve(Me({},Pe),{pointerEvents:"none",userSelect:"none"})}),pt.createElement("p",{className:"mt20 font14"},ae||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),ie&&pt.createElement(oe.ZP,Me({className:ue,onClick:le},z),ie),ge&&ge);dn.Z=we},23416:function(mn,dn,st){"use strict";st.d(dn,{Z:function(){return ue}});var pt=st(59301),Dt={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},oe=st(99571),Ge=st(70557),De=st(58531),fe=st(25399),me=st(89299),ke=st(68606),Ce=st(63604),Se=st(13952),Me=st(59669),ve=st(59301),we=Object.defineProperty,de=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ae=(ge,Pe,je)=>Pe in ge?we(ge,Pe,{enumerable:!0,configurable:!0,writable:!0,value:je}):ge[Pe]=je,ie=(ge,Pe)=>{for(var je in Pe||(Pe={}))z.call(Pe,je)&&ae(ge,je,Pe[je]);if(de)for(var je of de(Pe))ee.call(Pe,je)&&ae(ge,je,Pe[je]);return ge},le=(ge,Pe,je)=>new Promise((Be,Fe)=>{var Ne=We=>{try{Re(je.next(We))}catch(Ye){Fe(Ye)}},Ae=We=>{try{Re(je.throw(We))}catch(Ye){Fe(Ye)}},Re=We=>We.done?Be(We.value):Promise.resolve(We.value).then(Ne,Ae);Re((je=je.apply(ge,Pe)).next())}),ue=({editOffice:ge="view",data:Pe,theme:je,type:Be,filename:Fe,monacoEditor:Ne,className:Ae,style:Re,close:We,onClose:Ye,hasMask:Ue,disabledDownload:Ke,onImgDimensions:ot,showNodata:ut,recordInfo:ft})=>{const[wt,Je]=(0,pt.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[nt,xt]=(0,pt.useState)(""),[Pt,Ct]=(0,pt.useState)(),gt=window.ENV==="build"?"/react/build":"",dt=location.host.startsWith("localhost")?Se.Z.PROXY_SERVER:Se.Z.API_SERVER,Et=10*(1024*1024),St=(0,pt.useRef)();Pe!=null&&Pe.startsWith("/api")&&Be!=="txt"&&(Pe=Se.Z.API_SERVER+Pe);const Ft=Ve=>Ve.substring(Ve.lastIndexOf("/")+1).split(".").pop();Fe&&Ne&&(Ne.filename=Fe),(0,pt.useEffect)(()=>{var Ve,xe;const Le=(xe=(Ve=document.cookie)==null?void 0:Ve.replace(/\s/g,""))==null?void 0:xe.split(";");Le==null||Le.map(Xe=>{let rt=Xe.split("=");rt[0]==="_educoder_session"&&xt(rt[1])})},[]),(0,pt.useEffect)(()=>{Be==="office"&&(Pe.indexOf("bigfilescdn.")>-1||Pe.indexOf("bigfiles1")>-1?Ct({url:Pe,fileType:Ft(Pe),model:Pe.indexOf("model=edit")?"edit":"view"}):mt())},[Be,Pe]);const mt=()=>le(void 0,null,function*(){console.log("data:",Pe);let Ve=Pe;Pe.startsWith("http")||(Ve=location.origin+Ve);let xe=new URL(Ve).pathname.split("/").pop();const Le=yield(0,ke.gJ)({attachment_id:xe});Le.url=dt+Le.url,Ct(Le)}),yt=()=>{if(Pe.startsWith("http")||Pe.startsWith("blob:")){tt();return}(0,me.Sv)(Fe||"educoder",Pe,Fe)},tt=()=>{ft&&(0,Me.fc)({id:ft==null?void 0:ft.id,watch_type:1,course_id:ft==null?void 0:ft.course_id}),(0,me.Nd)(Fe||"educoder",decodeURIComponent(Pe))};return ve.createElement("div",{style:ie({},Re||{}),className:`${Ue&&Dt.bgBlack} ${Be?Dt.wrp:"hide"}`},We&&ve.createElement("div",{className:Dt.close,ref:St},!!ot&&ve.createElement(fe.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>St.current},ve.createElement("span",{onClick:()=>{Ye(),ot()}},ve.createElement("i",{className:"icon-yulanpizhu"}))),!Ke&&ve.createElement(fe.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>St.current},ve.createElement("span",{onClick:tt},ve.createElement("i",{className:"icon-quxiaozhiding"}))),ve.createElement(fe.Z,{title:"\u5173\u95ED",getPopupContainer:()=>St.current},ve.createElement("span",{className:"",onClick:Ye},ve.createElement("i",{className:"icon-guanbi1"})))),ve.createElement("div",{className:`${Dt[Ae]} ${Ae} ${Dt.monaco} ${Be==="txt"?"show":"hide"}`},Be==="txt"&&ve.createElement(ve.Fragment,null,ve.createElement(De.ZP,ie({},Ne)))),Be==="audio"&&ve.createElement("audio",{src:`${(Pe==null?void 0:Pe.indexOf("http://"))>-1||(Pe==null?void 0:Pe.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Pe}`,autoPlay:!0}),Be==="video"&&ve.createElement(ve.Fragment,null,(Pe==null?void 0:Pe.indexOf("http"))>-1?ve.createElement("video",{controls:!0,src:`${Pe}`,autoPlay:!0}):ve.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Pe}`,autoPlay:!0})),Be==="office"&&Pt&&ve.createElement("iframe",{src:`${gt}/office.html?key=${Pt.key}&url=${btoa(Pt.url)}&callbackUrl=${dt+(Pt.callbackUrl||"")}&fileType=${Pt.fileType}&title=${Pt.title||""}&model=${ge}&officeServer=${Se.Z.ONLYOFFICE}&disabledDownload=${!!Ke}`}),Be==="html"&&ve.createElement("iframe",{src:Pe+"&disposition=inline"}),Be==="pdf"&&ve.createElement("iframe",{src:`${gt}/js/pdfview/index.html?filename=${Fe||"educoder.pdf"}&url=${encodeURIComponent(Pe)}&disabledDownload=${!!Ke}`}),Be==="image"&&ve.createElement("img",{src:`${(Pe==null?void 0:Pe.indexOf("http://"))>-1||(Pe==null?void 0:Pe.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Pe}`}),(Be==="other"||Be==="download")&&ve.createElement(ve.Fragment,null,ut?ve.createElement(Ce.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ve.createElement(oe.ZP,{icon:ve.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:yt,disabled:Ke},"\u4E0B\u8F7D")}):ve.createElement(oe.ZP,{type:"primary",size:"middle",onClick:yt,disabled:Ke},ve.createElement(Ge.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},98573:function(mn,dn,st){"use strict";st.d(dn,{z:function(){return Be},Z:function(){return Fe}});var pt=st(59301),Dt=st(14752),oe=st(48421),Ge=st(64018),De=st(79710),fe=st(13952),me=st(89299),ke=st(15342),Ce=st(1012),Se=st(23416),Me=st(59301),we=({html:Ne})=>{const Ae=(0,pt.useRef)(null),Re=(0,pt.useRef)(null),We=`.markdown-body p {
margin: 0 0 16px 0 !important;
line-height: 28px;
white-space: pre-wrap;
}
ol,
ul,
li {
list-style-type: none
}
ol,
ul,
dl {
margin-bottom: 0px;
}
.markdown-body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
color: #333;
overflow: hidden;
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
word-break: break-word;
font-size: 16px;
line-height: 1.6;
white-space: normal;
word-wrap: break-word;
position: relative;
}
.markdown-body ul>li {
list-style-type: disc;
}
.markdown-body ol>li {
list-style-type: decimal;
}
.markdown-body a {
background: transparent;
}
.markdown-body a:active,
.markdown-body a:hover {
outline: 0;
}
.markdown-body strong {
font-weight: bold;
}
.markdown-body h1 {
font-size: 2em;
margin: 0.67em 0;
}
.markdown-body img {
border: 0;
}
.markdown-body hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
.markdown-body pre {
overflow: auto;
}
.markdown-body code,
.markdown-body kbd,
.markdown-body pre {
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
font-size: 1em;
}
.markdown-body input {
color: inherit;
font: inherit;
margin: 0;
}
.markdown-body html input[disabled] {
cursor: default;
}
.markdown-body input {
line-height: normal;
}
.markdown-body input[type="checkbox"] {
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
.markdown-body table {
border-collapse: collapse;
border-spacing: 0;
}
.markdown-body td,
.markdown-body th {
padding: 0;
}
.markdown-body * {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body input {
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
}
.markdown-body a {
color: #4183c4;
text-decoration: none;
}
.markdown-body a:hover,
.markdown-body a:active {
text-decoration: underline;
}
.markdown-body hr {
height: 0;
margin: 15px 0;
overflow: hidden;
background: transparent;
border: 0;
border-bottom: 1px solid #ddd;
}
.markdown-body hr:before {
display: table;
content: "";
}
.markdown-body hr:after {
display: table;
clear: both;
content: "";
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
margin-top: 15px;
margin-bottom: 15px;
line-height: 1.1;
}
.markdown-body h1 {
font-size: 30px;
}
.markdown-body h2 {
font-size: 21px;
}
.markdown-body h3 {
font-size: 16px;
}
.markdown-body h4 {
font-size: 14px;
}
.markdown-body h5 {
font-size: 12px;
}
.markdown-body h6 {
font-size: 11px;
}
.markdown-body blockquote {
margin: 0;
}
.markdown-body ul,
.markdown-body ol {
padding: 0;
margin-top: 0;
margin-bottom: 0;
}
ul.linenums,
ol.linenums {
padding: 16px 0 0 36px !important;
}
.markdown-body ul,
.markdown-body ol {
padding-left: 2em;
}
.markdown-body ol ol,
.markdown-body ul ol {
list-style-type: lower-roman;
}
.markdown-body ul ul ol,
.markdown-body ul ol ol,
.markdown-body ol ul ol,
.markdown-body ol ol ol {
list-style-type: lower-alpha;
}
.markdown-body dd {
margin-left: 0;
}
.markdown-body code {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 12px;
}
.markdown-body pre {
margin-top: 0;
margin-bottom: 0;
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.markdown-body .octicon {
font: normal normal 16px octicons-anchor;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.markdown-body .octicon-link:before {
content: '\f05c';
}
.markdown-body>*:first-child {
margin-top: 0 !important;
}
.markdown-body>*:last-child {
margin-bottom: 0 !important;
}
.markdown-body .anchor {
position: absolute;
top: 0;
left: 0;
display: block;
padding-right: 6px;
padding-left: 30px;
margin-left: -30px;
}
.markdown-body .anchor:focus {
outline: none;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
position: relative;
margin-top: 1em;
margin-bottom: 16px;
font-weight: bold;
line-height: 1.4;
}
.markdown-body h1 .octicon-link,
.markdown-body h2 .octicon-link,
.markdown-body h3 .octicon-link,
.markdown-body h4 .octicon-link,
.markdown-body h5 .octicon-link,
.markdown-body h6 .octicon-link {
display: none;
color: #000;
vertical-align: middle;
}
.markdown-body h1:hover .anchor,
.markdown-body h2:hover .anchor,
.markdown-body h3:hover .anchor,
.markdown-body h4:hover .anchor,
.markdown-body h5:hover .anchor,
.markdown-body h6:hover .anchor {
padding-left: 8px;
margin-left: -30px;
text-decoration: none;
}
.markdown-body h1:hover .anchor .octicon-link,
.markdown-body h2:hover .anchor .octicon-link,
.markdown-body h3:hover .anchor .octicon-link,
.markdown-body h4:hover .anchor .octicon-link,
.markdown-body h5:hover .anchor .octicon-link,
.markdown-body h6:hover .anchor .octicon-link {
display: inline-block;
}
.markdown-body h1 {
padding-bottom: 0.3em;
font-size: 2.25em;
line-height: 1.2;
border-bottom: 1px solid #eee;
}
.markdown-body h1 .anchor {
line-height: 1;
}
.markdown-body h2 {
padding-bottom: 0.3em;
font-size: 1.75em;
line-height: 1.225;
border-bottom: 1px solid #eee;
}
.markdown-body h2 .anchor {
line-height: 1;
}
.markdown-body h3 {
font-size: 1.5em;
line-height: 1.43;
}
.markdown-body h3 .anchor {
line-height: 1.2;
}
.markdown-body h4 {
font-size: 1.25em;
}
.markdown-body h4 .anchor {
line-height: 1.2;
}
.markdown-body h5 {
font-size: 1em;
}
.markdown-body h5 .anchor {
line-height: 1.1;
}
.markdown-body h6 {
font-size: 1em;
color: #777;
}
.markdown-body h6 .anchor {
line-height: 1.1;
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}
.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
margin-top: 0;
margin-bottom: 0;
}
.markdown-body li>p {
margin-top: 16px;
}
.markdown-body dl {
padding: 0;
}
.markdown-body dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: bold;
}
.markdown-body dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
.markdown-body blockquote {
padding: 0 15px;
color: #777;
border-left: 4px solid #ddd;
}
.markdown-body blockquote> :first-child {
margin-top: 0;
}
.markdown-body blockquote> :last-child {
margin-bottom: 0;
}
.markdown-body table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
}
.markdown-body table th {
font-weight: bold;
text-align: revert;
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
.markdown-body table tr {
background-color: #fff;
border-top: 1px solid #ccc;
}
.markdown-body table tr:nth-child(2n) {
background-color: #f8f8f8;
}
.markdown-body img {
max-width: 100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body code {
padding: 0;
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
background-color: rgba(0, 0, 0, 0.04);
border-radius: 3px;
}
.markdown-body code:has(.katex) {
background-color: transparent;
}
.markdown-body code:before,
.markdown-body code:after {
letter-spacing: -0.2em;
content: "\\00a0";
}
.markdown-body pre>code {
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.markdown-body .highlight {
margin-bottom: 16px;
}
.markdown-body .highlight pre,
.markdown-body pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f7f7f7;
border-radius: 3px;
}
.markdown-body .highlight pre {
margin-bottom: 0;
word-break: normal;
}
.markdown-body pre {
word-wrap: normal;
}
.markdown-body pre code {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
.markdown-body pre code:before,
.markdown-body pre code:after {
content: normal;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .pl-c {
color: #969896;
}
.markdown-body .pl-c1,
.markdown-body .pl-mdh,
.markdown-body .pl-mm,
.markdown-body .pl-mp,
.markdown-body .pl-mr,
.markdown-body .pl-s1 .pl-v,
.markdown-body .pl-s3,
.markdown-body .pl-sc,
.markdown-body .pl-sv {
color: #0086b3;
}
.markdown-body .pl-e,
.markdown-body .pl-en {
color: #795da3;
}
.markdown-body .pl-s1 .pl-s2,
.markdown-body .pl-smi,
.markdown-body .pl-smp,
.markdown-body .pl-stj,
.markdown-body .pl-vo,
.markdown-body .pl-vpf {
color: #333;
}
.markdown-body .pl-ent {
color: #63a35c;
}
.markdown-body .pl-k,
.markdown-body .pl-s,
.markdown-body .pl-st {
color: #a71d5d;
}
.markdown-body .pl-pds,
.markdown-body .pl-s1,
.markdown-body .pl-s1 .pl-pse .pl-s2,
.markdown-body .pl-sr,
.markdown-body .pl-sr .pl-cce,
.markdown-body .pl-sr .pl-sra,
.markdown-body .pl-sr .pl-sre,
.markdown-body .pl-src {
color: #df5000;
}
.markdown-body .pl-mo,
.markdown-body .pl-v {
color: #1d3e81;
}
.markdown-body .pl-id {
color: #b52a1d;
}
.markdown-body .pl-ii {
background-color: #b52a1d;
color: #f8f8f8;
}
.markdown-body .pl-sr .pl-cce {
color: #63a35c;
font-weight: bold;
}
.markdown-body .pl-ml {
color: #693a17;
}
.markdown-body .pl-mh,
.markdown-body .pl-mh .pl-en,
.markdown-body .pl-ms {
color: #1d3e81;
font-weight: bold;
}
.markdown-body .pl-mq {
color: #008080;
}
.markdown-body .pl-mi {
color: #333;
font-style: italic;
}
.markdown-body .pl-mb {
color: #333;
font-weight: bold;
}
.markdown-body .pl-md,
.markdown-body .pl-mdhf {
background-color: #ffecec;
color: #bd2c00;
}
.markdown-body .pl-mdht,
.markdown-body .pl-mi1 {
background-color: #eaffea;
color: #55a532;
}
.markdown-body .pl-mdr {
color: #795da3;
font-weight: bold;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .task-list-item {
list-style-type: none;
}
.markdown-body .task-list-item+.task-list-item {
margin-top: 3px;
}
.markdown-body .task-list-item input {
float: left;
margin: 0.3em 0 0.25em -1.6em;
vertical-align: middle;
}
.markdown-body :checked+.radio-label {
z-index: 1;
position: relative;
border-color: #4183c4;
}
/*! Pretty printing styles. Used with prettify.js. */
/* SPAN elements with the classes below are added by prettyprint. */
.pln {
color: #000
}
/* plain text */
@media screen {
.str {
color: #080
}
/* string content */
.kwd {
color: #008
}
/* a keyword */
.com {
color: #800
}
/* a comment */
.typ {
color: #606
}
/* a type name */
.lit {
color: #066
}
/* a literal value */
/* punctuation, lisp open bracket, lisp close bracket */
.pun,
.opn,
.clo {
color: #660
}
.tag {
color: #008
}
/* a markup tag name */
.atn {
color: #606
}
/* a markup attribute name */
.atv {
color: #080
}
/* a markup attribute value */
.dec,
.var {
color: #606
}
/* a declaration; a variable name */
.fun {
color: red
}
/* a function name */
}
/* Use higher contrast and text-weight for printable form. */
@media print,
projection {
.str {
color: #060
}
.kwd {
color: #006;
font-weight: bold
}
.com {
color: #600;
font-style: italic
}
.typ {
color: #404;
font-weight: bold
}
.lit {
color: #044
}
.pun,
.opn,
.clo {
color: #440
}
.tag {
color: #006;
font-weight: bold
}
.atn {
color: #404
}
.atv {
color: #060
}
}
/* Put a border around prettyprinted code snippets. */
pre.prettyprint {
padding: 2px;
/* border: 1px solid #888 */
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
margin-top: 0;
margin-bottom: 0
}
/* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L5,
li.L6,
li.L7,
li.L8 {
list-style-type: none
}
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 {
background: #eee
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}`;return(0,pt.useEffect)(()=>{const Ye=Ae.current.attachShadow({mode:"open"});Re.current=document.createElement("div"),Re.current.className="markdown-body",Re.current.innerHTML=Ne,Ye.appendChild(Re.current);const Ue=document.createElement("style");return Ue.textContent=We,Ye.appendChild(Ue),()=>{Ye.innerHTML=""}},[]),(0,pt.useEffect)(()=>{Re.current&&(Re.current.innerHTML=Ne)},[Ne]),Me.createElement("div",{ref:Ae})},de=Object.defineProperty,z=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,ie=(Ne,Ae,Re)=>Ae in Ne?de(Ne,Ae,{enumerable:!0,configurable:!0,writable:!0,value:Re}):Ne[Ae]=Re,le=(Ne,Ae)=>{for(var Re in Ae||(Ae={}))ee.call(Ae,Re)&&ie(Ne,Re,Ae[Re]);if(z)for(var Re of z(Ae))ae.call(Ae,Re)&&ie(Ne,Re,Ae[Re]);return Ne};const ue="@\u2581\u2581@",ge="@\u2581@",Pe=/<pre[^>]*>/g;function je(Ne){let Ae=document.createElement("div");return Ae.innerHTML=Ne,Ae.childNodes.length===0?"":Ae.childNodes[0].nodeValue}const Be=(Ne,Ae)=>{Ne=Ne||"";const Re=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,We=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ye=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ue=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ae?Ne.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Re,(Ke,ot,ut,ft,wt,Je,nt)=>{const xt=ot||ft||Je,Pt=ut||wt||nt||"?";return fe.Z.API_SERVER+"/api/attachments/"+xt+Pt+"&t="+(0,me.Jn)(xt,Date.now())+(Ke.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Ne=Ne.replace(Ue,(Ke,ot,ut,ft,wt,Je,nt)=>{const xt=ot||ft||Je,Pt=ut||wt||nt||"?";return fe.Z.API_SERVER+"/attachments/download/"+xt+Pt+"&t="+(0,me.Jn)(xt,Date.now())+(Ke.indexOf(")")>-1?")":"&")}).replace(Re,(Ke,ot,ut,ft,wt,Je,nt)=>{const xt=ot||ft||Je,Pt=ut||wt||nt||"?";return fe.Z.API_SERVER+"/api/attachments/"+xt+Pt+"&t="+(0,me.Jn)(xt,Date.now())+(Ke.indexOf(")")>-1?")":"&")}).replace(We,(Ke,ot,ut,ft,wt)=>{const Je=ot||ft,nt=ut||wt||"";return'"'+fe.Z.API_SERVER+"/api/attachments/"+Je+nt+Je+nt+"&t="+(0,me.Jn)(Je,Date.now())}).replace(Ye,(Ke,ot,ut,ft,wt)=>{const Je=ot||ft,nt=ut||wt||"";return"("+fe.Z.API_SERVER+"/files/uploads/"+Je+nt+Je+nt+"&t="+(0,me.Jn)(Je,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,`
`),Ne)};var Fe=({value:Ne="",className:Ae,showTextOnly:Re,showLines:We,style:Ye={},stylesPrev:Ue={},highlightKeywords:Ke,showProgramFill:ot,isProgramFill:ut,disabledFill:ft=!1,programFillValue:wt,onFillChange:Je=Pt=>{},onFillBlur:nt=()=>{},onFillFocus:xt=()=>{}})=>{let Pt=String(Ne);const[Ct,gt]=(0,pt.useState)(""),[dt,ht]=(0,pt.useState)("office"),[Et,St]=(0,pt.useState)([]),Ft=(0,pt.useRef)("a"+(0,Ce.Z)()),mt={},yt=(at,At,Lt)=>{const It=document.createElement(at===ge?"input":"textarea");It.style.width="100%",It.style.height=at===ge?"40px":"151px",It.rows=5,It.spellcheck=!1,It.name="edu-program-fill",It.placeholder="\u8BF7\u8F93\u5165",It.dataset.id=At;const Kt=Object.keys(mt).length;return mt[Kt]=It,`<span class="edu-program-fill-wrap ${at===ge?"":"show"}" style="width:${at===ge?"400px":"100%"}" title=${Lt||""}><span>${It.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function tt(at){return at=at.replace(/!\[.*?\]\(.*?\)/g,""),at=at.replace(/\[.*?\]\(.*?\)/g,""),at=at.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),at=at.replace(/<embed.*?>/g,""),at=at.replace(/<img.*?>/g,""),at=at.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),at=at.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),at=at.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),at=at.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),at}const Ve=at=>at.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(At,Lt){let It=Lt.replace(/(\n|\r)/g,"").split("}"),Kt=[];return It.map(Xt=>{Xt!=""&&Kt.push(`.${Ft.current} ${Xt}`)}),`<style>${Kt.join("}")}</style>`}),xe=(0,pt.useMemo)(()=>{try{const It=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Kt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Xt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,$t=/\(\/attachments\/download\//g;Pt=Pt.replace($t,"("+fe.Z.API_SERVER+"/attachments/download/").replace(It,"("+fe.Z.API_SERVER+"/api/attachments/").replace(Kt,'"'+fe.Z.API_SERVER+"/api/attachments/").replace(Xt,'"'+fe.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(It){}if(ot){let It=-1;return Pt=Pt.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(Kt,Xt,$t){var Ut;return++It,yt(Kt,It,(Ut=wt==null?void 0:wt[It])==null?void 0:Ut.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Ve(Pt||"")}</pre>`}let at=Ve(Pt);at=(0,oe.ZP)(at);const At=(0,oe.ez)();Pt.match(/\[TOC\]/)&&(at=at.replace("<p>[TOC]</p>",(0,oe.Qv)()),(0,oe.Iy)()),at=at.replace(/(__special_katext_id_\d+__)/g,(It,Kt)=>{const{type:Xt,expression:$t}=At[Kt];return(0,ke.renderToString)(je($t)||"",{displayMode:Xt==="block",throwOnError:!1,output:"html"})}),at=at.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,oe.AL)();const Lt=document.createElement("div");if(Lt.innerHTML=at,Re)return Lt.innerText;if(Ke){const It=Ke.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Ie(Lt,It),Lt.innerHTML}return setTimeout(()=>Qe(),500),Lt.innerHTML},[Pt,Ke]);(0,pt.useEffect)(()=>{_e.current&&_e.current.querySelectorAll(["input","textarea"]).forEach(At=>{At.oninput=Le,At.onblur=Xe,At.onfocus=rt})},[Et]),(0,pt.useEffect)(()=>{var at,At,Lt,It,Kt;if(wt!=null&&wt.length)try{const Xt=_e.current.querySelectorAll(".edu-program-fill-score"),$t=_e.current.querySelectorAll('[name="edu-program-fill"]');for(const[Ut,ln]of $t.entries())ln.value=((at=wt==null?void 0:wt[Ut])==null?void 0:at.value)||"",((At=wt==null?void 0:wt[Ut])==null?void 0:At.type)==="warning"?ln.className="program-fill-warning":((Lt=wt==null?void 0:wt[Ut])==null?void 0:Lt.type)==="success"?ln.className="program-fill-success":ln.className="";for(const[Ut,ln]of Xt.entries())ln.innerHTML=(It=wt==null?void 0:wt[Ut])!=null&&It.score?`${(Kt=wt==null?void 0:wt[Ut])==null?void 0:Kt.score}\u5206`:"";St(wt)}catch(Xt){console.log(Xt,"error")}},[wt]);const Le=at=>{Et[at.target.dataset.id]=Et[at.target.dataset.id]||{},Et[at.target.dataset.id].value=at.target.value,St([...Et]),Je(Et,at.target.dataset.id)},Xe=at=>{Et[at.target.dataset.id]=Et[at.target.dataset.id]||{},Et[at.target.dataset.id].value=at.target.value,St([...Et]),nt(Et,at.target.dataset.id)},rt=at=>{Et[at.target.dataset.id]=Et[at.target.dataset.id]||{},Et[at.target.dataset.id].value=at.target.value,St([...Et]),xt(Et,at.target.dataset.id)};function Ie(at,At){return at.childNodes.forEach(Lt=>{var It;if(Lt.childNodes.length>0)Ie(Lt,At);else if(Lt.nodeName!=="IMG")if(Lt.innerHTML)Lt.innerHTML=(It=Lt.innerHTML)==null?void 0:It.replace(new RegExp(At,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Kt=document.createElement("span");Kt.innerHTML=Lt.textContent.replace(new RegExp(At,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Lt.replaceWith(Kt)}})}const _e=(0,pt.useRef)();oe.jb.WebkitLineClamp=We,We&&(Ye=le(le({},Ye),oe.jb));function He(at){let At=at.target;if(At.tagName.toUpperCase()==="A"){let Lt=At.getAttribute("href");if(Lt.indexOf("office")>-1)at.preventDefault(),gt(Lt),ht("office");else if(Lt.indexOf("application/pdf")>-1)at.preventDefault(),gt(Lt),ht("pdf");else if(Lt.indexOf("text/html")>-1)at.preventDefault(),gt(Lt),ht("html");else if(Lt.startsWith("#")){at.preventDefault();let It=document.getElementById(Lt.replace("#",""));It&&It.scrollIntoView(!0)}}}const Qe=()=>{var at;const At=(at=_e.current)==null?void 0:at.querySelectorAll("video");At==null||At.forEach(Lt=>{if(Lt.oncontextmenu=()=>!1,Lt.src.indexOf(".m3u8")>-1&&!Lt.canPlayType("application/vnd.apple.mpegurl")){if(De.ZP.isSupported()){var It=new De.ZP;It.loadSource(Lt.src),It.attachMedia(Lt)}}})};(0,pt.useEffect)(()=>{if(_e.current&&xe&&xe.match(Pe)&&window.PR.prettyPrint(),_e.current)return _e.current.addEventListener("click",He),()=>{var at;(at=_e.current)==null||at.removeEventListener("click",He),(0,oe.AL)(),(0,oe.Iy)()}},[xe,_e.current,He]),(0,pt.useEffect)(()=>{var at;const At=Lt=>{Lt.preventDefault(),Lt.clipboardData.setData("text",window.getSelection().toString())};return(at=_e.current)==null||at.addEventListener("copy",At),()=>{var Lt;(Lt=_e.current)==null||Lt.removeEventListener("copy",At)}},[_e.current]);const ct=at=>/<style[\s\S]*?>/i.test(at||"");return pt.createElement(pt.Fragment,null,Re&&pt.createElement("div",{ref:_e},xe),!Re&&!ct(xe)&&pt.createElement("div",{ref:_e,style:le({},Ye),className:`${Ae||""} ${ft?"disabled-fill":""} markdown-body ${Ft.current}`,dangerouslySetInnerHTML:{__html:xe}}),!Re&&ct(xe)&&pt.createElement(we,{html:xe}),pt.createElement(Se.Z,{close:!0,data:Ct,type:Ct!=null&&Ct.length?dt:"",style:le({},Ue),onClose:()=>gt("")}))}},2162:function(mn,dn,st){"use strict";st.d(dn,{Z:function(){return Ge}});var pt=st(59301),Dt=st(41312),oe=st(59301),Ge=({defaultX:De="40%",leftChild:fe,rightChild:me,className:ke,hideResize:Ce=!1})=>{const[Se,Me]=(0,pt.useState)(De),ve=(0,pt.useRef)();function we(){ve.current=!0}(0,pt.useEffect)(()=>{function ee(ie){ve.current&&(Dt.Z.publish("resize-move-bar",ie),Me(ie.pageX))}function ae(){ve.current=!1}return window.addEventListener("mousemove",ee),window.addEventListener("mouseup",ae),()=>{window.removeEventListener("mousemove",ee),window.removeEventListener("mouseup",ae)}},[]);const de=typeof Se=="number"&&Se!==.01?`${Se}px`:De,z=`calc(100% - ${Ce?"0px":"4px"} - ${de})`;return oe.createElement("div",{className:`split-panel-container ${ke}`},oe.createElement("section",{style:{width:de,display:Se===.01?"none":""}},fe),oe.createElement("section",{className:"resize-x-bar",onMouseDown:we},oe.createElement("a",{className:"btn-resize"},oe.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},oe.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),oe.createElement("section",{style:{width:z}},me))}},12230:function(mn,dn,st){"use strict";st.d(dn,{cT:function(){return Ne},pe:function(){return je}});var pt=st(59301),Dt=st(14566),oe=st(6767),Ge=st(52430),De=st(28209),fe=st.n(De),me=st(1012),ke=st(44993),Ce=st(47257),Se=st.n(Ce),Me=Object.defineProperty,ve=Object.defineProperties,we=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ae=(Re,We,Ye)=>We in Re?Me(Re,We,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):Re[We]=Ye,ie=(Re,We)=>{for(var Ye in We||(We={}))z.call(We,Ye)&&ae(Re,Ye,We[Ye]);if(de)for(var Ye of de(We))ee.call(We,Ye)&&ae(Re,Ye,We[Ye]);return Re},le=(Re,We)=>ve(Re,we(We)),ue=(Re,We)=>{var Ye={};for(var Ue in Re)z.call(Re,Ue)&&We.indexOf(Ue)<0&&(Ye[Ue]=Re[Ue]);if(Re!=null&&de)for(var Ue of de(Re))We.indexOf(Ue)<0&&ee.call(Re,Ue)&&(Ye[Ue]=Re[Ue]);return Ye},ge=(Re,We,Ye)=>new Promise((Ue,Ke)=>{var ot=wt=>{try{ft(Ye.next(wt))}catch(Je){Ke(Je)}},ut=wt=>{try{ft(Ye.throw(wt))}catch(Je){Ke(Je)}},ft=wt=>wt.done?Ue(wt.value):Promise.resolve(wt.value).then(ot,ut);ft((Ye=Ye.apply(Re,We)).next())});const{Dragger:Pe}=Dt.default,je=Re=>{const We="bf3c199c2470cb477d907b1e0917c17b",Ye="5183666c72eec9e4";var Ue=fe().enc.Utf8.parse(We);let Ke=fe().enc.Utf8.parse(Ye);var ot=fe().AES.decrypt(Re,Ue,{iv:Ke,mode:fe().mode.CBC});return ot.toString(fe().enc.Utf8)};let Be;const Fe=Re=>ge(void 0,[Re],function*({identifier:We,oldFilename:Ye,newFilename:Ue}){var Ke,ot,ut,ft,wt,Je;const nt=yield Fetch("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});nt.data=JSON.parse(je(nt.data));const xt=new OSS({endpoint:(Ke=nt==null?void 0:nt.data)==null?void 0:Ke.end_point,region:(ot=nt==null?void 0:nt.data)==null?void 0:ot.region,accessKeyId:(ut=nt==null?void 0:nt.data)==null?void 0:ut.access_key_id,accessKeySecret:(ft=nt==null?void 0:nt.data)==null?void 0:ft.access_key_secret,bucket:(wt=nt==null?void 0:nt.data)==null?void 0:wt.bucket,stsToken:(Je=nt==null?void 0:nt.data)==null?void 0:Je.security_token});return new Promise((Pt,Ct)=>{console.log(11111,`${We}/${Ye}`,`${We}/${Ue}`,nt.data),xt.copy(`/${We}/${Ye}`,`/${We}/${Ue}`).then(gt=>{console.log("\u62F7\u8D1D\u6210\u529F",gt)}).catch(gt=>{console.log(gt)})})}),Ne=(Re,We,Ye)=>ge(void 0,null,function*(){var Ue,Ke,ot,ut,ft,wt;We.file_name=Re.name;const Je=yield(0,Ge.ZP)("/api/buckets/get_upload_token.json",{method:"get"});console.log("decrypt(res.data):",je(Je.data)),Je.data=JSON.parse(je(Je.data));const nt=Re.name.split(".");nt.pop();const xt=We.realFileName?nt.join(""):(0,me.Z)(),Pt=new(Se())({endpoint:(Ue=Je==null?void 0:Je.data)==null?void 0:Ue.end_point,region:(Ke=Je==null?void 0:Je.data)==null?void 0:Ke.region,accessKeyId:(ot=Je==null?void 0:Je.data)==null?void 0:ot.access_key_id,accessKeySecret:(ut=Je==null?void 0:Je.data)==null?void 0:ut.access_key_secret,bucket:(ft=Je==null?void 0:Je.data)==null?void 0:ft.bucket,stsToken:(wt=Je==null?void 0:Je.data)==null?void 0:wt.security_token});return new Promise((Ct,gt)=>{var dt;Pt.multipartUpload(`${xt}`,new Blob([Re],{type:Re.type}),le(ie({timeout:200*1e3,partSize:102400},Ye),{callback:{url:(dt=Je==null?void 0:Je.data)==null?void 0:dt.callback_url,host:Je==null?void 0:Je.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,Ge.rz)(We)}})).then(function(ht){var Et;Re.response=(Et=ht.data)==null?void 0:Et.data,Ct(ht==null?void 0:ht.data)}).catch(function(ht){gt(ht),console.log("err:",ht)})})}),Ae=Re=>{var We=Re,{user:Ye,cancelUpload:Ue}=We,Ke=ue(We,["user","cancelUpload"]);const[ot,ut]=(0,pt.useState)([]);let[ft,wt]=(0,pt.useState)();const Je={onRemove:xt=>{ut([...ot.filter(Pt=>Pt.name!==xt.name)]),Ke.onChange(ot.filter(Pt=>Pt.name!==xt.name))},disabled:Ke.disabled,multiple:!0,fileList:ot==null?void 0:ot.map(xt=>xt.file),customRequest:()=>{},beforeUpload:xt=>ge(void 0,null,function*(){let Pt=Ke.maxSize||1073741824;if(ot.filter(Ct=>Ct.name===xt.name).length){oe.ZP.info(`${xt.name}\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`);return}return(xt==null?void 0:xt.size)>Pt?(oe.ZP.info(`\u6587\u4EF6\u8D85\u8FC7${Pt/1024/1024/1024}GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42`),!1):(ot.push({name:xt.name,file:xt}),ut([...ot]),Ke.onChange(ot),!1)})},nt=(xt,Pt)=>ge(void 0,null,function*(){var Ct,gt,dt,ht,Et,St;Pt.file_name=xt.name;const Ft=xt.name,mt=yield(0,Ge.ZP)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});if(mt.data=JSON.parse(je(mt.data)),(mt==null?void 0:mt.status)!==0){ot[ot.findIndex(Ve=>Ve.name===Ft)].status="error",ot[ot.findIndex(Ve=>Ve.name===Ft)].file.status="error",Ke.onChange(ot),oe.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}ft=new(Se())({endpoint:(Ct=mt==null?void 0:mt.data)==null?void 0:Ct.end_point,region:(gt=mt==null?void 0:mt.data)==null?void 0:gt.region,accessKeyId:(dt=mt==null?void 0:mt.data)==null?void 0:dt.access_key_id,accessKeySecret:(ht=mt==null?void 0:mt.data)==null?void 0:ht.access_key_secret,bucket:(Et=mt==null?void 0:mt.data)==null?void 0:Et.bucket,stsToken:(St=mt==null?void 0:mt.data)==null?void 0:St.security_token}),console.log(xt,"file"),wt(ft);const yt=xt.name.split(".");yt.pop();const tt=Ft.indexOf(".")>-1?Pt.realFileName?yt.join("."):(0,me.Z)():Ft;return new Promise((Ve,xe)=>{var Le;try{ft.multipartUpload(`${Ke.identifier}/${tt}${Ft.indexOf(".")>-1?"."+Ft.split(".").pop():""}`,new Blob([xt.file],{type:xt.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(Xe,rt,Ie)=>{try{console.log("\u8FDB\u5EA6",Xe,rt,Ie);const _e=ot.findIndex(He=>He.name===Ft);ot[_e].file.percent=Xe*100,ot[_e].tempCheckpoint=rt,ut([...ot])}catch(_e){}},checkpoint:ot[ot.findIndex(Xe=>Xe.name===Ft)].tempCheckpoint,callback:{customValue:{id:Ft+""},url:(Le=mt==null?void 0:mt.data)==null?void 0:Le.callback_url,host:mt==null?void 0:mt.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,Ge.rz)(Pt)}}).then(function(Xe){var rt,Ie,_e;const He=ot.findIndex(ct=>ct.name===Ft);let Qe="done";if(((rt=Xe.data)==null?void 0:rt.status)===0){xt.response=(Ie=Xe.data)==null?void 0:Ie.data;const ct=ot.findIndex(at=>at.name===Ft);ot[ct].status="done",ot[ct].file.status="done"}else oe.ZP.warning((_e=Xe.data)==null?void 0:_e.message),Qe="error";ot[He].status=Qe,ot[He].file.status=Qe,Ke.onChange(ot),Ve(Xe==null?void 0:Xe.data)}).catch(function(Xe){ot[ot.findIndex(rt=>rt.name===Ft)].status="error",ot[ot.findIndex(rt=>rt.name===Ft)].file.status="error",oe.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),ut([...ot]),Ke.onChange(ot),xe(Xe),console.log("err:",Xe)})}catch(Xe){}})});return(0,pt.useEffect)(()=>{ot.every(xt=>xt==="done"||xt==="error")&&Ke.onComplete(ot)},[ot]),(0,pt.useEffect)(()=>{Ue&&(ft==null||ft.cancel())},[Ue]),(0,pt.useEffect)(()=>{Ke.uploading&&ot.map(xt=>ge(void 0,null,function*(){var Pt;if((!xt.status||xt.status==="error")&&!Ue){xt.status="uploading",xt.file.status="uploading";const Ct=yield nt(xt,{login:(Pt=Ye==null?void 0:Ye.userInfo)==null?void 0:Pt.login,container_type:Ke.container_type,container_id:Ke.container_id,description:Ke.description,realFileName:Ke.realFileName})}}))},[Ke.uploading]),pt.createElement(Pe,le(ie({},Je),{height:Ke.height,className:Ke.className}),pt.createElement("p",{className:"ant-upload-hint"},Ke.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};dn.ZP=(0,ke.connect)(({loading:Re,globalSetting:We,user:Ye})=>({globalSetting:We,loading:Re.models.competitions,user:Ye}))(Ae)},41539:function(mn,dn,st){"use strict";st.d(dn,{h:function(){return ge}});var pt=st(59301),Dt=st(82326),oe=st(28284),Ge=st(99571),De=st(89780),fe=st.n(De),me=st(39060),ke=st(76596),Ce=Object.defineProperty,Se=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,we=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,z=(Pe,je,Be)=>je in Pe?Ce(Pe,je,{enumerable:!0,configurable:!0,writable:!0,value:Be}):Pe[je]=Be,ee=(Pe,je)=>{for(var Be in je||(je={}))we.call(je,Be)&&z(Pe,Be,je[Be]);if(ve)for(var Be of ve(je))de.call(je,Be)&&z(Pe,Be,je[Be]);return Pe},ae=(Pe,je)=>Se(Pe,Me(je));const ie=Dt.default.Option,le={labelCol:{span:4},wrapperCol:{span:20}},ue={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"]};dn.Z=({callback:Pe,onCancel:je})=>{const[Be,Fe]=(0,pt.useState)("python");function Ne(Re){Fe(ue[Re][1])}function Ae(Re){Pe(Re)}return pt.createElement(oe.default,ae(ee({},le),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ae,style:{width:500}}),pt.createElement(oe.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},pt.createElement(Dt.default,{getPopupContainer:Re=>Re.parentNode,onChange:Ne},Object.keys(ue).map(Re=>pt.createElement(ie,{key:Re,value:Re},ue[Re][0])))),pt.createElement(oe.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},pt.createElement(ge,{mode:Be})),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:je},"\u53D6\u6D88")))};function ge({value:Pe,onChange:je,mode:Be,options:Fe={}}){const Ne=(0,pt.useRef)(),[Ae,Re]=(0,pt.useState)();return(0,pt.useEffect)(()=>{if(Ae){let We=function(Ye){const Ue=Ye.getValue();je&&je(Ue)};return Ae.on("change",We),()=>{Ae.off("change",We)}}},[Ae,je]),(0,pt.useEffect)(()=>{Ae&&Ae.setOption("mode",Be)},[Ae,Be]),(0,pt.useEffect)(()=>{Ae&&(Pe!==Ae.getValue()||Pe==="")&&setTimeout(()=>{Ae.setValue(Pe||"")},300)},[Ae,Pe]),(0,pt.useEffect)(()=>{if(Ne.current&&!Ae){const We=fe().fromTextArea(Ne.current,ee({mode:Be,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Fe));Re(We)}},[Ne.current,Ae]),pt.createElement("div",{className:"my-codemirror-container"},pt.createElement("textarea",{ref:Ne}))}},4213:function(mn,dn,st){"use strict";st.d(dn,{Z:function(){return Ur}});var pt=st(59301),Dt=st(89780),oe=st.n(Dt),Ge=st(76374),De=st(39060),fe=st(6313),me=st(25717),ke=st(99498),Ce=st(25419),Se=st(67549),Me=st(98573),ve=({value:on="",className:nn,showTextOnly:Zt,showLines:tr,style:mr={}})=>{const Er=(0,pt.useMemo)(()=>"",[on]);return pt.createElement(pt.Fragment,null,pt.createElement("div",{dangerouslySetInnerHTML:{__html:Er}}))},we=st(59301),de=Object.defineProperty,z=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,ae=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable,ue=(on,nn,Zt)=>nn in on?de(on,nn,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):on[nn]=Zt,ge=(on,nn)=>{for(var Zt in nn||(nn={}))ie.call(nn,Zt)&&ue(on,Zt,nn[Zt]);if(ae)for(var Zt of ae(nn))le.call(nn,Zt)&&ue(on,Zt,nn[Zt]);return on},Pe=(on,nn)=>z(on,ee(nn));let je=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u56FE\u50CF",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"iconfont icon-jisuan1",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function Be({onActionCallback:on,title:nn,icon:Zt,actionName:tr,className:mr="",children:Er}){function An(){on(tr)}return we.createElement("a",{title:nn,className:mr,onClick:An},we.createElement("i",{className:`${Zt}`}),Er)}var Fe=({watch:on,showNullButton:nn,showNullProgramButton:Zt,onActionCallback:tr,fullScreen:mr,insertTemp:Er,hidetoolBar:An,extraUse:er})=>{const rn=[...je,{title:`${on?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${on?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return we.createElement("ul",{className:"markdown-toolbar-container"},!An&&rn.map((qt,Qn)=>we.createElement("li",{key:Qn},qt.actionName?we.createElement(Be,Pe(ge({},qt),{onActionCallback:tr})):we.createElement("span",{className:"v-line"}))),nn?we.createElement("li",null,we.createElement(Be,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:tr},we.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Zt?we.createElement(we.Fragment,null,we.createElement("li",null,we.createElement(Be,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:tr},we.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),we.createElement("li",null,we.createElement(Be,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:tr},we.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,Er&&we.createElement("li",null,we.createElement(Be,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Er}`,onActionCallback:tr},we.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),er&&we.createElement("li",null,er),we.createElement("li",{className:"btn-full-screen"},we.createElement(Be,{icon:`${mr?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:mr?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:tr})))},Ne=st(51498),Ae=st(28284),Re=st(37568),We=st(99571),Ye=Object.defineProperty,Ue=Object.defineProperties,Ke=Object.getOwnPropertyDescriptors,ot=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,wt=(on,nn,Zt)=>nn in on?Ye(on,nn,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):on[nn]=Zt,Je=(on,nn)=>{for(var Zt in nn||(nn={}))ut.call(nn,Zt)&&wt(on,Zt,nn[Zt]);if(ot)for(var Zt of ot(nn))ft.call(nn,Zt)&&wt(on,Zt,nn[Zt]);return on},nt=(on,nn)=>Ue(on,Ke(nn));const xt={labelCol:{span:4},wrapperCol:{span:20}};var Pt=({callback:on,onCancel:nn})=>{function Zt(tr){on(tr)}return pt.createElement(Ae.default,nt(Je({},xt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Zt,style:{width:500}}),pt.createElement(Ae.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},pt.createElement(Re.default,null)),pt.createElement(Ae.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},pt.createElement(Re.default,null)),pt.createElement("div",{className:"flex-container flex-end"},pt.createElement(We.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),pt.createElement(We.ZP,{type:"ghost",onClick:nn},"\u53D6\u6D88")))},Ct=st(41539),gt=st(35944),dt=st(62957),ht=st(77019),Et=st(89837),St=st(59301),Ft=({callback:on,onCancel:nn})=>{const Zt=document.createElement("canvas"),tr=Zt.getContext("2d");Zt.width=1e3,Zt.height=800,tr.fillStyle="#ffffff",tr.fillRect(0,0,Zt.width,Zt.height);const mr=Zt.toDataURL("image/png");return St.createElement(dt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},St.createElement(ht.Z,{style:{height:"100vh"}},St.createElement(Et.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:mr,visible:!0,title:String(Date.now())},onOk:Er=>{on({src:Er.url})},onClose:nn})))},mt=st(12378);function yt(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(yt,go.CommandHandler),yt.prototype.canAlignSelection=function(){var on=this.diagram;return!(on===null||on.isReadOnly||on.isModelReadOnly||on.selection.count<2)},yt.prototype.alignLeft=function(){var on=this.diagram;on.startTransaction("aligning left");var nn=1/0;on.selection.each(function(Zt){Zt instanceof go.Link||(nn=Math.min(Zt.position.x,nn))}),on.selection.each(function(Zt){Zt instanceof go.Link||Zt.move(new go.Point(nn,Zt.position.y))}),on.commitTransaction("aligning left")},yt.prototype.alignRight=function(){var on=this.diagram;on.startTransaction("aligning right");var nn=-1/0;on.selection.each(function(Zt){if(!(Zt instanceof go.Link)){var tr=Zt.actualBounds.x+Zt.actualBounds.width;nn=Math.max(tr,nn)}}),on.selection.each(function(Zt){Zt instanceof go.Link||Zt.move(new go.Point(nn-Zt.actualBounds.width,Zt.position.y))}),on.commitTransaction("aligning right")},yt.prototype.alignTop=function(){var on=this.diagram;on.startTransaction("alignTop");var nn=1/0;on.selection.each(function(Zt){Zt instanceof go.Link||(nn=Math.min(Zt.position.y,nn))}),on.selection.each(function(Zt){Zt instanceof go.Link||Zt.move(new go.Point(Zt.position.x,nn))}),on.commitTransaction("alignTop")},yt.prototype.alignBottom=function(){var on=this.diagram;on.startTransaction("aligning bottom");var nn=-1/0;on.selection.each(function(Zt){if(!(Zt instanceof go.Link)){var tr=Zt.actualBounds.y+Zt.actualBounds.height;nn=Math.max(tr,nn)}}),on.selection.each(function(Zt){Zt instanceof go.Link||Zt.move(new go.Point(Zt.actualBounds.x,nn-Zt.actualBounds.height))}),on.commitTransaction("aligning bottom")},yt.prototype.alignCenterX=function(){var on=this.diagram,nn=on.selection.first();if(nn){on.startTransaction("aligning Center X");var Zt=nn.actualBounds.x+nn.actualBounds.width/2;on.selection.each(function(tr){tr instanceof go.Link||tr.move(new go.Point(Zt-tr.actualBounds.width/2,tr.actualBounds.y))}),on.commitTransaction("aligning Center X")}},yt.prototype.alignCenterY=function(){var on=this.diagram,nn=on.selection.first();if(nn){on.startTransaction("aligning Center Y");var Zt=nn.actualBounds.y+nn.actualBounds.height/2;on.selection.each(function(tr){tr instanceof go.Link||tr.move(new go.Point(tr.actualBounds.x,Zt-tr.actualBounds.height/2))}),on.commitTransaction("aligning Center Y")}},yt.prototype.alignColumn=function(on){var nn=this.diagram;nn.startTransaction("align Column"),on===void 0&&(on=0),on=parseFloat(on);var Zt=new Array;nn.selection.each(function(er){er instanceof go.Link||Zt.push(er)});for(var tr=0;tr<Zt.length-1;tr++){var mr=Zt[tr],Er=mr.actualBounds.y+mr.actualBounds.height+on,An=Zt[tr+1];An.move(new go.Point(mr.actualBounds.x,Er))}nn.commitTransaction("align Column")},yt.prototype.alignRow=function(on){on===void 0&&(on=0),on=parseFloat(on);var nn=this.diagram;nn.startTransaction("align Row");var Zt=new Array;nn.selection.each(function(er){er instanceof go.Link||Zt.push(er)});for(var tr=0;tr<Zt.length-1;tr++){var mr=Zt[tr],Er=mr.actualBounds.x+mr.actualBounds.width+on,An=Zt[tr+1];An.move(new go.Point(Er,mr.actualBounds.y))}nn.commitTransaction("align Row")},yt.prototype.canRotate=function(on){var nn=this.diagram;return!(nn===null||nn.isReadOnly||nn.isModelReadOnly||nn.selection.count<1)},yt.prototype.rotate=function(on){on===void 0&&(on=90);var nn=this.diagram;nn.startTransaction("rotate "+on.toString());var nn=this.diagram;nn.selection.each(function(Zt){Zt instanceof go.Link||Zt instanceof go.Group||(Zt.angle+=on)}),nn.commitTransaction("rotate "+on.toString())},yt.prototype.pullToFront=function(){var on=this.diagram;on.startTransaction("pullToFront");var nn=new go.Map;on.selection.each(function(Zt){nn.set(Zt.layer,0)}),nn.iteratorKeys.each(function(Zt){var tr=0;Zt.parts.each(function(mr){if(!mr.isSelected){var Er=mr.zOrder;isNaN(Er)?mr.zOrder=0:tr=Math.max(tr,Er)}}),nn.set(Zt,tr)}),on.selection.each(function(Zt){yt._assignZOrder(Zt,nn.get(Zt.layer)+1)}),on.commitTransaction("pullToFront")},yt.prototype.pushToBack=function(){var on=this.diagram;on.startTransaction("pushToBack");var nn=new go.Map;on.selection.each(function(Zt){nn.set(Zt.layer,0)}),nn.iteratorKeys.each(function(Zt){var tr=0;Zt.parts.each(function(mr){if(!mr.isSelected){var Er=mr.zOrder;isNaN(Er)?mr.zOrder=0:tr=Math.min(tr,Er)}}),nn.set(Zt,tr)}),on.selection.each(function(Zt){yt._assignZOrder(Zt,nn.get(Zt.layer)-1-yt._findGroupDepth(Zt))}),on.commitTransaction("pushToBack")},yt._assignZOrder=function(on,nn,Zt){Zt===void 0&&(Zt=on),on.layer===Zt.layer&&(on.zOrder=nn),on instanceof go.Group&&on.memberParts.each(function(tr){yt._assignZOrder(tr,nn+1,Zt)})},yt._findGroupDepth=function(on){if(on instanceof go.Group){var nn=0;return on.memberParts.each(function(Zt){nn=Math.max(nn,yt._findGroupDepth(Zt))}),nn+1}else return 0},yt.prototype.doKeyDown=function(){var on=this.diagram;if(on!==null){var nn=on.lastInput;if(nn.key==="Up"||nn.key==="Down"||nn.key==="Left"||nn.key==="Right"){var Zt=this.arrowKeyBehavior;if(Zt==="none")return;if(Zt==="select"){this._arrowKeySelect();return}else if(Zt==="move"){this._arrowKeyMove();return}else if(Zt==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},yt.prototype._getAllParts=function(){var on=new Array;return this.diagram.nodes.each(function(nn){on.push(nn)}),this.diagram.parts.each(function(nn){on.push(nn)}),on},yt.prototype._arrowKeyMove=function(){var on=this.diagram,nn=on.lastInput,Zt=0,tr=0;if(nn.control||nn.meta)Zt=1,tr=1;else if(on.grid!==null){var mr=on.grid.gridCellSize;tr=mr.width,Zt=mr.height}on.startTransaction("arrowKeyMove"),on.selection.each(function(Er){nn.key==="Up"?Er.move(new go.Point(Er.actualBounds.x,Er.actualBounds.y-Zt)):nn.key==="Down"?Er.move(new go.Point(Er.actualBounds.x,Er.actualBounds.y+Zt)):nn.key==="Left"?Er.move(new go.Point(Er.actualBounds.x-tr,Er.actualBounds.y)):nn.key==="Right"&&Er.move(new go.Point(Er.actualBounds.x+tr,Er.actualBounds.y))}),on.commitTransaction("arrowKeyMove")},yt.prototype._arrowKeySelect=function(){var on=this.diagram,nn=on.lastInput,Zt=null;nn.key==="Up"?Zt=this._findNearestPartTowards(270):nn.key==="Down"?Zt=this._findNearestPartTowards(90):nn.key==="Left"?Zt=this._findNearestPartTowards(180):nn.key==="Right"&&(Zt=this._findNearestPartTowards(0)),Zt!==null&&(nn.shift?Zt.isSelected=!0:nn.control||nn.meta?Zt.isSelected=!Zt.isSelected:on.select(Zt))},yt.prototype._findNearestPartTowards=function(on){var nn=this.diagram.selection.first();if(nn===null)return null;for(var Zt=nn.actualBounds.center,tr=this._getAllParts(),mr=1/0,Er=nn,An=0;An<tr.length;An++){var er=tr[An];if(er!==nn&&er.canSelect()){var rn=er.actualBounds.center,qt=Zt.directionPoint(rn),Qn=this._angleCloseness(qt,on);if(Qn<=45){var Ot=Zt.distanceSquaredPoint(rn);Ot*=1+Math.sin(Qn*Math.PI/180),Ot<mr&&(mr=Ot,Er=er)}}}return Er},yt.prototype._angleCloseness=function(on,nn){return Math.min(Math.abs(nn-on),Math.min(Math.abs(nn+360-on),Math.abs(nn-360-on)))},yt.prototype._arrowKeyTree=function(){var on=this.diagram,nn=on.selection.first();if(nn instanceof go.Node){var Zt=on.lastInput;if(Zt.key==="Right"){if(!nn.isTreeLeaf)if(!nn.isTreeExpanded)on.commandHandler.canExpandTree(nn)&&on.commandHandler.expandTree(nn);else{var tr=this._sortTreeChildrenByY(nn).first();tr!==null&&on.select(tr)}}else if(Zt.key==="Left")if(!nn.isTreeLeaf&&nn.isTreeExpanded)on.commandHandler.canCollapseTree(nn)&&on.commandHandler.collapseTree(nn);else{var mr=nn.findTreeParentNode();mr!==null&&on.select(mr)}else if(Zt.key==="Up"){var mr=nn.findTreeParentNode();if(mr!==null){var Er=this._sortTreeChildrenByY(mr),An=Er.indexOf(nn);if(An>0){for(var er=Er.elt(An-1);er!==null&&er.isTreeExpanded&&!er.isTreeLeaf;){var rn=this._sortTreeChildrenByY(er);er=rn.last()}er!==null&&on.select(er)}else on.select(mr)}}else if(Zt.key==="Down")if(nn.isTreeExpanded&&!nn.isTreeLeaf){var tr=this._sortTreeChildrenByY(nn).first();tr!==null&&on.select(tr)}else for(;nn!==null;){var mr=nn.findTreeParentNode();if(mr===null)break;var Er=this._sortTreeChildrenByY(mr),An=Er.indexOf(nn);if(An<Er.length-1){on.select(Er.elt(An+1));break}else nn=mr}var qt=on.selection.first();qt!==null&&on.scrollToRect(qt.actualBounds)}},yt.prototype._sortTreeChildrenByY=function(on){var nn=new go.List().addAll(on.findTreeChildrenNodes());return nn.sort(function(Zt,tr){var mr=Zt.location,Er=tr.location;return mr.y<Er.y?-1:mr.y>Er.y?1:mr.x<Er.x?-1:mr.x>Er.x?1:0}),nn},yt.prototype.copyToClipboard=function(on){go.CommandHandler.prototype.copyToClipboard.call(this,on),this._lastPasteOffset.set(this.pasteOffset)},yt.prototype.pasteFromClipboard=function(){var on=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(on,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),on},Object.defineProperty(yt.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(on){if(on!=="move"&&on!=="select"&&on!=="scroll"&&on!=="tree"&&on!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+on);this._arrowKeyBehavior=on}}),Object.defineProperty(yt.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(on){if(!(on instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+on);this._pasteOffset.set(on)}});var tt=yt,Ve=st(74042),xe=st(5269),Le=st(52430),Xe={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},rt=st(64681),Ie=st(59301),_e=(on,nn,Zt)=>new Promise((tr,mr)=>{var Er=rn=>{try{er(Zt.next(rn))}catch(qt){mr(qt)}},An=rn=>{try{er(Zt.throw(rn))}catch(qt){mr(qt)}},er=rn=>rn.done?tr(rn.value):Promise.resolve(rn.value).then(Er,An);er((Zt=Zt.apply(on,nn)).next())});function He({onCancel:on,callback:nn}){let Zt=(0,pt.useRef)(),tr=(0,pt.useRef)(),mr=(0,pt.useRef)(),Er=(0,pt.useRef)(!1);const An=(0,pt.useRef)(!1),[er,rn]=(0,pt.useState)(0);function qt(){const Ot=mt.bx.make,vn={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"};Zt.current=new mt.S0(tr.current,{padding:20,grid:Ot(mt.s_,"Grid",Ot(mt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Ot(mt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Xn=>{var cr=Xn.diagram.commandHandler.addTopLevelParts(Xn.diagram.selection,!0);cr||Xn.diagram.currentTool.doCancel()},commandHandler:Ot(tt),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Xn=>{var cr=Xn.subject;cr.location=cr.location.copy().snapToGridPoint(Xn.diagram.grid.gridOrigin,Xn.diagram.grid.gridCellSize),setTimeout(()=>{Xn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Xn=>{var cr=Xn.subject;setTimeout(()=>{Xn.diagram.commandHandler.editTextBlock()})},LinkRelinked:Xn=>{var cr=Xn.parameter.part;cr.invalidateConnectedLinks();var ar=Xn.subject;Xn.diagram.toolManager.linkingTool.isForwards?ar.toNode.invalidateConnectedLinks():ar.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Zt.current.nodeTemplate=Ot(mt.NB,"Auto",{locationSpot:mt.z6.Center,locationObjectName:"SHAPE",desiredSize:new mt.$u(120,60),minSize:new mt.$u(40,40),resizable:!0,resizeCellSize:new mt.$u(10,10),rotatable:!0},new mt.KX("location","loc",mt.E9.parse).makeTwoWay(mt.E9.stringify),new mt.KX("desiredSize","size",mt.$u.parse).makeTwoWay(mt.$u.stringify),Ot(mt.bn,{name:"SHAPE",fill:vn.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:mt.z6.AllSides,toSpot:mt.z6.AllSides},new mt.KX("figure"),new mt.KX("fill"),new mt.KX("stroke","borderColor"),new mt.KX("strokeWidth","thickness"),new mt.KX("strokeDashArray","dash")),Ot(mt.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Ot(mt.al,{margin:1,textAlign:"center",overflow:mt.al.OverflowEllipsis,editable:!0},new mt.KX("text").makeTwoWay(),new mt.KX("stroke","color"))),Zt.current.nodeTemplate.toolTip=Ot("ToolTip",Ot(mt.s_,"Vertical",{maxSize:new mt.$u(200,NaN)},Ot(mt.al,{font:"bold 10pt sans-serif",textAlign:"center"},new mt.KX("text")),Ot(mt.al,{font:"10pt sans-serif",textAlign:"center"},new mt.KX("text","details"))));function _n(Xn,cr){var ar=(xr,Tr)=>{xr.handled=!0,xr.diagram.model.commit(Wr=>{var $r=Tr.part.adornedPart,ni=new mt.E9().setRectSpot($r.actualBounds,Xn);ni.subtract($r.location),ni.scale(2,2),ni.x+=Math.sign(ni.x)*130,ni.y+=Math.sign(ni.y)*130,ni.add($r.location),ni.snapToGridPoint(xr.diagram.grid.gridOrigin,xr.diagram.grid.gridCellSize);var ai=Wr.copyNodeData($r.data);Wr.setGroupKeyForNodeData(ai,Wr.getGroupKeyForNodeData($r.data)),Wr.addNodeData(ai);var yn={from:$r.key,to:Wr.getKeyForNodeData(ai)};Wr.addLinkData(yn);var Ci=xr.diagram.findNodeForData(ai);Ci.location=ni,xr.diagram.select(Ci),setTimeout(()=>{xr.diagram.commandHandler.editTextBlock()},20)})};return Ot(mt.bn,{figure:cr,alignment:Xn,alignmentFocus:Xn.opposite(),width:Xn.equals(mt.z6.Top)||Xn.equals(mt.z6.Bottom)?25:18,height:Xn.equals(mt.z6.Top)||Xn.equals(mt.z6.Bottom)?18:25,fill:"orange",stroke:vn.white,strokeWidth:4,mouseEnter:(xr,Tr)=>Tr.fill="dodgerblue",mouseLeave:(xr,Tr)=>Tr.fill="orange",isActionable:!0,click:ar,contextClick:ar})}function qn(Xn){return Ot(mt.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:(cr,ar)=>ar.fill="dodgerblue",mouseLeave:(cr,ar)=>ar.fill="orange",click:(cr,ar)=>{cr.diagram.commandHandler.showContextMenu(ar.part.adornedPart)}},Xn||{})}Zt.current.nodeTemplate.selectionAdornmentTemplate=Ot(mt.uz,"Spot",Ot(mt.Vm,{padding:10}),_n(mt.z6.Top,"TriangleUp"),_n(mt.z6.Left,"TriangleLeft"),_n(mt.z6.Right,"TriangleRight"),_n(mt.z6.Bottom,"TriangleDown"),qn({alignment:new mt.z6(.75,0)}));function an(Xn,cr){return(ar,xr)=>{ar.handled=!0,ar.diagram.model.commit(Tr=>{Tr.set(xr.part.adornedPart.data,Xn,cr)})}}function Un(Xn,cr){return cr||(cr="color"),Ot(mt.bn,{width:16,height:16,stroke:"lightgray",fill:Xn,margin:1,background:"transparent",mouseEnter:(ar,xr)=>xr.stroke="dodgerblue",mouseLeave:(ar,xr)=>xr.stroke="lightgray",click:an(cr,Xn),contextClick:an(cr,Xn)})}function Kn(){return[Ot("ContextMenuButton",Ot(mt.s_,"Horizontal",Un(vn.white,"fill"),Un(vn.beige,"fill"),Un(vn.extralightblue,"fill"),Un(vn.extralightred,"fill"))),Ot("ContextMenuButton",Ot(mt.s_,"Horizontal",Un(vn.lightgray,"fill"),Un(vn.lightgreen,"fill"),Un(vn.lightblue,"fill"),Un(vn.lightred,"fill")))]}function On(){return[Ot("ContextMenuButton",Ot(mt.s_,"Horizontal",Un(vn.black),Un(vn.green),Un(vn.blue),Un(vn.red))),Ot("ContextMenuButton",Ot(mt.s_,"Horizontal",Un(vn.white),Un(vn.magenta),Un(vn.purple),Un(vn.orange)))]}function ur(Xn,cr){return cr||(cr="thickness"),Ot(mt.bn,"LineH",{width:16,height:16,strokeWidth:Xn,margin:1,background:"transparent",mouseEnter:(ar,xr)=>xr.background="dodgerblue",mouseLeave:(ar,xr)=>xr.background="transparent",click:an(cr,Xn),contextClick:an(cr,Xn)})}function $n(Xn,cr){return cr||(cr="dash"),Ot(mt.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Xn,margin:1,background:"transparent",mouseEnter:(ar,xr)=>xr.background="dodgerblue",mouseLeave:(ar,xr)=>xr.background="transparent",click:an(cr,Xn),contextClick:an(cr,Xn)})}function Wn(){return[Ot("ContextMenuButton",Ot(mt.s_,"Horizontal",ur(1),ur(2),ur(3),ur(4))),Ot("ContextMenuButton",Ot(mt.s_,"Horizontal",$n(null),$n([2,4]),$n([4,4])))]}function hr(Xn,cr){return cr||(cr="figure"),Ot(mt.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Xn,margin:1,background:"transparent",mouseEnter:(ar,xr)=>xr.fill="dodgerblue",mouseLeave:(ar,xr)=>xr.fill="lightgray",click:an(cr,Xn),contextClick:an(cr,Xn)})}Zt.current.nodeTemplate.contextMenu=Ot("ContextMenu",Ot("ContextMenuButton",Ot(mt.s_,"Horizontal",hr("Rectangle"),hr("RoundedRectangle"),hr("Ellipse"),hr("Diamond"))),Ot("ContextMenuButton",Ot(mt.s_,"Horizontal",hr("Parallelogram2"),hr("ManualOperation"),hr("Procedure"),hr("Cylinder1"))),Ot("ContextMenuButton",Ot(mt.s_,"Horizontal",hr("Terminator"),hr("CreateRequest"),hr("Document"),hr("TriangleDown"))),Kn(),On(),Wn()),Zt.current.groupTemplate=Ot(mt.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:mt.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Xn,cr)=>{var ar=cr.addMembers(cr.diagram.selection,!0);ar||cr.diagram.currentTool.doCancel()},avoidable:!1},new mt.KX("location","loc",mt.E9.parse).makeTwoWay(mt.E9.stringify),Ot(mt.s_,"Auto",{name:"BODY"},Ot(mt.bn,{parameter1:10,fill:vn.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:mt.z6.AllSides,toSpot:mt.z6.AllSides},new mt.KX("fill"),new mt.KX("stroke","color"),new mt.KX("strokeWidth","thickness"),new mt.KX("strokeDashArray","dash")),Ot(mt.Vm,{background:"transparent",margin:20})),Ot(mt.al,{alignment:mt.z6.Top,alignmentFocus:mt.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new mt.KX("text"),new mt.KX("stroke","color"))),Zt.current.groupTemplate.selectionAdornmentTemplate=Ot(mt.uz,"Spot",Ot(mt.s_,"Auto",Ot(mt.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Ot(mt.Vm,{margin:1.5})),qn({alignment:mt.z6.TopRight,alignmentFocus:mt.z6.BottomRight})),Zt.current.groupTemplate.contextMenu=Ot("ContextMenu",Kn(),On(),Wn()),Zt.current.linkTemplate=Ot(mt.rU,{layerName:"Foreground",routing:mt.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new mt.KX("fromSpot","fromSpot",mt.z6.parse),new mt.KX("toSpot","toSpot",mt.z6.parse),new mt.KX("fromShortLength","dir",Xn=>Xn>=1?10:0),new mt.KX("toShortLength","dir",Xn=>Xn>=1?10:0),new mt.KX("points").makeTwoWay(),Ot(mt.bn,{strokeWidth:2},new mt.KX("stroke","color"),new mt.KX("strokeWidth","thickness"),new mt.KX("strokeDashArray","dash")),Ot(mt.bn,{segmentIndex:0,segmentOffset:new mt.E9(15,0),segmentOrientation:mt.rU.OrientAlong,alignmentFocus:mt.z6.Right,figure:"circle",width:10,strokeWidth:0},new mt.KX("fill","color"),new mt.KX("visible","dir",Xn=>Xn===1)),Ot(mt.bn,{segmentIndex:-1,segmentOffset:new mt.E9(-10,6),segmentOrientation:mt.rU.OrientPlus90,alignmentFocus:mt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new mt.KX("fill","color"),new mt.KX("visible","dir",Xn=>Xn>=1),new mt.KX("width","thickness",Xn=>7+3*Xn),new mt.KX("height","thickness",Xn=>7+3*Xn),new mt.KX("segmentOffset","thickness",Xn=>new mt.E9(-15,4+1.5*Xn))),Ot(mt.bn,{segmentIndex:0,segmentOffset:new mt.E9(15,-6),segmentOrientation:mt.rU.OrientMinus90,alignmentFocus:mt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new mt.KX("fill","color"),new mt.KX("visible","dir",Xn=>Xn===2),new mt.KX("width","thickness",Xn=>7+3*Xn),new mt.KX("height","thickness",Xn=>7+3*Xn),new mt.KX("segmentOffset","thickness",Xn=>new mt.E9(-15,4+1.5*Xn))),Ot(mt.al,{alignmentFocus:new mt.z6(0,1,-4,0),editable:!0},new mt.KX("text").makeTwoWay(),new mt.KX("stroke","color"))),Zt.current.linkTemplate.selectionAdornmentTemplate=Ot(mt.uz,Ot(mt.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Rr(2)},new mt.KX("pathPattern","thickness",Rr)),qn({alignmentFocus:new mt.z6(0,0,-6,-4)}));function Rr(Xn){return Ot(mt.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Xn+4).toString()+" H3"})}function br(Xn){var cr="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Xn===0?cr="M0 0 M16 16 M0 8 L16 8":Xn===2&&(cr="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Ot(mt.bn,{geometryString:cr,margin:2,background:"transparent",mouseEnter:(ar,xr)=>xr.background="dodgerblue",mouseLeave:(ar,xr)=>xr.background="transparent",click:an("dir",Xn),contextClick:an("dir",Xn)})}function Pr(Xn){var cr=(ar,xr)=>{ar.handled=!0,ar.diagram.model.commit(Tr=>{var Wr=xr.part.adornedPart;Tr.set(Wr.data,Xn?"toSpot":"fromSpot",mt.z6.stringify(mt.z6.AllSides)),(Xn?Wr.toNode:Wr.fromNode).invalidateConnectedLinks()})};return Ot(mt.bn,{width:12,height:12,fill:"transparent",mouseEnter:(ar,xr)=>xr.background="dodgerblue",mouseLeave:(ar,xr)=>xr.background="transparent",click:cr,contextClick:cr})}function hn(Xn,cr){var ar=0,xr=mt.z6.RightSide;Xn.equals(mt.z6.Top)?(ar=270,xr=mt.z6.TopSide):Xn.equals(mt.z6.Left)?(ar=180,xr=mt.z6.LeftSide):Xn.equals(mt.z6.Bottom)&&(ar=90,xr=mt.z6.BottomSide),cr||(ar-=180);var Tr=(Wr,$r)=>{Wr.handled=!0,Wr.diagram.model.commit(ni=>{var ai=$r.part.adornedPart;ni.set(ai.data,cr?"toSpot":"fromSpot",mt.z6.stringify(xr)),(cr?ai.toNode:ai.fromNode).invalidateConnectedLinks()})};return Ot(mt.bn,{alignment:Xn,alignmentFocus:Xn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:ar,background:"transparent",mouseEnter:(Wr,$r)=>$r.background="dodgerblue",mouseLeave:(Wr,$r)=>$r.background="transparent",click:Tr,contextClick:Tr})}Zt.current.linkTemplate.contextMenu=Ot("ContextMenu",On(),Wn(),Ot("ContextMenuButton",Ot(mt.s_,"Horizontal",br(0),br(1),br(2))),Ot("ContextMenuButton",Ot(mt.s_,"Horizontal",Ot(mt.s_,"Spot",Pr(!1),hn(mt.z6.Top,!1),hn(mt.z6.Left,!1),hn(mt.z6.Right,!1),hn(mt.z6.Bottom,!1)),Ot(mt.s_,"Spot",{margin:new mt.Zt(0,0,0,2)},Pr(!0),hn(mt.z6.Top,!0),hn(mt.z6.Left,!0),hn(mt.z6.Right,!0),hn(mt.z6.Bottom,!0)))));const Pi=`{ "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 qr=["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 ki(Xn){return console.log("shapeName:",Xn),qr.indexOf(Xn)>=0}var un=new mt.YI(mr.current,{maxSelectionCount:1,linkTemplate:Ot(mt.rU,{locationSpot:mt.z6.Center,selectionAdornmentTemplate:Ot(mt.uz,"Link",{locationSpot:mt.z6.Center},Ot(mt.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Ot(mt.bn,{toArrow:"Standard",stroke:null}))},{routing:mt.rU.AvoidsNodes,curve:mt.rU.JumpOver,corner:5,toShortLength:4},new mt.KX("points"),Ot(mt.bn,{isPanelMain:!0,strokeWidth:2}),Ot(mt.bn,{toArrow:"Standard",stroke:null})),model:new mt.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...mt.bn.getFigureGenerators().toArray().map(Xn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Xn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Zt.current.addDiagramListener("TextEdited",function(Xn){var cr;const ar=Xn.subject.part;var xr=(cr=document.activeElement)==null?void 0:cr.value;typeof xr=="string"&&xr.trim()===""&&Zt.current.model.commit(function(Tr){Tr.set(ar.data,"text","\u672A\u547D\u540D"),Zt.current.commandHandler.stopCommand()},"increment")}),un.nodeTemplate=Ot(mt.NB,"Auto",{locationSpot:mt.z6.Center},new mt.KX("location","location",mt.E9.parse).makeTwoWay(mt.E9.stringify),Ot(mt.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 mt.KX("stroke").makeTwoWay(),new mt.KX("fill").makeTwoWay(),new mt.KX("figure")),Ot(mt.al,{margin:new mt.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new mt.$u(16,16),maxSize:new mt.$u(10,NaN),textAlign:"center",editable:!0},new mt.KX("key").makeTwoWay())),setTimeout(()=>{Zt.current.grid=Ot(mt.s_,"Grid",Ot(mt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Ot(mt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Zt.current.grid.visible=!0,Zt.current.grid.gridCellStroke="darkgray",Zt.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Zt.current,Zt.current}const Qn=()=>_e(this,null,function*(){var Ot,vn=Zt.current.makeImage();const _n=yield(0,Le.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:vn.src,file_data:JSON.stringify({login:(Ot=(0,rt.eY)())==null?void 0:Ot.login,data:JSON.parse(Zt.current.model.toJson())})}});nn({src:_n.url})});return(0,pt.useEffect)(()=>(setTimeout(()=>{qt()},500),rn(er+1),()=>{Zt.current=null}),[]),Ie.createElement("div",{ref:An,className:"body-overflow-initial"},Ie.createElement(dt.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!er,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Ie.createElement(ht.Z,null,Ie.createElement(xe.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Ie.createElement(xe.Z,{onClick:()=>{var Ot,vn,_n=Zt.current.selection.first();if(Er.current=!Er.current,document.activeElement&&_n){let qn=(vn=(Ot=document.activeElement)==null?void 0:Ot.value)==null?void 0:vn.trim();typeof qn=="string"&&Zt.current.model.commit(function(an){an.set(_n.data,"text",qn||"\u672A\u547D\u540D"),Zt.current.commandHandler.stopCommand()},"increment")}rn(er+1)}},Ie.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:on},Ie.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:Er.current?"none":"block"},className:Xe.flowChartWrp},Ie.createElement("div",{style:{display:"flex",height:"100%"}},Ie.createElement("div",{style:{width:"300px",height:"100%"}},Ie.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Ie.createElement("div",{style:{height:"calc(100% - 50px)"},className:Xe.myPaletteDiv,ref:mr})),Ie.createElement("div",{style:{flex:1,position:"relative"}},Ie.createElement("div",{ref:tr,style:{height:"80vh"}}))),Ie.createElement("div",{className:"tr"},Ie.createElement(We.ZP,{size:"large",onClick:Qn,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Qe=He,ct=st(47889),at=st(71051);const At=ct.ZP.Group,Lt={margin:"0 8px"};var It=({callback:on,onCancel:nn})=>{function Zt(tr){on(tr)}return pt.createElement(Ae.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Zt},pt.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},pt.createElement("span",{style:Lt},"\u5355\u5143\u683C\u6570\uFF1A"),pt.createElement("span",{style:Lt},"\u884C\u6570"),pt.createElement(Ae.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},pt.createElement(at.Z,null)),pt.createElement("span",{style:Lt},"\u5217\u6570"),pt.createElement(Ae.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},pt.createElement(at.Z,null))),pt.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},pt.createElement("span",{style:Lt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),pt.createElement(Ae.default.Item,{name:"align"},pt.createElement(At,null,pt.createElement(ct.ZP,{value:"default"},pt.createElement("i",{className:"fa fa-align-justify"})),pt.createElement(ct.ZP,{value:"left"},pt.createElement("i",{className:"fa fa-align-left"})),pt.createElement(ct.ZP,{value:"center"},pt.createElement("i",{className:"fa fa-align-center"})),pt.createElement(ct.ZP,{value:"right"},pt.createElement("i",{className:"fa fa-align-right"}))))),pt.createElement("div",{className:"flex-container flex-end"},pt.createElement(We.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),pt.createElement(We.ZP,{type:"ghost",onClick:nn},"\u53D6\u6D88")))},Kt=st(71411),Xt=st(84072),$t=st.n(Xt),ln=(0,pt.forwardRef)(({use3d:on,width:nn,height:Zt,callback:tr,showSaveButton:mr},Er)=>{const An=(0,pt.useRef)(),er=(0,pt.useRef)(),[rn,qt]=(0,pt.useState)(!1),Qn=(0,pt.useRef)({id:An,appName:"graphing",width:nn||1e3,height:Zt||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)(()=>{er.current=new($t())(Qn.current,!0),window.onload=function(){er.current.inject("applet_container")}},[]);const Ot=()=>{var vn=window.ggbApplet.getPNGBase64(1,!0,72);return tr&&tr(vn),vn};return(0,pt.useEffect)(()=>{Qn.current.appName=rn?"3D":"graphing",er.current.inject("applet_container")},[rn]),(0,pt.useEffect)(()=>{qt(on)},[on]),(0,pt.useImperativeHandle)(Er,()=>({getImgData:Ot})),pt.createElement(pt.Fragment,null,pt.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:An}),pt.createElement(ht.Z,{align:"middle"},pt.createElement(xe.Z,{flex:1},pt.createElement(Kt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:rn,onChange:vn=>qt(vn)})),pt.createElement(xe.Z,null,pt.createElement(We.ZP,{size:"large",onClick:Ot,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),tn=st(53267),Wt=st(6767);const En="link",Pn="upload-image",Ln="add-flowchart",Vn="draw-image",Or="add-flowchart",dr="code-block",Lr="add-table",Xr="------------",Vr={default:Xr,left:`:${Xr}`,center:`:${Xr}:`,right:`${Xr}:`};var si=st(47458);function yi(){}let Ii=0;const Fi=1e4,_i="\u2581",Yi="@\u2581\u2581@",et="@\u2581@",pr=`
**\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`,vr=["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 Ei(on){return/^\d+$/.test(on)?`${on}px`:on}const wr=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Br={[wr+"-B"]:"bold",[wr+"-I"]:"italic"},ro={[En]:"\u6DFB\u52A0\u94FE\u63A5",[dr]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Pn]:"\u6DFB\u52A0\u56FE\u7247",[Vn]:"\u6DFB\u52A0\u753B\u56FE",[Ln]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Lr]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Ur=({defaultValue:on="",onChange:nn,width:Zt="100%",height:tr=400,miniToolbar:mr=!1,isFocus:Er=!1,watch:An,insertTemp:er,mode:rn="markdown",id:qt="markdown-editor-id",showResizeBar:Qn=!1,noStorage:Ot=!1,showNullButton:vn=!1,showNullProgramButton:_n=!1,hidetoolBar:qn=!1,fullScreen:an=!1,onBlur:Un,onCMBeforeChange:Kn,onFullScreen:On,className:ur="",disablePaste:$n=!1,disabled:Wn=!1,disabledFill:hr=!1,placeholder:Rr="",values:br="",extraUse:Pr})=>{const[hn,Pi]=(0,pt.useState)(null),[qr,ki]=(0,pt.useState)(on),[un,Xn]=(0,pt.useState)(An),[cr,ar]=(0,pt.useState)(an),[xr,Tr]=(0,pt.useState)(""),[Wr,$r]=(0,pt.useState)(0),[ni,ai]=(0,pt.useState)(tr),[yn,Ci]=(0,pt.useState)(!1),[xn,yr]=(0,pt.useState)(0),[Nr,Yr]=(0,pt.useState)(0),Zi=(0,pt.useRef)(),zi=(0,pt.useRef)(),bi=(0,pt.useRef)(),ji=(0,pt.useRef)();(0,pt.useEffect)(()=>{const or=window.scrollY||window.pageYOffset;ki(br),hn==null||hn.setValue(br),window.scrollTo(0,or)},[br]),(0,pt.useEffect)(()=>{On==null||On(cr)},[cr]),(0,pt.useEffect)(()=>{if(Zi.current){let or=function(fn,nr){var kr;if($n){nr.preventDefault();return}const ei=nr.clipboardData;if(ei){const Zr=ei.types.toString(),ri=ei.items;if(Zr==="Files"||ei.types.indexOf("Files")>-1){if(nr.preventDefault(),rn=="stex")return;try{let li=ri[1];((kr=ri[0])==null?void 0:kr.kind)==="file"&&(li=ri[0]);const ii=li.getAsFile(),Oi=ii.name.split(".").pop();(0,gt.I)(ii,Di=>{var po,Yt,ci;Di.id?((po=ii==null?void 0:ii.type)==null?void 0:po.indexOf("image"))>-1?Hn.replaceSelection(`<img width="100%" src="/api/attachments/${Di.id}?type=${Di.content_type})" alt="" />`):((Yt=ii==null?void 0:ii.type)==null?void 0:Yt.indexOf("video"))>-1?Hn.replaceSelection(`<video width="100%" controls src="/api/attachments/${Di.id}"></video>`):((ci=ii==null?void 0:ii.type)==null?void 0:ci.indexOf("pdf"))>-1?Hn.replaceSelection(`<a href="/api/attachments/${Di.id}?type=${ii.type}&disposition=inline" target="_blank">${ii.name}</a>`):vr.includes(Oi)?Hn.replaceSelection(`<a href="/api/attachments/${Di.id}?type=office&disposition=inline" target="_blank">${ii.name}</a>`):Hn.replaceSelection(`[${ii.name}](/api/attachments/${Di.id}?type=${Di.content_type})`):(Di==null?void 0:Di.status)===401&&(document.location.href="/user/login")})}catch(li){Wt.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Hn=oe().fromTextArea(Zi.current,{mode:rn,lineNumbers:!mr,lineWrapping:!0,value:on,autoCloseTags:!0,autoCloseBrackets:!0});return Hn.on("keyup",function(fn,nr){nr.keyCode===8&&(fn.getValue()==""?Hn.setOption("placeholder",Rr):Hn.setOption("placeholder",null))}),Hn.on("keydown",function(fn,nr){if(nr.keyCode===8){var kr=Sn(fn);kr&&nr.preventDefault()}}),Er&&Hn.focus(),Hn.on("paste",or),Wn&&Hn.on("beforeChange",function(fn,nr){(nr.origin==="paste"||nr.origin==="+input")&&nr.cancel()}),Pi(Hn),()=>{Hn.off("paste",or)}}},[]);const Qt=(0,pt.useCallback)(()=>{if(zi.current)try{}catch(or){console.log(or,"---- to set md editor body height")}},[ni,zi,cr]);(0,pt.useEffect)(()=>{function or(){let Hn=new Ge.Z(fn=>{for(let nr of fn)(nr.target.offsetHeight>0||nr.target.offsetWidth>0)&&(Qt(),hn.setSize("100%","100%"),hn.refresh())});return Hn.observe(Zi.current.parentElement),Hn}if(hn){const Hn=or();return()=>{var fn,nr;(fn=Zi.current)!=null&&fn.parentElement&&Hn.unobserve((nr=Zi.current)==null?void 0:nr.parentElement)}}},[hn,Qt]),(0,pt.useEffect)(()=>{if(hn){let or=[];for(const[Hn,fn]of Object.entries(Br)){let nr={[Hn]:()=>{Jt(fn)}};or.push(nr),hn.addKeyMap(nr)}return()=>{for(let Hn of or)hn.removeKeyMap(Hn)}}},[hn]),(0,pt.useEffect)(()=>{an!==cr&&ar(an)},[an]),(0,si.Z)(()=>{if(!Ot&&Wr>0){let or=new Date().getTime(),Hn=window.sessionStorage.getItem(qt);or>=Wr+Fi&&(!Hn||Hn!==qr)&&(window.sessionStorage.setItem(qt,qr),Ci(!0))}},Fi),(0,pt.useEffect)(()=>{Xn(An)},[hn,An]),(0,pt.useEffect)(()=>{hn&&Er&&hn.focus()},[hn,Er]),(0,pt.useEffect)(()=>{if(un&&hn){let or=function(fn){let nr=fn.target;if(ji.current){let kr=nr.scrollTop/nr.scrollHeight;ji.current.scrollTop=ji.current.scrollHeight*kr}};const Hn=hn.getScrollerElement();return Hn.addEventListener("scroll",or),()=>{Hn.removeEventListener("scroll",or)}}},[hn,un]),(0,pt.useEffect)(()=>{if(hn&&Kn){let or=function(Hn,fn){Kn(Hn,fn)};return hn.on("beforeChange",or),()=>{hn.off("beforeChange",or)}}},[hn,Kn]),(0,pt.useEffect)(()=>{if(hn&&Un){let or=function(){Un(hn.getValue())};return hn.on("blur",or),()=>{hn.off("blur",or)}}},[hn,Un]);function Sn(or,Hn){var fn=or.getDoc(),nr=fn.getCursor(),kr=fn.getLine(nr.line),ei=kr.charAt(nr.ch-1),Zr=kr.lastIndexOf("@\u2581@",nr.ch),ri=kr.lastIndexOf("@\u2581\u2581@",nr.ch),li=Zr>ri?Zr:ri,ii=Zr>ri?3:4;if(Yi.indexOf(ei)===-1)return null;if(console.log("change1:",Hn,or,kr,nr,li,Zr,ri,ei),li>=0&&nr.ch-li<5){var Oi=li+ii;return fn.replaceRange("",{line:nr.line,ch:li},{line:nr.line,ch:Oi}),{line:nr.line,ch:Oi}}return null}(0,pt.useEffect)(()=>{if(hn){let or=function(Hn,fn){const nr=Hn.getValue();ki(nr),$r(new Date().getTime()),Hn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),nn&&(_n?nn(nr,jn(nr)):nn(nr))};return hn.on("change",or),()=>{hn.off("change",or)}}},[hn,nn]),(0,pt.useEffect)(()=>{if(hn)if(on==null)hn.setValue(""),ki("");else{const or=window.scrollY||window.pageYOffset;on!==hn.getValue()&&(hn.setValue(on),ki(on),hn.setCursor(Wn?1:hn.lineCount(),0),window.scrollTo(0,or))}},[hn,on]);const Jt=(0,pt.useCallback)(or=>{const Hn=hn.getCursor(),fn=hn.getSelection();let nr=fn.split(`
`);switch(or){case"bold":return hn.replaceSelection("**"+fn+"**"),fn===""&&hn.setCursor(Hn.line,Hn.ch+2),hn.focus();case"italic":return hn.replaceSelection("*"+fn+"*"),fn===""&&hn.setCursor(Hn.line,Hn.ch+1),hn.focus();case"code":return hn.replaceSelection("`"+fn+"`"),fn===""&&hn.setCursor(Hn.line,Hn.ch+1),hn.focus();case"inline-latex":return Tr("inline-latex"),hn.focus();case"latex":return hn.replaceSelection("```latex\n"+fn+"\n```"),hn.setCursor(Hn.line+1,fn.length+1),hn.focus();case"line-break":return hn.replaceSelection(`<br/>
`),hn.focus();case"list-ul":return fn===""?hn.replaceSelection("- "+fn):hn.replaceSelection(nr.map(kr=>kr===""?"":`- ${kr}`).join(`
`)),hn.focus();case"list-ol":return fn===""?hn.replaceSelection("1. "+fn):hn.replaceSelection(nr.map((kr,ei)=>kr===""?"":`${ei+1}. ${kr}`).join(`
`)),hn.focus();case"add-null-ch":return fn===""&&hn.setCursor(Hn.line,Hn.ch),hn.replaceSelection(_i),hn.focus();case"add-signal":return fn===""&&hn.setCursor(Hn.line,Hn.ch),hn.replaceSelection(et),hn.focus();case"add-multiple":return fn===""&&hn.setCursor(Hn.line,Hn.ch),hn.replaceSelection(Yi),hn.focus();case"inster-template-1":return fn===""&&hn.setCursor(Hn.line,Hn.ch),hn.replaceSelection(pr),hn.focus();case"eraser":return hn.setValue(""),hn.focus();case"trigger-watch":return Xn(!un),hn.focus();case"trigger-full-screen":return ar(!cr),hn.focus();case En:Tr(En);return;case dr:Tr(dr);return;case Pn:Tr(Pn);return;case Vn:Tr(Vn);return;case"maths-latex":Tr("maths-latex");return;case Ln:Tr(Ln);return;case Lr:Tr(Lr);return;default:throw new Error}},[hn,un,cr]),lt=(0,pt.useCallback)((or,Hn)=>{var fn,nr,kr,ei,Zr,ri;switch(Tr(""),xr){case En:const{title:po,link:Yt}=or;return hn.replaceSelection(`[${po}](${Yt})`),hn.focus();case dr:const{language:ci,content:pi}=or;return hn.replaceSelection(["```"+ci,pi,"```"].join(`
`)),hn.focus();case"maths-latex":for(var li=atob(or),ii=new Uint8Array(li.length),Oi=0;Oi<li.length;Oi++)ii[Oi]=li.charCodeAt(Oi);var Di=new Blob([ii],{type:"image/png"});(0,gt.I)(Di,Ao=>{Ao.id?hn.replaceSelection(`![,](/api/attachments/${Ao.id}?type=${Ao.content_type})`):(Ao==null?void 0:Ao.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":hn.replaceSelection("`$$"+or+"$$`");break;case Pn:case Vn:case Or:const{src:Hr,alt:Si}=or,_r=Hn,qi=(kr=(nr=(fn=_r==null?void 0:_r.name)==null?void 0:fn.split("."))==null?void 0:nr.pop)==null?void 0:kr.call(nr);return((ei=_r==null?void 0:_r.type)==null?void 0:ei.indexOf("image"))>-1||!(_r!=null&&_r.type)?_r!=null&&_r.align||_r!=null&&_r.width?hn.replaceSelection(`<p style="text-align:${_r.align||"initial"}"><img width="${_r.width?_r.width+"%":"initial"}" src="${Hr}" alt="${Si||""}" /></p>`):hn.replaceSelection(`<img width="100%" src="${Hr}" alt="${Si||""}" />`):((Zr=_r==null?void 0:_r.type)==null?void 0:Zr.indexOf("video"))>-1?hn.replaceSelection(`<video width="100%" controls src="${Hr}"></video>`):((ri=_r==null?void 0:_r.type)==null?void 0:ri.indexOf("pdf"))>-1?hn.replaceSelection(`<a href="${Hr}?type=${_r.type}&disposition=inline" target="_blank">${_r.name}</a>`):vr.includes(qi)?hn.replaceSelection(`<a href="${Hr}?type=office&disposition=inline" target="_blank">${_r.name}</a>`):hn.replaceSelection(`[${_r.name}](${Hr})`),hn.focus();case Lr:const{row:Bi,col:gi,align:Qi}=or;let ga=`
`;for(let Ao=0;Ao<Bi;Ao++){let Aa=[],ma=[];for(let Dr=0;Dr<gi;Dr++)Ao===1&&ma.push(Vr[Qi]),Aa.push(" ");Ao===1&&(ga+=`| ${ma.join(" | ")} |
`),ga+=`| ${Aa.join(gi===1?"":" | ")} |
`}return hn.replaceSelection(ga+`
`),hn.focus();default:throw new Error}},[hn,xr]),Bn=(0,pt.useMemo)(()=>{switch(xr){case En:return pt.createElement(Pt,{callback:lt,onCancel:sn});case dr:return pt.createElement(Ct.Z,{callback:lt,onCancel:sn});case Pn:return pt.createElement(gt.Z,{callback:lt,onCancel:sn});case Ln:return pt.createElement(Qe,{callback:lt,onCancel:sn});case Lr:return pt.createElement(It,{callback:lt,onCancel:sn});case"maths-latex":return pt.createElement(ln,{showSaveButton:!0,callback:lt});case"inline-latex":return pt.createElement(tn.Z,{showSaveButton:!0,callback:lt});default:return null}},[xr]);function sn(){Tr("")}(0,pt.useEffect)(()=>{if(bi.current){let or=function(Zr){kr=!0,ei=Zr.pageY},Hn=function(){kr=!1},fn=function(Zr){if(kr){let ri=Zr.pageY-ei;ri<0&&(ri=0),ri>300&&(ri=300);let li=tr+ri+"px";ai(li)}},nr=bi.current,kr=!1,ei=0;return nr.addEventListener("mousedown",or),document.addEventListener("mousemove",fn),document.addEventListener("mouseup",Hn),()=>{nr.removeEventListener("mousedown",or),document.removeEventListener("mousemove",fn),document.removeEventListener("mouseup",Hn)}}},[hn,bi]),(0,pt.useEffect)(()=>{ai(tr)},[tr]);const bn=Ei(Zt),zn=Ei(ni),Yn={width:bn,height:zn},pn=(0,pt.useMemo)(()=>{if(Wr){let or=new Date(Wr),Hn=or.getHours(),fn=or.getMinutes(),nr=or.getSeconds();return Hn=Hn<10?"0"+Hn:Hn,fn=fn<10?"0"+fn:fn,nr=nr<10?"0"+nr:nr,`${Hn}:${fn}:${nr}`}return 0},[Wr]),jn=or=>{const Hn=[];if(_n){let fn=-1;or=or.replace(/(@▁▁@|@▁@)/g,function(nr,kr,ei){Hn.push({multiLine:nr!==et})})}return Hn};function Dn(){window.sessionStorage.removeItem(qt),Ci(!1),$r(0)}function Gn(){Ci(!1),$r(0),hn.setValue(window.sessionStorage.getItem(qt))}(0,pt.useEffect)(()=>{ro[xr]&&xr!==Vn&&xr!==Ln&&setTimeout(()=>{const or=document.getElementsByClassName("markdown-popup-form")[0],Hn=window.innerWidth/2-or.offsetWidth/2,fn=window.innerHeight/2-or.offsetHeight/2;yr(Hn),Yr(fn)},0)},[xr]);const In=or=>{or.preventDefault();const Hn=or.clientX-xn,fn=or.clientY-Nr;document.body.onmousemove=nr=>{let kr=nr.clientX-Hn,ei=nr.clientY-fn;const Zr=document.getElementsByClassName("markdown-popup-form")[0],ri=window.innerWidth-Zr.offsetWidth,li=window.innerHeight-Zr.offsetHeight;kr=Math.max(0,Math.min(kr,ri)),ei=Math.max(0,Math.min(ei,li)),gr(nr.clientX,nr.clientY,Hn,fn)&&(yr(kr),Yr(ei))},document.body.onmouseup=function(){document.body.onmousemove=null}},gr=(or,Hn,fn,nr)=>{const kr=document.body.clientHeight,ei=document.body.clientWidth;return or<20&&fn>or||or>ei-20&&fn<or||Hn<20&&nr>Hn||Hn>kr-20&&nr<Hn?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return pt.createElement(pt.Fragment,null,pt.createElement("div",{className:"markdown-editor-wrapper",ref:zi},pt.createElement("div",{className:`markdown-editor-container ${ur} ${un?"on-preview":""} ${mr?"mini":""} ${cr?"full-screen":""}`,style:Yn},pt.createElement(Fe,{insertTemp:er,watch:un,fullScreen:cr,showNullButton:vn,showNullProgramButton:_n,onActionCallback:Jt,hidetoolBar:qn,extraUse:Pr}),pt.createElement("div",{className:"markdown-editor-body"},pt.createElement("div",{className:"codemirror-container"},pt.createElement("textarea",{ref:Zi,placeholder:Rr})),un?pt.createElement("div",{ref:ji,className:"preview-container"},rn==="stex"&&pt.createElement(ve,{value:qr}),rn!=="stex"&&pt.createElement(Me.Z,{disabledFill:hr,showProgramFill:_n,value:qr})):null))),Qn?pt.createElement("a",{ref:bi,className:"editor-resize"}):null,xr===Vn&&pt.createElement(Ft,{callback:lt,onCancel:sn}),xr===Ln&&pt.createElement(Qe,{callback:lt,onCancel:sn}),pt.createElement(Ne.Z,null,ro[xr]&&xr!==Vn&&xr!==Ln?pt.createElement(dt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:xn,top:Nr},title:pt.createElement("div",{style:{cursor:"move"},onMouseDown:In},ro[xr]),open:!0,onCancel:sn,footer:null,destroyOnClose:!0,width:xr===Ln?"1200px":null,height:xr===Ln?"80vh":null,className:"markdown-popup-form"},Bn):null))}},35944:function(mn,dn,st){"use strict";st.d(dn,{Z:function(){return je},I:function(){return Fe}});var pt=st(28284),Dt=st(6767),oe=st(37568),Ge=st(77736),De=st(71051),fe=st(47889),me=st(99571),ke=st(77665),Ce=st(59301),Se=st(59301),Me=Object.defineProperty,ve=Object.defineProperties,we=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ae=(Ne,Ae,Re)=>Ae in Ne?Me(Ne,Ae,{enumerable:!0,configurable:!0,writable:!0,value:Re}):Ne[Ae]=Re,ie=(Ne,Ae)=>{for(var Re in Ae||(Ae={}))z.call(Ae,Re)&&ae(Ne,Re,Ae[Re]);if(de)for(var Re of de(Ae))ee.call(Ae,Re)&&ae(Ne,Re,Ae[Re]);return Ne},le=(Ne,Ae)=>ve(Ne,we(Ae));const{useForm:ue}=pt.default,ge={width:280,marginRight:10},Pe={labelCol:{span:5},wrapperCol:{span:19}};var je=({callback:Ne,onCancel:Ae})=>{const[Re]=ue();let We=(0,Ce.useRef)();function Ye(ot){We.current.width=Re.getFieldValue("width"),We.current.align=Re.getFieldValue("align"),Ne(ot,We.current)}function Ue(ot,ut){if(ot.status===-1){Dt.ZP.error(ot.message);return}Re.setFieldsValue({src:`/api/attachments/${ot.id}`,type:ut.type})}function Ke(ot){let ut=ot.target.files[0];We.current=ut,Fe(ut,Ue)}return Se.createElement(pt.default,le(ie({form:Re},Pe),{className:"upload-image-panel",onFinish:Ye,style:{width:470,overflow:"hidden"}}),Se.createElement(pt.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Se.createElement("div",{className:"flex-container"},Se.createElement(pt.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Se.createElement(oe.default,{style:ge})),Se.createElement(Be,{onFileChange:Ke}))),Se.createElement(pt.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Se.createElement(oe.default,{style:{width:264}})),Se.createElement(pt.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},Se.createElement(Ge.Z,null,Se.createElement(pt.default.Item,{name:"width",style:{margin:0}},Se.createElement(De.Z,{style:{width:264}})),Se.createElement("span",{className:"ml8"},"%"))),Se.createElement(pt.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},Se.createElement(fe.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),Se.createElement("aside",null,Se.createElement(pt.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},Se.createElement(me.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Se.createElement(me.ZP,{type:"default",onClick:Ae},"\u53D6\u6D88"))))};function Be({onFileChange:Ne}){return Se.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Se.createElement("input",{type:"file",onChange:Ne}))}function Fe(Ne,Ae){if(!Ne)throw new String("\u6CA1\u6709\u6587\u4EF6");let Re=new FormData;Re.append("editormd-image-file",Ne),Re.append("file_param_name","editormd-image-file"),Re.append("byxhr","true");var We=new window.XMLHttpRequest;We.withCredentials=!0,We.addEventListener("load",function(Ye){Ae(JSON.parse(Ye.target.responseText),Ne)},!1),We.addEventListener("error",function(Ye){console.error(Ye)},!1),We.open("POST",`${ke.KI}/api/attachments.json`),We.send(Re)}},51498:function(mn,dn,st){"use strict";st.d(dn,{Z:function(){return oe}});var pt=st(59301),Dt=st(4676);class oe extends pt.Component{constructor(De){super(De);const fe=window.document;this.node=fe.createElement("div"),fe.body.appendChild(this.node)}render(){const{children:De}=this.props;return(0,Dt.createPortal)(De,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},58531:function(mn,dn,st){"use strict";st.d(dn,{SV:function(){return He},ZP:function(){return _e}});var pt=st(59301),Dt=st(76374);const oe={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},Ge={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(`
`)}]},fe={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(`
`)}]},me={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 ke=st(53184),Ce=st.n(ke),Se=Object.defineProperty,Me=Object.defineProperties,ve=Object.getOwnPropertyDescriptors,we=Object.getOwnPropertySymbols,de=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,ee=(Qe,ct,at)=>ct in Qe?Se(Qe,ct,{enumerable:!0,configurable:!0,writable:!0,value:at}):Qe[ct]=at,ae=(Qe,ct)=>{for(var at in ct||(ct={}))de.call(ct,at)&&ee(Qe,at,ct[at]);if(we)for(var at of we(ct))z.call(ct,at)&&ee(Qe,at,ct[at]);return Qe},ie=(Qe,ct)=>Me(Qe,ve(ct)),le=(Qe,ct,at)=>new Promise((At,Lt)=>{var It=$t=>{try{Xt(at.next($t))}catch(Ut){Lt(Ut)}},Kt=$t=>{try{Xt(at.throw($t))}catch(Ut){Lt(Ut)}},Xt=$t=>$t.done?At($t.value):Promise.resolve($t.value).then(It,Kt);Xt((at=at.apply(Qe,ct)).next())});const ue={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"]}},ge=(Qe,ct)=>ct.map(at=>({label:at,kind:Qe.languages.CompletionItemKind.Keyword,insertText:at})),Pe=Qe=>Object.keys(ue.tables).map(ct=>({label:ct,kind:Qe.languages.CompletionItemKind.Variable,insertText:ct})),je=(Qe,ct)=>{const at=ue.tables[Qe];return at?at.map(At=>({label:At,kind:ct.languages.CompletionItemKind.Field,insertText:At})):[]};function Be(Qe,ct,at,At,Lt){let It=ct.getWordUntilPosition(at),Kt={startLineNumber:at.lineNumber,endLineNumber:at.lineNumber,startColumn:It.startColumn,endColumn:It.endColumn},Xt=At.map($t=>({label:$t,kind:Qe.languages.CompletionItemKind.Keyword,insertText:$t,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Kt}));return Lt.map($t=>{Xt.push(ie(ae({},$t),{range:Kt}))}),Xt}var Fe=Qe=>{ue.languages.map(Lt=>(Qe.languages.registerDocumentFormattingEditProvider(Lt,{provideDocumentFormattingEdits(It,Kt,Xt){return le(this,null,function*(){const $t=Ce()(It.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:It.getFullModelRange(),text:$t}]})}}),Lt));const ct=De.quickKey.map(Lt=>({label:Lt.label,kind:Qe.languages.CompletionItemKind.Method,insertText:Lt.content,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet})),at=fe.quickKey.map(Lt=>({label:Lt.label,kind:Qe.languages.CompletionItemKind.Method,insertText:Lt.content,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet})),At=Ge.quickKey.map(Lt=>({label:Lt.label,kind:Qe.languages.CompletionItemKind.Method,insertText:Lt.content,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet}));Qe.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Lt,It){var Kt=Lt.getWordUntilPosition(It),Xt={startLineNumber:It.lineNumber,endLineNumber:It.lineNumber,startColumn:Kt.startColumn,endColumn:Kt.endColumn},$t=Lt.getLineContent(It.lineNumber).substring(Kt.startColumn-2,Kt.endColumn);return{suggestions:[...De.keywords.map(Ut=>({label:Ut,kind:Qe.languages.CompletionItemKind.Function,documentation:Ut,insertText:Ut,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Xt})),...De.quickKey.map(Ut=>({label:Ut.label,kind:Qe.languages.CompletionItemKind.Function,documentation:Ut.content,insertText:$t.startsWith("#")?Ut.content.replace(/#/,""):Ut.content,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Xt}))]}}}),Qe.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Lt,It){var Kt=Lt.getWordUntilPosition(It),Xt={startLineNumber:It.lineNumber,endLineNumber:It.lineNumber,startColumn:Kt.startColumn,endColumn:Kt.endColumn};return{suggestions:[...oe.keywords.map($t=>({label:$t,kind:Qe.languages.CompletionItemKind.Function,documentation:$t,insertText:$t,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Xt}))]}}}),Qe.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Lt,It){var Kt=Lt.getWordUntilPosition(It),Xt={startLineNumber:It.lineNumber,endLineNumber:It.lineNumber,startColumn:Kt.startColumn,endColumn:Kt.endColumn},$t=Lt.getLineContent(It.lineNumber).substring(Kt.startColumn-2,Kt.endColumn);return{suggestions:[...Ge.keywords.map(Ut=>({label:Ut,kind:Qe.languages.CompletionItemKind.Function,documentation:Ut,insertText:Ut,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Xt})),...Ge.quickKey.map(Ut=>({label:Ut.label,kind:Qe.languages.CompletionItemKind.Function,documentation:Ut.content,insertText:$t.startsWith("#")?Ut.content.replace(/#/,""):Ut.content,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Xt}))]}}}),Qe.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Lt,It){var Kt=Lt.getWordUntilPosition(It),Xt={startLineNumber:It.lineNumber,endLineNumber:It.lineNumber,startColumn:Kt.startColumn,endColumn:Kt.endColumn},$t=Lt.getLineContent(It.lineNumber).substring(Kt.startColumn-2,Kt.endColumn);return{suggestions:[...me.keywords.map(Ut=>({label:Ut,kind:Qe.languages.CompletionItemKind.Function,documentation:Ut,insertText:Ut,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Xt})),...me.quickKey.map(Ut=>({label:Ut.label,kind:Qe.languages.CompletionItemKind.Function,documentation:Ut.content,insertText:$t.startsWith("#")?Ut.content.replace(/#/,""):Ut.content,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Xt}))]}}}),Qe.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Lt,It){var Kt=Lt.getWordUntilPosition(It),Xt={startLineNumber:It.lineNumber,endLineNumber:It.lineNumber,startColumn:Kt.startColumn,endColumn:Kt.endColumn},$t=Lt.getLineContent(It.lineNumber).substring(Kt.startColumn-2,Kt.endColumn);return{suggestions:[...fe.keywords.map(Ut=>({label:Ut,kind:Qe.languages.CompletionItemKind.Function,documentation:Ut,insertText:Ut,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Xt})),...fe.quickKey.map(Ut=>({label:Ut.label,kind:Qe.languages.CompletionItemKind.Function,documentation:Ut.content,insertText:$t.startsWith("#")?Ut.content.replace(/#/,""):Ut.content,insertTextRules:Qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Xt}))]}}})};const Ne="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Ae=Object.defineProperty,Re=(Qe,ct,at)=>ct in Qe?Ae(Qe,ct,{enumerable:!0,configurable:!0,writable:!0,value:at}):Qe[ct]=at,We=(Qe,ct,at)=>Re(Qe,typeof ct!="symbol"?ct+"":ct,at);const Ye=class mx{constructor(ct,at,At){this.placeholder=ct,this.editor=at,this.monaco=At,at.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return mx.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};We(Ye,"ID","editor.widget.placeholderHint");var Ke=Ye,ot=st(96236),ut=st(6767),ft=st(25399),wt=st(89392),Je=st(41312),nt=st(56102),xt=Object.defineProperty,Pt=Object.defineProperties,Ct=Object.getOwnPropertyDescriptors,gt=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,Et=(Qe,ct,at)=>ct in Qe?xt(Qe,ct,{enumerable:!0,configurable:!0,writable:!0,value:at}):Qe[ct]=at,St=(Qe,ct)=>{for(var at in ct||(ct={}))dt.call(ct,at)&&Et(Qe,at,ct[at]);if(gt)for(var at of gt(ct))ht.call(ct,at)&&Et(Qe,at,ct[at]);return Qe},Ft=(Qe,ct)=>Pt(Qe,Ct(ct)),mt=(Qe,ct)=>{var at={};for(var At in Qe)dt.call(Qe,At)&&ct.indexOf(At)<0&&(at[At]=Qe[At]);if(Qe!=null&&gt)for(var At of gt(Qe))ct.indexOf(At)<0&&ht.call(Qe,At)&&(at[At]=Qe[At]);return at},yt=(Qe,ct,at)=>new Promise((At,Lt)=>{var It=$t=>{try{Xt(at.next($t))}catch(Ut){Lt(Ut)}},Kt=$t=>{try{Xt(at.throw($t))}catch(Ut){Lt(Ut)}},Xt=$t=>$t.done?At($t.value):Promise.resolve($t.value).then(It,Kt);Xt((at=at.apply(Qe,ct)).next())});function tt(Qe){return/^\d+$/.test(Qe)?`${Qe}px`:Qe}function Ve(){}let xe=!1;const Le={"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 Xe(Qe=[]){let ct=Qe;if(Array.isArray(Qe)){for(let at=0;at<Qe.length;at++){let At=Le[Qe[at]];if(At)return At}return ct[0]}return Le[ct]||ct}let rt=null;const Ie=()=>yt(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(Qe){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",Qe)}});var _e=Qe=>{var ct=Qe,{width:at="100%",height:At="100%",value:Lt,language:It="javascript",style:Kt={},options:Xt={},overrideServices:$t={},theme:Ut="vs-dark",onEditBlur:ln,isCopy:tn=!1,onSave:Wt,autoHeight:En=!1,forbidCopy:Pn=!1,onChange:Ln=Ve,editorDidMount:Vn=Ve,onFocus:Or=Ve,onBreakPoint:dr=Ve,breakPointValue:Lr=[],filename:Xr="educoder.txt",errorLine:Vr,errorContent:si="",highlightLine:yi,openBreakPoint:Ii=!1,placeholder:Fi="",showMiniMap:_i=!0}=ct,Yi=mt(ct,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const et=(0,pt.useRef)(),pr=(0,pt.useRef)({}),vr=(0,pt.useRef)(),Ei=(0,pt.useRef)(),lr=(0,pt.useRef)([]),wr=(0,pt.useRef)(!1),Br=(0,pt.useRef)(),ro=(0,pt.useRef)(),Ur=(0,pt.useRef)(!1),[on,nn]=(0,pt.useState)(!1);function Zt(){let Kn;return et.current&&(Kn=new Dt.Z(On=>{for(let ur of On)(ur.target.offsetHeight>0||ur.target.offsetWidth>0)&&pr.current.instance.layout()}),Kn.observe(et.current)),Kn}function tr(){ut.ZP.warning({content:decodeURIComponent(Ne),key:"monaco-editor-tip"})}const mr=()=>{let Kn=pr.current.instance;if(Lt!=null&&Kn&&on){const On=Kn.getModel();On&&Lt!==On.getValue()&&(xe=!0,On.setValue(Lt),Kn.layout(),xe=!1)}};(0,pt.useEffect)(()=>{const Kn=Je.Z.subscribe("formatDocument",On=>{var ur;let $n=pr.current.instance;(ur=$n==null?void 0:$n.getAction)==null||ur.call($n,"editor.action.formatDocument").run()});return window.updateMonacoValue=On=>{Ln(On)},Kn},[]),(0,pt.useEffect)(()=>{var Kn;let On=pr.current.instance;Ei.current&&clearTimeout(Ei.current),Ei.current=setTimeout(()=>{mr()},500),Lt&&(Lt!=null&&Lt.length)&&((Kn=On==null?void 0:On.updateOptions)==null||Kn.call(On,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Lt.split(/\r\n|\r|\n/g).length))+3,5)}))},[Lt,on,pr.current]),(0,pt.useEffect)(()=>{if(Vr&&pr.current&&pr.current.instance){let On=pr.current.instance;On.changeViewZones(function(ur){var $n=document.createElement("div");$n.style.padding="10px 20px",$n.style.width="calc(100% - 20px)",$n.className="my-error-line-wrp",$n.innerHTML=si,ur.addZone({afterLineNumber:Vr||11,heightInLines:3,domNode:$n})});var Kn={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};On.addOverlayWidget(Kn),On.revealPositionInCenter({lineNumber:20,column:1})}},[Vr,pr.current,on]);const Er=(Kn="",On)=>{if(!Kn||Kn.trim()==="")return!0;const $n=pr.current.instance.getModel().getLineTokens(On);let Wn=!1;for(let hr=0;hr<2;hr++)$n.getStandardTokenType(hr)===1&&(Wn=!0);return Wn};(0,pt.useEffect)(()=>{var Kn;const On=(Kn=pr.current)==null?void 0:Kn.instance;if(On&&on&&Pn){const ur=On.onDidBlurEditorWidget(()=>{Ur.current=!1}),$n=On.onDidFocusEditorText(()=>{Ur.current=!0});return()=>{ur.dispose(),$n.dispose()}}},[pr.current,on,Pn]),(0,pt.useEffect)(()=>{var Kn;if((Kn=pr.current)!=null&&Kn.instance&&on&&Ii){let On=pr.current.instance,ur=On.getModel();if(!ur)return;(()=>{var Xn;let cr=[],ar=[];const xr=ur.getAllDecorations();for(let Wr of xr)Wr.options.className==="highlighted-line"&&(cr.push((Xn=Wr==null?void 0:Wr.range)==null?void 0:Xn.startLineNumber),ar.push(Wr==null?void 0:Wr.id));if(yi===cr[0])return;ur.deltaDecorations(ar,[]);const Tr=ur.getLineCount();yi&&yi<=Tr&&(On.deltaDecorations([],[{range:new rt.Range(yi,1,yi,ur.getLineMaxColumn(yi)),options:{isWholeLine:!0,className:"highlighted-line"}}]),On.revealLineInCenter(yi))})();const Wn=(Xn=!1)=>{var cr;let ar=[],xr=[];const Tr=ur.getAllDecorations();for(let Wr of Tr)Wr.options.linesDecorationsClassName==="breakpoints-select"&&(ar.push((cr=Wr==null?void 0:Wr.range)==null?void 0:cr.startLineNumber),xr.push(Wr==null?void 0:Wr.id));if(Xn)return{lines:ar,ids:xr};dr(ar)},hr=Xn=>yt(void 0,null,function*(){let cr={range:new rt.Range(Xn,1,Xn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield ur.deltaDecorations([],[cr]),Wn()}),Rr=Xn=>yt(void 0,null,function*(){let cr=[];const ar=On.getLineDecorations(Xn);for(let xr of ar)xr.options.linesDecorationsClassName==="breakpoints-select"&&cr.push(xr.id);yield ur.deltaDecorations(cr,[]),Wn()}),br=Xn=>{let cr=On.getLineDecorations(Xn);for(let ar of cr)if(ar.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,wt.isEqual)(Lr,Wn(!0).lines)){ur.deltaDecorations(Wn(!0).ids,[]);const Xn=Lr.map(cr=>({range:new rt.Range(cr,1,cr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));ur.deltaDecorations([],Xn)}const Pr=On.onDidChangeModelContent(Xn=>{let cr=On.getPosition();if(cr){let ar=cr.lineNumber;clearTimeout(ro.current),ro.current=setTimeout(()=>{Er(ur.getLineContent(ar),ar)?Rr(ar):br(ar)?(Rr(ar),hr(ar)):Wn()},100)}}),hn=On.onMouseDown(Xn=>{var cr,ar,xr;if(Xn.target.detail&&((xr=(ar=(cr=Xn.target)==null?void 0:cr.element)==null?void 0:ar.className)!=null&&xr.includes("line-numbers"))){let Tr=Xn.target.position.lineNumber;if(Er(ur.getLineContent(Tr),Tr))return;br(Tr)?Rr(Tr):hr(Tr)}}),Pi=Xn=>{let cr={range:new rt.Range(Xn,1,Xn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};lr.current=On.deltaDecorations(lr.current,[cr])},qr=()=>{lr.current=On.deltaDecorations(lr.current,[])},ki=On.onMouseMove(Xn=>{var cr,ar,xr;if(qr(),Xn.target.detail&&((xr=(ar=(cr=Xn.target)==null?void 0:cr.element)==null?void 0:ar.className)!=null&&xr.includes("line-numbers"))){let Tr=Xn.target.position.lineNumber;if(Er(ur.getLineContent(Tr),Tr))return;Pi(Tr)}}),un=On.onMouseLeave(()=>{qr()});return()=>{Pr.dispose(),hn.dispose(),ki.dispose(),un.dispose()}}},[pr.current,on,Lr,yi,Ii,It]),(0,pt.useEffect)(()=>{var Kn;(Kn=pr.current)!=null&&Kn.instance&&Ii&&pr.current.instance.setPosition({lineNumber:0,column:0})},[yi]);function An(){let Kn=pr.current.instance;if(Kn){const On=Kn.getSelection(),ur=pr.current.pastePos||{},$n=new rt.Range(ur.startLineNumber||On.endLineNumber,ur.startColumn||On.endColumn,ur.endLineNumber||On.endLineNumber,ur.endColumn||On.endColumn);setTimeout(()=>{Kn.executeEdits("",[{range:$n,text:""}])},300)}}function er(Kn){(window.navigator.platform.match("Mac")?Kn.metaKey:Kn.ctrlKey)&&Kn.keyCode==83&&(Kn.preventDefault(),Wt())}const rn=()=>{if(En&&pr.current.instance){const Kn=pr.current.instance.getContentHeight();an(Kn<At?At:Kn)}else an(At)};function qt(Kn){var On=document.createEvent("MouseEvents");On.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Kn.dispatchEvent(On)}const Qn=Kn=>{if(!Ur.current)return;const{keyCode:On,ctrlKey:ur,metaKey:$n,target:Wn,type:hr}=Kn;return(hr==="paste"||(On===67||On===86)&&($n||ur))&&Wn.nodeName==="TEXTAREA"&&(tr(),Kn.preventDefault()),!1};function Ot(Kn,On){var ur=window.URL||window.webkitURL||window,$n=new Blob([On]),Wn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Wn.href=ur.createObjectURL($n),Wn.download=Kn,qt(Wn)}(0,pt.useEffect)(()=>{rn()},[rn]),(0,pt.useEffect)(()=>{et.current&&!on&&Promise.all([st.e(8909),st.e(503)]).then(st.bind(st,71448)).then(Kn=>{try{rt=Kn,pr.current.instance=rt.editor.create(et.current,{value:Lt,language:Xe(It),theme:Ut,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:_i||!1}},$t);const On=pr.current.instance;let Wn=[...ot.BH._menuItems].find(Pr=>Pr[0]._debugName=="EditorContext")[1],hr=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Rr=(Pr,hn)=>{var Pi,qr;let ki=Pr._first;do hn.includes((qr=(Pi=ki.element)==null?void 0:Pi.command)==null?void 0:qr.id)&&Pr._remove(ki);while(ki=ki.next)};if(Vn(On,rt),setTimeout(()=>{rn(),pr.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Ot(Xr||"educoder.txt",On.getValue())}})},500),pr.current.subscription=On.onDidChangeModelContent(Pr=>{wr.current?clearTimeout(Br.current):(rn(),Ln(On.getValue(),Pr)),Br.current=setTimeout(()=>{wr.current=!1},500)}),window.Monaco||Fe(rt,Xe(It)),Pn&&(Rr(Wn,hr),et.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Qn),window.removeEventListener("paste",Qn),window.addEventListener("keydown",Qn),window.addEventListener("paste",Qn)),window.Monaco=rt,ln&&On.onDidBlurEditorWidget(()=>{ln(On.getValue())}),Or&&On.onDidFocusEditorText(()=>{Pn&&Ie(),Or(On.getValue())}),Pn){Ie();try{On.onDidPaste(Pr=>{const hn=On.getSelection(),Pi=pr.current.pastePos||{},qr=new rt.Range(Pi.startLineNumber||hn.endLineNumber,Pi.startColumn||hn.endColumn,Pi.endLineNumber||hn.endLineNumber,Pi.endColumn||hn.endColumn);On.executeEdits("",[{range:Pr.range,text:""}])})}catch(Pr){}}let br=Zt();return Fi&&typeof Fi=="string"&&new Ke(Fi,On,rt),nn(!0),()=>{const Pr=pr.current.instance;Pr.dispose();const hn=Pr.getModel();hn&&hn.dispose(),pr.current.subscription&&pr.current.subscription.dispose(),br.unobserve(et.current)}}catch(On){}})},[]),(0,pt.useEffect)(()=>{if(pr.current.instance&&on)return document.addEventListener("keydown",er,!1),()=>{document.removeEventListener("keydown",er)}},[Wt,on]),(0,pt.useEffect)(()=>{let Kn=pr.current.instance;if(Kn&&on){let On=Xe(It);rt.editor.setModelLanguage(Kn.getModel(),On)}},[It,on]),(0,pt.useEffect)(()=>{pr.current.instance&&on&&rt.editor.setTheme(Ut)},[Ut,on]),(0,pt.useEffect)(()=>{let Kn=pr.current.instance;vr.current=Xt,Kn&&on&&(Kn.updateOptions(St({},Xt)),setTimeout(()=>{Kn.getModel().updateOptions(St({},Xt))},200))},[JSON.stringify(Xt),on]),(0,pt.useEffect)(()=>{let Kn=pr.current.instance;Kn&&on&&Kn.layout()},[at,At,on]);const[vn,_n]=(0,pt.useState)(tt(at)),[qn,an]=(0,pt.useState)(tt(At)),Un=Ft(St({},Kt),{width:vn,height:qn,position:"relative"});return pt.createElement("div",{className:"my-monaco-editor",ref:et,style:Un},tn&&pt.createElement(nt.CopyToClipboard,{text:Lt,onCopy:()=>ut.ZP.success("\u590D\u5236\u6210\u529F")},pt.createElement(ft.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 He({width:Qe="100%",height:ct="100%",original:at,modified:At,language:Lt,options:It={}}){const Kt=(0,pt.useRef)(),[Xt,$t]=(0,pt.useState)(null);function Ut(En){let Pn;return Kt.current&&(Pn=new Dt.Z(Ln=>{for(let Vn of Ln)(Vn.target.offsetHeight>0||Vn.target.offsetWidth>0)&&En.layout()}),Pn.observe(Kt.current)),Pn}(0,pt.useEffect)(()=>(Kt.current&&Promise.all([st.e(8909),st.e(9404)]).then(st.bind(st,2550)).then(En=>{rt=En;const Pn=rt.editor.createDiffEditor(Kt.current,Ft(St({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},It),{wordWrap:!0}));$t(Pn);let Ln=Ut(Pn);return()=>{Pn.dispose();const Vn=Pn.getModel();Vn&&Vn.dispose(),Ln.unobserve(Kt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,pt.useEffect)(()=>{Xt&&Xt.setModel({original:rt.editor.createModel(at,Lt),modified:rt.editor.createModel(At,Lt)})},[at,At,Lt,Xt]);const ln=tt(Qe),tn=tt(ct),Wt={width:ln,height:tn};return pt.createElement("div",{className:"my-diff-editor",ref:Kt,style:Wt})}},69794:function(mn,dn,st){"use strict";var pt=st(30434),Dt=st(82326),oe=st(71411),Ge=st(59301);const De=Dt.default.Option;dn.Z=({isTheoretical:fe,onFontSizeChange:me,cmFontSize:ke,cmCodeMode:Ce,autoFormat:Se,onCodeModeChange:Me,onTabToSpace:ve,onAutoFormat:we,formatDocument:de,className:z="",tabToSpace:ee,children:ae,code_editor:ie,challenge:le})=>{const ue={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"};return Ge.createElement("div",{className:`tpi-code-setting ${z}`},Ge.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),Ge.createElement("section",null,Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),Ge.createElement(Dt.default,{bordered:!1,size:"small",value:Ce,onChange:Me},Ge.createElement(De,{value:"vs"},"\u767D\u8272\u80CC\u666F"),Ge.createElement(De,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),!fe&&Ge.createElement(Ge.Fragment,null,Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),Ge.createElement(Dt.default,{bordered:!1,size:"small",value:ke,onChange:me},Ge.createElement(De,{value:12},"12px"),Ge.createElement(De,{value:14},"14px"),Ge.createElement(De,{value:16},"16px"),Ge.createElement(De,{value:18},"18px"),Ge.createElement(De,{value:20},"20px"),Ge.createElement(De,{value:22},"22px"))),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"Tab\u8F6C\u6362"),Ge.createElement(oe.Z,{checked:ee,onChange:ve})),Ge.createElement("div",{className:"file-item",onClick:de},Ge.createElement("b",{style:{cursor:"pointer"}},"\u683C\u5F0F\u5316\u4EE3\u7801")))),!fe&&Ge.createElement(Ge.Fragment,null,Ge.createElement("h3",null,"\u5FEB\u6377\u952E"),Ge.createElement("section",null,Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),Ge.createElement("span",null,"Ctrl + S")),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),Ge.createElement("span",null,"F1 / Alt + F1")),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),Ge.createElement("span",null,"Ctrl + ]/[")),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),Ge.createElement("span",null,"Ctrl + Shift + \\")),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),Ge.createElement("span",null,"Home")),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),Ge.createElement("span",null,"End"))),ae),!fe&&Ge.createElement(Ge.Fragment,null,Ge.createElement("h3",null,"\u5FEB\u6377\u952E"),Ge.createElement("section",null,Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),Ge.createElement("span",null,ue[le==null?void 0:le.difficulty])),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),Ge.createElement("span",null,ie==null?void 0:ie.name)),Ge.createElement("div",{className:"file-item"},Ge.createElement("b",null,"\u5B9E\u9A8C\u5BB9\u5668\u7F51\u7EDC"),Ge.createElement("span",null,ie!=null&&ie.close_internet?"\u5173\u95ED\u5916\u7F51":"\u5F00\u542F\u5916\u7F51")))))}},47458:function(mn,dn,st){"use strict";st.d(dn,{Z:function(){return Dt}});var pt=st(59301);function Dt(oe,Ge){const De=(0,pt.useRef)();(0,pt.useEffect)(()=>{De.current=oe}),(0,pt.useEffect)(()=>{function fe(){De.current()}if(Ge!==null){let me=setInterval(fe,Ge);return()=>clearInterval(me)}},[Ge])}},56858:function(mn,dn,st){"use strict";st.r(dn),st.d(dn,{Types:function(){return Yi},default:function(){return vr}});var pt=st(59301),Dt={header:"header___N_IdR",field:"field___XG_dh","oj-form-container":"oj-form-container___syYzK","oj-left-panel":"oj-left-panel___L082x","oj-form-info":"oj-form-info___q0IU5",footer:"footer___pGCM2",result:"result___LM9Ms",passText:"passText___nUoL4",noPassText:"noPassText___ECHHG",pass:"pass___tDubp",noPass:"noPass___ilYvg","test-case-name":"test-case-name___MI_KD","btn-remove-case":"btn-remove-case___OiaTQ","icon-tag":"icon-tag___D86WO",btn_back:"btn_back___FyaSY",testJi:"testJi___NDviK",upBtn:"upBtn___FiZX4","oj-problems":"oj-problems___xb70g",row:"row___v036E",a:"a___yRaYH",b:"b___gWQyu",inputTwo:"inputTwo___IZ9og",inputOne:"inputOne____NmcT",cusModal:"cusModal___fJ5gm","oj-custom-large-spin":"oj-custom-large-spin___Aar0g",MdEditor:"MdEditor___hgoes"},oe=st(37568),Ge=st(62957),De=st(8848),fe=st(28284),me=st(6767),ke=st(77019),Ce=st(5269),Se=st(29787),Me=st(99571),ve=st(54172),we=st(82326),de=st(71051),z=st(47889),ee=st(62673),ae=st(77736),ie=st(93725),le=st(59301);const{Option:ue}=we.default;var ge=(lr=>(lr[lr.language=0]="language",lr[lr.difficulty=1]="difficulty",lr[lr.category=2]="category",lr[lr.openOrNot=3]="openOrNot",lr))(ge||{});const Pe={0:[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],1:[{title:"\u7B80\u5355",key:1},{title:"\u9002\u4E2D",key:2},{title:"\u56F0\u96BE",key:3}],2:[{title:"\u7A0B\u5E8F\u8BBE\u8BA1",key:1},{title:"\u7B97\u6CD5",key:2}],3:[{title:"\u516C\u5F00",key:1},{title:"\u79C1\u6709",key:0}]};function je(lr){return Pe[lr].map(wr=>le.createElement(ue,{key:wr.title,value:wr.key}," ",wr.title," "))}function Be(lr,wr){lr.map(Br=>{const{id:ro,name:Ur,sub_disciplines:on}=Br;let nn={value:ro,label:Ur};wr.push(nn),on&&on.length>0&&(nn.children=[],Be(on,nn.children))})}function Fe(lr,wr){var Br;let ro=[];for(let Ur=0;Ur<lr.length;Ur++){const on=lr[Ur];if(((Br=on.sub_disciplines)==null?void 0:Br.length)>0){ro[0]=on.id;for(let nn=0;nn<on.sub_disciplines.length;nn++){const Zt=on.sub_disciplines[nn];if(Zt.id===wr)return ro[1]=Zt.id,[ro,Zt.tag_disciplines||Zt.sub_disciplines||[]]}}}return[ro,[]]}var Ne=st(44993),Ae=st(24334),Re=st(76618),We=st(65363),Ye=st(4213),Ue=st(52430);function Ke(lr){return(0,Ue.v_)("practices.json",lr)}function ot(){return(0,Ue.U2)("problems/new.json")}function ut(lr){return(0,Ue.U2)(`practices/${lr}/edit.json`)}function ft(lr,wr){return(0,Ue.gz)(`practices/${lr}`,wr)}function wt(lr,wr){return post(`exercises/${lr}/exercise_questions.json`,wr)}function Je(lr,wr){return put(`exercise_questions/${lr}.json`,wr)}var nt=st(2162),xt=st(30641),Pt=st(58531),Ct=st(69794),gt=st(51498),dt=st(17936),ht={"code-panel-container":"code-panel-container___BZjjl","action-oj-bar":"action-oj-bar___xbXpK",active:"active___EMVKI"},Et=Object.defineProperty,St=Object.defineProperties,Ft=Object.getOwnPropertyDescriptors,mt=Object.getOwnPropertySymbols,yt=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,Ve=(lr,wr,Br)=>wr in lr?Et(lr,wr,{enumerable:!0,configurable:!0,writable:!0,value:Br}):lr[wr]=Br,xe=(lr,wr)=>{for(var Br in wr||(wr={}))yt.call(wr,Br)&&Ve(lr,Br,wr[Br]);if(mt)for(var Br of mt(wr))tt.call(wr,Br)&&Ve(lr,Br,wr[Br]);return lr},Le=(lr,wr)=>St(lr,Ft(wr));const Xe={theme:(0,dt.G)("cmCodeMode","vs-dark"),fontSize:(0,dt.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,dt.G)("cmTabToSpace",!0)};var rt=(lr=>(lr[lr.set_font_size=0]="set_font_size",lr[lr.set_theme=1]="set_theme",lr[lr.on_tab_to_space=2]="on_tab_to_space",lr[lr.set_show_editor_setting=3]="set_show_editor_setting",lr))(rt||{});function Ie(lr,wr){switch(wr.type){case 3:return Le(xe({},lr),{showEditorSetting:wr.payload});case 1:return Le(xe({},lr),{theme:wr.payload});case 0:return Le(xe({},lr),{fontSize:wr.payload});case 2:return Le(xe({},lr),{tabToSpace:wr.payload});default:throw new Error}}var _e=({value:lr,onChange:wr,language:Br,onLanguage:ro,languageItems:Ur,ActionBarRender:on=nn=>pt.createElement(He,{languageItems:Ur,onLanguage:ro,language:Br,onShowCodeSetting:nn})})=>{const[nn,Zt]=(0,pt.useReducer)(Ie,Xe),{theme:tr,fontSize:mr,showEditorSetting:Er,tabToSpace:An}=nn;console.log(lr,Br,"value");const er={onFontSizeChange:Ot=>{Zt({type:0,payload:Ot}),(0,dt.t)("cmFontSize",Ot)},tabToSpace:An,cmFontSize:mr,className:"oj",cmCodeMode:tr,onTabToSpace:Ot=>{Zt({type:2,payload:Ot}),(0,dt.t)("cmTabToSpace",Ot)},onCodeModeChange:Ot=>{Zt({type:1,payload:Ot}),(0,dt.t)("cmCodeMode",Ot)}};function rn(){Zt({type:3,payload:!1})}function qt(){Zt({type:3,payload:!0})}const Qn={value:lr,language:Br,onChange:wr,theme:tr,height:"calc(100% - 56px)",options:{fontSize:mr,insertSpaces:An}};return pt.createElement(pt.Fragment,null,pt.createElement("div",{className:ht["code-panel-container"]},on(qt),pt.createElement(Pt.ZP,xe({key:Br},Qn))),pt.createElement(gt.Z,null,pt.createElement(xt.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:Er,onClose:rn},pt.createElement(Ct.Z,xe({},er)))))};function He({languageItems:lr,language:wr,onShowCodeSetting:Br,onLanguage:ro}){return pt.createElement("div",{className:ht["action-oj-bar"]},lr==null?void 0:lr.map(Ur=>pt.createElement("div",{className:wr===(Ur==null?void 0:Ur.language)?ht.active:"",onClick:()=>ro(Ur==null?void 0:Ur.language),key:Ur==null?void 0:Ur.language},Ur==null?void 0:Ur.language)),pt.createElement("a",{onClick:Br},pt.createElement("i",{className:"iconfont icon-shezhi"})))}var Qe=st(20554),ct={flex_box_center:"flex_box_center___4yAaY",flex_space_between:"flex_space_between___YaUgM",flex_box_vertical_center:"flex_box_vertical_center___zR3dp",flex_box_center_end:"flex_box_center_end___rwgS5",flex_box_column:"flex_box_column___LhFeP",wrap:"wrap___xTL91",in:"in___eSY86",btns:"btns___UdEGI",customModal:"customModal___CL0OL"},at=(lr,wr,Br)=>new Promise((ro,Ur)=>{var on=tr=>{try{Zt(Br.next(tr))}catch(mr){Ur(mr)}},nn=tr=>{try{Zt(Br.throw(tr))}catch(mr){Ur(mr)}},Zt=tr=>tr.done?ro(tr.value):Promise.resolve(tr.value).then(on,nn);Zt((Br=Br.apply(lr,wr)).next())}),Lt=({visible:lr,onOK:wr,onCancel:Br})=>{const[ro,Ur]=(0,pt.useState)(!1),[on,nn]=(0,pt.useState)(!1),[Zt,tr]=(0,pt.useState)("1"),[mr,Er]=(0,pt.useState)(""),[An,er]=(0,pt.useState)([]),rn=()=>at(void 0,null,function*(){if(!mr){me.ZP.warning(`\u9898\u76EE${_n}\u4E0D\u80FD\u4E3A\u7A7A`);return}nn(!0);const qn=yield(0,Ue.ZP)("/api/tag_disciplines.json",{method:"post",body:{target:lr,name:mr}});if((qn==null?void 0:qn.status)===0){wr();return}nn(!1)}),qt=(qn="")=>at(void 0,null,function*(){Ur(!0);let an=yield(0,Ue.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:lr,search:qn}});er(an.tag_disciplines||[]),Ur(!1)}),Qn=qn=>{let an=qn.name;Ge.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u91CD\u547D\u540D",content:pt.createElement("div",null,pt.createElement(oe.default,{defaultValue:an,placeholder:`\u8BF7\u8F93\u5165${_n}\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57`,maxLength:20,onChange:Un=>{an=Un.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>at(void 0,null,function*(){if(!an)return me.ZP.warning(`\u9898\u76EE${_n}\u4E0D\u80FD\u4E3A\u7A7A`),Promise.reject();const Un=yield(0,Ue.ZP)(`/api/tag_disciplines/${qn.id}/rename.json`,{method:"post",body:{id:qn.id,name:an}});(Un==null?void 0:Un.status)===0&&qt()})})},Ot=qn=>{Ge.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:570,title:"\u5220\u9664",content:lr==="practice"?pt.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u6765\u6E90\u201C",pt.createElement("span",{className:"c-light-primary"},qn.name),"\u201D\u5220\u9664\u5417\uFF1F",pt.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u6765\u6E90\u8FDB\u884C\u6E05\u9664\u3002"):pt.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u77E5\u8BC6\u70B9\u201C",pt.createElement("span",{className:"c-light-primary"},qn.name),"\u201D\u5220\u9664\u5417\uFF1F",pt.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u77E5\u8BC6\u70B9\u8FDB\u884C\u6E05\u9664\u3002"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>at(void 0,null,function*(){const an=yield(0,Ue.ZP)(`/api/tag_disciplines/${qn.id}.json`,{method:"delete",body:{id:qn.id}});(an==null?void 0:an.status)===0&&qt()})})},vn=qn=>{qt(qn)},_n=lr==="practice"?"\u77E5\u8BC6\u70B9":"\u6765\u6E90";return pt.createElement(Ge.default,{afterClose:()=>{nn(!1),Ur(!1),Er(""),tr("1"),er([])},centered:!0,keyboard:!1,width:600,title:`${_n}\u7BA1\u7406`,open:!!lr,className:ct.customModal,footer:null,onCancel:Br},pt.createElement("section",{className:ct.wrap},pt.createElement(Qe.default,{activeKey:Zt,onChange:qn=>{Er(""),tr(qn),qt()}},pt.createElement(Qe.default.TabPane,{tab:`\u65B0\u589E${_n}`,key:"1"},pt.createElement(oe.default,{value:mr,onChange:qn=>Er(qn.target.value),className:ct.in,placeholder:`\u8F93\u5165${_n}\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57`,maxLength:20}),pt.createElement("div",{className:ct.btns},pt.createElement(Me.ZP,{onClick:Br,className:"mr20"},"\u53D6\u6D88 "),pt.createElement(Me.ZP,{loading:on,onClick:rn,type:"primary"},"\u786E\u8BA4\u65B0\u5EFA"))),pt.createElement(Qe.default.TabPane,{tab:`\u5DF2\u6709${_n}`,key:"2"},pt.createElement(oe.default.Search,{allowClear:!0,onSearch:vn,value:mr,onChange:qn=>Er(qn.target.value),className:ct.in,placeholder:`\u8F93\u5165${_n}\u540D\u79F0\u8FDB\u884C\u67E5\u8BE2`}),pt.createElement(ve.default,{dataSource:An,bordered:!1,loading:ro,scroll:An.length>7?{y:300}:{},style:{padding:"0 0px 20px 0px"},columns:[{title:`${_n}\u540D\u79F0`,dataIndex:"name",ellipsis:!0},{title:"\u64CD\u4F5C",dataIndex:"action",width:120,render:(qn,an)=>pt.createElement("span",null,pt.createElement("span",{onClick:()=>Qn(an),className:"current mr10 c-light-primary"},"\u91CD\u547D\u540D"),pt.createElement("span",{onClick:()=>Ot(an),className:"current c-grey-666"},"\u5220\u9664"))}],pagination:!1})))))},It=st(13952),Kt=st(74091),Xt=st(61186),$t=st.n(Xt),Ut=st(89299),ln=st(98573),tn=st(64681),Wt=st(59301),En=Object.defineProperty,Pn=Object.defineProperties,Ln=Object.getOwnPropertyDescriptors,Vn=Object.getOwnPropertySymbols,Or=Object.prototype.hasOwnProperty,dr=Object.prototype.propertyIsEnumerable,Lr=(lr,wr,Br)=>wr in lr?En(lr,wr,{enumerable:!0,configurable:!0,writable:!0,value:Br}):lr[wr]=Br,Xr=(lr,wr)=>{for(var Br in wr||(wr={}))Or.call(wr,Br)&&Lr(lr,Br,wr[Br]);if(Vn)for(var Br of Vn(wr))dr.call(wr,Br)&&Lr(lr,Br,wr[Br]);return lr},Vr=(lr,wr)=>Pn(lr,Ln(wr)),si=(lr,wr,Br)=>new Promise((ro,Ur)=>{var on=tr=>{try{Zt(Br.next(tr))}catch(mr){Ur(mr)}},nn=tr=>{try{Zt(Br.throw(tr))}catch(mr){Ur(mr)}},Zt=tr=>tr.done?ro(tr.value):Promise.resolve(tr.value).then(on,nn);Zt((Br=Br.apply(lr,wr)).next())});const{TextArea:yi}=oe.default,{confirm:Ii}=Ge.default,{Panel:Fi}=De.default,_i={loading:!0,user:null,status:0,data:void 0,lastedUpdateTime:0};var Yi=(lr=>(lr[lr.SET_INITAL_DATA=0]="SET_INITAL_DATA",lr[lr.SET_LOADING=1]="SET_LOADING",lr[lr.SET_STATUS=2]="SET_STATUS",lr))(Yi||{});const et="#### \u9898\u76EE\u63CF\u8FF0\n\u73B0\u6709\u4E00\u4E2A\u6574\u578B\u6570\u7EC4 `nums`\uFF0C\u8BF7\u7F16\u5199\u7A0B\u5E8F\u5C06\u6570\u7EC4 `nums` \u4E2D\u7684\u6240\u6709 `$$0$$` \u79FB\u52A8\u5230\u6570\u7EC4\u7684\u672B\u5C3E\uFF0C\u4F46\u4E0D\u6539\u53D8\u975E\u96F6\u5143\u7D20\u5728\u6570\u7EC4\u4E2D\u7684\u76F8\u5BF9\u4F4D\u7F6E\u3002\u8BF7\u5728\u539F\u6570\u7EC4 `nums` \u4E0A\u8FDB\u884C\u64CD\u4F5C\u3002\n#### \u8F93\u5165\u8F93\u51FA\u683C\u5F0F\n**\u8F93\u5165\u683C\u5F0F**\n\u7B2C\u4E00\u884C\u6709\u4E00\u4E2A\u6574\u6570 `numsSize`\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u5927\u5C0F\uFF1B\n\u7B2C\u4E8C\u884C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n**\u8F93\u51FA\u683C\u5F0F**\n\u4E00\u884C\u8F93\u51FA\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B1\n**\u8F93\u5165**\n`4`\n`0 1 2 3`\n**\u8F93\u51FA**\n`1 2 3 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B2\n**\u8F93\u5165**\n`5`\n`1 1 0 1 0`\n**\u8F93\u51FA**\n`1 1 1 0 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8BF4\u660E\u63D0\u793A\n-`1\u2264n\u2264100`";function pr(lr,wr){switch(wr.type){case 0:return Xr(Xr({},lr),wr.payload);case 1:return Vr(Xr({},lr),{loading:wr.payload});case 2:return Vr(Xr({},lr),{status:wr.payload});default:throw new Error}}var vr=()=>{var lr,wr,Br;const ro=(0,Ne.useLocation)(),{id:Ur}=(0,Ne.useParams)(),[on]=fe.default.useForm(),[nn,Zt]=(0,pt.useState)(),[tr,mr]=(0,pt.useState)(!1),[Er,An]=(0,pt.useState)([]),[er,rn]=(0,pt.useState)([]),[qt,Qn]=(0,pt.useState)([]),[Ot,vn]=(0,pt.useState)([]),[_n,qn]=(0,pt.useState)([]),[an,Un]=(0,pt.useState)("C"),[Kn,On]=(0,pt.useReducer)(pr,_i),{loading:ur,data:$n,user:Wn,status:hr}=Kn,Rr=$n==null?void 0:$n.hack_sets,br=(lr=$n==null?void 0:$n.hack)==null?void 0:lr.test_set_average,[Pr,hn]=(0,pt.useState)(!1),Pi=(0,pt.useRef)([]),[qr,ki]=(0,pt.useState)(!1),[un,Xn]=(0,pt.useState)(!1),cr=(0,pt.useRef)(!0),[ar,xr]=(0,pt.useState)({});(0,pt.useEffect)(()=>((0,Ne.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,Ne.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,Ne.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,Ne.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,pt.useEffect)(()=>{setTimeout(()=>{document.title="\u5728\u7EBF\u5237\u9898"},400)});const Tr=()=>si(void 0,null,function*(){const sn=yield(0,Ue.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice"}}),bn=yield(0,Ue.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source"}});rn(sn.tag_disciplines||[]),Qn(bn.tag_disciplines||[])});var Wr=[{language:"C",code:""},{language:"C++",code:""},{language:"Java",code:""},{language:"Python",code:""}];const $r=(0,pt.useCallback)(()=>si(void 0,null,function*(){if(On({type:1,payload:!0}),Ur){const sn=yield ut(Ur),{user:bn,language:zn,practice_sets:Yn,practice_codes:pn,description:jn,difficulty:Dn,name:Gn,open_or_not:In,time_limit:gr,test_set_average:or,test_set_score:Hn,status:fn,tag_discipline_ids:nr,source_discipline_ids:kr,item_banks_group_id:ei,is_file:Zr=!1,hide_actual_output:ri,review_privilege:li,review_description:ii,submit_rule:Oi}=sn;xr({review_privilege:li,status:fn,review_description:ii,name:Gn}),hn(ri);const po=Zr?[{input:"",output:"",score:100,position:1}]:Yn;Zr?(An(Yn),on.setFieldsValue({hack_sets:po})):An([]),On({type:0,payload:{loading:!0,user:bn,status:fn,data:{hack:{difficulty:Dn,name:Gn,description:jn,open_or_not:In,time_limit:gr,test_set_average:or,test_set_score:Hn,tag_discipline_ids:nr,source_discipline_ids:kr,is_file:Zr,submit_rule:Oi},hack_sets:po}}}),Zt({hack:{difficulty:Dn,name:Gn,description:jn,open_or_not:In,time_limit:gr,test_set_average:or,test_set_score:Hn,tag_discipline_ids:nr,source_discipline_ids:kr,is_file:Zr}});const ci=pn==null?void 0:pn.map(pi=>Vr(Xr({},pi),{code:Ae.Base64.decode(pi==null?void 0:pi.code)}));qn(ci),Pi.current=ci}else{const{user:sn}=yield ot();On({type:0,payload:{loading:!0,status:0,user:sn,data:{hack:{difficulty:"",time_limit:3,description:et,test_set_score:!0,test_set_average:!0,open_or_not:!0,name:"",is_file:!1,submit_rule:1},hack_sets:[{input:"",output:"",score:100,position:1}]}}}),Zt({hack:{difficulty:"",time_limit:3,description:"",test_set_average:!0,open_or_not:!0,name:"",is_file:!1}}),qn(Wr),Pi.current=Wr}On({type:1,payload:!1})}),[Ur]);(0,pt.useEffect)(()=>{try{$r(),Tr()}catch(sn){console.log(sn,"----")}},[]);function ni(sn,bn){return si(this,null,function*(){var zn;const{hack_sets:Yn,hack:pn}=Xr({},sn);pn.hide_actual_output=Pr;let jn=[],Dn=[],Gn=0;const In=pn!=null&&pn.is_file?Er.map((Hn,fn)=>Vr(Xr({},Hn),{position:fn+1})):Yn.map(Hn=>Vr(Xr({},Hn),{is_file:!1}));for(let Hn of In)Gn+=Hn.score,Hn.id&&Hn.id>=0?jn.push(Hn):Dn.push(Hn);if(!(In!=null&&In.length)){me.ZP.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A");return}if(Gn!==100&&!pn.test_set_score){me.ZP.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100");return}if(In!=null&&In.some(Hn=>!Hn.output)){me.ZP.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A");return}cr.current?ki(!0):Xn(!0);let gr;const or=_n==null?void 0:_n.map(Hn=>Vr(Xr({},Hn),{code:Ae.Base64.encode(Hn==null?void 0:Hn.code)}));if(Ur?gr=yield ft(Ur,{practice:pn,practice_codes:or,practice_sets:Dn,update_practice_sets:jn}):gr=yield Ke({practice:pn,practice_codes:or,practice_sets:In,publish:!cr.current}),ki(!1),Xn(!1),(gr==null?void 0:gr.status)===0){if((zn=gr==null?void 0:gr.similar_practice)!=null&&zn.length){mr(!0),vn(gr==null?void 0:gr.similar_practice);return}if(Ur){if(me.ZP.success("\u4FDD\u5B58\u6210\u529F"),!cr.current){const Hn=yield(0,Ue.ZP)(`/api/practices/${Ur}/start`,{method:"get"});(Hn==null?void 0:Hn.status)===0&&Ne.history.push(`/problems/${Hn==null?void 0:Hn.identifier}/oj/${Ur}`)}}else me.ZP.success("\u65B0\u5EFA\u6210\u529F"),Ne.history.replace(`/problems/${gr==null?void 0:gr.identifier}/ojedit`)}})}function ai(){Ne.history.replace("/problems")}const yn=sn=>{const bn=Math.floor(100/sn.length),zn=bn+100%sn.length;sn=sn.map((Yn,pn)=>pn===sn.length-1?Vr(Xr({},Yn),{score:zn}):Vr(Xr({},Yn),{score:bn})),An(sn)};function Ci(sn){sn.target.value||yn(Er),On({type:0,payload:{data:Vr(Xr({},$n),{hack:Vr(Xr({},$n.hack),{test_set_score:sn.target.value})})}})}function xn(sn){On({type:0,payload:{data:Vr(Xr({},$n),{hack:Vr(Xr({},$n.hack),{is_file:sn.target.value})})}})}function yr(sn){hn(sn.target.checked)}function Nr(sn){const bn=sn.target.value;bn&&yn(Er),On({type:0,payload:{data:Vr(Xr({},$n),{hack:Vr(Xr({},$n.hack),{test_set_average:bn})})}})}function Yr(){let sn=on.getFieldValue("hack_sets");const bn=sn.length+1,zn=Math.floor(100/bn),Yn=100%bn;sn.map((pn,jn)=>(br&&(pn.score=zn),pn.position=jn+1,pn)),sn.push({input:"",output:"",position:bn,score:br?zn+Yn:0}),on.setFieldsValue({hack_sets:sn}),On({type:0,payload:{data:Vr(Xr({},$n),{hack_sets:sn})}})}(0,pt.useEffect)(()=>{if(br){const sn=Rr==null?void 0:Rr.length,bn=Math.floor(100/sn),zn=100%sn;Rr==null||Rr.map((Yn,pn)=>(Yn.score=bn,Yn.position=pn+1,pn===sn-1&&(Yn.score=bn+zn),Yn)),On({type:0,payload:{data:Vr(Xr({},$n),{hack_sets:Rr})}}),on.setFieldsValue({hack_sets:Rr})}},[br]);function Zi(sn){let bn=on.getFieldValue("hack_sets");const zn=(bn==null?void 0:bn.length)-1,Yn=Math.ceil(100/zn),pn=100%zn;bn.splice(sn,1),bn==null||bn.map((jn,Dn)=>(br&&(jn.score=Yn,Dn===zn-1&&(jn.score=Yn+pn)),jn.position=Dn+1,jn)),On({type:0,payload:{data:Vr(Xr({},$n),{hack_sets:bn})}}),on.setFieldsValue({hack_sets:bn})}function zi(sn){Un(sn)}const bi=sn=>{var bn;const zn=(bn=Pi.current)==null?void 0:bn.findIndex(Yn=>Yn.language===an);Pi.current[zn].code=sn,qn(Pi.current)},ji=sn=>{Zt(Xr({},on.getFieldsValue()))},Qt=sn=>si(void 0,null,function*(){const bn=yield(0,Ue.ZP)(`/api/practices/${sn}/start`,{method:"get"});(bn==null?void 0:bn.status)===0&&(0,Ut.xg)(`/problems/${bn==null?void 0:bn.identifier}/oj/${sn}`)}),Sn=()=>si(void 0,null,function*(){const sn=yield ut(Ur),{name:bn,status:zn,review_privilege:Yn,review_description:pn}=sn;xr({review_privilege:Yn,status:zn,review_description:pn,name:bn})}),Jt=()=>{let sn="";Ge.default.confirm({icon:null,width:700,className:"custom-modal-divider",centered:!0,title:"\u4E0D\u901A\u8FC7\u539F\u56E0",content:Wt.createElement("div",{className:"mt20"},Wt.createElement(Ye.Z,{className:Dt.MdEditor,defaultValue:sn,onChange:bn=>{sn=bn}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>si(void 0,null,function*(){if(!sn)return me.ZP.warning("\u4E0D\u901A\u8FC7\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"),Promise.reject();const bn=yield(0,Ue.ZP)(`/api/practices/${Ur}/review.json`,{method:"post",body:{op:"fail",description:sn}});(bn==null?void 0:bn.status)===0&&(me.ZP.success("\u63D0\u4EA4\u6210\u529F"),Sn())})})},lt=()=>si(void 0,null,function*(){Ge.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u63D0\u793A",content:`\u786E\u8BA4\u5C06\u9898\u76EE\u300A${ar==null?void 0:ar.name}\u300B\u7684\u5BA1\u6838\u901A\u8FC7\u5417\uFF1F`,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>si(void 0,null,function*(){const sn=yield(0,Ue.ZP)(`/api/practices/${Ur}/review.json`,{method:"post",body:{op:"pass"}});(sn==null?void 0:sn.status)===0&&(me.ZP.success("\u63D0\u4EA4\u6210\u529F"),Sn())})})}),Bn=()=>{const sn=Ge.default.confirm({icon:null,width:700,className:`${Dt.cusModal} custom-modal-divider`,centered:!0,title:Wt.createElement(ke.Z,null,Wt.createElement(Ce.Z,{flex:"1"},"\u4E0D\u901A\u8FC7\u539F\u56E0"),Wt.createElement(Ce.Z,null,Wt.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:()=>sn.destroy()}))),content:Wt.createElement("div",null,Wt.createElement(ln.Z,{className:"mt20",value:(ar==null?void 0:ar.review_description)||""}))})};return Wt.createElement(Se.Z,{spinning:ur,size:"large",className:Dt["oj-custom-large-spin"]},$n?Wt.createElement(pt.Fragment,null,Wt.createElement("header",{className:Dt.header},Wt.createElement("div",null,Wt.createElement("img",{src:`${It.Z.IMG_SERVER}/images/${Wn==null?void 0:Wn.image_url}`,alt:"user",width:30}),Wt.createElement("span",null,Wn==null?void 0:Wn.name)),Wt.createElement("h2",null," ",(wr=$n==null?void 0:$n.hack)==null?void 0:wr.name," "),Ur?Wt.createElement("a",{className:Dt.btn_back,onClick:ai}," ",Wt.createElement(Re.Z,null),"\u9000\u51FA"):null),Wt.createElement(fe.default,{form:on,initialValues:$n,layout:"vertical",className:Dt["oj-form-container"],onValuesChange:ji,onFinish:ni},Wt.createElement(nt.Z,{hideResize:!0,className:Dt["oj-problems"],leftChild:Wt.createElement(Ei,{formValue:nn,onRemoveTestCase:Zi,onAddTestCase:Yr,hack:$n.hack,onChangeScore:Ci,onChangehide:yr,onChangeAverage:Nr,onChangeFile:xn,uploadData:Er,setUploadData:An,handleUploadRatio:yn,ischecked:Pr,pointData:er,sourceData:qt,getPointData:Tr}),rightChild:Wt.createElement(_e,{value:(Br=_n==null?void 0:_n.find(sn=>sn.language===an))==null?void 0:Br.code,onChange:bi,onLanguage:zi,languageItems:_n,language:an})}),Wt.createElement("div",{className:Dt.footer},!!Ur&&Wt.createElement("div",{className:Dt.result},Wt.createElement("span",null,"\u5BA1\u6838\u7ED3\u679C:"),ar!=null&&ar.review_privilege?Wt.createElement(Wt.Fragment,null,Wt.createElement("div",{onClick:lt,className:Dt.pass},"\u901A\u8FC7"),Wt.createElement("div",{onClick:Jt,className:Dt.noPass},"\u4E0D\u901A\u8FC7")):Wt.createElement(Wt.Fragment,null,(ar==null?void 0:ar.status)===0&&Wt.createElement("div",{className:Dt.passText},Wt.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u53D1\u5E03"),(ar==null?void 0:ar.status)===1&&Wt.createElement("div",{className:Dt.passText},Wt.createElement("i",{className:"iconfont icon-tongguo"}),"\u5DF2\u516C\u5F00"),(ar==null?void 0:ar.status)===2&&Wt.createElement("div",{className:Dt.passText},Wt.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u5BA1\u6279"),(ar==null?void 0:ar.status)===3&&Wt.createElement("div",{className:Dt.passText},Wt.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u4E2D"),(ar==null?void 0:ar.status)===4&&Wt.createElement("div",{className:Dt.passText},Wt.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u5B8C\u6210\u5F85\u516C\u5F00"),(ar==null?void 0:ar.status)===5&&Wt.createElement("div",{className:Dt.noPassText},Wt.createElement("i",{className:"iconfont icon-weitongguo1"}),"\u5BA1\u6838\u4E0D\u901A\u8FC7",Wt.createElement("span",{onClick:Bn},"\u67E5\u770B\u539F\u56E0")))),Wt.createElement(Me.ZP,{type:"primary",ghost:!0,onClick:ai},"\u9000\u51FA\u7F16\u8F91"),Wt.createElement(Me.ZP,{disabled:un,loading:qr,type:"primary",onClick:()=>{cr.current=!0,on.submit()}},"\u4FDD\u5B58 "),Ur?Wt.createElement(Me.ZP,{disabled:qr,loading:un,style:{background:"#2FC25B",border:0},type:"primary",onClick:()=>{cr.current=!1,on.submit()}},"\u7ACB\u5373\u4F53\u9A8C"):Wt.createElement(Me.ZP,{disabled:qr,loading:un,type:"primary",onClick:()=>{cr.current=!1,on.submit()}},"\u4FDD\u5B58\u5E76\u53D1\u5E03\u5BA1\u6838")))):null,Wt.createElement(Ge.default,{centered:!0,destroyOnClose:!0,footer:null,open:tr,onCancel:()=>mr(!1),title:"\u76F8\u4F3C\u6027\u68C0\u6D4B",width:"600px"},Wt.createElement("div",null,Wt.createElement("p",{className:"font14"},"\u7ECF\u7CFB\u7EDF\u68C0\u6D4B\u53D1\u73B0\uFF0C\u672C\u9898\u76EE\u4E0E\u7CFB\u7EDF\u4E2D\u5DF2\u521B\u5EFA\u7684\u9898\u76EE\u9AD8\u5EA6\u96F7\u540C\uFF0C\u8BF7\u8C03\u6574\u9898\u76EE\u540E\u518D\u8FDB\u884C\u4FDD\u5B58"),Wt.createElement(ve.default,{dataSource:Ot,bordered:!1,scroll:Ot.length>7?{y:300}:{},columns:[{title:"\u76F8\u4F3C\u9898\u9898\u76EE",dataIndex:"name",ellipsis:!0,render:(sn,bn)=>Wt.createElement("span",{onClick:()=>Qt(bn==null?void 0:bn.identifier),style:{textDecorationLine:"underline"},className:"current c-light-primary"},sn)},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"create_time",width:170,render:sn=>{var bn;return(bn=$t()(sn))==null?void 0:bn.format("YYYY-MM-DD HH:mm")}}],pagination:!1}))))};function Ei({ischecked:lr,formValue:wr,hack:Br,onChangeAverage:ro,onChangeScore:Ur,onChangehide:on,onChangeFile:nn,onAddTestCase:Zt,onRemoveTestCase:tr,uploadData:mr,setUploadData:Er,handleUploadRatio:An,pointData:er,sourceData:rn,getPointData:qt}){var Qn,Ot;const{test_set_average:vn,test_set_score:_n}=Br,[qn,an]=(0,pt.useState)(!1),[Un,Kn]=(0,pt.useState)(!1),On=(br,Pr)=>{const hn=[...mr];hn.splice(Pr,1),vn?An(hn):Er(hn)},ur=(br,Pr)=>{console.log(br,Pr);const hn=mr.map((Pi,qr)=>qr===Pr?Vr(Xr({},Pi),{score:br.target.value?Number(br.target.value):0}):Pi);Er(hn)},$n=br=>{const Pr=mr.concat(br);Br.test_set_average?An(Pr):Er(Pr)};function Wn(br){br.stopPropagation()}function hr(){if((0,tn.Ny)()){Kn("practice");return}let br="";Ge.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",content:Wt.createElement("div",null,Wt.createElement(oe.default,{placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:Pr=>{br=Pr.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>si(this,null,function*(){const Pr=yield(0,Ue.ZP)("/api/tag_disciplines.json",{method:"post",body:{target:"practice",name:br}});(Pr==null?void 0:Pr.status)===0&&qt()})})}function Rr(){if((0,tn.Ny)()){Kn("practice_source");return}let br="";Ge.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u6765\u6E90",content:Wt.createElement("div",null,Wt.createElement(oe.default,{placeholder:"\u8BF7\u8F93\u5165\u6765\u6E90\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:Pr=>{br=Pr.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>si(this,null,function*(){const Pr=yield(0,Ue.ZP)("/api/tag_disciplines.json",{method:"post",body:{target:"practice_source",name:br}});(Pr==null?void 0:Pr.status)===0&&qt()})})}return Wt.createElement("div",{className:Dt["oj-left-panel"]},Wt.createElement("div",{className:Dt["oj-form-info"]},Wt.createElement(fe.default.Item,{label:"\u9898\u76EE\u540D\u79F0",name:["hack","name"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0"}],className:Dt.inputOne},Wt.createElement(oe.default,{bordered:!1,maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0",suffix:Wt.createElement("span",null,((Ot=(Qn=wr==null?void 0:wr.hack)==null?void 0:Qn.name)==null?void 0:Ot.length)||0,"/",Wt.createElement("span",{className:"c-grey-999"},"60"))})),Wt.createElement(fe.default.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},Wt.createElement(Ye.Z,{placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u63CF\u8FF0\u2026",miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),Wt.createElement("div",{className:Dt.row},Wt.createElement("div",{className:Dt.a},Wt.createElement(fe.default.Item,{label:"\u96BE\u6613\u5EA6",name:["hack","difficulty"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u6613\u5EA6"}]},Wt.createElement(we.default,null,je(ge.difficulty)))),Wt.createElement("div",{className:Dt.b},Wt.createElement(fe.default.Item,{label:"\u9898\u76EE\u6765\u6E90",name:["hack","source_discipline_ids"]},Wt.createElement(we.default,{placeholder:"\u9009\u62E9\u9898\u76EE\u6765\u6E90",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:br=>br.parentNode},rn.map(br=>Wt.createElement(we.default.Option,{key:br.id,value:br.id},br.name)))),Wt.createElement(Me.ZP,{style:{padding:"0 18px"},type:"primary",ghost:!0,onClick:()=>Rr()},(0,tn.Ny)()?"\u6765\u6E90\u7BA1\u7406":"\u65B0\u5EFA\u6765\u6E90"))),Wt.createElement("div",{className:Dt.row},Wt.createElement("div",{className:Dt.b,style:{width:"100%",marginLeft:0}},Wt.createElement(fe.default.Item,{label:"\u77E5\u8BC6\u70B9",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9"}],name:["hack","tag_discipline_ids"]},Wt.createElement(we.default,{placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:br=>br.parentNode},er.map(br=>Wt.createElement(we.default.Option,{key:br.id,value:br.id},br.name)))),Wt.createElement(Me.ZP,{type:"primary",ghost:!0,onClick:()=>hr()},(0,tn.Ny)()?"\u77E5\u8BC6\u70B9\u7BA1\u7406":"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))),Wt.createElement("div",{className:Dt.field},Wt.createElement(fe.default.Item,{label:"\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236",name:["hack","time_limit"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:1,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F1\u79D2"}],className:Dt.inputTwo,extra:Wt.createElement("span",{style:{position:"absolute",left:200,top:11,color:"#333"}},"\u79D2",Wt.createElement("span",{className:"ml5 c-grey-999"},"(\u4EE3\u7801\u6267\u884C\u6240\u5141\u8BB8\u7684\u6700\u5927\u65F6\u957F)"))},Wt.createElement(de.Z,{style:{width:185},min:1}))),Wt.createElement("div",{className:"tst-case-info"},Wt.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," ","\u6D4B\u8BD5\u7528\u4F8B\u4E0E\u7CFB\u7EDF\u8BC4\u5206\u89C4\u5219",!Br.is_file&&Wt.createElement(Me.ZP,{style:{height:40},type:"primary",ghost:!0,onClick:Zt},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),Wt.createElement(fe.default.Item,{name:["hack","test_set_score"]},Wt.createElement(z.ZP.Group,{onChange:Ur},Wt.createElement(z.ZP,{value:!0},"\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6",Wt.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u4EC5\u5F53\u6240\u6709\u6D4B\u8BD5\u96C6\u90FD\u6B63\u786E\u65F6\uFF0C\u624D\u83B7\u5F97\u4E00\u6B21\u6027\u5956\u52B1\uFF09")),Wt.createElement(z.ZP,{value:!1},"\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6",Wt.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u901A\u8FC7\u6D4B\u8BD5\u96C6\u5373\u53EF\u83B7\u5F97\u5BF9\u5E94\u5956\u52B1\uFF09")))),Wt.createElement(ee.default,{style:{marginBottom:"5px"},checked:lr,onChange:on},"\u9690\u85CF\u5B9E\u9645\u8F93\u51FA \uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u5B66\u751F\u505A\u9898\u8FC7\u7A0B\u4E2D\u65E0\u6CD5\u770B\u5230\u5B9E\u9645\u8F93\u51FA\u7ED3\u679C\uFF0C\u4EC5\u5C55\u793A\u662F\u5426\u8BC4\u6D4B\u662F\u5426\u901A\u8FC7\uFF09"),Wt.createElement(fe.default.Item,{className:Dt.testJi,name:["hack","is_file"],label:"\u7528\u4F8B\u7C7B\u578B:"},Wt.createElement(z.ZP.Group,{onChange:nn},Wt.createElement(ae.Z,{direction:"horizontal"},Wt.createElement(z.ZP,{value:!1},"\u6587\u672C"),Wt.createElement(z.ZP,{value:!0},"\u6587\u4EF6")))),Wt.createElement(fe.default.Item,{label:"\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406",name:["hack","submit_rule"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406"}]},Wt.createElement(z.ZP.Group,null,Wt.createElement(z.ZP,{value:0},"\u4E0D\u5FFD\u7565\u7A7A\u683C"),Wt.createElement(z.ZP,{value:1},"\u5FFD\u7565\u9996\u5C3E\u7A7A\u683C"),Wt.createElement(z.ZP,{value:2},"\u5FFD\u7565\u6240\u6709\u7A7A\u683C"))),!Br.test_set_score&&Wt.createElement(fe.default.Item,{name:["hack","test_set_average"],label:"\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4"},Wt.createElement(z.ZP.Group,{onChange:ro},Wt.createElement(z.ZP,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),Wt.createElement(z.ZP,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),Br.is_file&&Wt.createElement("div",{className:Dt.upBtn},Wt.createElement(Me.ZP,{ghost:!0,type:"primary",className:"mb20",onClick:()=>an(!0)},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),Wt.createElement(Kt.Y2,{disabled:Br==null?void 0:Br.test_set_average,inputChange:ur,showScore:!Br.test_set_score,data:mr,onRemove:On})),!Br.is_file&&Wt.createElement(fe.default.List,{name:"hack_sets"},(br,{})=>Wt.createElement(De.default,{accordion:!0},br.map((Pr,hn)=>Wt.createElement(Fi,{key:`${Pr.key}--${hn}`,header:Wt.createElement("a",{className:Dt["test-case-name"]},Wt.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",hn+1),_n?null:Wt.createElement(Wt.Fragment,null,Wt.createElement(fe.default.Item,{name:[Pr.name,"score"],fieldKey:[Pr.fieldKey,"score"],rules:[{required:!0,message:`\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6${hn+1}\u8BC4\u5206`}]},Wt.createElement(de.Z,{onClick:Wn,min:0,max:100,disabled:vn})),Wt.createElement("span",null,"%"))),extra:hn>0?Wt.createElement("div",{onClick:Wn},Wt.createElement(ie.Z,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(hn+1),onConfirm:()=>{tr(hn)}},Wt.createElement(We.Z,{className:Dt["btn-remove-case"]}))):null},Wt.createElement(fe.default.Item,{label:"\u8F93\u5165",name:[Pr.name,"input"],fieldKey:[Pr.fieldKey,"input"]},Wt.createElement(yi,null)),Wt.createElement(fe.default.Item,{label:"\u8F93\u51FA",name:[Pr.name,"output"],fieldKey:[Pr.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},Wt.createElement(yi,null)))))))),Wt.createElement(Kt.ZP,{rootIdentifier:null,visible:qn,onClose:()=>an(!1),onOK:$n}),Wt.createElement(Lt,{visible:Un,onCancel:()=>{Kn(!1),qt()},onOK:()=>{Kn(!1),qt()}}))}},74091:function(mn,dn,st){"use strict";st.d(dn,{Y2:function(){return ut},ZP:function(){return ft}});var pt=st(59301),Dt=st(14566),oe=st(6767),Ge=st(62957),De=st(77019),fe=st(47889),me=st(99571),ke=st(62673),Ce=st(25399),Se=st(37568),Me={wrap:"wrap___MkYbQ",colorBlue:"colorBlue___onjbP",repeatedName:"repeatedName___nbqnE",text:"text___xvutp",greyText:"greyText___dihvZ",noData:"noData___LxOJA",dragger:"dragger___y7F4A",uploadText:"uploadText___Et3KS",btnS:"btnS___k1e6j",testCaseRadio:"testCaseRadio___q1wXT",head:"head___s4Eix",operation:"operation___JCAVh",headProgram:"headProgram___uWA_M",listWrapper:"listWrapper___xW3b4",list:"list___dCbd6",del:"del___abNho",info:"info___J1Wmf"},ve="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATEAAADICAYAAACAj9YNAAAAAXNSR0IArs4c6QAAD59JREFUeF7tnet527gShsFUZFeQpJN1GkncyG46iVJBVFG4D6mLKYmSMLgQM4NXf855NrgMvm/8egBC9BD4oIBhBV7++fPlHP6n8PH/p/84Dp8XS7v8txB2N8sext/h7+G/73++3v67YZ08hz54Xhxr86fAy7c/P+ZVHQB1DaYaCz7AbBzfgVsNefPHBGL5GjJCRQUW0PpecRrp0DugJpWsXnsgVk9bRk5QQCm0nq1khhpb0Gcy1fl3IFZHV0YVKDCfa03nWeOgqdoSrODc9Lz1BGgp8qX1AWJputGrgAJz1bXd2VaBiEVDUJ2J5EpvDMTStaNnogJHeFmvuiSrB2gStYRtgZhQMJqnKWD0rCttsfd7AbPSioYQgFgFURnyQwHnW8ZUq4FZqnIr/YBYQTEZ6lKBDreNshQYxvf9v6+He298khUAYsnS0fGeAsBLmBvj+JWnmULNFs2BWLp29LxSYL4qMczXJLa4Se9Nf7aYiY4CsUTh6MbWsUoOsMUUywrExJLRYakAW8cq+UBVJpAViAnEoinV16Y5QFUWJTcQi5KJRtcKUIFtlBOA7KnQQOypRDS42D5yeN8iIdhePlAdiLVISaNzUn01No6rGKsGALHGeWllegCmxCm2lzdGADEluak5DACmzB1AdmEIEFOWn9rCAWDaHDnGA8jOxgAxpTmqIayXt/0vbt9rcOJODIBsFgaIKc7RlqFRgbVUXzA3IANignTppikAM2Z15yCjEjOWr7XDBWC1Fa40fscgA2KVcsrisADMomuLmDsFGRAznrelwj++Rmc6yOdjWYEOL8QCMcsJWyh2AFZISCXD7P976ernuqvFKskxVWEAMFV2lAmms20lECuTNmZH4S6YWeseB94RyICY0xyOWRYH+TEqGW7TCciAmOEczQmdbWSOenb69nA+BsTs5GPRSNlGFpVT72AdVGNATG/6VYuMbWQ1aXUO7BxkQExn2lWN6uVtP1adgMHVKeB5WwnE1KVb3YDYRtbVV+3ojqsxIKY268oHxmF+eU0tjei1GgNilrIwM1a2kZkCWu/utBoDYtYTMzJ+tpGRQnlv5hBkQMx70h7XRxXWidHPl7nb//fy9XkzOy2AmB2vkiPlSkWydD47OqvGgJjPNL1YFVVYByZLlgjEJGrRtrUCPJFs7YDS+R2BjEpMSY7NsDl+9j9fd6XC4kC/lJLOxgFizgzdYDnzudTpMw6fj//3DK4HIRyANoy/w9+wkwCOKmwDYy1P4QRkVGIVk/AMrnH4XniaXQzUqMIKq+5tOCDmzdH89cyVz6fwJRwqrZgqK3/SEFaBRhVWQlr/Y3i4xU8lVihPlVxj2IVxfJ+2nFRhhYz1PoyDagyIZSapEnhdr2I6R9uqEsxUkO5NFQBiTeVvOrlSeDXVhMltKmB9S0klJsw74CUUjOb6FTBejQExQYoBMIFYNLWkgOnvUwKxyFTjoDxSKJqZVMDylhKIPUk5riqY/JkkaKkChreUQOyB2WwfpT8JtDerABAza93dwAGYP09Z0WMFrG4pqcRWfGULyY97jwoAMSeuAzAnRrIMuQJGt5RUYldW8xRSnvv0cKIAELNvJACz7yEryFLA5H0xKrGj5xzkZyU/nZ0oYPFcDIiFEDgHc/ITyDKyFQBi2RK2GYBtZBvdmVWhAuP4VfL2YA0r6L4SYxupIQ2JQY0CBg/3gdjbflSTQASCAq0VAGKtHZDNTxUm04vWHSgAxOyYzGG+Ha+IdFMFzF2z6HY7yWH+pj8YTGZHASBmwSuqMAsuEWMjBYBYI+FF0wIxkVw07kwBa3fFutxOspXs7KeS5YoUAGIiudo0fuFaRRvhmdWEAkBMuU1sJZUbRHjNFQBizS14HABbSeUGEV5zBYBYcwueQowb+so9Iry2CgCxtvo/nJ2tpGJzCE2NAkBMjRW3gQAxxeYQmhoFgJgaK1Yg9u3PjzAO3xWHSGgo0FoBLru2duDR/HzhW7M7xKZEASCmxIjVMHgyqdkdYlOiABBTYgQQ02wEsWlWAIhpdodKTLM7xKZCAd4npsKGu0HwdSPd/hCdAgV4x35bE+YrFNPnUzj87/IzDp9DWPnvbUNmdhTQpQAQ286P+Unj9DnAafrcgmu7cJgJBVwoYO2O2CS6mVfxXEELYLn4kWERShXYhXF8t/Kn21RDbAEuLqgqzXbCcq+AeqCpgxjgcv9DwQLtKqASaGogxm16u5lN5B0qoOgqRnOIAa8OfwBYshcFVFRmzSAGvLzkMetAgdAUZptD7Agv7myR+SjgT4EmMNsUYlRf/rKWFaHAigKbwmwTiAEvEh0FOlRgo8P/6hADYB0mL0tGgZMCG4CsGsSOr4KeLqlyu56URoG+Fai6vawCMaqvvjOW1aPAqgKVqrLiEANgJDAKoMBdBSqArCjEABjJiwIoEKFA0bfHFoMYAIuwjiYogAInBYqBrAjEeO0zmYkCKJCgQBGQZUMMgCVYRxcUQIFiFVkWxNhCkokogALZCmQe9idDDIBlW8cAKIACJwUyQJYEMQBG7qEAChRXIBFkYogdb+L/Kr4ABkQBFECBBJDJIfa2H1EaBVAABaopIASZCGI8iaxmGwOjAAosFJD86bhoiHEORo6hAApspoCgGouCGOdgm1nHRCiAAsInlnEQe9tPB/m8Uof0kiswjO/hb9jNHYeBVzPJFey6R8y28inE2EZ2nUM5i1/9Sgn5lCNph30jtpUPIcY2ssOkKbTkR79BAVkhkXsZ5gnIHkOMbWQvaVJ2neP4df/z9bCFvPMBZGUl9z7ao1+KdyFGFeY9LSqtLwJgp5m5slPJA4/DPqjG7kOMKsxjKtRdU8T5xXUAL1yeruuJo9HvVWOrEKMKc+T8VktJANgUGrm2lUEO5rmTY+sQowpz4PiGS0gE2Hlb+c+fL2EY+D7uhpaZnCoWYvxmNGlvu6AzAXYG2bc/P8I43yPjgwL3FVjJt5tKjMNWMkigQJHXCwMygeK9N42EGG+p6D1R4tZfFGCALE50WoVwfcB/UYmxlSRFohUQXKWIHvPYkDtkUsU6a39VjV1CjAP9zrIhcbkVAXauyMjFRHP66Lasxq4hxlayjxxIX+UGAANk6fZ003ORh2eIsZXsxv70hRZ6EikJgMuwErU6arvIxQ+IUb53lAEJS20AsClKfrkmeNVHl/ODpSXE2Er2Yb58lY0AxhNLuVU99Tidi80Q47ddT9aL11rlKoU0Cp5YShXroP3xlysQ68DrjCWqABgVWYaDnrteQIzzMM9Wp65NFcAAWaqNrvvNOXqoxICYa6eTFrfhVQppfGwtpYr5bT+di50gxqG+X5/lK1MMsHNFxi9eua8eewzj+8ChvkdnM9bU+EmkJHJ2EBK1nLYFYk6NTV2WIYDNxyC8hyzVaT/9ZojxHic/huasxBjAzttKQJbjuv2+M8Q4W7BvZO4KjAKMJ5a5xrvovwNiLnzMWoTKqxTSFbGjkCrmpj0Qc2Nl2kJcAIyKLM18L72oxLw4mbIOA1cppMuiIpMqZr/9BDHuiNn3Ub4ChwCjIpOngYceQMyDi9I1OAbYGWQ8sJJmhdn2QMysdYmBG38SKVk1uwyJWnbbAjG73skj7whgkzhchpWniMUeQMyiaykxdwaw87aSy7Ap2WKqD08nTdmVHKyrqxRSFXhiKVXMVnsgZsuvlGi7BhhPLFNSxlYfIGbLL2m0AGyhGBWZNH1stAdiNnxKi7KDqxRSYQCZVDH97XmLhX6P0iIEYHd146UHaSmltNcOiCl1JissAPZUPkD2VCIrDXa82dWKVbFxdnqVIlaeZTsuw6aopqzP9D6xKSTMVGZMajgATKQcl2FFculsPI7nv3bEl8B1WiSJiieRErWObTnoTxBNU5cFxH6FEL5oio1YhApwDiYU7KM5IEuWrnnHjz/Zxnv2m5uRGQBVWIaAQCxDvLZdF388l++XtbWiwOzTb6QCw3Q5BBAzavvxDPic+BzuGzXyFDbbyWQDuW6RLF3bjsecX0KMc7G2luTPDsjEGlKFiSVT0+G0+/iAGOdiaszJDGSX1X8c3/c/X/PGyAogrvMMn+kzDp/jeqy24mFWhniNu57PgT8gxrlYY09UTa/6QQHVk6pcaRPMYtdxcRjM2UAbP1TOqvTiLBdUVWbL5kEtH2RdQowt5eZmqJ0QiKm1hsDCxU7h5rE8TylJkaMCKreUVGLkZ7h6gHULMaoxsuSgABAjE1QqcH0nEoiptElFUEBMhQ0EcaXATV6u3vJmS0niUImRAyoVWLkLuQ4xtpQq/ds4KCqxjQVnuqcKrObk3e/bUY09FdR7AyDm3WFr67vzjZT7EKMas2Zx6XiBWGlFGS9Hgbv5+PDNB1RjOZqb7wvEzFvoaAEPvhf8GGJUY46yQLwUICaWjA5VFHhy8frpO6j4nloVWywMCsQsuOQ/xqd5+BRik0ZsK/1nysoKnyZPC1W4sd9C9YZzRrxeKg5ibCsbuthsaiDWTHomPioQlYNREJurMUDWW2ZFJdDWolCJba14u/liX7keDTG2le3MbDQzEGskPNNOL7scv8a+nFMGMaqxnvILiPXktqa1Cl8DJYIY20pNTlePBYhVl5gJSjxQEkMMkHWTeECsG6v1LDT2HGwZcRLEjudj/HUkPd7XiASI1VCVMe8rIDgHKwIxQOY+G4GYe4sVLTARYNMKkiuxGWL8hSRFWVA8FCBWXFIGXFVAeJB/PUYWxACZ66QEYq7tVbK4TIBlV2InGajIlCRE2TCAWFk9Ge2mhBrf9/++Hv4IcsYnuxK7Atn3EAJ/VTnDEEVdgZgiM9yFUqACO2lSDGJnmL3teWrpI+OAmA8f9a0i4xB/bTHFITafkwEyfYkjjwiIyTWjx2MFdmEc32O/ThQrZhWIzSDjK0qxHmhtB8S0OmMxroLbx5ujtZp6HA/8OSerKXK9sYFYPW37GrkiwCYhq1ViS5fYXprMWSBm0jZVQVfZPm5aiV2A7HAxlqpMVY49DAaI2fFKX6SVq6/lgjepxC5gxlmZvoRbjwiIWXFKU5wbwuu07M0hNh/6U5VpSrt7sQAxCy5pirEBwDY7E7unMzDTlIE3sQAx1fYoCq4RvJpWYtfyAzNFCfkRChBTaYuioBrDSxXETsEAM0UJGgIQU2WHkmCG8X2KpMR3HkutqMmZWEzwAC1GpaptgFhVeU0NvgvD+FsTuJbqqYXYMkiA1iThgVgT2dVMqhpc5iB2A7T5kcR852z68NaMOnkPxOroqnXUGVrhb9iV/m5j7QWbqMSeiTBXatPnU/gSxuHzSntA90zE238HYnLNWvTYXU26lusfbSZQnT4GgbUm8P/6C+VmwqlgeQAAAABJRU5ErkJggg==",we=st(47257),de=st.n(we),z=st(12230),ee=st(52430),ae=st(1012),ie=st(89299),le=st(23416),ue=st(59301),ge=Object.defineProperty,Pe=Object.defineProperties,je=Object.getOwnPropertyDescriptors,Be=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,Ae=(wt,Je,nt)=>Je in wt?ge(wt,Je,{enumerable:!0,configurable:!0,writable:!0,value:nt}):wt[Je]=nt,Re=(wt,Je)=>{for(var nt in Je||(Je={}))Fe.call(Je,nt)&&Ae(wt,nt,Je[nt]);if(Be)for(var nt of Be(Je))Ne.call(Je,nt)&&Ae(wt,nt,Je[nt]);return wt},We=(wt,Je)=>Pe(wt,je(Je)),Ye=(wt,Je,nt)=>new Promise((xt,Pt)=>{var Ct=ht=>{try{dt(nt.next(ht))}catch(Et){Pt(Et)}},gt=ht=>{try{dt(nt.throw(ht))}catch(Et){Pt(Et)}},dt=ht=>ht.done?xt(ht.value):Promise.resolve(ht.value).then(Ct,gt);dt((nt=nt.apply(wt,Je)).next())});const{Dragger:Ue}=Dt.default,Ke=wt=>{const Je=Et=>Et&&Et.substring(0,Et.lastIndexOf("."));for(var nt=[...wt],xt=0,Pt=[],Ct=0;Ct<nt.length;Ct++){for(var gt="",dt=0;dt<Pt.length;dt++)if(Je(Pt[dt][0].name)==Je(nt[Ct].name)){xt=1,gt=dt;break}if(xt==1)Pt[gt].push(nt[Ct]),xt=0;else if(xt==0){let Et=new Array;Et.push(nt[Ct]),Pt.push(Et)}}return Pt.map(Et=>{if(Et.forEach(St=>{let Ft=St.name.split(/\.(?=[^\.]+$)/);St.name=`${Ft[0]}.${Ft[1].toLowerCase()}`}),Et[0].name.includes(".in"))return Et.length===2?Et:[Et[0],{}];if(Et[0].name.includes(".out"))return Et.length===2?Et.reverse():[{},Et[0]]})},ot=({onClose:wt,onOK:Je,visible:nt,wrapClassName:xt,rootIdentifier:Pt,multiple:Ct=!1,defaultMultipleValue:gt=!0})=>{const[dt,ht]=(0,pt.useState)([]),[Et,St]=(0,pt.useState)({}),[Ft,mt]=(0,pt.useState)(!1),[yt,tt]=(0,pt.useState)(!0),Ve=(0,pt.useRef)([]),xe=(0,pt.useRef)(0),Le=()=>{wt()};(0,pt.useEffect)(()=>{Xe()},[]),(0,pt.useEffect)(()=>{nt&&(Ve.current=[],xe.current=0,ht([]),tt(gt))},[nt]);const Xe=()=>Ye(void 0,null,function*(){try{const At=yield(0,ee.ZP)("/api/buckets/get_upload_token_for_big_files",{method:"get"}),Lt=JSON.parse((0,z.pe)(At.data));St(Lt)}catch(At){}}),rt=At=>At&&At.substring(0,At.lastIndexOf(".")),Ie=At=>{var Lt,It;const Kt=rt((Lt=At[0])==null?void 0:Lt.name)||rt((It=At[1])==null?void 0:It.name),Xt=dt.filter($t=>rt($t.name)!==Kt);Ve.current=[...Xt],ht([...Xt])},_e=At=>{if(!yt){const Ut=new FormData;Ut.append("file",At.file),(0,ee.ZP)("/api/attachments/get_file_content.json",{method:"post",body:Ut},!0).then(tn=>{if(tn.status===0){xe.current=xe.current+1;const Wt=Ve.current.map(En=>{var Pn;if(En.name===At.name){const Ln=Re({},En);return(Pn=At==null?void 0:At.name)!=null&&Pn.includes(".in")?Ln.input=tn==null?void 0:tn.content:Ln.output=tn==null?void 0:tn.content,Ln}return En});if(Ve.current=[...Wt],ht([...Wt]),xe.current>0&&xe.current===dt.length){mt(!1);let En=Ke(Wt);En=En.filter(Pn=>{var Ln,Vn;return!!((Ln=Pn[0])!=null&&Ln.name&&((Vn=Pn[1])!=null&&Vn.name))}),En=En.map(Pn=>We(Re(Re({},Pn[0]),Pn[1]),{is_file:!1})),Je(En),wt()}}else mt(!1),wt()});return}const Lt=new(de())({endpoint:Et.end_point,region:Et.region,accessKeyId:Et.access_key_id,accessKeySecret:Et.access_key_secret,bucket:Et.bucket,stsToken:Et.security_token}),It=At.name,Kt={container_type:"TestSet",file_name:It},Xt=(0,ae.Z)();let $t=`testsets/${Pt}/${Xt}${It.indexOf(".")>-1?"."+It.split(".").pop():""}`;Pt===null&&($t=`testsets/${Xt}${It.indexOf(".")>-1?"."+It.split(".").pop():""}`),Lt.multipartUpload($t,new Blob([At.file],{type:At.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:It+""},url:Et==null?void 0:Et.callback_url,host:Et==null?void 0:Et.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,ee.rz)(Kt)}}).then(function(Ut){if(Ut.data.status===0){xe.current=xe.current+1;const ln=Ve.current.map(tn=>{var Wt,En,Pn,Ln,Vn,Or,dr,Lr,Xr,Vr,si,yi,Ii,Fi,_i,Yi,et;if(tn.name===((En=(Wt=Ut.data)==null?void 0:Wt.data)==null?void 0:En.file_name)){const pr=Re({},tn);return(Vn=(Ln=(Pn=Ut.data)==null?void 0:Pn.data)==null?void 0:Ln.file_name)!=null&&Vn.includes(".in")?(pr.in_object_key=(dr=(Or=Ut.data)==null?void 0:Or.data)==null?void 0:dr.object,pr.in_object_size=(Xr=(Lr=Ut.data)==null?void 0:Lr.data)==null?void 0:Xr.size,pr.input=(si=(Vr=Ut.data)==null?void 0:Vr.data)==null?void 0:si.file_name,pr.in_file=At):(pr.out_object_key=(Ii=(yi=Ut.data)==null?void 0:yi.data)==null?void 0:Ii.object,pr.out_object_size=(_i=(Fi=Ut.data)==null?void 0:Fi.data)==null?void 0:_i.size,pr.output=(et=(Yi=Ut.data)==null?void 0:Yi.data)==null?void 0:et.file_name,pr.out_file=At),pr}return tn});if(Ve.current=[...ln],ht([...ln]),xe.current>0&&xe.current===dt.length){mt(!1);let tn=Ke(ln);tn=tn.filter(Wt=>{var En,Pn;return!!((En=Wt[0])!=null&&En.name&&((Pn=Wt[1])!=null&&Pn.name))}),tn=tn.map(Wt=>We(Re(Re({},Wt[0]),Wt[1]),{is_file:!0})),Je(tn),wt()}}})},He=At=>new Promise((Lt,It)=>{let Kt=0,Xt=[];for(let $t=0;$t<At.length;$t++)At[$t].file.slice(0,1).arrayBuffer().then(()=>{Kt++,Kt===At.length&&(Xt.length?(oe.ZP.warning(`${Xt.join("\uFF0C")}\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01`),It()):Lt(At))}).catch(Ut=>{console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",Ut),Kt++,Xt.push(At[$t].name),Kt===At.length&&(Xt.length?(oe.ZP.warning(`${Xt.join("\uFF0C")}\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01`),It()):Lt(At))})}),Qe=()=>Ye(void 0,null,function*(){if(dt.length===0){oe.ZP.warning("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6");return}if(yield He(dt),mt(!0),Ke(dt).some(Lt=>{var It,Kt;return!((It=Lt[0])!=null&&It.name&&((Kt=Lt[1])!=null&&Kt.name))})){Ge.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u4E0A\u4F20\u7684\u6D4B\u8BD5\u7528\u4F8B\u4E2D\u5B58\u5728\u672A\u914D\u5BF9\u7684\u6587\u4EF6\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u4EC5\u4FDD\u5B58\u5DF2\u914D\u5BF9\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF1F",onOk:()=>Ye(void 0,null,function*(){dt.map(Lt=>Ye(void 0,null,function*(){_e(Lt)}))}),onCancel:()=>{mt(!1)}});return}dt.map(Lt=>Ye(void 0,null,function*(){_e(Lt)}))}),ct={name:"file",fileList:dt,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:At=>{if(dt!=null&&dt.some(It=>It.name===At.name))return oe.ZP.info(`${At.name}\u6587\u4EF6\u5DF2\u5B58\u5728`),!1;if(At.size/1024/1024>100)return oe.ZP.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(At.name))return oe.ZP.warning("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;const Lt={name:At.name,uid:At.uid,file:At,percent:0};return dt.push(Lt),Ve.current=[...dt],ht([...dt]),!1}},at=Ke(dt);return console.log(dt,at,"fileList"),ue.createElement(Ge.default,{open:nt,wrapClassName:xt,onOk:Qe,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:Ft},onCancel:Le,width:730,title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},ue.createElement("div",{className:Me.wrap},dt.length?ue.createElement("div",null,ue.createElement(De.Z,{justify:"space-between",align:"middle",style:{marginBottom:40}},ue.createElement("div",{style:{visibility:Ct?"visible":"hidden"}},ue.createElement("span",{className:Me.greyText},"\u7528\u4F8B\u7C7B\u578B"),ue.createElement(fe.ZP.Group,{className:`ml20 ${Me.testCaseRadio}`,optionType:"button",value:yt,onChange:At=>tt(At.target.value)},ue.createElement(fe.ZP,{value:!1},"\u6587\u672C"),ue.createElement(fe.ZP,{value:!0},"\u6587\u4EF6"))),ue.createElement(Dt.default,Re({},ct),ue.createElement(me.ZP,{type:"primary",className:Me.btnS},ue.createElement("i",{className:"iconfont icon-shangchuan2"}),"\u4E0A\u4F20\u6587\u4EF6"))),ue.createElement(ut,{data:at,onRemove:Ie})):ue.createElement("div",{className:`${Me.noData} mb30`},ue.createElement(Dt.default.Dragger,We(Re({},ct),{className:Me.dragger}),ue.createElement("img",{src:ve,alt:"",className:"mb20"}),ue.createElement("div",null,ue.createElement("span",null,"\u62D6\u62FD\u6587\u4EF6\u6216"),ue.createElement("span",{className:Me.uploadText},"\u70B9\u51FB\u6B64\u5904\u4E0A\u4F20")))),ue.createElement("div",{className:Me.text},ue.createElement("span",{style:{color:"#FA6400"}},"\u63D0\u793A"),ue.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",ue.createElement("br",null),"2\u3001\u4E0A\u4F20\u7684\u6587\u4EF6\u7F16\u7801\u4EC5\u652F\u6301UTF-8\uFF0C\u5426\u5219\u53EF\u80FD\u4F1A\u51FA\u73B0\u6587\u672C\u4E71\u7801\u3002",ue.createElement("br",null),"3\u3001\u8F93\u5165\u8F93\u51FA\u6587\u4EF6\u9700\u6587\u4EF6\u540D\u79F0\u4E00\u4E00\u5BF9\u5E94\uFF0C\u672A\u5BF9\u5E94\u65F6\uFF0C\u5C06\u65E0\u6CD5\u4E0A\u4F20\u3002",ue.createElement("br",null),"4\u3001\u5355\u4E2A\u4E0A\u4F20\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7100MB\uFF0C\u8D85\u8FC7\u65F6\u53EF\u4EE5\u5206\u6279\u6B21\u4E0A\u4F20\u3002",ue.createElement("br",null))))},ut=({data:wt=[],onRemove:Je,width:nt="auto",showScore:xt=!1,disabled:Pt=!1,inputChange:Ct,onEvaluatingChange:gt,onSelectAll:dt,checkAll1:ht,checkAll2:Et,checkAll3:St,checkAll4:Ft,checkAll5:mt,showEvaluatingSetting:yt=!1,className:tt="",isProgramHomework:Ve=!1})=>{const xe={value:"",filename:"",dataUrl:""},[Le,Xe]=(0,pt.useState)(Re({},xe)),rt=He=>{let Qe=document.createElement("a");document.body.appendChild(Qe);let ct=URL.createObjectURL(He.file);Qe.href=ct,Qe.download=He.name,Qe.click(),URL.revokeObjectURL(ct),document.body.removeChild(Qe)},Ie=(He,Qe)=>{(0,ie.LR)(He,Qe)},_e=(He,Qe)=>{Ge.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:ue.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:()=>{Je(He,Qe)},onCancel:()=>{}})};return wt.length?ue.createElement("div",{className:tt,style:{width:nt}},ue.createElement("div",{className:`${Ve?Me.headProgram:Me.head}`},yt&&ue.createElement("div",{style:{width:"15%",display:"flex",alignItems:"center"}},ue.createElement(ke.default,{checked:ht,onChange:He=>{dt(He.target.checked,"hidden")}}),ue.createElement(Ce.Z,{title:'\u9690\u85CF\u6D4B\u8BD5\u96C6\u53EF\u4EE5\u9632\u6B62\u5B66\u751F\u901A\u8FC7"print"\u7B49\u624B\u6BB5\u76F4\u63A5\u901A\u5173'},ue.createElement("span",{style:{marginLeft:"8px"}},"\u9690\u85CF"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),ue.createElement("div",{style:{width:Ve?"25%":"15%"}},"\u7528\u4F8B"),ue.createElement("div",{style:{width:xt?Ve?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u5165"),ue.createElement("div",{style:{width:xt?Ve?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u51FA"),xt&&ue.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),yt&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(ke.default,{checked:Ft,onChange:He=>{dt(He.target.checked,"input_visible")}}),ue.createElement(Ce.Z,{title:"\u52FE\u9009\u540E\uFF0C\u8F93\u5165\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},ue.createElement("span",{style:{marginLeft:"8px"}},"\u8F93\u5165"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),yt&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(ke.default,{checked:Et,onChange:He=>{dt(He.target.checked,"is_invisible")}}),ue.createElement(Ce.Z,{title:"\u52FE\u9009\u540E\uFF0C\u9884\u671F\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},ue.createElement("span",{style:{marginLeft:"8px"}},"\u9884\u671F\u8F93\u51FA"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),yt&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(ke.default,{checked:mt,onChange:He=>{dt(He.target.checked,"actual_output_visible")}}),ue.createElement(Ce.Z,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},ue.createElement("span",{style:{marginLeft:"8px"}},"\u5B9E\u9645\u8F93\u51FA"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),yt&&ue.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},ue.createElement(ke.default,{checked:St,onChange:He=>{dt(He.target.checked,"last_match_rule")}}),ue.createElement(Ce.Z,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u4E0E\u9884\u671F\u8F93\u51FA\u6700\u540E\u4E00\u884C\u76F8\u540C\u5373\u53EF\u901A\u5173"},ue.createElement("span",{style:{marginLeft:"8px"}},"\u7279\u6B8A\u5224\u5B9A"),ue.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),ue.createElement("div",{className:Me.operation,style:Ve?{flex:1,textAlign:"right"}:{width:"10%"}},"\u64CD\u4F5C")),ue.createElement("div",{className:Me.listWrapper,style:{boxShadow:Ve?"0px 2px 4px 0px #EAEEF4":"unset"}},wt.map((He,Qe)=>{var ct,at,At,Lt;return ue.createElement("div",{key:Qe,className:Me.list,style:Ve?{marginBottom:"0px",height:"66px",borderBottom:"1px solid #F6F7F8"}:{}},yt&&ue.createElement("div",{style:{width:"15%"}},ue.createElement(ke.default,{checked:!!He.hidden,onChange:It=>{gt(It.target.checked,Qe,"hidden")}})),ue.createElement("div",{style:{width:Ve?"25%":"15%",paddingLeft:Ve?"5px":"0px",paddingRight:Ve?"5px":"0px"}},"\u6D4B\u8BD5\u7528\u4F8B",Qe+1),ue.createElement("div",{className:Me.info,style:{width:xt?Ve?"20%":"15%":"25%"}},ue.createElement("span",{title:He.input||((ct=He[0])==null?void 0:ct.name),onClick:()=>Ye(void 0,null,function*(){let It;He.input?He.input_file_url?It=He.input_file_url:It=He.in_file:It=He[0];let Kt;typeof It=="string"?(Kt=yield fetch(It,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),Xe({value:yield Kt.text(),filename:"",dataUrl:It})):(Kt=yield(0,ie.db)(It.file),Xe({value:Kt.text,filename:It.name,dataUrl:Kt.link}))})},He.input||((at=He[0])==null?void 0:at.name))),ue.createElement("div",{className:Me.info,style:{width:xt?Ve?"20%":"15%":"25%"}},ue.createElement("span",{title:He.output||((At=He[1])==null?void 0:At.name),onClick:()=>Ye(void 0,null,function*(){let It;He.input?He.output_file_url?It=He.output_file_url:It=He.out_file:It=He[1];let Kt;typeof It=="string"?(Kt=yield fetch(It,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),Xe({value:yield Kt.text(),filename:"",dataUrl:It})):(Kt=yield(0,ie.db)(It.file),Xe({value:Kt.text,filename:It.name,dataUrl:Kt.link}))})},He.output||((Lt=He[1])==null?void 0:Lt.name))),xt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(Se.default,{size:"large",addonAfter:Ve?"%":null,disabled:Pt,style:{width:"80%"},onChange:It=>Ct(It,Qe),value:He.score}),!Ve&&ue.createElement("span",null,"\xA0%")),yt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(ke.default,{checked:He.input_visible||!1,onChange:It=>{gt(It.target.checked,Qe,"input_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),yt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(ke.default,{checked:He.is_invisible||!1,onChange:It=>{gt(It.target.checked,Qe,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),yt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(ke.default,{checked:He.actual_output_visible||!1,onChange:It=>{gt(It.target.checked,Qe,"actual_output_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),yt&&ue.createElement("div",{style:{width:"20%"}},ue.createElement(ke.default,{checked:He.last_match_rule||!1,onChange:It=>{gt(It.target.checked,Qe,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),ue.createElement("div",{onClick:()=>_e(He,Qe),style:Ve?{flex:1,textAlign:"right",paddingLeft:"5px",paddingRight:"5px"}:{width:"10%",textAlign:"center"}},ue.createElement("span",{className:Me.del},"\u5220\u9664")))})),ue.createElement(le.Z,{close:!0,data:Le.dataUrl,filename:Le.filename,type:Le.dataUrl.length?"txt":"",onClose:()=>Xe(Re({},xe)),monacoEditor:{value:Le.value,language:"txt",onChange:()=>{},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):ue.createElement(ue.Fragment,null)};var ft=ot},48421:function(mn,dn,st){"use strict";st.d(dn,{AL:function(){return ge},Iy:function(){return Me},Qv:function(){return de},ez:function(){return ue},jb:function(){return ve}});var pt=st(32834),Dt=st.n(pt),oe=st(11690),Ge=st.n(oe);let De=1;function fe(Ne,Ae){const Re=Ne.match(/^(\s+)(?:```)/);if(Re===null)return Ae;const We=Re[1];return Ae.split(`
`).map(Ye=>{const Ue=Ye.match(/^\s+/);if(Ue===null)return Ye;const[Ke]=Ue;return Ke.length>=We.length?Ye.slice(We.length):Ye}).join(`
`)}let me=[],ke=["<ul>"];const Ce=new(Dt()).Renderer,Se=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Me(){me.length=0,ke=["<ul>"]}const ve={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function we(Ne,Ae,Re,We){if(Ae>=Ne.length||Ne[Ae].level<=Re)return Ae;var Ye=Ne[Ae];We.push("<li><a href='#"+De+Ye.anchor+"'>"+Ye.text+"</a>"),Ae++;var Ue=[];return Ae=we(Ne,Ae,Ye.level,Ue),Ue.length>0&&(We.push("<ul>"),Ue.forEach(function(Ke){We.push(Ke)}),We.push("</ul>")),We.push("</li>"),Ae=we(Ne,Ae,Re,We),Ae}function de(){return we(me,0,0,ke),ke.push("</ul>"),ke.join("")}const z={heading(Ne){const Ae=Se.exec(Ne);if(De+=1,Ae)return{type:"heading",raw:Ae[0],depth:Ae[1].length,text:Ae[2]}},fences(Ne){const Ae=this.rules.block.fences.exec(Ne);if(Ae){const Re=Ae[0];let We=fe(Re,Ae[3]||"");const Ye=Ae[2]?Ae[2].trim():Ae[2];if(["latex","katex","math"].indexOf(Ye)>=0){const Ue=ie(),Ke=We;We=Ue,le[Ue]={type:"block",expression:Ke}}return{type:"code",raw:Re,lang:Ye,text:We}}}},ee=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ae=0;const ie=()=>`__special_katext_id_${ae++}__`;let le={};function ue(){return le}function ge(){ae=0,le={}}function Pe(Ne){return Ne=Ne.replace(ee,(Ae,Re)=>{const We=ie();return le[We]={type:"inline",expression:Re},We}),Ne}const je=Ce.listitem;Ce.listitem=function(Ne){return je(Pe(Ne))};const Be=Ce.paragraph;Ce.paragraph=function(Ne){return Be(Pe(Ne))};const Fe=Ce.tablecell;Ce.tablecell=function(Ne,Ae){return Fe(Pe(Ne),Ae)},Ce.code=function(Ne,Ae,Re){const We=(Ae||"").match(/\S*/)[0];return We?["latex","katex","math"].indexOf(We)>=0?`<p class='editormd-tex'>${Ne}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ae}">${Re?Ne:(0,oe.escape)(Ne,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(Re?Ne:(0,oe.escape)(Ne,!0))+"</code></pre>"},Ce.heading=function(Ne,Ae,Re){let We=this.options.headerPrefix+Re.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return me.push({anchor:We,level:Ae,text:Ne}),"<h"+Ae+' id="'+De+We+'">'+Ne+"</h"+Ae+">"},Dt().setOptions({silent:!0,gfm:!0,pedantic:!1}),Dt().use({tokenizer:z,renderer:Ce}),dn.ZP=Dt()},17936:function(mn,dn,st){"use strict";st.d(dn,{G:function(){return De},t:function(){return Ge}});var pt=st(7062),Dt=st.n(pt);const oe=null;function Ge(fe,me){let ke=Dt().get("__ec");ke||(ke={}),ke[fe]=me,Dt().set("__ec",ke)}function De(fe,me){let ke=Dt().get("__ec");return ke?ke[fe]===void 0?me:ke[fe]:me}},47257:function(mn){(function(dn){(function(st){if(1)mn.exports=st();else var pt})(function(){var st,pt,Dt;return function(){function oe(Ge,De,fe){function me(Se,Me){if(!De[Se]){if(!Ge[Se]){var ve=void 0;if(!Me&&ve)return require(Se,!0);if(ke)return ke(Se,!0);var we=new Error("Cannot find module '"+Se+"'");throw we.code="MODULE_NOT_FOUND",we}var de=De[Se]={exports:{}};Ge[Se][0].call(de.exports,function(z){var ee=Ge[Se][1][z];return me(ee||z)},de,de.exports,oe,Ge,De,fe)}return De[Se].exports}for(var ke=void 0,Ce=0;Ce<fe.length;Ce++)me(fe[Ce]);return me}return oe}()({1:[function(oe,Ge,De){"use strict";var fe=oe("./browser/client");fe.Buffer=oe("buffer").Buffer,fe.urllib=oe("../shims/xhr"),fe.version=oe("./browser/version").version,Ge.exports=fe},{"../shims/xhr":475,"./browser/client":3,"./browser/version":6,buffer:90}],2:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.slice.js");var Ce=oe("assert"),Se=oe("../common/utils/checkBucketName"),Me=Se.checkBucketName,ve=De;function we(z){return Array.isArray?Array.isArray(z):Object.prototype.toString.call(z)==="[object Array]"}function de(z){return z?we(z)?z:[z]:[]}ve.useBucket=function(ee){return Me(ee),this.options.bucket=ee,this},ve.setBucket=function(ee){return Me(ee),this.options.bucket=ee,this},ve.getBucket=function(){return this.options.bucket},ve.deleteBucket=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le){var ue,ge;return me.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ue=this._bucketRequestParams("DELETE",ie,"",le),je.next=3,this.request(ue);case 3:if(ge=je.sent,!(ge.status===200||ge.status===204)){je.next=6;break}return je.abrupt("return",{res:ge.res});case 6:return je.next=8,this.requestError(ge);case 8:throw je.sent;case 9:case"end":return je.stop()}},ae,this)}));function ee(ae,ie){return z.apply(this,arguments)}return ee}(),ve.putBucketACL=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le,ue){var ge,Pe;return me.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return ge=this._bucketRequestParams("PUT",ie,"acl",ue),ge.headers={"x-oss-acl":le},ge.successStatuses=[200],Be.next=5,this.request(ge);case 5:return Pe=Be.sent,Be.abrupt("return",{bucket:Pe.headers.location&&Pe.headers.location.substring(1)||null,res:Pe.res});case 7:case"end":return Be.stop()}},ae,this)}));function ee(ae,ie,le){return z.apply(this,arguments)}return ee}(),ve.getBucketACL=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le){var ue,ge;return me.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ue=this._bucketRequestParams("GET",ie,"acl",le),ue.successStatuses=[200],ue.xmlResponse=!0,je.next=5,this.request(ue);case 5:return ge=je.sent,je.abrupt("return",{acl:ge.data.AccessControlList.Grant,owner:{id:ge.data.Owner.ID,displayName:ge.data.Owner.DisplayName},res:ge.res});case 7:case"end":return je.stop()}},ae,this)}));function ee(ae,ie){return z.apply(this,arguments)}return ee}(),ve.putBucketLogging=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le,ue){var ge,Pe,je;return me.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return ge=this._bucketRequestParams("PUT",ie,"logging",ue),Pe=`<?xml version="1.0" encoding="UTF-8"?>
<BucketLoggingStatus>
<LoggingEnabled>
<TargetBucket>`.concat(ie,`</TargetBucket>
`),le&&(Pe+="<TargetPrefix>".concat(le,`</TargetPrefix>
`)),Pe+=`</LoggingEnabled>
</BucketLoggingStatus>`,ge.content=Pe,ge.mime="xml",ge.successStatuses=[200],Fe.next=9,this.request(ge);case 9:return je=Fe.sent,Fe.abrupt("return",{res:je.res});case 11:case"end":return Fe.stop()}},ae,this)}));function ee(ae,ie,le){return z.apply(this,arguments)}return ee}(),ve.getBucketLogging=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le){var ue,ge,Pe;return me.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return ue=this._bucketRequestParams("GET",ie,"logging",le),ue.successStatuses=[200],ue.xmlResponse=!0,Be.next=5,this.request(ue);case 5:return ge=Be.sent,Pe=ge.data.LoggingEnabled,Be.abrupt("return",{enable:!!Pe,prefix:Pe&&Pe.TargetPrefix||null,res:ge.res});case 8:case"end":return Be.stop()}},ae,this)}));function ee(ae,ie){return z.apply(this,arguments)}return ee}(),ve.deleteBucketLogging=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le){var ue,ge;return me.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ue=this._bucketRequestParams("DELETE",ie,"logging",le),ue.successStatuses=[204,200],je.next=4,this.request(ue);case 4:return ge=je.sent,je.abrupt("return",{res:ge.res});case 6:case"end":return je.stop()}},ae,this)}));function ee(ae,ie){return z.apply(this,arguments)}return ee}(),ve.putBucketCORS=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le,ue){var ge,Pe,je,Be,Fe,Ne,Ae,Re,We,Ye;return me.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:for(le=le||[],Ce(le.length,"rules is required"),le.forEach(function(ot){Ce(ot.allowedOrigin,"allowedOrigin is required"),Ce(ot.allowedMethod,"allowedMethod is required")}),ge=this._bucketRequestParams("PUT",ie,"cors",ue),Pe=`<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration>`,je=function(ut){Pe+="<AllowedOrigin>".concat(ut,"</AllowedOrigin>")},Be=function(ut){Pe+="<AllowedMethod>".concat(ut,"</AllowedMethod>")},Fe=function(ut){Pe+="<AllowedHeader>".concat(ut,"</AllowedHeader>")},Ne=function(ut){Pe+="<ExposeHeader>".concat(ut,"</ExposeHeader>")},Ae=0,Re=le.length;Ae<Re;Ae++)We=le[Ae],Pe+="<CORSRule>",de(We.allowedOrigin).forEach(je),de(We.allowedMethod).forEach(Be),de(We.allowedHeader).forEach(Fe),de(We.exposeHeader).forEach(Ne),We.maxAgeSeconds&&(Pe+="<MaxAgeSeconds>".concat(We.maxAgeSeconds,"</MaxAgeSeconds>")),Pe+="</CORSRule>";return Pe+="</CORSConfiguration>",ge.content=Pe,ge.mime="xml",ge.successStatuses=[200],Ke.next=16,this.request(ge);case 16:return Ye=Ke.sent,Ke.abrupt("return",{res:Ye.res});case 18:case"end":return Ke.stop()}},ae,this)}));function ee(ae,ie,le){return z.apply(this,arguments)}return ee}(),ve.getBucketCORS=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le){var ue,ge,Pe,je;return me.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return ue=this._bucketRequestParams("GET",ie,"cors",le),ue.successStatuses=[200],ue.xmlResponse=!0,Fe.next=5,this.request(ue);case 5:return ge=Fe.sent,Pe=[],ge.data&&ge.data.CORSRule&&(je=ge.data.CORSRule,we(je)||(je=[je]),je.forEach(function(Ne){var Ae={};Object.keys(Ne).forEach(function(Re){Ae[Re.slice(0,1).toLowerCase()+Re.slice(1,Re.length)]=Ne[Re]}),Pe.push(Ae)})),Fe.abrupt("return",{rules:Pe,res:ge.res});case 9:case"end":return Fe.stop()}},ae,this)}));function ee(ae,ie){return z.apply(this,arguments)}return ee}(),ve.deleteBucketCORS=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le){var ue,ge;return me.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ue=this._bucketRequestParams("DELETE",ie,"cors",le),ue.successStatuses=[204],je.next=4,this.request(ue);case 4:return ge=je.sent,je.abrupt("return",{res:ge.res});case 6:case"end":return je.stop()}},ae,this)}));function ee(ae,ie){return z.apply(this,arguments)}return ee}(),ve.putBucketReferer=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le,ue,ge){var Pe,je,Be,Fe;return me.default.wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:if(Pe=this._bucketRequestParams("PUT",ie,"referer",ge),je=`<?xml version="1.0" encoding="UTF-8"?>
<RefererConfiguration>
`,je+=" <AllowEmptyReferer>".concat(le?"true":"false",`</AllowEmptyReferer>
`),ue&&ue.length>0){for(je+=` <RefererList>
`,Be=0;Be<ue.length;Be++)je+=" <Referer>".concat(ue[Be],`</Referer>
`);je+=` </RefererList>
`}else je+=` <RefererList />
`;return je+="</RefererConfiguration>",Pe.content=je,Pe.mime="xml",Pe.successStatuses=[200],Ae.next=10,this.request(Pe);case 10:return Fe=Ae.sent,Ae.abrupt("return",{res:Fe.res});case 12:case"end":return Ae.stop()}},ae,this)}));function ee(ae,ie,le,ue){return z.apply(this,arguments)}return ee}(),ve.getBucketReferer=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le){var ue,ge,Pe;return me.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return ue=this._bucketRequestParams("GET",ie,"referer",le),ue.successStatuses=[200],ue.xmlResponse=!0,Be.next=5,this.request(ue);case 5:return ge=Be.sent,Pe=ge.data.RefererList.Referer||null,Pe&&(we(Pe)||(Pe=[Pe])),Be.abrupt("return",{allowEmpty:ge.data.AllowEmptyReferer==="true",referers:Pe,res:ge.res});case 9:case"end":return Be.stop()}},ae,this)}));function ee(ae,ie){return z.apply(this,arguments)}return ee}(),ve.deleteBucketReferer=function(){var z=(0,ke.default)(me.default.mark(function ae(ie,le){return me.default.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:return ge.next=2,this.putBucketReferer(ie,!0,null,le);case 2:return ge.abrupt("return",ge.sent);case 3:case"end":return ge.stop()}},ae,this)}));function ee(ae,ie){return z.apply(this,arguments)}return ee}(),ve._bucketRequestParams=function(ee,ae,ie,le){return{method:ee,bucket:ae,subres:ie,timeout:le&&le.timeout,ctx:le&&le.ctx}}},{"../common/utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,assert:82,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],3:[function(oe,Ge,De){(function(fe,me){(function(){"use strict";var ke=oe("@babel/runtime/helpers/interopRequireDefault"),Ce=ke(oe("@babel/runtime/regenerator")),Se=ke(oe("@babel/runtime/helpers/asyncToGenerator"));oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.split.js"),oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.symbol.js"),oe("core-js/modules/es.symbol.description.js"),oe("core-js/modules/es.array.slice.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.regexp.to-string.js");var Me=oe("debug")("ali-oss"),ve=oe("xml2js"),we=oe("agentkeepalive"),de=oe("merge-descriptors"),z=oe("platform"),ee=oe("utility"),ae=oe("urllib"),ie=oe("./version"),le=oe("bowser"),ue=oe("../common/signUtils"),ge=oe("../common/client/initOptions"),Pe=oe("../common/utils/createRequest"),je=Pe.createRequest,Be=oe("../common/utils/encoder"),Fe=Be.encoder,Ne=oe("../common/client/getReqUrl"),Ae=Ne.getReqUrl,Re=oe("../common/utils/setSTSToken"),We=Re.setSTSToken,Ye=oe("../common/utils/retry"),Ue=Ye.retry,Ke=oe("../common/utils/isFunction"),ot=Ke.isFunction,ut=new we;function ft(){var Ct=z.name,gt=z.version;Ct&&Ct.toLowerCase&&Ct.toLowerCase()==="ie"&&gt.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function wt(){return location&&location.protocol==="https:"}function Je(Ct,gt){if(ft(),!(this instanceof Je))return new Je(Ct,gt);Ct&&Ct.inited?this.options=Ct:this.options=Je.initOptions(Ct),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=ae,this.agent=this.options.agent||ut),this.ctx=gt,this.userAgent=this._getUserAgent(),this.stsTokenFreshTime=new Date,this.options.amendTimeSkewed=0}Ge.exports=Je,Je.initOptions=function(gt){gt.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var dt=Object.assign({secure:wt(),useFetch:!1},gt);return ge(dt)};var nt=Je.prototype;nt.debug=Me,de(nt,oe("./object")),de(nt,oe("./bucket")),de(nt,oe("../common/bucket/getBucketWebsite")),de(nt,oe("../common/bucket/putBucketWebsite")),de(nt,oe("../common/bucket/deleteBucketWebsite")),de(nt,oe("../common/bucket/getBucketLifecycle")),de(nt,oe("../common/bucket/putBucketLifecycle")),de(nt,oe("../common/bucket/deleteBucketLifecycle")),de(nt,oe("../common/bucket/putBucketVersioning")),de(nt,oe("../common/bucket/getBucketVersioning")),de(nt,oe("../common/bucket/getBucketInventory")),de(nt,oe("../common/bucket/deleteBucketInventory")),de(nt,oe("../common/bucket/listBucketInventory")),de(nt,oe("../common/bucket/putBucketInventory")),de(nt,oe("../common/bucket/abortBucketWorm")),de(nt,oe("../common/bucket/completeBucketWorm")),de(nt,oe("../common/bucket/extendBucketWorm")),de(nt,oe("../common/bucket/getBucketWorm")),de(nt,oe("../common/bucket/initiateBucketWorm")),de(nt,oe("./managed-upload")),de(nt,oe("../common/multipart-copy")),de(nt,oe("../common/multipart")),de(nt,oe("../common/parallel")),nt.signature=function(gt){return this.debug("authorization stringToSign: %s",gt,"info"),ue.computeSignature(this.options.accessKeySecret,gt,this.options.headerEncoding)},nt._getReqUrl=Ae,nt.authorization=function(gt,dt,ht,Et){var St=ue.buildCanonicalString(gt.toUpperCase(),dt,{headers:Et,parameters:ht});return ue.authorization(this.options.accessKeyId,this.options.accessKeySecret,St,this.options.headerEncoding)},nt.request=function(){var Ct=(0,Se.default)(Ce.default.mark(function gt(dt){var ht=this;return Ce.default.wrap(function(St){for(;;)switch(St.prev=St.next){case 0:if(!this.options.retryMax){St.next=6;break}return St.next=3,Ue(xt.bind(this),this.options.retryMax,{errorHandler:function(mt){var yt=function(Ve){if(dt.stream)return!1;var xe=[-1,-2].includes(Ve.status),Le=ht.options.requestErrorRetryHandle||function(){return!0};return xe&&Le(Ve)};return!!yt(mt)}})(dt);case 3:return St.abrupt("return",St.sent);case 6:return St.abrupt("return",xt.call(this,dt));case 7:case"end":return St.stop()}},gt,this)}));return function(gt){return Ct.apply(this,arguments)}}();function xt(Ct){return Pt.apply(this,arguments)}function Pt(){return Pt=(0,Se.default)(Ce.default.mark(function Ct(gt){var dt,ht,Et,St,Ft,mt;return Ce.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:if(!(this.options.stsToken&&ot(this.options.refreshSTSToken))){tt.next=3;break}return tt.next=3,We.call(this);case 3:return dt=je.call(this,gt),this.options.useFetch||(dt.params.mode="disable-fetch"),St=!!gt.stream,tt.prev=6,tt.next=9,this.urllib.request(dt.url,dt.params);case 9:ht=tt.sent,this.debug("response %s %s, got %s, headers: %j",gt.method,dt.url,ht.status,ht.headers,"info"),tt.next=16;break;case 13:tt.prev=13,tt.t0=tt.catch(6),Et=tt.t0;case 16:if(!(ht&&gt.successStatuses&&gt.successStatuses.indexOf(ht.status)===-1)){tt.next=28;break}return tt.next=19,this.requestError(ht);case 19:if(Ft=tt.sent,!(Ft.code==="RequestTimeTooSkewed"&&!St)){tt.next=25;break}return this.options.amendTimeSkewed=+new Date(Ft.serverTime)-new Date,tt.next=24,this.request(gt);case 24:return tt.abrupt("return",tt.sent);case 25:Ft.params=gt,tt.next=32;break;case 28:if(!Et){tt.next=32;break}return tt.next=31,this.requestError(Et);case 31:Ft=tt.sent;case 32:if(!Ft){tt.next=34;break}throw Ft;case 34:if(!gt.xmlResponse){tt.next=39;break}return tt.next=37,this.parseXML(ht.data);case 37:mt=tt.sent,ht.data=mt;case 39:return tt.abrupt("return",ht);case 40:case"end":return tt.stop()}},Ct,this,[[6,13]])})),Pt.apply(this,arguments)}nt._getResource=function(gt){var dt="/";return gt.bucket&&(dt+="".concat(gt.bucket,"/")),gt.object&&(dt+=Fe(gt.object,this.options.headerEncoding)),dt},nt._escape=function(gt){return ee.encodeURIComponent(gt).replace(/%2F/g,"/")},nt._getUserAgent=function(){var gt=me&&me.browser?"js":"nodejs",dt="aliyun-sdk-".concat(gt,"/").concat(ie.version),ht=z.description;return!ht&&me&&(ht="Node.js ".concat(me.version.slice(1)," on ").concat(me.platform," ").concat(me.arch)),this._checkUserAgent("".concat(dt," ").concat(ht))},nt._checkUserAgent=function(gt){var dt=gt.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return dt},nt.checkBrowserAndVersion=function(gt,dt){return le.name===gt&&le.version.split(".")[0]===dt},nt.parseXML=function(gt){return new Promise(function(dt,ht){fe.isBuffer(gt)&&(gt=gt.toString()),ve.parseString(gt,{explicitRoot:!1,explicitArray:!1},function(Et,St){Et?ht(Et):dt(St)})})},nt.requestError=function(){var Ct=(0,Se.default)(Ce.default.mark(function dt(ht){var Et,St,Ft,mt;return Ce.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:if(Et=null,!(!ht.data||!ht.data.length)){tt.next=5;break}ht.status===-1||ht.status===-2?(Et=new Error(ht.message),Et.name=ht.name,Et.status=ht.status,Et.code=ht.name):(ht.status===404?(Et=new Error("Object not exists"),Et.name="NoSuchKeyError",Et.status=404,Et.code="NoSuchKey"):ht.status===412?(Et=new Error("Pre condition failed"),Et.name="PreconditionFailedError",Et.status=412,Et.code="PreconditionFailed"):(Et=new Error("Unknow error, status: ".concat(ht.status)),Et.name="UnknownError",Et.status=ht.status),Et.requestId=ht.headers["x-oss-request-id"],Et.host=""),tt.next=32;break;case 5:return St=String(ht.data),this.debug("request response error data: %s",St,"error"),tt.prev=7,tt.next=10,this.parseXML(St);case 10:if(tt.t0=tt.sent,tt.t0){tt.next=13;break}tt.t0={};case 13:Ft=tt.t0,tt.next=23;break;case 16:return tt.prev=16,tt.t1=tt.catch(7),this.debug(St,"error"),tt.t1.message+=`
raw xml: `.concat(St),tt.t1.status=ht.status,tt.t1.requestId=ht.headers["x-oss-request-id"],tt.abrupt("return",tt.t1);case 23:mt=Ft.Message||"unknow request error, status: ".concat(ht.status),Ft.Condition&&(mt+=" (condition: ".concat(Ft.Condition,")")),Et=new Error(mt),Et.name=Ft.Code?"".concat(Ft.Code,"Error"):"UnknownError",Et.status=ht.status,Et.code=Ft.Code,Et.requestId=Ft.RequestId,Et.hostId=Ft.HostId,Et.serverTime=Ft.ServerTime;case 32:return this.debug("generate error %j",Et,"error"),tt.abrupt("return",Et);case 34:case"end":return tt.stop()}},dt,this,[[7,16]])}));function gt(dt){return Ct.apply(this,arguments)}return gt}()}).call(this)}).call(this,{isBuffer:oe("../../node_modules/is-buffer/index.js")},oe("_process"))},{"../../node_modules/is-buffer/index.js":366,"../common/bucket/abortBucketWorm":7,"../common/bucket/completeBucketWorm":8,"../common/bucket/deleteBucketInventory":9,"../common/bucket/deleteBucketLifecycle":10,"../common/bucket/deleteBucketWebsite":11,"../common/bucket/extendBucketWorm":12,"../common/bucket/getBucketInventory":13,"../common/bucket/getBucketLifecycle":14,"../common/bucket/getBucketVersioning":15,"../common/bucket/getBucketWebsite":16,"../common/bucket/getBucketWorm":17,"../common/bucket/initiateBucketWorm":18,"../common/bucket/listBucketInventory":19,"../common/bucket/putBucketInventory":20,"../common/bucket/putBucketLifecycle":21,"../common/bucket/putBucketVersioning":22,"../common/bucket/putBucketWebsite":23,"../common/client/getReqUrl":25,"../common/client/initOptions":26,"../common/multipart":30,"../common/multipart-copy":29,"../common/parallel":49,"../common/signUtils":50,"../common/utils/createRequest":56,"../common/utils/encoder":59,"../common/utils/isFunction":68,"../common/utils/retry":74,"../common/utils/setSTSToken":76,"./bucket":2,"./managed-upload":4,"./object":5,"./version":6,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,agentkeepalive:81,bowser:88,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.split.js":307,"core-js/modules/es.symbol.description.js":310,"core-js/modules/es.symbol.js":313,debug:465,"merge-descriptors":372,platform:379,urllib:475,utility:474,xml2js:426}],4:[function(oe,Ge,De){(function(fe){(function(){"use strict";var me=oe("@babel/runtime/helpers/interopRequireDefault"),ke=me(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.array.from.js"),oe("core-js/modules/es.string.iterator.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.array.filter.js"),oe("core-js/modules/es.array.find.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.regexp.to-string.js"),oe("core-js/modules/es.array.slice.js"),oe("core-js/modules/es.array.iterator.js"),oe("core-js/modules/es.array-buffer.slice.js"),oe("core-js/modules/es.typed-array.uint8-array.js"),oe("core-js/modules/es.typed-array.copy-within.js"),oe("core-js/modules/es.typed-array.every.js"),oe("core-js/modules/es.typed-array.fill.js"),oe("core-js/modules/es.typed-array.filter.js"),oe("core-js/modules/es.typed-array.find.js"),oe("core-js/modules/es.typed-array.find-index.js"),oe("core-js/modules/es.typed-array.for-each.js"),oe("core-js/modules/es.typed-array.includes.js"),oe("core-js/modules/es.typed-array.index-of.js"),oe("core-js/modules/es.typed-array.iterator.js"),oe("core-js/modules/es.typed-array.join.js"),oe("core-js/modules/es.typed-array.last-index-of.js"),oe("core-js/modules/es.typed-array.map.js"),oe("core-js/modules/es.typed-array.reduce.js"),oe("core-js/modules/es.typed-array.reduce-right.js"),oe("core-js/modules/es.typed-array.reverse.js"),oe("core-js/modules/es.typed-array.set.js"),oe("core-js/modules/es.typed-array.slice.js"),oe("core-js/modules/es.typed-array.some.js"),oe("core-js/modules/es.typed-array.sort.js"),oe("core-js/modules/es.typed-array.subarray.js"),oe("core-js/modules/es.typed-array.to-locale-string.js"),oe("core-js/modules/es.typed-array.to-string.js");var Ce=me(oe("@babel/runtime/helpers/asyncToGenerator")),Se=oe("util"),Me=oe("path"),ve=oe("mime"),we=oe("copy-to"),de=oe("../common/utils/isBlob"),z=de.isBlob,ee=oe("../common/utils/isFile"),ae=ee.isFile,ie=oe("../common/utils/isBuffer"),le=ie.isBuffer,ue=De;ue.multipartUpload=function(){var Fe=(0,Ce.default)(ke.default.mark(function Ae(Re,We){var Ye,Ue,Ke,ot,ut,ft,wt,Je,nt,xt=arguments;return ke.default.wrap(function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:if(Ye=xt.length>2&&xt[2]!==void 0?xt[2]:{},this.resetCancelFlag(),Ye.disabledMD5=Ye.disabledMD5===void 0?!0:!!Ye.disabledMD5,!(Ye.checkpoint&&Ye.checkpoint.uploadId)){Ct.next=8;break}return We&&ae(We)&&(Ye.checkpoint.file=We),Ct.next=7,this._resumeMultipart(Ye.checkpoint,Ye);case 7:return Ct.abrupt("return",Ct.sent);case 8:return Ue=102400,Ye.mime||(ae(We)?Ye.mime=ve.getType(Me.extname(We.name)):z(We)?Ye.mime=We.type:le(We)?Ye.mime="":Ye.mime=ve.getType(Me.extname(We))),Ye.headers=Ye.headers||{},this._convertMetaToHeaders(Ye.meta,Ye.headers),Ct.next=14,this._getFileSize(We);case 14:if(Ke=Ct.sent,!(Ke<Ue)){Ct.next=26;break}return Ye.contentLength=Ke,Ct.next=19,this.put(Re,We,Ye);case 19:if(ot=Ct.sent,!(Ye&&Ye.progress)){Ct.next=23;break}return Ct.next=23,Ye.progress(1);case 23:return ut={res:ot.res,bucket:this.options.bucket,name:Re,etag:ot.res.headers.etag},(Ye.headers&&Ye.headers["x-oss-callback"]||Ye.callback)&&(ut.data=ot.data),Ct.abrupt("return",ut);case 26:if(!(Ye.partSize&&parseInt(Ye.partSize,10)!==Ye.partSize)){Ct.next=28;break}throw new Error("partSize must be int number");case 28:if(!(Ye.partSize&&Ye.partSize<Ue)){Ct.next=30;break}throw new Error("partSize must not be smaller than ".concat(Ue));case 30:return Ct.next=32,this.initMultipartUpload(Re,Ye);case 32:if(ft=Ct.sent,wt=ft.uploadId,Je=this._getPartSize(Ke,Ye.partSize),nt={file:We,name:Re,fileSize:Ke,partSize:Je,uploadId:wt,doneParts:[]},!(Ye&&Ye.progress)){Ct.next=39;break}return Ct.next=39,Ye.progress(0,nt,ft.res);case 39:return Ct.next=41,this._resumeMultipart(nt,Ye);case 41:return Ct.abrupt("return",Ct.sent);case 42:case"end":return Ct.stop()}},Ae,this)}));function Ne(Ae,Re){return Fe.apply(this,arguments)}return Ne}(),ue._resumeMultipart=function(){var Fe=(0,Ce.default)(ke.default.mark(function Ae(Re,We){var Ye,Ue,Ke,ot,ut,ft,wt,Je,nt,xt,Pt,Ct,gt,dt,ht,Et,St,Ft,mt;return ke.default.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:if(Ye=this,!this.isCancel()){tt.next=3;break}throw this._makeCancelEvent();case 3:return Ue=Re.file,Ke=Re.fileSize,ot=Re.partSize,ut=Re.uploadId,ft=Re.doneParts,wt=Re.name,Je=[],ft.length>0&&we(ft).to(Je),nt=this._divideParts(Ke,ot),xt=nt.length,Pt=!1,Ct=function(xe,Le){return new Promise(function(){var Xe=(0,Ce.default)(ke.default.mark(function rt(Ie,_e){var He,Qe,ct,at,At;return ke.default.wrap(function(It){for(;;)switch(It.prev=It.next){case 0:if(It.prev=0,xe.isCancel()){It.next=29;break}return He=nt[Le-1],It.next=5,xe._createBuffer(Ue,He.start,He.end);case 5:return Qe=It.sent,ct={content:Qe,size:He.end-He.start},It.prev=7,It.next=10,xe._uploadPart(wt,ut,Le,ct,We);case 10:at=It.sent,It.next=18;break;case 13:if(It.prev=13,It.t0=It.catch(7),It.t0.status!==404){It.next=17;break}throw xe._makeAbortEvent();case 17:throw It.t0;case 18:if(!(!xe.isCancel()&&!Pt)){It.next=26;break}if(Re.doneParts.push({number:Le,etag:at.res.headers.etag}),!We.progress){It.next=23;break}return It.next=23,We.progress(ft.length/(xt+1),Re,at.res);case 23:Ie({number:Le,etag:at.res.headers.etag}),It.next=27;break;case 26:Ie();case 27:It.next=30;break;case 29:Ie();case 30:It.next=41;break;case 32:It.prev=32,It.t1=It.catch(0),At=new Error,At.name=It.t1.name,At.message=It.t1.message,At.stack=It.t1.stack,At.partNum=Le,we(It.t1).to(At),_e(At);case 41:case"end":return It.stop()}},rt,null,[[0,32],[7,13]])}));return function(rt,Ie){return Xe.apply(this,arguments)}}())},gt=Array.from(new Array(xt),function(Ve,xe){return xe+1}),dt=Je.map(function(Ve){return Ve.number}),ht=gt.filter(function(Ve){return dt.indexOf(Ve)<0}),Et=5,St=We.parallel||Et,tt.next=17,this._parallel(ht,St,function(Ve){return new Promise(function(xe,Le){Ct(Ye,Ve).then(function(Xe){Xe&&Je.push(Xe),xe()}).catch(function(Xe){Le(Xe)})})});case 17:if(Ft=tt.sent,Pt=!0,mt=Ft.find(function(Ve){return Ve.name==="abort"}),!mt){tt.next=22;break}throw mt;case 22:if(!this.isCancel()){tt.next=25;break}throw Ct=null,this._makeCancelEvent();case 25:if(!(Ft&&Ft.length>0)){tt.next=28;break}throw Ft[0].message="Failed to upload some parts with error: ".concat(Ft[0].toString()," part_num: ").concat(Ft[0].partNum),Ft[0];case 28:return tt.next=30,this.completeMultipartUpload(wt,ut,Je,We);case 30:return tt.abrupt("return",tt.sent);case 31:case"end":return tt.stop()}},Ae,this)}));function Ne(Ae,Re){return Fe.apply(this,arguments)}return Ne}(),ue._getFileSize=function(){var Fe=(0,Ce.default)(ke.default.mark(function Ae(Re){return ke.default.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:if(!le(Re)){Ye.next=4;break}return Ye.abrupt("return",Re.length);case 4:if(!(z(Re)||ae(Re))){Ye.next=6;break}return Ye.abrupt("return",Re.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return Ye.stop()}},Ae)}));function Ne(Ae){return Fe.apply(this,arguments)}return Ne}();var ge=oe("stream"),Pe=ge.Readable;function je(Fe,Ne){if(!(this instanceof je))return new je(Fe,Ne);Pe.call(this,Ne),this.file=Fe,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}Se.inherits(je,Pe),je.prototype.readFileAndPush=function(Ne){if(this.fileBuffer)for(var Ae=!0;Ae&&this.fileBuffer&&this.start<this.fileBuffer.length;){var Re=this.start,We=Re+Ne;We=We>this.fileBuffer.length?this.fileBuffer.length:We,this.start=We,Ae=this.push(this.fileBuffer.slice(Re,We))}},je.prototype._read=function(Ne){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var Ae=16*1024;Ne=Ne||Ae;var Re=this;this.reader.onload=function(Ye){Re.fileBuffer=fe.from(new Uint8Array(Ye.target.result)),Re.file=null,Re.readFileAndPush(Ne)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(Ne)};function Be(Fe){return Fe.arrayBuffer?Fe.arrayBuffer():new Promise(function(Ne,Ae){var Re=new FileReader;Re.onload=function(We){Ne(We.target.result)},Re.onerror=function(We){Ae(We)},Re.readAsArrayBuffer(Fe)})}ue._createBuffer=function(){var Fe=(0,Ce.default)(ke.default.mark(function Ae(Re,We,Ye){var Ue,Ke;return ke.default.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:if(!(z(Re)||ae(Re))){ut.next=8;break}return Ue=Re.slice(We,Ye),ut.next=4,Be(Ue);case 4:return Ke=ut.sent,ut.abrupt("return",fe.from(Ke));case 8:if(!le(Re)){ut.next=12;break}return ut.abrupt("return",Re.subarray(We,Ye));case 12:throw new Error("_createBuffer requires File/Blob/Buffer.");case 13:case"end":return ut.stop()}},Ae)}));function Ne(Ae,Re,We){return Fe.apply(this,arguments)}return Ne}(),ue._getPartSize=function(Ne,Ae){var Re=1e4,We=1*1024*1024;Ae||(Ae=We);var Ye=Math.ceil(Ne/Re);return Ae<Ye&&(Ae=Ye,console.warn("partSize has been set to ".concat(Ae,", because the partSize you provided causes partNumber to be greater than 10,000"))),Ae},ue._divideParts=function(Ne,Ae){for(var Re=Math.ceil(Ne/Ae),We=[],Ye=0;Ye<Re;Ye++){var Ue=Ae*Ye,Ke=Math.min(Ue+Ae,Ne);We.push({start:Ue,end:Ke})}return We}}).call(this)}).call(this,oe("buffer").Buffer)},{"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,buffer:90,"copy-to":94,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.map.js":280,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.iterator.js":303,"core-js/modules/es.typed-array.copy-within.js":315,"core-js/modules/es.typed-array.every.js":316,"core-js/modules/es.typed-array.fill.js":317,"core-js/modules/es.typed-array.filter.js":318,"core-js/modules/es.typed-array.find-index.js":319,"core-js/modules/es.typed-array.find.js":320,"core-js/modules/es.typed-array.for-each.js":321,"core-js/modules/es.typed-array.includes.js":322,"core-js/modules/es.typed-array.index-of.js":323,"core-js/modules/es.typed-array.iterator.js":324,"core-js/modules/es.typed-array.join.js":325,"core-js/modules/es.typed-array.last-index-of.js":326,"core-js/modules/es.typed-array.map.js":327,"core-js/modules/es.typed-array.reduce-right.js":328,"core-js/modules/es.typed-array.reduce.js":329,"core-js/modules/es.typed-array.reverse.js":330,"core-js/modules/es.typed-array.set.js":331,"core-js/modules/es.typed-array.slice.js":332,"core-js/modules/es.typed-array.some.js":333,"core-js/modules/es.typed-array.sort.js":334,"core-js/modules/es.typed-array.subarray.js":335,"core-js/modules/es.typed-array.to-locale-string.js":336,"core-js/modules/es.typed-array.to-string.js":337,"core-js/modules/es.typed-array.uint8-array.js":338,mime:374,path:378,stream:398,util:419}],5:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault");oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.regexp.to-string.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.number.constructor.js"),oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.promise.js");var me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("fs"),Se=oe("copy-to"),Me=oe("path"),ve=oe("mime"),we=oe("../common/callback"),de=oe("merge-descriptors"),z=oe("../common/utils/isBlob"),ee=z.isBlob,ae=oe("../common/utils/isFile"),ie=ae.isFile,le=oe("../common/utils/isBuffer"),ue=le.isBuffer,ge=oe("../common/utils/obj2xml"),Pe=ge.obj2xml,je=De;je.append=function(){var Be=(0,ke.default)(me.default.mark(function Ne(Ae,Re,We){var Ye;return me.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return We=We||{},We.position===void 0&&(We.position="0"),We.subres={append:"",position:We.position},We.method="POST",Ke.next=6,this.put(Ae,Re,We);case 6:return Ye=Ke.sent,Ye.nextAppendPosition=Ye.res.headers["x-oss-next-append-position"],Ke.abrupt("return",Ye);case 9:case"end":return Ke.stop()}},Ne,this)}));function Fe(Ne,Ae,Re){return Be.apply(this,arguments)}return Fe}(),je.put=function(){var Be=(0,ke.default)(me.default.mark(function Ne(Ae,Re,We){var Ye,Ue,Ke,ot,ut;return me.default.wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:if(We=We||{},We.disabledMD5=We.disabledMD5===void 0?!0:!!We.disabledMD5,We.headers=We.headers||{},Ae=this._objectName(Ae),!ue(Re)){wt.next=8;break}Ye=Re,wt.next=19;break;case 8:if(!(ee(Re)||ie(Re))){wt.next=18;break}return We.mime||(ie(Re)?We.mime=ve.getType(Me.extname(Re.name)):We.mime=Re.type),wt.next=12,this._createBuffer(Re,0,Re.size);case 12:return Ye=wt.sent,wt.next=15,this._getFileSize(Re);case 15:We.contentLength=wt.sent,wt.next=19;break;case 18:throw new TypeError("Must provide Buffer/Blob/File for put.");case 19:return this._convertMetaToHeaders(We.meta,We.headers),Ue=We.method||"PUT",Ke=this._objectRequestParams(Ue,Ae,We),we.encodeCallback(Ke,We),Ke.mime=We.mime,Ke.disabledMD5=We.disabledMD5,Ke.content=Ye,Ke.successStatuses=[200],wt.next=29,this.request(Ke);case 29:return ot=wt.sent,ut={name:Ae,url:this._objectUrl(Ae),res:ot.res},Ke.headers&&Ke.headers["x-oss-callback"]&&(ut.data=JSON.parse(ot.data.toString())),wt.abrupt("return",ut);case 33:case"end":return wt.stop()}},Ne,this)}));function Fe(Ne,Ae,Re){return Be.apply(this,arguments)}return Fe}(),je.putStream=function(){var Be=(0,ke.default)(me.default.mark(function Ne(Ae,Re,We){var Ye,Ue,Ke,ot;return me.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:return We=We||{},We.headers=We.headers||{},Ae=this._objectName(Ae),We.contentLength?We.headers["Content-Length"]=We.contentLength:We.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(We.meta,We.headers),Ye=We.method||"PUT",Ue=this._objectRequestParams(Ye,Ae,We),we.encodeCallback(Ue,We),Ue.mime=We.mime,Ue.stream=Re,Ue.successStatuses=[200],ft.next=13,this.request(Ue);case 13:return Ke=ft.sent,ot={name:Ae,url:this._objectUrl(Ae),res:Ke.res},Ue.headers&&Ue.headers["x-oss-callback"]&&(ot.data=JSON.parse(Ke.data.toString())),ft.abrupt("return",ot);case 17:case"end":return ft.stop()}},Ne,this)}));function Fe(Ne,Ae,Re){return Be.apply(this,arguments)}return Fe}(),de(je,oe("../common/object/copyObject")),de(je,oe("../common/object/getObjectTagging")),de(je,oe("../common/object/putObjectTagging")),de(je,oe("../common/object/deleteObjectTagging")),de(je,oe("../common/image")),de(je,oe("../common/object/getBucketVersions")),de(je,oe("../common/object/getACL")),de(je,oe("../common/object/putACL")),de(je,oe("../common/object/head")),de(je,oe("../common/object/delete")),de(je,oe("../common/object/get")),de(je,oe("../common/object/putSymlink")),de(je,oe("../common/object/getSymlink")),de(je,oe("../common/object/deleteMulti")),de(je,oe("../common/object/getObjectMeta")),de(je,oe("../common/object/getObjectUrl")),de(je,oe("../common/object/generateObjectUrl")),de(je,oe("../common/object/signatureUrl")),de(je,oe("../common/object/asyncSignatureUrl")),je.putMeta=function(){var Be=(0,ke.default)(me.default.mark(function Ne(Ae,Re,We){var Ye;return me.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ke.next=2,this.copy(Ae,Ae,{meta:Re||{},timeout:We&&We.timeout,ctx:We&&We.ctx});case 2:return Ye=Ke.sent,Ke.abrupt("return",Ye);case 4:case"end":return Ke.stop()}},Ne,this)}));function Fe(Ne,Ae,Re){return Be.apply(this,arguments)}return Fe}(),je.list=function(){var Be=(0,ke.default)(me.default.mark(function Ne(Ae,Re){var We,Ye,Ue,Ke,ot;return me.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:return We=this._objectRequestParams("GET","",Re),We.query=Ae,We.xmlResponse=!0,We.successStatuses=[200],ft.next=6,this.request(We);case 6:return Ye=ft.sent,Ue=Ye.data.Contents||[],Ke=this,Ue&&(Array.isArray(Ue)||(Ue=[Ue]),Ue=Ue.map(function(wt){return{name:wt.Key,url:Ke._objectUrl(wt.Key),lastModified:wt.LastModified,etag:wt.ETag,type:wt.Type,size:Number(wt.Size),storageClass:wt.StorageClass,owner:{id:wt.Owner.ID,displayName:wt.Owner.DisplayName}}})),ot=Ye.data.CommonPrefixes||null,ot&&(Array.isArray(ot)||(ot=[ot]),ot=ot.map(function(wt){return wt.Prefix})),ft.abrupt("return",{res:Ye.res,objects:Ue,prefixes:ot,nextMarker:Ye.data.NextMarker||null,isTruncated:Ye.data.IsTruncated==="true"});case 13:case"end":return ft.stop()}},Ne,this)}));function Fe(Ne,Ae){return Be.apply(this,arguments)}return Fe}(),je.listV2=function(){var Be=(0,ke.default)(me.default.mark(function Ne(Ae){var Re,We,Ye,Ue,Ke,ot,ut,ft=arguments;return me.default.wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:return Re=ft.length>1&&ft[1]!==void 0?ft[1]:{},We=Ae["continuation-token"]||Ae.continuationToken,We&&(Re.subres=Object.assign({"continuation-token":We},Re.subres)),Ye=this._objectRequestParams("GET","",Re),Ye.query=Object.assign({"list-type":2},Ae),delete Ye.query["continuation-token"],delete Ye.query.continuationToken,Ye.xmlResponse=!0,Ye.successStatuses=[200],Je.next=11,this.request(Ye);case 11:return Ue=Je.sent,Ke=Ue.data.Contents||[],ot=this,Ke&&(Array.isArray(Ke)||(Ke=[Ke]),Ke=Ke.map(function(nt){var xt=null;return nt.Owner&&(xt={id:nt.Owner.ID,displayName:nt.Owner.DisplayName}),{name:nt.Key,url:ot._objectUrl(nt.Key),lastModified:nt.LastModified,etag:nt.ETag,type:nt.Type,size:Number(nt.Size),storageClass:nt.StorageClass,owner:xt}})),ut=Ue.data.CommonPrefixes||null,ut&&(Array.isArray(ut)||(ut=[ut]),ut=ut.map(function(nt){return nt.Prefix})),Je.abrupt("return",{res:Ue.res,objects:Ke,prefixes:ut,isTruncated:Ue.data.IsTruncated==="true",keyCount:+Ue.data.KeyCount,continuationToken:Ue.data.ContinuationToken||null,nextContinuationToken:Ue.data.NextContinuationToken||null});case 18:case"end":return Je.stop()}},Ne,this)}));function Fe(Ne){return Be.apply(this,arguments)}return Fe}(),je.restore=function(){var Be=(0,ke.default)(me.default.mark(function Ne(Ae){var Re,We,Ye,Ue,Ke=arguments;return me.default.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:return Re=Ke.length>1&&Ke[1]!==void 0?Ke[1]:{type:"Archive"},Re=Re||{},Re.subres=Object.assign({restore:""},Re.subres),Re.versionId&&(Re.subres.versionId=Re.versionId),We=this._objectRequestParams("POST",Ae,Re),Re.type==="ColdArchive"&&(Ye={RestoreRequest:{Days:Re.Days?Re.Days:2,JobParameters:{Tier:Re.JobParameters?Re.JobParameters:"Standard"}}},We.content=Pe(Ye,{headers:!0}),We.mime="xml"),We.successStatuses=[202],ut.next=9,this.request(We);case 9:return Ue=ut.sent,ut.abrupt("return",{res:Ue.res});case 11:case"end":return ut.stop()}},Ne,this)}));function Fe(Ne){return Be.apply(this,arguments)}return Fe}(),je._objectUrl=function(Fe){return this._getReqUrl({bucket:this.options.bucket,object:Fe})},je._objectRequestParams=function(Fe,Ne,Ae){if(!this.options.bucket&&!this.options.cname)throw new Error("Please create a bucket first");Ae=Ae||{},Ne=this._objectName(Ne);var Re={object:Ne,bucket:this.options.bucket,method:Fe,subres:Ae&&Ae.subres,timeout:Ae&&Ae.timeout,ctx:Ae&&Ae.ctx};return Ae.headers&&(Re.headers={},Se(Ae.headers).to(Re.headers)),Re},je._objectName=function(Fe){return Fe.replace(/^\/+/,"")},je._convertMetaToHeaders=function(Fe,Ne){Fe&&Object.keys(Fe).forEach(function(Ae){Ne["x-oss-meta-".concat(Ae)]=Fe[Ae]})},je._deleteFileSafe=function(Fe){var Ne=this;return new Promise(function(Ae){Ce.exists(Fe,function(Re){Re?Ce.unlink(Fe,function(We){We&&Ne.debug("unlink %j error: %s",Fe,We,"error"),Ae()}):Ae()})})}},{"../common/callback":24,"../common/image":27,"../common/object/asyncSignatureUrl":31,"../common/object/copyObject":32,"../common/object/delete":33,"../common/object/deleteMulti":34,"../common/object/deleteObjectTagging":35,"../common/object/generateObjectUrl":36,"../common/object/get":37,"../common/object/getACL":38,"../common/object/getBucketVersions":39,"../common/object/getObjectMeta":40,"../common/object/getObjectTagging":41,"../common/object/getObjectUrl":42,"../common/object/getSymlink":43,"../common/object/head":44,"../common/object/putACL":45,"../common/object/putObjectTagging":46,"../common/object/putSymlink":47,"../common/object/signatureUrl":48,"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"../common/utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,fs:89,"merge-descriptors":372,mime:374,path:378}],6:[function(oe,Ge,De){"use strict";De.version="6.18.1"},{}],7:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.abortBucketWorm=void 0;var Ce=oe("../utils/checkBucketName");function Se(ve,we){return Me.apply(this,arguments)}function Me(){return Me=(0,ke.default)(me.default.mark(function ve(we,de){var z,ee;return me.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return Ce.checkBucketName(we),z=this._bucketRequestParams("DELETE",we,"worm",de),ie.next=4,this.request(z);case 4:return ee=ie.sent,ie.abrupt("return",{res:ee.res,status:ee.status});case 6:case"end":return ie.stop()}},ve,this)})),Me.apply(this,arguments)}De.abortBucketWorm=Se},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],8:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.completeBucketWorm=void 0;var Ce=oe("../utils/checkBucketName");function Se(ve,we,de){return Me.apply(this,arguments)}function Me(){return Me=(0,ke.default)(me.default.mark(function ve(we,de,z){var ee,ae;return me.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return Ce.checkBucketName(we),ee=this._bucketRequestParams("POST",we,{wormId:de},z),le.next=4,this.request(ee);case 4:return ae=le.sent,le.abrupt("return",{res:ae.res,status:ae.status});case 6:case"end":return le.stop()}},ve,this)})),Me.apply(this,arguments)}De.completeBucketWorm=Se},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],9:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.deleteBucketInventory=void 0;var Ce=oe("../utils/checkBucketName");function Se(ve,we){return Me.apply(this,arguments)}function Me(){return Me=(0,ke.default)(me.default.mark(function ve(we,de){var z,ee,ae,ie,le=arguments;return me.default.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:return z=le.length>2&&le[2]!==void 0?le[2]:{},ee=Object.assign({inventory:"",inventoryId:de},z.subres),Ce.checkBucketName(we),ae=this._bucketRequestParams("DELETE",we,ee,z),ae.successStatuses=[204],ge.next=7,this.request(ae);case 7:return ie=ge.sent,ge.abrupt("return",{status:ie.status,res:ie.res});case 9:case"end":return ge.stop()}},ve,this)})),Me.apply(this,arguments)}De.deleteBucketInventory=Se},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],10:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Me=De;Me.deleteBucketLifecycle=function(){var ve=(0,ke.default)(me.default.mark(function de(z,ee){var ae,ie;return me.default.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return Se(z),ae=this._bucketRequestParams("DELETE",z,"lifecycle",ee),ae.successStatuses=[204],ue.next=5,this.request(ae);case 5:return ie=ue.sent,ue.abrupt("return",{res:ie.res});case 7:case"end":return ue.stop()}},de,this)}));function we(de,z){return ve.apply(this,arguments)}return we}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],11:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Me=De;Me.deleteBucketWebsite=function(){var ve=(0,ke.default)(me.default.mark(function de(z,ee){var ae,ie;return me.default.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return Se(z),ae=this._bucketRequestParams("DELETE",z,"website",ee),ae.successStatuses=[204],ue.next=5,this.request(ae);case 5:return ie=ue.sent,ue.abrupt("return",{res:ie.res});case 7:case"end":return ue.stop()}},de,this)}));function we(de,z){return ve.apply(this,arguments)}return we}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],12:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.extendBucketWorm=void 0;var Ce=oe("../utils/checkBucketName"),Se=oe("../utils/obj2xml");function Me(we,de,z,ee){return ve.apply(this,arguments)}function ve(){return ve=(0,ke.default)(me.default.mark(function we(de,z,ee,ae){var ie,le,ue;return me.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return Ce.checkBucketName(de),ie=this._bucketRequestParams("POST",de,{wormExtend:"",wormId:z},ae),le={ExtendWormConfiguration:{RetentionPeriodInDays:ee}},ie.mime="xml",ie.content=Se.obj2xml(le,{headers:!0}),ie.successStatuses=[200],Pe.next=8,this.request(ie);case 8:return ue=Pe.sent,Pe.abrupt("return",{res:ue.res,status:ue.status});case 10:case"end":return Pe.stop()}},we,this)})),ve.apply(this,arguments)}De.extendBucketWorm=Me},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],13:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.getBucketInventory=void 0;var Ce=oe("../utils/checkBucketName"),Se=oe("../utils/formatInventoryConfig");function Me(we,de){return ve.apply(this,arguments)}function ve(){return ve=(0,ke.default)(me.default.mark(function we(de,z){var ee,ae,ie,le,ue=arguments;return me.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return ee=ue.length>2&&ue[2]!==void 0?ue[2]:{},ae=Object.assign({inventory:"",inventoryId:z},ee.subres),Ce.checkBucketName(de),ie=this._bucketRequestParams("GET",de,ae,ee),ie.successStatuses=[200],ie.xmlResponse=!0,Pe.next=8,this.request(ie);case 8:return le=Pe.sent,Pe.abrupt("return",{status:le.status,res:le.res,inventory:Se.formatInventoryConfig(le.data)});case 10:case"end":return Pe.stop()}},we,this)})),ve.apply(this,arguments)}De.getBucketInventory=Me},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],14:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.map.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Me=oe("../utils/isArray"),ve=Me.isArray,we=oe("../utils/formatObjKey"),de=we.formatObjKey,z=De;z.getBucketLifecycle=function(){var ee=(0,ke.default)(me.default.mark(function ie(le,ue){var ge,Pe,je;return me.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return Se(le),ge=this._bucketRequestParams("GET",le,"lifecycle",ue),ge.successStatuses=[200],ge.xmlResponse=!0,Fe.next=6,this.request(ge);case 6:return Pe=Fe.sent,je=Pe.data.Rule||null,je&&(ve(je)||(je=[je]),je=je.map(function(Ne){return Ne.ID&&(Ne.id=Ne.ID,delete Ne.ID),Ne.Tag&&!ve(Ne.Tag)&&(Ne.Tag=[Ne.Tag]),de(Ne,"firstLowerCase")})),Fe.abrupt("return",{rules:je,res:Pe.res});case 10:case"end":return Fe.stop()}},ie,this)}));function ae(ie,le){return ee.apply(this,arguments)}return ae}()},{"../utils/checkBucketName":51,"../utils/formatObjKey":61,"../utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280}],15:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Me=De;Me.getBucketVersioning=function(){var ve=(0,ke.default)(me.default.mark(function de(z,ee){var ae,ie,le;return me.default.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:return Se(z),ae=this._bucketRequestParams("GET",z,"versioning",ee),ae.xmlResponse=!0,ae.successStatuses=[200],ge.next=6,this.request(ae);case 6:return ie=ge.sent,le=ie.data.Status,ge.abrupt("return",{status:ie.status,versionStatus:le,res:ie.res});case 9:case"end":return ge.stop()}},de,this)}));function we(de,z){return ve.apply(this,arguments)}return we}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],16:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Me=oe("../utils/isObject"),ve=Me.isObject,we=De;we.getBucketWebsite=function(){var de=(0,ke.default)(me.default.mark(function ee(ae,ie){var le,ue,ge;return me.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return Se(ae),le=this._bucketRequestParams("GET",ae,"website",ie),le.successStatuses=[200],le.xmlResponse=!0,je.next=6,this.request(le);case 6:return ue=je.sent,ge=[],ue.data.RoutingRules&&ue.data.RoutingRules.RoutingRule&&(ve(ue.data.RoutingRules.RoutingRule)?ge=[ue.data.RoutingRules.RoutingRule]:ge=ue.data.RoutingRules.RoutingRule),je.abrupt("return",{index:ue.data.IndexDocument&&ue.data.IndexDocument.Suffix||"",supportSubDir:ue.data.IndexDocument&&ue.data.IndexDocument.SupportSubDir||"false",type:ue.data.IndexDocument&&ue.data.IndexDocument.Type,routingRules:ge,error:ue.data.ErrorDocument&&ue.data.ErrorDocument.Key||null,res:ue.res});case 10:case"end":return je.stop()}},ee,this)}));function z(ee,ae){return de.apply(this,arguments)}return z}()},{"../utils/checkBucketName":51,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],17:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.getBucketWorm=void 0;var Ce=oe("../utils/checkBucketName"),Se=oe("../utils/dataFix");function Me(we,de){return ve.apply(this,arguments)}function ve(){return ve=(0,ke.default)(me.default.mark(function we(de,z){var ee,ae;return me.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return Ce.checkBucketName(de),ee=this._bucketRequestParams("GET",de,"worm",z),ee.successStatuses=[200],ee.xmlResponse=!0,le.next=6,this.request(ee);case 6:return ae=le.sent,Se.dataFix(ae.data,{lowerFirst:!0,rename:{RetentionPeriodInDays:"days"}}),le.abrupt("return",Object.assign(Object.assign({},ae.data),{res:ae.res,status:ae.status}));case 9:case"end":return le.stop()}},we,this)})),ve.apply(this,arguments)}De.getBucketWorm=Me},{"../utils/checkBucketName":51,"../utils/dataFix":57,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],18:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.initiateBucketWorm=void 0;var Ce=oe("../utils/obj2xml"),Se=oe("../utils/checkBucketName");function Me(we,de,z){return ve.apply(this,arguments)}function ve(){return ve=(0,ke.default)(me.default.mark(function we(de,z,ee){var ae,ie,le;return me.default.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:return Se.checkBucketName(de),ae=this._bucketRequestParams("POST",de,"worm",ee),ie={InitiateWormConfiguration:{RetentionPeriodInDays:z}},ae.mime="xml",ae.content=Ce.obj2xml(ie,{headers:!0}),ae.successStatuses=[200],ge.next=8,this.request(ae);case 8:return le=ge.sent,ge.abrupt("return",{res:le.res,wormId:le.res.headers["x-oss-worm-id"],status:le.status});case 10:case"end":return ge.stop()}},we,this)})),ve.apply(this,arguments)}De.initiateBucketWorm=Me},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],19:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.listBucketInventory=void 0;var Ce=oe("../utils/checkBucketName"),Se=oe("../utils/formatInventoryConfig");function Me(we){return ve.apply(this,arguments)}function ve(){return ve=(0,ke.default)(me.default.mark(function we(de){var z,ee,ae,ie,le,ue,ge,Pe,je=arguments;return me.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return z=je.length>1&&je[1]!==void 0?je[1]:{},ee=z.continuationToken,ae=Object.assign({inventory:""},ee&&{"continuation-token":ee},z.subres),Ce.checkBucketName(de),ie=this._bucketRequestParams("GET",de,ae,z),ie.successStatuses=[200],ie.xmlResponse=!0,Fe.next=9,this.request(ie);case 9:return le=Fe.sent,ue=le.data,ge=le.res,Pe=le.status,Fe.abrupt("return",{isTruncated:ue.IsTruncated==="true",nextContinuationToken:ue.NextContinuationToken,inventoryList:Se.formatInventoryConfig(ue.InventoryConfiguration,!0),status:Pe,res:ge});case 12:case"end":return Fe.stop()}},we,this)})),ve.apply(this,arguments)}De.listBucketInventory=Me},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],20:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.array.concat.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.putBucketInventory=void 0;var Ce=oe("../utils/checkBucketName"),Se=oe("../utils/obj2xml");function Me(we,de){return ve.apply(this,arguments)}function ve(){return ve=(0,ke.default)(me.default.mark(function we(de,z){var ee,ae,ie,le,ue,ge,Pe,je,Be,Fe,Ne,Ae=arguments;return me.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:return ee=Ae.length>2&&Ae[2]!==void 0?Ae[2]:{},ae=Object.assign({inventory:"",inventoryId:z.id},ee.subres),Ce.checkBucketName(de),ie=z.OSSBucketDestination,le=z.optionalFields,ue=z.includedObjectVersions,ge="acs:oss:::",Pe="acs:ram::".concat(ie.accountId,":role/"),je={InventoryConfiguration:{Id:z.id,IsEnabled:z.isEnabled,Filter:{Prefix:z.prefix||""},Destination:{OSSBucketDestination:{Format:ie.format,AccountId:ie.accountId,RoleArn:"".concat(Pe).concat(ie.rolename),Bucket:"".concat(ge).concat(ie.bucket),Prefix:ie.prefix||"",Encryption:ie.encryption||""}},Schedule:{Frequency:z.frequency},IncludedObjectVersions:ue,OptionalFields:{Field:(le==null?void 0:le.field)||[]}}},Be=Se.obj2xml(je,{headers:!0,firstUpperCase:!0}),Fe=this._bucketRequestParams("PUT",de,ae,ee),Fe.successStatuses=[200],Fe.mime="xml",Fe.content=Be,We.next=14,this.request(Fe);case 14:return Ne=We.sent,We.abrupt("return",{status:Ne.status,res:Ne.res});case 16:case"end":return We.stop()}},we,this)})),ve.apply(this,arguments)}De.putBucketInventory=Me},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287}],21:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.array.includes.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Me=oe("../utils/isArray"),ve=Me.isArray,we=oe("../utils/deepCopy"),de=we.deepCopy,z=oe("../utils/isObject"),ee=z.isObject,ae=oe("../utils/obj2xml"),ie=ae.obj2xml,le=oe("../utils/checkObjectTag"),ue=le.checkObjectTag,ge=oe("../utils/getStrBytesCount"),Pe=ge.getStrBytesCount,je=De;je.putBucketLifecycle=function(){var Re=(0,ke.default)(me.default.mark(function Ye(Ue,Ke,ot){var ut,ft,wt,Je,nt;return me.default.wrap(function(Pt){for(;;)switch(Pt.prev=Pt.next){case 0:if(Se(Ue),ve(Ke)){Pt.next=3;break}throw new Error("rules must be Array");case 3:return ut=this._bucketRequestParams("PUT",Ue,"lifecycle",ot),ft=[],wt={LifecycleConfiguration:{Rule:ft}},Ke.forEach(function(Ct){Be(Ct),Ae(Ct),Ct.id&&(Ct.ID=Ct.id,delete Ct.id),ft.push(Ct)}),Je=ie(wt,{headers:!0,firstUpperCase:!0}),ut.content=Je,ut.mime="xml",ut.successStatuses=[200],Pt.next=13,this.request(ut);case 13:return nt=Pt.sent,Pt.abrupt("return",{res:nt.res});case 15:case"end":return Pt.stop()}},Ye,this)}));function We(Ye,Ue,Ke){return Re.apply(this,arguments)}return We}();function Be(Re){Re.days&&(Re.expiration={days:Re.days}),Re.date&&(Re.expiration={createdBeforeDate:Re.date})}function Fe(Re,We){var Ye=Re.days,Ue=Re.createdBeforeDate;if(!Ye&&!Ue)throw new Error("".concat(We," must includes days or createdBeforeDate"));if(Ye&&!/^[1-9][0-9]*$/.test(Ye))throw new Error("days must be a positive integer");if(Ue&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(Ue))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function Ne(Re){if(!ve(Re)&&!ee(Re))throw new Error("tag must be Object or Array");Re=ee(Re)?[Re]:Re;var We={},Ye=de(Re);Ye.forEach(function(Ue){We[Ue.key]=Ue.value}),ue(We)}function Ae(Re){if(Re.id&&Pe(Re.id)>255)throw new Error("ID is composed of 255 bytes at most");if(Re.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(Re.status))throw new Error("Status must be Enabled or Disabled");if(Re.transition){if(!["IA","Archive"].includes(Re.transition.storageClass))throw new Error("StorageClass must be IA or Archive");Fe(Re.transition,"Transition")}if(Re.expiration){if(!Re.expiration.expiredObjectDeleteMarker)Fe(Re.expiration,"Expiration");else if(Re.expiration.days||Re.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(Re.abortMultipartUpload&&Fe(Re.abortMultipartUpload,"AbortMultipartUpload"),!Re.expiration&&!Re.abortMultipartUpload&&!Re.transition&&!Re.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(Re.tag){if(Re.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");Ne(Re.tag)}}},{"../utils/checkBucketName":51,"../utils/checkObjectTag":54,"../utils/deepCopy":58,"../utils/getStrBytesCount":62,"../utils/isArray":63,"../utils/isObject":70,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/web.dom-collections.for-each.js":339}],22:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.includes.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Me=oe("../utils/obj2xml"),ve=Me.obj2xml,we=De;we.putBucketVersioning=function(){var de=(0,ke.default)(me.default.mark(function ee(ae,ie){var le,ue,ge,Pe,je=arguments;return me.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:if(le=je.length>2&&je[2]!==void 0?je[2]:{},Se(ae),["Enabled","Suspended"].includes(ie)){Fe.next=4;break}throw new Error("status must be Enabled or Suspended");case 4:return ue=this._bucketRequestParams("PUT",ae,"versioning",le),ge={VersioningConfiguration:{Status:ie}},ue.mime="xml",ue.content=ve(ge,{headers:!0}),Fe.next=10,this.request(ue);case 10:return Pe=Fe.sent,Fe.abrupt("return",{res:Pe.res,status:Pe.status});case 12:case"end":return Fe.stop()}},ee,this)}));function z(ee,ae){return de.apply(this,arguments)}return z}()},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.includes.js":277}],23:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Me=oe("../utils/obj2xml"),ve=Me.obj2xml,we=oe("../utils/isArray"),de=we.isArray,z=De;z.putBucketWebsite=function(){var ee=(0,ke.default)(me.default.mark(function ie(le){var ue,ge,Pe,je,Be,Fe,Ne,Ae=arguments;return me.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:if(ue=Ae.length>1&&Ae[1]!==void 0?Ae[1]:{},ge=Ae.length>2?Ae[2]:void 0,Se(le),Pe=this._bucketRequestParams("PUT",le,"website",ge),je={Suffix:ue.index||"index.html"},Be={IndexDocument:je},Fe={WebsiteConfiguration:Be},ue.supportSubDir&&(je.SupportSubDir=ue.supportSubDir),ue.type&&(je.Type=ue.type),ue.error&&(Be.ErrorDocument={Key:ue.error}),ue.routingRules===void 0){We.next=14;break}if(de(ue.routingRules)){We.next=13;break}throw new Error("RoutingRules must be Array");case 13:Be.RoutingRules={RoutingRule:ue.routingRules};case 14:return Fe=ve(Fe),Pe.content=Fe,Pe.mime="xml",Pe.successStatuses=[200],We.next=20,this.request(Pe);case 20:return Ne=We.sent,We.abrupt("return",{res:Ne.res});case 22:case"end":return We.stop()}},ie,this)}));function ae(ie){return ee.apply(this,arguments)}return ae}()},{"../utils/checkBucketName":51,"../utils/isArray":63,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],24:[function(oe,Ge,De){(function(fe){(function(){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.regexp.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),De.encodeCallback=function(ke,Ce){if(ke.headers=ke.headers||{},!Object.prototype.hasOwnProperty.call(ke.headers,"x-oss-callback")&&Ce.callback){var Se={callbackUrl:encodeURI(Ce.callback.url),callbackBody:Ce.callback.body};Ce.callback.host&&(Se.callbackHost=Ce.callback.host),Ce.callback.contentType&&(Se.callbackBodyType=Ce.callback.contentType);var Me=fe.from(JSON.stringify(Se)).toString("base64");if(ke.headers["x-oss-callback"]=Me,Ce.callback.customValue){var ve={};Object.keys(Ce.callback.customValue).forEach(function(we){ve["x:".concat(we)]=Ce.callback.customValue[we].toString()}),ke.headers["x-oss-callback-var"]=fe.from(JSON.stringify(ve)).toString("base64")}}}}).call(this)}).call(this,oe("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/web.dom-collections.for-each.js":339}],25:[function(oe,Ge,De){"use strict";oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js");var fe=function(de){return de&&de.__esModule?de:{default:de}};Object.defineProperty(De,"__esModule",{value:!0}),De.getReqUrl=void 0;var me=fe(oe("copy-to")),ke=fe(oe("url")),Ce=fe(oe("merge-descriptors")),Se=fe(oe("is-type-of")),Me=oe("../utils/isIP"),ve=oe("../utils/checkConfigValid");function we(de){var z={},ee=this.options.cname;ve.checkConfigValid(this.options.endpoint,"endpoint"),me.default(this.options.endpoint,!1).to(z),de.bucket&&!ee&&!Me.isIP(z.hostname)&&!this.options.sldEnable&&(z.host="".concat(de.bucket,".").concat(z.host));var ae="/";de.bucket&&this.options.sldEnable&&(ae+="".concat(de.bucket,"/")),de.object&&(ae+=this._escape(de.object).replace(/\+/g,"%2B")),z.pathname=ae;var ie={};if(de.query&&Ce.default(ie,de.query),de.subres){var le={};Se.default.string(de.subres)?le[de.subres]="":Se.default.array(de.subres)?de.subres.forEach(function(ue){le[ue]=""}):le=de.subres,Ce.default(ie,le)}return z.query=ie,ke.default.format(z)}De.getReqUrl=we},{"../utils/checkConfigValid":52,"../utils/isIP":69,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466,"merge-descriptors":372,url:472}],26:[function(oe,Ge,De){"use strict";oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.string.trim.js");var fe=oe("humanize-ms"),me=oe("url"),ke=oe("../utils/checkBucketName"),Ce=ke.checkBucketName,Se=oe("../utils/setRegion"),Me=Se.setRegion,ve=oe("../utils/checkConfigValid"),we=ve.checkConfigValid;function de(z,ee){we(z,"endpoint");var ae=me.parse(z);if(ae.protocol||(ae=me.parse("http".concat(ee?"s":"","://").concat(z))),ae.protocol!=="http:"&&ae.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return ae}Ge.exports=function(z){if(!z||!z.accessKeyId||!z.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");z.stsToken&&!z.refreshSTSToken&&!z.refreshSTSTokenInterval&&console.warn("It's recommended to set 'refreshSTSToken' and 'refreshSTSTokenInterval' to refresh stsToken\u3001accessKeyId\u3001accessKeySecret automatically when sts token has expired"),z.bucket&&Ce(z.bucket);var ee=Object.assign({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1,headerEncoding:"utf-8",refreshSTSToken:null,refreshSTSTokenInterval:6e4*5,retryMax:0},z);if(ee.accessKeyId=ee.accessKeyId.trim(),ee.accessKeySecret=ee.accessKeySecret.trim(),ee.timeout&&(ee.timeout=fe(ee.timeout)),ee.endpoint)ee.endpoint=de(ee.endpoint,ee.secure);else if(ee.region)ee.endpoint=Me(ee.region,ee.internal,ee.secure);else throw new Error("require options.endpoint or options.region");return ee.inited=!0,ee}},{"../utils/checkBucketName":51,"../utils/checkConfigValid":52,"../utils/setRegion":75,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.trim.js":308,"humanize-ms":356,url:472}],27:[function(oe,Ge,De){"use strict";var fe=oe("merge-descriptors"),me=De;fe(me,oe("./processObjectSave"))},{"./processObjectSave":28,"merge-descriptors":372}],28:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.concat.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkBucketName"),Se=Ce.checkBucketName,Me=oe("querystring"),ve=oe("js-base64"),we=ve.Base64.encode,de=De;de.processObjectSave=function(){var ee=(0,ke.default)(me.default.mark(function ie(le,ue,ge,Pe){var je,Be,Fe,Ne;return me.default.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:return z(le,"sourceObject"),z(ue,"targetObject"),z(ge,"process"),ue=this._objectName(ue),Pe&&Se(Pe),je=this._objectRequestParams("POST",le,{subres:"x-oss-process"}),Be=Pe?",b_".concat(we(Pe)):"",ue=we(ue),Fe={"x-oss-process":"".concat(ge,"|sys/saveas,o_").concat(ue).concat(Be)},je.content=Me.stringify(Fe),Re.next=12,this.request(je);case 12:return Ne=Re.sent,Re.abrupt("return",{res:Ne.res,status:Ne.res.status});case 14:case"end":return Re.stop()}},ie,this)}));function ae(ie,le,ue,ge){return ee.apply(this,arguments)}return ae}();function z(ee,ae){if(!ee)throw new Error("".concat(ae," is required"));if(typeof ee!="string")throw new Error("".concat(ae," must be String"))}},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"js-base64":371,querystring:385}],29:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.array.from.js"),oe("core-js/modules/es.string.iterator.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.array.filter.js"),oe("core-js/modules/es.array.find.js"),oe("core-js/modules/es.regexp.to-string.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("debug")("ali-oss:multipart-copy"),Se=oe("copy-to"),Me=De;Me.uploadPartCopy=function(){var ve=(0,ke.default)(me.default.mark(function de(z,ee,ae,ie,le){var ue,ge,Pe,je,Be,Fe=arguments;return me.default.wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return ue=Fe.length>5&&Fe[5]!==void 0?Fe[5]:{},ue.headers=ue.headers||{},ge=ue.versionId||ue.subres&&ue.subres.versionId||null,ge?Pe="/".concat(le.sourceBucketName,"/").concat(encodeURIComponent(le.sourceKey),"?versionId=").concat(ge):Pe="/".concat(le.sourceBucketName,"/").concat(encodeURIComponent(le.sourceKey)),ue.headers["x-oss-copy-source"]=Pe,ie&&(ue.headers["x-oss-copy-source-range"]="bytes=".concat(ie)),ue.subres={partNumber:ae,uploadId:ee},je=this._objectRequestParams("PUT",z,ue),je.mime=ue.mime,je.successStatuses=[200],Ae.next=12,this.request(je);case 12:return Be=Ae.sent,Ae.abrupt("return",{name:z,etag:Be.res.headers.etag,res:Be.res});case 14:case"end":return Ae.stop()}},de,this)}));function we(de,z,ee,ae,ie){return ve.apply(this,arguments)}return we}(),Me.multipartUploadCopy=function(){var ve=(0,ke.default)(me.default.mark(function de(z,ee){var ae,ie,le,ue,ge,Pe,je,Be,Fe,Ne,Ae,Re,We=arguments;return me.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:return ae=We.length>2&&We[2]!==void 0?We[2]:{},this.resetCancelFlag(),ie=ae.versionId,le=ie===void 0?null:ie,ue={versionId:le},Ue.next=6,this._getObjectMeta(ee.sourceBucketName,ee.sourceKey,ue);case 6:if(ge=Ue.sent,Pe=ge.res.headers["content-length"],ee.startOffset=ee.startOffset||0,ee.endOffset=ee.endOffset||Pe,!(ae.checkpoint&&ae.checkpoint.uploadId)){Ue.next=14;break}return Ue.next=13,this._resumeMultipartCopy(ae.checkpoint,ee,ae);case 13:return Ue.abrupt("return",Ue.sent);case 14:if(je=102400,Be=ee.endOffset-ee.startOffset,!(Be<je)){Ue.next=18;break}throw new Error("copySize must not be smaller than ".concat(je));case 18:if(!(ae.partSize&&ae.partSize<je)){Ue.next=20;break}throw new Error("partSize must not be smaller than ".concat(je));case 20:return Ue.next=22,this.initMultipartUpload(z,ae);case 22:if(Fe=Ue.sent,Ne=Fe.uploadId,Ae=this._getPartSize(Be,ae.partSize),Re={name:z,copySize:Be,partSize:Ae,uploadId:Ne,doneParts:[]},!(ae&&ae.progress)){Ue.next=29;break}return Ue.next=29,ae.progress(0,Re,Fe.res);case 29:return Ue.next=31,this._resumeMultipartCopy(Re,ee,ae);case 31:return Ue.abrupt("return",Ue.sent);case 32:case"end":return Ue.stop()}},de,this)}));function we(de,z){return ve.apply(this,arguments)}return we}(),Me._resumeMultipartCopy=function(){var ve=(0,ke.default)(me.default.mark(function de(z,ee,ae){var ie,le,ue,ge,Pe,je,Be,Fe,Ne,Ae,Re,We,Ye,Ue,Ke,ot,ut,ft,wt,Je,nt;return me.default.wrap(function(Pt){for(;;)switch(Pt.prev=Pt.next){case 0:if(!this.isCancel()){Pt.next=2;break}throw this._makeCancelEvent();case 2:if(ie=ae.versionId,le=ie===void 0?null:ie,ue={versionId:le},ge=z.copySize,Pe=z.partSize,je=z.uploadId,Be=z.doneParts,Fe=z.name,Ne=this._divideMultipartCopyParts(ge,Pe,ee.startOffset),Ae=Ne.length,Re={headers:{}},ae.copyheaders&&Se(ae.copyheaders).to(Re.headers),le&&Se(ue).to(Re),We=function(gt,dt,ht){return new Promise(function(){var Et=(0,ke.default)(me.default.mark(function St(Ft,mt){var yt,tt,Ve;return me.default.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:if(Le.prev=0,gt.isCancel()){Le.next=22;break}return yt=Ne[dt-1],tt="".concat(yt.start,"-").concat(yt.end-1),Le.prev=4,Le.next=7,gt.uploadPartCopy(Fe,je,dt,tt,ht,Re);case 7:Ve=Le.sent,Le.next=15;break;case 10:if(Le.prev=10,Le.t0=Le.catch(4),Le.t0.status!==404){Le.next=14;break}throw gt._makeAbortEvent();case 14:throw Le.t0;case 15:if(gt.isCancel()){Le.next=22;break}if(Ce("content-range ".concat(Ve.res.headers["content-range"])),Be.push({number:dt,etag:Ve.res.headers.etag}),z.doneParts=Be,!(ae&&ae.progress)){Le.next=22;break}return Le.next=22,ae.progress(Be.length/Ae,z,Ve.res);case 22:Ft(),Le.next=29;break;case 25:Le.prev=25,Le.t1=Le.catch(0),Le.t1.partNum=dt,mt(Le.t1);case 29:case"end":return Le.stop()}},St,null,[[0,25],[4,10]])}));return function(St,Ft){return Et.apply(this,arguments)}}())},Ye=Array.from(new Array(Ae),function(Ct,gt){return gt+1}),Ue=Be.map(function(Ct){return Ct.number}),Ke=Ye.filter(function(Ct){return Ue.indexOf(Ct)<0}),ot=5,ut=ae.parallel||ot,!(this.checkBrowserAndVersion("Internet Explorer","10")||ut===1)){Pt.next=28;break}ft=0;case 18:if(!(ft<Ke.length)){Pt.next=26;break}if(!this.isCancel()){Pt.next=21;break}throw this._makeCancelEvent();case 21:return Pt.next=23,We(this,Ke[ft],ee);case 23:ft++,Pt.next=18;break;case 26:Pt.next=40;break;case 28:return Pt.next=30,this._parallelNode(Ke,ut,We,ee);case 30:if(wt=Pt.sent,Je=wt.find(function(Ct){return Ct.name==="abort"}),!Je){Pt.next=34;break}throw Je;case 34:if(!this.isCancel()){Pt.next=36;break}throw this._makeCancelEvent();case 36:if(!(wt&&wt.length>0)){Pt.next=40;break}throw nt=wt[0],nt.message="Failed to copy some parts with error: ".concat(nt.toString()," part_num: ").concat(nt.partNum),nt;case 40:return Pt.next=42,this.completeMultipartUpload(Fe,je,Be,ae);case 42:return Pt.abrupt("return",Pt.sent);case 43:case"end":return Pt.stop()}},de,this)}));function we(de,z,ee){return ve.apply(this,arguments)}return we}(),Me._divideMultipartCopyParts=function(we,de,z){for(var ee=Math.ceil(we/de),ae=[],ie=0;ie<ee;ie++){var le=de*ie+z,ue=Math.min(le+de,we+z);ae.push({start:le,end:ue})}return ae},Me._getObjectMeta=function(){var ve=(0,ke.default)(me.default.mark(function de(z,ee,ae){var ie,le;return me.default.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:return ie=this.getBucket(),this.setBucket(z),ge.next=4,this.head(ee,ae);case 4:return le=ge.sent,this.setBucket(ie),ge.abrupt("return",le);case 7:case"end":return ge.stop()}},de,this)}));function we(de,z,ee){return ve.apply(this,arguments)}return we}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.iterator.js":303,debug:465}],30:[function(oe,Ge,De){(function(fe){(function(){"use strict";var me=oe("@babel/runtime/helpers/interopRequireDefault"),ke=me(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.array.filter.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.array.sort.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.regexp.to-string.js");var Ce=me(oe("@babel/runtime/helpers/asyncToGenerator")),Se=oe("copy-to"),Me=oe("./callback"),ve=oe("./utils/deepCopy"),we=ve.deepCopyWith,de=oe("./utils/isBuffer"),z=de.isBuffer,ee=oe("./utils/omit"),ae=ee.omit,ie=De;ie.listUploads=function(){var le=(0,Ce.default)(ke.default.mark(function ge(Pe,je){var Be,Fe,Ne,Ae;return ke.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:return je=je||{},Be={},Se(je).to(Be),Be.subres="uploads",Fe=this._objectRequestParams("GET","",Be),Fe.query=Pe,Fe.xmlResponse=!0,Fe.successStatuses=[200],We.next=10,this.request(Fe);case 10:return Ne=We.sent,Ae=Ne.data.Upload||[],Array.isArray(Ae)||(Ae=[Ae]),Ae=Ae.map(function(Ye){return{name:Ye.Key,uploadId:Ye.UploadId,initiated:Ye.Initiated}}),We.abrupt("return",{res:Ne.res,uploads:Ae,bucket:Ne.data.Bucket,nextKeyMarker:Ne.data.NextKeyMarker,nextUploadIdMarker:Ne.data.NextUploadIdMarker,isTruncated:Ne.data.IsTruncated==="true"});case 15:case"end":return We.stop()}},ge,this)}));function ue(ge,Pe){return le.apply(this,arguments)}return ue}(),ie.listParts=function(){var le=(0,Ce.default)(ke.default.mark(function ge(Pe,je,Be,Fe){var Ne,Ae,Re;return ke.default.wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:return Fe=Fe||{},Ne={},Se(Fe).to(Ne),Ne.subres={uploadId:je},Ae=this._objectRequestParams("GET",Pe,Ne),Ae.query=Be,Ae.xmlResponse=!0,Ae.successStatuses=[200],Ye.next=10,this.request(Ae);case 10:return Re=Ye.sent,Ye.abrupt("return",{res:Re.res,uploadId:Re.data.UploadId,bucket:Re.data.Bucket,name:Re.data.Key,partNumberMarker:Re.data.PartNumberMarker,nextPartNumberMarker:Re.data.NextPartNumberMarker,maxParts:Re.data.MaxParts,isTruncated:Re.data.IsTruncated,parts:Re.data.Part||[]});case 12:case"end":return Ye.stop()}},ge,this)}));function ue(ge,Pe,je,Be){return le.apply(this,arguments)}return ue}(),ie.abortMultipartUpload=function(){var le=(0,Ce.default)(ke.default.mark(function ge(Pe,je,Be){var Fe,Ne,Ae;return ke.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:return this._stop(),Be=Be||{},Fe={},Se(Be).to(Fe),Fe.subres={uploadId:je},Ne=this._objectRequestParams("DELETE",Pe,Fe),Ne.successStatuses=[204],We.next=9,this.request(Ne);case 9:return Ae=We.sent,We.abrupt("return",{res:Ae.res});case 11:case"end":return We.stop()}},ge,this)}));function ue(ge,Pe,je){return le.apply(this,arguments)}return ue}(),ie.initMultipartUpload=function(){var le=(0,Ce.default)(ke.default.mark(function ge(Pe,je){var Be,Fe,Ne;return ke.default.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:return je=je||{},Be={},Se(je).to(Be),Be.headers=Be.headers||{},this._convertMetaToHeaders(je.meta,Be.headers),Be.subres="uploads",Fe=this._objectRequestParams("POST",Pe,Be),Fe.mime=je.mime,Fe.xmlResponse=!0,Fe.successStatuses=[200],Re.next=12,this.request(Fe);case 12:return Ne=Re.sent,Re.abrupt("return",{res:Ne.res,bucket:Ne.data.Bucket,name:Ne.data.Key,uploadId:Ne.data.UploadId});case 14:case"end":return Re.stop()}},ge,this)}));function ue(ge,Pe){return le.apply(this,arguments)}return ue}(),ie.uploadPart=function(){var le=(0,Ce.default)(ke.default.mark(function ge(Pe,je,Be,Fe,Ne,Ae,Re){var We,Ye;return ke.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:if(We={size:Ae-Ne},Ye=fe&&fe.browser,!Ye){Ke.next=8;break}return Ke.next=5,this._createBuffer(Fe,Ne,Ae);case 5:We.content=Ke.sent,Ke.next=11;break;case 8:return Ke.next=10,this._createStream(Fe,Ne,Ae);case 10:We.stream=Ke.sent;case 11:return Ke.next=13,this._uploadPart(Pe,je,Be,We,Re);case 13:return Ke.abrupt("return",Ke.sent);case 14:case"end":return Ke.stop()}},ge,this)}));function ue(ge,Pe,je,Be,Fe,Ne,Ae){return le.apply(this,arguments)}return ue}(),ie.completeMultipartUpload=function(){var le=(0,Ce.default)(ke.default.mark(function ge(Pe,je,Be,Fe){var Ne,Ae,Re,We,Ye,Ue,Ke,ot;return ke.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:for(Ne=Be.concat().sort(function(wt,Je){return wt.number-Je.number}).filter(function(wt,Je,nt){return!Je||wt.number!==nt[Je-1].number}),Ae=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,Re=0;Re<Ne.length;Re++)We=Ne[Re],Ae+=`<Part>
`,Ae+="<PartNumber>".concat(We.number,`</PartNumber>
`),Ae+="<ETag>".concat(We.etag,`</ETag>
`),Ae+=`</Part>
`;return Ae+="</CompleteMultipartUpload>",Fe=Fe||{},Ye={},Ye=we(Fe,function(wt){if(z(wt))return null}),Ye.subres={uploadId:je},Ye.headers=ae(Ye.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),Ue=this._objectRequestParams("POST",Pe,Ye),Me.encodeCallback(Ue,Ye),Ue.mime="xml",Ue.content=Ae,Ue.headers&&Ue.headers["x-oss-callback"]||(Ue.xmlResponse=!0),Ue.successStatuses=[200],ft.next=17,this.request(Ue);case 17:if(Ke=ft.sent,!Fe.progress){ft.next=21;break}return ft.next=21,Fe.progress(1,null,Ke.res);case 21:return ot={res:Ke.res,bucket:Ue.bucket,name:Pe,etag:Ke.res.headers.etag},Ue.headers&&Ue.headers["x-oss-callback"]&&(ot.data=JSON.parse(Ke.data.toString())),ft.abrupt("return",ot);case 24:case"end":return ft.stop()}},ge,this)}));function ue(ge,Pe,je,Be){return le.apply(this,arguments)}return ue}(),ie._uploadPart=function(){var le=(0,Ce.default)(ke.default.mark(function ge(Pe,je,Be,Fe,Ne){var Ae,Re,We,Ye;return ke.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:return Ne=Ne||{},Ae={},Se(Ne).to(Ae),Ae.headers=Ae.headers||{},Ae.headers["Content-Length"]=Fe.size,Ae.headers=ae(Ae.headers,["x-oss-server-side-encryption"]),Ae.subres={partNumber:Be,uploadId:je},Re=this._objectRequestParams("PUT",Pe,Ae),Re.mime=Ae.mime,We=fe&&fe.browser,We?Re.content=Fe.content:Re.stream=Fe.stream,Re.successStatuses=[200],Re.disabledMD5=Ne.disabledMD5,Ke.next=15,this.request(Re);case 15:if(Ye=Ke.sent,Ye.res.headers.etag){Ke.next=18;break}throw new Error(`Please set the etag of expose-headers in OSS
https://help.aliyun.com/document_detail/32069.html`);case 18:return Fe.stream&&(Fe.stream=null,Re.stream=null),Ke.abrupt("return",{name:Pe,etag:Ye.res.headers.etag,res:Ye.res});case 20:case"end":return Ke.stop()}},ge,this)}));function ue(ge,Pe,je,Be,Fe){return le.apply(this,arguments)}return ue}()}).call(this)}).call(this,oe("_process"))},{"./callback":24,"./utils/deepCopy":58,"./utils/isBuffer":65,"./utils/omit":73,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.map.js":280,"core-js/modules/es.array.sort.js":282,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],31:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator")),ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("url"),Se=oe("utility"),Me=oe("copy-to"),ve=oe("../../common/signUtils"),we=oe("../utils/isIP"),de=we.isIP,z=oe("../utils/setSTSToken"),ee=z.setSTSToken,ae=oe("../utils/isFunction"),ie=ae.isFunction,le=De;le.asyncSignatureUrl=function(){var ue=(0,ke.default)(me.default.mark(function Pe(je,Be){var Fe,Ne,Ae,Re,We;return me.default.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:if(!de(this.options.endpoint.hostname)){Ue.next=2;break}throw new Error("can not get the object URL when endpoint is IP");case 2:if(Be=Be||{},je=this._objectName(je),Be.method=Be.method||"GET",Fe=Se.timestamp()+(Be.expires||1800),Ne={bucket:this.options.bucket,object:je},Ae=this._getResource(Ne),!(this.options.stsToken&&ie(this.options.refreshSTSToken))){Ue.next=11;break}return Ue.next=11,ee.call(this);case 11:return this.options.stsToken&&(Be["security-token"]=this.options.stsToken),Re=ve._signatureForURL(this.options.accessKeySecret,Be,Ae,Fe),We=Ce.parse(this._getReqUrl(Ne)),We.query={OSSAccessKeyId:this.options.accessKeyId,Expires:Fe,Signature:Re.Signature},Me(Re.subResource).to(We.query),Ue.abrupt("return",We.format());case 17:case"end":return Ue.stop()}},Pe,this)}));function ge(Pe,je){return ue.apply(this,arguments)}return ge}()},{"../../common/signUtils":50,"../utils/isFunction":68,"../utils/isIP":69,"../utils/setSTSToken":76,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,url:472,utility:474}],32:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.find.js"),oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js");var ke=fe(oe("@babel/runtime/helpers/typeof")),Ce=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Se=oe("../utils/checkBucketName"),Me=Se.checkBucketName,ve=De,we=["content-type","content-encoding","content-language","content-disposition","cache-control","expires"];ve.copy=function(){var de=(0,Ce.default)(me.default.mark(function ee(ae,ie,le,ue){var ge,Pe,je;return me.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return(0,ke.default)(le)==="object"&&(ue=le),ue=ue||{},ue.headers=ue.headers||{},Object.keys(ue.headers).forEach(function(Ne){ue.headers["x-oss-copy-source-".concat(Ne.toLowerCase())]=ue.headers[Ne]}),(ue.meta||Object.keys(ue.headers).find(function(Ne){return we.includes(Ne.toLowerCase())}))&&(ue.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(ue.meta,ue.headers),ie=this._getSourceName(ie,le),ue.versionId&&(ie="".concat(ie,"?versionId=").concat(ue.versionId)),ue.headers["x-oss-copy-source"]=ie,ge=this._objectRequestParams("PUT",ae,ue),ge.xmlResponse=!0,ge.successStatuses=[200,304],Fe.next=14,this.request(ge);case 14:return Pe=Fe.sent,je=Pe.data,je&&(je={etag:je.ETag,lastModified:je.LastModified}),Fe.abrupt("return",{data:je,res:Pe.res});case 18:case"end":return Fe.stop()}},ee,this)}));function z(ee,ae,ie,le){return de.apply(this,arguments)}return z}(),ve._getSourceName=function(z,ee){return typeof ee=="string"?z=this._objectName(z):z[0]!=="/"?ee=this.options.bucket:(ee=z.replace(/\/(.+?)(\/.*)/,"$1"),z=z.replace(/(\/.+?\/)(.*)/,"$2")),Me(ee),z=encodeURIComponent(z),z="/".concat(ee,"/").concat(z),z}},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],33:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De;Ce.delete=function(){var Se=(0,ke.default)(me.default.mark(function ve(we){var de,z,ee,ae=arguments;return me.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return de=ae.length>1&&ae[1]!==void 0?ae[1]:{},de.subres=Object.assign({},de.subres),de.versionId&&(de.subres.versionId=de.versionId),z=this._objectRequestParams("DELETE",we,de),z.successStatuses=[204],le.next=7,this.request(z);case 7:return ee=le.sent,le.abrupt("return",{res:ee.res});case 9:case"end":return le.stop()}},ve,this)}));function Me(ve){return Se.apply(this,arguments)}return Me}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],34:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("utility"),Se=oe("../utils/obj2xml"),Me=Se.obj2xml,ve=De;ve.deleteMulti=function(){var we=(0,ke.default)(me.default.mark(function z(ee){var ae,ie,le,ue,ge,Pe,je,Be,Fe,Ne,Ae,Re,We,Ye=arguments;return me.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:if(ae=Ye.length>1&&Ye[1]!==void 0?Ye[1]:{},ie=[],!(!ee||!ee.length)){Ke.next=4;break}throw new Error("names is required");case 4:for(le=0;le<ee.length;le++)ue={},typeof ee[le]=="string"?ue.Key=Ce.escape(this._objectName(ee[le])):(ge=ee[le],Pe=ge.key,je=ge.versionId,ue.Key=Ce.escape(this._objectName(Pe)),ue.VersionId=je),ie.push(ue);return Be={Delete:{Quiet:!!ae.quiet,Object:ie}},Fe=Me(Be,{headers:!0}),ae.subres=Object.assign({delete:""},ae.subres),ae.versionId&&(ae.subres.versionId=ae.versionId),Ne=this._objectRequestParams("POST","",ae),Ne.mime="xml",Ne.content=Fe,Ne.xmlResponse=!0,Ne.successStatuses=[200],Ke.next=16,this.request(Ne);case 16:return Ae=Ke.sent,Re=Ae.data,We=Re&&Re.Deleted||null,We&&(Array.isArray(We)||(We=[We])),Ke.abrupt("return",{res:Ae.res,deleted:We||[]});case 21:case"end":return Ke.stop()}},z,this)}));function de(z){return we.apply(this,arguments)}return de}()},{"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,utility:474}],35:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De;Ce.deleteObjectTagging=function(){var Se=(0,ke.default)(me.default.mark(function ve(we){var de,z,ee,ae=arguments;return me.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return de=ae.length>1&&ae[1]!==void 0?ae[1]:{},de.subres=Object.assign({tagging:""},de.subres),de.versionId&&(de.subres.versionId=de.versionId),we=this._objectName(we),z=this._objectRequestParams("DELETE",we,de),z.successStatuses=[204],le.next=8,this.request(z);case 8:return ee=le.sent,le.abrupt("return",{status:ee.status,res:ee.res});case 10:case"end":return le.stop()}},ve,this)}));function Me(ve){return Se.apply(this,arguments)}return Me}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],36:[function(oe,Ge,De){"use strict";oe("core-js/modules/es.array.concat.js");var fe=oe("url"),me=oe("../utils/isIP"),ke=me.isIP,Ce=De;Ce.generateObjectUrl=function(Me,ve){if(ke(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");if(ve)ve[ve.length-1]!=="/"&&(ve+="/");else{ve=this.options.endpoint.format();var we=fe.parse(ve),de=this.options.bucket;we.hostname="".concat(de,".").concat(we.hostname),we.host="".concat(de,".").concat(we.host),ve=we.format()}return ve+this._escape(this._objectName(Me))}},{"../utils/isIP":69,"core-js/modules/es.array.concat.js":272,url:472}],37:[function(oe,Ge,De){(function(fe){(function(){"use strict";var me=oe("@babel/runtime/helpers/interopRequireDefault"),ke=me(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var Ce=me(oe("@babel/runtime/helpers/asyncToGenerator")),Se=oe("fs"),Me=oe("is-type-of"),ve=De;ve.get=function(){var we=(0,Ce.default)(ke.default.mark(function z(ee,ae){var ie,le,ue,ge,Pe,je,Be,Fe,Ne=arguments;return ke.default.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:return ie=Ne.length>2&&Ne[2]!==void 0?Ne[2]:{},le=null,ue=!1,Me.writableStream(ae)?le=ae:Me.string(ae)?(le=Se.createWriteStream(ae),ue=!0):ie=ae,ie=ie||{},ge=fe&&fe.browser,Pe=ie.responseCacheControl===null?"":"no-cache",je=ge&&Pe?{"response-cache-control":Pe}:{},ie.subres=Object.assign(je,ie.subres),ie.versionId&&(ie.subres.versionId=ie.versionId),ie.process&&(ie.subres["x-oss-process"]=ie.process),Re.prev=11,Fe=this._objectRequestParams("GET",ee,ie),Fe.writeStream=le,Fe.successStatuses=[200,206,304],Re.next=17,this.request(Fe);case 17:Be=Re.sent,ue&&le.destroy(),Re.next=28;break;case 21:if(Re.prev=21,Re.t0=Re.catch(11),!ue){Re.next=27;break}return le.destroy(),Re.next=27,this._deleteFileSafe(ae);case 27:throw Re.t0;case 28:return Re.abrupt("return",{res:Be.res,content:Be.data});case 29:case"end":return Re.stop()}},z,this,[[11,21]])}));function de(z,ee){return we.apply(this,arguments)}return de}()}).call(this)}).call(this,oe("_process"))},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,"core-js/modules/es.object.assign.js":287,fs:89,"is-type-of":466}],38:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De;Ce.getACL=function(){var Se=(0,ke.default)(me.default.mark(function ve(we){var de,z,ee,ae=arguments;return me.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return de=ae.length>1&&ae[1]!==void 0?ae[1]:{},de.subres=Object.assign({acl:""},de.subres),de.versionId&&(de.subres.versionId=de.versionId),we=this._objectName(we),z=this._objectRequestParams("GET",we,de),z.successStatuses=[200],z.xmlResponse=!0,le.next=9,this.request(z);case 9:return ee=le.sent,le.abrupt("return",{acl:ee.data.AccessControlList.Grant,owner:{id:ee.data.Owner.ID,displayName:ee.data.Owner.DisplayName},res:ee.res});case 11:case"end":return le.stop()}},ve,this)}));function Me(ve){return Se.apply(this,arguments)}return Me}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],39:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.number.constructor.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De,Se=oe("../utils/isObject"),Me=Se.isObject,ve=oe("../utils/isArray"),we=ve.isArray;Ce.getBucketVersions=de,Ce.listObjectVersions=de;function de(){return z.apply(this,arguments)}function z(){return z=(0,ke.default)(me.default.mark(function ie(){var le,ue,ge,Pe,je,Be,Fe,Ne,Ae=arguments;return me.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:if(le=Ae.length>0&&Ae[0]!==void 0?Ae[0]:{},ue=Ae.length>1&&Ae[1]!==void 0?Ae[1]:{},!(le.versionIdMarker&&le.keyMarker===void 0)){We.next=4;break}throw new Error("A version-id marker cannot be specified without a key marker");case 4:return ue.subres=Object.assign({versions:""},ue.subres),ue.versionId&&(ue.subres.versionId=ue.versionId),ge=this._objectRequestParams("GET","",ue),ge.xmlResponse=!0,ge.successStatuses=[200],ge.query=ae(le),We.next=12,this.request(ge);case 12:return Pe=We.sent,je=Pe.data.Version||[],Be=Pe.data.DeleteMarker||[],Fe=this,je&&(Array.isArray(je)||(je=[je]),je=je.map(function(Ye){return{name:Ye.Key,url:Fe._objectUrl(Ye.Key),lastModified:Ye.LastModified,isLatest:Ye.IsLatest==="true",versionId:Ye.VersionId,etag:Ye.ETag,type:Ye.Type,size:Number(Ye.Size),storageClass:Ye.StorageClass,owner:{id:Ye.Owner.ID,displayName:Ye.Owner.DisplayName}}})),Be&&(we(Be)||(Be=[Be]),Be=Be.map(function(Ye){return{name:Ye.Key,lastModified:Ye.LastModified,versionId:Ye.VersionId,owner:{id:Ye.Owner.ID,displayName:Ye.Owner.DisplayName}}})),Ne=Pe.data.CommonPrefixes||null,Ne&&(we(Ne)||(Ne=[Ne]),Ne=Ne.map(function(Ye){return Ye.Prefix})),We.abrupt("return",{res:Pe.res,objects:je,deleteMarker:Be,prefixes:Ne,nextMarker:Pe.data.NextKeyMarker||null,NextVersionIdMarker:Pe.data.NextVersionIdMarker||null,nextKeyMarker:Pe.data.NextKeyMarker||null,nextVersionIdMarker:Pe.data.NextVersionIdMarker||null,isTruncated:Pe.data.IsTruncated==="true"});case 21:case"end":return We.stop()}},ie,this)})),z.apply(this,arguments)}function ee(ie){return ie.replace(/([A-Z])/g,"-$1").toLowerCase()}function ae(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le={};return Me(ie)&&Object.keys(ie).forEach(function(ue){le[ee(ue)]=ie[ue]}),le}},{"../utils/isArray":63,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],40:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De;Ce.getObjectMeta=function(){var Se=(0,ke.default)(me.default.mark(function ve(we,de){var z,ee;return me.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return de=de||{},we=this._objectName(we),de.subres=Object.assign({objectMeta:""},de.subres),de.versionId&&(de.subres.versionId=de.versionId),z=this._objectRequestParams("HEAD",we,de),z.successStatuses=[200],ie.next=8,this.request(z);case 8:return ee=ie.sent,ie.abrupt("return",{status:ee.status,res:ee.res});case 10:case"end":return ie.stop()}},ve,this)}));function Me(ve,we){return Se.apply(this,arguments)}return Me}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],41:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De,Se=oe("../utils/isObject"),Me=Se.isObject;Ce.getObjectTagging=function(){var ve=(0,ke.default)(me.default.mark(function de(z){var ee,ae,ie,le,ue,ge,Pe=arguments;return me.default.wrap(function(Be){for(;;)switch(Be.prev=Be.next){case 0:return ee=Pe.length>1&&Pe[1]!==void 0?Pe[1]:{},ee.subres=Object.assign({tagging:""},ee.subres),ee.versionId&&(ee.subres.versionId=ee.versionId),z=this._objectName(z),ae=this._objectRequestParams("GET",z,ee),ae.successStatuses=[200],Be.next=8,this.request(ae);case 8:return ie=Be.sent,Be.next=11,this.parseXML(ie.data);case 11:return le=Be.sent,ue=le.TagSet.Tag,ue=ue&&Me(ue)?[ue]:ue||[],ge={},ue.forEach(function(Fe){ge[Fe.Key]=Fe.Value}),Be.abrupt("return",{status:ie.status,res:ie.res,tag:ge});case 17:case"end":return Be.stop()}},de,this)}));function we(de){return ve.apply(this,arguments)}return we}()},{"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],42:[function(oe,Ge,De){"use strict";var fe=oe("../utils/isIP"),me=fe.isIP,ke=De;ke.getObjectUrl=function(Se,Me){if(me(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");return Me?Me[Me.length-1]!=="/"&&(Me+="/"):Me=this.options.endpoint.format(),Me+this._escape(this._objectName(Se))}},{"../utils/isIP":69}],43:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De;Ce.getSymlink=function(){var Se=(0,ke.default)(me.default.mark(function ve(we){var de,z,ee,ae,ie=arguments;return me.default.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return de=ie.length>1&&ie[1]!==void 0?ie[1]:{},de.subres=Object.assign({symlink:""},de.subres),de.versionId&&(de.subres.versionId=de.versionId),we=this._objectName(we),z=this._objectRequestParams("GET",we,de),z.successStatuses=[200],ue.next=8,this.request(z);case 8:return ee=ue.sent,ae=ee.res.headers["x-oss-symlink-target"],ue.abrupt("return",{targetName:decodeURIComponent(ae),res:ee.res});case 11:case"end":return ue.stop()}},ve,this)}));function Me(ve){return Se.apply(this,arguments)}return Me}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],44:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/checkEnv"),Se=Ce.checkEnv,Me=De;Me.head=function(){var ve=(0,ke.default)(me.default.mark(function de(z){var ee,ae,ie,le,ue=arguments;return me.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return ee=ue.length>1&&ue[1]!==void 0?ue[1]:{},Se("Because HeadObject has gzip enabled, head cannot get the file size correctly. If you need to get the file size, please use getObjectMeta"),ee.subres=Object.assign({},ee.subres),ee.versionId&&(ee.subres.versionId=ee.versionId),ae=this._objectRequestParams("HEAD",z,ee),ae.successStatuses=[200,304],Pe.next=8,this.request(ae);case 8:return ie=Pe.sent,le={meta:null,res:ie.res,status:ie.status},ie.status===200&&Object.keys(ie.headers).forEach(function(je){je.indexOf("x-oss-meta-")===0&&(le.meta||(le.meta={}),le.meta[je.substring(11)]=ie.headers[je])}),Pe.abrupt("return",le);case 12:case"end":return Pe.stop()}},de,this)}));function we(de){return ve.apply(this,arguments)}return we}()},{"../utils/checkEnv":53,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],45:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De;Ce.putACL=function(){var Se=(0,ke.default)(me.default.mark(function ve(we,de,z){var ee,ae;return me.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return z=z||{},z.subres=Object.assign({acl:""},z.subres),z.versionId&&(z.subres.versionId=z.versionId),z.headers=z.headers||{},z.headers["x-oss-object-acl"]=de,we=this._objectName(we),ee=this._objectRequestParams("PUT",we,z),ee.successStatuses=[200],le.next=10,this.request(ee);case 10:return ae=le.sent,le.abrupt("return",{res:ae.res});case 12:case"end":return le.stop()}},ve,this)}));function Me(ve,we,de){return Se.apply(this,arguments)}return Me}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],46:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.object.keys.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("../utils/obj2xml"),Se=Ce.obj2xml,Me=oe("../utils/checkObjectTag"),ve=Me.checkObjectTag,we=De;we.putObjectTagging=function(){var de=(0,ke.default)(me.default.mark(function ee(ae,ie){var le,ue,ge,Pe,je=arguments;return me.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return le=je.length>2&&je[2]!==void 0?je[2]:{},ve(ie),le.subres=Object.assign({tagging:""},le.subres),le.versionId&&(le.subres.versionId=le.versionId),ae=this._objectName(ae),ue=this._objectRequestParams("PUT",ae,le),ue.successStatuses=[200],ie=Object.keys(ie).map(function(Ne){return{Key:Ne,Value:ie[Ne]}}),ge={Tagging:{TagSet:{Tag:ie}}},ue.mime="xml",ue.content=Se(ge),Fe.next=13,this.request(ue);case 13:return Pe=Fe.sent,Fe.abrupt("return",{res:Pe.res,status:Pe.status});case 15:case"end":return Fe.stop()}},ee,this)}));function z(ee,ae){return de.apply(this,arguments)}return z}()},{"../utils/checkObjectTag":54,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290}],47:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=De;Ce.putSymlink=function(){var Se=(0,ke.default)(me.default.mark(function ve(we,de,z){var ee,ae;return me.default.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return z=z||{},z.headers=z.headers||{},de=this._escape(this._objectName(de)),this._convertMetaToHeaders(z.meta,z.headers),z.headers["x-oss-symlink-target"]=de,z.subres=Object.assign({symlink:""},z.subres),z.versionId&&(z.subres.versionId=z.versionId),z.storageClass&&(z.headers["x-oss-storage-class"]=z.storageClass),we=this._objectName(we),ee=this._objectRequestParams("PUT",we,z),ee.successStatuses=[200],le.next=13,this.request(ee);case 13:return ae=le.sent,le.abrupt("return",{res:ae.res});case 15:case"end":return le.stop()}},ve,this)}));function Me(ve,we,de){return Se.apply(this,arguments)}return Me}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],48:[function(oe,Ge,De){"use strict";var fe=oe("url"),me=oe("utility"),ke=oe("copy-to"),Ce=oe("../../common/signUtils"),Se=oe("../utils/isIP"),Me=Se.isIP,ve=De;ve.signatureUrl=function(de,z){if(Me(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");z=z||{},de=this._objectName(de),z.method=z.method||"GET";var ee=me.timestamp()+(z.expires||1800),ae={bucket:this.options.bucket,object:de},ie=this._getResource(ae);this.options.stsToken&&(z["security-token"]=this.options.stsToken);var le=Ce._signatureForURL(this.options.accessKeySecret,z,ie,ee),ue=fe.parse(this._getReqUrl(ae));return ue.query={OSSAccessKeyId:this.options.accessKeyId,Expires:ee,Signature:le.Signature},ke(le.subResource).to(ue.query),ue.format()}},{"../../common/signUtils":50,"../utils/isIP":69,"copy-to":94,url:472,utility:474}],49:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.array.iterator.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.string.iterator.js"),oe("core-js/modules/web.dom-collections.iterator.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.function.name.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator")),Ce=oe("./utils/isArray"),Se=Ce.isArray,Me=De;Me._parallelNode=function(){var ve=(0,ke.default)(me.default.mark(function de(z,ee,ae,ie){var le,ue,ge,Pe,je,Be,Fe,Ne;return me.default.wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:le=this,ue=[],ge=[],Pe=z.length/ee,je=z.length%ee,Be=je===0?Pe:(z.length-je)/ee+1,Fe=1,Ne=0;case 8:if(!(Ne<z.length)){Re.next=26;break}if(!le.isCancel()){Re.next=11;break}return Re.abrupt("break",26);case 11:if(ie?ge.push(ae(le,z[Ne],ie)):ge.push(ae(le,z[Ne])),!(ge.length===ee||Fe===Be&&Ne===z.length-1)){Re.next=23;break}return Re.prev=13,Fe+=1,Re.next=17,Promise.all(ge);case 17:Re.next=22;break;case 19:Re.prev=19,Re.t0=Re.catch(13),ue.push(Re.t0);case 22:ge=[];case 23:Ne++,Re.next=8;break;case 26:return Re.abrupt("return",ue);case 27:case"end":return Re.stop()}},de,this,[[13,19]])}));function we(de,z,ee,ae){return ve.apply(this,arguments)}return we}(),Me._parallel=function(we,de,z){var ee=this;return new Promise(function(ae){var ie=[];if(de<=0||!we){ae(ie);return}function le(Re){return function(){if(Re===null)throw new Error("Callback was already called.");var We=Re;Re=null;for(var Ye=arguments.length,Ue=new Array(Ye),Ke=0;Ke<Ye;Ke++)Ue[Ke]=arguments[Ke];We.apply(this,Ue)}}function ue(Re){var We=-1,Ye=Re.length;return function(){return++We<Ye&&!ee.isCancel()?{value:Re[We],key:We}:null}}var ge=ue(we),Pe=!1,je=0,Be=!1;function Fe(Re){je-=1,Re?(Pe=!0,ie.push(Re),ae(ie)):Pe&&je<=0?(Pe=!0,ae(ie)):Be||(ee.isCancel()?ae(ie):Ae())}function Ne(Re,We){z(Re).then(function(Ye){We(null,Ye)}).catch(function(Ye){We(Ye)})}function Ae(){for(Be=!0;je<de&&!Pe&&!ee.isCancel();){var Re=ge();if(Re===null||ie.length>0){Pe=!0,je<=0&&ae(ie);return}je+=1,Ne(Re.value,le(Fe))}Be=!1}Ae()})},Me.cancel=function(we){this.options.cancelFlag=!0,Se(this.multipartUploadStreams)&&this.multipartUploadStreams.forEach(function(de){if(de.destroyed===!1){var z={name:"cancel",message:"cancel"};de.destroy(z)}}),this.multipartUploadStreams=[],we&&this.abortMultipartUpload(we.name,we.uploadId,we.options)},Me.isCancel=function(){return this.options.cancelFlag},Me.resetCancelFlag=function(){this.options.cancelFlag=!1},Me._stop=function(){this.options.cancelFlag=!0},Me._makeCancelEvent=function(){var we={status:0,name:"cancel"};return we},Me._makeAbortEvent=function(){var we={status:0,name:"abort",message:"upload task has been abort"};return we}},{"./utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.string.iterator.js":303,"core-js/modules/web.dom-collections.for-each.js":339,"core-js/modules/web.dom-collections.iterator.js":340}],50:[function(oe,Ge,De){(function(fe){(function(){"use strict";oe("core-js/modules/es.string.trim.js"),oe("core-js/modules/es.array.sort.js"),oe("core-js/modules/es.array.join.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.regexp.to-string.js");var me=oe("./../../shims/crypto/crypto.js"),ke=oe("is-type-of"),Ce=oe("./utils/lowercaseKeyHeader"),Se=Ce.lowercaseKeyHeader;De.buildCanonicalizedResource=function(ve,we){var de="".concat(ve),z="?";if(ke.string(we)&&we.trim()!=="")de+=z+we;else if(ke.array(we))we.sort(),de+=z+we.join("&");else if(we){var ee=function(le,ue){return le[0]>ue[0]?1:le[0]<ue[0]?-1:0},ae=function(le){de+=z+le,(we[le]||we[le]===0)&&(de+="=".concat(we[le])),z="&"};Object.keys(we).sort(ee).forEach(ae)}return de},De.buildCanonicalString=function(ve,we,de,z){de=de||{};var ee=Se(de.headers),ae="x-oss-",ie=[],le={},ue=[ve.toUpperCase(),ee["content-md5"]||"",ee["content-type"],z||ee["x-oss-date"]];return Object.keys(ee).forEach(function(ge){var Pe=ge.toLowerCase();Pe.indexOf(ae)===0&&(le[Pe]=String(ee[ge]).trim())}),Object.keys(le).sort().forEach(function(ge){ie.push("".concat(ge,":").concat(le[ge]))}),ue=ue.concat(ie),ue.push(this.buildCanonicalizedResource(we,de.parameters)),ue.join(`
`)},De.computeSignature=function(ve,we){var de=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"utf-8",z=me.createHmac("sha1",ve);return z.update(fe.from(we,de)).digest("base64")},De.authorization=function(ve,we,de,z){return"OSS ".concat(ve,":").concat(this.computeSignature(we,de,z))},De._signatureForURL=function(ve){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},de=arguments.length>2?arguments[2]:void 0,z=arguments.length>3?arguments[3]:void 0,ee=arguments.length>4?arguments[4]:void 0,ae={},ie=we.subResource,le=ie===void 0?{}:ie;if(we.process){var ue="x-oss-process";le[ue]=we.process}if(we.trafficLimit){var ge="x-oss-traffic-limit";le[ge]=we.trafficLimit}if(we.response&&Object.keys(we.response).forEach(function(Fe){var Ne="response-".concat(Fe.toLowerCase());le[Ne]=we.response[Fe]}),Object.keys(we).forEach(function(Fe){var Ne=Fe.toLowerCase(),Ae=we[Fe];Ne.indexOf("x-oss-")===0?ae[Ne]=Ae:(Ne.indexOf("content-md5")===0||Ne.indexOf("content-type")===0)&&(ae[Fe]=Ae)}),Object.prototype.hasOwnProperty.call(we,"security-token")&&(le["security-token"]=we["security-token"]),Object.prototype.hasOwnProperty.call(we,"callback")){var Pe={callbackUrl:encodeURI(we.callback.url),callbackBody:we.callback.body};if(we.callback.host&&(Pe.callbackHost=we.callback.host),we.callback.contentType&&(Pe.callbackBodyType=we.callback.contentType),le.callback=fe.from(JSON.stringify(Pe)).toString("base64"),we.callback.customValue){var je={};Object.keys(we.callback.customValue).forEach(function(Fe){je["x:".concat(Fe)]=we.callback.customValue[Fe]}),le["callback-var"]=fe.from(JSON.stringify(je)).toString("base64")}}var Be=this.buildCanonicalString(we.method,de,{headers:ae,parameters:le},z.toString());return{Signature:this.computeSignature(ve,Be,ee),subResource:le}}}).call(this)}).call(this,oe("buffer").Buffer)},{"./../../shims/crypto/crypto.js":461,"./utils/lowercaseKeyHeader":71,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.sort.js":282,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.trim.js":308,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466}],51:[function(oe,Ge,De){"use strict";oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.checkBucketName=void 0,De.checkBucketName=function(fe){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ke=me?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!ke.test(fe))throw new Error("The bucket must be conform to the specifications")}},{"core-js/modules/es.regexp.exec.js":300}],52:[function(oe,Ge,De){"use strict";oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.checkConfigValid=void 0;var fe={endpoint:me,region:/^[a-zA-Z0-9\-_]+$/};function me(ke){return typeof ke=="string"?/^[a-zA-Z0-9._:/-]+$/.test(ke):ke.host?/^[a-zA-Z0-9._:/-]+$/.test(ke.host):!1}De.checkConfigValid=function(ke,Ce){if(fe[Ce]){var Se=!0;if(fe[Ce]instanceof Function?Se=fe[Ce](ke):Se=fe[Ce].test(ke),!Se)throw new Error("The ".concat(Ce," must be conform to the specifications"))}}},{"core-js/modules/es.regexp.exec.js":300}],53:[function(oe,Ge,De){(function(fe){(function(){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.checkEnv=void 0;function me(ke){fe.browser&&console.warn(ke)}De.checkEnv=me}).call(this)}).call(this,oe("_process"))},{_process:467}],54:[function(oe,Ge,De){"use strict";oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.object.entries.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.checkObjectTag=void 0;var fe=oe("./checkValid"),me=fe.checkValid,ke=oe("./isObject"),Ce=ke.isObject,Se=[{validator:function(de){if(typeof de!="string")throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],Me={key:[].concat(Se,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(Se,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function ve(we){if(!Ce(we))throw new Error("tag must be Object");var de=Object.entries(we);if(de.length>10)throw new Error("maximum of 10 tags for a object");var z=["key","value"];de.forEach(function(ee){ee.forEach(function(ae,ie){me(ae,Me[z[ie]])})})}De.checkObjectTag=ve},{"./checkValid":55,"./isObject":70,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.entries.js":288,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],55:[function(oe,Ge,De){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.checkValid=void 0;function fe(me,ke){ke.forEach(function(Ce){if(Ce.validator)Ce.validator(me);else if(Ce.pattern&&!Ce.pattern.test(me))throw new Error(Ce.msg)})}De.checkValid=fe},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/web.dom-collections.for-each.js":339}],56:[function(oe,Ge,De){(function(fe){(function(){"use strict";oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.string.includes.js"),oe("core-js/modules/es.object.assign.js"),oe("core-js/modules/es.array.concat.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.createRequest=void 0;var me=oe("./../../../shims/crypto/crypto.js"),ke=oe("debug")("ali-oss"),Ce=oe("mime"),Se=oe("dateformat"),Me=oe("copy-to"),ve=oe("path"),we=oe("./encoder"),de=we.encoder,z=oe("./isIP"),ee=z.isIP,ae=oe("./setRegion"),ie=ae.setRegion,le=oe("../client/getReqUrl"),ue=le.getReqUrl,ge=oe("./isDingTalk"),Pe=ge.isDingTalk;function je(Ne,Ae){return Ne[Ae]||Ne[Ae.toLowerCase()]}function Be(Ne,Ae){delete Ne[Ae],delete Ne[Ae.toLowerCase()]}function Fe(Ne){var Ae=new Date;this.options.amendTimeSkewed&&(Ae=+new Date+this.options.amendTimeSkewed);var Re={"x-oss-date":Se(Ae,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'")};typeof window!="undefined"&&(Re["x-oss-user-agent"]=this.userAgent),this.userAgent.includes("nodejs")&&(Re["User-Agent"]=this.userAgent),this.options.isRequestPay&&Object.assign(Re,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(Re["x-oss-security-token"]=this.options.stsToken),Me(Ne.headers).to(Re),je(Re,"Content-Type")||(Ne.mime&&Ne.mime.indexOf("/")>0?Re["Content-Type"]=Ne.mime:Pe()?Re["Content-Type"]="application/octet-stream":Re["Content-Type"]=Ce.getType(Ne.mime||ve.extname(Ne.object||""))),je(Re,"Content-Type")||Be(Re,"Content-Type"),Ne.content&&(Ne.disabledMD5||(!Ne.headers||!Ne.headers["Content-MD5"]?Re["Content-MD5"]=me.createHash("md5").update(fe.from(Ne.content,"utf8")).digest("base64"):Re["Content-MD5"]=Ne.headers["Content-MD5"]),Re["Content-Length"]||(Re["Content-Length"]=Ne.content.length));var We=Object.prototype.hasOwnProperty;for(var Ye in Re)Re[Ye]&&We.call(Re,Ye)&&(Re[Ye]=de(String(Re[Ye]),this.options.headerEncoding));var Ue=this._getResource(Ne);if(Re.authorization=this.authorization(Ne.method,Ue,Ne.subres,Re,this.options.headerEncoding),ee(this.options.endpoint.hostname)){var Ke=this.options,ot=Ke.region,ut=Ke.internal,ft=Ke.secure,wt=ie(ot,ut,ft);Re.host="".concat(Ne.bucket,".").concat(wt.host)}var Je=ue.bind(this)(Ne);ke("request %s %s, with headers %j, !!stream: %s",Ne.method,Je,Re,!!Ne.stream);var nt=Ne.timeout||this.options.timeout,xt={method:Ne.method,content:Ne.content,stream:Ne.stream,headers:Re,timeout:nt,writeStream:Ne.writeStream,customResponse:Ne.customResponse,ctx:Ne.ctx||this.ctx};return this.agent&&(xt.agent=this.agent),this.httpsAgent&&(xt.httpsAgent=this.httpsAgent),xt.enableProxy=!!this.options.enableProxy,xt.proxy=this.options.proxy?this.options.proxy:null,{url:Je,params:xt}}De.createRequest=Fe}).call(this)}).call(this,oe("buffer").Buffer)},{"../client/getReqUrl":25,"./../../../shims/crypto/crypto.js":461,"./encoder":59,"./isDingTalk":66,"./isIP":69,"./setRegion":75,buffer:90,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.includes.js":302,dateformat:342,debug:465,mime:374,path:378}],57:[function(oe,Ge,De){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.entries.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.object.keys.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.dataFix=void 0;var fe=oe("./isObject"),me=["true","TRUE","1",1],ke=["false","FALSE","0",0];function Ce(ve,we,de){if(fe.isObject(ve)){var z=we.remove,ee=z===void 0?[]:z,ae=we.rename,ie=ae===void 0?{}:ae,le=we.camel,ue=le===void 0?[]:le,ge=we.bool,Pe=ge===void 0?[]:ge,je=we.lowerFirst,Be=je===void 0?!1:je;return ee.forEach(function(Fe){return delete ve[Fe]}),Object.entries(ie).forEach(function(Fe){ve[Fe[0]]&&(ve[Fe[1]]||(ve[Fe[1]]=ve[Fe[0]],delete ve[Fe[0]]))}),ue.forEach(function(Fe){if(ve[Fe]){var Ne=Fe.replace(/^(.)/,function(Ae){return Ae.toLowerCase()}).replace(/-(\w)/g,function(Ae,Re){return Re.toUpperCase()});ve[Ne]||(ve[Ne]=ve[Fe])}}),Pe.forEach(function(Fe){ve[Fe]=Se(ve[Fe])}),typeof de=="function"&&de(ve),Me(ve,Be),Ce}}De.dataFix=Ce;function Se(ve){return ve?me.includes(ve)?!0:ke.includes(ve)?!1:ve:!1}function Me(ve,we){we&&Object.keys(ve).forEach(function(de){var z=de.replace(/^\w/,function(ee){return ee.toLowerCase()});typeof ve[z]=="undefined"&&(ve[z]=ve[de],delete ve[de])})}},{"./isObject":70,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.entries.js":288,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],58:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault");oe("core-js/modules/es.array.slice.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js");var me=fe(oe("@babel/runtime/helpers/typeof"));Object.defineProperty(De,"__esModule",{value:!0}),De.deepCopyWith=De.deepCopy=void 0;var ke=oe("./isBuffer");De.deepCopy=function(Ce){if(Ce===null||(0,me.default)(Ce)!=="object")return Ce;if(ke.isBuffer(Ce))return Ce.slice();var Se=Array.isArray(Ce)?[]:{};return Object.keys(Ce).forEach(function(Me){Se[Me]=De.deepCopy(Ce[Me])}),Se},De.deepCopyWith=function(Ce,Se){function Me(ve,we,de){var z=Se(ve,we,de);if(z!==void 0)return z;if(ve===null||(0,me.default)(ve)!=="object")return ve;if(ke.isBuffer(ve))return ve.slice();var ee=Array.isArray(ve)?[]:{};return Object.keys(ve).forEach(function(ae){ee[ae]=Me(ve[ae],ae,ve)}),ee}return Se?Me(Ce,"",null):De.deepCopy(Ce)}},{"./isBuffer":65,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],59:[function(oe,Ge,De){(function(fe){(function(){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.encoder=void 0;function me(ke){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"utf-8";return Ce==="utf-8"?ke:fe.from(ke).toString("latin1")}De.encoder=me}).call(this)}).call(this,oe("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],60:[function(oe,Ge,De){"use strict";oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.formatInventoryConfig=void 0;var fe=oe("../utils/dataFix"),me=oe("../utils/isObject"),ke=oe("../utils/isArray"),Ce=oe("../utils/formatObjKey");function Se(ve){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return we&&me.isObject(ve)&&(ve=[ve]),ke.isArray(ve)?ve=ve.map(Me):ve=Me(ve),ve}De.formatInventoryConfig=Se;function Me(ve){return fe.dataFix(ve,{bool:["IsEnabled"]},function(we){var de,z;we.prefix=we.Filter.Prefix,delete we.Filter,we.OSSBucketDestination=we.Destination.OSSBucketDestination,we.OSSBucketDestination.rolename=we.OSSBucketDestination.RoleArn.replace(/.*\//,""),delete we.OSSBucketDestination.RoleArn,we.OSSBucketDestination.bucket=we.OSSBucketDestination.Bucket.replace(/.*:::/,""),delete we.OSSBucketDestination.Bucket,delete we.Destination,we.frequency=we.Schedule.Frequency,delete we.Schedule.Frequency,!((de=we==null?void 0:we.OptionalFields)===null||de===void 0)&&de.Field&&!ke.isArray((z=we.OptionalFields)===null||z===void 0?void 0:z.Field)&&(we.OptionalFields.Field=[we.OptionalFields.Field])}),ve=Ce.formatObjKey(ve,"firstLowerCase",{exclude:["OSSBucketDestination","SSE-OSS","SSE-KMS"]}),ve}},{"../utils/dataFix":57,"../utils/formatObjKey":61,"../utils/isArray":63,"../utils/isObject":70,"core-js/modules/es.array.map.js":280,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305}],61:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault");oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.string.includes.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js");var me=fe(oe("@babel/runtime/helpers/typeof"));Object.defineProperty(De,"__esModule",{value:!0}),De.formatObjKey=void 0;function ke(Se,Me,ve){if(Se===null||(0,me.default)(Se)!=="object")return Se;var we;if(Array.isArray(Se)){we=[];for(var de=0;de<Se.length;de++)we.push(ke(Se[de],Me,ve))}else we={},Object.keys(Se).forEach(function(z){we[Ce(z,Me,ve)]=ke(Se[z],Me,ve)});return we}De.formatObjKey=ke;function Ce(Se,Me,ve){return ve&&ve.exclude&&ve.exclude.includes(Se)||(Me==="firstUpperCase"?Se=Se.replace(/^./,function(we){return we.toUpperCase()}):Me==="firstLowerCase"&&(Se=Se.replace(/^./,function(we){return we.toLowerCase()}))),Se}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.includes.js":302,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],62:[function(oe,Ge,De){"use strict";oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.getStrBytesCount=void 0;function fe(me){for(var ke=0,Ce=0;Ce<me.length;Ce++){var Se=me.charAt(Ce);/^[\u00-\uff]$/.test(Se)?ke+=1:ke+=2}return ke}De.getStrBytesCount=fe},{"core-js/modules/es.regexp.exec.js":300}],63:[function(oe,Ge,De){"use strict";oe("core-js/modules/es.object.to-string.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.isArray=void 0,De.isArray=function(fe){return Object.prototype.toString.call(fe)==="[object Array]"}},{"core-js/modules/es.object.to-string.js":291}],64:[function(oe,Ge,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.isBlob=void 0;function fe(me){return typeof Blob!="undefined"&&me instanceof Blob}De.isBlob=fe},{}],65:[function(oe,Ge,De){(function(fe){(function(){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.isBuffer=void 0;function me(ke){return fe.isBuffer(ke)}De.isBuffer=me}).call(this)}).call(this,{isBuffer:oe("../../../node_modules/is-buffer/index.js")})},{"../../../node_modules/is-buffer/index.js":366}],66:[function(oe,Ge,De){(function(fe){(function(){"use strict";oe("core-js/modules/es.array.includes.js"),oe("core-js/modules/es.string.includes.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.isDingTalk=void 0;function me(){return!!(fe.browser&&window.navigator.userAgent.toLowerCase().includes("aliapp(dingtalk"))}De.isDingTalk=me}).call(this)}).call(this,oe("_process"))},{_process:467,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.string.includes.js":302}],67:[function(oe,Ge,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.isFile=void 0,De.isFile=function(fe){return typeof File!="undefined"&&fe instanceof File}},{}],68:[function(oe,Ge,De){"use strict";Object.defineProperty(De,"__esModule",{value:!0}),De.isFunction=void 0,De.isFunction=function(fe){return typeof fe=="function"}},{}],69:[function(oe,Ge,De){"use strict";oe("core-js/modules/es.regexp.exec.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.isIP=void 0,De.isIP=function(fe){var me=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,ke=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return me.test(fe)||ke.test(fe)}},{"core-js/modules/es.regexp.exec.js":300}],70:[function(oe,Ge,De){"use strict";oe("core-js/modules/es.object.to-string.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.isObject=void 0,De.isObject=function(fe){return Object.prototype.toString.call(fe)==="[object Object]"}},{"core-js/modules/es.object.to-string.js":291}],71:[function(oe,Ge,De){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.lowercaseKeyHeader=void 0;var fe=oe("./isObject");function me(ke){var Ce={};return fe.isObject(ke)&&Object.keys(ke).forEach(function(Se){Ce[Se.toLowerCase()]=ke[Se]}),Ce}De.lowercaseKeyHeader=me},{"./isObject":70,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],72:[function(oe,Ge,De){"use strict";oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.array.join.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.obj2xml=void 0;var fe=oe("./formatObjKey");function me(Ce){return Object.prototype.toString.call(Ce).replace(/(.*? |])/g,"").toLowerCase()}function ke(Ce,Se){var Me="";return Se&&Se.headers&&(Me=`<?xml version="1.0" encoding="UTF-8"?>
`),Se&&Se.firstUpperCase&&(Ce=fe.formatObjKey(Ce,"firstUpperCase")),me(Ce)==="object"?Object.keys(Ce).forEach(function(ve){me(Ce[ve])!=="undefined"&&me(Ce[ve])!=="null"&&(me(Ce[ve])==="string"||me(Ce[ve])==="number"?Me+="<".concat(ve,">").concat(Ce[ve],"</").concat(ve,">"):me(Ce[ve])==="object"?Me+="<".concat(ve,">").concat(ke(Ce[ve]),"</").concat(ve,">"):me(Ce[ve])==="array"?Me+=Ce[ve].map(function(we){return"<".concat(ve,">").concat(ke(we),"</").concat(ve,">")}).join(""):Me+="<".concat(ve,">").concat(Ce[ve].toString(),"</").concat(ve,">"))}):Me+=Ce.toString(),Me}De.obj2xml=ke},{"./formatObjKey":61,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.map.js":280,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],73:[function(oe,Ge,De){"use strict";oe("core-js/modules/es.array.slice.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.array.from.js"),oe("core-js/modules/es.string.iterator.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.symbol.js"),oe("core-js/modules/es.symbol.description.js"),oe("core-js/modules/es.symbol.iterator.js"),oe("core-js/modules/es.array.iterator.js"),oe("core-js/modules/web.dom-collections.iterator.js"),oe("core-js/modules/es.object.assign.js");function fe(Se,Me){var ve=typeof Symbol!="undefined"&&Se[Symbol.iterator]||Se["@@iterator"];if(!ve){if(Array.isArray(Se)||(ve=me(Se))||Me&&Se&&typeof Se.length=="number"){ve&&(Se=ve);var we=0,de=function(){};return{s:de,n:function(){return we>=Se.length?{done:!0}:{done:!1,value:Se[we++]}},e:function(le){throw le},f:de}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var z=!0,ee=!1,ae;return{s:function(){ve=ve.call(Se)},n:function(){var le=ve.next();return z=le.done,le},e:function(le){ee=!0,ae=le},f:function(){try{!z&&ve.return!=null&&ve.return()}finally{if(ee)throw ae}}}}function me(Se,Me){if(Se){if(typeof Se=="string")return ke(Se,Me);var ve=Object.prototype.toString.call(Se).slice(8,-1);if(ve==="Object"&&Se.constructor&&(ve=Se.constructor.name),ve==="Map"||ve==="Set")return Array.from(Se);if(ve==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ve))return ke(Se,Me)}}function ke(Se,Me){(Me==null||Me>Se.length)&&(Me=Se.length);for(var ve=0,we=new Array(Me);ve<Me;ve++)we[ve]=Se[ve];return we}Object.defineProperty(De,"__esModule",{value:!0}),De.omit=void 0;function Ce(Se,Me){var ve=Object.assign({},Se),we=fe(Me),de;try{for(we.s();!(de=we.n()).done;){var z=de.value;delete ve[z]}}catch(ee){we.e(ee)}finally{we.f()}return ve}De.omit=Ce},{"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.iterator.js":303,"core-js/modules/es.symbol.description.js":310,"core-js/modules/es.symbol.iterator.js":312,"core-js/modules/es.symbol.js":313,"core-js/modules/web.dom-collections.iterator.js":340}],74:[function(oe,Ge,De){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),Object.defineProperty(De,"__esModule",{value:!0}),De.retry=void 0;function fe(me,ke){var Ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Se=0,Me=Ce.retryDelay,ve=Me===void 0?500:Me,we=Ce.errorHandler,de=we===void 0?function(){return!0}:we,z=function ee(){for(var ae=arguments.length,ie=new Array(ae),le=0;le<ae;le++)ie[le]=arguments[le];return new Promise(function(ue,ge){me.apply(void 0,ie).then(function(Pe){Se=0,ue(Pe)}).catch(function(Pe){Se<ke&&de(Pe)?(Se++,setTimeout(function(){ue(ee.apply(void 0,ie))},ve)):(Se=0,ge(Pe))})})};return z}De.retry=fe},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],75:[function(oe,Ge,De){"use strict";var fe=function(Se){return Se&&Se.__esModule?Se:{default:Se}};Object.defineProperty(De,"__esModule",{value:!0}),De.setRegion=void 0;var me=fe(oe("url")),ke=oe("./checkConfigValid");function Ce(Se){var Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;ke.checkConfigValid(Se,"region");var we=ve?"https://":"http://",de=Me?"-internal.aliyuncs.com":".aliyuncs.com",z="vpc100-oss-cn-";return Se.substr(0,z.length)===z&&(de=".aliyuncs.com"),me.default.parse(we+Se+de)}De.setRegion=Ce},{"./checkConfigValid":52,url:472}],76:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/regenerator"));oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.array.find.js"),oe("core-js/modules/es.object.assign.js");var ke=fe(oe("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(De,"__esModule",{value:!0}),De.checkCredentials=De.setSTSToken=void 0;var Ce=oe("./formatObjKey");function Se(){return Me.apply(this,arguments)}function Me(){return Me=(0,ke.default)(me.default.mark(function we(){var de,z;return me.default.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:if(this.options||(this.options={}),de=new Date,!this.stsTokenFreshTime){ae.next=14;break}if(!(+de-this.stsTokenFreshTime>=this.options.refreshSTSTokenInterval)){ae.next=12;break}return this.stsTokenFreshTime=de,ae.next=7,this.options.refreshSTSToken();case 7:z=ae.sent,z=Ce.formatObjKey(z,"firstLowerCase"),z.securityToken&&(z.stsToken=z.securityToken),ve(z),Object.assign(this.options,z);case 12:ae.next=15;break;case 14:this.stsTokenFreshTime=de;case 15:return ae.abrupt("return",null);case 16:case"end":return ae.stop()}},we,this)})),Me.apply(this,arguments)}De.setSTSToken=Se;function ve(we){var de=["accessKeySecret","accessKeyId","stsToken"],z=Object.keys(we);de.forEach(function(ee){if(!z.find(function(ae){return ae===ee}))throw Error("refreshSTSToken must return contains ".concat(ee))})}De.checkCredentials=ve},{"./formatObjKey":61,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.find.js":275,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291}],77:[function(oe,Ge,De){function fe(ke,Ce,Se,Me,ve,we,de){try{var z=ke[we](de),ee=z.value}catch(ae){Se(ae);return}z.done?Ce(ee):Promise.resolve(ee).then(Me,ve)}function me(ke){return function(){var Ce=this,Se=arguments;return new Promise(function(Me,ve){var we=ke.apply(Ce,Se);function de(ee){fe(we,Me,ve,de,z,"next",ee)}function z(ee){fe(we,Me,ve,de,z,"throw",ee)}de(void 0)})}}Ge.exports=me,Ge.exports.__esModule=!0,Ge.exports.default=Ge.exports},{}],78:[function(oe,Ge,De){function fe(me){return me&&me.__esModule?me:{default:me}}Ge.exports=fe,Ge.exports.__esModule=!0,Ge.exports.default=Ge.exports},{}],79:[function(oe,Ge,De){function fe(me){"@babel/helpers - typeof";return Ge.exports=fe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ke){return typeof ke}:function(ke){return ke&&typeof Symbol=="function"&&ke.constructor===Symbol&&ke!==Symbol.prototype?"symbol":typeof ke},Ge.exports.__esModule=!0,Ge.exports.default=Ge.exports,fe(me)}Ge.exports=fe,Ge.exports.__esModule=!0,Ge.exports.default=Ge.exports},{}],80:[function(oe,Ge,De){Ge.exports=oe("regenerator-runtime")},{"regenerator-runtime":395}],81:[function(oe,Ge,De){Ge.exports=fe,Ge.exports.HttpsAgent=fe;function fe(){}},{}],82:[function(oe,Ge,De){(function(fe){(function(){"use strict";var me=oe("object-assign");function ke(ot,ut){if(ot===ut)return 0;for(var ft=ot.length,wt=ut.length,Je=0,nt=Math.min(ft,wt);Je<nt;++Je)if(ot[Je]!==ut[Je]){ft=ot[Je],wt=ut[Je];break}return ft<wt?-1:wt<ft?1:0}function Ce(ot){return fe.Buffer&&typeof fe.Buffer.isBuffer=="function"?fe.Buffer.isBuffer(ot):!!(ot!=null&&ot._isBuffer)}var Se=oe("util/"),Me=Object.prototype.hasOwnProperty,ve=Array.prototype.slice,we=function(){return function(){}.name==="foo"}();function de(ot){return Object.prototype.toString.call(ot)}function z(ot){return Ce(ot)||typeof fe.ArrayBuffer!="function"?!1:typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(ot):ot?!!(ot instanceof DataView||ot.buffer&&ot.buffer instanceof ArrayBuffer):!1}var ee=Ge.exports=je,ae=/\s*function\s+([^\(\s]*)\s*/;function ie(ot){if(Se.isFunction(ot)){if(we)return ot.name;var ut=ot.toString(),ft=ut.match(ae);return ft&&ft[1]}}ee.AssertionError=function(ut){this.name="AssertionError",this.actual=ut.actual,this.expected=ut.expected,this.operator=ut.operator,ut.message?(this.message=ut.message,this.generatedMessage=!1):(this.message=ge(this),this.generatedMessage=!0);var ft=ut.stackStartFunction||Pe;if(Error.captureStackTrace)Error.captureStackTrace(this,ft);else{var wt=new Error;if(wt.stack){var Je=wt.stack,nt=ie(ft),xt=Je.indexOf(`
`+nt);if(xt>=0){var Pt=Je.indexOf(`
`,xt+1);Je=Je.substring(Pt+1)}this.stack=Je}}},Se.inherits(ee.AssertionError,Error);function le(ot,ut){return typeof ot=="string"?ot.length<ut?ot:ot.slice(0,ut):ot}function ue(ot){if(we||!Se.isFunction(ot))return Se.inspect(ot);var ut=ie(ot),ft=ut?": "+ut:"";return"[Function"+ft+"]"}function ge(ot){return le(ue(ot.actual),128)+" "+ot.operator+" "+le(ue(ot.expected),128)}function Pe(ot,ut,ft,wt,Je){throw new ee.AssertionError({message:ft,actual:ot,expected:ut,operator:wt,stackStartFunction:Je})}ee.fail=Pe;function je(ot,ut){ot||Pe(ot,!0,ut,"==",ee.ok)}ee.ok=je,ee.equal=function(ut,ft,wt){ut!=ft&&Pe(ut,ft,wt,"==",ee.equal)},ee.notEqual=function(ut,ft,wt){ut==ft&&Pe(ut,ft,wt,"!=",ee.notEqual)},ee.deepEqual=function(ut,ft,wt){Be(ut,ft,!1)||Pe(ut,ft,wt,"deepEqual",ee.deepEqual)},ee.deepStrictEqual=function(ut,ft,wt){Be(ut,ft,!0)||Pe(ut,ft,wt,"deepStrictEqual",ee.deepStrictEqual)};function Be(ot,ut,ft,wt){if(ot===ut)return!0;if(Ce(ot)&&Ce(ut))return ke(ot,ut)===0;if(Se.isDate(ot)&&Se.isDate(ut))return ot.getTime()===ut.getTime();if(Se.isRegExp(ot)&&Se.isRegExp(ut))return ot.source===ut.source&&ot.global===ut.global&&ot.multiline===ut.multiline&&ot.lastIndex===ut.lastIndex&&ot.ignoreCase===ut.ignoreCase;if((ot===null||typeof ot!="object")&&(ut===null||typeof ut!="object"))return ft?ot===ut:ot==ut;if(z(ot)&&z(ut)&&de(ot)===de(ut)&&!(ot instanceof Float32Array||ot instanceof Float64Array))return ke(new Uint8Array(ot.buffer),new Uint8Array(ut.buffer))===0;if(Ce(ot)!==Ce(ut))return!1;wt=wt||{actual:[],expected:[]};var Je=wt.actual.indexOf(ot);return Je!==-1&&Je===wt.expected.indexOf(ut)?!0:(wt.actual.push(ot),wt.expected.push(ut),Ne(ot,ut,ft,wt))}function Fe(ot){return Object.prototype.toString.call(ot)=="[object Arguments]"}function Ne(ot,ut,ft,wt){if(ot==null||ut===null||ut===void 0)return!1;if(Se.isPrimitive(ot)||Se.isPrimitive(ut))return ot===ut;if(ft&&Object.getPrototypeOf(ot)!==Object.getPrototypeOf(ut))return!1;var Je=Fe(ot),nt=Fe(ut);if(Je&&!nt||!Je&&nt)return!1;if(Je)return ot=ve.call(ot),ut=ve.call(ut),Be(ot,ut,ft);var xt=Ke(ot),Pt=Ke(ut),Ct,gt;if(xt.length!==Pt.length)return!1;for(xt.sort(),Pt.sort(),gt=xt.length-1;gt>=0;gt--)if(xt[gt]!==Pt[gt])return!1;for(gt=xt.length-1;gt>=0;gt--)if(Ct=xt[gt],!Be(ot[Ct],ut[Ct],ft,wt))return!1;return!0}ee.notDeepEqual=function(ut,ft,wt){Be(ut,ft,!1)&&Pe(ut,ft,wt,"notDeepEqual",ee.notDeepEqual)},ee.notDeepStrictEqual=Ae;function Ae(ot,ut,ft){Be(ot,ut,!0)&&Pe(ot,ut,ft,"notDeepStrictEqual",Ae)}ee.strictEqual=function(ut,ft,wt){ut!==ft&&Pe(ut,ft,wt,"===",ee.strictEqual)},ee.notStrictEqual=function(ut,ft,wt){ut===ft&&Pe(ut,ft,wt,"!==",ee.notStrictEqual)};function Re(ot,ut){if(!ot||!ut)return!1;if(Object.prototype.toString.call(ut)=="[object RegExp]")return ut.test(ot);try{if(ot instanceof ut)return!0}catch(ft){}return Error.isPrototypeOf(ut)?!1:ut.call({},ot)===!0}function We(ot){var ut;try{ot()}catch(ft){ut=ft}return ut}function Ye(ot,ut,ft,wt){var Je;if(typeof ut!="function")throw new TypeError('"block" argument must be a function');typeof ft=="string"&&(wt=ft,ft=null),Je=We(ut),wt=(ft&&ft.name?" ("+ft.name+").":".")+(wt?" "+wt:"."),ot&&!Je&&Pe(Je,ft,"Missing expected exception"+wt);var nt=typeof wt=="string",xt=!ot&&Se.isError(Je),Pt=!ot&&Je&&!ft;if((xt&&nt&&Re(Je,ft)||Pt)&&Pe(Je,ft,"Got unwanted exception"+wt),ot&&Je&&ft&&!Re(Je,ft)||!ot&&Je)throw Je}ee.throws=function(ot,ut,ft){Ye(!0,ot,ut,ft)},ee.doesNotThrow=function(ot,ut,ft){Ye(!1,ot,ut,ft)},ee.ifError=function(ot){if(ot)throw ot};function Ue(ot,ut){ot||Pe(ot,!0,ut,"==",Ue)}ee.strict=me(Ue,ee,{equal:ee.strictEqual,deepEqual:ee.deepStrictEqual,notEqual:ee.notStrictEqual,notDeepEqual:ee.notDeepStrictEqual}),ee.strict.strict=ee.strict;var Ke=Object.keys||function(ot){var ut=[];for(var ft in ot)Me.call(ot,ft)&&ut.push(ft);return ut}}).call(this)}).call(this,typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"object-assign":377,"util/":85}],83:[function(oe,Ge,De){typeof Object.create=="function"?Ge.exports=function(me,ke){me.super_=ke,me.prototype=Object.create(ke.prototype,{constructor:{value:me,enumerable:!1,writable:!0,configurable:!0}})}:Ge.exports=function(me,ke){me.super_=ke;var Ce=function(){};Ce.prototype=ke.prototype,me.prototype=new Ce,me.prototype.constructor=me}},{}],84:[function(oe,Ge,De){Ge.exports=function(me){return me&&typeof me=="object"&&typeof me.copy=="function"&&typeof me.fill=="function"&&typeof me.readUInt8=="function"}},{}],85:[function(oe,Ge,De){(function(fe,me){(function(){var ke=/%[sdj%]/g;De.format=function(Pt){if(!Ne(Pt)){for(var Ct=[],gt=0;gt<arguments.length;gt++)Ct.push(Me(arguments[gt]));return Ct.join(" ")}for(var gt=1,dt=arguments,ht=dt.length,Et=String(Pt).replace(ke,function(Ft){if(Ft==="%%")return"%";if(gt>=ht)return Ft;switch(Ft){case"%s":return String(dt[gt++]);case"%d":return Number(dt[gt++]);case"%j":try{return JSON.stringify(dt[gt++])}catch(mt){return"[Circular]"}default:return Ft}}),St=dt[gt];gt<ht;St=dt[++gt])je(St)||!Ye(St)?Et+=" "+St:Et+=" "+Me(St);return Et},De.deprecate=function(Pt,Ct){if(Re(me.process))return function(){return De.deprecate(Pt,Ct).apply(this,arguments)};if(fe.noDeprecation===!0)return Pt;var gt=!1;function dt(){if(!gt){if(fe.throwDeprecation)throw new Error(Ct);fe.traceDeprecation?console.trace(Ct):console.error(Ct),gt=!0}return Pt.apply(this,arguments)}return dt};var Ce={},Se;De.debuglog=function(Pt){if(Re(Se)&&(Se=fe.env.NODE_DEBUG||""),Pt=Pt.toUpperCase(),!Ce[Pt])if(new RegExp("\\b"+Pt+"\\b","i").test(Se)){var Ct=fe.pid;Ce[Pt]=function(){var gt=De.format.apply(De,arguments);console.error("%s %d: %s",Pt,Ct,gt)}}else Ce[Pt]=function(){};return Ce[Pt]};function Me(Pt,Ct){var gt={seen:[],stylize:we};return arguments.length>=3&&(gt.depth=arguments[2]),arguments.length>=4&&(gt.colors=arguments[3]),Pe(Ct)?gt.showHidden=Ct:Ct&&De._extend(gt,Ct),Re(gt.showHidden)&&(gt.showHidden=!1),Re(gt.depth)&&(gt.depth=2),Re(gt.colors)&&(gt.colors=!1),Re(gt.customInspect)&&(gt.customInspect=!0),gt.colors&&(gt.stylize=ve),z(gt,Pt,gt.depth)}De.inspect=Me,Me.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Me.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function ve(Pt,Ct){var gt=Me.styles[Ct];return gt?"\x1B["+Me.colors[gt][0]+"m"+Pt+"\x1B["+Me.colors[gt][1]+"m":Pt}function we(Pt,Ct){return Pt}function de(Pt){var Ct={};return Pt.forEach(function(gt,dt){Ct[gt]=!0}),Ct}function z(Pt,Ct,gt){if(Pt.customInspect&&Ct&&ot(Ct.inspect)&&Ct.inspect!==De.inspect&&!(Ct.constructor&&Ct.constructor.prototype===Ct)){var dt=Ct.inspect(gt,Pt);return Ne(dt)||(dt=z(Pt,dt,gt)),dt}var ht=ee(Pt,Ct);if(ht)return ht;var Et=Object.keys(Ct),St=de(Et);if(Pt.showHidden&&(Et=Object.getOwnPropertyNames(Ct)),Ke(Ct)&&(Et.indexOf("message")>=0||Et.indexOf("description")>=0))return ae(Ct);if(Et.length===0){if(ot(Ct)){var Ft=Ct.name?": "+Ct.name:"";return Pt.stylize("[Function"+Ft+"]","special")}if(We(Ct))return Pt.stylize(RegExp.prototype.toString.call(Ct),"regexp");if(Ue(Ct))return Pt.stylize(Date.prototype.toString.call(Ct),"date");if(Ke(Ct))return ae(Ct)}var mt="",yt=!1,tt=["{","}"];if(ge(Ct)&&(yt=!0,tt=["[","]"]),ot(Ct)){var Ve=Ct.name?": "+Ct.name:"";mt=" [Function"+Ve+"]"}if(We(Ct)&&(mt=" "+RegExp.prototype.toString.call(Ct)),Ue(Ct)&&(mt=" "+Date.prototype.toUTCString.call(Ct)),Ke(Ct)&&(mt=" "+ae(Ct)),Et.length===0&&(!yt||Ct.length==0))return tt[0]+mt+tt[1];if(gt<0)return We(Ct)?Pt.stylize(RegExp.prototype.toString.call(Ct),"regexp"):Pt.stylize("[Object]","special");Pt.seen.push(Ct);var xe;return yt?xe=ie(Pt,Ct,gt,St,Et):xe=Et.map(function(Le){return le(Pt,Ct,gt,St,Le,yt)}),Pt.seen.pop(),ue(xe,mt,tt)}function ee(Pt,Ct){if(Re(Ct))return Pt.stylize("undefined","undefined");if(Ne(Ct)){var gt="'"+JSON.stringify(Ct).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return Pt.stylize(gt,"string")}if(Fe(Ct))return Pt.stylize(""+Ct,"number");if(Pe(Ct))return Pt.stylize(""+Ct,"boolean");if(je(Ct))return Pt.stylize("null","null")}function ae(Pt){return"["+Error.prototype.toString.call(Pt)+"]"}function ie(Pt,Ct,gt,dt,ht){for(var Et=[],St=0,Ft=Ct.length;St<Ft;++St)xt(Ct,String(St))?Et.push(le(Pt,Ct,gt,dt,String(St),!0)):Et.push("");return ht.forEach(function(mt){mt.match(/^\d+$/)||Et.push(le(Pt,Ct,gt,dt,mt,!0))}),Et}function le(Pt,Ct,gt,dt,ht,Et){var St,Ft,mt;if(mt=Object.getOwnPropertyDescriptor(Ct,ht)||{value:Ct[ht]},mt.get?mt.set?Ft=Pt.stylize("[Getter/Setter]","special"):Ft=Pt.stylize("[Getter]","special"):mt.set&&(Ft=Pt.stylize("[Setter]","special")),xt(dt,ht)||(St="["+ht+"]"),Ft||(Pt.seen.indexOf(mt.value)<0?(je(gt)?Ft=z(Pt,mt.value,null):Ft=z(Pt,mt.value,gt-1),Ft.indexOf(`
`)>-1&&(Et?Ft=Ft.split(`
`).map(function(yt){return" "+yt}).join(`
`).substr(2):Ft=`
`+Ft.split(`
`).map(function(yt){return" "+yt}).join(`
`))):Ft=Pt.stylize("[Circular]","special")),Re(St)){if(Et&&ht.match(/^\d+$/))return Ft;St=JSON.stringify(""+ht),St.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(St=St.substr(1,St.length-2),St=Pt.stylize(St,"name")):(St=St.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),St=Pt.stylize(St,"string"))}return St+": "+Ft}function ue(Pt,Ct,gt){var dt=0,ht=Pt.reduce(function(Et,St){return dt++,St.indexOf(`
`)>=0&&dt++,Et+St.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ht>60?gt[0]+(Ct===""?"":Ct+`
`)+" "+Pt.join(`,
`)+" "+gt[1]:gt[0]+Ct+" "+Pt.join(", ")+" "+gt[1]}function ge(Pt){return Array.isArray(Pt)}De.isArray=ge;function Pe(Pt){return typeof Pt=="boolean"}De.isBoolean=Pe;function je(Pt){return Pt===null}De.isNull=je;function Be(Pt){return Pt==null}De.isNullOrUndefined=Be;function Fe(Pt){return typeof Pt=="number"}De.isNumber=Fe;function Ne(Pt){return typeof Pt=="string"}De.isString=Ne;function Ae(Pt){return typeof Pt=="symbol"}De.isSymbol=Ae;function Re(Pt){return Pt===void 0}De.isUndefined=Re;function We(Pt){return Ye(Pt)&&ft(Pt)==="[object RegExp]"}De.isRegExp=We;function Ye(Pt){return typeof Pt=="object"&&Pt!==null}De.isObject=Ye;function Ue(Pt){return Ye(Pt)&&ft(Pt)==="[object Date]"}De.isDate=Ue;function Ke(Pt){return Ye(Pt)&&(ft(Pt)==="[object Error]"||Pt instanceof Error)}De.isError=Ke;function ot(Pt){return typeof Pt=="function"}De.isFunction=ot;function ut(Pt){return Pt===null||typeof Pt=="boolean"||typeof Pt=="number"||typeof Pt=="string"||typeof Pt=="symbol"||typeof Pt=="undefined"}De.isPrimitive=ut,De.isBuffer=oe("./support/isBuffer");function ft(Pt){return Object.prototype.toString.call(Pt)}function wt(Pt){return Pt<10?"0"+Pt.toString(10):Pt.toString(10)}var Je=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function nt(){var Pt=new Date,Ct=[wt(Pt.getHours()),wt(Pt.getMinutes()),wt(Pt.getSeconds())].join(":");return[Pt.getDate(),Je[Pt.getMonth()],Ct].join(" ")}De.log=function(){console.log("%s - %s",nt(),De.format.apply(De,arguments))},De.inherits=oe("inherits"),De._extend=function(Pt,Ct){if(!Ct||!Ye(Ct))return Pt;for(var gt=Object.keys(Ct),dt=gt.length;dt--;)Pt[gt[dt]]=Ct[gt[dt]];return Pt};function xt(Pt,Ct){return Object.prototype.hasOwnProperty.call(Pt,Ct)}}).call(this)}).call(this,oe("_process"),typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":84,_process:467,inherits:83}],86:[function(oe,Ge,De){(function(fe){(function(){"use strict";var me=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],ke=typeof globalThis=="undefined"?fe:globalThis;Ge.exports=function(){for(var Se=[],Me=0;Me<me.length;Me++)typeof ke[me[Me]]=="function"&&(Se[Se.length]=me[Me]);return Se}}).call(this)}).call(this,typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],87:[function(oe,Ge,De){"use strict";De.byteLength=we,De.toByteArray=z,De.fromByteArray=ie;for(var fe=[],me=[],ke=typeof Uint8Array!="undefined"?Uint8Array:Array,Ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Se=0,Me=Ce.length;Se<Me;++Se)fe[Se]=Ce[Se],me[Ce.charCodeAt(Se)]=Se;me[45]=62,me[95]=63;function ve(le){var ue=le.length;if(ue%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var ge=le.indexOf("=");ge===-1&&(ge=ue);var Pe=ge===ue?0:4-ge%4;return[ge,Pe]}function we(le){var ue=ve(le),ge=ue[0],Pe=ue[1];return(ge+Pe)*3/4-Pe}function de(le,ue,ge){return(ue+ge)*3/4-ge}function z(le){var ue,ge=ve(le),Pe=ge[0],je=ge[1],Be=new ke(de(le,Pe,je)),Fe=0,Ne=je>0?Pe-4:Pe,Ae;for(Ae=0;Ae<Ne;Ae+=4)ue=me[le.charCodeAt(Ae)]<<18|me[le.charCodeAt(Ae+1)]<<12|me[le.charCodeAt(Ae+2)]<<6|me[le.charCodeAt(Ae+3)],Be[Fe++]=ue>>16&255,Be[Fe++]=ue>>8&255,Be[Fe++]=ue&255;return je===2&&(ue=me[le.charCodeAt(Ae)]<<2|me[le.charCodeAt(Ae+1)]>>4,Be[Fe++]=ue&255),je===1&&(ue=me[le.charCodeAt(Ae)]<<10|me[le.charCodeAt(Ae+1)]<<4|me[le.charCodeAt(Ae+2)]>>2,Be[Fe++]=ue>>8&255,Be[Fe++]=ue&255),Be}function ee(le){return fe[le>>18&63]+fe[le>>12&63]+fe[le>>6&63]+fe[le&63]}function ae(le,ue,ge){for(var Pe,je=[],Be=ue;Be<ge;Be+=3)Pe=(le[Be]<<16&16711680)+(le[Be+1]<<8&65280)+(le[Be+2]&255),je.push(ee(Pe));return je.join("")}function ie(le){for(var ue,ge=le.length,Pe=ge%3,je=[],Be=16383,Fe=0,Ne=ge-Pe;Fe<Ne;Fe+=Be)je.push(ae(le,Fe,Fe+Be>Ne?Ne:Fe+Be));return Pe===1?(ue=le[ge-1],je.push(fe[ue>>2]+fe[ue<<4&63]+"==")):Pe===2&&(ue=(le[ge-2]<<8)+le[ge-1],je.push(fe[ue>>10]+fe[ue>>4&63]+fe[ue<<2&63]+"=")),je.join("")}},{}],88:[function(oe,Ge,De){(function(fe,me,ke){typeof Ge!="undefined"&&Ge.exports?Ge.exports=ke():typeof st=="function"&&st.amd?st(me,ke):fe[me]=ke()})(this,"bowser",function(){var fe=!0;function me(de){function z(Ct){var gt=de.match(Ct);return gt&&gt.length>1&&gt[1]||""}function ee(Ct){var gt=de.match(Ct);return gt&&gt.length>1&&gt[2]||""}var ae=z(/(ipod|iphone|ipad)/i).toLowerCase(),ie=/like android/i.test(de),le=!ie&&/android/i.test(de),ue=/nexus\s*[0-6]\s*/i.test(de),ge=!ue&&/nexus\s*[0-9]+/i.test(de),Pe=/CrOS/.test(de),je=/silk/i.test(de),Be=/sailfish/i.test(de),Fe=/tizen/i.test(de),Ne=/(web|hpw)(o|0)s/i.test(de),Ae=/windows phone/i.test(de),Re=/SamsungBrowser/i.test(de),We=!Ae&&/windows/i.test(de),Ye=!ae&&!je&&/macintosh/i.test(de),Ue=!le&&!Be&&!Fe&&!Ne&&/linux/i.test(de),Ke=ee(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),ot=z(/version\/(\d+(\.\d+)?)/i),ut=/tablet/i.test(de)&&!/tablet pc/i.test(de),ft=!ut&&/[^-]mobi/i.test(de),wt=/xbox/i.test(de),Je;/opera/i.test(de)?Je={name:"Opera",opera:fe,version:ot||z(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(de)?Je={name:"Opera",opera:fe,version:z(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||ot}:/SamsungBrowser/i.test(de)?Je={name:"Samsung Internet for Android",samsungBrowser:fe,version:ot||z(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(de)?Je={name:"NAVER Whale browser",whale:fe,version:z(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(de)?Je={name:"MZ Browser",mzbrowser:fe,version:z(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(de)?Je={name:"Opera Coast",coast:fe,version:ot||z(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(de)?Je={name:"Focus",focus:fe,version:z(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(de)?Je={name:"Yandex Browser",yandexbrowser:fe,version:ot||z(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(de)?Je={name:"UC Browser",ucbrowser:fe,version:z(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(de)?Je={name:"Maxthon",maxthon:fe,version:z(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(de)?Je={name:"Epiphany",epiphany:fe,version:z(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(de)?Je={name:"Puffin",puffin:fe,version:z(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(de)?Je={name:"Sleipnir",sleipnir:fe,version:z(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(de)?Je={name:"K-Meleon",kMeleon:fe,version:z(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:Ae?(Je={name:"Windows Phone",osname:"Windows Phone",windowsphone:fe},Ke?(Je.msedge=fe,Je.version=Ke):(Je.msie=fe,Je.version=z(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(de)?Je={name:"Internet Explorer",msie:fe,version:z(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:Pe?Je={name:"Chrome",osname:"Chrome OS",chromeos:fe,chromeBook:fe,chrome:fe,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(de)?Je={name:"Microsoft Edge",msedge:fe,version:Ke}:/vivaldi/i.test(de)?Je={name:"Vivaldi",vivaldi:fe,version:z(/vivaldi\/(\d+(\.\d+)?)/i)||ot}:Be?Je={name:"Sailfish",osname:"Sailfish OS",sailfish:fe,version:z(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(de)?Je={name:"SeaMonkey",seamonkey:fe,version:z(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(de)?(Je={name:"Firefox",firefox:fe,version:z(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(de)&&(Je.firefoxos=fe,Je.osname="Firefox OS")):je?Je={name:"Amazon Silk",silk:fe,version:z(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(de)?Je={name:"PhantomJS",phantom:fe,version:z(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(de)?Je={name:"SlimerJS",slimer:fe,version:z(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(de)||/rim\stablet/i.test(de)?Je={name:"BlackBerry",osname:"BlackBerry OS",blackberry:fe,version:ot||z(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:Ne?(Je={name:"WebOS",osname:"WebOS",webos:fe,version:ot||z(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(de)&&(Je.touchpad=fe)):/bada/i.test(de)?Je={name:"Bada",osname:"Bada",bada:fe,version:z(/dolfin\/(\d+(\.\d+)?)/i)}:Fe?Je={name:"Tizen",osname:"Tizen",tizen:fe,version:z(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||ot}:/qupzilla/i.test(de)?Je={name:"QupZilla",qupzilla:fe,version:z(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||ot}:/chromium/i.test(de)?Je={name:"Chromium",chromium:fe,version:z(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||ot}:/chrome|crios|crmo/i.test(de)?Je={name:"Chrome",chrome:fe,version:z(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:le?Je={name:"Android",version:ot}:/safari|applewebkit/i.test(de)?(Je={name:"Safari",safari:fe},ot&&(Je.version=ot)):ae?(Je={name:ae=="iphone"?"iPhone":ae=="ipad"?"iPad":"iPod"},ot&&(Je.version=ot)):/googlebot/i.test(de)?Je={name:"Googlebot",googlebot:fe,version:z(/googlebot\/(\d+(\.\d+))/i)||ot}:Je={name:z(/^(.*)\/(.*) /),version:ee(/^(.*)\/(.*) /)},!Je.msedge&&/(apple)?webkit/i.test(de)?(/(apple)?webkit\/537\.36/i.test(de)?(Je.name=Je.name||"Blink",Je.blink=fe):(Je.name=Je.name||"Webkit",Je.webkit=fe),!Je.version&&ot&&(Je.version=ot)):!Je.opera&&/gecko\//i.test(de)&&(Je.name=Je.name||"Gecko",Je.gecko=fe,Je.version=Je.version||z(/gecko\/(\d+(\.\d+)?)/i)),!Je.windowsphone&&(le||Je.silk)?(Je.android=fe,Je.osname="Android"):!Je.windowsphone&&ae?(Je[ae]=fe,Je.ios=fe,Je.osname="iOS"):Ye?(Je.mac=fe,Je.osname="macOS"):wt?(Je.xbox=fe,Je.osname="Xbox"):We?(Je.windows=fe,Je.osname="Windows"):Ue&&(Je.linux=fe,Je.osname="Linux");function nt(Ct){switch(Ct){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var xt="";Je.windows?xt=nt(z(/Windows ((NT|XP)( \d\d?.\d)?)/i)):Je.windowsphone?xt=z(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):Je.mac?(xt=z(/Mac OS X (\d+([_\.\s]\d+)*)/i),xt=xt.replace(/[_\s]/g,".")):ae?(xt=z(/os (\d+([_\s]\d+)*) like mac os x/i),xt=xt.replace(/[_\s]/g,".")):le?xt=z(/android[ \/-](\d+(\.\d+)*)/i):Je.webos?xt=z(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):Je.blackberry?xt=z(/rim\stablet\sos\s(\d+(\.\d+)*)/i):Je.bada?xt=z(/bada\/(\d+(\.\d+)*)/i):Je.tizen&&(xt=z(/tizen[\/\s](\d+(\.\d+)*)/i)),xt&&(Je.osversion=xt);var Pt=!Je.windows&&xt.split(".")[0];return ut||ge||ae=="ipad"||le&&(Pt==3||Pt>=4&&!ft)||Je.silk?Je.tablet=fe:(ft||ae=="iphone"||ae=="ipod"||le||ue||Je.blackberry||Je.webos||Je.bada)&&(Je.mobile=fe),Je.msedge||Je.msie&&Je.version>=10||Je.yandexbrowser&&Je.version>=15||Je.vivaldi&&Je.version>=1||Je.chrome&&Je.version>=20||Je.samsungBrowser&&Je.version>=4||Je.whale&&Me([Je.version,"1.0"])===1||Je.mzbrowser&&Me([Je.version,"6.0"])===1||Je.focus&&Me([Je.version,"1.0"])===1||Je.firefox&&Je.version>=20||Je.safari&&Je.version>=6||Je.opera&&Je.version>=10||Je.ios&&Je.osversion&&Je.osversion.split(".")[0]>=6||Je.blackberry&&Je.version>=10.1||Je.chromium&&Je.version>=20?Je.a=fe:Je.msie&&Je.version<10||Je.chrome&&Je.version<20||Je.firefox&&Je.version<20||Je.safari&&Je.version<6||Je.opera&&Je.version<10||Je.ios&&Je.osversion&&Je.osversion.split(".")[0]<6||Je.chromium&&Je.version<20?Je.c=fe:Je.x=fe,Je}var ke=me(typeof navigator!="undefined"&&navigator.userAgent||"");ke.test=function(de){for(var z=0;z<de.length;++z){var ee=de[z];if(typeof ee=="string"&&ee in ke)return!0}return!1};function Ce(de){return de.split(".").length}function Se(de,z){var ee=[],ae;if(Array.prototype.map)return Array.prototype.map.call(de,z);for(ae=0;ae<de.length;ae++)ee.push(z(de[ae]));return ee}function Me(de){for(var z=Math.max(Ce(de[0]),Ce(de[1])),ee=Se(de,function(ae){var ie=z-Ce(ae);return ae=ae+new Array(ie+1).join(".0"),Se(ae.split("."),function(le){return new Array(20-le.length).join("0")+le}).reverse()});--z>=0;){if(ee[0][z]>ee[1][z])return 1;if(ee[0][z]===ee[1][z]){if(z===0)return 0}else return-1}}function ve(de,z,ee){var ae=ke;typeof z=="string"&&(ee=z,z=void 0),z===void 0&&(z=!1),ee&&(ae=me(ee));var ie=""+ae.version;for(var le in de)if(de.hasOwnProperty(le)&&ae[le]){if(typeof de[le]!="string")throw new Error("Browser version in the minVersion map should be a string: "+le+": "+String(de));return Me([ie,de[le]])<0}return z}function we(de,z,ee){return!ve(de,z,ee)}return ke.isUnsupportedBrowser=ve,ke.compareVersions=Me,ke.check=we,ke._detect=me,ke.detect=me,ke})},{}],89:[function(oe,Ge,De){},{}],90:[function(oe,Ge,De){(function(fe){(function(){"use strict";var me=oe("base64-js"),ke=oe("ieee754");De.Buffer=ve,De.SlowBuffer=Pe,De.INSPECT_MAX_BYTES=50;var Ce=2147483647;De.kMaxLength=Ce,ve.TYPED_ARRAY_SUPPORT=Se(),!ve.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Se(){try{var _e=new Uint8Array(1);return _e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},_e.foo()===42}catch(He){return!1}}Object.defineProperty(ve.prototype,"parent",{enumerable:!0,get:function(){if(ve.isBuffer(this))return this.buffer}}),Object.defineProperty(ve.prototype,"offset",{enumerable:!0,get:function(){if(ve.isBuffer(this))return this.byteOffset}});function Me(_e){if(_e>Ce)throw new RangeError('The value "'+_e+'" is invalid for option "size"');var He=new Uint8Array(_e);return He.__proto__=ve.prototype,He}function ve(_e,He,Qe){if(typeof _e=="number"){if(typeof He=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return ee(_e)}return we(_e,He,Qe)}typeof Symbol!="undefined"&&Symbol.species!=null&&ve[Symbol.species]===ve&&Object.defineProperty(ve,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),ve.poolSize=8192;function we(_e,He,Qe){if(typeof _e=="string")return ae(_e,He);if(ArrayBuffer.isView(_e))return ie(_e);if(_e==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _e);if(rt(_e,ArrayBuffer)||_e&&rt(_e.buffer,ArrayBuffer))return le(_e,He,Qe);if(typeof _e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ct=_e.valueOf&&_e.valueOf();if(ct!=null&&ct!==_e)return ve.from(ct,He,Qe);var at=ue(_e);if(at)return at;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof _e[Symbol.toPrimitive]=="function")return ve.from(_e[Symbol.toPrimitive]("string"),He,Qe);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _e)}ve.from=function(_e,He,Qe){return we(_e,He,Qe)},ve.prototype.__proto__=Uint8Array.prototype,ve.__proto__=Uint8Array;function de(_e){if(typeof _e!="number")throw new TypeError('"size" argument must be of type number');if(_e<0)throw new RangeError('The value "'+_e+'" is invalid for option "size"')}function z(_e,He,Qe){return de(_e),_e<=0?Me(_e):He!==void 0?typeof Qe=="string"?Me(_e).fill(He,Qe):Me(_e).fill(He):Me(_e)}ve.alloc=function(_e,He,Qe){return z(_e,He,Qe)};function ee(_e){return de(_e),Me(_e<0?0:ge(_e)|0)}ve.allocUnsafe=function(_e){return ee(_e)},ve.allocUnsafeSlow=function(_e){return ee(_e)};function ae(_e,He){if((typeof He!="string"||He==="")&&(He="utf8"),!ve.isEncoding(He))throw new TypeError("Unknown encoding: "+He);var Qe=je(_e,He)|0,ct=Me(Qe),at=ct.write(_e,He);return at!==Qe&&(ct=ct.slice(0,at)),ct}function ie(_e){for(var He=_e.length<0?0:ge(_e.length)|0,Qe=Me(He),ct=0;ct<He;ct+=1)Qe[ct]=_e[ct]&255;return Qe}function le(_e,He,Qe){if(He<0||_e.byteLength<He)throw new RangeError('"offset" is outside of buffer bounds');if(_e.byteLength<He+(Qe||0))throw new RangeError('"length" is outside of buffer bounds');var ct;return He===void 0&&Qe===void 0?ct=new Uint8Array(_e):Qe===void 0?ct=new Uint8Array(_e,He):ct=new Uint8Array(_e,He,Qe),ct.__proto__=ve.prototype,ct}function ue(_e){if(ve.isBuffer(_e)){var He=ge(_e.length)|0,Qe=Me(He);return Qe.length===0||_e.copy(Qe,0,0,He),Qe}if(_e.length!==void 0)return typeof _e.length!="number"||Ie(_e.length)?Me(0):ie(_e);if(_e.type==="Buffer"&&Array.isArray(_e.data))return ie(_e.data)}function ge(_e){if(_e>=Ce)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ce.toString(16)+" bytes");return _e|0}function Pe(_e){return+_e!=_e&&(_e=0),ve.alloc(+_e)}ve.isBuffer=function(He){return He!=null&&He._isBuffer===!0&&He!==ve.prototype},ve.compare=function(He,Qe){if(rt(He,Uint8Array)&&(He=ve.from(He,He.offset,He.byteLength)),rt(Qe,Uint8Array)&&(Qe=ve.from(Qe,Qe.offset,Qe.byteLength)),!ve.isBuffer(He)||!ve.isBuffer(Qe))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(He===Qe)return 0;for(var ct=He.length,at=Qe.length,At=0,Lt=Math.min(ct,at);At<Lt;++At)if(He[At]!==Qe[At]){ct=He[At],at=Qe[At];break}return ct<at?-1:at<ct?1:0},ve.isEncoding=function(He){switch(String(He).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}},ve.concat=function(He,Qe){if(!Array.isArray(He))throw new TypeError('"list" argument must be an Array of Buffers');if(He.length===0)return ve.alloc(0);var ct;if(Qe===void 0)for(Qe=0,ct=0;ct<He.length;++ct)Qe+=He[ct].length;var at=ve.allocUnsafe(Qe),At=0;for(ct=0;ct<He.length;++ct){var Lt=He[ct];if(rt(Lt,Uint8Array)&&(Lt=ve.from(Lt)),!ve.isBuffer(Lt))throw new TypeError('"list" argument must be an Array of Buffers');Lt.copy(at,At),At+=Lt.length}return at};function je(_e,He){if(ve.isBuffer(_e))return _e.length;if(ArrayBuffer.isView(_e)||rt(_e,ArrayBuffer))return _e.byteLength;if(typeof _e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof _e);var Qe=_e.length,ct=arguments.length>2&&arguments[2]===!0;if(!ct&&Qe===0)return 0;for(var at=!1;;)switch(He){case"ascii":case"latin1":case"binary":return Qe;case"utf8":case"utf-8":return tt(_e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Qe*2;case"hex":return Qe>>>1;case"base64":return Le(_e).length;default:if(at)return ct?-1:tt(_e).length;He=(""+He).toLowerCase(),at=!0}}ve.byteLength=je;function Be(_e,He,Qe){var ct=!1;if((He===void 0||He<0)&&(He=0),He>this.length||((Qe===void 0||Qe>this.length)&&(Qe=this.length),Qe<=0)||(Qe>>>=0,He>>>=0,Qe<=He))return"";for(_e||(_e="utf8");;)switch(_e){case"hex":return Pt(this,He,Qe);case"utf8":case"utf-8":return ft(this,He,Qe);case"ascii":return nt(this,He,Qe);case"latin1":case"binary":return xt(this,He,Qe);case"base64":return ut(this,He,Qe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ct(this,He,Qe);default:if(ct)throw new TypeError("Unknown encoding: "+_e);_e=(_e+"").toLowerCase(),ct=!0}}ve.prototype._isBuffer=!0;function Fe(_e,He,Qe){var ct=_e[He];_e[He]=_e[Qe],_e[Qe]=ct}ve.prototype.swap16=function(){var He=this.length;if(He%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Qe=0;Qe<He;Qe+=2)Fe(this,Qe,Qe+1);return this},ve.prototype.swap32=function(){var He=this.length;if(He%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Qe=0;Qe<He;Qe+=4)Fe(this,Qe,Qe+3),Fe(this,Qe+1,Qe+2);return this},ve.prototype.swap64=function(){var He=this.length;if(He%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Qe=0;Qe<He;Qe+=8)Fe(this,Qe,Qe+7),Fe(this,Qe+1,Qe+6),Fe(this,Qe+2,Qe+5),Fe(this,Qe+3,Qe+4);return this},ve.prototype.toString=function(){var He=this.length;return He===0?"":arguments.length===0?ft(this,0,He):Be.apply(this,arguments)},ve.prototype.toLocaleString=ve.prototype.toString,ve.prototype.equals=function(He){if(!ve.isBuffer(He))throw new TypeError("Argument must be a Buffer");return this===He?!0:ve.compare(this,He)===0},ve.prototype.inspect=function(){var He="",Qe=De.INSPECT_MAX_BYTES;return He=this.toString("hex",0,Qe).replace(/(.{2})/g,"$1 ").trim(),this.length>Qe&&(He+=" ... "),"<Buffer "+He+">"},ve.prototype.compare=function(He,Qe,ct,at,At){if(rt(He,Uint8Array)&&(He=ve.from(He,He.offset,He.byteLength)),!ve.isBuffer(He))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof He);if(Qe===void 0&&(Qe=0),ct===void 0&&(ct=He?He.length:0),at===void 0&&(at=0),At===void 0&&(At=this.length),Qe<0||ct>He.length||at<0||At>this.length)throw new RangeError("out of range index");if(at>=At&&Qe>=ct)return 0;if(at>=At)return-1;if(Qe>=ct)return 1;if(Qe>>>=0,ct>>>=0,at>>>=0,At>>>=0,this===He)return 0;for(var Lt=At-at,It=ct-Qe,Kt=Math.min(Lt,It),Xt=this.slice(at,At),$t=He.slice(Qe,ct),Ut=0;Ut<Kt;++Ut)if(Xt[Ut]!==$t[Ut]){Lt=Xt[Ut],It=$t[Ut];break}return Lt<It?-1:It<Lt?1:0};function Ne(_e,He,Qe,ct,at){if(_e.length===0)return-1;if(typeof Qe=="string"?(ct=Qe,Qe=0):Qe>2147483647?Qe=2147483647:Qe<-2147483648&&(Qe=-2147483648),Qe=+Qe,Ie(Qe)&&(Qe=at?0:_e.length-1),Qe<0&&(Qe=_e.length+Qe),Qe>=_e.length){if(at)return-1;Qe=_e.length-1}else if(Qe<0)if(at)Qe=0;else return-1;if(typeof He=="string"&&(He=ve.from(He,ct)),ve.isBuffer(He))return He.length===0?-1:Ae(_e,He,Qe,ct,at);if(typeof He=="number")return He=He&255,typeof Uint8Array.prototype.indexOf=="function"?at?Uint8Array.prototype.indexOf.call(_e,He,Qe):Uint8Array.prototype.lastIndexOf.call(_e,He,Qe):Ae(_e,[He],Qe,ct,at);throw new TypeError("val must be string, number or Buffer")}function Ae(_e,He,Qe,ct,at){var At=1,Lt=_e.length,It=He.length;if(ct!==void 0&&(ct=String(ct).toLowerCase(),ct==="ucs2"||ct==="ucs-2"||ct==="utf16le"||ct==="utf-16le")){if(_e.length<2||He.length<2)return-1;At=2,Lt/=2,It/=2,Qe/=2}function Kt(tn,Wt){return At===1?tn[Wt]:tn.readUInt16BE(Wt*At)}var Xt;if(at){var $t=-1;for(Xt=Qe;Xt<Lt;Xt++)if(Kt(_e,Xt)===Kt(He,$t===-1?0:Xt-$t)){if($t===-1&&($t=Xt),Xt-$t+1===It)return $t*At}else $t!==-1&&(Xt-=Xt-$t),$t=-1}else for(Qe+It>Lt&&(Qe=Lt-It),Xt=Qe;Xt>=0;Xt--){for(var Ut=!0,ln=0;ln<It;ln++)if(Kt(_e,Xt+ln)!==Kt(He,ln)){Ut=!1;break}if(Ut)return Xt}return-1}ve.prototype.includes=function(He,Qe,ct){return this.indexOf(He,Qe,ct)!==-1},ve.prototype.indexOf=function(He,Qe,ct){return Ne(this,He,Qe,ct,!0)},ve.prototype.lastIndexOf=function(He,Qe,ct){return Ne(this,He,Qe,ct,!1)};function Re(_e,He,Qe,ct){Qe=Number(Qe)||0;var at=_e.length-Qe;ct?(ct=Number(ct),ct>at&&(ct=at)):ct=at;var At=He.length;ct>At/2&&(ct=At/2);for(var Lt=0;Lt<ct;++Lt){var It=parseInt(He.substr(Lt*2,2),16);if(Ie(It))return Lt;_e[Qe+Lt]=It}return Lt}function We(_e,He,Qe,ct){return Xe(tt(He,_e.length-Qe),_e,Qe,ct)}function Ye(_e,He,Qe,ct){return Xe(Ve(He),_e,Qe,ct)}function Ue(_e,He,Qe,ct){return Ye(_e,He,Qe,ct)}function Ke(_e,He,Qe,ct){return Xe(Le(He),_e,Qe,ct)}function ot(_e,He,Qe,ct){return Xe(xe(He,_e.length-Qe),_e,Qe,ct)}ve.prototype.write=function(He,Qe,ct,at){if(Qe===void 0)at="utf8",ct=this.length,Qe=0;else if(ct===void 0&&typeof Qe=="string")at=Qe,ct=this.length,Qe=0;else if(isFinite(Qe))Qe=Qe>>>0,isFinite(ct)?(ct=ct>>>0,at===void 0&&(at="utf8")):(at=ct,ct=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var At=this.length-Qe;if((ct===void 0||ct>At)&&(ct=At),He.length>0&&(ct<0||Qe<0)||Qe>this.length)throw new RangeError("Attempt to write outside buffer bounds");at||(at="utf8");for(var Lt=!1;;)switch(at){case"hex":return Re(this,He,Qe,ct);case"utf8":case"utf-8":return We(this,He,Qe,ct);case"ascii":return Ye(this,He,Qe,ct);case"latin1":case"binary":return Ue(this,He,Qe,ct);case"base64":return Ke(this,He,Qe,ct);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ot(this,He,Qe,ct);default:if(Lt)throw new TypeError("Unknown encoding: "+at);at=(""+at).toLowerCase(),Lt=!0}},ve.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ut(_e,He,Qe){return He===0&&Qe===_e.length?me.fromByteArray(_e):me.fromByteArray(_e.slice(He,Qe))}function ft(_e,He,Qe){Qe=Math.min(_e.length,Qe);for(var ct=[],at=He;at<Qe;){var At=_e[at],Lt=null,It=At>239?4:At>223?3:At>191?2:1;if(at+It<=Qe){var Kt,Xt,$t,Ut;switch(It){case 1:At<128&&(Lt=At);break;case 2:Kt=_e[at+1],(Kt&192)===128&&(Ut=(At&31)<<6|Kt&63,Ut>127&&(Lt=Ut));break;case 3:Kt=_e[at+1],Xt=_e[at+2],(Kt&192)===128&&(Xt&192)===128&&(Ut=(At&15)<<12|(Kt&63)<<6|Xt&63,Ut>2047&&(Ut<55296||Ut>57343)&&(Lt=Ut));break;case 4:Kt=_e[at+1],Xt=_e[at+2],$t=_e[at+3],(Kt&192)===128&&(Xt&192)===128&&($t&192)===128&&(Ut=(At&15)<<18|(Kt&63)<<12|(Xt&63)<<6|$t&63,Ut>65535&&Ut<1114112&&(Lt=Ut))}}Lt===null?(Lt=65533,It=1):Lt>65535&&(Lt-=65536,ct.push(Lt>>>10&1023|55296),Lt=56320|Lt&1023),ct.push(Lt),at+=It}return Je(ct)}var wt=4096;function Je(_e){var He=_e.length;if(He<=wt)return String.fromCharCode.apply(String,_e);for(var Qe="",ct=0;ct<He;)Qe+=String.fromCharCode.apply(String,_e.slice(ct,ct+=wt));return Qe}function nt(_e,He,Qe){var ct="";Qe=Math.min(_e.length,Qe);for(var at=He;at<Qe;++at)ct+=String.fromCharCode(_e[at]&127);return ct}function xt(_e,He,Qe){var ct="";Qe=Math.min(_e.length,Qe);for(var at=He;at<Qe;++at)ct+=String.fromCharCode(_e[at]);return ct}function Pt(_e,He,Qe){var ct=_e.length;(!He||He<0)&&(He=0),(!Qe||Qe<0||Qe>ct)&&(Qe=ct);for(var at="",At=He;At<Qe;++At)at+=yt(_e[At]);return at}function Ct(_e,He,Qe){for(var ct=_e.slice(He,Qe),at="",At=0;At<ct.length;At+=2)at+=String.fromCharCode(ct[At]+ct[At+1]*256);return at}ve.prototype.slice=function(He,Qe){var ct=this.length;He=~~He,Qe=Qe===void 0?ct:~~Qe,He<0?(He+=ct,He<0&&(He=0)):He>ct&&(He=ct),Qe<0?(Qe+=ct,Qe<0&&(Qe=0)):Qe>ct&&(Qe=ct),Qe<He&&(Qe=He);var at=this.subarray(He,Qe);return at.__proto__=ve.prototype,at};function gt(_e,He,Qe){if(_e%1!==0||_e<0)throw new RangeError("offset is not uint");if(_e+He>Qe)throw new RangeError("Trying to access beyond buffer length")}ve.prototype.readUIntLE=function(He,Qe,ct){He=He>>>0,Qe=Qe>>>0,ct||gt(He,Qe,this.length);for(var at=this[He],At=1,Lt=0;++Lt<Qe&&(At*=256);)at+=this[He+Lt]*At;return at},ve.prototype.readUIntBE=function(He,Qe,ct){He=He>>>0,Qe=Qe>>>0,ct||gt(He,Qe,this.length);for(var at=this[He+--Qe],At=1;Qe>0&&(At*=256);)at+=this[He+--Qe]*At;return at},ve.prototype.readUInt8=function(He,Qe){return He=He>>>0,Qe||gt(He,1,this.length),this[He]},ve.prototype.readUInt16LE=function(He,Qe){return He=He>>>0,Qe||gt(He,2,this.length),this[He]|this[He+1]<<8},ve.prototype.readUInt16BE=function(He,Qe){return He=He>>>0,Qe||gt(He,2,this.length),this[He]<<8|this[He+1]},ve.prototype.readUInt32LE=function(He,Qe){return He=He>>>0,Qe||gt(He,4,this.length),(this[He]|this[He+1]<<8|this[He+2]<<16)+this[He+3]*16777216},ve.prototype.readUInt32BE=function(He,Qe){return He=He>>>0,Qe||gt(He,4,this.length),this[He]*16777216+(this[He+1]<<16|this[He+2]<<8|this[He+3])},ve.prototype.readIntLE=function(He,Qe,ct){He=He>>>0,Qe=Qe>>>0,ct||gt(He,Qe,this.length);for(var at=this[He],At=1,Lt=0;++Lt<Qe&&(At*=256);)at+=this[He+Lt]*At;return At*=128,at>=At&&(at-=Math.pow(2,8*Qe)),at},ve.prototype.readIntBE=function(He,Qe,ct){He=He>>>0,Qe=Qe>>>0,ct||gt(He,Qe,this.length);for(var at=Qe,At=1,Lt=this[He+--at];at>0&&(At*=256);)Lt+=this[He+--at]*At;return At*=128,Lt>=At&&(Lt-=Math.pow(2,8*Qe)),Lt},ve.prototype.readInt8=function(He,Qe){return He=He>>>0,Qe||gt(He,1,this.length),this[He]&128?(255-this[He]+1)*-1:this[He]},ve.prototype.readInt16LE=function(He,Qe){He=He>>>0,Qe||gt(He,2,this.length);var ct=this[He]|this[He+1]<<8;return ct&32768?ct|4294901760:ct},ve.prototype.readInt16BE=function(He,Qe){He=He>>>0,Qe||gt(He,2,this.length);var ct=this[He+1]|this[He]<<8;return ct&32768?ct|4294901760:ct},ve.prototype.readInt32LE=function(He,Qe){return He=He>>>0,Qe||gt(He,4,this.length),this[He]|this[He+1]<<8|this[He+2]<<16|this[He+3]<<24},ve.prototype.readInt32BE=function(He,Qe){return He=He>>>0,Qe||gt(He,4,this.length),this[He]<<24|this[He+1]<<16|this[He+2]<<8|this[He+3]},ve.prototype.readFloatLE=function(He,Qe){return He=He>>>0,Qe||gt(He,4,this.length),ke.read(this,He,!0,23,4)},ve.prototype.readFloatBE=function(He,Qe){return He=He>>>0,Qe||gt(He,4,this.length),ke.read(this,He,!1,23,4)},ve.prototype.readDoubleLE=function(He,Qe){return He=He>>>0,Qe||gt(He,8,this.length),ke.read(this,He,!0,52,8)},ve.prototype.readDoubleBE=function(He,Qe){return He=He>>>0,Qe||gt(He,8,this.length),ke.read(this,He,!1,52,8)};function dt(_e,He,Qe,ct,at,At){if(!ve.isBuffer(_e))throw new TypeError('"buffer" argument must be a Buffer instance');if(He>at||He<At)throw new RangeError('"value" argument is out of bounds');if(Qe+ct>_e.length)throw new RangeError("Index out of range")}ve.prototype.writeUIntLE=function(He,Qe,ct,at){if(He=+He,Qe=Qe>>>0,ct=ct>>>0,!at){var At=Math.pow(2,8*ct)-1;dt(this,He,Qe,ct,At,0)}var Lt=1,It=0;for(this[Qe]=He&255;++It<ct&&(Lt*=256);)this[Qe+It]=He/Lt&255;return Qe+ct},ve.prototype.writeUIntBE=function(He,Qe,ct,at){if(He=+He,Qe=Qe>>>0,ct=ct>>>0,!at){var At=Math.pow(2,8*ct)-1;dt(this,He,Qe,ct,At,0)}var Lt=ct-1,It=1;for(this[Qe+Lt]=He&255;--Lt>=0&&(It*=256);)this[Qe+Lt]=He/It&255;return Qe+ct},ve.prototype.writeUInt8=function(He,Qe,ct){return He=+He,Qe=Qe>>>0,ct||dt(this,He,Qe,1,255,0),this[Qe]=He&255,Qe+1},ve.prototype.writeUInt16LE=function(He,Qe,ct){return He=+He,Qe=Qe>>>0,ct||dt(this,He,Qe,2,65535,0),this[Qe]=He&255,this[Qe+1]=He>>>8,Qe+2},ve.prototype.writeUInt16BE=function(He,Qe,ct){return He=+He,Qe=Qe>>>0,ct||dt(this,He,Qe,2,65535,0),this[Qe]=He>>>8,this[Qe+1]=He&255,Qe+2},ve.prototype.writeUInt32LE=function(He,Qe,ct){return He=+He,Qe=Qe>>>0,ct||dt(this,He,Qe,4,4294967295,0),this[Qe+3]=He>>>24,this[Qe+2]=He>>>16,this[Qe+1]=He>>>8,this[Qe]=He&255,Qe+4},ve.prototype.writeUInt32BE=function(He,Qe,ct){return He=+He,Qe=Qe>>>0,ct||dt(this,He,Qe,4,4294967295,0),this[Qe]=He>>>24,this[Qe+1]=He>>>16,this[Qe+2]=He>>>8,this[Qe+3]=He&255,Qe+4},ve.prototype.writeIntLE=function(He,Qe,ct,at){if(He=+He,Qe=Qe>>>0,!at){var At=Math.pow(2,8*ct-1);dt(this,He,Qe,ct,At-1,-At)}var Lt=0,It=1,Kt=0;for(this[Qe]=He&255;++Lt<ct&&(It*=256);)He<0&&Kt===0&&this[Qe+Lt-1]!==0&&(Kt=1),this[Qe+Lt]=(He/It>>0)-Kt&255;return Qe+ct},ve.prototype.writeIntBE=function(He,Qe,ct,at){if(He=+He,Qe=Qe>>>0,!at){var At=Math.pow(2,8*ct-1);dt(this,He,Qe,ct,At-1,-At)}var Lt=ct-1,It=1,Kt=0;for(this[Qe+Lt]=He&255;--Lt>=0&&(It*=256);)He<0&&Kt===0&&this[Qe+Lt+1]!==0&&(Kt=1),this[Qe+Lt]=(He/It>>0)-Kt&255;return Qe+ct},ve.prototype.writeInt8=function(He,Qe,ct){return He=+He,Qe=Qe>>>0,ct||dt(this,He,Qe,1,127,-128),He<0&&(He=255+He+1),this[Qe]=He&255,Qe+1},ve.prototype.writeInt16LE=function(He,Qe,ct){return He=+He,Qe=Qe>>>0,ct||dt(this,He,Qe,2,32767,-32768),this[Qe]=He&255,this[Qe+1]=He>>>8,Qe+2},ve.prototype.writeInt16BE=function(He,Qe,ct){return He=+He,Qe=Qe>>>0,ct||dt(this,He,Qe,2,32767,-32768),this[Qe]=He>>>8,this[Qe+1]=He&255,Qe+2},ve.prototype.writeInt32LE=function(He,Qe,ct){return He=+He,Qe=Qe>>>0,ct||dt(this,He,Qe,4,2147483647,-2147483648),this[Qe]=He&255,this[Qe+1]=He>>>8,this[Qe+2]=He>>>16,this[Qe+3]=He>>>24,Qe+4},ve.prototype.writeInt32BE=function(He,Qe,ct){return He=+He,Qe=Qe>>>0,ct||dt(this,He,Qe,4,2147483647,-2147483648),He<0&&(He=4294967295+He+1),this[Qe]=He>>>24,this[Qe+1]=He>>>16,this[Qe+2]=He>>>8,this[Qe+3]=He&255,Qe+4};function ht(_e,He,Qe,ct,at,At){if(Qe+ct>_e.length)throw new RangeError("Index out of range");if(Qe<0)throw new RangeError("Index out of range")}function Et(_e,He,Qe,ct,at){return He=+He,Qe=Qe>>>0,at||ht(_e,He,Qe,4,34028234663852886e22,-34028234663852886e22),ke.write(_e,He,Qe,ct,23,4),Qe+4}ve.prototype.writeFloatLE=function(He,Qe,ct){return Et(this,He,Qe,!0,ct)},ve.prototype.writeFloatBE=function(He,Qe,ct){return Et(this,He,Qe,!1,ct)};function St(_e,He,Qe,ct,at){return He=+He,Qe=Qe>>>0,at||ht(_e,He,Qe,8,17976931348623157e292,-17976931348623157e292),ke.write(_e,He,Qe,ct,52,8),Qe+8}ve.prototype.writeDoubleLE=function(He,Qe,ct){return St(this,He,Qe,!0,ct)},ve.prototype.writeDoubleBE=function(He,Qe,ct){return St(this,He,Qe,!1,ct)},ve.prototype.copy=function(He,Qe,ct,at){if(!ve.isBuffer(He))throw new TypeError("argument should be a Buffer");if(ct||(ct=0),!at&&at!==0&&(at=this.length),Qe>=He.length&&(Qe=He.length),Qe||(Qe=0),at>0&&at<ct&&(at=ct),at===ct||He.length===0||this.length===0)return 0;if(Qe<0)throw new RangeError("targetStart out of bounds");if(ct<0||ct>=this.length)throw new RangeError("Index out of range");if(at<0)throw new RangeError("sourceEnd out of bounds");at>this.length&&(at=this.length),He.length-Qe<at-ct&&(at=He.length-Qe+ct);var At=at-ct;if(this===He&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(Qe,ct,at);else if(this===He&&ct<Qe&&Qe<at)for(var Lt=At-1;Lt>=0;--Lt)He[Lt+Qe]=this[Lt+ct];else Uint8Array.prototype.set.call(He,this.subarray(ct,at),Qe);return At},ve.prototype.fill=function(He,Qe,ct,at){if(typeof He=="string"){if(typeof Qe=="string"?(at=Qe,Qe=0,ct=this.length):typeof ct=="string"&&(at=ct,ct=this.length),at!==void 0&&typeof at!="string")throw new TypeError("encoding must be a string");if(typeof at=="string"&&!ve.isEncoding(at))throw new TypeError("Unknown encoding: "+at);if(He.length===1){var At=He.charCodeAt(0);(at==="utf8"&&At<128||at==="latin1")&&(He=At)}}else typeof He=="number"&&(He=He&255);if(Qe<0||this.length<Qe||this.length<ct)throw new RangeError("Out of range index");if(ct<=Qe)return this;Qe=Qe>>>0,ct=ct===void 0?this.length:ct>>>0,He||(He=0);var Lt;if(typeof He=="number")for(Lt=Qe;Lt<ct;++Lt)this[Lt]=He;else{var It=ve.isBuffer(He)?He:ve.from(He,at),Kt=It.length;if(Kt===0)throw new TypeError('The value "'+He+'" is invalid for argument "value"');for(Lt=0;Lt<ct-Qe;++Lt)this[Lt+Qe]=It[Lt%Kt]}return this};var Ft=/[^+/0-9A-Za-z-_]/g;function mt(_e){if(_e=_e.split("=")[0],_e=_e.trim().replace(Ft,""),_e.length<2)return"";for(;_e.length%4!==0;)_e=_e+"=";return _e}function yt(_e){return _e<16?"0"+_e.toString(16):_e.toString(16)}function tt(_e,He){He=He||1/0;for(var Qe,ct=_e.length,at=null,At=[],Lt=0;Lt<ct;++Lt){if(Qe=_e.charCodeAt(Lt),Qe>55295&&Qe<57344){if(!at){if(Qe>56319){(He-=3)>-1&&At.push(239,191,189);continue}else if(Lt+1===ct){(He-=3)>-1&&At.push(239,191,189);continue}at=Qe;continue}if(Qe<56320){(He-=3)>-1&&At.push(239,191,189),at=Qe;continue}Qe=(at-55296<<10|Qe-56320)+65536}else at&&(He-=3)>-1&&At.push(239,191,189);if(at=null,Qe<128){if((He-=1)<0)break;At.push(Qe)}else if(Qe<2048){if((He-=2)<0)break;At.push(Qe>>6|192,Qe&63|128)}else if(Qe<65536){if((He-=3)<0)break;At.push(Qe>>12|224,Qe>>6&63|128,Qe&63|128)}else if(Qe<1114112){if((He-=4)<0)break;At.push(Qe>>18|240,Qe>>12&63|128,Qe>>6&63|128,Qe&63|128)}else throw new Error("Invalid code point")}return At}function Ve(_e){for(var He=[],Qe=0;Qe<_e.length;++Qe)He.push(_e.charCodeAt(Qe)&255);return He}function xe(_e,He){for(var Qe,ct,at,At=[],Lt=0;Lt<_e.length&&!((He-=2)<0);++Lt)Qe=_e.charCodeAt(Lt),ct=Qe>>8,at=Qe%256,At.push(at),At.push(ct);return At}function Le(_e){return me.toByteArray(mt(_e))}function Xe(_e,He,Qe,ct){for(var at=0;at<ct&&!(at+Qe>=He.length||at>=_e.length);++at)He[at+Qe]=_e[at];return at}function rt(_e,He){return _e instanceof He||_e!=null&&_e.constructor!=null&&_e.constructor.name!=null&&_e.constructor.name===He.name}function Ie(_e){return _e!==_e}}).call(this)}).call(this,oe("buffer").Buffer)},{"base64-js":87,buffer:90,ieee754:357}],91:[function(oe,Ge,De){Ge.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],92:[function(oe,Ge,De){"use strict";var fe=oe("get-intrinsic"),me=oe("./"),ke=me(fe("String.prototype.indexOf"));Ge.exports=function(Se,Me){var ve=fe(Se,!!Me);return typeof ve=="function"&&ke(Se,".prototype.")>-1?me(ve):ve}},{"./":93,"get-intrinsic":348}],93:[function(oe,Ge,De){"use strict";var fe=oe("function-bind"),me=oe("get-intrinsic"),ke=me("%Function.prototype.apply%"),Ce=me("%Function.prototype.call%"),Se=me("%Reflect.apply%",!0)||fe.call(Ce,ke),Me=me("%Object.getOwnPropertyDescriptor%",!0),ve=me("%Object.defineProperty%",!0),we=me("%Math.max%");if(ve)try{ve({},"a",{value:1})}catch(z){ve=null}Ge.exports=function(ee){var ae=Se(fe,Ce,arguments);if(Me&&ve){var ie=Me(ae,"length");ie.configurable&&ve(ae,"length",{value:1+we(0,ee.length-(arguments.length-1))})}return ae};var de=function(){return Se(fe,ke,arguments)};ve?ve(Ge.exports,"apply",{value:de}):Ge.exports.apply=de},{"function-bind":347,"get-intrinsic":348}],94:[function(oe,Ge,De){"use strict";var fe=Array.prototype.slice;Ge.exports=me;function me(Ce,Se){if(!(this instanceof me))return new me(Ce,Se);this.src=Ce,this._withAccess=Se}me.prototype.withAccess=function(Ce){return this._withAccess=Ce!==!1,this},me.prototype.pick=function(Ce){return Array.isArray(Ce)||(Ce=fe.call(arguments)),Ce.length&&(this.keys=Ce),this},me.prototype.to=function(Ce){if(Ce=Ce||{},!this.src)return Ce;var Se=this.keys||Object.keys(this.src);if(!this._withAccess){for(var Me=0;Me<Se.length;Me++)ve=Se[Me],Ce[ve]===void 0&&(Ce[ve]=this.src[ve]);return Ce}for(var Me=0;Me<Se.length;Me++){var ve=Se[Me];if(ke(Ce,ve)){var we=this.src.__lookupGetter__(ve),de=this.src.__lookupSetter__(ve);we&&Ce.__defineGetter__(ve,we),de&&Ce.__defineSetter__(ve,de),!we&&!de&&(Ce[ve]=this.src[ve])}}return Ce},me.prototype.toCover=function(Ce){for(var Se=this.keys||Object.keys(this.src),Me=0;Me<Se.length;Me++){var ve=Se[Me];delete Ce[ve];var we=this.src.__lookupGetter__(ve),de=this.src.__lookupSetter__(ve);we&&Ce.__defineGetter__(ve,we),de&&Ce.__defineSetter__(ve,de),!we&&!de&&(Ce[ve]=this.src[ve])}},me.prototype.override=me.prototype.toCover,me.prototype.and=function(Ce){var Se={};return this.to(Se),this.src=Ce,this.to(Se),this.src=Se,this};function ke(Ce,Se){return Ce[Se]===void 0&&Ce.__lookupGetter__(Se)===void 0&&Ce.__lookupSetter__(Se)===void 0}},{}],95:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/is-callable"),ke=oe("../internals/try-to-string"),Ce=fe.TypeError;Ge.exports=function(Se){if(me(Se))return Se;throw Ce(ke(Se)+" is not a function")}},{"../internals/global":163,"../internals/is-callable":176,"../internals/try-to-string":257}],96:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/is-constructor"),ke=oe("../internals/try-to-string"),Ce=fe.TypeError;Ge.exports=function(Se){if(me(Se))return Se;throw Ce(ke(Se)+" is not a constructor")}},{"../internals/global":163,"../internals/is-constructor":177,"../internals/try-to-string":257}],97:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/is-callable"),ke=fe.String,Ce=fe.TypeError;Ge.exports=function(Se){if(typeof Se=="object"||me(Se))return Se;throw Ce("Can't set "+ke(Se)+" as a prototype")}},{"../internals/global":163,"../internals/is-callable":176}],98:[function(oe,Ge,De){var fe=oe("../internals/well-known-symbol"),me=oe("../internals/object-create"),ke=oe("../internals/object-define-property"),Ce=fe("unscopables"),Se=Array.prototype;Se[Ce]==null&&ke.f(Se,Ce,{configurable:!0,value:me(null)}),Ge.exports=function(Me){Se[Ce][Me]=!0}},{"../internals/object-create":196,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],99:[function(oe,Ge,De){"use strict";var fe=oe("../internals/string-multibyte").charAt;Ge.exports=function(me,ke,Ce){return ke+(Ce?fe(me,ke).length:1)}},{"../internals/string-multibyte":239}],100:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/object-is-prototype-of"),ke=fe.TypeError;Ge.exports=function(Ce,Se){if(me(Se,Ce))return Ce;throw ke("Incorrect invocation")}},{"../internals/global":163,"../internals/object-is-prototype-of":204}],101:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/is-object"),ke=fe.String,Ce=fe.TypeError;Ge.exports=function(Se){if(me(Se))return Se;throw Ce(ke(Se)+" is not an object")}},{"../internals/global":163,"../internals/is-object":180}],102:[function(oe,Ge,De){Ge.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"},{}],103:[function(oe,Ge,De){"use strict";var fe=oe("../internals/array-buffer-native"),me=oe("../internals/descriptors"),ke=oe("../internals/global"),Ce=oe("../internals/is-callable"),Se=oe("../internals/is-object"),Me=oe("../internals/has-own-property"),ve=oe("../internals/classof"),we=oe("../internals/try-to-string"),de=oe("../internals/create-non-enumerable-property"),z=oe("../internals/redefine"),ee=oe("../internals/object-define-property").f,ae=oe("../internals/object-is-prototype-of"),ie=oe("../internals/object-get-prototype-of"),le=oe("../internals/object-set-prototype-of"),ue=oe("../internals/well-known-symbol"),ge=oe("../internals/uid"),Pe=ke.Int8Array,je=Pe&&Pe.prototype,Be=ke.Uint8ClampedArray,Fe=Be&&Be.prototype,Ne=Pe&&ie(Pe),Ae=je&&ie(je),Re=Object.prototype,We=ke.TypeError,Ye=ue("toStringTag"),Ue=ge("TYPED_ARRAY_TAG"),Ke=ge("TYPED_ARRAY_CONSTRUCTOR"),ot=fe&&!!le&&ve(ke.opera)!=="Opera",ut=!1,ft,wt,Je,nt={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},xt={BigInt64Array:8,BigUint64Array:8},Pt=function(Ft){if(!Se(Ft))return!1;var mt=ve(Ft);return mt==="DataView"||Me(nt,mt)||Me(xt,mt)},Ct=function(St){if(!Se(St))return!1;var Ft=ve(St);return Me(nt,Ft)||Me(xt,Ft)},gt=function(St){if(Ct(St))return St;throw We("Target is not a typed array")},dt=function(St){if(Ce(St)&&(!le||ae(Ne,St)))return St;throw We(we(St)+" is not a typed array constructor")},ht=function(St,Ft,mt,yt){if(me){if(mt)for(var tt in nt){var Ve=ke[tt];if(Ve&&Me(Ve.prototype,St))try{delete Ve.prototype[St]}catch(xe){try{Ve.prototype[St]=Ft}catch(Le){}}}(!Ae[St]||mt)&&z(Ae,St,mt?Ft:ot&&je[St]||Ft,yt)}},Et=function(St,Ft,mt){var yt,tt;if(me){if(le){if(mt){for(yt in nt)if(tt=ke[yt],tt&&Me(tt,St))try{delete tt[St]}catch(Ve){}}if(!Ne[St]||mt)try{return z(Ne,St,mt?Ft:ot&&Ne[St]||Ft)}catch(Ve){}else return}for(yt in nt)tt=ke[yt],tt&&(!tt[St]||mt)&&z(tt,St,Ft)}};for(ft in nt)wt=ke[ft],Je=wt&&wt.prototype,Je?de(Je,Ke,wt):ot=!1;for(ft in xt)wt=ke[ft],Je=wt&&wt.prototype,Je&&de(Je,Ke,wt);if((!ot||!Ce(Ne)||Ne===Function.prototype)&&(Ne=function(){throw We("Incorrect invocation")},ot))for(ft in nt)ke[ft]&&le(ke[ft],Ne);if((!ot||!Ae||Ae===Re)&&(Ae=Ne.prototype,ot))for(ft in nt)ke[ft]&&le(ke[ft].prototype,Ae);if(ot&&ie(Fe)!==Ae&&le(Fe,Ae),me&&!Me(Ae,Ye)){ut=!0,ee(Ae,Ye,{get:function(){return Se(this)?this[Ue]:void 0}});for(ft in nt)ke[ft]&&de(ke[ft],Ue,ft)}Ge.exports={NATIVE_ARRAY_BUFFER_VIEWS:ot,TYPED_ARRAY_CONSTRUCTOR:Ke,TYPED_ARRAY_TAG:ut&&Ue,aTypedArray:gt,aTypedArrayConstructor:dt,exportTypedArrayMethod:ht,exportTypedArrayStaticMethod:Et,isView:Pt,isTypedArray:Ct,TypedArray:Ne,TypedArrayPrototype:Ae}},{"../internals/array-buffer-native":102,"../internals/classof":124,"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-define-property":198,"../internals/object-get-prototype-of":203,"../internals/object-is-prototype-of":204,"../internals/object-set-prototype-of":208,"../internals/redefine":222,"../internals/try-to-string":257,"../internals/uid":263,"../internals/well-known-symbol":268}],104:[function(oe,Ge,De){"use strict";var fe=oe("../internals/global"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/descriptors"),Ce=oe("../internals/array-buffer-native"),Se=oe("../internals/function-name"),Me=oe("../internals/create-non-enumerable-property"),ve=oe("../internals/redefine-all"),we=oe("../internals/fails"),de=oe("../internals/an-instance"),z=oe("../internals/to-integer-or-infinity"),ee=oe("../internals/to-length"),ae=oe("../internals/to-index"),ie=oe("../internals/ieee754"),le=oe("../internals/object-get-prototype-of"),ue=oe("../internals/object-set-prototype-of"),ge=oe("../internals/object-get-own-property-names").f,Pe=oe("../internals/object-define-property").f,je=oe("../internals/array-fill"),Be=oe("../internals/array-slice-simple"),Fe=oe("../internals/set-to-string-tag"),Ne=oe("../internals/internal-state"),Ae=Se.PROPER,Re=Se.CONFIGURABLE,We=Ne.get,Ye=Ne.set,Ue="ArrayBuffer",Ke="DataView",ot="prototype",ut="Wrong length",ft="Wrong index",wt=fe[Ue],Je=wt,nt=Je&&Je[ot],xt=fe[Ke],Pt=xt&&xt[ot],Ct=Object.prototype,gt=fe.Array,dt=fe.RangeError,ht=me(je),Et=me([].reverse),St=ie.pack,Ft=ie.unpack,mt=function(Lt){return[Lt&255]},yt=function(Lt){return[Lt&255,Lt>>8&255]},tt=function(Lt){return[Lt&255,Lt>>8&255,Lt>>16&255,Lt>>24&255]},Ve=function(Lt){return Lt[3]<<24|Lt[2]<<16|Lt[1]<<8|Lt[0]},xe=function(Lt){return St(Lt,23,4)},Le=function(Lt){return St(Lt,52,8)},Xe=function(Lt,It){Pe(Lt[ot],It,{get:function(){return We(this)[It]}})},rt=function(Lt,It,Kt,Xt){var $t=ae(Kt),Ut=We(Lt);if($t+It>Ut.byteLength)throw dt(ft);var ln=We(Ut.buffer).bytes,tn=$t+Ut.byteOffset,Wt=Be(ln,tn,tn+It);return Xt?Wt:Et(Wt)},Ie=function(Lt,It,Kt,Xt,$t,Ut){var ln=ae(Kt),tn=We(Lt);if(ln+It>tn.byteLength)throw dt(ft);for(var Wt=We(tn.buffer).bytes,En=ln+tn.byteOffset,Pn=Xt(+$t),Ln=0;Ln<It;Ln++)Wt[En+Ln]=Pn[Ut?Ln:It-Ln-1]};if(!Ce)Je=function(It){de(this,nt);var Kt=ae(It);Ye(this,{bytes:ht(gt(Kt),0),byteLength:Kt}),ke||(this.byteLength=Kt)},nt=Je[ot],xt=function(It,Kt,Xt){de(this,Pt),de(It,nt);var $t=We(It).byteLength,Ut=z(Kt);if(Ut<0||Ut>$t)throw dt("Wrong offset");if(Xt=Xt===void 0?$t-Ut:ee(Xt),Ut+Xt>$t)throw dt(ut);Ye(this,{buffer:It,byteLength:Xt,byteOffset:Ut}),ke||(this.buffer=It,this.byteLength=Xt,this.byteOffset=Ut)},Pt=xt[ot],ke&&(Xe(Je,"byteLength"),Xe(xt,"buffer"),Xe(xt,"byteLength"),Xe(xt,"byteOffset")),ve(Pt,{getInt8:function(It){return rt(this,1,It)[0]<<24>>24},getUint8:function(It){return rt(this,1,It)[0]},getInt16:function(It){var Kt=rt(this,2,It,arguments.length>1?arguments[1]:void 0);return(Kt[1]<<8|Kt[0])<<16>>16},getUint16:function(It){var Kt=rt(this,2,It,arguments.length>1?arguments[1]:void 0);return Kt[1]<<8|Kt[0]},getInt32:function(It){return Ve(rt(this,4,It,arguments.length>1?arguments[1]:void 0))},getUint32:function(It){return Ve(rt(this,4,It,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(It){return Ft(rt(this,4,It,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(It){return Ft(rt(this,8,It,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(It,Kt){Ie(this,1,It,mt,Kt)},setUint8:function(It,Kt){Ie(this,1,It,mt,Kt)},setInt16:function(It,Kt){Ie(this,2,It,yt,Kt,arguments.length>2?arguments[2]:void 0)},setUint16:function(It,Kt){Ie(this,2,It,yt,Kt,arguments.length>2?arguments[2]:void 0)},setInt32:function(It,Kt){Ie(this,4,It,tt,Kt,arguments.length>2?arguments[2]:void 0)},setUint32:function(It,Kt){Ie(this,4,It,tt,Kt,arguments.length>2?arguments[2]:void 0)},setFloat32:function(It,Kt){Ie(this,4,It,xe,Kt,arguments.length>2?arguments[2]:void 0)},setFloat64:function(It,Kt){Ie(this,8,It,Le,Kt,arguments.length>2?arguments[2]:void 0)}});else{var _e=Ae&&wt.name!==Ue;if(!we(function(){wt(1)})||!we(function(){new wt(-1)})||we(function(){return new wt,new wt(1.5),new wt(NaN),_e&&!Re})){Je=function(It){return de(this,nt),new wt(ae(It))},Je[ot]=nt;for(var He=ge(wt),Qe=0,ct;He.length>Qe;)(ct=He[Qe++])in Je||Me(Je,ct,wt[ct]);nt.constructor=Je}else _e&&Re&&Me(wt,"name",Ue);ue&&le(Pt)!==Ct&&ue(Pt,Ct);var at=new xt(new Je(2)),At=me(Pt.setInt8);at.setInt8(0,2147483648),at.setInt8(1,2147483649),(at.getInt8(0)||!at.getInt8(1))&&ve(Pt,{setInt8:function(It,Kt){At(this,It,Kt<<24>>24)},setUint8:function(It,Kt){At(this,It,Kt<<24>>24)}},{unsafe:!0})}Fe(Je,Ue),Fe(xt,Ke),Ge.exports={ArrayBuffer:Je,DataView:xt}},{"../internals/an-instance":100,"../internals/array-buffer-native":102,"../internals/array-fill":106,"../internals/array-slice-simple":116,"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/ieee754":169,"../internals/internal-state":173,"../internals/object-define-property":198,"../internals/object-get-own-property-names":201,"../internals/object-get-prototype-of":203,"../internals/object-set-prototype-of":208,"../internals/redefine-all":221,"../internals/set-to-string-tag":234,"../internals/to-index":246,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],105:[function(oe,Ge,De){"use strict";var fe=oe("../internals/to-object"),me=oe("../internals/to-absolute-index"),ke=oe("../internals/length-of-array-like"),Ce=Math.min;Ge.exports=[].copyWithin||function(Me,ve){var we=fe(this),de=ke(we),z=me(Me,de),ee=me(ve,de),ae=arguments.length>2?arguments[2]:void 0,ie=Ce((ae===void 0?de:me(ae,de))-ee,de-z),le=1;for(ee<z&&z<ee+ie&&(le=-1,ee+=ie-1,z+=ie-1);ie-- >0;)ee in we?we[z]=we[ee]:delete we[z],z+=le,ee+=le;return we}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],106:[function(oe,Ge,De){"use strict";var fe=oe("../internals/to-object"),me=oe("../internals/to-absolute-index"),ke=oe("../internals/length-of-array-like");Ge.exports=function(Se){for(var Me=fe(this),ve=ke(Me),we=arguments.length,de=me(we>1?arguments[1]:void 0,ve),z=we>2?arguments[2]:void 0,ee=z===void 0?ve:me(z,ve);ee>de;)Me[de++]=Se;return Me}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],107:[function(oe,Ge,De){"use strict";var fe=oe("../internals/array-iteration").forEach,me=oe("../internals/array-method-is-strict"),ke=me("forEach");Ge.exports=ke?[].forEach:function(Se){return fe(this,Se,arguments.length>1?arguments[1]:void 0)}},{"../internals/array-iteration":111,"../internals/array-method-is-strict":114}],108:[function(oe,Ge,De){var fe=oe("../internals/length-of-array-like");Ge.exports=function(me,ke){for(var Ce=0,Se=fe(ke),Me=new me(Se);Se>Ce;)Me[Ce]=ke[Ce++];return Me}},{"../internals/length-of-array-like":188}],109:[function(oe,Ge,De){"use strict";var fe=oe("../internals/global"),me=oe("../internals/function-bind-context"),ke=oe("../internals/function-call"),Ce=oe("../internals/to-object"),Se=oe("../internals/call-with-safe-iteration-closing"),Me=oe("../internals/is-array-iterator-method"),ve=oe("../internals/is-constructor"),we=oe("../internals/length-of-array-like"),de=oe("../internals/create-property"),z=oe("../internals/get-iterator"),ee=oe("../internals/get-iterator-method"),ae=fe.Array;Ge.exports=function(le){var ue=Ce(le),ge=ve(this),Pe=arguments.length,je=Pe>1?arguments[1]:void 0,Be=je!==void 0;Be&&(je=me(je,Pe>2?arguments[2]:void 0));var Fe=ee(ue),Ne=0,Ae,Re,We,Ye,Ue,Ke;if(Fe&&!(this==ae&&Me(Fe)))for(Ye=z(ue,Fe),Ue=Ye.next,Re=ge?new this:[];!(We=ke(Ue,Ye)).done;Ne++)Ke=Be?Se(Ye,je,[We.value,Ne],!0):We.value,de(Re,Ne,Ke);else for(Ae=we(ue),Re=ge?new this(Ae):ae(Ae);Ae>Ne;Ne++)Ke=Be?je(ue[Ne],Ne):ue[Ne],de(Re,Ne,Ke);return Re.length=Ne,Re}},{"../internals/call-with-safe-iteration-closing":121,"../internals/create-property":131,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/is-array-iterator-method":174,"../internals/is-constructor":177,"../internals/length-of-array-like":188,"../internals/to-object":250}],110:[function(oe,Ge,De){var fe=oe("../internals/to-indexed-object"),me=oe("../internals/to-absolute-index"),ke=oe("../internals/length-of-array-like"),Ce=function(Se){return function(Me,ve,we){var de=fe(Me),z=ke(de),ee=me(we,z),ae;if(Se&&ve!=ve){for(;z>ee;)if(ae=de[ee++],ae!=ae)return!0}else for(;z>ee;ee++)if((Se||ee in de)&&de[ee]===ve)return Se||ee||0;return!Se&&-1}};Ge.exports={includes:Ce(!0),indexOf:Ce(!1)}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247}],111:[function(oe,Ge,De){var fe=oe("../internals/function-bind-context"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/indexed-object"),Ce=oe("../internals/to-object"),Se=oe("../internals/length-of-array-like"),Me=oe("../internals/array-species-create"),ve=me([].push),we=function(de){var z=de==1,ee=de==2,ae=de==3,ie=de==4,le=de==6,ue=de==7,ge=de==5||le;return function(Pe,je,Be,Fe){for(var Ne=Ce(Pe),Ae=ke(Ne),Re=fe(je,Be),We=Se(Ae),Ye=0,Ue=Fe||Me,Ke=z?Ue(Pe,We):ee||ue?Ue(Pe,0):void 0,ot,ut;We>Ye;Ye++)if((ge||Ye in Ae)&&(ot=Ae[Ye],ut=Re(ot,Ye,Ne),de))if(z)Ke[Ye]=ut;else if(ut)switch(de){case 3:return!0;case 5:return ot;case 6:return Ye;case 2:ve(Ke,ot)}else switch(de){case 4:return!1;case 7:ve(Ke,ot)}return le?-1:ae||ie?ie:Ke}};Ge.exports={forEach:we(0),map:we(1),filter:we(2),some:we(3),every:we(4),find:we(5),findIndex:we(6),filterReject:we(7)}},{"../internals/array-species-create":120,"../internals/function-bind-context":153,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],112:[function(oe,Ge,De){"use strict";var fe=oe("../internals/function-apply"),me=oe("../internals/to-indexed-object"),ke=oe("../internals/to-integer-or-infinity"),Ce=oe("../internals/length-of-array-like"),Se=oe("../internals/array-method-is-strict"),Me=Math.min,ve=[].lastIndexOf,we=!!ve&&1/[1].lastIndexOf(1,-0)<0,de=Se("lastIndexOf"),z=we||!de;Ge.exports=z?function(ae){if(we)return fe(ve,this,arguments)||0;var ie=me(this),le=Ce(ie),ue=le-1;for(arguments.length>1&&(ue=Me(ue,ke(arguments[1]))),ue<0&&(ue=le+ue);ue>=0;ue--)if(ue in ie&&ie[ue]===ae)return ue||0;return-1}:ve},{"../internals/array-method-is-strict":114,"../internals/function-apply":152,"../internals/length-of-array-like":188,"../internals/to-indexed-object":247,"../internals/to-integer-or-infinity":248}],113:[function(oe,Ge,De){var fe=oe("../internals/fails"),me=oe("../internals/well-known-symbol"),ke=oe("../internals/engine-v8-version"),Ce=me("species");Ge.exports=function(Se){return ke>=51||!fe(function(){var Me=[],ve=Me.constructor={};return ve[Ce]=function(){return{foo:1}},Me[Se](Boolean).foo!==1})}},{"../internals/engine-v8-version":146,"../internals/fails":150,"../internals/well-known-symbol":268}],114:[function(oe,Ge,De){"use strict";var fe=oe("../internals/fails");Ge.exports=function(me,ke){var Ce=[][me];return!!Ce&&fe(function(){Ce.call(null,ke||function(){return 1},1)})}},{"../internals/fails":150}],115:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/a-callable"),ke=oe("../internals/to-object"),Ce=oe("../internals/indexed-object"),Se=oe("../internals/length-of-array-like"),Me=fe.TypeError,ve=function(we){return function(de,z,ee,ae){me(z);var ie=ke(de),le=Ce(ie),ue=Se(ie),ge=we?ue-1:0,Pe=we?-1:1;if(ee<2)for(;;){if(ge in le){ae=le[ge],ge+=Pe;break}if(ge+=Pe,we?ge<0:ue<=ge)throw Me("Reduce of empty array with no initial value")}for(;we?ge>=0:ue>ge;ge+=Pe)ge in le&&(ae=z(ae,le[ge],ge,ie));return ae}};Ge.exports={left:ve(!1),right:ve(!0)}},{"../internals/a-callable":95,"../internals/global":163,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],116:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/to-absolute-index"),ke=oe("../internals/length-of-array-like"),Ce=oe("../internals/create-property"),Se=fe.Array,Me=Math.max;Ge.exports=function(ve,we,de){for(var z=ke(ve),ee=me(we,z),ae=me(de===void 0?z:de,z),ie=Se(Me(ae-ee,0)),le=0;ee<ae;ee++,le++)Ce(ie,le,ve[ee]);return ie.length=le,ie}},{"../internals/create-property":131,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245}],117:[function(oe,Ge,De){var fe=oe("../internals/function-uncurry-this");Ge.exports=fe([].slice)},{"../internals/function-uncurry-this":157}],118:[function(oe,Ge,De){var fe=oe("../internals/array-slice-simple"),me=Math.floor,ke=function(Me,ve){var we=Me.length,de=me(we/2);return we<8?Ce(Me,ve):Se(Me,ke(fe(Me,0,de),ve),ke(fe(Me,de),ve),ve)},Ce=function(Me,ve){for(var we=Me.length,de=1,z,ee;de<we;){for(ee=de,z=Me[de];ee&&ve(Me[ee-1],z)>0;)Me[ee]=Me[--ee];ee!==de++&&(Me[ee]=z)}return Me},Se=function(Me,ve,we,de){for(var z=ve.length,ee=we.length,ae=0,ie=0;ae<z||ie<ee;)Me[ae+ie]=ae<z&&ie<ee?de(ve[ae],we[ie])<=0?ve[ae++]:we[ie++]:ae<z?ve[ae++]:we[ie++];return Me};Ge.exports=ke},{"../internals/array-slice-simple":116}],119:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/is-array"),ke=oe("../internals/is-constructor"),Ce=oe("../internals/is-object"),Se=oe("../internals/well-known-symbol"),Me=Se("species"),ve=fe.Array;Ge.exports=function(we){var de;return me(we)&&(de=we.constructor,ke(de)&&(de===ve||me(de.prototype))?de=void 0:Ce(de)&&(de=de[Me],de===null&&(de=void 0))),de===void 0?ve:de}},{"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/well-known-symbol":268}],120:[function(oe,Ge,De){var fe=oe("../internals/array-species-constructor");Ge.exports=function(me,ke){return new(fe(me))(ke===0?0:ke)}},{"../internals/array-species-constructor":119}],121:[function(oe,Ge,De){var fe=oe("../internals/an-object"),me=oe("../internals/iterator-close");Ge.exports=function(ke,Ce,Se,Me){try{return Me?Ce(fe(Se)[0],Se[1]):Ce(Se)}catch(ve){me(ke,"throw",ve)}}},{"../internals/an-object":101,"../internals/iterator-close":185}],122:[function(oe,Ge,De){var fe=oe("../internals/well-known-symbol"),me=fe("iterator"),ke=!1;try{var Ce=0,Se={next:function(){return{done:!!Ce++}},return:function(){ke=!0}};Se[me]=function(){return this},Array.from(Se,function(){throw 2})}catch(Me){}Ge.exports=function(Me,ve){if(!ve&&!ke)return!1;var we=!1;try{var de={};de[me]=function(){return{next:function(){return{done:we=!0}}}},Me(de)}catch(z){}return we}},{"../internals/well-known-symbol":268}],123:[function(oe,Ge,De){var fe=oe("../internals/function-uncurry-this"),me=fe({}.toString),ke=fe("".slice);Ge.exports=function(Ce){return ke(me(Ce),8,-1)}},{"../internals/function-uncurry-this":157}],124:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/to-string-tag-support"),ke=oe("../internals/is-callable"),Ce=oe("../internals/classof-raw"),Se=oe("../internals/well-known-symbol"),Me=Se("toStringTag"),ve=fe.Object,we=Ce(function(){return arguments}())=="Arguments",de=function(z,ee){try{return z[ee]}catch(ae){}};Ge.exports=me?Ce:function(z){var ee,ae,ie;return z===void 0?"Undefined":z===null?"Null":typeof(ae=de(ee=ve(z),Me))=="string"?ae:we?Ce(ee):(ie=Ce(ee))=="Object"&&ke(ee.callee)?"Arguments":ie}},{"../internals/classof-raw":123,"../internals/global":163,"../internals/is-callable":176,"../internals/to-string-tag-support":255,"../internals/well-known-symbol":268}],125:[function(oe,Ge,De){var fe=oe("../internals/has-own-property"),me=oe("../internals/own-keys"),ke=oe("../internals/object-get-own-property-descriptor"),Ce=oe("../internals/object-define-property");Ge.exports=function(Se,Me,ve){for(var we=me(Me),de=Ce.f,z=ke.f,ee=0;ee<we.length;ee++){var ae=we[ee];!fe(Se,ae)&&!(ve&&fe(ve,ae))&&de(Se,ae,z(Me,ae))}}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/own-keys":212}],126:[function(oe,Ge,De){var fe=oe("../internals/well-known-symbol"),me=fe("match");Ge.exports=function(ke){var Ce=/./;try{"/./"[ke](Ce)}catch(Se){try{return Ce[me]=!1,"/./"[ke](Ce)}catch(Me){}}return!1}},{"../internals/well-known-symbol":268}],127:[function(oe,Ge,De){var fe=oe("../internals/fails");Ge.exports=!fe(function(){function me(){}return me.prototype.constructor=null,Object.getPrototypeOf(new me)!==me.prototype})},{"../internals/fails":150}],128:[function(oe,Ge,De){"use strict";var fe=oe("../internals/iterators-core").IteratorPrototype,me=oe("../internals/object-create"),ke=oe("../internals/create-property-descriptor"),Ce=oe("../internals/set-to-string-tag"),Se=oe("../internals/iterators"),Me=function(){return this};Ge.exports=function(ve,we,de,z){var ee=we+" Iterator";return ve.prototype=me(fe,{next:ke(+!z,de)}),Ce(ve,ee,!1,!0),Se[ee]=Me,ve}},{"../internals/create-property-descriptor":130,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-create":196,"../internals/set-to-string-tag":234}],129:[function(oe,Ge,De){var fe=oe("../internals/descriptors"),me=oe("../internals/object-define-property"),ke=oe("../internals/create-property-descriptor");Ge.exports=fe?function(Ce,Se,Me){return me.f(Ce,Se,ke(1,Me))}:function(Ce,Se,Me){return Ce[Se]=Me,Ce}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/object-define-property":198}],130:[function(oe,Ge,De){Ge.exports=function(fe,me){return{enumerable:!(fe&1),configurable:!(fe&2),writable:!(fe&4),value:me}}},{}],131:[function(oe,Ge,De){"use strict";var fe=oe("../internals/to-property-key"),me=oe("../internals/object-define-property"),ke=oe("../internals/create-property-descriptor");Ge.exports=function(Ce,Se,Me){var ve=fe(Se);ve in Ce?me.f(Ce,ve,ke(0,Me)):Ce[ve]=Me}},{"../internals/create-property-descriptor":130,"../internals/object-define-property":198,"../internals/to-property-key":254}],132:[function(oe,Ge,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/function-call"),ke=oe("../internals/is-pure"),Ce=oe("../internals/function-name"),Se=oe("../internals/is-callable"),Me=oe("../internals/create-iterator-constructor"),ve=oe("../internals/object-get-prototype-of"),we=oe("../internals/object-set-prototype-of"),de=oe("../internals/set-to-string-tag"),z=oe("../internals/create-non-enumerable-property"),ee=oe("../internals/redefine"),ae=oe("../internals/well-known-symbol"),ie=oe("../internals/iterators"),le=oe("../internals/iterators-core"),ue=Ce.PROPER,ge=Ce.CONFIGURABLE,Pe=le.IteratorPrototype,je=le.BUGGY_SAFARI_ITERATORS,Be=ae("iterator"),Fe="keys",Ne="values",Ae="entries",Re=function(){return this};Ge.exports=function(We,Ye,Ue,Ke,ot,ut,ft){Me(Ue,Ye,Ke);var wt=function(St){if(St===ot&&Ct)return Ct;if(!je&&St in xt)return xt[St];switch(St){case Fe:return function(){return new Ue(this,St)};case Ne:return function(){return new Ue(this,St)};case Ae:return function(){return new Ue(this,St)}}return function(){return new Ue(this)}},Je=Ye+" Iterator",nt=!1,xt=We.prototype,Pt=xt[Be]||xt["@@iterator"]||ot&&xt[ot],Ct=!je&&Pt||wt(ot),gt=Ye=="Array"&&xt.entries||Pt,dt,ht,Et;if(gt&&(dt=ve(gt.call(new We)),dt!==Object.prototype&&dt.next&&(!ke&&ve(dt)!==Pe&&(we?we(dt,Pe):Se(dt[Be])||ee(dt,Be,Re)),de(dt,Je,!0,!0),ke&&(ie[Je]=Re))),ue&&ot==Ne&&Pt&&Pt.name!==Ne&&(!ke&&ge?z(xt,"name",Ne):(nt=!0,Ct=function(){return me(Pt,this)})),ot)if(ht={values:wt(Ne),keys:ut?Ct:wt(Fe),entries:wt(Ae)},ft)for(Et in ht)(je||nt||!(Et in xt))&&ee(xt,Et,ht[Et]);else fe({target:Ye,proto:!0,forced:je||nt},ht);return(!ke||ft)&&xt[Be]!==Ct&&ee(xt,Be,Ct,{name:ot}),ie[Ye]=Ct,ht}},{"../internals/create-iterator-constructor":128,"../internals/create-non-enumerable-property":129,"../internals/export":149,"../internals/function-call":155,"../internals/function-name":156,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-get-prototype-of":203,"../internals/object-set-prototype-of":208,"../internals/redefine":222,"../internals/set-to-string-tag":234,"../internals/well-known-symbol":268}],133:[function(oe,Ge,De){var fe=oe("../internals/path"),me=oe("../internals/has-own-property"),ke=oe("../internals/well-known-symbol-wrapped"),Ce=oe("../internals/object-define-property").f;Ge.exports=function(Se){var Me=fe.Symbol||(fe.Symbol={});me(Me,Se)||Ce(Me,Se,{value:ke.f(Se)})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/path":213,"../internals/well-known-symbol-wrapped":267}],134:[function(oe,Ge,De){var fe=oe("../internals/fails");Ge.exports=!fe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},{"../internals/fails":150}],135:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/is-object"),ke=fe.document,Ce=me(ke)&&me(ke.createElement);Ge.exports=function(Se){return Ce?ke.createElement(Se):{}}},{"../internals/global":163,"../internals/is-object":180}],136:[function(oe,Ge,De){Ge.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},{}],137:[function(oe,Ge,De){var fe=oe("../internals/document-create-element"),me=fe("span").classList,ke=me&&me.constructor&&me.constructor.prototype;Ge.exports=ke===Object.prototype?void 0:ke},{"../internals/document-create-element":135}],138:[function(oe,Ge,De){var fe=oe("../internals/engine-user-agent"),me=fe.match(/firefox\/(\d+)/i);Ge.exports=!!me&&+me[1]},{"../internals/engine-user-agent":145}],139:[function(oe,Ge,De){Ge.exports=typeof window=="object"&&typeof Deno!="object"},{}],140:[function(oe,Ge,De){var fe=oe("../internals/engine-user-agent");Ge.exports=/MSIE|Trident/.test(fe)},{"../internals/engine-user-agent":145}],141:[function(oe,Ge,De){var fe=oe("../internals/engine-user-agent"),me=oe("../internals/global");Ge.exports=/ipad|iphone|ipod/i.test(fe)&&me.Pebble!==void 0},{"../internals/engine-user-agent":145,"../internals/global":163}],142:[function(oe,Ge,De){var fe=oe("../internals/engine-user-agent");Ge.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(fe)},{"../internals/engine-user-agent":145}],143:[function(oe,Ge,De){var fe=oe("../internals/classof-raw"),me=oe("../internals/global");Ge.exports=fe(me.process)=="process"},{"../internals/classof-raw":123,"../internals/global":163}],144:[function(oe,Ge,De){var fe=oe("../internals/engine-user-agent");Ge.exports=/web0s(?!.*chrome)/i.test(fe)},{"../internals/engine-user-agent":145}],145:[function(oe,Ge,De){var fe=oe("../internals/get-built-in");Ge.exports=fe("navigator","userAgent")||""},{"../internals/get-built-in":158}],146:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/engine-user-agent"),ke=fe.process,Ce=fe.Deno,Se=ke&&ke.versions||Ce&&Ce.version,Me=Se&&Se.v8,ve,we;Me&&(ve=Me.split("."),we=ve[0]>0&&ve[0]<4?1:+(ve[0]+ve[1])),!we&&me&&(ve=me.match(/Edge\/(\d+)/),(!ve||ve[1]>=74)&&(ve=me.match(/Chrome\/(\d+)/),ve&&(we=+ve[1]))),Ge.exports=we},{"../internals/engine-user-agent":145,"../internals/global":163}],147:[function(oe,Ge,De){var fe=oe("../internals/engine-user-agent"),me=fe.match(/AppleWebKit\/(\d+)\./);Ge.exports=!!me&&+me[1]},{"../internals/engine-user-agent":145}],148:[function(oe,Ge,De){Ge.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],149:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/object-get-own-property-descriptor").f,ke=oe("../internals/create-non-enumerable-property"),Ce=oe("../internals/redefine"),Se=oe("../internals/set-global"),Me=oe("../internals/copy-constructor-properties"),ve=oe("../internals/is-forced");Ge.exports=function(we,de){var z=we.target,ee=we.global,ae=we.stat,ie,le,ue,ge,Pe,je;if(ee?le=fe:ae?le=fe[z]||Se(z,{}):le=(fe[z]||{}).prototype,le)for(ue in de){if(Pe=de[ue],we.noTargetGet?(je=me(le,ue),ge=je&&je.value):ge=le[ue],ie=ve(ee?ue:z+(ae?".":"#")+ue,we.forced),!ie&&ge!==void 0){if(typeof Pe==typeof ge)continue;Me(Pe,ge)}(we.sham||ge&&ge.sham)&&ke(Pe,"sham",!0),Ce(le,ue,Pe,we)}}},{"../internals/copy-constructor-properties":125,"../internals/create-non-enumerable-property":129,"../internals/global":163,"../internals/is-forced":178,"../internals/object-get-own-property-descriptor":199,"../internals/redefine":222,"../internals/set-global":232}],150:[function(oe,Ge,De){Ge.exports=function(fe){try{return!!fe()}catch(me){return!0}}},{}],151:[function(oe,Ge,De){"use strict";oe("../modules/es.regexp.exec");var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/redefine"),ke=oe("../internals/regexp-exec"),Ce=oe("../internals/fails"),Se=oe("../internals/well-known-symbol"),Me=oe("../internals/create-non-enumerable-property"),ve=Se("species"),we=RegExp.prototype;Ge.exports=function(de,z,ee,ae){var ie=Se(de),le=!Ce(function(){var je={};return je[ie]=function(){return 7},""[de](je)!=7}),ue=le&&!Ce(function(){var je=!1,Be=/a/;return de==="split"&&(Be={},Be.constructor={},Be.constructor[ve]=function(){return Be},Be.flags="",Be[ie]=/./[ie]),Be.exec=function(){return je=!0,null},Be[ie](""),!je});if(!le||!ue||ee){var ge=fe(/./[ie]),Pe=z(ie,""[de],function(je,Be,Fe,Ne,Ae){var Re=fe(je),We=Be.exec;return We===ke||We===we.exec?le&&!Ae?{done:!0,value:ge(Be,Fe,Ne)}:{done:!0,value:Re(Fe,Be,Ne)}:{done:!1}});me(String.prototype,de,Pe[0]),me(we,ie,Pe[1])}ae&&Me(we[ie],"sham",!0)}},{"../internals/create-non-enumerable-property":129,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/redefine":222,"../internals/regexp-exec":224,"../internals/well-known-symbol":268,"../modules/es.regexp.exec":300}],152:[function(oe,Ge,De){var fe=oe("../internals/function-bind-native"),me=Function.prototype,ke=me.apply,Ce=me.call;Ge.exports=typeof Reflect=="object"&&Reflect.apply||(fe?Ce.bind(ke):function(){return Ce.apply(ke,arguments)})},{"../internals/function-bind-native":154}],153:[function(oe,Ge,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/a-callable"),ke=oe("../internals/function-bind-native"),Ce=fe(fe.bind);Ge.exports=function(Se,Me){return me(Se),Me===void 0?Se:ke?Ce(Se,Me):function(){return Se.apply(Me,arguments)}}},{"../internals/a-callable":95,"../internals/function-bind-native":154,"../internals/function-uncurry-this":157}],154:[function(oe,Ge,De){var fe=oe("../internals/fails");Ge.exports=!fe(function(){var me=function(){}.bind();return typeof me!="function"||me.hasOwnProperty("prototype")})},{"../internals/fails":150}],155:[function(oe,Ge,De){var fe=oe("../internals/function-bind-native"),me=Function.prototype.call;Ge.exports=fe?me.bind(me):function(){return me.apply(me,arguments)}},{"../internals/function-bind-native":154}],156:[function(oe,Ge,De){var fe=oe("../internals/descriptors"),me=oe("../internals/has-own-property"),ke=Function.prototype,Ce=fe&&Object.getOwnPropertyDescriptor,Se=me(ke,"name"),Me=Se&&function(){}.name==="something",ve=Se&&(!fe||fe&&Ce(ke,"name").configurable);Ge.exports={EXISTS:Se,PROPER:Me,CONFIGURABLE:ve}},{"../internals/descriptors":134,"../internals/has-own-property":164}],157:[function(oe,Ge,De){var fe=oe("../internals/function-bind-native"),me=Function.prototype,ke=me.bind,Ce=me.call,Se=fe&&ke.bind(Ce,Ce);Ge.exports=fe?function(Me){return Me&&Se(Me)}:function(Me){return Me&&function(){return Ce.apply(Me,arguments)}}},{"../internals/function-bind-native":154}],158:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/is-callable"),ke=function(Ce){return me(Ce)?Ce:void 0};Ge.exports=function(Ce,Se){return arguments.length<2?ke(fe[Ce]):fe[Ce]&&fe[Ce][Se]}},{"../internals/global":163,"../internals/is-callable":176}],159:[function(oe,Ge,De){var fe=oe("../internals/classof"),me=oe("../internals/get-method"),ke=oe("../internals/iterators"),Ce=oe("../internals/well-known-symbol"),Se=Ce("iterator");Ge.exports=function(Me){if(Me!=null)return me(Me,Se)||me(Me,"@@iterator")||ke[fe(Me)]}},{"../internals/classof":124,"../internals/get-method":161,"../internals/iterators":187,"../internals/well-known-symbol":268}],160:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/function-call"),ke=oe("../internals/a-callable"),Ce=oe("../internals/an-object"),Se=oe("../internals/try-to-string"),Me=oe("../internals/get-iterator-method"),ve=fe.TypeError;Ge.exports=function(we,de){var z=arguments.length<2?Me(we):de;if(ke(z))return Ce(me(z,we));throw ve(Se(we)+" is not iterable")}},{"../internals/a-callable":95,"../internals/an-object":101,"../internals/function-call":155,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/try-to-string":257}],161:[function(oe,Ge,De){var fe=oe("../internals/a-callable");Ge.exports=function(me,ke){var Ce=me[ke];return Ce==null?void 0:fe(Ce)}},{"../internals/a-callable":95}],162:[function(oe,Ge,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/to-object"),ke=Math.floor,Ce=fe("".charAt),Se=fe("".replace),Me=fe("".slice),ve=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,we=/\$([$&'`]|\d{1,2})/g;Ge.exports=function(de,z,ee,ae,ie,le){var ue=ee+de.length,ge=ae.length,Pe=we;return ie!==void 0&&(ie=me(ie),Pe=ve),Se(le,Pe,function(je,Be){var Fe;switch(Ce(Be,0)){case"$":return"$";case"&":return de;case"`":return Me(z,0,ee);case"'":return Me(z,ue);case"<":Fe=ie[Me(Be,1,-1)];break;default:var Ne=+Be;if(Ne===0)return je;if(Ne>ge){var Ae=ke(Ne/10);return Ae===0?je:Ae<=ge?ae[Ae-1]===void 0?Ce(Be,1):ae[Ae-1]+Ce(Be,1):je}Fe=ae[Ne-1]}return Fe===void 0?"":Fe})}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],163:[function(oe,Ge,De){(function(fe){(function(){var me=function(ke){return ke&&ke.Math==Math&&ke};Ge.exports=me(typeof globalThis=="object"&&globalThis)||me(typeof window=="object"&&window)||me(typeof self=="object"&&self)||me(typeof fe=="object"&&fe)||function(){return this}()||Function("return this")()}).call(this)}).call(this,typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],164:[function(oe,Ge,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/to-object"),ke=fe({}.hasOwnProperty);Ge.exports=Object.hasOwn||function(Se,Me){return ke(me(Se),Me)}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],165:[function(oe,Ge,De){Ge.exports={}},{}],166:[function(oe,Ge,De){var fe=oe("../internals/global");Ge.exports=function(me,ke){var Ce=fe.console;Ce&&Ce.error&&(arguments.length==1?Ce.error(me):Ce.error(me,ke))}},{"../internals/global":163}],167:[function(oe,Ge,De){var fe=oe("../internals/get-built-in");Ge.exports=fe("document","documentElement")},{"../internals/get-built-in":158}],168:[function(oe,Ge,De){var fe=oe("../internals/descriptors"),me=oe("../internals/fails"),ke=oe("../internals/document-create-element");Ge.exports=!fe&&!me(function(){return Object.defineProperty(ke("div"),"a",{get:function(){return 7}}).a!=7})},{"../internals/descriptors":134,"../internals/document-create-element":135,"../internals/fails":150}],169:[function(oe,Ge,De){var fe=oe("../internals/global"),me=fe.Array,ke=Math.abs,Ce=Math.pow,Se=Math.floor,Me=Math.log,ve=Math.LN2,we=function(z,ee,ae){var ie=me(ae),le=ae*8-ee-1,ue=(1<<le)-1,ge=ue>>1,Pe=ee===23?Ce(2,-24)-Ce(2,-77):0,je=z<0||z===0&&1/z<0?1:0,Be=0,Fe,Ne,Ae;for(z=ke(z),z!=z||z===1/0?(Ne=z!=z?1:0,Fe=ue):(Fe=Se(Me(z)/ve),Ae=Ce(2,-Fe),z*Ae<1&&(Fe--,Ae*=2),Fe+ge>=1?z+=Pe/Ae:z+=Pe*Ce(2,1-ge),z*Ae>=2&&(Fe++,Ae/=2),Fe+ge>=ue?(Ne=0,Fe=ue):Fe+ge>=1?(Ne=(z*Ae-1)*Ce(2,ee),Fe=Fe+ge):(Ne=z*Ce(2,ge-1)*Ce(2,ee),Fe=0));ee>=8;)ie[Be++]=Ne&255,Ne/=256,ee-=8;for(Fe=Fe<<ee|Ne,le+=ee;le>0;)ie[Be++]=Fe&255,Fe/=256,le-=8;return ie[--Be]|=je*128,ie},de=function(z,ee){var ae=z.length,ie=ae*8-ee-1,le=(1<<ie)-1,ue=le>>1,ge=ie-7,Pe=ae-1,je=z[Pe--],Be=je&127,Fe;for(je>>=7;ge>0;)Be=Be*256+z[Pe--],ge-=8;for(Fe=Be&(1<<-ge)-1,Be>>=-ge,ge+=ee;ge>0;)Fe=Fe*256+z[Pe--],ge-=8;if(Be===0)Be=1-ue;else{if(Be===le)return Fe?NaN:je?-1/0:1/0;Fe=Fe+Ce(2,ee),Be=Be-ue}return(je?-1:1)*Fe*Ce(2,Be-ee)};Ge.exports={pack:we,unpack:de}},{"../internals/global":163}],170:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/fails"),Ce=oe("../internals/classof-raw"),Se=fe.Object,Me=me("".split);Ge.exports=ke(function(){return!Se("z").propertyIsEnumerable(0)})?function(ve){return Ce(ve)=="String"?Me(ve,""):Se(ve)}:Se},{"../internals/classof-raw":123,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],171:[function(oe,Ge,De){var fe=oe("../internals/is-callable"),me=oe("../internals/is-object"),ke=oe("../internals/object-set-prototype-of");Ge.exports=function(Ce,Se,Me){var ve,we;return ke&&fe(ve=Se.constructor)&&ve!==Me&&me(we=ve.prototype)&&we!==Me.prototype&&ke(Ce,we),Ce}},{"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-set-prototype-of":208}],172:[function(oe,Ge,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/is-callable"),ke=oe("../internals/shared-store"),Ce=fe(Function.toString);me(ke.inspectSource)||(ke.inspectSource=function(Se){return Ce(Se)}),Ge.exports=ke.inspectSource},{"../internals/function-uncurry-this":157,"../internals/is-callable":176,"../internals/shared-store":236}],173:[function(oe,Ge,De){var fe=oe("../internals/native-weak-map"),me=oe("../internals/global"),ke=oe("../internals/function-uncurry-this"),Ce=oe("../internals/is-object"),Se=oe("../internals/create-non-enumerable-property"),Me=oe("../internals/has-own-property"),ve=oe("../internals/shared-store"),we=oe("../internals/shared-key"),de=oe("../internals/hidden-keys"),z="Object already initialized",ee=me.TypeError,ae=me.WeakMap,ie,le,ue,ge=function(Re){return ue(Re)?le(Re):ie(Re,{})},Pe=function(Re){return function(We){var Ye;if(!Ce(We)||(Ye=le(We)).type!==Re)throw ee("Incompatible receiver, "+Re+" required");return Ye}};if(fe||ve.state){var je=ve.state||(ve.state=new ae),Be=ke(je.get),Fe=ke(je.has),Ne=ke(je.set);ie=function(Re,We){if(Fe(je,Re))throw new ee(z);return We.facade=Re,Ne(je,Re,We),We},le=function(Re){return Be(je,Re)||{}},ue=function(Re){return Fe(je,Re)}}else{var Ae=we("state");de[Ae]=!0,ie=function(Re,We){if(Me(Re,Ae))throw new ee(z);return We.facade=Re,Se(Re,Ae,We),We},le=function(Re){return Me(Re,Ae)?Re[Ae]:{}},ue=function(Re){return Me(Re,Ae)}}Ge.exports={set:ie,get:le,has:ue,enforce:ge,getterFor:Pe}},{"../internals/create-non-enumerable-property":129,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/is-object":180,"../internals/native-weak-map":192,"../internals/shared-key":235,"../internals/shared-store":236}],174:[function(oe,Ge,De){var fe=oe("../internals/well-known-symbol"),me=oe("../internals/iterators"),ke=fe("iterator"),Ce=Array.prototype;Ge.exports=function(Se){return Se!==void 0&&(me.Array===Se||Ce[ke]===Se)}},{"../internals/iterators":187,"../internals/well-known-symbol":268}],175:[function(oe,Ge,De){var fe=oe("../internals/classof-raw");Ge.exports=Array.isArray||function(ke){return fe(ke)=="Array"}},{"../internals/classof-raw":123}],176:[function(oe,Ge,De){Ge.exports=function(fe){return typeof fe=="function"}},{}],177:[function(oe,Ge,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/fails"),ke=oe("../internals/is-callable"),Ce=oe("../internals/classof"),Se=oe("../internals/get-built-in"),Me=oe("../internals/inspect-source"),ve=function(){},we=[],de=Se("Reflect","construct"),z=/^\s*(?:class|function)\b/,ee=fe(z.exec),ae=!z.exec(ve),ie=function(ge){if(!ke(ge))return!1;try{return de(ve,we,ge),!0}catch(Pe){return!1}},le=function(ge){if(!ke(ge))return!1;switch(Ce(ge)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return ae||!!ee(z,Me(ge))}catch(Pe){return!0}};le.sham=!0,Ge.exports=!de||me(function(){var ue;return ie(ie.call)||!ie(Object)||!ie(function(){ue=!0})||ue})?le:ie},{"../internals/classof":124,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/inspect-source":172,"../internals/is-callable":176}],178:[function(oe,Ge,De){var fe=oe("../internals/fails"),me=oe("../internals/is-callable"),ke=/#|\.prototype\./,Ce=function(de,z){var ee=Me[Se(de)];return ee==we?!0:ee==ve?!1:me(z)?fe(z):!!z},Se=Ce.normalize=function(de){return String(de).replace(ke,".").toLowerCase()},Me=Ce.data={},ve=Ce.NATIVE="N",we=Ce.POLYFILL="P";Ge.exports=Ce},{"../internals/fails":150,"../internals/is-callable":176}],179:[function(oe,Ge,De){var fe=oe("../internals/is-object"),me=Math.floor;Ge.exports=Number.isInteger||function(Ce){return!fe(Ce)&&isFinite(Ce)&&me(Ce)===Ce}},{"../internals/is-object":180}],180:[function(oe,Ge,De){var fe=oe("../internals/is-callable");Ge.exports=function(me){return typeof me=="object"?me!==null:fe(me)}},{"../internals/is-callable":176}],181:[function(oe,Ge,De){Ge.exports=!1},{}],182:[function(oe,Ge,De){var fe=oe("../internals/is-object"),me=oe("../internals/classof-raw"),ke=oe("../internals/well-known-symbol"),Ce=ke("match");Ge.exports=function(Se){var Me;return fe(Se)&&((Me=Se[Ce])!==void 0?!!Me:me(Se)=="RegExp")}},{"../internals/classof-raw":123,"../internals/is-object":180,"../internals/well-known-symbol":268}],183:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/get-built-in"),ke=oe("../internals/is-callable"),Ce=oe("../internals/object-is-prototype-of"),Se=oe("../internals/use-symbol-as-uid"),Me=fe.Object;Ge.exports=Se?function(ve){return typeof ve=="symbol"}:function(ve){var we=me("Symbol");return ke(we)&&Ce(we.prototype,Me(ve))}},{"../internals/get-built-in":158,"../internals/global":163,"../internals/is-callable":176,"../internals/object-is-prototype-of":204,"../internals/use-symbol-as-uid":264}],184:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/function-bind-context"),ke=oe("../internals/function-call"),Ce=oe("../internals/an-object"),Se=oe("../internals/try-to-string"),Me=oe("../internals/is-array-iterator-method"),ve=oe("../internals/length-of-array-like"),we=oe("../internals/object-is-prototype-of"),de=oe("../internals/get-iterator"),z=oe("../internals/get-iterator-method"),ee=oe("../internals/iterator-close"),ae=fe.TypeError,ie=function(ue,ge){this.stopped=ue,this.result=ge},le=ie.prototype;Ge.exports=function(ue,ge,Pe){var je=Pe&&Pe.that,Be=!!(Pe&&Pe.AS_ENTRIES),Fe=!!(Pe&&Pe.IS_ITERATOR),Ne=!!(Pe&&Pe.INTERRUPTED),Ae=me(ge,je),Re,We,Ye,Ue,Ke,ot,ut,ft=function(Je){return Re&&ee(Re,"normal",Je),new ie(!0,Je)},wt=function(Je){return Be?(Ce(Je),Ne?Ae(Je[0],Je[1],ft):Ae(Je[0],Je[1])):Ne?Ae(Je,ft):Ae(Je)};if(Fe)Re=ue;else{if(We=z(ue),!We)throw ae(Se(ue)+" is not iterable");if(Me(We)){for(Ye=0,Ue=ve(ue);Ue>Ye;Ye++)if(Ke=wt(ue[Ye]),Ke&&we(le,Ke))return Ke;return new ie(!1)}Re=de(ue,We)}for(ot=Re.next;!(ut=ke(ot,Re)).done;){try{Ke=wt(ut.value)}catch(Je){ee(Re,"throw",Je)}if(typeof Ke=="object"&&Ke&&we(le,Ke))return Ke}return new ie(!1)}},{"../internals/an-object":101,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/is-array-iterator-method":174,"../internals/iterator-close":185,"../internals/length-of-array-like":188,"../internals/object-is-prototype-of":204,"../internals/try-to-string":257}],185:[function(oe,Ge,De){var fe=oe("../internals/function-call"),me=oe("../internals/an-object"),ke=oe("../internals/get-method");Ge.exports=function(Ce,Se,Me){var ve,we;me(Ce);try{if(ve=ke(Ce,"return"),!ve){if(Se==="throw")throw Me;return Me}ve=fe(ve,Ce)}catch(de){we=!0,ve=de}if(Se==="throw")throw Me;if(we)throw ve;return me(ve),Me}},{"../internals/an-object":101,"../internals/function-call":155,"../internals/get-method":161}],186:[function(oe,Ge,De){"use strict";var fe=oe("../internals/fails"),me=oe("../internals/is-callable"),ke=oe("../internals/object-create"),Ce=oe("../internals/object-get-prototype-of"),Se=oe("../internals/redefine"),Me=oe("../internals/well-known-symbol"),ve=oe("../internals/is-pure"),we=Me("iterator"),de=!1,z,ee,ae;[].keys&&(ae=[].keys(),"next"in ae?(ee=Ce(Ce(ae)),ee!==Object.prototype&&(z=ee)):de=!0);var ie=z==null||fe(function(){var le={};return z[we].call(le)!==le});ie?z={}:ve&&(z=ke(z)),me(z[we])||Se(z,we,function(){return this}),Ge.exports={IteratorPrototype:z,BUGGY_SAFARI_ITERATORS:de}},{"../internals/fails":150,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/object-create":196,"../internals/object-get-prototype-of":203,"../internals/redefine":222,"../internals/well-known-symbol":268}],187:[function(oe,Ge,De){arguments[4][165][0].apply(De,arguments)},{dup:165}],188:[function(oe,Ge,De){var fe=oe("../internals/to-length");Ge.exports=function(me){return fe(me.length)}},{"../internals/to-length":249}],189:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/function-bind-context"),ke=oe("../internals/object-get-own-property-descriptor").f,Ce=oe("../internals/task").set,Se=oe("../internals/engine-is-ios"),Me=oe("../internals/engine-is-ios-pebble"),ve=oe("../internals/engine-is-webos-webkit"),we=oe("../internals/engine-is-node"),de=fe.MutationObserver||fe.WebKitMutationObserver,z=fe.document,ee=fe.process,ae=fe.Promise,ie=ke(fe,"queueMicrotask"),le=ie&&ie.value,ue,ge,Pe,je,Be,Fe,Ne,Ae;le||(ue=function(){var Re,We;for(we&&(Re=ee.domain)&&Re.exit();ge;){We=ge.fn,ge=ge.next;try{We()}catch(Ye){throw ge?je():Pe=void 0,Ye}}Pe=void 0,Re&&Re.enter()},!Se&&!we&&!ve&&de&&z?(Be=!0,Fe=z.createTextNode(""),new de(ue).observe(Fe,{characterData:!0}),je=function(){Fe.data=Be=!Be}):!Me&&ae&&ae.resolve?(Ne=ae.resolve(void 0),Ne.constructor=ae,Ae=me(Ne.then,Ne),je=function(){Ae(ue)}):we?je=function(){ee.nextTick(ue)}:(Ce=me(Ce,fe),je=function(){Ce(ue)})),Ge.exports=le||function(Re){var We={fn:Re,next:void 0};Pe&&(Pe.next=We),ge||(ge=We,je()),Pe=We}},{"../internals/engine-is-ios":142,"../internals/engine-is-ios-pebble":141,"../internals/engine-is-node":143,"../internals/engine-is-webos-webkit":144,"../internals/function-bind-context":153,"../internals/global":163,"../internals/object-get-own-property-descriptor":199,"../internals/task":243}],190:[function(oe,Ge,De){var fe=oe("../internals/native-symbol");Ge.exports=fe&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/native-symbol":191}],191:[function(oe,Ge,De){var fe=oe("../internals/engine-v8-version"),me=oe("../internals/fails");Ge.exports=!!Object.getOwnPropertySymbols&&!me(function(){var ke=Symbol();return!String(ke)||!(Object(ke)instanceof Symbol)||!Symbol.sham&&fe&&fe<41})},{"../internals/engine-v8-version":146,"../internals/fails":150}],192:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/is-callable"),ke=oe("../internals/inspect-source"),Ce=fe.WeakMap;Ge.exports=me(Ce)&&/native code/.test(ke(Ce))},{"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176}],193:[function(oe,Ge,De){"use strict";var fe=oe("../internals/a-callable"),me=function(ke){var Ce,Se;this.promise=new ke(function(Me,ve){if(Ce!==void 0||Se!==void 0)throw TypeError("Bad Promise constructor");Ce=Me,Se=ve}),this.resolve=fe(Ce),this.reject=fe(Se)};Ge.exports.f=function(ke){return new me(ke)}},{"../internals/a-callable":95}],194:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/is-regexp"),ke=fe.TypeError;Ge.exports=function(Ce){if(me(Ce))throw ke("The method doesn't accept regular expressions");return Ce}},{"../internals/global":163,"../internals/is-regexp":182}],195:[function(oe,Ge,De){"use strict";var fe=oe("../internals/descriptors"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/function-call"),Ce=oe("../internals/fails"),Se=oe("../internals/object-keys"),Me=oe("../internals/object-get-own-property-symbols"),ve=oe("../internals/object-property-is-enumerable"),we=oe("../internals/to-object"),de=oe("../internals/indexed-object"),z=Object.assign,ee=Object.defineProperty,ae=me([].concat);Ge.exports=!z||Ce(function(){if(fe&&z({b:1},z(ee({},"a",{enumerable:!0,get:function(){ee(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var ie={},le={},ue=Symbol(),ge="abcdefghijklmnopqrst";return ie[ue]=7,ge.split("").forEach(function(Pe){le[Pe]=Pe}),z({},ie)[ue]!=7||Se(z({},le)).join("")!=ge})?function(le,ue){for(var ge=we(le),Pe=arguments.length,je=1,Be=Me.f,Fe=ve.f;Pe>je;)for(var Ne=de(arguments[je++]),Ae=Be?ae(Se(Ne),Be(Ne)):Se(Ne),Re=Ae.length,We=0,Ye;Re>We;)Ye=Ae[We++],(!fe||ke(Fe,Ne,Ye))&&(ge[Ye]=Ne[Ye]);return ge}:z},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/object-get-own-property-symbols":202,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-object":250}],196:[function(oe,Ge,De){var fe=oe("../internals/an-object"),me=oe("../internals/object-define-properties"),ke=oe("../internals/enum-bug-keys"),Ce=oe("../internals/hidden-keys"),Se=oe("../internals/html"),Me=oe("../internals/document-create-element"),ve=oe("../internals/shared-key"),we=">",de="<",z="prototype",ee="script",ae=ve("IE_PROTO"),ie=function(){},le=function(Be){return de+ee+we+Be+de+"/"+ee+we},ue=function(Be){Be.write(le("")),Be.close();var Fe=Be.parentWindow.Object;return Be=null,Fe},ge=function(){var Be=Me("iframe"),Fe="java"+ee+":",Ne;return Be.style.display="none",Se.appendChild(Be),Be.src=String(Fe),Ne=Be.contentWindow.document,Ne.open(),Ne.write(le("document.F=Object")),Ne.close(),Ne.F},Pe,je=function(){try{Pe=new ActiveXObject("htmlfile")}catch(Fe){}je=typeof document!="undefined"?document.domain&&Pe?ue(Pe):ge():ue(Pe);for(var Be=ke.length;Be--;)delete je[z][ke[Be]];return je()};Ce[ae]=!0,Ge.exports=Object.create||function(Fe,Ne){var Ae;return Fe!==null?(ie[z]=fe(Fe),Ae=new ie,ie[z]=null,Ae[ae]=Fe):Ae=je(),Ne===void 0?Ae:me.f(Ae,Ne)}},{"../internals/an-object":101,"../internals/document-create-element":135,"../internals/enum-bug-keys":148,"../internals/hidden-keys":165,"../internals/html":167,"../internals/object-define-properties":197,"../internals/shared-key":235}],197:[function(oe,Ge,De){var fe=oe("../internals/descriptors"),me=oe("../internals/v8-prototype-define-bug"),ke=oe("../internals/object-define-property"),Ce=oe("../internals/an-object"),Se=oe("../internals/to-indexed-object"),Me=oe("../internals/object-keys");De.f=fe&&!me?Object.defineProperties:function(we,de){Ce(we);for(var z=Se(de),ee=Me(de),ae=ee.length,ie=0,le;ae>ie;)ke.f(we,le=ee[ie++],z[le]);return we}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/object-define-property":198,"../internals/object-keys":206,"../internals/to-indexed-object":247,"../internals/v8-prototype-define-bug":265}],198:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/descriptors"),ke=oe("../internals/ie8-dom-define"),Ce=oe("../internals/v8-prototype-define-bug"),Se=oe("../internals/an-object"),Me=oe("../internals/to-property-key"),ve=fe.TypeError,we=Object.defineProperty,de=Object.getOwnPropertyDescriptor,z="enumerable",ee="configurable",ae="writable";De.f=me?Ce?function(le,ue,ge){if(Se(le),ue=Me(ue),Se(ge),typeof le=="function"&&ue==="prototype"&&"value"in ge&&ae in ge&&!ge[ae]){var Pe=de(le,ue);Pe&&Pe[ae]&&(le[ue]=ge.value,ge={configurable:ee in ge?ge[ee]:Pe[ee],enumerable:z in ge?ge[z]:Pe[z],writable:!1})}return we(le,ue,ge)}:we:function(le,ue,ge){if(Se(le),ue=Me(ue),Se(ge),ke)try{return we(le,ue,ge)}catch(Pe){}if("get"in ge||"set"in ge)throw ve("Accessors not supported");return"value"in ge&&(le[ue]=ge.value),le}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/global":163,"../internals/ie8-dom-define":168,"../internals/to-property-key":254,"../internals/v8-prototype-define-bug":265}],199:[function(oe,Ge,De){var fe=oe("../internals/descriptors"),me=oe("../internals/function-call"),ke=oe("../internals/object-property-is-enumerable"),Ce=oe("../internals/create-property-descriptor"),Se=oe("../internals/to-indexed-object"),Me=oe("../internals/to-property-key"),ve=oe("../internals/has-own-property"),we=oe("../internals/ie8-dom-define"),de=Object.getOwnPropertyDescriptor;De.f=fe?de:function(ee,ae){if(ee=Se(ee),ae=Me(ae),we)try{return de(ee,ae)}catch(ie){}if(ve(ee,ae))return Ce(!me(ke.f,ee,ae),ee[ae])}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/function-call":155,"../internals/has-own-property":164,"../internals/ie8-dom-define":168,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247,"../internals/to-property-key":254}],200:[function(oe,Ge,De){var fe=oe("../internals/classof-raw"),me=oe("../internals/to-indexed-object"),ke=oe("../internals/object-get-own-property-names").f,Ce=oe("../internals/array-slice-simple"),Se=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Me=function(ve){try{return ke(ve)}catch(we){return Ce(Se)}};Ge.exports.f=function(we){return Se&&fe(we)=="Window"?Me(we):ke(me(we))}},{"../internals/array-slice-simple":116,"../internals/classof-raw":123,"../internals/object-get-own-property-names":201,"../internals/to-indexed-object":247}],201:[function(oe,Ge,De){var fe=oe("../internals/object-keys-internal"),me=oe("../internals/enum-bug-keys"),ke=me.concat("length","prototype");De.f=Object.getOwnPropertyNames||function(Se){return fe(Se,ke)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],202:[function(oe,Ge,De){De.f=Object.getOwnPropertySymbols},{}],203:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/has-own-property"),ke=oe("../internals/is-callable"),Ce=oe("../internals/to-object"),Se=oe("../internals/shared-key"),Me=oe("../internals/correct-prototype-getter"),ve=Se("IE_PROTO"),we=fe.Object,de=we.prototype;Ge.exports=Me?we.getPrototypeOf:function(z){var ee=Ce(z);if(me(ee,ve))return ee[ve];var ae=ee.constructor;return ke(ae)&&ee instanceof ae?ae.prototype:ee instanceof we?de:null}},{"../internals/correct-prototype-getter":127,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/shared-key":235,"../internals/to-object":250}],204:[function(oe,Ge,De){var fe=oe("../internals/function-uncurry-this");Ge.exports=fe({}.isPrototypeOf)},{"../internals/function-uncurry-this":157}],205:[function(oe,Ge,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/has-own-property"),ke=oe("../internals/to-indexed-object"),Ce=oe("../internals/array-includes").indexOf,Se=oe("../internals/hidden-keys"),Me=fe([].push);Ge.exports=function(ve,we){var de=ke(ve),z=0,ee=[],ae;for(ae in de)!me(Se,ae)&&me(de,ae)&&Me(ee,ae);for(;we.length>z;)me(de,ae=we[z++])&&(~Ce(ee,ae)||Me(ee,ae));return ee}},{"../internals/array-includes":110,"../internals/function-uncurry-this":157,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/to-indexed-object":247}],206:[function(oe,Ge,De){var fe=oe("../internals/object-keys-internal"),me=oe("../internals/enum-bug-keys");Ge.exports=Object.keys||function(Ce){return fe(Ce,me)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],207:[function(oe,Ge,De){"use strict";var fe={}.propertyIsEnumerable,me=Object.getOwnPropertyDescriptor,ke=me&&!fe.call({1:2},1);De.f=ke?function(Se){var Me=me(this,Se);return!!Me&&Me.enumerable}:fe},{}],208:[function(oe,Ge,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/an-object"),ke=oe("../internals/a-possible-prototype");Ge.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var Ce=!1,Se={},Me;try{Me=fe(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),Me(Se,[]),Ce=Se instanceof Array}catch(ve){}return function(we,de){return me(we),ke(de),Ce?Me(we,de):we.__proto__=de,we}}():void 0)},{"../internals/a-possible-prototype":97,"../internals/an-object":101,"../internals/function-uncurry-this":157}],209:[function(oe,Ge,De){var fe=oe("../internals/descriptors"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/object-keys"),Ce=oe("../internals/to-indexed-object"),Se=oe("../internals/object-property-is-enumerable").f,Me=me(Se),ve=me([].push),we=function(de){return function(z){for(var ee=Ce(z),ae=ke(ee),ie=ae.length,le=0,ue=[],ge;ie>le;)ge=ae[le++],(!fe||Me(ee,ge))&&ve(ue,de?[ge,ee[ge]]:ee[ge]);return ue}};Ge.exports={entries:we(!0),values:we(!1)}},{"../internals/descriptors":134,"../internals/function-uncurry-this":157,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247}],210:[function(oe,Ge,De){"use strict";var fe=oe("../internals/to-string-tag-support"),me=oe("../internals/classof");Ge.exports=fe?{}.toString:function(){return"[object "+me(this)+"]"}},{"../internals/classof":124,"../internals/to-string-tag-support":255}],211:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/function-call"),ke=oe("../internals/is-callable"),Ce=oe("../internals/is-object"),Se=fe.TypeError;Ge.exports=function(Me,ve){var we,de;if(ve==="string"&&ke(we=Me.toString)&&!Ce(de=me(we,Me))||ke(we=Me.valueOf)&&!Ce(de=me(we,Me))||ve!=="string"&&ke(we=Me.toString)&&!Ce(de=me(we,Me)))return de;throw Se("Can't convert object to primitive value")}},{"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/is-object":180}],212:[function(oe,Ge,De){var fe=oe("../internals/get-built-in"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/object-get-own-property-names"),Ce=oe("../internals/object-get-own-property-symbols"),Se=oe("../internals/an-object"),Me=me([].concat);Ge.exports=fe("Reflect","ownKeys")||function(we){var de=ke.f(Se(we)),z=Ce.f;return z?Me(de,z(we)):de}},{"../internals/an-object":101,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/object-get-own-property-names":201,"../internals/object-get-own-property-symbols":202}],213:[function(oe,Ge,De){var fe=oe("../internals/global");Ge.exports=fe},{"../internals/global":163}],214:[function(oe,Ge,De){Ge.exports=function(fe){try{return{error:!1,value:fe()}}catch(me){return{error:!0,value:me}}}},{}],215:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/promise-native-constructor"),ke=oe("../internals/is-callable"),Ce=oe("../internals/is-forced"),Se=oe("../internals/inspect-source"),Me=oe("../internals/well-known-symbol"),ve=oe("../internals/engine-is-browser"),we=oe("../internals/is-pure"),de=oe("../internals/engine-v8-version"),z=me&&me.prototype,ee=Me("species"),ae=!1,ie=ke(fe.PromiseRejectionEvent),le=Ce("Promise",function(){var ue=Se(me),ge=ue!==String(me);if(!ge&&de===66||we&&!(z.catch&&z.finally))return!0;if(de>=51&&/native code/.test(ue))return!1;var Pe=new me(function(Fe){Fe(1)}),je=function(Fe){Fe(function(){},function(){})},Be=Pe.constructor={};return Be[ee]=je,ae=Pe.then(function(){})instanceof je,ae?!ge&&ve&&!ie:!0});Ge.exports={CONSTRUCTOR:le,REJECTION_EVENT:ie,SUBCLASSING:ae}},{"../internals/engine-is-browser":139,"../internals/engine-v8-version":146,"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176,"../internals/is-forced":178,"../internals/is-pure":181,"../internals/promise-native-constructor":216,"../internals/well-known-symbol":268}],216:[function(oe,Ge,De){var fe=oe("../internals/global");Ge.exports=fe.Promise},{"../internals/global":163}],217:[function(oe,Ge,De){var fe=oe("../internals/an-object"),me=oe("../internals/is-object"),ke=oe("../internals/new-promise-capability");Ge.exports=function(Ce,Se){if(fe(Ce),me(Se)&&Se.constructor===Ce)return Se;var Me=ke.f(Ce),ve=Me.resolve;return ve(Se),Me.promise}},{"../internals/an-object":101,"../internals/is-object":180,"../internals/new-promise-capability":193}],218:[function(oe,Ge,De){var fe=oe("../internals/promise-native-constructor"),me=oe("../internals/check-correctness-of-iteration"),ke=oe("../internals/promise-constructor-detection").CONSTRUCTOR;Ge.exports=ke||!me(function(Ce){fe.all(Ce).then(void 0,function(){})})},{"../internals/check-correctness-of-iteration":122,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216}],219:[function(oe,Ge,De){var fe=oe("../internals/object-define-property").f;Ge.exports=function(me,ke,Ce){Ce in me||fe(me,Ce,{configurable:!0,get:function(){return ke[Ce]},set:function(Se){ke[Ce]=Se}})}},{"../internals/object-define-property":198}],220:[function(oe,Ge,De){var fe=function(){this.head=null,this.tail=null};fe.prototype={add:function(me){var ke={item:me,next:null};this.head?this.tail.next=ke:this.head=ke,this.tail=ke},get:function(){var me=this.head;if(me)return this.head=me.next,this.tail===me&&(this.tail=null),me.item}},Ge.exports=fe},{}],221:[function(oe,Ge,De){var fe=oe("../internals/redefine");Ge.exports=function(me,ke,Ce){for(var Se in ke)fe(me,Se,ke[Se],Ce);return me}},{"../internals/redefine":222}],222:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/is-callable"),ke=oe("../internals/has-own-property"),Ce=oe("../internals/create-non-enumerable-property"),Se=oe("../internals/set-global"),Me=oe("../internals/inspect-source"),ve=oe("../internals/internal-state"),we=oe("../internals/function-name").CONFIGURABLE,de=ve.get,z=ve.enforce,ee=String(String).split("String");(Ge.exports=function(ae,ie,le,ue){var ge=ue?!!ue.unsafe:!1,Pe=ue?!!ue.enumerable:!1,je=ue?!!ue.noTargetGet:!1,Be=ue&&ue.name!==void 0?ue.name:ie,Fe;if(me(le)&&(String(Be).slice(0,7)==="Symbol("&&(Be="["+String(Be).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!ke(le,"name")||we&&le.name!==Be)&&Ce(le,"name",Be),Fe=z(le),Fe.source||(Fe.source=ee.join(typeof Be=="string"?Be:""))),ae===fe){Pe?ae[ie]=le:Se(ie,le);return}else ge?!je&&ae[ie]&&(Pe=!0):delete ae[ie];Pe?ae[ie]=le:Ce(ae,ie,le)})(Function.prototype,"toString",function(){return me(this)&&de(this).source||Me(this)})},{"../internals/create-non-enumerable-property":129,"../internals/function-name":156,"../internals/global":163,"../internals/has-own-property":164,"../internals/inspect-source":172,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/set-global":232}],223:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/function-call"),ke=oe("../internals/an-object"),Ce=oe("../internals/is-callable"),Se=oe("../internals/classof-raw"),Me=oe("../internals/regexp-exec"),ve=fe.TypeError;Ge.exports=function(we,de){var z=we.exec;if(Ce(z)){var ee=me(z,we,de);return ee!==null&&ke(ee),ee}if(Se(we)==="RegExp")return me(Me,we,de);throw ve("RegExp#exec called on incompatible receiver")}},{"../internals/an-object":101,"../internals/classof-raw":123,"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/regexp-exec":224}],224:[function(oe,Ge,De){"use strict";var fe=oe("../internals/function-call"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/to-string"),Ce=oe("../internals/regexp-flags"),Se=oe("../internals/regexp-sticky-helpers"),Me=oe("../internals/shared"),ve=oe("../internals/object-create"),we=oe("../internals/internal-state").get,de=oe("../internals/regexp-unsupported-dot-all"),z=oe("../internals/regexp-unsupported-ncg"),ee=Me("native-string-replace",String.prototype.replace),ae=RegExp.prototype.exec,ie=ae,le=me("".charAt),ue=me("".indexOf),ge=me("".replace),Pe=me("".slice),je=function(){var Ae=/a/,Re=/b*/g;return fe(ae,Ae,"a"),fe(ae,Re,"a"),Ae.lastIndex!==0||Re.lastIndex!==0}(),Be=Se.BROKEN_CARET,Fe=/()??/.exec("")[1]!==void 0,Ne=je||Fe||Be||de||z;Ne&&(ie=function(Re){var We=this,Ye=we(We),Ue=ke(Re),Ke=Ye.raw,ot,ut,ft,wt,Je,nt,xt;if(Ke)return Ke.lastIndex=We.lastIndex,ot=fe(ie,Ke,Ue),We.lastIndex=Ke.lastIndex,ot;var Pt=Ye.groups,Ct=Be&&We.sticky,gt=fe(Ce,We),dt=We.source,ht=0,Et=Ue;if(Ct&&(gt=ge(gt,"y",""),ue(gt,"g")===-1&&(gt+="g"),Et=Pe(Ue,We.lastIndex),We.lastIndex>0&&(!We.multiline||We.multiline&&le(Ue,We.lastIndex-1)!==`
`)&&(dt="(?: "+dt+")",Et=" "+Et,ht++),ut=new RegExp("^(?:"+dt+")",gt)),Fe&&(ut=new RegExp("^"+dt+"$(?!\\s)",gt)),je&&(ft=We.lastIndex),wt=fe(ae,Ct?ut:We,Et),Ct?wt?(wt.input=Pe(wt.input,ht),wt[0]=Pe(wt[0],ht),wt.index=We.lastIndex,We.lastIndex+=wt[0].length):We.lastIndex=0:je&&wt&&(We.lastIndex=We.global?wt.index+wt[0].length:ft),Fe&&wt&&wt.length>1&&fe(ee,wt[0],ut,function(){for(Je=1;Je<arguments.length-2;Je++)arguments[Je]===void 0&&(wt[Je]=void 0)}),wt&&Pt)for(wt.groups=nt=ve(null),Je=0;Je<Pt.length;Je++)xt=Pt[Je],nt[xt[0]]=wt[xt[1]];return wt}),Ge.exports=ie},{"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/internal-state":173,"../internals/object-create":196,"../internals/regexp-flags":225,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/shared":237,"../internals/to-string":256}],225:[function(oe,Ge,De){"use strict";var fe=oe("../internals/an-object");Ge.exports=function(){var me=fe(this),ke="";return me.hasIndices&&(ke+="d"),me.global&&(ke+="g"),me.ignoreCase&&(ke+="i"),me.multiline&&(ke+="m"),me.dotAll&&(ke+="s"),me.unicode&&(ke+="u"),me.sticky&&(ke+="y"),ke}},{"../internals/an-object":101}],226:[function(oe,Ge,De){var fe=oe("../internals/function-call"),me=oe("../internals/has-own-property"),ke=oe("../internals/object-is-prototype-of"),Ce=oe("../internals/regexp-flags"),Se=RegExp.prototype;Ge.exports=function(Me){var ve=Me.flags;return ve===void 0&&!("flags"in Se)&&!me(Me,"flags")&&ke(Se,Me)?fe(Ce,Me):ve}},{"../internals/function-call":155,"../internals/has-own-property":164,"../internals/object-is-prototype-of":204,"../internals/regexp-flags":225}],227:[function(oe,Ge,De){var fe=oe("../internals/fails"),me=oe("../internals/global"),ke=me.RegExp,Ce=fe(function(){var ve=ke("a","y");return ve.lastIndex=2,ve.exec("abcd")!=null}),Se=Ce||fe(function(){return!ke("a","y").sticky}),Me=Ce||fe(function(){var ve=ke("^r","gy");return ve.lastIndex=2,ve.exec("str")!=null});Ge.exports={BROKEN_CARET:Me,MISSED_STICKY:Se,UNSUPPORTED_Y:Ce}},{"../internals/fails":150,"../internals/global":163}],228:[function(oe,Ge,De){var fe=oe("../internals/fails"),me=oe("../internals/global"),ke=me.RegExp;Ge.exports=fe(function(){var Ce=ke(".","s");return!(Ce.dotAll&&Ce.exec(`
`)&&Ce.flags==="s")})},{"../internals/fails":150,"../internals/global":163}],229:[function(oe,Ge,De){var fe=oe("../internals/fails"),me=oe("../internals/global"),ke=me.RegExp;Ge.exports=fe(function(){var Ce=ke("(?<a>b)","g");return Ce.exec("b").groups.a!=="b"||"b".replace(Ce,"$<a>c")!=="bc"})},{"../internals/fails":150,"../internals/global":163}],230:[function(oe,Ge,De){var fe=oe("../internals/global"),me=fe.TypeError;Ge.exports=function(ke){if(ke==null)throw me("Can't call method on "+ke);return ke}},{"../internals/global":163}],231:[function(oe,Ge,De){Ge.exports=Object.is||function(me,ke){return me===ke?me!==0||1/me===1/ke:me!=me&&ke!=ke}},{}],232:[function(oe,Ge,De){var fe=oe("../internals/global"),me=Object.defineProperty;Ge.exports=function(ke,Ce){try{me(fe,ke,{value:Ce,configurable:!0,writable:!0})}catch(Se){fe[ke]=Ce}return Ce}},{"../internals/global":163}],233:[function(oe,Ge,De){"use strict";var fe=oe("../internals/get-built-in"),me=oe("../internals/object-define-property"),ke=oe("../internals/well-known-symbol"),Ce=oe("../internals/descriptors"),Se=ke("species");Ge.exports=function(Me){var ve=fe(Me),we=me.f;Ce&&ve&&!ve[Se]&&we(ve,Se,{configurable:!0,get:function(){return this}})}},{"../internals/descriptors":134,"../internals/get-built-in":158,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],234:[function(oe,Ge,De){var fe=oe("../internals/object-define-property").f,me=oe("../internals/has-own-property"),ke=oe("../internals/well-known-symbol"),Ce=ke("toStringTag");Ge.exports=function(Se,Me,ve){Se&&!ve&&(Se=Se.prototype),Se&&!me(Se,Ce)&&fe(Se,Ce,{configurable:!0,value:Me})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],235:[function(oe,Ge,De){var fe=oe("../internals/shared"),me=oe("../internals/uid"),ke=fe("keys");Ge.exports=function(Ce){return ke[Ce]||(ke[Ce]=me(Ce))}},{"../internals/shared":237,"../internals/uid":263}],236:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/set-global"),ke="__core-js_shared__",Ce=fe[ke]||me(ke,{});Ge.exports=Ce},{"../internals/global":163,"../internals/set-global":232}],237:[function(oe,Ge,De){var fe=oe("../internals/is-pure"),me=oe("../internals/shared-store");(Ge.exports=function(ke,Ce){return me[ke]||(me[ke]=Ce!==void 0?Ce:{})})("versions",[]).push({version:"3.22.1",mode:fe?"pure":"global",copyright:"\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.1/LICENSE",source:"https://github.com/zloirock/core-js"})},{"../internals/is-pure":181,"../internals/shared-store":236}],238:[function(oe,Ge,De){var fe=oe("../internals/an-object"),me=oe("../internals/a-constructor"),ke=oe("../internals/well-known-symbol"),Ce=ke("species");Ge.exports=function(Se,Me){var ve=fe(Se).constructor,we;return ve===void 0||(we=fe(ve)[Ce])==null?Me:me(we)}},{"../internals/a-constructor":96,"../internals/an-object":101,"../internals/well-known-symbol":268}],239:[function(oe,Ge,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/to-integer-or-infinity"),ke=oe("../internals/to-string"),Ce=oe("../internals/require-object-coercible"),Se=fe("".charAt),Me=fe("".charCodeAt),ve=fe("".slice),we=function(de){return function(z,ee){var ae=ke(Ce(z)),ie=me(ee),le=ae.length,ue,ge;return ie<0||ie>=le?de?"":void 0:(ue=Me(ae,ie),ue<55296||ue>56319||ie+1===le||(ge=Me(ae,ie+1))<56320||ge>57343?de?Se(ae,ie):ue:de?ve(ae,ie,ie+2):(ue-55296<<10)+(ge-56320)+65536)}};Ge.exports={codeAt:we(!1),charAt:we(!0)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-string":256}],240:[function(oe,Ge,De){var fe=oe("../internals/function-name").PROPER,me=oe("../internals/fails"),ke=oe("../internals/whitespaces"),Ce="\u200B\x85\u180E";Ge.exports=function(Se){return me(function(){return!!ke[Se]()||Ce[Se]()!==Ce||fe&&ke[Se].name!==Se})}},{"../internals/fails":150,"../internals/function-name":156,"../internals/whitespaces":269}],241:[function(oe,Ge,De){var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/require-object-coercible"),ke=oe("../internals/to-string"),Ce=oe("../internals/whitespaces"),Se=fe("".replace),Me="["+Ce+"]",ve=RegExp("^"+Me+Me+"*"),we=RegExp(Me+Me+"*$"),de=function(z){return function(ee){var ae=ke(me(ee));return z&1&&(ae=Se(ae,ve,"")),z&2&&(ae=Se(ae,we,"")),ae}};Ge.exports={start:de(1),end:de(2),trim:de(3)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-string":256,"../internals/whitespaces":269}],242:[function(oe,Ge,De){var fe=oe("../internals/function-call"),me=oe("../internals/get-built-in"),ke=oe("../internals/well-known-symbol"),Ce=oe("../internals/redefine");Ge.exports=function(){var Se=me("Symbol"),Me=Se&&Se.prototype,ve=Me&&Me.valueOf,we=ke("toPrimitive");Me&&!Me[we]&&Ce(Me,we,function(de){return fe(ve,this)})}},{"../internals/function-call":155,"../internals/get-built-in":158,"../internals/redefine":222,"../internals/well-known-symbol":268}],243:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/function-apply"),ke=oe("../internals/function-bind-context"),Ce=oe("../internals/is-callable"),Se=oe("../internals/has-own-property"),Me=oe("../internals/fails"),ve=oe("../internals/html"),we=oe("../internals/array-slice"),de=oe("../internals/document-create-element"),z=oe("../internals/validate-arguments-length"),ee=oe("../internals/engine-is-ios"),ae=oe("../internals/engine-is-node"),ie=fe.setImmediate,le=fe.clearImmediate,ue=fe.process,ge=fe.Dispatch,Pe=fe.Function,je=fe.MessageChannel,Be=fe.String,Fe=0,Ne={},Ae="onreadystatechange",Re,We,Ye,Ue;try{Re=fe.location}catch(wt){}var Ke=function(wt){if(Se(Ne,wt)){var Je=Ne[wt];delete Ne[wt],Je()}},ot=function(wt){return function(){Ke(wt)}},ut=function(wt){Ke(wt.data)},ft=function(wt){fe.postMessage(Be(wt),Re.protocol+"//"+Re.host)};(!ie||!le)&&(ie=function(Je){z(arguments.length,1);var nt=Ce(Je)?Je:Pe(Je),xt=we(arguments,1);return Ne[++Fe]=function(){me(nt,void 0,xt)},We(Fe),Fe},le=function(Je){delete Ne[Je]},ae?We=function(wt){ue.nextTick(ot(wt))}:ge&&ge.now?We=function(wt){ge.now(ot(wt))}:je&&!ee?(Ye=new je,Ue=Ye.port2,Ye.port1.onmessage=ut,We=ke(Ue.postMessage,Ue)):fe.addEventListener&&Ce(fe.postMessage)&&!fe.importScripts&&Re&&Re.protocol!=="file:"&&!Me(ft)?(We=ft,fe.addEventListener("message",ut,!1)):Ae in de("script")?We=function(wt){ve.appendChild(de("script"))[Ae]=function(){ve.removeChild(this),Ke(wt)}}:We=function(wt){setTimeout(ot(wt),0)}),Ge.exports={set:ie,clear:le}},{"../internals/array-slice":117,"../internals/document-create-element":135,"../internals/engine-is-ios":142,"../internals/engine-is-node":143,"../internals/fails":150,"../internals/function-apply":152,"../internals/function-bind-context":153,"../internals/global":163,"../internals/has-own-property":164,"../internals/html":167,"../internals/is-callable":176,"../internals/validate-arguments-length":266}],244:[function(oe,Ge,De){var fe=oe("../internals/function-uncurry-this");Ge.exports=fe(1 .valueOf)},{"../internals/function-uncurry-this":157}],245:[function(oe,Ge,De){var fe=oe("../internals/to-integer-or-infinity"),me=Math.max,ke=Math.min;Ge.exports=function(Ce,Se){var Me=fe(Ce);return Me<0?me(Me+Se,0):ke(Me,Se)}},{"../internals/to-integer-or-infinity":248}],246:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/to-integer-or-infinity"),ke=oe("../internals/to-length"),Ce=fe.RangeError;Ge.exports=function(Se){if(Se===void 0)return 0;var Me=me(Se),ve=ke(Me);if(Me!==ve)throw Ce("Wrong length or index");return ve}},{"../internals/global":163,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],247:[function(oe,Ge,De){var fe=oe("../internals/indexed-object"),me=oe("../internals/require-object-coercible");Ge.exports=function(ke){return fe(me(ke))}},{"../internals/indexed-object":170,"../internals/require-object-coercible":230}],248:[function(oe,Ge,De){var fe=Math.ceil,me=Math.floor;Ge.exports=function(ke){var Ce=+ke;return Ce!==Ce||Ce===0?0:(Ce>0?me:fe)(Ce)}},{}],249:[function(oe,Ge,De){var fe=oe("../internals/to-integer-or-infinity"),me=Math.min;Ge.exports=function(ke){return ke>0?me(fe(ke),9007199254740991):0}},{"../internals/to-integer-or-infinity":248}],250:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/require-object-coercible"),ke=fe.Object;Ge.exports=function(Ce){return ke(me(Ce))}},{"../internals/global":163,"../internals/require-object-coercible":230}],251:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/to-positive-integer"),ke=fe.RangeError;Ge.exports=function(Ce,Se){var Me=me(Ce);if(Me%Se)throw ke("Wrong offset");return Me}},{"../internals/global":163,"../internals/to-positive-integer":252}],252:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/to-integer-or-infinity"),ke=fe.RangeError;Ge.exports=function(Ce){var Se=me(Ce);if(Se<0)throw ke("The argument can't be less than 0");return Se}},{"../internals/global":163,"../internals/to-integer-or-infinity":248}],253:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/function-call"),ke=oe("../internals/is-object"),Ce=oe("../internals/is-symbol"),Se=oe("../internals/get-method"),Me=oe("../internals/ordinary-to-primitive"),ve=oe("../internals/well-known-symbol"),we=fe.TypeError,de=ve("toPrimitive");Ge.exports=function(z,ee){if(!ke(z)||Ce(z))return z;var ae=Se(z,de),ie;if(ae){if(ee===void 0&&(ee="default"),ie=me(ae,z,ee),!ke(ie)||Ce(ie))return ie;throw we("Can't convert object to primitive value")}return ee===void 0&&(ee="number"),Me(z,ee)}},{"../internals/function-call":155,"../internals/get-method":161,"../internals/global":163,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/ordinary-to-primitive":211,"../internals/well-known-symbol":268}],254:[function(oe,Ge,De){var fe=oe("../internals/to-primitive"),me=oe("../internals/is-symbol");Ge.exports=function(ke){var Ce=fe(ke,"string");return me(Ce)?Ce:Ce+""}},{"../internals/is-symbol":183,"../internals/to-primitive":253}],255:[function(oe,Ge,De){var fe=oe("../internals/well-known-symbol"),me=fe("toStringTag"),ke={};ke[me]="z",Ge.exports=String(ke)==="[object z]"},{"../internals/well-known-symbol":268}],256:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/classof"),ke=fe.String;Ge.exports=function(Ce){if(me(Ce)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return ke(Ce)}},{"../internals/classof":124,"../internals/global":163}],257:[function(oe,Ge,De){var fe=oe("../internals/global"),me=fe.String;Ge.exports=function(ke){try{return me(ke)}catch(Ce){return"Object"}}},{"../internals/global":163}],258:[function(oe,Ge,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/global"),ke=oe("../internals/function-call"),Ce=oe("../internals/descriptors"),Se=oe("../internals/typed-array-constructors-require-wrappers"),Me=oe("../internals/array-buffer-view-core"),ve=oe("../internals/array-buffer"),we=oe("../internals/an-instance"),de=oe("../internals/create-property-descriptor"),z=oe("../internals/create-non-enumerable-property"),ee=oe("../internals/is-integral-number"),ae=oe("../internals/to-length"),ie=oe("../internals/to-index"),le=oe("../internals/to-offset"),ue=oe("../internals/to-property-key"),ge=oe("../internals/has-own-property"),Pe=oe("../internals/classof"),je=oe("../internals/is-object"),Be=oe("../internals/is-symbol"),Fe=oe("../internals/object-create"),Ne=oe("../internals/object-is-prototype-of"),Ae=oe("../internals/object-set-prototype-of"),Re=oe("../internals/object-get-own-property-names").f,We=oe("../internals/typed-array-from"),Ye=oe("../internals/array-iteration").forEach,Ue=oe("../internals/set-species"),Ke=oe("../internals/object-define-property"),ot=oe("../internals/object-get-own-property-descriptor"),ut=oe("../internals/internal-state"),ft=oe("../internals/inherit-if-required"),wt=ut.get,Je=ut.set,nt=Ke.f,xt=ot.f,Pt=Math.round,Ct=me.RangeError,gt=ve.ArrayBuffer,dt=gt.prototype,ht=ve.DataView,Et=Me.NATIVE_ARRAY_BUFFER_VIEWS,St=Me.TYPED_ARRAY_CONSTRUCTOR,Ft=Me.TYPED_ARRAY_TAG,mt=Me.TypedArray,yt=Me.TypedArrayPrototype,tt=Me.aTypedArrayConstructor,Ve=Me.isTypedArray,xe="BYTES_PER_ELEMENT",Le="Wrong length",Xe=function(ct,at){tt(ct);for(var At=0,Lt=at.length,It=new ct(Lt);Lt>At;)It[At]=at[At++];return It},rt=function(ct,at){nt(ct,at,{get:function(){return wt(this)[at]}})},Ie=function(ct){var at;return Ne(dt,ct)||(at=Pe(ct))=="ArrayBuffer"||at=="SharedArrayBuffer"},_e=function(ct,at){return Ve(ct)&&!Be(at)&&at in ct&&ee(+at)&&at>=0},He=function(at,At){return At=ue(At),_e(at,At)?de(2,at[At]):xt(at,At)},Qe=function(at,At,Lt){return At=ue(At),_e(at,At)&&je(Lt)&&ge(Lt,"value")&&!ge(Lt,"get")&&!ge(Lt,"set")&&!Lt.configurable&&(!ge(Lt,"writable")||Lt.writable)&&(!ge(Lt,"enumerable")||Lt.enumerable)?(at[At]=Lt.value,at):nt(at,At,Lt)};Ce?(Et||(ot.f=He,Ke.f=Qe,rt(yt,"buffer"),rt(yt,"byteOffset"),rt(yt,"byteLength"),rt(yt,"length")),fe({target:"Object",stat:!0,forced:!Et},{getOwnPropertyDescriptor:He,defineProperty:Qe}),Ge.exports=function(ct,at,At){var Lt=ct.match(/\d+$/)[0]/8,It=ct+(At?"Clamped":"")+"Array",Kt="get"+ct,Xt="set"+ct,$t=me[It],Ut=$t,ln=Ut&&Ut.prototype,tn={},Wt=function(Ln,Vn){var Or=wt(Ln);return Or.view[Kt](Vn*Lt+Or.byteOffset,!0)},En=function(Ln,Vn,Or){var dr=wt(Ln);At&&(Or=(Or=Pt(Or))<0?0:Or>255?255:Or&255),dr.view[Xt](Vn*Lt+dr.byteOffset,Or,!0)},Pn=function(Ln,Vn){nt(Ln,Vn,{get:function(){return Wt(this,Vn)},set:function(Or){return En(this,Vn,Or)},enumerable:!0})};Et?Se&&(Ut=at(function(Ln,Vn,Or,dr){return we(Ln,ln),ft(function(){return je(Vn)?Ie(Vn)?dr!==void 0?new $t(Vn,le(Or,Lt),dr):Or!==void 0?new $t(Vn,le(Or,Lt)):new $t(Vn):Ve(Vn)?Xe(Ut,Vn):ke(We,Ut,Vn):new $t(ie(Vn))}(),Ln,Ut)}),Ae&&Ae(Ut,mt),Ye(Re($t),function(Ln){Ln in Ut||z(Ut,Ln,$t[Ln])}),Ut.prototype=ln):(Ut=at(function(Ln,Vn,Or,dr){we(Ln,ln);var Lr=0,Xr=0,Vr,si,yi;if(!je(Vn))yi=ie(Vn),si=yi*Lt,Vr=new gt(si);else if(Ie(Vn)){Vr=Vn,Xr=le(Or,Lt);var Ii=Vn.byteLength;if(dr===void 0){if(Ii%Lt||(si=Ii-Xr,si<0))throw Ct(Le)}else if(si=ae(dr)*Lt,si+Xr>Ii)throw Ct(Le);yi=si/Lt}else return Ve(Vn)?Xe(Ut,Vn):ke(We,Ut,Vn);for(Je(Ln,{buffer:Vr,byteOffset:Xr,byteLength:si,length:yi,view:new ht(Vr)});Lr<yi;)Pn(Ln,Lr++)}),Ae&&Ae(Ut,mt),ln=Ut.prototype=Fe(yt)),ln.constructor!==Ut&&z(ln,"constructor",Ut),z(ln,St,Ut),Ft&&z(ln,Ft,It),tn[It]=Ut,fe({global:!0,forced:Ut!=$t,sham:!Et},tn),xe in Ut||z(Ut,xe,Lt),xe in ln||z(ln,xe,Lt),Ue(It)}):Ge.exports=function(){}},{"../internals/an-instance":100,"../internals/array-buffer":104,"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/classof":124,"../internals/create-non-enumerable-property":129,"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/export":149,"../internals/function-call":155,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-integral-number":179,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/object-create":196,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/object-set-prototype-of":208,"../internals/set-species":233,"../internals/to-index":246,"../internals/to-length":249,"../internals/to-offset":251,"../internals/to-property-key":254,"../internals/typed-array-constructors-require-wrappers":259,"../internals/typed-array-from":261}],259:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/fails"),ke=oe("../internals/check-correctness-of-iteration"),Ce=oe("../internals/array-buffer-view-core").NATIVE_ARRAY_BUFFER_VIEWS,Se=fe.ArrayBuffer,Me=fe.Int8Array;Ge.exports=!Ce||!me(function(){Me(1)})||!me(function(){new Me(-1)})||!ke(function(ve){new Me,new Me(null),new Me(1.5),new Me(ve)},!0)||me(function(){return new Me(new Se(2),1,void 0).length!==1})},{"../internals/array-buffer-view-core":103,"../internals/check-correctness-of-iteration":122,"../internals/fails":150,"../internals/global":163}],260:[function(oe,Ge,De){var fe=oe("../internals/array-from-constructor-and-list"),me=oe("../internals/typed-array-species-constructor");Ge.exports=function(ke,Ce){return fe(me(ke),Ce)}},{"../internals/array-from-constructor-and-list":108,"../internals/typed-array-species-constructor":262}],261:[function(oe,Ge,De){var fe=oe("../internals/function-bind-context"),me=oe("../internals/function-call"),ke=oe("../internals/a-constructor"),Ce=oe("../internals/to-object"),Se=oe("../internals/length-of-array-like"),Me=oe("../internals/get-iterator"),ve=oe("../internals/get-iterator-method"),we=oe("../internals/is-array-iterator-method"),de=oe("../internals/array-buffer-view-core").aTypedArrayConstructor;Ge.exports=function(ee){var ae=ke(this),ie=Ce(ee),le=arguments.length,ue=le>1?arguments[1]:void 0,ge=ue!==void 0,Pe=ve(ie),je,Be,Fe,Ne,Ae,Re;if(Pe&&!we(Pe))for(Ae=Me(ie,Pe),Re=Ae.next,ie=[];!(Ne=me(Re,Ae)).done;)ie.push(Ne.value);for(ge&&le>2&&(ue=fe(ue,arguments[2])),Be=Se(ie),Fe=new(de(ae))(Be),je=0;Be>je;je++)Fe[je]=ge?ue(ie[je],je):ie[je];return Fe}},{"../internals/a-constructor":96,"../internals/array-buffer-view-core":103,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/is-array-iterator-method":174,"../internals/length-of-array-like":188,"../internals/to-object":250}],262:[function(oe,Ge,De){var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/species-constructor"),ke=fe.TYPED_ARRAY_CONSTRUCTOR,Ce=fe.aTypedArrayConstructor;Ge.exports=function(Se){return Ce(me(Se,Se[ke]))}},{"../internals/array-buffer-view-core":103,"../internals/species-constructor":238}],263:[function(oe,Ge,De){var fe=oe("../internals/function-uncurry-this"),me=0,ke=Math.random(),Ce=fe(1 .toString);Ge.exports=function(Se){return"Symbol("+(Se===void 0?"":Se)+")_"+Ce(++me+ke,36)}},{"../internals/function-uncurry-this":157}],264:[function(oe,Ge,De){var fe=oe("../internals/native-symbol");Ge.exports=fe&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/native-symbol":191}],265:[function(oe,Ge,De){var fe=oe("../internals/descriptors"),me=oe("../internals/fails");Ge.exports=fe&&me(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},{"../internals/descriptors":134,"../internals/fails":150}],266:[function(oe,Ge,De){var fe=oe("../internals/global"),me=fe.TypeError;Ge.exports=function(ke,Ce){if(ke<Ce)throw me("Not enough arguments");return ke}},{"../internals/global":163}],267:[function(oe,Ge,De){var fe=oe("../internals/well-known-symbol");De.f=fe},{"../internals/well-known-symbol":268}],268:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/shared"),ke=oe("../internals/has-own-property"),Ce=oe("../internals/uid"),Se=oe("../internals/native-symbol"),Me=oe("../internals/use-symbol-as-uid"),ve=me("wks"),we=fe.Symbol,de=we&&we.for,z=Me?we:we&&we.withoutSetter||Ce;Ge.exports=function(ee){if(!ke(ve,ee)||!(Se||typeof ve[ee]=="string")){var ae="Symbol."+ee;Se&&ke(we,ee)?ve[ee]=we[ee]:Me&&de?ve[ee]=de(ae):ve[ee]=z(ae)}return ve[ee]}},{"../internals/global":163,"../internals/has-own-property":164,"../internals/native-symbol":191,"../internals/shared":237,"../internals/uid":263,"../internals/use-symbol-as-uid":264}],269:[function(oe,Ge,De){Ge.exports=`
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},{}],270:[function(oe,Ge,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/global"),ke=oe("../internals/array-buffer"),Ce=oe("../internals/set-species"),Se="ArrayBuffer",Me=ke[Se],ve=me[Se];fe({global:!0,forced:ve!==Me},{ArrayBuffer:Me}),Ce(Se)},{"../internals/array-buffer":104,"../internals/export":149,"../internals/global":163,"../internals/set-species":233}],271:[function(oe,Ge,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/fails"),Ce=oe("../internals/array-buffer"),Se=oe("../internals/an-object"),Me=oe("../internals/to-absolute-index"),ve=oe("../internals/to-length"),we=oe("../internals/species-constructor"),de=Ce.ArrayBuffer,z=Ce.DataView,ee=z.prototype,ae=me(de.prototype.slice),ie=me(ee.getUint8),le=me(ee.setUint8),ue=ke(function(){return!new de(2).slice(1,void 0).byteLength});fe({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:ue},{slice:function(Pe,je){if(ae&&je===void 0)return ae(Se(this),Pe);for(var Be=Se(this).byteLength,Fe=Me(Pe,Be),Ne=Me(je===void 0?Be:je,Be),Ae=new(we(this,de))(ve(Ne-Fe)),Re=new z(this),We=new z(Ae),Ye=0;Fe<Ne;)le(We,Ye++,ie(Re,Fe++));return Ae}})},{"../internals/an-object":101,"../internals/array-buffer":104,"../internals/export":149,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/species-constructor":238,"../internals/to-absolute-index":245,"../internals/to-length":249}],272:[function(oe,Ge,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/global"),ke=oe("../internals/fails"),Ce=oe("../internals/is-array"),Se=oe("../internals/is-object"),Me=oe("../internals/to-object"),ve=oe("../internals/length-of-array-like"),we=oe("../internals/create-property"),de=oe("../internals/array-species-create"),z=oe("../internals/array-method-has-species-support"),ee=oe("../internals/well-known-symbol"),ae=oe("../internals/engine-v8-version"),ie=ee("isConcatSpreadable"),le=9007199254740991,ue="Maximum allowed index exceeded",ge=me.TypeError,Pe=ae>=51||!ke(function(){var Ne=[];return Ne[ie]=!1,Ne.concat()[0]!==Ne}),je=z("concat"),Be=function(Ne){if(!Se(Ne))return!1;var Ae=Ne[ie];return Ae!==void 0?!!Ae:Ce(Ne)},Fe=!Pe||!je;fe({target:"Array",proto:!0,forced:Fe},{concat:function(Ae){var Re=Me(this),We=de(Re,0),Ye=0,Ue,Ke,ot,ut,ft;for(Ue=-1,ot=arguments.length;Ue<ot;Ue++)if(ft=Ue===-1?Re:arguments[Ue],Be(ft)){if(ut=ve(ft),Ye+ut>le)throw ge(ue);for(Ke=0;Ke<ut;Ke++,Ye++)Ke in ft&&we(We,Ye,ft[Ke])}else{if(Ye>=le)throw ge(ue);we(We,Ye++,ft)}return We.length=Ye,We}})},{"../internals/array-method-has-species-support":113,"../internals/array-species-create":120,"../internals/create-property":131,"../internals/engine-v8-version":146,"../internals/export":149,"../internals/fails":150,"../internals/global":163,"../internals/is-array":175,"../internals/is-object":180,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/well-known-symbol":268}],273:[function(oe,Ge,De){var fe=oe("../internals/export"),me=oe("../internals/array-fill"),ke=oe("../internals/add-to-unscopables");fe({target:"Array",proto:!0},{fill:me}),ke("fill")},{"../internals/add-to-unscopables":98,"../internals/array-fill":106,"../internals/export":149}],274:[function(oe,Ge,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/array-iteration").filter,ke=oe("../internals/array-method-has-species-support"),Ce=ke("filter");fe({target:"Array",proto:!0,forced:!Ce},{filter:function(Me){return me(this,Me,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],275:[function(oe,Ge,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/array-iteration").find,ke=oe("../internals/add-to-unscopables"),Ce="find",Se=!0;Ce in[]&&Array(1)[Ce](function(){Se=!1}),fe({target:"Array",proto:!0,forced:Se},{find:function(ve){return me(this,ve,arguments.length>1?arguments[1]:void 0)}}),ke(Ce)},{"../internals/add-to-unscopables":98,"../internals/array-iteration":111,"../internals/export":149}],276:[function(oe,Ge,De){var fe=oe("../internals/export"),me=oe("../internals/array-from"),ke=oe("../internals/check-correctness-of-iteration"),Ce=!ke(function(Se){Array.from(Se)});fe({target:"Array",stat:!0,forced:Ce},{from:me})},{"../internals/array-from":109,"../internals/check-correctness-of-iteration":122,"../internals/export":149}],277:[function(oe,Ge,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/array-includes").includes,ke=oe("../internals/add-to-unscopables");fe({target:"Array",proto:!0},{includes:function(Se){return me(this,Se,arguments.length>1?arguments[1]:void 0)}}),ke("includes")},{"../internals/add-to-unscopables":98,"../internals/array-includes":110,"../internals/export":149}],278:[function(oe,Ge,De){"use strict";var fe=oe("../internals/to-indexed-object"),me=oe("../internals/add-to-unscopables"),ke=oe("../internals/iterators"),Ce=oe("../internals/internal-state"),Se=oe("../internals/object-define-property").f,Me=oe("../internals/define-iterator"),ve=oe("../internals/is-pure"),we=oe("../internals/descriptors"),de="Array Iterator",z=Ce.set,ee=Ce.getterFor(de);Ge.exports=Me(Array,"Array",function(ie,le){z(this,{type:de,target:fe(ie),index:0,kind:le})},function(){var ie=ee(this),le=ie.target,ue=ie.kind,ge=ie.index++;return!le||ge>=le.length?(ie.target=void 0,{value:void 0,done:!0}):ue=="keys"?{value:ge,done:!1}:ue=="values"?{value:le[ge],done:!1}:{value:[ge,le[ge]],done:!1}},"values");var ae=ke.Arguments=ke.Array;if(me("keys"),me("values"),me("entries"),!ve&&we&&ae.name!=="values")try{Se(ae,"name",{value:"values"})}catch(ie){}},{"../internals/add-to-unscopables":98,"../internals/define-iterator":132,"../internals/descriptors":134,"../internals/internal-state":173,"../internals/is-pure":181,"../internals/iterators":187,"../internals/object-define-property":198,"../internals/to-indexed-object":247}],279:[function(oe,Ge,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/indexed-object"),Ce=oe("../internals/to-indexed-object"),Se=oe("../internals/array-method-is-strict"),Me=me([].join),ve=ke!=Object,we=Se("join",",");fe({target:"Array",proto:!0,forced:ve||!we},{join:function(z){return Me(Ce(this),z===void 0?",":z)}})},{"../internals/array-method-is-strict":114,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/to-indexed-object":247}],280:[function(oe,Ge,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/array-iteration").map,ke=oe("../internals/array-method-has-species-support"),Ce=ke("map");fe({target:"Array",proto:!0,forced:!Ce},{map:function(Me){return me(this,Me,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],281:[function(oe,Ge,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/global"),ke=oe("../internals/is-array"),Ce=oe("../internals/is-constructor"),Se=oe("../internals/is-object"),Me=oe("../internals/to-absolute-index"),ve=oe("../internals/length-of-array-like"),we=oe("../internals/to-indexed-object"),de=oe("../internals/create-property"),z=oe("../internals/well-known-symbol"),ee=oe("../internals/array-method-has-species-support"),ae=oe("../internals/array-slice"),ie=ee("slice"),le=z("species"),ue=me.Array,ge=Math.max;fe({target:"Array",proto:!0,forced:!ie},{slice:function(je,Be){var Fe=we(this),Ne=ve(Fe),Ae=Me(je,Ne),Re=Me(Be===void 0?Ne:Be,Ne),We,Ye,Ue;if(ke(Fe)&&(We=Fe.constructor,Ce(We)&&(We===ue||ke(We.prototype))?We=void 0:Se(We)&&(We=We[le],We===null&&(We=void 0)),We===ue||We===void 0))return ae(Fe,Ae,Re);for(Ye=new(We===void 0?ue:We)(ge(Re-Ae,0)),Ue=0;Ae<Re;Ae++,Ue++)Ae in Fe&&de(Ye,Ue,Fe[Ae]);return Ye.length=Ue,Ye}})},{"../internals/array-method-has-species-support":113,"../internals/array-slice":117,"../internals/create-property":131,"../internals/export":149,"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247,"../internals/well-known-symbol":268}],282:[function(oe,Ge,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/a-callable"),Ce=oe("../internals/to-object"),Se=oe("../internals/length-of-array-like"),Me=oe("../internals/to-string"),ve=oe("../internals/fails"),we=oe("../internals/array-sort"),de=oe("../internals/array-method-is-strict"),z=oe("../internals/engine-ff-version"),ee=oe("../internals/engine-is-ie-or-edge"),ae=oe("../internals/engine-v8-version"),ie=oe("../internals/engine-webkit-version"),le=[],ue=me(le.sort),ge=me(le.push),Pe=ve(function(){le.sort(void 0)}),je=ve(function(){le.sort(null)}),Be=de("sort"),Fe=!ve(function(){if(ae)return ae<70;if(!(z&&z>3)){if(ee)return!0;if(ie)return ie<603;var Re="",We,Ye,Ue,Ke;for(We=65;We<76;We++){switch(Ye=String.fromCharCode(We),We){case 66:case 69:case 70:case 72:Ue=3;break;case 68:case 71:Ue=4;break;default:Ue=2}for(Ke=0;Ke<47;Ke++)le.push({k:Ye+Ke,v:Ue})}for(le.sort(function(ot,ut){return ut.v-ot.v}),Ke=0;Ke<le.length;Ke++)Ye=le[Ke].k.charAt(0),Re.charAt(Re.length-1)!==Ye&&(Re+=Ye);return Re!=="DGBEFHACIJK"}}),Ne=Pe||!je||!Be||!Fe,Ae=function(Re){return function(We,Ye){return Ye===void 0?-1:We===void 0?1:Re!==void 0?+Re(We,Ye)||0:Me(We)>Me(Ye)?1:-1}};fe({target:"Array",proto:!0,forced:Ne},{sort:function(We){We!==void 0&&ke(We);var Ye=Ce(this);if(Fe)return We===void 0?ue(Ye):ue(Ye,We);var Ue=[],Ke=Se(Ye),ot,ut;for(ut=0;ut<Ke;ut++)ut in Ye&&ge(Ue,Ye[ut]);for(we(Ue,Ae(We)),ot=Ue.length,ut=0;ut<ot;)Ye[ut]=Ue[ut++];for(;ut<Ke;)delete Ye[ut++];return Ye}})},{"../internals/a-callable":95,"../internals/array-method-is-strict":114,"../internals/array-sort":118,"../internals/engine-ff-version":138,"../internals/engine-is-ie-or-edge":140,"../internals/engine-v8-version":146,"../internals/engine-webkit-version":147,"../internals/export":149,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/to-string":256}],283:[function(oe,Ge,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/global"),ke=oe("../internals/to-absolute-index"),Ce=oe("../internals/to-integer-or-infinity"),Se=oe("../internals/length-of-array-like"),Me=oe("../internals/to-object"),ve=oe("../internals/array-species-create"),we=oe("../internals/create-property"),de=oe("../internals/array-method-has-species-support"),z=de("splice"),ee=me.TypeError,ae=Math.max,ie=Math.min,le=9007199254740991,ue="Maximum allowed length exceeded";fe({target:"Array",proto:!0,forced:!z},{splice:function(Pe,je){var Be=Me(this),Fe=Se(Be),Ne=ke(Pe,Fe),Ae=arguments.length,Re,We,Ye,Ue,Ke,ot;if(Ae===0?Re=We=0:Ae===1?(Re=0,We=Fe-Ne):(Re=Ae-2,We=ie(ae(Ce(je),0),Fe-Ne)),Fe+Re-We>le)throw ee(ue);for(Ye=ve(Be,We),Ue=0;Ue<We;Ue++)Ke=Ne+Ue,Ke in Be&&we(Ye,Ue,Be[Ke]);if(Ye.length=We,Re<We){for(Ue=Ne;Ue<Fe-We;Ue++)Ke=Ue+We,ot=Ue+Re,Ke in Be?Be[ot]=Be[Ke]:delete Be[ot];for(Ue=Fe;Ue>Fe-We+Re;Ue--)delete Be[Ue-1]}else if(Re>We)for(Ue=Fe-We;Ue>Ne;Ue--)Ke=Ue+We-1,ot=Ue+Re-1,Ke in Be?Be[ot]=Be[Ke]:delete Be[ot];for(Ue=0;Ue<Re;Ue++)Be[Ue+Ne]=arguments[Ue+2];return Be.length=Fe-We+Re,Ye}})},{"../internals/array-method-has-species-support":113,"../internals/array-species-create":120,"../internals/create-property":131,"../internals/export":149,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-integer-or-infinity":248,"../internals/to-object":250}],284:[function(oe,Ge,De){var fe=oe("../internals/descriptors"),me=oe("../internals/function-name").EXISTS,ke=oe("../internals/function-uncurry-this"),Ce=oe("../internals/object-define-property").f,Se=Function.prototype,Me=ke(Se.toString),ve=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,we=ke(ve.exec),de="name";fe&&!me&&Ce(Se,de,{configurable:!0,get:function(){try{return we(ve,Me(this))[1]}catch(z){return""}}})},{"../internals/descriptors":134,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/object-define-property":198}],285:[function(oe,Ge,De){var fe=oe("../internals/export"),me=oe("../internals/get-built-in"),ke=oe("../internals/function-apply"),Ce=oe("../internals/function-call"),Se=oe("../internals/function-uncurry-this"),Me=oe("../internals/fails"),ve=oe("../internals/is-array"),we=oe("../internals/is-callable"),de=oe("../internals/is-object"),z=oe("../internals/is-symbol"),ee=oe("../internals/array-slice"),ae=oe("../internals/native-symbol"),ie=me("JSON","stringify"),le=Se(/./.exec),ue=Se("".charAt),ge=Se("".charCodeAt),Pe=Se("".replace),je=Se(1 .toString),Be=/[\uD800-\uDFFF]/g,Fe=/^[\uD800-\uDBFF]$/,Ne=/^[\uDC00-\uDFFF]$/,Ae=!ae||Me(function(){var Ue=me("Symbol")();return ie([Ue])!="[null]"||ie({a:Ue})!="{}"||ie(Object(Ue))!="{}"}),Re=Me(function(){return ie("\uDF06\uD834")!=='"\\udf06\\ud834"'||ie("\uDEAD")!=='"\\udead"'}),We=function(Ue,Ke){var ot=ee(arguments),ut=Ke;if(!(!de(Ke)&&Ue===void 0||z(Ue)))return ve(Ke)||(Ke=function(ft,wt){if(we(ut)&&(wt=Ce(ut,this,ft,wt)),!z(wt))return wt}),ot[1]=Ke,ke(ie,null,ot)},Ye=function(Ue,Ke,ot){var ut=ue(ot,Ke-1),ft=ue(ot,Ke+1);return le(Fe,Ue)&&!le(Ne,ft)||le(Ne,Ue)&&!le(Fe,ut)?"\\u"+je(ge(Ue,0),16):Ue};ie&&fe({target:"JSON",stat:!0,forced:Ae||Re},{stringify:function(Ke,ot,ut){var ft=ee(arguments),wt=ke(Ae?We:ie,null,ft);return Re&&typeof wt=="string"?Pe(wt,Be,Ye):wt}})},{"../internals/array-slice":117,"../internals/export":149,"../internals/fails":150,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/is-array":175,"../internals/is-callable":176,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/native-symbol":191}],286:[function(oe,Ge,De){"use strict";var fe=oe("../internals/descriptors"),me=oe("../internals/global"),ke=oe("../internals/function-uncurry-this"),Ce=oe("../internals/is-forced"),Se=oe("../internals/redefine"),Me=oe("../internals/has-own-property"),ve=oe("../internals/inherit-if-required"),we=oe("../internals/object-is-prototype-of"),de=oe("../internals/is-symbol"),z=oe("../internals/to-primitive"),ee=oe("../internals/fails"),ae=oe("../internals/object-get-own-property-names").f,ie=oe("../internals/object-get-own-property-descriptor").f,le=oe("../internals/object-define-property").f,ue=oe("../internals/this-number-value"),ge=oe("../internals/string-trim").trim,Pe="Number",je=me[Pe],Be=je.prototype,Fe=me.TypeError,Ne=ke("".slice),Ae=ke("".charCodeAt),Re=function(ut){var ft=z(ut,"number");return typeof ft=="bigint"?ft:We(ft)},We=function(ut){var ft=z(ut,"number"),wt,Je,nt,xt,Pt,Ct,gt,dt;if(de(ft))throw Fe("Cannot convert a Symbol value to a number");if(typeof ft=="string"&&ft.length>2){if(ft=ge(ft),wt=Ae(ft,0),wt===43||wt===45){if(Je=Ae(ft,2),Je===88||Je===120)return NaN}else if(wt===48){switch(Ae(ft,1)){case 66:case 98:nt=2,xt=49;break;case 79:case 111:nt=8,xt=55;break;default:return+ft}for(Pt=Ne(ft,2),Ct=Pt.length,gt=0;gt<Ct;gt++)if(dt=Ae(Pt,gt),dt<48||dt>xt)return NaN;return parseInt(Pt,nt)}}return+ft};if(Ce(Pe,!je(" 0o1")||!je("0b1")||je("+0x1"))){for(var Ye=function(ft){var wt=arguments.length<1?0:je(Re(ft)),Je=this;return we(Be,Je)&&ee(function(){ue(Je)})?ve(Object(wt),Je,Ye):wt},Ue=fe?ae(je):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),Ke=0,ot;Ue.length>Ke;Ke++)Me(je,ot=Ue[Ke])&&!Me(Ye,ot)&&le(Ye,ot,ie(je,ot));Ye.prototype=Be,Be.constructor=Ye,Se(me,Pe,Ye)}},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/is-forced":178,"../internals/is-symbol":183,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/redefine":222,"../internals/string-trim":241,"../internals/this-number-value":244,"../internals/to-primitive":253}],287:[function(oe,Ge,De){var fe=oe("../internals/export"),me=oe("../internals/object-assign");fe({target:"Object",stat:!0,forced:Object.assign!==me},{assign:me})},{"../internals/export":149,"../internals/object-assign":195}],288:[function(oe,Ge,De){var fe=oe("../internals/export"),me=oe("../internals/object-to-array").entries;fe({target:"Object",stat:!0},{entries:function(Ce){return me(Ce)}})},{"../internals/export":149,"../internals/object-to-array":209}],289:[function(oe,Ge,De){var fe=oe("../internals/export"),me=oe("../internals/native-symbol"),ke=oe("../internals/fails"),Ce=oe("../internals/object-get-own-property-symbols"),Se=oe("../internals/to-object"),Me=!me||ke(function(){Ce.f(1)});fe({target:"Object",stat:!0,forced:Me},{getOwnPropertySymbols:function(we){var de=Ce.f;return de?de(Se(we)):[]}})},{"../internals/export":149,"../internals/fails":150,"../internals/native-symbol":191,"../internals/object-get-own-property-symbols":202,"../internals/to-object":250}],290:[function(oe,Ge,De){var fe=oe("../internals/export"),me=oe("../internals/to-object"),ke=oe("../internals/object-keys"),Ce=oe("../internals/fails"),Se=Ce(function(){ke(1)});fe({target:"Object",stat:!0,forced:Se},{keys:function(ve){return ke(me(ve))}})},{"../internals/export":149,"../internals/fails":150,"../internals/object-keys":206,"../internals/to-object":250}],291:[function(oe,Ge,De){var fe=oe("../internals/to-string-tag-support"),me=oe("../internals/redefine"),ke=oe("../internals/object-to-string");fe||me(Object.prototype,"toString",ke,{unsafe:!0})},{"../internals/object-to-string":210,"../internals/redefine":222,"../internals/to-string-tag-support":255}],292:[function(oe,Ge,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/function-call"),ke=oe("../internals/a-callable"),Ce=oe("../internals/new-promise-capability"),Se=oe("../internals/perform"),Me=oe("../internals/iterate"),ve=oe("../internals/promise-statics-incorrect-iteration");fe({target:"Promise",stat:!0,forced:ve},{all:function(de){var z=this,ee=Ce.f(z),ae=ee.resolve,ie=ee.reject,le=Se(function(){var ue=ke(z.resolve),ge=[],Pe=0,je=1;Me(de,function(Be){var Fe=Pe++,Ne=!1;je++,me(ue,z,Be).then(function(Ae){Ne||(Ne=!0,ge[Fe]=Ae,--je||ae(ge))},ie)}),--je||ae(ge)});return le.error&&ie(le.value),ee.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],293:[function(oe,Ge,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/is-pure"),ke=oe("../internals/promise-constructor-detection").CONSTRUCTOR,Ce=oe("../internals/promise-native-constructor"),Se=oe("../internals/get-built-in"),Me=oe("../internals/is-callable"),ve=oe("../internals/redefine"),we=Ce&&Ce.prototype;if(fe({target:"Promise",proto:!0,forced:ke,real:!0},{catch:function(z){return this.then(void 0,z)}}),!me&&Me(Ce)){var de=Se("Promise").prototype.catch;we.catch!==de&&ve(we,"catch",de,{unsafe:!0})}},{"../internals/export":149,"../internals/get-built-in":158,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/redefine":222}],294:[function(oe,Ge,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/is-pure"),ke=oe("../internals/engine-is-node"),Ce=oe("../internals/global"),Se=oe("../internals/function-call"),Me=oe("../internals/redefine"),ve=oe("../internals/redefine-all"),we=oe("../internals/object-set-prototype-of"),de=oe("../internals/set-to-string-tag"),z=oe("../internals/set-species"),ee=oe("../internals/a-callable"),ae=oe("../internals/is-callable"),ie=oe("../internals/is-object"),le=oe("../internals/an-instance"),ue=oe("../internals/species-constructor"),ge=oe("../internals/task").set,Pe=oe("../internals/microtask"),je=oe("../internals/host-report-errors"),Be=oe("../internals/perform"),Fe=oe("../internals/queue"),Ne=oe("../internals/internal-state"),Ae=oe("../internals/promise-native-constructor"),Re=oe("../internals/promise-constructor-detection"),We=oe("../internals/new-promise-capability"),Ye="Promise",Ue=Re.CONSTRUCTOR,Ke=Re.REJECTION_EVENT,ot=Re.SUBCLASSING,ut=Ne.getterFor(Ye),ft=Ne.set,wt=Ae&&Ae.prototype,Je=Ae,nt=wt,xt=Ce.TypeError,Pt=Ce.document,Ct=Ce.process,gt=We.f,dt=gt,ht=!!(Pt&&Pt.createEvent&&Ce.dispatchEvent),Et="unhandledrejection",St="rejectionhandled",Ft=0,mt=1,yt=2,tt=1,Ve=2,xe,Le,Xe,rt,Ie=function(Xt){var $t;return ie(Xt)&&ae($t=Xt.then)?$t:!1},_e=function(Xt,$t){var Ut=$t.value,ln=$t.state==mt,tn=ln?Xt.ok:Xt.fail,Wt=Xt.resolve,En=Xt.reject,Pn=Xt.domain,Ln,Vn,Or;try{tn?(ln||($t.rejection===Ve&&At($t),$t.rejection=tt),tn===!0?Ln=Ut:(Pn&&Pn.enter(),Ln=tn(Ut),Pn&&(Pn.exit(),Or=!0)),Ln===Xt.promise?En(xt("Promise-chain cycle")):(Vn=Ie(Ln))?Se(Vn,Ln,Wt,En):Wt(Ln)):En(Ut)}catch(dr){Pn&&!Or&&Pn.exit(),En(dr)}},He=function(Xt,$t){Xt.notified||(Xt.notified=!0,Pe(function(){for(var Ut=Xt.reactions,ln;ln=Ut.get();)_e(ln,Xt);Xt.notified=!1,$t&&!Xt.rejection&&ct(Xt)}))},Qe=function(Xt,$t,Ut){var ln,tn;ht?(ln=Pt.createEvent("Event"),ln.promise=$t,ln.reason=Ut,ln.initEvent(Xt,!1,!0),Ce.dispatchEvent(ln)):ln={promise:$t,reason:Ut},!Ke&&(tn=Ce["on"+Xt])?tn(ln):Xt===Et&&je("Unhandled promise rejection",Ut)},ct=function(Xt){Se(ge,Ce,function(){var $t=Xt.facade,Ut=Xt.value,ln=at(Xt),tn;if(ln&&(tn=Be(function(){ke?Ct.emit("unhandledRejection",Ut,$t):Qe(Et,$t,Ut)}),Xt.rejection=ke||at(Xt)?Ve:tt,tn.error))throw tn.value})},at=function(Xt){return Xt.rejection!==tt&&!Xt.parent},At=function(Xt){Se(ge,Ce,function(){var $t=Xt.facade;ke?Ct.emit("rejectionHandled",$t):Qe(St,$t,Xt.value)})},Lt=function(Xt,$t,Ut){return function(ln){Xt($t,ln,Ut)}},It=function(Xt,$t,Ut){Xt.done||(Xt.done=!0,Ut&&(Xt=Ut),Xt.value=$t,Xt.state=yt,He(Xt,!0))},Kt=function(Xt,$t,Ut){if(!Xt.done){Xt.done=!0,Ut&&(Xt=Ut);try{if(Xt.facade===$t)throw xt("Promise can't be resolved itself");var ln=Ie($t);ln?Pe(function(){var tn={done:!1};try{Se(ln,$t,Lt(Kt,tn,Xt),Lt(It,tn,Xt))}catch(Wt){It(tn,Wt,Xt)}}):(Xt.value=$t,Xt.state=mt,He(Xt,!1))}catch(tn){It({done:!1},tn,Xt)}}};if(Ue&&(Je=function($t){le(this,nt),ee($t),Se(xe,this);var Ut=ut(this);try{$t(Lt(Kt,Ut),Lt(It,Ut))}catch(ln){It(Ut,ln)}},nt=Je.prototype,xe=function($t){ft(this,{type:Ye,done:!1,notified:!1,parent:!1,reactions:new Fe,rejection:!1,state:Ft,value:void 0})},xe.prototype=ve(nt,{then:function($t,Ut){var ln=ut(this),tn=gt(ue(this,Je));return ln.parent=!0,tn.ok=ae($t)?$t:!0,tn.fail=ae(Ut)&&Ut,tn.domain=ke?Ct.domain:void 0,ln.state==Ft?ln.reactions.add(tn):Pe(function(){_e(tn,ln)}),tn.promise}}),Le=function(){var Xt=new xe,$t=ut(Xt);this.promise=Xt,this.resolve=Lt(Kt,$t),this.reject=Lt(It,$t)},We.f=gt=function(Xt){return Xt===Je||Xt===Xe?new Le(Xt):dt(Xt)},!me&&ae(Ae)&&wt!==Object.prototype)){rt=wt.then,ot||Me(wt,"then",function($t,Ut){var ln=this;return new Je(function(tn,Wt){Se(rt,ln,tn,Wt)}).then($t,Ut)},{unsafe:!0});try{delete wt.constructor}catch(Xt){}we&&we(wt,nt)}fe({global:!0,wrap:!0,forced:Ue},{Promise:Je}),de(Je,Ye,!1,!0),z(Ye)},{"../internals/a-callable":95,"../internals/an-instance":100,"../internals/engine-is-node":143,"../internals/export":149,"../internals/function-call":155,"../internals/global":163,"../internals/host-report-errors":166,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/is-object":180,"../internals/is-pure":181,"../internals/microtask":189,"../internals/new-promise-capability":193,"../internals/object-set-prototype-of":208,"../internals/perform":214,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/queue":220,"../internals/redefine":222,"../internals/redefine-all":221,"../internals/set-species":233,"../internals/set-to-string-tag":234,"../internals/species-constructor":238,"../internals/task":243}],295:[function(oe,Ge,De){oe("../modules/es.promise.constructor"),oe("../modules/es.promise.all"),oe("../modules/es.promise.catch"),oe("../modules/es.promise.race"),oe("../modules/es.promise.reject"),oe("../modules/es.promise.resolve")},{"../modules/es.promise.all":292,"../modules/es.promise.catch":293,"../modules/es.promise.constructor":294,"../modules/es.promise.race":296,"../modules/es.promise.reject":297,"../modules/es.promise.resolve":298}],296:[function(oe,Ge,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/function-call"),ke=oe("../internals/a-callable"),Ce=oe("../internals/new-promise-capability"),Se=oe("../internals/perform"),Me=oe("../internals/iterate"),ve=oe("../internals/promise-statics-incorrect-iteration");fe({target:"Promise",stat:!0,forced:ve},{race:function(de){var z=this,ee=Ce.f(z),ae=ee.reject,ie=Se(function(){var le=ke(z.resolve);Me(de,function(ue){me(le,z,ue).then(ee.resolve,ae)})});return ie.error&&ae(ie.value),ee.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],297:[function(oe,Ge,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/function-call"),ke=oe("../internals/new-promise-capability"),Ce=oe("../internals/promise-constructor-detection").CONSTRUCTOR;fe({target:"Promise",stat:!0,forced:Ce},{reject:function(Me){var ve=ke.f(this);return me(ve.reject,void 0,Me),ve.promise}})},{"../internals/export":149,"../internals/function-call":155,"../internals/new-promise-capability":193,"../internals/promise-constructor-detection":215}],298:[function(oe,Ge,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/get-built-in"),ke=oe("../internals/is-pure"),Ce=oe("../internals/promise-native-constructor"),Se=oe("../internals/promise-constructor-detection").CONSTRUCTOR,Me=oe("../internals/promise-resolve"),ve=me("Promise"),we=ke&&!Se;fe({target:"Promise",stat:!0,forced:ke||Se},{resolve:function(z){return Me(we&&this===ve?Ce:this,z)}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/is-pure":181,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/promise-resolve":217}],299:[function(oe,Ge,De){var fe=oe("../internals/descriptors"),me=oe("../internals/global"),ke=oe("../internals/function-uncurry-this"),Ce=oe("../internals/is-forced"),Se=oe("../internals/inherit-if-required"),Me=oe("../internals/create-non-enumerable-property"),ve=oe("../internals/object-get-own-property-names").f,we=oe("../internals/object-is-prototype-of"),de=oe("../internals/is-regexp"),z=oe("../internals/to-string"),ee=oe("../internals/regexp-get-flags"),ae=oe("../internals/regexp-sticky-helpers"),ie=oe("../internals/proxy-accessor"),le=oe("../internals/redefine"),ue=oe("../internals/fails"),ge=oe("../internals/has-own-property"),Pe=oe("../internals/internal-state").enforce,je=oe("../internals/set-species"),Be=oe("../internals/well-known-symbol"),Fe=oe("../internals/regexp-unsupported-dot-all"),Ne=oe("../internals/regexp-unsupported-ncg"),Ae=Be("match"),Re=me.RegExp,We=Re.prototype,Ye=me.SyntaxError,Ue=ke(We.exec),Ke=ke("".charAt),ot=ke("".replace),ut=ke("".indexOf),ft=ke("".slice),wt=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Je=/a/g,nt=/a/g,xt=new Re(Je)!==Je,Pt=ae.MISSED_STICKY,Ct=ae.UNSUPPORTED_Y,gt=fe&&(!xt||Pt||Fe||Ne||ue(function(){return nt[Ae]=!1,Re(Je)!=Je||Re(nt)==nt||Re(Je,"i")!="/a/i"})),dt=function(mt){for(var yt=mt.length,tt=0,Ve="",xe=!1,Le;tt<=yt;tt++){if(Le=Ke(mt,tt),Le==="\\"){Ve+=Le+Ke(mt,++tt);continue}!xe&&Le==="."?Ve+="[\\s\\S]":(Le==="["?xe=!0:Le==="]"&&(xe=!1),Ve+=Le)}return Ve},ht=function(mt){for(var yt=mt.length,tt=0,Ve="",xe=[],Le={},Xe=!1,rt=!1,Ie=0,_e="",He;tt<=yt;tt++){if(He=Ke(mt,tt),He==="\\")He=He+Ke(mt,++tt);else if(He==="]")Xe=!1;else if(!Xe)switch(!0){case He==="[":Xe=!0;break;case He==="(":Ue(wt,ft(mt,tt+1))&&(tt+=2,rt=!0),Ve+=He,Ie++;continue;case(He===">"&&rt):if(_e===""||ge(Le,_e))throw new Ye("Invalid capture group name");Le[_e]=!0,xe[xe.length]=[_e,Ie],rt=!1,_e="";continue}rt?_e+=He:Ve+=He}return[Ve,xe]};if(Ce("RegExp",gt)){for(var Et=function(yt,tt){var Ve=we(We,this),xe=de(yt),Le=tt===void 0,Xe=[],rt=yt,Ie,_e,He,Qe,ct,at;if(!Ve&&xe&&Le&&yt.constructor===Et)return yt;if((xe||we(We,yt))&&(yt=yt.source,Le&&(tt=ee(rt))),yt=yt===void 0?"":z(yt),tt=tt===void 0?"":z(tt),rt=yt,Fe&&"dotAll"in Je&&(_e=!!tt&&ut(tt,"s")>-1,_e&&(tt=ot(tt,/s/g,""))),Ie=tt,Pt&&"sticky"in Je&&(He=!!tt&&ut(tt,"y")>-1,He&&Ct&&(tt=ot(tt,/y/g,""))),Ne&&(Qe=ht(yt),yt=Qe[0],Xe=Qe[1]),ct=Se(Re(yt,tt),Ve?this:We,Et),(_e||He||Xe.length)&&(at=Pe(ct),_e&&(at.dotAll=!0,at.raw=Et(dt(yt),Ie)),He&&(at.sticky=!0),Xe.length&&(at.groups=Xe)),yt!==rt)try{Me(ct,"source",rt===""?"(?:)":rt)}catch(At){}return ct},St=ve(Re),Ft=0;St.length>Ft;)ie(Et,Re,St[Ft++]);We.constructor=Et,Et.prototype=We,le(me,"RegExp",Et)}je("RegExp")},{"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-forced":178,"../internals/is-regexp":182,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/proxy-accessor":219,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/set-species":233,"../internals/to-string":256,"../internals/well-known-symbol":268}],300:[function(oe,Ge,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/regexp-exec");fe({target:"RegExp",proto:!0,forced:/./.exec!==me},{exec:me})},{"../internals/export":149,"../internals/regexp-exec":224}],301:[function(oe,Ge,De){"use strict";var fe=oe("../internals/function-name").PROPER,me=oe("../internals/redefine"),ke=oe("../internals/an-object"),Ce=oe("../internals/to-string"),Se=oe("../internals/fails"),Me=oe("../internals/regexp-get-flags"),ve="toString",we=RegExp.prototype,de=we[ve],z=Se(function(){return de.call({source:"a",flags:"b"})!="/a/b"}),ee=fe&&de.name!=ve;(z||ee)&&me(RegExp.prototype,ve,function(){var ie=ke(this),le=Ce(ie.source),ue=Ce(Me(ie));return"/"+le+"/"+ue},{unsafe:!0})},{"../internals/an-object":101,"../internals/fails":150,"../internals/function-name":156,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/to-string":256}],302:[function(oe,Ge,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/not-a-regexp"),Ce=oe("../internals/require-object-coercible"),Se=oe("../internals/to-string"),Me=oe("../internals/correct-is-regexp-logic"),ve=me("".indexOf);fe({target:"String",proto:!0,forced:!Me("includes")},{includes:function(de){return!!~ve(Se(Ce(this)),Se(ke(de)),arguments.length>1?arguments[1]:void 0)}})},{"../internals/correct-is-regexp-logic":126,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/not-a-regexp":194,"../internals/require-object-coercible":230,"../internals/to-string":256}],303:[function(oe,Ge,De){"use strict";var fe=oe("../internals/string-multibyte").charAt,me=oe("../internals/to-string"),ke=oe("../internals/internal-state"),Ce=oe("../internals/define-iterator"),Se="String Iterator",Me=ke.set,ve=ke.getterFor(Se);Ce(String,"String",function(we){Me(this,{type:Se,string:me(we),index:0})},function(){var de=ve(this),z=de.string,ee=de.index,ae;return ee>=z.length?{value:void 0,done:!0}:(ae=fe(z,ee),de.index+=ae.length,{value:ae,done:!1})})},{"../internals/define-iterator":132,"../internals/internal-state":173,"../internals/string-multibyte":239,"../internals/to-string":256}],304:[function(oe,Ge,De){"use strict";var fe=oe("../internals/function-call"),me=oe("../internals/fix-regexp-well-known-symbol-logic"),ke=oe("../internals/an-object"),Ce=oe("../internals/to-length"),Se=oe("../internals/to-string"),Me=oe("../internals/require-object-coercible"),ve=oe("../internals/get-method"),we=oe("../internals/advance-string-index"),de=oe("../internals/regexp-exec-abstract");me("match",function(z,ee,ae){return[function(le){var ue=Me(this),ge=le==null?void 0:ve(le,z);return ge?fe(ge,le,ue):new RegExp(le)[z](Se(ue))},function(ie){var le=ke(this),ue=Se(ie),ge=ae(ee,le,ue);if(ge.done)return ge.value;if(!le.global)return de(le,ue);var Pe=le.unicode;le.lastIndex=0;for(var je=[],Be=0,Fe;(Fe=de(le,ue))!==null;){var Ne=Se(Fe[0]);je[Be]=Ne,Ne===""&&(le.lastIndex=we(ue,Ce(le.lastIndex),Pe)),Be++}return Be===0?null:je}]})},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-call":155,"../internals/get-method":161,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-length":249,"../internals/to-string":256}],305:[function(oe,Ge,De){"use strict";var fe=oe("../internals/function-apply"),me=oe("../internals/function-call"),ke=oe("../internals/function-uncurry-this"),Ce=oe("../internals/fix-regexp-well-known-symbol-logic"),Se=oe("../internals/fails"),Me=oe("../internals/an-object"),ve=oe("../internals/is-callable"),we=oe("../internals/to-integer-or-infinity"),de=oe("../internals/to-length"),z=oe("../internals/to-string"),ee=oe("../internals/require-object-coercible"),ae=oe("../internals/advance-string-index"),ie=oe("../internals/get-method"),le=oe("../internals/get-substitution"),ue=oe("../internals/regexp-exec-abstract"),ge=oe("../internals/well-known-symbol"),Pe=ge("replace"),je=Math.max,Be=Math.min,Fe=ke([].concat),Ne=ke([].push),Ae=ke("".indexOf),Re=ke("".slice),We=function(ot){return ot===void 0?ot:String(ot)},Ye=function(){return"a".replace(/./,"$0")==="$0"}(),Ue=function(){return/./[Pe]?/./[Pe]("a","$0")==="":!1}(),Ke=!Se(function(){var ot=/./;return ot.exec=function(){var ut=[];return ut.groups={a:"7"},ut},"".replace(ot,"$<a>")!=="7"});Ce("replace",function(ot,ut,ft){var wt=Ue?"$":"$0";return[function(nt,xt){var Pt=ee(this),Ct=nt==null?void 0:ie(nt,Pe);return Ct?me(Ct,nt,Pt,xt):me(ut,z(Pt),nt,xt)},function(Je,nt){var xt=Me(this),Pt=z(Je);if(typeof nt=="string"&&Ae(nt,wt)===-1&&Ae(nt,"$<")===-1){var Ct=ft(ut,xt,Pt,nt);if(Ct.done)return Ct.value}var gt=ve(nt);gt||(nt=z(nt));var dt=xt.global;if(dt){var ht=xt.unicode;xt.lastIndex=0}for(var Et=[];;){var St=ue(xt,Pt);if(St===null||(Ne(Et,St),!dt))break;var Ft=z(St[0]);Ft===""&&(xt.lastIndex=ae(Pt,de(xt.lastIndex),ht))}for(var mt="",yt=0,tt=0;tt<Et.length;tt++){St=Et[tt];for(var Ve=z(St[0]),xe=je(Be(we(St.index),Pt.length),0),Le=[],Xe=1;Xe<St.length;Xe++)Ne(Le,We(St[Xe]));var rt=St.groups;if(gt){var Ie=Fe([Ve],Le,xe,Pt);rt!==void 0&&Ne(Ie,rt);var _e=z(fe(nt,void 0,Ie))}else _e=le(Ve,Pt,xe,Le,rt,nt);xe>=yt&&(mt+=Re(Pt,yt,xe)+_e,yt=xe+Ve.length)}return mt+Re(Pt,yt)}]},!Ke||!Ye||Ue)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/get-substitution":162,"../internals/is-callable":176,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-length":249,"../internals/to-string":256,"../internals/well-known-symbol":268}],306:[function(oe,Ge,De){"use strict";var fe=oe("../internals/function-call"),me=oe("../internals/fix-regexp-well-known-symbol-logic"),ke=oe("../internals/an-object"),Ce=oe("../internals/require-object-coercible"),Se=oe("../internals/same-value"),Me=oe("../internals/to-string"),ve=oe("../internals/get-method"),we=oe("../internals/regexp-exec-abstract");me("search",function(de,z,ee){return[function(ie){var le=Ce(this),ue=ie==null?void 0:ve(ie,de);return ue?fe(ue,ie,le):new RegExp(ie)[de](Me(le))},function(ae){var ie=ke(this),le=Me(ae),ue=ee(z,ie,le);if(ue.done)return ue.value;var ge=ie.lastIndex;Se(ge,0)||(ie.lastIndex=0);var Pe=we(ie,le);return Se(ie.lastIndex,ge)||(ie.lastIndex=ge),Pe===null?-1:Pe.index}]})},{"../internals/an-object":101,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-call":155,"../internals/get-method":161,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/same-value":231,"../internals/to-string":256}],307:[function(oe,Ge,De){"use strict";var fe=oe("../internals/function-apply"),me=oe("../internals/function-call"),ke=oe("../internals/function-uncurry-this"),Ce=oe("../internals/fix-regexp-well-known-symbol-logic"),Se=oe("../internals/is-regexp"),Me=oe("../internals/an-object"),ve=oe("../internals/require-object-coercible"),we=oe("../internals/species-constructor"),de=oe("../internals/advance-string-index"),z=oe("../internals/to-length"),ee=oe("../internals/to-string"),ae=oe("../internals/get-method"),ie=oe("../internals/array-slice-simple"),le=oe("../internals/regexp-exec-abstract"),ue=oe("../internals/regexp-exec"),ge=oe("../internals/regexp-sticky-helpers"),Pe=oe("../internals/fails"),je=ge.UNSUPPORTED_Y,Be=4294967295,Fe=Math.min,Ne=[].push,Ae=ke(/./.exec),Re=ke(Ne),We=ke("".slice),Ye=!Pe(function(){var Ue=/(?:)/,Ke=Ue.exec;Ue.exec=function(){return Ke.apply(this,arguments)};var ot="ab".split(Ue);return ot.length!==2||ot[0]!=="a"||ot[1]!=="b"});Ce("split",function(Ue,Ke,ot){var ut;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?ut=function(ft,wt){var Je=ee(ve(this)),nt=wt===void 0?Be:wt>>>0;if(nt===0)return[];if(ft===void 0)return[Je];if(!Se(ft))return me(Ke,Je,ft,nt);for(var xt=[],Pt=(ft.ignoreCase?"i":"")+(ft.multiline?"m":"")+(ft.unicode?"u":"")+(ft.sticky?"y":""),Ct=0,gt=new RegExp(ft.source,Pt+"g"),dt,ht,Et;(dt=me(ue,gt,Je))&&(ht=gt.lastIndex,!(ht>Ct&&(Re(xt,We(Je,Ct,dt.index)),dt.length>1&&dt.index<Je.length&&fe(Ne,xt,ie(dt,1)),Et=dt[0].length,Ct=ht,xt.length>=nt)));)gt.lastIndex===dt.index&&gt.lastIndex++;return Ct===Je.length?(Et||!Ae(gt,""))&&Re(xt,""):Re(xt,We(Je,Ct)),xt.length>nt?ie(xt,0,nt):xt}:"0".split(void 0,0).length?ut=function(ft,wt){return ft===void 0&&wt===0?[]:me(Ke,this,ft,wt)}:ut=Ke,[function(wt,Je){var nt=ve(this),xt=wt==null?void 0:ae(wt,Ue);return xt?me(xt,wt,nt,Je):me(ut,ee(nt),wt,Je)},function(ft,wt){var Je=Me(this),nt=ee(ft),xt=ot(ut,Je,nt,wt,ut!==Ke);if(xt.done)return xt.value;var Pt=we(Je,RegExp),Ct=Je.unicode,gt=(Je.ignoreCase?"i":"")+(Je.multiline?"m":"")+(Je.unicode?"u":"")+(je?"g":"y"),dt=new Pt(je?"^(?:"+Je.source+")":Je,gt),ht=wt===void 0?Be:wt>>>0;if(ht===0)return[];if(nt.length===0)return le(dt,nt)===null?[nt]:[];for(var Et=0,St=0,Ft=[];St<nt.length;){dt.lastIndex=je?0:St;var mt=le(dt,je?We(nt,St):nt),yt;if(mt===null||(yt=Fe(z(dt.lastIndex+(je?St:0)),nt.length))===Et)St=de(nt,St,Ct);else{if(Re(Ft,We(nt,Et,St)),Ft.length===ht)return Ft;for(var tt=1;tt<=mt.length-1;tt++)if(Re(Ft,mt[tt]),Ft.length===ht)return Ft;St=Et=yt}}return Re(Ft,We(nt,Et)),Ft}]},!Ye,je)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/array-slice-simple":116,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/is-regexp":182,"../internals/regexp-exec":224,"../internals/regexp-exec-abstract":223,"../internals/regexp-sticky-helpers":227,"../internals/require-object-coercible":230,"../internals/species-constructor":238,"../internals/to-length":249,"../internals/to-string":256}],308:[function(oe,Ge,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/string-trim").trim,ke=oe("../internals/string-trim-forced");fe({target:"String",proto:!0,forced:ke("trim")},{trim:function(){return me(this)}})},{"../internals/export":149,"../internals/string-trim":241,"../internals/string-trim-forced":240}],309:[function(oe,Ge,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/global"),ke=oe("../internals/function-call"),Ce=oe("../internals/function-uncurry-this"),Se=oe("../internals/is-pure"),Me=oe("../internals/descriptors"),ve=oe("../internals/native-symbol"),we=oe("../internals/fails"),de=oe("../internals/has-own-property"),z=oe("../internals/object-is-prototype-of"),ee=oe("../internals/an-object"),ae=oe("../internals/to-indexed-object"),ie=oe("../internals/to-property-key"),le=oe("../internals/to-string"),ue=oe("../internals/create-property-descriptor"),ge=oe("../internals/object-create"),Pe=oe("../internals/object-keys"),je=oe("../internals/object-get-own-property-names"),Be=oe("../internals/object-get-own-property-names-external"),Fe=oe("../internals/object-get-own-property-symbols"),Ne=oe("../internals/object-get-own-property-descriptor"),Ae=oe("../internals/object-define-property"),Re=oe("../internals/object-define-properties"),We=oe("../internals/object-property-is-enumerable"),Ye=oe("../internals/redefine"),Ue=oe("../internals/shared"),Ke=oe("../internals/shared-key"),ot=oe("../internals/hidden-keys"),ut=oe("../internals/uid"),ft=oe("../internals/well-known-symbol"),wt=oe("../internals/well-known-symbol-wrapped"),Je=oe("../internals/define-well-known-symbol"),nt=oe("../internals/symbol-define-to-primitive"),xt=oe("../internals/set-to-string-tag"),Pt=oe("../internals/internal-state"),Ct=oe("../internals/array-iteration").forEach,gt=Ke("hidden"),dt="Symbol",ht="prototype",Et=Pt.set,St=Pt.getterFor(dt),Ft=Object[ht],mt=me.Symbol,yt=mt&&mt[ht],tt=me.TypeError,Ve=me.QObject,xe=Ne.f,Le=Ae.f,Xe=Be.f,rt=We.f,Ie=Ce([].push),_e=Ue("symbols"),He=Ue("op-symbols"),Qe=Ue("wks"),ct=!Ve||!Ve[ht]||!Ve[ht].findChild,at=Me&&we(function(){return ge(Le({},"a",{get:function(){return Le(this,"a",{value:7}).a}})).a!=7})?function(tn,Wt,En){var Pn=xe(Ft,Wt);Pn&&delete Ft[Wt],Le(tn,Wt,En),Pn&&tn!==Ft&&Le(Ft,Wt,Pn)}:Le,At=function(tn,Wt){var En=_e[tn]=ge(yt);return Et(En,{type:dt,tag:tn,description:Wt}),Me||(En.description=Wt),En},Lt=function(Wt,En,Pn){Wt===Ft&&Lt(He,En,Pn),ee(Wt);var Ln=ie(En);return ee(Pn),de(_e,Ln)?(Pn.enumerable?(de(Wt,gt)&&Wt[gt][Ln]&&(Wt[gt][Ln]=!1),Pn=ge(Pn,{enumerable:ue(0,!1)})):(de(Wt,gt)||Le(Wt,gt,ue(1,{})),Wt[gt][Ln]=!0),at(Wt,Ln,Pn)):Le(Wt,Ln,Pn)},It=function(Wt,En){ee(Wt);var Pn=ae(En),Ln=Pe(Pn).concat(ln(Pn));return Ct(Ln,function(Vn){(!Me||ke(Xt,Pn,Vn))&&Lt(Wt,Vn,Pn[Vn])}),Wt},Kt=function(Wt,En){return En===void 0?ge(Wt):It(ge(Wt),En)},Xt=function(Wt){var En=ie(Wt),Pn=ke(rt,this,En);return this===Ft&&de(_e,En)&&!de(He,En)?!1:Pn||!de(this,En)||!de(_e,En)||de(this,gt)&&this[gt][En]?Pn:!0},$t=function(Wt,En){var Pn=ae(Wt),Ln=ie(En);if(!(Pn===Ft&&de(_e,Ln)&&!de(He,Ln))){var Vn=xe(Pn,Ln);return Vn&&de(_e,Ln)&&!(de(Pn,gt)&&Pn[gt][Ln])&&(Vn.enumerable=!0),Vn}},Ut=function(Wt){var En=Xe(ae(Wt)),Pn=[];return Ct(En,function(Ln){!de(_e,Ln)&&!de(ot,Ln)&&Ie(Pn,Ln)}),Pn},ln=function(tn){var Wt=tn===Ft,En=Xe(Wt?He:ae(tn)),Pn=[];return Ct(En,function(Ln){de(_e,Ln)&&(!Wt||de(Ft,Ln))&&Ie(Pn,_e[Ln])}),Pn};ve||(mt=function(){if(z(yt,this))throw tt("Symbol is not a constructor");var Wt=!arguments.length||arguments[0]===void 0?void 0:le(arguments[0]),En=ut(Wt),Pn=function(Ln){this===Ft&&ke(Pn,He,Ln),de(this,gt)&&de(this[gt],En)&&(this[gt][En]=!1),at(this,En,ue(1,Ln))};return Me&&ct&&at(Ft,En,{configurable:!0,set:Pn}),At(En,Wt)},yt=mt[ht],Ye(yt,"toString",function(){return St(this).tag}),Ye(mt,"withoutSetter",function(tn){return At(ut(tn),tn)}),We.f=Xt,Ae.f=Lt,Re.f=It,Ne.f=$t,je.f=Be.f=Ut,Fe.f=ln,wt.f=function(tn){return At(ft(tn),tn)},Me&&(Le(yt,"description",{configurable:!0,get:function(){return St(this).description}}),Se||Ye(Ft,"propertyIsEnumerable",Xt,{unsafe:!0}))),fe({global:!0,wrap:!0,forced:!ve,sham:!ve},{Symbol:mt}),Ct(Pe(Qe),function(tn){Je(tn)}),fe({target:dt,stat:!0,forced:!ve},{useSetter:function(){ct=!0},useSimple:function(){ct=!1}}),fe({target:"Object",stat:!0,forced:!ve,sham:!Me},{create:Kt,defineProperty:Lt,defineProperties:It,getOwnPropertyDescriptor:$t}),fe({target:"Object",stat:!0,forced:!ve},{getOwnPropertyNames:Ut}),nt(),xt(mt,dt),ot[gt]=!0},{"../internals/an-object":101,"../internals/array-iteration":111,"../internals/create-property-descriptor":130,"../internals/define-well-known-symbol":133,"../internals/descriptors":134,"../internals/export":149,"../internals/fails":150,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/internal-state":173,"../internals/is-pure":181,"../internals/native-symbol":191,"../internals/object-create":196,"../internals/object-define-properties":197,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-get-own-property-names-external":200,"../internals/object-get-own-property-symbols":202,"../internals/object-is-prototype-of":204,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/redefine":222,"../internals/set-to-string-tag":234,"../internals/shared":237,"../internals/shared-key":235,"../internals/symbol-define-to-primitive":242,"../internals/to-indexed-object":247,"../internals/to-property-key":254,"../internals/to-string":256,"../internals/uid":263,"../internals/well-known-symbol":268,"../internals/well-known-symbol-wrapped":267}],310:[function(oe,Ge,De){"use strict";var fe=oe("../internals/export"),me=oe("../internals/descriptors"),ke=oe("../internals/global"),Ce=oe("../internals/function-uncurry-this"),Se=oe("../internals/has-own-property"),Me=oe("../internals/is-callable"),ve=oe("../internals/object-is-prototype-of"),we=oe("../internals/to-string"),de=oe("../internals/object-define-property").f,z=oe("../internals/copy-constructor-properties"),ee=ke.Symbol,ae=ee&&ee.prototype;if(me&&Me(ee)&&(!("description"in ae)||ee().description!==void 0)){var ie={},le=function(){var Ae=arguments.length<1||arguments[0]===void 0?void 0:we(arguments[0]),Re=ve(ae,this)?new ee(Ae):Ae===void 0?ee():ee(Ae);return Ae===""&&(ie[Re]=!0),Re};z(le,ee),le.prototype=ae,ae.constructor=le;var ue=String(ee("test"))=="Symbol(test)",ge=Ce(ae.toString),Pe=Ce(ae.valueOf),je=/^Symbol\((.*)\)[^)]+$/,Be=Ce("".replace),Fe=Ce("".slice);de(ae,"description",{configurable:!0,get:function(){var Ae=Pe(this),Re=ge(Ae);if(Se(ie,Ae))return"";var We=ue?Fe(Re,7,-1):Be(Re,je,"$1");return We===""?void 0:We}}),fe({global:!0,forced:!0},{Symbol:le})}},{"../internals/copy-constructor-properties":125,"../internals/descriptors":134,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/object-define-property":198,"../internals/object-is-prototype-of":204,"../internals/to-string":256}],311:[function(oe,Ge,De){var fe=oe("../internals/export"),me=oe("../internals/get-built-in"),ke=oe("../internals/has-own-property"),Ce=oe("../internals/to-string"),Se=oe("../internals/shared"),Me=oe("../internals/native-symbol-registry"),ve=Se("string-to-symbol-registry"),we=Se("symbol-to-string-registry");fe({target:"Symbol",stat:!0,forced:!Me},{for:function(de){var z=Ce(de);if(ke(ve,z))return ve[z];var ee=me("Symbol")(z);return ve[z]=ee,we[ee]=z,ee}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/has-own-property":164,"../internals/native-symbol-registry":190,"../internals/shared":237,"../internals/to-string":256}],312:[function(oe,Ge,De){var fe=oe("../internals/define-well-known-symbol");fe("iterator")},{"../internals/define-well-known-symbol":133}],313:[function(oe,Ge,De){oe("../modules/es.symbol.constructor"),oe("../modules/es.symbol.for"),oe("../modules/es.symbol.key-for"),oe("../modules/es.json.stringify"),oe("../modules/es.object.get-own-property-symbols")},{"../modules/es.json.stringify":285,"../modules/es.object.get-own-property-symbols":289,"../modules/es.symbol.constructor":309,"../modules/es.symbol.for":311,"../modules/es.symbol.key-for":314}],314:[function(oe,Ge,De){var fe=oe("../internals/export"),me=oe("../internals/has-own-property"),ke=oe("../internals/is-symbol"),Ce=oe("../internals/try-to-string"),Se=oe("../internals/shared"),Me=oe("../internals/native-symbol-registry"),ve=Se("symbol-to-string-registry");fe({target:"Symbol",stat:!0,forced:!Me},{keyFor:function(de){if(!ke(de))throw TypeError(Ce(de)+" is not a symbol");if(me(ve,de))return ve[de]}})},{"../internals/export":149,"../internals/has-own-property":164,"../internals/is-symbol":183,"../internals/native-symbol-registry":190,"../internals/shared":237,"../internals/try-to-string":257}],315:[function(oe,Ge,De){"use strict";var fe=oe("../internals/function-uncurry-this"),me=oe("../internals/array-buffer-view-core"),ke=oe("../internals/array-copy-within"),Ce=fe(ke),Se=me.aTypedArray,Me=me.exportTypedArrayMethod;Me("copyWithin",function(we,de){return Ce(Se(this),we,de,arguments.length>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-copy-within":105,"../internals/function-uncurry-this":157}],316:[function(oe,Ge,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-iteration").every,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("every",function(Me){return me(ke(this),Me,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],317:[function(oe,Ge,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/function-call"),ke=oe("../internals/array-fill"),Ce=fe.aTypedArray,Se=fe.exportTypedArrayMethod;Se("fill",function(ve){var we=arguments.length;return me(ke,Ce(this),ve,we>1?arguments[1]:void 0,we>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-fill":106,"../internals/function-call":155}],318:[function(oe,Ge,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-iteration").filter,ke=oe("../internals/typed-array-from-species-and-list"),Ce=fe.aTypedArray,Se=fe.exportTypedArrayMethod;Se("filter",function(ve){var we=me(Ce(this),ve,arguments.length>1?arguments[1]:void 0);return ke(this,we)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-from-species-and-list":260}],319:[function(oe,Ge,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-iteration").findIndex,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("findIndex",function(Me){return me(ke(this),Me,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],320:[function(oe,Ge,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-iteration").find,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("find",function(Me){return me(ke(this),Me,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],321:[function(oe,Ge,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-iteration").forEach,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("forEach",function(Me){me(ke(this),Me,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],322:[function(oe,Ge,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-includes").includes,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("includes",function(Me){return me(ke(this),Me,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],323:[function(oe,Ge,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-includes").indexOf,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("indexOf",function(Me){return me(ke(this),Me,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],324:[function(oe,Ge,De){"use strict";var fe=oe("../internals/global"),me=oe("../internals/fails"),ke=oe("../internals/function-uncurry-this"),Ce=oe("../internals/array-buffer-view-core"),Se=oe("../modules/es.array.iterator"),Me=oe("../internals/well-known-symbol"),ve=Me("iterator"),we=fe.Uint8Array,de=ke(Se.values),z=ke(Se.keys),ee=ke(Se.entries),ae=Ce.aTypedArray,ie=Ce.exportTypedArrayMethod,le=we&&we.prototype,ue=!me(function(){le[ve].call([1])}),ge=!!le&&le.values&&le[ve]===le.values&&le.values.name==="values",Pe=function(){return de(ae(this))};ie("entries",function(){return ee(ae(this))},ue),ie("keys",function(){return z(ae(this))},ue),ie("values",Pe,ue||!ge,{name:"values"}),ie(ve,Pe,ue||!ge,{name:"values"})},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/well-known-symbol":268,"../modules/es.array.iterator":278}],325:[function(oe,Ge,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/function-uncurry-this"),ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod,Se=me([].join);Ce("join",function(ve){return Se(ke(this),ve)})},{"../internals/array-buffer-view-core":103,"../internals/function-uncurry-this":157}],326:[function(oe,Ge,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/function-apply"),ke=oe("../internals/array-last-index-of"),Ce=fe.aTypedArray,Se=fe.exportTypedArrayMethod;Se("lastIndexOf",function(ve){var we=arguments.length;return me(ke,Ce(this),we>1?[ve,arguments[1]]:[ve])})},{"../internals/array-buffer-view-core":103,"../internals/array-last-index-of":112,"../internals/function-apply":152}],327:[function(oe,Ge,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-iteration").map,ke=oe("../internals/typed-array-species-constructor"),Ce=fe.aTypedArray,Se=fe.exportTypedArrayMethod;Se("map",function(ve){return me(Ce(this),ve,arguments.length>1?arguments[1]:void 0,function(we,de){return new(ke(we))(de)})})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-species-constructor":262}],328:[function(oe,Ge,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-reduce").right,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("reduceRight",function(Me){var ve=arguments.length;return me(ke(this),Me,ve,ve>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],329:[function(oe,Ge,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-reduce").left,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("reduce",function(Me){var ve=arguments.length;return me(ke(this),Me,ve,ve>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],330:[function(oe,Ge,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=fe.aTypedArray,ke=fe.exportTypedArrayMethod,Ce=Math.floor;ke("reverse",function(){for(var Me=this,ve=me(Me).length,we=Ce(ve/2),de=0,z;de<we;)z=Me[de],Me[de++]=Me[--ve],Me[ve]=z;return Me})},{"../internals/array-buffer-view-core":103}],331:[function(oe,Ge,De){"use strict";var fe=oe("../internals/global"),me=oe("../internals/function-call"),ke=oe("../internals/array-buffer-view-core"),Ce=oe("../internals/length-of-array-like"),Se=oe("../internals/to-offset"),Me=oe("../internals/to-object"),ve=oe("../internals/fails"),we=fe.RangeError,de=fe.Int8Array,z=de&&de.prototype,ee=z&&z.set,ae=ke.aTypedArray,ie=ke.exportTypedArrayMethod,le=!ve(function(){var ge=new Uint8ClampedArray(2);return me(ee,ge,{length:1,0:3},1),ge[1]!==3}),ue=le&&ke.NATIVE_ARRAY_BUFFER_VIEWS&&ve(function(){var ge=new de(2);return ge.set(1),ge.set("2",1),ge[0]!==0||ge[1]!==2});ie("set",function(Pe){ae(this);var je=Se(arguments.length>1?arguments[1]:void 0,1),Be=Me(Pe);if(le)return me(ee,this,Be,je);var Fe=this.length,Ne=Ce(Be),Ae=0;if(Ne+je>Fe)throw we("Wrong length");for(;Ae<Ne;)this[je+Ae]=Be[Ae++]},!le||ue)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-call":155,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/to-offset":251}],332:[function(oe,Ge,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/typed-array-species-constructor"),ke=oe("../internals/fails"),Ce=oe("../internals/array-slice"),Se=fe.aTypedArray,Me=fe.exportTypedArrayMethod,ve=ke(function(){new Int8Array(1).slice()});Me("slice",function(de,z){for(var ee=Ce(Se(this),de,z),ae=me(this),ie=0,le=ee.length,ue=new ae(le);le>ie;)ue[ie]=ee[ie++];return ue},ve)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/typed-array-species-constructor":262}],333:[function(oe,Ge,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/array-iteration").some,ke=fe.aTypedArray,Ce=fe.exportTypedArrayMethod;Ce("some",function(Me){return me(ke(this),Me,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],334:[function(oe,Ge,De){"use strict";var fe=oe("../internals/global"),me=oe("../internals/function-uncurry-this"),ke=oe("../internals/fails"),Ce=oe("../internals/a-callable"),Se=oe("../internals/array-sort"),Me=oe("../internals/array-buffer-view-core"),ve=oe("../internals/engine-ff-version"),we=oe("../internals/engine-is-ie-or-edge"),de=oe("../internals/engine-v8-version"),z=oe("../internals/engine-webkit-version"),ee=Me.aTypedArray,ae=Me.exportTypedArrayMethod,ie=fe.Uint16Array,le=ie&&me(ie.prototype.sort),ue=!!le&&!(ke(function(){le(new ie(2),null)})&&ke(function(){le(new ie(2),{})})),ge=!!le&&!ke(function(){if(de)return de<74;if(ve)return ve<67;if(we)return!0;if(z)return z<602;var je=new ie(516),Be=Array(516),Fe,Ne;for(Fe=0;Fe<516;Fe++)Ne=Fe%4,je[Fe]=515-Fe,Be[Fe]=Fe-2*Ne+3;for(le(je,function(Ae,Re){return(Ae/4|0)-(Re/4|0)}),Fe=0;Fe<516;Fe++)if(je[Fe]!==Be[Fe])return!0}),Pe=function(je){return function(Be,Fe){return je!==void 0?+je(Be,Fe)||0:Fe!==Fe?-1:Be!==Be?1:Be===0&&Fe===0?1/Be>0&&1/Fe<0?1:-1:Be>Fe}};ae("sort",function(Be){return Be!==void 0&&Ce(Be),ge?le(this,Be):Se(ee(this),Pe(Be))},!ge||ue)},{"../internals/a-callable":95,"../internals/array-buffer-view-core":103,"../internals/array-sort":118,"../internals/engine-ff-version":138,"../internals/engine-is-ie-or-edge":140,"../internals/engine-v8-version":146,"../internals/engine-webkit-version":147,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],335:[function(oe,Ge,De){"use strict";var fe=oe("../internals/array-buffer-view-core"),me=oe("../internals/to-length"),ke=oe("../internals/to-absolute-index"),Ce=oe("../internals/typed-array-species-constructor"),Se=fe.aTypedArray,Me=fe.exportTypedArrayMethod;Me("subarray",function(we,de){var z=Se(this),ee=z.length,ae=ke(we,ee),ie=Ce(z);return new ie(z.buffer,z.byteOffset+ae*z.BYTES_PER_ELEMENT,me((de===void 0?ee:ke(de,ee))-ae))})},{"../internals/array-buffer-view-core":103,"../internals/to-absolute-index":245,"../internals/to-length":249,"../internals/typed-array-species-constructor":262}],336:[function(oe,Ge,De){"use strict";var fe=oe("../internals/global"),me=oe("../internals/function-apply"),ke=oe("../internals/array-buffer-view-core"),Ce=oe("../internals/fails"),Se=oe("../internals/array-slice"),Me=fe.Int8Array,ve=ke.aTypedArray,we=ke.exportTypedArrayMethod,de=[].toLocaleString,z=!!Me&&Ce(function(){de.call(new Me(1))}),ee=Ce(function(){return[1,2].toLocaleString()!=new Me([1,2]).toLocaleString()})||!Ce(function(){Me.prototype.toLocaleString.call([1,2])});we("toLocaleString",function(){return me(de,z?Se(ve(this)):ve(this),Se(arguments))},ee)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/function-apply":152,"../internals/global":163}],337:[function(oe,Ge,De){"use strict";var fe=oe("../internals/array-buffer-view-core").exportTypedArrayMethod,me=oe("../internals/fails"),ke=oe("../internals/global"),Ce=oe("../internals/function-uncurry-this"),Se=ke.Uint8Array,Me=Se&&Se.prototype||{},ve=[].toString,we=Ce([].join);me(function(){ve.call({})})&&(ve=function(){return we(this)});var de=Me.toString!=ve;fe("toString",ve,de)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],338:[function(oe,Ge,De){var fe=oe("../internals/typed-array-constructor");fe("Uint8",function(me){return function(Ce,Se,Me){return me(this,Ce,Se,Me)}})},{"../internals/typed-array-constructor":258}],339:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/dom-iterables"),ke=oe("../internals/dom-token-list-prototype"),Ce=oe("../internals/array-for-each"),Se=oe("../internals/create-non-enumerable-property"),Me=function(we){if(we&&we.forEach!==Ce)try{Se(we,"forEach",Ce)}catch(de){we.forEach=Ce}};for(var ve in me)me[ve]&&Me(fe[ve]&&fe[ve].prototype);Me(ke)},{"../internals/array-for-each":107,"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163}],340:[function(oe,Ge,De){var fe=oe("../internals/global"),me=oe("../internals/dom-iterables"),ke=oe("../internals/dom-token-list-prototype"),Ce=oe("../modules/es.array.iterator"),Se=oe("../internals/create-non-enumerable-property"),Me=oe("../internals/well-known-symbol"),ve=Me("iterator"),we=Me("toStringTag"),de=Ce.values,z=function(ae,ie){if(ae){if(ae[ve]!==de)try{Se(ae,ve,de)}catch(ue){ae[ve]=de}if(ae[we]||Se(ae,we,ie),me[ie]){for(var le in Ce)if(ae[le]!==Ce[le])try{Se(ae,le,Ce[le])}catch(ue){ae[le]=Ce[le]}}}};for(var ee in me)z(fe[ee]&&fe[ee].prototype,ee);z(ke,"DOMTokenList")},{"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163,"../internals/well-known-symbol":268,"../modules/es.array.iterator":278}],341:[function(oe,Ge,De){function fe(ge){return Array.isArray?Array.isArray(ge):ue(ge)==="[object Array]"}De.isArray=fe;function me(ge){return typeof ge=="boolean"}De.isBoolean=me;function ke(ge){return ge===null}De.isNull=ke;function Ce(ge){return ge==null}De.isNullOrUndefined=Ce;function Se(ge){return typeof ge=="number"}De.isNumber=Se;function Me(ge){return typeof ge=="string"}De.isString=Me;function ve(ge){return typeof ge=="symbol"}De.isSymbol=ve;function we(ge){return ge===void 0}De.isUndefined=we;function de(ge){return ue(ge)==="[object RegExp]"}De.isRegExp=de;function z(ge){return typeof ge=="object"&&ge!==null}De.isObject=z;function ee(ge){return ue(ge)==="[object Date]"}De.isDate=ee;function ae(ge){return ue(ge)==="[object Error]"||ge instanceof Error}De.isError=ae;function ie(ge){return typeof ge=="function"}De.isFunction=ie;function le(ge){return ge===null||typeof ge=="boolean"||typeof ge=="number"||typeof ge=="string"||typeof ge=="symbol"||typeof ge=="undefined"}De.isPrimitive=le,De.isBuffer=oe("buffer").Buffer.isBuffer;function ue(ge){return Object.prototype.toString.call(ge)}},{buffer:90}],342:[function(oe,Ge,De){(function(fe){"use strict";var me=function(){var ve=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,we=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,de=/[^-+\dA-Z]/g;return function(z,ee,ae,ie){if(arguments.length===1&&Me(z)==="string"&&!/\d/.test(z)&&(ee=z,z=void 0),z=z||new Date,z instanceof Date||(z=new Date(z)),isNaN(z))throw TypeError("Invalid date");ee=String(me.masks[ee]||ee||me.masks.default);var le=ee.slice(0,4);(le==="UTC:"||le==="GMT:")&&(ee=ee.slice(4),ae=!0,le==="GMT:"&&(ie=!0));var ue=ae?"getUTC":"get",ge=z[ue+"Date"](),Pe=z[ue+"Day"](),je=z[ue+"Month"](),Be=z[ue+"FullYear"](),Fe=z[ue+"Hours"](),Ne=z[ue+"Minutes"](),Ae=z[ue+"Seconds"](),Re=z[ue+"Milliseconds"](),We=ae?0:z.getTimezoneOffset(),Ye=Ce(z),Ue=Se(z),Ke={d:ge,dd:ke(ge),ddd:me.i18n.dayNames[Pe],dddd:me.i18n.dayNames[Pe+7],m:je+1,mm:ke(je+1),mmm:me.i18n.monthNames[je],mmmm:me.i18n.monthNames[je+12],yy:String(Be).slice(2),yyyy:Be,h:Fe%12||12,hh:ke(Fe%12||12),H:Fe,HH:ke(Fe),M:Ne,MM:ke(Ne),s:Ae,ss:ke(Ae),l:ke(Re,3),L:ke(Math.round(Re/10)),t:Fe<12?"a":"p",tt:Fe<12?"am":"pm",T:Fe<12?"A":"P",TT:Fe<12?"AM":"PM",Z:ie?"GMT":ae?"UTC":(String(z).match(we)||[""]).pop().replace(de,""),o:(We>0?"-":"+")+ke(Math.floor(Math.abs(We)/60)*100+Math.abs(We)%60,4),S:["th","st","nd","rd"][ge%10>3?0:(ge%100-ge%10!=10)*ge%10],W:Ye,N:Ue};return ee.replace(ve,function(ot){return ot in Ke?Ke[ot]:ot.slice(1,ot.length-1)})}}();me.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},me.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};function ke(ve,we){for(ve=String(ve),we=we||2;ve.length<we;)ve="0"+ve;return ve}function Ce(ve){var we=new Date(ve.getFullYear(),ve.getMonth(),ve.getDate());we.setDate(we.getDate()-(we.getDay()+6)%7+3);var de=new Date(we.getFullYear(),0,4);de.setDate(de.getDate()-(de.getDay()+6)%7+3);var z=we.getTimezoneOffset()-de.getTimezoneOffset();we.setHours(we.getHours()-z);var ee=(we-de)/(864e5*7);return 1+Math.floor(ee)}function Se(ve){var we=ve.getDay();return we===0&&(we=7),we}function Me(ve){return ve===null?"null":ve===void 0?"undefined":typeof ve!="object"?typeof ve:Array.isArray(ve)?"array":{}.toString.call(ve).slice(8,-1).toLowerCase()}typeof st=="function"&&st.amd?st(function(){return me}):typeof De=="object"?Ge.exports=me:fe.dateFormat=me})(this)},{}],343:[function(oe,Ge,De){"use strict";var fe=/["'&<>]/;Ge.exports=me;function me(ke){var Ce=""+ke,Se=fe.exec(Ce);if(!Se)return Ce;var Me,ve="",we=0,de=0;for(we=Se.index;we<Ce.length;we++){switch(Ce.charCodeAt(we)){case 34:Me="&quot;";break;case 38:Me="&amp;";break;case 39:Me="&#39;";break;case 60:Me="&lt;";break;case 62:Me="&gt;";break;default:continue}de!==we&&(ve+=Ce.substring(de,we)),de=we+1,ve+=Me}return de!==we?ve+Ce.substring(de,we):ve}},{}],344:[function(oe,Ge,De){"use strict";var fe=typeof Reflect=="object"?Reflect:null,me=fe&&typeof fe.apply=="function"?fe.apply:function(Ae,Re,We){return Function.prototype.apply.call(Ae,Re,We)},ke;fe&&typeof fe.ownKeys=="function"?ke=fe.ownKeys:Object.getOwnPropertySymbols?ke=function(Ae){return Object.getOwnPropertyNames(Ae).concat(Object.getOwnPropertySymbols(Ae))}:ke=function(Ae){return Object.getOwnPropertyNames(Ae)};function Ce(Ne){console&&console.warn&&console.warn(Ne)}var Se=Number.isNaN||function(Ae){return Ae!==Ae};function Me(){Me.init.call(this)}Ge.exports=Me,Ge.exports.once=je,Me.EventEmitter=Me,Me.prototype._events=void 0,Me.prototype._eventsCount=0,Me.prototype._maxListeners=void 0;var ve=10;function we(Ne){if(typeof Ne!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof Ne)}Object.defineProperty(Me,"defaultMaxListeners",{enumerable:!0,get:function(){return ve},set:function(Ne){if(typeof Ne!="number"||Ne<0||Se(Ne))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+Ne+".");ve=Ne}}),Me.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},Me.prototype.setMaxListeners=function(Ae){if(typeof Ae!="number"||Ae<0||Se(Ae))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+Ae+".");return this._maxListeners=Ae,this};function de(Ne){return Ne._maxListeners===void 0?Me.defaultMaxListeners:Ne._maxListeners}Me.prototype.getMaxListeners=function(){return de(this)},Me.prototype.emit=function(Ae){for(var Re=[],We=1;We<arguments.length;We++)Re.push(arguments[We]);var Ye=Ae==="error",Ue=this._events;if(Ue!==void 0)Ye=Ye&&Ue.error===void 0;else if(!Ye)return!1;if(Ye){var Ke;if(Re.length>0&&(Ke=Re[0]),Ke instanceof Error)throw Ke;var ot=new Error("Unhandled error."+(Ke?" ("+Ke.message+")":""));throw ot.context=Ke,ot}var ut=Ue[Ae];if(ut===void 0)return!1;if(typeof ut=="function")me(ut,this,Re);else for(var ft=ut.length,wt=ue(ut,ft),We=0;We<ft;++We)me(wt[We],this,Re);return!0};function z(Ne,Ae,Re,We){var Ye,Ue,Ke;if(we(Re),Ue=Ne._events,Ue===void 0?(Ue=Ne._events=Object.create(null),Ne._eventsCount=0):(Ue.newListener!==void 0&&(Ne.emit("newListener",Ae,Re.listener?Re.listener:Re),Ue=Ne._events),Ke=Ue[Ae]),Ke===void 0)Ke=Ue[Ae]=Re,++Ne._eventsCount;else if(typeof Ke=="function"?Ke=Ue[Ae]=We?[Re,Ke]:[Ke,Re]:We?Ke.unshift(Re):Ke.push(Re),Ye=de(Ne),Ye>0&&Ke.length>Ye&&!Ke.warned){Ke.warned=!0;var ot=new Error("Possible EventEmitter memory leak detected. "+Ke.length+" "+String(Ae)+" listeners added. Use emitter.setMaxListeners() to increase limit");ot.name="MaxListenersExceededWarning",ot.emitter=Ne,ot.type=Ae,ot.count=Ke.length,Ce(ot)}return Ne}Me.prototype.addListener=function(Ae,Re){return z(this,Ae,Re,!1)},Me.prototype.on=Me.prototype.addListener,Me.prototype.prependListener=function(Ae,Re){return z(this,Ae,Re,!0)};function ee(){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 ae(Ne,Ae,Re){var We={fired:!1,wrapFn:void 0,target:Ne,type:Ae,listener:Re},Ye=ee.bind(We);return Ye.listener=Re,We.wrapFn=Ye,Ye}Me.prototype.once=function(Ae,Re){return we(Re),this.on(Ae,ae(this,Ae,Re)),this},Me.prototype.prependOnceListener=function(Ae,Re){return we(Re),this.prependListener(Ae,ae(this,Ae,Re)),this},Me.prototype.removeListener=function(Ae,Re){var We,Ye,Ue,Ke,ot;if(we(Re),Ye=this._events,Ye===void 0)return this;if(We=Ye[Ae],We===void 0)return this;if(We===Re||We.listener===Re)--this._eventsCount===0?this._events=Object.create(null):(delete Ye[Ae],Ye.removeListener&&this.emit("removeListener",Ae,We.listener||Re));else if(typeof We!="function"){for(Ue=-1,Ke=We.length-1;Ke>=0;Ke--)if(We[Ke]===Re||We[Ke].listener===Re){ot=We[Ke].listener,Ue=Ke;break}if(Ue<0)return this;Ue===0?We.shift():ge(We,Ue),We.length===1&&(Ye[Ae]=We[0]),Ye.removeListener!==void 0&&this.emit("removeListener",Ae,ot||Re)}return this},Me.prototype.off=Me.prototype.removeListener,Me.prototype.removeAllListeners=function(Ae){var Re,We,Ye;if(We=this._events,We===void 0)return this;if(We.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):We[Ae]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete We[Ae]),this;if(arguments.length===0){var Ue=Object.keys(We),Ke;for(Ye=0;Ye<Ue.length;++Ye)Ke=Ue[Ye],Ke!=="removeListener"&&this.removeAllListeners(Ke);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(Re=We[Ae],typeof Re=="function")this.removeListener(Ae,Re);else if(Re!==void 0)for(Ye=Re.length-1;Ye>=0;Ye--)this.removeListener(Ae,Re[Ye]);return this};function ie(Ne,Ae,Re){var We=Ne._events;if(We===void 0)return[];var Ye=We[Ae];return Ye===void 0?[]:typeof Ye=="function"?Re?[Ye.listener||Ye]:[Ye]:Re?Pe(Ye):ue(Ye,Ye.length)}Me.prototype.listeners=function(Ae){return ie(this,Ae,!0)},Me.prototype.rawListeners=function(Ae){return ie(this,Ae,!1)},Me.listenerCount=function(Ne,Ae){return typeof Ne.listenerCount=="function"?Ne.listenerCount(Ae):le.call(Ne,Ae)},Me.prototype.listenerCount=le;function le(Ne){var Ae=this._events;if(Ae!==void 0){var Re=Ae[Ne];if(typeof Re=="function")return 1;if(Re!==void 0)return Re.length}return 0}Me.prototype.eventNames=function(){return this._eventsCount>0?ke(this._events):[]};function ue(Ne,Ae){for(var Re=new Array(Ae),We=0;We<Ae;++We)Re[We]=Ne[We];return Re}function ge(Ne,Ae){for(;Ae+1<Ne.length;Ae++)Ne[Ae]=Ne[Ae+1];Ne.pop()}function Pe(Ne){for(var Ae=new Array(Ne.length),Re=0;Re<Ae.length;++Re)Ae[Re]=Ne[Re].listener||Ne[Re];return Ae}function je(Ne,Ae){return new Promise(function(Re,We){function Ye(Ke){Ne.removeListener(Ae,Ue),We(Ke)}function Ue(){typeof Ne.removeListener=="function"&&Ne.removeListener("error",Ye),Re([].slice.call(arguments))}Fe(Ne,Ae,Ue,{once:!0}),Ae!=="error"&&Be(Ne,Ye,{once:!0})})}function Be(Ne,Ae,Re){typeof Ne.on=="function"&&Fe(Ne,"error",Ae,Re)}function Fe(Ne,Ae,Re,We){if(typeof Ne.on=="function")We.once?Ne.once(Ae,Re):Ne.on(Ae,Re);else if(typeof Ne.addEventListener=="function")Ne.addEventListener(Ae,function Ye(Ue){We.once&&Ne.removeEventListener(Ae,Ye),Re(Ue)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof Ne)}},{}],345:[function(oe,Ge,De){"use strict";var fe=oe("is-callable"),me=Object.prototype.toString,ke=Object.prototype.hasOwnProperty,Ce=function(de,z,ee){for(var ae=0,ie=de.length;ae<ie;ae++)ke.call(de,ae)&&(ee==null?z(de[ae],ae,de):z.call(ee,de[ae],ae,de))},Se=function(de,z,ee){for(var ae=0,ie=de.length;ae<ie;ae++)ee==null?z(de.charAt(ae),ae,de):z.call(ee,de.charAt(ae),ae,de)},Me=function(de,z,ee){for(var ae in de)ke.call(de,ae)&&(ee==null?z(de[ae],ae,de):z.call(ee,de[ae],ae,de))},ve=function(de,z,ee){if(!fe(z))throw new TypeError("iterator must be a function");var ae;arguments.length>=3&&(ae=ee),me.call(de)==="[object Array]"?Ce(de,z,ae):typeof de=="string"?Se(de,z,ae):Me(de,z,ae)};Ge.exports=ve},{"is-callable":367}],346:[function(oe,Ge,De){"use strict";var fe="Function.prototype.bind called on incompatible ",me=Array.prototype.slice,ke=Object.prototype.toString,Ce="[object Function]";Ge.exports=function(Me){var ve=this;if(typeof ve!="function"||ke.call(ve)!==Ce)throw new TypeError(fe+ve);for(var we=me.call(arguments,1),de,z=function(){if(this instanceof de){var ue=ve.apply(this,we.concat(me.call(arguments)));return Object(ue)===ue?ue:this}else return ve.apply(Me,we.concat(me.call(arguments)))},ee=Math.max(0,ve.length-we.length),ae=[],ie=0;ie<ee;ie++)ae.push("$"+ie);if(de=Function("binder","return function ("+ae.join(",")+"){ return binder.apply(this,arguments); }")(z),ve.prototype){var le=function(){};le.prototype=ve.prototype,de.prototype=new le,le.prototype=null}return de}},{}],347:[function(oe,Ge,De){"use strict";var fe=oe("./implementation");Ge.exports=Function.prototype.bind||fe},{"./implementation":346}],348:[function(oe,Ge,De){"use strict";var fe,me=SyntaxError,ke=Function,Ce=TypeError,Se=function(ut){try{return ke('"use strict"; return ('+ut+").constructor;")()}catch(ft){}},Me=Object.getOwnPropertyDescriptor;if(Me)try{Me({},"")}catch(ut){Me=null}var ve=function(){throw new Ce},we=Me?function(){try{return arguments.callee,ve}catch(ut){try{return Me(arguments,"callee").get}catch(ft){return ve}}}():ve,de=oe("has-symbols")(),z=oe("has-proto")(),ee=Object.getPrototypeOf||(z?function(ut){return ut.__proto__}:null),ae={},ie=typeof Uint8Array=="undefined"||!ee?fe:ee(Uint8Array),le={"%AggregateError%":typeof AggregateError=="undefined"?fe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?fe:ArrayBuffer,"%ArrayIteratorPrototype%":de&&ee?ee([][Symbol.iterator]()):fe,"%AsyncFromSyncIteratorPrototype%":fe,"%AsyncFunction%":ae,"%AsyncGenerator%":ae,"%AsyncGeneratorFunction%":ae,"%AsyncIteratorPrototype%":ae,"%Atomics%":typeof Atomics=="undefined"?fe:Atomics,"%BigInt%":typeof BigInt=="undefined"?fe:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?fe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?fe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?fe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?fe:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?fe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?fe:FinalizationRegistry,"%Function%":ke,"%GeneratorFunction%":ae,"%Int8Array%":typeof Int8Array=="undefined"?fe:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?fe:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?fe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":de&&ee?ee(ee([][Symbol.iterator]())):fe,"%JSON%":typeof JSON=="object"?JSON:fe,"%Map%":typeof Map=="undefined"?fe:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!de||!ee?fe:ee(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?fe:Promise,"%Proxy%":typeof Proxy=="undefined"?fe:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?fe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?fe:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!de||!ee?fe:ee(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?fe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":de&&ee?ee(""[Symbol.iterator]()):fe,"%Symbol%":de?Symbol:fe,"%SyntaxError%":me,"%ThrowTypeError%":we,"%TypedArray%":ie,"%TypeError%":Ce,"%Uint8Array%":typeof Uint8Array=="undefined"?fe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?fe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?fe:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?fe:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?fe:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?fe:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?fe:WeakSet};if(ee)try{null.error}catch(ut){var ue=ee(ee(ut));le["%Error.prototype%"]=ue}var ge=function ut(ft){var wt;if(ft==="%AsyncFunction%")wt=Se("async function () {}");else if(ft==="%GeneratorFunction%")wt=Se("function* () {}");else if(ft==="%AsyncGeneratorFunction%")wt=Se("async function* () {}");else if(ft==="%AsyncGenerator%"){var Je=ut("%AsyncGeneratorFunction%");Je&&(wt=Je.prototype)}else if(ft==="%AsyncIteratorPrototype%"){var nt=ut("%AsyncGenerator%");nt&&ee&&(wt=ee(nt.prototype))}return le[ft]=wt,wt},Pe={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},je=oe("function-bind"),Be=oe("has"),Fe=je.call(Function.call,Array.prototype.concat),Ne=je.call(Function.apply,Array.prototype.splice),Ae=je.call(Function.call,String.prototype.replace),Re=je.call(Function.call,String.prototype.slice),We=je.call(Function.call,RegExp.prototype.exec),Ye=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ue=/\\(\\)?/g,Ke=function(ft){var wt=Re(ft,0,1),Je=Re(ft,-1);if(wt==="%"&&Je!=="%")throw new me("invalid intrinsic syntax, expected closing `%`");if(Je==="%"&&wt!=="%")throw new me("invalid intrinsic syntax, expected opening `%`");var nt=[];return Ae(ft,Ye,function(xt,Pt,Ct,gt){nt[nt.length]=Ct?Ae(gt,Ue,"$1"):Pt||xt}),nt},ot=function(ft,wt){var Je=ft,nt;if(Be(Pe,Je)&&(nt=Pe[Je],Je="%"+nt[0]+"%"),Be(le,Je)){var xt=le[Je];if(xt===ae&&(xt=ge(Je)),typeof xt=="undefined"&&!wt)throw new Ce("intrinsic "+ft+" exists, but is not available. Please file an issue!");return{alias:nt,name:Je,value:xt}}throw new me("intrinsic "+ft+" does not exist!")};Ge.exports=function(ft,wt){if(typeof ft!="string"||ft.length===0)throw new Ce("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof wt!="boolean")throw new Ce('"allowMissing" argument must be a boolean');if(We(/^%?[^%]*%?$/,ft)===null)throw new me("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Je=Ke(ft),nt=Je.length>0?Je[0]:"",xt=ot("%"+nt+"%",wt),Pt=xt.name,Ct=xt.value,gt=!1,dt=xt.alias;dt&&(nt=dt[0],Ne(Je,Fe([0,1],dt)));for(var ht=1,Et=!0;ht<Je.length;ht+=1){var St=Je[ht],Ft=Re(St,0,1),mt=Re(St,-1);if((Ft==='"'||Ft==="'"||Ft==="`"||mt==='"'||mt==="'"||mt==="`")&&Ft!==mt)throw new me("property names with quotes must have matching quotes");if((St==="constructor"||!Et)&&(gt=!0),nt+="."+St,Pt="%"+nt+"%",Be(le,Pt))Ct=le[Pt];else if(Ct!=null){if(!(St in Ct)){if(!wt)throw new Ce("base intrinsic for "+ft+" exists, but the property is not available.");return}if(Me&&ht+1>=Je.length){var yt=Me(Ct,St);Et=!!yt,Et&&"get"in yt&&!("originalValue"in yt.get)?Ct=yt.get:Ct=Ct[St]}else Et=Be(Ct,St),Ct=Ct[St];Et&&!gt&&(le[Pt]=Ct)}}return Ct}},{"function-bind":347,has:354,"has-proto":350,"has-symbols":351}],349:[function(oe,Ge,De){"use strict";var fe=oe("get-intrinsic"),me=fe("%Object.getOwnPropertyDescriptor%",!0);if(me)try{me([],"length")}catch(ke){me=null}Ge.exports=me},{"get-intrinsic":348}],350:[function(oe,Ge,De){"use strict";var fe={foo:{}},me=Object;Ge.exports=function(){return{__proto__:fe}.foo===fe.foo&&!({__proto__:null}instanceof me)}},{}],351:[function(oe,Ge,De){"use strict";var fe=typeof Symbol!="undefined"&&Symbol,me=oe("./shams");Ge.exports=function(){return typeof fe!="function"||typeof Symbol!="function"||typeof fe("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:me()}},{"./shams":352}],352:[function(oe,Ge,De){"use strict";Ge.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var me={},ke=Symbol("test"),Ce=Object(ke);if(typeof ke=="string"||Object.prototype.toString.call(ke)!=="[object Symbol]"||Object.prototype.toString.call(Ce)!=="[object Symbol]")return!1;var Se=42;me[ke]=Se;for(ke in me)return!1;if(typeof Object.keys=="function"&&Object.keys(me).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(me).length!==0)return!1;var Me=Object.getOwnPropertySymbols(me);if(Me.length!==1||Me[0]!==ke||!Object.prototype.propertyIsEnumerable.call(me,ke))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var ve=Object.getOwnPropertyDescriptor(me,ke);if(ve.value!==Se||ve.enumerable!==!0)return!1}return!0}},{}],353:[function(oe,Ge,De){"use strict";var fe=oe("has-symbols/shams");Ge.exports=function(){return fe()&&!!Symbol.toStringTag}},{"has-symbols/shams":352}],354:[function(oe,Ge,De){"use strict";var fe=oe("function-bind");Ge.exports=fe.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":347}],355:[function(oe,Ge,De){var fe=oe("http"),me=oe("url"),ke=Ge.exports;for(var Ce in fe)fe.hasOwnProperty(Ce)&&(ke[Ce]=fe[Ce]);ke.request=function(Me,ve){return Me=Se(Me),fe.request.call(this,Me,ve)},ke.get=function(Me,ve){return Me=Se(Me),fe.get.call(this,Me,ve)};function Se(Me){if(typeof Me=="string"&&(Me=me.parse(Me)),Me.protocol||(Me.protocol="https:"),Me.protocol!=="https:")throw new Error('Protocol "'+Me.protocol+'" not supported. Expected "https:"');return Me}},{http:468,url:472}],356:[function(oe,Ge,De){"use strict";var fe=oe("util"),me=oe("ms");Ge.exports=function(ke){if(typeof ke=="number")return ke;var Ce=me(ke);if(Ce===void 0){var Se=new Error(fe.format("humanize-ms(%j) result undefined",ke));console.warn(Se.stack)}return Ce}},{ms:376,util:419}],357:[function(oe,Ge,De){De.read=function(fe,me,ke,Ce,Se){var Me,ve,we=Se*8-Ce-1,de=(1<<we)-1,z=de>>1,ee=-7,ae=ke?Se-1:0,ie=ke?-1:1,le=fe[me+ae];for(ae+=ie,Me=le&(1<<-ee)-1,le>>=-ee,ee+=we;ee>0;Me=Me*256+fe[me+ae],ae+=ie,ee-=8);for(ve=Me&(1<<-ee)-1,Me>>=-ee,ee+=Ce;ee>0;ve=ve*256+fe[me+ae],ae+=ie,ee-=8);if(Me===0)Me=1-z;else{if(Me===de)return ve?NaN:(le?-1:1)*(1/0);ve=ve+Math.pow(2,Ce),Me=Me-z}return(le?-1:1)*ve*Math.pow(2,Me-Ce)},De.write=function(fe,me,ke,Ce,Se,Me){var ve,we,de,z=Me*8-Se-1,ee=(1<<z)-1,ae=ee>>1,ie=Se===23?Math.pow(2,-24)-Math.pow(2,-77):0,le=Ce?0:Me-1,ue=Ce?1:-1,ge=me<0||me===0&&1/me<0?1:0;for(me=Math.abs(me),isNaN(me)||me===1/0?(we=isNaN(me)?1:0,ve=ee):(ve=Math.floor(Math.log(me)/Math.LN2),me*(de=Math.pow(2,-ve))<1&&(ve--,de*=2),ve+ae>=1?me+=ie/de:me+=ie*Math.pow(2,1-ae),me*de>=2&&(ve++,de/=2),ve+ae>=ee?(we=0,ve=ee):ve+ae>=1?(we=(me*de-1)*Math.pow(2,Se),ve=ve+ae):(we=me*Math.pow(2,ae-1)*Math.pow(2,Se),ve=0));Se>=8;fe[ke+le]=we&255,le+=ue,we/=256,Se-=8);for(ve=ve<<Se|we,z+=Se;z>0;fe[ke+le]=ve&255,le+=ue,ve/=256,z-=8);fe[ke+le-ue]|=ge*128}},{}],358:[function(oe,Ge,De){"use strict";var fe=[oe("./nextTick"),oe("./queueMicrotask"),oe("./mutation.js"),oe("./messageChannel"),oe("./stateChange"),oe("./timeout")],me,ke,Ce=-1,Se=[],Me=!1;function ve(){!me||!ke||(me=!1,ke.length?Se=ke.concat(Se):Ce=-1,Se.length&&we())}function we(){if(!me){Me=!1,me=!0;for(var le=Se.length,ue=setTimeout(ve);le;){for(ke=Se,Se=[];ke&&++Ce<le;)ke[Ce].run();Ce=-1,le=Se.length}ke=null,Ce=-1,me=!1,clearTimeout(ue)}}for(var de,z=-1,ee=fe.length;++z<ee;)if(fe[z]&&fe[z].test&&fe[z].test()){de=fe[z].install(we);break}function ae(le,ue){this.fun=le,this.array=ue}ae.prototype.run=function(){var le=this.fun,ue=this.array;switch(ue.length){case 0:return le();case 1:return le(ue[0]);case 2:return le(ue[0],ue[1]);case 3:return le(ue[0],ue[1],ue[2]);default:return le.apply(null,ue)}},Ge.exports=ie;function ie(le){var ue=new Array(arguments.length-1);if(arguments.length>1)for(var ge=1;ge<arguments.length;ge++)ue[ge-1]=arguments[ge];Se.push(new ae(le,ue)),!Me&&!me&&(Me=!0,de())}},{"./messageChannel":359,"./mutation.js":360,"./nextTick":89,"./queueMicrotask":361,"./stateChange":362,"./timeout":363}],359:[function(oe,Ge,De){(function(fe){(function(){"use strict";De.test=function(){return fe.setImmediate?!1:typeof fe.MessageChannel!="undefined"},De.install=function(me){var ke=new fe.MessageChannel;return ke.port1.onmessage=me,function(){ke.port2.postMessage(0)}}}).call(this)}).call(this,typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],360:[function(oe,Ge,De){(function(fe){(function(){"use strict";var me=fe.MutationObserver||fe.WebKitMutationObserver;De.test=function(){return me},De.install=function(ke){var Ce=0,Se=new me(ke),Me=fe.document.createTextNode("");return Se.observe(Me,{characterData:!0}),function(){Me.data=Ce=++Ce%2}}}).call(this)}).call(this,typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],361:[function(oe,Ge,De){(function(fe){(function(){"use strict";De.test=function(){return typeof fe.queueMicrotask=="function"},De.install=function(me){return function(){fe.queueMicrotask(me)}}}).call(this)}).call(this,typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],362:[function(oe,Ge,De){(function(fe){(function(){"use strict";De.test=function(){return"document"in fe&&"onreadystatechange"in fe.document.createElement("script")},De.install=function(me){return function(){var ke=fe.document.createElement("script");return ke.onreadystatechange=function(){me(),ke.onreadystatechange=null,ke.parentNode.removeChild(ke),ke=null},fe.document.documentElement.appendChild(ke),me}}}).call(this)}).call(this,typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],363:[function(oe,Ge,De){"use strict";De.test=function(){return!0},De.install=function(fe){return function(){setTimeout(fe,0)}}},{}],364:[function(oe,Ge,De){typeof Object.create=="function"?Ge.exports=function(me,ke){ke&&(me.super_=ke,me.prototype=Object.create(ke.prototype,{constructor:{value:me,enumerable:!1,writable:!0,configurable:!0}}))}:Ge.exports=function(me,ke){if(ke){me.super_=ke;var Ce=function(){};Ce.prototype=ke.prototype,me.prototype=new Ce,me.prototype.constructor=me}}},{}],365:[function(oe,Ge,De){"use strict";var fe=oe("has-tostringtag/shams")(),me=oe("call-bind/callBound"),ke=me("Object.prototype.toString"),Ce=function(we){return fe&&we&&typeof we=="object"&&Symbol.toStringTag in we?!1:ke(we)==="[object Arguments]"},Se=function(we){return Ce(we)?!0:we!==null&&typeof we=="object"&&typeof we.length=="number"&&we.length>=0&&ke(we)!=="[object Array]"&&ke(we.callee)==="[object Function]"},Me=function(){return Ce(arguments)}();Ce.isLegacyArguments=Se,Ge.exports=Me?Ce:Se},{"call-bind/callBound":92,"has-tostringtag/shams":353}],366:[function(oe,Ge,De){Ge.exports=function(ke){return ke!=null&&(fe(ke)||me(ke)||!!ke._isBuffer)};function fe(ke){return!!ke.constructor&&typeof ke.constructor.isBuffer=="function"&&ke.constructor.isBuffer(ke)}function me(ke){return typeof ke.readFloatLE=="function"&&typeof ke.slice=="function"&&fe(ke.slice(0,0))}},{}],367:[function(oe,Ge,De){"use strict";var fe=Function.prototype.toString,me=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,ke,Ce;if(typeof me=="function"&&typeof Object.defineProperty=="function")try{ke=Object.defineProperty({},"length",{get:function(){throw Ce}}),Ce={},me(function(){throw 42},null,ke)}catch(Be){Be!==Ce&&(me=null)}else me=null;var Se=/^\s*class\b/,Me=function(Fe){try{var Ne=fe.call(Fe);return Se.test(Ne)}catch(Ae){return!1}},ve=function(Fe){try{return Me(Fe)?!1:(fe.call(Fe),!0)}catch(Ne){return!1}},we=Object.prototype.toString,de="[object Object]",z="[object Function]",ee="[object GeneratorFunction]",ae="[object HTMLAllCollection]",ie="[object HTML document.all class]",le="[object HTMLCollection]",ue=typeof Symbol=="function"&&!!Symbol.toStringTag,ge=!(0 in[,]),Pe=function(){return!1};if(typeof document=="object"){var je=document.all;we.call(je)===we.call(document.all)&&(Pe=function(Fe){if((ge||!Fe)&&(typeof Fe=="undefined"||typeof Fe=="object"))try{var Ne=we.call(Fe);return(Ne===ae||Ne===ie||Ne===le||Ne===de)&&Fe("")==null}catch(Ae){}return!1})}Ge.exports=me?function(Fe){if(Pe(Fe))return!0;if(!Fe||typeof Fe!="function"&&typeof Fe!="object")return!1;try{me(Fe,null,ke)}catch(Ne){if(Ne!==Ce)return!1}return!Me(Fe)&&ve(Fe)}:function(Fe){if(Pe(Fe))return!0;if(!Fe||typeof Fe!="function"&&typeof Fe!="object")return!1;if(ue)return ve(Fe);if(Me(Fe))return!1;var Ne=we.call(Fe);return Ne!==z&&Ne!==ee&&!/^\[object HTML/.test(Ne)?!1:ve(Fe)}},{}],368:[function(oe,Ge,De){"use strict";var fe=Object.prototype.toString,me=Function.prototype.toString,ke=/^\s*(?:function)?\*/,Ce=oe("has-tostringtag/shams")(),Se=Object.getPrototypeOf,Me=function(){if(!Ce)return!1;try{return Function("return function*() {}")()}catch(we){}},ve;Ge.exports=function(de){if(typeof de!="function")return!1;if(ke.test(me.call(de)))return!0;if(!Ce){var z=fe.call(de);return z==="[object GeneratorFunction]"}if(!Se)return!1;if(typeof ve=="undefined"){var ee=Me();ve=ee?Se(ee):!1}return Se(de)===ve}},{"has-tostringtag/shams":353}],369:[function(oe,Ge,De){"use strict";var fe=oe("which-typed-array");Ge.exports=function(ke){return!!fe(ke)}},{"which-typed-array":420}],370:[function(oe,Ge,De){var fe={}.toString;Ge.exports=Array.isArray||function(me){return fe.call(me)=="[object Array]"}},{}],371:[function(oe,Ge,De){(function(fe){(function(){(function(me,ke){typeof De=="object"&&typeof Ge!="undefined"?Ge.exports=ke(me):typeof st=="function"&&st.amd?st(ke):ke(me)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof fe!="undefined"?fe:this,function(me){"use strict";me=me||{};var ke=me.Base64,Ce="2.6.4",Se="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Me=function(ft){for(var wt={},Je=0,nt=ft.length;Je<nt;Je++)wt[ft.charAt(Je)]=Je;return wt}(Se),ve=String.fromCharCode,we=function(ft){if(ft.length<2){var wt=ft.charCodeAt(0);return wt<128?ft:wt<2048?ve(192|wt>>>6)+ve(128|wt&63):ve(224|wt>>>12&15)+ve(128|wt>>>6&63)+ve(128|wt&63)}else{var wt=65536+(ft.charCodeAt(0)-55296)*1024+(ft.charCodeAt(1)-56320);return ve(240|wt>>>18&7)+ve(128|wt>>>12&63)+ve(128|wt>>>6&63)+ve(128|wt&63)}},de=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,z=function(ft){return ft.replace(de,we)},ee=function(ft){var wt=[0,2,1][ft.length%3],Je=ft.charCodeAt(0)<<16|(ft.length>1?ft.charCodeAt(1):0)<<8|(ft.length>2?ft.charCodeAt(2):0),nt=[Se.charAt(Je>>>18),Se.charAt(Je>>>12&63),wt>=2?"=":Se.charAt(Je>>>6&63),wt>=1?"=":Se.charAt(Je&63)];return nt.join("")},ae=me.btoa&&typeof me.btoa=="function"?function(ft){return me.btoa(ft)}:function(ft){if(ft.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return ft.replace(/[\s\S]{1,3}/g,ee)},ie=function(ft){return ae(z(String(ft)))},le=function(ft){return ft.replace(/[+\/]/g,function(wt){return wt=="+"?"-":"_"}).replace(/=/g,"")},ue=function(ft,wt){return wt?le(ie(ft)):ie(ft)},ge=function(ft){return ue(ft,!0)},Pe;me.Uint8Array&&(Pe=function(ft,wt){for(var Je="",nt=0,xt=ft.length;nt<xt;nt+=3){var Pt=ft[nt],Ct=ft[nt+1],gt=ft[nt+2],dt=Pt<<16|Ct<<8|gt;Je+=Se.charAt(dt>>>18)+Se.charAt(dt>>>12&63)+(typeof Ct!="undefined"?Se.charAt(dt>>>6&63):"=")+(typeof gt!="undefined"?Se.charAt(dt&63):"=")}return wt?le(Je):Je});var je=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Be=function(ft){switch(ft.length){case 4:var wt=(7&ft.charCodeAt(0))<<18|(63&ft.charCodeAt(1))<<12|(63&ft.charCodeAt(2))<<6|63&ft.charCodeAt(3),Je=wt-65536;return ve((Je>>>10)+55296)+ve((Je&1023)+56320);case 3:return ve((15&ft.charCodeAt(0))<<12|(63&ft.charCodeAt(1))<<6|63&ft.charCodeAt(2));default:return ve((31&ft.charCodeAt(0))<<6|63&ft.charCodeAt(1))}},Fe=function(ft){return ft.replace(je,Be)},Ne=function(ft){var wt=ft.length,Je=wt%4,nt=(wt>0?Me[ft.charAt(0)]<<18:0)|(wt>1?Me[ft.charAt(1)]<<12:0)|(wt>2?Me[ft.charAt(2)]<<6:0)|(wt>3?Me[ft.charAt(3)]:0),xt=[ve(nt>>>16),ve(nt>>>8&255),ve(nt&255)];return xt.length-=[0,0,2,1][Je],xt.join("")},Ae=me.atob&&typeof me.atob=="function"?function(ft){return me.atob(ft)}:function(ft){return ft.replace(/\S{1,4}/g,Ne)},Re=function(ft){return Ae(String(ft).replace(/[^A-Za-z0-9\+\/]/g,""))},We=function(ft){return Fe(Ae(ft))},Ye=function(ft){return String(ft).replace(/[-_]/g,function(wt){return wt=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ue=function(ft){return We(Ye(ft))},Ke;me.Uint8Array&&(Ke=function(ft){return Uint8Array.from(Re(Ye(ft)),function(wt){return wt.charCodeAt(0)})});var ot=function(){var ft=me.Base64;return me.Base64=ke,ft};if(me.Base64={VERSION:Ce,atob:Re,btoa:ae,fromBase64:Ue,toBase64:ue,utob:z,encode:ue,encodeURI:ge,btou:Fe,decode:Ue,noConflict:ot,fromUint8Array:Pe,toUint8Array:Ke},typeof Object.defineProperty=="function"){var ut=function(ft){return{value:ft,enumerable:!1,writable:!0,configurable:!0}};me.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",ut(function(){return Ue(this)})),Object.defineProperty(String.prototype,"toBase64",ut(function(ft){return ue(this,ft)})),Object.defineProperty(String.prototype,"toBase64URI",ut(function(){return ue(this,!0)}))}}return me.Meteor&&(Base64=me.Base64),typeof Ge!="undefined"&&Ge.exports?Ge.exports.Base64=me.Base64:typeof st=="function"&&st.amd&&st([],function(){return me.Base64}),{Base64:me.Base64}})}).call(this)}).call(this,typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],372:[function(oe,Ge,De){"use strict";Ge.exports=me;var fe=Object.prototype.hasOwnProperty;function me(ke,Ce,Se){if(!ke)throw new TypeError("argument dest is required");if(!Ce)throw new TypeError("argument src is required");return Se===void 0&&(Se=!0),Object.getOwnPropertyNames(Ce).forEach(function(ve){if(!(!Se&&fe.call(ke,ve))){var we=Object.getOwnPropertyDescriptor(Ce,ve);Object.defineProperty(ke,ve,we)}}),ke}},{}],373:[function(oe,Ge,De){"use strict";oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.regexp.constructor.js"),oe("core-js/modules/es.regexp.to-string.js");function fe(){this._types=Object.create(null),this._extensions=Object.create(null);for(var me=0;me<arguments.length;me++)this.define(arguments[me]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}fe.prototype.define=function(me,ke){for(var Ce in me){var Se=me[Ce].map(function(de){return de.toLowerCase()});Ce=Ce.toLowerCase();for(var Me=0;Me<Se.length;Me++){var ve=Se[Me];if(ve[0]!=="*"){if(!ke&&ve in this._types)throw new Error('Attempt to change mapping for "'+ve+'" extension from "'+this._types[ve]+'" to "'+Ce+'". Pass `force=true` to allow this, otherwise remove "'+ve+'" from the list of extensions for "'+Ce+'".');this._types[ve]=Ce}}if(ke||!this._extensions[Ce]){var we=Se[0];this._extensions[Ce]=we[0]!=="*"?we:we.substr(1)}}},fe.prototype.getType=function(me){me=String(me);var ke=me.replace(/^.*[/\\]/,"").toLowerCase(),Ce=ke.replace(/^.*\./,"").toLowerCase(),Se=ke.length<me.length,Me=Ce.length<ke.length-1;return(Me||!Se)&&this._types[Ce]||null},fe.prototype.getExtension=function(me){return me=/^\s*([^;\s]*)/.test(me)&&RegExp.$1,me&&this._extensions[me.toLowerCase()]||null},Ge.exports=fe},{"core-js/modules/es.array.map.js":280,"core-js/modules/es.regexp.constructor.js":299,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305}],374:[function(oe,Ge,De){"use strict";var fe=oe("./Mime");Ge.exports=new fe(oe("./types/standard"))},{"./Mime":373,"./types/standard":375}],375:[function(oe,Ge,De){"use strict";Ge.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}],376:[function(oe,Ge,De){var fe=1e3,me=fe*60,ke=me*60,Ce=ke*24,Se=Ce*7,Me=Ce*365.25;Ge.exports=function(ee,ae){ae=ae||{};var ie=typeof ee;if(ie==="string"&&ee.length>0)return ve(ee);if(ie==="number"&&isFinite(ee))return ae.long?de(ee):we(ee);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(ee))};function ve(ee){if(ee=String(ee),!(ee.length>100)){var ae=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(ee);if(ae){var ie=parseFloat(ae[1]),le=(ae[2]||"ms").toLowerCase();switch(le){case"years":case"year":case"yrs":case"yr":case"y":return ie*Me;case"weeks":case"week":case"w":return ie*Se;case"days":case"day":case"d":return ie*Ce;case"hours":case"hour":case"hrs":case"hr":case"h":return ie*ke;case"minutes":case"minute":case"mins":case"min":case"m":return ie*me;case"seconds":case"second":case"secs":case"sec":case"s":return ie*fe;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return ie;default:return}}}}function we(ee){var ae=Math.abs(ee);return ae>=Ce?Math.round(ee/Ce)+"d":ae>=ke?Math.round(ee/ke)+"h":ae>=me?Math.round(ee/me)+"m":ae>=fe?Math.round(ee/fe)+"s":ee+"ms"}function de(ee){var ae=Math.abs(ee);return ae>=Ce?z(ee,ae,Ce,"day"):ae>=ke?z(ee,ae,ke,"hour"):ae>=me?z(ee,ae,me,"minute"):ae>=fe?z(ee,ae,fe,"second"):ee+" ms"}function z(ee,ae,ie,le){var ue=ae>=ie*1.5;return Math.round(ee/ie)+" "+le+(ue?"s":"")}},{}],377:[function(oe,Ge,De){"use strict";var fe=Object.getOwnPropertySymbols,me=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable;function Ce(Me){if(Me==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(Me)}function Se(){try{if(!Object.assign)return!1;var Me=new String("abc");if(Me[5]="de",Object.getOwnPropertyNames(Me)[0]==="5")return!1;for(var ve={},we=0;we<10;we++)ve["_"+String.fromCharCode(we)]=we;var de=Object.getOwnPropertyNames(ve).map(function(ee){return ve[ee]});if(de.join("")!=="0123456789")return!1;var z={};return"abcdefghijklmnopqrst".split("").forEach(function(ee){z[ee]=ee}),Object.keys(Object.assign({},z)).join("")==="abcdefghijklmnopqrst"}catch(ee){return!1}}Ge.exports=Se()?Object.assign:function(Me,ve){for(var we,de=Ce(Me),z,ee=1;ee<arguments.length;ee++){we=Object(arguments[ee]);for(var ae in we)me.call(we,ae)&&(de[ae]=we[ae]);if(fe){z=fe(we);for(var ie=0;ie<z.length;ie++)ke.call(we,z[ie])&&(de[z[ie]]=we[z[ie]])}}return de}},{}],378:[function(oe,Ge,De){(function(fe){(function(){"use strict";function me(Me){if(typeof Me!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(Me))}function ke(Me,ve){for(var we="",de=0,z=-1,ee=0,ae,ie=0;ie<=Me.length;++ie){if(ie<Me.length)ae=Me.charCodeAt(ie);else{if(ae===47)break;ae=47}if(ae===47){if(!(z===ie-1||ee===1))if(z!==ie-1&&ee===2){if(we.length<2||de!==2||we.charCodeAt(we.length-1)!==46||we.charCodeAt(we.length-2)!==46){if(we.length>2){var le=we.lastIndexOf("/");if(le!==we.length-1){le===-1?(we="",de=0):(we=we.slice(0,le),de=we.length-1-we.lastIndexOf("/")),z=ie,ee=0;continue}}else if(we.length===2||we.length===1){we="",de=0,z=ie,ee=0;continue}}ve&&(we.length>0?we+="/..":we="..",de=2)}else we.length>0?we+="/"+Me.slice(z+1,ie):we=Me.slice(z+1,ie),de=ie-z-1;z=ie,ee=0}else ae===46&&ee!==-1?++ee:ee=-1}return we}function Ce(Me,ve){var we=ve.dir||ve.root,de=ve.base||(ve.name||"")+(ve.ext||"");return we?we===ve.root?we+de:we+Me+de:de}var Se={resolve:function(){for(var ve="",we=!1,de,z=arguments.length-1;z>=-1&&!we;z--){var ee;z>=0?ee=arguments[z]:(de===void 0&&(de=fe.cwd()),ee=de),me(ee),ee.length!==0&&(ve=ee+"/"+ve,we=ee.charCodeAt(0)===47)}return ve=ke(ve,!we),we?ve.length>0?"/"+ve:"/":ve.length>0?ve:"."},normalize:function(ve){if(me(ve),ve.length===0)return".";var we=ve.charCodeAt(0)===47,de=ve.charCodeAt(ve.length-1)===47;return ve=ke(ve,!we),ve.length===0&&!we&&(ve="."),ve.length>0&&de&&(ve+="/"),we?"/"+ve:ve},isAbsolute:function(ve){return me(ve),ve.length>0&&ve.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var ve,we=0;we<arguments.length;++we){var de=arguments[we];me(de),de.length>0&&(ve===void 0?ve=de:ve+="/"+de)}return ve===void 0?".":Se.normalize(ve)},relative:function(ve,we){if(me(ve),me(we),ve===we||(ve=Se.resolve(ve),we=Se.resolve(we),ve===we))return"";for(var de=1;de<ve.length&&ve.charCodeAt(de)===47;++de);for(var z=ve.length,ee=z-de,ae=1;ae<we.length&&we.charCodeAt(ae)===47;++ae);for(var ie=we.length,le=ie-ae,ue=ee<le?ee:le,ge=-1,Pe=0;Pe<=ue;++Pe){if(Pe===ue){if(le>ue){if(we.charCodeAt(ae+Pe)===47)return we.slice(ae+Pe+1);if(Pe===0)return we.slice(ae+Pe)}else ee>ue&&(ve.charCodeAt(de+Pe)===47?ge=Pe:Pe===0&&(ge=0));break}var je=ve.charCodeAt(de+Pe),Be=we.charCodeAt(ae+Pe);if(je!==Be)break;je===47&&(ge=Pe)}var Fe="";for(Pe=de+ge+1;Pe<=z;++Pe)(Pe===z||ve.charCodeAt(Pe)===47)&&(Fe.length===0?Fe+="..":Fe+="/..");return Fe.length>0?Fe+we.slice(ae+ge):(ae+=ge,we.charCodeAt(ae)===47&&++ae,we.slice(ae))},_makeLong:function(ve){return ve},dirname:function(ve){if(me(ve),ve.length===0)return".";for(var we=ve.charCodeAt(0),de=we===47,z=-1,ee=!0,ae=ve.length-1;ae>=1;--ae)if(we=ve.charCodeAt(ae),we===47){if(!ee){z=ae;break}}else ee=!1;return z===-1?de?"/":".":de&&z===1?"//":ve.slice(0,z)},basename:function(ve,we){if(we!==void 0&&typeof we!="string")throw new TypeError('"ext" argument must be a string');me(ve);var de=0,z=-1,ee=!0,ae;if(we!==void 0&&we.length>0&&we.length<=ve.length){if(we.length===ve.length&&we===ve)return"";var ie=we.length-1,le=-1;for(ae=ve.length-1;ae>=0;--ae){var ue=ve.charCodeAt(ae);if(ue===47){if(!ee){de=ae+1;break}}else le===-1&&(ee=!1,le=ae+1),ie>=0&&(ue===we.charCodeAt(ie)?--ie===-1&&(z=ae):(ie=-1,z=le))}return de===z?z=le:z===-1&&(z=ve.length),ve.slice(de,z)}else{for(ae=ve.length-1;ae>=0;--ae)if(ve.charCodeAt(ae)===47){if(!ee){de=ae+1;break}}else z===-1&&(ee=!1,z=ae+1);return z===-1?"":ve.slice(de,z)}},extname:function(ve){me(ve);for(var we=-1,de=0,z=-1,ee=!0,ae=0,ie=ve.length-1;ie>=0;--ie){var le=ve.charCodeAt(ie);if(le===47){if(!ee){de=ie+1;break}continue}z===-1&&(ee=!1,z=ie+1),le===46?we===-1?we=ie:ae!==1&&(ae=1):we!==-1&&(ae=-1)}return we===-1||z===-1||ae===0||ae===1&&we===z-1&&we===de+1?"":ve.slice(we,z)},format:function(ve){if(ve===null||typeof ve!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof ve);return Ce("/",ve)},parse:function(ve){me(ve);var we={root:"",dir:"",base:"",ext:"",name:""};if(ve.length===0)return we;var de=ve.charCodeAt(0),z=de===47,ee;z?(we.root="/",ee=1):ee=0;for(var ae=-1,ie=0,le=-1,ue=!0,ge=ve.length-1,Pe=0;ge>=ee;--ge){if(de=ve.charCodeAt(ge),de===47){if(!ue){ie=ge+1;break}continue}le===-1&&(ue=!1,le=ge+1),de===46?ae===-1?ae=ge:Pe!==1&&(Pe=1):ae!==-1&&(Pe=-1)}return ae===-1||le===-1||Pe===0||Pe===1&&ae===le-1&&ae===ie+1?le!==-1&&(ie===0&&z?we.base=we.name=ve.slice(1,le):we.base=we.name=ve.slice(ie,le)):(ie===0&&z?(we.name=ve.slice(1,ae),we.base=ve.slice(1,le)):(we.name=ve.slice(ie,ae),we.base=ve.slice(ie,le)),we.ext=ve.slice(ae,le)),ie>0?we.dir=ve.slice(0,ie-1):z&&(we.dir="/"),we},sep:"/",delimiter:":",win32:null,posix:null};Se.posix=Se,Ge.exports=Se}).call(this)}).call(this,oe("_process"))},{_process:467}],379:[function(oe,Ge,De){(function(fe){(function(){(function(){"use strict";var me={function:!0,object:!0},ke=me[typeof window]&&window||this,Ce=ke,Se=me[typeof De]&&De,Me=me[typeof Ge]&&Ge&&!Ge.nodeType&&Ge,ve=Se&&Me&&typeof fe=="object"&&fe;ve&&(ve.global===ve||ve.window===ve||ve.self===ve)&&(ke=ve);var we=Math.pow(2,53)-1,de=/\bOpera/,z=this,ee=Object.prototype,ae=ee.hasOwnProperty,ie=ee.toString;function le(Ue){return Ue=String(Ue),Ue.charAt(0).toUpperCase()+Ue.slice(1)}function ue(Ue,Ke,ot){var ut={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return Ke&&ot&&/^Win/i.test(Ue)&&!/^Windows Phone /i.test(Ue)&&(ut=ut[/[\d.]+$/.exec(Ue)])&&(Ue="Windows "+ut),Ue=String(Ue),Ke&&ot&&(Ue=Ue.replace(RegExp(Ke,"i"),ot)),Ue=Pe(Ue.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]),Ue}function ge(Ue,Ke){var ot=-1,ut=Ue?Ue.length:0;if(typeof ut=="number"&&ut>-1&&ut<=we)for(;++ot<ut;)Ke(Ue[ot],ot,Ue);else je(Ue,Ke)}function Pe(Ue){return Ue=Re(Ue),/^(?:webOS|i(?:OS|P))/.test(Ue)?Ue:le(Ue)}function je(Ue,Ke){for(var ot in Ue)ae.call(Ue,ot)&&Ke(Ue[ot],ot,Ue)}function Be(Ue){return Ue==null?le(Ue):ie.call(Ue).slice(8,-1)}function Fe(Ue,Ke){var ot=Ue!=null?typeof Ue[Ke]:"number";return!/^(?:boolean|number|string|undefined)$/.test(ot)&&(ot=="object"?!!Ue[Ke]:!0)}function Ne(Ue){return String(Ue).replace(/([ -])(?!$)/g,"$1?")}function Ae(Ue,Ke){var ot=null;return ge(Ue,function(ut,ft){ot=Ke(ot,ut,ft,Ue)}),ot}function Re(Ue){return String(Ue).replace(/^ +| +$/g,"")}function We(Ue){var Ke=ke,ot=Ue&&typeof Ue=="object"&&Be(Ue)!="String";ot&&(Ke=Ue,Ue=null);var ut=Ke.navigator||{},ft=ut.userAgent||"";Ue||(Ue=ft);var wt=ot||z==Ce,Je=ot?!!ut.likeChrome:/\bChrome\b/.test(Ue)&&!/internal|\n/i.test(ie.toString()),nt="Object",xt=ot?nt:"ScriptBridgingProxyObject",Pt=ot?nt:"Environment",Ct=ot&&Ke.java?"JavaPackage":Be(Ke.java),gt=ot?nt:"RuntimeObject",dt=/\bJava/.test(Ct)&&Ke.java,ht=dt&&Be(Ke.environment)==Pt,Et=dt?"a":"\u03B1",St=dt?"b":"\u03B2",Ft=Ke.document||{},mt=Ke.operamini||Ke.opera,yt=de.test(yt=ot&&mt?mt["[[Class]]"]:Be(mt))?yt:mt=null,tt,Ve=Ue,xe=[],Le=null,Xe=Ue==ft,rt=Xe&&mt&&typeof mt.version=="function"&&mt.version(),Ie,_e=At([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),He=It(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"(?:Edge|Edg|EdgA|EdgiOS)"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Vivaldi","Waterfox","WebPositive",{label:"Yandex Browser",pattern:"YaBrowser"},{label:"UC Browser",pattern:"UCBrowser"},"Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chromium","Chrome",{label:"Chrome",pattern:"(?:HeadlessChrome)"},{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),Qe=Xt([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),ct=Lt({Apple:{iPad:1,iPhone:1,iPod:1},Alcatel:{},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},Huawei:{},Lenovo:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Oppo:{},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1},Xiaomi:{Mi:1,Redmi:1}}),at=Kt(["Windows Phone","KaiOS","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian",{label:"DragonFly BSD",pattern:"DragonFly"},"Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function At(tn){return Ae(tn,function(Wt,En){return Wt||RegExp("\\b"+(En.pattern||Ne(En))+"\\b","i").exec(Ue)&&(En.label||En)})}function Lt(tn){return Ae(tn,function(Wt,En,Pn){return Wt||(En[Qe]||En[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Qe)]||RegExp("\\b"+Ne(Pn)+"(?:\\b|\\w*\\d)","i").exec(Ue))&&Pn})}function It(tn){return Ae(tn,function(Wt,En){return Wt||RegExp("\\b"+(En.pattern||Ne(En))+"\\b","i").exec(Ue)&&(En.label||En)})}function Kt(tn){return Ae(tn,function(Wt,En){var Pn=En.pattern||Ne(En);return!Wt&&(Wt=RegExp("\\b"+Pn+"(?:/[\\d.]+|[ \\w.]*)","i").exec(Ue))&&(Wt=ue(Wt,Pn,En.label||En)),Wt})}function Xt(tn){return Ae(tn,function(Wt,En){var Pn=En.pattern||Ne(En);return!Wt&&(Wt=RegExp("\\b"+Pn+" *\\d+[.\\w_]*","i").exec(Ue)||RegExp("\\b"+Pn+" *\\w+-[\\w]*","i").exec(Ue)||RegExp("\\b"+Pn+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(Ue))&&((Wt=String(En.label&&!RegExp(Pn,"i").test(En.label)?En.label:Wt).split("/"))[1]&&!/[\d.]+/.test(Wt[0])&&(Wt[0]+=" "+Wt[1]),En=En.label||En,Wt=Pe(Wt[0].replace(RegExp(Pn,"i"),En).replace(RegExp("; *(?:"+En+"[_-])?","i")," ").replace(RegExp("("+En+")[-_.]?(\\w)","i"),"$1 $2"))),Wt})}function $t(tn){return Ae(tn,function(Wt,En){return Wt||(RegExp(En+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(Ue)||0)[1]||null})}function Ut(){return this.description||""}if(_e&&(_e=[_e]),/\bAndroid\b/.test(at)&&!Qe&&(tt=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(Ue))&&(Qe=Re(tt[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),ct&&!Qe?Qe=Xt([ct]):ct&&Qe&&(Qe=Qe.replace(RegExp("^("+Ne(ct)+")[-_.\\s]","i"),ct+" ").replace(RegExp("^("+Ne(ct)+")[-_.]?(\\w)","i"),ct+" $2")),(tt=/\bGoogle TV\b/.exec(Qe))&&(Qe=tt[0]),/\bSimulator\b/i.test(Ue)&&(Qe=(Qe?Qe+" ":"")+"Simulator"),He=="Opera Mini"&&/\bOPiOS\b/.test(Ue)&&xe.push("running in Turbo/Uncompressed mode"),He=="IE"&&/\blike iPhone OS\b/.test(Ue)?(tt=We(Ue.replace(/like iPhone OS/,"")),ct=tt.manufacturer,Qe=tt.product):/^iP/.test(Qe)?(He||(He="Safari"),at="iOS"+((tt=/ OS ([\d_]+)/i.exec(Ue))?" "+tt[1].replace(/_/g,"."):"")):He=="Konqueror"&&/^Linux\b/i.test(at)?at="Kubuntu":ct&&ct!="Google"&&(/Chrome/.test(He)&&!/\bMobile Safari\b/i.test(Ue)||/\bVita\b/.test(Qe))||/\bAndroid\b/.test(at)&&/^Chrome/.test(He)&&/\bVersion\//i.test(Ue)?(He="Android Browser",at=/\bAndroid\b/.test(at)?at:"Android"):He=="Silk"?(/\bMobi/i.test(Ue)||(at="Android",xe.unshift("desktop mode")),/Accelerated *= *true/i.test(Ue)&&xe.unshift("accelerated")):He=="UC Browser"&&/\bUCWEB\b/.test(Ue)?xe.push("speed mode"):He=="PaleMoon"&&(tt=/\bFirefox\/([\d.]+)\b/.exec(Ue))?xe.push("identifying as Firefox "+tt[1]):He=="Firefox"&&(tt=/\b(Mobile|Tablet|TV)\b/i.exec(Ue))?(at||(at="Firefox OS"),Qe||(Qe=tt[1])):!He||(tt=!/\bMinefield\b/i.test(Ue)&&/\b(?:Firefox|Safari)\b/.exec(He))?(He&&!Qe&&/[\/,]|^[^(]+?\)/.test(Ue.slice(Ue.indexOf(tt+"/")+8))&&(He=null),(tt=Qe||ct||at)&&(Qe||ct||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(at))&&(He=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(at)?at:tt)+" Browser")):He=="Electron"&&(tt=(/\bChrome\/([\d.]+)\b/.exec(Ue)||0)[1])&&xe.push("Chromium "+tt),rt||(rt=$t(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",Ne(He),"(?:Firefox|Minefield|NetFront)"])),(tt=_e=="iCab"&&parseFloat(rt)>3&&"WebKit"||/\bOpera\b/.test(He)&&(/\bOPR\b/.test(Ue)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(Ue)&&!/^(?:Trident|EdgeHTML)$/.test(_e)&&"WebKit"||!_e&&/\bMSIE\b/i.test(Ue)&&(at=="Mac OS"?"Tasman":"Trident")||_e=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(He)&&"NetFront")&&(_e=[tt]),He=="IE"&&(tt=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(Ue)||0)[1])?(He+=" Mobile",at="Windows Phone "+(/\+$/.test(tt)?tt:tt+".x"),xe.unshift("desktop mode")):/\bWPDesktop\b/i.test(Ue)?(He="IE Mobile",at="Windows Phone 8.x",xe.unshift("desktop mode"),rt||(rt=(/\brv:([\d.]+)/.exec(Ue)||0)[1])):He!="IE"&&_e=="Trident"&&(tt=/\brv:([\d.]+)/.exec(Ue))&&(He&&xe.push("identifying as "+He+(rt?" "+rt:"")),He="IE",rt=tt[1]),Xe){if(Fe(Ke,"global"))if(dt&&(tt=dt.lang.System,Ve=tt.getProperty("os.arch"),at=at||tt.getProperty("os.name")+" "+tt.getProperty("os.version")),ht){try{rt=Ke.require("ringo/engine").version.join("."),He="RingoJS"}catch(tn){(tt=Ke.system)&&tt.global.system==Ke.system&&(He="Narwhal",at||(at=tt[0].os||null))}He||(He="Rhino")}else typeof Ke.process=="object"&&!Ke.process.browser&&(tt=Ke.process)&&(typeof tt.versions=="object"&&(typeof tt.versions.electron=="string"?(xe.push("Node "+tt.versions.node),He="Electron",rt=tt.versions.electron):typeof tt.versions.nw=="string"&&(xe.push("Chromium "+rt,"Node "+tt.versions.node),He="NW.js",rt=tt.versions.nw)),He||(He="Node.js",Ve=tt.arch,at=tt.platform,rt=/[\d.]+/.exec(tt.version),rt=rt?rt[0]:null));else Be(tt=Ke.runtime)==xt?(He="Adobe AIR",at=tt.flash.system.Capabilities.os):Be(tt=Ke.phantom)==gt?(He="PhantomJS",rt=(tt=tt.version||null)&&tt.major+"."+tt.minor+"."+tt.patch):typeof Ft.documentMode=="number"&&(tt=/\bTrident\/(\d+)/i.exec(Ue))?(rt=[rt,Ft.documentMode],(tt=+tt[1]+4)!=rt[1]&&(xe.push("IE "+rt[1]+" mode"),_e&&(_e[1]=""),rt[1]=tt),rt=He=="IE"?String(rt[1].toFixed(1)):rt[0]):typeof Ft.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(He)&&(xe.push("masking as "+He+" "+rt),He="IE",rt="11.0",_e=["Trident"],at="Windows");at=at&&Pe(at)}if(rt&&(tt=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(rt)||/(?:alpha|beta)(?: ?\d)?/i.exec(Ue+";"+(Xe&&ut.appMinorVersion))||/\bMinefield\b/i.test(Ue)&&"a")&&(Le=/b/i.test(tt)?"beta":"alpha",rt=rt.replace(RegExp(tt+"\\+?$"),"")+(Le=="beta"?St:Et)+(/\d+\+?/.exec(tt)||"")),He=="Fennec"||He=="Firefox"&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(at))He="Firefox Mobile";else if(He=="Maxthon"&&rt)rt=rt.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Qe))Qe=="Xbox 360"&&(at=null),Qe=="Xbox 360"&&/\bIEMobile\b/.test(Ue)&&xe.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(He)||He&&!Qe&&!/Browser|Mobi/.test(He))&&(at=="Windows CE"||/Mobi/i.test(Ue)))He+=" Mobile";else if(He=="IE"&&Xe)try{Ke.external===null&&xe.unshift("platform preview")}catch(tn){xe.unshift("embedded")}else(/\bBlackBerry\b/.test(Qe)||/\bBB10\b/.test(Ue))&&(tt=(RegExp(Qe.replace(/ +/g," *")+"/([.\\d]+)","i").exec(Ue)||0)[1]||rt)?(tt=[tt,/BB10/.test(Ue)],at=(tt[1]?(Qe=null,ct="BlackBerry"):"Device Software")+" "+tt[0],rt=null):this!=je&&Qe!="Wii"&&(Xe&&mt||/Opera/.test(He)&&/\b(?:MSIE|Firefox)\b/i.test(Ue)||He=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(at)||He=="IE"&&(at&&!/^Win/.test(at)&&rt>5.5||/\bWindows XP\b/.test(at)&&rt>8||rt==8&&!/\bTrident\b/.test(Ue)))&&!de.test(tt=We.call(je,Ue.replace(de,"")+";"))&&tt.name&&(tt="ing as "+tt.name+((tt=tt.version)?" "+tt:""),de.test(He)?(/\bIE\b/.test(tt)&&at=="Mac OS"&&(at=null),tt="identify"+tt):(tt="mask"+tt,yt?He=Pe(yt.replace(/([a-z])([A-Z])/g,"$1 $2")):He="Opera",/\bIE\b/.test(tt)&&(at=null),Xe||(rt=null)),_e=["Presto"],xe.push(tt));(tt=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(Ue)||0)[1])&&(tt=[parseFloat(tt.replace(/\.(\d)$/,".0$1")),tt],He=="Safari"&&tt[1].slice(-1)=="+"?(He="WebKit Nightly",Le="alpha",rt=tt[1].slice(0,-1)):(rt==tt[1]||rt==(tt[2]=(/\bSafari\/([\d.]+\+?)/i.exec(Ue)||0)[1]))&&(rt=null),tt[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(Ue)||0)[1],tt[0]==537.36&&tt[2]==537.36&&parseFloat(tt[1])>=28&&_e=="WebKit"&&(_e=["Blink"]),!Xe||!Je&&!tt[1]?(_e&&(_e[1]="like Safari"),tt=(tt=tt[0],tt<400?1:tt<500?2:tt<526?3:tt<533?4:tt<534?"4+":tt<535?5:tt<537?6:tt<538?7:tt<601?8:tt<602?9:tt<604?10:tt<606?11:tt<608?12:"12")):(_e&&(_e[1]="like Chrome"),tt=tt[1]||(tt=tt[0],tt<530?1:tt<532?2:tt<532.05?3:tt<533?4:tt<534.03?5:tt<534.07?6:tt<534.1?7:tt<534.13?8:tt<534.16?9:tt<534.24?10:tt<534.3?11:tt<535.01?12:tt<535.02?"13+":tt<535.07?15:tt<535.11?16:tt<535.19?17:tt<536.05?18:tt<536.1?19:tt<537.01?20:tt<537.11?"21+":tt<537.13?23:tt<537.18?24:tt<537.24?25:tt<537.36?26:_e!="Blink"?"27":"28")),_e&&(_e[1]+=" "+(tt+=typeof tt=="number"?".x":/[.+]/.test(tt)?"":"+")),He=="Safari"&&(!rt||parseInt(rt)>45)?rt=tt:He=="Chrome"&&/\bHeadlessChrome/i.test(Ue)&&xe.unshift("headless")),He=="Opera"&&(tt=/\bzbov|zvav$/.exec(at))?(He+=" ",xe.unshift("desktop mode"),tt=="zvav"?(He+="Mini",rt=null):He+="Mobile",at=at.replace(RegExp(" *"+tt+"$"),"")):He=="Safari"&&/\bChrome\b/.exec(_e&&_e[1])?(xe.unshift("desktop mode"),He="Chrome Mobile",rt=null,/\bOS X\b/.test(at)?(ct="Apple",at="iOS 4.3+"):at=null):/\bSRWare Iron\b/.test(He)&&!rt&&(rt=$t("Chrome")),rt&&rt.indexOf(tt=/[\d.]+$/.exec(at))==0&&Ue.indexOf("/"+tt+"-")>-1&&(at=Re(at.replace(tt,""))),at&&at.indexOf(He)!=-1&&!RegExp(He+" OS").test(at)&&(at=at.replace(RegExp(" *"+Ne(He)+" *"),"")),_e&&!/\b(?:Avant|Nook)\b/.test(He)&&(/Browser|Lunascape|Maxthon/.test(He)||He!="Safari"&&/^iOS/.test(at)&&/\bSafari\b/.test(_e[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(He)&&_e[1])&&(tt=_e[_e.length-1])&&xe.push(tt),xe.length&&(xe=["("+xe.join("; ")+")"]),ct&&Qe&&Qe.indexOf(ct)<0&&xe.push("on "+ct),Qe&&xe.push((/^on /.test(xe[xe.length-1])?"":"on ")+Qe),at&&(tt=/ ([\d.+]+)$/.exec(at),Ie=tt&&at.charAt(at.length-tt[0].length-1)=="/",at={architecture:32,family:tt&&!Ie?at.replace(tt[0],""):at,version:tt?tt[1]:null,toString:function(){var tn=this.version;return this.family+(tn&&!Ie?" "+tn:"")+(this.architecture==64?" 64-bit":"")}}),(tt=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Ve))&&!/\bi686\b/i.test(Ve)?(at&&(at.architecture=64,at.family=at.family.replace(RegExp(" *"+tt),"")),He&&(/\bWOW64\b/i.test(Ue)||Xe&&/\w(?:86|32)$/.test(ut.cpuClass||ut.platform)&&!/\bWin64; x64\b/i.test(Ue))&&xe.unshift("32-bit")):at&&/^OS X/.test(at.family)&&He=="Chrome"&&parseFloat(rt)>=39&&(at.architecture=64),Ue||(Ue=null);var ln={};return ln.description=Ue,ln.layout=_e&&_e[0],ln.manufacturer=ct,ln.name=He,ln.prerelease=Le,ln.product=Qe,ln.ua=Ue,ln.version=He&&rt,ln.os=at||{architecture:null,family:null,version:null,toString:function(){return"null"}},ln.parse=We,ln.toString=Ut,ln.version&&xe.unshift(rt),ln.name&&xe.unshift(He),at&&He&&!(at==String(at).split(" ")[0]&&(at==He.split(" ")[0]||Qe))&&xe.push(Qe?"("+at+")":"on "+at),xe.length&&(ln.description=xe.join(" ")),ln}var Ye=We();typeof st=="function"&&typeof st.amd=="object"&&st.amd?(ke.platform=Ye,st(function(){return Ye})):Se&&Me?je(Ye,function(Ue,Ke){Se[Ke]=Ue}):ke.platform=Ye}).call(this)}).call(this)}).call(this,typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],380:[function(oe,Ge,De){(function(fe){(function(){"use strict";typeof fe=="undefined"||!fe.version||fe.version.indexOf("v0.")===0||fe.version.indexOf("v1.")===0&&fe.version.indexOf("v1.8.")!==0?Ge.exports={nextTick:me}:Ge.exports=fe;function me(ke,Ce,Se,Me){if(typeof ke!="function")throw new TypeError('"callback" argument must be a function');var ve=arguments.length,we,de;switch(ve){case 0:case 1:return fe.nextTick(ke);case 2:return fe.nextTick(function(){ke.call(null,Ce)});case 3:return fe.nextTick(function(){ke.call(null,Ce,Se)});case 4:return fe.nextTick(function(){ke.call(null,Ce,Se,Me)});default:for(we=new Array(ve-1),de=0;de<we.length;)we[de++]=arguments[de];return fe.nextTick(function(){ke.apply(null,we)})}}}).call(this)}).call(this,oe("_process"))},{_process:467}],381:[function(oe,Ge,De){var fe=Ge.exports={},me,ke;function Ce(){throw new Error("setTimeout has not been defined")}function Se(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?me=setTimeout:me=Ce}catch(ge){me=Ce}try{typeof clearTimeout=="function"?ke=clearTimeout:ke=Se}catch(ge){ke=Se}})();function Me(ge){if(me===setTimeout)return setTimeout(ge,0);if((me===Ce||!me)&&setTimeout)return me=setTimeout,setTimeout(ge,0);try{return me(ge,0)}catch(Pe){try{return me.call(null,ge,0)}catch(je){return me.call(this,ge,0)}}}function ve(ge){if(ke===clearTimeout)return clearTimeout(ge);if((ke===Se||!ke)&&clearTimeout)return ke=clearTimeout,clearTimeout(ge);try{return ke(ge)}catch(Pe){try{return ke.call(null,ge)}catch(je){return ke.call(this,ge)}}}var we=[],de=!1,z,ee=-1;function ae(){!de||!z||(de=!1,z.length?we=z.concat(we):ee=-1,we.length&&ie())}function ie(){if(!de){var ge=Me(ae);de=!0;for(var Pe=we.length;Pe;){for(z=we,we=[];++ee<Pe;)z&&z[ee].run();ee=-1,Pe=we.length}z=null,de=!1,ve(ge)}}fe.nextTick=function(ge){var Pe=new Array(arguments.length-1);if(arguments.length>1)for(var je=1;je<arguments.length;je++)Pe[je-1]=arguments[je];we.push(new le(ge,Pe)),we.length===1&&!de&&Me(ie)};function le(ge,Pe){this.fun=ge,this.array=Pe}le.prototype.run=function(){this.fun.apply(null,this.array)},fe.title="browser",fe.browser=!0,fe.env={},fe.argv=[],fe.version="",fe.versions={};function ue(){}fe.on=ue,fe.addListener=ue,fe.once=ue,fe.off=ue,fe.removeListener=ue,fe.removeAllListeners=ue,fe.emit=ue,fe.prependListener=ue,fe.prependOnceListener=ue,fe.listeners=function(ge){return[]},fe.binding=function(ge){throw new Error("process.binding is not supported")},fe.cwd=function(){return"/"},fe.chdir=function(ge){throw new Error("process.chdir is not supported")},fe.umask=function(){return 0}},{}],382:[function(oe,Ge,De){(function(fe){(function(){(function(me){var ke=typeof De=="object"&&De&&!De.nodeType&&De,Ce=typeof Ge=="object"&&Ge&&!Ge.nodeType&&Ge,Se=typeof fe=="object"&&fe;(Se.global===Se||Se.window===Se||Se.self===Se)&&(me=Se);var Me,ve=2147483647,we=36,de=1,z=26,ee=38,ae=700,ie=72,le=128,ue="-",ge=/^xn--/,Pe=/[^\x20-\x7E]/,je=/[\x2E\u3002\uFF0E\uFF61]/g,Be={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Fe=we-de,Ne=Math.floor,Ae=String.fromCharCode,Re;function We(Ct){throw new RangeError(Be[Ct])}function Ye(Ct,gt){for(var dt=Ct.length,ht=[];dt--;)ht[dt]=gt(Ct[dt]);return ht}function Ue(Ct,gt){var dt=Ct.split("@"),ht="";dt.length>1&&(ht=dt[0]+"@",Ct=dt[1]),Ct=Ct.replace(je,".");var Et=Ct.split("."),St=Ye(Et,gt).join(".");return ht+St}function Ke(Ct){for(var gt=[],dt=0,ht=Ct.length,Et,St;dt<ht;)Et=Ct.charCodeAt(dt++),Et>=55296&&Et<=56319&&dt<ht?(St=Ct.charCodeAt(dt++),(St&64512)==56320?gt.push(((Et&1023)<<10)+(St&1023)+65536):(gt.push(Et),dt--)):gt.push(Et);return gt}function ot(Ct){return Ye(Ct,function(gt){var dt="";return gt>65535&&(gt-=65536,dt+=Ae(gt>>>10&1023|55296),gt=56320|gt&1023),dt+=Ae(gt),dt}).join("")}function ut(Ct){return Ct-48<10?Ct-22:Ct-65<26?Ct-65:Ct-97<26?Ct-97:we}function ft(Ct,gt){return Ct+22+75*(Ct<26)-((gt!=0)<<5)}function wt(Ct,gt,dt){var ht=0;for(Ct=dt?Ne(Ct/ae):Ct>>1,Ct+=Ne(Ct/gt);Ct>Fe*z>>1;ht+=we)Ct=Ne(Ct/Fe);return Ne(ht+(Fe+1)*Ct/(Ct+ee))}function Je(Ct){var gt=[],dt=Ct.length,ht,Et=0,St=le,Ft=ie,mt,yt,tt,Ve,xe,Le,Xe,rt,Ie;for(mt=Ct.lastIndexOf(ue),mt<0&&(mt=0),yt=0;yt<mt;++yt)Ct.charCodeAt(yt)>=128&&We("not-basic"),gt.push(Ct.charCodeAt(yt));for(tt=mt>0?mt+1:0;tt<dt;){for(Ve=Et,xe=1,Le=we;tt>=dt&&We("invalid-input"),Xe=ut(Ct.charCodeAt(tt++)),(Xe>=we||Xe>Ne((ve-Et)/xe))&&We("overflow"),Et+=Xe*xe,rt=Le<=Ft?de:Le>=Ft+z?z:Le-Ft,!(Xe<rt);Le+=we)Ie=we-rt,xe>Ne(ve/Ie)&&We("overflow"),xe*=Ie;ht=gt.length+1,Ft=wt(Et-Ve,ht,Ve==0),Ne(Et/ht)>ve-St&&We("overflow"),St+=Ne(Et/ht),Et%=ht,gt.splice(Et++,0,St)}return ot(gt)}function nt(Ct){var gt,dt,ht,Et,St,Ft,mt,yt,tt,Ve,xe,Le=[],Xe,rt,Ie,_e;for(Ct=Ke(Ct),Xe=Ct.length,gt=le,dt=0,St=ie,Ft=0;Ft<Xe;++Ft)xe=Ct[Ft],xe<128&&Le.push(Ae(xe));for(ht=Et=Le.length,Et&&Le.push(ue);ht<Xe;){for(mt=ve,Ft=0;Ft<Xe;++Ft)xe=Ct[Ft],xe>=gt&&xe<mt&&(mt=xe);for(rt=ht+1,mt-gt>Ne((ve-dt)/rt)&&We("overflow"),dt+=(mt-gt)*rt,gt=mt,Ft=0;Ft<Xe;++Ft)if(xe=Ct[Ft],xe<gt&&++dt>ve&&We("overflow"),xe==gt){for(yt=dt,tt=we;Ve=tt<=St?de:tt>=St+z?z:tt-St,!(yt<Ve);tt+=we)_e=yt-Ve,Ie=we-Ve,Le.push(Ae(ft(Ve+_e%Ie,0))),yt=Ne(_e/Ie);Le.push(Ae(ft(yt,0))),St=wt(dt,rt,ht==Et),dt=0,++ht}++dt,++gt}return Le.join("")}function xt(Ct){return Ue(Ct,function(gt){return ge.test(gt)?Je(gt.slice(4).toLowerCase()):gt})}function Pt(Ct){return Ue(Ct,function(gt){return Pe.test(gt)?"xn--"+nt(gt):gt})}if(Me={version:"1.4.1",ucs2:{decode:Ke,encode:ot},decode:Je,encode:nt,toASCII:Pt,toUnicode:xt},typeof st=="function"&&typeof st.amd=="object"&&st.amd)st("punycode",function(){return Me});else if(ke&&Ce)if(Ge.exports==ke)Ce.exports=Me;else for(Re in Me)Me.hasOwnProperty(Re)&&(ke[Re]=Me[Re]);else me.punycode=Me})(this)}).call(this)}).call(this,typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],383:[function(oe,Ge,De){"use strict";function fe(ke,Ce){return Object.prototype.hasOwnProperty.call(ke,Ce)}Ge.exports=function(ke,Ce,Se,Me){Ce=Ce||"&",Se=Se||"=";var ve={};if(typeof ke!="string"||ke.length===0)return ve;var we=/\+/g;ke=ke.split(Ce);var de=1e3;Me&&typeof Me.maxKeys=="number"&&(de=Me.maxKeys);var z=ke.length;de>0&&z>de&&(z=de);for(var ee=0;ee<z;++ee){var ae=ke[ee].replace(we,"%20"),ie=ae.indexOf(Se),le,ue,ge,Pe;ie>=0?(le=ae.substr(0,ie),ue=ae.substr(ie+1)):(le=ae,ue=""),ge=decodeURIComponent(le),Pe=decodeURIComponent(ue),fe(ve,ge)?me(ve[ge])?ve[ge].push(Pe):ve[ge]=[ve[ge],Pe]:ve[ge]=Pe}return ve};var me=Array.isArray||function(ke){return Object.prototype.toString.call(ke)==="[object Array]"}},{}],384:[function(oe,Ge,De){"use strict";var fe=function(Se){switch(typeof Se){case"string":return Se;case"boolean":return Se?"true":"false";case"number":return isFinite(Se)?Se:"";default:return""}};Ge.exports=function(Se,Me,ve,we){return Me=Me||"&",ve=ve||"=",Se===null&&(Se=void 0),typeof Se=="object"?ke(Ce(Se),function(de){var z=encodeURIComponent(fe(de))+ve;return me(Se[de])?ke(Se[de],function(ee){return z+encodeURIComponent(fe(ee))}).join(Me):z+encodeURIComponent(fe(Se[de]))}).join(Me):we?encodeURIComponent(fe(we))+ve+encodeURIComponent(fe(Se)):""};var me=Array.isArray||function(Se){return Object.prototype.toString.call(Se)==="[object Array]"};function ke(Se,Me){if(Se.map)return Se.map(Me);for(var ve=[],we=0;we<Se.length;we++)ve.push(Me(Se[we],we));return ve}var Ce=Object.keys||function(Se){var Me=[];for(var ve in Se)Object.prototype.hasOwnProperty.call(Se,ve)&&Me.push(ve);return Me}},{}],385:[function(oe,Ge,De){"use strict";De.decode=De.parse=oe("./decode"),De.encode=De.stringify=oe("./encode")},{"./decode":383,"./encode":384}],386:[function(oe,Ge,De){"use strict";var fe=oe("process-nextick-args"),me=Object.keys||function(ae){var ie=[];for(var le in ae)ie.push(le);return ie};Ge.exports=de;var ke=Object.create(oe("core-util-is"));ke.inherits=oe("inherits");var Ce=oe("./_stream_readable"),Se=oe("./_stream_writable");ke.inherits(de,Ce);for(var Me=me(Se.prototype),ve=0;ve<Me.length;ve++){var we=Me[ve];de.prototype[we]||(de.prototype[we]=Se.prototype[we])}function de(ae){if(!(this instanceof de))return new de(ae);Ce.call(this,ae),Se.call(this,ae),ae&&ae.readable===!1&&(this.readable=!1),ae&&ae.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,ae&&ae.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",z)}Object.defineProperty(de.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(){this.allowHalfOpen||this._writableState.ended||fe.nextTick(ee,this)}function ee(ae){ae.end()}Object.defineProperty(de.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(ae){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=ae,this._writableState.destroyed=ae)}}),de.prototype._destroy=function(ae,ie){this.push(null),this.end(),fe.nextTick(ie,ae)}},{"./_stream_readable":388,"./_stream_writable":390,"core-util-is":341,inherits:364,"process-nextick-args":380}],387:[function(oe,Ge,De){"use strict";Ge.exports=ke;var fe=oe("./_stream_transform"),me=Object.create(oe("core-util-is"));me.inherits=oe("inherits"),me.inherits(ke,fe);function ke(Ce){if(!(this instanceof ke))return new ke(Ce);fe.call(this,Ce)}ke.prototype._transform=function(Ce,Se,Me){Me(null,Ce)}},{"./_stream_transform":389,"core-util-is":341,inherits:364}],388:[function(oe,Ge,De){(function(fe,me){(function(){"use strict";var ke=oe("process-nextick-args");Ge.exports=Ae;var Ce=oe("isarray"),Se;Ae.ReadableState=Ne;var Me=oe("events").EventEmitter,ve=function(xe,Le){return xe.listeners(Le).length},we=oe("./internal/streams/stream"),de=oe("safe-buffer").Buffer,z=me.Uint8Array||function(){};function ee(xe){return de.from(xe)}function ae(xe){return de.isBuffer(xe)||xe instanceof z}var ie=Object.create(oe("core-util-is"));ie.inherits=oe("inherits");var le=oe("util"),ue=void 0;le&&le.debuglog?ue=le.debuglog("stream"):ue=function(){};var ge=oe("./internal/streams/BufferList"),Pe=oe("./internal/streams/destroy"),je;ie.inherits(Ae,we);var Be=["error","close","destroy","pause","resume"];function Fe(xe,Le,Xe){if(typeof xe.prependListener=="function")return xe.prependListener(Le,Xe);!xe._events||!xe._events[Le]?xe.on(Le,Xe):Ce(xe._events[Le])?xe._events[Le].unshift(Xe):xe._events[Le]=[Xe,xe._events[Le]]}function Ne(xe,Le){Se=Se||oe("./_stream_duplex"),xe=xe||{};var Xe=Le instanceof Se;this.objectMode=!!xe.objectMode,Xe&&(this.objectMode=this.objectMode||!!xe.readableObjectMode);var rt=xe.highWaterMark,Ie=xe.readableHighWaterMark,_e=this.objectMode?16:16*1024;rt||rt===0?this.highWaterMark=rt:Xe&&(Ie||Ie===0)?this.highWaterMark=Ie:this.highWaterMark=_e,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new ge,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=xe.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,xe.encoding&&(je||(je=oe("string_decoder/").StringDecoder),this.decoder=new je(xe.encoding),this.encoding=xe.encoding)}function Ae(xe){if(Se=Se||oe("./_stream_duplex"),!(this instanceof Ae))return new Ae(xe);this._readableState=new Ne(xe,this),this.readable=!0,xe&&(typeof xe.read=="function"&&(this._read=xe.read),typeof xe.destroy=="function"&&(this._destroy=xe.destroy)),we.call(this)}Object.defineProperty(Ae.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(xe){this._readableState&&(this._readableState.destroyed=xe)}}),Ae.prototype.destroy=Pe.destroy,Ae.prototype._undestroy=Pe.undestroy,Ae.prototype._destroy=function(xe,Le){this.push(null),Le(xe)},Ae.prototype.push=function(xe,Le){var Xe=this._readableState,rt;return Xe.objectMode?rt=!0:typeof xe=="string"&&(Le=Le||Xe.defaultEncoding,Le!==Xe.encoding&&(xe=de.from(xe,Le),Le=""),rt=!0),Re(this,xe,Le,!1,rt)},Ae.prototype.unshift=function(xe){return Re(this,xe,null,!0,!1)};function Re(xe,Le,Xe,rt,Ie){var _e=xe._readableState;if(Le===null)_e.reading=!1,ft(xe,_e);else{var He;Ie||(He=Ye(_e,Le)),He?xe.emit("error",He):_e.objectMode||Le&&Le.length>0?(typeof Le!="string"&&!_e.objectMode&&Object.getPrototypeOf(Le)!==de.prototype&&(Le=ee(Le)),rt?_e.endEmitted?xe.emit("error",new Error("stream.unshift() after end event")):We(xe,_e,Le,!0):_e.ended?xe.emit("error",new Error("stream.push() after EOF")):(_e.reading=!1,_e.decoder&&!Xe?(Le=_e.decoder.write(Le),_e.objectMode||Le.length!==0?We(xe,_e,Le,!1):nt(xe,_e)):We(xe,_e,Le,!1))):rt||(_e.reading=!1)}return Ue(_e)}function We(xe,Le,Xe,rt){Le.flowing&&Le.length===0&&!Le.sync?(xe.emit("data",Xe),xe.read(0)):(Le.length+=Le.objectMode?1:Xe.length,rt?Le.buffer.unshift(Xe):Le.buffer.push(Xe),Le.needReadable&&wt(xe)),nt(xe,Le)}function Ye(xe,Le){var Xe;return!ae(Le)&&typeof Le!="string"&&Le!==void 0&&!xe.objectMode&&(Xe=new TypeError("Invalid non-string/buffer chunk")),Xe}function Ue(xe){return!xe.ended&&(xe.needReadable||xe.length<xe.highWaterMark||xe.length===0)}Ae.prototype.isPaused=function(){return this._readableState.flowing===!1},Ae.prototype.setEncoding=function(xe){return je||(je=oe("string_decoder/").StringDecoder),this._readableState.decoder=new je(xe),this._readableState.encoding=xe,this};var Ke=8388608;function ot(xe){return xe>=Ke?xe=Ke:(xe--,xe|=xe>>>1,xe|=xe>>>2,xe|=xe>>>4,xe|=xe>>>8,xe|=xe>>>16,xe++),xe}function ut(xe,Le){return xe<=0||Le.length===0&&Le.ended?0:Le.objectMode?1:xe!==xe?Le.flowing&&Le.length?Le.buffer.head.data.length:Le.length:(xe>Le.highWaterMark&&(Le.highWaterMark=ot(xe)),xe<=Le.length?xe:Le.ended?Le.length:(Le.needReadable=!0,0))}Ae.prototype.read=function(xe){ue("read",xe),xe=parseInt(xe,10);var Le=this._readableState,Xe=xe;if(xe!==0&&(Le.emittedReadable=!1),xe===0&&Le.needReadable&&(Le.length>=Le.highWaterMark||Le.ended))return ue("read: emitReadable",Le.length,Le.ended),Le.length===0&&Le.ended?yt(this):wt(this),null;if(xe=ut(xe,Le),xe===0&&Le.ended)return Le.length===0&&yt(this),null;var rt=Le.needReadable;ue("need readable",rt),(Le.length===0||Le.length-xe<Le.highWaterMark)&&(rt=!0,ue("length less than watermark",rt)),Le.ended||Le.reading?(rt=!1,ue("reading or ended",rt)):rt&&(ue("do read"),Le.reading=!0,Le.sync=!0,Le.length===0&&(Le.needReadable=!0),this._read(Le.highWaterMark),Le.sync=!1,Le.reading||(xe=ut(Xe,Le)));var Ie;return xe>0?Ie=Et(xe,Le):Ie=null,Ie===null?(Le.needReadable=!0,xe=0):Le.length-=xe,Le.length===0&&(Le.ended||(Le.needReadable=!0),Xe!==xe&&Le.ended&&yt(this)),Ie!==null&&this.emit("data",Ie),Ie};function ft(xe,Le){if(!Le.ended){if(Le.decoder){var Xe=Le.decoder.end();Xe&&Xe.length&&(Le.buffer.push(Xe),Le.length+=Le.objectMode?1:Xe.length)}Le.ended=!0,wt(xe)}}function wt(xe){var Le=xe._readableState;Le.needReadable=!1,Le.emittedReadable||(ue("emitReadable",Le.flowing),Le.emittedReadable=!0,Le.sync?ke.nextTick(Je,xe):Je(xe))}function Je(xe){ue("emit readable"),xe.emit("readable"),ht(xe)}function nt(xe,Le){Le.readingMore||(Le.readingMore=!0,ke.nextTick(xt,xe,Le))}function xt(xe,Le){for(var Xe=Le.length;!Le.reading&&!Le.flowing&&!Le.ended&&Le.length<Le.highWaterMark&&(ue("maybeReadMore read 0"),xe.read(0),Xe!==Le.length);)Xe=Le.length;Le.readingMore=!1}Ae.prototype._read=function(xe){this.emit("error",new Error("_read() is not implemented"))},Ae.prototype.pipe=function(xe,Le){var Xe=this,rt=this._readableState;switch(rt.pipesCount){case 0:rt.pipes=xe;break;case 1:rt.pipes=[rt.pipes,xe];break;default:rt.pipes.push(xe);break}rt.pipesCount+=1,ue("pipe count=%d opts=%j",rt.pipesCount,Le);var Ie=(!Le||Le.end!==!1)&&xe!==fe.stdout&&xe!==fe.stderr,_e=Ie?Qe:Ut;rt.endEmitted?ke.nextTick(_e):Xe.once("end",_e),xe.on("unpipe",He);function He(ln,tn){ue("onunpipe"),ln===Xe&&tn&&tn.hasUnpiped===!1&&(tn.hasUnpiped=!0,At())}function Qe(){ue("onend"),xe.end()}var ct=Pt(Xe);xe.on("drain",ct);var at=!1;function At(){ue("cleanup"),xe.removeListener("close",Xt),xe.removeListener("finish",$t),xe.removeListener("drain",ct),xe.removeListener("error",Kt),xe.removeListener("unpipe",He),Xe.removeListener("end",Qe),Xe.removeListener("end",Ut),Xe.removeListener("data",It),at=!0,rt.awaitDrain&&(!xe._writableState||xe._writableState.needDrain)&&ct()}var Lt=!1;Xe.on("data",It);function It(ln){ue("ondata"),Lt=!1;var tn=xe.write(ln);tn===!1&&!Lt&&((rt.pipesCount===1&&rt.pipes===xe||rt.pipesCount>1&&Ve(rt.pipes,xe)!==-1)&&!at&&(ue("false write response, pause",Xe._readableState.awaitDrain),Xe._readableState.awaitDrain++,Lt=!0),Xe.pause())}function Kt(ln){ue("onerror",ln),Ut(),xe.removeListener("error",Kt),ve(xe,"error")===0&&xe.emit("error",ln)}Fe(xe,"error",Kt);function Xt(){xe.removeListener("finish",$t),Ut()}xe.once("close",Xt);function $t(){ue("onfinish"),xe.removeListener("close",Xt),Ut()}xe.once("finish",$t);function Ut(){ue("unpipe"),Xe.unpipe(xe)}return xe.emit("pipe",Xe),rt.flowing||(ue("pipe resume"),Xe.resume()),xe};function Pt(xe){return function(){var Le=xe._readableState;ue("pipeOnDrain",Le.awaitDrain),Le.awaitDrain&&Le.awaitDrain--,Le.awaitDrain===0&&ve(xe,"data")&&(Le.flowing=!0,ht(xe))}}Ae.prototype.unpipe=function(xe){var Le=this._readableState,Xe={hasUnpiped:!1};if(Le.pipesCount===0)return this;if(Le.pipesCount===1)return xe&&xe!==Le.pipes?this:(xe||(xe=Le.pipes),Le.pipes=null,Le.pipesCount=0,Le.flowing=!1,xe&&xe.emit("unpipe",this,Xe),this);if(!xe){var rt=Le.pipes,Ie=Le.pipesCount;Le.pipes=null,Le.pipesCount=0,Le.flowing=!1;for(var _e=0;_e<Ie;_e++)rt[_e].emit("unpipe",this,Xe);return this}var He=Ve(Le.pipes,xe);return He===-1?this:(Le.pipes.splice(He,1),Le.pipesCount-=1,Le.pipesCount===1&&(Le.pipes=Le.pipes[0]),xe.emit("unpipe",this,Xe),this)},Ae.prototype.on=function(xe,Le){var Xe=we.prototype.on.call(this,xe,Le);if(xe==="data")this._readableState.flowing!==!1&&this.resume();else if(xe==="readable"){var rt=this._readableState;!rt.endEmitted&&!rt.readableListening&&(rt.readableListening=rt.needReadable=!0,rt.emittedReadable=!1,rt.reading?rt.length&&wt(this):ke.nextTick(Ct,this))}return Xe},Ae.prototype.addListener=Ae.prototype.on;function Ct(xe){ue("readable nexttick read 0"),xe.read(0)}Ae.prototype.resume=function(){var xe=this._readableState;return xe.flowing||(ue("resume"),xe.flowing=!0,gt(this,xe)),this};function gt(xe,Le){Le.resumeScheduled||(Le.resumeScheduled=!0,ke.nextTick(dt,xe,Le))}function dt(xe,Le){Le.reading||(ue("resume read 0"),xe.read(0)),Le.resumeScheduled=!1,Le.awaitDrain=0,xe.emit("resume"),ht(xe),Le.flowing&&!Le.reading&&xe.read(0)}Ae.prototype.pause=function(){return ue("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ue("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function ht(xe){var Le=xe._readableState;for(ue("flow",Le.flowing);Le.flowing&&xe.read()!==null;);}Ae.prototype.wrap=function(xe){var Le=this,Xe=this._readableState,rt=!1;xe.on("end",function(){if(ue("wrapped end"),Xe.decoder&&!Xe.ended){var He=Xe.decoder.end();He&&He.length&&Le.push(He)}Le.push(null)}),xe.on("data",function(He){if(ue("wrapped data"),Xe.decoder&&(He=Xe.decoder.write(He)),!(Xe.objectMode&&He==null)&&!(!Xe.objectMode&&(!He||!He.length))){var Qe=Le.push(He);Qe||(rt=!0,xe.pause())}});for(var Ie in xe)this[Ie]===void 0&&typeof xe[Ie]=="function"&&(this[Ie]=function(He){return function(){return xe[He].apply(xe,arguments)}}(Ie));for(var _e=0;_e<Be.length;_e++)xe.on(Be[_e],this.emit.bind(this,Be[_e]));return this._read=function(He){ue("wrapped _read",He),rt&&(rt=!1,xe.resume())},this},Object.defineProperty(Ae.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Ae._fromList=Et;function Et(xe,Le){if(Le.length===0)return null;var Xe;return Le.objectMode?Xe=Le.buffer.shift():!xe||xe>=Le.length?(Le.decoder?Xe=Le.buffer.join(""):Le.buffer.length===1?Xe=Le.buffer.head.data:Xe=Le.buffer.concat(Le.length),Le.buffer.clear()):Xe=St(xe,Le.buffer,Le.decoder),Xe}function St(xe,Le,Xe){var rt;return xe<Le.head.data.length?(rt=Le.head.data.slice(0,xe),Le.head.data=Le.head.data.slice(xe)):xe===Le.head.data.length?rt=Le.shift():rt=Xe?Ft(xe,Le):mt(xe,Le),rt}function Ft(xe,Le){var Xe=Le.head,rt=1,Ie=Xe.data;for(xe-=Ie.length;Xe=Xe.next;){var _e=Xe.data,He=xe>_e.length?_e.length:xe;if(He===_e.length?Ie+=_e:Ie+=_e.slice(0,xe),xe-=He,xe===0){He===_e.length?(++rt,Xe.next?Le.head=Xe.next:Le.head=Le.tail=null):(Le.head=Xe,Xe.data=_e.slice(He));break}++rt}return Le.length-=rt,Ie}function mt(xe,Le){var Xe=de.allocUnsafe(xe),rt=Le.head,Ie=1;for(rt.data.copy(Xe),xe-=rt.data.length;rt=rt.next;){var _e=rt.data,He=xe>_e.length?_e.length:xe;if(_e.copy(Xe,Xe.length-xe,0,He),xe-=He,xe===0){He===_e.length?(++Ie,rt.next?Le.head=rt.next:Le.head=Le.tail=null):(Le.head=rt,rt.data=_e.slice(He));break}++Ie}return Le.length-=Ie,Xe}function yt(xe){var Le=xe._readableState;if(Le.length>0)throw new Error('"endReadable()" called on non-empty stream');Le.endEmitted||(Le.ended=!0,ke.nextTick(tt,Le,xe))}function tt(xe,Le){!xe.endEmitted&&xe.length===0&&(xe.endEmitted=!0,Le.readable=!1,Le.emit("end"))}function Ve(xe,Le){for(var Xe=0,rt=xe.length;Xe<rt;Xe++)if(xe[Xe]===Le)return Xe;return-1}}).call(this)}).call(this,oe("_process"),typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":386,"./internal/streams/BufferList":391,"./internal/streams/destroy":392,"./internal/streams/stream":393,_process:467,"core-util-is":341,events:344,inherits:364,isarray:370,"process-nextick-args":380,"safe-buffer":396,"string_decoder/":413,util:89}],389:[function(oe,Ge,De){"use strict";Ge.exports=Ce;var fe=oe("./_stream_duplex"),me=Object.create(oe("core-util-is"));me.inherits=oe("inherits"),me.inherits(Ce,fe);function ke(ve,we){var de=this._transformState;de.transforming=!1;var z=de.writecb;if(!z)return this.emit("error",new Error("write callback called multiple times"));de.writechunk=null,de.writecb=null,we!=null&&this.push(we),z(ve);var ee=this._readableState;ee.reading=!1,(ee.needReadable||ee.length<ee.highWaterMark)&&this._read(ee.highWaterMark)}function Ce(ve){if(!(this instanceof Ce))return new Ce(ve);fe.call(this,ve),this._transformState={afterTransform:ke.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,ve&&(typeof ve.transform=="function"&&(this._transform=ve.transform),typeof ve.flush=="function"&&(this._flush=ve.flush)),this.on("prefinish",Se)}function Se(){var ve=this;typeof this._flush=="function"?this._flush(function(we,de){Me(ve,we,de)}):Me(this,null,null)}Ce.prototype.push=function(ve,we){return this._transformState.needTransform=!1,fe.prototype.push.call(this,ve,we)},Ce.prototype._transform=function(ve,we,de){throw new Error("_transform() is not implemented")},Ce.prototype._write=function(ve,we,de){var z=this._transformState;if(z.writecb=de,z.writechunk=ve,z.writeencoding=we,!z.transforming){var ee=this._readableState;(z.needTransform||ee.needReadable||ee.length<ee.highWaterMark)&&this._read(ee.highWaterMark)}},Ce.prototype._read=function(ve){var we=this._transformState;we.writechunk!==null&&we.writecb&&!we.transforming?(we.transforming=!0,this._transform(we.writechunk,we.writeencoding,we.afterTransform)):we.needTransform=!0},Ce.prototype._destroy=function(ve,we){var de=this;fe.prototype._destroy.call(this,ve,function(z){we(z),de.emit("close")})};function Me(ve,we,de){if(we)return ve.emit("error",we);if(de!=null&&ve.push(de),ve._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(ve._transformState.transforming)throw new Error("Calling transform done when still transforming");return ve.push(null)}},{"./_stream_duplex":386,"core-util-is":341,inherits:364}],390:[function(oe,Ge,De){(function(fe,me,ke){(function(){"use strict";var Ce=oe("process-nextick-args");Ge.exports=Fe;function Se(dt,ht,Et){this.chunk=dt,this.encoding=ht,this.callback=Et,this.next=null}function Me(dt){var ht=this;this.next=null,this.entry=null,this.finish=function(){gt(ht,dt)}}var ve=!fe.browser&&["v0.10","v0.9."].indexOf(fe.version.slice(0,5))>-1?ke:Ce.nextTick,we;Fe.WritableState=je;var de=Object.create(oe("core-util-is"));de.inherits=oe("inherits");var z={deprecate:oe("util-deprecate")},ee=oe("./internal/streams/stream"),ae=oe("safe-buffer").Buffer,ie=me.Uint8Array||function(){};function le(dt){return ae.from(dt)}function ue(dt){return ae.isBuffer(dt)||dt instanceof ie}var ge=oe("./internal/streams/destroy");de.inherits(Fe,ee);function Pe(){}function je(dt,ht){we=we||oe("./_stream_duplex"),dt=dt||{};var Et=ht instanceof we;this.objectMode=!!dt.objectMode,Et&&(this.objectMode=this.objectMode||!!dt.writableObjectMode);var St=dt.highWaterMark,Ft=dt.writableHighWaterMark,mt=this.objectMode?16:16*1024;St||St===0?this.highWaterMark=St:Et&&(Ft||Ft===0)?this.highWaterMark=Ft:this.highWaterMark=mt,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var yt=dt.decodeStrings===!1;this.decodeStrings=!yt,this.defaultEncoding=dt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(tt){ot(ht,tt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Me(this)}je.prototype.getBuffer=function(){for(var ht=this.bufferedRequest,Et=[];ht;)Et.push(ht),ht=ht.next;return Et},function(){try{Object.defineProperty(je.prototype,"buffer",{get:z.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(dt){}}();var Be;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Be=Function.prototype[Symbol.hasInstance],Object.defineProperty(Fe,Symbol.hasInstance,{value:function(dt){return Be.call(this,dt)?!0:this!==Fe?!1:dt&&dt._writableState instanceof je}})):Be=function(dt){return dt instanceof this};function Fe(dt){if(we=we||oe("./_stream_duplex"),!Be.call(Fe,this)&&!(this instanceof we))return new Fe(dt);this._writableState=new je(dt,this),this.writable=!0,dt&&(typeof dt.write=="function"&&(this._write=dt.write),typeof dt.writev=="function"&&(this._writev=dt.writev),typeof dt.destroy=="function"&&(this._destroy=dt.destroy),typeof dt.final=="function"&&(this._final=dt.final)),ee.call(this)}Fe.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function Ne(dt,ht){var Et=new Error("write after end");dt.emit("error",Et),Ce.nextTick(ht,Et)}function Ae(dt,ht,Et,St){var Ft=!0,mt=!1;return Et===null?mt=new TypeError("May not write null values to stream"):typeof Et!="string"&&Et!==void 0&&!ht.objectMode&&(mt=new TypeError("Invalid non-string/buffer chunk")),mt&&(dt.emit("error",mt),Ce.nextTick(St,mt),Ft=!1),Ft}Fe.prototype.write=function(dt,ht,Et){var St=this._writableState,Ft=!1,mt=!St.objectMode&&ue(dt);return mt&&!ae.isBuffer(dt)&&(dt=le(dt)),typeof ht=="function"&&(Et=ht,ht=null),mt?ht="buffer":ht||(ht=St.defaultEncoding),typeof Et!="function"&&(Et=Pe),St.ended?Ne(this,Et):(mt||Ae(this,St,dt,Et))&&(St.pendingcb++,Ft=We(this,St,mt,dt,ht,Et)),Ft},Fe.prototype.cork=function(){var dt=this._writableState;dt.corked++},Fe.prototype.uncork=function(){var dt=this._writableState;dt.corked&&(dt.corked--,!dt.writing&&!dt.corked&&!dt.finished&&!dt.bufferProcessing&&dt.bufferedRequest&&wt(this,dt))},Fe.prototype.setDefaultEncoding=function(ht){if(typeof ht=="string"&&(ht=ht.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ht+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+ht);return this._writableState.defaultEncoding=ht,this};function Re(dt,ht,Et){return!dt.objectMode&&dt.decodeStrings!==!1&&typeof ht=="string"&&(ht=ae.from(ht,Et)),ht}Object.defineProperty(Fe.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function We(dt,ht,Et,St,Ft,mt){if(!Et){var yt=Re(ht,St,Ft);St!==yt&&(Et=!0,Ft="buffer",St=yt)}var tt=ht.objectMode?1:St.length;ht.length+=tt;var Ve=ht.length<ht.highWaterMark;if(Ve||(ht.needDrain=!0),ht.writing||ht.corked){var xe=ht.lastBufferedRequest;ht.lastBufferedRequest={chunk:St,encoding:Ft,isBuf:Et,callback:mt,next:null},xe?xe.next=ht.lastBufferedRequest:ht.bufferedRequest=ht.lastBufferedRequest,ht.bufferedRequestCount+=1}else Ye(dt,ht,!1,tt,St,Ft,mt);return Ve}function Ye(dt,ht,Et,St,Ft,mt,yt){ht.writelen=St,ht.writecb=yt,ht.writing=!0,ht.sync=!0,Et?dt._writev(Ft,ht.onwrite):dt._write(Ft,mt,ht.onwrite),ht.sync=!1}function Ue(dt,ht,Et,St,Ft){--ht.pendingcb,Et?(Ce.nextTick(Ft,St),Ce.nextTick(Pt,dt,ht),dt._writableState.errorEmitted=!0,dt.emit("error",St)):(Ft(St),dt._writableState.errorEmitted=!0,dt.emit("error",St),Pt(dt,ht))}function Ke(dt){dt.writing=!1,dt.writecb=null,dt.length-=dt.writelen,dt.writelen=0}function ot(dt,ht){var Et=dt._writableState,St=Et.sync,Ft=Et.writecb;if(Ke(Et),ht)Ue(dt,Et,St,ht,Ft);else{var mt=Je(Et);!mt&&!Et.corked&&!Et.bufferProcessing&&Et.bufferedRequest&&wt(dt,Et),St?ve(ut,dt,Et,mt,Ft):ut(dt,Et,mt,Ft)}}function ut(dt,ht,Et,St){Et||ft(dt,ht),ht.pendingcb--,St(),Pt(dt,ht)}function ft(dt,ht){ht.length===0&&ht.needDrain&&(ht.needDrain=!1,dt.emit("drain"))}function wt(dt,ht){ht.bufferProcessing=!0;var Et=ht.bufferedRequest;if(dt._writev&&Et&&Et.next){var St=ht.bufferedRequestCount,Ft=new Array(St),mt=ht.corkedRequestsFree;mt.entry=Et;for(var yt=0,tt=!0;Et;)Ft[yt]=Et,Et.isBuf||(tt=!1),Et=Et.next,yt+=1;Ft.allBuffers=tt,Ye(dt,ht,!0,ht.length,Ft,"",mt.finish),ht.pendingcb++,ht.lastBufferedRequest=null,mt.next?(ht.corkedRequestsFree=mt.next,mt.next=null):ht.corkedRequestsFree=new Me(ht),ht.bufferedRequestCount=0}else{for(;Et;){var Ve=Et.chunk,xe=Et.encoding,Le=Et.callback,Xe=ht.objectMode?1:Ve.length;if(Ye(dt,ht,!1,Xe,Ve,xe,Le),Et=Et.next,ht.bufferedRequestCount--,ht.writing)break}Et===null&&(ht.lastBufferedRequest=null)}ht.bufferedRequest=Et,ht.bufferProcessing=!1}Fe.prototype._write=function(dt,ht,Et){Et(new Error("_write() is not implemented"))},Fe.prototype._writev=null,Fe.prototype.end=function(dt,ht,Et){var St=this._writableState;typeof dt=="function"?(Et=dt,dt=null,ht=null):typeof ht=="function"&&(Et=ht,ht=null),dt!=null&&this.write(dt,ht),St.corked&&(St.corked=1,this.uncork()),!St.ending&&!St.finished&&Ct(this,St,Et)};function Je(dt){return dt.ending&&dt.length===0&&dt.bufferedRequest===null&&!dt.finished&&!dt.writing}function nt(dt,ht){dt._final(function(Et){ht.pendingcb--,Et&&dt.emit("error",Et),ht.prefinished=!0,dt.emit("prefinish"),Pt(dt,ht)})}function xt(dt,ht){!ht.prefinished&&!ht.finalCalled&&(typeof dt._final=="function"?(ht.pendingcb++,ht.finalCalled=!0,Ce.nextTick(nt,dt,ht)):(ht.prefinished=!0,dt.emit("prefinish")))}function Pt(dt,ht){var Et=Je(ht);return Et&&(xt(dt,ht),ht.pendingcb===0&&(ht.finished=!0,dt.emit("finish"))),Et}function Ct(dt,ht,Et){ht.ending=!0,Pt(dt,ht),Et&&(ht.finished?Ce.nextTick(Et):dt.once("finish",Et)),ht.ended=!0,dt.writable=!1}function gt(dt,ht,Et){var St=dt.entry;for(dt.entry=null;St;){var Ft=St.callback;ht.pendingcb--,Ft(Et),St=St.next}ht.corkedRequestsFree?ht.corkedRequestsFree.next=dt:ht.corkedRequestsFree=dt}Object.defineProperty(Fe.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(dt){this._writableState&&(this._writableState.destroyed=dt)}}),Fe.prototype.destroy=ge.destroy,Fe.prototype._undestroy=ge.undestroy,Fe.prototype._destroy=function(dt,ht){this.end(),ht(dt)}}).call(this)}).call(this,oe("_process"),typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},oe("timers").setImmediate)},{"./_stream_duplex":386,"./internal/streams/destroy":392,"./internal/streams/stream":393,_process:467,"core-util-is":341,inherits:364,"process-nextick-args":380,"safe-buffer":396,timers:414,"util-deprecate":416}],391:[function(oe,Ge,De){"use strict";function fe(Se,Me){if(!(Se instanceof Me))throw new TypeError("Cannot call a class as a function")}var me=oe("safe-buffer").Buffer,ke=oe("util");function Ce(Se,Me,ve){Se.copy(Me,ve)}Ge.exports=function(){function Se(){fe(this,Se),this.head=null,this.tail=null,this.length=0}return Se.prototype.push=function(ve){var we={data:ve,next:null};this.length>0?this.tail.next=we:this.head=we,this.tail=we,++this.length},Se.prototype.unshift=function(ve){var we={data:ve,next:this.head};this.length===0&&(this.tail=we),this.head=we,++this.length},Se.prototype.shift=function(){if(this.length!==0){var ve=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,ve}},Se.prototype.clear=function(){this.head=this.tail=null,this.length=0},Se.prototype.join=function(ve){if(this.length===0)return"";for(var we=this.head,de=""+we.data;we=we.next;)de+=ve+we.data;return de},Se.prototype.concat=function(ve){if(this.length===0)return me.alloc(0);if(this.length===1)return this.head.data;for(var we=me.allocUnsafe(ve>>>0),de=this.head,z=0;de;)Ce(de.data,we,z),z+=de.data.length,de=de.next;return we},Se}(),ke&&ke.inspect&&ke.inspect.custom&&(Ge.exports.prototype[ke.inspect.custom]=function(){var Se=ke.inspect({length:this.length});return this.constructor.name+" "+Se})},{"safe-buffer":396,util:89}],392:[function(oe,Ge,De){"use strict";var fe=oe("process-nextick-args");function me(Se,Me){var ve=this,we=this._readableState&&this._readableState.destroyed,de=this._writableState&&this._writableState.destroyed;return we||de?(Me?Me(Se):Se&&(!this._writableState||!this._writableState.errorEmitted)&&fe.nextTick(Ce,this,Se),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(Se||null,function(z){!Me&&z?(fe.nextTick(Ce,ve,z),ve._writableState&&(ve._writableState.errorEmitted=!0)):Me&&Me(z)}),this)}function ke(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Ce(Se,Me){Se.emit("error",Me)}Ge.exports={destroy:me,undestroy:ke}},{"process-nextick-args":380}],393:[function(oe,Ge,De){Ge.exports=oe("events").EventEmitter},{events:344}],394:[function(oe,Ge,De){De=Ge.exports=oe("./lib/_stream_readable.js"),De.Stream=De,De.Readable=De,De.Writable=oe("./lib/_stream_writable.js"),De.Duplex=oe("./lib/_stream_duplex.js"),De.Transform=oe("./lib/_stream_transform.js"),De.PassThrough=oe("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":386,"./lib/_stream_passthrough.js":387,"./lib/_stream_readable.js":388,"./lib/_stream_transform.js":389,"./lib/_stream_writable.js":390}],395:[function(oe,Ge,De){var fe=function(me){"use strict";var ke=Object.prototype,Ce=ke.hasOwnProperty,Se,Me=typeof Symbol=="function"?Symbol:{},ve=Me.iterator||"@@iterator",we=Me.asyncIterator||"@@asyncIterator",de=Me.toStringTag||"@@toStringTag";function z(xt,Pt,Ct){return Object.defineProperty(xt,Pt,{value:Ct,enumerable:!0,configurable:!0,writable:!0}),xt[Pt]}try{z({},"")}catch(xt){z=function(Pt,Ct,gt){return Pt[Ct]=gt}}function ee(xt,Pt,Ct,gt){var dt=Pt&&Pt.prototype instanceof je?Pt:je,ht=Object.create(dt.prototype),Et=new wt(gt||[]);return ht._invoke=Ke(xt,Ct,Et),ht}me.wrap=ee;function ae(xt,Pt,Ct){try{return{type:"normal",arg:xt.call(Pt,Ct)}}catch(gt){return{type:"throw",arg:gt}}}var ie="suspendedStart",le="suspendedYield",ue="executing",ge="completed",Pe={};function je(){}function Be(){}function Fe(){}var Ne={};z(Ne,ve,function(){return this});var Ae=Object.getPrototypeOf,Re=Ae&&Ae(Ae(Je([])));Re&&Re!==ke&&Ce.call(Re,ve)&&(Ne=Re);var We=Fe.prototype=je.prototype=Object.create(Ne);Be.prototype=Fe,z(We,"constructor",Fe),z(Fe,"constructor",Be),Be.displayName=z(Fe,de,"GeneratorFunction");function Ye(xt){["next","throw","return"].forEach(function(Pt){z(xt,Pt,function(Ct){return this._invoke(Pt,Ct)})})}me.isGeneratorFunction=function(xt){var Pt=typeof xt=="function"&&xt.constructor;return Pt?Pt===Be||(Pt.displayName||Pt.name)==="GeneratorFunction":!1},me.mark=function(xt){return Object.setPrototypeOf?Object.setPrototypeOf(xt,Fe):(xt.__proto__=Fe,z(xt,de,"GeneratorFunction")),xt.prototype=Object.create(We),xt},me.awrap=function(xt){return{__await:xt}};function Ue(xt,Pt){function Ct(ht,Et,St,Ft){var mt=ae(xt[ht],xt,Et);if(mt.type==="throw")Ft(mt.arg);else{var yt=mt.arg,tt=yt.value;return tt&&typeof tt=="object"&&Ce.call(tt,"__await")?Pt.resolve(tt.__await).then(function(Ve){Ct("next",Ve,St,Ft)},function(Ve){Ct("throw",Ve,St,Ft)}):Pt.resolve(tt).then(function(Ve){yt.value=Ve,St(yt)},function(Ve){return Ct("throw",Ve,St,Ft)})}}var gt;function dt(ht,Et){function St(){return new Pt(function(Ft,mt){Ct(ht,Et,Ft,mt)})}return gt=gt?gt.then(St,St):St()}this._invoke=dt}Ye(Ue.prototype),z(Ue.prototype,we,function(){return this}),me.AsyncIterator=Ue,me.async=function(xt,Pt,Ct,gt,dt){dt===void 0&&(dt=Promise);var ht=new Ue(ee(xt,Pt,Ct,gt),dt);return me.isGeneratorFunction(Pt)?ht:ht.next().then(function(Et){return Et.done?Et.value:ht.next()})};function Ke(xt,Pt,Ct){var gt=ie;return function(ht,Et){if(gt===ue)throw new Error("Generator is already running");if(gt===ge){if(ht==="throw")throw Et;return nt()}for(Ct.method=ht,Ct.arg=Et;;){var St=Ct.delegate;if(St){var Ft=ot(St,Ct);if(Ft){if(Ft===Pe)continue;return Ft}}if(Ct.method==="next")Ct.sent=Ct._sent=Ct.arg;else if(Ct.method==="throw"){if(gt===ie)throw gt=ge,Ct.arg;Ct.dispatchException(Ct.arg)}else Ct.method==="return"&&Ct.abrupt("return",Ct.arg);gt=ue;var mt=ae(xt,Pt,Ct);if(mt.type==="normal"){if(gt=Ct.done?ge:le,mt.arg===Pe)continue;return{value:mt.arg,done:Ct.done}}else mt.type==="throw"&&(gt=ge,Ct.method="throw",Ct.arg=mt.arg)}}}function ot(xt,Pt){var Ct=xt.iterator[Pt.method];if(Ct===Se){if(Pt.delegate=null,Pt.method==="throw"){if(xt.iterator.return&&(Pt.method="return",Pt.arg=Se,ot(xt,Pt),Pt.method==="throw"))return Pe;Pt.method="throw",Pt.arg=new TypeError("The iterator does not provide a 'throw' method")}return Pe}var gt=ae(Ct,xt.iterator,Pt.arg);if(gt.type==="throw")return Pt.method="throw",Pt.arg=gt.arg,Pt.delegate=null,Pe;var dt=gt.arg;if(!dt)return Pt.method="throw",Pt.arg=new TypeError("iterator result is not an object"),Pt.delegate=null,Pe;if(dt.done)Pt[xt.resultName]=dt.value,Pt.next=xt.nextLoc,Pt.method!=="return"&&(Pt.method="next",Pt.arg=Se);else return dt;return Pt.delegate=null,Pe}Ye(We),z(We,de,"Generator"),z(We,ve,function(){return this}),z(We,"toString",function(){return"[object Generator]"});function ut(xt){var Pt={tryLoc:xt[0]};1 in xt&&(Pt.catchLoc=xt[1]),2 in xt&&(Pt.finallyLoc=xt[2],Pt.afterLoc=xt[3]),this.tryEntries.push(Pt)}function ft(xt){var Pt=xt.completion||{};Pt.type="normal",delete Pt.arg,xt.completion=Pt}function wt(xt){this.tryEntries=[{tryLoc:"root"}],xt.forEach(ut,this),this.reset(!0)}me.keys=function(xt){var Pt=[];for(var Ct in xt)Pt.push(Ct);return Pt.reverse(),function gt(){for(;Pt.length;){var dt=Pt.pop();if(dt in xt)return gt.value=dt,gt.done=!1,gt}return gt.done=!0,gt}};function Je(xt){if(xt){var Pt=xt[ve];if(Pt)return Pt.call(xt);if(typeof xt.next=="function")return xt;if(!isNaN(xt.length)){var Ct=-1,gt=function dt(){for(;++Ct<xt.length;)if(Ce.call(xt,Ct))return dt.value=xt[Ct],dt.done=!1,dt;return dt.value=Se,dt.done=!0,dt};return gt.next=gt}}return{next:nt}}me.values=Je;function nt(){return{value:Se,done:!0}}return wt.prototype={constructor:wt,reset:function(xt){if(this.prev=0,this.next=0,this.sent=this._sent=Se,this.done=!1,this.delegate=null,this.method="next",this.arg=Se,this.tryEntries.forEach(ft),!xt)for(var Pt in this)Pt.charAt(0)==="t"&&Ce.call(this,Pt)&&!isNaN(+Pt.slice(1))&&(this[Pt]=Se)},stop:function(){this.done=!0;var xt=this.tryEntries[0],Pt=xt.completion;if(Pt.type==="throw")throw Pt.arg;return this.rval},dispatchException:function(xt){if(this.done)throw xt;var Pt=this;function Ct(Ft,mt){return ht.type="throw",ht.arg=xt,Pt.next=Ft,mt&&(Pt.method="next",Pt.arg=Se),!!mt}for(var gt=this.tryEntries.length-1;gt>=0;--gt){var dt=this.tryEntries[gt],ht=dt.completion;if(dt.tryLoc==="root")return Ct("end");if(dt.tryLoc<=this.prev){var Et=Ce.call(dt,"catchLoc"),St=Ce.call(dt,"finallyLoc");if(Et&&St){if(this.prev<dt.catchLoc)return Ct(dt.catchLoc,!0);if(this.prev<dt.finallyLoc)return Ct(dt.finallyLoc)}else if(Et){if(this.prev<dt.catchLoc)return Ct(dt.catchLoc,!0)}else if(St){if(this.prev<dt.finallyLoc)return Ct(dt.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(xt,Pt){for(var Ct=this.tryEntries.length-1;Ct>=0;--Ct){var gt=this.tryEntries[Ct];if(gt.tryLoc<=this.prev&&Ce.call(gt,"finallyLoc")&&this.prev<gt.finallyLoc){var dt=gt;break}}dt&&(xt==="break"||xt==="continue")&&dt.tryLoc<=Pt&&Pt<=dt.finallyLoc&&(dt=null);var ht=dt?dt.completion:{};return ht.type=xt,ht.arg=Pt,dt?(this.method="next",this.next=dt.finallyLoc,Pe):this.complete(ht)},complete:function(xt,Pt){if(xt.type==="throw")throw xt.arg;return xt.type==="break"||xt.type==="continue"?this.next=xt.arg:xt.type==="return"?(this.rval=this.arg=xt.arg,this.method="return",this.next="end"):xt.type==="normal"&&Pt&&(this.next=Pt),Pe},finish:function(xt){for(var Pt=this.tryEntries.length-1;Pt>=0;--Pt){var Ct=this.tryEntries[Pt];if(Ct.finallyLoc===xt)return this.complete(Ct.completion,Ct.afterLoc),ft(Ct),Pe}},catch:function(xt){for(var Pt=this.tryEntries.length-1;Pt>=0;--Pt){var Ct=this.tryEntries[Pt];if(Ct.tryLoc===xt){var gt=Ct.completion;if(gt.type==="throw"){var dt=gt.arg;ft(Ct)}return dt}}throw new Error("illegal catch attempt")},delegateYield:function(xt,Pt,Ct){return this.delegate={iterator:Je(xt),resultName:Pt,nextLoc:Ct},this.method==="next"&&(this.arg=Se),Pe}},me}(typeof Ge=="object"?Ge.exports:{});try{regeneratorRuntime=fe}catch(me){typeof globalThis=="object"?globalThis.regeneratorRuntime=fe:Function("r","regeneratorRuntime = r")(fe)}},{}],396:[function(oe,Ge,De){var fe=oe("buffer"),me=fe.Buffer;function ke(Se,Me){for(var ve in Se)Me[ve]=Se[ve]}me.from&&me.alloc&&me.allocUnsafe&&me.allocUnsafeSlow?Ge.exports=fe:(ke(fe,De),De.Buffer=Ce);function Ce(Se,Me,ve){return me(Se,Me,ve)}ke(me,Ce),Ce.from=function(Se,Me,ve){if(typeof Se=="number")throw new TypeError("Argument must not be a number");return me(Se,Me,ve)},Ce.alloc=function(Se,Me,ve){if(typeof Se!="number")throw new TypeError("Argument must be a number");var we=me(Se);return Me!==void 0?typeof ve=="string"?we.fill(Me,ve):we.fill(Me):we.fill(0),we},Ce.allocUnsafe=function(Se){if(typeof Se!="number")throw new TypeError("Argument must be a number");return me(Se)},Ce.allocUnsafeSlow=function(Se){if(typeof Se!="number")throw new TypeError("Argument must be a number");return fe.SlowBuffer(Se)}},{buffer:90}],397:[function(oe,Ge,De){(function(fe){(function(){(function(me){me.parser=function(yt,tt){return new Ce(yt,tt)},me.SAXParser=Ce,me.SAXStream=ee,me.createStream=z,me.MAX_BUFFER_LENGTH=64*1024;var ke=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];me.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function Ce(yt,tt){if(!(this instanceof Ce))return new Ce(yt,tt);var Ve=this;Me(Ve),Ve.q=Ve.c="",Ve.bufferCheckPosition=me.MAX_BUFFER_LENGTH,Ve.opt=tt||{},Ve.opt.lowercase=Ve.opt.lowercase||Ve.opt.lowercasetags,Ve.looseCase=Ve.opt.lowercase?"toLowerCase":"toUpperCase",Ve.tags=[],Ve.closed=Ve.closedRoot=Ve.sawRoot=!1,Ve.tag=Ve.error=null,Ve.strict=!!yt,Ve.noscript=!!(yt||Ve.opt.noscript),Ve.state=Ue.BEGIN,Ve.strictEntities=Ve.opt.strictEntities,Ve.ENTITIES=Ve.strictEntities?Object.create(me.XML_ENTITIES):Object.create(me.ENTITIES),Ve.attribList=[],Ve.opt.xmlns&&(Ve.ns=Object.create(ge)),Ve.trackPosition=Ve.opt.position!==!1,Ve.trackPosition&&(Ve.position=Ve.line=Ve.column=0),ot(Ve,"onready")}Object.create||(Object.create=function(yt){function tt(){}tt.prototype=yt;var Ve=new tt;return Ve}),Object.keys||(Object.keys=function(yt){var tt=[];for(var Ve in yt)yt.hasOwnProperty(Ve)&&tt.push(Ve);return tt});function Se(yt){for(var tt=Math.max(me.MAX_BUFFER_LENGTH,10),Ve=0,xe=0,Le=ke.length;xe<Le;xe++){var Xe=yt[ke[xe]].length;if(Xe>tt)switch(ke[xe]){case"textNode":ft(yt);break;case"cdata":ut(yt,"oncdata",yt.cdata),yt.cdata="";break;case"script":ut(yt,"onscript",yt.script),yt.script="";break;default:Je(yt,"Max buffer length exceeded: "+ke[xe])}Ve=Math.max(Ve,Xe)}var rt=me.MAX_BUFFER_LENGTH-Ve;yt.bufferCheckPosition=rt+yt.position}function Me(yt){for(var tt=0,Ve=ke.length;tt<Ve;tt++)yt[ke[tt]]=""}function ve(yt){ft(yt),yt.cdata!==""&&(ut(yt,"oncdata",yt.cdata),yt.cdata=""),yt.script!==""&&(ut(yt,"onscript",yt.script),yt.script="")}Ce.prototype={end:function(){nt(this)},write:mt,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){ve(this)}};var we;try{we=oe("stream").Stream}catch(yt){we=function(){}}var de=me.EVENTS.filter(function(yt){return yt!=="error"&&yt!=="end"});function z(yt,tt){return new ee(yt,tt)}function ee(yt,tt){if(!(this instanceof ee))return new ee(yt,tt);we.apply(this),this._parser=new Ce(yt,tt),this.writable=!0,this.readable=!0;var Ve=this;this._parser.onend=function(){Ve.emit("end")},this._parser.onerror=function(xe){Ve.emit("error",xe),Ve._parser.error=null},this._decoder=null,de.forEach(function(xe){Object.defineProperty(Ve,"on"+xe,{get:function(){return Ve._parser["on"+xe]},set:function(Le){if(!Le)return Ve.removeAllListeners(xe),Ve._parser["on"+xe]=Le,Le;Ve.on(xe,Le)},enumerable:!0,configurable:!1})})}ee.prototype=Object.create(we.prototype,{constructor:{value:ee}}),ee.prototype.write=function(yt){if(typeof fe=="function"&&typeof fe.isBuffer=="function"&&fe.isBuffer(yt)){if(!this._decoder){var tt=oe("string_decoder").StringDecoder;this._decoder=new tt("utf8")}yt=this._decoder.write(yt)}return this._parser.write(yt.toString()),this.emit("data",yt),!0},ee.prototype.end=function(yt){return yt&&yt.length&&this.write(yt),this._parser.end(),!0},ee.prototype.on=function(yt,tt){var Ve=this;return!Ve._parser["on"+yt]&&de.indexOf(yt)!==-1&&(Ve._parser["on"+yt]=function(){var xe=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);xe.splice(0,0,yt),Ve.emit.apply(Ve,xe)}),we.prototype.on.call(Ve,yt,tt)};var ae="[CDATA[",ie="DOCTYPE",le="http://www.w3.org/XML/1998/namespace",ue="http://www.w3.org/2000/xmlns/",ge={xml:le,xmlns:ue},Pe=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,je=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,Be=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Fe=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function Ne(yt){return yt===" "||yt===`
`||yt==="\r"||yt===" "}function Ae(yt){return yt==='"'||yt==="'"}function Re(yt){return yt===">"||Ne(yt)}function We(yt,tt){return yt.test(tt)}function Ye(yt,tt){return!We(yt,tt)}var Ue=0;me.STATE={BEGIN:Ue++,BEGIN_WHITESPACE:Ue++,TEXT:Ue++,TEXT_ENTITY:Ue++,OPEN_WAKA:Ue++,SGML_DECL:Ue++,SGML_DECL_QUOTED:Ue++,DOCTYPE:Ue++,DOCTYPE_QUOTED:Ue++,DOCTYPE_DTD:Ue++,DOCTYPE_DTD_QUOTED:Ue++,COMMENT_STARTING:Ue++,COMMENT:Ue++,COMMENT_ENDING:Ue++,COMMENT_ENDED:Ue++,CDATA:Ue++,CDATA_ENDING:Ue++,CDATA_ENDING_2:Ue++,PROC_INST:Ue++,PROC_INST_BODY:Ue++,PROC_INST_ENDING:Ue++,OPEN_TAG:Ue++,OPEN_TAG_SLASH:Ue++,ATTRIB:Ue++,ATTRIB_NAME:Ue++,ATTRIB_NAME_SAW_WHITE:Ue++,ATTRIB_VALUE:Ue++,ATTRIB_VALUE_QUOTED:Ue++,ATTRIB_VALUE_CLOSED:Ue++,ATTRIB_VALUE_UNQUOTED:Ue++,ATTRIB_VALUE_ENTITY_Q:Ue++,ATTRIB_VALUE_ENTITY_U:Ue++,CLOSE_TAG:Ue++,CLOSE_TAG_SAW_WHITE:Ue++,SCRIPT:Ue++,SCRIPT_ENDING:Ue++},me.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},me.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(me.ENTITIES).forEach(function(yt){var tt=me.ENTITIES[yt],Ve=typeof tt=="number"?String.fromCharCode(tt):tt;me.ENTITIES[yt]=Ve});for(var Ke in me.STATE)me.STATE[me.STATE[Ke]]=Ke;Ue=me.STATE;function ot(yt,tt,Ve){yt[tt]&&yt[tt](Ve)}function ut(yt,tt,Ve){yt.textNode&&ft(yt),ot(yt,tt,Ve)}function ft(yt){yt.textNode=wt(yt.opt,yt.textNode),yt.textNode&&ot(yt,"ontext",yt.textNode),yt.textNode=""}function wt(yt,tt){return yt.trim&&(tt=tt.trim()),yt.normalize&&(tt=tt.replace(/\s+/g," ")),tt}function Je(yt,tt){return ft(yt),yt.trackPosition&&(tt+=`
Line: `+yt.line+`
Column: `+yt.column+`
Char: `+yt.c),tt=new Error(tt),yt.error=tt,ot(yt,"onerror",tt),yt}function nt(yt){return yt.sawRoot&&!yt.closedRoot&&xt(yt,"Unclosed root tag"),yt.state!==Ue.BEGIN&&yt.state!==Ue.BEGIN_WHITESPACE&&yt.state!==Ue.TEXT&&Je(yt,"Unexpected end"),ft(yt),yt.c="",yt.closed=!0,ot(yt,"onend"),Ce.call(yt,yt.strict,yt.opt),yt}function xt(yt,tt){if(typeof yt!="object"||!(yt instanceof Ce))throw new Error("bad call to strictFail");yt.strict&&Je(yt,tt)}function Pt(yt){yt.strict||(yt.tagName=yt.tagName[yt.looseCase]());var tt=yt.tags[yt.tags.length-1]||yt,Ve=yt.tag={name:yt.tagName,attributes:{}};yt.opt.xmlns&&(Ve.ns=tt.ns),yt.attribList.length=0,ut(yt,"onopentagstart",Ve)}function Ct(yt,tt){var Ve=yt.indexOf(":"),xe=Ve<0?["",yt]:yt.split(":"),Le=xe[0],Xe=xe[1];return tt&&yt==="xmlns"&&(Le="xmlns",Xe=""),{prefix:Le,local:Xe}}function gt(yt){if(yt.strict||(yt.attribName=yt.attribName[yt.looseCase]()),yt.attribList.indexOf(yt.attribName)!==-1||yt.tag.attributes.hasOwnProperty(yt.attribName)){yt.attribName=yt.attribValue="";return}if(yt.opt.xmlns){var tt=Ct(yt.attribName,!0),Ve=tt.prefix,xe=tt.local;if(Ve==="xmlns")if(xe==="xml"&&yt.attribValue!==le)xt(yt,"xml: prefix must be bound to "+le+`
Actual: `+yt.attribValue);else if(xe==="xmlns"&&yt.attribValue!==ue)xt(yt,"xmlns: prefix must be bound to "+ue+`
Actual: `+yt.attribValue);else{var Le=yt.tag,Xe=yt.tags[yt.tags.length-1]||yt;Le.ns===Xe.ns&&(Le.ns=Object.create(Xe.ns)),Le.ns[xe]=yt.attribValue}yt.attribList.push([yt.attribName,yt.attribValue])}else yt.tag.attributes[yt.attribName]=yt.attribValue,ut(yt,"onattribute",{name:yt.attribName,value:yt.attribValue});yt.attribName=yt.attribValue=""}function dt(yt,tt){if(yt.opt.xmlns){var Ve=yt.tag,xe=Ct(yt.tagName);Ve.prefix=xe.prefix,Ve.local=xe.local,Ve.uri=Ve.ns[xe.prefix]||"",Ve.prefix&&!Ve.uri&&(xt(yt,"Unbound namespace prefix: "+JSON.stringify(yt.tagName)),Ve.uri=xe.prefix);var Le=yt.tags[yt.tags.length-1]||yt;Ve.ns&&Le.ns!==Ve.ns&&Object.keys(Ve.ns).forEach(function(It){ut(yt,"onopennamespace",{prefix:It,uri:Ve.ns[It]})});for(var Xe=0,rt=yt.attribList.length;Xe<rt;Xe++){var Ie=yt.attribList[Xe],_e=Ie[0],He=Ie[1],Qe=Ct(_e,!0),ct=Qe.prefix,at=Qe.local,At=ct===""?"":Ve.ns[ct]||"",Lt={name:_e,value:He,prefix:ct,local:at,uri:At};ct&&ct!=="xmlns"&&!At&&(xt(yt,"Unbound namespace prefix: "+JSON.stringify(ct)),Lt.uri=ct),yt.tag.attributes[_e]=Lt,ut(yt,"onattribute",Lt)}yt.attribList.length=0}yt.tag.isSelfClosing=!!tt,yt.sawRoot=!0,yt.tags.push(yt.tag),ut(yt,"onopentag",yt.tag),tt||(!yt.noscript&&yt.tagName.toLowerCase()==="script"?yt.state=Ue.SCRIPT:yt.state=Ue.TEXT,yt.tag=null,yt.tagName=""),yt.attribName=yt.attribValue="",yt.attribList.length=0}function ht(yt){if(!yt.tagName){xt(yt,"Weird empty close tag."),yt.textNode+="</>",yt.state=Ue.TEXT;return}if(yt.script){if(yt.tagName!=="script"){yt.script+="</"+yt.tagName+">",yt.tagName="",yt.state=Ue.SCRIPT;return}ut(yt,"onscript",yt.script),yt.script=""}var tt=yt.tags.length,Ve=yt.tagName;yt.strict||(Ve=Ve[yt.looseCase]());for(var xe=Ve;tt--;){var Le=yt.tags[tt];if(Le.name!==xe)xt(yt,"Unexpected close tag");else break}if(tt<0){xt(yt,"Unmatched closing tag: "+yt.tagName),yt.textNode+="</"+yt.tagName+">",yt.state=Ue.TEXT;return}yt.tagName=Ve;for(var Xe=yt.tags.length;Xe-- >tt;){var rt=yt.tag=yt.tags.pop();yt.tagName=yt.tag.name,ut(yt,"onclosetag",yt.tagName);var Ie={};for(var _e in rt.ns)Ie[_e]=rt.ns[_e];var He=yt.tags[yt.tags.length-1]||yt;yt.opt.xmlns&&rt.ns!==He.ns&&Object.keys(rt.ns).forEach(function(Qe){var ct=rt.ns[Qe];ut(yt,"onclosenamespace",{prefix:Qe,uri:ct})})}tt===0&&(yt.closedRoot=!0),yt.tagName=yt.attribValue=yt.attribName="",yt.attribList.length=0,yt.state=Ue.TEXT}function Et(yt){var tt=yt.entity,Ve=tt.toLowerCase(),xe,Le="";return yt.ENTITIES[tt]?yt.ENTITIES[tt]:yt.ENTITIES[Ve]?yt.ENTITIES[Ve]:(tt=Ve,tt.charAt(0)==="#"&&(tt.charAt(1)==="x"?(tt=tt.slice(2),xe=parseInt(tt,16),Le=xe.toString(16)):(tt=tt.slice(1),xe=parseInt(tt,10),Le=xe.toString(10))),tt=tt.replace(/^0+/,""),isNaN(xe)||Le.toLowerCase()!==tt?(xt(yt,"Invalid character entity"),"&"+yt.entity+";"):String.fromCodePoint(xe))}function St(yt,tt){tt==="<"?(yt.state=Ue.OPEN_WAKA,yt.startTagPosition=yt.position):Ne(tt)||(xt(yt,"Non-whitespace before first tag."),yt.textNode=tt,yt.state=Ue.TEXT)}function Ft(yt,tt){var Ve="";return tt<yt.length&&(Ve=yt.charAt(tt)),Ve}function mt(yt){var tt=this;if(this.error)throw this.error;if(tt.closed)return Je(tt,"Cannot write after close. Assign an onready handler.");if(yt===null)return nt(tt);typeof yt=="object"&&(yt=yt.toString());for(var Ve=0,xe="";xe=Ft(yt,Ve++),tt.c=xe,!!xe;)switch(tt.trackPosition&&(tt.position++,xe===`
`?(tt.line++,tt.column=0):tt.column++),tt.state){case Ue.BEGIN:if(tt.state=Ue.BEGIN_WHITESPACE,xe==="\uFEFF")continue;St(tt,xe);continue;case Ue.BEGIN_WHITESPACE:St(tt,xe);continue;case Ue.TEXT:if(tt.sawRoot&&!tt.closedRoot){for(var Le=Ve-1;xe&&xe!=="<"&&xe!=="&";)xe=Ft(yt,Ve++),xe&&tt.trackPosition&&(tt.position++,xe===`
`?(tt.line++,tt.column=0):tt.column++);tt.textNode+=yt.substring(Le,Ve-1)}xe==="<"&&!(tt.sawRoot&&tt.closedRoot&&!tt.strict)?(tt.state=Ue.OPEN_WAKA,tt.startTagPosition=tt.position):(!Ne(xe)&&(!tt.sawRoot||tt.closedRoot)&&xt(tt,"Text data outside of root node."),xe==="&"?tt.state=Ue.TEXT_ENTITY:tt.textNode+=xe);continue;case Ue.SCRIPT:xe==="<"?tt.state=Ue.SCRIPT_ENDING:tt.script+=xe;continue;case Ue.SCRIPT_ENDING:xe==="/"?tt.state=Ue.CLOSE_TAG:(tt.script+="<"+xe,tt.state=Ue.SCRIPT);continue;case Ue.OPEN_WAKA:if(xe==="!")tt.state=Ue.SGML_DECL,tt.sgmlDecl="";else if(!Ne(xe))if(We(Pe,xe))tt.state=Ue.OPEN_TAG,tt.tagName=xe;else if(xe==="/")tt.state=Ue.CLOSE_TAG,tt.tagName="";else if(xe==="?")tt.state=Ue.PROC_INST,tt.procInstName=tt.procInstBody="";else{if(xt(tt,"Unencoded <"),tt.startTagPosition+1<tt.position){var Xe=tt.position-tt.startTagPosition;xe=new Array(Xe).join(" ")+xe}tt.textNode+="<"+xe,tt.state=Ue.TEXT}continue;case Ue.SGML_DECL:(tt.sgmlDecl+xe).toUpperCase()===ae?(ut(tt,"onopencdata"),tt.state=Ue.CDATA,tt.sgmlDecl="",tt.cdata=""):tt.sgmlDecl+xe==="--"?(tt.state=Ue.COMMENT,tt.comment="",tt.sgmlDecl=""):(tt.sgmlDecl+xe).toUpperCase()===ie?(tt.state=Ue.DOCTYPE,(tt.doctype||tt.sawRoot)&&xt(tt,"Inappropriately located doctype declaration"),tt.doctype="",tt.sgmlDecl=""):xe===">"?(ut(tt,"onsgmldeclaration",tt.sgmlDecl),tt.sgmlDecl="",tt.state=Ue.TEXT):(Ae(xe)&&(tt.state=Ue.SGML_DECL_QUOTED),tt.sgmlDecl+=xe);continue;case Ue.SGML_DECL_QUOTED:xe===tt.q&&(tt.state=Ue.SGML_DECL,tt.q=""),tt.sgmlDecl+=xe;continue;case Ue.DOCTYPE:xe===">"?(tt.state=Ue.TEXT,ut(tt,"ondoctype",tt.doctype),tt.doctype=!0):(tt.doctype+=xe,xe==="["?tt.state=Ue.DOCTYPE_DTD:Ae(xe)&&(tt.state=Ue.DOCTYPE_QUOTED,tt.q=xe));continue;case Ue.DOCTYPE_QUOTED:tt.doctype+=xe,xe===tt.q&&(tt.q="",tt.state=Ue.DOCTYPE);continue;case Ue.DOCTYPE_DTD:tt.doctype+=xe,xe==="]"?tt.state=Ue.DOCTYPE:Ae(xe)&&(tt.state=Ue.DOCTYPE_DTD_QUOTED,tt.q=xe);continue;case Ue.DOCTYPE_DTD_QUOTED:tt.doctype+=xe,xe===tt.q&&(tt.state=Ue.DOCTYPE_DTD,tt.q="");continue;case Ue.COMMENT:xe==="-"?tt.state=Ue.COMMENT_ENDING:tt.comment+=xe;continue;case Ue.COMMENT_ENDING:xe==="-"?(tt.state=Ue.COMMENT_ENDED,tt.comment=wt(tt.opt,tt.comment),tt.comment&&ut(tt,"oncomment",tt.comment),tt.comment=""):(tt.comment+="-"+xe,tt.state=Ue.COMMENT);continue;case Ue.COMMENT_ENDED:xe!==">"?(xt(tt,"Malformed comment"),tt.comment+="--"+xe,tt.state=Ue.COMMENT):tt.state=Ue.TEXT;continue;case Ue.CDATA:xe==="]"?tt.state=Ue.CDATA_ENDING:tt.cdata+=xe;continue;case Ue.CDATA_ENDING:xe==="]"?tt.state=Ue.CDATA_ENDING_2:(tt.cdata+="]"+xe,tt.state=Ue.CDATA);continue;case Ue.CDATA_ENDING_2:xe===">"?(tt.cdata&&ut(tt,"oncdata",tt.cdata),ut(tt,"onclosecdata"),tt.cdata="",tt.state=Ue.TEXT):xe==="]"?tt.cdata+="]":(tt.cdata+="]]"+xe,tt.state=Ue.CDATA);continue;case Ue.PROC_INST:xe==="?"?tt.state=Ue.PROC_INST_ENDING:Ne(xe)?tt.state=Ue.PROC_INST_BODY:tt.procInstName+=xe;continue;case Ue.PROC_INST_BODY:if(!tt.procInstBody&&Ne(xe))continue;xe==="?"?tt.state=Ue.PROC_INST_ENDING:tt.procInstBody+=xe;continue;case Ue.PROC_INST_ENDING:xe===">"?(ut(tt,"onprocessinginstruction",{name:tt.procInstName,body:tt.procInstBody}),tt.procInstName=tt.procInstBody="",tt.state=Ue.TEXT):(tt.procInstBody+="?"+xe,tt.state=Ue.PROC_INST_BODY);continue;case Ue.OPEN_TAG:We(je,xe)?tt.tagName+=xe:(Pt(tt),xe===">"?dt(tt):xe==="/"?tt.state=Ue.OPEN_TAG_SLASH:(Ne(xe)||xt(tt,"Invalid character in tag name"),tt.state=Ue.ATTRIB));continue;case Ue.OPEN_TAG_SLASH:xe===">"?(dt(tt,!0),ht(tt)):(xt(tt,"Forward-slash in opening tag not followed by >"),tt.state=Ue.ATTRIB);continue;case Ue.ATTRIB:if(Ne(xe))continue;xe===">"?dt(tt):xe==="/"?tt.state=Ue.OPEN_TAG_SLASH:We(Pe,xe)?(tt.attribName=xe,tt.attribValue="",tt.state=Ue.ATTRIB_NAME):xt(tt,"Invalid attribute name");continue;case Ue.ATTRIB_NAME:xe==="="?tt.state=Ue.ATTRIB_VALUE:xe===">"?(xt(tt,"Attribute without value"),tt.attribValue=tt.attribName,gt(tt),dt(tt)):Ne(xe)?tt.state=Ue.ATTRIB_NAME_SAW_WHITE:We(je,xe)?tt.attribName+=xe:xt(tt,"Invalid attribute name");continue;case Ue.ATTRIB_NAME_SAW_WHITE:if(xe==="=")tt.state=Ue.ATTRIB_VALUE;else{if(Ne(xe))continue;xt(tt,"Attribute without value"),tt.tag.attributes[tt.attribName]="",tt.attribValue="",ut(tt,"onattribute",{name:tt.attribName,value:""}),tt.attribName="",xe===">"?dt(tt):We(Pe,xe)?(tt.attribName=xe,tt.state=Ue.ATTRIB_NAME):(xt(tt,"Invalid attribute name"),tt.state=Ue.ATTRIB)}continue;case Ue.ATTRIB_VALUE:if(Ne(xe))continue;Ae(xe)?(tt.q=xe,tt.state=Ue.ATTRIB_VALUE_QUOTED):(xt(tt,"Unquoted attribute value"),tt.state=Ue.ATTRIB_VALUE_UNQUOTED,tt.attribValue=xe);continue;case Ue.ATTRIB_VALUE_QUOTED:if(xe!==tt.q){xe==="&"?tt.state=Ue.ATTRIB_VALUE_ENTITY_Q:tt.attribValue+=xe;continue}gt(tt),tt.q="",tt.state=Ue.ATTRIB_VALUE_CLOSED;continue;case Ue.ATTRIB_VALUE_CLOSED:Ne(xe)?tt.state=Ue.ATTRIB:xe===">"?dt(tt):xe==="/"?tt.state=Ue.OPEN_TAG_SLASH:We(Pe,xe)?(xt(tt,"No whitespace between attributes"),tt.attribName=xe,tt.attribValue="",tt.state=Ue.ATTRIB_NAME):xt(tt,"Invalid attribute name");continue;case Ue.ATTRIB_VALUE_UNQUOTED:if(!Re(xe)){xe==="&"?tt.state=Ue.ATTRIB_VALUE_ENTITY_U:tt.attribValue+=xe;continue}gt(tt),xe===">"?dt(tt):tt.state=Ue.ATTRIB;continue;case Ue.CLOSE_TAG:if(tt.tagName)xe===">"?ht(tt):We(je,xe)?tt.tagName+=xe:tt.script?(tt.script+="</"+tt.tagName,tt.tagName="",tt.state=Ue.SCRIPT):(Ne(xe)||xt(tt,"Invalid tagname in closing tag"),tt.state=Ue.CLOSE_TAG_SAW_WHITE);else{if(Ne(xe))continue;Ye(Pe,xe)?tt.script?(tt.script+="</"+xe,tt.state=Ue.SCRIPT):xt(tt,"Invalid tagname in closing tag."):tt.tagName=xe}continue;case Ue.CLOSE_TAG_SAW_WHITE:if(Ne(xe))continue;xe===">"?ht(tt):xt(tt,"Invalid characters in closing tag");continue;case Ue.TEXT_ENTITY:case Ue.ATTRIB_VALUE_ENTITY_Q:case Ue.ATTRIB_VALUE_ENTITY_U:var rt,Ie;switch(tt.state){case Ue.TEXT_ENTITY:rt=Ue.TEXT,Ie="textNode";break;case Ue.ATTRIB_VALUE_ENTITY_Q:rt=Ue.ATTRIB_VALUE_QUOTED,Ie="attribValue";break;case Ue.ATTRIB_VALUE_ENTITY_U:rt=Ue.ATTRIB_VALUE_UNQUOTED,Ie="attribValue";break}xe===";"?(tt[Ie]+=Et(tt),tt.entity="",tt.state=rt):We(tt.entity.length?Fe:Be,xe)?tt.entity+=xe:(xt(tt,"Invalid character in entity name"),tt[Ie]+="&"+tt.entity+xe,tt.entity="",tt.state=rt);continue;default:throw new Error(tt,"Unknown state: "+tt.state)}return tt.position>=tt.bufferCheckPosition&&Se(tt),tt}String.fromCodePoint||function(){var yt=String.fromCharCode,tt=Math.floor,Ve=function(){var xe=16384,Le=[],Xe,rt,Ie=-1,_e=arguments.length;if(!_e)return"";for(var He="";++Ie<_e;){var Qe=Number(arguments[Ie]);if(!isFinite(Qe)||Qe<0||Qe>1114111||tt(Qe)!==Qe)throw RangeError("Invalid code point: "+Qe);Qe<=65535?Le.push(Qe):(Qe-=65536,Xe=(Qe>>10)+55296,rt=Qe%1024+56320,Le.push(Xe,rt)),(Ie+1===_e||Le.length>xe)&&(He+=yt.apply(null,Le),Le.length=0)}return He};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:Ve,configurable:!0,writable:!0}):String.fromCodePoint=Ve}()})(typeof De=="undefined"?this.sax={}:De)}).call(this)}).call(this,oe("buffer").Buffer)},{buffer:90,stream:398,string_decoder:413}],398:[function(oe,Ge,De){Ge.exports=ke;var fe=oe("events").EventEmitter,me=oe("inherits");me(ke,fe),ke.Readable=oe("readable-stream/lib/_stream_readable.js"),ke.Writable=oe("readable-stream/lib/_stream_writable.js"),ke.Duplex=oe("readable-stream/lib/_stream_duplex.js"),ke.Transform=oe("readable-stream/lib/_stream_transform.js"),ke.PassThrough=oe("readable-stream/lib/_stream_passthrough.js"),ke.finished=oe("readable-stream/lib/internal/streams/end-of-stream.js"),ke.pipeline=oe("readable-stream/lib/internal/streams/pipeline.js"),ke.Stream=ke;function ke(){fe.call(this)}ke.prototype.pipe=function(Ce,Se){var Me=this;function ve(le){Ce.writable&&Ce.write(le)===!1&&Me.pause&&Me.pause()}Me.on("data",ve);function we(){Me.readable&&Me.resume&&Me.resume()}Ce.on("drain",we),!Ce._isStdio&&(!Se||Se.end!==!1)&&(Me.on("end",z),Me.on("close",ee));var de=!1;function z(){de||(de=!0,Ce.end())}function ee(){de||(de=!0,typeof Ce.destroy=="function"&&Ce.destroy())}function ae(le){if(ie(),fe.listenerCount(this,"error")===0)throw le}Me.on("error",ae),Ce.on("error",ae);function ie(){Me.removeListener("data",ve),Ce.removeListener("drain",we),Me.removeListener("end",z),Me.removeListener("close",ee),Me.removeListener("error",ae),Ce.removeListener("error",ae),Me.removeListener("end",ie),Me.removeListener("close",ie),Ce.removeListener("close",ie)}return Me.on("end",ie),Me.on("close",ie),Ce.on("close",ie),Ce.emit("pipe",Me),Ce}},{events:344,inherits:364,"readable-stream/lib/_stream_duplex.js":400,"readable-stream/lib/_stream_passthrough.js":401,"readable-stream/lib/_stream_readable.js":402,"readable-stream/lib/_stream_transform.js":403,"readable-stream/lib/_stream_writable.js":404,"readable-stream/lib/internal/streams/end-of-stream.js":408,"readable-stream/lib/internal/streams/pipeline.js":410}],399:[function(oe,Ge,De){"use strict";function fe(we,de){we.prototype=Object.create(de.prototype),we.prototype.constructor=we,we.__proto__=de}var me={};function ke(we,de,z){z||(z=Error);function ee(ie,le,ue){return typeof de=="string"?de:de(ie,le,ue)}var ae=function(ie){fe(le,ie);function le(ue,ge,Pe){return ie.call(this,ee(ue,ge,Pe))||this}return le}(z);ae.prototype.name=z.name,ae.prototype.code=we,me[we]=ae}function Ce(we,de){if(Array.isArray(we)){var z=we.length;return we=we.map(function(ee){return String(ee)}),z>2?"one of ".concat(de," ").concat(we.slice(0,z-1).join(", "),", or ")+we[z-1]:z===2?"one of ".concat(de," ").concat(we[0]," or ").concat(we[1]):"of ".concat(de," ").concat(we[0])}else return"of ".concat(de," ").concat(String(we))}function Se(we,de,z){return we.substr(!z||z<0?0:+z,de.length)===de}function Me(we,de,z){return(z===void 0||z>we.length)&&(z=we.length),we.substring(z-de.length,z)===de}function ve(we,de,z){return typeof z!="number"&&(z=0),z+de.length>we.length?!1:we.indexOf(de,z)!==-1}ke("ERR_INVALID_OPT_VALUE",function(we,de){return'The value "'+de+'" is invalid for option "'+we+'"'},TypeError),ke("ERR_INVALID_ARG_TYPE",function(we,de,z){var ee;typeof de=="string"&&Se(de,"not ")?(ee="must not be",de=de.replace(/^not /,"")):ee="must be";var ae;if(Me(we," argument"))ae="The ".concat(we," ").concat(ee," ").concat(Ce(de,"type"));else{var ie=ve(we,".")?"property":"argument";ae='The "'.concat(we,'" ').concat(ie," ").concat(ee," ").concat(Ce(de,"type"))}return ae+=". Received type ".concat(typeof z),ae},TypeError),ke("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),ke("ERR_METHOD_NOT_IMPLEMENTED",function(we){return"The "+we+" method is not implemented"}),ke("ERR_STREAM_PREMATURE_CLOSE","Premature close"),ke("ERR_STREAM_DESTROYED",function(we){return"Cannot call "+we+" after a stream was destroyed"}),ke("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),ke("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),ke("ERR_STREAM_WRITE_AFTER_END","write after end"),ke("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),ke("ERR_UNKNOWN_ENCODING",function(we){return"Unknown encoding: "+we},TypeError),ke("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Ge.exports.codes=me},{}],400:[function(oe,Ge,De){(function(fe){(function(){"use strict";var me=Object.keys||function(ee){var ae=[];for(var ie in ee)ae.push(ie);return ae};Ge.exports=we;var ke=oe("./_stream_readable"),Ce=oe("./_stream_writable");oe("inherits")(we,ke);for(var Se=me(Ce.prototype),Me=0;Me<Se.length;Me++){var ve=Se[Me];we.prototype[ve]||(we.prototype[ve]=Ce.prototype[ve])}function we(ee){if(!(this instanceof we))return new we(ee);ke.call(this,ee),Ce.call(this,ee),this.allowHalfOpen=!0,ee&&(ee.readable===!1&&(this.readable=!1),ee.writable===!1&&(this.writable=!1),ee.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",de)))}Object.defineProperty(we.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(we.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(we.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function de(){this._writableState.ended||fe.nextTick(z,this)}function z(ee){ee.end()}Object.defineProperty(we.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(ae){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=ae,this._writableState.destroyed=ae)}})}).call(this)}).call(this,oe("_process"))},{"./_stream_readable":402,"./_stream_writable":404,_process:467,inherits:364}],401:[function(oe,Ge,De){"use strict";Ge.exports=me;var fe=oe("./_stream_transform");oe("inherits")(me,fe);function me(ke){if(!(this instanceof me))return new me(ke);fe.call(this,ke)}me.prototype._transform=function(ke,Ce,Se){Se(null,ke)}},{"./_stream_transform":403,inherits:364}],402:[function(oe,Ge,De){(function(fe,me){(function(){"use strict";Ge.exports=ut;var ke;ut.ReadableState=ot;var Ce=oe("events").EventEmitter,Se=function(_e,He){return _e.listeners(He).length},Me=oe("./internal/streams/stream"),ve=oe("buffer").Buffer,we=(typeof me!="undefined"?me:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function de(Ie){return ve.from(Ie)}function z(Ie){return ve.isBuffer(Ie)||Ie instanceof we}var ee=oe("util"),ae;ee&&ee.debuglog?ae=ee.debuglog("stream"):ae=function(){};var ie=oe("./internal/streams/buffer_list"),le=oe("./internal/streams/destroy"),ue=oe("./internal/streams/state"),ge=ue.getHighWaterMark,Pe=oe("../errors").codes,je=Pe.ERR_INVALID_ARG_TYPE,Be=Pe.ERR_STREAM_PUSH_AFTER_EOF,Fe=Pe.ERR_METHOD_NOT_IMPLEMENTED,Ne=Pe.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Ae,Re,We;oe("inherits")(ut,Me);var Ye=le.errorOrDestroy,Ue=["error","close","destroy","pause","resume"];function Ke(Ie,_e,He){if(typeof Ie.prependListener=="function")return Ie.prependListener(_e,He);!Ie._events||!Ie._events[_e]?Ie.on(_e,He):Array.isArray(Ie._events[_e])?Ie._events[_e].unshift(He):Ie._events[_e]=[He,Ie._events[_e]]}function ot(Ie,_e,He){ke=ke||oe("./_stream_duplex"),Ie=Ie||{},typeof He!="boolean"&&(He=_e instanceof ke),this.objectMode=!!Ie.objectMode,He&&(this.objectMode=this.objectMode||!!Ie.readableObjectMode),this.highWaterMark=ge(this,Ie,"readableHighWaterMark",He),this.buffer=new ie,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=Ie.emitClose!==!1,this.autoDestroy=!!Ie.autoDestroy,this.destroyed=!1,this.defaultEncoding=Ie.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Ie.encoding&&(Ae||(Ae=oe("string_decoder/").StringDecoder),this.decoder=new Ae(Ie.encoding),this.encoding=Ie.encoding)}function ut(Ie){if(ke=ke||oe("./_stream_duplex"),!(this instanceof ut))return new ut(Ie);var _e=this instanceof ke;this._readableState=new ot(Ie,this,_e),this.readable=!0,Ie&&(typeof Ie.read=="function"&&(this._read=Ie.read),typeof Ie.destroy=="function"&&(this._destroy=Ie.destroy)),Me.call(this)}Object.defineProperty(ut.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(_e){this._readableState&&(this._readableState.destroyed=_e)}}),ut.prototype.destroy=le.destroy,ut.prototype._undestroy=le.undestroy,ut.prototype._destroy=function(Ie,_e){_e(Ie)},ut.prototype.push=function(Ie,_e){var He=this._readableState,Qe;return He.objectMode?Qe=!0:typeof Ie=="string"&&(_e=_e||He.defaultEncoding,_e!==He.encoding&&(Ie=ve.from(Ie,_e),_e=""),Qe=!0),ft(this,Ie,_e,!1,Qe)},ut.prototype.unshift=function(Ie){return ft(this,Ie,null,!0,!1)};function ft(Ie,_e,He,Qe,ct){ae("readableAddChunk",_e);var at=Ie._readableState;if(_e===null)at.reading=!1,Ct(Ie,at);else{var At;if(ct||(At=Je(at,_e)),At)Ye(Ie,At);else if(at.objectMode||_e&&_e.length>0)if(typeof _e!="string"&&!at.objectMode&&Object.getPrototypeOf(_e)!==ve.prototype&&(_e=de(_e)),Qe)at.endEmitted?Ye(Ie,new Ne):wt(Ie,at,_e,!0);else if(at.ended)Ye(Ie,new Be);else{if(at.destroyed)return!1;at.reading=!1,at.decoder&&!He?(_e=at.decoder.write(_e),at.objectMode||_e.length!==0?wt(Ie,at,_e,!1):ht(Ie,at)):wt(Ie,at,_e,!1)}else Qe||(at.reading=!1,ht(Ie,at))}return!at.ended&&(at.length<at.highWaterMark||at.length===0)}function wt(Ie,_e,He,Qe){_e.flowing&&_e.length===0&&!_e.sync?(_e.awaitDrain=0,Ie.emit("data",He)):(_e.length+=_e.objectMode?1:He.length,Qe?_e.buffer.unshift(He):_e.buffer.push(He),_e.needReadable&&gt(Ie)),ht(Ie,_e)}function Je(Ie,_e){var He;return!z(_e)&&typeof _e!="string"&&_e!==void 0&&!Ie.objectMode&&(He=new je("chunk",["string","Buffer","Uint8Array"],_e)),He}ut.prototype.isPaused=function(){return this._readableState.flowing===!1},ut.prototype.setEncoding=function(Ie){Ae||(Ae=oe("string_decoder/").StringDecoder);var _e=new Ae(Ie);this._readableState.decoder=_e,this._readableState.encoding=this._readableState.decoder.encoding;for(var He=this._readableState.buffer.head,Qe="";He!==null;)Qe+=_e.write(He.data),He=He.next;return this._readableState.buffer.clear(),Qe!==""&&this._readableState.buffer.push(Qe),this._readableState.length=Qe.length,this};var nt=1073741824;function xt(Ie){return Ie>=nt?Ie=nt:(Ie--,Ie|=Ie>>>1,Ie|=Ie>>>2,Ie|=Ie>>>4,Ie|=Ie>>>8,Ie|=Ie>>>16,Ie++),Ie}function Pt(Ie,_e){return Ie<=0||_e.length===0&&_e.ended?0:_e.objectMode?1:Ie!==Ie?_e.flowing&&_e.length?_e.buffer.head.data.length:_e.length:(Ie>_e.highWaterMark&&(_e.highWaterMark=xt(Ie)),Ie<=_e.length?Ie:_e.ended?_e.length:(_e.needReadable=!0,0))}ut.prototype.read=function(Ie){ae("read",Ie),Ie=parseInt(Ie,10);var _e=this._readableState,He=Ie;if(Ie!==0&&(_e.emittedReadable=!1),Ie===0&&_e.needReadable&&((_e.highWaterMark!==0?_e.length>=_e.highWaterMark:_e.length>0)||_e.ended))return ae("read: emitReadable",_e.length,_e.ended),_e.length===0&&_e.ended?Le(this):gt(this),null;if(Ie=Pt(Ie,_e),Ie===0&&_e.ended)return _e.length===0&&Le(this),null;var Qe=_e.needReadable;ae("need readable",Qe),(_e.length===0||_e.length-Ie<_e.highWaterMark)&&(Qe=!0,ae("length less than watermark",Qe)),_e.ended||_e.reading?(Qe=!1,ae("reading or ended",Qe)):Qe&&(ae("do read"),_e.reading=!0,_e.sync=!0,_e.length===0&&(_e.needReadable=!0),this._read(_e.highWaterMark),_e.sync=!1,_e.reading||(Ie=Pt(He,_e)));var ct;return Ie>0?ct=xe(Ie,_e):ct=null,ct===null?(_e.needReadable=_e.length<=_e.highWaterMark,Ie=0):(_e.length-=Ie,_e.awaitDrain=0),_e.length===0&&(_e.ended||(_e.needReadable=!0),He!==Ie&&_e.ended&&Le(this)),ct!==null&&this.emit("data",ct),ct};function Ct(Ie,_e){if(ae("onEofChunk"),!_e.ended){if(_e.decoder){var He=_e.decoder.end();He&&He.length&&(_e.buffer.push(He),_e.length+=_e.objectMode?1:He.length)}_e.ended=!0,_e.sync?gt(Ie):(_e.needReadable=!1,_e.emittedReadable||(_e.emittedReadable=!0,dt(Ie)))}}function gt(Ie){var _e=Ie._readableState;ae("emitReadable",_e.needReadable,_e.emittedReadable),_e.needReadable=!1,_e.emittedReadable||(ae("emitReadable",_e.flowing),_e.emittedReadable=!0,fe.nextTick(dt,Ie))}function dt(Ie){var _e=Ie._readableState;ae("emitReadable_",_e.destroyed,_e.length,_e.ended),!_e.destroyed&&(_e.length||_e.ended)&&(Ie.emit("readable"),_e.emittedReadable=!1),_e.needReadable=!_e.flowing&&!_e.ended&&_e.length<=_e.highWaterMark,Ve(Ie)}function ht(Ie,_e){_e.readingMore||(_e.readingMore=!0,fe.nextTick(Et,Ie,_e))}function Et(Ie,_e){for(;!_e.reading&&!_e.ended&&(_e.length<_e.highWaterMark||_e.flowing&&_e.length===0);){var He=_e.length;if(ae("maybeReadMore read 0"),Ie.read(0),He===_e.length)break}_e.readingMore=!1}ut.prototype._read=function(Ie){Ye(this,new Fe("_read()"))},ut.prototype.pipe=function(Ie,_e){var He=this,Qe=this._readableState;switch(Qe.pipesCount){case 0:Qe.pipes=Ie;break;case 1:Qe.pipes=[Qe.pipes,Ie];break;default:Qe.pipes.push(Ie);break}Qe.pipesCount+=1,ae("pipe count=%d opts=%j",Qe.pipesCount,_e);var ct=(!_e||_e.end!==!1)&&Ie!==fe.stdout&&Ie!==fe.stderr,at=ct?Lt:Wt;Qe.endEmitted?fe.nextTick(at):He.once("end",at),Ie.on("unpipe",At);function At(En,Pn){ae("onunpipe"),En===He&&Pn&&Pn.hasUnpiped===!1&&(Pn.hasUnpiped=!0,Xt())}function Lt(){ae("onend"),Ie.end()}var It=St(He);Ie.on("drain",It);var Kt=!1;function Xt(){ae("cleanup"),Ie.removeListener("close",ln),Ie.removeListener("finish",tn),Ie.removeListener("drain",It),Ie.removeListener("error",Ut),Ie.removeListener("unpipe",At),He.removeListener("end",Lt),He.removeListener("end",Wt),He.removeListener("data",$t),Kt=!0,Qe.awaitDrain&&(!Ie._writableState||Ie._writableState.needDrain)&&It()}He.on("data",$t);function $t(En){ae("ondata");var Pn=Ie.write(En);ae("dest.write",Pn),Pn===!1&&((Qe.pipesCount===1&&Qe.pipes===Ie||Qe.pipesCount>1&&rt(Qe.pipes,Ie)!==-1)&&!Kt&&(ae("false write response, pause",Qe.awaitDrain),Qe.awaitDrain++),He.pause())}function Ut(En){ae("onerror",En),Wt(),Ie.removeListener("error",Ut),Se(Ie,"error")===0&&Ye(Ie,En)}Ke(Ie,"error",Ut);function ln(){Ie.removeListener("finish",tn),Wt()}Ie.once("close",ln);function tn(){ae("onfinish"),Ie.removeListener("close",ln),Wt()}Ie.once("finish",tn);function Wt(){ae("unpipe"),He.unpipe(Ie)}return Ie.emit("pipe",He),Qe.flowing||(ae("pipe resume"),He.resume()),Ie};function St(Ie){return function(){var He=Ie._readableState;ae("pipeOnDrain",He.awaitDrain),He.awaitDrain&&He.awaitDrain--,He.awaitDrain===0&&Se(Ie,"data")&&(He.flowing=!0,Ve(Ie))}}ut.prototype.unpipe=function(Ie){var _e=this._readableState,He={hasUnpiped:!1};if(_e.pipesCount===0)return this;if(_e.pipesCount===1)return Ie&&Ie!==_e.pipes?this:(Ie||(Ie=_e.pipes),_e.pipes=null,_e.pipesCount=0,_e.flowing=!1,Ie&&Ie.emit("unpipe",this,He),this);if(!Ie){var Qe=_e.pipes,ct=_e.pipesCount;_e.pipes=null,_e.pipesCount=0,_e.flowing=!1;for(var at=0;at<ct;at++)Qe[at].emit("unpipe",this,{hasUnpiped:!1});return this}var At=rt(_e.pipes,Ie);return At===-1?this:(_e.pipes.splice(At,1),_e.pipesCount-=1,_e.pipesCount===1&&(_e.pipes=_e.pipes[0]),Ie.emit("unpipe",this,He),this)},ut.prototype.on=function(Ie,_e){var He=Me.prototype.on.call(this,Ie,_e),Qe=this._readableState;return Ie==="data"?(Qe.readableListening=this.listenerCount("readable")>0,Qe.flowing!==!1&&this.resume()):Ie==="readable"&&!Qe.endEmitted&&!Qe.readableListening&&(Qe.readableListening=Qe.needReadable=!0,Qe.flowing=!1,Qe.emittedReadable=!1,ae("on readable",Qe.length,Qe.reading),Qe.length?gt(this):Qe.reading||fe.nextTick(mt,this)),He},ut.prototype.addListener=ut.prototype.on,ut.prototype.removeListener=function(Ie,_e){var He=Me.prototype.removeListener.call(this,Ie,_e);return Ie==="readable"&&fe.nextTick(Ft,this),He},ut.prototype.removeAllListeners=function(Ie){var _e=Me.prototype.removeAllListeners.apply(this,arguments);return(Ie==="readable"||Ie===void 0)&&fe.nextTick(Ft,this),_e};function Ft(Ie){var _e=Ie._readableState;_e.readableListening=Ie.listenerCount("readable")>0,_e.resumeScheduled&&!_e.paused?_e.flowing=!0:Ie.listenerCount("data")>0&&Ie.resume()}function mt(Ie){ae("readable nexttick read 0"),Ie.read(0)}ut.prototype.resume=function(){var Ie=this._readableState;return Ie.flowing||(ae("resume"),Ie.flowing=!Ie.readableListening,yt(this,Ie)),Ie.paused=!1,this};function yt(Ie,_e){_e.resumeScheduled||(_e.resumeScheduled=!0,fe.nextTick(tt,Ie,_e))}function tt(Ie,_e){ae("resume",_e.reading),_e.reading||Ie.read(0),_e.resumeScheduled=!1,Ie.emit("resume"),Ve(Ie),_e.flowing&&!_e.reading&&Ie.read(0)}ut.prototype.pause=function(){return ae("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ae("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Ve(Ie){var _e=Ie._readableState;for(ae("flow",_e.flowing);_e.flowing&&Ie.read()!==null;);}ut.prototype.wrap=function(Ie){var _e=this,He=this._readableState,Qe=!1;Ie.on("end",function(){if(ae("wrapped end"),He.decoder&&!He.ended){var At=He.decoder.end();At&&At.length&&_e.push(At)}_e.push(null)}),Ie.on("data",function(At){if(ae("wrapped data"),He.decoder&&(At=He.decoder.write(At)),!(He.objectMode&&At==null)&&!(!He.objectMode&&(!At||!At.length))){var Lt=_e.push(At);Lt||(Qe=!0,Ie.pause())}});for(var ct in Ie)this[ct]===void 0&&typeof Ie[ct]=="function"&&(this[ct]=function(Lt){return function(){return Ie[Lt].apply(Ie,arguments)}}(ct));for(var at=0;at<Ue.length;at++)Ie.on(Ue[at],this.emit.bind(this,Ue[at]));return this._read=function(At){ae("wrapped _read",At),Qe&&(Qe=!1,Ie.resume())},this},typeof Symbol=="function"&&(ut.prototype[Symbol.asyncIterator]=function(){return Re===void 0&&(Re=oe("./internal/streams/async_iterator")),Re(this)}),Object.defineProperty(ut.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(ut.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(ut.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(_e){this._readableState&&(this._readableState.flowing=_e)}}),ut._fromList=xe,Object.defineProperty(ut.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function xe(Ie,_e){if(_e.length===0)return null;var He;return _e.objectMode?He=_e.buffer.shift():!Ie||Ie>=_e.length?(_e.decoder?He=_e.buffer.join(""):_e.buffer.length===1?He=_e.buffer.first():He=_e.buffer.concat(_e.length),_e.buffer.clear()):He=_e.buffer.consume(Ie,_e.decoder),He}function Le(Ie){var _e=Ie._readableState;ae("endReadable",_e.endEmitted),_e.endEmitted||(_e.ended=!0,fe.nextTick(Xe,_e,Ie))}function Xe(Ie,_e){if(ae("endReadableNT",Ie.endEmitted,Ie.length),!Ie.endEmitted&&Ie.length===0&&(Ie.endEmitted=!0,_e.readable=!1,_e.emit("end"),Ie.autoDestroy)){var He=_e._writableState;(!He||He.autoDestroy&&He.finished)&&_e.destroy()}}typeof Symbol=="function"&&(ut.from=function(Ie,_e){return We===void 0&&(We=oe("./internal/streams/from")),We(ut,Ie,_e)});function rt(Ie,_e){for(var He=0,Qe=Ie.length;He<Qe;He++)if(Ie[He]===_e)return He;return-1}}).call(this)}).call(this,oe("_process"),typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":399,"./_stream_duplex":400,"./internal/streams/async_iterator":405,"./internal/streams/buffer_list":406,"./internal/streams/destroy":407,"./internal/streams/from":409,"./internal/streams/state":411,"./internal/streams/stream":412,_process:467,buffer:90,events:344,inherits:364,"string_decoder/":413,util:89}],403:[function(oe,Ge,De){"use strict";Ge.exports=we;var fe=oe("../errors").codes,me=fe.ERR_METHOD_NOT_IMPLEMENTED,ke=fe.ERR_MULTIPLE_CALLBACK,Ce=fe.ERR_TRANSFORM_ALREADY_TRANSFORMING,Se=fe.ERR_TRANSFORM_WITH_LENGTH_0,Me=oe("./_stream_duplex");oe("inherits")(we,Me);function ve(ee,ae){var ie=this._transformState;ie.transforming=!1;var le=ie.writecb;if(le===null)return this.emit("error",new ke);ie.writechunk=null,ie.writecb=null,ae!=null&&this.push(ae),le(ee);var ue=this._readableState;ue.reading=!1,(ue.needReadable||ue.length<ue.highWaterMark)&&this._read(ue.highWaterMark)}function we(ee){if(!(this instanceof we))return new we(ee);Me.call(this,ee),this._transformState={afterTransform:ve.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,ee&&(typeof ee.transform=="function"&&(this._transform=ee.transform),typeof ee.flush=="function"&&(this._flush=ee.flush)),this.on("prefinish",de)}function de(){var ee=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(ae,ie){z(ee,ae,ie)}):z(this,null,null)}we.prototype.push=function(ee,ae){return this._transformState.needTransform=!1,Me.prototype.push.call(this,ee,ae)},we.prototype._transform=function(ee,ae,ie){ie(new me("_transform()"))},we.prototype._write=function(ee,ae,ie){var le=this._transformState;if(le.writecb=ie,le.writechunk=ee,le.writeencoding=ae,!le.transforming){var ue=this._readableState;(le.needTransform||ue.needReadable||ue.length<ue.highWaterMark)&&this._read(ue.highWaterMark)}},we.prototype._read=function(ee){var ae=this._transformState;ae.writechunk!==null&&!ae.transforming?(ae.transforming=!0,this._transform(ae.writechunk,ae.writeencoding,ae.afterTransform)):ae.needTransform=!0},we.prototype._destroy=function(ee,ae){Me.prototype._destroy.call(this,ee,function(ie){ae(ie)})};function z(ee,ae,ie){if(ae)return ee.emit("error",ae);if(ie!=null&&ee.push(ie),ee._writableState.length)throw new Se;if(ee._transformState.transforming)throw new Ce;return ee.push(null)}},{"../errors":399,"./_stream_duplex":400,inherits:364}],404:[function(oe,Ge,De){(function(fe,me){(function(){"use strict";Ge.exports=ot;function ke(Ve,xe,Le){this.chunk=Ve,this.encoding=xe,this.callback=Le,this.next=null}function Ce(Ve){var xe=this;this.next=null,this.entry=null,this.finish=function(){tt(xe,Ve)}}var Se;ot.WritableState=Ue;var Me={deprecate:oe("util-deprecate")},ve=oe("./internal/streams/stream"),we=oe("buffer").Buffer,de=(typeof me!="undefined"?me:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function z(Ve){return we.from(Ve)}function ee(Ve){return we.isBuffer(Ve)||Ve instanceof de}var ae=oe("./internal/streams/destroy"),ie=oe("./internal/streams/state"),le=ie.getHighWaterMark,ue=oe("../errors").codes,ge=ue.ERR_INVALID_ARG_TYPE,Pe=ue.ERR_METHOD_NOT_IMPLEMENTED,je=ue.ERR_MULTIPLE_CALLBACK,Be=ue.ERR_STREAM_CANNOT_PIPE,Fe=ue.ERR_STREAM_DESTROYED,Ne=ue.ERR_STREAM_NULL_VALUES,Ae=ue.ERR_STREAM_WRITE_AFTER_END,Re=ue.ERR_UNKNOWN_ENCODING,We=ae.errorOrDestroy;oe("inherits")(ot,ve);function Ye(){}function Ue(Ve,xe,Le){Se=Se||oe("./_stream_duplex"),Ve=Ve||{},typeof Le!="boolean"&&(Le=xe instanceof Se),this.objectMode=!!Ve.objectMode,Le&&(this.objectMode=this.objectMode||!!Ve.writableObjectMode),this.highWaterMark=le(this,Ve,"writableHighWaterMark",Le),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Xe=Ve.decodeStrings===!1;this.decodeStrings=!Xe,this.defaultEncoding=Ve.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(rt){Ct(xe,rt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=Ve.emitClose!==!1,this.autoDestroy=!!Ve.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Ce(this)}Ue.prototype.getBuffer=function(){for(var xe=this.bufferedRequest,Le=[];xe;)Le.push(xe),xe=xe.next;return Le},function(){try{Object.defineProperty(Ue.prototype,"buffer",{get:Me.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(Ve){}}();var Ke;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Ke=Function.prototype[Symbol.hasInstance],Object.defineProperty(ot,Symbol.hasInstance,{value:function(xe){return Ke.call(this,xe)?!0:this!==ot?!1:xe&&xe._writableState instanceof Ue}})):Ke=function(xe){return xe instanceof this};function ot(Ve){Se=Se||oe("./_stream_duplex");var xe=this instanceof Se;if(!xe&&!Ke.call(ot,this))return new ot(Ve);this._writableState=new Ue(Ve,this,xe),this.writable=!0,Ve&&(typeof Ve.write=="function"&&(this._write=Ve.write),typeof Ve.writev=="function"&&(this._writev=Ve.writev),typeof Ve.destroy=="function"&&(this._destroy=Ve.destroy),typeof Ve.final=="function"&&(this._final=Ve.final)),ve.call(this)}ot.prototype.pipe=function(){We(this,new Be)};function ut(Ve,xe){var Le=new Ae;We(Ve,Le),fe.nextTick(xe,Le)}function ft(Ve,xe,Le,Xe){var rt;return Le===null?rt=new Ne:typeof Le!="string"&&!xe.objectMode&&(rt=new ge("chunk",["string","Buffer"],Le)),rt?(We(Ve,rt),fe.nextTick(Xe,rt),!1):!0}ot.prototype.write=function(Ve,xe,Le){var Xe=this._writableState,rt=!1,Ie=!Xe.objectMode&&ee(Ve);return Ie&&!we.isBuffer(Ve)&&(Ve=z(Ve)),typeof xe=="function"&&(Le=xe,xe=null),Ie?xe="buffer":xe||(xe=Xe.defaultEncoding),typeof Le!="function"&&(Le=Ye),Xe.ending?ut(this,Le):(Ie||ft(this,Xe,Ve,Le))&&(Xe.pendingcb++,rt=Je(this,Xe,Ie,Ve,xe,Le)),rt},ot.prototype.cork=function(){this._writableState.corked++},ot.prototype.uncork=function(){var Ve=this._writableState;Ve.corked&&(Ve.corked--,!Ve.writing&&!Ve.corked&&!Ve.bufferProcessing&&Ve.bufferedRequest&&ht(this,Ve))},ot.prototype.setDefaultEncoding=function(xe){if(typeof xe=="string"&&(xe=xe.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((xe+"").toLowerCase())>-1))throw new Re(xe);return this._writableState.defaultEncoding=xe,this},Object.defineProperty(ot.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function wt(Ve,xe,Le){return!Ve.objectMode&&Ve.decodeStrings!==!1&&typeof xe=="string"&&(xe=we.from(xe,Le)),xe}Object.defineProperty(ot.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Je(Ve,xe,Le,Xe,rt,Ie){if(!Le){var _e=wt(xe,Xe,rt);Xe!==_e&&(Le=!0,rt="buffer",Xe=_e)}var He=xe.objectMode?1:Xe.length;xe.length+=He;var Qe=xe.length<xe.highWaterMark;if(Qe||(xe.needDrain=!0),xe.writing||xe.corked){var ct=xe.lastBufferedRequest;xe.lastBufferedRequest={chunk:Xe,encoding:rt,isBuf:Le,callback:Ie,next:null},ct?ct.next=xe.lastBufferedRequest:xe.bufferedRequest=xe.lastBufferedRequest,xe.bufferedRequestCount+=1}else nt(Ve,xe,!1,He,Xe,rt,Ie);return Qe}function nt(Ve,xe,Le,Xe,rt,Ie,_e){xe.writelen=Xe,xe.writecb=_e,xe.writing=!0,xe.sync=!0,xe.destroyed?xe.onwrite(new Fe("write")):Le?Ve._writev(rt,xe.onwrite):Ve._write(rt,Ie,xe.onwrite),xe.sync=!1}function xt(Ve,xe,Le,Xe,rt){--xe.pendingcb,Le?(fe.nextTick(rt,Xe),fe.nextTick(mt,Ve,xe),Ve._writableState.errorEmitted=!0,We(Ve,Xe)):(rt(Xe),Ve._writableState.errorEmitted=!0,We(Ve,Xe),mt(Ve,xe))}function Pt(Ve){Ve.writing=!1,Ve.writecb=null,Ve.length-=Ve.writelen,Ve.writelen=0}function Ct(Ve,xe){var Le=Ve._writableState,Xe=Le.sync,rt=Le.writecb;if(typeof rt!="function")throw new je;if(Pt(Le),xe)xt(Ve,Le,Xe,xe,rt);else{var Ie=Et(Le)||Ve.destroyed;!Ie&&!Le.corked&&!Le.bufferProcessing&&Le.bufferedRequest&&ht(Ve,Le),Xe?fe.nextTick(gt,Ve,Le,Ie,rt):gt(Ve,Le,Ie,rt)}}function gt(Ve,xe,Le,Xe){Le||dt(Ve,xe),xe.pendingcb--,Xe(),mt(Ve,xe)}function dt(Ve,xe){xe.length===0&&xe.needDrain&&(xe.needDrain=!1,Ve.emit("drain"))}function ht(Ve,xe){xe.bufferProcessing=!0;var Le=xe.bufferedRequest;if(Ve._writev&&Le&&Le.next){var Xe=xe.bufferedRequestCount,rt=new Array(Xe),Ie=xe.corkedRequestsFree;Ie.entry=Le;for(var _e=0,He=!0;Le;)rt[_e]=Le,Le.isBuf||(He=!1),Le=Le.next,_e+=1;rt.allBuffers=He,nt(Ve,xe,!0,xe.length,rt,"",Ie.finish),xe.pendingcb++,xe.lastBufferedRequest=null,Ie.next?(xe.corkedRequestsFree=Ie.next,Ie.next=null):xe.corkedRequestsFree=new Ce(xe),xe.bufferedRequestCount=0}else{for(;Le;){var Qe=Le.chunk,ct=Le.encoding,at=Le.callback,At=xe.objectMode?1:Qe.length;if(nt(Ve,xe,!1,At,Qe,ct,at),Le=Le.next,xe.bufferedRequestCount--,xe.writing)break}Le===null&&(xe.lastBufferedRequest=null)}xe.bufferedRequest=Le,xe.bufferProcessing=!1}ot.prototype._write=function(Ve,xe,Le){Le(new Pe("_write()"))},ot.prototype._writev=null,ot.prototype.end=function(Ve,xe,Le){var Xe=this._writableState;return typeof Ve=="function"?(Le=Ve,Ve=null,xe=null):typeof xe=="function"&&(Le=xe,xe=null),Ve!=null&&this.write(Ve,xe),Xe.corked&&(Xe.corked=1,this.uncork()),Xe.ending||yt(this,Xe,Le),this},Object.defineProperty(ot.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Et(Ve){return Ve.ending&&Ve.length===0&&Ve.bufferedRequest===null&&!Ve.finished&&!Ve.writing}function St(Ve,xe){Ve._final(function(Le){xe.pendingcb--,Le&&We(Ve,Le),xe.prefinished=!0,Ve.emit("prefinish"),mt(Ve,xe)})}function Ft(Ve,xe){!xe.prefinished&&!xe.finalCalled&&(typeof Ve._final=="function"&&!xe.destroyed?(xe.pendingcb++,xe.finalCalled=!0,fe.nextTick(St,Ve,xe)):(xe.prefinished=!0,Ve.emit("prefinish")))}function mt(Ve,xe){var Le=Et(xe);if(Le&&(Ft(Ve,xe),xe.pendingcb===0&&(xe.finished=!0,Ve.emit("finish"),xe.autoDestroy))){var Xe=Ve._readableState;(!Xe||Xe.autoDestroy&&Xe.endEmitted)&&Ve.destroy()}return Le}function yt(Ve,xe,Le){xe.ending=!0,mt(Ve,xe),Le&&(xe.finished?fe.nextTick(Le):Ve.once("finish",Le)),xe.ended=!0,Ve.writable=!1}function tt(Ve,xe,Le){var Xe=Ve.entry;for(Ve.entry=null;Xe;){var rt=Xe.callback;xe.pendingcb--,rt(Le),Xe=Xe.next}xe.corkedRequestsFree.next=Ve}Object.defineProperty(ot.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(xe){this._writableState&&(this._writableState.destroyed=xe)}}),ot.prototype.destroy=ae.destroy,ot.prototype._undestroy=ae.undestroy,ot.prototype._destroy=function(Ve,xe){xe(Ve)}}).call(this)}).call(this,oe("_process"),typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":399,"./_stream_duplex":400,"./internal/streams/destroy":407,"./internal/streams/state":411,"./internal/streams/stream":412,_process:467,buffer:90,inherits:364,"util-deprecate":416}],405:[function(oe,Ge,De){(function(fe){(function(){"use strict";var me;function ke(Ne,Ae,Re){return Ae=Ce(Ae),Ae in Ne?Object.defineProperty(Ne,Ae,{value:Re,enumerable:!0,configurable:!0,writable:!0}):Ne[Ae]=Re,Ne}function Ce(Ne){var Ae=Se(Ne,"string");return typeof Ae=="symbol"?Ae:String(Ae)}function Se(Ne,Ae){if(typeof Ne!="object"||Ne===null)return Ne;var Re=Ne[Symbol.toPrimitive];if(Re!==void 0){var We=Re.call(Ne,Ae||"default");if(typeof We!="object")return We;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Ae==="string"?String:Number)(Ne)}var Me=oe("./end-of-stream"),ve=Symbol("lastResolve"),we=Symbol("lastReject"),de=Symbol("error"),z=Symbol("ended"),ee=Symbol("lastPromise"),ae=Symbol("handlePromise"),ie=Symbol("stream");function le(Ne,Ae){return{value:Ne,done:Ae}}function ue(Ne){var Ae=Ne[ve];if(Ae!==null){var Re=Ne[ie].read();Re!==null&&(Ne[ee]=null,Ne[ve]=null,Ne[we]=null,Ae(le(Re,!1)))}}function ge(Ne){fe.nextTick(ue,Ne)}function Pe(Ne,Ae){return function(Re,We){Ne.then(function(){if(Ae[z]){Re(le(void 0,!0));return}Ae[ae](Re,We)},We)}}var je=Object.getPrototypeOf(function(){}),Be=Object.setPrototypeOf((me={get stream(){return this[ie]},next:function(){var Ae=this,Re=this[de];if(Re!==null)return Promise.reject(Re);if(this[z])return Promise.resolve(le(void 0,!0));if(this[ie].destroyed)return new Promise(function(Ke,ot){fe.nextTick(function(){Ae[de]?ot(Ae[de]):Ke(le(void 0,!0))})});var We=this[ee],Ye;if(We)Ye=new Promise(Pe(We,this));else{var Ue=this[ie].read();if(Ue!==null)return Promise.resolve(le(Ue,!1));Ye=new Promise(this[ae])}return this[ee]=Ye,Ye}},ke(me,Symbol.asyncIterator,function(){return this}),ke(me,"return",function(){var Ae=this;return new Promise(function(Re,We){Ae[ie].destroy(null,function(Ye){if(Ye){We(Ye);return}Re(le(void 0,!0))})})}),me),je),Fe=function(Ae){var Re,We=Object.create(Be,(Re={},ke(Re,ie,{value:Ae,writable:!0}),ke(Re,ve,{value:null,writable:!0}),ke(Re,we,{value:null,writable:!0}),ke(Re,de,{value:null,writable:!0}),ke(Re,z,{value:Ae._readableState.endEmitted,writable:!0}),ke(Re,ae,{value:function(Ue,Ke){var ot=We[ie].read();ot?(We[ee]=null,We[ve]=null,We[we]=null,Ue(le(ot,!1))):(We[ve]=Ue,We[we]=Ke)},writable:!0}),Re));return We[ee]=null,Me(Ae,function(Ye){if(Ye&&Ye.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Ue=We[we];Ue!==null&&(We[ee]=null,We[ve]=null,We[we]=null,Ue(Ye)),We[de]=Ye;return}var Ke=We[ve];Ke!==null&&(We[ee]=null,We[ve]=null,We[we]=null,Ke(le(void 0,!0))),We[z]=!0}),Ae.on("readable",ge.bind(null,We)),We};Ge.exports=Fe}).call(this)}).call(this,oe("_process"))},{"./end-of-stream":408,_process:467}],406:[function(oe,Ge,De){"use strict";function fe(ue,ge){var Pe=Object.keys(ue);if(Object.getOwnPropertySymbols){var je=Object.getOwnPropertySymbols(ue);ge&&(je=je.filter(function(Be){return Object.getOwnPropertyDescriptor(ue,Be).enumerable})),Pe.push.apply(Pe,je)}return Pe}function me(ue){for(var ge=1;ge<arguments.length;ge++){var Pe=arguments[ge]!=null?arguments[ge]:{};ge%2?fe(Object(Pe),!0).forEach(function(je){ke(ue,je,Pe[je])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ue,Object.getOwnPropertyDescriptors(Pe)):fe(Object(Pe)).forEach(function(je){Object.defineProperty(ue,je,Object.getOwnPropertyDescriptor(Pe,je))})}return ue}function ke(ue,ge,Pe){return ge=ve(ge),ge in ue?Object.defineProperty(ue,ge,{value:Pe,enumerable:!0,configurable:!0,writable:!0}):ue[ge]=Pe,ue}function Ce(ue,ge){if(!(ue instanceof ge))throw new TypeError("Cannot call a class as a function")}function Se(ue,ge){for(var Pe=0;Pe<ge.length;Pe++){var je=ge[Pe];je.enumerable=je.enumerable||!1,je.configurable=!0,"value"in je&&(je.writable=!0),Object.defineProperty(ue,ve(je.key),je)}}function Me(ue,ge,Pe){return ge&&Se(ue.prototype,ge),Pe&&Se(ue,Pe),Object.defineProperty(ue,"prototype",{writable:!1}),ue}function ve(ue){var ge=we(ue,"string");return typeof ge=="symbol"?ge:String(ge)}function we(ue,ge){if(typeof ue!="object"||ue===null)return ue;var Pe=ue[Symbol.toPrimitive];if(Pe!==void 0){var je=Pe.call(ue,ge||"default");if(typeof je!="object")return je;throw new TypeError("@@toPrimitive must return a primitive value.")}return(ge==="string"?String:Number)(ue)}var de=oe("buffer"),z=de.Buffer,ee=oe("util"),ae=ee.inspect,ie=ae&&ae.custom||"inspect";function le(ue,ge,Pe){z.prototype.copy.call(ue,ge,Pe)}Ge.exports=function(){function ue(){Ce(this,ue),this.head=null,this.tail=null,this.length=0}return Me(ue,[{key:"push",value:function(Pe){var je={data:Pe,next:null};this.length>0?this.tail.next=je:this.head=je,this.tail=je,++this.length}},{key:"unshift",value:function(Pe){var je={data:Pe,next:this.head};this.length===0&&(this.tail=je),this.head=je,++this.length}},{key:"shift",value:function(){if(this.length!==0){var Pe=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,Pe}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(Pe){if(this.length===0)return"";for(var je=this.head,Be=""+je.data;je=je.next;)Be+=Pe+je.data;return Be}},{key:"concat",value:function(Pe){if(this.length===0)return z.alloc(0);for(var je=z.allocUnsafe(Pe>>>0),Be=this.head,Fe=0;Be;)le(Be.data,je,Fe),Fe+=Be.data.length,Be=Be.next;return je}},{key:"consume",value:function(Pe,je){var Be;return Pe<this.head.data.length?(Be=this.head.data.slice(0,Pe),this.head.data=this.head.data.slice(Pe)):Pe===this.head.data.length?Be=this.shift():Be=je?this._getString(Pe):this._getBuffer(Pe),Be}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(Pe){var je=this.head,Be=1,Fe=je.data;for(Pe-=Fe.length;je=je.next;){var Ne=je.data,Ae=Pe>Ne.length?Ne.length:Pe;if(Ae===Ne.length?Fe+=Ne:Fe+=Ne.slice(0,Pe),Pe-=Ae,Pe===0){Ae===Ne.length?(++Be,je.next?this.head=je.next:this.head=this.tail=null):(this.head=je,je.data=Ne.slice(Ae));break}++Be}return this.length-=Be,Fe}},{key:"_getBuffer",value:function(Pe){var je=z.allocUnsafe(Pe),Be=this.head,Fe=1;for(Be.data.copy(je),Pe-=Be.data.length;Be=Be.next;){var Ne=Be.data,Ae=Pe>Ne.length?Ne.length:Pe;if(Ne.copy(je,je.length-Pe,0,Ae),Pe-=Ae,Pe===0){Ae===Ne.length?(++Fe,Be.next?this.head=Be.next:this.head=this.tail=null):(this.head=Be,Be.data=Ne.slice(Ae));break}++Fe}return this.length-=Fe,je}},{key:ie,value:function(Pe,je){return ae(this,me(me({},je),{},{depth:0,customInspect:!1}))}}]),ue}()},{buffer:90,util:89}],407:[function(oe,Ge,De){(function(fe){(function(){"use strict";function me(we,de){var z=this,ee=this._readableState&&this._readableState.destroyed,ae=this._writableState&&this._writableState.destroyed;return ee||ae?(de?de(we):we&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,fe.nextTick(Me,this,we)):fe.nextTick(Me,this,we)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(we||null,function(ie){!de&&ie?z._writableState?z._writableState.errorEmitted?fe.nextTick(Ce,z):(z._writableState.errorEmitted=!0,fe.nextTick(ke,z,ie)):fe.nextTick(ke,z,ie):de?(fe.nextTick(Ce,z),de(ie)):fe.nextTick(Ce,z)}),this)}function ke(we,de){Me(we,de),Ce(we)}function Ce(we){we._writableState&&!we._writableState.emitClose||we._readableState&&!we._readableState.emitClose||we.emit("close")}function Se(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Me(we,de){we.emit("error",de)}function ve(we,de){var z=we._readableState,ee=we._writableState;z&&z.autoDestroy||ee&&ee.autoDestroy?we.destroy(de):we.emit("error",de)}Ge.exports={destroy:me,undestroy:Se,errorOrDestroy:ve}}).call(this)}).call(this,oe("_process"))},{_process:467}],408:[function(oe,Ge,De){"use strict";var fe=oe("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function me(Me){var ve=!1;return function(){if(!ve){ve=!0;for(var we=arguments.length,de=new Array(we),z=0;z<we;z++)de[z]=arguments[z];Me.apply(this,de)}}}function ke(){}function Ce(Me){return Me.setHeader&&typeof Me.abort=="function"}function Se(Me,ve,we){if(typeof ve=="function")return Se(Me,null,ve);ve||(ve={}),we=me(we||ke);var de=ve.readable||ve.readable!==!1&&Me.readable,z=ve.writable||ve.writable!==!1&&Me.writable,ee=function(){Me.writable||ie()},ae=Me._writableState&&Me._writableState.finished,ie=function(){z=!1,ae=!0,de||we.call(Me)},le=Me._readableState&&Me._readableState.endEmitted,ue=function(){de=!1,le=!0,z||we.call(Me)},ge=function(Fe){we.call(Me,Fe)},Pe=function(){var Fe;if(de&&!le)return(!Me._readableState||!Me._readableState.ended)&&(Fe=new fe),we.call(Me,Fe);if(z&&!ae)return(!Me._writableState||!Me._writableState.ended)&&(Fe=new fe),we.call(Me,Fe)},je=function(){Me.req.on("finish",ie)};return Ce(Me)?(Me.on("complete",ie),Me.on("abort",Pe),Me.req?je():Me.on("request",je)):z&&!Me._writableState&&(Me.on("end",ee),Me.on("close",ee)),Me.on("end",ue),Me.on("finish",ie),ve.error!==!1&&Me.on("error",ge),Me.on("close",Pe),function(){Me.removeListener("complete",ie),Me.removeListener("abort",Pe),Me.removeListener("request",je),Me.req&&Me.req.removeListener("finish",ie),Me.removeListener("end",ee),Me.removeListener("close",ee),Me.removeListener("finish",ie),Me.removeListener("end",ue),Me.removeListener("error",ge),Me.removeListener("close",Pe)}}Ge.exports=Se},{"../../../errors":399}],409:[function(oe,Ge,De){Ge.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],410:[function(oe,Ge,De){"use strict";var fe;function me(ie){var le=!1;return function(){le||(le=!0,ie.apply(void 0,arguments))}}var ke=oe("../../../errors").codes,Ce=ke.ERR_MISSING_ARGS,Se=ke.ERR_STREAM_DESTROYED;function Me(ie){if(ie)throw ie}function ve(ie){return ie.setHeader&&typeof ie.abort=="function"}function we(ie,le,ue,ge){ge=me(ge);var Pe=!1;ie.on("close",function(){Pe=!0}),fe===void 0&&(fe=oe("./end-of-stream")),fe(ie,{readable:le,writable:ue},function(Be){if(Be)return ge(Be);Pe=!0,ge()});var je=!1;return function(Be){if(!Pe&&!je){if(je=!0,ve(ie))return ie.abort();if(typeof ie.destroy=="function")return ie.destroy();ge(Be||new Se("pipe"))}}}function de(ie){ie()}function z(ie,le){return ie.pipe(le)}function ee(ie){return!ie.length||typeof ie[ie.length-1]!="function"?Me:ie.pop()}function ae(){for(var ie=arguments.length,le=new Array(ie),ue=0;ue<ie;ue++)le[ue]=arguments[ue];var ge=ee(le);if(Array.isArray(le[0])&&(le=le[0]),le.length<2)throw new Ce("streams");var Pe,je=le.map(function(Be,Fe){var Ne=Fe<le.length-1,Ae=Fe>0;return we(Be,Ne,Ae,function(Re){Pe||(Pe=Re),Re&&je.forEach(de),!Ne&&(je.forEach(de),ge(Pe))})});return le.reduce(z)}Ge.exports=ae},{"../../../errors":399,"./end-of-stream":408}],411:[function(oe,Ge,De){"use strict";var fe=oe("../../../errors").codes.ERR_INVALID_OPT_VALUE;function me(Ce,Se,Me){return Ce.highWaterMark!=null?Ce.highWaterMark:Se?Ce[Me]:null}function ke(Ce,Se,Me,ve){var we=me(Se,ve,Me);if(we!=null){if(!(isFinite(we)&&Math.floor(we)===we)||we<0){var de=ve?Me:"highWaterMark";throw new fe(de,we)}return Math.floor(we)}return Ce.objectMode?16:16*1024}Ge.exports={getHighWaterMark:ke}},{"../../../errors":399}],412:[function(oe,Ge,De){arguments[4][393][0].apply(De,arguments)},{dup:393,events:344}],413:[function(oe,Ge,De){"use strict";var fe=oe("safe-buffer").Buffer,me=fe.isEncoding||function(je){switch(je=""+je,je&&je.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function ke(je){if(!je)return"utf8";for(var Be;;)switch(je){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return je;default:if(Be)return;je=(""+je).toLowerCase(),Be=!0}}function Ce(je){var Be=ke(je);if(typeof Be!="string"&&(fe.isEncoding===me||!me(je)))throw new Error("Unknown encoding: "+je);return Be||je}De.StringDecoder=Se;function Se(je){this.encoding=Ce(je);var Be;switch(this.encoding){case"utf16le":this.text=ae,this.end=ie,Be=4;break;case"utf8":this.fillLast=de,Be=4;break;case"base64":this.text=le,this.end=ue,Be=3;break;default:this.write=ge,this.end=Pe;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=fe.allocUnsafe(Be)}Se.prototype.write=function(je){if(je.length===0)return"";var Be,Fe;if(this.lastNeed){if(Be=this.fillLast(je),Be===void 0)return"";Fe=this.lastNeed,this.lastNeed=0}else Fe=0;return Fe<je.length?Be?Be+this.text(je,Fe):this.text(je,Fe):Be||""},Se.prototype.end=ee,Se.prototype.text=z,Se.prototype.fillLast=function(je){if(this.lastNeed<=je.length)return je.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);je.copy(this.lastChar,this.lastTotal-this.lastNeed,0,je.length),this.lastNeed-=je.length};function Me(je){return je<=127?0:je>>5===6?2:je>>4===14?3:je>>3===30?4:je>>6===2?-1:-2}function ve(je,Be,Fe){var Ne=Be.length-1;if(Ne<Fe)return 0;var Ae=Me(Be[Ne]);return Ae>=0?(Ae>0&&(je.lastNeed=Ae-1),Ae):--Ne<Fe||Ae===-2?0:(Ae=Me(Be[Ne]),Ae>=0?(Ae>0&&(je.lastNeed=Ae-2),Ae):--Ne<Fe||Ae===-2?0:(Ae=Me(Be[Ne]),Ae>=0?(Ae>0&&(Ae===2?Ae=0:je.lastNeed=Ae-3),Ae):0))}function we(je,Be,Fe){if((Be[0]&192)!==128)return je.lastNeed=0,"\uFFFD";if(je.lastNeed>1&&Be.length>1){if((Be[1]&192)!==128)return je.lastNeed=1,"\uFFFD";if(je.lastNeed>2&&Be.length>2&&(Be[2]&192)!==128)return je.lastNeed=2,"\uFFFD"}}function de(je){var Be=this.lastTotal-this.lastNeed,Fe=we(this,je,Be);if(Fe!==void 0)return Fe;if(this.lastNeed<=je.length)return je.copy(this.lastChar,Be,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);je.copy(this.lastChar,Be,0,je.length),this.lastNeed-=je.length}function z(je,Be){var Fe=ve(this,je,Be);if(!this.lastNeed)return je.toString("utf8",Be);this.lastTotal=Fe;var Ne=je.length-(Fe-this.lastNeed);return je.copy(this.lastChar,0,Ne),je.toString("utf8",Be,Ne)}function ee(je){var Be=je&&je.length?this.write(je):"";return this.lastNeed?Be+"\uFFFD":Be}function ae(je,Be){if((je.length-Be)%2===0){var Fe=je.toString("utf16le",Be);if(Fe){var Ne=Fe.charCodeAt(Fe.length-1);if(Ne>=55296&&Ne<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=je[je.length-2],this.lastChar[1]=je[je.length-1],Fe.slice(0,-1)}return Fe}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=je[je.length-1],je.toString("utf16le",Be,je.length-1)}function ie(je){var Be=je&&je.length?this.write(je):"";if(this.lastNeed){var Fe=this.lastTotal-this.lastNeed;return Be+this.lastChar.toString("utf16le",0,Fe)}return Be}function le(je,Be){var Fe=(je.length-Be)%3;return Fe===0?je.toString("base64",Be):(this.lastNeed=3-Fe,this.lastTotal=3,Fe===1?this.lastChar[0]=je[je.length-1]:(this.lastChar[0]=je[je.length-2],this.lastChar[1]=je[je.length-1]),je.toString("base64",Be,je.length-Fe))}function ue(je){var Be=je&&je.length?this.write(je):"";return this.lastNeed?Be+this.lastChar.toString("base64",0,3-this.lastNeed):Be}function ge(je){return je.toString(this.encoding)}function Pe(je){return je&&je.length?this.write(je):""}},{"safe-buffer":396}],414:[function(oe,Ge,De){(function(fe,me){(function(){var ke=oe("process/browser.js").nextTick,Ce=Function.prototype.apply,Se=Array.prototype.slice,Me={},ve=0;De.setTimeout=function(){return new we(Ce.call(setTimeout,window,arguments),clearTimeout)},De.setInterval=function(){return new we(Ce.call(setInterval,window,arguments),clearInterval)},De.clearTimeout=De.clearInterval=function(de){de.close()};function we(de,z){this._id=de,this._clearFn=z}we.prototype.unref=we.prototype.ref=function(){},we.prototype.close=function(){this._clearFn.call(window,this._id)},De.enroll=function(de,z){clearTimeout(de._idleTimeoutId),de._idleTimeout=z},De.unenroll=function(de){clearTimeout(de._idleTimeoutId),de._idleTimeout=-1},De._unrefActive=De.active=function(de){clearTimeout(de._idleTimeoutId);var z=de._idleTimeout;z>=0&&(de._idleTimeoutId=setTimeout(function(){de._onTimeout&&de._onTimeout()},z))},De.setImmediate=typeof fe=="function"?fe:function(de){var z=ve++,ee=arguments.length<2?!1:Se.call(arguments,1);return Me[z]=!0,ke(function(){Me[z]&&(ee?de.apply(null,ee):de.call(null),De.clearImmediate(z))}),z},De.clearImmediate=typeof me=="function"?me:function(de){delete Me[de]}}).call(this)}).call(this,oe("timers").setImmediate,oe("timers").clearImmediate)},{"process/browser.js":381,timers:414}],415:[function(oe,Ge,De){var fe=oe("buffer").Buffer;Ge.exports=function(me){if(me instanceof Uint8Array){if(me.byteOffset===0&&me.byteLength===me.buffer.byteLength)return me.buffer;if(typeof me.buffer.slice=="function")return me.buffer.slice(me.byteOffset,me.byteOffset+me.byteLength)}if(fe.isBuffer(me)){for(var ke=new Uint8Array(me.length),Ce=me.length,Se=0;Se<Ce;Se++)ke[Se]=me[Se];return ke.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:90}],416:[function(oe,Ge,De){(function(fe){(function(){Ge.exports=me;function me(Ce,Se){if(ke("noDeprecation"))return Ce;var Me=!1;function ve(){if(!Me){if(ke("throwDeprecation"))throw new Error(Se);ke("traceDeprecation")?console.trace(Se):console.warn(Se),Me=!0}return Ce.apply(this,arguments)}return ve}function ke(Ce){try{if(!fe.localStorage)return!1}catch(Me){return!1}var Se=fe.localStorage[Ce];return Se==null?!1:String(Se).toLowerCase()==="true"}}).call(this)}).call(this,typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],417:[function(oe,Ge,De){arguments[4][84][0].apply(De,arguments)},{dup:84}],418:[function(oe,Ge,De){"use strict";var fe=oe("is-arguments"),me=oe("is-generator-function"),ke=oe("which-typed-array"),Ce=oe("is-typed-array");function Se(ct){return ct.call.bind(ct)}var Me=typeof BigInt!="undefined",ve=typeof Symbol!="undefined",we=Se(Object.prototype.toString),de=Se(Number.prototype.valueOf),z=Se(String.prototype.valueOf),ee=Se(Boolean.prototype.valueOf);if(Me)var ae=Se(BigInt.prototype.valueOf);if(ve)var ie=Se(Symbol.prototype.valueOf);function le(ct,at){if(typeof ct!="object")return!1;try{return at(ct),!0}catch(At){return!1}}De.isArgumentsObject=fe,De.isGeneratorFunction=me,De.isTypedArray=Ce;function ue(ct){return typeof Promise!="undefined"&&ct instanceof Promise||ct!==null&&typeof ct=="object"&&typeof ct.then=="function"&&typeof ct.catch=="function"}De.isPromise=ue;function ge(ct){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(ct):Ce(ct)||ht(ct)}De.isArrayBufferView=ge;function Pe(ct){return ke(ct)==="Uint8Array"}De.isUint8Array=Pe;function je(ct){return ke(ct)==="Uint8ClampedArray"}De.isUint8ClampedArray=je;function Be(ct){return ke(ct)==="Uint16Array"}De.isUint16Array=Be;function Fe(ct){return ke(ct)==="Uint32Array"}De.isUint32Array=Fe;function Ne(ct){return ke(ct)==="Int8Array"}De.isInt8Array=Ne;function Ae(ct){return ke(ct)==="Int16Array"}De.isInt16Array=Ae;function Re(ct){return ke(ct)==="Int32Array"}De.isInt32Array=Re;function We(ct){return ke(ct)==="Float32Array"}De.isFloat32Array=We;function Ye(ct){return ke(ct)==="Float64Array"}De.isFloat64Array=Ye;function Ue(ct){return ke(ct)==="BigInt64Array"}De.isBigInt64Array=Ue;function Ke(ct){return ke(ct)==="BigUint64Array"}De.isBigUint64Array=Ke;function ot(ct){return we(ct)==="[object Map]"}ot.working=typeof Map!="undefined"&&ot(new Map);function ut(ct){return typeof Map=="undefined"?!1:ot.working?ot(ct):ct instanceof Map}De.isMap=ut;function ft(ct){return we(ct)==="[object Set]"}ft.working=typeof Set!="undefined"&&ft(new Set);function wt(ct){return typeof Set=="undefined"?!1:ft.working?ft(ct):ct instanceof Set}De.isSet=wt;function Je(ct){return we(ct)==="[object WeakMap]"}Je.working=typeof WeakMap!="undefined"&&Je(new WeakMap);function nt(ct){return typeof WeakMap=="undefined"?!1:Je.working?Je(ct):ct instanceof WeakMap}De.isWeakMap=nt;function xt(ct){return we(ct)==="[object WeakSet]"}xt.working=typeof WeakSet!="undefined"&&xt(new WeakSet);function Pt(ct){return xt(ct)}De.isWeakSet=Pt;function Ct(ct){return we(ct)==="[object ArrayBuffer]"}Ct.working=typeof ArrayBuffer!="undefined"&&Ct(new ArrayBuffer);function gt(ct){return typeof ArrayBuffer=="undefined"?!1:Ct.working?Ct(ct):ct instanceof ArrayBuffer}De.isArrayBuffer=gt;function dt(ct){return we(ct)==="[object DataView]"}dt.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&dt(new DataView(new ArrayBuffer(1),0,1));function ht(ct){return typeof DataView=="undefined"?!1:dt.working?dt(ct):ct instanceof DataView}De.isDataView=ht;var Et=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function St(ct){return we(ct)==="[object SharedArrayBuffer]"}function Ft(ct){return typeof Et=="undefined"?!1:(typeof St.working=="undefined"&&(St.working=St(new Et)),St.working?St(ct):ct instanceof Et)}De.isSharedArrayBuffer=Ft;function mt(ct){return we(ct)==="[object AsyncFunction]"}De.isAsyncFunction=mt;function yt(ct){return we(ct)==="[object Map Iterator]"}De.isMapIterator=yt;function tt(ct){return we(ct)==="[object Set Iterator]"}De.isSetIterator=tt;function Ve(ct){return we(ct)==="[object Generator]"}De.isGeneratorObject=Ve;function xe(ct){return we(ct)==="[object WebAssembly.Module]"}De.isWebAssemblyCompiledModule=xe;function Le(ct){return le(ct,de)}De.isNumberObject=Le;function Xe(ct){return le(ct,z)}De.isStringObject=Xe;function rt(ct){return le(ct,ee)}De.isBooleanObject=rt;function Ie(ct){return Me&&le(ct,ae)}De.isBigIntObject=Ie;function _e(ct){return ve&&le(ct,ie)}De.isSymbolObject=_e;function He(ct){return Le(ct)||Xe(ct)||rt(ct)||Ie(ct)||_e(ct)}De.isBoxedPrimitive=He;function Qe(ct){return typeof Uint8Array!="undefined"&&(gt(ct)||Ft(ct))}De.isAnyArrayBuffer=Qe,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(ct){Object.defineProperty(De,ct,{enumerable:!1,value:function(){throw new Error(ct+" is not supported in userland")}})})},{"is-arguments":365,"is-generator-function":368,"is-typed-array":369,"which-typed-array":420}],419:[function(oe,Ge,De){(function(fe){(function(){var me=Object.getOwnPropertyDescriptors||function(Et){for(var St=Object.keys(Et),Ft={},mt=0;mt<St.length;mt++)Ft[St[mt]]=Object.getOwnPropertyDescriptor(Et,St[mt]);return Ft},ke=/%[sdj%]/g;De.format=function(ht){if(!Ae(ht)){for(var Et=[],St=0;St<arguments.length;St++)Et.push(ve(arguments[St]));return Et.join(" ")}for(var St=1,Ft=arguments,mt=Ft.length,yt=String(ht).replace(ke,function(Ve){if(Ve==="%%")return"%";if(St>=mt)return Ve;switch(Ve){case"%s":return String(Ft[St++]);case"%d":return Number(Ft[St++]);case"%j":try{return JSON.stringify(Ft[St++])}catch(xe){return"[Circular]"}default:return Ve}}),tt=Ft[St];St<mt;tt=Ft[++St])Be(tt)||!Ue(tt)?yt+=" "+tt:yt+=" "+ve(tt);return yt},De.deprecate=function(ht,Et){if(typeof fe!="undefined"&&fe.noDeprecation===!0)return ht;if(typeof fe=="undefined")return function(){return De.deprecate(ht,Et).apply(this,arguments)};var St=!1;function Ft(){if(!St){if(fe.throwDeprecation)throw new Error(Et);fe.traceDeprecation?console.trace(Et):console.error(Et),St=!0}return ht.apply(this,arguments)}return Ft};var Ce={},Se=/^$/;if(fe.env.NODE_DEBUG){var Me=fe.env.NODE_DEBUG;Me=Me.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),Se=new RegExp("^"+Me+"$","i")}De.debuglog=function(ht){if(ht=ht.toUpperCase(),!Ce[ht])if(Se.test(ht)){var Et=fe.pid;Ce[ht]=function(){var St=De.format.apply(De,arguments);console.error("%s %d: %s",ht,Et,St)}}else Ce[ht]=function(){};return Ce[ht]};function ve(ht,Et){var St={seen:[],stylize:de};return arguments.length>=3&&(St.depth=arguments[2]),arguments.length>=4&&(St.colors=arguments[3]),je(Et)?St.showHidden=Et:Et&&De._extend(St,Et),We(St.showHidden)&&(St.showHidden=!1),We(St.depth)&&(St.depth=2),We(St.colors)&&(St.colors=!1),We(St.customInspect)&&(St.customInspect=!0),St.colors&&(St.stylize=we),ee(St,ht,St.depth)}De.inspect=ve,ve.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},ve.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function we(ht,Et){var St=ve.styles[Et];return St?"\x1B["+ve.colors[St][0]+"m"+ht+"\x1B["+ve.colors[St][1]+"m":ht}function de(ht,Et){return ht}function z(ht){var Et={};return ht.forEach(function(St,Ft){Et[St]=!0}),Et}function ee(ht,Et,St){if(ht.customInspect&&Et&&ut(Et.inspect)&&Et.inspect!==De.inspect&&!(Et.constructor&&Et.constructor.prototype===Et)){var Ft=Et.inspect(St,ht);return Ae(Ft)||(Ft=ee(ht,Ft,St)),Ft}var mt=ae(ht,Et);if(mt)return mt;var yt=Object.keys(Et),tt=z(yt);if(ht.showHidden&&(yt=Object.getOwnPropertyNames(Et)),ot(Et)&&(yt.indexOf("message")>=0||yt.indexOf("description")>=0))return ie(Et);if(yt.length===0){if(ut(Et)){var Ve=Et.name?": "+Et.name:"";return ht.stylize("[Function"+Ve+"]","special")}if(Ye(Et))return ht.stylize(RegExp.prototype.toString.call(Et),"regexp");if(Ke(Et))return ht.stylize(Date.prototype.toString.call(Et),"date");if(ot(Et))return ie(Et)}var xe="",Le=!1,Xe=["{","}"];if(Pe(Et)&&(Le=!0,Xe=["[","]"]),ut(Et)){var rt=Et.name?": "+Et.name:"";xe=" [Function"+rt+"]"}if(Ye(Et)&&(xe=" "+RegExp.prototype.toString.call(Et)),Ke(Et)&&(xe=" "+Date.prototype.toUTCString.call(Et)),ot(Et)&&(xe=" "+ie(Et)),yt.length===0&&(!Le||Et.length==0))return Xe[0]+xe+Xe[1];if(St<0)return Ye(Et)?ht.stylize(RegExp.prototype.toString.call(Et),"regexp"):ht.stylize("[Object]","special");ht.seen.push(Et);var Ie;return Le?Ie=le(ht,Et,St,tt,yt):Ie=yt.map(function(_e){return ue(ht,Et,St,tt,_e,Le)}),ht.seen.pop(),ge(Ie,xe,Xe)}function ae(ht,Et){if(We(Et))return ht.stylize("undefined","undefined");if(Ae(Et)){var St="'"+JSON.stringify(Et).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ht.stylize(St,"string")}if(Ne(Et))return ht.stylize(""+Et,"number");if(je(Et))return ht.stylize(""+Et,"boolean");if(Be(Et))return ht.stylize("null","null")}function ie(ht){return"["+Error.prototype.toString.call(ht)+"]"}function le(ht,Et,St,Ft,mt){for(var yt=[],tt=0,Ve=Et.length;tt<Ve;++tt)Pt(Et,String(tt))?yt.push(ue(ht,Et,St,Ft,String(tt),!0)):yt.push("");return mt.forEach(function(xe){xe.match(/^\d+$/)||yt.push(ue(ht,Et,St,Ft,xe,!0))}),yt}function ue(ht,Et,St,Ft,mt,yt){var tt,Ve,xe;if(xe=Object.getOwnPropertyDescriptor(Et,mt)||{value:Et[mt]},xe.get?xe.set?Ve=ht.stylize("[Getter/Setter]","special"):Ve=ht.stylize("[Getter]","special"):xe.set&&(Ve=ht.stylize("[Setter]","special")),Pt(Ft,mt)||(tt="["+mt+"]"),Ve||(ht.seen.indexOf(xe.value)<0?(Be(St)?Ve=ee(ht,xe.value,null):Ve=ee(ht,xe.value,St-1),Ve.indexOf(`
`)>-1&&(yt?Ve=Ve.split(`
`).map(function(Le){return" "+Le}).join(`
`).slice(2):Ve=`
`+Ve.split(`
`).map(function(Le){return" "+Le}).join(`
`))):Ve=ht.stylize("[Circular]","special")),We(tt)){if(yt&&mt.match(/^\d+$/))return Ve;tt=JSON.stringify(""+mt),tt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(tt=tt.slice(1,-1),tt=ht.stylize(tt,"name")):(tt=tt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),tt=ht.stylize(tt,"string"))}return tt+": "+Ve}function ge(ht,Et,St){var Ft=0,mt=ht.reduce(function(yt,tt){return Ft++,tt.indexOf(`
`)>=0&&Ft++,yt+tt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return mt>60?St[0]+(Et===""?"":Et+`
`)+" "+ht.join(`,
`)+" "+St[1]:St[0]+Et+" "+ht.join(", ")+" "+St[1]}De.types=oe("./support/types");function Pe(ht){return Array.isArray(ht)}De.isArray=Pe;function je(ht){return typeof ht=="boolean"}De.isBoolean=je;function Be(ht){return ht===null}De.isNull=Be;function Fe(ht){return ht==null}De.isNullOrUndefined=Fe;function Ne(ht){return typeof ht=="number"}De.isNumber=Ne;function Ae(ht){return typeof ht=="string"}De.isString=Ae;function Re(ht){return typeof ht=="symbol"}De.isSymbol=Re;function We(ht){return ht===void 0}De.isUndefined=We;function Ye(ht){return Ue(ht)&&wt(ht)==="[object RegExp]"}De.isRegExp=Ye,De.types.isRegExp=Ye;function Ue(ht){return typeof ht=="object"&&ht!==null}De.isObject=Ue;function Ke(ht){return Ue(ht)&&wt(ht)==="[object Date]"}De.isDate=Ke,De.types.isDate=Ke;function ot(ht){return Ue(ht)&&(wt(ht)==="[object Error]"||ht instanceof Error)}De.isError=ot,De.types.isNativeError=ot;function ut(ht){return typeof ht=="function"}De.isFunction=ut;function ft(ht){return ht===null||typeof ht=="boolean"||typeof ht=="number"||typeof ht=="string"||typeof ht=="symbol"||typeof ht=="undefined"}De.isPrimitive=ft,De.isBuffer=oe("./support/isBuffer");function wt(ht){return Object.prototype.toString.call(ht)}function Je(ht){return ht<10?"0"+ht.toString(10):ht.toString(10)}var nt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function xt(){var ht=new Date,Et=[Je(ht.getHours()),Je(ht.getMinutes()),Je(ht.getSeconds())].join(":");return[ht.getDate(),nt[ht.getMonth()],Et].join(" ")}De.log=function(){console.log("%s - %s",xt(),De.format.apply(De,arguments))},De.inherits=oe("inherits"),De._extend=function(ht,Et){if(!Et||!Ue(Et))return ht;for(var St=Object.keys(Et),Ft=St.length;Ft--;)ht[St[Ft]]=Et[St[Ft]];return ht};function Pt(ht,Et){return Object.prototype.hasOwnProperty.call(ht,Et)}var Ct=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;De.promisify=function(Et){if(typeof Et!="function")throw new TypeError('The "original" argument must be of type Function');if(Ct&&Et[Ct]){var St=Et[Ct];if(typeof St!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(St,Ct,{value:St,enumerable:!1,writable:!1,configurable:!0}),St}function St(){for(var Ft,mt,yt=new Promise(function(xe,Le){Ft=xe,mt=Le}),tt=[],Ve=0;Ve<arguments.length;Ve++)tt.push(arguments[Ve]);tt.push(function(xe,Le){xe?mt(xe):Ft(Le)});try{Et.apply(this,tt)}catch(xe){mt(xe)}return yt}return Object.setPrototypeOf(St,Object.getPrototypeOf(Et)),Ct&&Object.defineProperty(St,Ct,{value:St,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(St,me(Et))},De.promisify.custom=Ct;function gt(ht,Et){if(!ht){var St=new Error("Promise was rejected with a falsy value");St.reason=ht,ht=St}return Et(ht)}function dt(ht){if(typeof ht!="function")throw new TypeError('The "original" argument must be of type Function');function Et(){for(var St=[],Ft=0;Ft<arguments.length;Ft++)St.push(arguments[Ft]);var mt=St.pop();if(typeof mt!="function")throw new TypeError("The last argument must be of type Function");var yt=this,tt=function(){return mt.apply(yt,arguments)};ht.apply(this,St).then(function(Ve){fe.nextTick(tt.bind(null,null,Ve))},function(Ve){fe.nextTick(gt.bind(null,Ve,tt))})}return Object.setPrototypeOf(Et,Object.getPrototypeOf(ht)),Object.defineProperties(Et,me(ht)),Et}De.callbackify=dt}).call(this)}).call(this,oe("_process"))},{"./support/isBuffer":417,"./support/types":418,_process:467,inherits:364}],420:[function(oe,Ge,De){(function(fe){(function(){"use strict";var me=oe("for-each"),ke=oe("available-typed-arrays"),Ce=oe("call-bind"),Se=oe("call-bind/callBound"),Me=oe("gopd"),ve=Se("Object.prototype.toString"),we=oe("has-tostringtag/shams")(),de=typeof globalThis=="undefined"?fe:globalThis,z=ke(),ee=Se("String.prototype.slice"),ae=Object.getPrototypeOf,ie=Se("Array.prototype.indexOf",!0)||function(je,Be){for(var Fe=0;Fe<je.length;Fe+=1)if(je[Fe]===Be)return Fe;return-1},le={__proto__:null};we&&Me&&ae?me(z,function(Pe){var je=new de[Pe];if(Symbol.toStringTag in je){var Be=ae(je),Fe=Me(Be,Symbol.toStringTag);if(!Fe){var Ne=ae(Be);Fe=Me(Ne,Symbol.toStringTag)}le["$"+Pe]=Ce(Fe.get)}}):me(z,function(Pe){var je=new de[Pe];le["$"+Pe]=Ce(je.slice)});var ue=function(je){var Be=!1;return me(le,function(Fe,Ne){if(!Be)try{"$"+Fe(je)===Ne&&(Be=ee(Ne,1))}catch(Ae){}}),Be},ge=function(je){var Be=!1;return me(le,function(Fe,Ne){if(!Be)try{Fe(je),Be=ee(Ne,1)}catch(Ae){}}),Be};Ge.exports=function(je){if(!je||typeof je!="object")return!1;if(!we){var Be=ee(ve(je),8,-1);return ie(z,Be)>-1?Be:Be!=="Object"?!1:ge(je)}return Me?ue(je):null}}).call(this)}).call(this,typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"available-typed-arrays":86,"call-bind":93,"call-bind/callBound":92,"for-each":345,gopd:349,"has-tostringtag/shams":353}],421:[function(oe,Ge,De){(function(){"use strict";De.stripBOM=function(fe){return fe[0]==="\uFEFF"?fe.substring(1):fe}}).call(this)},{}],422:[function(oe,Ge,De){(function(){"use strict";var fe,me,ke,Ce,Se,Me={}.hasOwnProperty;fe=oe("xmlbuilder"),me=oe("./defaults").defaults,Ce=function(ve){return typeof ve=="string"&&(ve.indexOf("&")>=0||ve.indexOf(">")>=0||ve.indexOf("<")>=0)},Se=function(ve){return"<![CDATA["+ke(ve)+"]]>"},ke=function(ve){return ve.replace("]]>","]]]]><![CDATA[>")},De.Builder=function(){function ve(we){var de,z,ee;this.options={},z=me["0.2"];for(de in z)Me.call(z,de)&&(ee=z[de],this.options[de]=ee);for(de in we)Me.call(we,de)&&(ee=we[de],this.options[de]=ee)}return ve.prototype.buildObject=function(we){var de,z,ee,ae,ie;return de=this.options.attrkey,z=this.options.charkey,Object.keys(we).length===1&&this.options.rootName===me["0.2"].rootName?(ie=Object.keys(we)[0],we=we[ie]):ie=this.options.rootName,ee=function(le){return function(ue,ge){var Pe,je,Be,Fe,Ne,Ae;if(typeof ge!="object")le.options.cdata&&Ce(ge)?ue.raw(Se(ge)):ue.txt(ge);else if(Array.isArray(ge)){for(Fe in ge)if(Me.call(ge,Fe)){je=ge[Fe];for(Ne in je)Be=je[Ne],ue=ee(ue.ele(Ne),Be).up()}}else for(Ne in ge)if(Me.call(ge,Ne))if(je=ge[Ne],Ne===de){if(typeof je=="object")for(Pe in je)Ae=je[Pe],ue=ue.att(Pe,Ae)}else if(Ne===z)le.options.cdata&&Ce(je)?ue=ue.raw(Se(je)):ue=ue.txt(je);else if(Array.isArray(je))for(Fe in je)Me.call(je,Fe)&&(Be=je[Fe],typeof Be=="string"?le.options.cdata&&Ce(Be)?ue=ue.ele(Ne).raw(Se(Be)).up():ue=ue.ele(Ne,Be).up():ue=ee(ue.ele(Ne),Be).up());else typeof je=="object"?ue=ee(ue.ele(Ne),je).up():typeof je=="string"&&le.options.cdata&&Ce(je)?ue=ue.ele(Ne).raw(Se(je)).up():(je==null&&(je=""),ue=ue.ele(Ne,je.toString()).up());return ue}}(this),ae=fe.create(ie,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),ee(ae,we).end(this.options.renderOpts)},ve}()}).call(this)},{"./defaults":423,xmlbuilder:459}],423:[function(oe,Ge,De){(function(){De.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(this)},{}],424:[function(oe,Ge,De){(function(){"use strict";var fe,me,ke,Ce,Se,Me,ve,we,de,z=function(ie,le){return function(){return ie.apply(le,arguments)}},ee=function(ie,le){for(var ue in le)ae.call(le,ue)&&(ie[ue]=le[ue]);function ge(){this.constructor=ie}return ge.prototype=le.prototype,ie.prototype=new ge,ie.__super__=le.prototype,ie},ae={}.hasOwnProperty;we=oe("sax"),Ce=oe("events"),fe=oe("./bom"),ve=oe("./processors"),de=oe("timers").setImmediate,me=oe("./defaults").defaults,Se=function(ie){return typeof ie=="object"&&ie!=null&&Object.keys(ie).length===0},Me=function(ie,le,ue){var ge,Pe,je;for(ge=0,Pe=ie.length;ge<Pe;ge++)je=ie[ge],le=je(le,ue);return le},ke=function(ie,le,ue){var ge;return ge=Object.create(null),ge.value=ue,ge.writable=!0,ge.enumerable=!0,ge.configurable=!0,Object.defineProperty(ie,le,ge)},De.Parser=function(ie){ee(le,ie);function le(ue){this.parseStringPromise=z(this.parseStringPromise,this),this.parseString=z(this.parseString,this),this.reset=z(this.reset,this),this.assignOrPush=z(this.assignOrPush,this),this.processAsync=z(this.processAsync,this);var ge,Pe,je;if(!(this instanceof De.Parser))return new De.Parser(ue);this.options={},Pe=me["0.2"];for(ge in Pe)ae.call(Pe,ge)&&(je=Pe[ge],this.options[ge]=je);for(ge in ue)ae.call(ue,ge)&&(je=ue[ge],this.options[ge]=je);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(ve.normalize)),this.reset()}return le.prototype.processAsync=function(){var ue,ge;try{return this.remaining.length<=this.options.chunkSize?(ue=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(ue),this.saxParser.close()):(ue=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(ue),de(this.processAsync))}catch(Pe){if(ge=Pe,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(ge)}},le.prototype.assignOrPush=function(ue,ge,Pe){return ge in ue?(ue[ge]instanceof Array||ke(ue,ge,[ue[ge]]),ue[ge].push(Pe)):this.options.explicitArray?ke(ue,ge,[Pe]):ke(ue,ge,Pe)},le.prototype.reset=function(){var ue,ge,Pe,je;return this.removeAllListeners(),this.saxParser=we.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(Be){return function(Fe){if(Be.saxParser.resume(),!Be.saxParser.errThrown)return Be.saxParser.errThrown=!0,Be.emit("error",Fe)}}(this),this.saxParser.onend=function(Be){return function(){if(!Be.saxParser.ended)return Be.saxParser.ended=!0,Be.emit("end",Be.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,je=[],ue=this.options.attrkey,ge=this.options.charkey,this.saxParser.onopentag=function(Be){return function(Fe){var Ne,Ae,Re,We,Ye;if(Re={},Re[ge]="",!Be.options.ignoreAttrs){Ye=Fe.attributes;for(Ne in Ye)ae.call(Ye,Ne)&&(!(ue in Re)&&!Be.options.mergeAttrs&&(Re[ue]={}),Ae=Be.options.attrValueProcessors?Me(Be.options.attrValueProcessors,Fe.attributes[Ne],Ne):Fe.attributes[Ne],We=Be.options.attrNameProcessors?Me(Be.options.attrNameProcessors,Ne):Ne,Be.options.mergeAttrs?Be.assignOrPush(Re,We,Ae):ke(Re[ue],We,Ae))}return Re["#name"]=Be.options.tagNameProcessors?Me(Be.options.tagNameProcessors,Fe.name):Fe.name,Be.options.xmlns&&(Re[Be.options.xmlnskey]={uri:Fe.uri,local:Fe.local}),je.push(Re)}}(this),this.saxParser.onclosetag=function(Be){return function(){var Fe,Ne,Ae,Re,We,Ye,Ue,Ke,ot,ut;if(Ye=je.pop(),We=Ye["#name"],(!Be.options.explicitChildren||!Be.options.preserveChildrenOrder)&&delete Ye["#name"],Ye.cdata===!0&&(Fe=Ye.cdata,delete Ye.cdata),ot=je[je.length-1],Ye[ge].match(/^\s*$/)&&!Fe?(Ne=Ye[ge],delete Ye[ge]):(Be.options.trim&&(Ye[ge]=Ye[ge].trim()),Be.options.normalize&&(Ye[ge]=Ye[ge].replace(/\s{2,}/g," ").trim()),Ye[ge]=Be.options.valueProcessors?Me(Be.options.valueProcessors,Ye[ge],We):Ye[ge],Object.keys(Ye).length===1&&ge in Ye&&!Be.EXPLICIT_CHARKEY&&(Ye=Ye[ge])),Se(Ye)&&(typeof Be.options.emptyTag=="function"?Ye=Be.options.emptyTag():Ye=Be.options.emptyTag!==""?Be.options.emptyTag:Ne),Be.options.validator!=null&&(ut="/"+function(){var ft,wt,Je;for(Je=[],ft=0,wt=je.length;ft<wt;ft++)Re=je[ft],Je.push(Re["#name"]);return Je}().concat(We).join("/"),function(){var ft;try{return Ye=Be.options.validator(ut,ot&&ot[We],Ye)}catch(wt){return ft=wt,Be.emit("error",ft)}}()),Be.options.explicitChildren&&!Be.options.mergeAttrs&&typeof Ye=="object"){if(!Be.options.preserveChildrenOrder)Re={},Be.options.attrkey in Ye&&(Re[Be.options.attrkey]=Ye[Be.options.attrkey],delete Ye[Be.options.attrkey]),!Be.options.charsAsChildren&&Be.options.charkey in Ye&&(Re[Be.options.charkey]=Ye[Be.options.charkey],delete Ye[Be.options.charkey]),Object.getOwnPropertyNames(Ye).length>0&&(Re[Be.options.childkey]=Ye),Ye=Re;else if(ot){ot[Be.options.childkey]=ot[Be.options.childkey]||[],Ue={};for(Ae in Ye)ae.call(Ye,Ae)&&ke(Ue,Ae,Ye[Ae]);ot[Be.options.childkey].push(Ue),delete Ye["#name"],Object.keys(Ye).length===1&&ge in Ye&&!Be.EXPLICIT_CHARKEY&&(Ye=Ye[ge])}}return je.length>0?Be.assignOrPush(ot,We,Ye):(Be.options.explicitRoot&&(Ke=Ye,Ye={},ke(Ye,We,Ke)),Be.resultObject=Ye,Be.saxParser.ended=!0,Be.emit("end",Be.resultObject))}}(this),Pe=function(Be){return function(Fe){var Ne,Ae;if(Ae=je[je.length-1],Ae)return Ae[ge]+=Fe,Be.options.explicitChildren&&Be.options.preserveChildrenOrder&&Be.options.charsAsChildren&&(Be.options.includeWhiteChars||Fe.replace(/\\n/g,"").trim()!=="")&&(Ae[Be.options.childkey]=Ae[Be.options.childkey]||[],Ne={"#name":"__text__"},Ne[ge]=Fe,Be.options.normalize&&(Ne[ge]=Ne[ge].replace(/\s{2,}/g," ").trim()),Ae[Be.options.childkey].push(Ne)),Ae}}(this),this.saxParser.ontext=Pe,this.saxParser.oncdata=function(Be){return function(Fe){var Ne;if(Ne=Pe(Fe),Ne)return Ne.cdata=!0}}(this)},le.prototype.parseString=function(ue,ge){var Pe;ge!=null&&typeof ge=="function"&&(this.on("end",function(je){return this.reset(),ge(null,je)}),this.on("error",function(je){return this.reset(),ge(je)}));try{return ue=ue.toString(),ue.trim()===""?(this.emit("end",null),!0):(ue=fe.stripBOM(ue),this.options.async?(this.remaining=ue,de(this.processAsync),this.saxParser):this.saxParser.write(ue).close())}catch(je){if(Pe=je,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw Pe}else return this.emit("error",Pe),this.saxParser.errThrown=!0}},le.prototype.parseStringPromise=function(ue){return new Promise(function(ge){return function(Pe,je){return ge.parseString(ue,function(Be,Fe){return Be?je(Be):Pe(Fe)})}}(this))},le}(Ce),De.parseString=function(ie,le,ue){var ge,Pe,je;return ue!=null?(typeof ue=="function"&&(ge=ue),typeof le=="object"&&(Pe=le)):(typeof le=="function"&&(ge=le),Pe={}),je=new De.Parser(Pe),je.parseString(ie,ge)},De.parseStringPromise=function(ie,le){var ue,ge;return typeof le=="object"&&(ue=le),ge=new De.Parser(ue),ge.parseStringPromise(ie)}}).call(this)},{"./bom":421,"./defaults":423,"./processors":425,events:344,sax:397,timers:414}],425:[function(oe,Ge,De){(function(){"use strict";var fe;fe=new RegExp(/(?!xmlns)^.*:/),De.normalize=function(me){return me.toLowerCase()},De.firstCharLowerCase=function(me){return me.charAt(0).toLowerCase()+me.slice(1)},De.stripPrefix=function(me){return me.replace(fe,"")},De.parseNumbers=function(me){return isNaN(me)||(me=me%1===0?parseInt(me,10):parseFloat(me)),me},De.parseBooleans=function(me){return/^(?:true|false)$/i.test(me)&&(me=me.toLowerCase()==="true"),me}}).call(this)},{}],426:[function(oe,Ge,De){(function(){"use strict";var fe,me,ke,Ce,Se=function(ve,we){for(var de in we)Me.call(we,de)&&(ve[de]=we[de]);function z(){this.constructor=ve}return z.prototype=we.prototype,ve.prototype=new z,ve.__super__=we.prototype,ve},Me={}.hasOwnProperty;me=oe("./defaults"),fe=oe("./builder"),ke=oe("./parser"),Ce=oe("./processors"),De.defaults=me.defaults,De.processors=Ce,De.ValidationError=function(ve){Se(we,ve);function we(de){this.message=de}return we}(Error),De.Builder=fe.Builder,De.Parser=ke.Parser,De.parseString=ke.parseString,De.parseStringPromise=ke.parseStringPromise}).call(this)},{"./builder":422,"./defaults":423,"./parser":424,"./processors":425}],427:[function(oe,Ge,De){(function(){Ge.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},{}],428:[function(oe,Ge,De){(function(){Ge.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},{}],429:[function(oe,Ge,De){(function(){var fe,me,ke,Ce,Se,Me,ve,we=[].slice,de={}.hasOwnProperty;fe=function(){var z,ee,ae,ie,le,ue;if(ue=arguments[0],le=2<=arguments.length?we.call(arguments,1):[],Se(Object.assign))Object.assign.apply(null,arguments);else for(z=0,ae=le.length;z<ae;z++)if(ie=le[z],ie!=null)for(ee in ie)de.call(ie,ee)&&(ue[ee]=ie[ee]);return ue},Se=function(z){return!!z&&Object.prototype.toString.call(z)==="[object Function]"},Me=function(z){var ee;return!!z&&((ee=typeof z)=="function"||ee==="object")},ke=function(z){return Se(Array.isArray)?Array.isArray(z):Object.prototype.toString.call(z)==="[object Array]"},Ce=function(z){var ee;if(ke(z))return!z.length;for(ee in z)if(de.call(z,ee))return!1;return!0},ve=function(z){var ee,ae;return Me(z)&&(ae=Object.getPrototypeOf(z))&&(ee=ae.constructor)&&typeof ee=="function"&&ee instanceof ee&&Function.prototype.toString.call(ee)===Function.prototype.toString.call(Object)},me=function(z){return Se(z.valueOf)?z.valueOf():z},Ge.exports.assign=fe,Ge.exports.isFunction=Se,Ge.exports.isObject=Me,Ge.exports.isArray=ke,Ge.exports.isEmpty=Ce,Ge.exports.isPlainObject=ve,Ge.exports.getValue=me}).call(this)},{}],430:[function(oe,Ge,De){(function(){Ge.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},{}],431:[function(oe,Ge,De){(function(){var fe,me,ke;fe=oe("./NodeType"),ke=oe("./XMLNode"),Ge.exports=me=function(){function Ce(Se,Me,ve){if(this.parent=Se,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),Me==null)throw new Error("Missing attribute name. "+this.debugInfo(Me));this.name=this.stringify.name(Me),this.value=this.stringify.attValue(ve),this.type=fe.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(Ce.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(Ce.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(Ce.prototype,"textContent",{get:function(){return this.value},set:function(Se){return this.value=Se||""}}),Object.defineProperty(Ce.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(Ce.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(Ce.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(Ce.prototype,"specified",{get:function(){return!0}}),Ce.prototype.clone=function(){return Object.create(this)},Ce.prototype.toString=function(Se){return this.options.writer.attribute(this,this.options.writer.filterOptions(Se))},Ce.prototype.debugInfo=function(Se){return Se=Se||this.name,Se==null?"parent: <"+this.parent.name+">":"attribute: {"+Se+"}, parent: <"+this.parent.name+">"},Ce.prototype.isEqualNode=function(Se){return!(Se.namespaceURI!==this.namespaceURI||Se.prefix!==this.prefix||Se.localName!==this.localName||Se.value!==this.value)},Ce}()}).call(this)},{"./NodeType":428,"./XMLNode":450}],432:[function(oe,Ge,De){(function(){var fe,me,ke,Ce=function(Me,ve){for(var we in ve)Se.call(ve,we)&&(Me[we]=ve[we]);function de(){this.constructor=Me}return de.prototype=ve.prototype,Me.prototype=new de,Me.__super__=ve.prototype,Me},Se={}.hasOwnProperty;fe=oe("./NodeType"),ke=oe("./XMLCharacterData"),Ge.exports=me=function(Me){Ce(ve,Me);function ve(we,de){if(ve.__super__.constructor.call(this,we),de==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=fe.CData,this.value=this.stringify.cdata(de)}return ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(we){return this.options.writer.cdata(this,this.options.writer.filterOptions(we))},ve}(ke)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],433:[function(oe,Ge,De){(function(){var fe,me,ke=function(Se,Me){for(var ve in Me)Ce.call(Me,ve)&&(Se[ve]=Me[ve]);function we(){this.constructor=Se}return we.prototype=Me.prototype,Se.prototype=new we,Se.__super__=Me.prototype,Se},Ce={}.hasOwnProperty;me=oe("./XMLNode"),Ge.exports=fe=function(Se){ke(Me,Se);function Me(ve){Me.__super__.constructor.call(this,ve),this.value=""}return Object.defineProperty(Me.prototype,"data",{get:function(){return this.value},set:function(ve){return this.value=ve||""}}),Object.defineProperty(Me.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(Me.prototype,"textContent",{get:function(){return this.value},set:function(ve){return this.value=ve||""}}),Me.prototype.clone=function(){return Object.create(this)},Me.prototype.substringData=function(ve,we){throw new Error("This DOM method is not implemented."+this.debugInfo())},Me.prototype.appendData=function(ve){throw new Error("This DOM method is not implemented."+this.debugInfo())},Me.prototype.insertData=function(ve,we){throw new Error("This DOM method is not implemented."+this.debugInfo())},Me.prototype.deleteData=function(ve,we){throw new Error("This DOM method is not implemented."+this.debugInfo())},Me.prototype.replaceData=function(ve,we,de){throw new Error("This DOM method is not implemented."+this.debugInfo())},Me.prototype.isEqualNode=function(ve){return!(!Me.__super__.isEqualNode.apply(this,arguments).isEqualNode(ve)||ve.data!==this.data)},Me}(me)}).call(this)},{"./XMLNode":450}],434:[function(oe,Ge,De){(function(){var fe,me,ke,Ce=function(Me,ve){for(var we in ve)Se.call(ve,we)&&(Me[we]=ve[we]);function de(){this.constructor=Me}return de.prototype=ve.prototype,Me.prototype=new de,Me.__super__=ve.prototype,Me},Se={}.hasOwnProperty;fe=oe("./NodeType"),me=oe("./XMLCharacterData"),Ge.exports=ke=function(Me){Ce(ve,Me);function ve(we,de){if(ve.__super__.constructor.call(this,we),de==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=fe.Comment,this.value=this.stringify.comment(de)}return ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(we){return this.options.writer.comment(this,this.options.writer.filterOptions(we))},ve}(me)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],435:[function(oe,Ge,De){(function(){var fe,me,ke;me=oe("./XMLDOMErrorHandler"),ke=oe("./XMLDOMStringList"),Ge.exports=fe=function(){function Ce(){var Se;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new me,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=Se=Object.create(this.defaultParams)}return Object.defineProperty(Ce.prototype,"parameterNames",{get:function(){return new ke(Object.keys(this.defaultParams))}}),Ce.prototype.getParameter=function(Se){return this.params.hasOwnProperty(Se)?this.params[Se]:null},Ce.prototype.canSetParameter=function(Se,Me){return!0},Ce.prototype.setParameter=function(Se,Me){return Me!=null?this.params[Se]=Me:delete this.params[Se]},Ce}()}).call(this)},{"./XMLDOMErrorHandler":436,"./XMLDOMStringList":438}],436:[function(oe,Ge,De){(function(){var fe;Ge.exports=fe=function(){function me(){}return me.prototype.handleError=function(ke){throw new Error(ke)},me}()}).call(this)},{}],437:[function(oe,Ge,De){(function(){var fe;Ge.exports=fe=function(){function me(){}return me.prototype.hasFeature=function(ke,Ce){return!0},me.prototype.createDocumentType=function(ke,Ce,Se){throw new Error("This DOM method is not implemented.")},me.prototype.createDocument=function(ke,Ce,Se){throw new Error("This DOM method is not implemented.")},me.prototype.createHTMLDocument=function(ke){throw new Error("This DOM method is not implemented.")},me.prototype.getFeature=function(ke,Ce){throw new Error("This DOM method is not implemented.")},me}()}).call(this)},{}],438:[function(oe,Ge,De){(function(){var fe;Ge.exports=fe=function(){function me(ke){this.arr=ke||[]}return Object.defineProperty(me.prototype,"length",{get:function(){return this.arr.length}}),me.prototype.item=function(ke){return this.arr[ke]||null},me.prototype.contains=function(ke){return this.arr.indexOf(ke)!==-1},me}()}).call(this)},{}],439:[function(oe,Ge,De){(function(){var fe,me,ke,Ce=function(Me,ve){for(var we in ve)Se.call(ve,we)&&(Me[we]=ve[we]);function de(){this.constructor=Me}return de.prototype=ve.prototype,Me.prototype=new de,Me.__super__=ve.prototype,Me},Se={}.hasOwnProperty;ke=oe("./XMLNode"),fe=oe("./NodeType"),Ge.exports=me=function(Me){Ce(ve,Me);function ve(we,de,z,ee,ae,ie){if(ve.__super__.constructor.call(this,we),de==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(z==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(de));if(!ee)throw new Error("Missing DTD attribute type. "+this.debugInfo(de));if(!ae)throw new Error("Missing DTD attribute default. "+this.debugInfo(de));if(ae.indexOf("#")!==0&&(ae="#"+ae),!ae.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(de));if(ie&&!ae.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(de));this.elementName=this.stringify.name(de),this.type=fe.AttributeDeclaration,this.attributeName=this.stringify.name(z),this.attributeType=this.stringify.dtdAttType(ee),ie&&(this.defaultValue=this.stringify.dtdAttDefault(ie)),this.defaultValueType=ae}return ve.prototype.toString=function(we){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(we))},ve}(ke)}).call(this)},{"./NodeType":428,"./XMLNode":450}],440:[function(oe,Ge,De){(function(){var fe,me,ke,Ce=function(Me,ve){for(var we in ve)Se.call(ve,we)&&(Me[we]=ve[we]);function de(){this.constructor=Me}return de.prototype=ve.prototype,Me.prototype=new de,Me.__super__=ve.prototype,Me},Se={}.hasOwnProperty;ke=oe("./XMLNode"),fe=oe("./NodeType"),Ge.exports=me=function(Me){Ce(ve,Me);function ve(we,de,z){if(ve.__super__.constructor.call(this,we),de==null)throw new Error("Missing DTD element name. "+this.debugInfo());z||(z="(#PCDATA)"),Array.isArray(z)&&(z="("+z.join(",")+")"),this.name=this.stringify.name(de),this.type=fe.ElementDeclaration,this.value=this.stringify.dtdElementValue(z)}return ve.prototype.toString=function(we){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(we))},ve}(ke)}).call(this)},{"./NodeType":428,"./XMLNode":450}],441:[function(oe,Ge,De){(function(){var fe,me,ke,Ce,Se=function(ve,we){for(var de in we)Me.call(we,de)&&(ve[de]=we[de]);function z(){this.constructor=ve}return z.prototype=we.prototype,ve.prototype=new z,ve.__super__=we.prototype,ve},Me={}.hasOwnProperty;Ce=oe("./Utility").isObject,ke=oe("./XMLNode"),fe=oe("./NodeType"),Ge.exports=me=function(ve){Se(we,ve);function we(de,z,ee,ae){if(we.__super__.constructor.call(this,de),ee==null)throw new Error("Missing DTD entity name. "+this.debugInfo(ee));if(ae==null)throw new Error("Missing DTD entity value. "+this.debugInfo(ee));if(this.pe=!!z,this.name=this.stringify.name(ee),this.type=fe.EntityDeclaration,!Ce(ae))this.value=this.stringify.dtdEntityValue(ae),this.internal=!0;else{if(!ae.pubID&&!ae.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(ee));if(ae.pubID&&!ae.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(ee));if(this.internal=!1,ae.pubID!=null&&(this.pubID=this.stringify.dtdPubID(ae.pubID)),ae.sysID!=null&&(this.sysID=this.stringify.dtdSysID(ae.sysID)),ae.nData!=null&&(this.nData=this.stringify.dtdNData(ae.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(ee))}}return Object.defineProperty(we.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(we.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(we.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(we.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(we.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(we.prototype,"xmlVersion",{get:function(){return null}}),we.prototype.toString=function(de){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(de))},we}(ke)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],442:[function(oe,Ge,De){(function(){var fe,me,ke,Ce=function(Me,ve){for(var we in ve)Se.call(ve,we)&&(Me[we]=ve[we]);function de(){this.constructor=Me}return de.prototype=ve.prototype,Me.prototype=new de,Me.__super__=ve.prototype,Me},Se={}.hasOwnProperty;ke=oe("./XMLNode"),fe=oe("./NodeType"),Ge.exports=me=function(Me){Ce(ve,Me);function ve(we,de,z){if(ve.__super__.constructor.call(this,we),de==null)throw new Error("Missing DTD notation name. "+this.debugInfo(de));if(!z.pubID&&!z.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(de));this.name=this.stringify.name(de),this.type=fe.NotationDeclaration,z.pubID!=null&&(this.pubID=this.stringify.dtdPubID(z.pubID)),z.sysID!=null&&(this.sysID=this.stringify.dtdSysID(z.sysID))}return Object.defineProperty(ve.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(ve.prototype,"systemId",{get:function(){return this.sysID}}),ve.prototype.toString=function(we){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(we))},ve}(ke)}).call(this)},{"./NodeType":428,"./XMLNode":450}],443:[function(oe,Ge,De){(function(){var fe,me,ke,Ce,Se=function(ve,we){for(var de in we)Me.call(we,de)&&(ve[de]=we[de]);function z(){this.constructor=ve}return z.prototype=we.prototype,ve.prototype=new z,ve.__super__=we.prototype,ve},Me={}.hasOwnProperty;Ce=oe("./Utility").isObject,ke=oe("./XMLNode"),fe=oe("./NodeType"),Ge.exports=me=function(ve){Se(we,ve);function we(de,z,ee,ae){var ie;we.__super__.constructor.call(this,de),Ce(z)&&(ie=z,z=ie.version,ee=ie.encoding,ae=ie.standalone),z||(z="1.0"),this.type=fe.Declaration,this.version=this.stringify.xmlVersion(z),ee!=null&&(this.encoding=this.stringify.xmlEncoding(ee)),ae!=null&&(this.standalone=this.stringify.xmlStandalone(ae))}return we.prototype.toString=function(de){return this.options.writer.declaration(this,this.options.writer.filterOptions(de))},we}(ke)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],444:[function(oe,Ge,De){(function(){var fe,me,ke,Ce,Se,Me,ve,we,de,z=function(ae,ie){for(var le in ie)ee.call(ie,le)&&(ae[le]=ie[le]);function ue(){this.constructor=ae}return ue.prototype=ie.prototype,ae.prototype=new ue,ae.__super__=ie.prototype,ae},ee={}.hasOwnProperty;de=oe("./Utility").isObject,we=oe("./XMLNode"),fe=oe("./NodeType"),me=oe("./XMLDTDAttList"),Ce=oe("./XMLDTDEntity"),ke=oe("./XMLDTDElement"),Se=oe("./XMLDTDNotation"),ve=oe("./XMLNamedNodeMap"),Ge.exports=Me=function(ae){z(ie,ae);function ie(le,ue,ge){var Pe,je,Be,Fe,Ne,Ae;if(ie.__super__.constructor.call(this,le),this.type=fe.DocType,le.children){for(Fe=le.children,je=0,Be=Fe.length;je<Be;je++)if(Pe=Fe[je],Pe.type===fe.Element){this.name=Pe.name;break}}this.documentObject=le,de(ue)&&(Ne=ue,ue=Ne.pubID,ge=Ne.sysID),ge==null&&(Ae=[ue,ge],ge=Ae[0],ue=Ae[1]),ue!=null&&(this.pubID=this.stringify.dtdPubID(ue)),ge!=null&&(this.sysID=this.stringify.dtdSysID(ge))}return Object.defineProperty(ie.prototype,"entities",{get:function(){var le,ue,ge,Pe,je;for(Pe={},je=this.children,ue=0,ge=je.length;ue<ge;ue++)le=je[ue],le.type===fe.EntityDeclaration&&!le.pe&&(Pe[le.name]=le);return new ve(Pe)}}),Object.defineProperty(ie.prototype,"notations",{get:function(){var le,ue,ge,Pe,je;for(Pe={},je=this.children,ue=0,ge=je.length;ue<ge;ue++)le=je[ue],le.type===fe.NotationDeclaration&&(Pe[le.name]=le);return new ve(Pe)}}),Object.defineProperty(ie.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(ie.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(ie.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),ie.prototype.element=function(le,ue){var ge;return ge=new ke(this,le,ue),this.children.push(ge),this},ie.prototype.attList=function(le,ue,ge,Pe,je){var Be;return Be=new me(this,le,ue,ge,Pe,je),this.children.push(Be),this},ie.prototype.entity=function(le,ue){var ge;return ge=new Ce(this,!1,le,ue),this.children.push(ge),this},ie.prototype.pEntity=function(le,ue){var ge;return ge=new Ce(this,!0,le,ue),this.children.push(ge),this},ie.prototype.notation=function(le,ue){var ge;return ge=new Se(this,le,ue),this.children.push(ge),this},ie.prototype.toString=function(le){return this.options.writer.docType(this,this.options.writer.filterOptions(le))},ie.prototype.ele=function(le,ue){return this.element(le,ue)},ie.prototype.att=function(le,ue,ge,Pe,je){return this.attList(le,ue,ge,Pe,je)},ie.prototype.ent=function(le,ue){return this.entity(le,ue)},ie.prototype.pent=function(le,ue){return this.pEntity(le,ue)},ie.prototype.not=function(le,ue){return this.notation(le,ue)},ie.prototype.up=function(){return this.root()||this.documentObject},ie.prototype.isEqualNode=function(le){return!(!ie.__super__.isEqualNode.apply(this,arguments).isEqualNode(le)||le.name!==this.name||le.publicId!==this.publicId||le.systemId!==this.systemId)},ie}(we)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLNamedNodeMap":449,"./XMLNode":450}],445:[function(oe,Ge,De){(function(){var fe,me,ke,Ce,Se,Me,ve,we,de=function(ee,ae){for(var ie in ae)z.call(ae,ie)&&(ee[ie]=ae[ie]);function le(){this.constructor=ee}return le.prototype=ae.prototype,ee.prototype=new le,ee.__super__=ae.prototype,ee},z={}.hasOwnProperty;we=oe("./Utility").isPlainObject,ke=oe("./XMLDOMImplementation"),me=oe("./XMLDOMConfiguration"),Se=oe("./XMLNode"),fe=oe("./NodeType"),ve=oe("./XMLStringifier"),Me=oe("./XMLStringWriter"),Ge.exports=Ce=function(ee){de(ae,ee);function ae(ie){ae.__super__.constructor.call(this,null),this.name="#document",this.type=fe.Document,this.documentURI=null,this.domConfig=new me,ie||(ie={}),ie.writer||(ie.writer=new Me),this.options=ie,this.stringify=new ve(ie)}return Object.defineProperty(ae.prototype,"implementation",{value:new ke}),Object.defineProperty(ae.prototype,"doctype",{get:function(){var ie,le,ue,ge;for(ge=this.children,le=0,ue=ge.length;le<ue;le++)if(ie=ge[le],ie.type===fe.DocType)return ie;return null}}),Object.defineProperty(ae.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(ae.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(ae.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(ae.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===fe.Declaration?this.children[0].encoding:null}}),Object.defineProperty(ae.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===fe.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(ae.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===fe.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(ae.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(ae.prototype,"origin",{get:function(){return null}}),Object.defineProperty(ae.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(ae.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(ae.prototype,"contentType",{get:function(){return null}}),ae.prototype.end=function(ie){var le;return le={},ie?we(ie)&&(le=ie,ie=this.options.writer):ie=this.options.writer,ie.document(this,ie.filterOptions(le))},ae.prototype.toString=function(ie){return this.options.writer.document(this,this.options.writer.filterOptions(ie))},ae.prototype.createElement=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createTextNode=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createComment=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createCDATASection=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createProcessingInstruction=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createAttribute=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createEntityReference=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.getElementsByTagName=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.importNode=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createElementNS=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createAttributeNS=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.getElementsByTagNameNS=function(ie,le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.getElementById=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.adoptNode=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.renameNode=function(ie,le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.getElementsByClassName=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createEvent=function(ie){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createNodeIterator=function(ie,le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae.prototype.createTreeWalker=function(ie,le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ae}(Se)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDOMConfiguration":435,"./XMLDOMImplementation":437,"./XMLNode":450,"./XMLStringWriter":455,"./XMLStringifier":456}],446:[function(oe,Ge,De){(function(){var fe,me,ke,Ce,Se,Me,ve,we,de,z,ee,ae,ie,le,ue,ge,Pe,je,Be,Fe,Ne,Ae,Re,We,Ye={}.hasOwnProperty;We=oe("./Utility"),Ae=We.isObject,Ne=We.isFunction,Re=We.isPlainObject,Fe=We.getValue,fe=oe("./NodeType"),ae=oe("./XMLDocument"),le=oe("./XMLElement"),Ce=oe("./XMLCData"),Se=oe("./XMLComment"),ge=oe("./XMLRaw"),Be=oe("./XMLText"),ue=oe("./XMLProcessingInstruction"),z=oe("./XMLDeclaration"),ee=oe("./XMLDocType"),Me=oe("./XMLDTDAttList"),we=oe("./XMLDTDEntity"),ve=oe("./XMLDTDElement"),de=oe("./XMLDTDNotation"),ke=oe("./XMLAttribute"),je=oe("./XMLStringifier"),Pe=oe("./XMLStringWriter"),me=oe("./WriterState"),Ge.exports=ie=function(){function Ue(Ke,ot,ut){var ft;this.name="?xml",this.type=fe.Document,Ke||(Ke={}),ft={},Ke.writer?Re(Ke.writer)&&(ft=Ke.writer,Ke.writer=new Pe):Ke.writer=new Pe,this.options=Ke,this.writer=Ke.writer,this.writerOptions=this.writer.filterOptions(ft),this.stringify=new je(Ke),this.onDataCallback=ot||function(){},this.onEndCallback=ut||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return Ue.prototype.createChildNode=function(Ke){var ot,ut,ft,wt,Je,nt,xt,Pt;switch(Ke.type){case fe.CData:this.cdata(Ke.value);break;case fe.Comment:this.comment(Ke.value);break;case fe.Element:ft={},xt=Ke.attribs;for(ut in xt)Ye.call(xt,ut)&&(ot=xt[ut],ft[ut]=ot.value);this.node(Ke.name,ft);break;case fe.Dummy:this.dummy();break;case fe.Raw:this.raw(Ke.value);break;case fe.Text:this.text(Ke.value);break;case fe.ProcessingInstruction:this.instruction(Ke.target,Ke.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+Ke.constructor.name)}for(Pt=Ke.children,Je=0,nt=Pt.length;Je<nt;Je++)wt=Pt[Je],this.createChildNode(wt),wt.type===fe.Element&&this.up();return this},Ue.prototype.dummy=function(){return this},Ue.prototype.node=function(Ke,ot,ut){var ft;if(Ke==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(Ke));return this.openCurrent(),Ke=Fe(Ke),ot==null&&(ot={}),ot=Fe(ot),Ae(ot)||(ft=[ot,ut],ut=ft[0],ot=ft[1]),this.currentNode=new le(this,Ke,ot),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,ut!=null&&this.text(ut),this},Ue.prototype.element=function(Ke,ot,ut){var ft,wt,Je,nt,xt,Pt;if(this.currentNode&&this.currentNode.type===fe.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(Ke)||Ae(Ke)||Ne(Ke))for(nt=this.options.noValidation,this.options.noValidation=!0,Pt=new ae(this.options).element("TEMP_ROOT"),Pt.element(Ke),this.options.noValidation=nt,xt=Pt.children,wt=0,Je=xt.length;wt<Je;wt++)ft=xt[wt],this.createChildNode(ft),ft.type===fe.Element&&this.up();else this.node(Ke,ot,ut);return this},Ue.prototype.attribute=function(Ke,ot){var ut,ft;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(Ke));if(Ke!=null&&(Ke=Fe(Ke)),Ae(Ke))for(ut in Ke)Ye.call(Ke,ut)&&(ft=Ke[ut],this.attribute(ut,ft));else Ne(ot)&&(ot=ot.apply()),this.options.keepNullAttributes&&ot==null?this.currentNode.attribs[Ke]=new ke(this,Ke,""):ot!=null&&(this.currentNode.attribs[Ke]=new ke(this,Ke,ot));return this},Ue.prototype.text=function(Ke){var ot;return this.openCurrent(),ot=new Be(this,Ke),this.onData(this.writer.text(ot,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.cdata=function(Ke){var ot;return this.openCurrent(),ot=new Ce(this,Ke),this.onData(this.writer.cdata(ot,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.comment=function(Ke){var ot;return this.openCurrent(),ot=new Se(this,Ke),this.onData(this.writer.comment(ot,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.raw=function(Ke){var ot;return this.openCurrent(),ot=new ge(this,Ke),this.onData(this.writer.raw(ot,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.instruction=function(Ke,ot){var ut,ft,wt,Je,nt;if(this.openCurrent(),Ke!=null&&(Ke=Fe(Ke)),ot!=null&&(ot=Fe(ot)),Array.isArray(Ke))for(ut=0,Je=Ke.length;ut<Je;ut++)ft=Ke[ut],this.instruction(ft);else if(Ae(Ke))for(ft in Ke)Ye.call(Ke,ft)&&(wt=Ke[ft],this.instruction(ft,wt));else Ne(ot)&&(ot=ot.apply()),nt=new ue(this,Ke,ot),this.onData(this.writer.processingInstruction(nt,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},Ue.prototype.declaration=function(Ke,ot,ut){var ft;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return ft=new z(this,Ke,ot,ut),this.onData(this.writer.declaration(ft,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.doctype=function(Ke,ot,ut){if(this.openCurrent(),Ke==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new ee(this,ot,ut),this.currentNode.rootNodeName=Ke,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},Ue.prototype.dtdElement=function(Ke,ot){var ut;return this.openCurrent(),ut=new ve(this,Ke,ot),this.onData(this.writer.dtdElement(ut,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.attList=function(Ke,ot,ut,ft,wt){var Je;return this.openCurrent(),Je=new Me(this,Ke,ot,ut,ft,wt),this.onData(this.writer.dtdAttList(Je,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.entity=function(Ke,ot){var ut;return this.openCurrent(),ut=new we(this,!1,Ke,ot),this.onData(this.writer.dtdEntity(ut,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.pEntity=function(Ke,ot){var ut;return this.openCurrent(),ut=new we(this,!0,Ke,ot),this.onData(this.writer.dtdEntity(ut,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.notation=function(Ke,ot){var ut;return this.openCurrent(),ut=new de(this,Ke,ot),this.onData(this.writer.dtdNotation(ut,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},Ue.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},Ue.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},Ue.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},Ue.prototype.openNode=function(Ke){var ot,ut,ft,wt;if(!Ke.isOpen){if(!this.root&&this.currentLevel===0&&Ke.type===fe.Element&&(this.root=Ke),ut="",Ke.type===fe.Element){this.writerOptions.state=me.OpenTag,ut=this.writer.indent(Ke,this.writerOptions,this.currentLevel)+"<"+Ke.name,wt=Ke.attribs;for(ft in wt)Ye.call(wt,ft)&&(ot=wt[ft],ut+=this.writer.attribute(ot,this.writerOptions,this.currentLevel));ut+=(Ke.children?">":"/>")+this.writer.endline(Ke,this.writerOptions,this.currentLevel),this.writerOptions.state=me.InsideTag}else this.writerOptions.state=me.OpenTag,ut=this.writer.indent(Ke,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+Ke.rootNodeName,Ke.pubID&&Ke.sysID?ut+=' PUBLIC "'+Ke.pubID+'" "'+Ke.sysID+'"':Ke.sysID&&(ut+=' SYSTEM "'+Ke.sysID+'"'),Ke.children?(ut+=" [",this.writerOptions.state=me.InsideTag):(this.writerOptions.state=me.CloseTag,ut+=">"),ut+=this.writer.endline(Ke,this.writerOptions,this.currentLevel);return this.onData(ut,this.currentLevel),Ke.isOpen=!0}},Ue.prototype.closeNode=function(Ke){var ot;if(!Ke.isClosed)return ot="",this.writerOptions.state=me.CloseTag,Ke.type===fe.Element?ot=this.writer.indent(Ke,this.writerOptions,this.currentLevel)+"</"+Ke.name+">"+this.writer.endline(Ke,this.writerOptions,this.currentLevel):ot=this.writer.indent(Ke,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(Ke,this.writerOptions,this.currentLevel),this.writerOptions.state=me.None,this.onData(ot,this.currentLevel),Ke.isClosed=!0},Ue.prototype.onData=function(Ke,ot){return this.documentStarted=!0,this.onDataCallback(Ke,ot+1)},Ue.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},Ue.prototype.debugInfo=function(Ke){return Ke==null?"":"node: <"+Ke+">"},Ue.prototype.ele=function(){return this.element.apply(this,arguments)},Ue.prototype.nod=function(Ke,ot,ut){return this.node(Ke,ot,ut)},Ue.prototype.txt=function(Ke){return this.text(Ke)},Ue.prototype.dat=function(Ke){return this.cdata(Ke)},Ue.prototype.com=function(Ke){return this.comment(Ke)},Ue.prototype.ins=function(Ke,ot){return this.instruction(Ke,ot)},Ue.prototype.dec=function(Ke,ot,ut){return this.declaration(Ke,ot,ut)},Ue.prototype.dtd=function(Ke,ot,ut){return this.doctype(Ke,ot,ut)},Ue.prototype.e=function(Ke,ot,ut){return this.element(Ke,ot,ut)},Ue.prototype.n=function(Ke,ot,ut){return this.node(Ke,ot,ut)},Ue.prototype.t=function(Ke){return this.text(Ke)},Ue.prototype.d=function(Ke){return this.cdata(Ke)},Ue.prototype.c=function(Ke){return this.comment(Ke)},Ue.prototype.r=function(Ke){return this.raw(Ke)},Ue.prototype.i=function(Ke,ot){return this.instruction(Ke,ot)},Ue.prototype.att=function(){return this.currentNode&&this.currentNode.type===fe.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Ue.prototype.a=function(){return this.currentNode&&this.currentNode.type===fe.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Ue.prototype.ent=function(Ke,ot){return this.entity(Ke,ot)},Ue.prototype.pent=function(Ke,ot){return this.pEntity(Ke,ot)},Ue.prototype.not=function(Ke,ot){return this.notation(Ke,ot)},Ue}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLAttribute":431,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDocument":445,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLStringWriter":455,"./XMLStringifier":456,"./XMLText":457}],447:[function(oe,Ge,De){(function(){var fe,me,ke,Ce=function(Me,ve){for(var we in ve)Se.call(ve,we)&&(Me[we]=ve[we]);function de(){this.constructor=Me}return de.prototype=ve.prototype,Me.prototype=new de,Me.__super__=ve.prototype,Me},Se={}.hasOwnProperty;ke=oe("./XMLNode"),fe=oe("./NodeType"),Ge.exports=me=function(Me){Ce(ve,Me);function ve(we){ve.__super__.constructor.call(this,we),this.type=fe.Dummy}return ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(we){return""},ve}(ke)}).call(this)},{"./NodeType":428,"./XMLNode":450}],448:[function(oe,Ge,De){(function(){var fe,me,ke,Ce,Se,Me,ve,we,de,z=function(ae,ie){for(var le in ie)ee.call(ie,le)&&(ae[le]=ie[le]);function ue(){this.constructor=ae}return ue.prototype=ie.prototype,ae.prototype=new ue,ae.__super__=ie.prototype,ae},ee={}.hasOwnProperty;de=oe("./Utility"),we=de.isObject,ve=de.isFunction,Me=de.getValue,Se=oe("./XMLNode"),fe=oe("./NodeType"),me=oe("./XMLAttribute"),Ce=oe("./XMLNamedNodeMap"),Ge.exports=ke=function(ae){z(ie,ae);function ie(le,ue,ge){var Pe,je,Be,Fe;if(ie.__super__.constructor.call(this,le),ue==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(ue),this.type=fe.Element,this.attribs={},this.schemaTypeInfo=null,ge!=null&&this.attribute(ge),le.type===fe.Document&&(this.isRoot=!0,this.documentObject=le,le.rootObject=this,le.children)){for(Fe=le.children,je=0,Be=Fe.length;je<Be;je++)if(Pe=Fe[je],Pe.type===fe.DocType){Pe.name=this.name;break}}}return Object.defineProperty(ie.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(ie.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(ie.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(ie.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(ie.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(ie.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(ie.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(ie.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new Ce(this.attribs)),this.attributeMap}}),ie.prototype.clone=function(){var le,ue,ge,Pe;ge=Object.create(this),ge.isRoot&&(ge.documentObject=null),ge.attribs={},Pe=this.attribs;for(ue in Pe)ee.call(Pe,ue)&&(le=Pe[ue],ge.attribs[ue]=le.clone());return ge.children=[],this.children.forEach(function(je){var Be;return Be=je.clone(),Be.parent=ge,ge.children.push(Be)}),ge},ie.prototype.attribute=function(le,ue){var ge,Pe;if(le!=null&&(le=Me(le)),we(le))for(ge in le)ee.call(le,ge)&&(Pe=le[ge],this.attribute(ge,Pe));else ve(ue)&&(ue=ue.apply()),this.options.keepNullAttributes&&ue==null?this.attribs[le]=new me(this,le,""):ue!=null&&(this.attribs[le]=new me(this,le,ue));return this},ie.prototype.removeAttribute=function(le){var ue,ge,Pe;if(le==null)throw new Error("Missing attribute name. "+this.debugInfo());if(le=Me(le),Array.isArray(le))for(ge=0,Pe=le.length;ge<Pe;ge++)ue=le[ge],delete this.attribs[ue];else delete this.attribs[le];return this},ie.prototype.toString=function(le){return this.options.writer.element(this,this.options.writer.filterOptions(le))},ie.prototype.att=function(le,ue){return this.attribute(le,ue)},ie.prototype.a=function(le,ue){return this.attribute(le,ue)},ie.prototype.getAttribute=function(le){return this.attribs.hasOwnProperty(le)?this.attribs[le].value:null},ie.prototype.setAttribute=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getAttributeNode=function(le){return this.attribs.hasOwnProperty(le)?this.attribs[le]:null},ie.prototype.setAttributeNode=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.removeAttributeNode=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getElementsByTagName=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getAttributeNS=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.setAttributeNS=function(le,ue,ge){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.removeAttributeNS=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getAttributeNodeNS=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.setAttributeNodeNS=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getElementsByTagNameNS=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.hasAttribute=function(le){return this.attribs.hasOwnProperty(le)},ie.prototype.hasAttributeNS=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.setIdAttribute=function(le,ue){return this.attribs.hasOwnProperty(le)?this.attribs[le].isId:ue},ie.prototype.setIdAttributeNS=function(le,ue,ge){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.setIdAttributeNode=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getElementsByTagName=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getElementsByTagNameNS=function(le,ue){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.getElementsByClassName=function(le){throw new Error("This DOM method is not implemented."+this.debugInfo())},ie.prototype.isEqualNode=function(le){var ue,ge,Pe;if(!ie.__super__.isEqualNode.apply(this,arguments).isEqualNode(le)||le.namespaceURI!==this.namespaceURI||le.prefix!==this.prefix||le.localName!==this.localName||le.attribs.length!==this.attribs.length)return!1;for(ue=ge=0,Pe=this.attribs.length-1;0<=Pe?ge<=Pe:ge>=Pe;ue=0<=Pe?++ge:--ge)if(!this.attribs[ue].isEqualNode(le.attribs[ue]))return!1;return!0},ie}(Se)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLAttribute":431,"./XMLNamedNodeMap":449,"./XMLNode":450}],449:[function(oe,Ge,De){(function(){var fe;Ge.exports=fe=function(){function me(ke){this.nodes=ke}return Object.defineProperty(me.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),me.prototype.clone=function(){return this.nodes=null},me.prototype.getNamedItem=function(ke){return this.nodes[ke]},me.prototype.setNamedItem=function(ke){var Ce;return Ce=this.nodes[ke.nodeName],this.nodes[ke.nodeName]=ke,Ce||null},me.prototype.removeNamedItem=function(ke){var Ce;return Ce=this.nodes[ke],delete this.nodes[ke],Ce||null},me.prototype.item=function(ke){return this.nodes[Object.keys(this.nodes)[ke]]||null},me.prototype.getNamedItemNS=function(ke,Ce){throw new Error("This DOM method is not implemented.")},me.prototype.setNamedItemNS=function(ke){throw new Error("This DOM method is not implemented.")},me.prototype.removeNamedItemNS=function(ke,Ce){throw new Error("This DOM method is not implemented.")},me}()}).call(this)},{}],450:[function(oe,Ge,De){(function(){var fe,me,ke,Ce,Se,Me,ve,we,de,z,ee,ae,ie,le,ue,ge,Pe,je,Be,Fe={}.hasOwnProperty;Be=oe("./Utility"),je=Be.isObject,Pe=Be.isFunction,ge=Be.isEmpty,ue=Be.getValue,we=null,ke=null,Ce=null,Se=null,Me=null,ie=null,le=null,ae=null,ve=null,me=null,ee=null,de=null,fe=null,Ge.exports=z=function(){function Ne(Ae){this.parent=Ae,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,we||(we=oe("./XMLElement"),ke=oe("./XMLCData"),Ce=oe("./XMLComment"),Se=oe("./XMLDeclaration"),Me=oe("./XMLDocType"),ie=oe("./XMLRaw"),le=oe("./XMLText"),ae=oe("./XMLProcessingInstruction"),ve=oe("./XMLDummy"),me=oe("./NodeType"),ee=oe("./XMLNodeList"),de=oe("./XMLNamedNodeMap"),fe=oe("./DocumentPosition"))}return Object.defineProperty(Ne.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(Ne.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(Ne.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(Ne.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(Ne.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new ee(this.children)),this.childNodeList}}),Object.defineProperty(Ne.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(Ne.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(Ne.prototype,"previousSibling",{get:function(){var Ae;return Ae=this.parent.children.indexOf(this),this.parent.children[Ae-1]||null}}),Object.defineProperty(Ne.prototype,"nextSibling",{get:function(){var Ae;return Ae=this.parent.children.indexOf(this),this.parent.children[Ae+1]||null}}),Object.defineProperty(Ne.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(Ne.prototype,"textContent",{get:function(){var Ae,Re,We,Ye,Ue;if(this.nodeType===me.Element||this.nodeType===me.DocumentFragment){for(Ue="",Ye=this.children,Re=0,We=Ye.length;Re<We;Re++)Ae=Ye[Re],Ae.textContent&&(Ue+=Ae.textContent);return Ue}else return null},set:function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Ne.prototype.setParent=function(Ae){var Re,We,Ye,Ue,Ke;for(this.parent=Ae,Ae&&(this.options=Ae.options,this.stringify=Ae.stringify),Ue=this.children,Ke=[],We=0,Ye=Ue.length;We<Ye;We++)Re=Ue[We],Ke.push(Re.setParent(this));return Ke},Ne.prototype.element=function(Ae,Re,We){var Ye,Ue,Ke,ot,ut,ft,wt,Je,nt,xt,Pt;if(ft=null,Re===null&&We==null&&(nt=[{},null],Re=nt[0],We=nt[1]),Re==null&&(Re={}),Re=ue(Re),je(Re)||(xt=[Re,We],We=xt[0],Re=xt[1]),Ae!=null&&(Ae=ue(Ae)),Array.isArray(Ae))for(Ke=0,wt=Ae.length;Ke<wt;Ke++)Ue=Ae[Ke],ft=this.element(Ue);else if(Pe(Ae))ft=this.element(Ae.apply());else if(je(Ae)){for(ut in Ae)if(Fe.call(Ae,ut))if(Pt=Ae[ut],Pe(Pt)&&(Pt=Pt.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&ut.indexOf(this.stringify.convertAttKey)===0)ft=this.attribute(ut.substr(this.stringify.convertAttKey.length),Pt);else if(!this.options.separateArrayItems&&Array.isArray(Pt)&&ge(Pt))ft=this.dummy();else if(je(Pt)&&ge(Pt))ft=this.element(ut);else if(!this.options.keepNullNodes&&Pt==null)ft=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(Pt))for(ot=0,Je=Pt.length;ot<Je;ot++)Ue=Pt[ot],Ye={},Ye[ut]=Ue,ft=this.element(Ye);else je(Pt)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&ut.indexOf(this.stringify.convertTextKey)===0?ft=this.element(Pt):(ft=this.element(ut),ft.element(Pt)):ft=this.element(ut,Pt)}else!this.options.keepNullNodes&&We===null?ft=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&Ae.indexOf(this.stringify.convertTextKey)===0?ft=this.text(We):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&Ae.indexOf(this.stringify.convertCDataKey)===0?ft=this.cdata(We):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&Ae.indexOf(this.stringify.convertCommentKey)===0?ft=this.comment(We):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&Ae.indexOf(this.stringify.convertRawKey)===0?ft=this.raw(We):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&Ae.indexOf(this.stringify.convertPIKey)===0?ft=this.instruction(Ae.substr(this.stringify.convertPIKey.length),We):ft=this.node(Ae,Re,We);if(ft==null)throw new Error("Could not create any elements with: "+Ae+". "+this.debugInfo());return ft},Ne.prototype.insertBefore=function(Ae,Re,We){var Ye,Ue,Ke,ot,ut;if(Ae!=null&&Ae.type)return Ke=Ae,ot=Re,Ke.setParent(this),ot?(Ue=children.indexOf(ot),ut=children.splice(Ue),children.push(Ke),Array.prototype.push.apply(children,ut)):children.push(Ke),Ke;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(Ae));return Ue=this.parent.children.indexOf(this),ut=this.parent.children.splice(Ue),Ye=this.parent.element(Ae,Re,We),Array.prototype.push.apply(this.parent.children,ut),Ye},Ne.prototype.insertAfter=function(Ae,Re,We){var Ye,Ue,Ke;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(Ae));return Ue=this.parent.children.indexOf(this),Ke=this.parent.children.splice(Ue+1),Ye=this.parent.element(Ae,Re,We),Array.prototype.push.apply(this.parent.children,Ke),Ye},Ne.prototype.remove=function(){var Ae,Re;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return Ae=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[Ae,Ae-Ae+1].concat(Re=[])),this.parent},Ne.prototype.node=function(Ae,Re,We){var Ye,Ue;return Ae!=null&&(Ae=ue(Ae)),Re||(Re={}),Re=ue(Re),je(Re)||(Ue=[Re,We],We=Ue[0],Re=Ue[1]),Ye=new we(this,Ae,Re),We!=null&&Ye.text(We),this.children.push(Ye),Ye},Ne.prototype.text=function(Ae){var Re;return je(Ae)&&this.element(Ae),Re=new le(this,Ae),this.children.push(Re),this},Ne.prototype.cdata=function(Ae){var Re;return Re=new ke(this,Ae),this.children.push(Re),this},Ne.prototype.comment=function(Ae){var Re;return Re=new Ce(this,Ae),this.children.push(Re),this},Ne.prototype.commentBefore=function(Ae){var Re,We,Ye;return We=this.parent.children.indexOf(this),Ye=this.parent.children.splice(We),Re=this.parent.comment(Ae),Array.prototype.push.apply(this.parent.children,Ye),this},Ne.prototype.commentAfter=function(Ae){var Re,We,Ye;return We=this.parent.children.indexOf(this),Ye=this.parent.children.splice(We+1),Re=this.parent.comment(Ae),Array.prototype.push.apply(this.parent.children,Ye),this},Ne.prototype.raw=function(Ae){var Re;return Re=new ie(this,Ae),this.children.push(Re),this},Ne.prototype.dummy=function(){var Ae;return Ae=new ve(this),Ae},Ne.prototype.instruction=function(Ae,Re){var We,Ye,Ue,Ke,ot;if(Ae!=null&&(Ae=ue(Ae)),Re!=null&&(Re=ue(Re)),Array.isArray(Ae))for(Ke=0,ot=Ae.length;Ke<ot;Ke++)We=Ae[Ke],this.instruction(We);else if(je(Ae))for(We in Ae)Fe.call(Ae,We)&&(Ye=Ae[We],this.instruction(We,Ye));else Pe(Re)&&(Re=Re.apply()),Ue=new ae(this,Ae,Re),this.children.push(Ue);return this},Ne.prototype.instructionBefore=function(Ae,Re){var We,Ye,Ue;return Ye=this.parent.children.indexOf(this),Ue=this.parent.children.splice(Ye),We=this.parent.instruction(Ae,Re),Array.prototype.push.apply(this.parent.children,Ue),this},Ne.prototype.instructionAfter=function(Ae,Re){var We,Ye,Ue;return Ye=this.parent.children.indexOf(this),Ue=this.parent.children.splice(Ye+1),We=this.parent.instruction(Ae,Re),Array.prototype.push.apply(this.parent.children,Ue),this},Ne.prototype.declaration=function(Ae,Re,We){var Ye,Ue;return Ye=this.document(),Ue=new Se(Ye,Ae,Re,We),Ye.children.length===0?Ye.children.unshift(Ue):Ye.children[0].type===me.Declaration?Ye.children[0]=Ue:Ye.children.unshift(Ue),Ye.root()||Ye},Ne.prototype.dtd=function(Ae,Re){var We,Ye,Ue,Ke,ot,ut,ft,wt,Je,nt;for(Ye=this.document(),Ue=new Me(Ye,Ae,Re),Je=Ye.children,Ke=ot=0,ft=Je.length;ot<ft;Ke=++ot)if(We=Je[Ke],We.type===me.DocType)return Ye.children[Ke]=Ue,Ue;for(nt=Ye.children,Ke=ut=0,wt=nt.length;ut<wt;Ke=++ut)if(We=nt[Ke],We.isRoot)return Ye.children.splice(Ke,0,Ue),Ue;return Ye.children.push(Ue),Ue},Ne.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},Ne.prototype.root=function(){var Ae;for(Ae=this;Ae;){if(Ae.type===me.Document)return Ae.rootObject;if(Ae.isRoot)return Ae;Ae=Ae.parent}},Ne.prototype.document=function(){var Ae;for(Ae=this;Ae;){if(Ae.type===me.Document)return Ae;Ae=Ae.parent}},Ne.prototype.end=function(Ae){return this.document().end(Ae)},Ne.prototype.prev=function(){var Ae;if(Ae=this.parent.children.indexOf(this),Ae<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[Ae-1]},Ne.prototype.next=function(){var Ae;if(Ae=this.parent.children.indexOf(this),Ae===-1||Ae===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[Ae+1]},Ne.prototype.importDocument=function(Ae){var Re;return Re=Ae.root().clone(),Re.parent=this,Re.isRoot=!1,this.children.push(Re),this},Ne.prototype.debugInfo=function(Ae){var Re,We;return Ae=Ae||this.name,Ae==null&&!((Re=this.parent)!=null&&Re.name)?"":Ae==null?"parent: <"+this.parent.name+">":(We=this.parent)!=null&&We.name?"node: <"+Ae+">, parent: <"+this.parent.name+">":"node: <"+Ae+">"},Ne.prototype.ele=function(Ae,Re,We){return this.element(Ae,Re,We)},Ne.prototype.nod=function(Ae,Re,We){return this.node(Ae,Re,We)},Ne.prototype.txt=function(Ae){return this.text(Ae)},Ne.prototype.dat=function(Ae){return this.cdata(Ae)},Ne.prototype.com=function(Ae){return this.comment(Ae)},Ne.prototype.ins=function(Ae,Re){return this.instruction(Ae,Re)},Ne.prototype.doc=function(){return this.document()},Ne.prototype.dec=function(Ae,Re,We){return this.declaration(Ae,Re,We)},Ne.prototype.e=function(Ae,Re,We){return this.element(Ae,Re,We)},Ne.prototype.n=function(Ae,Re,We){return this.node(Ae,Re,We)},Ne.prototype.t=function(Ae){return this.text(Ae)},Ne.prototype.d=function(Ae){return this.cdata(Ae)},Ne.prototype.c=function(Ae){return this.comment(Ae)},Ne.prototype.r=function(Ae){return this.raw(Ae)},Ne.prototype.i=function(Ae,Re){return this.instruction(Ae,Re)},Ne.prototype.u=function(){return this.up()},Ne.prototype.importXMLBuilder=function(Ae){return this.importDocument(Ae)},Ne.prototype.replaceChild=function(Ae,Re){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.removeChild=function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.appendChild=function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.hasChildNodes=function(){return this.children.length!==0},Ne.prototype.cloneNode=function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.isSupported=function(Ae,Re){return!0},Ne.prototype.hasAttributes=function(){return this.attribs.length!==0},Ne.prototype.compareDocumentPosition=function(Ae){var Re,We;return Re=this,Re===Ae?0:this.document()!==Ae.document()?(We=fe.Disconnected|fe.ImplementationSpecific,Math.random()<.5?We|=fe.Preceding:We|=fe.Following,We):Re.isAncestor(Ae)?fe.Contains|fe.Preceding:Re.isDescendant(Ae)?fe.Contains|fe.Following:Re.isPreceding(Ae)?fe.Preceding:fe.Following},Ne.prototype.isSameNode=function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.lookupPrefix=function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.isDefaultNamespace=function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.lookupNamespaceURI=function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.isEqualNode=function(Ae){var Re,We,Ye;if(Ae.nodeType!==this.nodeType||Ae.children.length!==this.children.length)return!1;for(Re=We=0,Ye=this.children.length-1;0<=Ye?We<=Ye:We>=Ye;Re=0<=Ye?++We:--We)if(!this.children[Re].isEqualNode(Ae.children[Re]))return!1;return!0},Ne.prototype.getFeature=function(Ae,Re){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.setUserData=function(Ae,Re,We){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.getUserData=function(Ae){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ne.prototype.contains=function(Ae){return Ae?Ae===this||this.isDescendant(Ae):!1},Ne.prototype.isDescendant=function(Ae){var Re,We,Ye,Ue,Ke;for(Ke=this.children,Ye=0,Ue=Ke.length;Ye<Ue;Ye++)if(Re=Ke[Ye],Ae===Re||(We=Re.isDescendant(Ae),We))return!0;return!1},Ne.prototype.isAncestor=function(Ae){return Ae.isDescendant(this)},Ne.prototype.isPreceding=function(Ae){var Re,We;return Re=this.treePosition(Ae),We=this.treePosition(this),Re===-1||We===-1?!1:Re<We},Ne.prototype.isFollowing=function(Ae){var Re,We;return Re=this.treePosition(Ae),We=this.treePosition(this),Re===-1||We===-1?!1:Re>We},Ne.prototype.treePosition=function(Ae){var Re,We;return We=0,Re=!1,this.foreachTreeNode(this.document(),function(Ye){if(We++,!Re&&Ye===Ae)return Re=!0}),Re?We:-1},Ne.prototype.foreachTreeNode=function(Ae,Re){var We,Ye,Ue,Ke,ot;for(Ae||(Ae=this.document()),Ke=Ae.children,Ye=0,Ue=Ke.length;Ye<Ue;Ye++){if(We=Ke[Ye],ot=Re(We))return ot;if(ot=this.foreachTreeNode(We,Re),ot)return ot}},Ne}()}).call(this)},{"./DocumentPosition":427,"./NodeType":428,"./Utility":429,"./XMLCData":432,"./XMLComment":434,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDummy":447,"./XMLElement":448,"./XMLNamedNodeMap":449,"./XMLNodeList":451,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLText":457}],451:[function(oe,Ge,De){(function(){var fe;Ge.exports=fe=function(){function me(ke){this.nodes=ke}return Object.defineProperty(me.prototype,"length",{get:function(){return this.nodes.length||0}}),me.prototype.clone=function(){return this.nodes=null},me.prototype.item=function(ke){return this.nodes[ke]||null},me}()}).call(this)},{}],452:[function(oe,Ge,De){(function(){var fe,me,ke,Ce=function(Me,ve){for(var we in ve)Se.call(ve,we)&&(Me[we]=ve[we]);function de(){this.constructor=Me}return de.prototype=ve.prototype,Me.prototype=new de,Me.__super__=ve.prototype,Me},Se={}.hasOwnProperty;fe=oe("./NodeType"),me=oe("./XMLCharacterData"),Ge.exports=ke=function(Me){Ce(ve,Me);function ve(we,de,z){if(ve.__super__.constructor.call(this,we),de==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=fe.ProcessingInstruction,this.target=this.stringify.insTarget(de),this.name=this.target,z&&(this.value=this.stringify.insValue(z))}return ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(we){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(we))},ve.prototype.isEqualNode=function(we){return!(!ve.__super__.isEqualNode.apply(this,arguments).isEqualNode(we)||we.target!==this.target)},ve}(me)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],453:[function(oe,Ge,De){(function(){var fe,me,ke,Ce=function(Me,ve){for(var we in ve)Se.call(ve,we)&&(Me[we]=ve[we]);function de(){this.constructor=Me}return de.prototype=ve.prototype,Me.prototype=new de,Me.__super__=ve.prototype,Me},Se={}.hasOwnProperty;fe=oe("./NodeType"),me=oe("./XMLNode"),Ge.exports=ke=function(Me){Ce(ve,Me);function ve(we,de){if(ve.__super__.constructor.call(this,we),de==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=fe.Raw,this.value=this.stringify.raw(de)}return ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(we){return this.options.writer.raw(this,this.options.writer.filterOptions(we))},ve}(me)}).call(this)},{"./NodeType":428,"./XMLNode":450}],454:[function(oe,Ge,De){(function(){var fe,me,ke,Ce,Se=function(ve,we){for(var de in we)Me.call(we,de)&&(ve[de]=we[de]);function z(){this.constructor=ve}return z.prototype=we.prototype,ve.prototype=new z,ve.__super__=we.prototype,ve},Me={}.hasOwnProperty;fe=oe("./NodeType"),Ce=oe("./XMLWriterBase"),me=oe("./WriterState"),Ge.exports=ke=function(ve){Se(we,ve);function we(de,z){this.stream=de,we.__super__.constructor.call(this,z)}return we.prototype.endline=function(de,z,ee){return de.isLastRootNode&&z.state===me.CloseTag?"":we.__super__.endline.call(this,de,z,ee)},we.prototype.document=function(de,z){var ee,ae,ie,le,ue,ge,Pe,je,Be;for(Pe=de.children,ae=ie=0,ue=Pe.length;ie<ue;ae=++ie)ee=Pe[ae],ee.isLastRootNode=ae===de.children.length-1;for(z=this.filterOptions(z),je=de.children,Be=[],le=0,ge=je.length;le<ge;le++)ee=je[le],Be.push(this.writeChildNode(ee,z,0));return Be},we.prototype.attribute=function(de,z,ee){return this.stream.write(we.__super__.attribute.call(this,de,z,ee))},we.prototype.cdata=function(de,z,ee){return this.stream.write(we.__super__.cdata.call(this,de,z,ee))},we.prototype.comment=function(de,z,ee){return this.stream.write(we.__super__.comment.call(this,de,z,ee))},we.prototype.declaration=function(de,z,ee){return this.stream.write(we.__super__.declaration.call(this,de,z,ee))},we.prototype.docType=function(de,z,ee){var ae,ie,le,ue;if(ee||(ee=0),this.openNode(de,z,ee),z.state=me.OpenTag,this.stream.write(this.indent(de,z,ee)),this.stream.write("<!DOCTYPE "+de.root().name),de.pubID&&de.sysID?this.stream.write(' PUBLIC "'+de.pubID+'" "'+de.sysID+'"'):de.sysID&&this.stream.write(' SYSTEM "'+de.sysID+'"'),de.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(de,z,ee)),z.state=me.InsideTag,ue=de.children,ie=0,le=ue.length;ie<le;ie++)ae=ue[ie],this.writeChildNode(ae,z,ee+1);z.state=me.CloseTag,this.stream.write("]")}return z.state=me.CloseTag,this.stream.write(z.spaceBeforeSlash+">"),this.stream.write(this.endline(de,z,ee)),z.state=me.None,this.closeNode(de,z,ee)},we.prototype.element=function(de,z,ee){var ae,ie,le,ue,ge,Pe,je,Be,Fe,Ne;ee||(ee=0),this.openNode(de,z,ee),z.state=me.OpenTag,this.stream.write(this.indent(de,z,ee)+"<"+de.name),Fe=de.attribs;for(je in Fe)Me.call(Fe,je)&&(ae=Fe[je],this.attribute(ae,z,ee));if(le=de.children.length,ue=le===0?null:de.children[0],le===0||de.children.every(function(Ae){return(Ae.type===fe.Text||Ae.type===fe.Raw)&&Ae.value===""}))z.allowEmpty?(this.stream.write(">"),z.state=me.CloseTag,this.stream.write("</"+de.name+">")):(z.state=me.CloseTag,this.stream.write(z.spaceBeforeSlash+"/>"));else if(z.pretty&&le===1&&(ue.type===fe.Text||ue.type===fe.Raw)&&ue.value!=null)this.stream.write(">"),z.state=me.InsideTag,z.suppressPrettyCount++,Be=!0,this.writeChildNode(ue,z,ee+1),z.suppressPrettyCount--,Be=!1,z.state=me.CloseTag,this.stream.write("</"+de.name+">");else{for(this.stream.write(">"+this.endline(de,z,ee)),z.state=me.InsideTag,Ne=de.children,ge=0,Pe=Ne.length;ge<Pe;ge++)ie=Ne[ge],this.writeChildNode(ie,z,ee+1);z.state=me.CloseTag,this.stream.write(this.indent(de,z,ee)+"</"+de.name+">")}return this.stream.write(this.endline(de,z,ee)),z.state=me.None,this.closeNode(de,z,ee)},we.prototype.processingInstruction=function(de,z,ee){return this.stream.write(we.__super__.processingInstruction.call(this,de,z,ee))},we.prototype.raw=function(de,z,ee){return this.stream.write(we.__super__.raw.call(this,de,z,ee))},we.prototype.text=function(de,z,ee){return this.stream.write(we.__super__.text.call(this,de,z,ee))},we.prototype.dtdAttList=function(de,z,ee){return this.stream.write(we.__super__.dtdAttList.call(this,de,z,ee))},we.prototype.dtdElement=function(de,z,ee){return this.stream.write(we.__super__.dtdElement.call(this,de,z,ee))},we.prototype.dtdEntity=function(de,z,ee){return this.stream.write(we.__super__.dtdEntity.call(this,de,z,ee))},we.prototype.dtdNotation=function(de,z,ee){return this.stream.write(we.__super__.dtdNotation.call(this,de,z,ee))},we}(Ce)}).call(this)},{"./NodeType":428,"./WriterState":430,"./XMLWriterBase":458}],455:[function(oe,Ge,De){(function(){var fe,me,ke=function(Se,Me){for(var ve in Me)Ce.call(Me,ve)&&(Se[ve]=Me[ve]);function we(){this.constructor=Se}return we.prototype=Me.prototype,Se.prototype=new we,Se.__super__=Me.prototype,Se},Ce={}.hasOwnProperty;me=oe("./XMLWriterBase"),Ge.exports=fe=function(Se){ke(Me,Se);function Me(ve){Me.__super__.constructor.call(this,ve)}return Me.prototype.document=function(ve,we){var de,z,ee,ae,ie;for(we=this.filterOptions(we),ae="",ie=ve.children,z=0,ee=ie.length;z<ee;z++)de=ie[z],ae+=this.writeChildNode(de,we,0);return we.pretty&&ae.slice(-we.newline.length)===we.newline&&(ae=ae.slice(0,-we.newline.length)),ae},Me}(me)}).call(this)},{"./XMLWriterBase":458}],456:[function(oe,Ge,De){(function(){var fe,me=function(Ce,Se){return function(){return Ce.apply(Se,arguments)}},ke={}.hasOwnProperty;Ge.exports=fe=function(){function Ce(Se){this.assertLegalName=me(this.assertLegalName,this),this.assertLegalChar=me(this.assertLegalChar,this);var Me,ve,we;Se||(Se={}),this.options=Se,this.options.version||(this.options.version="1.0"),ve=Se.stringify||{};for(Me in ve)ke.call(ve,Me)&&(we=ve[Me],this[Me]=we)}return Ce.prototype.name=function(Se){return this.options.noValidation?Se:this.assertLegalName(""+Se||"")},Ce.prototype.text=function(Se){return this.options.noValidation?Se:this.assertLegalChar(this.textEscape(""+Se||""))},Ce.prototype.cdata=function(Se){return this.options.noValidation?Se:(Se=""+Se||"",Se=Se.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(Se))},Ce.prototype.comment=function(Se){if(this.options.noValidation)return Se;if(Se=""+Se||"",Se.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+Se);return this.assertLegalChar(Se)},Ce.prototype.raw=function(Se){return this.options.noValidation?Se:""+Se||""},Ce.prototype.attValue=function(Se){return this.options.noValidation?Se:this.assertLegalChar(this.attEscape(Se=""+Se||""))},Ce.prototype.insTarget=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},Ce.prototype.insValue=function(Se){if(this.options.noValidation)return Se;if(Se=""+Se||"",Se.match(/\?>/))throw new Error("Invalid processing instruction value: "+Se);return this.assertLegalChar(Se)},Ce.prototype.xmlVersion=function(Se){if(this.options.noValidation)return Se;if(Se=""+Se||"",!Se.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+Se);return Se},Ce.prototype.xmlEncoding=function(Se){if(this.options.noValidation)return Se;if(Se=""+Se||"",!Se.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+Se);return this.assertLegalChar(Se)},Ce.prototype.xmlStandalone=function(Se){return this.options.noValidation?Se:Se?"yes":"no"},Ce.prototype.dtdPubID=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},Ce.prototype.dtdSysID=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},Ce.prototype.dtdElementValue=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},Ce.prototype.dtdAttType=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},Ce.prototype.dtdAttDefault=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},Ce.prototype.dtdEntityValue=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},Ce.prototype.dtdNData=function(Se){return this.options.noValidation?Se:this.assertLegalChar(""+Se||"")},Ce.prototype.convertAttKey="@",Ce.prototype.convertPIKey="?",Ce.prototype.convertTextKey="#text",Ce.prototype.convertCDataKey="#cdata",Ce.prototype.convertCommentKey="#comment",Ce.prototype.convertRawKey="#raw",Ce.prototype.assertLegalChar=function(Se){var Me,ve;if(this.options.noValidation)return Se;if(Me="",this.options.version==="1.0"){if(Me=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ve=Se.match(Me))throw new Error("Invalid character in string: "+Se+" at index "+ve.index)}else if(this.options.version==="1.1"&&(Me=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ve=Se.match(Me)))throw new Error("Invalid character in string: "+Se+" at index "+ve.index);return Se},Ce.prototype.assertLegalName=function(Se){var Me;if(this.options.noValidation)return Se;if(this.assertLegalChar(Se),Me=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!Se.match(Me))throw new Error("Invalid character in name");return Se},Ce.prototype.textEscape=function(Se){var Me;return this.options.noValidation?Se:(Me=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,Se.replace(Me,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;"))},Ce.prototype.attEscape=function(Se){var Me;return this.options.noValidation?Se:(Me=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,Se.replace(Me,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;"))},Ce}()}).call(this)},{}],457:[function(oe,Ge,De){(function(){var fe,me,ke,Ce=function(Me,ve){for(var we in ve)Se.call(ve,we)&&(Me[we]=ve[we]);function de(){this.constructor=Me}return de.prototype=ve.prototype,Me.prototype=new de,Me.__super__=ve.prototype,Me},Se={}.hasOwnProperty;fe=oe("./NodeType"),me=oe("./XMLCharacterData"),Ge.exports=ke=function(Me){Ce(ve,Me);function ve(we,de){if(ve.__super__.constructor.call(this,we),de==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=fe.Text,this.value=this.stringify.text(de)}return Object.defineProperty(ve.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(ve.prototype,"wholeText",{get:function(){var we,de,z;for(z="",de=this.previousSibling;de;)z=de.data+z,de=de.previousSibling;for(z+=this.data,we=this.nextSibling;we;)z=z+we.data,we=we.nextSibling;return z}}),ve.prototype.clone=function(){return Object.create(this)},ve.prototype.toString=function(we){return this.options.writer.text(this,this.options.writer.filterOptions(we))},ve.prototype.splitText=function(we){throw new Error("This DOM method is not implemented."+this.debugInfo())},ve.prototype.replaceWholeText=function(we){throw new Error("This DOM method is not implemented."+this.debugInfo())},ve}(me)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],458:[function(oe,Ge,De){(function(){var fe,me,ke,Ce,Se,Me,ve,we,de,z,ee,ae,ie,le,ue,ge,Pe,je={}.hasOwnProperty;Pe=oe("./Utility").assign,fe=oe("./NodeType"),de=oe("./XMLDeclaration"),z=oe("./XMLDocType"),ke=oe("./XMLCData"),Ce=oe("./XMLComment"),ae=oe("./XMLElement"),le=oe("./XMLRaw"),ue=oe("./XMLText"),ie=oe("./XMLProcessingInstruction"),ee=oe("./XMLDummy"),Se=oe("./XMLDTDAttList"),Me=oe("./XMLDTDElement"),ve=oe("./XMLDTDEntity"),we=oe("./XMLDTDNotation"),me=oe("./WriterState"),Ge.exports=ge=function(){function Be(Fe){var Ne,Ae,Re;Fe||(Fe={}),this.options=Fe,Ae=Fe.writer||{};for(Ne in Ae)je.call(Ae,Ne)&&(Re=Ae[Ne],this["_"+Ne]=this[Ne],this[Ne]=Re)}return Be.prototype.filterOptions=function(Fe){var Ne,Ae,Re,We,Ye,Ue,Ke,ot;return Fe||(Fe={}),Fe=Pe({},this.options,Fe),Ne={writer:this},Ne.pretty=Fe.pretty||!1,Ne.allowEmpty=Fe.allowEmpty||!1,Ne.indent=(Ae=Fe.indent)!=null?Ae:" ",Ne.newline=(Re=Fe.newline)!=null?Re:`
`,Ne.offset=(We=Fe.offset)!=null?We:0,Ne.dontPrettyTextNodes=(Ye=(Ue=Fe.dontPrettyTextNodes)!=null?Ue:Fe.dontprettytextnodes)!=null?Ye:0,Ne.spaceBeforeSlash=(Ke=(ot=Fe.spaceBeforeSlash)!=null?ot:Fe.spacebeforeslash)!=null?Ke:"",Ne.spaceBeforeSlash===!0&&(Ne.spaceBeforeSlash=" "),Ne.suppressPrettyCount=0,Ne.user={},Ne.state=me.None,Ne},Be.prototype.indent=function(Fe,Ne,Ae){var Re;return!Ne.pretty||Ne.suppressPrettyCount?"":Ne.pretty&&(Re=(Ae||0)+Ne.offset+1,Re>0)?new Array(Re).join(Ne.indent):""},Be.prototype.endline=function(Fe,Ne,Ae){return!Ne.pretty||Ne.suppressPrettyCount?"":Ne.newline},Be.prototype.attribute=function(Fe,Ne,Ae){var Re;return this.openAttribute(Fe,Ne,Ae),Re=" "+Fe.name+'="'+Fe.value+'"',this.closeAttribute(Fe,Ne,Ae),Re},Be.prototype.cdata=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae)+"<![CDATA[",Ne.state=me.InsideTag,Re+=Fe.value,Ne.state=me.CloseTag,Re+="]]>"+this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.comment=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae)+"<!-- ",Ne.state=me.InsideTag,Re+=Fe.value,Ne.state=me.CloseTag,Re+=" -->"+this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.declaration=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae)+"<?xml",Ne.state=me.InsideTag,Re+=' version="'+Fe.version+'"',Fe.encoding!=null&&(Re+=' encoding="'+Fe.encoding+'"'),Fe.standalone!=null&&(Re+=' standalone="'+Fe.standalone+'"'),Ne.state=me.CloseTag,Re+=Ne.spaceBeforeSlash+"?>",Re+=this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.docType=function(Fe,Ne,Ae){var Re,We,Ye,Ue,Ke;if(Ae||(Ae=0),this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Ue=this.indent(Fe,Ne,Ae),Ue+="<!DOCTYPE "+Fe.root().name,Fe.pubID&&Fe.sysID?Ue+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.sysID&&(Ue+=' SYSTEM "'+Fe.sysID+'"'),Fe.children.length>0){for(Ue+=" [",Ue+=this.endline(Fe,Ne,Ae),Ne.state=me.InsideTag,Ke=Fe.children,We=0,Ye=Ke.length;We<Ye;We++)Re=Ke[We],Ue+=this.writeChildNode(Re,Ne,Ae+1);Ne.state=me.CloseTag,Ue+="]"}return Ne.state=me.CloseTag,Ue+=Ne.spaceBeforeSlash+">",Ue+=this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Ue},Be.prototype.element=function(Fe,Ne,Ae){var Re,We,Ye,Ue,Ke,ot,ut,ft,wt,Je,nt,xt,Pt,Ct;Ae||(Ae=0),Je=!1,nt="",this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,nt+=this.indent(Fe,Ne,Ae)+"<"+Fe.name,xt=Fe.attribs;for(wt in xt)je.call(xt,wt)&&(Re=xt[wt],nt+=this.attribute(Re,Ne,Ae));if(Ye=Fe.children.length,Ue=Ye===0?null:Fe.children[0],Ye===0||Fe.children.every(function(gt){return(gt.type===fe.Text||gt.type===fe.Raw)&&gt.value===""}))Ne.allowEmpty?(nt+=">",Ne.state=me.CloseTag,nt+="</"+Fe.name+">"+this.endline(Fe,Ne,Ae)):(Ne.state=me.CloseTag,nt+=Ne.spaceBeforeSlash+"/>"+this.endline(Fe,Ne,Ae));else if(Ne.pretty&&Ye===1&&(Ue.type===fe.Text||Ue.type===fe.Raw)&&Ue.value!=null)nt+=">",Ne.state=me.InsideTag,Ne.suppressPrettyCount++,Je=!0,nt+=this.writeChildNode(Ue,Ne,Ae+1),Ne.suppressPrettyCount--,Je=!1,Ne.state=me.CloseTag,nt+="</"+Fe.name+">"+this.endline(Fe,Ne,Ae);else{if(Ne.dontPrettyTextNodes){for(Pt=Fe.children,Ke=0,ut=Pt.length;Ke<ut;Ke++)if(We=Pt[Ke],(We.type===fe.Text||We.type===fe.Raw)&&We.value!=null){Ne.suppressPrettyCount++,Je=!0;break}}for(nt+=">"+this.endline(Fe,Ne,Ae),Ne.state=me.InsideTag,Ct=Fe.children,ot=0,ft=Ct.length;ot<ft;ot++)We=Ct[ot],nt+=this.writeChildNode(We,Ne,Ae+1);Ne.state=me.CloseTag,nt+=this.indent(Fe,Ne,Ae)+"</"+Fe.name+">",Je&&Ne.suppressPrettyCount--,nt+=this.endline(Fe,Ne,Ae),Ne.state=me.None}return this.closeNode(Fe,Ne,Ae),nt},Be.prototype.writeChildNode=function(Fe,Ne,Ae){switch(Fe.type){case fe.CData:return this.cdata(Fe,Ne,Ae);case fe.Comment:return this.comment(Fe,Ne,Ae);case fe.Element:return this.element(Fe,Ne,Ae);case fe.Raw:return this.raw(Fe,Ne,Ae);case fe.Text:return this.text(Fe,Ne,Ae);case fe.ProcessingInstruction:return this.processingInstruction(Fe,Ne,Ae);case fe.Dummy:return"";case fe.Declaration:return this.declaration(Fe,Ne,Ae);case fe.DocType:return this.docType(Fe,Ne,Ae);case fe.AttributeDeclaration:return this.dtdAttList(Fe,Ne,Ae);case fe.ElementDeclaration:return this.dtdElement(Fe,Ne,Ae);case fe.EntityDeclaration:return this.dtdEntity(Fe,Ne,Ae);case fe.NotationDeclaration:return this.dtdNotation(Fe,Ne,Ae);default:throw new Error("Unknown XML node type: "+Fe.constructor.name)}},Be.prototype.processingInstruction=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae)+"<?",Ne.state=me.InsideTag,Re+=Fe.target,Fe.value&&(Re+=" "+Fe.value),Ne.state=me.CloseTag,Re+=Ne.spaceBeforeSlash+"?>",Re+=this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.raw=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae),Ne.state=me.InsideTag,Re+=Fe.value,Ne.state=me.CloseTag,Re+=this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.text=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae),Ne.state=me.InsideTag,Re+=Fe.value,Ne.state=me.CloseTag,Re+=this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.dtdAttList=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae)+"<!ATTLIST",Ne.state=me.InsideTag,Re+=" "+Fe.elementName+" "+Fe.attributeName+" "+Fe.attributeType,Fe.defaultValueType!=="#DEFAULT"&&(Re+=" "+Fe.defaultValueType),Fe.defaultValue&&(Re+=' "'+Fe.defaultValue+'"'),Ne.state=me.CloseTag,Re+=Ne.spaceBeforeSlash+">"+this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.dtdElement=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae)+"<!ELEMENT",Ne.state=me.InsideTag,Re+=" "+Fe.name+" "+Fe.value,Ne.state=me.CloseTag,Re+=Ne.spaceBeforeSlash+">"+this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.dtdEntity=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae)+"<!ENTITY",Ne.state=me.InsideTag,Fe.pe&&(Re+=" %"),Re+=" "+Fe.name,Fe.value?Re+=' "'+Fe.value+'"':(Fe.pubID&&Fe.sysID?Re+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.sysID&&(Re+=' SYSTEM "'+Fe.sysID+'"'),Fe.nData&&(Re+=" NDATA "+Fe.nData)),Ne.state=me.CloseTag,Re+=Ne.spaceBeforeSlash+">"+this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.dtdNotation=function(Fe,Ne,Ae){var Re;return this.openNode(Fe,Ne,Ae),Ne.state=me.OpenTag,Re=this.indent(Fe,Ne,Ae)+"<!NOTATION",Ne.state=me.InsideTag,Re+=" "+Fe.name,Fe.pubID&&Fe.sysID?Re+=' PUBLIC "'+Fe.pubID+'" "'+Fe.sysID+'"':Fe.pubID?Re+=' PUBLIC "'+Fe.pubID+'"':Fe.sysID&&(Re+=' SYSTEM "'+Fe.sysID+'"'),Ne.state=me.CloseTag,Re+=Ne.spaceBeforeSlash+">"+this.endline(Fe,Ne,Ae),Ne.state=me.None,this.closeNode(Fe,Ne,Ae),Re},Be.prototype.openNode=function(Fe,Ne,Ae){},Be.prototype.closeNode=function(Fe,Ne,Ae){},Be.prototype.openAttribute=function(Fe,Ne,Ae){},Be.prototype.closeAttribute=function(Fe,Ne,Ae){},Be}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDummy":447,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLText":457}],459:[function(oe,Ge,De){(function(){var fe,me,ke,Ce,Se,Me,ve,we,de,z;z=oe("./Utility"),we=z.assign,de=z.isFunction,ke=oe("./XMLDOMImplementation"),Ce=oe("./XMLDocument"),Se=oe("./XMLDocumentCB"),ve=oe("./XMLStringWriter"),Me=oe("./XMLStreamWriter"),fe=oe("./NodeType"),me=oe("./WriterState"),Ge.exports.create=function(ee,ae,ie,le){var ue,ge;if(ee==null)throw new Error("Root element needs a name.");return le=we({},ae,ie,le),ue=new Ce(le),ge=ue.element(ee),le.headless||(ue.declaration(le),(le.pubID!=null||le.sysID!=null)&&ue.dtd(le)),ge},Ge.exports.begin=function(ee,ae,ie){var le;return de(ee)&&(le=[ee,ae],ae=le[0],ie=le[1],ee={}),ae?new Se(ee,ae,ie):new Ce(ee)},Ge.exports.stringWriter=function(ee){return new ve(ee)},Ge.exports.streamWriter=function(ee,ae){return new Me(ee,ae)},Ge.exports.implementation=new ke,Ge.exports.nodeType=fe,Ge.exports.writerState=me}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLDOMImplementation":437,"./XMLDocument":445,"./XMLDocumentCB":446,"./XMLStreamWriter":454,"./XMLStringWriter":455}],460:[function(oe,Ge,De){Ge.exports=me;var fe=Object.prototype.hasOwnProperty;function me(){for(var ke={},Ce=0;Ce<arguments.length;Ce++){var Se=arguments[Ce];for(var Me in Se)fe.call(Se,Me)&&(ke[Me]=Se[Me])}return ke}},{}],461:[function(oe,Ge,De){"use strict";oe("core-js/modules/es.array.fill.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.regexp.to-string.js"),oe("core-js/modules/es.array.join.js"),oe("core-js/modules/es.array.slice.js");var fe=oe("buffer").Buffer,me=oe("./sha"),ke=oe("./md5"),Ce={sha1:me,md5:ke},Se=64,Me=fe.alloc(Se);Me.fill(0);function ve(z,ee,ae){fe.isBuffer(ee)||(ee=fe.from(ee)),fe.isBuffer(ae)||(ae=fe.from(ae)),ee.length>Se?ee=z(ee):ee.length<Se&&(ee=fe.concat([ee,Me],Se));for(var ie=fe.alloc(Se),le=fe.alloc(Se),ue=0;ue<Se;ue++)ie[ue]=ee[ue]^54,le[ue]=ee[ue]^92;var ge=z(fe.concat([ie,ae]));return z(fe.concat([le,ge]))}function we(z,ee){z=z||"sha1";var ae=Ce[z],ie=[],le=0;return ae||de("algorithm:",z,"is not yet supported"),{update:function(ge){return fe.isBuffer(ge)||(ge=fe.from(ge)),ie.push(ge),le+=ge.length,this},digest:function(ge){var Pe=fe.concat(ie),je=ee?ve(ae,ee,Pe):ae(Pe);return ie=null,ge?je.toString(ge):je}}}function de(){var z=[].slice.call(arguments).join(" ");throw new Error([z,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}De.createHash=function(z){return we(z)},De.createHmac=function(z,ee){return we(z,ee)},De.createCredentials=function(){de("sorry,createCredentials is not implemented yet")},De.createCipher=function(){de("sorry,createCipher is not implemented yet")},De.createCipheriv=function(){de("sorry,createCipheriv is not implemented yet")},De.createDecipher=function(){de("sorry,createDecipher is not implemented yet")},De.createDecipheriv=function(){de("sorry,createDecipheriv is not implemented yet")},De.createSign=function(){de("sorry,createSign is not implemented yet")},De.createVerify=function(){de("sorry,createVerify is not implemented yet")},De.createDiffieHellman=function(){de("sorry,createDiffieHellman is not implemented yet")},De.pbkdf2=function(){de("sorry,pbkdf2 is not implemented yet")}},{"./md5":463,"./sha":464,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],462:[function(oe,Ge,De){"use strict";oe("core-js/modules/es.array.fill.js"),oe("core-js/modules/es.array.concat.js");var fe=oe("buffer").Buffer,me=4,ke=fe.alloc(me);ke.fill(0);var Ce=8;function Se(we,de){if(we.length%me!==0){var z=we.length+(me-we.length%me);we=fe.concat([we,ke],z)}for(var ee=[],ae=de?we.readInt32BE:we.readInt32LE,ie=0;ie<we.length;ie+=me)ee.push(ae.call(we,ie));return ee}function Me(we,de,z){for(var ee=fe.alloc(de),ae=z?ee.writeInt32BE:ee.writeInt32LE,ie=0;ie<we.length;ie++)ae.call(ee,we[ie],ie*4,!0);return ee}function ve(we,de,z,ee){fe.isBuffer(we)||(we=fe.from(we));var ae=de(Se(we,ee),we.length*Ce);return Me(ae,z,ee)}Ge.exports={hash:ve}},{buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273}],463:[function(oe,Ge,De){"use strict";var fe=oe("./helpers");function me(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function ke(ee,ae){ee[ae>>5]|=128<<ae%32,ee[(ae+64>>>9<<4)+14]=ae;for(var ie=1732584193,le=-271733879,ue=-1732584194,ge=271733878,Pe=0;Pe<ee.length;Pe+=16){var je=ie,Be=le,Fe=ue,Ne=ge;ie=Se(ie,le,ue,ge,ee[Pe+0],7,-680876936),ge=Se(ge,ie,le,ue,ee[Pe+1],12,-389564586),ue=Se(ue,ge,ie,le,ee[Pe+2],17,606105819),le=Se(le,ue,ge,ie,ee[Pe+3],22,-1044525330),ie=Se(ie,le,ue,ge,ee[Pe+4],7,-176418897),ge=Se(ge,ie,le,ue,ee[Pe+5],12,1200080426),ue=Se(ue,ge,ie,le,ee[Pe+6],17,-1473231341),le=Se(le,ue,ge,ie,ee[Pe+7],22,-45705983),ie=Se(ie,le,ue,ge,ee[Pe+8],7,1770035416),ge=Se(ge,ie,le,ue,ee[Pe+9],12,-1958414417),ue=Se(ue,ge,ie,le,ee[Pe+10],17,-42063),le=Se(le,ue,ge,ie,ee[Pe+11],22,-1990404162),ie=Se(ie,le,ue,ge,ee[Pe+12],7,1804603682),ge=Se(ge,ie,le,ue,ee[Pe+13],12,-40341101),ue=Se(ue,ge,ie,le,ee[Pe+14],17,-1502002290),le=Se(le,ue,ge,ie,ee[Pe+15],22,1236535329),ie=Me(ie,le,ue,ge,ee[Pe+1],5,-165796510),ge=Me(ge,ie,le,ue,ee[Pe+6],9,-1069501632),ue=Me(ue,ge,ie,le,ee[Pe+11],14,643717713),le=Me(le,ue,ge,ie,ee[Pe+0],20,-373897302),ie=Me(ie,le,ue,ge,ee[Pe+5],5,-701558691),ge=Me(ge,ie,le,ue,ee[Pe+10],9,38016083),ue=Me(ue,ge,ie,le,ee[Pe+15],14,-660478335),le=Me(le,ue,ge,ie,ee[Pe+4],20,-405537848),ie=Me(ie,le,ue,ge,ee[Pe+9],5,568446438),ge=Me(ge,ie,le,ue,ee[Pe+14],9,-1019803690),ue=Me(ue,ge,ie,le,ee[Pe+3],14,-187363961),le=Me(le,ue,ge,ie,ee[Pe+8],20,1163531501),ie=Me(ie,le,ue,ge,ee[Pe+13],5,-1444681467),ge=Me(ge,ie,le,ue,ee[Pe+2],9,-51403784),ue=Me(ue,ge,ie,le,ee[Pe+7],14,1735328473),le=Me(le,ue,ge,ie,ee[Pe+12],20,-1926607734),ie=ve(ie,le,ue,ge,ee[Pe+5],4,-378558),ge=ve(ge,ie,le,ue,ee[Pe+8],11,-2022574463),ue=ve(ue,ge,ie,le,ee[Pe+11],16,1839030562),le=ve(le,ue,ge,ie,ee[Pe+14],23,-35309556),ie=ve(ie,le,ue,ge,ee[Pe+1],4,-1530992060),ge=ve(ge,ie,le,ue,ee[Pe+4],11,1272893353),ue=ve(ue,ge,ie,le,ee[Pe+7],16,-155497632),le=ve(le,ue,ge,ie,ee[Pe+10],23,-1094730640),ie=ve(ie,le,ue,ge,ee[Pe+13],4,681279174),ge=ve(ge,ie,le,ue,ee[Pe+0],11,-358537222),ue=ve(ue,ge,ie,le,ee[Pe+3],16,-722521979),le=ve(le,ue,ge,ie,ee[Pe+6],23,76029189),ie=ve(ie,le,ue,ge,ee[Pe+9],4,-640364487),ge=ve(ge,ie,le,ue,ee[Pe+12],11,-421815835),ue=ve(ue,ge,ie,le,ee[Pe+15],16,530742520),le=ve(le,ue,ge,ie,ee[Pe+2],23,-995338651),ie=we(ie,le,ue,ge,ee[Pe+0],6,-198630844),ge=we(ge,ie,le,ue,ee[Pe+7],10,1126891415),ue=we(ue,ge,ie,le,ee[Pe+14],15,-1416354905),le=we(le,ue,ge,ie,ee[Pe+5],21,-57434055),ie=we(ie,le,ue,ge,ee[Pe+12],6,1700485571),ge=we(ge,ie,le,ue,ee[Pe+3],10,-1894986606),ue=we(ue,ge,ie,le,ee[Pe+10],15,-1051523),le=we(le,ue,ge,ie,ee[Pe+1],21,-2054922799),ie=we(ie,le,ue,ge,ee[Pe+8],6,1873313359),ge=we(ge,ie,le,ue,ee[Pe+15],10,-30611744),ue=we(ue,ge,ie,le,ee[Pe+6],15,-1560198380),le=we(le,ue,ge,ie,ee[Pe+13],21,1309151649),ie=we(ie,le,ue,ge,ee[Pe+4],6,-145523070),ge=we(ge,ie,le,ue,ee[Pe+11],10,-1120210379),ue=we(ue,ge,ie,le,ee[Pe+2],15,718787259),le=we(le,ue,ge,ie,ee[Pe+9],21,-343485551),ie=de(ie,je),le=de(le,Be),ue=de(ue,Fe),ge=de(ge,Ne)}return Array(ie,le,ue,ge)}function Ce(ee,ae,ie,le,ue,ge){return de(z(de(de(ae,ee),de(le,ge)),ue),ie)}function Se(ee,ae,ie,le,ue,ge,Pe){return Ce(ae&ie|~ae&le,ee,ae,ue,ge,Pe)}function Me(ee,ae,ie,le,ue,ge,Pe){return Ce(ae&le|ie&~le,ee,ae,ue,ge,Pe)}function ve(ee,ae,ie,le,ue,ge,Pe){return Ce(ae^ie^le,ee,ae,ue,ge,Pe)}function we(ee,ae,ie,le,ue,ge,Pe){return Ce(ie^(ae|~le),ee,ae,ue,ge,Pe)}function de(ee,ae){var ie=(ee&65535)+(ae&65535),le=(ee>>16)+(ae>>16)+(ie>>16);return le<<16|ie&65535}function z(ee,ae){return ee<<ae|ee>>>32-ae}Ge.exports=function(ae){return fe.hash(ae,ke,16)}},{"./helpers":462}],464:[function(oe,Ge,De){"use strict";var fe=oe("./helpers");function me(ve,we){ve[we>>5]|=128<<24-we%32,ve[(we+64>>9<<4)+15]=we;for(var de=Array(80),z=1732584193,ee=-271733879,ae=-1732584194,ie=271733878,le=-1009589776,ue=0;ue<ve.length;ue+=16){for(var ge=z,Pe=ee,je=ae,Be=ie,Fe=le,Ne=0;Ne<80;Ne++){Ne<16?de[Ne]=ve[ue+Ne]:de[Ne]=Me(de[Ne-3]^de[Ne-8]^de[Ne-14]^de[Ne-16],1);var Ae=Se(Se(Me(z,5),ke(Ne,ee,ae,ie)),Se(Se(le,de[Ne]),Ce(Ne)));le=ie,ie=ae,ae=Me(ee,30),ee=z,z=Ae}z=Se(z,ge),ee=Se(ee,Pe),ae=Se(ae,je),ie=Se(ie,Be),le=Se(le,Fe)}return Array(z,ee,ae,ie,le)}function ke(ve,we,de,z){return ve<20?we&de|~we&z:ve<40?we^de^z:ve<60?we&de|we&z|de&z:we^de^z}function Ce(ve){return ve<20?1518500249:ve<40?1859775393:ve<60?-1894007588:-899497514}function Se(ve,we){var de=(ve&65535)+(we&65535),z=(ve>>16)+(we>>16)+(de>>16);return z<<16|de&65535}function Me(ve,we){return ve<<we|ve>>>32-we}Ge.exports=function(we){return fe.hash(we,me,20,!0)}},{"./helpers":462}],465:[function(oe,Ge,De){"use strict";Ge.exports=function(){return function(){}}},{}],466:[function(oe,Ge,De){(function(fe){(function(){"use strict";var me=oe("@babel/runtime/helpers/interopRequireDefault"),ke=me(oe("@babel/runtime/helpers/typeof")),Ce=oe("stream"),Se=Ce.Stream,Me=oe("../lib/common/utils/isArray"),ve=Me.isArray;Ge.exports.string=function(z){return typeof z=="string"},Ge.exports.array=ve,Ge.exports.buffer=fe.isBuffer;function we(de){return de instanceof Se}Ge.exports.writableStream=function(z){return we(z)&&typeof z._write=="function"&&(0,ke.default)(z._writableState)==="object"}}).call(this)}).call(this,{isBuffer:oe("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":63,"../node_modules/is-buffer/index.js":366,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,stream:398}],467:[function(oe,Ge,De){"use strict";var fe=oe("immediate"),me=Ge.exports={};me.nextTick=fe,me.title="browser",me.browser=!0,me.env={},me.argv=[],me.version="",me.versions={};function ke(){}me.on=ke,me.addListener=ke,me.once=ke,me.off=ke,me.removeListener=ke,me.removeAllListeners=ke,me.emit=ke,me.prependListener=ke,me.prependOnceListener=ke,me.listeners=function(Ce){return[]},me.binding=function(Ce){throw new Error("process.binding is not supported")},me.cwd=function(){return"/"},me.chdir=function(Ce){throw new Error("process.chdir is not supported")},me.umask=function(){return 0}},{immediate:358}],468:[function(oe,Ge,De){(function(fe){(function(){"use strict";oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.search.js");var me=oe("./lib/request"),ke=oe("./lib/response"),Ce=oe("xtend"),Se=oe("builtin-status-codes"),Me=oe("url"),ve=De;ve.request=function(we,de){typeof we=="string"?we=Me.parse(we):we=Ce(we);var z=fe.location.protocol.search(/^https?:$/)===-1?"http:":"",ee=we.protocol||z,ae=we.hostname||we.host,ie=we.port,le=we.path||"/";ae&&ae.indexOf(":")!==-1&&(ae="["+ae+"]"),we.url=(ae?ee+"//"+ae:"")+(ie?":"+ie:"")+le,we.method=(we.method||"GET").toUpperCase(),we.headers=we.headers||{};var ue=new me(we);return de&&ue.on("response",de),ue},ve.get=function(de,z){var ee=ve.request(de,z);return ee.end(),ee},ve.ClientRequest=me,ve.IncomingMessage=ke.IncomingMessage,ve.Agent=function(){},ve.Agent.defaultMaxSockets=4,ve.globalAgent=new ve.Agent,ve.STATUS_CODES=Se,ve.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this)}).call(this,typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":470,"./lib/response":471,"builtin-status-codes":91,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.search.js":306,url:472,xtend:460}],469:[function(oe,Ge,De){(function(fe){(function(){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.array-buffer.constructor.js"),oe("core-js/modules/es.array-buffer.slice.js"),oe("core-js/modules/es.array.slice.js"),De.fetch=ve(fe.fetch)&&ve(fe.ReadableStream),De.writableStream=ve(fe.WritableStream),De.abortController=ve(fe.AbortController),De.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),De.blobConstructor=!0}catch(we){}var me;function ke(){if(me!==void 0)return me;if(fe.XMLHttpRequest){me=new fe.XMLHttpRequest;try{me.open("GET",fe.XDomainRequest?"/":"https://example.com")}catch(we){me=null}}else me=null;return me}function Ce(we){var de=ke();if(!de)return!1;try{return de.responseType=we,de.responseType===we}catch(z){}return!1}var Se=typeof fe.ArrayBuffer!="undefined",Me=Se&&ve(fe.ArrayBuffer.prototype.slice);De.arraybuffer=De.fetch||Se&&Ce("arraybuffer"),De.msstream=!De.fetch&&Me&&Ce("ms-stream"),De.mozchunkedarraybuffer=!De.fetch&&Se&&Ce("moz-chunked-arraybuffer"),De.overrideMimeType=De.fetch||(ke()?ve(ke().overrideMimeType):!1),De.vbArray=ve(fe.VBArray);function ve(we){return typeof we=="function"}me=null}).call(this)}).call(this,typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"core-js/modules/es.array-buffer.constructor.js":270,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],470:[function(oe,Ge,De){(function(fe,me,ke){(function(){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.regexp.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.array.map.js"),oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.split.js");var Ce=oe("./capability"),Se=oe("inherits"),Me=oe("./response"),ve=oe("readable-stream"),we=oe("to-arraybuffer"),de=Me.IncomingMessage,z=Me.readyStates;function ee(ue,ge){return Ce.fetch&&ge?"fetch":Ce.mozchunkedarraybuffer?"moz-chunked-arraybuffer":Ce.msstream?"ms-stream":Ce.arraybuffer&&ue?"arraybuffer":Ce.vbArray&&ue?"text:vbarray":"text"}var ae=Ge.exports=function(ue){var ge=this;ve.Writable.call(ge),ge._opts=ue,ge._body=[],ge._headers={},ue.auth&&ge.setHeader("Authorization","Basic "+new ke(ue.auth).toString("base64")),Object.keys(ue.headers).forEach(function(Be){ge.setHeader(Be,ue.headers[Be])});var Pe,je=!0;if(ue.mode==="disable-fetch"||"requestTimeout"in ue&&!Ce.abortController)je=!1,Pe=!0;else if(ue.mode==="prefer-streaming")Pe=!1;else if(ue.mode==="allow-wrong-content-type")Pe=!Ce.overrideMimeType;else if(!ue.mode||ue.mode==="default"||ue.mode==="prefer-fast")Pe=!0;else throw new Error("Invalid value for opts.mode");ge._mode=ee(Pe,je),ge._fetchTimer=null,ge.on("finish",function(){ge._onFinish()})};Se(ae,ve.Writable),ae.prototype.setHeader=function(ue,ge){var Pe=this,je=ue.toLowerCase();le.indexOf(je)===-1&&(Pe._headers[je]={name:ue,value:ge})},ae.prototype.getHeader=function(ue){var ge=this._headers[ue.toLowerCase()];return ge?ge.value:null},ae.prototype.removeHeader=function(ue){var ge=this;delete ge._headers[ue.toLowerCase()]},ae.prototype._onFinish=function(){var ue=this;if(!ue._destroyed){var ge=ue._opts,Pe=ue._headers,je=null;ge.method!=="GET"&&ge.method!=="HEAD"&&(Ce.arraybuffer?je=we(ke.concat(ue._body)):Ce.blobConstructor?je=new me.Blob(ue._body.map(function(We){return we(We)}),{type:(Pe["content-type"]||{}).value||""}):je=ke.concat(ue._body).toString());var Be=[];if(Object.keys(Pe).forEach(function(We){var Ye=Pe[We].name,Ue=Pe[We].value;Array.isArray(Ue)?Ue.forEach(function(Ke){Be.push([Ye,Ke])}):Be.push([Ye,Ue])}),ue._mode==="fetch"){var Fe=null,Ne=null;if(Ce.abortController){var Ae=new AbortController;Fe=Ae.signal,ue._fetchAbortController=Ae,"requestTimeout"in ge&&ge.requestTimeout!==0&&(ue._fetchTimer=me.setTimeout(function(){ue.emit("requestTimeout"),ue._fetchAbortController&&ue._fetchAbortController.abort()},ge.requestTimeout))}me.fetch(ue._opts.url,{method:ue._opts.method,headers:Be,body:je||void 0,mode:"cors",credentials:ge.withCredentials?"include":"same-origin",signal:Fe}).then(function(We){ue._fetchResponse=We,ue._connect()},function(We){me.clearTimeout(ue._fetchTimer),ue._destroyed||ue.emit("error",We)})}else{var Re=ue._xhr=new me.XMLHttpRequest;try{Re.open(ue._opts.method,ue._opts.url,!0)}catch(We){fe.nextTick(function(){ue.emit("error",We)});return}"responseType"in Re&&(Re.responseType=ue._mode.split(":")[0]),"withCredentials"in Re&&(Re.withCredentials=!!ge.withCredentials),ue._mode==="text"&&"overrideMimeType"in Re&&Re.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in ge&&(Re.timeout=ge.requestTimeout,Re.ontimeout=function(){ue.emit("requestTimeout")}),Be.forEach(function(We){Re.setRequestHeader(We[0],We[1])}),ue._response=null,Re.onreadystatechange=function(){switch(Re.readyState){case z.LOADING:case z.DONE:ue._onXHRProgress();break}},ue._mode==="moz-chunked-arraybuffer"&&(Re.onprogress=function(){ue._onXHRProgress()}),Re.onerror=function(){ue._destroyed||ue.emit("error",new Error("XHR error"))};try{Re.send(je)}catch(We){fe.nextTick(function(){ue.emit("error",We)});return}}}};function ie(ue){try{var ge=ue.status;return ge!==null&&ge!==0}catch(Pe){return!1}}ae.prototype._onXHRProgress=function(){var ue=this;!ie(ue._xhr)||ue._destroyed||(ue._response||ue._connect(),ue._response._onXHRProgress())},ae.prototype._connect=function(){var ue=this;ue._destroyed||(ue._response=new de(ue._xhr,ue._fetchResponse,ue._mode,ue._fetchTimer),ue._response.on("error",function(ge){ue.emit("error",ge)}),ue.emit("response",ue._response))},ae.prototype._write=function(ue,ge,Pe){var je=this;je._body.push(ue),Pe()},ae.prototype.abort=ae.prototype.destroy=function(){var ue=this;ue._destroyed=!0,me.clearTimeout(ue._fetchTimer),ue._response&&(ue._response._destroyed=!0),ue._xhr?ue._xhr.abort():ue._fetchAbortController&&ue._fetchAbortController.abort()},ae.prototype.end=function(ue,ge,Pe){var je=this;typeof ue=="function"&&(Pe=ue,ue=void 0),ve.Writable.prototype.end.call(je,ue,ge,Pe)},ae.prototype.flushHeaders=function(){},ae.prototype.setTimeout=function(){},ae.prototype.setNoDelay=function(){},ae.prototype.setSocketKeepAlive=function(){};var le=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this)}).call(this,oe("_process"),typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},oe("buffer").Buffer)},{"./capability":469,"./response":471,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.split.js":307,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394,"to-arraybuffer":415}],471:[function(oe,Ge,De){(function(fe,me,ke){(function(){"use strict";oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/web.dom-collections.for-each.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.split.js"),oe("core-js/modules/es.string.match.js"),oe("core-js/modules/es.array.iterator.js"),oe("core-js/modules/es.array-buffer.slice.js"),oe("core-js/modules/es.typed-array.uint8-array.js"),oe("core-js/modules/es.typed-array.copy-within.js"),oe("core-js/modules/es.typed-array.every.js"),oe("core-js/modules/es.typed-array.fill.js"),oe("core-js/modules/es.typed-array.filter.js"),oe("core-js/modules/es.typed-array.find.js"),oe("core-js/modules/es.typed-array.find-index.js"),oe("core-js/modules/es.typed-array.for-each.js"),oe("core-js/modules/es.typed-array.includes.js"),oe("core-js/modules/es.typed-array.index-of.js"),oe("core-js/modules/es.typed-array.iterator.js"),oe("core-js/modules/es.typed-array.join.js"),oe("core-js/modules/es.typed-array.last-index-of.js"),oe("core-js/modules/es.typed-array.map.js"),oe("core-js/modules/es.typed-array.reduce.js"),oe("core-js/modules/es.typed-array.reduce-right.js"),oe("core-js/modules/es.typed-array.reverse.js"),oe("core-js/modules/es.typed-array.set.js"),oe("core-js/modules/es.typed-array.slice.js"),oe("core-js/modules/es.typed-array.some.js"),oe("core-js/modules/es.typed-array.sort.js"),oe("core-js/modules/es.typed-array.subarray.js"),oe("core-js/modules/es.typed-array.to-locale-string.js"),oe("core-js/modules/es.typed-array.to-string.js"),oe("core-js/modules/es.array.slice.js");var Ce=oe("./capability"),Se=oe("inherits"),Me=oe("readable-stream"),ve=De.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},we=De.IncomingMessage=function(de,z,ee,ae){var ie=this;if(Me.Readable.call(ie),ie._mode=ee,ie.headers={},ie.rawHeaders=[],ie.trailers={},ie.rawTrailers=[],ie.on("end",function(){fe.nextTick(function(){ie.emit("close")})}),ee==="fetch"){var le=function Fe(){ge.read().then(function(Ne){if(!ie._destroyed){if(Ne.done){me.clearTimeout(ae),ie.push(null);return}ie.push(new ke(Ne.value)),Fe()}}).catch(function(Ne){me.clearTimeout(ae),ie._destroyed||ie.emit("error",Ne)})};if(ie._fetchResponse=z,ie.url=z.url,ie.statusCode=z.status,ie.statusMessage=z.statusText,z.headers.forEach(function(Fe,Ne){ie.headers[Ne.toLowerCase()]=Fe,ie.rawHeaders.push(Ne,Fe)}),Ce.writableStream){var ue=new WritableStream({write:function(Ne){return new Promise(function(Ae,Re){ie._destroyed?Re():ie.push(new ke(Ne))?Ae():ie._resumeFetch=Ae})},close:function(){me.clearTimeout(ae),ie._destroyed||ie.push(null)},abort:function(Ne){ie._destroyed||ie.emit("error",Ne)}});try{z.body.pipeTo(ue).catch(function(Fe){me.clearTimeout(ae),ie._destroyed||ie.emit("error",Fe)});return}catch(Fe){}}var ge=z.body.getReader();le()}else{ie._xhr=de,ie._pos=0,ie.url=de.responseURL,ie.statusCode=de.status,ie.statusMessage=de.statusText;var Pe=de.getAllResponseHeaders().split(/\r?\n/);if(Pe.forEach(function(Fe){var Ne=Fe.match(/^([^:]+):\s*(.*)/);if(Ne){var Ae=Ne[1].toLowerCase();Ae==="set-cookie"?(ie.headers[Ae]===void 0&&(ie.headers[Ae]=[]),ie.headers[Ae].push(Ne[2])):ie.headers[Ae]!==void 0?ie.headers[Ae]+=", "+Ne[2]:ie.headers[Ae]=Ne[2],ie.rawHeaders.push(Ne[1],Ne[2])}}),ie._charset="x-user-defined",!Ce.overrideMimeType){var je=ie.rawHeaders["mime-type"];if(je){var Be=je.match(/;\s*charset=([^;])(;|$)/);Be&&(ie._charset=Be[1].toLowerCase())}ie._charset||(ie._charset="utf-8")}}};Se(we,Me.Readable),we.prototype._read=function(){var de=this,z=de._resumeFetch;z&&(de._resumeFetch=null,z())},we.prototype._onXHRProgress=function(){var de=this,z=de._xhr,ee=null;switch(de._mode){case"text:vbarray":if(z.readyState!==ve.DONE)break;try{ee=new me.VBArray(z.responseBody).toArray()}catch(ge){}if(ee!==null){de.push(new ke(ee));break}case"text":try{ee=z.responseText}catch(ge){de._mode="text:vbarray";break}if(ee.length>de._pos){var ae=ee.substr(de._pos);if(de._charset==="x-user-defined"){for(var ie=new ke(ae.length),le=0;le<ae.length;le++)ie[le]=ae.charCodeAt(le)&255;de.push(ie)}else de.push(ae,de._charset);de._pos=ee.length}break;case"arraybuffer":if(z.readyState!==ve.DONE||!z.response)break;ee=z.response,de.push(new ke(new Uint8Array(ee)));break;case"moz-chunked-arraybuffer":if(ee=z.response,z.readyState!==ve.LOADING||!ee)break;de.push(new ke(new Uint8Array(ee)));break;case"ms-stream":if(ee=z.response,z.readyState!==ve.LOADING)break;var ue=new me.MSStreamReader;ue.onprogress=function(){ue.result.byteLength>de._pos&&(de.push(new ke(new Uint8Array(ue.result.slice(de._pos)))),de._pos=ue.result.byteLength)},ue.onload=function(){de.push(null)},ue.readAsArrayBuffer(ee);break}de._xhr.readyState===ve.DONE&&de._mode!=="ms-stream"&&de.push(null)}}).call(this)}).call(this,oe("_process"),typeof dn!="undefined"?dn:typeof self!="undefined"?self:typeof window!="undefined"?window:{},oe("buffer").Buffer)},{"./capability":469,_process:467,buffer:90,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.split.js":307,"core-js/modules/es.typed-array.copy-within.js":315,"core-js/modules/es.typed-array.every.js":316,"core-js/modules/es.typed-array.fill.js":317,"core-js/modules/es.typed-array.filter.js":318,"core-js/modules/es.typed-array.find-index.js":319,"core-js/modules/es.typed-array.find.js":320,"core-js/modules/es.typed-array.for-each.js":321,"core-js/modules/es.typed-array.includes.js":322,"core-js/modules/es.typed-array.index-of.js":323,"core-js/modules/es.typed-array.iterator.js":324,"core-js/modules/es.typed-array.join.js":325,"core-js/modules/es.typed-array.last-index-of.js":326,"core-js/modules/es.typed-array.map.js":327,"core-js/modules/es.typed-array.reduce-right.js":328,"core-js/modules/es.typed-array.reduce.js":329,"core-js/modules/es.typed-array.reverse.js":330,"core-js/modules/es.typed-array.set.js":331,"core-js/modules/es.typed-array.slice.js":332,"core-js/modules/es.typed-array.some.js":333,"core-js/modules/es.typed-array.sort.js":334,"core-js/modules/es.typed-array.subarray.js":335,"core-js/modules/es.typed-array.to-locale-string.js":336,"core-js/modules/es.typed-array.to-string.js":337,"core-js/modules/es.typed-array.uint8-array.js":338,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394}],472:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/helpers/typeof"));oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.search.js"),oe("core-js/modules/es.array.concat.js"),oe("core-js/modules/es.string.split.js"),oe("core-js/modules/es.string.replace.js"),oe("core-js/modules/es.array.join.js"),oe("core-js/modules/es.string.trim.js"),oe("core-js/modules/es.string.match.js"),oe("core-js/modules/es.array.slice.js"),oe("core-js/modules/es.object.keys.js"),oe("core-js/modules/es.array.splice.js");var ke=oe("punycode"),Ce=oe("./util");De.parse=Ne,De.resolve=Re,De.resolveObject=We,De.format=Ae,De.Url=Se;function Se(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var Me=/^([a-z0-9.+-]+:)/i,ve=/:[0-9]*$/,we=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,de=["<",">",'"',"`"," ","\r",`
`," "],z=["{","}","|","\\","^","`"].concat(de),ee=["'"].concat(z),ae=["%","/","?",";","#"].concat(ee),ie=["/","?","#"],le=255,ue=/^[+a-z0-9A-Z_-]{0,63}$/,ge=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Pe={javascript:!0,"javascript:":!0},je={javascript:!0,"javascript:":!0},Be={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Fe=oe("querystring");function Ne(Ye,Ue,Ke){if(Ye&&Ce.isObject(Ye)&&Ye instanceof Se)return Ye;var ot=new Se;return ot.parse(Ye,Ue,Ke),ot}Se.prototype.parse=function(Ye,Ue,Ke){if(!Ce.isString(Ye))throw new TypeError("Parameter 'url' must be a string, not "+(0,me.default)(Ye));var ot=Ye.indexOf("?"),ut=ot!==-1&&ot<Ye.indexOf("#")?"?":"#",ft=Ye.split(ut),wt=/\\/g;ft[0]=ft[0].replace(wt,"/"),Ye=ft.join(ut);var Je=Ye;if(Je=Je.trim(),!Ke&&Ye.split("#").length===1){var nt=we.exec(Je);if(nt)return this.path=Je,this.href=Je,this.pathname=nt[1],nt[2]?(this.search=nt[2],Ue?this.query=Fe.parse(this.search.substr(1)):this.query=this.search.substr(1)):Ue&&(this.search="",this.query={}),this}var xt=Me.exec(Je);if(xt){xt=xt[0];var Pt=xt.toLowerCase();this.protocol=Pt,Je=Je.substr(xt.length)}if(Ke||xt||Je.match(/^\/\/[^@\/]+@[^@\/]+/)){var Ct=Je.substr(0,2)==="//";Ct&&!(xt&&je[xt])&&(Je=Je.substr(2),this.slashes=!0)}if(!je[xt]&&(Ct||xt&&!Be[xt])){for(var gt=-1,dt=0;dt<ie.length;dt++){var ht=Je.indexOf(ie[dt]);ht!==-1&&(gt===-1||ht<gt)&&(gt=ht)}var Et,St;gt===-1?St=Je.lastIndexOf("@"):St=Je.lastIndexOf("@",gt),St!==-1&&(Et=Je.slice(0,St),Je=Je.slice(St+1),this.auth=decodeURIComponent(Et)),gt=-1;for(var dt=0;dt<ae.length;dt++){var ht=Je.indexOf(ae[dt]);ht!==-1&&(gt===-1||ht<gt)&&(gt=ht)}gt===-1&&(gt=Je.length),this.host=Je.slice(0,gt),Je=Je.slice(gt),this.parseHost(),this.hostname=this.hostname||"";var Ft=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Ft)for(var mt=this.hostname.split("."),dt=0,yt=mt.length;dt<yt;dt++){var tt=mt[dt];if(tt&&!tt.match(ue)){for(var Ve="",xe=0,Le=tt.length;xe<Le;xe++)tt.charCodeAt(xe)>127?Ve+="x":Ve+=tt[xe];if(!Ve.match(ue)){var Xe=mt.slice(0,dt),rt=mt.slice(dt+1),Ie=tt.match(ge);Ie&&(Xe.push(Ie[1]),rt.unshift(Ie[2])),rt.length&&(Je="/"+rt.join(".")+Je),this.hostname=Xe.join(".");break}}}this.hostname.length>le?this.hostname="":this.hostname=this.hostname.toLowerCase(),Ft||(this.hostname=ke.toASCII(this.hostname));var _e=this.port?":"+this.port:"",He=this.hostname||"";this.host=He+_e,this.href+=this.host,Ft&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),Je[0]!=="/"&&(Je="/"+Je))}if(!Pe[Pt])for(var dt=0,yt=ee.length;dt<yt;dt++){var Qe=ee[dt];if(Je.indexOf(Qe)!==-1){var ct=encodeURIComponent(Qe);ct===Qe&&(ct=escape(Qe)),Je=Je.split(Qe).join(ct)}}var at=Je.indexOf("#");at!==-1&&(this.hash=Je.substr(at),Je=Je.slice(0,at));var At=Je.indexOf("?");if(At!==-1?(this.search=Je.substr(At),this.query=Je.substr(At+1),Ue&&(this.query=Fe.parse(this.query)),Je=Je.slice(0,At)):Ue&&(this.search="",this.query={}),Je&&(this.pathname=Je),Be[Pt]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var _e=this.pathname||"",Lt=this.search||"";this.path=_e+Lt}return this.href=this.format(),this};function Ae(Ye){return Ce.isString(Ye)&&(Ye=Ne(Ye)),Ye instanceof Se?Ye.format():Se.prototype.format.call(Ye)}Se.prototype.format=function(){var Ye=this.auth||"";Ye&&(Ye=encodeURIComponent(Ye),Ye=Ye.replace(/%3A/i,":"),Ye+="@");var Ue=this.protocol||"",Ke=this.pathname||"",ot=this.hash||"",ut=!1,ft="";this.host?ut=Ye+this.host:this.hostname&&(ut=Ye+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(ut+=":"+this.port)),this.query&&Ce.isObject(this.query)&&Object.keys(this.query).length&&(ft=Fe.stringify(this.query));var wt=this.search||ft&&"?"+ft||"";return Ue&&Ue.substr(-1)!==":"&&(Ue+=":"),this.slashes||(!Ue||Be[Ue])&&ut!==!1?(ut="//"+(ut||""),Ke&&Ke.charAt(0)!=="/"&&(Ke="/"+Ke)):ut||(ut=""),ot&&ot.charAt(0)!=="#"&&(ot="#"+ot),wt&&wt.charAt(0)!=="?"&&(wt="?"+wt),Ke=Ke.replace(/[?#]/g,function(Je){return encodeURIComponent(Je)}),wt=wt.replace("#","%23"),Ue+ut+Ke+wt+ot};function Re(Ye,Ue){return Ne(Ye,!1,!0).resolve(Ue)}Se.prototype.resolve=function(Ye){return this.resolveObject(Ne(Ye,!1,!0)).format()};function We(Ye,Ue){return Ye?Ne(Ye,!1,!0).resolveObject(Ue):Ue}Se.prototype.resolveObject=function(Ye){if(Ce.isString(Ye)){var Ue=new Se;Ue.parse(Ye,!1,!0),Ye=Ue}for(var Ke=new Se,ot=Object.keys(this),ut=0;ut<ot.length;ut++){var ft=ot[ut];Ke[ft]=this[ft]}if(Ke.hash=Ye.hash,Ye.href==="")return Ke.href=Ke.format(),Ke;if(Ye.slashes&&!Ye.protocol){for(var wt=Object.keys(Ye),Je=0;Je<wt.length;Je++){var nt=wt[Je];nt!=="protocol"&&(Ke[nt]=Ye[nt])}return Be[Ke.protocol]&&Ke.hostname&&!Ke.pathname&&(Ke.path=Ke.pathname="/"),Ke.href=Ke.format(),Ke}if(Ye.protocol&&Ye.protocol!==Ke.protocol){if(!Be[Ye.protocol]){for(var xt=Object.keys(Ye),Pt=0;Pt<xt.length;Pt++){var Ct=xt[Pt];Ke[Ct]=Ye[Ct]}return Ke.href=Ke.format(),Ke}if(Ke.protocol=Ye.protocol,!Ye.host&&!je[Ye.protocol]){for(var yt=(Ye.pathname||"").split("/");yt.length&&!(Ye.host=yt.shift()););Ye.host||(Ye.host=""),Ye.hostname||(Ye.hostname=""),yt[0]!==""&&yt.unshift(""),yt.length<2&&yt.unshift(""),Ke.pathname=yt.join("/")}else Ke.pathname=Ye.pathname;if(Ke.search=Ye.search,Ke.query=Ye.query,Ke.host=Ye.host||"",Ke.auth=Ye.auth,Ke.hostname=Ye.hostname||Ye.host,Ke.port=Ye.port,Ke.pathname||Ke.search){var gt=Ke.pathname||"",dt=Ke.search||"";Ke.path=gt+dt}return Ke.slashes=Ke.slashes||Ye.slashes,Ke.href=Ke.format(),Ke}var ht=Ke.pathname&&Ke.pathname.charAt(0)==="/",Et=Ye.host||Ye.pathname&&Ye.pathname.charAt(0)==="/",St=Et||ht||Ke.host&&Ye.pathname,Ft=St,mt=Ke.pathname&&Ke.pathname.split("/")||[],yt=Ye.pathname&&Ye.pathname.split("/")||[],tt=Ke.protocol&&!Be[Ke.protocol];if(tt&&(Ke.hostname="",Ke.port=null,Ke.host&&(mt[0]===""?mt[0]=Ke.host:mt.unshift(Ke.host)),Ke.host="",Ye.protocol&&(Ye.hostname=null,Ye.port=null,Ye.host&&(yt[0]===""?yt[0]=Ye.host:yt.unshift(Ye.host)),Ye.host=null),St=St&&(yt[0]===""||mt[0]==="")),Et)Ke.host=Ye.host||Ye.host===""?Ye.host:Ke.host,Ke.hostname=Ye.hostname||Ye.hostname===""?Ye.hostname:Ke.hostname,Ke.search=Ye.search,Ke.query=Ye.query,mt=yt;else if(yt.length)mt||(mt=[]),mt.pop(),mt=mt.concat(yt),Ke.search=Ye.search,Ke.query=Ye.query;else if(!Ce.isNullOrUndefined(Ye.search)){if(tt){Ke.hostname=Ke.host=mt.shift();var Ve=Ke.host&&Ke.host.indexOf("@")>0?Ke.host.split("@"):!1;Ve&&(Ke.auth=Ve.shift(),Ke.host=Ke.hostname=Ve.shift())}return Ke.search=Ye.search,Ke.query=Ye.query,(!Ce.isNull(Ke.pathname)||!Ce.isNull(Ke.search))&&(Ke.path=(Ke.pathname?Ke.pathname:"")+(Ke.search?Ke.search:"")),Ke.href=Ke.format(),Ke}if(!mt.length)return Ke.pathname=null,Ke.search?Ke.path="/"+Ke.search:Ke.path=null,Ke.href=Ke.format(),Ke;for(var xe=mt.slice(-1)[0],Le=(Ke.host||Ye.host||mt.length>1)&&(xe==="."||xe==="..")||xe==="",Xe=0,rt=mt.length;rt>=0;rt--)xe=mt[rt],xe==="."?mt.splice(rt,1):xe===".."?(mt.splice(rt,1),Xe++):Xe&&(mt.splice(rt,1),Xe--);if(!St&&!Ft)for(;Xe--;Xe)mt.unshift("..");St&&mt[0]!==""&&(!mt[0]||mt[0].charAt(0)!=="/")&&mt.unshift(""),Le&&mt.join("/").substr(-1)!=="/"&&mt.push("");var Ie=mt[0]===""||mt[0]&&mt[0].charAt(0)==="/";if(tt){Ke.hostname=Ke.host=Ie?"":mt.length?mt.shift():"";var Ve=Ke.host&&Ke.host.indexOf("@")>0?Ke.host.split("@"):!1;Ve&&(Ke.auth=Ve.shift(),Ke.host=Ke.hostname=Ve.shift())}return St=St||Ke.host&&mt.length,St&&!Ie&&mt.unshift(""),mt.length?Ke.pathname=mt.join("/"):(Ke.pathname=null,Ke.path=null),(!Ce.isNull(Ke.pathname)||!Ce.isNull(Ke.search))&&(Ke.path=(Ke.pathname?Ke.pathname:"")+(Ke.search?Ke.search:"")),Ke.auth=Ye.auth||Ke.auth,Ke.slashes=Ke.slashes||Ye.slashes,Ke.href=Ke.format(),Ke},Se.prototype.parseHost=function(){var Ye=this.host,Ue=ve.exec(Ye);Ue&&(Ue=Ue[0],Ue!==":"&&(this.port=Ue.substr(1)),Ye=Ye.substr(0,Ye.length-Ue.length)),Ye&&(this.hostname=Ye)}},{"./util":473,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.array.splice.js":283,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.search.js":306,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,punycode:382,querystring:385}],473:[function(oe,Ge,De){"use strict";var fe=oe("@babel/runtime/helpers/interopRequireDefault"),me=fe(oe("@babel/runtime/helpers/typeof"));Ge.exports={isString:function(Ce){return typeof Ce=="string"},isObject:function(Ce){return(0,me.default)(Ce)==="object"&&Ce!==null},isNull:function(Ce){return Ce===null},isNullOrUndefined:function(Ce){return Ce==null}}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79}],474:[function(oe,Ge,De){"use strict";oe("core-js/modules/es.number.constructor.js"),De.encodeURIComponent=function(fe){try{return encodeURIComponent(fe)}catch(me){return fe}},De.escape=oe("escape-html"),De.timestamp=function(me){if(me){var ke=me;return typeof ke=="string"&&(ke=Number(ke)),String(me).length===10&&(ke*=1e3),new Date(ke)}return Math.round(Date.now()/1e3)}},{"core-js/modules/es.number.constructor.js":286,"escape-html":343}],475:[function(oe,Ge,De){(function(fe,me){(function(){"use strict";var ke=oe("@babel/runtime/helpers/interopRequireDefault"),Ce=ke(oe("@babel/runtime/helpers/typeof"));oe("core-js/modules/es.string.trim.js"),oe("core-js/modules/es.regexp.exec.js"),oe("core-js/modules/es.string.split.js"),oe("core-js/modules/es.object.to-string.js"),oe("core-js/modules/es.promise.js"),oe("core-js/modules/es.function.name.js"),oe("core-js/modules/es.array.concat.js");var Se=oe("util"),Me=oe("url"),ve=oe("http"),we=oe("https"),de=oe("debug")("urllib"),z=oe("humanize-ms"),ee=0,ae=Math.pow(2,31)-10,ie=/^https?:\/\//i;function le(je,Be){return je===void 0?Be:je}function ue(je){return je?je.split(";")[0].trim().toLowerCase():""}function ge(je,Be){return function(Fe,Ne,Ae){if(Fe)return Be(Fe);je({data:Ne,status:Ae.statusCode,headers:Ae.headers,res:Ae})}}De.TIMEOUTS=[z("300s"),z("300s")];var Pe=["json","text"];De.request=function(Be,Fe,Ne){return arguments.length===2&&typeof Fe=="function"&&(Ne=Fe,Fe=null),typeof Ne=="function"?De.requestWithCallback(Be,Fe,Ne):new Promise(function(Ae,Re){De.requestWithCallback(Be,Fe,ge(Ae,Re))})},De.requestWithCallback=function(Be,Fe,Ne){if(!Be||typeof Be!="string"&&(0,Ce.default)(Be)!=="object"){var Ae=Se.format("expect request url to be a string or a http request options, but got %j",Be);throw new Error(Ae)}arguments.length===2&&typeof Fe=="function"&&(Ne=Fe,Fe=null),Fe=Fe||{},ee>=ae&&(ee=0);var Re=++ee;Fe.requestUrls=Fe.requestUrls||[];var We={requestId:Re,url:Be,args:Fe,ctx:Fe.ctx};Fe.emitter&&Fe.emitter.emit("request",We),Fe.timeout=Fe.timeout||De.TIMEOUTS,Fe.maxRedirects=Fe.maxRedirects||10,Fe.streaming=Fe.streaming||Fe.customResponse;var Ye=Date.now(),Ue;typeof Be=="string"?(ie.test(Be)||(Be="https://"+Be),Ue=Me.parse(Be)):Ue=Be;var Ke=(Fe.type||Fe.method||Ue.method||"GET").toUpperCase(),ot=Ue.port||80,ut=ve,ft=le(Fe.agent,De.agent),wt=Fe.fixJSONCtlChars;Ue.protocol==="https:"&&(ut=we,ft=le(Fe.httpsAgent,De.httpsAgent),Ue.port||(ot=443));var Je={host:Ue.hostname||Ue.host||"localhost",path:Ue.path||"/",method:Ke,port:ot,agent:ft,headers:Fe.headers||{},lookup:Fe.lookup};Array.isArray(Fe.timeout)?Je.requestTimeout=Fe.timeout[Fe.timeout.length-1]:typeof Fe.timeout!="undefined"&&(Je.requestTimeout=Fe.timeout);var nt=Fe.auth||Ue.auth;nt&&(Je.auth=nt);var xt=Fe.content||Fe.data,Pt=Ke==="GET"||Ke==="HEAD"||Fe.dataAsQueryString;if(!Fe.content&&xt&&!(typeof xt=="string"||me.isBuffer(xt)))if(Pt)xt=Fe.nestedQuerystring?qs.stringify(xt):querystring.stringify(xt);else{var Ct=Je.headers["Content-Type"]||Je.headers["content-type"];Ct||(Fe.contentType==="json"?Ct="application/json":Ct="application/x-www-form-urlencoded",Je.headers["Content-Type"]=Ct),ue(Ct)==="application/json"?xt=JSON.stringify(xt):xt=Fe.nestedQuerystring?qs.stringify(xt):querystring.stringify(xt)}Pt&&xt&&(Je.path+=(Ue.query?"&":"?")+xt,xt=null);var gt=0;if(xt){var dt=xt.length;me.isBuffer(xt)||(dt=me.byteLength(xt)),gt=Je.headers["Content-Length"]=dt}Fe.dataType==="json"&&(Je.headers.Accept="application/json"),typeof Fe.beforeRequest=="function"&&Fe.beforeRequest(Je);var ht=null,Et=null,St=null,Ft=!1,mt=!1,yt=0,tt=-1,Ve=!1,xe="",Le="",Xe=null;Fe.timing&&(Xe={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function rt(){ht&&(clearTimeout(ht),ht=null)}function Ie(){Et&&(clearTimeout(Et),Et=null)}function _e(Ut,ln,tn){if(Ie(),!Ne){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),Re,fe.pid,Je.method,Be),Ut&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),Re,fe.pid,Ut.name,Ut.message,Ut.stack);return}var Wt=Ne;Ne=null;var En={};tn&&(tt=tn.statusCode,En=tn.headers);var Pn=Date.now()-Ye;Xe&&(Xe.contentDownload=Pn),de("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Pn,yt,tt,Je.method,Je.host,Je.path,mt,Xe);var Ln={status:tt,statusCode:tt,headers:En,size:yt,aborted:Ve,rt:Pn,keepAliveSocket:mt,data:ln,requestUrls:Fe.requestUrls,timing:Xe,remoteAddress:xe,remotePort:Le};if(Ut){var Vn="";ft&&typeof ft.getCurrentStatus=="function"&&(Vn=", agent status: "+JSON.stringify(ft.getCurrentStatus())),Ut.message+=", "+Je.method+" "+Be+" "+tt+" (connected: "+Ft+", keepalive socket: "+mt+Vn+`)
headers: `+JSON.stringify(En),Ut.data=ln,Ut.path=Je.path,Ut.status=tt,Ut.headers=En,Ut.res=Ln}Wt(Ut,ln,Fe.streaming?tn:Ln),Fe.emitter&&(We.url=Be,We.socket=Xt&&Xt.connection,We.options=Je,We.size=gt,Fe.emitter.emit("response",{requestId:Re,error:Ut,ctx:Fe.ctx,req:We,res:Ln}))}function He(Ut){var ln=null;if(Fe.followRedirect&&statuses.redirect[Ut.statusCode]){Fe._followRedirectCount=(Fe._followRedirectCount||0)+1;var tn=Ut.headers.location;if(!tn)ln=new Error("Got statusCode "+Ut.statusCode+" but cannot resolve next location from headers"),ln.name="FollowRedirectError";else if(Fe._followRedirectCount>Fe.maxRedirects)ln=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+Be),ln.name="MaxRedirectError";else{var Wt=Fe.formatRedirectUrl?Fe.formatRedirectUrl(Be,tn):Me.resolve(Be,tn);de("Request#%d %s: `redirected` from %s to %s",Re,Je.path,Be,Wt),Ie(),Fe.headers&&Fe.headers.Host&&ie.test(tn)&&(Fe.headers.Host=null);var En=Ne;return Ne=null,De.requestWithCallback(Wt,Fe,En),{redirect:!0,error:null}}}return{redirect:!1,error:ln}}Fe.gzip&&!Je.headers["Accept-Encoding"]&&!Je.headers["accept-encoding"]&&(Je.headers["Accept-Encoding"]="gzip");function Qe(Ut,ln,tn){var Wt=Ut.headers["content-encoding"];return tn(null,ln,Wt)}var ct=Fe.writeStream;de("Request#%d %s %s with headers %j, options.path: %s",Re,Ke,Be,Je.headers,Je.path),Fe.requestUrls.push(Be);function at(Ut){if(Xe&&(Xe.waiting=Date.now()-Ye),de("Request#%d %s `req response` event emit: status %d, headers: %j",Re,Be,Ut.statusCode,Ut.headers),Fe.streaming){var ln=He(Ut);if(ln.redirect){Ut.resume();return}return ln.error?(Ut.resume(),_e(ln.error,null,Ut)):_e(null,null,Ut)}if(Ut.on("close",function(){de("Request#%d %s: `res close` event emit, total size %d",Re,Be,yt)}),Ut.on("error",function(){de("Request#%d %s: `res error` event emit, total size %d",Re,Be,yt)}),Ut.on("aborted",function(){Ve=!0,de("Request#%d %s: `res aborted` event emit, total size %d",Re,Be,yt)}),ct){var tn=He(Ut);if(tn.redirect){Ut.resume();return}return tn.error?(Ut.resume(),ct.end(),_e(tn.error,null,Ut)):(Fe.consumeWriteStream===!1?Ut.on("end",_e.bind(null,null,null,Ut)):ct.on("close",function(){de("Request#%d %s: writeStream close event emitted",Re,Be),_e(St||null,null,Ut)}),Ut.pipe(ct))}var Wt=[];Ut.on("data",function(En){de("Request#%d %s: `res data` event emit, size %d",Re,Be,En.length),yt+=En.length,Wt.push(En)}),Ut.on("end",function(){var En=me.concat(Wt,yt);if(de("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",Re,Be,yt,Ut._dumped),St)return _e(St,En,Ut);var Pn=He(Ut);if(Pn.error)return _e(Pn.error,En,Ut);Pn.redirect||Qe(Ut,En,function(Ln,Vn,Or){if(Ln)return _e(Ln,En,Ut);if(!Or&&Pe.indexOf(Fe.dataType)>=0){try{Vn=decodeBodyByCharset(Vn,Ut)}catch(Lr){return de("decodeBodyByCharset error: %s",Lr),_e(null,Vn,Ut)}if(Fe.dataType==="json")if(yt===0)Vn=null;else{var dr=parseJSON(Vn,wt);dr.error?Ln=dr.error:Vn=dr.data}}Ve&&de("Request#%d %s: Remote socket was terminated before `response.end()` was called",Re,Be),_e(Ln,Vn,Ut)})})}var At,Lt;Array.isArray(Fe.timeout)?(At=z(Fe.timeout[0]),Lt=z(Fe.timeout[1])):At=Lt=z(Fe.timeout),de("ConnectTimeout: %d, ResponseTimeout: %d",At,Lt);function It(){de("Connect timer ticking, timeout: %d",At),ht=setTimeout(function(){ht=null,tt===-1&&(tt=-2);var Ut="Connect timeout for "+At+"ms",ln="ConnectionTimeoutError";Xt.socket||(ln="SocketAssignTimeoutError",Ut+=", working sockets is full"),St=new Error(Ut),St.name=ln,St.requestId=Re,de("ConnectTimeout: Request#%d %s %s: %s, connected: %s",Re,Be,St.name,Ut,Ft),$t()},At)}function Kt(){de("Response timer ticking, timeout: %d",Lt),Et=setTimeout(function(){Et=null;var Ut="Response timeout for "+Lt+"ms",ln="ResponseTimeoutError";St=new Error(Ut),St.name=ln,St.requestId=Re,de("ResponseTimeout: Request#%d %s %s: %s, connected: %s",Re,Be,St.name,Ut,Ft),$t()},Lt)}var Xt;Je.mode=Fe.mode?Fe.mode:"";try{Xt=ut.request(Je,at)}catch(Ut){return _e(Ut)}typeof window=="undefined"?It():Xt.on("requestTimeout",function(){tt===-1&&(tt=-2);var Ut="Connect timeout for "+At+"ms",ln="ConnectionTimeoutError";St=new Error(Ut),St.name=ln,St.requestId=Re,$t()});function $t(){de("Request#%d %s abort, connected: %s",Re,Be,Ft),Xt.socket||(St.noSocket=!0,_e(St)),Xt.abort()}return Xe&&Xt.on("finish",function(){Xe.requestSent=Date.now()-Ye}),Xt.once("socket",function(Ut){Xe&&(Xe.queuing=Date.now()-Ye);var ln=Ut.readyState;if(ln==="opening"){Ut.once("lookup",function(tn,Wt,En){de("Request#%d %s lookup: %s, %s, %s",Re,Be,tn,Wt,En),Xe&&(Xe.dnslookup=Date.now()-Ye),Wt&&(xe=Wt)}),Ut.once("connect",function(){Xe&&(Xe.connected=Date.now()-Ye),rt(),Kt(),de("Request#%d %s new socket connected",Re,Be),Ft=!0,xe||(xe=Ut.remoteAddress),Le=Ut.remotePort});return}de("Request#%d %s reuse socket connected, readyState: %s",Re,Be,ln),Ft=!0,mt=!0,xe||(xe=Ut.remoteAddress),Le=Ut.remotePort,rt(),Kt()}),Xt.on("error",function(Ut){(Ut.name==="Error"||Ut.name==="TypeError")&&(Ut.name=Ft?"ResponseError":"RequestError"),Ut.message+=' (req "error")',de("Request#%d %s `req error` event emit, %s: %s",Re,Be,Ut.name,Ut.message),_e(St||Ut)}),ct&&ct.once("error",function(Ut){Ut.message+=' (writeStream "error")',St=Ut,de("Request#%d %s `writeStream error` event emit, %s: %s",Re,Be,Ut.name,Ut.message),$t()}),Fe.stream?(Fe.stream.pipe(Xt),Fe.stream.once("error",function(Ut){Ut.message+=' (stream "error")',St=Ut,de("Request#%d %s `readStream error` event emit, %s: %s",Re,Be,Ut.name,Ut.message),$t()})):Xt.end(xt),Xt.requestId=Re,Xt}}).call(this)}).call(this,oe("_process"),oe("buffer").Buffer)},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,debug:465,http:468,https:355,"humanize-ms":356,url:472,util:419}]},{},[1])(1)})})(window)},99498:function(mn,dn,st){(function(pt){pt(st(89780))})(function(pt){pt.defineOption("placeholder","",function(ke,Ce,Se){var Me=Se&&Se!=pt.Init;if(Ce&&!Me)ke.on("blur",De),ke.on("change",fe),ke.on("swapDoc",fe),pt.on(ke.getInputField(),"compositionupdate",ke.state.placeholderCompose=function(){Ge(ke)}),fe(ke);else if(!Ce&&Me){ke.off("blur",De),ke.off("change",fe),ke.off("swapDoc",fe),pt.off(ke.getInputField(),"compositionupdate",ke.state.placeholderCompose),Dt(ke);var ve=ke.getWrapperElement();ve.className=ve.className.replace(" CodeMirror-empty","")}Ce&&!ke.hasFocus()&&De(ke)});function Dt(ke){ke.state.placeholder&&(ke.state.placeholder.parentNode.removeChild(ke.state.placeholder),ke.state.placeholder=null)}function oe(ke){Dt(ke);var Ce=ke.state.placeholder=document.createElement("pre");Ce.style.cssText="height: 0; overflow: visible",Ce.style.direction=ke.getOption("direction"),Ce.className="CodeMirror-placeholder CodeMirror-line-like";var Se=ke.getOption("placeholder");typeof Se=="string"&&(Se=document.createTextNode(Se)),Ce.appendChild(Se),ke.display.lineSpace.insertBefore(Ce,ke.display.lineSpace.firstChild)}function Ge(ke){setTimeout(function(){var Ce=!1,Se=ke.getInputField();Se.nodeName=="TEXTAREA"?Ce=!Se.value:ke.lineCount()==1&&(Ce=!/[^\u200b]/.test(Se.querySelector(".CodeMirror-line").textContent)),Ce?oe(ke):Dt(ke)},20)}function De(ke){me(ke)&&oe(ke)}function fe(ke){var Ce=ke.getWrapperElement(),Se=me(ke);Ce.className=Ce.className.replace(" CodeMirror-empty","")+(Se?" CodeMirror-empty":""),Se?oe(ke):Dt(ke)}function me(ke){return ke.lineCount()===1&&ke.getLine(0)===""}})},25717:function(mn,dn,st){(function(pt){pt(st(89780))})(function(pt){var Dt={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},oe=pt.Pos;pt.defineOption("autoCloseBrackets",!1,function(z,ee,ae){ae&&ae!=pt.Init&&(z.removeKeyMap(De),z.state.closeBrackets=null),ee&&(fe(Ge(ee,"pairs")),z.state.closeBrackets=ee,z.addKeyMap(De))});function Ge(z,ee){return ee=="pairs"&&typeof z=="string"?z:typeof z=="object"&&z[ee]!=null?z[ee]:Dt[ee]}var De={Backspace:Ce,Enter:Se};function fe(z){for(var ee=0;ee<z.length;ee++){var ae=z.charAt(ee),ie="'"+ae+"'";De[ie]||(De[ie]=me(ae))}}fe(Dt.pairs+"`");function me(z){return function(ee){return ve(ee,z)}}function ke(z){var ee=z.state.closeBrackets;if(!ee||ee.override)return ee;var ae=z.getModeAt(z.getCursor());return ae.closeBrackets||ee}function Ce(z){var ee=ke(z);if(!ee||z.getOption("disableInput"))return pt.Pass;for(var ae=Ge(ee,"pairs"),ie=z.listSelections(),le=0;le<ie.length;le++){if(!ie[le].empty())return pt.Pass;var ue=we(z,ie[le].head);if(!ue||ae.indexOf(ue)%2!=0)return pt.Pass}for(var le=ie.length-1;le>=0;le--){var ge=ie[le].head;z.replaceRange("",oe(ge.line,ge.ch-1),oe(ge.line,ge.ch+1),"+delete")}}function Se(z){var ee=ke(z),ae=ee&&Ge(ee,"explode");if(!ae||z.getOption("disableInput"))return pt.Pass;for(var ie=z.listSelections(),le=0;le<ie.length;le++){if(!ie[le].empty())return pt.Pass;var ue=we(z,ie[le].head);if(!ue||ae.indexOf(ue)%2!=0)return pt.Pass}z.operation(function(){var ge=z.lineSeparator()||`
`;z.replaceSelection(ge+ge,null),z.execCommand("goCharLeft"),ie=z.listSelections();for(var Pe=0;Pe<ie.length;Pe++){var je=ie[Pe].head.line;z.indentLine(je,null,!0),z.indentLine(je+1,null,!0)}})}function Me(z){var ee=pt.cmpPos(z.anchor,z.head)>0;return{anchor:new oe(z.anchor.line,z.anchor.ch+(ee?-1:1)),head:new oe(z.head.line,z.head.ch+(ee?1:-1))}}function ve(z,ee){var ae=ke(z);if(!ae||z.getOption("disableInput"))return pt.Pass;var ie=Ge(ae,"pairs"),le=ie.indexOf(ee);if(le==-1)return pt.Pass;for(var ue=Ge(ae,"closeBefore"),ge=Ge(ae,"triples"),Pe=ie.charAt(le+1)==ee,je=z.listSelections(),Be=le%2==0,Fe,Ne=0;Ne<je.length;Ne++){var Ae=je[Ne],Re=Ae.head,We,Ye=z.getRange(Re,oe(Re.line,Re.ch+1));if(Be&&!Ae.empty())We="surround";else if((Pe||!Be)&&Ye==ee)Pe&&de(z,Re)?We="both":ge.indexOf(ee)>=0&&z.getRange(Re,oe(Re.line,Re.ch+3))==ee+ee+ee?We="skipThree":We="skip";else if(Pe&&Re.ch>1&&ge.indexOf(ee)>=0&&z.getRange(oe(Re.line,Re.ch-2),Re)==ee+ee){if(Re.ch>2&&/\bstring/.test(z.getTokenTypeAt(oe(Re.line,Re.ch-2))))return pt.Pass;We="addFour"}else if(Pe){var Ue=Re.ch==0?" ":z.getRange(oe(Re.line,Re.ch-1),Re);if(!pt.isWordChar(Ye)&&Ue!=ee&&!pt.isWordChar(Ue))We="both";else return pt.Pass}else if(Be&&(Ye.length===0||/\s/.test(Ye)||ue.indexOf(Ye)>-1))We="both";else return pt.Pass;if(!Fe)Fe=We;else if(Fe!=We)return pt.Pass}var Ke=le%2?ie.charAt(le-1):ee,ot=le%2?ee:ie.charAt(le+1);z.operation(function(){if(Fe=="skip")z.execCommand("goCharRight");else if(Fe=="skipThree")for(var ut=0;ut<3;ut++)z.execCommand("goCharRight");else if(Fe=="surround"){for(var ft=z.getSelections(),ut=0;ut<ft.length;ut++)ft[ut]=Ke+ft[ut]+ot;z.replaceSelections(ft,"around"),ft=z.listSelections().slice();for(var ut=0;ut<ft.length;ut++)ft[ut]=Me(ft[ut]);z.setSelections(ft)}else Fe=="both"?(z.replaceSelection(Ke+ot,null),z.triggerElectric(Ke+ot),z.execCommand("goCharLeft")):Fe=="addFour"&&(z.replaceSelection(Ke+Ke+Ke+Ke,"before"),z.execCommand("goCharRight"))})}function we(z,ee){var ae=z.getRange(oe(ee.line,ee.ch-1),oe(ee.line,ee.ch+1));return ae.length==2?ae:null}function de(z,ee){var ae=z.getTokenAt(oe(ee.line,ee.ch+1));return/\bstring/.test(ae.type)&&ae.start==ee.ch&&(ee.ch==0||!/\bstring/.test(z.getTokenTypeAt(ee)))}})},6313:function(mn,dn,st){(function(pt){pt(st(89780),st(32855))})(function(pt){pt.defineOption("autoCloseTags",!1,function(Ce,Se,Me){if(Me!=pt.Init&&Me&&Ce.removeKeyMap("autoCloseTags"),!!Se){var ve={name:"autoCloseTags"};(typeof Se!="object"||Se.whenClosing!==!1)&&(ve["'/'"]=function(we){return fe(we)}),(typeof Se!="object"||Se.whenOpening!==!1)&&(ve["'>'"]=function(we){return Ge(we)}),Ce.addKeyMap(ve)}});var Dt=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],oe=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function Ge(Ce){if(Ce.getOption("disableInput"))return pt.Pass;for(var Se=Ce.listSelections(),Me=[],ve=Ce.getOption("autoCloseTags"),we=0;we<Se.length;we++){if(!Se[we].empty())return pt.Pass;var de=Se[we].head,z=Ce.getTokenAt(de),ee=pt.innerMode(Ce.getMode(),z.state),ae=ee.state,ie=ee.mode.xmlCurrentTag&&ee.mode.xmlCurrentTag(ae),le=ie&&ie.name;if(!le)return pt.Pass;var ue=ee.mode.configuration=="html",ge=typeof ve=="object"&&ve.dontCloseTags||ue&&Dt,Pe=typeof ve=="object"&&ve.indentTags||ue&&oe;z.end>de.ch&&(le=le.slice(0,le.length-z.end+de.ch));var je=le.toLowerCase();if(!le||z.type=="string"&&(z.end!=de.ch||!/[\"\']/.test(z.string.charAt(z.string.length-1))||z.string.length==1)||z.type=="tag"&&ie.close||z.string.indexOf("/")==de.ch-z.start-1||ge&&me(ge,je)>-1||ke(Ce,ee.mode.xmlCurrentContext&&ee.mode.xmlCurrentContext(ae)||[],le,de,!0))return pt.Pass;var Be=typeof ve=="object"&&ve.emptyTags;if(Be&&me(Be,le)>-1){Me[we]={text:"/>",newPos:pt.Pos(de.line,de.ch+2)};continue}var Fe=Pe&&me(Pe,je)>-1;Me[we]={indent:Fe,text:">"+(Fe?`
`:"")+"</"+le+">",newPos:Fe?pt.Pos(de.line+1,0):pt.Pos(de.line,de.ch+1)}}for(var Ne=typeof ve=="object"&&ve.dontIndentOnAutoClose,we=Se.length-1;we>=0;we--){var Ae=Me[we];Ce.replaceRange(Ae.text,Se[we].head,Se[we].anchor,"+insert");var Re=Ce.listSelections().slice(0);Re[we]={head:Ae.newPos,anchor:Ae.newPos},Ce.setSelections(Re),!Ne&&Ae.indent&&(Ce.indentLine(Ae.newPos.line,null,!0),Ce.indentLine(Ae.newPos.line+1,null,!0))}}function De(Ce,Se){for(var Me=Ce.listSelections(),ve=[],we=Se?"/":"</",de=Ce.getOption("autoCloseTags"),z=typeof de=="object"&&de.dontIndentOnSlash,ee=0;ee<Me.length;ee++){if(!Me[ee].empty())return pt.Pass;var ae=Me[ee].head,ie=Ce.getTokenAt(ae),le=pt.innerMode(Ce.getMode(),ie.state),ue=le.state;if(Se&&(ie.type=="string"||ie.string.charAt(0)!="<"||ie.start!=ae.ch-1))return pt.Pass;var ge,Pe=le.mode.name!="xml"&&Ce.getMode().name=="htmlmixed";if(Pe&&le.mode.name=="javascript")ge=we+"script";else if(Pe&&le.mode.name=="css")ge=we+"style";else{var je=le.mode.xmlCurrentContext&&le.mode.xmlCurrentContext(ue);if(!je||je.length&&ke(Ce,je,je[je.length-1],ae))return pt.Pass;ge=we+je[je.length-1]}Ce.getLine(ae.line).charAt(ie.end)!=">"&&(ge+=">"),ve[ee]=ge}if(Ce.replaceSelections(ve),Me=Ce.listSelections(),!z)for(var ee=0;ee<Me.length;ee++)(ee==Me.length-1||Me[ee].head.line<Me[ee+1].head.line)&&Ce.indentLine(Me[ee].head.line)}function fe(Ce){return Ce.getOption("disableInput")?pt.Pass:De(Ce,!0)}pt.commands.closeTag=function(Ce){return De(Ce)};function me(Ce,Se){if(Ce.indexOf)return Ce.indexOf(Se);for(var Me=0,ve=Ce.length;Me<ve;++Me)if(Ce[Me]==Se)return Me;return-1}function ke(Ce,Se,Me,ve,we){if(!pt.scanForClosingTag)return!1;var de=Math.min(Ce.lastLine()+1,ve.line+500),z=pt.scanForClosingTag(Ce,ve,null,de);if(!z||z.tag!=Me)return!1;for(var ee=we?1:0,ae=Se.length-1;ae>=0&&Se[ae]==Me;ae--)++ee;ve=z.to;for(var ae=1;ae<ee;ae++){var ie=pt.scanForClosingTag(Ce,ve,null,de);if(!ie||ie.tag!=Me)return!1;ve=ie.to}return!0}})},32855:function(mn,dn,st){(function(pt){pt(st(89780))})(function(pt){"use strict";var Dt=pt.Pos;function oe(ae,ie){return ae.line-ie.line||ae.ch-ie.ch}var Ge="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=Ge+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",fe=new RegExp("<(/?)(["+Ge+"]["+De+"]*)","g");function me(ae,ie,le,ue){this.line=ie,this.ch=le,this.cm=ae,this.text=ae.getLine(ie),this.min=ue?Math.max(ue.from,ae.firstLine()):ae.firstLine(),this.max=ue?Math.min(ue.to-1,ae.lastLine()):ae.lastLine()}function ke(ae,ie){var le=ae.cm.getTokenTypeAt(Dt(ae.line,ie));return le&&/\btag\b/.test(le)}function Ce(ae){if(!(ae.line>=ae.max))return ae.ch=0,ae.text=ae.cm.getLine(++ae.line),!0}function Se(ae){if(!(ae.line<=ae.min))return ae.text=ae.cm.getLine(--ae.line),ae.ch=ae.text.length,!0}function Me(ae){for(;;){var ie=ae.text.indexOf(">",ae.ch);if(ie==-1){if(Ce(ae))continue;return}if(!ke(ae,ie+1)){ae.ch=ie+1;continue}var le=ae.text.lastIndexOf("/",ie),ue=le>-1&&!/\S/.test(ae.text.slice(le+1,ie));return ae.ch=ie+1,ue?"selfClose":"regular"}}function ve(ae){for(;;){var ie=ae.ch?ae.text.lastIndexOf("<",ae.ch-1):-1;if(ie==-1){if(Se(ae))continue;return}if(!ke(ae,ie+1)){ae.ch=ie;continue}fe.lastIndex=ie,ae.ch=ie;var le=fe.exec(ae.text);if(le&&le.index==ie)return le}}function we(ae){for(;;){fe.lastIndex=ae.ch;var ie=fe.exec(ae.text);if(!ie){if(Ce(ae))continue;return}if(!ke(ae,ie.index+1)){ae.ch=ie.index+1;continue}return ae.ch=ie.index+ie[0].length,ie}}function de(ae){for(;;){var ie=ae.ch?ae.text.lastIndexOf(">",ae.ch-1):-1;if(ie==-1){if(Se(ae))continue;return}if(!ke(ae,ie+1)){ae.ch=ie;continue}var le=ae.text.lastIndexOf("/",ie),ue=le>-1&&!/\S/.test(ae.text.slice(le+1,ie));return ae.ch=ie+1,ue?"selfClose":"regular"}}function z(ae,ie){for(var le=[];;){var ue=we(ae),ge,Pe=ae.line,je=ae.ch-(ue?ue[0].length:0);if(!ue||!(ge=Me(ae)))return;if(ge!="selfClose")if(ue[1]){for(var Be=le.length-1;Be>=0;--Be)if(le[Be]==ue[2]){le.length=Be;break}if(Be<0&&(!ie||ie==ue[2]))return{tag:ue[2],from:Dt(Pe,je),to:Dt(ae.line,ae.ch)}}else le.push(ue[2])}}function ee(ae,ie){for(var le=[];;){var ue=de(ae);if(!ue)return;if(ue=="selfClose"){ve(ae);continue}var ge=ae.line,Pe=ae.ch,je=ve(ae);if(!je)return;if(je[1])le.push(je[2]);else{for(var Be=le.length-1;Be>=0;--Be)if(le[Be]==je[2]){le.length=Be;break}if(Be<0&&(!ie||ie==je[2]))return{tag:je[2],from:Dt(ae.line,ae.ch),to:Dt(ge,Pe)}}}}pt.registerHelper("fold","xml",function(ae,ie){for(var le=new me(ae,ie.line,0);;){var ue=we(le);if(!ue||le.line!=ie.line)return;var ge=Me(le);if(!ge)return;if(!ue[1]&&ge!="selfClose"){var Pe=Dt(le.line,le.ch),je=z(le,ue[2]);return je&&oe(je.from,Pe)>0?{from:Pe,to:je.from}:null}}}),pt.findMatchingTag=function(ae,ie,le){var ue=new me(ae,ie.line,ie.ch,le);if(!(ue.text.indexOf(">")==-1&&ue.text.indexOf("<")==-1)){var ge=Me(ue),Pe=ge&&Dt(ue.line,ue.ch),je=ge&&ve(ue);if(!(!ge||!je||oe(ue,ie)>0)){var Be={from:Dt(ue.line,ue.ch),to:Pe,tag:je[2]};return ge=="selfClose"?{open:Be,close:null,at:"open"}:je[1]?{open:ee(ue,je[2]),close:Be,at:"close"}:(ue=new me(ae,Pe.line,Pe.ch,le),{open:Be,close:z(ue,je[2]),at:"open"})}}},pt.findEnclosingTag=function(ae,ie,le,ue){for(var ge=new me(ae,ie.line,ie.ch,le);;){var Pe=ee(ge,ue);if(!Pe)break;var je=new me(ae,ie.line,ie.ch,le),Be=z(je,Pe.tag);if(Be)return{open:Pe,close:Be}}},pt.scanForClosingTag=function(ae,ie,le,ue){var ge=new me(ae,ie.line,ie.ch,ue?{from:0,to:ue}:null);return z(ge,le)}})},89780:function(mn){(function(dn,st){mn.exports=st()})(this,function(){"use strict";var dn=navigator.userAgent,st=navigator.platform,pt=/gecko\/\d/i.test(dn),Dt=/MSIE \d/.test(dn),oe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(dn),Ge=/Edge\/(\d+)/.exec(dn),De=Dt||oe||Ge,fe=De&&(Dt?document.documentMode||6:+(Ge||oe)[1]),me=!Ge&&/WebKit\//.test(dn),ke=me&&/Qt\/\d+\.\d+/.test(dn),Ce=!Ge&&/Chrome\//.test(dn),Se=/Opera\//.test(dn),Me=/Apple Computer/.test(navigator.vendor),ve=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(dn),we=/PhantomJS/.test(dn),de=!Ge&&/AppleWebKit/.test(dn)&&/Mobile\/\w+/.test(dn),z=/Android/.test(dn),ee=de||z||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(dn),ae=de||/Mac/.test(st),ie=/\bCrOS\b/.test(dn),le=/win/i.test(st),ue=Se&&dn.match(/Version\/(\d*\.\d*)/);ue&&(ue=Number(ue[1])),ue&&ue>=15&&(Se=!1,me=!0);var ge=ae&&(ke||Se&&(ue==null||ue<12.11)),Pe=pt||De&&fe>=9;function je(re){return new RegExp("(^|\\s)"+re+"(?:$|\\s)\\s*")}var Be=function(re,ce){var Ee=re.className,be=je(ce).exec(Ee);if(be){var Oe=Ee.slice(be.index+be[0].length);re.className=Ee.slice(0,be.index)+(Oe?be[1]+Oe:"")}};function Fe(re){for(var ce=re.childNodes.length;ce>0;--ce)re.removeChild(re.firstChild);return re}function Ne(re,ce){return Fe(re).appendChild(ce)}function Ae(re,ce,Ee,be){var Oe=document.createElement(re);if(Ee&&(Oe.className=Ee),be&&(Oe.style.cssText=be),typeof ce=="string")Oe.appendChild(document.createTextNode(ce));else if(ce)for(var qe=0;qe<ce.length;++qe)Oe.appendChild(ce[qe]);return Oe}function Re(re,ce,Ee,be){var Oe=Ae(re,ce,Ee,be);return Oe.setAttribute("role","presentation"),Oe}var We;document.createRange?We=function(re,ce,Ee,be){var Oe=document.createRange();return Oe.setEnd(be||re,Ee),Oe.setStart(re,ce),Oe}:We=function(re,ce,Ee){var be=document.body.createTextRange();try{be.moveToElementText(re.parentNode)}catch(Oe){return be}return be.collapse(!0),be.moveEnd("character",Ee),be.moveStart("character",ce),be};function Ye(re,ce){if(ce.nodeType==3&&(ce=ce.parentNode),re.contains)return re.contains(ce);do if(ce.nodeType==11&&(ce=ce.host),ce==re)return!0;while(ce=ce.parentNode)}function Ue(){var re;try{re=document.activeElement}catch(ce){re=document.body||null}for(;re&&re.shadowRoot&&re.shadowRoot.activeElement;)re=re.shadowRoot.activeElement;return re}function Ke(re,ce){var Ee=re.className;je(ce).test(Ee)||(re.className+=(Ee?" ":"")+ce)}function ot(re,ce){for(var Ee=re.split(" "),be=0;be<Ee.length;be++)Ee[be]&&!je(Ee[be]).test(ce)&&(ce+=" "+Ee[be]);return ce}var ut=function(re){re.select()};de?ut=function(re){re.selectionStart=0,re.selectionEnd=re.value.length}:De&&(ut=function(re){try{re.select()}catch(ce){}});function ft(re){var ce=Array.prototype.slice.call(arguments,1);return function(){return re.apply(null,ce)}}function wt(re,ce,Ee){ce||(ce={});for(var be in re)re.hasOwnProperty(be)&&(Ee!==!1||!ce.hasOwnProperty(be))&&(ce[be]=re[be]);return ce}function Je(re,ce,Ee,be,Oe){ce==null&&(ce=re.search(/[^\s\u00a0]/),ce==-1&&(ce=re.length));for(var qe=be||0,vt=Oe||0;;){var Mt=re.indexOf(" ",qe);if(Mt<0||Mt>=ce)return vt+(ce-qe);vt+=Mt-qe,vt+=Ee-vt%Ee,qe=Mt+1}}var nt=function(){this.id=null,this.f=null,this.time=0,this.handler=ft(this.onTimeout,this)};nt.prototype.onTimeout=function(re){re.id=0,re.time<=+new Date?re.f():setTimeout(re.handler,re.time-+new Date)},nt.prototype.set=function(re,ce){this.f=ce;var Ee=+new Date+re;(!this.id||Ee<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,re),this.time=Ee)};function xt(re,ce){for(var Ee=0;Ee<re.length;++Ee)if(re[Ee]==ce)return Ee;return-1}var Pt=50,Ct={toString:function(){return"CodeMirror.Pass"}},gt={scroll:!1},dt={origin:"*mouse"},ht={origin:"+move"};function Et(re,ce,Ee){for(var be=0,Oe=0;;){var qe=re.indexOf(" ",be);qe==-1&&(qe=re.length);var vt=qe-be;if(qe==re.length||Oe+vt>=ce)return be+Math.min(vt,ce-Oe);if(Oe+=qe-be,Oe+=Ee-Oe%Ee,be=qe+1,Oe>=ce)return be}}var St=[""];function Ft(re){for(;St.length<=re;)St.push(mt(St)+" ");return St[re]}function mt(re){return re[re.length-1]}function yt(re,ce){for(var Ee=[],be=0;be<re.length;be++)Ee[be]=ce(re[be],be);return Ee}function tt(re,ce,Ee){for(var be=0,Oe=Ee(ce);be<re.length&&Ee(re[be])<=Oe;)be++;re.splice(be,0,ce)}function Ve(){}function xe(re,ce){var Ee;return Object.create?Ee=Object.create(re):(Ve.prototype=re,Ee=new Ve),ce&&wt(ce,Ee),Ee}var Le=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Xe(re){return/\w/.test(re)||re>"\x80"&&(re.toUpperCase()!=re.toLowerCase()||Le.test(re))}function rt(re,ce){return ce?ce.source.indexOf("\\w")>-1&&Xe(re)?!0:ce.test(re):Xe(re)}function Ie(re){for(var ce in re)if(re.hasOwnProperty(ce)&&re[ce])return!1;return!0}var _e=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function He(re){return re.charCodeAt(0)>=768&&_e.test(re)}function Qe(re,ce,Ee){for(;(Ee<0?ce>0:ce<re.length)&&He(re.charAt(ce));)ce+=Ee;return ce}function ct(re,ce,Ee){for(var be=ce>Ee?-1:1;;){if(ce==Ee)return ce;var Oe=(ce+Ee)/2,qe=be<0?Math.ceil(Oe):Math.floor(Oe);if(qe==ce)return re(qe)?ce:Ee;re(qe)?Ee=qe:ce=qe+be}}function at(re,ce,Ee,be){if(!re)return be(ce,Ee,"ltr",0);for(var Oe=!1,qe=0;qe<re.length;++qe){var vt=re[qe];(vt.from<Ee&&vt.to>ce||ce==Ee&&vt.to==ce)&&(be(Math.max(vt.from,ce),Math.min(vt.to,Ee),vt.level==1?"rtl":"ltr",qe),Oe=!0)}Oe||be(ce,Ee,"ltr")}var At=null;function Lt(re,ce,Ee){var be;At=null;for(var Oe=0;Oe<re.length;++Oe){var qe=re[Oe];if(qe.from<ce&&qe.to>ce)return Oe;qe.to==ce&&(qe.from!=qe.to&&Ee=="before"?be=Oe:At=Oe),qe.from==ce&&(qe.from!=qe.to&&Ee!="before"?be=Oe:At=Oe)}return be!=null?be:At}var It=function(){var re="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ce="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function Ee(Rt){return Rt<=247?re.charAt(Rt):1424<=Rt&&Rt<=1524?"R":1536<=Rt&&Rt<=1785?ce.charAt(Rt-1536):1774<=Rt&&Rt<=2220?"r":8192<=Rt&&Rt<=8203?"w":Rt==8204?"b":"L"}var be=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Oe=/[stwN]/,qe=/[LRr]/,vt=/[Lb1n]/,Mt=/[1n]/;function kt(Rt,en,zt){this.level=Rt,this.from=en,this.to=zt}return function(Rt,en){var zt=en=="ltr"?"L":"R";if(Rt.length==0||en=="ltr"&&!be.test(Rt))return!1;for(var wn=Rt.length,gn=[],rr=0;rr<wn;++rr)gn.push(Ee(Rt.charCodeAt(rr)));for(var sr=0,Sr=zt;sr<wn;++sr){var Fr=gn[sr];Fr=="m"?gn[sr]=Sr:Sr=Fr}for(var Qr=0,Kr=zt;Qr<wn;++Qr){var ui=gn[Qr];ui=="1"&&Kr=="r"?gn[Qr]="n":qe.test(ui)&&(Kr=ui,ui=="r"&&(gn[Qr]="R"))}for(var Ai=1,Gr=gn[0];Ai<wn-1;++Ai){var Ji=gn[Ai];Ji=="+"&&Gr=="1"&&gn[Ai+1]=="1"?gn[Ai]="1":Ji==","&&Gr==gn[Ai+1]&&(Gr=="1"||Gr=="n")&&(gn[Ai]=Gr),Gr=Ji}for(var Xo=0;Xo<wn;++Xo){var Ia=gn[Xo];if(Ia==",")gn[Xo]="N";else if(Ia=="%"){var ia=void 0;for(ia=Xo+1;ia<wn&&gn[ia]=="%";++ia);for(var Ds=Xo&&gn[Xo-1]=="!"||ia<wn&&gn[ia]=="1"?"1":"N",gs=Xo;gs<ia;++gs)gn[gs]=Ds;Xo=ia-1}}for(var Ma=0,Vs=zt;Ma<wn;++Ma){var ss=gn[Ma];Vs=="L"&&ss=="1"?gn[Ma]="L":qe.test(ss)&&(Vs=ss)}for(var La=0;La<wn;++La)if(Oe.test(gn[La])){var yo=void 0;for(yo=La+1;yo<wn&&Oe.test(gn[yo]);++yo);for(var ca=(La?gn[La-1]:zt)=="L",Za=(yo<wn?gn[yo]:zt)=="L",ls=ca==Za?ca?"L":"R":zt,Ol=La;Ol<yo;++Ol)gn[Ol]=ls;La=yo-1}for(var oa=[],Sl,pa=0;pa<wn;)if(vt.test(gn[pa])){var Af=pa;for(++pa;pa<wn&&vt.test(gn[pa]);++pa);oa.push(new kt(0,Af,pa))}else{var sl=pa,Zs=oa.length,Bs=en=="rtl"?1:0;for(++pa;pa<wn&&gn[pa]!="L";++pa);for(var Bo=sl;Bo<pa;)if(Mt.test(gn[Bo])){sl<Bo&&(oa.splice(Zs,0,new kt(1,sl,Bo)),Zs+=Bs);var Xa=Bo;for(++Bo;Bo<pa&&Mt.test(gn[Bo]);++Bo);oa.splice(Zs,0,new kt(2,Xa,Bo)),Zs+=Bs,sl=Bo}else++Bo;sl<pa&&oa.splice(Zs,0,new kt(1,sl,pa))}return en=="ltr"&&(oa[0].level==1&&(Sl=Rt.match(/^\s+/))&&(oa[0].from=Sl[0].length,oa.unshift(new kt(0,0,Sl[0].length))),mt(oa).level==1&&(Sl=Rt.match(/\s+$/))&&(mt(oa).to-=Sl[0].length,oa.push(new kt(0,wn-Sl[0].length,wn)))),en=="rtl"?oa.reverse():oa}}();function Kt(re,ce){var Ee=re.order;return Ee==null&&(Ee=re.order=It(re.text,ce)),Ee}var Xt=[],$t=function(re,ce,Ee){if(re.addEventListener)re.addEventListener(ce,Ee,!1);else if(re.attachEvent)re.attachEvent("on"+ce,Ee);else{var be=re._handlers||(re._handlers={});be[ce]=(be[ce]||Xt).concat(Ee)}};function Ut(re,ce){return re._handlers&&re._handlers[ce]||Xt}function ln(re,ce,Ee){if(re.removeEventListener)re.removeEventListener(ce,Ee,!1);else if(re.detachEvent)re.detachEvent("on"+ce,Ee);else{var be=re._handlers,Oe=be&&be[ce];if(Oe){var qe=xt(Oe,Ee);qe>-1&&(be[ce]=Oe.slice(0,qe).concat(Oe.slice(qe+1)))}}}function tn(re,ce){var Ee=Ut(re,ce);if(Ee.length)for(var be=Array.prototype.slice.call(arguments,2),Oe=0;Oe<Ee.length;++Oe)Ee[Oe].apply(null,be)}function Wt(re,ce,Ee){return typeof ce=="string"&&(ce={type:ce,preventDefault:function(){this.defaultPrevented=!0}}),tn(re,Ee||ce.type,re,ce),dr(ce)||ce.codemirrorIgnore}function En(re){var ce=re._handlers&&re._handlers.cursorActivity;if(ce)for(var Ee=re.curOp.cursorActivityHandlers||(re.curOp.cursorActivityHandlers=[]),be=0;be<ce.length;++be)xt(Ee,ce[be])==-1&&Ee.push(ce[be])}function Pn(re,ce){return Ut(re,ce).length>0}function Ln(re){re.prototype.on=function(ce,Ee){$t(this,ce,Ee)},re.prototype.off=function(ce,Ee){ln(this,ce,Ee)}}function Vn(re){re.preventDefault?re.preventDefault():re.returnValue=!1}function Or(re){re.stopPropagation?re.stopPropagation():re.cancelBubble=!0}function dr(re){return re.defaultPrevented!=null?re.defaultPrevented:re.returnValue==!1}function Lr(re){Vn(re),Or(re)}function Xr(re){return re.target||re.srcElement}function Vr(re){var ce=re.which;return ce==null&&(re.button&1?ce=1:re.button&2?ce=3:re.button&4&&(ce=2)),ae&&re.ctrlKey&&ce==1&&(ce=3),ce}var si=function(){if(De&&fe<9)return!1;var re=Ae("div");return"draggable"in re||"dragDrop"in re}(),yi;function Ii(re){if(yi==null){var ce=Ae("span","\u200B");Ne(re,Ae("span",[ce,document.createTextNode("x")])),re.firstChild.offsetHeight!=0&&(yi=ce.offsetWidth<=1&&ce.offsetHeight>2&&!(De&&fe<8))}var Ee=yi?Ae("span","\u200B"):Ae("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return Ee.setAttribute("cm-text",""),Ee}var Fi;function _i(re){if(Fi!=null)return Fi;var ce=Ne(re,document.createTextNode("A\u062EA")),Ee=We(ce,0,1).getBoundingClientRect(),be=We(ce,1,2).getBoundingClientRect();return Fe(re),!Ee||Ee.left==Ee.right?!1:Fi=be.right-Ee.right<3}var Yi=`
b`.split(/\n/).length!=3?function(re){for(var ce=0,Ee=[],be=re.length;ce<=be;){var Oe=re.indexOf(`
`,ce);Oe==-1&&(Oe=re.length);var qe=re.slice(ce,re.charAt(Oe-1)=="\r"?Oe-1:Oe),vt=qe.indexOf("\r");vt!=-1?(Ee.push(qe.slice(0,vt)),ce+=vt+1):(Ee.push(qe),ce=Oe+1)}return Ee}:function(re){return re.split(/\r\n?|\n/)},et=window.getSelection?function(re){try{return re.selectionStart!=re.selectionEnd}catch(ce){return!1}}:function(re){var ce;try{ce=re.ownerDocument.selection.createRange()}catch(Ee){}return!ce||ce.parentElement()!=re?!1:ce.compareEndPoints("StartToEnd",ce)!=0},pr=function(){var re=Ae("div");return"oncopy"in re?!0:(re.setAttribute("oncopy","return;"),typeof re.oncopy=="function")}(),vr=null;function Ei(re){if(vr!=null)return vr;var ce=Ne(re,Ae("span","x")),Ee=ce.getBoundingClientRect(),be=We(ce,0,1).getBoundingClientRect();return vr=Math.abs(Ee.left-be.left)>1}var lr={},wr={};function Br(re,ce){arguments.length>2&&(ce.dependencies=Array.prototype.slice.call(arguments,2)),lr[re]=ce}function ro(re,ce){wr[re]=ce}function Ur(re){if(typeof re=="string"&&wr.hasOwnProperty(re))re=wr[re];else if(re&&typeof re.name=="string"&&wr.hasOwnProperty(re.name)){var ce=wr[re.name];typeof ce=="string"&&(ce={name:ce}),re=xe(ce,re),re.name=ce.name}else{if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(re))return Ur("application/xml");if(typeof re=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(re))return Ur("application/json")}return typeof re=="string"?{name:re}:re||{name:"null"}}function on(re,ce){ce=Ur(ce);var Ee=lr[ce.name];if(!Ee)return on(re,"text/plain");var be=Ee(re,ce);if(nn.hasOwnProperty(ce.name)){var Oe=nn[ce.name];for(var qe in Oe)Oe.hasOwnProperty(qe)&&(be.hasOwnProperty(qe)&&(be["_"+qe]=be[qe]),be[qe]=Oe[qe])}if(be.name=ce.name,ce.helperType&&(be.helperType=ce.helperType),ce.modeProps)for(var vt in ce.modeProps)be[vt]=ce.modeProps[vt];return be}var nn={};function Zt(re,ce){var Ee=nn.hasOwnProperty(re)?nn[re]:nn[re]={};wt(ce,Ee)}function tr(re,ce){if(ce===!0)return ce;if(re.copyState)return re.copyState(ce);var Ee={};for(var be in ce){var Oe=ce[be];Oe instanceof Array&&(Oe=Oe.concat([])),Ee[be]=Oe}return Ee}function mr(re,ce){for(var Ee;re.innerMode&&(Ee=re.innerMode(ce),!(!Ee||Ee.mode==re));)ce=Ee.state,re=Ee.mode;return Ee||{mode:re,state:ce}}function Er(re,ce,Ee){return re.startState?re.startState(ce,Ee):!0}var An=function(re,ce,Ee){this.pos=this.start=0,this.string=re,this.tabSize=ce||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=Ee};An.prototype.eol=function(){return this.pos>=this.string.length},An.prototype.sol=function(){return this.pos==this.lineStart},An.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},An.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},An.prototype.eat=function(re){var ce=this.string.charAt(this.pos),Ee;if(typeof re=="string"?Ee=ce==re:Ee=ce&&(re.test?re.test(ce):re(ce)),Ee)return++this.pos,ce},An.prototype.eatWhile=function(re){for(var ce=this.pos;this.eat(re););return this.pos>ce},An.prototype.eatSpace=function(){for(var re=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>re},An.prototype.skipToEnd=function(){this.pos=this.string.length},An.prototype.skipTo=function(re){var ce=this.string.indexOf(re,this.pos);if(ce>-1)return this.pos=ce,!0},An.prototype.backUp=function(re){this.pos-=re},An.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Je(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Je(this.string,this.lineStart,this.tabSize):0)},An.prototype.indentation=function(){return Je(this.string,null,this.tabSize)-(this.lineStart?Je(this.string,this.lineStart,this.tabSize):0)},An.prototype.match=function(re,ce,Ee){if(typeof re=="string"){var be=function(vt){return Ee?vt.toLowerCase():vt},Oe=this.string.substr(this.pos,re.length);if(be(Oe)==be(re))return ce!==!1&&(this.pos+=re.length),!0}else{var qe=this.string.slice(this.pos).match(re);return qe&&qe.index>0?null:(qe&&ce!==!1&&(this.pos+=qe[0].length),qe)}},An.prototype.current=function(){return this.string.slice(this.start,this.pos)},An.prototype.hideFirstChars=function(re,ce){this.lineStart+=re;try{return ce()}finally{this.lineStart-=re}},An.prototype.lookAhead=function(re){var ce=this.lineOracle;return ce&&ce.lookAhead(re)},An.prototype.baseToken=function(){var re=this.lineOracle;return re&&re.baseToken(this.pos)};function er(re,ce){if(ce-=re.first,ce<0||ce>=re.size)throw new Error("There is no line "+(ce+re.first)+" in the document.");for(var Ee=re;!Ee.lines;)for(var be=0;;++be){var Oe=Ee.children[be],qe=Oe.chunkSize();if(ce<qe){Ee=Oe;break}ce-=qe}return Ee.lines[ce]}function rn(re,ce,Ee){var be=[],Oe=ce.line;return re.iter(ce.line,Ee.line+1,function(qe){var vt=qe.text;Oe==Ee.line&&(vt=vt.slice(0,Ee.ch)),Oe==ce.line&&(vt=vt.slice(ce.ch)),be.push(vt),++Oe}),be}function qt(re,ce,Ee){var be=[];return re.iter(ce,Ee,function(Oe){be.push(Oe.text)}),be}function Qn(re,ce){var Ee=ce-re.height;if(Ee)for(var be=re;be;be=be.parent)be.height+=Ee}function Ot(re){if(re.parent==null)return null;for(var ce=re.parent,Ee=xt(ce.lines,re),be=ce.parent;be;ce=be,be=be.parent)for(var Oe=0;be.children[Oe]!=ce;++Oe)Ee+=be.children[Oe].chunkSize();return Ee+ce.first}function vn(re,ce){var Ee=re.first;e:do{for(var be=0;be<re.children.length;++be){var Oe=re.children[be],qe=Oe.height;if(ce<qe){re=Oe;continue e}ce-=qe,Ee+=Oe.chunkSize()}return Ee}while(!re.lines);for(var vt=0;vt<re.lines.length;++vt){var Mt=re.lines[vt],kt=Mt.height;if(ce<kt)break;ce-=kt}return Ee+vt}function _n(re,ce){return ce>=re.first&&ce<re.first+re.size}function qn(re,ce){return String(re.lineNumberFormatter(ce+re.firstLineNumber))}function an(re,ce,Ee){if(Ee===void 0&&(Ee=null),!(this instanceof an))return new an(re,ce,Ee);this.line=re,this.ch=ce,this.sticky=Ee}function Un(re,ce){return re.line-ce.line||re.ch-ce.ch}function Kn(re,ce){return re.sticky==ce.sticky&&Un(re,ce)==0}function On(re){return an(re.line,re.ch)}function ur(re,ce){return Un(re,ce)<0?ce:re}function $n(re,ce){return Un(re,ce)<0?re:ce}function Wn(re,ce){return Math.max(re.first,Math.min(ce,re.first+re.size-1))}function hr(re,ce){if(ce.line<re.first)return an(re.first,0);var Ee=re.first+re.size-1;return ce.line>Ee?an(Ee,er(re,Ee).text.length):Rr(ce,er(re,ce.line).text.length)}function Rr(re,ce){var Ee=re.ch;return Ee==null||Ee>ce?an(re.line,ce):Ee<0?an(re.line,0):re}function br(re,ce){for(var Ee=[],be=0;be<ce.length;be++)Ee[be]=hr(re,ce[be]);return Ee}var Pr=function(re,ce){this.state=re,this.lookAhead=ce},hn=function(re,ce,Ee,be){this.state=ce,this.doc=re,this.line=Ee,this.maxLookAhead=be||0,this.baseTokens=null,this.baseTokenPos=1};hn.prototype.lookAhead=function(re){var ce=this.doc.getLine(this.line+re);return ce!=null&&re>this.maxLookAhead&&(this.maxLookAhead=re),ce},hn.prototype.baseToken=function(re){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=re;)this.baseTokenPos+=2;var ce=this.baseTokens[this.baseTokenPos+1];return{type:ce&&ce.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-re}},hn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},hn.fromSaved=function(re,ce,Ee){return ce instanceof Pr?new hn(re,tr(re.mode,ce.state),Ee,ce.lookAhead):new hn(re,tr(re.mode,ce),Ee)},hn.prototype.save=function(re){var ce=re!==!1?tr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Pr(ce,this.maxLookAhead):ce};function Pi(re,ce,Ee,be){var Oe=[re.state.modeGen],qe={};Wr(re,ce.text,re.doc.mode,Ee,function(Rt,en){return Oe.push(Rt,en)},qe,be);for(var vt=Ee.state,Mt=function(Rt){Ee.baseTokens=Oe;var en=re.state.overlays[Rt],zt=1,wn=0;Ee.state=!0,Wr(re,ce.text,en.mode,Ee,function(gn,rr){for(var sr=zt;wn<gn;){var Sr=Oe[zt];Sr>gn&&Oe.splice(zt,1,gn,Oe[zt+1],Sr),zt+=2,wn=Math.min(gn,Sr)}if(rr)if(en.opaque)Oe.splice(sr,zt-sr,gn,"overlay "+rr),zt=sr+2;else for(;sr<zt;sr+=2){var Fr=Oe[sr+1];Oe[sr+1]=(Fr?Fr+" ":"")+"overlay "+rr}},qe),Ee.state=vt,Ee.baseTokens=null,Ee.baseTokenPos=1},kt=0;kt<re.state.overlays.length;++kt)Mt(kt);return{styles:Oe,classes:qe.bgClass||qe.textClass?qe:null}}function qr(re,ce,Ee){if(!ce.styles||ce.styles[0]!=re.state.modeGen){var be=ki(re,Ot(ce)),Oe=ce.text.length>re.options.maxHighlightLength&&tr(re.doc.mode,be.state),qe=Pi(re,ce,be);Oe&&(be.state=Oe),ce.stateAfter=be.save(!Oe),ce.styles=qe.styles,qe.classes?ce.styleClasses=qe.classes:ce.styleClasses&&(ce.styleClasses=null),Ee===re.doc.highlightFrontier&&(re.doc.modeFrontier=Math.max(re.doc.modeFrontier,++re.doc.highlightFrontier))}return ce.styles}function ki(re,ce,Ee){var be=re.doc,Oe=re.display;if(!be.mode.startState)return new hn(be,!0,ce);var qe=$r(re,ce,Ee),vt=qe>be.first&&er(be,qe-1).stateAfter,Mt=vt?hn.fromSaved(be,vt,qe):new hn(be,Er(be.mode),qe);return be.iter(qe,ce,function(kt){un(re,kt.text,Mt);var Rt=Mt.line;kt.stateAfter=Rt==ce-1||Rt%5==0||Rt>=Oe.viewFrom&&Rt<Oe.viewTo?Mt.save():null,Mt.nextLine()}),Ee&&(be.modeFrontier=Mt.line),Mt}function un(re,ce,Ee,be){var Oe=re.doc.mode,qe=new An(ce,re.options.tabSize,Ee);for(qe.start=qe.pos=be||0,ce==""&&Xn(Oe,Ee.state);!qe.eol();)cr(Oe,qe,Ee.state),qe.start=qe.pos}function Xn(re,ce){if(re.blankLine)return re.blankLine(ce);if(re.innerMode){var Ee=mr(re,ce);if(Ee.mode.blankLine)return Ee.mode.blankLine(Ee.state)}}function cr(re,ce,Ee,be){for(var Oe=0;Oe<10;Oe++){be&&(be[0]=mr(re,Ee).mode);var qe=re.token(ce,Ee);if(ce.pos>ce.start)return qe}throw new Error("Mode "+re.name+" failed to advance stream.")}var ar=function(re,ce,Ee){this.start=re.start,this.end=re.pos,this.string=re.current(),this.type=ce||null,this.state=Ee};function xr(re,ce,Ee,be){var Oe=re.doc,qe=Oe.mode,vt;ce=hr(Oe,ce);var Mt=er(Oe,ce.line),kt=ki(re,ce.line,Ee),Rt=new An(Mt.text,re.options.tabSize,kt),en;for(be&&(en=[]);(be||Rt.pos<ce.ch)&&!Rt.eol();)Rt.start=Rt.pos,vt=cr(qe,Rt,kt.state),be&&en.push(new ar(Rt,vt,tr(Oe.mode,kt.state)));return be?en:new ar(Rt,vt,kt.state)}function Tr(re,ce){if(re)for(;;){var Ee=re.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!Ee)break;re=re.slice(0,Ee.index)+re.slice(Ee.index+Ee[0].length);var be=Ee[1]?"bgClass":"textClass";ce[be]==null?ce[be]=Ee[2]:new RegExp("(?:^|\\s)"+Ee[2]+"(?:$|\\s)").test(ce[be])||(ce[be]+=" "+Ee[2])}return re}function Wr(re,ce,Ee,be,Oe,qe,vt){var Mt=Ee.flattenSpans;Mt==null&&(Mt=re.options.flattenSpans);var kt=0,Rt=null,en=new An(ce,re.options.tabSize,be),zt,wn=re.options.addModeClass&&[null];for(ce==""&&Tr(Xn(Ee,be.state),qe);!en.eol();){if(en.pos>re.options.maxHighlightLength?(Mt=!1,vt&&un(re,ce,be,en.pos),en.pos=ce.length,zt=null):zt=Tr(cr(Ee,en,be.state,wn),qe),wn){var gn=wn[0].name;gn&&(zt="m-"+(zt?gn+" "+zt:gn))}if(!Mt||Rt!=zt){for(;kt<en.start;)kt=Math.min(en.start,kt+5e3),Oe(kt,Rt);Rt=zt}en.start=en.pos}for(;kt<en.pos;){var rr=Math.min(en.pos,kt+5e3);Oe(rr,Rt),kt=rr}}function $r(re,ce,Ee){for(var be,Oe,qe=re.doc,vt=Ee?-1:ce-(re.doc.mode.innerMode?1e3:100),Mt=ce;Mt>vt;--Mt){if(Mt<=qe.first)return qe.first;var kt=er(qe,Mt-1),Rt=kt.stateAfter;if(Rt&&(!Ee||Mt+(Rt instanceof Pr?Rt.lookAhead:0)<=qe.modeFrontier))return Mt;var en=Je(kt.text,null,re.options.tabSize);(Oe==null||be>en)&&(Oe=Mt-1,be=en)}return Oe}function ni(re,ce){if(re.modeFrontier=Math.min(re.modeFrontier,ce),!(re.highlightFrontier<ce-10)){for(var Ee=re.first,be=ce-1;be>Ee;be--){var Oe=er(re,be).stateAfter;if(Oe&&(!(Oe instanceof Pr)||be+Oe.lookAhead<ce)){Ee=be+1;break}}re.highlightFrontier=Math.min(re.highlightFrontier,Ee)}}var ai=!1,yn=!1;function Ci(){ai=!0}function xn(){yn=!0}function yr(re,ce,Ee){this.marker=re,this.from=ce,this.to=Ee}function Nr(re,ce){if(re)for(var Ee=0;Ee<re.length;++Ee){var be=re[Ee];if(be.marker==ce)return be}}function Yr(re,ce){for(var Ee,be=0;be<re.length;++be)re[be]!=ce&&(Ee||(Ee=[])).push(re[be]);return Ee}function Zi(re,ce){re.markedSpans=re.markedSpans?re.markedSpans.concat([ce]):[ce],ce.marker.attachLine(re)}function zi(re,ce,Ee){var be;if(re)for(var Oe=0;Oe<re.length;++Oe){var qe=re[Oe],vt=qe.marker,Mt=qe.from==null||(vt.inclusiveLeft?qe.from<=ce:qe.from<ce);if(Mt||qe.from==ce&&vt.type=="bookmark"&&(!Ee||!qe.marker.insertLeft)){var kt=qe.to==null||(vt.inclusiveRight?qe.to>=ce:qe.to>ce);(be||(be=[])).push(new yr(vt,qe.from,kt?null:qe.to))}}return be}function bi(re,ce,Ee){var be;if(re)for(var Oe=0;Oe<re.length;++Oe){var qe=re[Oe],vt=qe.marker,Mt=qe.to==null||(vt.inclusiveRight?qe.to>=ce:qe.to>ce);if(Mt||qe.from==ce&&vt.type=="bookmark"&&(!Ee||qe.marker.insertLeft)){var kt=qe.from==null||(vt.inclusiveLeft?qe.from<=ce:qe.from<ce);(be||(be=[])).push(new yr(vt,kt?null:qe.from-ce,qe.to==null?null:qe.to-ce))}}return be}function ji(re,ce){if(ce.full)return null;var Ee=_n(re,ce.from.line)&&er(re,ce.from.line).markedSpans,be=_n(re,ce.to.line)&&er(re,ce.to.line).markedSpans;if(!Ee&&!be)return null;var Oe=ce.from.ch,qe=ce.to.ch,vt=Un(ce.from,ce.to)==0,Mt=zi(Ee,Oe,vt),kt=bi(be,qe,vt),Rt=ce.text.length==1,en=mt(ce.text).length+(Rt?Oe:0);if(Mt)for(var zt=0;zt<Mt.length;++zt){var wn=Mt[zt];if(wn.to==null){var gn=Nr(kt,wn.marker);gn?Rt&&(wn.to=gn.to==null?null:gn.to+en):wn.to=Oe}}if(kt)for(var rr=0;rr<kt.length;++rr){var sr=kt[rr];if(sr.to!=null&&(sr.to+=en),sr.from==null){var Sr=Nr(Mt,sr.marker);Sr||(sr.from=en,Rt&&(Mt||(Mt=[])).push(sr))}else sr.from+=en,Rt&&(Mt||(Mt=[])).push(sr)}Mt&&(Mt=Qt(Mt)),kt&&kt!=Mt&&(kt=Qt(kt));var Fr=[Mt];if(!Rt){var Qr=ce.text.length-2,Kr;if(Qr>0&&Mt)for(var ui=0;ui<Mt.length;++ui)Mt[ui].to==null&&(Kr||(Kr=[])).push(new yr(Mt[ui].marker,null,null));for(var Ai=0;Ai<Qr;++Ai)Fr.push(Kr);Fr.push(kt)}return Fr}function Qt(re){for(var ce=0;ce<re.length;++ce){var Ee=re[ce];Ee.from!=null&&Ee.from==Ee.to&&Ee.marker.clearWhenEmpty!==!1&&re.splice(ce--,1)}return re.length?re:null}function Sn(re,ce,Ee){var be=null;if(re.iter(ce.line,Ee.line+1,function(gn){if(gn.markedSpans)for(var rr=0;rr<gn.markedSpans.length;++rr){var sr=gn.markedSpans[rr].marker;sr.readOnly&&(!be||xt(be,sr)==-1)&&(be||(be=[])).push(sr)}}),!be)return null;for(var Oe=[{from:ce,to:Ee}],qe=0;qe<be.length;++qe)for(var vt=be[qe],Mt=vt.find(0),kt=0;kt<Oe.length;++kt){var Rt=Oe[kt];if(!(Un(Rt.to,Mt.from)<0||Un(Rt.from,Mt.to)>0)){var en=[kt,1],zt=Un(Rt.from,Mt.from),wn=Un(Rt.to,Mt.to);(zt<0||!vt.inclusiveLeft&&!zt)&&en.push({from:Rt.from,to:Mt.from}),(wn>0||!vt.inclusiveRight&&!wn)&&en.push({from:Mt.to,to:Rt.to}),Oe.splice.apply(Oe,en),kt+=en.length-3}}return Oe}function Jt(re){var ce=re.markedSpans;if(ce){for(var Ee=0;Ee<ce.length;++Ee)ce[Ee].marker.detachLine(re);re.markedSpans=null}}function lt(re,ce){if(ce){for(var Ee=0;Ee<ce.length;++Ee)ce[Ee].marker.attachLine(re);re.markedSpans=ce}}function Bn(re){return re.inclusiveLeft?-1:0}function sn(re){return re.inclusiveRight?1:0}function bn(re,ce){var Ee=re.lines.length-ce.lines.length;if(Ee!=0)return Ee;var be=re.find(),Oe=ce.find(),qe=Un(be.from,Oe.from)||Bn(re)-Bn(ce);if(qe)return-qe;var vt=Un(be.to,Oe.to)||sn(re)-sn(ce);return vt||ce.id-re.id}function zn(re,ce){var Ee=yn&&re.markedSpans,be;if(Ee)for(var Oe=void 0,qe=0;qe<Ee.length;++qe)Oe=Ee[qe],Oe.marker.collapsed&&(ce?Oe.from:Oe.to)==null&&(!be||bn(be,Oe.marker)<0)&&(be=Oe.marker);return be}function Yn(re){return zn(re,!0)}function pn(re){return zn(re,!1)}function jn(re,ce){var Ee=yn&&re.markedSpans,be;if(Ee)for(var Oe=0;Oe<Ee.length;++Oe){var qe=Ee[Oe];qe.marker.collapsed&&(qe.from==null||qe.from<ce)&&(qe.to==null||qe.to>ce)&&(!be||bn(be,qe.marker)<0)&&(be=qe.marker)}return be}function Dn(re,ce,Ee,be,Oe){var qe=er(re,ce),vt=yn&&qe.markedSpans;if(vt)for(var Mt=0;Mt<vt.length;++Mt){var kt=vt[Mt];if(kt.marker.collapsed){var Rt=kt.marker.find(0),en=Un(Rt.from,Ee)||Bn(kt.marker)-Bn(Oe),zt=Un(Rt.to,be)||sn(kt.marker)-sn(Oe);if(!(en>=0&&zt<=0||en<=0&&zt>=0)&&(en<=0&&(kt.marker.inclusiveRight&&Oe.inclusiveLeft?Un(Rt.to,Ee)>=0:Un(Rt.to,Ee)>0)||en>=0&&(kt.marker.inclusiveRight&&Oe.inclusiveLeft?Un(Rt.from,be)<=0:Un(Rt.from,be)<0)))return!0}}}function Gn(re){for(var ce;ce=Yn(re);)re=ce.find(-1,!0).line;return re}function In(re){for(var ce;ce=pn(re);)re=ce.find(1,!0).line;return re}function gr(re){for(var ce,Ee;ce=pn(re);)re=ce.find(1,!0).line,(Ee||(Ee=[])).push(re);return Ee}function or(re,ce){var Ee=er(re,ce),be=Gn(Ee);return Ee==be?ce:Ot(be)}function Hn(re,ce){if(ce>re.lastLine())return ce;var Ee=er(re,ce),be;if(!fn(re,Ee))return ce;for(;be=pn(Ee);)Ee=be.find(1,!0).line;return Ot(Ee)+1}function fn(re,ce){var Ee=yn&&ce.markedSpans;if(Ee){for(var be=void 0,Oe=0;Oe<Ee.length;++Oe)if(be=Ee[Oe],!!be.marker.collapsed){if(be.from==null)return!0;if(!be.marker.widgetNode&&be.from==0&&be.marker.inclusiveLeft&&nr(re,ce,be))return!0}}}function nr(re,ce,Ee){if(Ee.to==null){var be=Ee.marker.find(1,!0);return nr(re,be.line,Nr(be.line.markedSpans,Ee.marker))}if(Ee.marker.inclusiveRight&&Ee.to==ce.text.length)return!0;for(var Oe=void 0,qe=0;qe<ce.markedSpans.length;++qe)if(Oe=ce.markedSpans[qe],Oe.marker.collapsed&&!Oe.marker.widgetNode&&Oe.from==Ee.to&&(Oe.to==null||Oe.to!=Ee.from)&&(Oe.marker.inclusiveLeft||Ee.marker.inclusiveRight)&&nr(re,ce,Oe))return!0}function kr(re){re=Gn(re);for(var ce=0,Ee=re.parent,be=0;be<Ee.lines.length;++be){var Oe=Ee.lines[be];if(Oe==re)break;ce+=Oe.height}for(var qe=Ee.parent;qe;Ee=qe,qe=Ee.parent)for(var vt=0;vt<qe.children.length;++vt){var Mt=qe.children[vt];if(Mt==Ee)break;ce+=Mt.height}return ce}function ei(re){if(re.height==0)return 0;for(var ce=re.text.length,Ee,be=re;Ee=Yn(be);){var Oe=Ee.find(0,!0);be=Oe.from.line,ce+=Oe.from.ch-Oe.to.ch}for(be=re;Ee=pn(be);){var qe=Ee.find(0,!0);ce-=be.text.length-qe.from.ch,be=qe.to.line,ce+=be.text.length-qe.to.ch}return ce}function Zr(re){var ce=re.display,Ee=re.doc;ce.maxLine=er(Ee,Ee.first),ce.maxLineLength=ei(ce.maxLine),ce.maxLineChanged=!0,Ee.iter(function(be){var Oe=ei(be);Oe>ce.maxLineLength&&(ce.maxLineLength=Oe,ce.maxLine=be)})}var ri=function(re,ce,Ee){this.text=re,lt(this,ce),this.height=Ee?Ee(this):1};ri.prototype.lineNo=function(){return Ot(this)},Ln(ri);function li(re,ce,Ee,be){re.text=ce,re.stateAfter&&(re.stateAfter=null),re.styles&&(re.styles=null),re.order!=null&&(re.order=null),Jt(re),lt(re,Ee);var Oe=be?be(re):1;Oe!=re.height&&Qn(re,Oe)}function ii(re){re.parent=null,Jt(re)}var Oi={},Di={};function po(re,ce){if(!re||/^\s*$/.test(re))return null;var Ee=ce.addModeClass?Di:Oi;return Ee[re]||(Ee[re]=re.replace(/\S+/g,"cm-$&"))}function Yt(re,ce){var Ee=Re("span",null,null,me?"padding-right: .1px":null),be={pre:Re("pre",[Ee],"CodeMirror-line"),content:Ee,col:0,pos:0,cm:re,trailingSpace:!1,splitSpaces:re.getOption("lineWrapping")};ce.measure={};for(var Oe=0;Oe<=(ce.rest?ce.rest.length:0);Oe++){var qe=Oe?ce.rest[Oe-1]:ce.line,vt=void 0;be.pos=0,be.addToken=pi,_i(re.display.measure)&&(vt=Kt(qe,re.doc.direction))&&(be.addToken=Si(be.addToken,vt)),be.map=[];var Mt=ce!=re.display.externalMeasured&&Ot(qe);qi(qe,be,qr(re,qe,Mt)),qe.styleClasses&&(qe.styleClasses.bgClass&&(be.bgClass=ot(qe.styleClasses.bgClass,be.bgClass||"")),qe.styleClasses.textClass&&(be.textClass=ot(qe.styleClasses.textClass,be.textClass||""))),be.map.length==0&&be.map.push(0,0,be.content.appendChild(Ii(re.display.measure))),Oe==0?(ce.measure.map=be.map,ce.measure.cache={}):((ce.measure.maps||(ce.measure.maps=[])).push(be.map),(ce.measure.caches||(ce.measure.caches=[])).push({}))}if(me){var kt=be.content.lastChild;(/\bcm-tab\b/.test(kt.className)||kt.querySelector&&kt.querySelector(".cm-tab"))&&(be.content.className="cm-tab-wrap-hack")}return tn(re,"renderLine",re,ce.line,be.pre),be.pre.className&&(be.textClass=ot(be.pre.className,be.textClass||"")),be}function ci(re){var ce=Ae("span","\u2022","cm-invalidchar");return ce.title="\\u"+re.charCodeAt(0).toString(16),ce.setAttribute("aria-label",ce.title),ce}function pi(re,ce,Ee,be,Oe,qe,vt){if(ce){var Mt=re.splitSpaces?Hr(ce,re.trailingSpace):ce,kt=re.cm.state.specialChars,Rt=!1,en;if(!kt.test(ce))re.col+=ce.length,en=document.createTextNode(Mt),re.map.push(re.pos,re.pos+ce.length,en),De&&fe<9&&(Rt=!0),re.pos+=ce.length;else{en=document.createDocumentFragment();for(var zt=0;;){kt.lastIndex=zt;var wn=kt.exec(ce),gn=wn?wn.index-zt:ce.length-zt;if(gn){var rr=document.createTextNode(Mt.slice(zt,zt+gn));De&&fe<9?en.appendChild(Ae("span",[rr])):en.appendChild(rr),re.map.push(re.pos,re.pos+gn,rr),re.col+=gn,re.pos+=gn}if(!wn)break;zt+=gn+1;var sr=void 0;if(wn[0]==" "){var Sr=re.cm.options.tabSize,Fr=Sr-re.col%Sr;sr=en.appendChild(Ae("span",Ft(Fr),"cm-tab")),sr.setAttribute("role","presentation"),sr.setAttribute("cm-text"," "),re.col+=Fr}else wn[0]=="\r"||wn[0]==`
`?(sr=en.appendChild(Ae("span",wn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),sr.setAttribute("cm-text",wn[0]),re.col+=1):(sr=re.cm.options.specialCharPlaceholder(wn[0]),sr.setAttribute("cm-text",wn[0]),De&&fe<9?en.appendChild(Ae("span",[sr])):en.appendChild(sr),re.col+=1);re.map.push(re.pos,re.pos+1,sr),re.pos++}}if(re.trailingSpace=Mt.charCodeAt(ce.length-1)==32,Ee||be||Oe||Rt||qe||vt){var Qr=Ee||"";be&&(Qr+=be),Oe&&(Qr+=Oe);var Kr=Ae("span",[en],Qr,qe);if(vt)for(var ui in vt)vt.hasOwnProperty(ui)&&ui!="style"&&ui!="class"&&Kr.setAttribute(ui,vt[ui]);return re.content.appendChild(Kr)}re.content.appendChild(en)}}function Hr(re,ce){if(re.length>1&&!/ /.test(re))return re;for(var Ee=ce,be="",Oe=0;Oe<re.length;Oe++){var qe=re.charAt(Oe);qe==" "&&Ee&&(Oe==re.length-1||re.charCodeAt(Oe+1)==32)&&(qe="\xA0"),be+=qe,Ee=qe==" "}return be}function Si(re,ce){return function(Ee,be,Oe,qe,vt,Mt,kt){Oe=Oe?Oe+" cm-force-border":"cm-force-border";for(var Rt=Ee.pos,en=Rt+be.length;;){for(var zt=void 0,wn=0;wn<ce.length&&(zt=ce[wn],!(zt.to>Rt&&zt.from<=Rt));wn++);if(zt.to>=en)return re(Ee,be,Oe,qe,vt,Mt,kt);re(Ee,be.slice(0,zt.to-Rt),Oe,qe,null,Mt,kt),qe=null,be=be.slice(zt.to-Rt),Rt=zt.to}}}function _r(re,ce,Ee,be){var Oe=!be&&Ee.widgetNode;Oe&&re.map.push(re.pos,re.pos+ce,Oe),!be&&re.cm.display.input.needsContentAttribute&&(Oe||(Oe=re.content.appendChild(document.createElement("span"))),Oe.setAttribute("cm-marker",Ee.id)),Oe&&(re.cm.display.input.setUneditable(Oe),re.content.appendChild(Oe)),re.pos+=ce,re.trailingSpace=!1}function qi(re,ce,Ee){var be=re.markedSpans,Oe=re.text,qe=0;if(!be){for(var vt=1;vt<Ee.length;vt+=2)ce.addToken(ce,Oe.slice(qe,qe=Ee[vt]),po(Ee[vt+1],ce.cm.options));return}for(var Mt=Oe.length,kt=0,Rt=1,en="",zt,wn,gn=0,rr,sr,Sr,Fr,Qr;;){if(gn==kt){rr=sr=Sr=wn="",Qr=null,Fr=null,gn=1/0;for(var Kr=[],ui=void 0,Ai=0;Ai<be.length;++Ai){var Gr=be[Ai],Ji=Gr.marker;if(Ji.type=="bookmark"&&Gr.from==kt&&Ji.widgetNode)Kr.push(Ji);else if(Gr.from<=kt&&(Gr.to==null||Gr.to>kt||Ji.collapsed&&Gr.to==kt&&Gr.from==kt)){if(Gr.to!=null&&Gr.to!=kt&&gn>Gr.to&&(gn=Gr.to,sr=""),Ji.className&&(rr+=" "+Ji.className),Ji.css&&(wn=(wn?wn+";":"")+Ji.css),Ji.startStyle&&Gr.from==kt&&(Sr+=" "+Ji.startStyle),Ji.endStyle&&Gr.to==gn&&(ui||(ui=[])).push(Ji.endStyle,Gr.to),Ji.title&&((Qr||(Qr={})).title=Ji.title),Ji.attributes)for(var Xo in Ji.attributes)(Qr||(Qr={}))[Xo]=Ji.attributes[Xo];Ji.collapsed&&(!Fr||bn(Fr.marker,Ji)<0)&&(Fr=Gr)}else Gr.from>kt&&gn>Gr.from&&(gn=Gr.from)}if(ui)for(var Ia=0;Ia<ui.length;Ia+=2)ui[Ia+1]==gn&&(sr+=" "+ui[Ia]);if(!Fr||Fr.from==kt)for(var ia=0;ia<Kr.length;++ia)_r(ce,0,Kr[ia]);if(Fr&&(Fr.from||0)==kt){if(_r(ce,(Fr.to==null?Mt+1:Fr.to)-kt,Fr.marker,Fr.from==null),Fr.to==null)return;Fr.to==kt&&(Fr=!1)}}if(kt>=Mt)break;for(var Ds=Math.min(Mt,gn);;){if(en){var gs=kt+en.length;if(!Fr){var Ma=gs>Ds?en.slice(0,Ds-kt):en;ce.addToken(ce,Ma,zt?zt+rr:rr,Sr,kt+Ma.length==gn?sr:"",wn,Qr)}if(gs>=Ds){en=en.slice(Ds-kt),kt=Ds;break}kt=gs,Sr=""}en=Oe.slice(qe,qe=Ee[Rt++]),zt=po(Ee[Rt++],ce.cm.options)}}}function Bi(re,ce,Ee){this.line=ce,this.rest=gr(ce),this.size=this.rest?Ot(mt(this.rest))-Ee+1:1,this.node=this.text=null,this.hidden=fn(re,ce)}function gi(re,ce,Ee){for(var be=[],Oe,qe=ce;qe<Ee;qe=Oe){var vt=new Bi(re.doc,er(re.doc,qe),qe);Oe=qe+vt.size,be.push(vt)}return be}var Qi=null;function ga(re){Qi?Qi.ops.push(re):re.ownsGroup=Qi={ops:[re],delayedCallbacks:[]}}function Ao(re){var ce=re.delayedCallbacks,Ee=0;do{for(;Ee<ce.length;Ee++)ce[Ee].call(null);for(var be=0;be<re.ops.length;be++){var Oe=re.ops[be];if(Oe.cursorActivityHandlers)for(;Oe.cursorActivityCalled<Oe.cursorActivityHandlers.length;)Oe.cursorActivityHandlers[Oe.cursorActivityCalled++].call(null,Oe.cm)}}while(Ee<ce.length)}function Aa(re,ce){var Ee=re.ownsGroup;if(Ee)try{Ao(Ee)}finally{Qi=null,ce(Ee)}}var ma=null;function Dr(re,ce){var Ee=Ut(re,ce);if(Ee.length){var be=Array.prototype.slice.call(arguments,2),Oe;Qi?Oe=Qi.delayedCallbacks:ma?Oe=ma:(Oe=ma=[],setTimeout(eo,0));for(var qe=function(Mt){Oe.push(function(){return Ee[Mt].apply(null,be)})},vt=0;vt<Ee.length;++vt)qe(vt)}}function eo(){var re=ma;ma=null;for(var ce=0;ce<re.length;++ce)re[ce]()}function Co(re,ce,Ee,be){for(var Oe=0;Oe<ce.changes.length;Oe++){var qe=ce.changes[Oe];qe=="text"?Nn(re,ce):qe=="gutter"?wi(re,ce,Ee,be):qe=="class"?zr(re,ce):qe=="widget"&&co(re,ce,be)}ce.changes=null}function Jo(re){return re.node==re.text&&(re.node=Ae("div",null,null,"position: relative"),re.text.parentNode&&re.text.parentNode.replaceChild(re.node,re.text),re.node.appendChild(re.text),De&&fe<8&&(re.node.style.zIndex=2)),re.node}function xi(re,ce){var Ee=ce.bgClass?ce.bgClass+" "+(ce.line.bgClass||""):ce.line.bgClass;if(Ee&&(Ee+=" CodeMirror-linebackground"),ce.background)Ee?ce.background.className=Ee:(ce.background.parentNode.removeChild(ce.background),ce.background=null);else if(Ee){var be=Jo(ce);ce.background=be.insertBefore(Ae("div",null,Ee),be.firstChild),re.display.input.setUneditable(ce.background)}}function mi(re,ce){var Ee=re.display.externalMeasured;return Ee&&Ee.line==ce.line?(re.display.externalMeasured=null,ce.measure=Ee.measure,Ee.built):Yt(re,ce)}function Nn(re,ce){var Ee=ce.text.className,be=mi(re,ce);ce.text==ce.node&&(ce.node=be.pre),ce.text.parentNode.replaceChild(be.pre,ce.text),ce.text=be.pre,be.bgClass!=ce.bgClass||be.textClass!=ce.textClass?(ce.bgClass=be.bgClass,ce.textClass=be.textClass,zr(re,ce)):Ee&&(ce.text.className=Ee)}function zr(re,ce){xi(re,ce),ce.line.wrapClass?Jo(ce).className=ce.line.wrapClass:ce.node!=ce.text&&(ce.node.className="");var Ee=ce.textClass?ce.textClass+" "+(ce.line.textClass||""):ce.line.textClass;ce.text.className=Ee||""}function wi(re,ce,Ee,be){if(ce.gutter&&(ce.node.removeChild(ce.gutter),ce.gutter=null),ce.gutterBackground&&(ce.node.removeChild(ce.gutterBackground),ce.gutterBackground=null),ce.line.gutterClass){var Oe=Jo(ce);ce.gutterBackground=Ae("div",null,"CodeMirror-gutter-background "+ce.line.gutterClass,"left: "+(re.options.fixedGutter?be.fixedPos:-be.gutterTotalWidth)+"px; width: "+be.gutterTotalWidth+"px"),re.display.input.setUneditable(ce.gutterBackground),Oe.insertBefore(ce.gutterBackground,ce.text)}var qe=ce.line.gutterMarkers;if(re.options.lineNumbers||qe){var vt=Jo(ce),Mt=ce.gutter=Ae("div",null,"CodeMirror-gutter-wrapper","left: "+(re.options.fixedGutter?be.fixedPos:-be.gutterTotalWidth)+"px");if(re.display.input.setUneditable(Mt),vt.insertBefore(Mt,ce.text),ce.line.gutterClass&&(Mt.className+=" "+ce.line.gutterClass),re.options.lineNumbers&&(!qe||!qe["CodeMirror-linenumbers"])&&(ce.lineNumber=Mt.appendChild(Ae("div",qn(re.options,Ee),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+be.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+re.display.lineNumInnerWidth+"px"))),qe)for(var kt=0;kt<re.display.gutterSpecs.length;++kt){var Rt=re.display.gutterSpecs[kt].className,en=qe.hasOwnProperty(Rt)&&qe[Rt];en&&Mt.appendChild(Ae("div",[en],"CodeMirror-gutter-elt","left: "+be.gutterLeft[Rt]+"px; width: "+be.gutterWidth[Rt]+"px"))}}}function co(re,ce,Ee){ce.alignable&&(ce.alignable=null);for(var be=je("CodeMirror-linewidget"),Oe=ce.node.firstChild,qe=void 0;Oe;Oe=qe)qe=Oe.nextSibling,be.test(Oe.className)&&ce.node.removeChild(Oe);aa(re,ce,Ee)}function Pa(re,ce,Ee,be){var Oe=mi(re,ce);return ce.text=ce.node=Oe.pre,Oe.bgClass&&(ce.bgClass=Oe.bgClass),Oe.textClass&&(ce.textClass=Oe.textClass),zr(re,ce),wi(re,ce,Ee,be),aa(re,ce,be),ce.node}function aa(re,ce,Ee){if(ti(re,ce.line,ce,Ee,!0),ce.rest)for(var be=0;be<ce.rest.length;be++)ti(re,ce.rest[be],ce,Ee,!1)}function ti(re,ce,Ee,be,Oe){if(ce.widgets)for(var qe=Jo(Ee),vt=0,Mt=ce.widgets;vt<Mt.length;++vt){var kt=Mt[vt],Rt=Ae("div",[kt.node],"CodeMirror-linewidget"+(kt.className?" "+kt.className:""));kt.handleMouseEvents||Rt.setAttribute("cm-ignore-events","true"),Ho(kt,Rt,Ee,be),re.display.input.setUneditable(Rt),Oe&&kt.above?qe.insertBefore(Rt,Ee.gutter||Ee.text):qe.appendChild(Rt),Dr(kt,"redraw")}}function Ho(re,ce,Ee,be){if(re.noHScroll){(Ee.alignable||(Ee.alignable=[])).push(ce);var Oe=be.wrapperWidth;ce.style.left=be.fixedPos+"px",re.coverGutter||(Oe-=be.gutterTotalWidth,ce.style.paddingLeft=be.gutterTotalWidth+"px"),ce.style.width=Oe+"px"}re.coverGutter&&(ce.style.zIndex=5,ce.style.position="relative",re.noHScroll||(ce.style.marginLeft=-be.gutterTotalWidth+"px"))}function Ko(re){if(re.height!=null)return re.height;var ce=re.doc.cm;if(!ce)return 0;if(!Ye(document.body,re.node)){var Ee="position: relative;";re.coverGutter&&(Ee+="margin-left: -"+ce.display.gutters.offsetWidth+"px;"),re.noHScroll&&(Ee+="width: "+ce.display.wrapper.clientWidth+"px;"),Ne(ce.display.measure,Ae("div",[re.node],null,Ee))}return re.height=re.node.parentNode.offsetHeight}function jo(re,ce){for(var Ee=Xr(ce);Ee!=re.wrapper;Ee=Ee.parentNode)if(!Ee||Ee.nodeType==1&&Ee.getAttribute("cm-ignore-events")=="true"||Ee.parentNode==re.sizer&&Ee!=re.mover)return!0}function io(re){return re.lineSpace.offsetTop}function ba(re){return re.mover.offsetHeight-re.lineSpace.offsetHeight}function is(re){if(re.cachedPaddingH)return re.cachedPaddingH;var ce=Ne(re.measure,Ae("pre","x","CodeMirror-line-like")),Ee=window.getComputedStyle?window.getComputedStyle(ce):ce.currentStyle,be={left:parseInt(Ee.paddingLeft),right:parseInt(Ee.paddingRight)};return!isNaN(be.left)&&!isNaN(be.right)&&(re.cachedPaddingH=be),be}function fo(re){return Pt-re.display.nativeBarWidth}function os(re){return re.display.scroller.clientWidth-fo(re)-re.display.barWidth}function Gs(re){return re.display.scroller.clientHeight-fo(re)-re.display.barHeight}function Mu(re,ce,Ee){var be=re.options.lineWrapping,Oe=be&&os(re);if(!ce.measure.heights||be&&ce.measure.width!=Oe){var qe=ce.measure.heights=[];if(be){ce.measure.width=Oe;for(var vt=ce.text.firstChild.getClientRects(),Mt=0;Mt<vt.length-1;Mt++){var kt=vt[Mt],Rt=vt[Mt+1];Math.abs(kt.bottom-Rt.bottom)>2&&qe.push((kt.bottom+Rt.top)/2-Ee.top)}}qe.push(Ee.bottom-Ee.top)}}function Wo(re,ce,Ee){if(re.line==ce)return{map:re.measure.map,cache:re.measure.cache};for(var be=0;be<re.rest.length;be++)if(re.rest[be]==ce)return{map:re.measure.maps[be],cache:re.measure.caches[be]};for(var Oe=0;Oe<re.rest.length;Oe++)if(Ot(re.rest[Oe])>Ee)return{map:re.measure.maps[Oe],cache:re.measure.caches[Oe],before:!0}}function th(re,ce){ce=Gn(ce);var Ee=Ot(ce),be=re.display.externalMeasured=new Bi(re.doc,ce,Ee);be.lineN=Ee;var Oe=be.built=Yt(re,be);return be.text=Oe.pre,Ne(re.display.lineMeasure,Oe.pre),be}function Lu(re,ce,Ee,be){return Ns(re,gl(re,ce),Ee,be)}function Nu(re,ce){if(ce>=re.display.viewFrom&&ce<re.display.viewTo)return re.display.view[js(re,ce)];var Ee=re.display.externalMeasured;if(Ee&&ce>=Ee.lineN&&ce<Ee.lineN+Ee.size)return Ee}function gl(re,ce){var Ee=Ot(ce),be=Nu(re,Ee);be&&!be.text?be=null:be&&be.changes&&(Co(re,be,Ee,Fu(re)),re.curOp.forceUpdate=!0),be||(be=th(re,ce));var Oe=Wo(be,ce,Ee);return{line:ce,view:be,rect:null,map:Oe.map,cache:Oe.cache,before:Oe.before,hasHeights:!1}}function Ns(re,ce,Ee,be,Oe){ce.before&&(Ee=-1);var qe=Ee+(be||""),vt;return ce.cache.hasOwnProperty(qe)?vt=ce.cache[qe]:(ce.rect||(ce.rect=ce.view.text.getBoundingClientRect()),ce.hasHeights||(Mu(re,ce.view,ce.rect),ce.hasHeights=!0),vt=Vo(re,ce,Ee,be),vt.bogus||(ce.cache[qe]=vt)),{left:vt.left,right:vt.right,top:Oe?vt.rtop:vt.top,bottom:Oe?vt.rbottom:vt.bottom}}var Ml={left:0,right:0,top:0,bottom:0};function nh(re,ce,Ee){for(var be,Oe,qe,vt,Mt,kt,Rt=0;Rt<re.length;Rt+=3)if(Mt=re[Rt],kt=re[Rt+1],ce<Mt?(Oe=0,qe=1,vt="left"):ce<kt?(Oe=ce-Mt,qe=Oe+1):(Rt==re.length-3||ce==kt&&re[Rt+3]>ce)&&(qe=kt-Mt,Oe=qe-1,ce>=kt&&(vt="right")),Oe!=null){if(be=re[Rt+2],Mt==kt&&Ee==(be.insertLeft?"left":"right")&&(vt=Ee),Ee=="left"&&Oe==0)for(;Rt&&re[Rt-2]==re[Rt-3]&&re[Rt-1].insertLeft;)be=re[(Rt-=3)+2],vt="left";if(Ee=="right"&&Oe==kt-Mt)for(;Rt<re.length-3&&re[Rt+3]==re[Rt+4]&&!re[Rt+5].insertLeft;)be=re[(Rt+=3)+2],vt="right";break}return{node:be,start:Oe,end:qe,collapse:vt,coverStart:Mt,coverEnd:kt}}function Au(re,ce){var Ee=Ml;if(ce=="left")for(var be=0;be<re.length&&(Ee=re[be]).left==Ee.right;be++);else for(var Oe=re.length-1;Oe>=0&&(Ee=re[Oe]).left==Ee.right;Oe--);return Ee}function Vo(re,ce,Ee,be){var Oe=nh(ce.map,Ee,be),qe=Oe.node,vt=Oe.start,Mt=Oe.end,kt=Oe.collapse,Rt;if(qe.nodeType==3){for(var en=0;en<4;en++){for(;vt&&He(ce.line.text.charAt(Oe.coverStart+vt));)--vt;for(;Oe.coverStart+Mt<Oe.coverEnd&&He(ce.line.text.charAt(Oe.coverStart+Mt));)++Mt;if(De&&fe<9&&vt==0&&Mt==Oe.coverEnd-Oe.coverStart?Rt=qe.parentNode.getBoundingClientRect():Rt=Au(We(qe,vt,Mt).getClientRects(),be),Rt.left||Rt.right||vt==0)break;Mt=vt,vt=vt-1,kt="right"}De&&fe<11&&(Rt=ju(re.display.measure,Rt))}else{vt>0&&(kt=be="right");var zt;re.options.lineWrapping&&(zt=qe.getClientRects()).length>1?Rt=zt[be=="right"?zt.length-1:0]:Rt=qe.getBoundingClientRect()}if(De&&fe<9&&!vt&&(!Rt||!Rt.left&&!Rt.right)){var wn=qe.parentNode.getClientRects()[0];wn?Rt={left:wn.left,right:wn.left+Wl(re.display),top:wn.top,bottom:wn.bottom}:Rt=Ml}for(var gn=Rt.top-ce.rect.top,rr=Rt.bottom-ce.rect.top,sr=(gn+rr)/2,Sr=ce.view.measure.heights,Fr=0;Fr<Sr.length-1&&!(sr<Sr[Fr]);Fr++);var Qr=Fr?Sr[Fr-1]:0,Kr=Sr[Fr],ui={left:(kt=="right"?Rt.right:Rt.left)-ce.rect.left,right:(kt=="left"?Rt.left:Rt.right)-ce.rect.left,top:Qr,bottom:Kr};return!Rt.left&&!Rt.right&&(ui.bogus=!0),re.options.singleCursorHeightPerLine||(ui.rtop=gn,ui.rbottom=rr),ui}function ju(re,ce){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ei(re))return ce;var Ee=screen.logicalXDPI/screen.deviceXDPI,be=screen.logicalYDPI/screen.deviceYDPI;return{left:ce.left*Ee,right:ce.right*Ee,top:ce.top*be,bottom:ce.bottom*be}}function rh(re){if(re.measure&&(re.measure.cache={},re.measure.heights=null,re.rest))for(var ce=0;ce<re.rest.length;ce++)re.measure.caches[ce]={}}function iu(re){re.display.externalMeasure=null,Fe(re.display.lineMeasure);for(var ce=0;ce<re.display.view.length;ce++)rh(re.display.view[ce])}function ou(re){iu(re),re.display.cachedCharWidth=re.display.cachedTextHeight=re.display.cachedPaddingH=null,re.options.lineWrapping||(re.display.maxLineChanged=!0),re.display.lineNumChars=null}function ja(){return Ce&&z?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Oa(){return Ce&&z?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function na(re){var ce=0;if(re.widgets)for(var Ee=0;Ee<re.widgets.length;++Ee)re.widgets[Ee].above&&(ce+=Ko(re.widgets[Ee]));return ce}function sa(re,ce,Ee,be,Oe){if(!Oe){var qe=na(ce);Ee.top+=qe,Ee.bottom+=qe}if(be=="line")return Ee;be||(be="local");var vt=kr(ce);if(be=="local"?vt+=io(re.display):vt-=re.display.viewOffset,be=="page"||be=="window"){var Mt=re.display.lineSpace.getBoundingClientRect();vt+=Mt.top+(be=="window"?0:Oa());var kt=Mt.left+(be=="window"?0:ja());Ee.left+=kt,Ee.right+=kt}return Ee.top+=vt,Ee.bottom+=vt,Ee}function uo(re,ce,Ee){if(Ee=="div")return ce;var be=ce.left,Oe=ce.top;if(Ee=="page")be-=ja(),Oe-=Oa();else if(Ee=="local"||!Ee){var qe=re.display.sizer.getBoundingClientRect();be+=qe.left,Oe+=qe.top}var vt=re.display.lineSpace.getBoundingClientRect();return{left:be-vt.left,top:Oe-vt.top}}function Ni(re,ce,Ee,be,Oe){return be||(be=er(re.doc,ce.line)),sa(re,be,Lu(re,be,ce.ch,Oe),Ee)}function Gi(re,ce,Ee,be,Oe,qe){be=be||er(re.doc,ce.line),Oe||(Oe=gl(re,be));function vt(rr,sr){var Sr=Ns(re,Oe,rr,sr?"right":"left",qe);return sr?Sr.left=Sr.right:Sr.right=Sr.left,sa(re,be,Sr,Ee)}var Mt=Kt(be,re.doc.direction),kt=ce.ch,Rt=ce.sticky;if(kt>=be.text.length?(kt=be.text.length,Rt="before"):kt<=0&&(kt=0,Rt="after"),!Mt)return vt(Rt=="before"?kt-1:kt,Rt=="before");function en(rr,sr,Sr){var Fr=Mt[sr],Qr=Fr.level==1;return vt(Sr?rr-1:rr,Qr!=Sr)}var zt=Lt(Mt,kt,Rt),wn=At,gn=en(kt,zt,Rt=="before");return wn!=null&&(gn.other=en(kt,wn,Rt!="before")),gn}function la(re,ce){var Ee=0;ce=hr(re.doc,ce),re.options.lineWrapping||(Ee=Wl(re.display)*ce.ch);var be=er(re.doc,ce.line),Oe=kr(be)+io(re.display);return{left:Ee,right:Ee,top:Oe,bottom:Oe+be.height}}function Qo(re,ce,Ee,be,Oe){var qe=an(re,ce,Ee);return qe.xRel=Oe,be&&(qe.outside=be),qe}function qo(re,ce,Ee){var be=re.doc;if(Ee+=re.display.viewOffset,Ee<0)return Qo(be.first,0,null,-1,-1);var Oe=vn(be,Ee),qe=be.first+be.size-1;if(Oe>qe)return Qo(be.first+be.size-1,er(be,qe).text.length,null,1,1);ce<0&&(ce=0);for(var vt=er(be,Oe);;){var Mt=Mn(re,vt,Oe,ce,Ee),kt=jn(vt,Mt.ch+(Mt.xRel>0||Mt.outside>0?1:0));if(!kt)return Mt;var Rt=kt.find(1);if(Rt.line==Oe)return Rt;vt=er(be,Oe=Rt.line)}}function Mr(re,ce,Ee,be){be-=na(ce);var Oe=ce.text.length,qe=ct(function(vt){return Ns(re,Ee,vt-1).bottom<=be},Oe,0);return Oe=ct(function(vt){return Ns(re,Ee,vt).top>be},qe,Oe),{begin:qe,end:Oe}}function As(re,ce,Ee,be){Ee||(Ee=gl(re,ce));var Oe=sa(re,ce,Ns(re,Ee,be),"line").top;return Mr(re,ce,Ee,Oe)}function Gt(re,ce,Ee,be){return re.bottom<=Ee?!1:re.top>Ee?!0:(be?re.left:re.right)>ce}function Mn(re,ce,Ee,be,Oe){Oe-=kr(ce);var qe=gl(re,ce),vt=na(ce),Mt=0,kt=ce.text.length,Rt=!0,en=Kt(ce,re.doc.direction);if(en){var zt=(re.options.lineWrapping?Ou:Ll)(re,ce,Ee,qe,en,be,Oe);Rt=zt.level!=1,Mt=Rt?zt.from:zt.to-1,kt=Rt?zt.to:zt.from-1}var wn=null,gn=null,rr=ct(function(Ai){var Gr=Ns(re,qe,Ai);return Gr.top+=vt,Gr.bottom+=vt,Gt(Gr,be,Oe,!1)?(Gr.top<=Oe&&Gr.left<=be&&(wn=Ai,gn=Gr),!0):!1},Mt,kt),sr,Sr,Fr=!1;if(gn){var Qr=be-gn.left<gn.right-be,Kr=Qr==Rt;rr=wn+(Kr?0:1),Sr=Kr?"after":"before",sr=Qr?gn.left:gn.right}else{!Rt&&(rr==kt||rr==Mt)&&rr++,Sr=rr==0?"after":rr==ce.text.length?"before":Ns(re,qe,rr-(Rt?1:0)).bottom+vt<=Oe==Rt?"after":"before";var ui=Gi(re,an(Ee,rr,Sr),"line",ce,qe);sr=ui.left,Fr=Oe<ui.top?-1:Oe>=ui.bottom?1:0}return rr=Qe(ce.text,rr,1),Qo(Ee,rr,Sr,Fr,be-sr)}function Ll(re,ce,Ee,be,Oe,qe,vt){var Mt=ct(function(zt){var wn=Oe[zt],gn=wn.level!=1;return Gt(Gi(re,an(Ee,gn?wn.to:wn.from,gn?"before":"after"),"line",ce,be),qe,vt,!0)},0,Oe.length-1),kt=Oe[Mt];if(Mt>0){var Rt=kt.level!=1,en=Gi(re,an(Ee,Rt?kt.from:kt.to,Rt?"after":"before"),"line",ce,be);Gt(en,qe,vt,!0)&&en.top>vt&&(kt=Oe[Mt-1])}return kt}function Ou(re,ce,Ee,be,Oe,qe,vt){var Mt=Mr(re,ce,be,vt),kt=Mt.begin,Rt=Mt.end;/\s/.test(ce.text.charAt(Rt-1))&&Rt--;for(var en=null,zt=null,wn=0;wn<Oe.length;wn++){var gn=Oe[wn];if(!(gn.from>=Rt||gn.to<=kt)){var rr=gn.level!=1,sr=Ns(re,be,rr?Math.min(Rt,gn.to)-1:Math.max(kt,gn.from)).right,Sr=sr<qe?qe-sr+1e9:sr-qe;(!en||zt>Sr)&&(en=gn,zt=Sr)}}return en||(en=Oe[Oe.length-1]),en.from<kt&&(en={from:kt,to:en.to,level:en.level}),en.to>Rt&&(en={from:en.from,to:Rt,level:en.level}),en}var ua;function Us(re){if(re.cachedTextHeight!=null)return re.cachedTextHeight;if(ua==null){ua=Ae("pre",null,"CodeMirror-line-like");for(var ce=0;ce<49;++ce)ua.appendChild(document.createTextNode("x")),ua.appendChild(Ae("br"));ua.appendChild(document.createTextNode("x"))}Ne(re.measure,ua);var Ee=ua.offsetHeight/50;return Ee>3&&(re.cachedTextHeight=Ee),Fe(re.measure),Ee||1}function Wl(re){if(re.cachedCharWidth!=null)return re.cachedCharWidth;var ce=Ae("span","xxxxxxxxxx"),Ee=Ae("pre",[ce],"CodeMirror-line-like");Ne(re.measure,Ee);var be=ce.getBoundingClientRect(),Oe=(be.right-be.left)/10;return Oe>2&&(re.cachedCharWidth=Oe),Oe||10}function Fu(re){for(var ce=re.display,Ee={},be={},Oe=ce.gutters.clientLeft,qe=ce.gutters.firstChild,vt=0;qe;qe=qe.nextSibling,++vt){var Mt=re.display.gutterSpecs[vt].className;Ee[Mt]=qe.offsetLeft+qe.clientLeft+Oe,be[Mt]=qe.clientWidth}return{fixedPos:Du(ce),gutterTotalWidth:ce.gutters.offsetWidth,gutterLeft:Ee,gutterWidth:be,wrapperWidth:ce.wrapper.clientWidth}}function Du(re){return re.scroller.getBoundingClientRect().left-re.sizer.getBoundingClientRect().left}function Oo(re){var ce=Us(re.display),Ee=re.options.lineWrapping,be=Ee&&Math.max(5,re.display.scroller.clientWidth/Wl(re.display)-3);return function(Oe){if(fn(re.doc,Oe))return 0;var qe=0;if(Oe.widgets)for(var vt=0;vt<Oe.widgets.length;vt++)Oe.widgets[vt].height&&(qe+=Oe.widgets[vt].height);return Ee?qe+(Math.ceil(Oe.text.length/be)||1)*ce:qe+ce}}function fi(re){var ce=re.doc,Ee=Oo(re);ce.iter(function(be){var Oe=Ee(be);Oe!=be.height&&Qn(be,Oe)})}function Ga(re,ce,Ee,be){var Oe=re.display;if(!Ee&&Xr(ce).getAttribute("cm-not-content")=="true")return null;var qe,vt,Mt=Oe.lineSpace.getBoundingClientRect();try{qe=ce.clientX-Mt.left,vt=ce.clientY-Mt.top}catch(zt){return null}var kt=qo(re,qe,vt),Rt;if(be&&kt.xRel>0&&(Rt=er(re.doc,kt.line).text).length==kt.ch){var en=Je(Rt,Rt.length,re.options.tabSize)-Rt.length;kt=an(kt.line,Math.max(0,Math.round((qe-is(re.display).left)/Wl(re.display))-en))}return kt}function js(re,ce){if(ce>=re.display.viewTo||(ce-=re.display.viewFrom,ce<0))return null;for(var Ee=re.display.view,be=0;be<Ee.length;be++)if(ce-=Ee[be].size,ce<0)return be}function Fo(re,ce,Ee,be){ce==null&&(ce=re.doc.first),Ee==null&&(Ee=re.doc.first+re.doc.size),be||(be=0);var Oe=re.display;if(be&&Ee<Oe.viewTo&&(Oe.updateLineNumbers==null||Oe.updateLineNumbers>ce)&&(Oe.updateLineNumbers=ce),re.curOp.viewChanged=!0,ce>=Oe.viewTo)yn&&or(re.doc,ce)<Oe.viewTo&&_o(re);else if(Ee<=Oe.viewFrom)yn&&Hn(re.doc,Ee+be)>Oe.viewFrom?_o(re):(Oe.viewFrom+=be,Oe.viewTo+=be);else if(ce<=Oe.viewFrom&&Ee>=Oe.viewTo)_o(re);else if(ce<=Oe.viewFrom){var qe=ds(re,Ee,Ee+be,1);qe?(Oe.view=Oe.view.slice(qe.index),Oe.viewFrom=qe.lineN,Oe.viewTo+=be):_o(re)}else if(Ee>=Oe.viewTo){var vt=ds(re,ce,ce,-1);vt?(Oe.view=Oe.view.slice(0,vt.index),Oe.viewTo=vt.lineN):_o(re)}else{var Mt=ds(re,ce,ce,-1),kt=ds(re,Ee,Ee+be,1);Mt&&kt?(Oe.view=Oe.view.slice(0,Mt.index).concat(gi(re,Mt.lineN,kt.lineN)).concat(Oe.view.slice(kt.index)),Oe.viewTo+=be):_o(re)}var Rt=Oe.externalMeasured;Rt&&(Ee<Rt.lineN?Rt.lineN+=be:ce<Rt.lineN+Rt.size&&(Oe.externalMeasured=null))}function Ri(re,ce,Ee){re.curOp.viewChanged=!0;var be=re.display,Oe=re.display.externalMeasured;if(Oe&&ce>=Oe.lineN&&ce<Oe.lineN+Oe.size&&(be.externalMeasured=null),!(ce<be.viewFrom||ce>=be.viewTo)){var qe=be.view[js(re,ce)];if(qe.node!=null){var vt=qe.changes||(qe.changes=[]);xt(vt,Ee)==-1&&vt.push(Ee)}}}function _o(re){re.display.viewFrom=re.display.viewTo=re.doc.first,re.display.view=[],re.display.viewOffset=0}function ds(re,ce,Ee,be){var Oe=js(re,ce),qe,vt=re.display.view;if(!yn||Ee==re.doc.first+re.doc.size)return{index:Oe,lineN:Ee};for(var Mt=re.display.viewFrom,kt=0;kt<Oe;kt++)Mt+=vt[kt].size;if(Mt!=ce){if(be>0){if(Oe==vt.length-1)return null;qe=Mt+vt[Oe].size-ce,Oe++}else qe=Mt-ce;ce+=qe,Ee+=qe}for(;or(re.doc,Ee)!=Ee;){if(Oe==(be<0?0:vt.length-1))return null;Ee+=be*vt[Oe-(be<0?1:0)].size,Oe+=be}return{index:Oe,lineN:Ee}}function wo(re,ce,Ee){var be=re.display,Oe=be.view;Oe.length==0||ce>=be.viewTo||Ee<=be.viewFrom?(be.view=gi(re,ce,Ee),be.viewFrom=ce):(be.viewFrom>ce?be.view=gi(re,ce,be.viewFrom).concat(be.view):be.viewFrom<ce&&(be.view=be.view.slice(js(re,ce))),be.viewFrom=ce,be.viewTo<Ee?be.view=be.view.concat(gi(re,be.viewTo,Ee)):be.viewTo>Ee&&(be.view=be.view.slice(0,js(re,Ee)))),be.viewTo=Ee}function ws(re){for(var ce=re.display.view,Ee=0,be=0;be<ce.length;be++){var Oe=ce[be];!Oe.hidden&&(!Oe.node||Oe.changes)&&++Ee}return Ee}function va(re){re.display.input.showSelection(re.display.input.prepareSelection())}function au(re,ce){ce===void 0&&(ce=!0);for(var Ee=re.doc,be={},Oe=be.cursors=document.createDocumentFragment(),qe=be.selection=document.createDocumentFragment(),vt=0;vt<Ee.sel.ranges.length;vt++)if(!(!ce&&vt==Ee.sel.primIndex)){var Mt=Ee.sel.ranges[vt];if(!(Mt.from().line>=re.display.viewTo||Mt.to().line<re.display.viewFrom)){var kt=Mt.empty();(kt||re.options.showCursorWhenSelecting)&&oo(re,Mt.head,Oe),kt||to(re,Mt,qe)}}return be}function oo(re,ce,Ee){var be=Gi(re,ce,"div",null,null,!re.options.singleCursorHeightPerLine),Oe=Ee.appendChild(Ae("div","\xA0","CodeMirror-cursor"));if(Oe.style.left=be.left+"px",Oe.style.top=be.top+"px",Oe.style.height=Math.max(0,be.bottom-be.top)*re.options.cursorHeight+"px",be.other){var qe=Ee.appendChild(Ae("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));qe.style.display="",qe.style.left=be.other.left+"px",qe.style.top=be.other.top+"px",qe.style.height=(be.other.bottom-be.other.top)*.85+"px"}}function Ea(re,ce){return re.top-ce.top||re.left-ce.left}function to(re,ce,Ee){var be=re.display,Oe=re.doc,qe=document.createDocumentFragment(),vt=is(re.display),Mt=vt.left,kt=Math.max(be.sizerWidth,os(re)-be.sizer.offsetLeft)-vt.right,Rt=Oe.direction=="ltr";function en(Kr,ui,Ai,Gr){ui<0&&(ui=0),ui=Math.round(ui),Gr=Math.round(Gr),qe.appendChild(Ae("div",null,"CodeMirror-selected","position: absolute; left: "+Kr+`px;
top: `+ui+"px; width: "+(Ai==null?kt-Kr:Ai)+`px;
height: `+(Gr-ui)+"px"))}function zt(Kr,ui,Ai){var Gr=er(Oe,Kr),Ji=Gr.text.length,Xo,Ia;function ia(Ma,Vs){return Ni(re,an(Kr,Ma),"div",Gr,Vs)}function Ds(Ma,Vs,ss){var La=As(re,Gr,null,Ma),yo=Vs=="ltr"==(ss=="after")?"left":"right",ca=ss=="after"?La.begin:La.end-(/\s/.test(Gr.text.charAt(La.end-1))?2:1);return ia(ca,yo)[yo]}var gs=Kt(Gr,Oe.direction);return at(gs,ui||0,Ai==null?Ji:Ai,function(Ma,Vs,ss,La){var yo=ss=="ltr",ca=ia(Ma,yo?"left":"right"),Za=ia(Vs-1,yo?"right":"left"),ls=ui==null&&Ma==0,Ol=Ai==null&&Vs==Ji,oa=La==0,Sl=!gs||La==gs.length-1;if(Za.top-ca.top<=3){var pa=(Rt?ls:Ol)&&oa,Af=(Rt?Ol:ls)&&Sl,sl=pa?Mt:(yo?ca:Za).left,Zs=Af?kt:(yo?Za:ca).right;en(sl,ca.top,Zs-sl,ca.bottom)}else{var Bs,Bo,Xa,pu;yo?(Bs=Rt&&ls&&oa?Mt:ca.left,Bo=Rt?kt:Ds(Ma,ss,"before"),Xa=Rt?Mt:Ds(Vs,ss,"after"),pu=Rt&&Ol&&Sl?kt:Za.right):(Bs=Rt?Ds(Ma,ss,"before"):Mt,Bo=!Rt&&ls&&oa?kt:ca.right,Xa=!Rt&&Ol&&Sl?Mt:Za.left,pu=Rt?Ds(Vs,ss,"after"):kt),en(Bs,ca.top,Bo-Bs,ca.bottom),ca.bottom<Za.top&&en(Mt,ca.bottom,null,Za.top),en(Xa,Za.top,pu-Xa,Za.bottom)}(!Xo||Ea(ca,Xo)<0)&&(Xo=ca),Ea(Za,Xo)<0&&(Xo=Za),(!Ia||Ea(ca,Ia)<0)&&(Ia=ca),Ea(Za,Ia)<0&&(Ia=Za)}),{start:Xo,end:Ia}}var wn=ce.from(),gn=ce.to();if(wn.line==gn.line)zt(wn.line,wn.ch,gn.ch);else{var rr=er(Oe,wn.line),sr=er(Oe,gn.line),Sr=Gn(rr)==Gn(sr),Fr=zt(wn.line,wn.ch,Sr?rr.text.length+1:null).end,Qr=zt(gn.line,Sr?0:null,gn.ch).start;Sr&&(Fr.top<Qr.top-2?(en(Fr.right,Fr.top,null,Fr.bottom),en(Mt,Qr.top,Qr.left,Qr.bottom)):en(Fr.right,Fr.top,Qr.left-Fr.right,Fr.bottom)),Fr.bottom<Qr.top&&en(Mt,Fr.bottom,null,Qr.top)}Ee.appendChild(qe)}function Po(re){if(re.state.focused){var ce=re.display;clearInterval(ce.blinker);var Ee=!0;ce.cursorDiv.style.visibility="",re.options.cursorBlinkRate>0?ce.blinker=setInterval(function(){re.hasFocus()||Bu(re),ce.cursorDiv.style.visibility=(Ee=!Ee)?"":"hidden"},re.options.cursorBlinkRate):re.options.cursorBlinkRate<0&&(ce.cursorDiv.style.visibility="hidden")}}function Eo(re){re.state.focused||(re.display.input.focus(),ho(re))}function zo(re){re.state.delayingBlurEvent=!0,setTimeout(function(){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1,Bu(re))},100)}function ho(re,ce){re.state.delayingBlurEvent&&(re.state.delayingBlurEvent=!1),re.options.readOnly!="nocursor"&&(re.state.focused||(tn(re,"focus",re,ce),re.state.focused=!0,Ke(re.display.wrapper,"CodeMirror-focused"),!re.curOp&&re.display.selForContextMenu!=re.doc.sel&&(re.display.input.reset(),me&&setTimeout(function(){return re.display.input.reset(!0)},20)),re.display.input.receivedFocus()),Po(re))}function Bu(re,ce){re.state.delayingBlurEvent||(re.state.focused&&(tn(re,"blur",re,ce),re.state.focused=!1,Be(re.display.wrapper,"CodeMirror-focused")),clearInterval(re.display.blinker),setTimeout(function(){re.state.focused||(re.display.shift=!1)},150))}function hi(re){for(var ce=re.display,Ee=ce.lineDiv.offsetTop,be=0;be<ce.view.length;be++){var Oe=ce.view[be],qe=re.options.lineWrapping,vt=void 0,Mt=0;if(!Oe.hidden){if(De&&fe<8){var kt=Oe.node.offsetTop+Oe.node.offsetHeight;vt=kt-Ee,Ee=kt}else{var Rt=Oe.node.getBoundingClientRect();vt=Rt.bottom-Rt.top,!qe&&Oe.text.firstChild&&(Mt=Oe.text.firstChild.getBoundingClientRect().right-Rt.left-1)}var en=Oe.line.height-vt;if((en>.005||en<-.005)&&(Qn(Oe.line,vt),uf(Oe.line),Oe.rest))for(var zt=0;zt<Oe.rest.length;zt++)uf(Oe.rest[zt]);if(Mt>re.display.sizerWidth){var wn=Math.ceil(Mt/Wl(re.display));wn>re.display.maxLineLength&&(re.display.maxLineLength=wn,re.display.maxLine=Oe.line,re.display.maxLineChanged=!0)}}}}function uf(re){if(re.widgets)for(var ce=0;ce<re.widgets.length;++ce){var Ee=re.widgets[ce],be=Ee.node.parentNode;be&&(Ee.height=be.offsetHeight)}}function Xi(re,ce,Ee){var be=Ee&&Ee.top!=null?Math.max(0,Ee.top):re.scroller.scrollTop;be=Math.floor(be-io(re));var Oe=Ee&&Ee.bottom!=null?Ee.bottom:be+re.wrapper.clientHeight,qe=vn(ce,be),vt=vn(ce,Oe);if(Ee&&Ee.ensure){var Mt=Ee.ensure.from.line,kt=Ee.ensure.to.line;Mt<qe?(qe=Mt,vt=vn(ce,kr(er(ce,Mt))+re.wrapper.clientHeight)):Math.min(kt,ce.lastLine())>=vt&&(qe=vn(ce,kr(er(ce,kt))-re.wrapper.clientHeight),vt=kt)}return{from:qe,to:Math.max(vt,qe+1)}}function Cc(re,ce){if(!Wt(re,"scrollCursorIntoView")){var Ee=re.display,be=Ee.sizer.getBoundingClientRect(),Oe=null;if(ce.top+be.top<0?Oe=!0:ce.bottom+be.top>(window.innerHeight||document.documentElement.clientHeight)&&(Oe=!1),Oe!=null&&!we){var qe=Ae("div","\u200B",null,`position: absolute;
top: `+(ce.top-Ee.viewOffset-io(re.display))+`px;
height: `+(ce.bottom-ce.top+fo(re)+Ee.barHeight)+`px;
left: `+ce.left+"px; width: "+Math.max(2,ce.right-ce.left)+"px;");re.display.lineSpace.appendChild(qe),qe.scrollIntoView(Oe),re.display.lineSpace.removeChild(qe)}}}function su(re,ce,Ee,be){be==null&&(be=0);var Oe;!re.options.lineWrapping&&ce==Ee&&(ce=ce.ch?an(ce.line,ce.sticky=="before"?ce.ch-1:ce.ch,"after"):ce,Ee=ce.sticky=="before"?an(ce.line,ce.ch+1,"before"):ce);for(var qe=0;qe<5;qe++){var vt=!1,Mt=Gi(re,ce),kt=!Ee||Ee==ce?Mt:Gi(re,Ee);Oe={left:Math.min(Mt.left,kt.left),top:Math.min(Mt.top,kt.top)-be,right:Math.max(Mt.left,kt.left),bottom:Math.max(Mt.bottom,kt.bottom)+be};var Rt=Ec(re,Oe),en=re.doc.scrollTop,zt=re.doc.scrollLeft;if(Rt.scrollTop!=null&&(Hl(re,Rt.scrollTop),Math.abs(re.doc.scrollTop-en)>1&&(vt=!0)),Rt.scrollLeft!=null&&(Kl(re,Rt.scrollLeft),Math.abs(re.doc.scrollLeft-zt)>1&&(vt=!0)),!vt)break}return Oe}function ih(re,ce){var Ee=Ec(re,ce);Ee.scrollTop!=null&&Hl(re,Ee.scrollTop),Ee.scrollLeft!=null&&Kl(re,Ee.scrollLeft)}function Ec(re,ce){var Ee=re.display,be=Us(re.display);ce.top<0&&(ce.top=0);var Oe=re.curOp&&re.curOp.scrollTop!=null?re.curOp.scrollTop:Ee.scroller.scrollTop,qe=Gs(re),vt={};ce.bottom-ce.top>qe&&(ce.bottom=ce.top+qe);var Mt=re.doc.height+ba(Ee),kt=ce.top<be,Rt=ce.bottom>Mt-be;if(ce.top<Oe)vt.scrollTop=kt?0:ce.top;else if(ce.bottom>Oe+qe){var en=Math.min(ce.top,(Rt?Mt:ce.bottom)-qe);en!=Oe&&(vt.scrollTop=en)}var zt=re.options.fixedGutter?0:Ee.gutters.offsetWidth,wn=re.curOp&&re.curOp.scrollLeft!=null?re.curOp.scrollLeft:Ee.scroller.scrollLeft-zt,gn=os(re)-Ee.gutters.offsetWidth,rr=ce.right-ce.left>gn;return rr&&(ce.right=ce.left+gn),ce.left<10?vt.scrollLeft=0:ce.left<wn?vt.scrollLeft=Math.max(0,ce.left+zt-(rr?0:10)):ce.right>gn+wn-3&&(vt.scrollLeft=ce.right+(rr?0:10)-gn),vt}function _h(re,ce){ce!=null&&(nl(re),re.curOp.scrollTop=(re.curOp.scrollTop==null?re.doc.scrollTop:re.curOp.scrollTop)+ce)}function Nl(re){nl(re);var ce=re.getCursor();re.curOp.scrollToPos={from:ce,to:ce,margin:re.options.cursorScrollMargin}}function Iu(re,ce,Ee){(ce!=null||Ee!=null)&&nl(re),ce!=null&&(re.curOp.scrollLeft=ce),Ee!=null&&(re.curOp.scrollTop=Ee)}function lo(re,ce){nl(re),re.curOp.scrollToPos=ce}function nl(re){var ce=re.curOp.scrollToPos;if(ce){re.curOp.scrollToPos=null;var Ee=la(re,ce.from),be=la(re,ce.to);zh(re,Ee,be,ce.margin)}}function zh(re,ce,Ee,be){var Oe=Ec(re,{left:Math.min(ce.left,Ee.left),top:Math.min(ce.top,Ee.top)-be,right:Math.max(ce.right,Ee.right),bottom:Math.max(ce.bottom,Ee.bottom)+be});Iu(re,Oe.scrollLeft,Oe.scrollTop)}function Hl(re,ce){Math.abs(re.doc.scrollTop-ce)<2||(pt||ah(re,{top:ce}),kc(re,ce,!0),pt&&ah(re),Tc(re,100))}function kc(re,ce,Ee){ce=Math.max(0,Math.min(re.display.scroller.scrollHeight-re.display.scroller.clientHeight,ce)),!(re.display.scroller.scrollTop==ce&&!Ee)&&(re.doc.scrollTop=ce,re.display.scrollbars.setScrollTop(ce),re.display.scroller.scrollTop!=ce&&(re.display.scroller.scrollTop=ce))}function Kl(re,ce,Ee,be){ce=Math.max(0,Math.min(ce,re.display.scroller.scrollWidth-re.display.scroller.clientWidth)),!((Ee?ce==re.doc.scrollLeft:Math.abs(re.doc.scrollLeft-ce)<2)&&!be)&&(re.doc.scrollLeft=ce,td(re),re.display.scroller.scrollLeft!=ce&&(re.display.scroller.scrollLeft=ce),re.display.scrollbars.setScrollLeft(ce))}function Ui(re){var ce=re.display,Ee=ce.gutters.offsetWidth,be=Math.round(re.doc.height+ba(re.display));return{clientHeight:ce.scroller.clientHeight,viewHeight:ce.wrapper.clientHeight,scrollWidth:ce.scroller.scrollWidth,clientWidth:ce.scroller.clientWidth,viewWidth:ce.wrapper.clientWidth,barLeft:re.options.fixedGutter?Ee:0,docHeight:be,scrollHeight:be+fo(re)+ce.barHeight,nativeBarWidth:ce.nativeBarWidth,gutterWidth:Ee}}var ao=function(re,ce,Ee){this.cm=Ee;var be=this.vert=Ae("div",[Ae("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),Oe=this.horiz=Ae("div",[Ae("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");be.tabIndex=Oe.tabIndex=-1,re(be),re(Oe),$t(be,"scroll",function(){be.clientHeight&&ce(be.scrollTop,"vertical")}),$t(Oe,"scroll",function(){Oe.clientWidth&&ce(Oe.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,De&&fe<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ao.prototype.update=function(re){var ce=re.scrollWidth>re.clientWidth+1,Ee=re.scrollHeight>re.clientHeight+1,be=re.nativeBarWidth;if(Ee){this.vert.style.display="block",this.vert.style.bottom=ce?be+"px":"0";var Oe=re.viewHeight-(ce?be:0);this.vert.firstChild.style.height=Math.max(0,re.scrollHeight-re.clientHeight+Oe)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(ce){this.horiz.style.display="block",this.horiz.style.right=Ee?be+"px":"0",this.horiz.style.left=re.barLeft+"px";var qe=re.viewWidth-re.barLeft-(Ee?be:0);this.horiz.firstChild.style.width=Math.max(0,re.scrollWidth-re.clientWidth+qe)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&re.clientHeight>0&&(be==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:Ee?be:0,bottom:ce?be:0}},ao.prototype.setScrollLeft=function(re){this.horiz.scrollLeft!=re&&(this.horiz.scrollLeft=re),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ao.prototype.setScrollTop=function(re){this.vert.scrollTop!=re&&(this.vert.scrollTop=re),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ao.prototype.zeroWidthHack=function(){var re=ae&&!ve?"12px":"18px";this.horiz.style.height=this.vert.style.width=re,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new nt,this.disableVert=new nt},ao.prototype.enableZeroWidthBar=function(re,ce,Ee){re.style.pointerEvents="auto";function be(){var Oe=re.getBoundingClientRect(),qe=Ee=="vert"?document.elementFromPoint(Oe.right-1,(Oe.top+Oe.bottom)/2):document.elementFromPoint((Oe.right+Oe.left)/2,Oe.bottom-1);qe!=re?re.style.pointerEvents="none":ce.set(1e3,be)}ce.set(1e3,be)},ao.prototype.clear=function(){var re=this.horiz.parentNode;re.removeChild(this.horiz),re.removeChild(this.vert)};var Zo=function(){};Zo.prototype.update=function(){return{bottom:0,right:0}},Zo.prototype.setScrollLeft=function(){},Zo.prototype.setScrollTop=function(){},Zo.prototype.clear=function(){};function Fa(re,ce){ce||(ce=Ui(re));var Ee=re.display.barWidth,be=re.display.barHeight;ka(re,ce);for(var Oe=0;Oe<4&&Ee!=re.display.barWidth||be!=re.display.barHeight;Oe++)Ee!=re.display.barWidth&&re.options.lineWrapping&&hi(re),ka(re,Ui(re)),Ee=re.display.barWidth,be=re.display.barHeight}function ka(re,ce){var Ee=re.display,be=Ee.scrollbars.update(ce);Ee.sizer.style.paddingRight=(Ee.barWidth=be.right)+"px",Ee.sizer.style.paddingBottom=(Ee.barHeight=be.bottom)+"px",Ee.heightForcer.style.borderBottom=be.bottom+"px solid transparent",be.right&&be.bottom?(Ee.scrollbarFiller.style.display="block",Ee.scrollbarFiller.style.height=be.bottom+"px",Ee.scrollbarFiller.style.width=be.right+"px"):Ee.scrollbarFiller.style.display="",be.bottom&&re.options.coverGutterNextToScrollbar&&re.options.fixedGutter?(Ee.gutterFiller.style.display="block",Ee.gutterFiller.style.height=be.bottom+"px",Ee.gutterFiller.style.width=ce.gutterWidth+"px"):Ee.gutterFiller.style.display=""}var lu={native:ao,null:Zo};function Vl(re){re.display.scrollbars&&(re.display.scrollbars.clear(),re.display.scrollbars.addClass&&Be(re.display.wrapper,re.display.scrollbars.addClass)),re.display.scrollbars=new lu[re.options.scrollbarStyle](function(ce){re.display.wrapper.insertBefore(ce,re.display.scrollbarFiller),$t(ce,"mousedown",function(){re.state.focused&&setTimeout(function(){return re.display.input.focus()},0)}),ce.setAttribute("cm-not-content","true")},function(ce,Ee){Ee=="horizontal"?Kl(re,ce):Hl(re,ce)},re),re.display.scrollbars.addClass&&Ke(re.display.wrapper,re.display.scrollbars.addClass)}var uu=0;function rl(re){re.curOp={cm:re,viewChanged:!1,startHeight:re.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++uu},ga(re.curOp)}function Al(re){var ce=re.curOp;ce&&Aa(ce,function(Ee){for(var be=0;be<Ee.ops.length;be++)Ee.ops[be].cm.curOp=null;J0(Ee)})}function J0(re){for(var ce=re.ops,Ee=0;Ee<ce.length;Ee++)Q0(ce[Ee]);for(var be=0;be<ce.length;be++)q0(ce[be]);for(var Oe=0;Oe<ce.length;Oe++)Rg(ce[Oe]);for(var qe=0;qe<ce.length;qe++)ha(ce[qe]);for(var vt=0;vt<ce.length;vt++)oh(ce[vt])}function Q0(re){var ce=re.cm,Ee=ce.display;_g(ce),re.updateMaxLine&&Zr(ce),re.mustUpdate=re.viewChanged||re.forceUpdate||re.scrollTop!=null||re.scrollToPos&&(re.scrollToPos.from.line<Ee.viewFrom||re.scrollToPos.to.line>=Ee.viewTo)||Ee.maxLineChanged&&ce.options.lineWrapping,re.update=re.mustUpdate&&new Gh(ce,re.mustUpdate&&{top:re.scrollTop,ensure:re.scrollToPos},re.forceUpdate)}function q0(re){re.updatedDisplay=re.mustUpdate&&ed(re.cm,re.update)}function Rg(re){var ce=re.cm,Ee=ce.display;re.updatedDisplay&&hi(ce),re.barMeasure=Ui(ce),Ee.maxLineChanged&&!ce.options.lineWrapping&&(re.adjustWidthTo=Lu(ce,Ee.maxLine,Ee.maxLine.text.length).left+3,ce.display.sizerWidth=re.adjustWidthTo,re.barMeasure.scrollWidth=Math.max(Ee.scroller.clientWidth,Ee.sizer.offsetLeft+re.adjustWidthTo+fo(ce)+ce.display.barWidth),re.maxScrollLeft=Math.max(0,Ee.sizer.offsetLeft+re.adjustWidthTo-os(ce))),(re.updatedDisplay||re.selectionChanged)&&(re.preparedSelection=Ee.input.prepareSelection())}function ha(re){var ce=re.cm;re.adjustWidthTo!=null&&(ce.display.sizer.style.minWidth=re.adjustWidthTo+"px",re.maxScrollLeft<ce.doc.scrollLeft&&Kl(ce,Math.min(ce.display.scroller.scrollLeft,re.maxScrollLeft),!0),ce.display.maxLineChanged=!1);var Ee=re.focus&&re.focus==Ue();re.preparedSelection&&ce.display.input.showSelection(re.preparedSelection,Ee),(re.updatedDisplay||re.startHeight!=ce.doc.height)&&Fa(ce,re.barMeasure),re.updatedDisplay&&lh(ce,re.barMeasure),re.selectionChanged&&Po(ce),ce.state.focused&&re.updateInput&&ce.display.input.reset(re.typing),Ee&&Eo(re.cm)}function oh(re){var ce=re.cm,Ee=ce.display,be=ce.doc;if(re.updatedDisplay&&ko(ce,re.update),Ee.wheelStartX!=null&&(re.scrollTop!=null||re.scrollLeft!=null||re.scrollToPos)&&(Ee.wheelStartX=Ee.wheelStartY=null),re.scrollTop!=null&&kc(ce,re.scrollTop,re.forceScroll),re.scrollLeft!=null&&Kl(ce,re.scrollLeft,!0,!0),re.scrollToPos){var Oe=su(ce,hr(be,re.scrollToPos.from),hr(be,re.scrollToPos.to),re.scrollToPos.margin);Cc(ce,Oe)}var qe=re.maybeHiddenMarkers,vt=re.maybeUnhiddenMarkers;if(qe)for(var Mt=0;Mt<qe.length;++Mt)qe[Mt].lines.length||tn(qe[Mt],"hide");if(vt)for(var kt=0;kt<vt.length;++kt)vt[kt].lines.length&&tn(vt[kt],"unhide");Ee.wrapper.offsetHeight&&(be.scrollTop=ce.display.scroller.scrollTop),re.changeObjs&&tn(ce,"changes",ce,re.changeObjs),re.update&&re.update.finish()}function So(re,ce){if(re.curOp)return ce();rl(re);try{return ce()}finally{Al(re)}}function Da(re,ce){return function(){if(re.curOp)return ce.apply(re,arguments);rl(re);try{return ce.apply(re,arguments)}finally{Al(re)}}}function Ua(re){return function(){if(this.curOp)return re.apply(this,arguments);rl(this);try{return re.apply(this,arguments)}finally{Al(this)}}}function Wa(re){return function(){var ce=this.cm;if(!ce||ce.curOp)return re.apply(this,arguments);rl(ce);try{return re.apply(this,arguments)}finally{Al(ce)}}}function Tc(re,ce){re.doc.highlightFrontier<re.display.viewTo&&re.state.highlight.set(ce,ft(Ha,re))}function Ha(re){var ce=re.doc;if(!(ce.highlightFrontier>=re.display.viewTo)){var Ee=+new Date+re.options.workTime,be=ki(re,ce.highlightFrontier),Oe=[];ce.iter(be.line,Math.min(ce.first+ce.size,re.display.viewTo+500),function(qe){if(be.line>=re.display.viewFrom){var vt=qe.styles,Mt=qe.text.length>re.options.maxHighlightLength?tr(ce.mode,be.state):null,kt=Pi(re,qe,be,!0);Mt&&(be.state=Mt),qe.styles=kt.styles;var Rt=qe.styleClasses,en=kt.classes;en?qe.styleClasses=en:Rt&&(qe.styleClasses=null);for(var zt=!vt||vt.length!=qe.styles.length||Rt!=en&&(!Rt||!en||Rt.bgClass!=en.bgClass||Rt.textClass!=en.textClass),wn=0;!zt&&wn<vt.length;++wn)zt=vt[wn]!=qe.styles[wn];zt&&Oe.push(be.line),qe.stateAfter=be.save(),be.nextLine()}else qe.text.length<=re.options.maxHighlightLength&&un(re,qe.text,be),qe.stateAfter=be.line%5==0?be.save():null,be.nextLine();if(+new Date>Ee)return Tc(re,re.options.workDelay),!0}),ce.highlightFrontier=be.line,ce.modeFrontier=Math.max(ce.modeFrontier,be.line),Oe.length&&So(re,function(){for(var qe=0;qe<Oe.length;qe++)Ri(re,Oe[qe],"text")})}}var Gh=function(re,ce,Ee){var be=re.display;this.viewport=ce,this.visible=Xi(be,re.doc,ce),this.editorIsHidden=!be.wrapper.offsetWidth,this.wrapperHeight=be.wrapper.clientHeight,this.wrapperWidth=be.wrapper.clientWidth,this.oldDisplayWidth=os(re),this.force=Ee,this.dims=Fu(re),this.events=[]};Gh.prototype.signal=function(re,ce){Pn(re,ce)&&this.events.push(arguments)},Gh.prototype.finish=function(){for(var re=0;re<this.events.length;re++)tn.apply(null,this.events[re])};function _g(re){var ce=re.display;!ce.scrollbarsClipped&&ce.scroller.offsetWidth&&(ce.nativeBarWidth=ce.scroller.offsetWidth-ce.scroller.clientWidth,ce.heightForcer.style.height=fo(re)+"px",ce.sizer.style.marginBottom=-ce.nativeBarWidth+"px",ce.sizer.style.borderRightWidth=fo(re)+"px",ce.scrollbarsClipped=!0)}function zg(re){if(re.hasFocus())return null;var ce=Ue();if(!ce||!Ye(re.display.lineDiv,ce))return null;var Ee={activeElt:ce};if(window.getSelection){var be=window.getSelection();be.anchorNode&&be.extend&&Ye(re.display.lineDiv,be.anchorNode)&&(Ee.anchorNode=be.anchorNode,Ee.anchorOffset=be.anchorOffset,Ee.focusNode=be.focusNode,Ee.focusOffset=be.focusOffset)}return Ee}function Os(re){if(!(!re||!re.activeElt||re.activeElt==Ue())&&(re.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(re.activeElt.nodeName)&&re.anchorNode&&Ye(document.body,re.anchorNode)&&Ye(document.body,re.focusNode))){var ce=window.getSelection(),Ee=document.createRange();Ee.setEnd(re.anchorNode,re.anchorOffset),Ee.collapse(!1),ce.removeAllRanges(),ce.addRange(Ee),ce.extend(re.focusNode,re.focusOffset)}}function ed(re,ce){var Ee=re.display,be=re.doc;if(ce.editorIsHidden)return _o(re),!1;if(!ce.force&&ce.visible.from>=Ee.viewFrom&&ce.visible.to<=Ee.viewTo&&(Ee.updateLineNumbers==null||Ee.updateLineNumbers>=Ee.viewTo)&&Ee.renderedView==Ee.view&&ws(re)==0)return!1;Ca(re)&&(_o(re),ce.dims=Fu(re));var Oe=be.first+be.size,qe=Math.max(ce.visible.from-re.options.viewportMargin,be.first),vt=Math.min(Oe,ce.visible.to+re.options.viewportMargin);Ee.viewFrom<qe&&qe-Ee.viewFrom<20&&(qe=Math.max(be.first,Ee.viewFrom)),Ee.viewTo>vt&&Ee.viewTo-vt<20&&(vt=Math.min(Oe,Ee.viewTo)),yn&&(qe=or(re.doc,qe),vt=Hn(re.doc,vt));var Mt=qe!=Ee.viewFrom||vt!=Ee.viewTo||Ee.lastWrapHeight!=ce.wrapperHeight||Ee.lastWrapWidth!=ce.wrapperWidth;wo(re,qe,vt),Ee.viewOffset=kr(er(re.doc,Ee.viewFrom)),re.display.mover.style.top=Ee.viewOffset+"px";var kt=ws(re);if(!Mt&&kt==0&&!ce.force&&Ee.renderedView==Ee.view&&(Ee.updateLineNumbers==null||Ee.updateLineNumbers>=Ee.viewTo))return!1;var Rt=zg(re);return kt>4&&(Ee.lineDiv.style.display="none"),lp(re,Ee.updateLineNumbers,ce.dims),kt>4&&(Ee.lineDiv.style.display=""),Ee.renderedView=Ee.view,Os(Rt),Fe(Ee.cursorDiv),Fe(Ee.selectionDiv),Ee.gutters.style.height=Ee.sizer.style.minHeight=0,Mt&&(Ee.lastWrapHeight=ce.wrapperHeight,Ee.lastWrapWidth=ce.wrapperWidth,Tc(re,400)),Ee.updateLineNumbers=null,!0}function ko(re,ce){for(var Ee=ce.viewport,be=!0;;be=!1){if(!be||!re.options.lineWrapping||ce.oldDisplayWidth==os(re)){if(Ee&&Ee.top!=null&&(Ee={top:Math.min(re.doc.height+ba(re.display)-Gs(re),Ee.top)}),ce.visible=Xi(re.display,re.doc,Ee),ce.visible.from>=re.display.viewFrom&&ce.visible.to<=re.display.viewTo)break}else be&&(ce.visible=Xi(re.display,re.doc,Ee));if(!ed(re,ce))break;hi(re);var Oe=Ui(re);va(re),Fa(re,Oe),lh(re,Oe),ce.force=!1}ce.signal(re,"update",re),(re.display.viewFrom!=re.display.reportedViewFrom||re.display.viewTo!=re.display.reportedViewTo)&&(ce.signal(re,"viewportChange",re,re.display.viewFrom,re.display.viewTo),re.display.reportedViewFrom=re.display.viewFrom,re.display.reportedViewTo=re.display.viewTo)}function ah(re,ce){var Ee=new Gh(re,ce);if(ed(re,Ee)){hi(re),ko(re,Ee);var be=Ui(re);va(re),Fa(re,be),lh(re,be),Ee.finish()}}function lp(re,ce,Ee){var be=re.display,Oe=re.options.lineNumbers,qe=be.lineDiv,vt=qe.firstChild;function Mt(rr){var sr=rr.nextSibling;return me&&ae&&re.display.currentWheelTarget==rr?rr.style.display="none":rr.parentNode.removeChild(rr),sr}for(var kt=be.view,Rt=be.viewFrom,en=0;en<kt.length;en++){var zt=kt[en];if(!zt.hidden)if(!zt.node||zt.node.parentNode!=qe){var wn=Pa(re,zt,Rt,Ee);qe.insertBefore(wn,vt)}else{for(;vt!=zt.node;)vt=Mt(vt);var gn=Oe&&ce!=null&&ce<=Rt&&zt.lineNumber;zt.changes&&(xt(zt.changes,"gutter")>-1&&(gn=!1),Co(re,zt,Rt,Ee)),gn&&(Fe(zt.lineNumber),zt.lineNumber.appendChild(document.createTextNode(qn(re.options,Rt)))),vt=zt.node.nextSibling}Rt+=zt.size}for(;vt;)vt=Mt(vt)}function sh(re){var ce=re.gutters.offsetWidth;re.sizer.style.marginLeft=ce+"px"}function lh(re,ce){re.display.sizer.style.minHeight=ce.docHeight+"px",re.display.heightForcer.style.top=ce.docHeight+"px",re.display.gutters.style.height=ce.docHeight+re.display.barHeight+fo(re)+"px"}function td(re){var ce=re.display,Ee=ce.view;if(!(!ce.alignWidgets&&(!ce.gutters.firstChild||!re.options.fixedGutter))){for(var be=Du(ce)-ce.scroller.scrollLeft+re.doc.scrollLeft,Oe=ce.gutters.offsetWidth,qe=be+"px",vt=0;vt<Ee.length;vt++)if(!Ee[vt].hidden){re.options.fixedGutter&&(Ee[vt].gutter&&(Ee[vt].gutter.style.left=qe),Ee[vt].gutterBackground&&(Ee[vt].gutterBackground.style.left=qe));var Mt=Ee[vt].alignable;if(Mt)for(var kt=0;kt<Mt.length;kt++)Mt[kt].style.left=qe}re.options.fixedGutter&&(ce.gutters.style.left=be+Oe+"px")}}function Ca(re){if(!re.options.lineNumbers)return!1;var ce=re.doc,Ee=qn(re.options,ce.first+ce.size-1),be=re.display;if(Ee.length!=be.lineNumChars){var Oe=be.measure.appendChild(Ae("div",[Ae("div",Ee)],"CodeMirror-linenumber CodeMirror-gutter-elt")),qe=Oe.firstChild.offsetWidth,vt=Oe.offsetWidth-qe;return be.lineGutter.style.width="",be.lineNumInnerWidth=Math.max(qe,be.lineGutter.offsetWidth-vt)+1,be.lineNumWidth=be.lineNumInnerWidth+vt,be.lineNumChars=be.lineNumInnerWidth?Ee.length:-1,be.lineGutter.style.width=be.lineNumWidth+"px",sh(re.display),!0}return!1}function Ka(re,ce){for(var Ee=[],be=!1,Oe=0;Oe<re.length;Oe++){var qe=re[Oe],vt=null;if(typeof qe!="string"&&(vt=qe.style,qe=qe.className),qe=="CodeMirror-linenumbers")if(ce)be=!0;else continue;Ee.push({className:qe,style:vt})}return ce&&!be&&Ee.push({className:"CodeMirror-linenumbers",style:null}),Ee}function Uh(re){var ce=re.gutters,Ee=re.gutterSpecs;Fe(ce),re.lineGutter=null;for(var be=0;be<Ee.length;++be){var Oe=Ee[be],qe=Oe.className,vt=Oe.style,Mt=ce.appendChild(Ae("div",null,"CodeMirror-gutter "+qe));vt&&(Mt.style.cssText=vt),qe=="CodeMirror-linenumbers"&&(re.lineGutter=Mt,Mt.style.width=(re.lineNumWidth||1)+"px")}ce.style.display=Ee.length?"":"none",sh(re)}function il(re){Uh(re.display),Fo(re),td(re)}function uh(re,ce,Ee,be){var Oe=this;this.input=Ee,Oe.scrollbarFiller=Ae("div",null,"CodeMirror-scrollbar-filler"),Oe.scrollbarFiller.setAttribute("cm-not-content","true"),Oe.gutterFiller=Ae("div",null,"CodeMirror-gutter-filler"),Oe.gutterFiller.setAttribute("cm-not-content","true"),Oe.lineDiv=Re("div",null,"CodeMirror-code"),Oe.selectionDiv=Ae("div",null,null,"position: relative; z-index: 1"),Oe.cursorDiv=Ae("div",null,"CodeMirror-cursors"),Oe.measure=Ae("div",null,"CodeMirror-measure"),Oe.lineMeasure=Ae("div",null,"CodeMirror-measure"),Oe.lineSpace=Re("div",[Oe.measure,Oe.lineMeasure,Oe.selectionDiv,Oe.cursorDiv,Oe.lineDiv],null,"position: relative; outline: none");var qe=Re("div",[Oe.lineSpace],"CodeMirror-lines");Oe.mover=Ae("div",[qe],null,"position: relative"),Oe.sizer=Ae("div",[Oe.mover],"CodeMirror-sizer"),Oe.sizerWidth=null,Oe.heightForcer=Ae("div",null,null,"position: absolute; height: "+Pt+"px; width: 1px;"),Oe.gutters=Ae("div",null,"CodeMirror-gutters"),Oe.lineGutter=null,Oe.scroller=Ae("div",[Oe.sizer,Oe.heightForcer,Oe.gutters],"CodeMirror-scroll"),Oe.scroller.setAttribute("tabIndex","-1"),Oe.wrapper=Ae("div",[Oe.scrollbarFiller,Oe.gutterFiller,Oe.scroller],"CodeMirror"),De&&fe<8&&(Oe.gutters.style.zIndex=-1,Oe.scroller.style.paddingRight=0),!me&&!(pt&&ee)&&(Oe.scroller.draggable=!0),re&&(re.appendChild?re.appendChild(Oe.wrapper):re(Oe.wrapper)),Oe.viewFrom=Oe.viewTo=ce.first,Oe.reportedViewFrom=Oe.reportedViewTo=ce.first,Oe.view=[],Oe.renderedView=null,Oe.externalMeasured=null,Oe.viewOffset=0,Oe.lastWrapHeight=Oe.lastWrapWidth=0,Oe.updateLineNumbers=null,Oe.nativeBarWidth=Oe.barHeight=Oe.barWidth=0,Oe.scrollbarsClipped=!1,Oe.lineNumWidth=Oe.lineNumInnerWidth=Oe.lineNumChars=null,Oe.alignWidgets=!1,Oe.cachedCharWidth=Oe.cachedTextHeight=Oe.cachedPaddingH=null,Oe.maxLine=null,Oe.maxLineLength=0,Oe.maxLineChanged=!1,Oe.wheelDX=Oe.wheelDY=Oe.wheelStartX=Oe.wheelStartY=null,Oe.shift=!1,Oe.selForContextMenu=null,Oe.activeTouch=null,Oe.gutterSpecs=Ka(be.gutters,be.lineNumbers),Uh(Oe),Ee.init(Oe)}var Ws=0,ya=null;De?ya=-.53:pt?ya=15:Ce?ya=-.7:Me&&(ya=-1/3);function Zl(re){var ce=re.wheelDeltaX,Ee=re.wheelDeltaY;return ce==null&&re.detail&&re.axis==re.HORIZONTAL_AXIS&&(ce=re.detail),Ee==null&&re.detail&&re.axis==re.VERTICAL_AXIS?Ee=re.detail:Ee==null&&(Ee=re.wheelDelta),{x:ce,y:Ee}}function ol(re){var ce=Zl(re);return ce.x*=ya,ce.y*=ya,ce}function Va(re,ce){var Ee=Zl(ce),be=Ee.x,Oe=Ee.y,qe=re.display,vt=qe.scroller,Mt=vt.scrollWidth>vt.clientWidth,kt=vt.scrollHeight>vt.clientHeight;if(be&&Mt||Oe&&kt){if(Oe&&ae&&me){e:for(var Rt=ce.target,en=qe.view;Rt!=vt;Rt=Rt.parentNode)for(var zt=0;zt<en.length;zt++)if(en[zt].node==Rt){re.display.currentWheelTarget=Rt;break e}}if(be&&!pt&&!Se&&ya!=null){Oe&&kt&&Hl(re,Math.max(0,vt.scrollTop+Oe*ya)),Kl(re,Math.max(0,vt.scrollLeft+be*ya)),(!Oe||Oe&&kt)&&Vn(ce),qe.wheelStartX=null;return}if(Oe&&ya!=null){var wn=Oe*ya,gn=re.doc.scrollTop,rr=gn+qe.wrapper.clientHeight;wn<0?gn=Math.max(0,gn+wn-50):rr=Math.min(re.doc.height,rr+wn+50),ah(re,{top:gn,bottom:rr})}Ws<20&&(qe.wheelStartX==null?(qe.wheelStartX=vt.scrollLeft,qe.wheelStartY=vt.scrollTop,qe.wheelDX=be,qe.wheelDY=Oe,setTimeout(function(){if(qe.wheelStartX!=null){var sr=vt.scrollLeft-qe.wheelStartX,Sr=vt.scrollTop-qe.wheelStartY,Fr=Sr&&qe.wheelDY&&Sr/qe.wheelDY||sr&&qe.wheelDX&&sr/qe.wheelDX;qe.wheelStartX=qe.wheelStartY=null,Fr&&(ya=(ya*Ws+Fr)/(Ws+1),++Ws)}},200)):(qe.wheelDX+=be,qe.wheelDY+=Oe))}}var ml=function(re,ce){this.ranges=re,this.primIndex=ce};ml.prototype.primary=function(){return this.ranges[this.primIndex]},ml.prototype.equals=function(re){if(re==this)return!0;if(re.primIndex!=this.primIndex||re.ranges.length!=this.ranges.length)return!1;for(var ce=0;ce<this.ranges.length;ce++){var Ee=this.ranges[ce],be=re.ranges[ce];if(!Kn(Ee.anchor,be.anchor)||!Kn(Ee.head,be.head))return!1}return!0},ml.prototype.deepCopy=function(){for(var re=[],ce=0;ce<this.ranges.length;ce++)re[ce]=new To(On(this.ranges[ce].anchor),On(this.ranges[ce].head));return new ml(re,this.primIndex)},ml.prototype.somethingSelected=function(){for(var re=0;re<this.ranges.length;re++)if(!this.ranges[re].empty())return!0;return!1},ml.prototype.contains=function(re,ce){ce||(ce=re);for(var Ee=0;Ee<this.ranges.length;Ee++){var be=this.ranges[Ee];if(Un(ce,be.from())>=0&&Un(re,be.to())<=0)return Ee}return-1};var To=function(re,ce){this.anchor=re,this.head=ce};To.prototype.from=function(){return $n(this.anchor,this.head)},To.prototype.to=function(){return ur(this.anchor,this.head)},To.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function jl(re,ce,Ee){var be=re&&re.options.selectionsMayTouch,Oe=ce[Ee];ce.sort(function(wn,gn){return Un(wn.from(),gn.from())}),Ee=xt(ce,Oe);for(var qe=1;qe<ce.length;qe++){var vt=ce[qe],Mt=ce[qe-1],kt=Un(Mt.to(),vt.from());if(be&&!vt.empty()?kt>0:kt>=0){var Rt=$n(Mt.from(),vt.from()),en=ur(Mt.to(),vt.to()),zt=Mt.empty()?vt.from()==vt.head:Mt.from()==Mt.head;qe<=Ee&&--Ee,ce.splice(--qe,2,new To(zt?en:Rt,zt?Rt:en))}}return new ml(ce,Ee)}function Ru(re,ce){return new ml([new To(re,ce||re)],0)}function hh(re){return re.text?an(re.from.line+re.text.length-1,mt(re.text).length+(re.text.length==1?re.from.ch:0)):re.to}function Wh(re,ce){if(Un(re,ce.from)<0)return re;if(Un(re,ce.to)<=0)return hh(ce);var Ee=re.line+ce.text.length-(ce.to.line-ce.from.line)-1,be=re.ch;return re.line==ce.to.line&&(be+=hh(ce).ch-ce.to.ch),an(Ee,be)}function hf(re,ce){for(var Ee=[],be=0;be<re.sel.ranges.length;be++){var Oe=re.sel.ranges[be];Ee.push(new To(Wh(Oe.anchor,ce),Wh(Oe.head,ce)))}return jl(re.cm,Ee,re.sel.primIndex)}function Mc(re,ce,Ee){return re.line==ce.line?an(Ee.line,re.ch-ce.ch+Ee.ch):an(Ee.line+(re.line-ce.line),re.ch)}function cf(re,ce,Ee){for(var be=[],Oe=an(re.first,0),qe=Oe,vt=0;vt<ce.length;vt++){var Mt=ce[vt],kt=Mc(Mt.from,Oe,qe),Rt=Mc(hh(Mt),Oe,qe);if(Oe=Mt.to,qe=Rt,Ee=="around"){var en=re.sel.ranges[vt],zt=Un(en.head,en.anchor)<0;be[vt]=new To(zt?Rt:kt,zt?kt:Rt)}else be[vt]=new To(kt,kt)}return new ml(be,re.sel.primIndex)}function $i(re){re.doc.mode=on(re.options,re.doc.modeOption),ff(re)}function ff(re){re.doc.iter(function(ce){ce.stateAfter&&(ce.stateAfter=null),ce.styles&&(ce.styles=null)}),re.doc.modeFrontier=re.doc.highlightFrontier=re.doc.first,Tc(re,100),re.state.modeGen++,re.curOp&&Fo(re)}function up(re,ce){return ce.from.ch==0&&ce.to.ch==0&&mt(ce.text)==""&&(!re.cm||re.cm.options.wholeLineUpdateBefore)}function nd(re,ce,Ee,be){function Oe(Qr){return Ee?Ee[Qr]:null}function qe(Qr,Kr,ui){li(Qr,Kr,ui,be),Dr(Qr,"change",Qr,ce)}function vt(Qr,Kr){for(var ui=[],Ai=Qr;Ai<Kr;++Ai)ui.push(new ri(Rt[Ai],Oe(Ai),be));return ui}var Mt=ce.from,kt=ce.to,Rt=ce.text,en=er(re,Mt.line),zt=er(re,kt.line),wn=mt(Rt),gn=Oe(Rt.length-1),rr=kt.line-Mt.line;if(ce.full)re.insert(0,vt(0,Rt.length)),re.remove(Rt.length,re.size-Rt.length);else if(up(re,ce)){var sr=vt(0,Rt.length-1);qe(zt,zt.text,gn),rr&&re.remove(Mt.line,rr),sr.length&&re.insert(Mt.line,sr)}else if(en==zt)if(Rt.length==1)qe(en,en.text.slice(0,Mt.ch)+wn+en.text.slice(kt.ch),gn);else{var Sr=vt(1,Rt.length-1);Sr.push(new ri(wn+en.text.slice(kt.ch),gn,be)),qe(en,en.text.slice(0,Mt.ch)+Rt[0],Oe(0)),re.insert(Mt.line+1,Sr)}else if(Rt.length==1)qe(en,en.text.slice(0,Mt.ch)+Rt[0]+zt.text.slice(kt.ch),Oe(0)),re.remove(Mt.line+1,rr);else{qe(en,en.text.slice(0,Mt.ch)+Rt[0],Oe(0)),qe(zt,wn+zt.text.slice(kt.ch),gn);var Fr=vt(1,Rt.length-1);rr>1&&re.remove(Mt.line+1,rr-1),re.insert(Mt.line+1,Fr)}Dr(re,"change",re,ce)}function Xl(re,ce,Ee){function be(Oe,qe,vt){if(Oe.linked)for(var Mt=0;Mt<Oe.linked.length;++Mt){var kt=Oe.linked[Mt];if(kt.doc!=qe){var Rt=vt&&kt.sharedHist;Ee&&!Rt||(ce(kt.doc,Rt),be(kt.doc,Oe,Rt))}}}be(re,null,!0)}function rd(re,ce){if(ce.cm)throw new Error("This document is already in use.");re.doc=ce,ce.cm=re,fi(re),$i(re),df(re),re.options.lineWrapping||Zr(re),re.options.mode=ce.modeOption,Fo(re)}function df(re){(re.doc.direction=="rtl"?Ke:Be)(re.display.lineDiv,"CodeMirror-rtl")}function ev(re){So(re,function(){df(re),Fo(re)})}function Lc(re){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=re||1}function id(re,ce){var Ee={from:On(ce.from),to:hh(ce),text:rn(re,ce.from,ce.to)};return ch(re,Ee,ce.from.line,ce.to.line+1),Xl(re,function(be){return ch(be,Ee,ce.from.line,ce.to.line+1)},!0),Ee}function Nc(re){for(;re.length;){var ce=mt(re);if(ce.ranges)re.pop();else break}}function pf(re,ce){if(ce)return Nc(re.done),mt(re.done);if(re.done.length&&!mt(re.done).ranges)return mt(re.done);if(re.done.length>1&&!re.done[re.done.length-2].ranges)return re.done.pop(),mt(re.done)}function gf(re,ce,Ee,be){var Oe=re.history;Oe.undone.length=0;var qe=+new Date,vt,Mt;if((Oe.lastOp==be||Oe.lastOrigin==ce.origin&&ce.origin&&(ce.origin.charAt(0)=="+"&&Oe.lastModTime>qe-(re.cm?re.cm.options.historyEventDelay:500)||ce.origin.charAt(0)=="*"))&&(vt=pf(Oe,Oe.lastOp==be)))Mt=mt(vt.changes),Un(ce.from,ce.to)==0&&Un(ce.from,Mt.to)==0?Mt.to=hh(ce):vt.changes.push(id(re,ce));else{var kt=mt(Oe.done);for((!kt||!kt.ranges)&&Ac(re.sel,Oe.done),vt={changes:[id(re,ce)],generation:Oe.generation},Oe.done.push(vt);Oe.done.length>Oe.undoDepth;)Oe.done.shift(),Oe.done[0].ranges||Oe.done.shift()}Oe.done.push(Ee),Oe.generation=++Oe.maxGeneration,Oe.lastModTime=Oe.lastSelTime=qe,Oe.lastOp=Oe.lastSelOp=be,Oe.lastOrigin=Oe.lastSelOrigin=ce.origin,Mt||tn(re,"historyAdded")}function hp(re,ce,Ee,be){var Oe=ce.charAt(0);return Oe=="*"||Oe=="+"&&Ee.ranges.length==be.ranges.length&&Ee.somethingSelected()==be.somethingSelected()&&new Date-re.history.lastSelTime<=(re.cm?re.cm.options.historyEventDelay:500)}function mf(re,ce,Ee,be){var Oe=re.history,qe=be&&be.origin;Ee==Oe.lastSelOp||qe&&Oe.lastSelOrigin==qe&&(Oe.lastModTime==Oe.lastSelTime&&Oe.lastOrigin==qe||hp(re,qe,mt(Oe.done),ce))?Oe.done[Oe.done.length-1]=ce:Ac(ce,Oe.done),Oe.lastSelTime=+new Date,Oe.lastSelOrigin=qe,Oe.lastSelOp=Ee,be&&be.clearRedo!==!1&&Nc(Oe.undone)}function Ac(re,ce){var Ee=mt(ce);Ee&&Ee.ranges&&Ee.equals(re)||ce.push(re)}function ch(re,ce,Ee,be){var Oe=ce["spans_"+re.id],qe=0;re.iter(Math.max(re.first,Ee),Math.min(re.first+re.size,be),function(vt){vt.markedSpans&&((Oe||(Oe=ce["spans_"+re.id]={}))[qe]=vt.markedSpans),++qe})}function Ps(re){if(!re)return null;for(var ce,Ee=0;Ee<re.length;++Ee)re[Ee].marker.explicitlyCleared?ce||(ce=re.slice(0,Ee)):ce&&ce.push(re[Ee]);return ce?ce.length?ce:null:re}function hu(re,ce){var Ee=ce["spans_"+re.id];if(!Ee)return null;for(var be=[],Oe=0;Oe<ce.text.length;++Oe)be.push(Ps(Ee[Oe]));return be}function od(re,ce){var Ee=hu(re,ce),be=ji(re,ce);if(!Ee)return be;if(!be)return Ee;for(var Oe=0;Oe<Ee.length;++Oe){var qe=Ee[Oe],vt=be[Oe];if(qe&&vt)e:for(var Mt=0;Mt<vt.length;++Mt){for(var kt=vt[Mt],Rt=0;Rt<qe.length;++Rt)if(qe[Rt].marker==kt.marker)continue e;qe.push(kt)}else vt&&(Ee[Oe]=vt)}return Ee}function _u(re,ce,Ee){for(var be=[],Oe=0;Oe<re.length;++Oe){var qe=re[Oe];if(qe.ranges){be.push(Ee?ml.prototype.deepCopy.call(qe):qe);continue}var vt=qe.changes,Mt=[];be.push({changes:Mt});for(var kt=0;kt<vt.length;++kt){var Rt=vt[kt],en=void 0;if(Mt.push({from:Rt.from,to:Rt.to,text:Rt.text}),ce)for(var zt in Rt)(en=zt.match(/^spans_(\d+)$/))&&xt(ce,Number(en[1]))>-1&&(mt(Mt)[zt]=Rt[zt],delete Rt[zt])}}return be}function ad(re,ce,Ee,be){if(be){var Oe=re.anchor;if(Ee){var qe=Un(ce,Oe)<0;qe!=Un(Ee,Oe)<0?(Oe=ce,ce=Ee):qe!=Un(ce,Ee)<0&&(ce=Ee)}return new To(Oe,ce)}else return new To(Ee||ce,ce)}function sd(re,ce,Ee,be,Oe){Oe==null&&(Oe=re.cm&&(re.cm.display.shift||re.extend)),ps(re,new ml([ad(re.sel.primary(),ce,Ee,Oe)],0),be)}function Gg(re,ce,Ee){for(var be=[],Oe=re.cm&&(re.cm.display.shift||re.extend),qe=0;qe<re.sel.ranges.length;qe++)be[qe]=ad(re.sel.ranges[qe],ce[qe],null,Oe);var vt=jl(re.cm,be,re.sel.primIndex);ps(re,vt,Ee)}function fh(re,ce,Ee,be){var Oe=re.sel.ranges.slice(0);Oe[ce]=Ee,ps(re,jl(re.cm,Oe,re.sel.primIndex),be)}function Hh(re,ce,Ee,be){ps(re,Ru(ce,Ee),be)}function Ug(re,ce,Ee){var be={ranges:ce.ranges,update:function(Oe){this.ranges=[];for(var qe=0;qe<Oe.length;qe++)this.ranges[qe]=new To(hr(re,Oe[qe].anchor),hr(re,Oe[qe].head))},origin:Ee&&Ee.origin};return tn(re,"beforeSelectionChange",re,be),re.cm&&tn(re.cm,"beforeSelectionChange",re.cm,be),be.ranges!=ce.ranges?jl(re.cm,be.ranges,be.ranges.length-1):ce}function ld(re,ce,Ee){var be=re.history.done,Oe=mt(be);Oe&&Oe.ranges?(be[be.length-1]=ce,Kh(re,ce,Ee)):ps(re,ce,Ee)}function ps(re,ce,Ee){Kh(re,ce,Ee),mf(re,re.sel,re.cm?re.cm.curOp.id:NaN,Ee)}function Kh(re,ce,Ee){(Pn(re,"beforeSelectionChange")||re.cm&&Pn(re.cm,"beforeSelectionChange"))&&(ce=Ug(re,ce,Ee));var be=Ee&&Ee.bias||(Un(ce.primary().head,re.sel.primary().head)<0?-1:1);cp(re,yf(re,ce,be,!0)),!(Ee&&Ee.scroll===!1)&&re.cm&&Nl(re.cm)}function cp(re,ce){ce.equals(re.sel)||(re.sel=ce,re.cm&&(re.cm.curOp.updateInput=1,re.cm.curOp.selectionChanged=!0,En(re.cm)),Dr(re,"cursorActivity",re))}function vf(re){cp(re,yf(re,re.sel,null,!1))}function yf(re,ce,Ee,be){for(var Oe,qe=0;qe<ce.ranges.length;qe++){var vt=ce.ranges[qe],Mt=ce.ranges.length==re.sel.ranges.length&&re.sel.ranges[qe],kt=Sf(re,vt.anchor,Mt&&Mt.anchor,Ee,be),Rt=Sf(re,vt.head,Mt&&Mt.head,Ee,be);(Oe||kt!=vt.anchor||Rt!=vt.head)&&(Oe||(Oe=ce.ranges.slice(0,qe)),Oe[qe]=new To(kt,Rt))}return Oe?jl(re.cm,Oe,ce.primIndex):ce}function zu(re,ce,Ee,be,Oe){var qe=er(re,ce.line);if(qe.markedSpans)for(var vt=0;vt<qe.markedSpans.length;++vt){var Mt=qe.markedSpans[vt],kt=Mt.marker,Rt="selectLeft"in kt?!kt.selectLeft:kt.inclusiveLeft,en="selectRight"in kt?!kt.selectRight:kt.inclusiveRight;if((Mt.from==null||(Rt?Mt.from<=ce.ch:Mt.from<ce.ch))&&(Mt.to==null||(en?Mt.to>=ce.ch:Mt.to>ce.ch))){if(Oe&&(tn(kt,"beforeCursorEnter"),kt.explicitlyCleared))if(qe.markedSpans){--vt;continue}else break;if(!kt.atomic)continue;if(Ee){var zt=kt.find(be<0?1:-1),wn=void 0;if((be<0?en:Rt)&&(zt=fp(re,zt,-be,zt&&zt.line==ce.line?qe:null)),zt&&zt.line==ce.line&&(wn=Un(zt,Ee))&&(be<0?wn<0:wn>0))return zu(re,zt,ce,be,Oe)}var gn=kt.find(be<0?-1:1);return(be<0?Rt:en)&&(gn=fp(re,gn,be,gn.line==ce.line?qe:null)),gn?zu(re,gn,ce,be,Oe):null}}return ce}function Sf(re,ce,Ee,be,Oe){var qe=be||1,vt=zu(re,ce,Ee,qe,Oe)||!Oe&&zu(re,ce,Ee,qe,!0)||zu(re,ce,Ee,-qe,Oe)||!Oe&&zu(re,ce,Ee,-qe,!0);return vt||(re.cantEdit=!0,an(re.first,0))}function fp(re,ce,Ee,be){return Ee<0&&ce.ch==0?ce.line>re.first?hr(re,an(ce.line-1)):null:Ee>0&&ce.ch==(be||er(re,ce.line)).text.length?ce.line<re.first+re.size-1?an(ce.line+1,0):null:new an(ce.line,ce.ch+Ee)}function Sa(re){re.setSelection(an(re.firstLine(),0),an(re.lastLine()),gt)}function xf(re,ce,Ee){var be={canceled:!1,from:ce.from,to:ce.to,text:ce.text,origin:ce.origin,cancel:function(){return be.canceled=!0}};return Ee&&(be.update=function(Oe,qe,vt,Mt){Oe&&(be.from=hr(re,Oe)),qe&&(be.to=hr(re,qe)),vt&&(be.text=vt),Mt!==void 0&&(be.origin=Mt)}),tn(re,"beforeChange",re,be),re.cm&&tn(re.cm,"beforeChange",re.cm,be),be.canceled?(re.cm&&(re.cm.curOp.updateInput=2),null):{from:be.from,to:be.to,text:be.text,origin:be.origin}}function dh(re,ce,Ee){if(re.cm){if(!re.cm.curOp)return Da(re.cm,dh)(re,ce,Ee);if(re.cm.state.suppressEdits)return}if(!((Pn(re,"beforeChange")||re.cm&&Pn(re.cm,"beforeChange"))&&(ce=xf(re,ce,!0),!ce))){var be=ai&&!Ee&&Sn(re,ce.from,ce.to);if(be)for(var Oe=be.length-1;Oe>=0;--Oe)Vh(re,{from:be[Oe].from,to:be[Oe].to,text:Oe?[""]:ce.text,origin:ce.origin});else Vh(re,ce)}}function Vh(re,ce){if(!(ce.text.length==1&&ce.text[0]==""&&Un(ce.from,ce.to)==0)){var Ee=hf(re,ce);gf(re,ce,Ee,re.cm?re.cm.curOp.id:NaN),jc(re,ce,Ee,ji(re,ce));var be=[];Xl(re,function(Oe,qe){!qe&&xt(be,Oe.history)==-1&&(pp(Oe.history,ce),be.push(Oe.history)),jc(Oe,ce,null,ji(Oe,ce))})}}function wf(re,ce,Ee){var be=re.cm&&re.cm.state.suppressEdits;if(!(be&&!Ee)){for(var Oe=re.history,qe,vt=re.sel,Mt=ce=="undo"?Oe.done:Oe.undone,kt=ce=="undo"?Oe.undone:Oe.done,Rt=0;Rt<Mt.length&&(qe=Mt[Rt],!(Ee?qe.ranges&&!qe.equals(re.sel):!qe.ranges));Rt++);if(Rt!=Mt.length){for(Oe.lastOrigin=Oe.lastSelOrigin=null;;)if(qe=Mt.pop(),qe.ranges){if(Ac(qe,kt),Ee&&!qe.equals(re.sel)){ps(re,qe,{clearRedo:!1});return}vt=qe}else if(be){Mt.push(qe);return}else break;var en=[];Ac(vt,kt),kt.push({changes:en,generation:Oe.generation}),Oe.generation=qe.generation||++Oe.maxGeneration;for(var zt=Pn(re,"beforeChange")||re.cm&&Pn(re.cm,"beforeChange"),wn=function(sr){var Sr=qe.changes[sr];if(Sr.origin=ce,zt&&!xf(re,Sr,!1))return Mt.length=0,{};en.push(id(re,Sr));var Fr=sr?hf(re,Sr):mt(Mt);jc(re,Sr,Fr,od(re,Sr)),!sr&&re.cm&&re.cm.scrollIntoView({from:Sr.from,to:hh(Sr)});var Qr=[];Xl(re,function(Kr,ui){!ui&&xt(Qr,Kr.history)==-1&&(pp(Kr.history,Sr),Qr.push(Kr.history)),jc(Kr,Sr,null,od(Kr,Sr))})},gn=qe.changes.length-1;gn>=0;--gn){var rr=wn(gn);if(rr)return rr.v}}}}function dp(re,ce){if(ce!=0&&(re.first+=ce,re.sel=new ml(yt(re.sel.ranges,function(Oe){return new To(an(Oe.anchor.line+ce,Oe.anchor.ch),an(Oe.head.line+ce,Oe.head.ch))}),re.sel.primIndex),re.cm)){Fo(re.cm,re.first,re.first-ce,ce);for(var Ee=re.cm.display,be=Ee.viewFrom;be<Ee.viewTo;be++)Ri(re.cm,be,"gutter")}}function jc(re,ce,Ee,be){if(re.cm&&!re.cm.curOp)return Da(re.cm,jc)(re,ce,Ee,be);if(ce.to.line<re.first){dp(re,ce.text.length-1-(ce.to.line-ce.from.line));return}if(!(ce.from.line>re.lastLine())){if(ce.from.line<re.first){var Oe=ce.text.length-1-(re.first-ce.from.line);dp(re,Oe),ce={from:an(re.first,0),to:an(ce.to.line+Oe,ce.to.ch),text:[mt(ce.text)],origin:ce.origin}}var qe=re.lastLine();ce.to.line>qe&&(ce={from:ce.from,to:an(qe,er(re,qe).text.length),text:[ce.text[0]],origin:ce.origin}),ce.removed=rn(re,ce.from,ce.to),Ee||(Ee=hf(re,ce)),re.cm?Wg(re.cm,ce,be):nd(re,ce,be),Kh(re,Ee,gt),re.cantEdit&&Sf(re,an(re.firstLine(),0))&&(re.cantEdit=!1)}}function Wg(re,ce,Ee){var be=re.doc,Oe=re.display,qe=ce.from,vt=ce.to,Mt=!1,kt=qe.line;re.options.lineWrapping||(kt=Ot(Gn(er(be,qe.line))),be.iter(kt,vt.line+1,function(gn){if(gn==Oe.maxLine)return Mt=!0,!0})),be.sel.contains(ce.from,ce.to)>-1&&En(re),nd(be,ce,Ee,Oo(re)),re.options.lineWrapping||(be.iter(kt,qe.line+ce.text.length,function(gn){var rr=ei(gn);rr>Oe.maxLineLength&&(Oe.maxLine=gn,Oe.maxLineLength=rr,Oe.maxLineChanged=!0,Mt=!1)}),Mt&&(re.curOp.updateMaxLine=!0)),ni(be,qe.line),Tc(re,400);var Rt=ce.text.length-(vt.line-qe.line)-1;ce.full?Fo(re):qe.line==vt.line&&ce.text.length==1&&!up(re.doc,ce)?Ri(re,qe.line,"text"):Fo(re,qe.line,vt.line+1,Rt);var en=Pn(re,"changes"),zt=Pn(re,"change");if(zt||en){var wn={from:qe,to:vt,text:ce.text,removed:ce.removed,origin:ce.origin};zt&&Dr(re,"change",re,wn),en&&(re.curOp.changeObjs||(re.curOp.changeObjs=[])).push(wn)}re.display.selForContextMenu=null}function Zh(re,ce,Ee,be,Oe){var qe;be||(be=Ee),Un(be,Ee)<0&&(qe=[be,Ee],Ee=qe[0],be=qe[1]),typeof ce=="string"&&(ce=re.splitLines(ce)),dh(re,{from:Ee,to:be,text:ce,origin:Oe})}function vl(re,ce,Ee,be){Ee<re.line?re.line+=be:ce<re.line&&(re.line=ce,re.ch=0)}function Hg(re,ce,Ee,be){for(var Oe=0;Oe<re.length;++Oe){var qe=re[Oe],vt=!0;if(qe.ranges){qe.copied||(qe=re[Oe]=qe.deepCopy(),qe.copied=!0);for(var Mt=0;Mt<qe.ranges.length;Mt++)vl(qe.ranges[Mt].anchor,ce,Ee,be),vl(qe.ranges[Mt].head,ce,Ee,be);continue}for(var kt=0;kt<qe.changes.length;++kt){var Rt=qe.changes[kt];if(Ee<Rt.from.line)Rt.from=an(Rt.from.line+be,Rt.from.ch),Rt.to=an(Rt.to.line+be,Rt.to.ch);else if(ce<=Rt.to.line){vt=!1;break}}vt||(re.splice(0,Oe+1),Oe=0)}}function pp(re,ce){var Ee=ce.from.line,be=ce.to.line,Oe=ce.text.length-(be-Ee)-1;Hg(re.done,Ee,be,Oe),Hg(re.undone,Ee,be,Oe)}function Xh(re,ce,Ee,be){var Oe=ce,qe=ce;return typeof ce=="number"?qe=er(re,Wn(re,ce)):Oe=Ot(ce),Oe==null?null:(be(qe,Oe)&&re.cm&&Ri(re.cm,Oe,Ee),qe)}function Oc(re){this.lines=re,this.parent=null;for(var ce=0,Ee=0;Ee<re.length;++Ee)re[Ee].parent=this,ce+=re[Ee].height;this.height=ce}Oc.prototype={chunkSize:function(){return this.lines.length},removeInner:function(re,ce){for(var Ee=re,be=re+ce;Ee<be;++Ee){var Oe=this.lines[Ee];this.height-=Oe.height,ii(Oe),Dr(Oe,"delete")}this.lines.splice(re,ce)},collapse:function(re){re.push.apply(re,this.lines)},insertInner:function(re,ce,Ee){this.height+=Ee,this.lines=this.lines.slice(0,re).concat(ce).concat(this.lines.slice(re));for(var be=0;be<ce.length;++be)ce[be].parent=this},iterN:function(re,ce,Ee){for(var be=re+ce;re<be;++re)if(Ee(this.lines[re]))return!0}};function ra(re){this.children=re;for(var ce=0,Ee=0,be=0;be<re.length;++be){var Oe=re[be];ce+=Oe.chunkSize(),Ee+=Oe.height,Oe.parent=this}this.size=ce,this.height=Ee,this.parent=null}ra.prototype={chunkSize:function(){return this.size},removeInner:function(re,ce){this.size-=ce;for(var Ee=0;Ee<this.children.length;++Ee){var be=this.children[Ee],Oe=be.chunkSize();if(re<Oe){var qe=Math.min(ce,Oe-re),vt=be.height;if(be.removeInner(re,qe),this.height-=vt-be.height,Oe==qe&&(this.children.splice(Ee--,1),be.parent=null),(ce-=qe)==0)break;re=0}else re-=Oe}if(this.size-ce<25&&(this.children.length>1||!(this.children[0]instanceof Oc))){var Mt=[];this.collapse(Mt),this.children=[new Oc(Mt)],this.children[0].parent=this}},collapse:function(re){for(var ce=0;ce<this.children.length;++ce)this.children[ce].collapse(re)},insertInner:function(re,ce,Ee){this.size+=ce.length,this.height+=Ee;for(var be=0;be<this.children.length;++be){var Oe=this.children[be],qe=Oe.chunkSize();if(re<=qe){if(Oe.insertInner(re,ce,Ee),Oe.lines&&Oe.lines.length>50){for(var vt=Oe.lines.length%25+25,Mt=vt;Mt<Oe.lines.length;){var kt=new Oc(Oe.lines.slice(Mt,Mt+=25));Oe.height-=kt.height,this.children.splice(++be,0,kt),kt.parent=this}Oe.lines=Oe.lines.slice(0,vt),this.maybeSpill()}break}re-=qe}},maybeSpill:function(){if(!(this.children.length<=10)){var re=this;do{var ce=re.children.splice(re.children.length-5,5),Ee=new ra(ce);if(re.parent){re.size-=Ee.size,re.height-=Ee.height;var Oe=xt(re.parent.children,re);re.parent.children.splice(Oe+1,0,Ee)}else{var be=new ra(re.children);be.parent=re,re.children=[be,Ee],re=be}Ee.parent=re.parent}while(re.children.length>10);re.parent.maybeSpill()}},iterN:function(re,ce,Ee){for(var be=0;be<this.children.length;++be){var Oe=this.children[be],qe=Oe.chunkSize();if(re<qe){var vt=Math.min(ce,qe-re);if(Oe.iterN(re,vt,Ee))return!0;if((ce-=vt)==0)break;re=0}else re-=qe}}};var Gu=function(re,ce,Ee){if(Ee)for(var be in Ee)Ee.hasOwnProperty(be)&&(this[be]=Ee[be]);this.doc=re,this.node=ce};Gu.prototype.clear=function(){var re=this.doc.cm,ce=this.line.widgets,Ee=this.line,be=Ot(Ee);if(!(be==null||!ce)){for(var Oe=0;Oe<ce.length;++Oe)ce[Oe]==this&&ce.splice(Oe--,1);ce.length||(Ee.widgets=null);var qe=Ko(this);Qn(Ee,Math.max(0,Ee.height-qe)),re&&(So(re,function(){Kg(re,Ee,-qe),Ri(re,be,"widget")}),Dr(re,"lineWidgetCleared",re,this,be))}},Gu.prototype.changed=function(){var re=this,ce=this.height,Ee=this.doc.cm,be=this.line;this.height=null;var Oe=Ko(this)-ce;Oe&&(fn(this.doc,be)||Qn(be,be.height+Oe),Ee&&So(Ee,function(){Ee.curOp.forceUpdate=!0,Kg(Ee,be,Oe),Dr(Ee,"lineWidgetChanged",Ee,re,Ot(be))}))},Ln(Gu);function Kg(re,ce,Ee){kr(ce)<(re.curOp&&re.curOp.scrollTop||re.doc.scrollTop)&&_h(re,Ee)}function ud(re,ce,Ee,be){var Oe=new Gu(re,Ee,be),qe=re.cm;return qe&&Oe.noHScroll&&(qe.display.alignWidgets=!0),Xh(re,ce,"widget",function(vt){var Mt=vt.widgets||(vt.widgets=[]);if(Oe.insertAt==null?Mt.push(Oe):Mt.splice(Math.min(Mt.length-1,Math.max(0,Oe.insertAt)),0,Oe),Oe.line=vt,qe&&!fn(re,vt)){var kt=kr(vt)<re.scrollTop;Qn(vt,vt.height+Ko(Oe)),kt&&_h(qe,Oe.height),qe.curOp.forceUpdate=!0}return!0}),qe&&Dr(qe,"lineWidgetAdded",qe,Oe,typeof ce=="number"?ce:Ot(ce)),Oe}var Vg=0,Vt=function(re,ce){this.lines=[],this.type=ce,this.doc=re,this.id=++Vg};Vt.prototype.clear=function(){if(!this.explicitlyCleared){var re=this.doc.cm,ce=re&&!re.curOp;if(ce&&rl(re),Pn(this,"clear")){var Ee=this.find();Ee&&Dr(this,"clear",Ee.from,Ee.to)}for(var be=null,Oe=null,qe=0;qe<this.lines.length;++qe){var vt=this.lines[qe],Mt=Nr(vt.markedSpans,this);re&&!this.collapsed?Ri(re,Ot(vt),"text"):re&&(Mt.to!=null&&(Oe=Ot(vt)),Mt.from!=null&&(be=Ot(vt))),vt.markedSpans=Yr(vt.markedSpans,Mt),Mt.from==null&&this.collapsed&&!fn(this.doc,vt)&&re&&Qn(vt,Us(re.display))}if(re&&this.collapsed&&!re.options.lineWrapping)for(var kt=0;kt<this.lines.length;++kt){var Rt=Gn(this.lines[kt]),en=ei(Rt);en>re.display.maxLineLength&&(re.display.maxLine=Rt,re.display.maxLineLength=en,re.display.maxLineChanged=!0)}be!=null&&re&&this.collapsed&&Fo(re,be,Oe+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,re&&vf(re.doc)),re&&Dr(re,"markerCleared",re,this,be,Oe),ce&&Al(re),this.parent&&this.parent.clear()}},Vt.prototype.find=function(re,ce){re==null&&this.type=="bookmark"&&(re=1);for(var Ee,be,Oe=0;Oe<this.lines.length;++Oe){var qe=this.lines[Oe],vt=Nr(qe.markedSpans,this);if(vt.from!=null&&(Ee=an(ce?qe:Ot(qe),vt.from),re==-1))return Ee;if(vt.to!=null&&(be=an(ce?qe:Ot(qe),vt.to),re==1))return be}return Ee&&{from:Ee,to:be}},Vt.prototype.changed=function(){var re=this,ce=this.find(-1,!0),Ee=this,be=this.doc.cm;!ce||!be||So(be,function(){var Oe=ce.line,qe=Ot(ce.line),vt=Nu(be,qe);if(vt&&(rh(vt),be.curOp.selectionChanged=be.curOp.forceUpdate=!0),be.curOp.updateMaxLine=!0,!fn(Ee.doc,Oe)&&Ee.height!=null){var Mt=Ee.height;Ee.height=null;var kt=Ko(Ee)-Mt;kt&&Qn(Oe,Oe.height+kt)}Dr(be,"markerChanged",be,re)})},Vt.prototype.attachLine=function(re){if(!this.lines.length&&this.doc.cm){var ce=this.doc.cm.curOp;(!ce.maybeHiddenMarkers||xt(ce.maybeHiddenMarkers,this)==-1)&&(ce.maybeUnhiddenMarkers||(ce.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(re)},Vt.prototype.detachLine=function(re){if(this.lines.splice(xt(this.lines,re),1),!this.lines.length&&this.doc.cm){var ce=this.doc.cm.curOp;(ce.maybeHiddenMarkers||(ce.maybeHiddenMarkers=[])).push(this)}},Ln(Vt);function Yh(re,ce,Ee,be,Oe){if(be&&be.shared)return Zg(re,ce,Ee,be,Oe);if(re.cm&&!re.cm.curOp)return Da(re.cm,Yh)(re,ce,Ee,be,Oe);var qe=new Vt(re,Oe),vt=Un(ce,Ee);if(be&&wt(be,qe,!1),vt>0||vt==0&&qe.clearWhenEmpty!==!1)return qe;if(qe.replacedWith&&(qe.collapsed=!0,qe.widgetNode=Re("span",[qe.replacedWith],"CodeMirror-widget"),be.handleMouseEvents||qe.widgetNode.setAttribute("cm-ignore-events","true"),be.insertLeft&&(qe.widgetNode.insertLeft=!0)),qe.collapsed){if(Dn(re,ce.line,ce,Ee,qe)||ce.line!=Ee.line&&Dn(re,Ee.line,ce,Ee,qe))throw new Error("Inserting collapsed marker partially overlapping an existing one");xn()}qe.addToHistory&&gf(re,{from:ce,to:Ee,origin:"markText"},re.sel,NaN);var Mt=ce.line,kt=re.cm,Rt;if(re.iter(Mt,Ee.line+1,function(zt){kt&&qe.collapsed&&!kt.options.lineWrapping&&Gn(zt)==kt.display.maxLine&&(Rt=!0),qe.collapsed&&Mt!=ce.line&&Qn(zt,0),Zi(zt,new yr(qe,Mt==ce.line?ce.ch:null,Mt==Ee.line?Ee.ch:null)),++Mt}),qe.collapsed&&re.iter(ce.line,Ee.line+1,function(zt){fn(re,zt)&&Qn(zt,0)}),qe.clearOnEnter&&$t(qe,"beforeCursorEnter",function(){return qe.clear()}),qe.readOnly&&(Ci(),(re.history.done.length||re.history.undone.length)&&re.clearHistory()),qe.collapsed&&(qe.id=++Vg,qe.atomic=!0),kt){if(Rt&&(kt.curOp.updateMaxLine=!0),qe.collapsed)Fo(kt,ce.line,Ee.line+1);else if(qe.className||qe.startStyle||qe.endStyle||qe.css||qe.attributes||qe.title)for(var en=ce.line;en<=Ee.line;en++)Ri(kt,en,"text");qe.atomic&&vf(kt.doc),Dr(kt,"markerAdded",kt,qe)}return qe}var cu=function(re,ce){this.markers=re,this.primary=ce;for(var Ee=0;Ee<re.length;++Ee)re[Ee].parent=this};cu.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var re=0;re<this.markers.length;++re)this.markers[re].clear();Dr(this,"clear")}},cu.prototype.find=function(re,ce){return this.primary.find(re,ce)},Ln(cu);function Zg(re,ce,Ee,be,Oe){be=wt(be),be.shared=!1;var qe=[Yh(re,ce,Ee,be,Oe)],vt=qe[0],Mt=be.widgetNode;return Xl(re,function(kt){Mt&&(be.widgetNode=Mt.cloneNode(!0)),qe.push(Yh(kt,hr(kt,ce),hr(kt,Ee),be,Oe));for(var Rt=0;Rt<kt.linked.length;++Rt)if(kt.linked[Rt].isParent)return;vt=mt(qe)}),new cu(qe,vt)}function gp(re){return re.findMarks(an(re.first,0),re.clipPos(an(re.lastLine())),function(ce){return ce.parent})}function Xg(re,ce){for(var Ee=0;Ee<ce.length;Ee++){var be=ce[Ee],Oe=be.find(),qe=re.clipPos(Oe.from),vt=re.clipPos(Oe.to);if(Un(qe,vt)){var Mt=Yh(re,qe,vt,be.primary,be.primary.type);be.markers.push(Mt),Mt.parent=be}}}function mp(re){for(var ce=function(be){var Oe=re[be],qe=[Oe.primary.doc];Xl(Oe.primary.doc,function(kt){return qe.push(kt)});for(var vt=0;vt<Oe.markers.length;vt++){var Mt=Oe.markers[vt];xt(qe,Mt.doc)==-1&&(Mt.parent=null,Oe.markers.splice(vt--,1))}},Ee=0;Ee<re.length;Ee++)ce(Ee)}var tv=0,as=function(re,ce,Ee,be,Oe){if(!(this instanceof as))return new as(re,ce,Ee,be,Oe);Ee==null&&(Ee=0),ra.call(this,[new Oc([new ri("",null)])]),this.first=Ee,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=Ee;var qe=an(Ee,0);this.sel=Ru(qe),this.history=new Lc(null),this.id=++tv,this.modeOption=ce,this.lineSep=be,this.direction=Oe=="rtl"?"rtl":"ltr",this.extend=!1,typeof re=="string"&&(re=this.splitLines(re)),nd(this,{from:qe,to:qe,text:re}),ps(this,Ru(qe),gt)};as.prototype=xe(ra.prototype,{constructor:as,iter:function(re,ce,Ee){Ee?this.iterN(re-this.first,ce-re,Ee):this.iterN(this.first,this.first+this.size,re)},insert:function(re,ce){for(var Ee=0,be=0;be<ce.length;++be)Ee+=ce[be].height;this.insertInner(re-this.first,ce,Ee)},remove:function(re,ce){this.removeInner(re-this.first,ce)},getValue:function(re){var ce=qt(this,this.first,this.first+this.size);return re===!1?ce:ce.join(re||this.lineSeparator())},setValue:Wa(function(re){var ce=an(this.first,0),Ee=this.first+this.size-1;dh(this,{from:ce,to:an(Ee,er(this,Ee).text.length),text:this.splitLines(re),origin:"setValue",full:!0},!0),this.cm&&Iu(this.cm,0,0),ps(this,Ru(ce),gt)}),replaceRange:function(re,ce,Ee,be){ce=hr(this,ce),Ee=Ee?hr(this,Ee):ce,Zh(this,re,ce,Ee,be)},getRange:function(re,ce,Ee){var be=rn(this,hr(this,re),hr(this,ce));return Ee===!1?be:be.join(Ee||this.lineSeparator())},getLine:function(re){var ce=this.getLineHandle(re);return ce&&ce.text},getLineHandle:function(re){if(_n(this,re))return er(this,re)},getLineNumber:function(re){return Ot(re)},getLineHandleVisualStart:function(re){return typeof re=="number"&&(re=er(this,re)),Gn(re)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(re){return hr(this,re)},getCursor:function(re){var ce=this.sel.primary(),Ee;return re==null||re=="head"?Ee=ce.head:re=="anchor"?Ee=ce.anchor:re=="end"||re=="to"||re===!1?Ee=ce.to():Ee=ce.from(),Ee},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Wa(function(re,ce,Ee){Hh(this,hr(this,typeof re=="number"?an(re,ce||0):re),null,Ee)}),setSelection:Wa(function(re,ce,Ee){Hh(this,hr(this,re),hr(this,ce||re),Ee)}),extendSelection:Wa(function(re,ce,Ee){sd(this,hr(this,re),ce&&hr(this,ce),Ee)}),extendSelections:Wa(function(re,ce){Gg(this,br(this,re),ce)}),extendSelectionsBy:Wa(function(re,ce){var Ee=yt(this.sel.ranges,re);Gg(this,br(this,Ee),ce)}),setSelections:Wa(function(re,ce,Ee){if(re.length){for(var be=[],Oe=0;Oe<re.length;Oe++)be[Oe]=new To(hr(this,re[Oe].anchor),hr(this,re[Oe].head));ce==null&&(ce=Math.min(re.length-1,this.sel.primIndex)),ps(this,jl(this.cm,be,ce),Ee)}}),addSelection:Wa(function(re,ce,Ee){var be=this.sel.ranges.slice(0);be.push(new To(hr(this,re),hr(this,ce||re))),ps(this,jl(this.cm,be,be.length-1),Ee)}),getSelection:function(re){for(var ce=this.sel.ranges,Ee,be=0;be<ce.length;be++){var Oe=rn(this,ce[be].from(),ce[be].to());Ee=Ee?Ee.concat(Oe):Oe}return re===!1?Ee:Ee.join(re||this.lineSeparator())},getSelections:function(re){for(var ce=[],Ee=this.sel.ranges,be=0;be<Ee.length;be++){var Oe=rn(this,Ee[be].from(),Ee[be].to());re!==!1&&(Oe=Oe.join(re||this.lineSeparator())),ce[be]=Oe}return ce},replaceSelection:function(re,ce,Ee){for(var be=[],Oe=0;Oe<this.sel.ranges.length;Oe++)be[Oe]=re;this.replaceSelections(be,ce,Ee||"+input")},replaceSelections:Wa(function(re,ce,Ee){for(var be=[],Oe=this.sel,qe=0;qe<Oe.ranges.length;qe++){var vt=Oe.ranges[qe];be[qe]={from:vt.from(),to:vt.to(),text:this.splitLines(re[qe]),origin:Ee}}for(var Mt=ce&&ce!="end"&&cf(this,be,ce),kt=be.length-1;kt>=0;kt--)dh(this,be[kt]);Mt?ld(this,Mt):this.cm&&Nl(this.cm)}),undo:Wa(function(){wf(this,"undo")}),redo:Wa(function(){wf(this,"redo")}),undoSelection:Wa(function(){wf(this,"undo",!0)}),redoSelection:Wa(function(){wf(this,"redo",!0)}),setExtending:function(re){this.extend=re},getExtending:function(){return this.extend},historySize:function(){for(var re=this.history,ce=0,Ee=0,be=0;be<re.done.length;be++)re.done[be].ranges||++ce;for(var Oe=0;Oe<re.undone.length;Oe++)re.undone[Oe].ranges||++Ee;return{undo:ce,redo:Ee}},clearHistory:function(){var re=this;this.history=new Lc(this.history.maxGeneration),Xl(this,function(ce){return ce.history=re.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(re){return re&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(re){return this.history.generation==(re||this.cleanGeneration)},getHistory:function(){return{done:_u(this.history.done),undone:_u(this.history.undone)}},setHistory:function(re){var ce=this.history=new Lc(this.history.maxGeneration);ce.done=_u(re.done.slice(0),null,!0),ce.undone=_u(re.undone.slice(0),null,!0)},setGutterMarker:Wa(function(re,ce,Ee){return Xh(this,re,"gutter",function(be){var Oe=be.gutterMarkers||(be.gutterMarkers={});return Oe[ce]=Ee,!Ee&&Ie(Oe)&&(be.gutterMarkers=null),!0})}),clearGutter:Wa(function(re){var ce=this;this.iter(function(Ee){Ee.gutterMarkers&&Ee.gutterMarkers[re]&&Xh(ce,Ee,"gutter",function(){return Ee.gutterMarkers[re]=null,Ie(Ee.gutterMarkers)&&(Ee.gutterMarkers=null),!0})})}),lineInfo:function(re){var ce;if(typeof re=="number"){if(!_n(this,re)||(ce=re,re=er(this,re),!re))return null}else if(ce=Ot(re),ce==null)return null;return{line:ce,handle:re,text:re.text,gutterMarkers:re.gutterMarkers,textClass:re.textClass,bgClass:re.bgClass,wrapClass:re.wrapClass,widgets:re.widgets}},addLineClass:Wa(function(re,ce,Ee){return Xh(this,re,ce=="gutter"?"gutter":"class",function(be){var Oe=ce=="text"?"textClass":ce=="background"?"bgClass":ce=="gutter"?"gutterClass":"wrapClass";if(!be[Oe])be[Oe]=Ee;else{if(je(Ee).test(be[Oe]))return!1;be[Oe]+=" "+Ee}return!0})}),removeLineClass:Wa(function(re,ce,Ee){return Xh(this,re,ce=="gutter"?"gutter":"class",function(be){var Oe=ce=="text"?"textClass":ce=="background"?"bgClass":ce=="gutter"?"gutterClass":"wrapClass",qe=be[Oe];if(qe)if(Ee==null)be[Oe]=null;else{var vt=qe.match(je(Ee));if(!vt)return!1;var Mt=vt.index+vt[0].length;be[Oe]=qe.slice(0,vt.index)+(!vt.index||Mt==qe.length?"":" ")+qe.slice(Mt)||null}else return!1;return!0})}),addLineWidget:Wa(function(re,ce,Ee){return ud(this,re,ce,Ee)}),removeLineWidget:function(re){re.clear()},markText:function(re,ce,Ee){return Yh(this,hr(this,re),hr(this,ce),Ee,Ee&&Ee.type||"range")},setBookmark:function(re,ce){var Ee={replacedWith:ce&&(ce.nodeType==null?ce.widget:ce),insertLeft:ce&&ce.insertLeft,clearWhenEmpty:!1,shared:ce&&ce.shared,handleMouseEvents:ce&&ce.handleMouseEvents};return re=hr(this,re),Yh(this,re,re,Ee,"bookmark")},findMarksAt:function(re){re=hr(this,re);var ce=[],Ee=er(this,re.line).markedSpans;if(Ee)for(var be=0;be<Ee.length;++be){var Oe=Ee[be];(Oe.from==null||Oe.from<=re.ch)&&(Oe.to==null||Oe.to>=re.ch)&&ce.push(Oe.marker.parent||Oe.marker)}return ce},findMarks:function(re,ce,Ee){re=hr(this,re),ce=hr(this,ce);var be=[],Oe=re.line;return this.iter(re.line,ce.line+1,function(qe){var vt=qe.markedSpans;if(vt)for(var Mt=0;Mt<vt.length;Mt++){var kt=vt[Mt];!(kt.to!=null&&Oe==re.line&&re.ch>=kt.to||kt.from==null&&Oe!=re.line||kt.from!=null&&Oe==ce.line&&kt.from>=ce.ch)&&(!Ee||Ee(kt.marker))&&be.push(kt.marker.parent||kt.marker)}++Oe}),be},getAllMarks:function(){var re=[];return this.iter(function(ce){var Ee=ce.markedSpans;if(Ee)for(var be=0;be<Ee.length;++be)Ee[be].from!=null&&re.push(Ee[be].marker)}),re},posFromIndex:function(re){var ce,Ee=this.first,be=this.lineSeparator().length;return this.iter(function(Oe){var qe=Oe.text.length+be;if(qe>re)return ce=re,!0;re-=qe,++Ee}),hr(this,an(Ee,ce))},indexFromPos:function(re){re=hr(this,re);var ce=re.ch;if(re.line<this.first||re.ch<0)return 0;var Ee=this.lineSeparator().length;return this.iter(this.first,re.line,function(be){ce+=be.text.length+Ee}),ce},copy:function(re){var ce=new as(qt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return ce.scrollTop=this.scrollTop,ce.scrollLeft=this.scrollLeft,ce.sel=this.sel,ce.extend=!1,re&&(ce.history.undoDepth=this.history.undoDepth,ce.setHistory(this.getHistory())),ce},linkedDoc:function(re){re||(re={});var ce=this.first,Ee=this.first+this.size;re.from!=null&&re.from>ce&&(ce=re.from),re.to!=null&&re.to<Ee&&(Ee=re.to);var be=new as(qt(this,ce,Ee),re.mode||this.modeOption,ce,this.lineSep,this.direction);return re.sharedHist&&(be.history=this.history),(this.linked||(this.linked=[])).push({doc:be,sharedHist:re.sharedHist}),be.linked=[{doc:this,isParent:!0,sharedHist:re.sharedHist}],Xg(be,gp(this)),be},unlinkDoc:function(re){if(re instanceof vo&&(re=re.doc),this.linked)for(var ce=0;ce<this.linked.length;++ce){var Ee=this.linked[ce];if(Ee.doc==re){this.linked.splice(ce,1),re.unlinkDoc(this),mp(gp(this));break}}if(re.history==this.history){var be=[re.id];Xl(re,function(Oe){return be.push(Oe.id)},!0),re.history=new Lc(null),re.history.done=_u(this.history.done,be),re.history.undone=_u(this.history.undone,be)}},iterLinkedDocs:function(re){Xl(this,re)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(re){return this.lineSep?re.split(this.lineSep):Yi(re)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Wa(function(re){re!="rtl"&&(re="ltr"),re!=this.direction&&(this.direction=re,this.iter(function(ce){return ce.order=null}),this.cm&&ev(this.cm))})}),as.prototype.eachLine=as.prototype.iter;var Pf=0;function vp(re){var ce=this;if(Jg(ce),!(Wt(ce,re)||jo(ce.display,re))){Vn(re),De&&(Pf=+new Date);var Ee=Ga(ce,re,!0),be=re.dataTransfer.files;if(!(!Ee||ce.isReadOnly()))if(be&&be.length&&window.FileReader&&window.File)for(var Oe=be.length,qe=Array(Oe),vt=0,Mt=function(){++vt==Oe&&Da(ce,function(){Ee=hr(ce.doc,Ee);var gn={from:Ee,to:Ee,text:ce.doc.splitLines(qe.filter(function(rr){return rr!=null}).join(ce.doc.lineSeparator())),origin:"paste"};dh(ce.doc,gn),ld(ce.doc,Ru(hr(ce.doc,Ee),hr(ce.doc,hh(gn))))})()},kt=function(gn,rr){if(ce.options.allowDropFileTypes&&xt(ce.options.allowDropFileTypes,gn.type)==-1){Mt();return}var sr=new FileReader;sr.onerror=function(){return Mt()},sr.onload=function(){var Sr=sr.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Sr)){Mt();return}qe[rr]=Sr,Mt()},sr.readAsText(gn)},Rt=0;Rt<be.length;Rt++)kt(be[Rt],Rt);else{if(ce.state.draggingText&&ce.doc.sel.contains(Ee)>-1){ce.state.draggingText(re),setTimeout(function(){return ce.display.input.focus()},20);return}try{var en=re.dataTransfer.getData("Text");if(en){var zt;if(ce.state.draggingText&&!ce.state.draggingText.copy&&(zt=ce.listSelections()),Kh(ce.doc,Ru(Ee,Ee)),zt)for(var wn=0;wn<zt.length;++wn)Zh(ce.doc,"",zt[wn].anchor,zt[wn].head,"drag");ce.replaceSelection(en,"around","paste"),ce.display.input.focus()}}catch(gn){}}}}function Yg(re,ce){if(De&&(!re.state.draggingText||+new Date-Pf<100)){Lr(ce);return}if(!(Wt(re,ce)||jo(re.display,ce))&&(ce.dataTransfer.setData("Text",re.getSelection()),ce.dataTransfer.effectAllowed="copyMove",ce.dataTransfer.setDragImage&&!Me)){var Ee=Ae("img",null,null,"position: fixed; left: 0; top: 0;");Ee.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Se&&(Ee.width=Ee.height=1,re.display.wrapper.appendChild(Ee),Ee._top=Ee.offsetTop),ce.dataTransfer.setDragImage(Ee,0,0),Se&&Ee.parentNode.removeChild(Ee)}}function $g(re,ce){var Ee=Ga(re,ce);if(Ee){var be=document.createDocumentFragment();oo(re,Ee,be),re.display.dragCursor||(re.display.dragCursor=Ae("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),re.display.lineSpace.insertBefore(re.display.dragCursor,re.display.cursorDiv)),Ne(re.display.dragCursor,be)}}function Jg(re){re.display.dragCursor&&(re.display.lineSpace.removeChild(re.display.dragCursor),re.display.dragCursor=null)}function Qg(re){if(document.getElementsByClassName){for(var ce=document.getElementsByClassName("CodeMirror"),Ee=[],be=0;be<ce.length;be++){var Oe=ce[be].CodeMirror;Oe&&Ee.push(Oe)}Ee.length&&Ee[0].operation(function(){for(var qe=0;qe<Ee.length;qe++)re(Ee[qe])})}}var yp=!1;function al(){yp||(Fc(),yp=!0)}function Fc(){var re;$t(window,"resize",function(){re==null&&(re=setTimeout(function(){re=null,Qg(Sp)},100))}),$t(window,"blur",function(){return Qg(Bu)})}function Sp(re){var ce=re.display;ce.cachedCharWidth=ce.cachedTextHeight=ce.cachedPaddingH=null,ce.scrollbarsClipped=!1,re.setSize()}for(var fu={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"},bf=0;bf<10;bf++)fu[bf+48]=fu[bf+96]=String(bf);for(var hd=65;hd<=90;hd++)fu[hd]=String.fromCharCode(hd);for(var Cf=1;Cf<=12;Cf++)fu[Cf+111]=fu[Cf+63235]="F"+Cf;var Hs={};Hs.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"},Hs.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"},Hs.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"},Hs.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"]},Hs.default=ae?Hs.macDefault:Hs.pcDefault;function xp(re){var ce=re.split(/-(?!$)/);re=ce[ce.length-1];for(var Ee,be,Oe,qe,vt=0;vt<ce.length-1;vt++){var Mt=ce[vt];if(/^(cmd|meta|m)$/i.test(Mt))qe=!0;else if(/^a(lt)?$/i.test(Mt))Ee=!0;else if(/^(c|ctrl|control)$/i.test(Mt))be=!0;else if(/^s(hift)?$/i.test(Mt))Oe=!0;else throw new Error("Unrecognized modifier name: "+Mt)}return Ee&&(re="Alt-"+re),be&&(re="Ctrl-"+re),qe&&(re="Cmd-"+re),Oe&&(re="Shift-"+re),re}function wp(re){var ce={};for(var Ee in re)if(re.hasOwnProperty(Ee)){var be=re[Ee];if(/^(name|fallthrough|(de|at)tach)$/.test(Ee))continue;if(be=="..."){delete re[Ee];continue}for(var Oe=yt(Ee.split(" "),xp),qe=0;qe<Oe.length;qe++){var vt=void 0,Mt=void 0;qe==Oe.length-1?(Mt=Oe.join(" "),vt=be):(Mt=Oe.slice(0,qe+1).join(" "),vt="...");var kt=ce[Mt];if(!kt)ce[Mt]=vt;else if(kt!=vt)throw new Error("Inconsistent bindings for "+Mt)}delete re[Ee]}for(var Rt in ce)re[Rt]=ce[Rt];return re}function yl(re,ce,Ee,be){ce=$h(ce);var Oe=ce.call?ce.call(re,be):ce[re];if(Oe===!1)return"nothing";if(Oe==="...")return"multi";if(Oe!=null&&Ee(Oe))return"handled";if(ce.fallthrough){if(Object.prototype.toString.call(ce.fallthrough)!="[object Array]")return yl(re,ce.fallthrough,Ee,be);for(var qe=0;qe<ce.fallthrough.length;qe++){var vt=yl(re,ce.fallthrough[qe],Ee,be);if(vt)return vt}}}function Dc(re){var ce=typeof re=="string"?re:fu[re.keyCode];return ce=="Ctrl"||ce=="Alt"||ce=="Shift"||ce=="Mod"}function Pp(re,ce,Ee){var be=re;return ce.altKey&&be!="Alt"&&(re="Alt-"+re),(ge?ce.metaKey:ce.ctrlKey)&&be!="Ctrl"&&(re="Ctrl-"+re),(ge?ce.ctrlKey:ce.metaKey)&&be!="Mod"&&(re="Cmd-"+re),!Ee&&ce.shiftKey&&be!="Shift"&&(re="Shift-"+re),re}function qg(re,ce){if(Se&&re.keyCode==34&&re.char)return!1;var Ee=fu[re.keyCode];return Ee==null||re.altGraphKey?!1:(re.keyCode==3&&re.code&&(Ee=re.code),Pp(Ee,re,ce))}function $h(re){return typeof re=="string"?Hs[re]:re}function Ks(re,ce){for(var Ee=re.doc.sel.ranges,be=[],Oe=0;Oe<Ee.length;Oe++){for(var qe=ce(Ee[Oe]);be.length&&Un(qe.from,mt(be).to)<=0;){var vt=be.pop();if(Un(vt.from,qe.from)<0){qe.from=vt.from;break}}be.push(qe)}So(re,function(){for(var Mt=be.length-1;Mt>=0;Mt--)Zh(re.doc,"",be[Mt].from,be[Mt].to,"+delete");Nl(re)})}function bp(re,ce,Ee){var be=Qe(re.text,ce+Ee,Ee);return be<0||be>re.text.length?null:be}function xa(re,ce,Ee){var be=bp(re,ce.ch,Ee);return be==null?null:new an(ce.line,be,Ee<0?"after":"before")}function Ef(re,ce,Ee,be,Oe){if(re){ce.doc.direction=="rtl"&&(Oe=-Oe);var qe=Kt(Ee,ce.doc.direction);if(qe){var vt=Oe<0?mt(qe):qe[0],Mt=Oe<0==(vt.level==1),kt=Mt?"after":"before",Rt;if(vt.level>0||ce.doc.direction=="rtl"){var en=gl(ce,Ee);Rt=Oe<0?Ee.text.length-1:0;var zt=Ns(ce,en,Rt).top;Rt=ct(function(wn){return Ns(ce,en,wn).top==zt},Oe<0==(vt.level==1)?vt.from:vt.to-1,Rt),kt=="before"&&(Rt=bp(Ee,Rt,1))}else Rt=Oe<0?vt.to:vt.from;return new an(be,Rt,kt)}}return new an(be,Oe<0?Ee.text.length:0,Oe<0?"before":"after")}function cd(re,ce,Ee,be){var Oe=Kt(ce,re.doc.direction);if(!Oe)return xa(ce,Ee,be);Ee.ch>=ce.text.length?(Ee.ch=ce.text.length,Ee.sticky="before"):Ee.ch<=0&&(Ee.ch=0,Ee.sticky="after");var qe=Lt(Oe,Ee.ch,Ee.sticky),vt=Oe[qe];if(re.doc.direction=="ltr"&&vt.level%2==0&&(be>0?vt.to>Ee.ch:vt.from<Ee.ch))return xa(ce,Ee,be);var Mt=function(Fr,Qr){return bp(ce,Fr instanceof an?Fr.ch:Fr,Qr)},kt,Rt=function(Fr){return re.options.lineWrapping?(kt=kt||gl(re,ce),As(re,ce,kt,Fr)):{begin:0,end:ce.text.length}},en=Rt(Ee.sticky=="before"?Mt(Ee,-1):Ee.ch);if(re.doc.direction=="rtl"||vt.level==1){var zt=vt.level==1==be<0,wn=Mt(Ee,zt?1:-1);if(wn!=null&&(zt?wn<=vt.to&&wn<=en.end:wn>=vt.from&&wn>=en.begin)){var gn=zt?"before":"after";return new an(Ee.line,wn,gn)}}var rr=function(Fr,Qr,Kr){for(var ui=function(Xo,Ia){return Ia?new an(Ee.line,Mt(Xo,1),"before"):new an(Ee.line,Xo,"after")};Fr>=0&&Fr<Oe.length;Fr+=Qr){var Ai=Oe[Fr],Gr=Qr>0==(Ai.level!=1),Ji=Gr?Kr.begin:Mt(Kr.end,-1);if(Ai.from<=Ji&&Ji<Ai.to||(Ji=Gr?Ai.from:Mt(Ai.to,-1),Kr.begin<=Ji&&Ji<Kr.end))return ui(Ji,Gr)}},sr=rr(qe+be,be,en);if(sr)return sr;var Sr=be>0?en.end:Mt(en.begin,-1);return Sr!=null&&!(be>0&&Sr==ce.text.length)&&(sr=rr(be>0?0:Oe.length-1,be,Rt(Sr)),sr)?sr:null}var ph={selectAll:Sa,singleSelection:function(re){return re.setSelection(re.getCursor("anchor"),re.getCursor("head"),gt)},killLine:function(re){return Ks(re,function(ce){if(ce.empty()){var Ee=er(re.doc,ce.head.line).text.length;return ce.head.ch==Ee&&ce.head.line<re.lastLine()?{from:ce.head,to:an(ce.head.line+1,0)}:{from:ce.head,to:an(ce.head.line,Ee)}}else return{from:ce.from(),to:ce.to()}})},deleteLine:function(re){return Ks(re,function(ce){return{from:an(ce.from().line,0),to:hr(re.doc,an(ce.to().line+1,0))}})},delLineLeft:function(re){return Ks(re,function(ce){return{from:an(ce.from().line,0),to:ce.from()}})},delWrappedLineLeft:function(re){return Ks(re,function(ce){var Ee=re.charCoords(ce.head,"div").top+5,be=re.coordsChar({left:0,top:Ee},"div");return{from:be,to:ce.from()}})},delWrappedLineRight:function(re){return Ks(re,function(ce){var Ee=re.charCoords(ce.head,"div").top+5,be=re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:Ee},"div");return{from:ce.from(),to:be}})},undo:function(re){return re.undo()},redo:function(re){return re.redo()},undoSelection:function(re){return re.undoSelection()},redoSelection:function(re){return re.redoSelection()},goDocStart:function(re){return re.extendSelection(an(re.firstLine(),0))},goDocEnd:function(re){return re.extendSelection(an(re.lastLine()))},goLineStart:function(re){return re.extendSelectionsBy(function(ce){return Bc(re,ce.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(re){return re.extendSelectionsBy(function(ce){return Cp(re,ce.head)},{origin:"+move",bias:1})},goLineEnd:function(re){return re.extendSelectionsBy(function(ce){return Ic(re,ce.head.line)},{origin:"+move",bias:-1})},goLineRight:function(re){return re.extendSelectionsBy(function(ce){var Ee=re.cursorCoords(ce.head,"div").top+5;return re.coordsChar({left:re.display.lineDiv.offsetWidth+100,top:Ee},"div")},ht)},goLineLeft:function(re){return re.extendSelectionsBy(function(ce){var Ee=re.cursorCoords(ce.head,"div").top+5;return re.coordsChar({left:0,top:Ee},"div")},ht)},goLineLeftSmart:function(re){return re.extendSelectionsBy(function(ce){var Ee=re.cursorCoords(ce.head,"div").top+5,be=re.coordsChar({left:0,top:Ee},"div");return be.ch<re.getLine(be.line).search(/\S/)?Cp(re,ce.head):be},ht)},goLineUp:function(re){return re.moveV(-1,"line")},goLineDown:function(re){return re.moveV(1,"line")},goPageUp:function(re){return re.moveV(-1,"page")},goPageDown:function(re){return re.moveV(1,"page")},goCharLeft:function(re){return re.moveH(-1,"char")},goCharRight:function(re){return re.moveH(1,"char")},goColumnLeft:function(re){return re.moveH(-1,"column")},goColumnRight:function(re){return re.moveH(1,"column")},goWordLeft:function(re){return re.moveH(-1,"word")},goGroupRight:function(re){return re.moveH(1,"group")},goGroupLeft:function(re){return re.moveH(-1,"group")},goWordRight:function(re){return re.moveH(1,"word")},delCharBefore:function(re){return re.deleteH(-1,"codepoint")},delCharAfter:function(re){return re.deleteH(1,"char")},delWordBefore:function(re){return re.deleteH(-1,"word")},delWordAfter:function(re){return re.deleteH(1,"word")},delGroupBefore:function(re){return re.deleteH(-1,"group")},delGroupAfter:function(re){return re.deleteH(1,"group")},indentAuto:function(re){return re.indentSelection("smart")},indentMore:function(re){return re.indentSelection("add")},indentLess:function(re){return re.indentSelection("subtract")},insertTab:function(re){return re.replaceSelection(" ")},insertSoftTab:function(re){for(var ce=[],Ee=re.listSelections(),be=re.options.tabSize,Oe=0;Oe<Ee.length;Oe++){var qe=Ee[Oe].from(),vt=Je(re.getLine(qe.line),qe.ch,be);ce.push(Ft(be-vt%be))}re.replaceSelections(ce)},defaultTab:function(re){re.somethingSelected()?re.indentSelection("add"):re.execCommand("insertTab")},transposeChars:function(re){return So(re,function(){for(var ce=re.listSelections(),Ee=[],be=0;be<ce.length;be++)if(ce[be].empty()){var Oe=ce[be].head,qe=er(re.doc,Oe.line).text;if(qe){if(Oe.ch==qe.length&&(Oe=new an(Oe.line,Oe.ch-1)),Oe.ch>0)Oe=new an(Oe.line,Oe.ch+1),re.replaceRange(qe.charAt(Oe.ch-1)+qe.charAt(Oe.ch-2),an(Oe.line,Oe.ch-2),Oe,"+transpose");else if(Oe.line>re.doc.first){var vt=er(re.doc,Oe.line-1).text;vt&&(Oe=new an(Oe.line,1),re.replaceRange(qe.charAt(0)+re.doc.lineSeparator()+vt.charAt(vt.length-1),an(Oe.line-1,vt.length-1),Oe,"+transpose"))}}Ee.push(new To(Oe,Oe))}re.setSelections(Ee)})},newlineAndIndent:function(re){return So(re,function(){for(var ce=re.listSelections(),Ee=ce.length-1;Ee>=0;Ee--)re.replaceRange(re.doc.lineSeparator(),ce[Ee].anchor,ce[Ee].head,"+input");ce=re.listSelections();for(var be=0;be<ce.length;be++)re.indentLine(ce[be].from().line,null,!0);Nl(re)})},openLine:function(re){return re.replaceSelection(`
`,"start")},toggleOverwrite:function(re){return re.toggleOverwrite()}};function Bc(re,ce){var Ee=er(re.doc,ce),be=Gn(Ee);return be!=Ee&&(ce=Ot(be)),Ef(!0,re,be,ce,1)}function Ic(re,ce){var Ee=er(re.doc,ce),be=In(Ee);return be!=Ee&&(ce=Ot(be)),Ef(!0,re,Ee,ce,-1)}function Cp(re,ce){var Ee=Bc(re,ce.line),be=er(re.doc,Ee.line),Oe=Kt(be,re.doc.direction);if(!Oe||Oe[0].level==0){var qe=Math.max(Ee.ch,be.text.search(/\S/)),vt=ce.line==Ee.line&&ce.ch<=qe&&ce.ch;return an(Ee.line,vt?0:qe,Ee.sticky)}return Ee}function Rc(re,ce,Ee){if(typeof ce=="string"&&(ce=ph[ce],!ce))return!1;re.display.input.ensurePolled();var be=re.display.shift,Oe=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),Ee&&(re.display.shift=!1),Oe=ce(re)!=Ct}finally{re.display.shift=be,re.state.suppressEdits=!1}return Oe}function Ep(re,ce,Ee){for(var be=0;be<re.state.keyMaps.length;be++){var Oe=yl(ce,re.state.keyMaps[be],Ee,re);if(Oe)return Oe}return re.options.extraKeys&&yl(ce,re.options.extraKeys,Ee,re)||yl(ce,re.options.keyMap,Ee,re)}var du=new nt;function Jh(re,ce,Ee,be){var Oe=re.state.keySeq;if(Oe){if(Dc(ce))return"handled";if(/\'$/.test(ce)?re.state.keySeq=null:du.set(50,function(){re.state.keySeq==Oe&&(re.state.keySeq=null,re.display.input.reset())}),fd(re,Oe+" "+ce,Ee,be))return!0}return fd(re,ce,Ee,be)}function fd(re,ce,Ee,be){var Oe=Ep(re,ce,be);return Oe=="multi"&&(re.state.keySeq=ce),Oe=="handled"&&Dr(re,"keyHandled",re,ce,Ee),(Oe=="handled"||Oe=="multi")&&(Vn(Ee),Po(re)),!!Oe}function dd(re,ce){var Ee=qg(ce,!0);return Ee?ce.shiftKey&&!re.state.keySeq?Jh(re,"Shift-"+Ee,ce,function(be){return Rc(re,be,!0)})||Jh(re,Ee,ce,function(be){if(typeof be=="string"?/^go[A-Z]/.test(be):be.motion)return Rc(re,be)}):Jh(re,Ee,ce,function(be){return Rc(re,be)}):!1}function pd(re,ce,Ee){return Jh(re,"'"+Ee+"'",ce,function(be){return Rc(re,be,!0)})}var Qh=null;function kp(re){var ce=this;if(!(re.target&&re.target!=ce.display.input.getField())&&(ce.curOp.focus=Ue(),!Wt(ce,re))){De&&fe<11&&re.keyCode==27&&(re.returnValue=!1);var Ee=re.keyCode;ce.display.shift=Ee==16||re.shiftKey;var be=dd(ce,re);Se&&(Qh=be?Ee:null,!be&&Ee==88&&!pr&&(ae?re.metaKey:re.ctrlKey)&&ce.replaceSelection("",null,"cut")),pt&&!ae&&!be&&Ee==46&&re.shiftKey&&!re.ctrlKey&&document.execCommand&&document.execCommand("cut"),Ee==18&&!/\bCodeMirror-crosshair\b/.test(ce.display.lineDiv.className)&&Tp(ce)}}function Tp(re){var ce=re.display.lineDiv;Ke(ce,"CodeMirror-crosshair");function Ee(be){(be.keyCode==18||!be.altKey)&&(Be(ce,"CodeMirror-crosshair"),ln(document,"keyup",Ee),ln(document,"mouseover",Ee))}$t(document,"keyup",Ee),$t(document,"mouseover",Ee)}function Mp(re){re.keyCode==16&&(this.doc.sel.shift=!1),Wt(this,re)}function Yl(re){var ce=this;if(!(re.target&&re.target!=ce.display.input.getField())&&!(jo(ce.display,re)||Wt(ce,re)||re.ctrlKey&&!re.altKey||ae&&re.metaKey)){var Ee=re.keyCode,be=re.charCode;if(Se&&Ee==Qh){Qh=null,Vn(re);return}if(!(Se&&(!re.which||re.which<10)&&dd(ce,re))){var Oe=String.fromCharCode(be==null?Ee:be);Oe!="\b"&&(pd(ce,re,Oe)||ce.display.input.onKeyPress(re))}}}var em=400,Lp=function(re,ce,Ee){this.time=re,this.pos=ce,this.button=Ee};Lp.prototype.compare=function(re,ce,Ee){return this.time+em>re&&Un(ce,this.pos)==0&&Ee==this.button};var _c,qh;function Np(re,ce){var Ee=+new Date;return qh&&qh.compare(Ee,re,ce)?(_c=qh=null,"triple"):_c&&_c.compare(Ee,re,ce)?(qh=new Lp(Ee,re,ce),_c=null,"double"):(_c=new Lp(Ee,re,ce),qh=null,"single")}function $l(re){var ce=this,Ee=ce.display;if(!(Wt(ce,re)||Ee.activeTouch&&Ee.input.supportsTouch())){if(Ee.input.ensurePolled(),Ee.shift=re.shiftKey,jo(Ee,re)){me||(Ee.scroller.draggable=!1,setTimeout(function(){return Ee.scroller.draggable=!0},100));return}if(!vd(ce,re)){var be=Ga(ce,re),Oe=Vr(re),qe=be?Np(be,Oe):"single";window.focus(),Oe==1&&ce.state.selectingText&&ce.state.selectingText(re),!(be&&Ap(ce,Oe,be,qe,re))&&(Oe==1?be?tm(ce,be,qe,re):Xr(re)==Ee.scroller&&Vn(re):Oe==2?(be&&sd(ce.doc,be),setTimeout(function(){return Ee.input.focus()},20)):Oe==3&&(Pe?ce.display.input.onContextMenu(re):zo(ce)))}}}function Ap(re,ce,Ee,be,Oe){var qe="Click";return be=="double"?qe="Double"+qe:be=="triple"&&(qe="Triple"+qe),qe=(ce==1?"Left":ce==2?"Middle":"Right")+qe,Jh(re,Pp(qe,Oe),Oe,function(vt){if(typeof vt=="string"&&(vt=ph[vt]),!vt)return!1;var Mt=!1;try{re.isReadOnly()&&(re.state.suppressEdits=!0),Mt=vt(re,Ee)!=Ct}finally{re.state.suppressEdits=!1}return Mt})}function gd(re,ce,Ee){var be=re.getOption("configureMouse"),Oe=be?be(re,ce,Ee):{};if(Oe.unit==null){var qe=ie?Ee.shiftKey&&Ee.metaKey:Ee.altKey;Oe.unit=qe?"rectangle":ce=="single"?"char":ce=="double"?"word":"line"}return(Oe.extend==null||re.doc.extend)&&(Oe.extend=re.doc.extend||Ee.shiftKey),Oe.addNew==null&&(Oe.addNew=ae?Ee.metaKey:Ee.ctrlKey),Oe.moveOnDrag==null&&(Oe.moveOnDrag=!(ae?Ee.altKey:Ee.ctrlKey)),Oe}function tm(re,ce,Ee,be){De?setTimeout(ft(Eo,re),0):re.curOp.focus=Ue();var Oe=gd(re,Ee,be),qe=re.doc.sel,vt;re.options.dragDrop&&si&&!re.isReadOnly()&&Ee=="single"&&(vt=qe.contains(ce))>-1&&(Un((vt=qe.ranges[vt]).from(),ce)<0||ce.xRel>0)&&(Un(vt.to(),ce)>0||ce.xRel<0)?jp(re,be,ce,Oe):nv(re,be,ce,Oe)}function jp(re,ce,Ee,be){var Oe=re.display,qe=!1,vt=Da(re,function(Rt){me&&(Oe.scroller.draggable=!1),re.state.draggingText=!1,ln(Oe.wrapper.ownerDocument,"mouseup",vt),ln(Oe.wrapper.ownerDocument,"mousemove",Mt),ln(Oe.scroller,"dragstart",kt),ln(Oe.scroller,"drop",vt),qe||(Vn(Rt),be.addNew||sd(re.doc,Ee,null,null,be.extend),me&&!Me||De&&fe==9?setTimeout(function(){Oe.wrapper.ownerDocument.body.focus({preventScroll:!0}),Oe.input.focus()},20):Oe.input.focus())}),Mt=function(Rt){qe=qe||Math.abs(ce.clientX-Rt.clientX)+Math.abs(ce.clientY-Rt.clientY)>=10},kt=function(){return qe=!0};me&&(Oe.scroller.draggable=!0),re.state.draggingText=vt,vt.copy=!be.moveOnDrag,Oe.scroller.dragDrop&&Oe.scroller.dragDrop(),$t(Oe.wrapper.ownerDocument,"mouseup",vt),$t(Oe.wrapper.ownerDocument,"mousemove",Mt),$t(Oe.scroller,"dragstart",kt),$t(Oe.scroller,"drop",vt),zo(re),setTimeout(function(){return Oe.input.focus()},20)}function Op(re,ce,Ee){if(Ee=="char")return new To(ce,ce);if(Ee=="word")return re.findWordAt(ce);if(Ee=="line")return new To(an(ce.line,0),hr(re.doc,an(ce.line+1,0)));var be=Ee(re,ce);return new To(be.from,be.to)}function nv(re,ce,Ee,be){var Oe=re.display,qe=re.doc;Vn(ce);var vt,Mt,kt=qe.sel,Rt=kt.ranges;if(be.addNew&&!be.extend?(Mt=qe.sel.contains(Ee),Mt>-1?vt=Rt[Mt]:vt=new To(Ee,Ee)):(vt=qe.sel.primary(),Mt=qe.sel.primIndex),be.unit=="rectangle")be.addNew||(vt=new To(Ee,Ee)),Ee=Ga(re,ce,!0,!0),Mt=-1;else{var en=Op(re,Ee,be.unit);be.extend?vt=ad(vt,en.anchor,en.head,be.extend):vt=en}be.addNew?Mt==-1?(Mt=Rt.length,ps(qe,jl(re,Rt.concat([vt]),Mt),{scroll:!1,origin:"*mouse"})):Rt.length>1&&Rt[Mt].empty()&&be.unit=="char"&&!be.extend?(ps(qe,jl(re,Rt.slice(0,Mt).concat(Rt.slice(Mt+1)),0),{scroll:!1,origin:"*mouse"}),kt=qe.sel):fh(qe,Mt,vt,dt):(Mt=0,ps(qe,new ml([vt],0),dt),kt=qe.sel);var zt=Ee;function wn(Kr){if(Un(zt,Kr)!=0)if(zt=Kr,be.unit=="rectangle"){for(var ui=[],Ai=re.options.tabSize,Gr=Je(er(qe,Ee.line).text,Ee.ch,Ai),Ji=Je(er(qe,Kr.line).text,Kr.ch,Ai),Xo=Math.min(Gr,Ji),Ia=Math.max(Gr,Ji),ia=Math.min(Ee.line,Kr.line),Ds=Math.min(re.lastLine(),Math.max(Ee.line,Kr.line));ia<=Ds;ia++){var gs=er(qe,ia).text,Ma=Et(gs,Xo,Ai);Xo==Ia?ui.push(new To(an(ia,Ma),an(ia,Ma))):gs.length>Ma&&ui.push(new To(an(ia,Ma),an(ia,Et(gs,Ia,Ai))))}ui.length||ui.push(new To(Ee,Ee)),ps(qe,jl(re,kt.ranges.slice(0,Mt).concat(ui),Mt),{origin:"*mouse",scroll:!1}),re.scrollIntoView(Kr)}else{var Vs=vt,ss=Op(re,Kr,be.unit),La=Vs.anchor,yo;Un(ss.anchor,La)>0?(yo=ss.head,La=$n(Vs.from(),ss.anchor)):(yo=ss.anchor,La=ur(Vs.to(),ss.head));var ca=kt.ranges.slice(0);ca[Mt]=nm(re,new To(hr(qe,La),yo)),ps(qe,jl(re,ca,Mt),dt)}}var gn=Oe.wrapper.getBoundingClientRect(),rr=0;function sr(Kr){var ui=++rr,Ai=Ga(re,Kr,!0,be.unit=="rectangle");if(Ai)if(Un(Ai,zt)!=0){re.curOp.focus=Ue(),wn(Ai);var Gr=Xi(Oe,qe);(Ai.line>=Gr.to||Ai.line<Gr.from)&&setTimeout(Da(re,function(){rr==ui&&sr(Kr)}),150)}else{var Ji=Kr.clientY<gn.top?-20:Kr.clientY>gn.bottom?20:0;Ji&&setTimeout(Da(re,function(){rr==ui&&(Oe.scroller.scrollTop+=Ji,sr(Kr))}),50)}}function Sr(Kr){re.state.selectingText=!1,rr=1/0,Kr&&(Vn(Kr),Oe.input.focus()),ln(Oe.wrapper.ownerDocument,"mousemove",Fr),ln(Oe.wrapper.ownerDocument,"mouseup",Qr),qe.history.lastSelOrigin=null}var Fr=Da(re,function(Kr){Kr.buttons===0||!Vr(Kr)?Sr(Kr):sr(Kr)}),Qr=Da(re,Sr);re.state.selectingText=Qr,$t(Oe.wrapper.ownerDocument,"mousemove",Fr),$t(Oe.wrapper.ownerDocument,"mouseup",Qr)}function nm(re,ce){var Ee=ce.anchor,be=ce.head,Oe=er(re.doc,Ee.line);if(Un(Ee,be)==0&&Ee.sticky==be.sticky)return ce;var qe=Kt(Oe);if(!qe)return ce;var vt=Lt(qe,Ee.ch,Ee.sticky),Mt=qe[vt];if(Mt.from!=Ee.ch&&Mt.to!=Ee.ch)return ce;var kt=vt+(Mt.from==Ee.ch==(Mt.level!=1)?0:1);if(kt==0||kt==qe.length)return ce;var Rt;if(be.line!=Ee.line)Rt=(be.line-Ee.line)*(re.doc.direction=="ltr"?1:-1)>0;else{var en=Lt(qe,be.ch,be.sticky),zt=en-vt||(be.ch-Ee.ch)*(Mt.level==1?-1:1);en==kt-1||en==kt?Rt=zt<0:Rt=zt>0}var wn=qe[kt+(Rt?-1:0)],gn=Rt==(wn.level==1),rr=gn?wn.from:wn.to,sr=gn?"after":"before";return Ee.ch==rr&&Ee.sticky==sr?ce:new To(new an(Ee.line,rr,sr),be)}function md(re,ce,Ee,be){var Oe,qe;if(ce.touches)Oe=ce.touches[0].clientX,qe=ce.touches[0].clientY;else try{Oe=ce.clientX,qe=ce.clientY}catch(wn){return!1}if(Oe>=Math.floor(re.display.gutters.getBoundingClientRect().right))return!1;be&&Vn(ce);var vt=re.display,Mt=vt.lineDiv.getBoundingClientRect();if(qe>Mt.bottom||!Pn(re,Ee))return dr(ce);qe-=Mt.top-vt.viewOffset;for(var kt=0;kt<re.display.gutterSpecs.length;++kt){var Rt=vt.gutters.childNodes[kt];if(Rt&&Rt.getBoundingClientRect().right>=Oe){var en=vn(re.doc,qe),zt=re.display.gutterSpecs[kt];return tn(re,Ee,re,en,zt.className,ce),dr(ce)}}}function vd(re,ce){return md(re,ce,"gutterClick",!0)}function yd(re,ce){jo(re.display,ce)||rm(re,ce)||Wt(re,ce,"contextmenu")||Pe||re.display.input.onContextMenu(ce)}function rm(re,ce){return Pn(re,"gutterContextMenu")?md(re,ce,"gutterContextMenu",!1):!1}function Sd(re){re.display.wrapper.className=re.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+re.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ou(re)}var gh={toString:function(){return"CodeMirror.Init"}},Fp={},kf={};function im(re){var ce=re.optionHandlers;function Ee(be,Oe,qe,vt){re.defaults[be]=Oe,qe&&(ce[be]=vt?function(Mt,kt,Rt){Rt!=gh&&qe(Mt,kt,Rt)}:qe)}re.defineOption=Ee,re.Init=gh,Ee("value","",function(be,Oe){return be.setValue(Oe)},!0),Ee("mode",null,function(be,Oe){be.doc.modeOption=Oe,$i(be)},!0),Ee("indentUnit",2,$i,!0),Ee("indentWithTabs",!1),Ee("smartIndent",!0),Ee("tabSize",4,function(be){ff(be),ou(be),Fo(be)},!0),Ee("lineSeparator",null,function(be,Oe){if(be.doc.lineSep=Oe,!!Oe){var qe=[],vt=be.doc.first;be.doc.iter(function(kt){for(var Rt=0;;){var en=kt.text.indexOf(Oe,Rt);if(en==-1)break;Rt=en+Oe.length,qe.push(an(vt,en))}vt++});for(var Mt=qe.length-1;Mt>=0;Mt--)Zh(be.doc,Oe,qe[Mt],an(qe[Mt].line,qe[Mt].ch+Oe.length))}}),Ee("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(be,Oe,qe){be.state.specialChars=new RegExp(Oe.source+(Oe.test(" ")?"":"| "),"g"),qe!=gh&&be.refresh()}),Ee("specialCharPlaceholder",ci,function(be){return be.refresh()},!0),Ee("electricChars",!0),Ee("inputStyle",ee?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Ee("spellcheck",!1,function(be,Oe){return be.getInputField().spellcheck=Oe},!0),Ee("autocorrect",!1,function(be,Oe){return be.getInputField().autocorrect=Oe},!0),Ee("autocapitalize",!1,function(be,Oe){return be.getInputField().autocapitalize=Oe},!0),Ee("rtlMoveVisually",!le),Ee("wholeLineUpdateBefore",!0),Ee("theme","default",function(be){Sd(be),il(be)},!0),Ee("keyMap","default",function(be,Oe,qe){var vt=$h(Oe),Mt=qe!=gh&&$h(qe);Mt&&Mt.detach&&Mt.detach(be,vt),vt.attach&&vt.attach(be,Mt||null)}),Ee("extraKeys",null),Ee("configureMouse",null),Ee("lineWrapping",!1,om,!0),Ee("gutters",[],function(be,Oe){be.display.gutterSpecs=Ka(Oe,be.options.lineNumbers),il(be)},!0),Ee("fixedGutter",!0,function(be,Oe){be.display.gutters.style.left=Oe?Du(be.display)+"px":"0",be.refresh()},!0),Ee("coverGutterNextToScrollbar",!1,function(be){return Fa(be)},!0),Ee("scrollbarStyle","native",function(be){Vl(be),Fa(be),be.display.scrollbars.setScrollTop(be.doc.scrollTop),be.display.scrollbars.setScrollLeft(be.doc.scrollLeft)},!0),Ee("lineNumbers",!1,function(be,Oe){be.display.gutterSpecs=Ka(be.options.gutters,Oe),il(be)},!0),Ee("firstLineNumber",1,il,!0),Ee("lineNumberFormatter",function(be){return be},il,!0),Ee("showCursorWhenSelecting",!1,va,!0),Ee("resetSelectionOnContextMenu",!0),Ee("lineWiseCopyCut",!0),Ee("pasteLinesPerSelection",!0),Ee("selectionsMayTouch",!1),Ee("readOnly",!1,function(be,Oe){Oe=="nocursor"&&(Bu(be),be.display.input.blur()),be.display.input.readOnlyChanged(Oe)}),Ee("screenReaderLabel",null,function(be,Oe){Oe=Oe===""?null:Oe,be.display.input.screenReaderLabelChanged(Oe)}),Ee("disableInput",!1,function(be,Oe){Oe||be.display.input.reset()},!0),Ee("dragDrop",!0,xd),Ee("allowDropFileTypes",null),Ee("cursorBlinkRate",530),Ee("cursorScrollMargin",0),Ee("cursorHeight",1,va,!0),Ee("singleCursorHeightPerLine",!0,va,!0),Ee("workTime",100),Ee("workDelay",100),Ee("flattenSpans",!0,ff,!0),Ee("addModeClass",!1,ff,!0),Ee("pollInterval",100),Ee("undoDepth",200,function(be,Oe){return be.doc.history.undoDepth=Oe}),Ee("historyEventDelay",1250),Ee("viewportMargin",10,function(be){return be.refresh()},!0),Ee("maxHighlightLength",1e4,ff,!0),Ee("moveInputWithCursor",!0,function(be,Oe){Oe||be.display.input.resetPosition()}),Ee("tabindex",null,function(be,Oe){return be.display.input.getField().tabIndex=Oe||""}),Ee("autofocus",null),Ee("direction","ltr",function(be,Oe){return be.doc.setDirection(Oe)},!0),Ee("phrases",null)}function xd(re,ce,Ee){var be=Ee&&Ee!=gh;if(!ce!=!be){var Oe=re.display.dragFunctions,qe=ce?$t:ln;qe(re.display.scroller,"dragstart",Oe.start),qe(re.display.scroller,"dragenter",Oe.enter),qe(re.display.scroller,"dragover",Oe.over),qe(re.display.scroller,"dragleave",Oe.leave),qe(re.display.scroller,"drop",Oe.drop)}}function om(re){re.options.lineWrapping?(Ke(re.display.wrapper,"CodeMirror-wrap"),re.display.sizer.style.minWidth="",re.display.sizerWidth=null):(Be(re.display.wrapper,"CodeMirror-wrap"),Zr(re)),fi(re),Fo(re),ou(re),setTimeout(function(){return Fa(re)},100)}function vo(re,ce){var Ee=this;if(!(this instanceof vo))return new vo(re,ce);this.options=ce=ce?wt(ce):{},wt(Fp,ce,!1);var be=ce.value;typeof be=="string"?be=new as(be,ce.mode,null,ce.lineSeparator,ce.direction):ce.mode&&(be.modeOption=ce.mode),this.doc=be;var Oe=new vo.inputStyles[ce.inputStyle](this),qe=this.display=new uh(re,be,Oe,ce);qe.wrapper.CodeMirror=this,Sd(this),ce.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Vl(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 nt,keySeq:null,specialChars:null},ce.autofocus&&!ee&&qe.input.focus(),De&&fe<11&&setTimeout(function(){return Ee.display.input.reset(!0)},20),zc(this),al(),rl(this),this.curOp.forceUpdate=!0,rd(this,be),ce.autofocus&&!ee||this.hasFocus()?setTimeout(function(){Ee.hasFocus()&&!Ee.state.focused&&ho(Ee)},20):Bu(this);for(var vt in kf)kf.hasOwnProperty(vt)&&kf[vt](this,ce[vt],gh);Ca(this),ce.finishInit&&ce.finishInit(this);for(var Mt=0;Mt<ec.length;++Mt)ec[Mt](this);Al(this),me&&ce.lineWrapping&&getComputedStyle(qe.lineDiv).textRendering=="optimizelegibility"&&(qe.lineDiv.style.textRendering="auto")}vo.defaults=Fp,vo.optionHandlers=kf;function zc(re){var ce=re.display;$t(ce.scroller,"mousedown",Da(re,$l)),De&&fe<11?$t(ce.scroller,"dblclick",Da(re,function(kt){if(!Wt(re,kt)){var Rt=Ga(re,kt);if(!(!Rt||vd(re,kt)||jo(re.display,kt))){Vn(kt);var en=re.findWordAt(Rt);sd(re.doc,en.anchor,en.head)}}})):$t(ce.scroller,"dblclick",function(kt){return Wt(re,kt)||Vn(kt)}),$t(ce.scroller,"contextmenu",function(kt){return yd(re,kt)}),$t(ce.input.getField(),"contextmenu",function(kt){ce.scroller.contains(kt.target)||yd(re,kt)});var Ee,be={end:0};function Oe(){ce.activeTouch&&(Ee=setTimeout(function(){return ce.activeTouch=null},1e3),be=ce.activeTouch,be.end=+new Date)}function qe(kt){if(kt.touches.length!=1)return!1;var Rt=kt.touches[0];return Rt.radiusX<=1&&Rt.radiusY<=1}function vt(kt,Rt){if(Rt.left==null)return!0;var en=Rt.left-kt.left,zt=Rt.top-kt.top;return en*en+zt*zt>20*20}$t(ce.scroller,"touchstart",function(kt){if(!Wt(re,kt)&&!qe(kt)&&!vd(re,kt)){ce.input.ensurePolled(),clearTimeout(Ee);var Rt=+new Date;ce.activeTouch={start:Rt,moved:!1,prev:Rt-be.end<=300?be:null},kt.touches.length==1&&(ce.activeTouch.left=kt.touches[0].pageX,ce.activeTouch.top=kt.touches[0].pageY)}}),$t(ce.scroller,"touchmove",function(){ce.activeTouch&&(ce.activeTouch.moved=!0)}),$t(ce.scroller,"touchend",function(kt){var Rt=ce.activeTouch;if(Rt&&!jo(ce,kt)&&Rt.left!=null&&!Rt.moved&&new Date-Rt.start<300){var en=re.coordsChar(ce.activeTouch,"page"),zt;!Rt.prev||vt(Rt,Rt.prev)?zt=new To(en,en):!Rt.prev.prev||vt(Rt,Rt.prev.prev)?zt=re.findWordAt(en):zt=new To(an(en.line,0),hr(re.doc,an(en.line+1,0))),re.setSelection(zt.anchor,zt.head),re.focus(),Vn(kt)}Oe()}),$t(ce.scroller,"touchcancel",Oe),$t(ce.scroller,"scroll",function(){ce.scroller.clientHeight&&(Hl(re,ce.scroller.scrollTop),Kl(re,ce.scroller.scrollLeft,!0),tn(re,"scroll",re))}),$t(ce.scroller,"mousewheel",function(kt){return Va(re,kt)}),$t(ce.scroller,"DOMMouseScroll",function(kt){return Va(re,kt)}),$t(ce.wrapper,"scroll",function(){return ce.wrapper.scrollTop=ce.wrapper.scrollLeft=0}),ce.dragFunctions={enter:function(kt){Wt(re,kt)||Lr(kt)},over:function(kt){Wt(re,kt)||($g(re,kt),Lr(kt))},start:function(kt){return Yg(re,kt)},drop:Da(re,vp),leave:function(kt){Wt(re,kt)||Jg(re)}};var Mt=ce.input.getField();$t(Mt,"keyup",function(kt){return Mp.call(re,kt)}),$t(Mt,"keydown",Da(re,kp)),$t(Mt,"keypress",Da(re,Yl)),$t(Mt,"focus",function(kt){return ho(re,kt)}),$t(Mt,"blur",function(kt){return Bu(re,kt)})}var ec=[];vo.defineInitHook=function(re){return ec.push(re)};function Ba(re,ce,Ee,be){var Oe=re.doc,qe;Ee==null&&(Ee="add"),Ee=="smart"&&(Oe.mode.indent?qe=ki(re,ce).state:Ee="prev");var vt=re.options.tabSize,Mt=er(Oe,ce),kt=Je(Mt.text,null,vt);Mt.stateAfter&&(Mt.stateAfter=null);var Rt=Mt.text.match(/^\s*/)[0],en;if(!be&&!/\S/.test(Mt.text))en=0,Ee="not";else if(Ee=="smart"&&(en=Oe.mode.indent(qe,Mt.text.slice(Rt.length),Mt.text),en==Ct||en>150)){if(!be)return;Ee="prev"}Ee=="prev"?ce>Oe.first?en=Je(er(Oe,ce-1).text,null,vt):en=0:Ee=="add"?en=kt+re.options.indentUnit:Ee=="subtract"?en=kt-re.options.indentUnit:typeof Ee=="number"&&(en=kt+Ee),en=Math.max(0,en);var zt="",wn=0;if(re.options.indentWithTabs)for(var gn=Math.floor(en/vt);gn;--gn)wn+=vt,zt+=" ";if(wn<en&&(zt+=Ft(en-wn)),zt!=Rt)return Zh(Oe,zt,an(ce,0),an(ce,Rt.length),"+input"),Mt.stateAfter=null,!0;for(var rr=0;rr<Oe.sel.ranges.length;rr++){var sr=Oe.sel.ranges[rr];if(sr.head.line==ce&&sr.head.ch<Rt.length){var Sr=an(ce,Rt.length);fh(Oe,rr,new To(Sr,Sr));break}}}var Fs=null;function tc(re){Fs=re}function Tf(re,ce,Ee,be,Oe){var qe=re.doc;re.display.shift=!1,be||(be=qe.sel);var vt=+new Date-200,Mt=Oe=="paste"||re.state.pasteIncoming>vt,kt=Yi(ce),Rt=null;if(Mt&&be.ranges.length>1)if(Fs&&Fs.text.join(`
`)==ce){if(be.ranges.length%Fs.text.length==0){Rt=[];for(var en=0;en<Fs.text.length;en++)Rt.push(qe.splitLines(Fs.text[en]))}}else kt.length==be.ranges.length&&re.options.pasteLinesPerSelection&&(Rt=yt(kt,function(Fr){return[Fr]}));for(var zt=re.curOp.updateInput,wn=be.ranges.length-1;wn>=0;wn--){var gn=be.ranges[wn],rr=gn.from(),sr=gn.to();gn.empty()&&(Ee&&Ee>0?rr=an(rr.line,rr.ch-Ee):re.state.overwrite&&!Mt?sr=an(sr.line,Math.min(er(qe,sr.line).text.length,sr.ch+mt(kt).length)):Mt&&Fs&&Fs.lineWise&&Fs.text.join(`
`)==kt.join(`
`)&&(rr=sr=an(rr.line,0)));var Sr={from:rr,to:sr,text:Rt?Rt[wn%Rt.length]:kt,origin:Oe||(Mt?"paste":re.state.cutIncoming>vt?"cut":"+input")};dh(re.doc,Sr),Dr(re,"inputRead",re,Sr)}ce&&!Mt&&Bp(re,ce),Nl(re),re.curOp.updateInput<2&&(re.curOp.updateInput=zt),re.curOp.typing=!0,re.state.pasteIncoming=re.state.cutIncoming=-1}function Dp(re,ce){var Ee=re.clipboardData&&re.clipboardData.getData("Text");if(Ee)return re.preventDefault(),!ce.isReadOnly()&&!ce.options.disableInput&&So(ce,function(){return Tf(ce,Ee,0,null,"paste")}),!0}function Bp(re,ce){if(!(!re.options.electricChars||!re.options.smartIndent))for(var Ee=re.doc.sel,be=Ee.ranges.length-1;be>=0;be--){var Oe=Ee.ranges[be];if(!(Oe.head.ch>100||be&&Ee.ranges[be-1].head.line==Oe.head.line)){var qe=re.getModeAt(Oe.head),vt=!1;if(qe.electricChars){for(var Mt=0;Mt<qe.electricChars.length;Mt++)if(ce.indexOf(qe.electricChars.charAt(Mt))>-1){vt=Ba(re,Oe.head.line,"smart");break}}else qe.electricInput&&qe.electricInput.test(er(re.doc,Oe.head.line).text.slice(0,Oe.head.ch))&&(vt=Ba(re,Oe.head.line,"smart"));vt&&Dr(re,"electricInput",re,Oe.head.line)}}}function Ip(re){for(var ce=[],Ee=[],be=0;be<re.doc.sel.ranges.length;be++){var Oe=re.doc.sel.ranges[be].head.line,qe={anchor:an(Oe,0),head:an(Oe+1,0)};Ee.push(qe),ce.push(re.getRange(qe.anchor,qe.head))}return{text:ce,ranges:Ee}}function Rp(re,ce,Ee,be){re.setAttribute("autocorrect",Ee?"":"off"),re.setAttribute("autocapitalize",be?"":"off"),re.setAttribute("spellcheck",!!ce)}function _p(){var re=Ae("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),ce=Ae("div",[re],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return me?re.style.width="1000px":re.setAttribute("wrap","off"),de&&(re.style.border="1px solid black"),Rp(re),ce}function mh(re){var ce=re.optionHandlers,Ee=re.helpers={};re.prototype={constructor:re,focus:function(){window.focus(),this.display.input.focus()},setOption:function(be,Oe){var qe=this.options,vt=qe[be];qe[be]==Oe&&be!="mode"||(qe[be]=Oe,ce.hasOwnProperty(be)&&Da(this,ce[be])(this,Oe,vt),tn(this,"optionChange",this,be))},getOption:function(be){return this.options[be]},getDoc:function(){return this.doc},addKeyMap:function(be,Oe){this.state.keyMaps[Oe?"push":"unshift"]($h(be))},removeKeyMap:function(be){for(var Oe=this.state.keyMaps,qe=0;qe<Oe.length;++qe)if(Oe[qe]==be||Oe[qe].name==be)return Oe.splice(qe,1),!0},addOverlay:Ua(function(be,Oe){var qe=be.token?be:re.getMode(this.options,be);if(qe.startState)throw new Error("Overlays may not be stateful.");tt(this.state.overlays,{mode:qe,modeSpec:be,opaque:Oe&&Oe.opaque,priority:Oe&&Oe.priority||0},function(vt){return vt.priority}),this.state.modeGen++,Fo(this)}),removeOverlay:Ua(function(be){for(var Oe=this.state.overlays,qe=0;qe<Oe.length;++qe){var vt=Oe[qe].modeSpec;if(vt==be||typeof be=="string"&&vt.name==be){Oe.splice(qe,1),this.state.modeGen++,Fo(this);return}}}),indentLine:Ua(function(be,Oe,qe){typeof Oe!="string"&&typeof Oe!="number"&&(Oe==null?Oe=this.options.smartIndent?"smart":"prev":Oe=Oe?"add":"subtract"),_n(this.doc,be)&&Ba(this,be,Oe,qe)}),indentSelection:Ua(function(be){for(var Oe=this.doc.sel.ranges,qe=-1,vt=0;vt<Oe.length;vt++){var Mt=Oe[vt];if(Mt.empty())Mt.head.line>qe&&(Ba(this,Mt.head.line,be,!0),qe=Mt.head.line,vt==this.doc.sel.primIndex&&Nl(this));else{var kt=Mt.from(),Rt=Mt.to(),en=Math.max(qe,kt.line);qe=Math.min(this.lastLine(),Rt.line-(Rt.ch?0:1))+1;for(var zt=en;zt<qe;++zt)Ba(this,zt,be);var wn=this.doc.sel.ranges;kt.ch==0&&Oe.length==wn.length&&wn[vt].from().ch>0&&fh(this.doc,vt,new To(kt,wn[vt].to()),gt)}}}),getTokenAt:function(be,Oe){return xr(this,be,Oe)},getLineTokens:function(be,Oe){return xr(this,an(be),Oe,!0)},getTokenTypeAt:function(be){be=hr(this.doc,be);var Oe=qr(this,er(this.doc,be.line)),qe=0,vt=(Oe.length-1)/2,Mt=be.ch,kt;if(Mt==0)kt=Oe[2];else for(;;){var Rt=qe+vt>>1;if((Rt?Oe[Rt*2-1]:0)>=Mt)vt=Rt;else if(Oe[Rt*2+1]<Mt)qe=Rt+1;else{kt=Oe[Rt*2+2];break}}var en=kt?kt.indexOf("overlay "):-1;return en<0?kt:en==0?null:kt.slice(0,en-1)},getModeAt:function(be){var Oe=this.doc.mode;return Oe.innerMode?re.innerMode(Oe,this.getTokenAt(be).state).mode:Oe},getHelper:function(be,Oe){return this.getHelpers(be,Oe)[0]},getHelpers:function(be,Oe){var qe=[];if(!Ee.hasOwnProperty(Oe))return qe;var vt=Ee[Oe],Mt=this.getModeAt(be);if(typeof Mt[Oe]=="string")vt[Mt[Oe]]&&qe.push(vt[Mt[Oe]]);else if(Mt[Oe])for(var kt=0;kt<Mt[Oe].length;kt++){var Rt=vt[Mt[Oe][kt]];Rt&&qe.push(Rt)}else Mt.helperType&&vt[Mt.helperType]?qe.push(vt[Mt.helperType]):vt[Mt.name]&&qe.push(vt[Mt.name]);for(var en=0;en<vt._global.length;en++){var zt=vt._global[en];zt.pred(Mt,this)&&xt(qe,zt.val)==-1&&qe.push(zt.val)}return qe},getStateAfter:function(be,Oe){var qe=this.doc;return be=Wn(qe,be==null?qe.first+qe.size-1:be),ki(this,be+1,Oe).state},cursorCoords:function(be,Oe){var qe,vt=this.doc.sel.primary();return be==null?qe=vt.head:typeof be=="object"?qe=hr(this.doc,be):qe=be?vt.from():vt.to(),Gi(this,qe,Oe||"page")},charCoords:function(be,Oe){return Ni(this,hr(this.doc,be),Oe||"page")},coordsChar:function(be,Oe){return be=uo(this,be,Oe||"page"),qo(this,be.left,be.top)},lineAtHeight:function(be,Oe){return be=uo(this,{top:be,left:0},Oe||"page").top,vn(this.doc,be+this.display.viewOffset)},heightAtLine:function(be,Oe,qe){var vt=!1,Mt;if(typeof be=="number"){var kt=this.doc.first+this.doc.size-1;be<this.doc.first?be=this.doc.first:be>kt&&(be=kt,vt=!0),Mt=er(this.doc,be)}else Mt=be;return sa(this,Mt,{top:0,left:0},Oe||"page",qe||vt).top+(vt?this.doc.height-kr(Mt):0)},defaultTextHeight:function(){return Us(this.display)},defaultCharWidth:function(){return Wl(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(be,Oe,qe,vt,Mt){var kt=this.display;be=Gi(this,hr(this.doc,be));var Rt=be.bottom,en=be.left;if(Oe.style.position="absolute",Oe.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Oe),kt.sizer.appendChild(Oe),vt=="over")Rt=be.top;else if(vt=="above"||vt=="near"){var zt=Math.max(kt.wrapper.clientHeight,this.doc.height),wn=Math.max(kt.sizer.clientWidth,kt.lineSpace.clientWidth);(vt=="above"||be.bottom+Oe.offsetHeight>zt)&&be.top>Oe.offsetHeight?Rt=be.top-Oe.offsetHeight:be.bottom+Oe.offsetHeight<=zt&&(Rt=be.bottom),en+Oe.offsetWidth>wn&&(en=wn-Oe.offsetWidth)}Oe.style.top=Rt+"px",Oe.style.left=Oe.style.right="",Mt=="right"?(en=kt.sizer.clientWidth-Oe.offsetWidth,Oe.style.right="0px"):(Mt=="left"?en=0:Mt=="middle"&&(en=(kt.sizer.clientWidth-Oe.offsetWidth)/2),Oe.style.left=en+"px"),qe&&ih(this,{left:en,top:Rt,right:en+Oe.offsetWidth,bottom:Rt+Oe.offsetHeight})},triggerOnKeyDown:Ua(kp),triggerOnKeyPress:Ua(Yl),triggerOnKeyUp:Mp,triggerOnMouseDown:Ua($l),execCommand:function(be){if(ph.hasOwnProperty(be))return ph[be].call(null,this)},triggerElectric:Ua(function(be){Bp(this,be)}),findPosH:function(be,Oe,qe,vt){var Mt=1;Oe<0&&(Mt=-1,Oe=-Oe);for(var kt=hr(this.doc,be),Rt=0;Rt<Oe&&(kt=Mf(this.doc,kt,Mt,qe,vt),!kt.hitSide);++Rt);return kt},moveH:Ua(function(be,Oe){var qe=this;this.extendSelectionsBy(function(vt){return qe.display.shift||qe.doc.extend||vt.empty()?Mf(qe.doc,vt.head,be,Oe,qe.options.rtlMoveVisually):be<0?vt.from():vt.to()},ht)}),deleteH:Ua(function(be,Oe){var qe=this.doc.sel,vt=this.doc;qe.somethingSelected()?vt.replaceSelection("",null,"+delete"):Ks(this,function(Mt){var kt=Mf(vt,Mt.head,be,Oe,!1);return be<0?{from:kt,to:Mt.head}:{from:Mt.head,to:kt}})}),findPosV:function(be,Oe,qe,vt){var Mt=1,kt=vt;Oe<0&&(Mt=-1,Oe=-Oe);for(var Rt=hr(this.doc,be),en=0;en<Oe;++en){var zt=Gi(this,Rt,"div");if(kt==null?kt=zt.left:zt.left=kt,Rt=vh(this,zt,Mt,qe),Rt.hitSide)break}return Rt},moveV:Ua(function(be,Oe){var qe=this,vt=this.doc,Mt=[],kt=!this.display.shift&&!vt.extend&&vt.sel.somethingSelected();if(vt.extendSelectionsBy(function(en){if(kt)return be<0?en.from():en.to();var zt=Gi(qe,en.head,"div");en.goalColumn!=null&&(zt.left=en.goalColumn),Mt.push(zt.left);var wn=vh(qe,zt,be,Oe);return Oe=="page"&&en==vt.sel.primary()&&_h(qe,Ni(qe,wn,"div").top-zt.top),wn},ht),Mt.length)for(var Rt=0;Rt<vt.sel.ranges.length;Rt++)vt.sel.ranges[Rt].goalColumn=Mt[Rt]}),findWordAt:function(be){var Oe=this.doc,qe=er(Oe,be.line).text,vt=be.ch,Mt=be.ch;if(qe){var kt=this.getHelper(be,"wordChars");(be.sticky=="before"||Mt==qe.length)&&vt?--vt:++Mt;for(var Rt=qe.charAt(vt),en=rt(Rt,kt)?function(zt){return rt(zt,kt)}:/\s/.test(Rt)?function(zt){return/\s/.test(zt)}:function(zt){return!/\s/.test(zt)&&!rt(zt)};vt>0&&en(qe.charAt(vt-1));)--vt;for(;Mt<qe.length&&en(qe.charAt(Mt));)++Mt}return new To(an(be.line,vt),an(be.line,Mt))},toggleOverwrite:function(be){be!=null&&be==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ke(this.display.cursorDiv,"CodeMirror-overwrite"):Be(this.display.cursorDiv,"CodeMirror-overwrite"),tn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ue()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ua(function(be,Oe){Iu(this,be,Oe)}),getScrollInfo:function(){var be=this.display.scroller;return{left:be.scrollLeft,top:be.scrollTop,height:be.scrollHeight-fo(this)-this.display.barHeight,width:be.scrollWidth-fo(this)-this.display.barWidth,clientHeight:Gs(this),clientWidth:os(this)}},scrollIntoView:Ua(function(be,Oe){be==null?(be={from:this.doc.sel.primary().head,to:null},Oe==null&&(Oe=this.options.cursorScrollMargin)):typeof be=="number"?be={from:an(be,0),to:null}:be.from==null&&(be={from:be,to:null}),be.to||(be.to=be.from),be.margin=Oe||0,be.from.line!=null?lo(this,be):zh(this,be.from,be.to,be.margin)}),setSize:Ua(function(be,Oe){var qe=this,vt=function(kt){return typeof kt=="number"||/^\d+$/.test(String(kt))?kt+"px":kt};be!=null&&(this.display.wrapper.style.width=vt(be)),Oe!=null&&(this.display.wrapper.style.height=vt(Oe)),this.options.lineWrapping&&iu(this);var Mt=this.display.viewFrom;this.doc.iter(Mt,this.display.viewTo,function(kt){if(kt.widgets){for(var Rt=0;Rt<kt.widgets.length;Rt++)if(kt.widgets[Rt].noHScroll){Ri(qe,Mt,"widget");break}}++Mt}),this.curOp.forceUpdate=!0,tn(this,"refresh",this)}),operation:function(be){return So(this,be)},startOperation:function(){return rl(this)},endOperation:function(){return Al(this)},refresh:Ua(function(){var be=this.display.cachedTextHeight;Fo(this),this.curOp.forceUpdate=!0,ou(this),Iu(this,this.doc.scrollLeft,this.doc.scrollTop),sh(this.display),(be==null||Math.abs(be-Us(this.display))>.5||this.options.lineWrapping)&&fi(this),tn(this,"refresh",this)}),swapDoc:Ua(function(be){var Oe=this.doc;return Oe.cm=null,this.state.selectingText&&this.state.selectingText(),rd(this,be),ou(this),this.display.input.reset(),Iu(this,be.scrollLeft,be.scrollTop),this.curOp.forceScroll=!0,Dr(this,"swapDoc",this,Oe),Oe}),phrase:function(be){var Oe=this.options.phrases;return Oe&&Object.prototype.hasOwnProperty.call(Oe,be)?Oe[be]:be},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ln(re),re.registerHelper=function(be,Oe,qe){Ee.hasOwnProperty(be)||(Ee[be]=re[be]={_global:[]}),Ee[be][Oe]=qe},re.registerGlobalHelper=function(be,Oe,qe,vt){re.registerHelper(be,Oe,vt),Ee[be]._global.push({pred:qe,val:vt})}}function Mf(re,ce,Ee,be,Oe){var qe=ce,vt=Ee,Mt=er(re,ce.line),kt=Oe&&re.direction=="rtl"?-Ee:Ee;function Rt(){var Qr=ce.line+kt;return Qr<re.first||Qr>=re.first+re.size?!1:(ce=new an(Qr,ce.ch,ce.sticky),Mt=er(re,Qr))}function en(Qr){var Kr;if(be=="codepoint"){var ui=Mt.text.charCodeAt(ce.ch+(be>0?0:-1));isNaN(ui)?Kr=null:Kr=new an(ce.line,Math.max(0,Math.min(Mt.text.length,ce.ch+Ee*(ui>=55296&&ui<56320?2:1))),-Ee)}else Oe?Kr=cd(re.cm,Mt,ce,Ee):Kr=xa(Mt,ce,Ee);if(Kr==null)if(!Qr&&Rt())ce=Ef(Oe,re.cm,Mt,ce.line,kt);else return!1;else ce=Kr;return!0}if(be=="char"||be=="codepoint")en();else if(be=="column")en(!0);else if(be=="word"||be=="group")for(var zt=null,wn=be=="group",gn=re.cm&&re.cm.getHelper(ce,"wordChars"),rr=!0;!(Ee<0&&!en(!rr));rr=!1){var sr=Mt.text.charAt(ce.ch)||`
`,Sr=rt(sr,gn)?"w":wn&&sr==`
`?"n":!wn||/\s/.test(sr)?null:"p";if(wn&&!rr&&!Sr&&(Sr="s"),zt&&zt!=Sr){Ee<0&&(Ee=1,en(),ce.sticky="after");break}if(Sr&&(zt=Sr),Ee>0&&!en(!rr))break}var Fr=Sf(re,ce,qe,vt,!0);return Kn(qe,Fr)&&(Fr.hitSide=!0),Fr}function vh(re,ce,Ee,be){var Oe=re.doc,qe=ce.left,vt;if(be=="page"){var Mt=Math.min(re.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),kt=Math.max(Mt-.5*Us(re.display),3);vt=(Ee>0?ce.bottom:ce.top)+Ee*kt}else be=="line"&&(vt=Ee>0?ce.bottom+3:ce.top-3);for(var Rt;Rt=qo(re,qe,vt),!!Rt.outside;){if(Ee<0?vt<=0:vt>=Oe.height){Rt.hitSide=!0;break}vt+=Ee*5}return Rt}var Do=function(re){this.cm=re,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new nt,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Do.prototype.init=function(re){var ce=this,Ee=this,be=Ee.cm,Oe=Ee.div=re.lineDiv;Rp(Oe,be.options.spellcheck,be.options.autocorrect,be.options.autocapitalize);function qe(Mt){for(var kt=Mt.target;kt;kt=kt.parentNode){if(kt==Oe)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(kt.className))break}return!1}$t(Oe,"paste",function(Mt){!qe(Mt)||Wt(be,Mt)||Dp(Mt,be)||fe<=11&&setTimeout(Da(be,function(){return ce.updateFromDOM()}),20)}),$t(Oe,"compositionstart",function(Mt){ce.composing={data:Mt.data,done:!1}}),$t(Oe,"compositionupdate",function(Mt){ce.composing||(ce.composing={data:Mt.data,done:!1})}),$t(Oe,"compositionend",function(Mt){ce.composing&&(Mt.data!=ce.composing.data&&ce.readFromDOMSoon(),ce.composing.done=!0)}),$t(Oe,"touchstart",function(){return Ee.forceCompositionEnd()}),$t(Oe,"input",function(){ce.composing||ce.readFromDOMSoon()});function vt(Mt){if(!(!qe(Mt)||Wt(be,Mt))){if(be.somethingSelected())tc({lineWise:!1,text:be.getSelections()}),Mt.type=="cut"&&be.replaceSelection("",null,"cut");else if(be.options.lineWiseCopyCut){var kt=Ip(be);tc({lineWise:!0,text:kt.text}),Mt.type=="cut"&&be.operation(function(){be.setSelections(kt.ranges,0,gt),be.replaceSelection("",null,"cut")})}else return;if(Mt.clipboardData){Mt.clipboardData.clearData();var Rt=Fs.text.join(`
`);if(Mt.clipboardData.setData("Text",Rt),Mt.clipboardData.getData("Text")==Rt){Mt.preventDefault();return}}var en=_p(),zt=en.firstChild;be.display.lineSpace.insertBefore(en,be.display.lineSpace.firstChild),zt.value=Fs.text.join(`
`);var wn=document.activeElement;ut(zt),setTimeout(function(){be.display.lineSpace.removeChild(en),wn.focus(),wn==Oe&&Ee.showPrimarySelection()},50)}}$t(Oe,"copy",vt),$t(Oe,"cut",vt)},Do.prototype.screenReaderLabelChanged=function(re){re?this.div.setAttribute("aria-label",re):this.div.removeAttribute("aria-label")},Do.prototype.prepareSelection=function(){var re=au(this.cm,!1);return re.focus=document.activeElement==this.div,re},Do.prototype.showSelection=function(re,ce){!re||!this.cm.display.view.length||((re.focus||ce)&&this.showPrimarySelection(),this.showMultipleSelections(re))},Do.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Do.prototype.showPrimarySelection=function(){var re=this.getSelection(),ce=this.cm,Ee=ce.doc.sel.primary(),be=Ee.from(),Oe=Ee.to();if(ce.display.viewTo==ce.display.viewFrom||be.line>=ce.display.viewTo||Oe.line<ce.display.viewFrom){re.removeAllRanges();return}var qe=Lf(ce,re.anchorNode,re.anchorOffset),vt=Lf(ce,re.focusNode,re.focusOffset);if(!(qe&&!qe.bad&&vt&&!vt.bad&&Un($n(qe,vt),be)==0&&Un(ur(qe,vt),Oe)==0)){var Mt=ce.display.view,kt=be.line>=ce.display.viewFrom&&wd(ce,be)||{node:Mt[0].measure.map[2],offset:0},Rt=Oe.line<ce.display.viewTo&&wd(ce,Oe);if(!Rt){var en=Mt[Mt.length-1].measure,zt=en.maps?en.maps[en.maps.length-1]:en.map;Rt={node:zt[zt.length-1],offset:zt[zt.length-2]-zt[zt.length-3]}}if(!kt||!Rt){re.removeAllRanges();return}var wn=re.rangeCount&&re.getRangeAt(0),gn;try{gn=We(kt.node,kt.offset,Rt.offset,Rt.node)}catch(rr){}gn&&(!pt&&ce.state.focused?(re.collapse(kt.node,kt.offset),gn.collapsed||(re.removeAllRanges(),re.addRange(gn))):(re.removeAllRanges(),re.addRange(gn)),wn&&re.anchorNode==null?re.addRange(wn):pt&&this.startGracePeriod()),this.rememberSelection()}},Do.prototype.startGracePeriod=function(){var re=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){re.gracePeriod=!1,re.selectionChanged()&&re.cm.operation(function(){return re.cm.curOp.selectionChanged=!0})},20)},Do.prototype.showMultipleSelections=function(re){Ne(this.cm.display.cursorDiv,re.cursors),Ne(this.cm.display.selectionDiv,re.selection)},Do.prototype.rememberSelection=function(){var re=this.getSelection();this.lastAnchorNode=re.anchorNode,this.lastAnchorOffset=re.anchorOffset,this.lastFocusNode=re.focusNode,this.lastFocusOffset=re.focusOffset},Do.prototype.selectionInEditor=function(){var re=this.getSelection();if(!re.rangeCount)return!1;var ce=re.getRangeAt(0).commonAncestorContainer;return Ye(this.div,ce)},Do.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Do.prototype.blur=function(){this.div.blur()},Do.prototype.getField=function(){return this.div},Do.prototype.supportsTouch=function(){return!0},Do.prototype.receivedFocus=function(){var re=this;this.selectionInEditor()?this.pollSelection():So(this.cm,function(){return re.cm.curOp.selectionChanged=!0});function ce(){re.cm.state.focused&&(re.pollSelection(),re.polling.set(re.cm.options.pollInterval,ce))}this.polling.set(this.cm.options.pollInterval,ce)},Do.prototype.selectionChanged=function(){var re=this.getSelection();return re.anchorNode!=this.lastAnchorNode||re.anchorOffset!=this.lastAnchorOffset||re.focusNode!=this.lastFocusNode||re.focusOffset!=this.lastFocusOffset},Do.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var re=this.getSelection(),ce=this.cm;if(z&&Ce&&this.cm.display.gutterSpecs.length&&zp(re.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var Ee=Lf(ce,re.anchorNode,re.anchorOffset),be=Lf(ce,re.focusNode,re.focusOffset);Ee&&be&&So(ce,function(){ps(ce.doc,Ru(Ee,be),gt),(Ee.bad||be.bad)&&(ce.curOp.selectionChanged=!0)})}}},Do.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var re=this.cm,ce=re.display,Ee=re.doc.sel.primary(),be=Ee.from(),Oe=Ee.to();if(be.ch==0&&be.line>re.firstLine()&&(be=an(be.line-1,er(re.doc,be.line-1).length)),Oe.ch==er(re.doc,Oe.line).text.length&&Oe.line<re.lastLine()&&(Oe=an(Oe.line+1,0)),be.line<ce.viewFrom||Oe.line>ce.viewTo-1)return!1;var qe,vt,Mt;be.line==ce.viewFrom||(qe=js(re,be.line))==0?(vt=Ot(ce.view[0].line),Mt=ce.view[0].node):(vt=Ot(ce.view[qe].line),Mt=ce.view[qe-1].node.nextSibling);var kt=js(re,Oe.line),Rt,en;if(kt==ce.view.length-1?(Rt=ce.viewTo-1,en=ce.lineDiv.lastChild):(Rt=Ot(ce.view[kt+1].line)-1,en=ce.view[kt+1].node.previousSibling),!Mt)return!1;for(var zt=re.doc.splitLines(Uc(re,Mt,en,vt,Rt)),wn=rn(re.doc,an(vt,0),an(Rt,er(re.doc,Rt).text.length));zt.length>1&&wn.length>1;)if(mt(zt)==mt(wn))zt.pop(),wn.pop(),Rt--;else if(zt[0]==wn[0])zt.shift(),wn.shift(),vt++;else break;for(var gn=0,rr=0,sr=zt[0],Sr=wn[0],Fr=Math.min(sr.length,Sr.length);gn<Fr&&sr.charCodeAt(gn)==Sr.charCodeAt(gn);)++gn;for(var Qr=mt(zt),Kr=mt(wn),ui=Math.min(Qr.length-(zt.length==1?gn:0),Kr.length-(wn.length==1?gn:0));rr<ui&&Qr.charCodeAt(Qr.length-rr-1)==Kr.charCodeAt(Kr.length-rr-1);)++rr;if(zt.length==1&&wn.length==1&&vt==be.line)for(;gn&&gn>be.ch&&Qr.charCodeAt(Qr.length-rr-1)==Kr.charCodeAt(Kr.length-rr-1);)gn--,rr++;zt[zt.length-1]=Qr.slice(0,Qr.length-rr).replace(/^\u200b+/,""),zt[0]=zt[0].slice(gn).replace(/\u200b+$/,"");var Ai=an(vt,gn),Gr=an(Rt,wn.length?mt(wn).length-rr:0);if(zt.length>1||zt[0]||Un(Ai,Gr))return Zh(re.doc,zt,Ai,Gr,"+input"),!0},Do.prototype.ensurePolled=function(){this.forceCompositionEnd()},Do.prototype.reset=function(){this.forceCompositionEnd()},Do.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Do.prototype.readFromDOMSoon=function(){var re=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(re.readDOMTimeout=null,re.composing)if(re.composing.done)re.composing=null;else return;re.updateFromDOM()},80))},Do.prototype.updateFromDOM=function(){var re=this;(this.cm.isReadOnly()||!this.pollContent())&&So(this.cm,function(){return Fo(re.cm)})},Do.prototype.setUneditable=function(re){re.contentEditable="false"},Do.prototype.onKeyPress=function(re){re.charCode==0||this.composing||(re.preventDefault(),this.cm.isReadOnly()||Da(this.cm,Tf)(this.cm,String.fromCharCode(re.charCode==null?re.keyCode:re.charCode),0))},Do.prototype.readOnlyChanged=function(re){this.div.contentEditable=String(re!="nocursor")},Do.prototype.onContextMenu=function(){},Do.prototype.resetPosition=function(){},Do.prototype.needsContentAttribute=!0;function wd(re,ce){var Ee=Nu(re,ce.line);if(!Ee||Ee.hidden)return null;var be=er(re.doc,ce.line),Oe=Wo(Ee,be,ce.line),qe=Kt(be,re.doc.direction),vt="left";if(qe){var Mt=Lt(qe,ce.ch);vt=Mt%2?"right":"left"}var kt=nh(Oe.map,ce.ch,vt);return kt.offset=kt.collapse=="right"?kt.end:kt.start,kt}function zp(re){for(var ce=re;ce;ce=ce.parentNode)if(/CodeMirror-gutter-wrapper/.test(ce.className))return!0;return!1}function Gc(re,ce){return ce&&(re.bad=!0),re}function Uc(re,ce,Ee,be,Oe){var qe="",vt=!1,Mt=re.doc.lineSeparator(),kt=!1;function Rt(gn){return function(rr){return rr.id==gn}}function en(){vt&&(qe+=Mt,kt&&(qe+=Mt),vt=kt=!1)}function zt(gn){gn&&(en(),qe+=gn)}function wn(gn){if(gn.nodeType==1){var rr=gn.getAttribute("cm-text");if(rr){zt(rr);return}var sr=gn.getAttribute("cm-marker"),Sr;if(sr){var Fr=re.findMarks(an(be,0),an(Oe+1,0),Rt(+sr));Fr.length&&(Sr=Fr[0].find(0))&&zt(rn(re.doc,Sr.from,Sr.to).join(Mt));return}if(gn.getAttribute("contenteditable")=="false")return;var Qr=/^(pre|div|p|li|table|br)$/i.test(gn.nodeName);if(!/^br$/i.test(gn.nodeName)&&gn.textContent.length==0)return;Qr&&en();for(var Kr=0;Kr<gn.childNodes.length;Kr++)wn(gn.childNodes[Kr]);/^(pre|p)$/i.test(gn.nodeName)&&(kt=!0),Qr&&(vt=!0)}else gn.nodeType==3&&zt(gn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;wn(ce),ce!=Ee;)ce=ce.nextSibling,kt=!1;return qe}function Lf(re,ce,Ee){var be;if(ce==re.display.lineDiv){if(be=re.display.lineDiv.childNodes[Ee],!be)return Gc(re.clipPos(an(re.display.viewTo-1)),!0);ce=null,Ee=0}else for(be=ce;;be=be.parentNode){if(!be||be==re.display.lineDiv)return null;if(be.parentNode&&be.parentNode==re.display.lineDiv)break}for(var Oe=0;Oe<re.display.view.length;Oe++){var qe=re.display.view[Oe];if(qe.node==be)return am(qe,ce,Ee)}}function am(re,ce,Ee){var be=re.text.firstChild,Oe=!1;if(!ce||!Ye(be,ce))return Gc(an(Ot(re.line),0),!0);if(ce==be&&(Oe=!0,ce=be.childNodes[Ee],Ee=0,!ce)){var qe=re.rest?mt(re.rest):re.line;return Gc(an(Ot(qe),qe.text.length),Oe)}var vt=ce.nodeType==3?ce:null,Mt=ce;for(!vt&&ce.childNodes.length==1&&ce.firstChild.nodeType==3&&(vt=ce.firstChild,Ee&&(Ee=vt.nodeValue.length));Mt.parentNode!=be;)Mt=Mt.parentNode;var kt=re.measure,Rt=kt.maps;function en(Sr,Fr,Qr){for(var Kr=-1;Kr<(Rt?Rt.length:0);Kr++)for(var ui=Kr<0?kt.map:Rt[Kr],Ai=0;Ai<ui.length;Ai+=3){var Gr=ui[Ai+2];if(Gr==Sr||Gr==Fr){var Ji=Ot(Kr<0?re.line:re.rest[Kr]),Xo=ui[Ai]+Qr;return(Qr<0||Gr!=Sr)&&(Xo=ui[Ai+(Qr?1:0)]),an(Ji,Xo)}}}var zt=en(vt,Mt,Ee);if(zt)return Gc(zt,Oe);for(var wn=Mt.nextSibling,gn=vt?vt.nodeValue.length-Ee:0;wn;wn=wn.nextSibling){if(zt=en(wn,wn.firstChild,0),zt)return Gc(an(zt.line,zt.ch-gn),Oe);gn+=wn.textContent.length}for(var rr=Mt.previousSibling,sr=Ee;rr;rr=rr.previousSibling){if(zt=en(rr,rr.firstChild,-1),zt)return Gc(an(zt.line,zt.ch+sr),Oe);sr+=rr.textContent.length}}var Ta=function(re){this.cm=re,this.prevInput="",this.pollingFast=!1,this.polling=new nt,this.hasSelection=!1,this.composing=null};Ta.prototype.init=function(re){var ce=this,Ee=this,be=this.cm;this.createField(re);var Oe=this.textarea;re.wrapper.insertBefore(this.wrapper,re.wrapper.firstChild),de&&(Oe.style.width="0px"),$t(Oe,"input",function(){De&&fe>=9&&ce.hasSelection&&(ce.hasSelection=null),Ee.poll()}),$t(Oe,"paste",function(vt){Wt(be,vt)||Dp(vt,be)||(be.state.pasteIncoming=+new Date,Ee.fastPoll())});function qe(vt){if(!Wt(be,vt)){if(be.somethingSelected())tc({lineWise:!1,text:be.getSelections()});else if(be.options.lineWiseCopyCut){var Mt=Ip(be);tc({lineWise:!0,text:Mt.text}),vt.type=="cut"?be.setSelections(Mt.ranges,null,gt):(Ee.prevInput="",Oe.value=Mt.text.join(`
`),ut(Oe))}else return;vt.type=="cut"&&(be.state.cutIncoming=+new Date)}}$t(Oe,"cut",qe),$t(Oe,"copy",qe),$t(re.scroller,"paste",function(vt){if(!(jo(re,vt)||Wt(be,vt))){if(!Oe.dispatchEvent){be.state.pasteIncoming=+new Date,Ee.focus();return}var Mt=new Event("paste");Mt.clipboardData=vt.clipboardData,Oe.dispatchEvent(Mt)}}),$t(re.lineSpace,"selectstart",function(vt){jo(re,vt)||Vn(vt)}),$t(Oe,"compositionstart",function(){var vt=be.getCursor("from");Ee.composing&&Ee.composing.range.clear(),Ee.composing={start:vt,range:be.markText(vt,be.getCursor("to"),{className:"CodeMirror-composing"})}}),$t(Oe,"compositionend",function(){Ee.composing&&(Ee.poll(),Ee.composing.range.clear(),Ee.composing=null)})},Ta.prototype.createField=function(re){this.wrapper=_p(),this.textarea=this.wrapper.firstChild},Ta.prototype.screenReaderLabelChanged=function(re){re?this.textarea.setAttribute("aria-label",re):this.textarea.removeAttribute("aria-label")},Ta.prototype.prepareSelection=function(){var re=this.cm,ce=re.display,Ee=re.doc,be=au(re);if(re.options.moveInputWithCursor){var Oe=Gi(re,Ee.sel.primary().head,"div"),qe=ce.wrapper.getBoundingClientRect(),vt=ce.lineDiv.getBoundingClientRect();be.teTop=Math.max(0,Math.min(ce.wrapper.clientHeight-10,Oe.top+vt.top-qe.top)),be.teLeft=Math.max(0,Math.min(ce.wrapper.clientWidth-10,Oe.left+vt.left-qe.left))}return be},Ta.prototype.showSelection=function(re){var ce=this.cm,Ee=ce.display;Ne(Ee.cursorDiv,re.cursors),Ne(Ee.selectionDiv,re.selection),re.teTop!=null&&(this.wrapper.style.top=re.teTop+"px",this.wrapper.style.left=re.teLeft+"px")},Ta.prototype.reset=function(re){if(!(this.contextMenuPending||this.composing)){var ce=this.cm;if(ce.somethingSelected()){this.prevInput="";var Ee=ce.getSelection();this.textarea.value=Ee,ce.state.focused&&ut(this.textarea),De&&fe>=9&&(this.hasSelection=Ee)}else re||(this.prevInput=this.textarea.value="",De&&fe>=9&&(this.hasSelection=null))}},Ta.prototype.getField=function(){return this.textarea},Ta.prototype.supportsTouch=function(){return!1},Ta.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ee||Ue()!=this.textarea))try{this.textarea.focus()}catch(re){}},Ta.prototype.blur=function(){this.textarea.blur()},Ta.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ta.prototype.receivedFocus=function(){this.slowPoll()},Ta.prototype.slowPoll=function(){var re=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){re.poll(),re.cm.state.focused&&re.slowPoll()})},Ta.prototype.fastPoll=function(){var re=!1,ce=this;ce.pollingFast=!0;function Ee(){var be=ce.poll();!be&&!re?(re=!0,ce.polling.set(60,Ee)):(ce.pollingFast=!1,ce.slowPoll())}ce.polling.set(20,Ee)},Ta.prototype.poll=function(){var re=this,ce=this.cm,Ee=this.textarea,be=this.prevInput;if(this.contextMenuPending||!ce.state.focused||et(Ee)&&!be&&!this.composing||ce.isReadOnly()||ce.options.disableInput||ce.state.keySeq)return!1;var Oe=Ee.value;if(Oe==be&&!ce.somethingSelected())return!1;if(De&&fe>=9&&this.hasSelection===Oe||ae&&/[\uf700-\uf7ff]/.test(Oe))return ce.display.input.reset(),!1;if(ce.doc.sel==ce.display.selForContextMenu){var qe=Oe.charCodeAt(0);if(qe==8203&&!be&&(be="\u200B"),qe==8666)return this.reset(),this.cm.execCommand("undo")}for(var vt=0,Mt=Math.min(be.length,Oe.length);vt<Mt&&be.charCodeAt(vt)==Oe.charCodeAt(vt);)++vt;return So(ce,function(){Tf(ce,Oe.slice(vt),be.length-vt,null,re.composing?"*compose":null),Oe.length>1e3||Oe.indexOf(`
`)>-1?Ee.value=re.prevInput="":re.prevInput=Oe,re.composing&&(re.composing.range.clear(),re.composing.range=ce.markText(re.composing.start,ce.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ta.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ta.prototype.onKeyPress=function(){De&&fe>=9&&(this.hasSelection=null),this.fastPoll()},Ta.prototype.onContextMenu=function(re){var ce=this,Ee=ce.cm,be=Ee.display,Oe=ce.textarea;ce.contextMenuPending&&ce.contextMenuPending();var qe=Ga(Ee,re),vt=be.scroller.scrollTop;if(!qe||Se)return;var Mt=Ee.options.resetSelectionOnContextMenu;Mt&&Ee.doc.sel.contains(qe)==-1&&Da(Ee,ps)(Ee.doc,Ru(qe),gt);var kt=Oe.style.cssText,Rt=ce.wrapper.style.cssText,en=ce.wrapper.offsetParent.getBoundingClientRect();ce.wrapper.style.cssText="position: static",Oe.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(re.clientY-en.top-5)+"px; left: "+(re.clientX-en.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 zt;me&&(zt=window.scrollY),be.input.focus(),me&&window.scrollTo(null,zt),be.input.reset(),Ee.somethingSelected()||(Oe.value=ce.prevInput=" "),ce.contextMenuPending=gn,be.selForContextMenu=Ee.doc.sel,clearTimeout(be.detectingSelectAll);function wn(){if(Oe.selectionStart!=null){var sr=Ee.somethingSelected(),Sr="\u200B"+(sr?Oe.value:"");Oe.value="\u21DA",Oe.value=Sr,ce.prevInput=sr?"":"\u200B",Oe.selectionStart=1,Oe.selectionEnd=Sr.length,be.selForContextMenu=Ee.doc.sel}}function gn(){if(ce.contextMenuPending==gn&&(ce.contextMenuPending=!1,ce.wrapper.style.cssText=Rt,Oe.style.cssText=kt,De&&fe<9&&be.scrollbars.setScrollTop(be.scroller.scrollTop=vt),Oe.selectionStart!=null)){(!De||De&&fe<9)&&wn();var sr=0,Sr=function(){be.selForContextMenu==Ee.doc.sel&&Oe.selectionStart==0&&Oe.selectionEnd>0&&ce.prevInput=="\u200B"?Da(Ee,Sa)(Ee):sr++<10?be.detectingSelectAll=setTimeout(Sr,500):(be.selForContextMenu=null,be.input.reset())};be.detectingSelectAll=setTimeout(Sr,200)}}if(De&&fe>=9&&wn(),Pe){Lr(re);var rr=function(){ln(window,"mouseup",rr),setTimeout(gn,20)};$t(window,"mouseup",rr)}else setTimeout(gn,50)},Ta.prototype.readOnlyChanged=function(re){re||this.reset(),this.textarea.disabled=re=="nocursor",this.textarea.readOnly=!!re},Ta.prototype.setUneditable=function(){},Ta.prototype.needsContentAttribute=!1;function sm(re,ce){if(ce=ce?wt(ce):{},ce.value=re.value,!ce.tabindex&&re.tabIndex&&(ce.tabindex=re.tabIndex),!ce.placeholder&&re.placeholder&&(ce.placeholder=re.placeholder),ce.autofocus==null){var Ee=Ue();ce.autofocus=Ee==re||re.getAttribute("autofocus")!=null&&Ee==document.body}function be(){re.value=Mt.getValue()}var Oe;if(re.form&&($t(re.form,"submit",be),!ce.leaveSubmitMethodAlone)){var qe=re.form;Oe=qe.submit;try{var vt=qe.submit=function(){be(),qe.submit=Oe,qe.submit(),qe.submit=vt}}catch(kt){}}ce.finishInit=function(kt){kt.save=be,kt.getTextArea=function(){return re},kt.toTextArea=function(){kt.toTextArea=isNaN,be(),re.parentNode.removeChild(kt.getWrapperElement()),re.style.display="",re.form&&(ln(re.form,"submit",be),!ce.leaveSubmitMethodAlone&&typeof re.form.submit=="function"&&(re.form.submit=Oe))}},re.style.display="none";var Mt=vo(function(kt){return re.parentNode.insertBefore(kt,re.nextSibling)},ce);return Mt}function Wc(re){re.off=ln,re.on=$t,re.wheelEventPixels=ol,re.Doc=as,re.splitLines=Yi,re.countColumn=Je,re.findColumn=Et,re.isWordChar=Xe,re.Pass=Ct,re.signal=tn,re.Line=ri,re.changeEnd=hh,re.scrollbarModel=lu,re.Pos=an,re.cmpPos=Un,re.modes=lr,re.mimeModes=wr,re.resolveMode=Ur,re.getMode=on,re.modeExtensions=nn,re.extendMode=Zt,re.copyState=tr,re.startState=Er,re.innerMode=mr,re.commands=ph,re.keyMap=Hs,re.keyName=qg,re.isModifierKey=Dc,re.lookupKey=yl,re.normalizeKeyMap=wp,re.StringStream=An,re.SharedTextMarker=cu,re.TextMarker=Vt,re.LineWidget=Gu,re.e_preventDefault=Vn,re.e_stopPropagation=Or,re.e_stop=Lr,re.addClass=Ke,re.contains=Ye,re.rmClass=Be,re.keyNames=fu}im(vo),mh(vo);var Uu="iter insert remove copy getEditor constructor".split(" ");for(var Nf in as.prototype)as.prototype.hasOwnProperty(Nf)&&xt(Uu,Nf)<0&&(vo.prototype[Nf]=function(re){return function(){return re.apply(this.doc,arguments)}}(as.prototype[Nf]));return Ln(as),vo.inputStyles={textarea:Ta,contenteditable:Do},vo.defineMode=function(re){!vo.defaults.mode&&re!="null"&&(vo.defaults.mode=re),Br.apply(this,arguments)},vo.defineMIME=ro,vo.defineMode("null",function(){return{token:function(re){return re.skipToEnd()}}}),vo.defineMIME("text/plain","null"),vo.defineExtension=function(re,ce){vo.prototype[re]=ce},vo.defineDocExtension=function(re,ce){as.prototype[re]=ce},vo.fromTextArea=sm,Wc(vo),vo.version="5.58.2",vo})},25419:function(mn,dn,st){(function(pt){pt(st(89780),st(15525),st(98101))})(function(pt){"use strict";pt.defineMode("markdown",function(Dt,oe){var Ge=pt.getMode(Dt,"text/html"),De=Ge.name=="null";function fe(Je){if(pt.findModeByName){var nt=pt.findModeByName(Je);nt&&(Je=nt.mime||nt.mimes[0])}var xt=pt.getMode(Dt,Je);return xt.name=="null"?null:xt}oe.highlightFormatting===void 0&&(oe.highlightFormatting=!1),oe.maxBlockquoteDepth===void 0&&(oe.maxBlockquoteDepth=0),oe.taskLists===void 0&&(oe.taskLists=!1),oe.strikethrough===void 0&&(oe.strikethrough=!1),oe.emoji===void 0&&(oe.emoji=!1),oe.fencedCodeBlockHighlighting===void 0&&(oe.fencedCodeBlockHighlighting=!0),oe.fencedCodeBlockDefaultMode===void 0&&(oe.fencedCodeBlockDefaultMode="text/plain"),oe.xml===void 0&&(oe.xml=!0),oe.tokenTypeOverrides===void 0&&(oe.tokenTypeOverrides={});var me={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 ke in me)me.hasOwnProperty(ke)&&oe.tokenTypeOverrides[ke]&&(me[ke]=oe.tokenTypeOverrides[ke]);var Ce=/^([*\-_])(?:\s*\1){2,}\s*$/,Se=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Me=/^\[(x| )\](?=\s)/i,ve=oe.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,we=/^ {0,3}(?:\={1,}|-{2,})\s*$/,de=/^[^#!\[\]*_\\<>` "'(~:]+/,z=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,ee=/^\s*\[[^\]]+?\]:.*$/,ae=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,ie=" ";function le(Je,nt,xt){return nt.f=nt.inline=xt,xt(Je,nt)}function ue(Je,nt,xt){return nt.f=nt.block=xt,xt(Je,nt)}function ge(Je){return!Je||!/\S/.test(Je.string)}function Pe(Je){if(Je.linkTitle=!1,Je.linkHref=!1,Je.linkText=!1,Je.em=!1,Je.strong=!1,Je.strikethrough=!1,Je.quote=0,Je.indentedCode=!1,Je.f==Be){var nt=De;if(!nt){var xt=pt.innerMode(Ge,Je.htmlState);nt=xt.mode.name=="xml"&&xt.state.tagStart===null&&!xt.state.context&&xt.state.tokenize.isInText}nt&&(Je.f=Re,Je.block=je,Je.htmlState=null)}return Je.trailingSpace=0,Je.trailingSpaceNewLine=!1,Je.prevLine=Je.thisLine,Je.thisLine={stream:null},null}function je(Je,nt){var xt=Je.column()===nt.indentation,Pt=ge(nt.prevLine.stream),Ct=nt.indentedCode,gt=nt.prevLine.hr,dt=nt.list!==!1,ht=(nt.listStack[nt.listStack.length-1]||0)+3;nt.indentedCode=!1;var Et=nt.indentation;if(nt.indentationDiff===null&&(nt.indentationDiff=nt.indentation,dt)){for(nt.list=null;Et<nt.listStack[nt.listStack.length-1];)nt.listStack.pop(),nt.listStack.length?nt.indentation=nt.listStack[nt.listStack.length-1]:nt.list=!1;nt.list!==!1&&(nt.indentationDiff=Et-nt.listStack[nt.listStack.length-1])}var St=!Pt&&!gt&&!nt.prevLine.header&&(!dt||!Ct)&&!nt.prevLine.fencedCodeEnd,Ft=(nt.list===!1||gt||Pt)&&nt.indentation<=ht&&Je.match(Ce),mt=null;if(nt.indentationDiff>=4&&(Ct||nt.prevLine.fencedCodeEnd||nt.prevLine.header||Pt))return Je.skipToEnd(),nt.indentedCode=!0,me.code;if(Je.eatSpace())return null;if(xt&&nt.indentation<=ht&&(mt=Je.match(ve))&&mt[1].length<=6)return nt.quote=0,nt.header=mt[1].length,nt.thisLine.header=!0,oe.highlightFormatting&&(nt.formatting="header"),nt.f=nt.inline,Ne(nt);if(nt.indentation<=ht&&Je.eat(">"))return nt.quote=xt?1:nt.quote+1,oe.highlightFormatting&&(nt.formatting="quote"),Je.eatSpace(),Ne(nt);if(!Ft&&!nt.setext&&xt&&nt.indentation<=ht&&(mt=Je.match(Se))){var yt=mt[1]?"ol":"ul";return nt.indentation=Et+Je.current().length,nt.list=!0,nt.quote=0,nt.listStack.push(nt.indentation),nt.em=!1,nt.strong=!1,nt.code=!1,nt.strikethrough=!1,oe.taskLists&&Je.match(Me,!1)&&(nt.taskList=!0),nt.f=nt.inline,oe.highlightFormatting&&(nt.formatting=["list","list-"+yt]),Ne(nt)}else{if(xt&&nt.indentation<=ht&&(mt=Je.match(z,!0)))return nt.quote=0,nt.fencedEndRE=new RegExp(mt[1]+"+ *$"),nt.localMode=oe.fencedCodeBlockHighlighting&&fe(mt[2]||oe.fencedCodeBlockDefaultMode),nt.localMode&&(nt.localState=pt.startState(nt.localMode)),nt.f=nt.block=Fe,oe.highlightFormatting&&(nt.formatting="code-block"),nt.code=-1,Ne(nt);if(nt.setext||(!St||!dt)&&!nt.quote&&nt.list===!1&&!nt.code&&!Ft&&!ee.test(Je.string)&&(mt=Je.lookAhead(1))&&(mt=mt.match(we)))return nt.setext?(nt.header=nt.setext,nt.setext=0,Je.skipToEnd(),oe.highlightFormatting&&(nt.formatting="header")):(nt.header=mt[0].charAt(0)=="="?1:2,nt.setext=nt.header),nt.thisLine.header=!0,nt.f=nt.inline,Ne(nt);if(Ft)return Je.skipToEnd(),nt.hr=!0,nt.thisLine.hr=!0,me.hr;if(Je.peek()==="[")return le(Je,nt,ot)}return le(Je,nt,nt.inline)}function Be(Je,nt){var xt=Ge.token(Je,nt.htmlState);if(!De){var Pt=pt.innerMode(Ge,nt.htmlState);(Pt.mode.name=="xml"&&Pt.state.tagStart===null&&!Pt.state.context&&Pt.state.tokenize.isInText||nt.md_inside&&Je.current().indexOf(">")>-1)&&(nt.f=Re,nt.block=je,nt.htmlState=null)}return xt}function Fe(Je,nt){var xt=nt.listStack[nt.listStack.length-1]||0,Pt=nt.indentation<xt,Ct=xt+3;if(nt.fencedEndRE&&nt.indentation<=Ct&&(Pt||Je.match(nt.fencedEndRE))){oe.highlightFormatting&&(nt.formatting="code-block");var gt;return Pt||(gt=Ne(nt)),nt.localMode=nt.localState=null,nt.block=je,nt.f=Re,nt.fencedEndRE=null,nt.code=0,nt.thisLine.fencedCodeEnd=!0,Pt?ue(Je,nt,nt.block):gt}else return nt.localMode?nt.localMode.token(Je,nt.localState):(Je.skipToEnd(),me.code)}function Ne(Je){var nt=[];if(Je.formatting){nt.push(me.formatting),typeof Je.formatting=="string"&&(Je.formatting=[Je.formatting]);for(var xt=0;xt<Je.formatting.length;xt++)nt.push(me.formatting+"-"+Je.formatting[xt]),Je.formatting[xt]==="header"&&nt.push(me.formatting+"-"+Je.formatting[xt]+"-"+Je.header),Je.formatting[xt]==="quote"&&(!oe.maxBlockquoteDepth||oe.maxBlockquoteDepth>=Je.quote?nt.push(me.formatting+"-"+Je.formatting[xt]+"-"+Je.quote):nt.push("error"))}if(Je.taskOpen)return nt.push("meta"),nt.length?nt.join(" "):null;if(Je.taskClosed)return nt.push("property"),nt.length?nt.join(" "):null;if(Je.linkHref?nt.push(me.linkHref,"url"):(Je.strong&&nt.push(me.strong),Je.em&&nt.push(me.em),Je.strikethrough&&nt.push(me.strikethrough),Je.emoji&&nt.push(me.emoji),Je.linkText&&nt.push(me.linkText),Je.code&&nt.push(me.code),Je.image&&nt.push(me.image),Je.imageAltText&&nt.push(me.imageAltText,"link"),Je.imageMarker&&nt.push(me.imageMarker)),Je.header&&nt.push(me.header,me.header+"-"+Je.header),Je.quote&&(nt.push(me.quote),!oe.maxBlockquoteDepth||oe.maxBlockquoteDepth>=Je.quote?nt.push(me.quote+"-"+Je.quote):nt.push(me.quote+"-"+oe.maxBlockquoteDepth)),Je.list!==!1){var Pt=(Je.listStack.length-1)%3;Pt?Pt===1?nt.push(me.list2):nt.push(me.list3):nt.push(me.list1)}return Je.trailingSpaceNewLine?nt.push("trailing-space-new-line"):Je.trailingSpace&&nt.push("trailing-space-"+(Je.trailingSpace%2?"a":"b")),nt.length?nt.join(" "):null}function Ae(Je,nt){if(Je.match(de,!0))return Ne(nt)}function Re(Je,nt){var xt=nt.text(Je,nt);if(typeof xt!="undefined")return xt;if(nt.list)return nt.list=null,Ne(nt);if(nt.taskList){var Pt=Je.match(Me,!0)[1]===" ";return Pt?nt.taskOpen=!0:nt.taskClosed=!0,oe.highlightFormatting&&(nt.formatting="task"),nt.taskList=!1,Ne(nt)}if(nt.taskOpen=!1,nt.taskClosed=!1,nt.header&&Je.match(/^#+$/,!0))return oe.highlightFormatting&&(nt.formatting="header"),Ne(nt);var Ct=Je.next();if(nt.linkTitle){nt.linkTitle=!1;var gt=Ct;Ct==="("&&(gt=")"),gt=(gt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var dt="^\\s*(?:[^"+gt+"\\\\]+|\\\\\\\\|\\\\.)"+gt;if(Je.match(new RegExp(dt),!0))return me.linkHref}if(Ct==="`"){var ht=nt.formatting;oe.highlightFormatting&&(nt.formatting="code"),Je.eatWhile("`");var Et=Je.current().length;if(nt.code==0&&(!nt.quote||Et==1))return nt.code=Et,Ne(nt);if(Et==nt.code){var St=Ne(nt);return nt.code=0,St}else return nt.formatting=ht,Ne(nt)}else if(nt.code)return Ne(nt);if(Ct==="\\"&&(Je.next(),oe.highlightFormatting)){var Ft=Ne(nt),mt=me.formatting+"-escape";return Ft?Ft+" "+mt:mt}if(Ct==="!"&&Je.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return nt.imageMarker=!0,nt.image=!0,oe.highlightFormatting&&(nt.formatting="image"),Ne(nt);if(Ct==="["&&nt.imageMarker&&Je.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return nt.imageMarker=!1,nt.imageAltText=!0,oe.highlightFormatting&&(nt.formatting="image"),Ne(nt);if(Ct==="]"&&nt.imageAltText){oe.highlightFormatting&&(nt.formatting="image");var Ft=Ne(nt);return nt.imageAltText=!1,nt.image=!1,nt.inline=nt.f=Ye,Ft}if(Ct==="["&&!nt.image)return nt.linkText&&Je.match(/^.*?\]/)||(nt.linkText=!0,oe.highlightFormatting&&(nt.formatting="link")),Ne(nt);if(Ct==="]"&&nt.linkText){oe.highlightFormatting&&(nt.formatting="link");var Ft=Ne(nt);return nt.linkText=!1,nt.inline=nt.f=Je.match(/\(.*?\)| ?\[.*?\]/,!1)?Ye:Re,Ft}if(Ct==="<"&&Je.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){nt.f=nt.inline=We,oe.highlightFormatting&&(nt.formatting="link");var Ft=Ne(nt);return Ft?Ft+=" ":Ft="",Ft+me.linkInline}if(Ct==="<"&&Je.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){nt.f=nt.inline=We,oe.highlightFormatting&&(nt.formatting="link");var Ft=Ne(nt);return Ft?Ft+=" ":Ft="",Ft+me.linkEmail}if(oe.xml&&Ct==="<"&&Je.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var yt=Je.string.indexOf(">",Je.pos);if(yt!=-1){var tt=Je.string.substring(Je.start,yt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(tt)&&(nt.md_inside=!0)}return Je.backUp(1),nt.htmlState=pt.startState(Ge),ue(Je,nt,Be)}if(oe.xml&&Ct==="<"&&Je.match(/^\/\w*?>/))return nt.md_inside=!1,"tag";if(Ct==="*"||Ct==="_"){for(var Ve=1,xe=Je.pos==1?" ":Je.string.charAt(Je.pos-2);Ve<3&&Je.eat(Ct);)Ve++;var Le=Je.peek()||" ",Xe=!/\s/.test(Le)&&(!ae.test(Le)||/\s/.test(xe)||ae.test(xe)),rt=!/\s/.test(xe)&&(!ae.test(xe)||/\s/.test(Le)||ae.test(Le)),Ie=null,_e=null;if(Ve%2&&(!nt.em&&Xe&&(Ct==="*"||!rt||ae.test(xe))?Ie=!0:nt.em==Ct&&rt&&(Ct==="*"||!Xe||ae.test(Le))&&(Ie=!1)),Ve>1&&(!nt.strong&&Xe&&(Ct==="*"||!rt||ae.test(xe))?_e=!0:nt.strong==Ct&&rt&&(Ct==="*"||!Xe||ae.test(Le))&&(_e=!1)),_e!=null||Ie!=null){oe.highlightFormatting&&(nt.formatting=Ie==null?"strong":_e==null?"em":"strong em"),Ie===!0&&(nt.em=Ct),_e===!0&&(nt.strong=Ct);var St=Ne(nt);return Ie===!1&&(nt.em=!1),_e===!1&&(nt.strong=!1),St}}else if(Ct===" "&&(Je.eat("*")||Je.eat("_"))){if(Je.peek()===" ")return Ne(nt);Je.backUp(1)}if(oe.strikethrough){if(Ct==="~"&&Je.eatWhile(Ct)){if(nt.strikethrough){oe.highlightFormatting&&(nt.formatting="strikethrough");var St=Ne(nt);return nt.strikethrough=!1,St}else if(Je.match(/^[^\s]/,!1))return nt.strikethrough=!0,oe.highlightFormatting&&(nt.formatting="strikethrough"),Ne(nt)}else if(Ct===" "&&Je.match(/^~~/,!0)){if(Je.peek()===" ")return Ne(nt);Je.backUp(2)}}if(oe.emoji&&Ct===":"&&Je.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){nt.emoji=!0,oe.highlightFormatting&&(nt.formatting="emoji");var He=Ne(nt);return nt.emoji=!1,He}return Ct===" "&&(Je.match(/^ +$/,!1)?nt.trailingSpace++:nt.trailingSpace&&(nt.trailingSpaceNewLine=!0)),Ne(nt)}function We(Je,nt){var xt=Je.next();if(xt===">"){nt.f=nt.inline=Re,oe.highlightFormatting&&(nt.formatting="link");var Pt=Ne(nt);return Pt?Pt+=" ":Pt="",Pt+me.linkInline}return Je.match(/^[^>]+/,!0),me.linkInline}function Ye(Je,nt){if(Je.eatSpace())return null;var xt=Je.next();return xt==="("||xt==="["?(nt.f=nt.inline=Ke(xt==="("?")":"]"),oe.highlightFormatting&&(nt.formatting="link-string"),nt.linkHref=!0,Ne(nt)):"error"}var Ue={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ke(Je){return function(nt,xt){var Pt=nt.next();if(Pt===Je){xt.f=xt.inline=Re,oe.highlightFormatting&&(xt.formatting="link-string");var Ct=Ne(xt);return xt.linkHref=!1,Ct}return nt.match(Ue[Je]),xt.linkHref=!0,Ne(xt)}}function ot(Je,nt){return Je.match(/^([^\]\\]|\\.)*\]:/,!1)?(nt.f=ut,Je.next(),oe.highlightFormatting&&(nt.formatting="link"),nt.linkText=!0,Ne(nt)):le(Je,nt,Re)}function ut(Je,nt){if(Je.match(/^\]:/,!0)){nt.f=nt.inline=ft,oe.highlightFormatting&&(nt.formatting="link");var xt=Ne(nt);return nt.linkText=!1,xt}return Je.match(/^([^\]\\]|\\.)+/,!0),me.linkText}function ft(Je,nt){return Je.eatSpace()?null:(Je.match(/^[^\s]+/,!0),Je.peek()===void 0?nt.linkTitle=!0:Je.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),nt.f=nt.inline=Re,me.linkHref+" url")}var wt={startState:function(){return{f:je,prevLine:{stream:null},thisLine:{stream:null},block:je,htmlState:null,indentation:0,inline:Re,text:Ae,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(Je){return{f:Je.f,prevLine:Je.prevLine,thisLine:Je.thisLine,block:Je.block,htmlState:Je.htmlState&&pt.copyState(Ge,Je.htmlState),indentation:Je.indentation,localMode:Je.localMode,localState:Je.localMode?pt.copyState(Je.localMode,Je.localState):null,inline:Je.inline,text:Je.text,formatting:!1,linkText:Je.linkText,linkTitle:Je.linkTitle,linkHref:Je.linkHref,code:Je.code,em:Je.em,strong:Je.strong,strikethrough:Je.strikethrough,emoji:Je.emoji,header:Je.header,setext:Je.setext,hr:Je.hr,taskList:Je.taskList,list:Je.list,listStack:Je.listStack.slice(0),quote:Je.quote,indentedCode:Je.indentedCode,trailingSpace:Je.trailingSpace,trailingSpaceNewLine:Je.trailingSpaceNewLine,md_inside:Je.md_inside,fencedEndRE:Je.fencedEndRE}},token:function(Je,nt){if(nt.formatting=!1,Je!=nt.thisLine.stream){if(nt.header=0,nt.hr=!1,Je.match(/^\s*$/,!0))return Pe(nt),null;if(nt.prevLine=nt.thisLine,nt.thisLine={stream:Je},nt.taskList=!1,nt.trailingSpace=0,nt.trailingSpaceNewLine=!1,!nt.localState&&(nt.f=nt.block,nt.f!=Be)){var xt=Je.match(/^\s*/,!0)[0].replace(/\t/g,ie).length;if(nt.indentation=xt,nt.indentationDiff=null,xt>0)return null}}return nt.f(Je,nt)},innerMode:function(Je){return Je.block==Be?{state:Je.htmlState,mode:Ge}:Je.localState?{state:Je.localState,mode:Je.localMode}:{state:Je,mode:wt}},indent:function(Je,nt,xt){return Je.block==Be&&Ge.indent?Ge.indent(Je.htmlState,nt,xt):Je.localState&&Je.localMode.indent?Je.localMode.indent(Je.localState,nt,xt):pt.Pass},blankLine:Pe,getType:Ne,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return wt},"xml"),pt.defineMIME("text/markdown","markdown"),pt.defineMIME("text/x-markdown","markdown")})},98101:function(mn,dn,st){(function(pt){pt(st(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 Dt=0;Dt<pt.modeInfo.length;Dt++){var oe=pt.modeInfo[Dt];oe.mimes&&(oe.mime=oe.mimes[0])}pt.findModeByMIME=function(Ge){Ge=Ge.toLowerCase();for(var De=0;De<pt.modeInfo.length;De++){var fe=pt.modeInfo[De];if(fe.mime==Ge)return fe;if(fe.mimes){for(var me=0;me<fe.mimes.length;me++)if(fe.mimes[me]==Ge)return fe}}if(/\+xml$/.test(Ge))return pt.findModeByMIME("application/xml");if(/\+json$/.test(Ge))return pt.findModeByMIME("application/json")},pt.findModeByExtension=function(Ge){Ge=Ge.toLowerCase();for(var De=0;De<pt.modeInfo.length;De++){var fe=pt.modeInfo[De];if(fe.ext){for(var me=0;me<fe.ext.length;me++)if(fe.ext[me]==Ge)return fe}}},pt.findModeByFileName=function(Ge){for(var De=0;De<pt.modeInfo.length;De++){var fe=pt.modeInfo[De];if(fe.file&&fe.file.test(Ge))return fe}var me=Ge.lastIndexOf("."),ke=me>-1&&Ge.substring(me+1,Ge.length);if(ke)return pt.findModeByExtension(ke)},pt.findModeByName=function(Ge){Ge=Ge.toLowerCase();for(var De=0;De<pt.modeInfo.length;De++){var fe=pt.modeInfo[De];if(fe.name.toLowerCase()==Ge)return fe;if(fe.alias){for(var me=0;me<fe.alias.length;me++)if(fe.alias[me].toLowerCase()==Ge)return fe}}}})},67549:function(mn,dn,st){(function(pt){pt(st(89780))})(function(pt){"use strict";pt.defineMode("stex",function(Dt,oe){"use strict";function Ge(de,z){de.cmdState.push(z)}function De(de){return de.cmdState.length>0?de.cmdState[de.cmdState.length-1]:null}function fe(de){var z=de.cmdState.pop();z&&z.closeBracket()}function me(de){for(var z=de.cmdState,ee=z.length-1;ee>=0;ee--){var ae=z[ee];if(ae.name!="DEFAULT")return ae}return{styleIdentifier:function(){return null}}}function ke(de,z,ee){return function(){this.name=de,this.bracketNo=0,this.style=z,this.styles=ee,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=ke("importmodule","tag",["string","builtin"]),Ce.documentclass=ke("documentclass","tag",["","atom"]),Ce.usepackage=ke("usepackage","tag",["atom"]),Ce.begin=ke("begin","tag",["atom"]),Ce.end=ke("end","tag",["atom"]),Ce.label=ke("label","tag",["atom"]),Ce.ref=ke("ref","tag",["atom"]),Ce.eqref=ke("eqref","tag",["atom"]),Ce.cite=ke("cite","tag",["atom"]),Ce.bibitem=ke("bibitem","tag",["atom"]),Ce.Bibitem=ke("Bibitem","tag",["atom"]),Ce.RBibitem=ke("RBibitem","tag",["atom"]),Ce.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Se(de,z){de.f=z}function Me(de,z){var ee;if(de.match(/^\\[a-zA-Z@]+/)){var ae=de.current().slice(1);return ee=Ce.hasOwnProperty(ae)?Ce[ae]:Ce.DEFAULT,ee=new ee,Ge(z,ee),Se(z,we),ee.style}if(de.match(/^\\[$&%#{}_]/)||de.match(/^\\[,;!\/\\]/))return"tag";if(de.match("\\["))return Se(z,function(le,ue){return ve(le,ue,"\\]")}),"keyword";if(de.match("\\("))return Se(z,function(le,ue){return ve(le,ue,"\\)")}),"keyword";if(de.match("$$"))return Se(z,function(le,ue){return ve(le,ue,"$$")}),"keyword";if(de.match("$"))return Se(z,function(le,ue){return ve(le,ue,"$")}),"keyword";var ie=de.next();if(ie=="%")return de.skipToEnd(),"comment";if(ie=="}"||ie=="]"){if(ee=De(z),ee)ee.closeBracket(ie),Se(z,we);else return"error";return"bracket"}else return ie=="{"||ie=="["?(ee=Ce.DEFAULT,ee=new ee,Ge(z,ee),"bracket"):/\d/.test(ie)?(de.eatWhile(/[\w.%]/),"atom"):(de.eatWhile(/[\w\-_]/),ee=me(z),ee.name=="begin"&&(ee.argument=de.current()),ee.styleIdentifier())}function ve(de,z,ee){if(de.eatSpace())return null;if(ee&&de.match(ee))return Se(z,Me),"keyword";if(de.match(/^\\[a-zA-Z@]+/))return"tag";if(de.match(/^[a-zA-Z]+/))return"variable-2";if(de.match(/^\\[$&%#{}_]/)||de.match(/^\\[,;!\/]/)||de.match(/^[\^_&]/))return"tag";if(de.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(de.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ae=de.next();return ae=="{"||ae=="}"||ae=="["||ae=="]"||ae=="("||ae==")"?"bracket":ae=="%"?(de.skipToEnd(),"comment"):"error"}function we(de,z){var ee=de.peek(),ae;return ee=="{"||ee=="["?(ae=De(z),ae.openBracket(ee),de.eat(ee),Se(z,Me),"bracket"):/[ \t\r]/.test(ee)?(de.eat(ee),null):(Se(z,Me),fe(z),Me(de,z))}return{startState:function(){var de=oe.inMathMode?function(z,ee){return ve(z,ee)}:Me;return{cmdState:[],f:de}},copyState:function(de){return{cmdState:de.cmdState.slice(),f:de.f}},token:function(de,z){return z.f(de,z)},blankLine:function(de){de.f=Me,de.cmdState.length=0},lineComment:"%"}}),pt.defineMIME("text/x-stex","stex"),pt.defineMIME("text/x-latex","stex")})},15525:function(mn,dn,st){(function(pt){pt(st(89780))})(function(pt){"use strict";var Dt={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},oe={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};pt.defineMode("xml",function(Ge,De){var fe=Ge.indentUnit,me={},ke=De.htmlMode?Dt:oe;for(var Ce in ke)me[Ce]=ke[Ce];for(var Ce in De)me[Ce]=De[Ce];var Se,Me;function ve(We,Ye){function Ue(ut){return Ye.tokenize=ut,ut(We,Ye)}var Ke=We.next();if(Ke=="<")return We.eat("!")?We.eat("[")?We.match("CDATA[")?Ue(z("atom","]]>")):null:We.match("--")?Ue(z("comment","-->")):We.match("DOCTYPE",!0,!0)?(We.eatWhile(/[\w\._\-]/),Ue(ee(1))):null:We.eat("?")?(We.eatWhile(/[\w\._\-]/),Ye.tokenize=z("meta","?>"),"meta"):(Se=We.eat("/")?"closeTag":"openTag",Ye.tokenize=we,"tag bracket");if(Ke=="&"){var ot;return We.eat("#")?We.eat("x")?ot=We.eatWhile(/[a-fA-F\d]/)&&We.eat(";"):ot=We.eatWhile(/[\d]/)&&We.eat(";"):ot=We.eatWhile(/[\w\.\-:]/)&&We.eat(";"),ot?"atom":"error"}else return We.eatWhile(/[^&<]/),null}ve.isInText=!0;function we(We,Ye){var Ue=We.next();if(Ue==">"||Ue=="/"&&We.eat(">"))return Ye.tokenize=ve,Se=Ue==">"?"endTag":"selfcloseTag","tag bracket";if(Ue=="=")return Se="equals",null;if(Ue=="<"){Ye.tokenize=ve,Ye.state=ue,Ye.tagName=Ye.tagStart=null;var Ke=Ye.tokenize(We,Ye);return Ke?Ke+" tag error":"tag error"}else return/[\'\"]/.test(Ue)?(Ye.tokenize=de(Ue),Ye.stringStartCol=We.column(),Ye.tokenize(We,Ye)):(We.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function de(We){var Ye=function(Ue,Ke){for(;!Ue.eol();)if(Ue.next()==We){Ke.tokenize=we;break}return"string"};return Ye.isInAttribute=!0,Ye}function z(We,Ye){return function(Ue,Ke){for(;!Ue.eol();){if(Ue.match(Ye)){Ke.tokenize=ve;break}Ue.next()}return We}}function ee(We){return function(Ye,Ue){for(var Ke;(Ke=Ye.next())!=null;){if(Ke=="<")return Ue.tokenize=ee(We+1),Ue.tokenize(Ye,Ue);if(Ke==">")if(We==1){Ue.tokenize=ve;break}else return Ue.tokenize=ee(We-1),Ue.tokenize(Ye,Ue)}return"meta"}}function ae(We,Ye,Ue){this.prev=We.context,this.tagName=Ye,this.indent=We.indented,this.startOfLine=Ue,(me.doNotIndent.hasOwnProperty(Ye)||We.context&&We.context.noIndent)&&(this.noIndent=!0)}function ie(We){We.context&&(We.context=We.context.prev)}function le(We,Ye){for(var Ue;;){if(!We.context||(Ue=We.context.tagName,!me.contextGrabbers.hasOwnProperty(Ue)||!me.contextGrabbers[Ue].hasOwnProperty(Ye)))return;ie(We)}}function ue(We,Ye,Ue){return We=="openTag"?(Ue.tagStart=Ye.column(),ge):We=="closeTag"?Pe:ue}function ge(We,Ye,Ue){return We=="word"?(Ue.tagName=Ye.current(),Me="tag",Fe):me.allowMissingTagName&&We=="endTag"?(Me="tag bracket",Fe(We,Ye,Ue)):(Me="error",ge)}function Pe(We,Ye,Ue){if(We=="word"){var Ke=Ye.current();return Ue.context&&Ue.context.tagName!=Ke&&me.implicitlyClosed.hasOwnProperty(Ue.context.tagName)&&ie(Ue),Ue.context&&Ue.context.tagName==Ke||me.matchClosing===!1?(Me="tag",je):(Me="tag error",Be)}else return me.allowMissingTagName&&We=="endTag"?(Me="tag bracket",je(We,Ye,Ue)):(Me="error",Be)}function je(We,Ye,Ue){return We!="endTag"?(Me="error",je):(ie(Ue),ue)}function Be(We,Ye,Ue){return Me="error",je(We,Ye,Ue)}function Fe(We,Ye,Ue){if(We=="word")return Me="attribute",Ne;if(We=="endTag"||We=="selfcloseTag"){var Ke=Ue.tagName,ot=Ue.tagStart;return Ue.tagName=Ue.tagStart=null,We=="selfcloseTag"||me.autoSelfClosers.hasOwnProperty(Ke)?le(Ue,Ke):(le(Ue,Ke),Ue.context=new ae(Ue,Ke,ot==Ue.indented)),ue}return Me="error",Fe}function Ne(We,Ye,Ue){return We=="equals"?Ae:(me.allowMissing||(Me="error"),Fe(We,Ye,Ue))}function Ae(We,Ye,Ue){return We=="string"?Re:We=="word"&&me.allowUnquoted?(Me="string",Fe):(Me="error",Fe(We,Ye,Ue))}function Re(We,Ye,Ue){return We=="string"?Re:Fe(We,Ye,Ue)}return{startState:function(We){var Ye={tokenize:ve,state:ue,indented:We||0,tagName:null,tagStart:null,context:null};return We!=null&&(Ye.baseIndent=We),Ye},token:function(We,Ye){if(!Ye.tagName&&We.sol()&&(Ye.indented=We.indentation()),We.eatSpace())return null;Se=null;var Ue=Ye.tokenize(We,Ye);return(Ue||Se)&&Ue!="comment"&&(Me=null,Ye.state=Ye.state(Se||Ue,We,Ye),Me&&(Ue=Me=="error"?Ue+" error":Me)),Ue},indent:function(We,Ye,Ue){var Ke=We.context;if(We.tokenize.isInAttribute)return We.tagStart==We.indented?We.stringStartCol+1:We.indented+fe;if(Ke&&Ke.noIndent)return pt.Pass;if(We.tokenize!=we&&We.tokenize!=ve)return Ue?Ue.match(/^(\s*)/)[0].length:0;if(We.tagName)return me.multilineTagIndentPastTag!==!1?We.tagStart+We.tagName.length+2:We.tagStart+fe*(me.multilineTagIndentFactor||1);if(me.alignCDATA&&/<!\[CDATA\[/.test(Ye))return 0;var ot=Ye&&/^<(\/)?([\w_:\.-]*)/.exec(Ye);if(ot&&ot[1])for(;Ke;)if(Ke.tagName==ot[2]){Ke=Ke.prev;break}else if(me.implicitlyClosed.hasOwnProperty(Ke.tagName))Ke=Ke.prev;else break;else if(ot)for(;Ke;){var ut=me.contextGrabbers[Ke.tagName];if(ut&&ut.hasOwnProperty(ot[2]))Ke=Ke.prev;else break}for(;Ke&&Ke.prev&&!Ke.startOfLine;)Ke=Ke.prev;return Ke?Ke.indent+fe:We.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:me.htmlMode?"html":"xml",helperType:me.htmlMode?"html":"xml",skipAttribute:function(We){We.state==Ae&&(We.state=Fe)},xmlCurrentTag:function(We){return We.tagName?{name:We.tagName,close:We.type=="closeTag"}:null},xmlCurrentContext:function(We){for(var Ye=[],Ue=We.context;Ue;Ue=Ue.prev)Ue.tagName&&Ye.push(Ue.tagName);return Ye.reverse()}}}),pt.defineMIME("text/xml","xml"),pt.defineMIME("application/xml","xml"),pt.mimeModes.hasOwnProperty("text/html")||pt.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(mn,dn,st){"use strict";st.d(dn,{$u:function(){return Ce},BD:function(){return Ve},E9:function(){return ke},FF:function(){return yi},FJ:function(){return ue},Hn:function(){return le},KX:function(){return Pe},NB:function(){return at},S0:function(){return mt},UL:function(){return Se},Vk:function(){return ie},Vm:function(){return Lt},YI:function(){return yt},ZA:function(){return oe},Zt:function(){return Me},al:function(){return Ie},bn:function(){return rt},bx:function(){return xe},g2:function(){return tt},h1:function(){return Ae},hD:function(){return Ln},l4:function(){return fe},rU:function(){return At},s_:function(){return Le},uz:function(){return ct},z6:function(){return ve}}),mn=st.hmd(mn),function(){var et;function pr(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function vr(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:pr(a)}}function Ei(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var lr=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},wr;if(typeof Object.setPrototypeOf=="function")wr=Object.setPrototypeOf;else{var Br;e:{var ro={a:!0},Ur={};try{Ur.__proto__=ro,Br=Ur.a;break e}catch(a){}Br=!1}wr=Br?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var on=wr;function nn(a,y){if(a.prototype=lr(y.prototype),a.prototype.constructor=a,on)on(a,y);else for(var x in y)if(x!="prototype")if(Object.defineProperties){var b=Object.getOwnPropertyDescriptor(y,x);b&&Object.defineProperty(a,x,b)}else a[x]=y[x];a.QA=y.prototype}var Zt=typeof st.g!="undefined"&&st.g!=null?st.g:self,tr=typeof Object.assign=="function"?Object.assign:function(a,y){for(var x=1;x<arguments.length;x++){var b=arguments[x];if(b)for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(a[E]=b[E])}return a},mr=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function Er(a,y){if(y){var x=Zt;a=a.split(".");for(var b=0;b<a.length-1;b++){var E=a[b];E in x||(x[E]={}),x=x[E]}a=a[a.length-1],b=x[a],y=y(b),y!=b&&y!=null&&mr(x,a,{writable:!0,value:y})}}Er("Object.assign",function(a){return a||tr}),Er("Array.prototype.fill",function(a){return a||function(y,x,b){var E=this.length||0;for(0>x&&(x=Math.max(0,E+x)),(b==null||b>E)&&(b=E),b=Number(b),0>b&&(b=Math.max(0,E+b)),x=Number(x||0);x<b;x++)this[x]=y;return this}});var An=typeof globalThis=="object"&&globalThis||typeof st.g=="object"&&st.g.global===st.g&&st.g||typeof self=="object"&&self.self===self&&self||{};An.requestAnimationFrame===void 0&&(An.setImmediate===void 0?An.requestAnimationFrame=function(a){An.setTimeout(a,0)}:An.requestAnimationFrame=An.setImmediate);function er(){}function rn(a,y){var x=-1;return function(){var b=this,E=arguments;x!==-1&&An.clearTimeout(x),x=qt(function(){x=-1,a.apply(b,E)},y)}}function qt(a,y){return An.setTimeout(a,y)}function Qn(a){return An.document.createElement(a)}function Ot(a){throw Error(a)}function vn(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Ot(a)}function _n(a,y,x,b){x=x===null?"*":typeof x=="string"?x:typeof x=="function"&&typeof x.className=="string"?x.className:"",b!==void 0&&(x+="."+b),Ot(x+" is not in the range "+y+": "+a)}function qn(a){An.console&&An.console.log(a)}function an(a){return typeof a=="object"&&a!==null}function Un(a){return Array.isArray(a)||An.NodeList&&a instanceof An.NodeList||An.HTMLCollection&&a instanceof An.HTMLCollection}function Kn(a){return Array.prototype.slice.call(a)}function On(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Ot("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function ur(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Ot("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function $n(){var a=ki.pop();return a===void 0?[]:a}function Wn(a){a.length=0,ki.push(a)}function hr(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(an(a)&&a.constructor)return hr(a.constructor);return typeof a}function Rr(a){var y=a;return an(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 br(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 Pr(a,y,x){Object.defineProperty(Xi.prototype,a,{get:y,set:x})}function hn(a){for(var y=[],x=0;256>x;x++)y["0123456789abcdef".charAt(x>>4)+"0123456789abcdef".charAt(x&15)]=String.fromCharCode(x);a.length%2&&(a="0"+a),x=[];for(var b=0,E=0;E<a.length;E+=2)x[b++]=y[a.substr(E,2)];for(a=x.join(""),a=a===""?"0":a,y=[],x=0;256>x;x++)y[x]=x;for(x=b=0;256>x;x++)b=(b+y[x]+119)%256,E=y[x],y[x]=y[b],y[b]=E;b=x=0;for(var te="",ne=0;ne<a.length;ne++)x=(x+1)%256,b=(b+y[x])%256,E=y[x],y[x]=y[b],y[b]=E,te+=String.fromCharCode(a.charCodeAt(ne)^y[(y[x]+y[b])%256]);return te.indexOf("GoJS 2.1 evaluation")>-1||te.indexOf("\xA9 1998-2021 Northwoods Software")>-1||te.indexOf("Not for distribution or production use")>-1||te.indexOf("gojs.net")>-1?"":te}var Pi=An.navigator!==void 0&&0<An.navigator.userAgent.indexOf("Trident/7"),qr=An.navigator!==void 0&&An.navigator.platform!==void 0&&An.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,ki=[];Object.freeze([]),er.className="Util",er.Dx="32ab5ff3b26f42dc0ed90f21472913b5",er.adym="gojs.net",er.vfo="28e645fdb266",er.className="Util";function un(a,y,x){yr(this),this.j=a,this.xa=y,this.o=x}un.prototype.toString=function(){return"EnumValue."+this.xa};function Xn(a,y){return y==null||y===""?null:a[y]}Zt.Object.defineProperties(un.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),un.className="EnumValue";function cr(){this.ew=[]}cr.prototype.toString=function(){return this.ew.join("")},cr.prototype.add=function(a){a!==""&&this.ew.push(a)},cr.className="StringBuilder";function ar(){}ar.className="PropertyCollection";var xr={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){An.console&&An.console.log(a)},HA:function(a,y,x,b){a.strokeStyle="red",a.fillStyle="red",a.font="8px sans-serif",a.beginPath(),a.moveTo(-10,0),a.lineTo(10,0),a.moveTo(0,-10),a.lineTo(0,10),a.stroke(),a.setTransform(1,0,0,1,0,0),a.scale(x,x),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.lineWidth=2,a.beginPath(),a.moveTo(b.left,b.top+20),a.lineTo(b.left,b.top),a.lineTo(b.left+20,b.top),a.moveTo(b.right,b.bottom-20),a.lineTo(b.right,b.bottom),a.lineTo(b.right-20,b.bottom),a.stroke(),a.fillText("DB: "+Math.round(b.x)+", "+Math.round(b.y)+", "+Math.round(b.width)+", "+Math.round(b.height),b.left,b.top-5)},DA:function(a){var y={},x;for(x in a){if(y.x=x,y.x!=="licenseKey"){var b=a[y.x];if(b.prototype!==void 0){y.Zl=Object.getOwnPropertyNames(b.prototype);for(var E={Tj:0};E.Tj<y.Zl.length;E={Tj:E.Tj},E.Tj++){var te=Object.getOwnPropertyDescriptor(b.prototype,y.Zl[E.Tj]);te.get!==void 0&&te.set===void 0&&Object.defineProperty(b.prototype,y.Zl[E.Tj],{set:function(ne,se){return function(){throw Error("Property "+ne.Zl[se.Tj]+" of "+ne.x+" is read-only.")}}(y,E)})}}}y={Zl:y.Zl,x:y.x}}}};function Tr(){}Tr.prototype.reset=function(){},Tr.prototype.next=function(){return!1},Tr.prototype.Ad=function(){return!1},Tr.prototype.first=function(){return null},Tr.prototype.any=function(){return!1},Tr.prototype.all=function(){return!0},Tr.prototype.each=function(){return this},Tr.prototype.map=function(){return this},Tr.prototype.filter=function(){return this},Tr.prototype.de=function(){},Tr.prototype.toString=function(){return"EmptyIterator"},Zt.Object.defineProperties(Tr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Tr.prototype.first=Tr.prototype.first,Tr.prototype.hasNext=Tr.prototype.Ad,Tr.prototype.next=Tr.prototype.next,Tr.prototype.reset=Tr.prototype.reset;var Wr=null;Tr.className="EmptyIterator",Wr=new Tr;function $r(a){this.key=-1,this.value=a}$r.prototype.reset=function(){this.key=-1},$r.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},$r.prototype.Ad=function(){return this.next()},$r.prototype.first=function(){return this.key=0,this.value},$r.prototype.any=function(a){return this.key=-1,a(this.value)},$r.prototype.all=function(a){return this.key=-1,a(this.value)},$r.prototype.each=function(a){return this.key=-1,a(this.value),this},$r.prototype.map=function(a){return new $r(a(this.value))},$r.prototype.filter=function(a){return a(this.value)?new $r(this.value):Wr},$r.prototype.de=function(){this.value=null},$r.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Zt.Object.defineProperties($r.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),$r.prototype.first=$r.prototype.first,$r.prototype.hasNext=$r.prototype.Ad,$r.prototype.next=$r.prototype.next,$r.prototype.reset=$r.prototype.reset,$r.className="SingletonIterator";function ni(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}ni.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},ni.prototype.next=function(){var a=this.Bb;if(a.Ja!==this.qa&&0>this.key)return!1;a=a.s;var y=a.length,x=++this.Za,b=this.qf;if(b!==null)for(;x<y;){var E=a[x];if(b(E))return this.key=this.Za=x,this.value=E,!0;x++}else{if(x<y)return this.key=x,this.value=a[x],!0;this.de()}return!1},ni.prototype.Ad=function(){return this.next()},ni.prototype.first=function(){var a=this.Bb;this.qa=a.Ja,this.Za=0,a=a.s;var y=a.length,x=this.qf;if(x!==null){for(var b=0;b<y;){var E=a[b];if(x(E))return this.key=this.Za=b,this.value=E;b++}return null}return 0<y?(a=a[0],this.key=0,this.value=a):null},ni.prototype.any=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var te=y[E];if((b===null||b(te))&&a(te))return!0}return!1},ni.prototype.all=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var te=y[E];if((b===null||b(te))&&!a(te))return!1}return!0},ni.prototype.each=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,b=this.qf,E=0;E<x;E++){var te=y[E];(b===null||b(te))&&a(te)}return this},ni.prototype.map=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,te=0;te<b;te++){var ne=y[te];(E===null||E(ne))&&x.push(a(ne))}return a=new yn,a.s=x,a.xb(),a.iterator},ni.prototype.filter=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var b=y.length,E=this.qf,te=0;te<b;te++){var ne=y[te];(E===null||E(ne))&&a(ne)&&x.push(ne)}return a=new yn,a.s=x,a.xb(),a.iterator},ni.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},ni.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Zt.Object.defineProperties(ni.prototype,{iterator:{get:function(){return this}},predicate:{get:function(){return this.qf},set:function(a){this.qf=a}},count:{get:function(){var a=this.qf;if(a!==null){for(var y=0,x=this.Bb.s,b=x.length,E=0;E<b;E++)a(x[E])&&y++;return y}return this.Bb.s.length}}}),ni.prototype.first=ni.prototype.first,ni.prototype.hasNext=ni.prototype.Ad,ni.prototype.next=ni.prototype.next,ni.prototype.reset=ni.prototype.reset,ni.className="ListIterator";function ai(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}ai.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},ai.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)},ai.prototype.Ad=function(){return this.next()},ai.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},ai.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},ai.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},ai.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},ai.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--)x.push(a(y[b]));return a=new yn,a.s=x,a.xb(),a.iterator},ai.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var b=y.length;for(this.Za=b,--b;0<=b;b--){var E=y[b];a(E)&&x.push(E)}return a=new yn,a.s=x,a.xb(),a.iterator},ai.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},ai.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Zt.Object.defineProperties(ai.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),ai.prototype.first=ai.prototype.first,ai.prototype.hasNext=ai.prototype.Ad,ai.prototype.next=ai.prototype.next,ai.prototype.reset=ai.prototype.reset,ai.className="ListIteratorBackwards";function yn(a){yr(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Ot("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}et=yn.prototype,et.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return this._isFrozen=!1,this},et.toString=function(){return"List()#"+Yr(this)},et.add=function(a){return a===null?this:(this._isFrozen&&vn(this,a),this.s.push(a),this.xb(),this)},et.push=function(a){this.add(a)},et.addAll=function(a){if(a===null)return this;this._isFrozen&&vn(this);var y=this.s;if(Un(a))for(var x=a.length,b=0;b<x;b++)y.push(a[b]);else for(a=a.iterator;a.next();)y.push(a.value);return this.xb(),this},et.clear=function(){this._isFrozen&&vn(this),this.s.length=0,this.xb()},et.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},et.has=function(a){return this.contains(a)},et.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},et.M=function(a){var y=this.s;return(0>a||a>=y.length)&&_n(a,"0 <= i < length",yn,"elt:i"),y[a]},et.get=function(a){return this.M(a)},et.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&_n(a,"0 <= i < length",yn,"setElt:i"),this._isFrozen&&vn(this,a),x[a]=y},et.set=function(a,y){this.cd(a,y)},et.first=function(){var a=this.s;return a.length===0?null:a[0]},et.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},et.pop=function(){this._isFrozen&&vn(this);var a=this.s;return 0<a.length?a.pop():null},yn.prototype.any=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)if(a(y[b]))return!0;return!1},yn.prototype.all=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)if(!a(y[b]))return!1;return!0},yn.prototype.each=function(a){for(var y=this.s,x=y.length,b=0;b<x;b++)a(y[b]);return this},yn.prototype.map=function(a){for(var y=new yn,x=[],b=this.s,E=b.length,te=0;te<E;te++)x.push(a(b[te]));return y.s=x,y.xb(),y},yn.prototype.filter=function(a){for(var y=new yn,x=[],b=this.s,E=b.length,te=0;te<E;te++){var ne=b[te];a(ne)&&x.push(ne)}return y.s=x,y.xb(),y},et=yn.prototype,et.Gb=function(a,y){0>a&&_n(a,">= 0",yn,"insertAt:i"),this._isFrozen&&vn(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},et.remove=function(a){if(a===null)return!1;this._isFrozen&&vn(this,a);var y=this.s;return a=y.indexOf(a),a===-1?!1:(a===y.length-1?y.pop():y.splice(a,1),this.xb(),!0)},et.delete=function(a){return this.remove(a)},et.mb=function(a){var y=this.s;(0>a||a>=y.length)&&_n(a,"0 <= i < length",yn,"removeAt:i"),this._isFrozen&&vn(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},et.removeRange=function(a,y){var x=this.s,b=x.length;if(0>a)a=0;else if(a>=b)return this;if(0>y)return this;if(y>=b&&(y=b-1),a>y)return this;this._isFrozen&&vn(this);for(var E=a,te=y+1;te<b;)x[E++]=x[te++];return x.length=b-(y-a+1),this.xb(),this},yn.prototype.copy=function(){var a=new yn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},et=yn.prototype,et.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),b=0;b<y;b++)x[b]=a[b];return x},et.Iv=function(){for(var a=new xn,y=this.s,x=this.count,b=0;b<x;b++)a.add(y[b]);return a},et.sort=function(a){return this._isFrozen&&vn(this),this.s.sort(a),this.xb(),this},et.zi=function(a,y,x){var b=this.s,E=b.length;y===void 0&&(y=0),x===void 0&&(x=E),this._isFrozen&&vn(this);var te=x-y;if(1>=te)return this;if((0>y||y>=E-1)&&_n(y,"0 <= from < length",yn,"sortRange:from"),te===2)return x=b[y],E=b[y+1],0<a(x,E)&&(b[y]=E,b[y+1]=x,this.xb()),this;if(y===0)if(x>=E)b.sort(a);else for(y=b.slice(0,x),y.sort(a),a=0;a<x;a++)b[a]=y[a];else if(x>=E)for(x=b.slice(y),x.sort(a),a=y;a<E;a++)b[a]=x[a-y];else for(E=b.slice(y,x),E.sort(a),a=y;a<x;a++)b[a]=E[a-y];return this.xb(),this},et.reverse=function(){return this._isFrozen&&vn(this),this.s.reverse(),this.xb(),this},Zt.Object.defineProperties(yn.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 Wr;var a=this.Sa;return a!==null?(a.reset(),a):new ni(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Wr;var a=this.Hg;return a!==null?(a.reset(),a):new ai(this)}}}),yn.prototype.reverse=yn.prototype.reverse,yn.prototype.sortRange=yn.prototype.zi,yn.prototype.sort=yn.prototype.sort,yn.prototype.toSet=yn.prototype.Iv,yn.prototype.toArray=yn.prototype.Fa,yn.prototype.removeRange=yn.prototype.removeRange,yn.prototype.removeAt=yn.prototype.mb,yn.prototype.delete=yn.prototype.delete,yn.prototype.remove=yn.prototype.remove,yn.prototype.insertAt=yn.prototype.Gb,yn.prototype.pop=yn.prototype.pop,yn.prototype.last=yn.prototype.jc,yn.prototype.first=yn.prototype.first,yn.prototype.set=yn.prototype.set,yn.prototype.setElt=yn.prototype.cd,yn.prototype.get=yn.prototype.get,yn.prototype.elt=yn.prototype.M,yn.prototype.indexOf=yn.prototype.indexOf,yn.prototype.has=yn.prototype.has,yn.prototype.contains=yn.prototype.contains,yn.prototype.clear=yn.prototype.clear,yn.prototype.addAll=yn.prototype.addAll,yn.prototype.push=yn.prototype.push,yn.prototype.add=yn.prototype.add,yn.prototype.thaw=yn.prototype.ka,yn.prototype.freeze=yn.prototype.freeze,yn.className="List";function Ci(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Ci.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Ci.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)},Ci.prototype.Ad=function(){return this.next()},Ci.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},Ci.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},Ci.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},Ci.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},Ci.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new yn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Ci.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new yn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},Ci.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Ci.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Zt.Object.defineProperties(Ci.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Ci.prototype.first=Ci.prototype.first,Ci.prototype.hasNext=Ci.prototype.Ad,Ci.prototype.next=Ci.prototype.next,Ci.prototype.reset=Ci.prototype.reset,Ci.className="SetIterator";function xn(a){yr(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Ot("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}et=xn.prototype,et.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return this._isFrozen=!1,this},et.toString=function(){return"Set()#"+Yr(this)},et.add=function(a){if(a===null)return this;this._isFrozen&&vn(this,a);var y=a;return an(a)&&(y=Nr(a)),this.Tb[y]===void 0&&(this.Sb++,a=new Qt(a,a),this.Tb[y]=a,y=this.kf,y===null?this.ea=a:(a.ll=y,y.va=a),this.kf=a,this.xb()),this},et.addAll=function(a){if(a===null)return this;if(this._isFrozen&&vn(this),Un(a))for(var y=a.length,x=0;x<y;x++)this.add(a[x]);else for(a=a.iterator;a.next();)this.add(a.value);return this},et.contains=function(a){if(a===null)return!1;var y=a;return an(a)&&(y=Yr(a),y===void 0)?!1:this.Tb[y]!==void 0},et.has=function(a){return this.contains(a)},et.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},et.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},et.first=function(){var a=this.ea;return a===null?null:a.value},xn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},xn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},xn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},xn.prototype.map=function(a){for(var y=new xn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},xn.prototype.filter=function(a){for(var y=new xn,x=this.ea;x!==null;){var b=x.value;a(b)&&y.add(b),x=x.va}return y},et=xn.prototype,et.remove=function(a){if(a===null)return!1;this._isFrozen&&vn(this,a);var y=a;if(an(a)&&(y=Yr(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,b=a.ll;return x!==null&&(x.ll=b),b!==null&&(b.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=b),delete this.Tb[y],this.Sb--,this.xb(),!0},et.delete=function(a){return this.remove(a)},et.hp=function(a){if(a===null)return this;if(this._isFrozen&&vn(this),Un(a))for(var y=a.length,x=0;x<y;x++)this.remove(a[x]);else for(a=a.iterator;a.next();)this.remove(a.value);return this},et.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&vn(this);var y=new xn;y.addAll(a),a=[];for(var x=this.iterator;x.next();){var b=x.value;y.contains(b)||a.push(b)}return this.hp(a),this},et.clear=function(){this._isFrozen&&vn(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},xn.prototype.copy=function(){var a=new xn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},xn.prototype.Fa=function(){var a=Array(this.Sb),y=this.Tb,x=0,b;for(b in y)a[x]=y[b].value,x++;return a},xn.prototype.Hv=function(){var a=new yn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function yr(a){a.__gohashid=Zi++}function Nr(a){var y=a.__gohashid;return y===void 0&&(y=Zi++,a.__gohashid=y),y}function Yr(a){return a.__gohashid}Zt.Object.defineProperties(xn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return Wr;var a=this.Sa;return a!==null?(a.reset(),a):new Ci(this)}}}),xn.prototype.toList=xn.prototype.Hv,xn.prototype.toArray=xn.prototype.Fa,xn.prototype.clear=xn.prototype.clear,xn.prototype.retainAll=xn.prototype.pA,xn.prototype.removeAll=xn.prototype.hp,xn.prototype.delete=xn.prototype.delete,xn.prototype.remove=xn.prototype.remove,xn.prototype.first=xn.prototype.first,xn.prototype.containsAny=xn.prototype.Ty,xn.prototype.containsAll=xn.prototype.Sy,xn.prototype.has=xn.prototype.has,xn.prototype.contains=xn.prototype.contains,xn.prototype.addAll=xn.prototype.addAll,xn.prototype.add=xn.prototype.add,xn.prototype.thaw=xn.prototype.ka,xn.prototype.freeze=xn.prototype.freeze;var Zi=1;xn.className="Set",xn.uniqueHash=yr,xn.hashIdUnique=Nr,xn.hashId=Yr;function zi(a){this.ma=a,this.qa=a.Ja,this.sa=null}zi.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},zi.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)},zi.prototype.Ad=function(){return this.next()},zi.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},zi.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},zi.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},zi.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},zi.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new yn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},zi.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new yn;for(y=y.ea;y!==null;){var b=y.key;a(b)&&x.add(b),y=y.va}return x.iterator},zi.prototype.de=function(){this.value=this.key=null,this.qa=-1},zi.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Zt.Object.defineProperties(zi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),zi.prototype.first=zi.prototype.first,zi.prototype.hasNext=zi.prototype.Ad,zi.prototype.next=zi.prototype.next,zi.prototype.reset=zi.prototype.reset,zi.className="MapKeySetIterator";function bi(a){xn.call(this),yr(this),this._isFrozen=!0,this.ma=a}nn(bi,xn),et=bi.prototype,et.freeze=function(){return this},et.ka=function(){return this},et.toString=function(){return"MapKeySet("+this.ma.toString()+")"},et.add=function(){Ot("This Set is read-only: "+this.toString())},et.contains=function(a){return this.ma.contains(a)},et.has=function(a){return this.contains(a)},et.remove=function(){Ot("This Set is read-only: "+this.toString())},et.delete=function(a){return this.remove(a)},et.clear=function(){Ot("This Set is read-only: "+this.toString())},et.first=function(){var a=this.ma.ea;return a!==null?a.key:null},bi.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},bi.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},bi.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},bi.prototype.map=function(a){for(var y=new xn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},bi.prototype.filter=function(a){for(var y=new xn,x=this.ma.ea;x!==null;){var b=x.key;a(b)&&y.add(b),x=x.va}return y},bi.prototype.copy=function(){return new bi(this.ma)},bi.prototype.Iv=function(){var a=new xn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},bi.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,b;for(b in a)y[x]=a[b].key,x++;return y},bi.prototype.Hv=function(){var a=new yn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Zt.Object.defineProperties(bi.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?Wr:new zi(this.ma)}}}),bi.prototype.toList=bi.prototype.Hv,bi.prototype.toArray=bi.prototype.Fa,bi.prototype.toSet=bi.prototype.Iv,bi.prototype.first=bi.prototype.first,bi.prototype.clear=bi.prototype.clear,bi.prototype.delete=bi.prototype.delete,bi.prototype.remove=bi.prototype.remove,bi.prototype.has=bi.prototype.has,bi.prototype.contains=bi.prototype.contains,bi.prototype.add=bi.prototype.add,bi.prototype.thaw=bi.prototype.ka,bi.prototype.freeze=bi.prototype.freeze,bi.className="MapKeySet";function ji(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}ji.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},ji.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)},ji.prototype.Ad=function(){return this.next()},ji.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},ji.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},ji.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},ji.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},ji.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new yn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},ji.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new yn;for(y=y.ea;y!==null;){var b=y.value;a(b)&&x.add(b),y=y.va}return x.iterator},ji.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},ji.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Zt.Object.defineProperties(ji.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),ji.prototype.first=ji.prototype.first,ji.prototype.hasNext=ji.prototype.Ad,ji.prototype.next=ji.prototype.next,ji.prototype.reset=ji.prototype.reset,ji.className="MapValueSetIterator";function Qt(a,y){this.key=a,this.value=y,this.ll=this.va=null}Qt.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Qt.className="KeyValuePair";function Sn(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Sn.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Sn.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)},Sn.prototype.Ad=function(){return this.next()},Sn.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},Sn.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},Sn.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},Sn.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},Sn.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new yn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},Sn.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new yn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},Sn.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Sn.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Zt.Object.defineProperties(Sn.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Sn.prototype.first=Sn.prototype.first,Sn.prototype.hasNext=Sn.prototype.Ad,Sn.prototype.next=Sn.prototype.next,Sn.prototype.reset=Sn.prototype.reset,Sn.className="MapIterator";function Jt(a){yr(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"&&Ot("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}et=Jt.prototype,et.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return this._isFrozen=!1,this},et.toString=function(){return"Map()#"+Yr(this)},et.add=function(a,y){this._isFrozen&&vn(this,a);var x=a;an(a)&&(x=Nr(a));var b=this.Tb[x];return b===void 0?(this.Sb++,a=new Qt(a,y),this.Tb[x]=a,x=this.kf,x===null?this.ea=a:(a.ll=x,x.va=a),this.kf=a,this.xb()):b.value=y,this},et.set=function(a,y){return this.add(a,y)},et.addAll=function(a){if(a===null)return this;if(Un(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];this.add(b.key,b.value)}else if(a instanceof Jt)for(a=a.iterator;a.next();)this.add(a.key,a.value);else for(a=a.iterator;a.next();)y=a.value,this.add(y.key,y.value);return this},et.first=function(){return this.ea},Jt.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Jt.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Jt.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},Jt.prototype.map=function(a){for(var y=new Jt,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},Jt.prototype.filter=function(a){for(var y=new Jt,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},et=Jt.prototype,et.contains=function(a){var y=a;return an(a)&&(y=Yr(a),y===void 0)?!1:this.Tb[y]!==void 0},et.has=function(a){return this.contains(a)},et.I=function(a){var y=a;return an(a)&&(y=Yr(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},et.get=function(a){return this.I(a)},et.remove=function(a){if(a===null)return!1;this._isFrozen&&vn(this,a);var y=a;if(an(a)&&(y=Yr(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,b=a.ll;return x!==null&&(x.ll=b),b!==null&&(b.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=b),delete this.Tb[y],this.Sb--,this.xb(),!0},et.delete=function(a){return this.remove(a)},et.clear=function(){this._isFrozen&&vn(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()},Jt.prototype.copy=function(){var a=new Jt,y=this.Tb,x;for(x in y){var b=y[x];a.add(b.key,b.value)}return a},Jt.prototype.Fa=function(){var a=this.Tb,y=Array(this.Sb),x=0,b;for(b in a){var E=a[b];y[x]=new Qt(E.key,E.value),x++}return y},Jt.prototype.Lf=function(){return new bi(this)},Zt.Object.defineProperties(Jt.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return Wr;var a=this.Sa;return a!==null?(a.reset(),a):new Sn(this)}},iteratorKeys:{get:function(){return 0>=this.count?Wr:new zi(this)}},iteratorValues:{get:function(){if(0>=this.count)return Wr;var a=this.jf;return a!==null?(a.reset(),a):new ji(this)}}}),Jt.prototype.toKeySet=Jt.prototype.Lf,Jt.prototype.toArray=Jt.prototype.Fa,Jt.prototype.clear=Jt.prototype.clear,Jt.prototype.delete=Jt.prototype.delete,Jt.prototype.remove=Jt.prototype.remove,Jt.prototype.get=Jt.prototype.get,Jt.prototype.getValue=Jt.prototype.I,Jt.prototype.has=Jt.prototype.has,Jt.prototype.contains=Jt.prototype.contains,Jt.prototype.first=Jt.prototype.first,Jt.prototype.addAll=Jt.prototype.addAll,Jt.prototype.set=Jt.prototype.set,Jt.prototype.add=Jt.prototype.add,Jt.prototype.thaw=Jt.prototype.ka,Jt.prototype.freeze=Jt.prototype.freeze,Jt.className="Map";function lt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):Ot("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Bn,sn,bn,zn,Yn;lt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},lt.prototype.h=function(a,y){return this.x=a,this.y=y,this},lt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},lt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},lt.prototype.copy=function(){var a=new lt;return a.x=this.x,a.y=this.y,a},et=lt.prototype,et.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},et.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return Object.isFrozen(this)&&Ot("cannot thaw constant: "+this),this._isFrozen=!1,this};function pn(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new lt(x,E)}return new lt}function jn(a){return a.x.toString()+" "+a.y.toString()}et.toString=function(){return"Point("+this.x+","+this.y+")"},et.D=function(a){return a instanceof lt?this.x===a.x&&this.y===a.y:!1},et.hi=function(a,y){return this.x===a&&this.y===y},et.Xa=function(a){return Gt.B(this.x,a.x)&&Gt.B(this.y,a.y)},et.add=function(a){return this.x+=a.x,this.y+=a.y,this},et.re=function(a){return this.x-=a.x,this.y-=a.y,this},et.offset=function(a,y){return this.x+=a,this.y+=y,this},lt.prototype.rotate=function(a){if(a===0)return this;var y=this.x,x=this.y;if(y===0&&x===0)return this;if(360<=a?a-=360:0>a&&(a+=360),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));return this.x=a*y-b*x,this.y=b*y+a*x,this},et=lt.prototype,et.scale=function(a,y){return this.x*=a,this.y*=y,this},et.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},et.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},et.normalize=function(){var a=this.x,y=this.y,x=Math.sqrt(a*a+y*y);return 0<x&&(this.x=a/x,this.y=y/x),this},et.ab=function(a){return Dn(a.x-this.x,a.y-this.y)},et.direction=function(a,y){return Dn(a-this.x,y-this.y)};function Dn(a,y){if(a===0)return 0<y?90:0>y?270:0;if(y===0)return 0<a?0:180;if(isNaN(a)||isNaN(y))return 0;var x=180*Math.atan(Math.abs(y/a))/Math.PI;return 0>a?x=0>y?x+180:180-x:0>y&&(x=360-x),x}et.Ry=function(a,y){return Gt.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},et.fA=function(a,y,x,b){return Gt.qh(a,y,x,b,this.x,this.y,this),this},et.gA=function(a,y){return Gt.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},et.uA=function(a,y,x,b){return Gt.No(this.x,this.y,a,y,x,b,this),this},et.vA=function(a,y){return Gt.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},et.xi=function(a,y){return this.x=a.x+y.x*a.width+y.offsetX,this.y=a.y+y.y*a.height+y.offsetY,this},et.yi=function(a,y,x,b,E){return this.x=a+E.x*x+E.offsetX,this.y=y+E.y*b+E.offsetY,this},et.transform=function(a){return a.Ga(this),this};function Gn(a,y){return y.Cd(a),a}function In(a,y,x,b,E,te){var ne=E-x,se=te-b,he=ne*ne+se*se;x-=a,b-=y;var pe=-x*ne-b*se;return 0>=pe||pe>=he?(ne=E-a,se=te-y,Math.min(x*x+b*b,ne*ne+se*se)):(a=ne*b-se*x,a*a/he)}function gr(a,y,x,b){return a=x-a,y=b-y,a*a+y*y}function or(a,y,x,b){return a=x-a,y=b-y,a===0?0<y?90:0>y?270:0:y===0?0<a?0:180:isNaN(a)||isNaN(y)?0:(b=180*Math.atan(Math.abs(y/a))/Math.PI,0>a?b=0>y?b+180:180-b:0>y&&(b=360-b),b)}et.w=function(){return isFinite(this.x)&&isFinite(this.y)},lt.alloc=function(){var a=Hn.pop();return a===void 0?new lt:a},lt.allocAt=function(a,y){var x=Hn.pop();return x===void 0?new lt(a,y):(x.x=a,x.y=y,x)},lt.free=function(a){Hn.push(a)},lt.prototype.isReal=lt.prototype.w,lt.prototype.setSpot=lt.prototype.yi,lt.prototype.setRectSpot=lt.prototype.xi,lt.prototype.snapToGridPoint=lt.prototype.vA,lt.prototype.snapToGrid=lt.prototype.uA,lt.prototype.projectOntoLineSegmentPoint=lt.prototype.gA,lt.prototype.projectOntoLineSegment=lt.prototype.fA,lt.intersectingLineSegments=function(a,y,x,b,E,te,ne,se){return Gt.Rl(a,y,x,b,E,te,ne,se)},lt.prototype.compareWithLineSegmentPoint=lt.prototype.Ry,lt.compareWithLineSegment=function(a,y,x,b,E,te){return Gt.Fl(a,y,x,b,E,te)},lt.prototype.direction=lt.prototype.direction,lt.prototype.directionPoint=lt.prototype.ab,lt.prototype.normalize=lt.prototype.normalize,lt.prototype.distanceSquared=lt.prototype.zd,lt.prototype.distanceSquaredPoint=lt.prototype.Bf,lt.prototype.scale=lt.prototype.scale,lt.prototype.rotate=lt.prototype.rotate,lt.prototype.offset=lt.prototype.offset,lt.prototype.subtract=lt.prototype.re,lt.prototype.add=lt.prototype.add,lt.prototype.equalsApprox=lt.prototype.Xa,lt.prototype.equalTo=lt.prototype.hi,lt.prototype.equals=lt.prototype.D,lt.prototype.set=lt.prototype.set,lt.prototype.setTo=lt.prototype.sg;var Hn=[];lt.className="Point",lt.parse=pn,lt.stringify=jn,lt.distanceLineSegmentSquared=In,lt.distanceSquared=gr,lt.direction=or,lt.Origin=Bn=new lt(0,0).ja(),lt.InfiniteTopLeft=sn=new lt(-1/0,-1/0).ja(),lt.InfiniteBottomRight=bn=new lt(1/0,1/0).ja(),lt.SixPoint=zn=new lt(6,6).ja(),lt.NoPoint=Yn=new lt(NaN,NaN).ja(),lt.parse=pn,lt.stringify=jn,lt.distanceLineSegmentSquared=In,lt.distanceSquared=gr,lt.direction=or;function fn(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):Ot("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var nr,kr,ei,Zr,ri,li,ii;fn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},fn.prototype.h=function(a,y){return this.width=a,this.height=y,this},fn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},fn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},fn.prototype.copy=function(){var a=new fn;return a.width=this.width,a.height=this.height,a},et=fn.prototype,et.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},et.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return Object.isFrozen(this)&&Ot("cannot thaw constant: "+this),this._isFrozen=!1,this};function Oi(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;return(b=a[y++])&&(E=parseFloat(b)),new fn(x,E)}return new fn}function Di(a){return a.width.toString()+" "+a.height.toString()}et.toString=function(){return"Size("+this.width+","+this.height+")"},et.D=function(a){return a instanceof fn?this.width===a.width&&this.height===a.height:!1},et.hi=function(a,y){return this.width===a&&this.height===y},et.Xa=function(a){return Gt.B(this.width,a.width)&&Gt.B(this.height,a.height)},et.Bc=function(a,y){return a=this.width+a,this.width=0<=a?a:0,y=this.height+y,this.height=0<=y?y:0,this},et.w=function(){return isFinite(this.width)&&isFinite(this.height)},fn.alloc=function(){var a=po.pop();return a===void 0?new fn:a},fn.free=function(a){po.push(a)},fn.prototype.isReal=fn.prototype.w,fn.prototype.inflate=fn.prototype.Bc,fn.prototype.equalsApprox=fn.prototype.Xa,fn.prototype.equalTo=fn.prototype.hi,fn.prototype.equals=fn.prototype.D,fn.prototype.set=fn.prototype.set,fn.prototype.setTo=fn.prototype.sg;var po=[];fn.className="Size",fn.parse=Oi,fn.stringify=Di,fn.ZeroSize=nr=new fn(0,0).ja(),fn.OneSize=kr=new fn(1,1).ja(),fn.SixSize=ei=new fn(6,6).ja(),fn.EightSize=Zr=new fn(8,8).ja(),fn.TenSize=ri=new fn(10,10).ja(),fn.InfiniteSize=li=new fn(1/0,1/0).ja(),fn.NoSize=ii=new fn(NaN,NaN).ja(),fn.parse=Oi,fn.stringify=Di;function Yt(a,y,x,b){a===void 0?this.height=this.width=this.y=this.x=0:typeof a=="number"&&typeof y=="number"&&typeof x=="number"&&(0<=x||isNaN(x))&&typeof b=="number"&&(0<=b||isNaN(b))?(this.x=a,this.y=y,this.width=x,this.height=b):a instanceof lt?(x=a.x,a=a.y,y instanceof lt?(b=y.x,y=y.y,this.x=Math.min(x,b),this.y=Math.min(a,y),this.width=Math.abs(x-b),this.height=Math.abs(a-y)):y instanceof fn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Ot("Incorrect second argument supplied to Rect constructor "+y)):Ot("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}et=Yt.prototype,et.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},et.h=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this};function ci(a,y,x){a.width=y,a.height=x}et.sg=function(a,y,x,b){return this.x=a,this.y=y,this.width=x,this.height=b,this},et.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},et.dd=function(a){return this.x=a.x,this.y=a.y,this},et.tA=function(a){return this.width=a.width,this.height=a.height,this},Yt.prototype.copy=function(){var a=new Yt;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},et=Yt.prototype,et.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},et.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return Object.isFrozen(this)&&Ot("cannot thaw constant: "+this),this._isFrozen=!1,this};function pi(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;(b=a[y++])&&(E=parseFloat(b));for(var te=0;a[y]==="";)y++;(b=a[y++])&&(te=parseFloat(b));for(var ne=0;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),new Yt(x,E,te,ne)}return new Yt}function Hr(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}et.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},et.D=function(a){return a instanceof Yt?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},et.hi=function(a,y,x,b){return this.x===a&&this.y===y&&this.width===x&&this.height===b},et.Xa=function(a){return Gt.B(this.x,a.x)&&Gt.B(this.y,a.y)&&Gt.B(this.width,a.width)&&Gt.B(this.height,a.height)};function Si(a,y){return Gt.$(a.x,y.x)&&Gt.$(a.y,y.y)&&Gt.$(a.width,y.width)&&Gt.$(a.height,y.height)}et.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},et.Re=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height},et.contains=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+b<=this.y+this.height},et.offset=function(a,y){return this.x+=a,this.y+=y,this},et.Bc=function(a,y){return _r(this,y,a,y,a)},et.Co=function(a){return _r(this,a.top,a.right,a.bottom,a.left)},et.Fv=function(a){return _r(this,-a.top,-a.right,-a.bottom,-a.left)},et.Hz=function(a,y,x,b){return _r(this,a,y,x,b)};function _r(a,y,x,b,E){var te=a.width;return x+E<=-te?(a.x+=te/2,a.width=0):(a.x-=E,a.width+=x+E),x=a.height,y+b<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+b),a}et.Ex=function(a){return qi(this,a.x,a.y,a.width,a.height)},et.Uu=function(a,y,x,b){return qi(this,a,y,x,b)};function qi(a,y,x,b,E){var te=Math.max(a.x,y),ne=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+b),x=Math.min(a.y+a.height,x+E),a.x=te,a.y=ne,a.width=Math.max(0,y-te),a.height=Math.max(0,x-ne),a}et.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},et.Vu=function(a,y,x,b){var E=this.width,te=this.x;return E!==1/0&&x!==1/0&&(E+=te,x+=a,isNaN(x)||isNaN(E)||te>x||a>E)?!1:(a=this.height,x=this.y,!(a!==1/0&&b!==1/0&&(a+=x,b+=y,isNaN(b)||isNaN(a)||x>b||y>a)))};function Bi(a,y){var x=a.width,b=a.x,E=y.x-10;return b>y.width+10+10+E||E>x+b?!1:(x=a.height,a=a.y,b=y.y-10,!(a>y.height+10+10+b||b>x+a))}et.Ye=function(a){return gi(this,a.x,a.y,0,0)},et.ed=function(a){return gi(this,a.x,a.y,a.width,a.height)},et.Kv=function(a,y,x,b){return x===void 0&&(x=0),b===void 0&&(b=0),gi(this,a,y,x,b)};function gi(a,y,x,b,E){var te=Math.min(a.x,y),ne=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+b),x=Math.max(a.y+a.height,x+E),a.x=te,a.y=ne,a.width=y-te,a.height=x-ne,a}et.yi=function(a,y,x){return this.x=a-x.offsetX-x.x*this.width,this.y=y-x.offsetY-x.y*this.height,this};function Qi(a,y,x,b,E,te,ne,se){return ne===void 0&&(ne=0),se===void 0&&(se=0),a<=E&&E+ne<=a+x&&y<=te&&te+se<=y+b}function ga(a,y,x,b,E,te,ne,se){return a>ne+E||E>x+a?!1:!(y>se+te||te>b+y)}et.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},et.Mz=function(){return this.width===0&&this.height===0},Yt.alloc=function(){var a=ma.pop();return a===void 0?new Yt:a},Yt.allocAt=function(a,y,x,b){var E=ma.pop();return E===void 0?new Yt(a,y,x,b):E.h(a,y,x,b)},Yt.free=function(a){ma.push(a)},Zt.Object.defineProperties(Yt.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 lt(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new fn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new lt(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}}}),Yt.prototype.isEmpty=Yt.prototype.Mz,Yt.prototype.isReal=Yt.prototype.w,Yt.intersectsLineSegment=function(a,y,x,b,E,te,ne,se){return Gt.Fx(a,y,x,b,E,te,ne,se)},Yt.prototype.setSpot=Yt.prototype.yi,Yt.prototype.union=Yt.prototype.Kv,Yt.prototype.unionRect=Yt.prototype.ed,Yt.prototype.unionPoint=Yt.prototype.Ye,Yt.prototype.intersects=Yt.prototype.Vu,Yt.prototype.intersectsRect=Yt.prototype.Yc,Yt.prototype.intersect=Yt.prototype.Uu,Yt.prototype.intersectRect=Yt.prototype.Ex,Yt.prototype.grow=Yt.prototype.Hz,Yt.prototype.subtractMargin=Yt.prototype.Fv,Yt.prototype.addMargin=Yt.prototype.Co,Yt.prototype.inflate=Yt.prototype.Bc,Yt.prototype.offset=Yt.prototype.offset,Yt.prototype.contains=Yt.prototype.contains,Yt.prototype.containsRect=Yt.prototype.Re,Yt.prototype.containsPoint=Yt.prototype.ca,Yt.prototype.equalsApprox=Yt.prototype.Xa,Yt.prototype.equalTo=Yt.prototype.hi,Yt.prototype.equals=Yt.prototype.D,Yt.prototype.setSize=Yt.prototype.tA,Yt.prototype.setPoint=Yt.prototype.dd,Yt.prototype.set=Yt.prototype.set,Yt.prototype.setTo=Yt.prototype.sg;var Ao=null,Aa=null,ma=[];Yt.className="Rect",Yt.parse=pi,Yt.stringify=Hr,Yt.contains=Qi,Yt.intersects=ga,Yt.ZeroRect=Ao=new Yt(0,0,0,0).ja(),Yt.NoRect=Aa=new Yt(NaN,NaN,NaN,NaN).ja(),Yt.parse=pi,Yt.stringify=Hr,Yt.contains=Qi,Yt.intersects=ga;function Dr(a,y,x,b){a===void 0?this.left=this.bottom=this.right=this.top=0:y===void 0?this.left=this.bottom=this.right=this.top=a:x===void 0?(this.top=a,this.right=y,this.bottom=a,this.left=y):b!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=b):Ot("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+b),this._isFrozen=!1}Dr.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Dr.prototype.sg=function(a,y,x,b){return this.top=a,this.right=y,this.bottom=x,this.left=b,this},Dr.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Dr.prototype.copy=function(){var a=new Dr;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},et=Dr.prototype,et.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},et.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return Object.isFrozen(this)&&Ot("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 b=a[y++];if(b&&(x=parseFloat(b)),isNaN(x))return new Dr;for(var E=NaN;a[y]==="";)y++;if((b=a[y++])&&(E=parseFloat(b)),isNaN(E))return new Dr(x);for(var te=NaN;a[y]==="";)y++;if((b=a[y++])&&(te=parseFloat(b)),isNaN(te))return new Dr(x,E);for(var ne=NaN;a[y]==="";)y++;return(b=a[y++])&&(ne=parseFloat(b)),isNaN(ne)?new Dr(x,E):new Dr(x,E,te,ne)}return new Dr}function Co(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}et.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},et.D=function(a){return a instanceof Dr?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},et.hi=function(a,y,x,b){return this.top===a&&this.right===y&&this.bottom===x&&this.left===b},et.Xa=function(a){return Gt.B(this.top,a.top)&&Gt.B(this.right,a.right)&&Gt.B(this.bottom,a.bottom)&&Gt.B(this.left,a.left)},et.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Dr.alloc=function(){var a=mi.pop();return a===void 0?new Dr:a},Dr.free=function(a){mi.push(a)},Dr.prototype.isReal=Dr.prototype.w,Dr.prototype.equalsApprox=Dr.prototype.Xa,Dr.prototype.equalTo=Dr.prototype.hi,Dr.prototype.equals=Dr.prototype.D,Dr.prototype.set=Dr.prototype.set,Dr.prototype.setTo=Dr.prototype.sg;var Jo=null,xi=null,mi=[];Dr.className="Margin",Dr.parse=eo,Dr.stringify=Co,Dr.ZeroMargin=Jo=new Dr(0,0,0,0).ja(),Dr.TwoMargin=xi=new Dr(2,2,2,2).ja(),Dr.parse=eo,Dr.stringify=Co;function Nn(a,y,x,b){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),b===void 0&&(b=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=b),this._isFrozen=!1}var zr,wi,co,Pa,aa,ti,Ho,Ko,jo,io,ba,is,fo,os,Gs,Mu,Wo,th,Lu,Nu,gl,Ns,Ml,nh,Au,Vo,ju,rh,iu,ou,ja,Oa,na,sa,uo,Ni;Nn.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Nn.prototype.sg=function(a,y,x,b){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=b,this},Nn.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Nn.prototype.copy=function(){var a=new Nn;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},et=Nn.prototype,et.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},et.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return Object.isFrozen(this)&&Ot("cannot thaw constant: "+this),this._isFrozen=!1,this};function Gi(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function la(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return zr;if(a==="TopLeft")return wi;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return co;if(a==="TopRight")return Pa;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return aa;if(a==="Center")return ti;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Ho;if(a==="BottomLeft")return Ko;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return jo;if(a==="BottomRight")return io;if(a==="TopSide")return ba;if(a==="LeftSide")return is;if(a==="RightSide")return fo;if(a==="BottomSide")return os;if(a==="TopBottomSides")return Gs;if(a==="LeftRightSides")return Mu;if(a==="TopLeftSides")return Wo;if(a==="TopRightSides")return th;if(a==="BottomLeftSides")return Lu;if(a==="BottomRightSides")return Nu;if(a==="NotTopSide")return gl;if(a==="NotLeftSide")return Ns;if(a==="NotRightSide")return Ml;if(a==="NotBottomSide")return nh;if(a==="AllSides")return Au;if(a==="Default")return Vo;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var b=a[y++];b!==void 0&&0<b.length&&(x=parseFloat(b));for(var E=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(E=parseFloat(b));for(var te=0;a[y]==="";)y++;b=a[y++],b!==void 0&&0<b.length&&(te=parseFloat(b));for(var ne=0;a[y]==="";)y++;return b=a[y++],b!==void 0&&0<b.length&&(ne=parseFloat(b)),new Nn(x,E,te,ne)}return new Nn}function Qo(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}et.toString=function(){return this.sb()?this.offsetX===0&&this.offsetY===0?"Spot("+this.x+","+this.y+")":"Spot("+this.x+","+this.y+","+this.offsetX+","+this.offsetY+")":this.D(zr)?"None":this.D(wi)?"TopLeft":this.D(co)?"Top":this.D(Pa)?"TopRight":this.D(aa)?"Left":this.D(ti)?"Center":this.D(Ho)?"Right":this.D(Ko)?"BottomLeft":this.D(jo)?"Bottom":this.D(io)?"BottomRight":this.D(ba)?"TopSide":this.D(is)?"LeftSide":this.D(fo)?"RightSide":this.D(os)?"BottomSide":this.D(Gs)?"TopBottomSides":this.D(Mu)?"LeftRightSides":this.D(Wo)?"TopLeftSides":this.D(th)?"TopRightSides":this.D(Lu)?"BottomLeftSides":this.D(Nu)?"BottomRightSides":this.D(gl)?"NotTopSide":this.D(Ns)?"NotLeftSide":this.D(Ml)?"NotRightSide":this.D(nh)?"NotBottomSide":this.D(Au)?"AllSides":this.D(Vo)?"Default":"None"},et.D=function(a){return a instanceof Nn?(this.x===a.x||isNaN(this.x)&&isNaN(a.x))&&(this.y===a.y||isNaN(this.y)&&isNaN(a.y))&&this.offsetX===a.offsetX&&this.offsetY===a.offsetY:!1},et.gv=function(){return new Nn(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},et.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(ju))a=is;else if(a.D(rh))a=fo;else if(a.D(iu))a=ba;else if(a.D(ou))a=os;else return!1;return a=a.offsetY,(this.offsetY&a)===a},et.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},et.Mc=function(){return isNaN(this.x)||isNaN(this.y)},et.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},et.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},et.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},Nn.alloc=function(){var a=qo.pop();return a===void 0?new Nn:a},Nn.free=function(a){qo.push(a)},Nn.prototype.isDefault=Nn.prototype.Xb,Nn.prototype.isNone=Nn.prototype.ys,Nn.prototype.isSide=Nn.prototype.$c,Nn.prototype.isNoSpot=Nn.prototype.Mc,Nn.prototype.isSpot=Nn.prototype.sb,Nn.prototype.includesSide=Nn.prototype.Hf,Nn.prototype.opposite=Nn.prototype.gv,Nn.prototype.equals=Nn.prototype.D,Nn.prototype.set=Nn.prototype.set,Nn.prototype.setTo=Nn.prototype.sg;var qo=[];Nn.className="Spot",Nn.parse=la,Nn.stringify=Qo,Nn.None=zr=Gi(new Nn(0,0,0,0),0).ja(),Nn.Default=Vo=Gi(new Nn(0,0,-1,0),-1).ja(),Nn.TopLeft=wi=new Nn(0,0,0,0).ja(),Nn.TopCenter=co=new Nn(.5,0,0,0).ja(),Nn.TopRight=Pa=new Nn(1,0,0,0).ja(),Nn.LeftCenter=aa=new Nn(0,.5,0,0).ja(),Nn.Center=ti=new Nn(.5,.5,0,0).ja(),Nn.RightCenter=Ho=new Nn(1,.5,0,0).ja(),Nn.BottomLeft=Ko=new Nn(0,1,0,0).ja(),Nn.BottomCenter=jo=new Nn(.5,1,0,0).ja(),Nn.BottomRight=io=new Nn(1,1,0,0).ja(),Nn.MiddleTop=ja=co,Nn.MiddleLeft=Oa=aa,Nn.MiddleRight=na=Ho,Nn.MiddleBottom=sa=jo,Nn.Top=iu=co,Nn.Left=ju=aa,Nn.Right=rh=Ho,Nn.Bottom=ou=jo,Nn.TopSide=ba=Gi(new Nn(0,0,1,1),1).ja(),Nn.LeftSide=is=Gi(new Nn(0,0,1,2),1).ja(),Nn.RightSide=fo=Gi(new Nn(0,0,1,4),1).ja(),Nn.BottomSide=os=Gi(new Nn(0,0,1,8),1).ja(),Nn.TopBottomSides=Gs=Gi(new Nn(0,0,1,9),1).ja(),Nn.LeftRightSides=Mu=Gi(new Nn(0,0,1,6),1).ja(),Nn.TopLeftSides=Wo=Gi(new Nn(0,0,1,3),1).ja(),Nn.TopRightSides=th=Gi(new Nn(0,0,1,5),1).ja(),Nn.BottomLeftSides=Lu=Gi(new Nn(0,0,1,10),1).ja(),Nn.BottomRightSides=Nu=Gi(new Nn(0,0,1,12),1).ja(),Nn.NotTopSide=gl=Gi(new Nn(0,0,1,14),1).ja(),Nn.NotLeftSide=Ns=Gi(new Nn(0,0,1,13),1).ja(),Nn.NotRightSide=Ml=Gi(new Nn(0,0,1,11),1).ja(),Nn.NotBottomSide=nh=Gi(new Nn(0,0,1,7),1).ja(),Nn.AllSides=Au=Gi(new Nn(0,0,1,15),1).ja(),uo=new Nn(.156,.156).ja(),Ni=new Nn(.844,.844).ja(),Nn.parse=la,Nn.stringify=Qo;function Mr(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}Mr.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},Mr.prototype.setTransform=function(a,y,x,b,E,te){return this.m11=a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=te,this},Mr.prototype.copy=function(){var a=new Mr;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},Mr.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},Mr.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},Mr.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},Mr.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},Mr.prototype.multiply=function(a){var y=this.m11*a.m11+this.m21*a.m12,x=this.m12*a.m11+this.m22*a.m12,b=this.m11*a.m21+this.m21*a.m22,E=this.m12*a.m21+this.m22*a.m22;return this.dx=this.m11*a.dx+this.m21*a.dy+this.dx,this.dy=this.m12*a.dx+this.m22*a.dy+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},Mr.prototype.bv=function(a){var y=1/(a.m11*a.m22-a.m12*a.m21),x=a.m22*y,b=-a.m12*y,E=-a.m21*y,te=a.m11*y,ne=y*(a.m21*a.dy-a.m22*a.dx);return a=y*(a.m12*a.dx-a.m11*a.dy),y=this.m11*x+this.m21*b,x=this.m12*x+this.m22*b,b=this.m11*E+this.m21*te,E=this.m12*E+this.m22*te,this.dx=this.m11*ne+this.m21*a+this.dx,this.dy=this.m12*ne+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=b,this.m22=E,this},Mr.prototype.Vj=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),y=-this.m12*a,x=-this.m21*a,b=this.m11*a,E=a*(this.m21*this.dy-this.m22*this.dx),te=a*(this.m12*this.dx-this.m11*this.dy);return this.m11=this.m22*a,this.m12=y,this.m21=x,this.m22=b,this.dx=E,this.dy=te,this},Mr.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a===0)return this;if(this.translate(y,x),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.m12*a+this.m22*b,te=this.m11*-b+this.m21*a,ne=this.m12*-b+this.m22*a;return this.m11=this.m11*a+this.m21*b,this.m12=E,this.m21=te,this.m22=ne,this.translate(-y,-x),this},et=Mr.prototype,et.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},et.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},et.Ga=function(a){var y=a.x,x=a.y;return a.h(y*this.m11+x*this.m21+this.dx,y*this.m12+x*this.m22+this.dy)},et.Cd=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=a.x,b=a.y;return a.h(x*this.m22*y+b*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+b*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},et.Eu=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=1.25*a.x,b=1.2*a.y;return a.h(x*this.m22*y+b*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+b*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},et.pp=function(a){var y=a.x,x=a.y,b=y+a.width,E=x+a.height,te=this.m11,ne=this.m12,se=this.m21,he=this.m22,pe=this.dx,ye=this.dy,Te=y*te+x*se+pe,ze=y*ne+x*he+ye,Ze=b*te+x*se+pe,$e=b*ne+x*he+ye;return x=y*te+E*se+pe,y=y*ne+E*he+ye,te=b*te+E*se+pe,b=b*ne+E*he+ye,E=Math.min(Te,Ze),Te=Math.max(Te,Ze),Ze=Math.min(ze,$e),ze=Math.max(ze,$e),E=Math.min(E,x),Te=Math.max(Te,x),Ze=Math.min(Ze,y),ze=Math.max(ze,y),E=Math.min(E,te),Te=Math.max(Te,te),Ze=Math.min(Ze,b),ze=Math.max(ze,b),a.h(E,Ze,Te-E,ze-Ze),a},Mr.alloc=function(){var a=As.pop();return a===void 0?new Mr:a},Mr.free=function(a){As.push(a)},Mr.prototype.transformRect=Mr.prototype.pp,Mr.prototype.transformPoint=Mr.prototype.Ga,Mr.prototype.scale=Mr.prototype.scale,Mr.prototype.translate=Mr.prototype.translate,Mr.prototype.rotate=Mr.prototype.rotate,Mr.prototype.invert=Mr.prototype.Vj,Mr.prototype.multiplyInverted=Mr.prototype.bv,Mr.prototype.multiply=Mr.prototype.multiply,Mr.prototype.reset=Mr.prototype.reset,Mr.prototype.isIdentity=Mr.prototype.ws,Mr.prototype.equals=Mr.prototype.D,Mr.prototype.setTransform=Mr.prototype.setTransform,Mr.prototype.set=Mr.prototype.set;var As=[];Mr.className="Transform",Mr.xF="54a702f3e53909c447824c6706603faf4c";var Gt={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=Gt.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);Gt.Uv=y}return 1>a?(x=1/a,2e3>=x?1/y[x|0]:Math.sqrt(a)):2e3>=a?y[a|0]:Math.sqrt(a)},B:function(a,y){return a-=y,.5>a&&-.5<a},$:function(a,y){return a-=y,5e-8>a&&-5e-8<a},Yb:function(a,y,x,b,E,te,ne){if(0>=E&&(E=1e-6),a<x)var se=a,he=x;else se=x,he=a;if(y<b)var pe=y,ye=b;else pe=b,ye=y;if(a===x)return pe<=ne&&ne<=ye&&a-E<=te&&te<=a+E;if(y===b)return se<=te&&te<=he&&y-E<=ne&&ne<=y+E;if(he+=E,se-=E,se<=te&&te<=he&&(ye+=E,pe-=E,pe<=ne&&ne<=ye))if(he-se>ye-pe)if(a-x>E||x-a>E){if(te=(b-y)/(x-a)*(te-a)+y,te-E<=ne&&ne<=te+E)return!0}else return!0;else if(y-b>E||b-y>E){if(ne=(x-a)/(b-y)*(ne-y)+a,ne-E<=te&&te<=ne+E)return!0}else return!0;return!1},cs:function(a,y,x,b,E,te,ne,se,he,pe,ye,Te){if(Gt.Yb(a,y,ne,se,Te,x,b)&&Gt.Yb(a,y,ne,se,Te,E,te))return Gt.Yb(a,y,ne,se,Te,pe,ye);var ze=(a+x)/2,Ze=(y+b)/2,$e=(x+E)/2,it=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(ze+$e)/2,x=(Ze+it)/2,$e=($e+E)/2,it=(it+te)/2;var Tt=(b+$e)/2,bt=(x+it)/2;return Gt.cs(a,y,ze,Ze,b,x,Tt,bt,he,pe,ye,Te)||Gt.cs(Tt,bt,$e,it,E,te,ne,se,he,pe,ye,Te)},ax:function(a,y,x,b,E,te,ne,se,he){var pe=(x+E)/2,ye=(b+te)/2;return he.h((((a+x)/2+pe)/2+(pe+(E+ne)/2)/2)/2,(((y+b)/2+ye)/2+(ye+(te+se)/2)/2)/2),he},My:function(a,y,x,b,E,te,ne,se){var he=(x+E)/2,pe=(b+te)/2;return or(((a+x)/2+he)/2,((y+b)/2+pe)/2,(he+(E+ne)/2)/2,(pe+(te+se)/2)/2)},Dl:function(a,y,x,b,E,te,ne,se,he,pe){if(Gt.Yb(a,y,ne,se,he,x,b)&&Gt.Yb(a,y,ne,se,he,E,te))gi(pe,a,y,0,0),gi(pe,ne,se,0,0);else{var ye=(a+x)/2,Te=(y+b)/2,ze=(x+E)/2,Ze=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(ye+ze)/2,x=(Te+Ze)/2,ze=(ze+E)/2,Ze=(Ze+te)/2;var $e=(b+ze)/2,it=(x+Ze)/2;Gt.Dl(a,y,ye,Te,b,x,$e,it,he,pe),Gt.Dl($e,it,ze,Ze,E,te,ne,se,he,pe)}return pe},Qe:function(a,y,x,b,E,te,ne,se,he,pe){if(Gt.Yb(a,y,ne,se,he,x,b)&&Gt.Yb(a,y,ne,se,he,E,te))pe.length===0&&(pe.push(a),pe.push(y)),pe.push(ne),pe.push(se);else{var ye=(a+x)/2,Te=(y+b)/2,ze=(x+E)/2,Ze=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=(ye+ze)/2,x=(Te+Ze)/2,ze=(ze+E)/2,Ze=(Ze+te)/2;var $e=(b+ze)/2,it=(x+Ze)/2;Gt.Qe(a,y,ye,Te,b,x,$e,it,he,pe),Gt.Qe($e,it,ze,Ze,E,te,ne,se,he,pe)}return pe},jv:function(a,y,x,b,E,te,ne,se,he,pe){if(Gt.Yb(a,y,E,te,pe,x,b))return Gt.Yb(a,y,E,te,pe,se,he);var ye=(a+x)/2,Te=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var ze=(ye+x)/2,Ze=(Te+b)/2;return Gt.jv(a,y,ye,Te,ze,Ze,ne,se,he,pe)||Gt.jv(ze,Ze,x,b,E,te,ne,se,he,pe)},OA:function(a,y,x,b,E,te,ne){return ne.h(((a+x)/2+(x+E)/2)/2,((y+b)/2+(b+te)/2)/2),ne},iv:function(a,y,x,b,E,te,ne,se){if(Gt.Yb(a,y,E,te,ne,x,b))gi(se,a,y,0,0),gi(se,E,te,0,0);else{var he=(a+x)/2,pe=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var ye=(he+x)/2,Te=(pe+b)/2;Gt.iv(a,y,he,pe,ye,Te,ne,se),Gt.iv(ye,Te,x,b,E,te,ne,se)}return se},ep:function(a,y,x,b,E,te,ne,se){if(Gt.Yb(a,y,E,te,ne,x,b))se.length===0&&(se.push(a),se.push(y)),se.push(E),se.push(te);else{var he=(a+x)/2,pe=(y+b)/2;x=(x+E)/2,b=(b+te)/2;var ye=(he+x)/2,Te=(pe+b)/2;Gt.ep(a,y,he,pe,ye,Te,ne,se),Gt.ep(ye,Te,x,b,E,te,ne,se)}return se},Eo:function(a,y,x,b,E,te,ne,se,he,pe,ye,Te,ze,Ze){if(Gt.Yb(a,y,ne,se,ze,x,b)&&Gt.Yb(a,y,ne,se,ze,E,te))return!Gt.Rl(a,y,ne,se,he,pe,ye,Te)||(ze=(a-ne)*(pe-Te)-(y-se)*(he-ye),ze===0)?!1:(Ze.h(((a*se-y*ne)*(he-ye)-(a-ne)*(he*Te-pe*ye))/ze,((a*se-y*ne)*(pe-Te)-(y-se)*(he*Te-pe*ye))/ze),!0);var $e=(a+x)/2,it=(y+b)/2,Tt=(x+E)/2,bt=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=($e+Tt)/2,x=(it+bt)/2,Tt=(Tt+E)/2,bt=(bt+te)/2;var Nt=(b+Tt)/2,jt=(x+bt)/2,Bt=1/0,_t=!1,Ht=0,Fn=0;return Gt.Eo(a,y,$e,it,b,x,Nt,jt,he,pe,ye,Te,ze,Ze)&&(a=(Ze.x-he)*(Ze.x-he)+(Ze.y-pe)*(Ze.y-pe),a<Bt&&(Bt=a,_t=!0,Ht=Ze.x,Fn=Ze.y)),Gt.Eo(Nt,jt,Tt,bt,E,te,ne,se,he,pe,ye,Te,ze,Ze)&&(Ze.x-he)*(Ze.x-he)+(Ze.y-pe)*(Ze.y-pe)<Bt&&(_t=!0,Ht=Ze.x,Fn=Ze.y),_t&&(Ze.x=Ht,Ze.y=Fn),_t},Fo:function(a,y,x,b,E,te,ne,se,he,pe,ye,Te,ze){var Ze=0;if(Gt.Yb(a,y,ne,se,ze,x,b)&&Gt.Yb(a,y,ne,se,ze,E,te)){if(ze=(a-ne)*(pe-Te)-(y-se)*(he-ye),ze===0)return Ze;var $e=((a*se-y*ne)*(he-ye)-(a-ne)*(he*Te-pe*ye))/ze,it=((a*se-y*ne)*(pe-Te)-(y-se)*(he*Te-pe*ye))/ze;if($e>=ye)return Ze;if((he>ye?he-ye:ye-he)<(pe>Te?pe-Te:Te-pe)){if(y<se?(he=y,a=se):(he=se,a=y),it<he||it>a)return Ze}else if(a<ne?(he=a,a=ne):he=ne,$e<he||$e>a)return Ze;0<ze?Ze++:0>ze&&Ze--}else{$e=(a+x)/2,it=(y+b)/2;var Tt=(x+E)/2,bt=(b+te)/2;E=(E+ne)/2,te=(te+se)/2,b=($e+Tt)/2,x=(it+bt)/2,Tt=(Tt+E)/2,bt=(bt+te)/2;var Nt=(b+Tt)/2,jt=(x+bt)/2;Ze+=Gt.Fo(a,y,$e,it,b,x,Nt,jt,he,pe,ye,Te,ze),Ze+=Gt.Fo(Nt,jt,Tt,bt,E,te,ne,se,he,pe,ye,Te,ze)}return Ze},qh:function(a,y,x,b,E,te,ne){return Gt.$(a,x)?(y<b?(x=y,y=b):x=b,te<x?(ne.h(a,x),!1):te>y?(ne.h(a,y),!1):(ne.h(a,te),!0)):Gt.$(y,b)?(a<x?(b=a,a=x):b=x,E<b?(ne.h(b,y),!1):E>a?(ne.h(a,y),!1):(ne.h(E,y),!0)):(E=((a-E)*(a-x)+(y-te)*(y-b))/((x-a)*(x-a)+(b-y)*(b-y)),-5e-6>E?(ne.h(a,y),!1):1.000005<E?(ne.h(x,b),!1):(ne.h(a+E*(x-a),y+E*(b-y)),!0))},Ve:function(a,y,x,b,E,te,ne,se,he){return Gt.B(a,x)&&Gt.B(y,b)?(he.h(a,y),!1):Gt.$(E,ne)?Gt.$(a,x)?(Gt.qh(a,y,x,b,E,te,he),!1):Gt.qh(a,y,x,b,E,(b-y)/(x-a)*(E-a)+y,he):(se=(se-te)/(ne-E),Gt.$(a,x)?(x=se*(a-E)+te,y<b?(E=y,y=b):E=b,x<E?(he.h(a,E),!1):x>y?(he.h(a,y),!1):(he.h(a,x),!0)):(ne=(b-y)/(x-a),Gt.$(se,ne)?(Gt.qh(a,y,x,b,E,te,he),!1):(E=(ne*a-se*E+te-y)/(ne-se),Gt.$(ne,0)?(a<x?(b=a,a=x):b=x,E<b?(he.h(b,y),!1):E>a?(he.h(a,y),!1):(he.h(E,y),!0)):Gt.qh(a,y,x,b,E,ne*(E-a)+y,he))))},MA:function(a,y,x,b,E){return Gt.Ve(x.x,x.y,b.x,b.y,a.x,a.y,y.x,y.y,E)},KA:function(a,y,x,b,E,te,ne,se,he,pe){function ye(Tt,bt){var Nt=(Tt-a)*(Tt-a)+(bt-y)*(bt-y);Nt<Te&&(Te=Nt,he.h(Tt,bt))}var Te=1/0;ye(he.x,he.y);var ze=0,Ze=0,$e=0,it=0;if(E<ne?(ze=E,Ze=ne):(ze=ne,Ze=E),te<se?($e=E,it=ne):($e=ne,it=E),ze=(Ze-ze)/2+pe,pe=(it-$e)/2+pe,E=(E+ne)/2,te=(te+se)/2,ze===0||pe===0)return he;if(.5>(x>a?x-a:a-x)){if(ze=1-(x-E)*(x-E)/(ze*ze),0>ze)return he;ze=Math.sqrt(ze),b=-pe*ze+te,ye(x,pe*ze+te),ye(x,b)}else{if(x=(b-y)/(x-a),b=1/(ze*ze)+x*x/(pe*pe),se=2*x*(y-x*a)/(pe*pe)-2*x*te/(pe*pe)-2*E/(ze*ze),ze=se*se-4*b*(2*x*a*te/(pe*pe)-2*y*te/(pe*pe)+te*te/(pe*pe)+E*E/(ze*ze)-1+(y-x*a)*(y-x*a)/(pe*pe)),0>ze)return he;ze=Math.sqrt(ze),pe=(-se+ze)/(2*b),ye(pe,x*pe-x*a+y),ze=(-se-ze)/(2*b),ye(ze,x*ze-x*a+y)}return he},Ff:function(a,y,x,b,E,te,ne,se,he){var pe=1e21,ye=a,Te=y;if(Gt.Ve(a,y,a,b,E,te,ne,se,he)){var ze=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te);ze<pe&&(pe=ze,ye=he.x,Te=he.y)}return Gt.Ve(x,y,x,b,E,te,ne,se,he)&&(ze=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te),ze<pe&&(pe=ze,ye=he.x,Te=he.y)),Gt.Ve(a,y,x,y,E,te,ne,se,he)&&(y=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te),y<pe&&(pe=y,ye=he.x,Te=he.y)),Gt.Ve(a,b,x,b,E,te,ne,se,he)&&(a=(he.x-E)*(he.x-E)+(he.y-te)*(he.y-te),a<pe&&(pe=a,ye=he.x,Te=he.y)),he.h(ye,Te),1e21>pe},us:function(a,y,x){return Gt.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,b,E,te,ne,se){var he=a+x,pe=y+b;return E===ne?(te<se?(ne=te,te=se):ne=se,a<=E&&E<=he&&ne<=pe&&te>=y):te===se?(E<ne?(se=E,E=ne):se=ne,y<=te&&te<=pe&&se<=he&&E>=a):!!(Qi(a,y,x,b,E,te)||Qi(a,y,x,b,ne,se)||Gt.Rl(a,y,he,y,E,te,ne,se)||Gt.Rl(he,y,he,pe,E,te,ne,se)||Gt.Rl(he,pe,a,pe,E,te,ne,se)||Gt.Rl(a,pe,a,y,E,te,ne,se))},Rl:function(a,y,x,b,E,te,ne,se){return a===x&&y===b&&E===ne&&te===se?a===E&&y===te:0>=Gt.Fl(a,y,x,b,E,te)*Gt.Fl(a,y,x,b,ne,se)&&0>=Gt.Fl(E,te,ne,se,a,y)*Gt.Fl(E,te,ne,se,x,b)},Fl:function(a,y,x,b,E,te){return x-=a,b-=y,a=E-a,y=te-y,te=a*b-y*x,te===0&&(te=a*x+y*b,0<te&&(te=(a-x)*x+(y-b)*b,0>te&&(te=0))),te},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,b,E,te){var ne=Math.PI;te||(b*=ne/180,E*=ne/180);var se=b>E?-1:1;te=[];var he=ne/2,pe=b;if(b=Math.min(2*ne,Math.abs(E-b)),1e-5>b)return he=pe+se*Math.min(b,he),se=a+x*Math.cos(pe),pe=y+x*Math.sin(pe),a+=x*Math.cos(he),y+=x*Math.sin(he),x=(se+a)/2,he=(pe+y)/2,te.push([se,pe,x,he,x,he,a,y]),te;for(;1e-5<b;)E=pe+se*Math.min(b,he),te.push(Gt.Vy(x,pe,E,a,y)),b-=Math.abs(E-pe),pe=E;return te},Vy:function(a,y,x,b,E){var te=(x-y)/2,ne=a*Math.cos(te),se=a*Math.sin(te),he=-se,pe=ne*ne+he*he,ye=pe+ne*ne+he*se;return pe=4/3*(Math.sqrt(2*pe*ye)-ye)/(ne*se-he*ne),se=ne-pe*he,ne=he+pe*ne,he=-ne,pe=te+y,te=Math.cos(pe),pe=Math.sin(pe),[b+a*Math.cos(y),E+a*Math.sin(y),b+se*te-ne*pe,E+se*pe+ne*te,b+se*te-he*pe,E+se*pe+he*te,b+a*Math.cos(x),E+a*Math.sin(x)]},No:function(a,y,x,b,E,te,ne){x=Math.floor((a-x)/E)*E+x,b=Math.floor((y-b)/te)*te+b;var se=x;return x+E-a<E/2&&(se=x+E),a=b,b+te-y<te/2&&(a=b+te),ne.h(se,a),ne},vx:function(a,y){var x=Math.max(a,y);a=Math.min(a,y);var b;do y=x%a,x=b=a,a=y;while(0<y);return b},$y:function(a,y,x,b){var E=0>x,te=0>b;if(a<y)var ne=1,se=0;else ne=0,se=1;var he=ne===0?a:y,pe=ne===0?x:b;return(ne===0?E:te)&&(pe=-pe),ne=se,x=ne===0?x:b,(ne===0?E:te)&&(x=-x),Gt.az(he,ne===0?a:y,pe,x,0,0)},az:function(a,y,x,b,E,te){if(0<b)if(0<x){E=a*a,te=y*y,a*=x;var ne=y*b,se=-te+ne,he=-te+Math.sqrt(a*a+ne*ne);y=se;for(var pe=0;9999999999>pe&&(y=.5*(se+he),!(y===se||y===he));++pe){var ye=a/(y+E),Te=ne/(y+te);if(ye=ye*ye+Te*Te-1,0<ye)se=y;else if(0>ye)he=y;else break}x=E*x/(y+E)-x,b=te*b/(y+te)-b,x=Math.sqrt(x*x+b*b)}else x=Math.abs(b-y);else b=a*a-y*y,te=a*x,te<b?(b=te/b,te=y*Math.sqrt(Math.abs(1-b*b)),x=a*b-x,x=Math.sqrt(x*x+te*te)):x=Math.abs(x-a);return x},Ze:new ar,um:new ar,Mf:new ar,Nf:0,vm:100};Gt.za=Gt.AA;function Mn(a){yr(this),this.l=2,a===void 0&&(a=Mn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===Mn.o?this.ee=new yn:(Mn.V===null&&(Mn.V=new yn().freeze()),this.ee=Mn.V),this.aq=this.ee.Ja,this.Ip=new Yt().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=wi,this.gg=io,this.Rk=this.Sk=NaN,this.Uf=wn}Mn.prototype.copy=function(){var a=new Mn;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===Mn.o){for(var y=this.ee.s,x=a.ee,b=0;b<y.length;b++)x.add(y[b].copy());a.ee=x}else a.ee=this.ee;return a.aq=this.aq,a.Ip.assign(this.Ip),a.tk=this.tk,a.ym=this.ym,a.zm=this.zm,a.fg=this.fg.J(),a.gg=this.gg.J(),a.Sk=this.Sk,a.Rk=this.Rk,a.Uf=this.Uf,a},Mn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},Mn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==Mn.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},Mn.prototype.ka=function(){if(Object.isFrozen(this)&&Ot("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==Mn.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},Mn.prototype.Xa=function(a){if(!(a instanceof Mn))return!1;if(this.type!==a.type)return this.type===Mn.j&&a.type===Mn.o?Ll(this,a):a.type===Mn.j&&this.type===Mn.o?Ll(a,this):!1;if(this.type===Mn.o){var y=this.figures.s;a=a.figures.s;var x=y.length;if(x!==a.length)return!1;for(var b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0}return Gt.B(this.startX,a.startX)&&Gt.B(this.startY,a.startY)&&Gt.B(this.endX,a.endX)&&Gt.B(this.endY,a.endY)};function Ll(a,y){return a.type!==Mn.j||y.type!==Mn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&Gt.B(a.startX,y.startX)&&Gt.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===Ri&&Gt.B(a.endX,y.endX)&&Gt.B(a.endY,y.endY))))}Mn.ia=function(a){return a.toString()},Mn.prototype.qb=function(a){a.classType===Mn&&(this.type=a)},Mn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Mn.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 Mn.u:var y=new Yt(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 Mn.F:if(y=new Yt(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 Mn.o:y="",x=this.figures.s;for(var b=x.length,E=0;E<b;E++){var te=x[E];0<E&&(y+=" x "),te.isFilled&&(y+="F "),y+=te.toString(a)}return y;default:return this.type.toString()}},Mn.nb=function(a){a=a.split(/[Xx]/);for(var y=a.length,x="",b=0;b<y;b++){var E=a[b];x=E.match(/[Ff]/)!==null?b===0?x+E:x+("X"+(E[0]===" "?"":" ")+E):x+((b===0?"":"X ")+"F"+(E[0]===" "?"":" ")+E)}return x},Mn.parse=function(a,y){function x(){return it>=Bt-1?!0:pe[it+1].match(_t)!==null}function b(){return it++,pe[it]}function E(Ar){var Cr=parseFloat(b()),vi=parseFloat(b());Tt===Tt.toLowerCase()&&(Cr=jt.x+Cr,vi=jt.y+vi),Ar.h(Cr,vi)}function te(){return E(jt),jt}function ne(){return E(Nt),Nt}function se(){var Ar=bt.toLowerCase();return Ar!=="c"&&Ar!=="s"&&Ar!=="q"&&Ar!=="t"?jt:new lt(2*jt.x-Nt.x,2*jt.y-Nt.y)}y===void 0&&(y=!1);var he=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(he,"$1 $2"),a=a.replace(he,"$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 pe=a.split(" ");for(a=0;a<pe.length;a++){var ye=pe[a];if(ye.match(/(\.[0-9]*)(\.)/gm)!==null){he=$n();for(var Te="",ze=!1,Ze=0;Ze<ye.length;Ze++){var $e=ye[Ze];$e!=="."||ze?$e==="."?(he.push(Te),Te="."):Te+=$e:(ze=!0,Te+=$e)}for(he.push(Te),pe.splice(a,1),ye=0;ye<he.length;ye++)pe.splice(a+ye,0,he[ye]);a+=he.length-1,Wn(he)}}var it=-1,Tt="",bt="";he=new lt(0,0);var Nt=new lt(0,0),jt=new lt(0,0),Bt=pe.length;a=A1(null),ze=Te=ye=!1,Ze=!0,$e=null;for(var _t=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(it>=Bt-1);)if(bt=Tt,Tt=b(),Tt!=="")switch(Tt.toUpperCase()){case"X":Ze=!0,Te=ye=!1;break;case"M":for($e=te(),a.mc===null||Ze===!0?(Dd(a,$e.x,$e.y,ye,!Te,ze),Ze=!1):a.moveTo($e.x,$e.y),he.assign(jt);!x();)$e=te(),a.lineTo($e.x,$e.y);break;case"L":for(;!x();)$e=te(),a.lineTo($e.x,$e.y);break;case"H":for(;!x();)jt=new lt((Tt===Tt.toLowerCase()?jt.x:0)+parseFloat(b()),jt.y),a.lineTo(jt.x,jt.y);break;case"V":for(;!x();)jt=new lt(jt.x,(Tt===Tt.toLowerCase()?jt.y:0)+parseFloat(b())),a.lineTo(jt.x,jt.y);break;case"C":for(;!x();){$e=new lt,E($e);var Ht=ne(),Fn=te();wh(a,$e.x,$e.y,Ht.x,Ht.y,Fn.x,Fn.y)}break;case"S":for(;!x();)$e=se(),Ht=ne(),Fn=te(),wh(a,$e.x,$e.y,Ht.x,Ht.y,Fn.x,Fn.y);break;case"Q":for(;!x();)$e=ne(),Ht=te(),Im(a,$e.x,$e.y,Ht.x,Ht.y);break;case"T":for(;!x();)Nt=$e=se(),Ht=te(),Im(a,$e.x,$e.y,Ht.x,Ht.y);break;case"B":for(;!x();){$e=parseFloat(b()),Ht=parseFloat(b()),Fn=parseFloat(b());var Jn=parseFloat(b()),Zn=parseFloat(b()),kn=Zn,cn=!1;x()||(kn=parseFloat(b()),x()||(cn=parseFloat(b())!==0)),Tt===Tt.toLowerCase()&&(Fn+=jt.x,Jn+=jt.y),a.arcTo($e,Ht,Fn,Jn,Zn,kn,cn)}break;case"A":for(;!x();)$e=Math.abs(parseFloat(b())),Ht=Math.abs(parseFloat(b())),Fn=parseFloat(b()),Zn=Jn=!1,cn=kn=0,kn=b(),kn.length===1?(Jn=!!parseFloat(kn),Zn=!!parseFloat(b()),kn=parseFloat(b())):kn.length===2?(Jn=!!parseFloat(kn[0]),Zn=!!parseFloat(kn[1]),kn=parseFloat(b())):(Jn=!!parseFloat(kn[0]),Zn=!!parseFloat(kn[1]),kn=parseFloat(kn.slice(2))),cn=parseFloat(b()),Tt===Tt.toLowerCase()&&(kn=jt.x+kn,cn=jt.y+cn),jt.h(kn,cn),bx(a,$e,Ht,Fn,Jn,Zn,kn,cn);break;case"Z":Px(a),jt.assign(he);break;case"F":for($e="",Ht=1;pe[it+Ht];)if(pe[it+Ht]==="0")ze=!0,Ht++;else if(pe[it+Ht].match(/[Uu]/)!==null)Ht++;else if(pe[it+Ht].match(_t)===null)Ht++;else{$e=pe[it+Ht];break}$e.match(/[Mm]/)?ye=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for($e="",Ht=1;pe[it+Ht];)if(pe[it+Ht].match(/[Ff]/)!==null)Ht++;else if(pe[it+Ht].match(_t)===null)Ht++;else{$e=pe[it+Ht];break}$e.match(/[Mm]/)?Te=!0:a.mc.isShadowed=!1}if(he=a.os,Rm=a,y)for(y=he.figures.iterator;y.next();)y.value.isFilled=!0;return he},Mn.Ha=function(a,y){for(var x=a.length,b=lt.alloc(),E=0;E<x;E++){var te=a[E];b.x=te[0],b.y=te[1],y.Ga(b),te[0]=b.x,te[1]=b.y,b.x=te[2],b.y=te[3],y.Ga(b),te[2]=b.x,te[3]=b.y,b.x=te[4],b.y=te[5],y.Ga(b),te[4]=b.x,te[5]=b.y,b.x=te[6],b.y=te[7],y.Ga(b),te[6]=b.x,te[7]=b.y}lt.free(b)},Mn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===Mn.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},Mn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===Mn.o){this.aq=this.figures.Ja;for(var a=this.figures.s,y=a.length,x=0;x<y;x++){var b=a[x];b._isInvalidBounds=!1;var E=b.segments;b.sr=E.Ja,b=E.s,E=b.length;for(var te=0;te<E;te++){var ne=b[te];ne._isInvalidBounds=!1,ne.ae=null}}}a=this.Ip,a.ka(),isNaN(this.Sk)||isNaN(this.Rk)?a.h(0,0,0,0):a.h(0,0,this.Sk,this.Rk),Ou(this,a,!1),gi(a,0,0,0,0),a.freeze()},Mn.prototype.ix=function(){var a=new Yt;return Ou(this,a,!0),a};function Ou(a,y,x){switch(a.type){case Mn.j:case Mn.u:case Mn.F:x?y.h(a.od,a.pd,0,0):gi(y,a.od,a.pd,0,0),gi(y,a.Dc,a.Ec,0,0);break;case Mn.o:var b=a.figures;a=b.s,b=b.length;for(var E=0;E<b;E++){var te=a[E];x&&E===0?y.h(te.startX,te.startY,0,0):gi(y,te.startX,te.startY,0,0);for(var ne=te.segments.s,se=ne.length,he=te.startX,pe=te.startY,ye=0;ye<se;ye++){var Te=ne[ye];switch(Te.type){case Ri:case Fo:he=Te.endX,pe=Te.endY,gi(y,he,pe,0,0);break;case _o:Gt.Dl(he,pe,Te.point1X,Te.point1Y,Te.point2X,Te.point2Y,Te.endX,Te.endY,.5,y),he=Te.endX,pe=Te.endY;break;case ds:Gt.iv(he,pe,Te.point1X,Te.point1Y,Te.endX,Te.endY,.5,y),he=Te.endX,pe=Te.endY;break;case wo:case ws:var ze=Te.type===wo?Ga(Te,te):js(Te,te,he,pe),Ze=ze.length;if(Ze===0){he=Te.type===wo?Te.centerX:Te.endX,pe=Te.type===wo?Te.centerY:Te.endY,gi(y,he,pe,0,0);break}Te=null;for(var $e=0;$e<Ze;$e++)Te=ze[$e],Gt.Dl(Te[0],Te[1],Te[2],Te[3],Te[4],Te[5],Te[6],Te[7],.5,y);Te!==null&&(he=Te[6],pe=Te[7]);break;default:Ot("Unknown Segment type: "+Te.type)}}}break;default:Ot("Unknown Geometry type: "+a.type)}}Mn.prototype.normalize=function(){this._isFrozen&&vn(this);var a=this.ix();return this.offset(-a.x,-a.y),new lt(-a.x,-a.y)},Mn.prototype.offset=function(a,y){return this._isFrozen&&vn(this),this.transform(1,0,0,1,a,y),this},Mn.prototype.scale=function(a,y){return this._isFrozen&&vn(this),this.transform(a,0,0,y,0,0),this},Mn.prototype.rotate=function(a,y,x){this._isFrozen&&vn(this),y===void 0&&(y=0),x===void 0&&(x=0);var b=Mr.alloc();return b.reset(),b.rotate(a,y,x),this.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy),Mr.free(b),this},et=Mn.prototype,et.transform=function(a,y,x,b,E,te){switch(this.type){case Mn.j:case Mn.u:case Mn.F:var ne=this.od,se=this.pd;this.od=ne*a+se*x+E,this.pd=ne*y+se*b+te,ne=this.Dc,se=this.Ec,this.Dc=ne*a+se*x+E,this.Ec=ne*y+se*b+te;break;case Mn.o:for(var he=this.figures.s,pe=he.length,ye=0;ye<pe;ye++){var Te=he[ye];ne=Te.startX,se=Te.startY,Te.startX=ne*a+se*x+E,Te.startY=ne*y+se*b+te,Te=Te.segments.s;for(var ze=Te.length,Ze=0;Ze<ze;Ze++){var $e=Te[Ze];switch($e.type){case Ri:case Fo:ne=$e.endX,se=$e.endY,$e.endX=ne*a+se*x+E,$e.endY=ne*y+se*b+te;break;case _o:ne=$e.point1X,se=$e.point1Y,$e.point1X=ne*a+se*x+E,$e.point1Y=ne*y+se*b+te,ne=$e.point2X,se=$e.point2Y,$e.point2X=ne*a+se*x+E,$e.point2Y=ne*y+se*b+te,ne=$e.endX,se=$e.endY,$e.endX=ne*a+se*x+E,$e.endY=ne*y+se*b+te;break;case ds:ne=$e.point1X,se=$e.point1Y,$e.point1X=ne*a+se*x+E,$e.point1Y=ne*y+se*b+te,ne=$e.endX,se=$e.endY,$e.endX=ne*a+se*x+E,$e.endY=ne*y+se*b+te;break;case wo:ne=$e.centerX,se=$e.centerY,$e.centerX=ne*a+se*x+E,$e.centerY=ne*y+se*b+te,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),$e.startAngle+=ne),0>a&&($e.startAngle=180-$e.startAngle,$e.sweepAngle=-$e.sweepAngle),0>b&&($e.startAngle=-$e.startAngle,$e.sweepAngle=-$e.sweepAngle),$e.radiusX*=Math.sqrt(a*a+x*x),$e.radiusY!==void 0&&($e.radiusY*=Math.sqrt(y*y+b*b));break;case ws:if(ne=$e.endX,se=$e.endY,$e.endX=ne*a+se*x+E,$e.endY=ne*y+se*b+te,$e.radiusX===0||$e.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),$e.xAxisRotation+=ne),0>a&&($e.xAxisRotation=180-$e.xAxisRotation,$e.isClockwiseArc=!$e.isClockwiseArc),0>b&&($e.xAxisRotation=-$e.xAxisRotation,$e.isClockwiseArc=!$e.isClockwiseArc),$e.radiusX*=Math.sqrt(a*a+x*x),$e.radiusY*=Math.sqrt(y*y+b*b);break;default:Ot("Unknown Segment type: "+$e.type)}}}}return this._isInvalidBounds=!0,this},et.ca=function(a,y){y===void 0&&(y=0);var x=this.od,b=this.pd,E=this.Dc,te=this.Ec;switch(this.type){case Mn.j:return Gt.Yb(x,b,E,te,y,a.x,a.y);case Mn.u:var ne=Yt.allocAt(Math.min(x,E)-y,Math.min(b,te)-y,Math.abs(E-x)+2*y,Math.abs(te-b)+2*y);return a=ne.ca(a),Yt.free(ne),a;case Mn.F:ne=Math.min(x,E)-y;var se=Math.min(b,te)-y;return x=(Math.abs(E-x)+2*y)/2,y=(Math.abs(te-b)+2*y)/2,0>=x||0>=y?!1:(ne=a.x-(ne+x),se=a.y-(se+y),1>=ne*ne/(x*x)+se*se/(y*y));case Mn.o:return ua(this,a,y,!0,!1);default:return!1}};function ua(a,y,x,b,E){var te=y.x;y=y.y;for(var ne=a.bounds.x-20,se=0,he,pe,ye,Te,ze=a.figures.s,Ze=ze.length,$e=0;$e<Ze;$e++){var it=ze[$e],Tt=!it.isEvenOdd;if(it.isFilled){if(b&&it.ca(te,y,x))return!0;var bt=it.segments;he=it.startX,pe=it.startY;for(var Nt=he,jt=pe,Bt=bt.s,_t=0;_t<=bt.length;_t++){var Ht=void 0;if(_t!==bt.length){Ht=Bt[_t];var Fn=Ht.type;a=Ht.endX,Te=Ht.endY}else Fn=Ri,a=Nt,Te=jt;switch(Fn){case Fo:if(Nt=Us(te,y,ne,y,he,pe,Nt,jt),isNaN(Nt))return!0;se+=Nt,Nt=a,jt=Te;break;case Ri:if(he=Us(te,y,ne,y,he,pe,a,Te),isNaN(he))return!0;se+=he;break;case _o:ye=Gt.Fo(he,pe,Ht.point1X,Ht.point1Y,Ht.point2X,Ht.point2Y,a,Te,ne,y,te,y,.5),se+=ye;break;case ds:ye=Gt.Fo(he,pe,(he+2*Ht.point1X)/3,(pe+2*Ht.point1Y)/3,(2*Ht.point1X+a)/3,(2*Ht.point1Y+Te)/3,a,Te,ne,y,te,y,.5),se+=ye;break;case wo:case ws:Fn=Ht.type===wo?Ga(Ht,it):js(Ht,it,he,pe);var Jn=Fn.length;if(Jn===0){if(he=Us(te,y,ne,y,he,pe,Ht.type===wo?Ht.centerX:Ht.endX,Ht.type===wo?Ht.centerY:Ht.endY),isNaN(he))return!0;se+=he;break}Ht=null;for(var Zn=0;Zn<Jn;Zn++){if(Ht=Fn[Zn],Zn===0){if(ye=Us(te,y,ne,y,he,pe,Ht[0],Ht[1]),isNaN(ye))return!0;se+=ye}ye=Gt.Fo(Ht[0],Ht[1],Ht[2],Ht[3],Ht[4],Ht[5],Ht[6],Ht[7],ne,y,te,y,.5),se+=ye}Ht!==null&&(a=Ht[6],Te=Ht[7]);break;default:Ot("Unknown Segment type: "+Ht.type)}he=a,pe=Te}if(Tt){if(se!==0)return!0}else if(se%2!==0)return!0;se=0}else if(it.ca(te,y,E?x:x+2))return!0}return!1}function Us(a,y,x,b,E,te,ne,se){if(Gt.Yb(E,te,ne,se,.05,a,y))return NaN;var he=(a-x)*(te-se);if(he===0)return 0;var pe=((a*b-y*x)*(E-ne)-(a-x)*(E*se-te*ne))/he;if(y=(a*b-y*x)*(te-se)/he,pe>=a)return 0;if((E>ne?E-ne:ne-E)<(te>se?te-se:se-te)){if(te<se){if(y<te||y>se)return 0}else if(y<se||y>te)return 0}else if(E<ne){if(pe<E||pe>ne)return 0}else if(pe<ne||pe>E)return 0;return 0<he?1:-1}function Wl(a,y,x,b){a=a.figures.s;for(var E=a.length,te=0;te<E;te++)if(a[te].ca(y,x,b))return!0;return!1}et.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new lt),this.type===Mn.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,b=this.flattenedLengths,E=x.length,te=this.flattenedTotalLength*a,ne=0,se=0;se<E;se++){var he=b[se],pe=he.length;for(a=0;a<pe;a++){var ye=he[a];if(ne+ye>=te)return b=te-ne,b=ye===0?0:b/ye,x=x[se],se=x[2*a],E=x[2*a+1],y.h(se+(x[2*a+2]-se)*b,E+(x[2*a+3]-E)*b),y;ne+=ye}}return y},et.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===Mn.j)return 180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI;for(var y=this.flattenedSegments,x=this.flattenedLengths,b=y.length,E=this.flattenedTotalLength*a,te=0,ne=0;ne<b;ne++){var se=x[ne],he=se.length;for(a=0;a<he;a++){var pe=se[a];if(te+pe>=E)return E=y[ne],y=E[2*a],x=E[2*a+1],b=E[2*a+2],a=E[2*a+3],1>Math.abs(b-y)&&1>Math.abs(a-x)?0:1>Math.abs(b-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=b-y?0:180:180*Math.atan2(a-x,b-y)/Math.PI;te+=pe}}return NaN},et.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===Mn.j)return y[0]=this.startX+a*(this.endX-this.startX),y[1]=this.startY+a*(this.endY-this.startY),y[2]=180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI,y;for(var x=this.flattenedSegments,b=this.flattenedLengths,E=x.length,te=this.flattenedTotalLength*a,ne=0,se=0;se<E;se++){var he=b[se],pe=he.length;for(a=0;a<pe;a++){var ye=he[a];if(ne+ye>=te)return b=te-ne,b=ye===0?0:b/ye,ye=x[se],x=ye[2*a],se=ye[2*a+1],E=ye[2*a+2],a=ye[2*a+3],y[0]=x+(E-x)*b,y[1]=se+(a-se)*b,y[2]=1>Math.abs(E-x)&&1>Math.abs(a-se)?0:1>Math.abs(E-x)?0<=a-se?90:270:1>Math.abs(a-se)?0<=E-x?0:180:180*Math.atan2(a-se,E-x)/Math.PI,y;ne+=ye}}return y},et.xx=function(a){if(this.type===Mn.j){var y=this.startX,x=this.startY,b=this.endX,E=this.endY;if(y!==b||x!==E){var te=a.x;if(a=a.y,y===b){if(x<E){var ne=x;b=E}else ne=E,b=x;return a<=ne?ne===x?0:1:a>=b?b===x?0:1:Math.abs(a-x)/(b-ne)}if(x===E)return y<b?ne=y:(ne=b,b=y),te<=ne?ne===y?0:1:te>=b?b===y?0:1:Math.abs(te-y)/(b-ne);ne=(b-y)*(b-y)+(E-x)*(E-x);var se=lt.alloc();return Gt.qh(y,x,b,E,te,a,se),a=se.x,te=se.y,lt.free(se),Math.sqrt(((a-y)*(a-y)+(te-x)*(te-x))/ne)}}else if(this.type===Mn.u){ne=this.startX,se=this.startY;var he=this.endX;if(E=this.endY,ne!==he||se!==E){y=he-ne,x=E-se,te=2*y+2*x,b=a.x,a=a.y,b=Math.min(Math.max(b,ne),he),a=Math.min(Math.max(a,se),E),ne=Math.abs(b-ne),he=Math.abs(b-he),se=Math.abs(a-se),E=Math.abs(a-E);var pe=Math.min(ne,he,se,E);if(pe===se)return b/te;if(pe===he)return(y+a)/te;if(pe===E)return(2*y+x-b)/te;if(pe===ne)return(2*y+2*x-a)/te}}else{y=this.flattenedSegments,x=this.flattenedLengths,te=this.flattenedTotalLength,b=lt.alloc(),E=1/0,se=ne=0,he=y.length;for(var ye=pe=0,Te=0;Te<he;Te++)for(var ze=y[Te],Ze=x[Te],$e=ze.length,it=0;it<$e;it+=2){var Tt=ze[it],bt=ze[it+1];if(it!==0){Gt.qh(pe,ye,Tt,bt,a.x,a.y,b);var Nt=(b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y);Nt<E&&(E=Nt,ne=se,ne+=Math.sqrt((b.x-pe)*(b.x-pe)+(b.y-ye)*(b.y-ye))),se+=Ze[(it-2)/2]}pe=Tt,ye=bt}return lt.free(b),a=ne/te,0>a?0:1<a?1:a}return 0};function Fu(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],b=[],E=[];if(a.type===Mn.j)b.push(a.startX),b.push(a.startY),b.push(a.endX),b.push(a.endY),y.push(b),E.push(Math.sqrt((a.startX-a.endX)*(a.startX-a.endX)+(a.startY-a.endY)*(a.startY-a.endY))),x.push(E);else if(a.type===Mn.u)b.push(a.startX),b.push(a.startY),b.push(a.endX),b.push(a.startY),b.push(a.endX),b.push(a.endY),b.push(a.startX),b.push(a.endY),b.push(a.startX),b.push(a.startY),y.push(b),E.push(Math.abs(a.startX-a.endX)),E.push(Math.abs(a.startY-a.endY)),E.push(Math.abs(a.startX-a.endX)),E.push(Math.abs(a.startY-a.endY)),x.push(E);else if(a.type===Mn.F){var te=new Oo;te.startX=a.endX,te.startY=(a.startY+a.endY)/2;var ne=new fi(wo);if(ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(a.startX+a.endX)/2,ne.centerY=(a.startY+a.endY)/2,ne.radiusX=Math.abs(a.startX-a.endX)/2,ne.radiusY=Math.abs(a.startY-a.endY)/2,te.add(ne),a=Ga(ne,te),E=a.length,E===0)b.push(ne.centerX),b.push(ne.centerY);else{ne=te.startX,te=te.startY;for(var se=0;se<E;se++){var he=a[se];Gt.Qe(ne,te,he[2],he[3],he[4],he[5],he[6],he[7],.5,b),ne=he[6],te=he[7]}}y.push(b),x.push(Du(b))}else for(a=a.figures.iterator;a.next();){E=a.value,b=[],b.push(E.startX),b.push(E.startY),ne=E.startX,te=E.startY,se=ne,he=te;for(var pe=E.segments.s,ye=pe.length,Te=0;Te<ye;Te++){var ze=pe[Te];switch(ze.type){case Fo:4<=b.length&&(y.push(b),x.push(Du(b))),b=[],b.push(ze.endX),b.push(ze.endY),ne=ze.endX,te=ze.endY,se=ne,he=te;break;case Ri:b.push(ze.endX),b.push(ze.endY),ne=ze.endX,te=ze.endY;break;case _o:Gt.Qe(ne,te,ze.point1X,ze.point1Y,ze.point2X,ze.point2Y,ze.endX,ze.endY,.5,b),ne=ze.endX,te=ze.endY;break;case ds:Gt.ep(ne,te,ze.point1X,ze.point1Y,ze.endX,ze.endY,.5,b),ne=ze.endX,te=ze.endY;break;case wo:var Ze=Ga(ze,E),$e=Ze.length;if($e===0){b.push(ze.centerX),b.push(ze.centerY),ne=ze.centerX,te=ze.centerY;break}for(var it=0;it<$e;it++){var Tt=Ze[it];Gt.Qe(ne,te,Tt[2],Tt[3],Tt[4],Tt[5],Tt[6],Tt[7],.5,b),ne=Tt[6],te=Tt[7]}break;case ws:if(Ze=js(ze,E,ne,te),$e=Ze.length,it=ze.endX,Tt=ze.endY,$e===0){b.push(it),b.push(Tt),ne=it,te=Tt;break}for(it=0;it<$e;it++)Tt=Ze[it],Gt.Qe(ne,te,Tt[2],Tt[3],Tt[4],Tt[5],Tt[6],Tt[7],.5,b),ne=Tt[6],te=Tt[7];break;default:Ot("Segment not of valid type: "+ze.type)}ze.isClosed&&(b.push(se),b.push(he))}4<=b.length&&(y.push(b),x.push(Du(b)))}}}function Du(a){for(var y=[],x=0,b=0,E=a.length,te=0;te<E;te+=2){var ne=a[te],se=a[te+1];te!==0&&y.push(Math.sqrt(gr(x,b,ne,se))),x=ne,b=se}return y}et.add=function(a){return this.ee.add(a),this},et.pm=function(a,y,x,b,E,te,ne,se){return this._isFrozen&&vn(this),this.fg=new Nn(a,y,E,te).freeze(),this.gg=new Nn(x,b,ne,se).freeze(),this},Zt.Object.defineProperties(Mn.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 Fu(this),this.tk}},flattenedLengths:{get:function(){return Fu(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===Mn.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===Mn.u)a=2*Math.abs(this.endX-this.startX)+2*Math.abs(this.endY-this.startY);else{y=this.flattenedLengths;for(var x=y.length,b=a=0;b<x;b++)for(var E=y[b],te=E.length,ne=0;ne<te;ne++)a+=E[ne]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&vn(this,a),this.na=a,a===Mn.o?this.ee=new yn:(Mn.V===null&&(Mn.V=new yn().freeze()),this.ee=Mn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&vn(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&vn(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&vn(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&vn(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&vn(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&vn(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&vn(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&vn(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),Mn.prototype.setSpots=Mn.prototype.pm,Mn.prototype.add=Mn.prototype.add,Mn.prototype.getFractionForPoint=Mn.prototype.xx,Mn.prototype.getPointAndAngleAlongPath=Mn.prototype.Qu,Mn.prototype.getAngleAlongPath=Mn.prototype.wx,Mn.prototype.getPointAlongPath=Mn.prototype.Pu,Mn.prototype.containsPoint=Mn.prototype.ca,Mn.prototype.transform=Mn.prototype.transform,Mn.prototype.rotate=Mn.prototype.rotate,Mn.prototype.scale=Mn.prototype.scale,Mn.prototype.offset=Mn.prototype.offset,Mn.prototype.normalize=Mn.prototype.normalize,Mn.prototype.computeBoundsWithoutOrigin=Mn.prototype.ix,Mn.prototype.equalsApprox=Mn.prototype.Xa,Mn.className="Geometry",Mn.j=new un(Mn,"Line",0),Mn.u=new un(Mn,"Rectangle",1),Mn.F=new un(Mn,"Ellipse",2),Mn.o=new un(Mn,"Path",3),Mn.V=null,Mn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",Mn.className="Geometry",Mn.stringify=Mn.ia,Mn.fillPath=Mn.nb,Mn.parse=Mn.parse,Mn.Line=Mn.j,Mn.Rectangle=Mn.u,Mn.Ellipse=Mn.F,Mn.Path=Mn.o;function Oo(a,y,x,b,E){yr(this),x===void 0&&(x=!0),b===void 0&&(b=!0),E===void 0&&(E=!1),this.l=2|(x?4:0)|(b?8:0)|(E?16:0),a!==void 0?this.od=a:this.od=0,y!==void 0?this.pd=y:this.pd=0,this.pl=new yn,this.sr=this.pl.Ja,this.fw=null}Oo.prototype.copy=function(){var a=new Oo;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,b=a.pl,E=0;E<x;E++){var te=y[E].copy();b.add(te)}return a.sr=this.sr,a.fw=this.fw,a},et=Oo.prototype,et.Xa=function(a){if(!(a instanceof Oo&&Gt.B(this.startX,a.startX)&&Gt.B(this.startY,a.startY)))return!1;var y=this.segments.s;a=a.segments.s;var x=y.length;if(x!==a.length)return!1;for(var b=0;b<x;b++)if(!y[b].Xa(a[b]))return!1;return!0},et.toString=function(a){a===void 0&&(a=-1);for(var y=0>a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a),x=this.segments.s,b=x.length,E=0;E<b;E++)y+=" "+x[E].toString(a);return y},et.freeze=function(){this._isFrozen=!0;var a=this.segments;a.freeze();var y=a.s;a=a.length;for(var x=0;x<a;x++)y[x].freeze();return this},et.ka=function(){this._isFrozen=!1;var a=this.segments;a.ka(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].ka();return this},et.Zu=function(){if(this._isInvalidBounds)return!0;var a=this.segments;if(this.sr!==a.Ja)return!0;a=a.s;for(var y=a.length,x=0;x<y;x++)if(a[x]._isInvalidBounds)return!0;return!1},et.add=function(a){return this.pl.add(a),this},et.ca=function(a,y,x){for(var b=this.startX,E=this.startY,te=b,ne=E,se=this.segments.s,he=se.length,pe=0;pe<he;pe++){var ye=se[pe];switch(ye.type){case Fo:te=ye.endX,ne=ye.endY,b=ye.endX,E=ye.endY;break;case Ri:if(Gt.Yb(b,E,ye.endX,ye.endY,x,a,y))return!0;b=ye.endX,E=ye.endY;break;case _o:if(Gt.cs(b,E,ye.point1X,ye.point1Y,ye.point2X,ye.point2Y,ye.endX,ye.endY,.5,a,y,x))return!0;b=ye.endX,E=ye.endY;break;case ds:if(Gt.jv(b,E,ye.point1X,ye.point1Y,ye.endX,ye.endY,.5,a,y,x))return!0;b=ye.endX,E=ye.endY;break;case wo:case ws:var Te=ye.type===wo?Ga(ye,this):js(ye,this,b,E),ze=Te.length,Ze=ye.type===wo?ye.centerX:ye.endX,$e=ye.type===wo?ye.centerY:ye.endY;if(ze===0){if(Gt.Yb(b,E,Ze,$e,x,a,y))return!0;b=Ze,E=$e;break}for(Ze=null,$e=0;$e<ze;$e++)if(Ze=Te[$e],$e===0&&Gt.Yb(b,E,Ze[0],Ze[1],x,a,y)||Gt.cs(Ze[0],Ze[1],Ze[2],Ze[3],Ze[4],Ze[5],Ze[6],Ze[7],.5,a,y,x))return!0;Ze!==null&&(b=Ze[6],E=Ze[7]);break;default:Ot("Unknown Segment type: "+ye.type)}if(ye.isClosed&&(b!==te||E!==ne)&&Gt.Yb(b,E,te,ne,x,a,y))return!0}return!1},Zt.Object.defineProperties(Oo.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&&vn(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&vn(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&vn(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&vn(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&vn(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&vn(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Oo.prototype.add=Oo.prototype.add,Oo.prototype.equalsApprox=Oo.prototype.Xa,Oo.className="PathFigure";function fi(a,y,x,b,E,te,ne,se){yr(this),a===void 0&&(a=Ri),this.na=a,this.l=2,y!==void 0?this.Dc=y:this.Dc=0,x!==void 0?this.Ec=x:this.Ec=0,b===void 0&&(b=0),E===void 0&&(E=0),te===void 0&&(te=0),ne===void 0&&(ne=0),a===ws?(a=te%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(b,0),this.Pg=Math.max(E,0),typeof ne=="boolean"?ne&&(this.isLargeArc=!0):typeof ne=="number"&&ne&&(this.isLargeArc=!0),se&&(this.isClockwiseArc=!0)):(this.Ne=b,this.Vh=E,a===wo&&(te=Math.max(te,0)),this.Wh=te,typeof ne=="number"?(a===wo&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}fi.prototype.copy=function(){var a=new fi;return a.na=this.na,a.l=this.l&-2,a.Dc=this.Dc,a.Ec=this.Ec,a.Ne=this.Ne,a.Vh=this.Vh,a.Wh=this.Wh,a.Pg=this.Pg,a},et=fi.prototype,et.Xa=function(a){if(!(a instanceof fi)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Fo:case Ri:return Gt.B(this.endX,a.endX)&&Gt.B(this.endY,a.endY);case _o:return Gt.B(this.endX,a.endX)&&Gt.B(this.endY,a.endY)&&Gt.B(this.point1X,a.point1X)&&Gt.B(this.point1Y,a.point1Y)&&Gt.B(this.point2X,a.point2X)&&Gt.B(this.point2Y,a.point2Y);case ds:return Gt.B(this.endX,a.endX)&&Gt.B(this.endY,a.endY)&&Gt.B(this.point1X,a.point1X)&&Gt.B(this.point1Y,a.point1Y);case wo:return Gt.B(this.startAngle,a.startAngle)&&Gt.B(this.sweepAngle,a.sweepAngle)&&Gt.B(this.centerX,a.centerX)&&Gt.B(this.centerY,a.centerY)&&Gt.B(this.radiusX,a.radiusX)&&Gt.B(this.radiusY,a.radiusY);case ws:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&Gt.B(this.xAxisRotation,a.xAxisRotation)&&Gt.B(this.endX,a.endX)&&Gt.B(this.endY,a.endY)&&Gt.B(this.radiusX,a.radiusX)&&Gt.B(this.radiusY,a.radiusY);default:return!1}},et.qb=function(a){a.classType===fi&&(this.type=a)},et.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Fo:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Ri:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case _o: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 ds: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 wo: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 ws:a=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.xAxisRotation.toString()+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toString()+" "+this.endY.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return this._isFrozen=!1,this},et.close=function(){return this.isClosed=!0,this};function Ga(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,b=a.radiusY;if(b===void 0&&(b=x),x===0||b===0)return a.ae=[],a.ae;y=a.Ne;var E=a.Vh,te=Gt.jx(0,0,x<b?x:b,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==b){var ne=Mr.alloc();ne.reset(),x<b?ne.scale(1,b/x):ne.scale(x/b,1),Mn.Ha(te,ne),Mr.free(ne)}for(x=te.length,b=0;b<x;b++)ne=te[b],ne[0]+=y,ne[1]+=E,ne[2]+=y,ne[3]+=E,ne[4]+=y,ne[5]+=E,ne[6]+=y,ne[7]+=E;return a.ae=te,a.ae}function js(a,y,x,b){function E(it,Tt,bt,Nt){return(it*Nt<Tt*bt?-1:1)*Math.acos((it*bt+Tt*Nt)/(Math.sqrt(it*it+Tt*Tt)*Math.sqrt(bt*bt+Nt*Nt)))}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 te=a.Pg;y===0&&(y=1e-4),te===0&&(te=1e-4);var ne=Math.PI/180*a.Ne,se=a.isLargeArc,he=a.isClockwiseArc,pe=a.Dc,ye=a.Ec,Te=Math.cos(ne),ze=Math.sin(ne),Ze=Te*(x-pe)/2+ze*(b-ye)/2;ne=-ze*(x-pe)/2+Te*(b-ye)/2;var $e=Ze*Ze/(y*y)+ne*ne/(te*te);return 1<$e&&(y*=Math.sqrt($e),te*=Math.sqrt($e)),$e=(se===he?-1:1)*Math.sqrt((y*y*te*te-y*y*ne*ne-te*te*Ze*Ze)/(y*y*ne*ne+te*te*Ze*Ze)),isNaN($e)&&($e=0),se=$e*y*ne/te,$e=$e*-te*Ze/y,isNaN(se)&&(se=0),isNaN($e)&&($e=0),x=(x+pe)/2+Te*se-ze*$e,b=(b+ye)/2+ze*se+Te*$e,ye=E(1,0,(Ze-se)/y,(ne-$e)/te),Te=(Ze-se)/y,pe=(ne-$e)/te,Ze=(-Ze-se)/y,se=(-ne-$e)/te,ne=E(Te,pe,Ze,se),Ze=(Te*Ze+pe*se)/(Math.sqrt(Te*Te+pe*pe)*Math.sqrt(Ze*Ze+se*se)),-1>=Ze?ne=Math.PI:1<=Ze&&(ne=0),!he&&0<ne&&(ne-=2*Math.PI),he&&0>ne&&(ne+=2*Math.PI),he=y>te?1:y/te,Ze=y>te?te/y:1,y=Gt.jx(0,0,y>te?y:te,ye,ye+ne,!0),te=Mr.alloc(),te.reset(),te.translate(x,b),te.rotate(a.Ne,0,0),te.scale(he,Ze),Mn.Ha(y,te),Mr.free(te),a.ae=y,a.ae}Zt.Object.defineProperties(fi.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&&vn(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&vn(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&vn(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&vn(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&vn(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&vn(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&vn(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&vn(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&vn(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&_n(a,">= zero",fi,"radiusX"),this._isFrozen&&vn(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&_n(a,">= zero",fi,"radiusY"),this._isFrozen&&vn(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&vn(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&&vn(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&&vn(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&&vn(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&&vn(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),fi.prototype.equalsApprox=fi.prototype.Xa;var Fo=new un(fi,"Move",0),Ri=new un(fi,"Line",1),_o=new un(fi,"Bezier",2),ds=new un(fi,"QuadraticBezier",3),wo=new un(fi,"Arc",4),ws=new un(fi,"SvgArc",4);fi.className="PathSegment",fi.Move=Fo,fi.Line=Ri,fi.Bezier=_o,fi.QuadraticBezier=ds,fi.Arc=wo,fi.SvgArc=ws;function va(){this.H=null,this.xu=new lt(0,0).freeze(),this.mt=new lt(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}va.prototype.copy=function(){var a=new va;return this.clone(a)},va.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},va.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},va.prototype.So=function(a,y){var x=this.diagram;return x===null||Pp(x,a,y),y},va.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Pp(x,a,y),y.assign(x.Ps(y))),y},Zt.Object.defineProperties(va.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}}}),va.prototype.getMultiTouchDocumentPoint=va.prototype.Bz,va.prototype.getMultiTouchViewPoint=va.prototype.So,va.className="InputEvent";function au(){this.H=null,this.xa="",this.ar=this.Lr=null}au.prototype.copy=function(){var a=new au;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},au.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},Zt.Object.defineProperties(au.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}}}),au.className="DiagramEvent";function oo(){this.Fm=to,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}oo.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},oo.prototype.copy=function(){var a=new oo;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=an(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=an(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=an(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=an(y)&&typeof y.J=="function"?y.J():y,a},oo.prototype.qb=function(a){a.classType===oo&&(this.change=a)},oo.prototype.toString=function(){var a="";return a=this.change===Ea?a+"* ":this.change===to?a+(this.model!==null?"!m":"!d"):a+((this.model!==null?"!m":"!d")+this.change),this.propertyName&&typeof this.propertyName=="string"&&(a+=" "+this.propertyName),this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange),a+=": ",this.change===Ea?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=Rr(this.object)),this.oldValue!==null&&(a+=" old: "+Rr(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+Rr(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},oo.prototype.I=function(a){return a?this.oldValue:this.newValue},oo.prototype.Dz=function(a){return a?this.oldParam:this.newParam},oo.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},oo.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},oo.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},oo.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Zt.Object.defineProperties(oo.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}}}),oo.prototype.redo=oo.prototype.redo,oo.prototype.canRedo=oo.prototype.canRedo,oo.prototype.undo=oo.prototype.undo,oo.prototype.canUndo=oo.prototype.canUndo,oo.prototype.getParam=oo.prototype.Dz,oo.prototype.getValue=oo.prototype.I,oo.prototype.clear=oo.prototype.clear;var Ea=new un(oo,"Transaction",-1),to=new un(oo,"Property",0),Po=new un(oo,"Insert",1),Eo=new un(oo,"Remove",2);oo.className="ChangedEvent",oo.Transaction=Ea,oo.Property=to,oo.Insert=Po,oo.Remove=Eo;function zo(){this.o=new yn().freeze(),this.xa="",this.j=!1}zo.prototype.toString=function(a){var y="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(a!==void 0&&0<a){a=this.changes.count;for(var x=0;x<a;x++){var b=this.changes.M(x);b!==null&&(y+=`
`+b.toString())}}return y},zo.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()},zo.prototype.canUndo=function(){return this.isComplete},zo.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()}},zo.prototype.canRedo=function(){return this.isComplete},zo.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()}},zo.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new Jt,x=0;x<a.count;x++){var b=a.M(x);if(b!==null&&b.change===to&&b.object){var E=y.get(b.object);E||(E=new Jt,y.set(b.object,E));var te=E.get(b.propertyName);te===null?E.set(b.propertyName,-1):(0<te&&a.cd(te,null),E.set(b.propertyName,x))}}for(x=y=0;x<a.count;x++)b=a.M(x),b!==null&&(x>y&&a.cd(y,b),y++);for(;a.length>y;)a.pop();a.freeze()}},Zt.Object.defineProperties(zo.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}}}),zo.prototype.optimize=zo.prototype.ak,zo.prototype.redo=zo.prototype.redo,zo.prototype.canRedo=zo.prototype.canRedo,zo.prototype.undo=zo.prototype.undo,zo.prototype.canUndo=zo.prototype.canUndo,zo.prototype.clear=zo.prototype.clear,zo.className="Transaction";function ho(){this.Pt=new xn,this.Jd=!1,this.u=new yn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new yn().freeze(),this.hl=new yn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}ho.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,b=0;b<x;b++)0<b&&(y+=" "),y+=this.nestedTransactionNames.M(b);if(y+="]",a!==void 0&&0<a)for(x=this.history.count,b=0;b<x;b++)y+=`
`+this.history.M(b).toString(a-1);return y},ho.prototype.clear=function(){var a=this.history;a.ka();for(var y=a.count-1;0<=y;y--){var x=a.M(y);x!==null&&x.clear()}a.clear(),this.Ce=-1,a.freeze(),this.Fe=!1,this.Np=null,this.bi=0,this.Ie.ka(),this.Ie.clear(),this.Ie.freeze(),this.hl.clear(),this.Dt=this.rq=this.Gt=this.Ft=!1},ho.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},et=ho.prototype,et.Xw=function(a){this.Pt.add(a)},et.Rx=function(a){this.Pt.remove(a)},et.Ea=function(a){if(a===void 0&&(a=""),a===null&&(a=""),this.isUndoingRedoing)return!1;this.tt===!0&&(this.tt=!1,this.bi++,this.isInternalTransaction||this.Ob("StartingFirstTransaction",a,this.currentTransaction),0<this.bi&&this.bi--),this.isEnabled&&(this.Ie.ka(),this.Ie.add(a),this.Ie.freeze(),this.currentTransaction===null?this.hl.add(0):this.hl.add(this.currentTransaction.changes.count)),this.bi++;var y=this.transactionLevel===1;return y&&(this.isInternalTransaction||this.Ob("StartedTransaction",a,this.currentTransaction)),y},et.eb=function(a){return a===void 0&&(a=""),Bu(this,!0,a)},et.Kf=function(){return Bu(this,!1,"")};function Bu(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&qn("Ending transaction without having started a transaction: "+x);var b=a.transactionLevel===1,E=a.currentTransaction;b&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,E));var te=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var ne=a.Ie.count;0<ne&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(ne-1),a.Ie.freeze()),ne=a.hl.count,0<ne&&(te=a.hl.M(ne-1),a.hl.mb(ne-1))}if(b){if(y)a.rq=!1,E===null&&x!==""&&(E=a.currentTransaction),a.isEnabled&&E!==null&&(E.isComplete||(E.isComplete=!0,E.name=x),a.lx(),y=a.history,y.ka(),b=a.maxHistoryLength,0<=b&&(b===0?y.clear():y.count>=b&&(te=y.M(0),te!==null&&te.clear(),y.mb(0),a.Ce--)),b===0||y.count!==0&&y.get(y.count-1)===E||(y.add(E),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,E);else{a.Fe=!0;try{a.isEnabled&&E!==null&&(E.isComplete=!0,E.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,E),a.Fe=!1}E!==null&&E.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&E!==null){for(a=te,x=E.changes,E=x.count-1;E>=a;E--)y=x.M(E),y!==null&&y.undo(),x.ka(),x.mb(E);x.freeze()}return!1}et.lx=function(){if(!this.isUndoingRedoing&&this.canRedo()){var a=this.history;a.ka();for(var y=a.count-1;y>this.historyIndex;y--){var x=a.M(y);x!==null&&x.clear(),a.mb(y),this.rq=!0}a.freeze()}},ho.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},ho.prototype.undo=function(){if(this.canUndo()){var a=this.transactionToUndo;try{this.Fe=!0,this.Ob("StartingUndo","Undo",a),this.Ce--,a.undo()}catch(y){qn("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},ho.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},ho.prototype.redo=function(){if(this.canRedo()){var a=this.transactionToRedo;try{this.Fe=!0,this.Ob("StartingRedo","Redo",a),this.Ce++,a.redo()}catch(y){qn("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},ho.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var b=new oo;for(b.change=Ea,b.propertyName=a,b.object=x,b.oldValue=y,a=this.models;a.next();)y=a.value,b.model=y,y.ds(b)},ho.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new zo);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||qn("Change not within a transaction: "+x.toString()))}},ho.prototype.skipsEvent=function(a){if(a===null||0>a.change.value)return!0;if(a=a.object,a===null)return!1;if(a.layer!==void 0){if(a=a.layer,a!==null&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1},Zt.Object.defineProperties(ho.prototype,{models:{get:function(){return this.Pt.iterator}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},transactionToUndo:{get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.M(this.historyIndex):null}},transactionToRedo:{get:function(){return this.historyIndex<this.history.count-1?this.history.M(this.historyIndex+1):null}},isUndoingRedoing:{get:function(){return this.Fe}},history:{get:function(){return this.u}},maxHistoryLength:{get:function(){return this.o},set:function(a){this.o=a}},historyIndex:{get:function(){return this.Ce}},currentTransaction:{get:function(){return this.Np}},transactionLevel:{get:function(){return this.bi}},isInTransaction:{get:function(){return 0<this.bi}},checksTransactionLevel:{get:function(){return this.j},set:function(a){this.j=a}},nestedTransactionNames:{get:function(){return this.Ie}},isPendingClear:{get:function(){return this.Ft},set:function(a){this.Ft=a}},isPendingUnmodified:{get:function(){return this.Gt},set:function(a){this.Gt=a}},isInternalTransaction:{get:function(){return this.Dt},set:function(a){this.Dt=a}},isJustDiscarded:{get:function(){return this.rq}}}),ho.prototype.handleChanged=ho.prototype.Tu,ho.prototype.redo=ho.prototype.redo,ho.prototype.undo=ho.prototype.undo,ho.prototype.canUndo=ho.prototype.canUndo,ho.prototype.discardHistoryAfterIndex=ho.prototype.lx,ho.prototype.rollbackTransaction=ho.prototype.Kf,ho.prototype.commitTransaction=ho.prototype.eb,ho.prototype.startTransaction=ho.prototype.Ea,ho.prototype.removeModel=ho.prototype.Rx,ho.prototype.addModel=ho.prototype.Xw,ho.prototype.clear=ho.prototype.clear,ho.className="UndoManager";function hi(){yr(this),this.H=cu,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new va,this.Zr=-1}hi.prototype.toString=function(){return this.name!==""?this.name+" Tool":hr(this.constructor)},hi.prototype.updateAdornments=function(){},hi.prototype.canStart=function(){return this.isEnabled},hi.prototype.doStart=function(){},hi.prototype.doActivate=function(){this.isActive=!0},hi.prototype.doDeactivate=function(){this.isActive=!1},hi.prototype.doStop=function(){},hi.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},hi.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},hi.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},hi.prototype.doMouseMove=function(){},hi.prototype.doMouseUp=function(){this.stopTool()},hi.prototype.doMouseWheel=function(){},hi.prototype.canStartMultiTouch=function(){return!0},hi.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,lt.allocAt(NaN,NaN)),b=y.So(1,lt.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var E=b.x-x.x,te=b.y-x.y;a.Jw=Math.sqrt(E*E+te*te),y.bubbles=!1}lt.free(x),lt.free(b)},hi.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,lt.allocAt(NaN,NaN)),b=y.So(1,lt.allocAt(NaN,NaN));if(x.w()&&b.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var E=b.x-x.x,te=b.y-x.y;te=Math.sqrt(E*E+te*te)/a.Jw,E=new lt((Math.min(b.x,x.x)+Math.max(b.x,x.x))/2,(Math.min(b.y,x.y)+Math.max(b.y,x.y))/2),te*=a.Bw;var ne=a.commandHandler;if(te!==a.scale&&ne.canResetZoom(te)){var se=a.zoomPoint;a.zoomPoint=E,ne.resetZoom(te),a.zoomPoint=se}y.bubbles=!1}lt.free(x),lt.free(b)},hi.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},hi.prototype.doKeyUp=function(){},hi.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},hi.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},hi.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(qr?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||(qr?y.meta:y.control)||y.shift||a.clearSelection()}},hi.prototype.standardMouseClick=function(a,y){a===void 0&&(a=null),y===void 0&&(y=function(E){return!E.layer.isTemporary});var x=this.diagram,b=x.lastInput;return a=x.ic(b.documentPoint,a,y),b.targetObject=a,uf(a,b,x),b.handled};function uf(a,y,x){if(y.handled=!1,a===null||a.If()){var b=0;y.left?b=y.clickCount===1?1:y.clickCount===2?2:1:y.right&&y.clickCount===1&&(b=3);var E="ObjectSingleClicked";if(a!==null){switch(b){case 1:E="ObjectSingleClicked";break;case 2:E="ObjectDoubleClicked";break;case 3:E="ObjectContextClicked"}b!==0&&x.R(E,a)}else{switch(b){case 1:E="BackgroundSingleClicked";break;case 2:E="BackgroundDoubleClicked";break;case 3:E="BackgroundContextClicked"}b!==0&&x.R(E)}if(a!==null)for(;a!==null;){switch(x=null,b){case 1:x=a.click;break;case 2:x=a.doubleClick?a.doubleClick:a.click;break;case 3:x=a.contextClick}if(x!==null&&(x(y,a),y.handled))break;a=a.panel}else{switch(a=null,b){case 1:a=x.click;break;case 2:a=x.doubleClick?x.doubleClick:x.click;break;case 3:a=x.contextClick}a!==null&&a(y)}}}hi.prototype.standardMouseOver=function(){var a=this.diagram,y=a.lastInput;if(a.animationManager.zb!==!0){var x=a.skipsUndoManager;a.skipsUndoManager=!0;var b=a.viewportBounds.ca(y.documentPoint)?a.ic(y.documentPoint,null,null):null;!y.event||y.event.type!=="pointercancel"&&y.event.type!=="pointerout"||(b=null),y.targetObject=b;var E=!1;if(b!==a.Ck){var te=a.Ck,ne=te;for(a.Ck=b,this.doCurrentObjectChanged(te,b),y.handled=!1;te!==null;){var se=te.mouseLeave;if(se!==null&&(b===te||b!==null&&b.rg(te)||(se(y,te,b),E=!0,y.handled)))break;te=te.panel}for(te=ne,y.handled=!1;b!==null&&(ne=b.mouseEnter,!(ne!==null&&(te===b||te!==null&&te.rg(b)||(ne(y,b,te),E=!0,y.handled))));)b=b.panel;b=a.Ck}if(b!==null){for(te=b,ne="";te!==null&&(ne=te.cursor,ne==="");)te=te.panel;for(a.currentCursor=ne,y.handled=!1,te=b;te!==null&&(b=te.mouseOver,!(b!==null&&(b(y,te),E=!0,y.handled)));)te=te.panel}else this.doUpdateCursor(null),b=a.mouseOver,b!==null&&(b(y),E=!0);E&&a.$b(),a.skipsUndoManager=x}},hi.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},hi.prototype.doCurrentObjectChanged=function(){},hi.prototype.standardMouseWheel=function(){var a=this.diagram,y=a.lastInput,x=y.delta;if(x!==0&&a.documentBounds.w()){var b=a.commandHandler,E=a.toolManager.mouseWheelBehavior;if(b!==null&&(E===ih&&!y.shift||E===su&&y.control))(0<x?b.canIncreaseZoom():b.canDecreaseZoom())&&(E=a.zoomPoint,a.zoomPoint=y.viewPoint,0<x?b.increaseZoom():b.decreaseZoom(),a.zoomPoint=E),y.bubbles=!1;else if(E===ih&&y.shift||E===su&&!y.control){b=a.position.copy();var te=y.event;E=te.deltaMode;var ne=te.deltaX;te=te.deltaY;var se="pixel";if(ne===0&&te===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(se,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(se,0<x?"left":"right",Math.abs(x)));else{switch(E){case 0:se="pixel";break;case 1:se="line";break;case 2:se="page"}ne!==0&&a.allowHorizontalScroll&&(ne*=a.scrollHorizontalLineChange/16,a.scroll(se,0<ne?"right":"left",Math.abs(ne))),te!==0&&a.allowVerticalScroll&&(te*=a.scrollVerticalLineChange/16,a.scroll(se,0<te?"down":"up",Math.abs(te)))}this.doWheelChange(a,b,y)}}},hi.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},hi.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,b=y.clone(this.yy);this.Zr=qt(function(){x.doWaitAfter(b)},a)},hi.prototype.cancelWaitAfter=function(){this.Zr!==-1&&An.clearTimeout(this.Zr),this.Zr=-1},hi.prototype.doWaitAfter=function(){},hi.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof di);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},hi.prototype.isBeyondDragSize=function(a,y){var x=this.diagram;a===void 0&&(a=x.firstInput.viewPoint),y===void 0&&(y=x.lastInput.viewPoint);var b=x.toolManager.dragSize,E=b.width;return b=b.height,x.firstInput.isTouchEvent&&(E+=6,b+=6),Math.abs(y.x-a.x)>E||Math.abs(y.y-a.y)>b},Zt.Object.defineProperties(hi.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Vt&&(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}}}),hi.prototype.startTransaction=hi.prototype.Ea,hi.className="Tool";function Xi(){hi.call(this),this.name="ToolManager",this.hb=new yn,this.ob=new yn,this.Hb=new yn,this.F=this.V=850,this.o=new fn(2,2).ja(),this.Ha=5e3,this.ia=su,this.u=_h,this.Mp=this.j=null,this.zj=-1}nn(Xi,hi),Xi.prototype.initializeStandardTools=function(){},Xi.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof di&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Xi.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===Nl&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===Iu){y.bubbles=!0;return}if(this.gestureBehavior===Nl)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,b=0;b<x;b++){var E=this.mouseDownTools.M(b);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseDown());return}}a.lastInput.button===1&&(this.mouseWheelBehavior===su?this.mouseWheelBehavior=ih:this.mouseWheelBehavior===ih&&(this.mouseWheelBehavior=su)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Xi.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===Iu){y.bubbles=!0;return}if(this.gestureBehavior===Nl)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomMove();return}}if(this.isActive)for(var x=this.mouseMoveTools.length,b=0;b<x;b++){var E=this.mouseMoveTools.M(b);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseMove());return}}Cc(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Cc(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}Xi.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof di&&(y===a||y.rg(a))||this.hideToolTip()},Xi.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()))},Xi.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)},Xi.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 di)||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()},Xi.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof di){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category="ToolTip",a.placeholder!==null&&(a.placeholder.scale=x.scale);var b=a.diagram;b!==null&&b!==x&&b.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionToolTip(a,y)}else a instanceof Zl&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(An.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var E=this;this.zj=qt(function(){E.hideToolTip()},a)}},Xi.prototype.positionToolTip=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),b=a.measuredBounds,E=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=b.width),x.x+b.width>E.right&&(x.x-=b.width+5/y.scale),x.x<E.x&&(x.x=E.x),x.y=x.y+20/y.scale+b.height>E.bottom?x.y-(b.height+5/y.scale):x.y+20/y.scale,x.y<E.y&&(x.y=E.y),a.position=x}},Xi.prototype.hideToolTip=function(){this.zj!==-1&&(An.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof di?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Zl&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Xi.prototype.doMouseUp=function(){this.cancelWaitAfter();var a=this.diagram;if(this.isActive)for(var y=this.mouseUpTools.length,x=0;x<y;x++){var b=this.mouseUpTools.M(x);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseUp());return}}a.doFocus(),this.doDeactivate()},Xi.prototype.doMouseWheel=function(){this.standardMouseWheel()},Xi.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Xi.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Xi.prototype.findTool=function(a){for(var y=this.mouseDownTools.length,x=0;x<y;x++){var b=this.mouseDownTools.M(x);if(b.name===a)return b}for(y=this.mouseMoveTools.length,x=0;x<y;x++)if(b=this.mouseMoveTools.M(x),b.name===a)return b;for(y=this.mouseUpTools.length,x=0;x<y;x++)if(b=this.mouseUpTools.M(x),b.name===a)return b;return null},Xi.prototype.replaceTool=function(a,y){y!==null&&(y.diagram=this.diagram);for(var x=this.mouseDownTools.length,b=0;b<x;b++){var E=this.mouseDownTools.M(b);if(E.name===a)return y!==null?this.mouseDownTools.cd(b,y):this.mouseDownTools.mb(b),E}for(x=this.mouseMoveTools.length,b=0;b<x;b++)if(E=this.mouseMoveTools.M(b),E.name===a)return y!==null?this.mouseMoveTools.cd(b,y):this.mouseMoveTools.mb(b),E;for(x=this.mouseUpTools.length,b=0;b<x;b++)if(E=this.mouseUpTools.M(b),E.name===a)return y!==null?this.mouseUpTools.cd(b,y):this.mouseUpTools.mb(b),E;return null},Xi.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)},Zt.Object.defineProperties(Xi.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 di?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}}}),Xi.prototype.replaceStandardTool=Xi.prototype.gb;var su=new un(Xi,"WheelScroll",0),ih=new un(Xi,"WheelZoom",1),Ec=new un(Xi,"WheelNone",2),_h=new un(Xi,"GestureZoom",3),Nl=new un(Xi,"GestureCancel",4),Iu=new un(Xi,"GestureNone",5);Xi.className="ToolManager",Xi.WheelScroll=su,Xi.WheelZoom=ih,Xi.WheelNone=Ec,Xi.GestureZoom=_h,Xi.GestureCancel=Nl,Xi.GestureNone=Iu;function lo(){hi.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 lt(NaN,NaN),this.Fr=new lt,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new xn().freeze(),this.ia=new ce,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var nl;nn(lo,hi),lo.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},lo.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},lo.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,(qr?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},lo.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),ha=null,this.isActive=!0,this.tl.set(a.position),zh(this,a.selection),this.Cg.length=0,a.animationManager.Cc(),this.draggedParts=this.computeEffectiveCollection(a.selection,this.dragOptions),this.Sw=this.diagram.layout.isRealtime,this.diagram.layout.isRealtime=!1,a.Ns=!0,a.Gf("temporaryPixelRatio")===!0&&30<a.$w&&as(a),pd(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,ha=this,oh=this.diagram,this.doSimulatedDragOut()))};function zh(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof Tn?(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 Os,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}lo.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},lo.prototype.Pd=function(a){return a===void 0?new Uu(Bn):this.isGridSnapEnabled?new Uu(new lt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new Uu(a.copy())},lo.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),Hl(this),Qh(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<nl.count){for(var y=nl,x=y.length,b=0;b<x;b++){var E=y.M(b);ao(E),Ui(E),Hl(E),E.diagram.ug()}y.clear()}ao(this),this.tl.h(NaN,NaN),oh!==null&&(oh.currentCursor=""),ha=oh=null,Ui(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),Pf(a,!0)},lo.prototype.stopTransaction=function(){var a=this.diagram,y=hi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function Hl(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,lu(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function kc(){var a=ha;Ui(a),Fa(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}lo.prototype.doCancel=function(){Ui(this),Fa(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},lo.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},lo.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function Kl(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var b=x.undoManager;for(b.isEnabled&&b.isInTransaction?b.currentTransaction!==null&&0<b.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):Fa(a),x.skipsUndoManager=!y,x.partManager.addsToTemporaryLayer=!y,a.startPoint=x.firstInput.documentPoint,y=a.copiesEffectiveCollection?a.draggedParts.Lf():x.selection,y=x.Kj(y,x,!0),x=new Jt,b=a.draggedParts.iterator;b.next();){var E=b.key;if(E.Zc()&&E.canCopy()){var te=y.I(E);te!==null&&(te.location=E.location,te.Va(),x.add(te,a.Pd(te.location)))}}for(y=y.iterator;y.next();)b=y.value,b instanceof Tn&&b.canCopy()&&x.add(b,a.Pd());a.copiedParts=x,zh(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Ch(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function Ui(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 Tn&&(x.value.point=new lt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function ao(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 Zo(a,y,x){var b=a.diagram,E=a.startPoint,te=lt.alloc();te.assign(b.lastInput.documentPoint),a.moveParts(y,te.re(E),x),lt.free(te),b.Gf("temporaryPixelRatio")===!0&&b.Yh===null&&30<b.$w&&(as(b),b.hk())}lo.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var b=this.diagram;b!==null&&Jh(b,a,y,this.dragOptions,x)};function Fa(a){if(a.draggedParts!==null){for(var y=a.diagram,x=a.draggedParts.iterator;x.next();){var b=x.key;b.Zc()&&(b.location=x.value.point)}for(x=a.draggedParts.iterator;x.next();)if(b=x.key,b instanceof Tn&&b.suspendsRouting){var E=x.value.point;a.draggedParts.add(b,a.Pd()),Ch(b,-E.x,-E.y)}y.bd()}}function ka(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),rl(a,!1));var b=a.findDragOverObject(y),E=x.lastInput;E.targetObject=b,a.doUpdateCursor(b);var te=x.skipsUndoManager,ne=!1;try{if(x.skipsUndoManager=!0,ne=lu(a,E,b),!a.isActive&&ha===null)return;var se=b!==null?b.part:null;if(se===null||x.handlesDragDropForTopLevelParts&&se.isTopLevel&&!(se instanceof jr)){var he=x.mouseDragOver;he!==null&&(he(E),ne=!0)}if(!a.isActive&&ha===null||(a.doDragOver(y,b),!a.isActive&&ha===null))return}finally{x.skipsUndoManager=te,ne&&x.bd()}a.Bn=b,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(E.viewPoint)}lo.prototype.findDragOverObject=function(a){var y=this;return fu(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof di||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},lo.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 lu(a,y,x){var b=!1,E=a.Cg.length,te=0<E?a.Cg[0]:null;if(x===te)return!1;y.handled=!1;for(var ne=0;ne<E;ne++){var se=a.Cg[ne],he=se.mouseDragLeave;if(he!==null&&(he(y,se,x),b=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&ha===null||x===null)return b;for(y.handled=!1,E=x;E!==null;)a.Cg.push(E),E=Vl(E);for(E=a.Cg.length,x=0;x<E&&(ne=a.Cg[x],se=ne.mouseDragEnter,se===null||(se(y,ne,te),b=!0,!y.handled));x++);return b}function Vl(a){var y=a.panel;return y!==null?y:a instanceof fr&&!(a instanceof jr)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function uu(a,y,x){var b=a.Oe;if(b===null)return null;var E=a.diagram.og(y,b.portGravity,function(pe){return b.findValidLinkablePort(pe,x)});a=lt.alloc();var te=1/0,ne=null;for(E=E.iterator;E.next();){var se=E.value;if(se.part!==null){var he=se.ga(ti,a);he=y.Bf(he),he<te&&(ne=se,te=he)}}return lt.free(a),ne}function rl(a,y){var x=a.draggedLink;if(x!==null&&!(2>x.pointsCount)){var b=a.diagram;if(!b.isReadOnly){var E=a.Oe;if(E!==null){var te=null,ne=null;x.fromNode===null&&(te=uu(a,x.i(0),!1),te!==null&&(ne=te.part));var se=null,he=null;x.toNode===null&&(se=uu(a,x.i(x.pointsCount-1),!0),se!==null&&(he=se.part)),E.isValidLink(ne,te,he,se)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=ne,te!==null&&(x.fromPortId=te.portId),x.toNode=he,se!==null&&(x.toPortId=se.portId),x.fromPort!==b.Mx&&b.R("LinkRelinked",x,b.Mx),x.toPort!==b.Nx&&b.R("LinkRelinked",x,b.Nx)):ed(E,ne,te,he,se):ed(E,null,null,null,null)}}}}lo.prototype.doDragOver=function(){};function Al(a,y){var x=a.diagram;a.dragsLink&&rl(a,!0),Hl(a);var b=a.findDragOverObject(y),E=x.lastInput;if(E.targetObject=b,b!==null){E.handled=!1;for(var te=b;te!==null;){var ne=te.mouseDrop;if(ne!==null&&(ne(E,te),E.handled))break;J0(a,E,te),te=Vl(te)}}else te=x.mouseDrop,te!==null&&te(E);if(a.isActive||ha!==null){for(E=(a.copiedParts||a.draggedParts).iterator;E.next();)te=E.key,te instanceof Rn&&te.linksConnected.each(function(se){se.suspendsRouting=!1});if(a.doDropOnto(y,b),a.isActive||ha!==null){for(a=Yt.alloc(),y=x.selection.iterator;y.next();)b=y.value,b instanceof Rn&&Q0(x,b,a);Yt.free(a)}}}function J0(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof jr||(x=a.mouseDrop,x!==null&&x(y))}function Q0(a,y,x){var b=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(b=!0),a=a.Nu(x,function(E){return E.part},function(E){return E instanceof Tn},!0,function(E){return E instanceof Tn},b),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}lo.prototype.doDropOnto=function(){},lo.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()?(Kl(this,!1),pd(a,this.copiedParts),Zo(this,this.copiedParts,!1),Qh(a,this.copiedParts)):this.mayMove()?(Ui(this),Zo(this,this.draggedParts,!0)):this.mayDragOut()?(Kl(this,!1),Zo(this,this.copiedParts,!1)):Ui(this),ka(this,a.lastInput.documentPoint))}},lo.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?(Ui(this),Kl(this,!0),pd(a,this.copiedParts),Zo(this,this.copiedParts,!1),Qh(a,this.copiedParts),this.copiedParts!==null&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0}))):(y=!0,Ui(this),this.mayMove()&&(Zo(this,this.draggedParts,!0),ka(this,a.lastInput.documentPoint))),this.Ym=!0,Al(this,a.lastInput.documentPoint),this.isActive){var b=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&q0(this),a.Ya(),Qh(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",b)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},lo.prototype.simulatedMouseMove=function(a,y,x){if(ha===null)return!1;var b=ha.diagram;x instanceof Vt||(x=null);var E=oh;return x!==E&&(E!==null&&E!==b&&(E.ug(),ha.isDragOutStarted=!1,E=E.toolManager.findTool("Dragging"),E!==null&&E.doSimulatedDragLeave()),oh=x,x!==null&&x!==b&&(kc(),E=x.toolManager.findTool("Dragging"),E!==null&&(nl.contains(E)||nl.add(E),E.doSimulatedDragEnter())),this.doUpdateCursor(null)),x===null||x===b||!x.allowDrop||x.isReadOnly||!x.allowInsert?!1:(b=x.toolManager.findTool("Dragging"),b!==null&&(a!==null&&(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)),x.lastInput.documentPoint=y,x.lastInput.viewPoint=x.op(y),x.lastInput.down=!1,x.lastInput.up=!1,b.doSimulatedDragOver()),!0)},lo.prototype.simulatedMouseUp=function(a,y,x){if(ha===null)return!1;var b=oh,E=ha.diagram;if(x===null)return ha.doCancel(),!0;if(x!==b){var te=b.toolManager.findTool("Dragging");if(b!==null&&b!==E&&te!==null)return b.ug(),ha.isDragOutStarted=!1,te.doSimulatedDragLeave(),!1;oh=x,b=x.toolManager.findTool("Dragging"),b!==null&&(kc(),nl.contains(b)||nl.add(b),b.doSimulatedDragEnter())}return x!==this.diagram?(a!==null?(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)):y===null&&(y=new lt),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=ha,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function q0(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof Rn&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}lo.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(qr?!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())},lo.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())},lo.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())},lo.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},lo.prototype.Az=function(){return ha},lo.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=ha;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},lo.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Ks(a),a.animationManager.Cc(),a=ha,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},lo.prototype.doSimulatedDragLeave=function(){var a=ha;a!==null&&a.doSimulatedDragOut(),this.doCancel()},lo.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=ha;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;Rg(this,y.draggedParts.Lf(),!1,a.firstInput),Zo(this,this.copiedParts,!1),ka(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},lo.prototype.doSimulatedDrop=function(){var a=this.diagram,y=ha;if(y!==null){var x=y.diagram;if(y.Ym=!0,Ui(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),Rg(this,y.draggedParts.Lf(),!0,a.lastInput),Zo(this,this.copiedParts,!1);var b=new xn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(E){E.isSelected=!0,b.add(E)})),Al(this,a.lastInput.documentPoint),a.Ya(),this.copiedParts!==null&&(this.transactionResult="ExternalCopy"),this.copiedParts=null,a.doFocus(),a.R("ExternalObjectsDropped",b,x),this.stopTransaction(),a.R("ChangedSelection",a.selection)}a.animationManager.Dm=!1};function Rg(a,y,x,b){if(a.copiedParts===null){var E=a.diagram;if(!E.isReadOnly&&!E.isModelReadOnly){E.skipsUndoManager=!x,E.partManager.addsToTemporaryLayer=!x,a.startPoint=b.documentPoint,x=E.Kj(y,E,!0);var te=Yt.alloc();E=b=1/0;for(var ne=-1/0,se=-1/0,he=y.iterator;he.next();){var pe=he.value;if(pe.isVisible()){var ye=pe.location;pe=ye.x,ye=ye.y,isNaN(pe)||isNaN(ye)||(pe<b&&(b=pe),ye<E&&(E=ye),pe>ne&&(ne=pe),ye>se&&(se=ye))}}for(b===1/0?te.h(0,0,0,0):te.h(b,E,ne-b,se-E),b=te.x+te.width/2,E=te.y+te.height/2,Yt.free(te),te=a.Fr,ne=new Jt,se=lt.alloc(),he=y.iterator;he.next();)pe=he.value,pe instanceof Tn&&pe.canCopy()&&(ye=x.I(pe),ye!==null&&(ye.points=pe.points,Ch(ye,te.x-b,te.y-E),ye.suspendsRouting=!0,ne.add(ye,a.Pd())));for(y=y.iterator;y.next();)pe=y.value,pe.Zc()&&pe.canCopy()&&(he=x.I(pe),he!==null&&(pe=pe.location,se.h(te.x-(b-pe.x),te.y-(E-pe.y)),he.location=se,he.Va(),ne.add(he,a.Pd(se))));lt.free(se),a.copiedParts=ne,zh(a,ne.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Ch(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}lo.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},lo.prototype.computeMove=function(a,y,x,b){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,b):new lt},Zt.Object.defineProperties(lo.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}}}),lo.prototype.getDraggingSource=lo.prototype.Az;var ha=null,oh=null;lo.className="DraggingTool",nl=new yn,Pr("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Xi.prototype.doCancel=function(){ha!==null&&ha.doCancel(),hi.prototype.doCancel.call(this)};function So(){hi.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Tn,y=new Ir;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Ir,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Rn,y=new Ir,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=kr,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Rn,y=new Ir,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=kr,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 Jt,this.Of=this.gj=this.Pf=null}nn(So,hi),So.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},So.prototype.copyPortProperties=function(a,y,x,b,E){if(a!==null&&y!==null&&x!==null&&b!==null){var te=y.Df(),ne=fn.alloc();ne.width=y.naturalBounds.width*te,ne.height=y.naturalBounds.height*te,b.desiredSize=ne,fn.free(ne),E?(b.toSpot=y.toSpot,b.toEndSegmentLength=y.toEndSegmentLength):(b.fromSpot=y.fromSpot,b.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=ti,te=lt.alloc(),x.location=y.ga(ti,te),lt.free(te),b.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,b,E)}},So.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=kr,y.fromSpot=zr,y.toSpot=zr),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},So.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},So.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Rn){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)}},So.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Rn))return null;for(;a!==null;){var b=y?a.toLinkable:a.fromLinkable;if(b===!0&&(a.portId!==null||a instanceof Rn)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(b===!1)break;a=a.panel}return null},So.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,b=this.portGravity;0>=b&&(b=.1);var E=this,te=y.og(x,b,function(Te){return E.findValidLinkablePort(Te,a)},null,!0);for(b=1/0,y=null,te=te.iterator;te.next();){var ne=te.value,se=ne.part;if(se instanceof Rn){var he=ne.ga(ti,lt.alloc()),pe=x.x-he.x,ye=x.y-he.y;lt.free(he),he=pe*pe+ye*ye,he<b&&(pe=this.validPortsCache.I(ne),pe!==null?pe&&(y=ne,b=he):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,se,ne)||!a&&this.isValidLink(se,ne,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(ne,!0),y=ne,b=he):this.validPortsCache.add(ne,!1))}}return y!==null&&(x=y.part,x instanceof Rn&&(x.layer===null||x.layer.allowLink))?y:null},So.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},So.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},So.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},So.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Rn))return!1;a=a.portId,a===null&&(a="");var b=y.part;if(!(b instanceof Rn))return!1;for(y=y.portId,y===null&&(y=""),y=b.Sd(y);y.next();)if(b=y.value,b.fromNode===x&&b.fromPortId===a)return!0;return!1},So.prototype.isValidLink=function(a,y,x,b){if(!this.isValidFrom(a,y)||!this.isValidTo(x,b)||!(y===null||b===null||(y.fromLinkableSelfNode&&b.toLinkableSelfNode||!this.isInSameNode(y,b))&&(y.fromLinkableDuplicates&&b.toLinkableDuplicates||!this.isLinked(y,b)))||this.originalLink!==null&&(a!==null&&this.isLabelDependentOnLink(a,this.originalLink)||x!==null&&this.isLabelDependentOnLink(x,this.originalLink))||a!==null&&x!==null&&(a.data===null&&x.data!==null||a.data!==null&&x.data===null)||!this.isValidCycle(a,x,this.originalLink))return!1;if(a!==null){var E=a.linkValidation;if(E!==null&&!E(a,y,x,b,this.originalLink))return!1}return x!==null&&(E=x.linkValidation,E!==null&&!E(a,y,x,b,this.originalLink))?!1:(E=this.linkValidation,E!==null?E(a,y,x,b,this.originalLink):!0)},So.prototype.isLabelDependentOnLink=function(a,y){if(a===null)return!1;var x=a.labeledLink;if(x===null)return!1;if(x===y)return!0;var b=new xn;return b.add(a),Da(this,x,y,b)};function Da(a,y,x,b){if(y===x)return!0;var E=y.fromNode;return E!==null&&E.isLinkLabel&&(b.add(E),Da(a,E.labeledLink,x,b))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(b.add(y),Da(a,y.labeledLink,x,b))))}So.prototype.isValidCycle=function(a,y,x){if(x===void 0&&(x=null),a===null||y===null)return this.isUnconnectedLinkValid;var b=this.diagram.validCycle;if(b!==Tf){if(b===Rp){if(b=x||this.temporaryLink,b!==null&&!b.isTreeLink)return!0;for(b=y.linksConnected;b.next();){var E=b.value;if(E!==x&&E.isTreeLink&&E.toNode===y)return!1}return!Ua(this,a,y,x,!0)}if(b===_p){if(b=x||this.temporaryLink,b!==null&&!b.isTreeLink)return!0;for(b=a.linksConnected;b.next();)if(E=b.value,E!==x&&E.isTreeLink&&E.fromNode===a)return!1;return!Ua(this,a,y,x,!0)}if(b===Dp)return a===y?a=!0:(b=new xn,b.add(y),a=Wa(this,b,a,y,x)),!a;if(b===Bp)return!Ua(this,a,y,x,!1);if(b===Ip)return a===y?a=!0:(b=new xn,b.add(y),a=Tc(this,b,a,y,x)),!a}return!0};function Ua(a,y,x,b,E){if(y===x)return!0;if(y===null||x===null)return!1;for(var te=y.linksConnected;te.next();){var ne=te.value;if(ne!==b&&(!E||ne.isTreeLink)&&ne.toNode===y&&(ne=ne.fromNode,ne!==y&&Ua(a,ne,x,b,E)))return!0}return!1}function Wa(a,y,x,b,E){if(x===b)return!0;if(x===null||b===null||y.contains(x))return!1;y.add(x);for(var te=x.linksConnected;te.next();){var ne=te.value;if(ne!==E&&ne.toNode===x&&(ne=ne.fromNode,ne!==x&&Wa(a,y,ne,b,E)))return!0}return!1}function Tc(a,y,x,b,E){if(x===b)return!0;if(x===null||b===null||y.contains(x))return!1;y.add(x);for(var te=x.linksConnected;te.next();){var ne=te.value;if(ne!==E){var se=ne.fromNode;if(ne=ne.toNode,se=se===x?ne:se,se!==x&&Tc(a,y,se,b,E))return!0}}return!1}Zt.Object.defineProperties(So.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}}}),So.className="LinkingBaseTool";function Ha(){So.call(this),this.name="Linking",this.V={},this.F=null,this.K=Gh,this.Xd=null}nn(Ha,So),Ha.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},Ha.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 Rn)))return null;var x=this.direction;if(x===Gh||x===_g){var b=this.findValidLinkablePort(y,!1);if(b!==null||this.startObject===a&&(b=a.port,this.findValidLinkablePort(b,!1)))return this.isForwards=!0,b}return(x===Gh||x===zg)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Ha.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 Rn&&(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 Rn&&(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)},Ha.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()},Ha.prototype.doStop=function(){So.prototype.doStop.call(this),this.startObject=null},Ha.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,b=null,E=null,te=null;try{var ne=this.targetPort=this.findTargetPort(this.isForwards);if(ne!==null){var se=ne.part;se instanceof Rn&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),b=se,E=ne):(y=se,x=ne,this.originalToNode!==null&&(b=this.originalToNode,E=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(b=this.originalToNode,E=this.originalToPort);y!==null||b!==null?(te=this.insertLink(y,x,b,E),te!==null?(ne===null&&(this.isForwards?te.defaultToPoint=a.lastInput.documentPoint:te.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),te.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",te)):this.doNoLink(y,x,b,E)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),te&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},Ha.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Tn)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)},Ha.prototype.insertLink=function(a,y,x,b){return this.diagram.partManager.insertLink(a,y,x,b)},Ha.prototype.doNoLink=function(){},Zt.Object.defineProperties(Ha.prototype,{archetypeLinkData:{get:function(){return this.V},set:function(a){this.V=a}},archetypeLabelNodeData:{get:function(){return this.F},set:function(a){this.F=a}},direction:{get:function(){return this.K},set:function(a){this.K=a}},startObject:{get:function(){return this.Xd},set:function(a){this.Xd=a}}});var Gh=new un(Ha,"Either",0),_g=new un(Ha,"ForwardsOnly",0),zg=new un(Ha,"BackwardsOnly",0);Ha.className="LinkingTool",Ha.Either=Gh,Ha.ForwardsOnly=_g,Ha.BackwardsOnly=zg;function Os(){So.call(this),this.name="Relinking";var a=new Ir;a.figure="Diamond",a.desiredSize=Zr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Ir,a.figure="Diamond",a.desiredSize=Zr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new Yt}nn(Os,So),Os.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Tn){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var b=a.selectionObject;b!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(b,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(b=a.selectionObject,b!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&b.actualBounds.w()&&b.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(b,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},Os.prototype.makeAdornment=function(a,y){var x=new di;return x.type=Cn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Os.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},Os.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 di&&x.adornedPart instanceof Tn))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=nr),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=nr),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},Os.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===Rd||x===Eh)&&(x=Ja),y.curve=x,y.curviness=a.curviness,y.isTreeLink=a.isTreeLink,y.points=a.points,y.routing=a.routing,y.smoothness=a.smoothness,y.fromSpot=a.fromSpot,y.fromEndSegmentLength=a.fromEndSegmentLength,y.fromShortLength=a.fromShortLength,y.toSpot=a.toSpot,y.toEndSegmentLength=a.toEndSegmentLength,y.toShortLength=a.toShortLength}},Os.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()},Os.prototype.doStop=function(){So.prototype.doStop.call(this),this.handle=null},Os.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;this.transactionResult=null;var y=this.originalFromNode,x=this.originalFromPort,b=this.originalToNode,E=this.originalToPort,te=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var ne=this.targetPort.part;ne instanceof Rn&&(this.isForwards?(b=ne,E=this.targetPort):(y=ne,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?E=b=null:x=y=null:te=null;te!==null?(this.reconnectLink(te,this.isForwards?b:y,this.isForwards?E:x,this.isForwards),this.targetPort===null&&(this.isForwards?te.defaultToPoint=a.lastInput.documentPoint:te.defaultFromPoint=a.lastInput.documentPoint,te.bb()),this.transactionResult=this.name,a.R("LinkRelinked",te,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},Os.prototype.reconnectLink=function(a,y,x,b){return x=x!==null&&x.portId!==null?x.portId:"",b?(a.toNode=y,a.toPortId=x):(a.fromNode=y,a.fromPortId=x),!0},Os.prototype.doNoRelink=function(){};function ed(a,y,x,b,E){y!==null?(a.copyPortProperties(y,x,a.temporaryFromNode,a.temporaryFromPort,!1),a.diagram.add(a.temporaryFromNode)):a.diagram.remove(a.temporaryFromNode),b!==null?(a.copyPortProperties(b,E,a.temporaryToNode,a.temporaryToPort,!0),a.diagram.add(a.temporaryToNode)):a.diagram.remove(a.temporaryToNode)}Zt.Object.defineProperties(Os.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 di))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Os.className="RelinkingTool",Pr("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),Pr("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function ko(){hi.call(this),this.name="LinkReshaping";var a=new Ir;a.figure="Rectangle",a.desiredSize=ei,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Ir,a.figure="Diamond",a.desiredSize=Zr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new lt,this.Yq=new yn}nn(ko,hi),ko.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:lp},ko.prototype.om=function(a,y){a.reshapingBehavior=y},ko.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Tn){var y=null;if(a.isSelected&&!this.diagram.isReadOnly){var x=a.path;x!==null&&a.canReshape()&&a.actualBounds.w()&&a.isVisible()&&x.actualBounds.w()&&x.Ed()&&(y=a.Pj(this.name),y===null||y.Aw!==a.pointsCount||y.Uw!==a.resegmentable)&&(y=this.makeAdornment(x),y!==null&&(y.Aw=a.pointsCount,y.Uw=a.resegmentable,a.bh(this.name,y)))}y===null&&a.Jf(this.name)}},ko.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,b=y.isOrthogonal,E=null;if(y.points!==null&&1<x){E=new di,E.type=Cn.Link,x=y.firstPickIndex;var te=y.lastPickIndex,ne=b?1:0;if(y.resegmentable&&y.computeCurve()!==Rs)for(var se=x+ne;se<te-ne;se++){var he=this.makeResegmentHandle(a,se);he!==null&&(he.segmentIndex=se,he.segmentFraction=.5,he.fromMaxLinks=999,E.add(he))}for(ne=x+1;ne<te;ne++)if(se=this.makeHandle(a,ne),se!==null){if(se.segmentIndex=ne,ne!==x)if(ne===x+1&&b){he=y.i(x);var pe=y.i(x+1);Gt.B(he.x,pe.x)&&Gt.B(he.y,pe.y)&&(pe=y.i(x-1)),Gt.B(he.x,pe.x)?(this.om(se,lh),se.cursor="n-resize"):Gt.B(he.y,pe.y)&&(this.om(se,sh),se.cursor="w-resize")}else ne===te-1&&b?(he=y.i(te-1),pe=y.i(te),Gt.B(he.x,pe.x)&&Gt.B(he.y,pe.y)&&(he=y.i(te+1)),Gt.B(he.x,pe.x)?(this.om(se,lh),se.cursor="n-resize"):Gt.B(he.y,pe.y)&&(this.om(se,sh),se.cursor="w-resize")):ne!==te&&(this.om(se,td),se.cursor="move");E.add(se)}E.adornedObject=a}return E},ko.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},ko.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},ko.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowReshape&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},ko.prototype.doActivate=function(){var a=this.diagram;if(this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle!==null){var y=this.handle.part.adornedPart;if(y instanceof Tn){if(this.Ts=y,a.isMouseCaptured=!0,this.Ea(this.name),y.resegmentable&&this.handle.fromMaxLinks===999){var x=y.points.copy(),b=this.getResegmentingPoint();if(x.Gb(this.handle.segmentIndex+1,b),y.isOrthogonal&&x.Gb(this.handle.segmentIndex+1,b),y.points=x,y.Wb(),y.updateAdornments(),this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name),this.handle===null){this.doDeactivate();return}}this.Fw=y.i(this.handle.segmentIndex),this.Yq=y.points.copy(),this.isActive=!0}}},ko.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},ko.prototype.stopTransaction=function(){var a=this.diagram,y=hi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ko.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},ko.prototype.getResegmentingPoint=function(){return this.handle.ga(ti)},ko.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},ko.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.computeReshape(a.lastInput.documentPoint);if(this.reshape(y),y=this.adornedLink,y!==null&&y.resegmentable){var x=this.handle.segmentIndex,b=y.i(x-1),E=y.i(x),te=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var ne=y.i(x-2);if(Math.abs(b.x-E.x)<this.resegmentingDistance&&Math.abs(b.y-E.y)<this.resegmentingDistance&&(ah(this,ne,b,E,te,!0)||ah(this,ne,b,E,te,!1))){var se=y.points.copy();ah(this,ne,b,E,te,!0)?(se.cd(x-2,new lt(ne.x,(te.y+ne.y)/2)),se.cd(x+1,new lt(te.x,(te.y+ne.y)/2))):(se.cd(x-2,new lt((te.x+ne.x)/2,ne.y)),se.cd(x+1,new lt((te.x+ne.x)/2,te.y))),se.mb(x),se.mb(x-1),y.points=se,y.Wb()}else ne=y.i(x+2),Math.abs(E.x-te.x)<this.resegmentingDistance&&Math.abs(E.y-te.y)<this.resegmentingDistance&&(ah(this,b,E,te,ne,!0)||ah(this,b,E,te,ne,!1))&&(se=y.points.copy(),ah(this,b,E,te,ne,!0)?(se.cd(x-1,new lt(b.x,(b.y+ne.y)/2)),se.cd(x+2,new lt(ne.x,(b.y+ne.y)/2))):(se.cd(x-1,new lt((b.x+ne.x)/2,b.y)),se.cd(x+2,new lt((b.x+ne.x)/2,ne.y))),se.mb(x+1),se.mb(x),y.points=se,y.Wb())}}else ne=lt.alloc(),Gt.qh(b.x,b.y,te.x,te.y,E.x,E.y,ne)&&ne.Bf(E)<this.resegmentingDistance*this.resegmentingDistance&&(b=y.points.copy(),b.mb(x),y.points=b,y.Wb()),lt.free(ne)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function ah(a,y,x,b,E,te){return te?Math.abs(y.y-x.y)<a.resegmentingDistance&&Math.abs(x.y-b.y)<a.resegmentingDistance&&Math.abs(b.y-E.y)<a.resegmentingDistance:Math.abs(y.x-x.x)<a.resegmentingDistance&&Math.abs(x.x-b.x)<a.resegmentingDistance&&Math.abs(b.x-E.x)<a.resegmentingDistance}ko.prototype.reshape=function(a){var y=this.adornedLink;y.uh();var x=this.handle.segmentIndex,b=this.Ru(this.handle);if(y.isOrthogonal)if(x===y.firstPickIndex+1)x=y.firstPickIndex+1,b===lh?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):b===sh&&(y.L(x,a.x,y.i(x-1).y),y.L(x+1,a.x,y.i(x+2).y));else if(x===y.lastPickIndex-1)x=y.lastPickIndex-1,b===lh?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):b===sh&&(y.L(x-1,a.x,y.i(x-2).y),y.L(x,a.x,y.i(x+1).y));else{b=x;var E=y.i(b),te=y.i(b-1),ne=y.i(b+1);Gt.B(te.x,E.x)&&Gt.B(E.y,ne.y)?(Gt.B(te.x,y.i(b-2).x)&&!Gt.B(te.y,y.i(b-2).y)?(y.m(b,a.x,te.y),x++,b++):y.L(b-1,a.x,te.y),Gt.B(ne.y,y.i(b+2).y)&&!Gt.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)):Gt.B(te.y,E.y)&&Gt.B(E.x,ne.x)?(Gt.B(te.y,y.i(b-2).y)&&!Gt.B(te.x,y.i(b-2).x)?(y.m(b,te.x,a.y),x++,b++):y.L(b-1,te.x,a.y),Gt.B(ne.x,y.i(b+2).x)&&!Gt.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):Gt.B(te.x,E.x)&&Gt.B(E.x,ne.x)?(Gt.B(te.x,y.i(b-2).x)&&!Gt.B(te.y,y.i(b-2).y)?(y.m(b,a.x,te.y),x++,b++):y.L(b-1,a.x,te.y),Gt.B(ne.x,y.i(b+2).x)&&!Gt.B(ne.y,y.i(b+2).y)?y.m(b+1,a.x,ne.y):y.L(b+1,a.x,ne.y)):Gt.B(te.y,E.y)&&Gt.B(E.y,ne.y)&&(Gt.B(te.y,y.i(b-2).y)&&!Gt.B(te.x,y.i(b-2).x)?(y.m(b,te.x,a.y),x++,b++):y.L(b-1,te.x,a.y),Gt.B(ne.y,y.i(b+2).y)&&!Gt.B(ne.x,y.i(b+2).x)?y.m(b+1,ne.x,a.y):y.L(b+1,ne.x,a.y)),y.L(x,a.x,a.y)}else y.L(x,a.x,a.y),b=y.fromNode,E=y.fromPort,b!==null&&(te=b.findVisibleNode(),te!==null&&te!==b&&(b=te,E=b.port)),x===1&&y.computeSpot(!0,E).Mc()&&(te=E.ga(ti,lt.alloc()),b=y.getLinkPointFromPoint(b,E,te,a,!0,lt.alloc()),y.L(0,b.x,b.y),lt.free(te),lt.free(b)),b=y.toNode,E=y.toPort,b!==null&&(te=b.findVisibleNode(),te!==null&&te!==b&&(b=te,E=b.port)),x===y.pointsCount-2&&y.computeSpot(!1,E).Mc()&&(x=E.ga(ti,lt.alloc()),a=y.getLinkPointFromPoint(b,E,x,a,!1,lt.alloc()),y.L(y.pointsCount-1,a.x,a.y),lt.free(x),lt.free(a));y.zf()},ko.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case td:return a;case lh:return new lt(y.i(x).x,a.y);case sh:return new lt(a.x,y.i(x).y);default:case lp:return y.i(x)}},Zt.Object.defineProperties(ko.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},midHandleArchetype:{get:function(){return this.u},set:function(a){this.u=a}},handle:{get:function(){return this.j},set:function(a){if(a!==null&&!(a.part instanceof di))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedLink:{get:function(){return this.Ts}},resegmentingDistance:{get:function(){return this.F},set:function(a){this.F=a}},originalPoint:{get:function(){return this.Fw}},originalPoints:{get:function(){return this.Yq}}}),ko.prototype.setReshapingBehavior=ko.prototype.om,ko.prototype.getReshapingBehavior=ko.prototype.Ru;var lp=new un(ko,"None",0),sh=new un(ko,"Horizontal",1),lh=new un(ko,"Vertical",2),td=new un(ko,"All",3);ko.className="LinkReshapingTool",ko.None=lp,ko.Horizontal=sh,ko.Vertical=lh,ko.All=td,Pr("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function Ca(){hi.call(this),this.name="Resizing",this.o=new fn(1,1).freeze(),this.j=new fn(9999,9999).freeze(),this.yg=new fn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Ir;a.alignmentFocus=ti,a.figure="Rectangle",a.desiredSize=ei,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new lt,this.Dw=new fn,this.Tn=new lt,this.rt=new fn(0,0),this.qt=new fn(1/0,1/0),this.pt=new fn(1,1)}nn(Ca,hi),Ca.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Tn)){if(a.isSelected&&!this.diagram.isReadOnly){var y=a.resizeObject,x=a.Pj(this.name);if(y!==null&&a.canResize()&&a.actualBounds.w()&&a.isVisible()&&y.actualBounds.w()&&y.Ed()&&((x===null||x.adornedObject!==y)&&(x=this.makeAdornment(y)),x!==null)){y=y.li(),ic(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},Ca.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new di,y.type=Cn.Spot,y.locationSpot=ti;var x=new $a;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,wi)),y.add(this.makeHandle(a,Pa)),y.add(this.makeHandle(a,io)),y.add(this.makeHandle(a,Ko)),y.add(this.makeHandle(a,ja)),y.add(this.makeHandle(a,na)),y.add(this.makeHandle(a,sa)),y.add(this.makeHandle(a,Oa))}else if(ul(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Ca.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},Ca.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))e:{var x=a.alignment;if(x.Mc()&&(x=ti),0>=x.x)y=0>=x.y?y+225:1<=x.y?y+135:y+180;else if(1<=x.x)0>=x.y?y+=315:1<=x.y&&(y+=45);else if(0>=x.y)y+=270;else if(1<=x.y)y+=90;else break e;0>y?y+=360:360<=y&&(y-=360),a.cursor=22.5>y?"e-resize":67.5>y?"se-resize":112.5>y?"s-resize":157.5>y?"sw-resize":202.5>y?"w-resize":247.5>y?"nw-resize":292.5>y?"n-resize":337.5>y?"ne-resize":"e-resize"}else if(a instanceof Cn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},Ca.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},Ca.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))},Ca.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},Ca.prototype.stopTransaction=function(){var a=this.diagram,y=hi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ca.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Ca.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,lt.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),a.bd(),lt.free(E)}},Ca.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,b=this.pt,E=this.adornedObject.qs(a.lastInput.documentPoint,lt.alloc()),te=this.computeReshape();y=this.computeResize(E,this.handle.alignment,y,x,b,te),this.resize(y),lt.free(E),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},Ca.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 jr){var b=new yn;if(b.add(a),!this.dragsMembers&&a.placeholder===null){var E=new ce;E.dragsMembers=!1}y.moveParts(b,this.oppositePoint.copy().re(x),!0,E)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},Ca.prototype.computeResize=function(a,y,x,b,E,te){y.Mc()&&(y=ti);var ne=this.adornedObject.naturalBounds,se=ne.x,he=ne.y,pe=ne.x+ne.width,ye=ne.y+ne.height,Te=1;if(!te){Te=ne.width;var ze=ne.height;0>=Te&&(Te=1),0>=ze&&(ze=1),Te=ze/Te}return ze=lt.alloc(),Gt.No(a.x,a.y,se,he,E.width,E.height,ze),a=ne.copy(),0>=y.x?0>=y.y?(a.x=Math.max(ze.x,pe-b.width),a.x=Math.min(a.x,pe-x.width),a.width=Math.max(pe-a.x,x.width),a.y=Math.max(ze.y,ye-b.height),a.y=Math.min(a.y,ye-x.height),a.height=Math.max(ye-a.y,x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Te*a.width,b.height),x.height),a.width=a.height/Te):(a.width=Math.max(Math.min(a.height/Te,b.width),x.width),a.height=Te*a.width),a.x=pe-a.width,a.y=ye-a.height)):1<=y.y?(a.x=Math.max(ze.x,pe-b.width),a.x=Math.min(a.x,pe-x.width),a.width=Math.max(pe-a.x,x.width),a.height=Math.max(Math.min(ze.y-he,b.height),x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Te*a.width,b.height),x.height),a.width=a.height/Te):(a.width=Math.max(Math.min(a.height/Te,b.width),x.width),a.height=Te*a.width),a.x=pe-a.width)):(a.x=Math.max(ze.x,pe-b.width),a.x=Math.min(a.x,pe-x.width),a.width=pe-a.x,te||(a.height=Math.max(Math.min(Te*a.width,b.height),x.height),a.width=a.height/Te,a.y=he+.5*(ye-he-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(ze.x-se,b.width),x.width),a.y=Math.max(ze.y,ye-b.height),a.y=Math.min(a.y,ye-x.height),a.height=Math.max(ye-a.y,x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Te*a.width,b.height),x.height),a.width=a.height/Te):(a.width=Math.max(Math.min(a.height/Te,b.width),x.width),a.height=Te*a.width),a.y=ye-a.height)):1<=y.y?(a.width=Math.max(Math.min(ze.x-se,b.width),x.width),a.height=Math.max(Math.min(ze.y-he,b.height),x.height),te||(1<=a.height/a.width?(a.height=Math.max(Math.min(Te*a.width,b.height),x.height),a.width=a.height/Te):(a.width=Math.max(Math.min(a.height/Te,b.width),x.width),a.height=Te*a.width))):(a.width=Math.max(Math.min(ze.x-se,b.width),x.width),te||(a.height=Math.max(Math.min(Te*a.width,b.height),x.height),a.width=a.height/Te,a.y=he+.5*(ye-he-a.height))):0>=y.y?(a.y=Math.max(ze.y,ye-b.height),a.y=Math.min(a.y,ye-x.height),a.height=ye-a.y,te||(a.width=Math.max(Math.min(a.height/Te,b.width),x.width),a.height=Te*a.width,a.x=se+.5*(pe-se-a.width))):1<=y.y&&(a.height=Math.max(Math.min(ze.y-he,b.height),x.height),te||(a.width=Math.max(Math.min(a.height/Te,b.width),x.width),a.height=Te*a.width,a.x=se+.5*(pe-se-a.width))),lt.free(ze),a},Ca.prototype.computeReshape=function(){var a=gn;return this.adornedObject instanceof Ir&&(a=Ev(this.adornedObject)),!(a===rr||this.diagram.lastInput.shift)},Ca.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},Ca.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},Ca.prototype.computeCellSize=function(){var a=new fn(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},Zt.Object.defineProperties(Ca.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 di))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 di)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}}}),Ca.className="ResizingTool",Pr("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Ka(){hi.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new lt,this.ue=null;var a=new Ir;a.figure="Ellipse",a.desiredSize=Zr,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new lt(NaN,NaN),this.u=0,this.F=50}nn(Ka,hi),Ka.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)}},Ka.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new di,y.type=Cn.Position,y.locationSpot=ti;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(ul(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Ka.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},Ka.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)},Ka.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(ti)},Ka.prototype.computeAdornmentLocation=function(a){var y=this.rotationPoint;y.w()||(y=this.computeRotationPoint(a)),y=a.qs(y);var x=this.handleAngle;0>x?x+=360:360<=x&&(x-=360),x=Math.round(45*Math.round(x/45));var b=this.handleDistance;return x===0?y.x=a.naturalBounds.width+b:x===45?(y.x=a.naturalBounds.width+b,y.y=a.naturalBounds.height+b):x===90?y.y=a.naturalBounds.height+b:x===135?(y.x=-b,y.y=a.naturalBounds.height+b):x===180?y.x=-b:x===225?(y.x=-b,y.y=-b):x===270?y.y=-b:x===315&&(y.x=a.naturalBounds.width+b,y.y=-b),a.ga(y)},Ka.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new lt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Ka.prototype.stopTransaction=function(){var a=this.diagram,y=hi.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ka.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Ka.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Ka.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()},Ka.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,b=y.rotateObject;(x===b||x.rg(b))&&(x=this.Tn.copy(),y.location=x.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},Ka.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},Zt.Object.defineProperties(Ka.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 di))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 di)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}}}),Ka.className="RotatingTool",Pr("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function Uh(){hi.call(this),this.name="ClickSelecting"}nn(Uh,hi),Uh.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},Uh.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},Uh.className="ClickSelectingTool";function il(){hi.call(this),this.name="Action",this.pk=null}nn(il,hi),il.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,y=a.lastInput,x=a.ic(y.documentPoint,function(b){for(;b.panel!==null&&!b.isActionable;)b=b.panel;return b});return x!==null&&x.isActionable?(this.pk=x,a.Ck=a.ic(y.documentPoint,null,null),!0):!1},il.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()},il.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))}},il.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()},il.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())},il.prototype.doStop=function(){this.pk=null},il.className="ActionTool";function uh(){hi.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new lt(0,0)}nn(uh,hi),uh.prototype.canStart=function(){if(!this.isEnabled||this.archetypeNodeData===null)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.lastInput.left||this.isBeyondDragSize())return!1;if(this.isDoubleClick){if(a.lastInput.clickCount===1&&(this.mw=a.lastInput.viewPoint.copy()),a.lastInput.clickCount!==2||this.isBeyondDragSize(this.mw))return!1}else if(a.lastInput.clickCount!==1)return!1;return!(a.currentTool!==this&&a.Ol(a.lastInput.documentPoint,!0)!==null)},uh.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},uh.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var b=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof fr)x.Zc()&&(ul(x),b=x.copy(),b!==null&&y.add(b));else if(x!==null){var E=y.model.copyNodeData(x);an(E)&&(y.model.xf(E),b=y.Lc(E))}if(b!==null){var te=lt.allocAt(a.x,a.y);this.isGridSnapEnabled&&dd(this.diagram,b,a,te),b.location=te,y.allowSelect&&(y.clearSelection(!0),b.isSelected=!0),lt.free(te)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",b)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return b},Zt.Object.defineProperties(uh.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){this.Ri=a}},isDoubleClick:{get:function(){return this.o},set:function(a){this.o=a}},isGridSnapEnabled:{get:function(){return this.j},set:function(a){this.j=a}}}),uh.className="ClickCreatingTool";function Ws(){hi.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new fr;a.layerName="Tool",a.selectable=!1;var y=new Ir;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}nn(Ws,hi),Ws.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))},Ws.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},Ws.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},Ws.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive&&this.box!==null){var y=this.computeBoxBounds(),x=this.box.fb("SHAPE");x===null&&(x=this.box.Pb());var b=fn.alloc().h(y.width,y.height);x.desiredSize=b,this.box.mm(y.x,y.y,!1),fn.free(b),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Ws.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()},Ws.prototype.computeBoxBounds=function(){var a=this.diagram;return new Yt(a.firstInput.documentPoint,a.lastInput.documentPoint)},Ws.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),qr?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 yn,y=y.selection.iterator;y.next();){var b=y.value;a.contains(b)||x.add(b)}for(y=x.iterator;y.next();)y.value.isSelected=!1;for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0)}},Zt.Object.defineProperties(Ws.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}}}),Ws.className="DragSelectingTool";function ya(){hi.call(this),this.name="Panning",this.Xt=new lt,this.xy=new lt,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(An.document,"scroll",a.Kw,!1),a.stopTool()}}nn(ya,hi),ya.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())},ya.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(An.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},ya.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},ya.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},ya.prototype.doMouseMove=function(){this.move()},ya.prototype.doMouseUp=function(){this.move(),this.stopTool()},ya.prototype.move=function(){var a=this.diagram;if(this.isActive&&a)if(this.xg)a.lastInput.bubbles=!0;else{var y=a.position,x=a.firstInput.documentPoint,b=a.lastInput.documentPoint,E=y.x+x.x-b.x;x=y.y+x.y-b.y,a.allowHorizontalScroll||(E=y.x),a.allowVerticalScroll||(x=y.y),a.position=this.xy.h(E,x)}},Zt.Object.defineProperties(ya.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),ya.className="PanningTool",Pr("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),Pr("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),Pr("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),Pr("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),Pr("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Zl(){this.F=this.u=this.j=this.o=null}Zt.Object.defineProperties(Zl.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}}}),Zl.className="HTMLInfo";function ol(a,y,x){this.text=a,this.hx=y,this.visible=x}ol.className="ContextMenuButtonInfo";function Va(){hi.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new lt,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}nn(Va,hi);function ml(a){var y=new Zl;y.show=function(E,te,ne){ne.showDefaultContextMenu()},y.hide=function(E,te){te.hideDefaultContextMenu()},Wh=y,a.tu=function(){a.stopTool()},y=Qn("div");var x=Qn("div");y.style.cssText="top: 0px;z-index:10002;position: fixed;display: none;text-align: center;left: 25%;width: 50%;background-color: #F5F5F5;padding: 16px;border: 16px solid #444;border-radius: 10px;margin-top: 10px",x.style.cssText="z-index:10001;position: fixed;display: none;top: 0;left: 0;width: 100%;height: 100%;background-color: black;opacity: 0.8;";var b=Qn("style");An.document.getElementsByTagName("head")[0].appendChild(b),b.sheet.insertRule(".goCXul { list-style: none; }",0),b.sheet.insertRule(".goCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }",0),b.sheet.insertRule(".goCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }",0),b=a.diagram,b!==null&&(b.addEventListener(y,"contextmenu",To,!1),b.addEventListener(y,"selectstart",To,!1),b.addEventListener(x,"contextmenu",To,!1)),y.className="goCXforeground",x.className="goCXbackground",An.document.body&&(An.document.body.appendChild(y),An.document.body.appendChild(x)),cf=y,Mc=x,hf=!0}function To(a){return a.preventDefault(),!1}Va.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)},Va.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Va.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Va.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,b=null;if(a instanceof Vt||(a instanceof zt?b=a:b=y.ic(x.documentPoint,null,function(E){return!E.layer.isTemporary})),b!==null){for(a=b;a!==null;){if(a.contextMenu!==null)return a;a=a.panel}if(y.lastInput.isTouchEvent&&this.defaultTouchContextMenu)return b.part}else if(y.contextMenu!==null)return y;return null},Va.prototype.doActivate=function(){},Va.prototype.doMouseDown=function(){if(hi.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof di){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&jl(this)},Va.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof di){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}jl(this)};function jl(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var b=null;x instanceof Zl||(b=y.ic(y.lastInput.documentPoint,null,null),b!==null&&b.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(b)}}else a.canStart()&&(Ru(a,!0),a.isActive||a.stopTool())}Va.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function Ru(a,y,x){if(x===void 0&&(x=null),!a.Et&&(a.Et=!0,y&&a.standardMouseSelect(),y=a.standardMouseClick(),a.Et=!1,!y)){if(a.isActive=!0,y=Wh,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var b=x.contextMenu;b!==null?(a.currentObject=x instanceof zt?x:null,a.showContextMenu(b,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof di&&!a.currentContextMenu.visible&&a.stopTool()}}Va.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Va.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof di){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category=this.name,a.placeholder!==null&&(a.placeholder.scale=x.scale);var b=a.diagram;b!==null&&b!==x&&b.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionContextMenu(a,y)}else a instanceof Zl&&a.show(y,x,this);this.currentContextMenu=a},Va.prototype.positionContextMenu=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),b=a.measuredBounds,E=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=b.width),x.x+b.width>E.right&&(x.x-=b.width+5/y.scale),x.x<E.x&&(x.x=E.x),x.y+b.height>E.bottom&&(x.y-=b.height+5/y.scale),x.y<E.y&&(x.y=E.y),a.position=x}},Va.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof di?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Zl&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function hh(a){var y=new yn;return y.add(new ol("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new ol("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new ol("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new ol("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new ol("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new ol("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new ol("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new ol("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new ol("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new ol("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new ol("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new ol("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new ol("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}Va.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=hh(this)),cf.innerHTML="",Mc.addEventListener("pointerdown",this.tu,!1);var y=this,x=Qn("ul");x.className="goCXul",cf.appendChild(x),x.innerHTML="";for(var b=this.jt.iterator;b.next();){var E=b.value,te=E.visible;if(typeof E.hx=="function"&&(typeof te!="function"||te(a))){te=Qn("li"),te.className="goCXli";var ne=Qn("a");ne.className="goCXa",ne.href="#",ne.ky=E.hx,ne.addEventListener("pointerdown",function(se){return this.ky(a),y.stopTool(),se.preventDefault(),!1},!1),ne.textContent=E.text,te.appendChild(ne),x.appendChild(te)}}cf.style.display="block",Mc.style.display="block"},Va.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===Wh){cf.style.display="none",Mc.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(Mc,"pointerdown",this.tu,!1),this.currentContextMenu=null}},Zt.Object.defineProperties(Va.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof di?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return hf===!1&&Wh===null&&vo&&ml(this),Wh},set:function(a){a===null&&(hf=!0),Wh=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var Wh=null,hf=!1,Mc=null,cf=null;Va.className="ContextMenuTool",Pr("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function $i(){hi.call(this),this.name="TextEditing",this.Zh=new Hi,this.ia=null,this.V=Lc,this.vj=null,this.qa=Nc,this.u=1,this.F=!0,this.o=null,this.j=new Zl,this.kt=null,ff(this,this.j)}nn($i,hi);function ff(a,y){if(vo){var x=Qn("textarea");a.kt=x,x.addEventListener("input",function(){if(a.textBlock!==null){var b=a.Lx(this.value);this.style.width=20+b.measuredBounds.width*this.wA+"px",this.rows=b.lineCount}},!1),x.addEventListener("keydown",function(b){if(!b.isComposing&&a.textBlock!==null){var E=b.key;E==="Enter"?(a.textBlock.isMultiline===!1&&b.preventDefault(),a.acceptText(df)):E==="Tab"?(a.acceptText(rd),b.preventDefault()):E==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Nc){var b=a.kt;a.qa===pf&&(a.qa=gf),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Nc){var b=a.kt;typeof b.focus=="function"&&b.focus(),typeof b.select=="function"&&a.selectsTextOnActivate&&(b.select(),b.setSelectionRange(0,9999))}},!1),y.valueFunction=function(){return x.value},y.mainElement=x,y.show=function(b,E,te){if(b instanceof Hi&&te instanceof $i)if(te.state===mf)x.style.border="3px solid red",x.focus();else{var ne=b.ga(ti),se=E.position,he=E.scale,pe=b.Df()*he;pe<te.minimumEditorScale&&(pe=te.minimumEditorScale);var ye=b.naturalBounds.width*pe+6,Te=b.naturalBounds.height*pe+2,ze=(ne.x-se.x)*he;ne=(ne.y-se.y)*he,se=b.verticalAlignment,he=(b.lineHeight+b.spacingAbove+b.spacingBelow)*b.lineCount*pe,Te=se.y*Te-se.y*he+se.offsetY-(.5*Te-.5*he)-he/2,x.value=b.text,E.div.style.font=b.font,x.style.position="absolute",x.style.zIndex="100",x.style.font="inherit",x.style.fontSize=100*pe+"%",x.style.lineHeight="normal",x.style.width=ye+"px",x.style.left=(ze-ye/2|0)-1+"px",x.style.top=(ne+Te|0)-1+"px",x.style.textAlign=b.textAlign,x.style.margin="0",x.style.padding="1px",x.style.border="0",x.style.outline="none",x.style.whiteSpace="pre-wrap",x.style.overflow="hidden",x.rows=b.lineCount,x.wA=pe,x.className="goTXarea",E.div.appendChild(x),x.focus(),te.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(b){b.div.removeChild(x)}}}$i.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||ch&&ch!==this&&(ch.acceptText(Xl),ch&&ch!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Hi&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===Lc&&!y.isSelected||this.starting===id&&2>a.lastInput.clickCount)):!1},$i.prototype.doStart=function(){ch=this,this.textBlock!==null&&this.doActivate()},$i.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 Hi&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=pf;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var b=new Yt(this.textBlock.ga(wi),this.textBlock.ga(io));a.tv(b),x.show(y,a,this),this.currentTextEditor=x}}}},$i.prototype.doCancel=function(){this.stopTool()},$i.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},$i.prototype.doMouseDown=function(){this.isActive&&this.acceptText(Xl)},$i.prototype.acceptText=function(a){switch(a){case Xl:this.qa===Ac?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===pf||this.qa===mf||this.qa===gf)&&(this.qa=hp,up(this));break;case nd:case df:case rd:(df!==a||this.textBlock.isMultiline!==!0)&&(this.qa===pf||this.qa===mf||this.qa===gf)&&(this.qa=hp,up(this))}};function up(a){var y=a.textBlock,x=a.diagram,b=a.currentTextEditor;if(y!==null&&b!==null){var E=y.text,te="";b.valueFunction!==null&&(te=b.valueFunction()),a.isValidText(y,E,te)?(a.Ea(a.name),a.qa=Ac,a.transactionResult=a.name,y.text=te,a.doSuccess(E,te),x!==null&&x.R("TextEdited",y,E),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=mf,a.doError(E,te))}}$i.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)},$i.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},$i.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Nc,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},$i.prototype.doStop=function(){ch=null},$i.prototype.isValidText=function(a,y,x){var b=this.textValidation;return b!==null&&!b(a,y,x)?!1:(b=a.textValidation,!!(b===null||b(a,y,x)))},$i.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Zt.Object.defineProperties($i.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)}}}),$i.prototype.measureTemporaryTextBlock=$i.prototype.Lx;var nd=new un($i,"LostFocus",0),Xl=new un($i,"MouseDown",1),rd=new un($i,"Tab",2),df=new un($i,"Enter",3),ev=new un($i,"SingleClick",0),Lc=new un($i,"SingleClickSelected",1),id=new un($i,"DoubleClick",2),Nc=new un($i,"StateNone",0),pf=new un($i,"StateActive",1),gf=new un($i,"StateEditing",2),hp=new un($i,"StateValidating",3),mf=new un($i,"StateInvalid",4),Ac=new un($i,"StateValidated",5),ch=null;$i.className="TextEditingTool",$i.LostFocus=nd,$i.MouseDown=Xl,$i.Tab=rd,$i.Enter=df,$i.SingleClick=ev,$i.SingleClickSelected=Lc,$i.DoubleClick=id,$i.StateNone=Nc,$i.StateActive=pf,$i.StateEditing=gf,$i.StateValidating=hp,$i.StateInvalid=mf,$i.StateValidated=Ac,Pr("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Ps(a){yf||(cp(),yf=!0),this.H=cu,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=zu,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new xn,this.ce=new Sa,this.ce.Yd=this,this.Ei=new xn,this.pu=new xn,this.Sr=new xn,this.pr=new xn,a&&Object.assign(this,a)}Ps.prototype.Xe=function(a){this.H=a},Ps.prototype.canStart=function(){return!0};function hu(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),xa(a.H),a.zb=!0)}function od(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,b=a.Zd.contains("Model");b&&(a.Ok=!0,a.Pk===zu?(y.isViewportUnconstrained=!0,y.vc.clear(),y.add(x,"position",x.position.copy().offset(0,-200),x.position),y.add(x,"opacity",0,1)):a.Pk===fp&&y.vc.clear(),a.Qw=!!(a.Pk===Sf&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),b&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),xf(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,b=y.vc.get(x),x.autoScale!==Ba&&b!==null&&(delete b.start.scale,delete b.end.scale),An.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&as(x),vp(x),a.zb=!1,y.start(),y.bc&&(fh(a),x.Ya(),dp(y,0),Ks(x,!0),Hh(a),x.R("AnimationStarting",a)))}))}}function _u(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function ad(a,y,x,b){a.isTicking||_u(a)||y instanceof Tn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,b,!1)}et=Ps.prototype,et.fv=function(a){return this.ce.fv(a)},et.Xu=function(a){return this.ce.Xu(a)};function sd(a,y){function x(){if(0<E.Sr.count&&(b.addAll(E.Sr),E.Sr.clear(),E.bc=!0),E.bc!==!1&&b.count!==0){E.pu.addAll(b);for(var te=E.pu.iterator;te.next();){var ne=te.value;if(ne.bc!==!1){e:if(0<ne.yl.count)var se=!0;else{for(se=ne.vc.iterator;se.next();){var he=se.key;if(he instanceof zt&&he.diagram!==null||he instanceof Vt){se=!0;break e}}se=!1}se?wf(ne,!1):ne.Xk=!0}}E.pu.clear(),E.bc!==!1&&(fh(E),Ks(E.H),Hh(E)),An.requestAnimationFrame(x)}}var b=a.Ei,E=a;a.bc?a.Sr.add(y):(a.bc=!0,b.add(y),An.requestAnimationFrame(function(){x()}))}function Gg(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function fh(a){if(!a.vq){var y=a.H;a.Ow=y.skipsUndoManager,a.cw=y.skipsModelSourceBindings,y.skipsUndoManager=!0,y.skipsModelSourceBindings=!0,a.vq=!0}}function Hh(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}et.Cc=function(a){var y=this.ce;if(this.zb===!0&&(this.Ok=this.zb=!1,this.Zd.clear(),0<y.vc.count&&this.H.$b()),this.bc){if(y.Ml(!0),y.vc.clear(),xf(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),xf(y,this.H)},et.Ml=function(a){a===this.defaultAnimation&&this.defaultAnimation.vc.clear(),this.Ei.remove(a),this.Ei.count===0&&(this.bc=!1,this.H.$b()),a===this.defaultAnimation&&(this.defaultAnimation.vc.clear(),this.H.R("AnimationFinished",this))},et.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),ps(this,a))},et.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),dh(this.ce,y,"position",y.position,y.position),ps(this,a))};function Ug(a,y,x){!a.zb||y.D(x)||_u(a)||(a.H.pi||(y=x.copy()),dh(a.ce,a.H,"position",y,x))}function ld(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function ps(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function Kh(a,y,x,b,E){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var te=a[0],ne=a[1],se=a[2];a=a[3];var he=y[0],pe=y[1],ye=y[2];return y=y[3],se===0||se===100?(te=he,ne=pe):(ye===0||ye===100)&&(he=te,pe=ne),180<Math.abs(he-te)&&(he>te?te+=360:he+=360),te=E(x,te,he-te,b)%360,ne=E(x,ne,pe-ne,b),se=E(x,se,ye-se,b),x=E(x,a,y-a,b),"hsla("+te+", "+ne+"%, "+se+"%, "+x+")"}function cp(){function a(x,b,E,te,ne,se){x.position=new lt(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se))}var y=new Jt;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,b,E,te,ne,se){ne<se?x.mm(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se),!1):x.position=new lt(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se))}),y.add("location",function(x,b,E,te,ne,se){ne<se?x.mm(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se),!0):x.location=new lt(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se))}),y.add("position:placeholder",function(x,b,E,te,ne,se){ne<se?x.mm(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se),!1):x.position=new lt(te(ne,b.x,E.x-b.x,se),te(ne,b.y,E.y-b.y,se))}),y.add("position:nodeCollapse",function(x,b,E,te,ne,se){var he=x.actualBounds,pe=E.actualBounds;E=pe.x+pe.width/2-he.width/2,he=pe.y+pe.height/2-he.height/2,ne<se?x.mm(te(ne,b.x,E-b.x,se),te(ne,b.y,he-b.y,se),!1):x.position=new lt(te(ne,b.x,E-b.x,se),te(ne,b.y,he-b.y,se))}),y.add("desiredSize",function(x,b,E,te,ne,se){x.desiredSize=new Yt(te(ne,b.width,E.width-b.width,se),te(ne,b.height,E.height-b.height,se))}),y.add("width",function(x,b,E,te,ne,se){x.width=te(ne,b,E-b,se)}),y.add("height",function(x,b,E,te,ne,se){x.height=te(ne,b,E-b,se)}),y.add("fill",function(x,b,E,te,ne,se){x.fill=Kh(b,E,ne,se,te)}),y.add("stroke",function(x,b,E,te,ne,se){x.stroke=Kh(b,E,ne,se,te)}),y.add("strokeWidth",function(x,b,E,te,ne,se){x.strokeWidth=te(ne,b,E-b,se)}),y.add("strokeDashOffset",function(x,b,E,te,ne,se){x.strokeDashOffset=te(ne,b,E-b,se)}),y.add("background",function(x,b,E,te,ne,se){x.background=Kh(b,E,ne,se,te)}),y.add("areaBackground",function(x,b,E,te,ne,se){x.areaBackground=Kh(b,E,ne,se,te)}),y.add("opacity",function(x,b,E,te,ne,se){x.opacity=te(ne,b,E-b,se)}),y.add("scale",function(x,b,E,te,ne,se){x.scale=te(ne,b,E-b,se)}),y.add("angle",function(x,b,E,te,ne,se){x.angle=te(ne,b,E-b,se)}),vf=y}Zt.Object.defineProperties(Ps.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&&_n(a,">= 1",Ps,"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}}}),Ps.prototype.stopAnimation=Ps.prototype.Cc;var vf=null,yf=!1,zu=new un(Ps,"Default",1),Sf=new un(Ps,"AnimateLocations",2),fp=new un(Ps,"None",3);Ps.className="AnimationManager",Ps.defineAnimationEffect=function(a,y){yf||(cp(),yf=!0),vf.add(a,y)},Ps.Default=zu,Ps.AnimateLocations=Sf,Ps.None=fp;function Sa(a){this.vu=this.Nw=this.Yd=this.H=null,this.Xk=this.bc=this.j=!1,this.cn=this.Qd=0,this.Lp=this.ot=jc,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Bn,this.vc=new Jt,this.Tt=new Jt,this.yl=new xn,this.Ut=new xn,this.dw=mh,a&&Object.assign(this,a)}Sa.prototype.suspend=function(){this.Xk=!0},Sa.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,wf(this,!0),fh(this.Yd),Ks(this.H),Hh(this.Yd),this.H.redraw()};function xf(a,y){if(a.Tt.clear(),a.Wk=!1,a.au=0,a.Gd=NaN,0<a.yl.count&&a.yl.clear(),0<a.Ut.count&&a.Ut.clear(),y!==null)for(a=y.links;a.next();)a.value.Tg=null}et=Sa.prototype,et.start=function(){if(this.vc.count===0||this.bc)return this;for(var a=this.H,y=this.vc.iterator;y.next();){var x=y.key;a===null&&(x instanceof Vt?a=x:x instanceof zt&&(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===zu&&this===y.defaultAnimation&&(this.Lp=Wg,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=Mf),fh(y),this.yl.each(function(b){b.data=null,a.add(b)}),Hh(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,sd(y,this),this)},et.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},et.add=function(a,y,x,b,E){if(y==="position"&&x.Xa(b))return this;if(this.H===null&&(a instanceof Vt?this.H=a:a instanceof zt&&a.diagram!==null&&(this.H=a.diagram)),a instanceof fr){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return dh(this,a,y,x,b,E),this};function dh(a,y,x,b,E,te){var ne=a.vc;if(y instanceof Vt&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(Hu(b),sv(),b=[Is.j,Is.u,Is.o,Is.F],Hu(E),sv(),E=[Is.j,Is.u,Is.o,Is.F]),ne.contains(y)){var se=ne.I(y),he=se.start,pe=se.end;he[x]===void 0&&(he[x]=Vh(b)),pe[x]=Vh(E)}else he={},pe={},he[x]=Vh(b),pe[x]=Vh(E),se=he.position,y instanceof zt&&se instanceof lt&&!se.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&se.assign(pe.position),se=new Zh(he,pe,te),ne.add(y,se);ne=he[x],ne instanceof lt&&!ne.w()&&ne.assign(a.o),te&&x.indexOf("position:")===0&&y instanceof fr?se.Ku.location=Vh(y.location):te&&(se.Ku[x]=Vh(b))}function Vh(a){return a instanceof lt||a instanceof fn?a.copy():a}et.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},et.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function wf(a,y){if(!a.Xk||y){var x=a.Yd;if(a.bc!==!1){var b=+new Date,E=b>a.cn?a.Gd:b-a.Qd;y&&(E=a.gw,E<a.Gd?(a.Qd=+new Date-E,a.cn=a.Qd+a.Gd):E=a.Gd),fh(x),dp(a,E),Ks(a.H,!0),Hh(x),b>a.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function dp(a,y){for(var x=a.Gd,b=a.vc.iterator,E=a.Wk;b.next();){var te=b.key;if(!(te instanceof zt&&te.diagram===null)){var ne=b.value,se=E?ne.end:ne.start;ne=E?ne.start:ne.end;var he=vf,pe;for(pe in ne)pe==="position"&&(ne["position:placeholder"]||ne["position:nodeCollapse"])||he.get(pe)===null||he.get(pe)(te,se[pe],ne[pe],a.Lp,y,x,a)}}}et.stop=function(){return this.bc?(this.Ml(!0),this):this},et.Ml=function(a){if(this.vu!==null&&this.vu.jo.remove(this.Nw),this.bc){var y=this.H,x=this.Yd;this.Xk=this.bc=x.Ok=!1,fh(x);for(var b=this.vc,E=this.yl.iterator;E.next();)y.remove(E.value);for(E=this.Ut.iterator;E.next();)E.value.v();E=this.ho,b=b.iterator;for(var te=vf;b.next();){var ne=b.key,se=b.value,he=E?se.end:se.start,pe=E?se.start:se.end,ye=se.Ku,Te;for(Te in pe)if(te.get(Te)!==null){var ze=Te;!se.Hu||ze!=="position:nodeCollapse"&&ze!=="position:placeholder"||(ze="position"),te.get(ze)(ne,he[Te],ye[Te]!==void 0?ye[Te]:se.Hu?he[Te]:pe[Te],this.Lp,this.Gd,this.Gd,this)}se.Hu&&ye.location!==void 0&&ne instanceof fr&&(ne.location=ye.location),se.nv&&ne instanceof fr&&ne.Zb(!1)}if(y.As.clear(),Pf(y,!1),y.Ya(),y.N(),Ks(y,!0),x.defaultAnimation===this){for(Te=x.pr.iterator;Te.next();)E=Te.value,E.Tg!==null&&(E.points=E.Tg,E.Tg=null);x.pr.clear()}Ks(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Hh(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),xf(this,null),x.Ml(this),y.$b())}},et.Cj=function(a,y){var x=y.actualBounds,b=null;if(y instanceof jr&&(b=y.placeholder),b!==null?(x=b.ga(wi),b=b.padding,x.x+=b.left,x.y+=b.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new lt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof jr)for(a=a.memberParts;a.next();)b=a.value,b instanceof Rn&&this.Cj(b,y)},et.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof jr&&(x=y.placeholder),x!==null){var b=x.ga(wi);x=x.padding,b.x+=x.left,b.y+=x.top,this.add(a,"position:placeholder",a.position,b,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),b=this.vc,b.contains(a)&&(b.I(a).nv=!0),a instanceof jr)for(a=a.memberParts;a.next();)b=a.value,b instanceof Rn&&this.Aj(b,y)}},et.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Zt.Object.defineProperties(Sa.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&_n(a,">= 1",Sa,"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:Ot("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}}}),Sa.prototype.getTemporaryState=Sa.prototype.Ez,Sa.prototype.stop=Sa.prototype.stop,Sa.prototype.add=Sa.prototype.add,Sa.prototype.addTemporaryPart=Sa.prototype.Iy;function jc(a,y,x,b){return a/=b/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Wg(a,y,x,b){return a===b?y+x:x*(-Math.pow(2,-10*a/b)+1)+y}Sa.className="Animation",Sa.EaseLinear=function(a,y,x,b){return x*a/b+y},Sa.EaseInOutQuad=jc,Sa.EaseInQuad=function(a,y,x,b){return x*(a/=b)*a+y},Sa.EaseOutQuad=function(a,y,x,b){return-x*(a/=b)*(a-2)+y},Sa.EaseInExpo=function(a,y,x,b){return a===0?y:x*Math.pow(2,10*(a/b-1))+y},Sa.EaseOutExpo=Wg;function Zh(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}Zh.className="AnimationState";function vl(a,y,x){this.xd=null,this.rf=a,this.so=x||pp,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=Xh))}vl.prototype.copy=function(){var a=new vl(this.rf);a.so=this.so;var y=this.uk;if(y!==null){var x={};y.duration!==void 0&&(x.duration=y.duration),y.finished!==void 0&&(x.finished=y.finished),y.easing!==void 0&&(x.easing=y.easing),a.uk=x}return a};function Hg(a,y){a=a.uk,a!==null&&(a.duration&&(y.duration=a.duration),a.finished&&(y.finished=a.finished),a.easing&&(y.easing=a.easing))}Zt.Object.defineProperties(vl.prototype,{propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},animationSettings:{get:function(){return this.uk},set:function(a){this.uk=a}},startCondition:{get:function(){return this.so},set:function(a){this.so=a}}});var pp=new un(vl,"Default",1),Xh=new un(vl,"Immediate",2),Oc=new un(vl,"Bundled",3);vl.className="AnimationTrigger",vl.Default=pp,vl.Immediate=Xh,vl.Bundled=Oc;function ra(a){yr(this),this.H=null,this.Pa=new yn,this.xa="",this.pb=1,this.o=!1,this.j=this.Uh=this.u=this.Oi=this.Ni=this.Mi=this.Li=this.Ji=this.Ki=this.Ii=this.Qi=this.Hi=this.Pi=this.Gi=this.Fi=!0,this.Zq=[],a&&Object.assign(this,a)}et=ra.prototype,et.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,La(x)}a.clear(),this.Zq.length=0},et.Xe=function(a){this.H=a},et.toString=function(a){a===void 0&&(a=0);var y='Layer "'+this.name+'"';if(0>=a)return y;for(var x=0,b=0,E=0,te=0,ne=0,se=this.Pa.iterator;se.next();){var he=se.value;he instanceof jr?E++:he instanceof Rn?b++:he instanceof Tn?te++:he instanceof di?ne++:x++}if(se="",0<x&&(se+=x+" Parts "),0<b&&(se+=b+" Nodes "),0<E&&(se+=E+" Groups "),0<te&&(se+=te+" Links "),0<ne&&(se+=ne+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,se+=`
`+x.toString(),b=x.data,b!==null&&Yr(b)&&(se+=" #"+Yr(b)),x instanceof Rn?se+=" "+Rr(b):x instanceof Tn&&(se+=" "+Rr(x.fromNode)+" "+Rr(x.toNode));return y+" "+this.Pa.count+": "+se},et.ic=function(a,y,x){if(y===void 0&&(y=null),x===void 0&&(x=null),this.Uh===!1)return null;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var E=lt.alloc(),te=this.Pa.s,ne=te.length;ne--;){var se=te[ne];if((b!==!0||ic(se)!==!1)&&se.isVisible()&&(E.assign(a),Gn(E,se.oe),se=se.ic(E,y,x),se!==null&&(y!==null&&(se=y(se)),se!==null&&(x===null||x(se)))))return lt.free(E),se}return lt.free(E),null},et.ji=function(a,y,x,b){if(y===void 0&&(y=null),x===void 0&&(x=null),b instanceof yn||b instanceof xn||(b=new xn),this.Uh===!1)return b;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var te=lt.alloc(),ne=this.Pa.s,se=ne.length;se--;){var he=ne[se];if((E!==!0||ic(he)!==!1)&&he.isVisible()){te.assign(a),Gn(te,he.oe);var pe=he;he.ji(te,y,x,b)&&(y!==null&&(pe=y(pe)),pe===null||x!==null&&!x(pe)||b.add(pe))}}return lt.free(te),b},et.Cf=function(a,y,x,b,E){if(y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof yn||E instanceof xn||(E=new xn),this.Uh===!1)return E;var te=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(te=!0);for(var ne=this.Pa.s,se=ne.length;se--;){var he=ne[se];if((te!==!0||ic(he)!==!1)&&he.isVisible()){var pe=he;he.Cf(a,y,x,b,E)&&(y!==null&&(pe=y(pe)),pe===null||x!==null&&!x(pe)||E.add(pe))}}return E},et.Nu=function(a,y,x,b,E,te,ne){if(this.Uh===!1)return E;for(var se=this.Pa.s,he=se.length;he--;){var pe=se[he];if((ne!==!0||ic(pe)!==!1)&&te(pe)&&pe.isVisible()){var ye=pe;pe.Cf(a,y,x,b,E)&&(y!==null&&(ye=y(ye)),ye===null||x!==null&&!x(ye)||E.add(ye))}}return E},et.og=function(a,y,x,b,E,te){if(x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof yn||E instanceof xn)&&(te=E),E=!0),te instanceof yn||te instanceof xn||(te=new xn),this.Uh===!1)return te;var ne=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ne=!0);for(var se=lt.alloc(),he=lt.alloc(),pe=this.Pa.s,ye=pe.length;ye--;){var Te=pe[ye];if((ne!==!0||ic(Te)!==!1)&&Te.isVisible()){se.assign(a),Gn(se,Te.oe),he.h(a.x+y,a.y),Gn(he,Te.oe);var ze=Te;Te.og(se,he,x,b,E,te)&&(x!==null&&(ze=x(ze)),ze===null||b!==null&&!b(ze)||te.add(ze))}}return lt.free(se),lt.free(he),te},et.Fd=function(a,y){if(this.visible){var x=this.Pa.s,b=x.length;if(b!==0){a=$n();for(var E=$n(),te=0;te<b;te++){var ne=x[te];if(ne.vw=te,ne instanceof Tn){if(ne.fd===!1)continue}else if(ne instanceof di&&ne.adornedPart!==null)continue;var se=ne.actualBounds;ne.isVisible()&&Bi(se,y)?(ne.Fd(!0),a.push(ne)):(ne.Fd(!1),ne.adornments!==null&&0<ne.adornments.count&&E.push(ne))}for(y=0;y<a.length;y++)for(x=a[y],Bv(x),x=x.adornments;x.next();)b=x.value,b.measure(1/0,1/0),b.arrange(),b.Fd(!0);for(y=0;y<E.length;y++)Bv(E[y]);Wn(a),Wn(E)}}};function Gu(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}et.gc=function(a,y,x){if(this.visible&&this.pb!==0&&(x===void 0&&(x=!0),x||!this.isTemporary)){x=this.Pa.s;var b=x.length;if(b!==0){if(a.isTemporary)for(var E=0;E<b;E++)x[E].Gj();E=Gu(this,a);var te=this.Zq;te.length=0;for(var ne=y.scale,se=Yt.alloc(),he=0;he<b;he++)this.Oj(a,x[he],y,te,ne,se,!0);if(Yt.free(se),a.isTemporary)for(y=0;y<b;y++)x[y].Gj();a.globalAlpha=E}}};function Kg(a,y,x,b,E){if(a.visible&&a.pb!==0&&(E||!a.isTemporary)){E=a.Pa.s;var te=E.length;if(te!==0){var ne=Gu(a,y),se=a.Zq;se.length=0;for(var he=x.scale,pe=Yt.alloc(),ye=0;ye<te;ye++){var Te=E[ye];b.contains(Te)&&a.Oj(y,Te,x,se,he,pe,!1)}Yt.free(pe),y.globalAlpha=ne}}}et.Oj=function(a,y,x,b,E,te,ne){if(ne&&!ic(y))a.Hs(y);else{if(b!==null&&y instanceof Tn&&(y.isOrthogonal&&b.push(y),y.fd===!1)){a.Hs(y);return}for(ne=!1,b=y.containingGroup;b!==null;)ne?b.tb!==null&&te.Ex(b.tb):b.tb!==null&&(ne=!0,te.assign(b.tb)),b=b.containingGroup;var se=y.actualBounds;if(b=!1,ne&&y.isVisible()){if(!te.Yc(se)){a.Hs(y);return}b=!te.Re(se)}b&&(a.save(),a instanceof bs?a.bk=te.copy():(a.beginPath(),a.rect(te.x,te.y,te.width,te.height),a.clip())),se.width*E>x.Oq||se.height*E>x.Oq?y.gc(a,x):(E=y.actualBounds,te=y.naturalBounds,E.width===0||E.height===0||isNaN(E.x)||isNaN(E.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(yo(y,a,y.areaBackground,!0,!0,te,E),a.fillRect(E.x,E.y,E.width,E.height)),y.areaBackground===null&&y.background===null&&(yo(y,a,"rgba(0,0,0,0.3)",!0,!1,te,E),a.fillRect(E.x,E.y,E.width,E.height)),y.background!==null&&(a.transform(x.m11,x.m12,x.m21,x.m22,x.dx,x.dy),yo(y,a,y.background,!0,!1,te,E),a.fillRect(0,0,te.width/2,te.height/2),x.ws()||(y=1/(x.m11*x.m22-x.m12*x.m21),a.transform(x.m22*y,-x.m12*y,-x.m21*y,x.m11*y,y*(x.m21*x.dy-x.m22*x.dx),y*(x.m12*x.dx-x.m11*x.dy)))))),b&&(a.restore(),a.Vc(!0))}},et.g=function(a,y,x,b,E){var te=this.diagram;te!==null&&te.cb(to,a,this,y,x,b,E)},et.oi=function(a,y,x){var b=this.Pa;if(y.Ig=this,this===null&&La(y),a>=b.count)a=b.count;else if(b.M(a)===y)return-1;return b.Gb(a,y),y.Vo(x),b=this.diagram,b!==null&&(x?b.N():b.oi(y)),ud(this,a,y),a},et.pc=function(a,y,x){if(!x&&y.layer!==this&&y.layer!==null)return y.layer.pc(a,y,x);var b=this.Pa;if(0>a||a>=b.length){if(a=b.indexOf(y),0>a)return-1}else if(b.M(a)!==y&&(a=b.indexOf(y),0>a))return-1;return y.Wo(x),b.mb(a),b=this.diagram,b!==null&&(x?b.N():b.pc(y)),y.Ig=null,La(y),a};function ud(a,y,x){if(y=Vg(a,y,x),x instanceof jr&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var b=-1,E=a.Pa.s,te=E.length,ne=0;ne<te;ne++){var se=E[ne];if(se===x&&(y=ne,0<=b)||0>b&&se.containingGroup===x&&(b=ne,0<=y))break}!(0>b)&&b<y&&(E=a.Pa,E.mb(y),E.Gb(b,x))}y=x.containingGroup,y!==null&&ud(a,-1,y)}x.svg!==null&&x.svg.remove()}function Vg(a,y,x){var b=x.zOrder;if(isNaN(b))return y;a=a.Pa;var E=a.count;if(1>=E)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var te=y-1,ne=NaN;0<=te&&(ne=a.M(te).zOrder,!!isNaN(ne));)te--;for(var se=y+1,he=NaN;se<E&&(he=a.M(se).zOrder,!!isNaN(he));)se++;if(!isNaN(ne)&&ne>b)for(;;){if(te===-1||ne<=b){if(te++,te===y)break;return a.mb(y),a.Gb(te,x),te}for(ne=NaN;0<=--te&&(ne=a.M(te).zOrder,isNaN(ne)););}else if(!isNaN(he)&&he<b)for(;;){if(se===E||he>=b){if(se--,se===y)break;return a.mb(y),a.Gb(se,x),se}for(he=NaN;++se<E&&(he=a.M(se).zOrder,isNaN(he)););}return y}Zt.Object.defineProperties(ra.prototype,{parts:{get:function(){return this.Pa.iterator}},partsBackwards:{get:function(){return this.Pa.iteratorBackwards}},diagram:{get:function(){return this.H}},name:{get:function(){return this.xa},set:function(a){var y=this.xa;if(y!==a){var x=this.diagram;if(x!==null)for(y===""&&Ot("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Ot("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)&&_n(a,"0 <= value <= 1",ra,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,a!==null&&a.N())}},isTemporary:{get:function(){return this.o},set:function(a){var y=this.o;y!==a&&((this.o=a)&&(this.isInDocumentBounds=!1),this.g("isTemporary",y,a))}},visible:{get:function(){return this.u},set:function(a){var y=this.u;if(y!==a){for(this.u=a,this.g("visible",y,a),y=this.Pa.iterator;y.next();)y.value.Zb(a);a=this.diagram,a!==null&&a.N()}}},pickable:{get:function(){return this.Uh},set:function(a){var y=this.Uh;y!==a&&(this.Uh=a,this.g("pickable",y,a))}},isInDocumentBounds:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a,this.diagram!==null&&this.diagram.Ya())}},allowCopy:{get:function(){return this.Fi},set:function(a){var y=this.Fi;y!==a&&(this.Fi=a,this.g("allowCopy",y,a))}},allowDelete:{get:function(){return this.Gi},set:function(a){var y=this.Gi;y!==a&&(this.Gi=a,this.g("allowDelete",y,a))}},allowTextEdit:{get:function(){return this.Pi},set:function(a){var y=this.Pi;y!==a&&(this.Pi=a,this.g("allowTextEdit",y,a))}},allowGroup:{get:function(){return this.Hi},set:function(a){var y=this.Hi;y!==a&&(this.Hi=a,this.g("allowGroup",y,a))}},allowUngroup:{get:function(){return this.Qi},set:function(a){var y=this.Qi;y!==a&&(this.Qi=a,this.g("allowUngroup",y,a))}},allowLink:{get:function(){return this.Ii},set:function(a){var y=this.Ii;y!==a&&(this.Ii=a,this.g("allowLink",y,a))}},allowRelink:{get:function(){return this.Ki},set:function(a){var y=this.Ki;y!==a&&(this.Ki=a,this.g("allowRelink",y,a))}},allowMove:{get:function(){return this.Ji},set:function(a){var y=this.Ji;y!==a&&(this.Ji=a,this.g("allowMove",y,a))}},allowReshape:{get:function(){return this.Li},set:function(a){var y=this.Li;y!==a&&(this.Li=a,this.g("allowReshape",y,a))}},allowResize:{get:function(){return this.Mi},set:function(a){var y=this.Mi;y!==a&&(this.Mi=a,this.g("allowResize",y,a))}},allowRotate:{get:function(){return this.Ni},set:function(a){var y=this.Ni;y!==a&&(this.Ni=a,this.g("allowRotate",y,a))}},allowSelect:{get:function(){return this.Oi},set:function(a){var y=this.Oi;y!==a&&(this.Oi=a,this.g("allowSelect",y,a))}}}),ra.prototype.findObjectsNear=ra.prototype.og,ra.prototype.findObjectsIn=ra.prototype.Cf,ra.prototype.findObjectsAt=ra.prototype.ji,ra.prototype.findObjectAt=ra.prototype.ic,ra.className="Layer";function Vt(a,y){if(am||(Ta(),am=!0),yr(this),cu=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,vo){var x=this,b=function(){x.removeEventListener(An.document,"DOMContentLoaded",b,!1),x.setRTL()};An.document.body!==null?this.setRTL():x.addEventListener(An.document,"DOMContentLoaded",b,!1)}this.ol=null,xd.add("Model",Mi);var E=this;return this.Hb=function(te){var ne=E.partManager;if(te.model===ne.diagram.model&&ne.diagram.aa){ne.diagram.aa=!1;try{var se=te.change;te.modelChange===""&&se===to&&ne.updateDataBindings(te.object,te.propertyName)}finally{ne.diagram.aa=!0}}},this.Oc=function(te){E.partManager.doModelChanged(te)},this.hu=this.ku=null,Zg(this),this.model=cy(),this.Wg=!0,Yg(this),this.layout=new so,this.Wg=!1,this.ck=this.ek=this.fk=this.dk=this.ui=this.aA=this.$j=this.Ov=null,this.hk=function(){},this.preventDefault=null,this.rn=!1,this.Yf=new sm,a!==void 0&&(typeof a=="string"||An.Element&&a instanceof Element?mp(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Yh,cu;function Zg(a){a.Yd=new Ps,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new yn,a.pj=new Jt,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new lt(NaN,NaN).freeze(),a.du=new lt(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new lt(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new Mr,a.zu=new lt(NaN,NaN).freeze(),a.ut=new Yt(NaN,NaN,NaN,NaN).freeze(),a.rj=new Dr(0,0,0,0).freeze(),a.sj=mh,a.nu=!1,a.Zt=null,a.fu=null,a.yh=Ba,a.zk=Vo,a.Fg=Ba,a.pq=Vo,a.yt=wi,a.Bt=wi,a.Fc=!0,a.pn=!1,a.De=new xn,a.Eh=new Jt,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Dr(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new va,a.bq.diagram=a,a.Qg=new va,a.Qg.diagram=a,a.cj=new va,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,nv(a),a.ai=new xn,a.Ht=!0,a.uu=vh,a.pw=!1,a.wu=Tf,a.it="auto",a.Op="auto",a.zh=null,a.Fh=null,a.Bh=null,a.Qh=null,a.Oh=null,a.Nh=null,a.Qt=null,a.Lh=null,a.xt=!1,a.Mh=null,a.Ph=null,a.$h=null,a.Ch=null,a.Rt=!1,a.Yt={},a.oj=[null,null],a.Wg=!1,a.Iw=!1,a.ou=!1,a.lt=!1,a.rw=!0,a.ld=!1,a.$i=!1,a.Tw=!0,a.Ce=-2,a.Og=new Jt,a.Xn=new yn,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 Dr(5).freeze(),a.Hw=new xn().freeze(),a.Nt=999999999,a.nw=new xn().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 xn,a.ow=new xn,a.Xh=null,a.aw=new fn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new lt,bounds:new Yt,Py:new fn,bA:new fn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new Yt(NaN,NaN,NaN,NaN).freeze(),a.wo=new fn(NaN,NaN).freeze(),a.Sp=new Yt(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new Jt;var y=new Rn,x=new Hi;x.bind(new Mo("text","",Rr)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Rn,x=new Hi,x.stroke="brown",x.bind(new Mo("text","",Rr)),y.add(x),a.Lg.add("Comment",y),y=new Rn,y.selectable=!1,y.avoidable=!1,x=new Ir,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new fn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new Jt,y=new jr,y.selectionObjectName="GROUPPANEL",y.type=Cn.Vertical,x=new Hi,x.font="bold 12pt sans-serif",x.bind(new Mo("text","",Rr)),y.add(x),x=new Cn(Cn.Auto),x.name="GROUPPANEL";var b=new Ir;b.figure="Rectangle",b.fill="rgba(128,128,128,0.2)",b.stroke="black",x.add(b),b=new $a,b.padding=new Dr(5,5,5,5).ja(),x.add(b),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new Jt,y=new Tn,x=new Ir,x.isPanelMain=!0,y.add(x),x=new Ir,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Tn,x=new Ir,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new di,y.type=Cn.Auto,x=new Ir,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new $a,x.margin=new Dr(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new di,y.type=Cn.Link,x=new Ir,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 Mi,a.toolManager=new Xi,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new ce,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=Xg(),a.eq=null,a.fq=Yn,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 lt,a.zy=500,a.wp=new lt,a.wq=!1}Vt.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),zc=null,ec="",gp(this,!1),this.Xn.clear(),Od(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function gp(a,y){a.animationManager.Cc(!0),a.Hw=new xn().freeze(),a.nw=new xn().freeze();var x=a.skipsUndoManager,b=a.cc!==null&&a.cc!==void 0;b&&(a.skipsUndoManager=!0);var E=null;a.fe!==null&&(E=a.fe.part,E!==null&&a.remove(E));var te=[],ne=a.Wa.length;if(y){for(y=0;y<ne;y++)for(var se=a.Wa.s[y].parts;se.next();){var he=se.value;he!==E&&he.data===null&&te.push(he)}for(y=0;y<te.length;y++)a.remove(te[y])}for(y=0;y<ne;y++)a.Wa.s[y].clear();return a.partManager.clear(),a.De.clear(),a.Eh.clear(),a.ai.clear(),a.Ck=null,a.Xn.clear(),Od(),a.Og.clear(),ki=[],E!==null&&(a.add(E),a.partManager.parts.remove(E)),b&&(a.skipsUndoManager=x),te}function Xg(){return null}Vt.prototype.reset=function(){this.clear(),this.vb=!0,Zg(this),$l(this),this.Wg=!0,Yg(this),this.layout=new so,this.Wg=!1,this.model=cy(),this.model.undoManager=new ho,this.vb=this.rn=!1,this.N()},Vt.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=An.document.body);var y=Qn("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},Vt.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=An.document.body);var y=0;if(vo){var x=om;y=Yh,x===null&&(x=om=Qn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Yh=Qn("div"),y.style.position="absolute",y.style.visibility="hidden",y.style.width="200px",y.style.height="150px",y.style.boxSizing="content-box",y.appendChild(x)),y.style.overflow="hidden",a.appendChild(y);var b=x.offsetWidth;y.style.overflow="scroll",x=x.offsetWidth,b===x&&(x=y.clientWidth),a.removeChild(y),y=b-x,y!==0||qr||(y=11)}this.Db=y,this.Gw=!0},Vt.prototype.qb=function(a){a.classType===Vt&&(this.autoScale=a)},Vt.prototype.toString=function(a){a===void 0&&(a=0);var y="";if(this.div&&this.div.id&&(y=this.div.id),y='Diagram "'+y+'"',0>=a)return y;for(var x=this.Wa.iterator;x.next();)y+=`
`+x.value.toString(a-1);return y};function mp(a,y){if(vo){if(y!=null||Ot("Diagram setup requires an argument DIV."),a.Ka!==null&&Ot("Diagram has already completed setup."),typeof y=="string"?a.Ka=An.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Ot("No DIV or DIV id supplied: "+y),a.Ka===null&&Ot("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Ot("Invalid div id; div already has a Diagram associated with it."),!a.ol&&An.ResizeObserver){var x=rn(function(){a.$b()},250);a.ol=new An.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}An.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var b="rgba(2"+y+"5, 255, 255, 0)";y--,a.Ka.style["-webkit-tap-highlight-color"]=b,a.Ka.innerHTML="",a.Ka.H=a,a.Ka.goDiagram=a,a.Ka.go=An.go;var E=new ll(a);if(E.style!==void 0&&(E.style.position="absolute",E.style.top="0px",E.style.left="0px",An.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),E.style.zIndex="2",E.style.userSelect="none",E.style.MozUserSelect="none",E.style.touchAction="none",E.style.letterSpacing="normal !important",E.style.wordSpacing="normal !important"),a.ta=E,a.ib=E.context,b=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),Cp(a,a.Aa,a.ya),a.Ka.insertBefore(E.Oa,a.Ka.firstChild),E=new ll(null),E.width=1,E.height=1,a.jw=E,a.oy=E.context,vo){E=Qn("div");var te=Qn("div");E.style.position="absolute",E.style.overflow="auto",E.style.width=a.Aa+"px",E.style.height=a.ya+"px",E.style.zIndex="1",te.style.position="absolute",te.style.width="1px",te.style.height="1px",a.Ka.appendChild(E),E.appendChild(te),E.onscroll=Jg,E.addEventListener("pointerdown",Qg),E.H=a,E.uy=!0,E.vy=!0,a.ku=E,a.hu=te}a.hk=rn(function(){a.Yh=null,a.N()},300),a.Ov=rn(function(){vp(a)},250),a.preventDefault=function(ne){return ne.preventDefault(),!1},a.$j=function(ne){if(a.isEnabled){var se=Hs(a,ne,!0);se.bubbles=!0;var he=0,pe=0;se.delta=0,ne.deltaX!==void 0?(ne.deltaX!==0&&(he=0<ne.deltaX?1:-1),ne.deltaY!==0&&(pe=0<ne.deltaY?1:-1),se.delta=Math.abs(ne.deltaX)>Math.abs(ne.deltaY)?-he:-pe):ne.wheelDeltaX!==void 0?(ne.wheelDeltaX!==0&&(he=0<ne.wheelDeltaX?-1:1),ne.wheelDeltaY!==0&&(pe=0<ne.wheelDeltaY?-1:1),se.delta=Math.abs(ne.wheelDeltaX)>Math.abs(ne.wheelDeltaY)?-he:-pe):ne.wheelDelta!==void 0&&ne.wheelDelta!==0&&(se.delta=0<ne.wheelDelta?1:-1),a.doMouseWheel(),yl(se,ne)}},a.aA=function(ne){a.isEnabled&&(a.Vk=!1,Hs(a,ne,!0),ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())},a.ui=function(ne){if(a.isEnabled){a.Vk=!0;var se=a.Yt;se[ne.pointerId]===void 0&&(se[ne.pointerId]=ne),se=a.oj;var he=!1;if(se[0]===null||se[0].pointerId!==ne.pointerId&&se[0].pointerType===ne.pointerType)if(se[1]!==null&&se[1].pointerId===ne.pointerId)se[1]=ne,he=!0;else if(se[0]===null)se[0]=ne;else if(se[1]===null)se[1]=ne,he=!0;else{ne.preventDefault();return}else se[0]=ne;(se=ne.pointerType==="touch"||ne.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var pe=he;he=wp(a,ne,!0,!1,!0,pe),Dc(a,ne,he),he.targetDiagram=xp(ne,ne.target),he.targetObject=null,pe||he.clone(a.bq),pe=a.uw,se=se?25:10,ne.timeStamp-a.tw<a.zy&&!(Math.abs(pe.x-ne.screenX)>se||Math.abs(pe.y-ne.screenY)>se)?a.yq++:a.yq=1,he.clickCount=a.yq,a.tw=ne.timeStamp,a.uw.sg(ne.screenX,ne.screenY),a.doMouseDown(),ne.button===1?ne.preventDefault():yl(he,ne)}},a.dk=function(ne){if(a.isEnabled){a.Vk=!0;var se=a.oj;if(se[0]===null||se[0].pointerId!==ne.pointerId&&se[0].pointerType===ne.pointerType){if(se[1]!==null&&se[1].pointerId===ne.pointerId){se[1]=ne;return}if(se[0]===null)se[0]=ne;else return}else se[0]=ne;if(se[0].pointerId===ne.pointerId){se=wp(a,ne,!1,!1,!1,se[1]!==null);var he=An.document.elementFromPoint(ne.clientX,ne.clientY)||null;he!==null&&he.shadowRoot!==void 0&&he.shadowRoot!==null&&(he=he.shadowRoot.elementFromPoint(ne.clientX,ne.clientY));var pe=a,ye=ne;he&&he.H&&(ye=ne,pe=he.H),se.targetDiagram=pe,Dc(a,ye,se),se.targetObject=null,a.doMouseMove(),yl(se,ne)}}},a.fk=function(ne){if(a.isEnabled){a.Vk=!0;var se=ne.pointerType==="touch"||ne.pointerType==="pen",he=a.Yt;if(se&&a.qu)delete he[ne.pointerId],ne.preventDefault();else if(he=a.oj,he[0]===null||he[0].pointerId!==ne.pointerId&&he[0].pointerType===ne.pointerType)he[1]!==null&&he[1].pointerId===ne.pointerId&&(he[1]=null);else{he[0]=null,he=wp(a,ne,!1,!0,!0,!1);var pe=An.document.elementFromPoint(ne.clientX,ne.clientY)||null;pe!==null&&pe.shadowRoot!==void 0&&pe.shadowRoot!==null&&(pe=pe.shadowRoot.elementFromPoint(ne.clientX,ne.clientY)),pe!==null&&pe.H instanceof Vt&&pe.H!==a&&Dc(pe.H,ne,he),pe===null&&(pe=ne.target),Dc(a,ne,he),he.clickCount=a.yq,he.targetDiagram=xp(ne,pe),he.targetObject=null,a.doMouseUp(),yl(he,ne),se&&(a.wq=!1)}}},a.ek=function(ne){if(a.isEnabled){a.Vk=!1;var se=a.Yt;se[ne.pointerId]&&delete se[ne.pointerId],se=a.oj,se[0]!==null&&se[0].pointerId===ne.pointerId&&(se[0]=null),se[1]!==null&&se[1].pointerId===ne.pointerId&&(se[1]=null),ne.pointerType!=="touch"&&ne.pointerType!=="pen"&&(ne=a.currentTool,ne.cancelWaitAfter(),ne.standardMouseOver())}},a.ck=function(ne){var se=a.oj;se[0]!==null&&se[0].pointerId===ne.pointerId?(se[0]=null,a.wq=!1):se[1]!==null&&se[1].pointerId===ne.pointerId&&(se[1]=null)},a.Vp=b.Z["d"+Nf[1]+Nf[2]+"wI"+Uc.slice(1,5)]["b"+Ox.slice(1,y)](b.Z,Lf,y,y),b.Vc(!0),tv(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}Vt.prototype.addEventListener=function(a,y,x,b){a.addEventListener(y,x,{capture:b,passive:!1})},Vt.prototype.removeEventListener=function(a,y,x,b){a.removeEventListener(y,x,{capture:b})};function tv(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(An,"resize",a.Ov,!1)}function as(a){30<a.Sq&&(a.Yh=1)}function Pf(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),xr&&xr.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}Vt.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:An.devicePixelRatio||1},Vt.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},Vt.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},Vt.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},Vt.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},Vt.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},Vt.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},Vt.prototype.doFocus=function(){this.focus()},Vt.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=An.scrollX||An.pageXOffset,y=An.scrollY||An.pageYOffset;this.ta.focus(),An.scrollTo(a,y)}},Vt.prototype.Oy=function(){this.H.R("GainedFocus")},Vt.prototype.Ny=function(){this.H.R("LostFocus")};function vp(a){if(a.ta!==null){var y=a.Ka;if(y!==null&&y.clientWidth!==0&&y.clientHeight!==0){a.Gw||a.setScrollWidth();var x=a.gf?a.Db:0,b=a.Be?a.Db:0,E=a.Mb;a.Mb=a.computePixelRatio(),a.Mb!==E&&(a.pn=!0,a.$b()),(y.clientWidth!==a.Aa+x||y.clientHeight!==a.ya+b)&&(a.Ee=!0,a.Fc=!0,y=a.layout,y!==null&&y.isViewportSized&&a.autoScale===Ba&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Yg(a){var y=new ra;y.name="Background",a.Al(y),y=new ra,y.name="",a.Al(y),y=new ra,y.name="Foreground",a.Al(y),y=new ra,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new ra,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new ra,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function $g(a){var y=new Cn(Cn.Grid);y.name="GRID";var x=new Ir;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Ir,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Ir,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Ir,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Ir,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Ir,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new fr,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 Jg(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):Rc(this.H)}function Qg(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):Rc(this.H)}Vt.prototype.kx=function(a){if(this.ta!==null){var y=this.ku,x=this.hu;this.qr=!0;var b=this.documentBounds,E=this.viewportBounds,te=this.rj,ne=b.x-te.left,se=b.y-te.top,he=b.width+te.left+te.right,pe=b.height+te.top+te.bottom,ye=b.right+te.right;te=b.bottom+te.bottom;var Te=E.x;b=E.y;var ze=E.width,Ze=E.height,$e=E.right,it=E.bottom;E=this.scale;var Tt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Tt=Tt+a.scrollWidth-a.clientWidth;break;case"reverse":Tt=a.scrollWidth-Tt-a.clientWidth}var bt=Tt;ze<he||Ze<pe?(Tt=lt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==bt&&(Tt.x=bt/E+ne,this.ju=bt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Tt.y=a.scrollTop/E+se,this.lu=a.scrollTop),this.position=Tt,lt.free(Tt),this.Ee=this.qr=!1):(Tt=lt.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<Te&&(this.position=Tt.h(bt+ne,this.position.y)),ye>$e&&(this.position=Tt.h(-(y.scrollWidth-this.Aa)+bt-this.Aa/E+ye,this.position.y))),a.vy&&this.allowVerticalScroll&&(se<b&&(this.position=Tt.h(this.position.x,a.scrollTop+se)),te>it&&(this.position=Tt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/E+te))),lt.free(Tt),this.vd=!0,this.Ee=this.qr=!1,b=this.documentBounds,E=this.viewportBounds,ye=b.right,$e=E.right,te=b.bottom,it=E.bottom,ne=b.x,Te=E.x,se=b.y,b=E.y,ze>=he&&ne>=Te&&ye<=$e&&(x.style.width="1px"),Ze>=pe&&se>=b&&te<=it&&(x.style.height="1px"))}},Vt.prototype.computeBounds=function(a){return a===void 0&&(a=new Yt),xa(this),yp(this,a)};function yp(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,b=a.Wa.s,E=b.length,te=0;te<E;te++){var ne=b[te];if(ne.visible&&ne.isInDocumentBounds){ne=ne.Pa.s;for(var se=ne.length,he=0;he<se;he++){var pe=ne[he];pe.isInDocumentBounds&&pe.isVisible()&&(pe=pe.actualBounds,pe.w()&&(x?(x=!1,y.assign(pe)):y.ed(pe)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}Vt.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(Un(a))for(var b=0;b<a.length;b++){var E=a[b];!y&&E instanceof Tn||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds))}else for(a=a.iterator;a.next();)b=a.value,!y&&b instanceof Tn||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds));return x===null?new Yt(NaN,NaN,0,0):x};function al(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=lt.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var b=a.viewportBounds;b=Yt.allocAt(0,0,b.width,b.height);var E=lt.alloc();E.xi(b,a.initialViewportSpot),E.h(x.x-E.x,x.y-E.y),a.position=E,Yt.free(b),lt.free(E),lt.free(x)}x=a.yh,y&&a.Fg!==Ba&&(x=a.Fg);var te=x!==Ba?Fc(a,x):a.scale;x=a.pa.x,b=a.pa.y,E=a.Aa/te;var ne=a.ya/te,se=a.zk,he=a.pq;y&&!se.sb()&&(he.sb()||he.Xb())&&(se=he.Xb()?ti:he),Sp(a,a.documentBounds,E,ne,se,y),y=a.scale,a.scale=te,a.vb=!1,te=a.viewportBounds,Gt.B(te.x,x)&&Gt.B(te.y,b)&&Gt.B(te.width,E)&&Gt.B(te.height,ne)||a.onViewportBoundsChanged(new Yt(x,b,E,ne),te,y,!1)}}function Fc(a,y){var x=a.Pp;if(a.ta===null)return x;a.Va();var b=a.documentBounds;if(!b.w())return x;var E=b.width;b=b.height;var te=a.Aa+(a.gf?a.Db:0),ne=a.ya+(a.Be?a.Db:0),se=te/E,he=ne/b;return y===Fs?(y=Math.min(he,se),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===tc?(y=he>se?(ne-a.Db)/b:(te-a.Db)/E,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}Vt.prototype.zoomToFit=function(){var a=this.sj;this.sj=mh,this.scale=Fc(this,Fs),a!==mh&&(al(this,!1),Sp(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},et=Vt.prototype,et.BA=function(a,y){y===void 0&&(y=Fs);var x=a.width,b=a.height;if(!(x===0||b===0||isNaN(x)&&isNaN(b))){var E=1;if(y===Fs||y===tc)if(isNaN(x))E=this.viewportBounds.height*this.scale/b;else if(isNaN(b))E=this.viewportBounds.width*this.scale/x;else{E=this.Aa;var te=this.ya;E=y===tc?te/b>E/x?(te-(this.Be?this.Db:0))/b:(E-(this.gf?this.Db:0))/x:Math.min(te/b,E/x)}this.scale=E,this.position=new lt(a.x,a.y)}},et.Jy=function(a,y){this.Va();var x=this.documentBounds,b=this.viewportBounds;this.position=new lt(x.x+(a.x*x.width+a.offsetX)-(y.x*b.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*b.height-y.offsetY))},et.zz=function(a){if(a instanceof zt){this.eq=a;var y=lt.alloc();this.fq=this.op(a.ga(wi,y)),lt.free(y)}else this.eq=null,this.fq=Yn};function Sp(a,y,x,b,E,te){var ne=lt.allocAt(a.pa.x,a.pa.y),se=ne.x,he=ne.y;if(a.eq!==null){var pe=lt.alloc();pe=a.eq.ga(wi,pe),se=pe.x-a.fq.x/a.scale,he=pe.y-a.fq.y/a.scale,E=zr,lt.free(pe)}(te||a.scrollMode===mh)&&(E.sb()&&(x>y.width&&(se=y.x+(E.x*y.width+E.offsetX)-(E.x*x-E.offsetX)),b>y.height&&(he=y.y+(E.y*y.height+E.offsetY)-(E.y*b-E.offsetY))),E=a.rj,te=x-y.width,x<y.width+E.left+E.right?(se=Math.min(se+x/2,y.right+Math.max(te,E.right)-x/2),se=Math.max(se,y.left-Math.max(te,E.left)+x/2),se-=x/2):se>y.left?se=y.left:se<y.right-x&&(se=y.right-x),x=b-y.height,b<y.height+E.top+E.bottom?(he=Math.min(he+b/2,y.bottom+Math.max(x,E.bottom)-b/2),he=Math.max(he,y.top-Math.max(x,E.top)+b/2),he-=b/2):he>y.top?he=y.top:he<y.bottom-b&&(he=y.bottom-b)),ne.x=isFinite(se)?se:-a.yb.left,ne.y=isFinite(he)?he:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,ne),ne.x=y.x,ne.y=y.y),Ug(a.Yd,a.pa,ne),a.pa.h(ne.x,ne.y),$l(a),lt.free(ne)}et.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=fu(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof fr)return a}else if(a=fu(this,a,function(x){return x.part}),a instanceof fr)return a;return null},et.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),xa(this);for(var b=this.Wa.iteratorBackwards;b.next();){var E=b.value;if(E.visible&&(E=E.ic(a,y,x),E!==null))return E}return null};function fu(a,y,x,b){for(x===void 0&&(x=null),b===void 0&&(b=null),xa(a),a=a.Wa.iteratorBackwards;a.next();){var E=a.value;if(E.visible&&!E.isTemporary&&(E=E.ic(y,x,b),E!==null))return E}return null}et.lz=function(a,y,x){return y===void 0&&(y=!0),bf(this,a,function(b){return b.part},y?function(b){return b instanceof fr&&b.canSelect()}:null,x)};function bf(a,y,x,b,E){for(x===void 0&&(x=null),b===void 0&&(b=null),E instanceof yn||E instanceof xn||(E=new xn),xa(a),a=a.Wa.iteratorBackwards;a.next();){var te=a.value;te.visible&&!te.isTemporary&&te.ji(y,x,b,E)}return E}et.ji=function(a,y,x,b){y===void 0&&(y=null),x===void 0&&(x=null),b instanceof yn||b instanceof xn||(b=new xn),xa(this);for(var E=this.Wa.iteratorBackwards;E.next();){var te=E.value;te.visible&&te.ji(a,y,x,b)}return b},et.ux=function(a,y,x,b){return y===void 0&&(y=!1),x===void 0&&(x=!0),hd(this,a,function(E){return E instanceof fr&&(!x||E.canSelect())},y,b)},et.Cf=function(a,y,x,b,E){y===void 0&&(y=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof yn||E instanceof xn||(E=new xn),xa(this);for(var te=this.Wa.iteratorBackwards;te.next();){var ne=te.value;ne.visible&&ne.Cf(a,y,x,b,E)}return E},et.Nu=function(a,y,x,b,E,te){var ne=new xn;xa(this);for(var se=this.Wa.iteratorBackwards;se.next();){var he=se.value;he.visible&&he.Nu(a,y,x,b,ne,E,te)}return ne};function hd(a,y,x,b,E){var te=null;for(te===void 0&&(te=null),x===void 0&&(x=null),b===void 0&&(b=!1),E instanceof yn||E instanceof xn||(E=new xn),xa(a),a=a.Wa.iteratorBackwards;a.next();){var ne=a.value;ne.visible&&!ne.isTemporary&&ne.Cf(y,te,x,b,E)}return E}et.mz=function(a,y,x,b,E){return x===void 0&&(x=!0),b===void 0&&(b=!0),Cf(this,a,y,function(te){return te instanceof fr&&(!b||te.canSelect())},x,E)},et.og=function(a,y,x,b,E,te){x===void 0&&(x=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof yn||E instanceof xn)&&(te=E),E=!0),te instanceof yn||te instanceof xn||(te=new xn),xa(this);for(var ne=this.Wa.iteratorBackwards;ne.next();){var se=ne.value;se.visible&&se.og(a,y,x,b,E,te)}return te};function Cf(a,y,x,b,E,te){var ne=null;for(ne===void 0&&(ne=null),b===void 0&&(b=null),E===void 0&&(E=!0),E!==!1&&E!==!0&&((E instanceof yn||E instanceof xn)&&(te=E),E=!0),te instanceof yn||te instanceof xn||(te=new xn),xa(a),a=a.Wa.iteratorBackwards;a.next();){var se=a.value;se.visible&&!se.isTemporary&&se.og(y,x,ne,b,E,te)}return te}Vt.prototype.acceptEvent=function(a){return Hs(this,a,a instanceof MouseEvent)};function Hs(a,y,x){var b=a.Qg;return a.Qg=a.cj,a.cj=b,b.diagram=a,b.event=y,x?Dc(a,y,b):(b.viewPoint=a.Qg.viewPoint,b.documentPoint=a.Qg.documentPoint),a=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),b.modifiers=a,b.button=y.button,y.buttons!==void 0&&(b.buttons=y.buttons),qr&&y.button===0&&y.ctrlKey&&(b.button=2),b.down=!1,b.up=!1,b.clickCount=1,b.delta=0,b.handled=!1,b.bubbles=!1,b.timestamp=y.timeStamp,b.isMultiTouch=!1,b.targetDiagram=xp(y,y.target),b.targetObject=null,b}function xp(a,y){return y===null?null:(y=y.H)?y:((y=a.path)||typeof a.composedPath!="function"||(y=a.composedPath()),y&&y[0]&&y[0].H?y[0].H:null)}function wp(a,y,x,b,E,te){var ne=a.Qg;return a.Qg=a.cj,a.cj=ne,ne.diagram=a,ne.clickCount=1,a=ne.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),ne.modifiers=a,ne.event=y,ne.timestamp=y.timeStamp,ne.button=y.button,ne.buttons=y.buttons,qr&&y.button===0&&y.ctrlKey&&(ne.button=2),ne.down=x,ne.up=b,ne.handled=!1,ne.bubbles=E,ne.isMultiTouch=te,ne}function yl(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}Vt.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Hs(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(),yl(x,a)},Vt.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Hs(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(),yl(x,a)},Vt.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Hs(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),yl(x,a)},Vt.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Hs(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),yl(x,a)},Vt.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new lt(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?Gn(new lt(y,a),this.Ab):new lt(y,a)};function Dc(a,y,x){var b=a.ta,E=a.Aa,te=a.ya,ne=0,se=0;b!==null&&(b=b.getBoundingClientRect(),ne=y.clientX-E/b.width*b.left,se=y.clientY-te/b.height*b.top),x.viewPoint.h(ne,se),a.Ab!==null?(y=lt.allocAt(ne,se),a.Ab.Cd(y),x.documentPoint.assign(y),lt.free(y)):x.documentPoint.h(ne,se)}function Pp(a,y,x){if(a.oj[0]!==null){y=a.oj[y];var b=a.ta;b!==null&&(b=b.getBoundingClientRect(),x.h(y.clientX-a.Aa/b.width*b.left,y.clientY-a.ya/b.height*b.top))}}Vt.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function qg(a){a.ld||xa(a),a.Va()}Vt.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},et=Vt.prototype,et.Pz=function(){return this.kg},et.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Ks(this),this.hf=!1,this.du=new lt(NaN,NaN),y.isEnabled=x,this.ld=!0;var b=this;a!==null&&qt(function(){b.ld=!1,hu(y,"Model"),a(b)},1)},et.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;An.requestAnimationFrame(function(){y.kg&&y.bd()})}},et.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Ks(this))};function $h(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||Rc(a)||(y&&xa(a),x&&al(a,!1))}function Ks(a,y){if(!a.ld&&(a.kg=!1,a.Ka!==null||a.wo.w())){a.ld=!0;var x=a.animationManager,b=a.Xn;if(!x.isAnimating&&b.length!==0){for(var E=b.s,te=E.length,ne=0;ne<te;ne++){var se=E[ne];Bo(se,!1),se.v()}b.clear()}b=a.ow,0<b.count&&(b.each(function(he){he.Nv()}),b.clear()),E=b=!1,x.defaultAnimation.isAnimating&&(E=!0,b=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||vp(a),$h(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(Yl(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),xa(a),te=!1,(!a.hf||a.xh)&&(a.hf?jp(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),jp(a,!1)),te=!0),a.Jk=!1,xa(a),a.ou||qg(a),$h(a,!0,!1),ne=!1,te?(x=Yt.alloc(),x.assign(a.viewportBounds),a.hf||(ne=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,bp(a)),a.R("LayoutCompleted"),$h(a,!0,!1),Yt.free(x)):x.Ok&&x.Qw&&(a.Fg!==Ba?a.scale=Fc(a,a.Fg):a.yh!==Ba?a.scale=Fc(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),al(a,!0)),te&&ne&&a.eb("Initial Layout"),xa(a),y||a.gc(a.ib),E&&(a.skipsUndoManager=b),a.ld=!1}}function bp(a){if(a.Fg!==Ba)a.scale=Fc(a,a.Fg);else if(a.yh!==Ba)a.scale=Fc(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}al(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Yl(a)}function xa(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 xn,a.Nv(x,a.De)}a.nodes.each(function(b){b instanceof jr&&b.U&65536&&(b.U=b.U^65536)})}}et.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof jr||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof jr&&x.isVisible()&&Ef(this,x);for(a.reset();a.next();)x=a.value,x instanceof Tn&&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 di&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function Ef(a,y){for(var x=$n(),b=$n(),E=y.memberParts;E.next();){var te=E.value;te.isVisible()&&(te instanceof jr?(Bs(te)||Xa(te)||rc(te))&&Ef(a,te):te instanceof Tn?te.fromNode===y||te.toNode===y?b.push(te):x.push(te):(te.measure(1/0,1/0),te.arrange()))}for(a=x.length,E=0;E<a;E++)te=x[E],te.measure(1/0,1/0),te.arrange();for(Wn(x),y.measure(1/0,1/0),y.arrange(),a=b.length,y=0;y<a;y++)x=b[y],x.measure(1/0,1/0),x.arrange();Wn(b)}et.Fd=function(a,y,x,b){if(this.vd||this.animationManager.isAnimating)for(var E=0;E<y;E++)a[E].Fd(x,b)},et.gc=function(a){if(this.Ka!==null){if(this.ta===null&&Ot("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){Ic(this);var x=this.Aa,b=this.ya;if(a.Gv.resize(x,b,x,b),x=this.Wa.s,b=x.length,this.Fd(x,b,this,this.viewportBounds),this.Fc||y.isAnimating){y=this.pa;var E=this.Ca,te=Math.round(y.x*E)/E,ne=Math.round(y.y*E)/E,se=this.Ab;for(se.reset(),E!==1&&se.scale(E),y.x===0&&y.y===0||se.translate(-te,-ne),a.ti=null,Yy(a,se.m11,se.m12,se.m21,se.m22,se.dx,se.dy),this.pb!==1&&(a.globalAlpha=this.pb),ph(this,a),y=this.Mb,this.ta.context.setTransform(y,0,0,y,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya),y=0;y<b;y++)x[y].gc(a,this);a=!1,this.Yf?Wc(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(Mr.prototype.Cd=Mr.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(te=this.animationManager,!te.zb&&(!te.isAnimating||te.isTicking)&&(x=new Date,Ic(this),this.Ka.style.opacity!=="0")){if(b=a!==this.ib,y=this.Wa.s,E=y.length,this.Fd(y,E,this,this.viewportBounds),b)a.Vc(!0),this.vd=!0;else if(!this.Fc&&!te.isAnimating)break e;te=this.Ab,te.reset(),ne=this.Mb,se=this.pa;var he=this.Ca,pe=Math.round(se.x*he)/he,ye=Math.round(se.y*he)/he;for(he!==1&&te.scale(he),se.x===0&&se.y===0||te.translate(-pe,-ye),a.setTransform(ne,0,0,ne,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),ph(this,a),se=0;se<E;se++)a.setTransform(ne,0,0,ne,0,0),a.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),a.yc(),y[se].gc(a,this);if(y=!1,this.Yf?Wc(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(Mr.prototype.Cd=Mr.prototype.Eu),b?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,b=xr&&xr.nx,x=this.zw,b||this.Yh===null){for(x[this.Tq]=y,this.Tq=(this.Tq+1)%x.length,E=y=0;E<x.length;E++)y+=x[E];this.Sq=y/x.length}if(this.pb!==1&&(a.globalAlpha=1),b)for(a.setTransform(1,0,0,1,0,0),b=0;b<x.length;b++)a.fillText(x[b].toString(),20,150+ +(20*b))}}};function cd(a,y,x,b,E,te,ne,se,he,pe){if(a.Ka!==null){a.ta===null&&Ot("No canvas specified"),ne===void 0&&(ne=null),se===void 0&&(se=null),he===void 0&&(he=!1),pe===void 0&&(pe=!1),Ic(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ye=a.Ca;a.Ca=E;var Te=a.Wa.s,ze=Te.length;try{var Ze=new Yt(te.x,te.y,b.width/E,b.height/E),$e=Ze.copy();$e.Co(x),Yl(a,$e),xa(a),a.Fd(Te,ze,a,Ze),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,b.width,b.height),se!==null&&se!==""&&(y.fillStyle=se,y.ox(0,0,b.width,b.height));var it=a.Mb;y.scale(it,it);var Tt=Mr.alloc();Tt.reset(),Tt.translate(x.left,x.top),Tt.scale(E),te.x===0&&te.y===0||Tt.translate(-te.x,-te.y),y.setTransform(Tt.m11,Tt.m12,Tt.m21,Tt.m22,Tt.dx,Tt.dy),y.yc(),y instanceof bs&&Yy(y,Tt.m11,Tt.m12,Tt.m21,Tt.m22,Tt.dx,Tt.dy),Mr.free(Tt),ph(a,y),y.globalAlpha=a.pb;var bt=a.Qj("Grid");if(ne){var Nt=new xn,jt=ne.iterator;for(jt.reset();jt.next();){var Bt=jt.value;Bt instanceof fr&&(pe||Bt.layer!==bt)&&(Bt.Gj(),Nt.add(Bt))}for(pe=0;pe<ze;pe++)Kg(Te[pe],y,a,Nt,he);Nt.each(function(Ht){return Ht.Gj()})}else for(Nt=0;Nt<ze;Nt++){var _t=Te[Nt];_t===bt?pe&&_t.gc(y,a,!0):_t.gc(y,a,he)}a.$i=!1,a.Yf&&Wc(a.Yf,a)&&a.Vp()}finally{a.Ca=ye,a.ib.Vc(!0),a.vd=!0,a.Fd(Te,ze,a,a.viewportBounds),Yl(a),a.ib instanceof bs&&(a.ib.Nj.PA(),a.redraw())}}}et.Gf=function(a){return this.Rg[a]},et.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},et.Tx=function(){this.Rg=new ar,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(qr||Pi),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function ph(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}et.Ql=function(a){return this.on[a]},et.sA=function(a,y){this.on[a]=y},et.Sx=function(){this.on=new ar,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},et.set=function(a){return Object.assign(this,a),this},et.Du=function(a){return this.nm(a)},et.nm=function(a){return Bc(this,a),this};function Bc(a,y){var x=a instanceof Cn,b=a instanceof Vt,E;for(E in y){E===""&&Ot("Setting properties requires non-empty property names");var te=a,ne=E;if(x||b){var se=E.indexOf(".");if(0<se){var he=E.substring(0,se);x?te=a.fb(he):(te=a[he],te==null&&(te=a.toolManager[he])),an(te)?ne=E.substr(se+1):Ot("Unable to find object named: "+he+" in "+a.toString()+" when trying to set property: "+E)}}if(ne[0]!=="_"&&!br(te,ne))if(b&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(b&&ne==="Changed"){a.Pe(y[ne]);continue}else if(b&&br(a.toolManager,ne))te=a.toolManager;else if(b&&nm(a,ne)){a.Bj(ne,y[ne]);continue}else if(a instanceof ir&&ne==="Changed"){a.Pe(y[ne]);continue}else Ot('Trying to set undefined property "'+ne+'" on object: '+te.toString());te[ne]=y[E],ne[0]==="_"&&te instanceof zt&&te.Vw(ne)}}et.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new Jt,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},et.N=function(a){if(a===void 0)this.Fc=!0,this.$b();else{var y=this.viewportBounds;a.w()&&y.Yc(a)&&(this.Fc=!0,this.$b())}this.R("InvalidateDraw")},Vt.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!==Mf&&this.rj.hi(0,0,0,0)&&y.width===a.width&&y.height===a.height){var b=this.scale,E=Math.max(a.y,y.y),te=Math.min(a.y+a.height,y.y+y.height);if(0<Math.max(0,Math.min(a.x+a.width,y.x+y.width)-Math.max(a.x,y.x))*b&&0<Math.max(0,te-E)*b){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(b=Yt.alloc(),Ap(this,this.computeBounds(b)),Yt.free(b)),b=this.ta,b===null||b instanceof Jl)))){var ne=this.Mb;E=this.Aa*ne;var se=this.ya*ne,he=this.scale*ne;te=Math.round(Math.round(y.x*he)-Math.round(a.x*he)),y=Math.round(Math.round(y.y*he)-Math.round(a.y*he)),he=this.jw,a=this.oy,he.width!==E&&(he.width=E),he.height!==se&&(he.height=se),a.clearRect(0,0,E,se),he=190*ne;var pe=70*ne,ye=Math.max(te,0),Te=Math.max(y,0),ze=Math.floor(E-ye),Ze=Math.floor(se-Te);a.drawImage(b.Oa,ye,Te,ze,Ze,0,0,ze,Ze),Wc(this.Yf,this)&&a.clearRect(0,0,he,pe),b=$n(),a=$n(),Ze=Math.abs(te),ze=Math.abs(y);var $e=ye===0?0:E-Ze;ye=lt.allocAt($e,0),Ze=lt.allocAt(Ze+$e,se),a.push(new Yt(Math.min(ye.x,Ze.x),Math.min(ye.y,Ze.y),Math.abs(ye.x-Ze.x),Math.abs(ye.y-Ze.y)));var it=this.Ab;if(it.reset(),it.scale(ne,ne),this.Ca!==1&&it.scale(this.Ca),ne=this.pa,(ne.x!==0||ne.y!==0)&&isFinite(ne.x)&&isFinite(ne.y)&&it.translate(-ne.x,-ne.y),Gn(ye,it),Gn(Ze,it),b.push(new Yt(Math.min(ye.x,Ze.x),Math.min(ye.y,Ze.y),Math.abs(ye.x-Ze.x),Math.abs(ye.y-Ze.y))),$e=Te===0?0:se-ze,ye.h(0,$e),Ze.h(E,ze+$e),a.push(new Yt(Math.min(ye.x,Ze.x),Math.min(ye.y,Ze.y),Math.abs(ye.x-Ze.x),Math.abs(ye.y-Ze.y))),Gn(ye,it),Gn(Ze,it),b.push(new Yt(Math.min(ye.x,Ze.x),Math.min(ye.y,Ze.y),Math.abs(ye.x-Ze.x),Math.abs(ye.y-Ze.y))),Wc(this.Yf,this)&&(E=0<te?0:-te,se=0<y?0:-y,ye.h(E,se),Ze.h(he+E,pe+se),a.push(new Yt(Math.min(ye.x,Ze.x),Math.min(ye.y,Ze.y),Math.abs(ye.x-Ze.x),Math.abs(ye.y-Ze.y))),Gn(ye,it),Gn(Ze,it),b.push(new Yt(Math.min(ye.x,Ze.x),Math.min(ye.y,Ze.y),Math.abs(ye.x-Ze.x),Math.abs(ye.y-Ze.y)))),lt.free(ye),lt.free(Ze),$h(this,!1,!0),this.Ka===null&&Ot("No div specified"),this.ta===null&&Ot("No canvas specified"),!this.animationManager.zb&&(E=this.ib,this.Fc)){for(Ic(this),se=this.Mb,E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,this.Aa*se,this.ya*se),E.drawImage(this.jw.Oa,0<te?0:Math.round(-te),0<y?0:Math.round(-y)),te=this.pa,ne=this.Ca,he=Math.round(te.x*ne)/ne,pe=Math.round(te.y*ne)/ne,y=this.Ab,y.reset(),ne!==1&&y.scale(ne),te.x===0&&te.y===0||y.translate(-he,-pe),E.save(),E.beginPath(),te=a.length,ne=0;ne<te;ne++)he=a[ne],he.width!==0&&he.height!==0&&E.rect(Math.floor(he.x),Math.floor(he.y),Math.ceil(he.width),Math.ceil(he.height));for(E.clip(),E.setTransform(se,0,0,se,0,0),E.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),E.yc(),y=this.Wa.s,te=y.length,this.Fd(y,te,this,this.viewportBounds),ph(this,E),E.globalAlpha=this.pb,se=0;se<te;se++)if(ne=y[se],he=b,ne.visible&&ne.pb!==0){pe=Gu(ne,E),Te=ne.Zq,Te.length=0,ye=this.scale,ze=Yt.alloc(),Ze=ne.Pa.s,it=Ze.length,$e=he.length;for(var Tt=0;Tt<it;Tt++){var bt=Ze[Tt],Nt=$c(bt,bt.actualBounds);e:{for(var jt=2/ye,Bt=4/ye,_t=0;_t<$e;_t++){var Ht=he[_t];if(Ht.width!==0&&Ht.height!==0&&Nt.Vu(Ht.x-jt,Ht.y-jt,Ht.width+Bt,Ht.height+Bt)){Nt=!0;break e}}Nt=!1}Nt&&ne.Oj(E,bt,this,Te,ye,ze,!0)}Yt.free(ze),E.globalAlpha=pe}E.restore(),E.Vc(!0),this.Yf&&Wc(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}Wn(b),Wn(a),this.ld=!1}}else this.bd();x&&(as(this),this.bd(),Pf(this,!0))}else x?(as(this),this.bd(),Pf(this,!0)):this.bd()}};function Ic(a){a.pn!==!1&&(a.pn=!1,Cp(a,a.Aa,a.ya))}function Cp(a,y,x){$l(a);var b=a.Mb;a.ta.resize(y*b,x*b,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function Rc(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,b=a.ya,E=a.Ka,te=!1,ne=a.gf?a.Db:0,se=a.Be?a.Db:0,he=E.clientWidth||x+ne,pe=E.clientHeight||b+se,ye=a.viewportBounds;E=ye.x;var Te=ye.y,ze=ye.width,Ze=ye.height;if((he!==x+ne||pe!==b+se)&&(a.gf=!1,a.Be=!1,se=ne=0,a.Aa=he,a.ya=pe,te=a.pn=!0,$l(a)),!a.hf||!a.viewportBounds.w())return!0;var $e=a.ku,it=a.hu;if(a.Ee=!1,!(te||a.gf||a.Be||a.mn||a.nn))return!0;var Tt=a.documentBounds,bt=0,Nt=0,jt=0,Bt=0,_t=ye.width,Ht=ye.height,Fn=a.rj;a.contentAlignment.sb()?(Tt.width>_t&&(bt=Fn.left,Nt=Fn.right),Tt.height>Ht&&(jt=Fn.top,Bt=Fn.bottom)):(bt=Fn.left,Nt=Fn.right,jt=Fn.top,Bt=Fn.bottom);var Jn=Tt.width+bt+Nt,Zn=Tt.height+jt+Bt;Fn=a.scale;var kn=Jn>he/Fn,cn=Zn>pe/Fn;if(!(te||a.gf||a.Be||kn||cn))return!0;bt=Tt.x-bt,he=ye.x,Nt=Tt.right+Nt,pe=ye.right+ne,jt=Tt.y-jt;var Ar=ye.y;Tt=Tt.bottom+Bt,ye=ye.bottom+se;var Cr="1px";if(Bt="1px",a.scrollMode===mh&&(kn||cn)&&(kn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(kn=1,bt+1<he&&(kn=Math.max((he-bt)*Fn+a.Aa,kn)),Nt>pe+1&&(kn=Math.max((Nt-pe)*Fn+a.Aa,kn)),_t+ne+1<Jn&&(kn=Math.max((Jn-_t)*Fn+a.Aa,kn)),Cr=kn.toString()+"px"),cn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(kn=1,jt+1<Ar&&(kn=Math.max((Ar-jt)*Fn+a.ya,kn)),Tt>ye+1&&(kn=Math.max((Tt-ye)*Fn+a.ya,kn)),Ht+se+1<Zn&&(kn=Math.max((Zn-Ht)*Fn+a.ya,kn)),Bt=kn.toString()+"px")),kn=Cr!=="1px",cn=Bt!=="1px",kn&&cn||!kn&&!cn||(cn&&(pe-=a.Db),kn&&(ye-=a.Db),Jn<_t+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,bt+1<he&&(ne=Math.max((he-bt)*Fn+a.Aa,ne)),Nt>pe+1&&(ne=Math.max((Nt-pe)*Fn+a.Aa,ne)),_t+1<Jn&&(ne=Math.max((Jn-_t)*Fn+a.Aa,ne)),Cr=ne.toString()+"px"),kn=Cr!=="1px",ne=a.ya,kn!==a.Be&&(ne=kn?a.ya-a.Db:a.ya+a.Db),Zn<Ht+se||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(se=1,jt+1<Ar&&(se=Math.max((Ar-jt)*Fn+ne,se)),Tt>ye+1&&(se=Math.max((Tt-ye)*Fn+ne,se)),Ht+1<Zn&&(se=Math.max((Zn-Ht)*Fn+ne,se)),Bt=se.toString()+"px"),cn=Bt!=="1px"),a.qr&&kn===a.Be&&cn===a.gf)return x===a.Aa&&b===a.ya||a.bd(),!1;if(kn!==a.Be&&(Cr==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),te=!0),a.Be=kn,it.style.width=Cr,cn!==a.gf&&(Bt==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),te=!0,a.tn&&(se=lt.alloc(),cn?(y.style.left=a.Db+"px",a.position=se.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=se.h(a.pa.x-a.Db/a.scale,a.pa.y)),lt.free(se))),te&&$l(a),a.gf=cn,it.style.height=Bt,a.gu=!0,te&&(a.pn=!0),y=$e.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(_t+1<Jn?y=(a.position.x-bt)*Fn:bt+1<he?y=$e.scrollWidth-$e.clientWidth:Nt>pe+1&&(y=a.position.x*Fn)),a.tn)switch(a.bu){case"negative":y=-($e.scrollWidth-y-$e.clientWidth);break;case"reverse":y=$e.scrollWidth-y-$e.clientWidth}return $e.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Ht+1<Zn?$e.scrollTop=(a.position.y-jt)*Fn:jt+1<Ar?$e.scrollTop=$e.scrollHeight-$e.clientHeight:Tt>ye+1&&($e.scrollTop=a.position.y*Fn)),he=a.Aa,pe=a.ya,$e.style.width=he+(a.gf?a.Db:0)+"px",$e.style.height=pe+(a.Be?a.Db:0)+"px",x!==he||b!==pe||a.animationManager.zb?(x=Yt.allocAt(E,Te,ze,Ze),a.onViewportBoundsChanged(x,a.viewportBounds,Fn,te),Yt.free(x),!1):!0}et=Vt.prototype,et.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Ot("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&&Ot('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(Po,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},et.oi=function(a){this.partManager.oi(a);var y=this;Zc(a,function(x){_c(y,x)}),(a instanceof di||a instanceof jr&&a.placeholder!==null)&&a.v(),a.data!==null&&Zc(a,function(x){ly(y.partManager,x)}),Xa(a)!==!0&&rc(a)!==!0||this.De.add(a),R1(a,!0,this),z1(a)?(a.actualBounds.w()&&this.N($c(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N($c(a,a.actualBounds)),this.$b()},et.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Zc(a,function(x){uy(y.partManager,x,y)}),this.De.remove(a),z1(a)?(a.actualBounds.w()&&this.N($c(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N($c(a,a.actualBounds)),this.$b()},et.remove=function(a){Ep(this,a,!0)};function Ep(a,y,x){var b=y.layer;b!==null&&b.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=b.pc(-1,y,!1),0<=x&&a.cb(Eo,"parts",b,y,null,x,null),a=y.layerChanged,a!==null&&a(y,b,null))}et.Is=function(a,y){if(y===void 0&&(y=!1),Un(a))for(var x=a.length,b=0;b<x;b++){var E=a[b];y&&!E.canDelete()||this.remove(E)}else for(x=new xn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},et.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},Vt.prototype.moveParts=function(a,y,x,b){if(x===void 0&&(x=!1),b===void 0&&(b=fd(this)),this.toolManager!==null){var E=new Jt;if(a!==null)if(Un(a))for(var te=0;te<a.length;te++)du(this,E,a[te],x,b);else for(a=a.iterator;a.next();)du(this,E,a.value,x,b);else{for(a=this.parts;a.next();)du(this,E,a.value,x,b);for(a=this.nodes;a.next();)du(this,E,a.value,x,b);for(a=this.links;a.next();)du(this,E,a.value,x,b)}Jh(this,E,y,b,x)}};function du(a,y,x,b,E,te){if(!y.contains(x)&&(te===void 0&&(te=!1),!b||te||x.canMove()||x.canCopy()))if(E===void 0&&(E=fd(a)),x instanceof Rn){if(y.add(x,a.Pd(E,x,x.location)),x instanceof jr&&(x.placeholder!==null||E.dragsMembers))for(te=x.memberParts;te.next();)du(a,y,te.value,b,E,E.groupsAlwaysMove);for(te=x.linksConnected;te.next();){var ne=te.value;if(!y.contains(ne)){var se=ne.fromNode,he=ne.toNode;se!==null&&y.contains(se)&&he!==null&&y.contains(he)&&du(a,y,ne,b,E)}}if(E.dragsTree)for(x=x.Ou();x.next();)du(a,y,x.value,b,E)}else if(x instanceof Tn)for(y.add(x,a.Pd(E,x)),x=x.labelNodes;x.next();)du(a,y,x.value,b,E);else x instanceof di||y.add(x,a.Pd(E,x,x.location))}function Jh(a,y,x,b,E){if(y!==null&&y.count!==0){var te=lt.alloc(),ne=lt.alloc();ne.assign(x),isNaN(ne.x)&&(ne.x=0),isNaN(ne.y)&&(ne.y=0),(x=a.Mr)||pd(a,y);for(var se=$n(),he=$n(),pe=y.iterator,ye=lt.alloc();pe.next();){var Te=pe.key,ze=pe.value;if(Te.Zc()){var Ze=kp(a,Te,y);Ze!==null?se.push(new re(Te,ze,Ze)):(!E||Te.canMove())&&(Ze=ze.point,te.assign(Ze),a.computeMove(Te,te.add(ne),b,ye),Te.location=ye,ze.shifted===void 0&&(ze.shifted=new lt),ze.shifted.assign(ye.re(Ze)))}else pe.key instanceof Tn&&he.push(pe.sa)}for(lt.free(ye),E=se.length,pe=0;pe<E;pe++)Te=se[pe],te.assign(Te.info.point),Te.Su.shifted===void 0&&(Te.Su.shifted=new lt),Te.node.location=te.add(Te.Su.shifted);for(E=lt.alloc(),pe=lt.alloc(),Te=he.length,ze=0;ze<Te;ze++){var $e=he[ze];if(Ze=$e.key,Ze instanceof Tn)if(Ze.suspendsRouting){Ze.Tg=null,ye=Ze.fromNode;var it=Ze.toNode;if(a.draggedLink!==null&&b.dragsLink)if(it=$e.value.point,Ze.dragComputation===null)y.add(Ze,a.Pd(b,Ze,ne)),Ch(Ze,ne.x-it.x,ne.y-it.y);else{$e=lt.allocAt(0,0),(ye=Ze.i(0))&&ye.w()&&$e.assign(ye);var Tt=ye=lt.alloc().assign($e).add(ne);b.isGridSnapEnabled&&(b.isGridSnapRealtime||a.lastInput.up)&&(Tt=lt.alloc(),dd(a,Ze,ye,Tt,b)),ye.assign(Ze.dragComputation(Ze,ye,Tt)).re($e),y.add(Ze,a.Pd(b,Ze,ye)),Ch(Ze,ye.x-it.x,ye.y-it.y),lt.free($e),lt.free(ye),Tt!==ye&&lt.free(Tt)}else ye!==null&&(E.assign(ye.location),Tt=y.I(ye),Tt!==null&&E.re(Tt.point)),it!==null&&(pe.assign(it.location),Tt=y.I(it),Tt!==null&&pe.re(Tt.point)),ye!==null&&it!==null?E.Xa(pe)?(ye=$e.value.point,it=te,it.assign(E),it.re(ye),y.add(Ze,a.Pd(b,Ze,E)),Ch(Ze,it.x,it.y)):(Ze.suspendsRouting=!1,Ze.bb()):($e=$e.value.point,ye=ye!==null?E:it!==null?pe:ne,y.add(Ze,a.Pd(b,Ze,ye)),Ch(Ze,ye.x-$e.x,ye.y-$e.y))}else(Ze.fromNode===null||Ze.toNode===null)&&(ye=$e.value.point,y.add(Ze,a.Pd(b,Ze,ne)),Ch(Ze,ne.x-ye.x,ne.y-ye.y))}lt.free(te),lt.free(ne),lt.free(E),lt.free(pe),Wn(se),Wn(he),x||(xa(a),Qh(a,y))}}Vt.prototype.computeMove=function(a,y,x,b){if(b===void 0&&(b=new lt),b.assign(y),a===null)return b;var E=y,te=x.isGridSnapEnabled;te&&(x.isGridSnapRealtime||this.lastInput.up)&&(E=lt.alloc(),dd(this,a,y,E,x)),x=a.dragComputation!==null?a.dragComputation(a,y,E):E;var ne=a.minLocation,se=ne.x;isNaN(se)&&(se=te?Math.round(1e3*a.location.x)/1e3:a.location.x),ne=ne.y,isNaN(ne)&&(ne=te?Math.round(1e3*a.location.y)/1e3:a.location.y);var he=a.maxLocation,pe=he.x;return isNaN(pe)&&(pe=te?Math.round(1e3*a.location.x)/1e3:a.location.x),he=he.y,isNaN(he)&&(he=te?Math.round(1e3*a.location.y)/1e3:a.location.y),b.h(Math.max(se,Math.min(x.x,pe)),Math.max(ne,Math.min(x.y,he))),E!==y&&lt.free(E),b};function fd(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function dd(a,y,x,b,E){if(E===void 0&&(E=fd(a)),b.assign(x),y!==null){var te=a.grid;y=E.gridSnapCellSize,a=y.width,y=y.height;var ne=E.gridSnapOrigin,se=ne.x;if(ne=ne.y,E=E.gridSnapCellSpot,te!==null){var he=te.gridCellSize;isNaN(a)&&(a=he.width),isNaN(y)&&(y=he.height),te=te.gridOrigin,isNaN(se)&&(se=te.x),isNaN(ne)&&(ne=te.y)}te=lt.allocAt(0,0),te.yi(0,0,a,y,E),Gt.No(x.x,x.y,se+te.x,ne+te.y,a,y,b),lt.free(te)}}function pd(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Tn&&(y.suspendsRouting=!0)}function Qh(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Tn&&(x.suspendsRouting=!1,Xv(x)&&x.bb())}a.Mr=!1}}function kp(a,y,x){return y=y.containingGroup,y!==null&&(a=kp(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}et=Vt.prototype,et.Pd=function(a,y,x){if(x===void 0)return new Uu(Bn);var b=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(b=!1),b?new Uu(new lt(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new Uu(x.copy())};function Tp(a,y,x){if(y.diagram!==null&&y.diagram!==a&&Ot("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Ot("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Ot("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Ot("Cannot move a Layer before or after itself: "+y)),y.diagram!==a){y=y.name,a=a.Wa,x=a.count;for(var b=0;b<x;b++)a.M(b).name===y&&Ot("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}et.Al=function(a){Tp(this,a,null),a.Xe(this);var y=this.Wa,x=y.count-1;if(!a.isTemporary)for(;0<=x&&y.M(x).isTemporary;)x--;return y.Gb(x+1,a),this.cc!==null&&this.cb(Po,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},et.Ww=function(a,y){Tp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(Eo,"layers",this,a,null,b,null));var E=x.count,te;for(te=0;te<E;te++)if(x.M(te)===y){x.Gb(te,a);break}return this.cc!==null&&this.cb(Po,"layers",this,null,a,null,te),this.N(),0>b&&this.Ya(),this},et.Cy=function(a,y){Tp(this,a,y),a.Xe(this);var x=this.Wa,b=x.indexOf(a);0<=b&&(x.remove(a),this.cc!==null&&this.cb(Eo,"layers",this,a,null,b,null));var E=x.count,te;for(te=0;te<E;te++)if(x.M(te)===y){x.Gb(te+1,a);break}return this.cc!==null&&this.cb(Po,"layers",this,null,a,null,te+1),this.N(),0>b&&this.Ya(),this},et.kA=function(a){if(a.diagram!==this&&Ot("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram),a.name!==""){var y=this.Wa,x=y.indexOf(a);if(y.remove(a)){for(y=a.Pa.copy().iterator;y.next();){var b=y.value,E=b.layerName;E!==a.name?b.layerName=E:b.layerName=""}this.cc!==null&&this.cb(Eo,"layers",this,a,null,x,null),this.N(),this.Ya()}}},et.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},et.Yw=function(a){return this.pf===null&&(this.pf=new yn),this.pf.add(a),this.model.Pe(a),this},et.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},et.Pe=function(a){return this.zg===null&&(this.zg=new yn),this.zg.add(a),this},et.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},et.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==Ea&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,b=0;b<x;b++)y.M(b)(a)},et.cb=function(a,y,x,b,E,te,ne){te===void 0&&(te=null),ne===void 0&&(ne=null);var se=new oo;se.diagram=this,se.change=a,se.propertyName=y,se.object=x,se.oldValue=b,se.oldParam=te,se.newValue=E,se.newParam=ne,this.ds(se)},et.g=function(a,y,x,b,E){this.cb(to,a,this,y,x,b,E)},Vt.prototype.changeState=function(a,y){if(a!==null&&a.diagram===this){var x=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var b=a.change;if(b===to){var E=a.object;if(no(E,a.propertyName,a.I(y)),E instanceof zt){var te=E.part;te!==null&&te.Wb()}this.isModified=!0}else if(b===Po){var ne=a.object,se=a.newParam,he=a.newValue;if(ne instanceof Cn)if(typeof se=="number"&&he instanceof zt){y?ne.pc(se):ne.Gb(se,he);var pe=ne.part;pe!==null&&pe.Wb()}else typeof se=="number"&&he instanceof Io&&(he.isRow?c1(ne,se,y?void 0:he):f1(ne,se,y?void 0:he));else if(ne instanceof ra){var ye=a.oldParam===!0;typeof se=="number"&&he instanceof fr&&(y?(he.isSelected=!1,he.isHighlighted=!1,he.Wb(),ne.pc(ye?se:-1,he,ye)):ne.oi(se,he,ye))}else ne instanceof Vt?typeof se=="number"&&he instanceof ra&&(y?this.Wa.mb(se):(he.Xe(this),this.Wa.Gb(se,he))):Ot("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(b===Eo){var Te=a.object,ze=a.oldParam,Ze=a.oldValue;if(Te instanceof Cn)typeof ze=="number"&&Ze instanceof zt?y?Te.Gb(ze,Ze):Te.pc(ze):typeof ze=="number"&&Ze instanceof Io&&(Ze.isRow?c1(Te,ze,y?Ze:void 0):f1(Te,ze,y?Ze:void 0));else if(Te instanceof ra){var $e=a.newParam===!0;typeof ze=="number"&&Ze instanceof fr&&(y?0>Te.Pa.indexOf(Ze)&&Te.oi(ze,Ze,$e):(Ze.isSelected=!1,Ze.isHighlighted=!1,Ze.Wb(),Te.pc($e?ze:-1,Ze,$e)))}else Te instanceof Vt?typeof ze=="number"&&Ze instanceof ra&&(y?(Ze.Xe(this),this.Wa.Gb(ze,Ze)):this.Wa.mb(ze)):Ot("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else b!==Ea&&Ot("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},Vt.prototype.Ea=function(a){return this.undoManager.Ea(a)},Vt.prototype.eb=function(a){return this.undoManager.eb(a)},Vt.prototype.Kf=function(){return this.undoManager.Kf()},Vt.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var b=!1;try{a(this),b=!0}finally{b?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Vt.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},Vt.prototype.rp=function(){this.partManager.rp()};function Mp(a,y,x){var b=a.animationManager;if(a.vb||a.ld)a.Ca=x,$l(a),a.N(),a.Ee=!0,b.zb&&(_u(b)||b.ce.add(b.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,$l(a);else{a.vb=!0;var E=a.viewportBounds.copy(),te=a.Aa,ne=a.ya,se=a.zoomPoint.x,he=a.zoomPoint.y,pe=a.contentAlignment;isNaN(se)&&(pe.$c()?pe.Hf(is)?se=0:pe.Hf(fo)&&(se=te-1):se=pe.sb()?pe.x*(te-1):te/2),isNaN(he)&&(pe.$c()?pe.Hf(ba)?he=0:pe.Hf(os)&&(he=ne-1):he=pe.sb()?pe.y*(ne-1):ne/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),x<a.minScale&&(x=a.minScale),x>a.maxScale&&(x=a.maxScale),te=lt.allocAt(a.pa.x+se/y-se/x,a.pa.y+he/y-he/x),a.position=te,lt.free(te),a.Ca=x,$l(a),a.vb=!1,a.onViewportBoundsChanged(E,a.viewportBounds,y,!1),al(a,!1),b.zb&&(_u(b)||b.ce.add(b.H,"scale",y,a.Ca))}}Vt.prototype.onViewportBoundsChanged=function(a,y,x,b){if(!a.D(y)){b===void 0&&(b=!1),b||(this.Ee=!0),this.vd=!0;var E=this.layout;E===null||!E.isViewportSized||this.autoScale!==Ba||a.width===y.width&&a.height===y.height||E.C(),E=this.currentTool,this.Vk===!0&&E instanceof Xi&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Cc(E,this)),this.vb||this.invalidateViewport(a,y),Yl(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.canvasSize.width=Math.round(a.width*x),this.fc.canvasSize.height=Math.round(a.height*x),this.fc.newCanvasSize.width=this.Aa,this.fc.newCanvasSize.height=this.ya,this.fc.isScroll=b,this.R("ViewportBoundsChanged",this.fc,a),this.isVirtualized&&this.links.each(function(te){te.isAvoiding&&te.actualBounds.Yc(y)&&te.bb()})}};function Yl(a,y){var x=a.fe;if(x!==null&&x.visible){for(var b=fn.alloc(),E=1,te=1,ne=x.O.s,se=ne.length,he=0;he<se;he++){var pe=ne[he],ye=Math.abs(pe.interval);2>ye||(mv(pe.figure)?te=te*ye/Gt.vx(te,ye):E=E*ye/Gt.vx(E,ye))}if(ne=x.gridCellSize,b.h(te*ne.width,E*ne.height),y!==void 0)E=y.width,te=y.height,a=y.x,ne=y.y;else{if(y=Yt.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){Yt.free(y);return}E=y.width,te=y.height,a=y.x,ne=y.y,Yt.free(y)}x.width=E+2*b.width,x.height=te+2*b.height,y=lt.alloc(),Gt.No(a,ne,0,0,b.width,b.height,y),y.offset(-b.width,-b.height),fn.free(b),x.part.location=y,lt.free(y)}}Vt.prototype.clearSelection=function(a){a===void 0&&(a=!1);var y=this.selection;if(y.count!==0){a||this.R("ChangingSelection",y);for(var x=y.Fa(),b=x.length,E=0;E<b;E++)x[E].isSelected=!1;y.ka(),y.clear(),y.freeze(),a||this.R("ChangedSelection",y)}},Vt.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))},Vt.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),Un(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];b instanceof fr||Ot("Diagram.selectCollection given something that is not a Part: "+b),b.isSelected=!0}else for(a=a.iterator;a.next();)y=a.value,y instanceof fr||Ot("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},Vt.prototype.clearHighlighteds=function(){var a=this.highlighteds;if(0<a.count){for(var y=a.Fa(),x=y.length,b=0;b<x;b++)y[b].isHighlighted=!1;a.ka(),a.clear(),a.freeze()}},et=Vt.prototype,et.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},et.Jz=function(a){a=new xn().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 fr||Ot("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},et.scroll=function(a,y,x){x===void 0&&(x=1);var b=y==="up"||y==="down",E=0,te=lt.alloc();if(a==="pixel")E=x;else if(a==="line")E=x*(b?this.scrollVerticalLineChange:this.scrollHorizontalLineChange);else if(a==="page")a=b?this.viewportBounds.height:this.viewportBounds.width,a*=this.scale,a!==0&&(E=x*Math.max(a-(b?this.scrollVerticalLineChange:this.scrollHorizontalLineChange),0));else{if(a==="document"){E=this.documentBounds,x=this.viewportBounds,y==="up"?this.position=te.h(x.x,E.y):y==="left"?this.position=te.h(E.x,x.y):y==="down"?this.position=te.h(x.x,E.bottom-x.height):y==="right"&&(this.position=te.h(E.right-x.width,x.y)),lt.free(te);return}Ot("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}E/=this.scale,x=this.position,y==="up"?this.position=te.h(x.x,x.y-E):y==="down"?this.position=te.h(x.x,x.y+E):y==="left"?this.position=te.h(x.x-E,x.y):y==="right"?this.position=te.h(x.x+E,x.y):Ot("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),lt.free(te)},et.tv=function(a){var y=this.viewportBounds;y.Re(a)||(a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a)},et.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},et.op=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),a.copy().transform(this.Ab)},et.zA=function(a){var y=this.Ab,x=a.x,b=a.y,E=x+a.width,te=b+a.height,ne=y.m11,se=y.m12,he=y.m21,pe=y.m22,ye=y.dx,Te=y.dy,ze=x*ne+b*he+ye;y=x*se+b*pe+Te;var Ze=E*ne+b*he+ye;return a=E*se+b*pe+Te,b=x*ne+te*he+ye,x=x*se+te*pe+Te,ne=E*ne+te*he+ye,E=E*se+te*pe+Te,te=Math.min(ze,Ze),ze=Math.max(ze,Ze),Ze=Math.min(y,a),y=Math.max(y,a),te=Math.min(te,b),ze=Math.max(ze,b),Ze=Math.min(Ze,x),y=Math.max(y,x),te=Math.min(te,ne),ze=Math.max(ze,ne),Ze=Math.min(Ze,E),y=Math.max(y,E),new Yt(te,Ze,ze-te,y-Ze)},et.Ps=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),Gn(a.copy(),this.Ab)};function em(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Lp(a){return a=xd.get(a),a!==null?new a:new Mi}Vt.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,b=a.propertyName;if(x===Ea&&b[0]==="S")if(b==="StartingFirstTransaction"){var E=this;a=this.toolManager,a.mouseDownTools.each(function(he){return he.diagram=E}),a.mouseMoveTools.each(function(he){return he.diagram=E}),a.mouseUpTools.each(function(he){return he.diagram=E}),this.ld||this.hf||(this.Jk=!0,this.fn&&(this.kg=!0))}else b==="StartingUndo"||b==="StartingRedo"?(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc(),this.R("ChangingSelection",this.selection)):b==="StartedTransaction"&&(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc());else if(this.aa){this.aa=!1;try{if(a.modelChange===""&&x===Ea){(b==="FinishedUndo"||b==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),xa(this));var te=this.animationManager;b==="RolledBackTransaction"&&te.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||od(te),b==="CommittedTransaction"&&this.undoManager.isJustDiscarded&&(this.Ce=Math.min(this.Ce,this.undoManager.historyIndex-1)),b!=="CommittedTransaction"&&b!=="RolledBackTransaction"||!this.undoManager.isPendingUnmodified||setTimeout(function(){y.isModified=!1},1);var ne=a.isTransactionFinished;if(ne&&(em(this),this.As.clear(),Gg(this.animationManager)),!this.Rt&&ne&&this.lastInput.targetDiagram){this.Rt=!0;var se=this;qt(function(){se.currentTool.standardMouseOver(),se.Rt=!1},10)}}}finally{this.aa=!0}}}};function _c(a,y){y=y.O.s;for(var x=y.length,b=0;b<x;b++)qh(a,y[b])}function qh(a,y){if(y instanceof hs){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof xn&&x.Bg.add(a);var b=y.Eg;if(b!==null&&b.sq===!0&&y.diagram!==null&&y.diagram.Xn.add(y),x.hn)if(x=x.getAttribute("src")||"",b=a.Og.I(x),b===null)b=[],b.push(y),a.Og.add(x,b);else{for(a=0;a<b.length;a++)if(b[a]===y)return;b.push(y)}}}}function Np(a,y){if(y instanceof hs){var x=y.element;if(x!==null&&x instanceof HTMLImageElement&&x.hn){var b=x.getAttribute("src")||"",E=a.Og.I(b);if(E!==null){for(var te=0;te<E.length;te++)if(E[te]===y){E.splice(te,1),E.length===0&&(a.Og.remove(b),x.Fq&&x.removeEventListener("load",x.Fq),x.Yp&&x.removeEventListener("error",x.Yp),delete x.Fq,delete x.Yp,x.Bg instanceof xn&&x.Bg.remove(a),Od(b));break}}}}}Vt.prototype.Wd=function(){this.partManager.Wd()},Vt.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},Vt.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},Vt.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},Vt.prototype.Vb=function(a){return this.partManager.Vb(a)},Vt.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},et=Vt.prototype,et.Lc=function(a){return this.partManager.Lc(a)},et.ii=function(a){return this.partManager.ii(a)},et.Kc=function(a){return this.partManager.Kc(a)},et.ms=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ms.apply(this.partManager,y instanceof Array?y:Ei(vr(y)))},et.ls=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ls.apply(this.partManager,y instanceof Array?y:Ei(vr(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 Ap(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),al(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}et.Va=function(){if(this.Zi){var a=Yt.alloc();Ap(this,this.computeBounds(a)),Yt.free(a)}},et.rz=function(){for(var a=new xn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&a.add(x)}for(y=this.links;y.next();)x=y.value,x.isTopLevel&&a.add(x);return a.iterator},et.qz=function(){return this.ai.iterator},et.Uz=function(a){xa(this),a&&gd(this,!0),this.ld?jp(this,!1):(this.Jk=!0,Ks(this))};function gd(a,y){for(var x=a.ai.iterator;x.next();)tm(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function tm(a,y,x){if(y!==null){for(var b=y.gl.iterator;b.next();)tm(a,b.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function jp(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var b=a.undoManager.transactionLevel,E=a.layout,te=a.animationManager;try{b===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=b&&!te.defaultAnimation.isAnimating&&!te.zb&&(y||hu(te,"Layout")),a.xh=!1;for(var ne=a.ai.iterator;ne.next();)Op(a,ne.value,y,b);E.isValidLayout||(!y||E.isRealtime||E.isRealtime===null||b===0?(E.doLayout(a),xa(a),E.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,b===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||b!==0&&b!==1||od(te),a.aa=x}}}function Op(a,y,x,b){if(y!==null){for(var E=y.gl.iterator;E.next();)Op(a,E.value,x,b);E=y.layout,E===null||E.isValidLayout||(!x||E.isRealtime||b===0?(y.rh=!y.location.w(),E.doLayout(y),y.C(32),Ef(a,y),E.isValidLayout=!0):a.xh=!0)}}et.yz=function(){for(var a=new yn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function nv(a){function y(E){var te=E.toLowerCase(),ne=new yn;x.add(E,ne),x.add(te,ne),b.add(E,E),b.add(te,E)}var x=new Jt,b=new Jt;y("InitialAnimationStarting"),y("AnimationStarting"),y("AnimationFinished"),y("BackgroundSingleClicked"),y("BackgroundDoubleClicked"),y("BackgroundContextClicked"),y("ClipboardChanged"),y("ClipboardPasted"),y("DocumentBoundsChanged"),y("ExternalObjectsDropped"),y("GainedFocus"),y("InitialLayoutCompleted"),y("LayoutCompleted"),y("LinkDrawn"),y("LinkRelinked"),y("LinkReshaped"),y("LostFocus"),y("Modified"),y("ObjectSingleClicked"),y("ObjectDoubleClicked"),y("ObjectContextClicked"),y("PartCreated"),y("PartResized"),y("PartRotated"),y("SelectionMoved"),y("SelectionCopied"),y("SelectionDeleting"),y("SelectionDeleted"),y("SelectionGrouped"),y("SelectionUngrouped"),y("ChangingSelection"),y("ChangedSelection"),y("SubGraphCollapsed"),y("SubGraphExpanded"),y("TextEdited"),y("TreeCollapsed"),y("TreeExpanded"),y("ViewportBoundsChanged"),y("InvalidateDraw"),a.iw=x,a.hw=b}function nm(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function md(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;Ot("Unknown DiagramEvent name: "+y)}et.Bj=function(a,y){return a=md(this,a),a!==null&&a.add(y),this},et.am=function(a,y){a=md(this,a),a!==null&&a.remove(y)},et.R=function(a,y,x){var b=md(this,a),E=new au;if(E.diagram=this,a=nm(this,a),a!==null&&(E.name=a),y!==void 0&&(E.subject=y),x!==void 0&&(E.parameter=x),y=b.length,y===1)b.M(0)(E);else if(y!==0)for(b=b.Fa(),x=0;x<y;x++)(0,b[x])(E)};function vd(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}et.Yj=function(a,y){return yd(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},Vt.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?yp(this,a):a.assign(this.documentBounds)};function yd(a,y,x,b){var E=a.Xh;if(E===null&&(a.Xh=E=new lg(a.avoidanceCellSize)),E.vs||E.group!==x||E.Yx!==b){if(E.Hx=Math.max(E.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.width)),E.Ix=Math.max(E.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.height)),x!==null&&(x=rm(a,x)),x===null){y=Yt.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),E.initialize(y);for(var te=a.nodes;te.next();){var ne=te.value,se=ne.layer;se!==null&&se.visible&&!se.isTemporary&&Sd(a,ne,b,y)}Yt.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),E.initialize(y)),y=Yt.alloc(),te=x.memberParts;te.next();)ne=te.value,ne instanceof Rn&&Sd(a,ne,b,y);Yt.free(y)}E.group=x,E.Yx=b,E.vs=!1}else y&&oS(E);return E}function rm(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?rm(a,y.containingGroup):null}function Sd(a,y,x,b){if(y!==x&&y.isVisible()){if(y.avoidable&&!y.isLinkLabel){y=y.getAvoidableRect(b),a=a.Xh;var E=y.x,te=y.y;if(_d(a,E,te))for(x=(te-a.Od)/a.sc|0,b=Math.min((E+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((te+y.height-a.Od)/a.sc|0,a.ei),E=(E-a.Nd)/a.rc|0;E<=b;E++)if(te=a.ac[E],te.fill)te.fill(kh,x,y+1);else for(var ne=x;ne<=y;ne++)te[ne]=kh}else if(y instanceof jr)for(y=y.memberParts;y.next();)E=y.value,E instanceof Rn&&Sd(a,E,x,b)}}function gh(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}Vt.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():Fp(this)};function Fp(a){a.vk===-1&&(a.vk=qt(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=Yt.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Ap(a,y),Yt.free(y),a.Fc=!0,a.bd(),Fp(a))}},a.vp))}Vt.prototype.ug=function(){this.vk!==-1&&(An.clearTimeout(this.vk),this.vk=-1)},Vt.prototype.computeAutoScrollPosition=function(a){var y=this.position,x=this.xp;if(0>=x.top&&0>=x.left&&0>=x.right&&0>=x.bottom)return y;var b=this.viewportBounds,E=this.scale;b=Yt.allocAt(0,0,b.width*E,b.height*E);var te=lt.allocAt(0,0);if(a.x>=b.x&&a.x<b.x+x.left&&this.allowHorizontalScroll){var ne=Math.max(this.scrollHorizontalLineChange,1);ne|=0,te.x-=ne,a.x<b.x+x.left/2&&(te.x-=ne),a.x<b.x+x.left/4&&(te.x-=4*ne)}else a.x<=b.x+b.width&&a.x>b.x+b.width-x.right&&this.allowHorizontalScroll&&(ne=Math.max(this.scrollHorizontalLineChange,1),ne|=0,te.x+=ne,a.x>b.x+b.width-x.right/2&&(te.x+=ne),a.x>b.x+b.width-x.right/4&&(te.x+=4*ne));return a.y>=b.y&&a.y<b.y+x.top&&this.allowVerticalScroll?(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,te.y-=ne,a.y<b.y+x.top/2&&(te.y-=ne),a.y<b.y+x.top/4&&(te.y-=4*ne)):a.y<=b.y+b.height&&a.y>b.y+b.height-x.bottom&&this.allowVerticalScroll&&(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,te.y+=ne,a.y>b.y+b.height-x.bottom/2&&(te.y+=ne),a.y>b.y+b.height-x.bottom/4&&(te.y+=4*ne)),te.Xa(Bn)||(y=new lt(y.x+te.x/E,y.y+te.y/E)),Yt.free(b),lt.free(te),y},et=Vt.prototype,et.Cs=function(){return null},et.av=function(){return null},et.bs=function(a,y){this.pj.add(a,y)},et.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof jr&&(y.$p=null)})};function kf(a,y,x){function b(){var ye=+new Date;for(te=!0,ne.reset();ne.next();)if(!ne.value[0].al){te=!1;break}te||ye-pe>he?y(x,E,se):An.requestAnimationFrame(b)}for(var E=x.callback,te=!0,ne=a.Og.iterator;ne.next();)if(!ne.value[0].al){te=!1;break}if(typeof E!="function"||te)return y(x,E,a);var se=a,he=x.callbackTimeout||300,pe=+new Date;return An.requestAnimationFrame(function(){b()}),null}et.Wz=function(a){return vo?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},et.Jx=function(a){return a===void 0&&(a={}),kf(this,this.Xz,a)},et.Xz=function(a,y,x){var b=im(x,a,"canvas",null);if(b===null)return null;x=b.Z.canvas;var E=null;if(x!==null)switch(E=a.returnType,E===void 0?E="string":E=E.toLowerCase(),E){case Uc+"data":E=b.getImageData(0,0,x.width,x.height);break;case Uc:b=(a.document||document).createElement("img"),b.src=x.toDataURL(a.type,a.details),E=b;break;case"blob":return typeof y!="function"&&Ot('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.'),typeof x.toBlob=="function"?(x.toBlob(y,a.type,a.details),"toBlob"):(y(null),null);default:E=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(E),null):E};function im(a,y,x,b){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&Ot("properties argument must be an Object.");var E=y.size||null,te=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(te="NaN");var ne=y.maxSize;y.maxSize===void 0&&(ne=x==="SVG"?new fn(1/0,1/0):new fn(2e3,2e3));var se=y.position||null,he=y.parts||null,pe=y.padding===void 0?1:y.padding,ye=y.background||null,Te=y.omitTemporary;Te===void 0&&(Te=!0);var ze=y.document||document,Ze=y.elementFinished||null,$e=y.showTemporary;$e===void 0&&($e=!Te),y=y.showGrid,y===void 0&&(y=$e),E!==null&&isNaN(E.width)&&isNaN(E.height)&&(E=null),typeof pe=="number"?pe=new Dr(pe):pe instanceof Dr||Ot("MakeImage padding must be a Margin or a number."),pe.left=Math.max(pe.left,0),pe.right=Math.max(pe.right,0),pe.top=Math.max(pe.top,0),pe.bottom=Math.max(pe.bottom,0),a.ib.Vc(!0),Te=new ll(null,ze,void 0,!0);var it=Te.context;if(!(E||te||he||se))return Te.width=a.Aa+Math.ceil(pe.left+pe.right),Te.height=a.ya+Math.ceil(pe.top+pe.bottom),x==="SVG"?b===null?null:(b.resize(Te.width,Te.height,Te.width,Te.height),b.ownerDocument=ze,b.hs=Ze,cd(a,b.context,pe,new fn(Te.width,Te.height),a.Ca,a.pa,he,ye,$e,y),b.context):(a.Xm=!1,cd(a,it,pe,new fn(Te.width,Te.height),a.Ca,a.pa,he,ye,$e,y),a.Xm=!0,Te.context);var Tt=a.Pp,bt=a.documentBounds.copy();if(bt.Fv(a.yb),$e)for(var Nt=a.Wa.s,jt=Nt.length,Bt=0;Bt<jt;Bt++){var _t=Nt[Bt];if(_t.visible&&_t.isTemporary){_t=_t.Pa.s;for(var Ht=_t.length,Fn=0;Fn<Ht;Fn++){var Jn=_t[Fn];Jn.isInDocumentBounds&&Jn.isVisible()&&(Jn=Jn.actualBounds,Jn.w()&&bt.ed(Jn))}}}if(Nt=new lt(bt.x,bt.y),he!==null){for(jt=new Yt(0,0,0,0),Bt=!0,_t=he.iterator,_t.reset();_t.next();)Ht=_t.value,Ht instanceof fr&&(Fn=Ht.layer,Fn!==null&&!Fn.visible||Fn!==null&&!$e&&Fn.isTemporary||!Ht.isVisible()||(Ht=Ht.actualBounds,Ht.w()&&(Bt?(Bt=!1,jt.assign(Ht)):jt.ed(Ht))));bt.width=jt.width,bt.height=jt.height,Nt.x=jt.x,Nt.y=jt.y}return se!==null&&se.w()&&(Nt=se,te||(te=Tt)),jt=se=0,pe!==null&&(se=pe.left+pe.right,jt=pe.top+pe.bottom),Bt=_t=0,E!==null&&(_t=E.width,Bt=E.height,isFinite(_t)&&(_t=Math.max(0,_t-se)),isFinite(Bt)&&(Bt=Math.max(0,Bt-jt))),E!==null&&te!==null?(te==="NaN"&&(te=Tt),E.w()?(E=_t,bt=Bt):isNaN(Bt)?(E=_t,bt=bt.height*te):(E=bt.width*te,bt=Bt)):E!==null?E.w()?(te=Math.min(_t/bt.width,Bt/bt.height),E=_t,bt=Bt):isNaN(Bt)?(te=_t/bt.width,E=_t,bt=bt.height*te):(te=Bt/bt.height,E=bt.width*te,bt=Bt):te!==null?te==="NaN"&&ne.w()?(te=Math.min((ne.width-se)/bt.width,(ne.height-jt)/bt.height),te>Tt?(te=Tt,E=bt.width,bt=bt.height):(E=ne.width,bt=ne.height)):(E=bt.width*te,bt=bt.height*te):(te=Tt,E=bt.width,bt=bt.height),pe!==null?(E+=se,bt+=jt):pe=new Dr(0),ne!==null&&(Tt=ne.width,ne=ne.height,isNaN(Tt)&&(Tt=2e3),isNaN(ne)&&(ne=2e3),isFinite(Tt)&&(E=Math.min(E,Tt)),isFinite(ne)&&(bt=Math.min(bt,ne))),Te.width=Math.ceil(E),Te.height=Math.ceil(bt),x==="SVG"?b===null?null:(b.resize(Te.width,Te.height,Te.width,Te.height),b.ownerDocument=ze,b.hs=Ze,cd(a,b.context,pe,new fn(Math.ceil(E),Math.ceil(bt)),te,Nt,he,ye,$e,y),b.context):(a.Xm=!1,cd(a,it,pe,new fn(Math.ceil(E),Math.ceil(bt)),te,Nt,he,ye,$e,y),a.Xm=!0,Te.context)}Zt.Object.defineProperties(Vt.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof Oe||(a===""&&(a="default"),a=a.toLowerCase(),a!==this.nl&&(this.nl=a,a==="default"||a==="canvas"?(a=this.pj.get("svg"),a!==null&&a.Oa.remove(),this.ta&&(this.ib=this.ta.context)):a==="svg"?(this.pj.contains("svg")?a=this.pj.get("svg"):(a=new Jl(this,An.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 Jl(this,An.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(An,"resize",this.Ov,!1),this.removeEventListener(An,"wheel",this.$j,!0),cu===this&&(cu=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),mp(this,a),this.hk())}}},$w:{get:function(){return this.Sq}},pi:{get:function(){return this.hf}},draggedLink:{get:function(){return this.nt},set:function(a){this.nt!==a&&(this.nt=a,a!==null&&(this.Vt=a.fromPort,this.Wt=a.toPort))}},Mx:{get:function(){return this.Vt},set:function(a){this.Vt=a}},Nx:{get:function(){return this.Wt},set:function(a){this.Wt=a}},animationManager:{get:function(){return this.Yd}},undoManager:{get:function(){return this.cc.undoManager}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a,this.cc.skipsUndoManager=a}},delaysLayout:{get:function(){return this.lt},set:function(a){this.lt=a}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&_n(a,"0 <= value <= 1",Vt,"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),al(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),al(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),al(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),al(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&_n(a,">= 0",Vt,"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&&_n(a,">= 0",Vt,"scrollVerticalLineChange"),this.mu=a,this.g("scrollVerticalLineChange",y,a))}},lastInput:{get:function(){return this.cj},set:function(a){this.cj=a}},previousInput:{get:function(){return this.Qg},set:function(a){this.Qg=a}},firstInput:{get:function(){return this.bq},set:function(a){this.bq=a}},currentCursor:{get:function(){return this.it},set:function(a){if(a===""&&(a=this.Op),this.it!==a){var y=this.ta,x=this.Ka;if(y!==null&&x!==null){this.it=a;var b=y.style.cursor;y.style.cursor=a,x.style.cursor=a,y.style.cursor===b&&(y.style.cursor="-webkit-"+a,x.style.cursor="-webkit-"+a,y.style.cursor===b&&(y.style.cursor="-moz-"+a,x.style.cursor="-moz-"+a,y.style.cursor===b&&(y.style.cursor=a,x.style.cursor=a)))}}}},defaultCursor:{get:function(){return this.Op},set:function(a){a===""&&(a="auto");var y=this.Op;y!==a&&(this.Op=a,this.g("defaultCursor",y,a))}},click:{get:function(){return this.zh},set:function(a){var y=this.zh;y!==a&&(this.zh=a,this.g("click",y,a))}},doubleClick:{get:function(){return this.Fh},set:function(a){var y=this.Fh;y!==a&&(this.Fh=a,this.g("doubleClick",y,a))}},contextClick:{get:function(){return this.Bh},set:function(a){var y=this.Bh;y!==a&&(this.Bh=a,this.g("contextClick",y,a))}},mouseOver:{get:function(){return this.Qh},set:function(a){var y=this.Qh;y!==a&&(this.Qh=a,this.g("mouseOver",y,a))}},mouseHover:{get:function(){return this.Oh},set:function(a){var y=this.Oh;y!==a&&(this.Oh=a,this.g("mouseHover",y,a))}},mouseHold:{get:function(){return this.Nh},set:function(a){var y=this.Nh;y!==a&&(this.Nh=a,this.g("mouseHold",y,a))}},mouseDragOver:{get:function(){return this.Qt},set:function(a){var y=this.Qt;y!==a&&(this.Qt=a,this.g("mouseDragOver",y,a))}},mouseDrop:{get:function(){return this.Lh},set:function(a){var y=this.Lh;y!==a&&(this.Lh=a,this.g("mouseDrop",y,a))}},handlesDragDropForTopLevelParts:{get:function(){return this.xt},set:function(a){var y=this.xt;y!==a&&(this.xt=a,this.g("handlesDragDropForTopLevelParts",y,a))}},mouseEnter:{get:function(){return this.Mh},set:function(a){var y=this.Mh;y!==a&&(this.Mh=a,this.g("mouseEnter",y,a))}},mouseLeave:{get:function(){return this.Ph},set:function(a){var y=this.Ph;y!==a&&(this.Ph=a,this.g("mouseLeave",y,a))}},toolTip:{get:function(){return this.$h},set:function(a){var y=this.$h;y!==a&&(this.$h=a,this.g("toolTip",y,a))}},contextMenu:{get:function(){return this.Ch},set:function(a){var y=this.Ch;y!==a&&(this.Ch=a,this.g("contextMenu",y,a))}},commandHandler:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a,a.Xe(this))}},toolManager:{get:function(){return this.te},set:function(a){this.te!==a&&(this.te=a,a.diagram=this)}},defaultTool:{get:function(){return this.ob},set:function(a){var y=this.ob;y!==a&&(this.ob=a,a.diagram=this,this.currentTool===y&&(this.currentTool=a))}},currentTool:{get:function(){return this.hb},set:function(a){var y=this.hb;y&&(y.isActive&&y.doDeactivate(),y.cancelWaitAfter(),y.doStop()),a===null&&(a=this.defaultTool),a!==null&&(this.hb=a,a.diagram=this,a.doStart())}},selection:{get:function(){return this.Hw}},maxSelectionCount:{get:function(){return this.Nt},set:function(a){var y=this.Nt;if(y!==a)if(0<=a&&!isNaN(a)){if(this.Nt=a,this.g("maxSelectionCount",y,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0<a)){this.R("ChangingSelection",this.selection),y=this.selection.Fa();for(var x=0;x<a;x++)y[x].isSelected=!1;this.R("ChangedSelection",this.selection)}}else _n(a,">= 0",Vt,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{get:function(){return this.St},set:function(a){var y=this.St;y!==a&&(this.St=a,this.g("nodeSelectionAdornmentTemplate",y,a))}},groupSelectionAdornmentTemplate:{get:function(){return this.wt},set:function(a){var y=this.wt;y!==a&&(this.wt=a,this.g("groupSelectionAdornmentTemplate",y,a))}},linkSelectionAdornmentTemplate:{get:function(){return this.Kt},set:function(a){var y=this.Kt;y!==a&&(this.Kt=a,this.g("linkSelectionAdornmentTemplate",y,a))}},highlighteds:{get:function(){return this.nw}},isModified:{get:function(){var a=this.undoManager;return a.isEnabled?a.currentTransaction!==null?!0:this.rn&&this.Ce!==a.historyIndex:this.rn},set:function(a){if(this.rn!==a){this.rn=a;var y=this.undoManager;!a&&y.isEnabled&&(this.Ce=y.historyIndex),a||em(this)}}},model:{get:function(){return this.cc},set:function(a){var y=this.cc;if(y!==a){this.currentTool.doCancel(),y&&y.undoManager!==a.undoManager&&y.undoManager.isInTransaction&&Ot("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=gp(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var b=this.vb;this.vb=!0,hu(this.animationManager,"Model"),y&&(this.pf!==null&&this.pf.each(function(te){return y.ik(te)}),y.ik(this.Oc)),this.cc=a,this.partManager=Lp(this.cc.type);for(var E=0;E<x.length;E++)this.add(x[E]);a.Pe(this.Hb),this.partManager.addAllModeledParts(),a.ik(this.Hb),a.Pe(this.Oc),this.pf!==null&&this.pf.each(function(te){return a.Pe(te)}),this.vb=b,this.Ya(),this.vb||this.N(),y&&a.undoManager.copyProperties(y.undoManager)}}},aa:{get:function(){return this.rw},set:function(a){this.rw=a}},As:{get:function(){return this.sy}},skipsModelSourceBindings:{get:function(){return this.Iw},set:function(a){this.Iw=a}},Ns:{get:function(){return this.ou},set:function(a){this.ou=a}},nodeTemplate:{get:function(){return this.Lg.I("")},set:function(a){var y=this.Lg.I("");y!==a&&(this.Lg.add("",a),this.g("nodeTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},nodeTemplateMap:{get:function(){return this.Lg},set:function(a){var y=this.Lg;y!==a&&(this.Lg=a,this.g("nodeTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplate:{get:function(){return this.Yi.I("")},set:function(a){var y=this.Yi.I("");y!==a&&(this.Yi.add("",a),this.g("groupTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplateMap:{get:function(){return this.Yi},set:function(a){var y=this.Yi;y!==a&&(this.Yi=a,this.g("groupTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplate:{get:function(){return this.Kh.I("")},set:function(a){var y=this.Kh.I("");y!==a&&(this.Kh.add("",a),this.g("linkTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplateMap:{get:function(){return this.Kh},set:function(a){var y=this.Kh;y!==a&&(this.Kh=a,this.g("linkTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},isMouseCaptured:{get:function(){return this.qw},set:function(a){var y=this.ta;y!==null&&(y=y.Oa,y instanceof SVGElement||(a?(this.lastInput.bubbles=!1,this.removeEventListener(y,"pointermove",this.dk,!1),this.removeEventListener(y,"pointerdown",this.ui,!1),this.removeEventListener(y,"pointerup",this.fk,!1),this.removeEventListener(y,"pointerout",this.ek,!1),this.removeEventListener(y,"pointercancel",this.ck,!1),this.addEventListener(An,"pointermove",this.dk,!0),this.addEventListener(An,"pointerdown",this.ui,!0),this.addEventListener(An,"pointerup",this.fk,!0),this.addEventListener(An,"pointerout",this.ek,!0),this.addEventListener(An,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(An,"wheel",this.$j,!0),this.addEventListener(An,"selectstart",this.preventDefault,!1)):(this.removeEventListener(An,"pointermove",this.dk,!0),this.removeEventListener(An,"pointerdown",this.ui,!0),this.removeEventListener(An,"pointerup",this.fk,!0),this.removeEventListener(An,"pointerout",this.ek,!0),this.removeEventListener(An,"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(An,"wheel",this.$j,!0),this.removeEventListener(An,"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=lt.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),Ug(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?$l(this):(this.vb=!0,a=this.scale,Sp(this,this.Sp,this.Aa/a,this.ya/a,this.zk,!1),this.vb=!1),this.vb||this.onViewportBoundsChanged(x,this.viewportBounds,this.Ca,!1)}lt.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=$g(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=$g(this)),a.type!==Cn.Grid&&Ot("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),Yl(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||Ot("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 Dr(a));var y=this.rj;y.D(a)||(this.rj=a=a.J(),this.g("scrollMargin",y,a),this.hk())}},scrollMode:{get:function(){return this.sj},set:function(a){var y=this.sj;y!==a&&(this.sj=a,a===mh&&al(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,al(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,Mp(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&&Mp(this,y,a)}},defaultScale:{get:function(){return this.Pp},set:function(a){this.Pp=a}},autoScale:{get:function(){return this.yh},set:function(a){var y=this.yh;y!==a&&(this.yh=a,this.g("autoScale",y,a),a!==Ba&&al(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()||Ot("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()||Ot("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)):_n(a,"> 0",Vt,"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)):_n(a,"> 0",Vt,"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),al(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 Dr(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&&Ot("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();)Qp(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==vh&&a!==Do&&a!==wd&&Ot("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 fn(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 Dr(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Zt.Object.defineProperties(Vt,{licenseKey:{get:function(){return zp.jc()},set:function(a){zp.add(a.replace(/\s/g,""))}},version:{get:function(){return Gc}}}),Vt.prototype.makeImageData=Vt.prototype.Jx,Vt.prototype.makeImage=Vt.prototype.Wz,Vt.prototype.cacheGroupExternalLinks=Vt.prototype.Fu,Vt.prototype.addRenderer=Vt.prototype.bs,Vt.prototype.makeSVG=Vt.prototype.av,Vt.prototype.makeSvg=Vt.prototype.Cs,Vt.prototype.stopAutoScroll=Vt.prototype.ug,Vt.prototype.doAutoScroll=Vt.prototype.gs,Vt.prototype.isUnoccupied=Vt.prototype.Yj,Vt.prototype.raiseDiagramEvent=Vt.prototype.R,Vt.prototype.removeDiagramListener=Vt.prototype.am,Vt.prototype.addDiagramListener=Vt.prototype.Bj,Vt.prototype.findTreeRoots=Vt.prototype.yz,Vt.prototype.layoutDiagram=Vt.prototype.Uz,Vt.prototype.findTopLevelGroups=Vt.prototype.qz,Vt.prototype.findTopLevelNodesAndLinks=Vt.prototype.rz,Vt.prototype.ensureBounds=Vt.prototype.Va,Vt.prototype.findLinksByExample=Vt.prototype.ls,Vt.prototype.findNodesByExample=Vt.prototype.ms,Vt.prototype.findLinkForData=Vt.prototype.Kc,Vt.prototype.findNodeForData=Vt.prototype.ii,Vt.prototype.findPartForData=Vt.prototype.Lc,Vt.prototype.findLinkForKey=Vt.prototype.findLinkForKey,Vt.prototype.findNodeForKey=Vt.prototype.Vb,Vt.prototype.findPartForKey=Vt.prototype.findPartForKey,Vt.prototype.rebuildParts=Vt.prototype.Wd,Vt.prototype.transformViewToDoc=Vt.prototype.Ps,Vt.prototype.transformRectDocToView=Vt.prototype.zA,Vt.prototype.transformDocToView=Vt.prototype.op,Vt.prototype.centerRect=Vt.prototype.es,Vt.prototype.scrollToRect=Vt.prototype.tv,Vt.prototype.scroll=Vt.prototype.scroll,Vt.prototype.highlightCollection=Vt.prototype.Jz,Vt.prototype.highlight=Vt.prototype.Iz,Vt.prototype.selectCollection=Vt.prototype.rA,Vt.prototype.select=Vt.prototype.select,Vt.prototype.updateAllRelationshipsFromData=Vt.prototype.rp,Vt.prototype.updateAllTargetBindings=Vt.prototype.updateAllTargetBindings,Vt.prototype.commit=Vt.prototype.commit,Vt.prototype.rollbackTransaction=Vt.prototype.Kf,Vt.prototype.commitTransaction=Vt.prototype.eb,Vt.prototype.startTransaction=Vt.prototype.Ea,Vt.prototype.raiseChanged=Vt.prototype.g,Vt.prototype.raiseChangedEvent=Vt.prototype.cb,Vt.prototype.removeChangedListener=Vt.prototype.ik,Vt.prototype.addChangedListener=Vt.prototype.Pe,Vt.prototype.removeModelChangedListener=Vt.prototype.mA,Vt.prototype.addModelChangedListener=Vt.prototype.Yw,Vt.prototype.findLayer=Vt.prototype.Qj,Vt.prototype.removeLayer=Vt.prototype.kA,Vt.prototype.addLayerAfter=Vt.prototype.Cy,Vt.prototype.addLayerBefore=Vt.prototype.Ww,Vt.prototype.addLayer=Vt.prototype.Al,Vt.prototype.moveParts=Vt.prototype.moveParts,Vt.prototype.copyParts=Vt.prototype.Kj,Vt.prototype.removeParts=Vt.prototype.Is,Vt.prototype.remove=Vt.prototype.remove,Vt.prototype.add=Vt.prototype.add,Vt.prototype.clearDelayedGeometries=Vt.prototype.bx,Vt.prototype.setProperties=Vt.prototype.nm,Vt.prototype.attach=Vt.prototype.Du,Vt.prototype.set=Vt.prototype.set,Vt.prototype.resetInputOptions=Vt.prototype.Sx,Vt.prototype.setInputOption=Vt.prototype.sA,Vt.prototype.getInputOption=Vt.prototype.Ql,Vt.prototype.resetRenderingHints=Vt.prototype.Tx,Vt.prototype.setRenderingHint=Vt.prototype.Xx,Vt.prototype.getRenderingHint=Vt.prototype.Gf,Vt.prototype.maybeUpdate=Vt.prototype.bd,Vt.prototype.requestUpdate=Vt.prototype.$b,Vt.prototype.delayInitialization=Vt.prototype.Xy,Vt.prototype.isUpdateRequested=Vt.prototype.Pz,Vt.prototype.invalidateDocumentBounds=Vt.prototype.Ya,Vt.prototype.findObjectsNear=Vt.prototype.og,Vt.prototype.findPartsNear=Vt.prototype.mz,Vt.prototype.findObjectsIn=Vt.prototype.Cf,Vt.prototype.findPartsIn=Vt.prototype.ux,Vt.prototype.findObjectsAt=Vt.prototype.ji,Vt.prototype.findPartsAt=Vt.prototype.lz,Vt.prototype.findObjectAt=Vt.prototype.ic,Vt.prototype.findPartAt=Vt.prototype.Ol,Vt.prototype.focusObject=Vt.prototype.zz,Vt.prototype.alignDocument=Vt.prototype.Jy,Vt.prototype.zoomToRect=Vt.prototype.BA,Vt.prototype.zoomToFit=Vt.prototype.zoomToFit,Vt.prototype.diagramScroll=Vt.prototype.kx,Vt.prototype.focus=Vt.prototype.focus;var xd=new Jt,om=null,vo=An.document!==void 0,zc=null,ec="",Ba=new un(Vt,"None",0),Fs=new un(Vt,"Uniform",1),tc=new un(Vt,"UniformToFill",2),Tf=new un(Vt,"CycleAll",10),Dp=new un(Vt,"CycleNotDirected",11),Bp=new un(Vt,"CycleNotDirectedFast",12),Ip=new un(Vt,"CycleNotUndirected",13),Rp=new un(Vt,"CycleDestinationTree",14),_p=new un(Vt,"CycleSourceTree",15),mh=new un(Vt,"DocumentScroll",1),Mf=new un(Vt,"InfiniteScroll",2),vh=new un(Vt,"TreeParentCollapsed",21),Do=new un(Vt,"AllParentsCollapsed",22),wd=new un(Vt,"AnyParentsCollapsed",23),zp=new yn,Gc="2.3.10",Uc="image",Lf=null,am=!1;function Ta(){if(vo){var a=An.document.createElement("canvas"),y=a.getContext("2d"),x=hn("7ca11abfd022028846");y[x]=hn("398c3597c01238");for(var b=["5da73c80a36455d7038e4972187c3cae51fd22",er.Dx+"4ae6247590da4bb21c324ba3a84e385776",Mr.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",Gt.za],E=1;5>E;E++)y[hn("7ca11abfd7330390")](hn(b[E-1]),10,15*E);for(y[x]=hn("39f046ebb36e4b"),x=1;5>x;x++)y[hn("7ca11abfd7330390")](hn(b[x-1]),10,15*x);(b.length!==4||b[0][0]!=="5"||b[3][0]!=="7")&&(Mr.prototype.Cd=Mr.prototype.Eu),Lf=a}}Vt.className="Diagram",Vt.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=An.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof Vt?y.H:null},Vt.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},Vt.useDOM=function(a){vo=a?An.document!==void 0:!1},Vt.isUsingDOM=function(){return vo},Vt.None=Ba,Vt.Uniform=Fs,Vt.UniformToFill=tc,Vt.CycleAll=Tf,Vt.CycleNotDirected=Dp,Vt.CycleNotDirectedFast=Bp,Vt.CycleNotUndirected=Ip,Vt.CycleDestinationTree=Rp,Vt.CycleSourceTree=_p,Vt.DocumentScroll=mh,Vt.InfiniteScroll=Mf,Vt.TreeParentCollapsed=vh,Vt.AllParentsCollapsed=Do,Vt.AnyParentsCollapsed=wd;function sm(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Wc(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)e:{y="f";var x=An[hn("76a715b2f73f148a")][hn("72ba13b5")]||"";if(a.Rc=!0,vo){var b=Vt[hn("76a115b6ed251eaf4692")];if(b)for(var E=zp.iterator;E.next()&&(b=E.value,b=hn(b).split(hn("39e9")),!(6>b.length));){var te=hn(b[1]).split(".");if(b[4]!=="7da71ca0")break;var ne=hn(er[hn("6cae19")]).split(".");if(te[0]>ne[0]||te[0]===ne[0]&&te[1]>=ne[1]){var se=An[hn("74a900bae4370f8b51")][hn("6fbb13a1c2311e8a57")].toLowerCase();if(ne=se[hn("73a612b6fb191d")](hn("3aad1ab6e022098b4dc4")),te=hn(b[2]),-1<ne&&(se=se[hn("73a612b6fb191d")](te.toLowerCase()+"/"),a.Rc=!(-1<se&&se<ne),!a.Rc))break;for(ne=x[hn("76ad18b4f73e")],se=x[hn("73a612b6fb191d")](hn("35e7"))+2;se<ne;se++)y+=x[se];if(ne=y[hn("73a612b6fb191d")](te),0>ne&&te!==hn("7da71ca0ad381e90")&&(ne=y[hn("73a612b6fb191d")](hn("76a715b2ef3e149757"))),0>ne&&(ne=y[hn("73a612b6fb191d")](hn("76a715b2ef3e149757"))),0>ne&&(ne=y[hn("73a612b6fb191d")](hn("2bfa41fdb3784bca12"))),0>ne&&(ne=x[hn("73a612b6fb191d")](hn("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[hn("73a612b6fb191d")](hn("35"))||y[hn("73a612b6fb191d")](hn("35"))===-1),!a.Rc||x[hn("73a612b6fb191d")](hn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[hn("73a612b6fb191d")](te)),!a.Rc)||(ne=An[hn("76a715b2f73f148a")][hn("69ad17a1e03e")],se=ne[hn("73a612b6fb191d")](hn("7fb002b6ed25128b4da25b2e")),-1<se&&(a.Rc=!(ne[hn("73a612b6fb191d")](te)>se),!a.Rc)))break;if(te[0]==="#"){ne=An.document.createElement("div");for(var he=b[0].replace(/[A-Za-z]/g,"");4>he.length;)he+="9";if(se=he,he=he.substr(he.length-4),b="",b+=["gsh","gsf"][parseInt(he.substr(0,1),10)%2],b+=["Header","Background","Display","Feedback"][parseInt(he.substr(0,1),10)%4],ne[hn("79a417a0f0181a8946")]=b,An.document[hn("78a712aa")]){An.document[hn("78a712aa")][hn("7bb806b6ed32388c4a875b")](ne),he=An.getComputedStyle(ne).getPropertyValue(hn("78a704b7e62456904c9b12701b6532a8"));var pe=An.getComputedStyle(ne).getPropertyValue(hn("75b817b0ea2202"));if(An.document[hn("78a712aa")][hn("68ad1bbcf533388c4a875b")](ne),he){if(ne=An[hn("77a902b0eb1b1e804a8a")],pe==="0."+parseInt(se,10)%100||he.indexOf(parseInt(te[1]+te[2],16))!==-1&&he.indexOf(parseInt(te[3]+te[4],16))!==-1){a.Rc=!1;break}else if(ne&&ne(hn("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(b="."+b,te=0;te<document.styleSheets.length;te++){ne=document.styleSheets[te].rules||document.styleSheets[te].cssRules;for(var ye in ne)if(b===ne[ye].selectorText){a.Rc=!1;break e}}}}else a.Rc=null,a.Rc=!1}}}else{for(ye=x[hn("76ad18b4f73e")],E=x[hn("73a612b6fb191d")](hn("35e7"))+2;E<ye;E++)y+=x[E];x=y[hn("73a612b6fb191d")](hn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[hn("73a612b6fb191d")](hn("35")))}}}return 0<a.Rc&&a!==a.wy}sm.className="DiagramHelper";function Uu(a){this.j=a===void 0?new lt:a,this.o=new lt}Zt.Object.defineProperties(Uu.prototype,{point:{get:function(){return this.j},set:function(a){this.j=a}},shifted:{get:function(){return this.o},set:function(a){this.o=a}}});var Nf="DraggingInfo";Uu.className="DraggingInfo";function re(a,y,x){this.node=a,this.info=y,this.Su=x}re.className="DraggingNodeInfoPair";function ce(){this.reset()}ce.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new fn(NaN,NaN).freeze(),this.gridSnapCellSpot=wi,this.gridSnapOrigin=new lt(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},ce.className="DraggingOptions";function Ee(a,y){if(typeof a=="string"||An.Element&&a instanceof Element)var x=Vt.call(this,a)||this;else x=Vt.call(this)||this,y=a;return be(x),y&&x.nm(y),x}nn(Ee,Vt);function be(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=co,a.layout=new fa}Ee.prototype.reset=function(){Vt.prototype.reset.call(this),be(this)},Ee.className="Palette";function Oe(a,y){if(typeof a=="string"||An.Element&&a instanceof Element)var x=Vt.call(this,a)||this;else x=Vt.call(this)||this,y=a;var b=x;x.animationManager.isEnabled=!1,x.vb=!0,x.V=null,x.mn=!1,x.nn=!1,x.F=!0,x.u=!0,x.ia=0,x.o=!1,x.ql=null,x.Xx("drawShadows",!1),a=new fr;var E=new Ir;return E.stroke="magenta",E.strokeWidth=2,E.fill="transparent",E.name="BOXSHAPE",a.selectable=!0,a.selectionAdorned=!1,a.selectionObjectName="BOXSHAPE",a.locationObjectName="BOXSHAPE",a.resizeObjectName="BOXSHAPE",a.cursor="move",a.add(E),x.j=a,x.allowCopy=!1,x.allowDelete=!1,x.allowSelect=!0,x.autoScrollRegion=new Dr(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Mt,x.toolManager.mouseMoveTools),x.click=function(){var te=b.observed;if(te!==null){var ne=te.viewportBounds,se=b.lastInput.documentPoint;te.position=new lt(se.x-ne.width/2,se.y-ne.height/2)}},x.Pf=function(){b.Ya(),vt(b)},x.Xd=function(){b.observed!==null&&(b.Ya(),b.N())},x.Ha=function(){1>b.updateDelay?b.N():b.o||(b.o=!0,setTimeout(function(){return b.redraw()},b.updateDelay))},x.Of=function(){b.observed!==null&&vt(b)},x.autoScale=Fs,x.vb=!1,y&&Object.assign(x,y),x}nn(Oe,Vt),Oe.prototype.computePixelRatio=function(){return 1},Oe.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.ta,y=this.ib;if(a!==null&&y!==null){if(Ic(this),this.ql===null){var x=new ll(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),qe(this)}finally{this.ta=a,this.ib=y}}}Vt.prototype.redraw.call(this)},Oe.prototype.gc=function(){if(this.Ka===null&&Ot("No div specified"),this.ta===null&&Ot("No canvas specified"),!(this.ta instanceof Jl)&&(Bv(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){Ic(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?qe(this):this.ql!==null&&(a.drawImage(this.ql.Oa,0,0),y=this.Ab,y.reset(),this.scale!==1&&y.scale(this.scale),this.position.x===0&&this.position.y===0||y.translate(-this.position.x,-this.position.y),a.scale(this.Mb,this.Mb),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.yc()),y=this.Wa.s;for(var x=y.length,b=0;b<x;b++)y[b].gc(a,this);this.Fc=this.vd=!1}}};function qe(a){var y=a.observed;if(y!==null){var x=a.drawsTemporaryLayers,b=a.drawsGrid&&x,E=y.grid;b&&E!==null&&E.visible&&!isNaN(E.width)&&!isNaN(E.height)&&(E=Yt.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Yl(y,E),Yt.free(E),xa(y));var te=a.Ab;te.reset(),a.scale!==1&&te.scale(a.scale),a.position.x===0&&a.position.y===0||te.translate(-a.position.x,-a.position.y),E=a.ib,E.scale(a.Mb,a.Mb),E.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),E.yc(),y=y.Wa.s,te=y.length;for(var ne=0;ne<te;ne++){var se=y[ne],he=a;if(se.visible&&se.opacity!==0){var pe=se.diagram.grid.part;if(!x&&se.isTemporary)b&&pe.layer===se&&(se=Gu(se,E),pe.gc(E,he),E.globalAlpha=se);else{for(var ye=Gu(se,E),Te=he.scale,ze=Yt.alloc(),Ze=se.Pa.s,$e=Ze.length,it=0;it<$e;it++){var Tt=Ze[it];(b||Tt!==pe)&&se.Oj(E,Tt,he,null,Te,ze,!1)}Yt.free(ze),E.globalAlpha=ye}}}}}function vt(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var b=y.selectionObject,E=fn.alloc();E.h(x.width,x.height),b.desiredSize=E,fn.free(E),a=2/a.scale,b instanceof Ir&&(b.strokeWidth=a),y.location=new lt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}Oe.prototype.computeBounds=function(){var a=this.observed;if(a===null)return Ao;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},Oe.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},Oe.prototype.onViewportBoundsChanged=function(a,y,x,b){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),vt(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.Oz=b,this.R("ViewportBoundsChanged",this.fc,a))},Zt.Object.defineProperties(Oe.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof Oe&&Ot("Overview.observed Diagram may not be an Overview itself: "+a),y!==a){if(y!==null&&(this.remove(this.box),y.am("ViewportBoundsChanged",this.Pf),y.am("DocumentBoundsChanged",this.Xd),y.am("InvalidateDraw",this.Ha),y.am("AnimationFinished",this.Of)),this.V=a,a!==null&&(a.Bj("ViewportBoundsChanged",this.Pf),a.Bj("DocumentBoundsChanged",this.Xd),a.Bj("InvalidateDraw",this.Ha),a.Bj("AnimationFinished",this.Of),this.add(this.box)),this.Ya(),a===null){this.ql=null;var x=this.ta,b=this.ib;x&&b&&(b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,x.width,x.height))}else this.Ha(null),vt(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),vt(this),this.g("box",y,a))}},drawsTemporaryLayers:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a,this.redraw())}},drawsGrid:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a,this.redraw())}},updateDelay:{get:function(){return this.ia},set:function(a){0>a&&(a=0),this.ia!==a&&(this.ia=a)}}}),Oe.className="Overview";function Mt(){lo.call(this),this.j=null}nn(Mt,lo),Mt.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 lt(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new lt(a.x-this.j.x,a.y-this.j.y)),!0)},Mt.prototype.doActivate=function(){this.j=null,lo.prototype.doActivate.call(this)},Mt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Mt.prototype.moveParts=function(){var a=this.diagram,y=a.observed;if(y!==null){var x=a.box;if(x!==null){if(this.j===null){var b=a.firstInput.documentPoint;x=x.location,this.j=new lt(b.x-x.x,b.y-x.y)}a=a.lastInput.documentPoint,y.position=new lt(a.x-this.j.x,a.y-this.j.y)}}},Mt.className="OverviewDraggingTool";function kt(){yr(this),this.H=cu,this.Ha=this.u=this.o=!0,this.F=this.V=this.nb=this.ia=!1,this.ij=this.j=null,this.Hb=1.05,this.Jt=NaN,this.sw=null,this.Au=NaN,this.yu=Ao,this.hb=!0,this.cg=null,this.ob=200}kt.prototype.toString=function(){return"CommandHandler"},kt.prototype.Xe=function(a){this.H=a},kt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=qr?y.meta:y.control,b=y.shift,E=y.alt,te=y.key;!x||te!=="C"&&te!=="Insert"?x&&te==="X"||b&&te==="Del"?this.canCutSelection()&&this.cutSelection():x&&te==="V"||b&&te==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&te==="Y"||E&&b&&te==="Backspace"?this.canRedo()&&this.redo():x&&te==="Z"||E&&te==="Backspace"?this.canUndo()&&this.undo():te==="Del"||te==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&te==="A"?this.canSelectAll()&&this.selectAll():te==="Esc"?this.canStopCommand()&&this.stopCommand():te==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):te==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):te==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):te==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):te==="PageUp"?b&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):te==="PageDown"?b&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):te==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):te==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):te===" "?this.canScrollToPart()&&this.scrollToPart():te==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():te==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&te==="0"?this.canResetZoom()&&this.resetZoom():b&&te==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!b&&te==="G"?this.canGroupSelection()&&this.groupSelection():x&&b&&te==="G"?this.canUngroupSelection()&&this.ungroupSelection():te==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():te==="ContextMenu"||y.event&&y.event.key==="ContextMenu"?this.canShowContextMenu()&&this.showContextMenu():y.bubbles=!0:this.canCopySelection()&&this.copySelection()},kt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},kt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Xi&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},kt.prototype.canStopCommand=function(){return!0},kt.prototype.selectAll=function(){var a=this.diagram;a.N();try{a.currentCursor="wait",a.R("ChangingSelection",a.selection);for(var y=a.parts;y.next();)y.value.isSelected=!0;for(var x=a.nodes;x.next();)x.value.isSelected=!0;for(var b=a.links;b.next();)b.value.isSelected=!0}finally{a.R("ChangedSelection",a.selection),a.currentCursor=""}},kt.prototype.canSelectAll=function(){return this.diagram.allowSelect},kt.prototype.deleteSelection=function(){var a=this.diagram;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Delete"),a.R("SelectionDeleting",a.selection);for(var y=new xn,x=a.selection.iterator;x.next();)oc(y,x.value,!0,this.deletesTree?1/0:0,this.deletesConnectedLinks?null:!1,function(b){return b.canDelete()});a.Is(y,!0),a.R("SelectionDeleted",y)}finally{a.eb("Delete"),a.R("ChangedSelection",a.selection),a.currentCursor=""}},kt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},kt.prototype.copySelection=function(){var a=this.diagram,y=new xn;for(a=a.selection.iterator;a.next();)oc(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},kt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},kt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},kt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},kt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)zc=null,ec="";else{x=y.model;var b=!1,E=!1,te=null;try{x.Tl()&&(b=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(E=x.Ij,x.Ij=this.copiesGroupKey),te=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=b),x.Wj()&&(x.Ij=E),x=new yn,x.addAll(te),zc=x,ec=y.model.dataFormat}}y.R("ClipboardChanged",x)},kt.prototype.pasteFromClipboard=function(){var a=new xn,y=zc;if(y===null)return a;var x=this.diagram;if(ec!==x.model.dataFormat)return a;var b=x.model,E=!1,te=!1,ne=null;try{b.Tl()&&(E=b.Jj,b.Jj=this.copiesParentKey),b.Wj()&&(te=b.Ij,b.Ij=this.copiesGroupKey),ne=x.Kj(y,x,!1)}finally{for(b.Tl()&&(b.Jj=E),b.Wj()&&(b.Ij=te),y=ne.iterator;y.next();)x=y.value,b=y.key,x.location.w()||(b.location.w()?x.location=b.location:!x.position.w()&&b.position.w()&&(x.position=b.position)),a.add(x)}return a},kt.prototype.pasteSelection=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Paste");var x=this.pasteFromClipboard();0<x.count&&y.clearSelection(!0);for(var b=x.iterator;b.next();)b.value.isSelected=!0;if(a!==null){var E=y.computePartsBounds(y.selection);if(E.w()){var te=this.computeEffectiveCollection(y.selection,y.Wm);Jh(y,te,new lt(a.x-E.centerX,a.y-E.centerY),y.Wm,!1)}}y.R("ClipboardPasted",x)}finally{y.eb("Paste"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},kt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||zc===null||zc.count===0||ec!==a.model.dataFormat)},kt.prototype.undo=function(){this.diagram.undoManager.undo()},kt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},kt.prototype.redo=function(){this.diagram.undoManager.redo()},kt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},kt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===Ba&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},kt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==Ba?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},kt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===Ba&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},kt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==Ba?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},kt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},kt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},kt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,b=a.scale;hu(y,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&b===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.sw,this.Au=NaN,this.yu=Ao):(this.Jt=b,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),od(y)},kt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},kt.prototype.scrollToPart=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.Va(),a===null){try{this.cg!==null&&(this.cg.next()?a=this.cg.value:this.cg=null)}catch(he){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;hu(x,"Scroll To Part");var b=this.scrollToPartPause;if(0<b){var E=Rt(this,a,[a]);if(E.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var te=function(){y.Ea();for(var he=E.pop();0<E.length&&he instanceof Rn&&he.isTreeExpanded&&(!(he instanceof jr)||he.isSubGraphExpanded);)he=E.pop();0<E.length?(he instanceof fr&&y.tv(he.actualBounds),he instanceof Rn&&!he.isTreeExpanded&&(he.isTreeExpanded=!0),he instanceof jr&&!he.isSubGraphExpanded&&(he.isSubGraphExpanded=!0)):(he instanceof fr&&y.es(he.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){qt(te,(x.isEnabled?x.duration:0)+b)};y.Bj("LayoutCompleted",ne),te()}}else{var se=y.position.copy();y.es(a.actualBounds),se.Xa(y.position)&&x.Cc()}}};function Rt(a,y,x){if(y.isVisible())return x;if(y instanceof di)Rt(a,y.adornedPart,x);else if(y instanceof Tn){var b=y.fromNode;b!==null&&Rt(a,b,x),y=y.toNode,y!==null&&Rt(a,y,x)}else y instanceof Rn&&(b=y.labeledLink,b!==null&&Rt(a,b,x),b=y.pg(),b!==null&&(b.isTreeExpanded||b.wasTreeExpanded||x.push(b),Rt(a,b,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),Rt(a,y,x));return x}kt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof fr)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},kt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),hu(y.animationManager,"Collapse Tree");var x=new yn;if(a!==null&&a.isTreeExpanded)a.collapseTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof Rn&&E.isTreeExpanded&&(E.collapseTree(),x.add(E))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},kt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Rn&&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 Rn&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},kt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),hu(y.animationManager,"Expand Tree");var x=new yn;if(a!==null&&!a.isTreeExpanded)a.expandTree(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof Rn&&!E.isTreeExpanded&&(E.expandTree(),x.add(E))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},kt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Rn)||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 Rn&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},kt.prototype.groupSelection=function(){var a=this.diagram,y=a.model;if(y.Xj()){var x=this.archetypeGroupData;if(x!==null){var b=null;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Group");for(var E=new yn,te=a.selection.iterator;te.next();){var ne=te.value;ne.Zc()&&ne.canGroup()&&E.add(ne)}for(var se=new yn,he=E.iterator;he.next();){var pe=he.value;te=!1;for(var ye=E.iterator;ye.next();)if(pe.Td(ye.value)){te=!0;break}te||se.add(pe)}if(0<se.count){var Te=se.first().containingGroup;if(Te!==null)for(;Te!==null;){E=!1;for(var ze=se.iterator;ze.next();)if(!ze.value.Td(Te)){E=!0;break}if(E)Te=Te.containingGroup;else break}if(x instanceof jr)ul(x),b=x.copy(),b!==null&&a.add(b);else if(y.Yu(x)){var Ze=y.copyNodeData(x);an(Ze)&&(y.xf(Ze),b=a.ii(Ze))}if(b!==null){Te!==null&&this.isValidMember(Te,b)&&(b.containingGroup=Te);for(var $e=se.iterator;$e.next();){var it=$e.value;this.isValidMember(b,it)&&(it.containingGroup=b)}a.clearSelection(!0),b.isSelected=!0}}a.R("SelectionGrouped",b)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},kt.prototype.canGroupSelection=function(){var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowGroup||!a.model.Xj()||this.archetypeGroupData===null)return!1;for(a=a.selection.iterator;a.next();){var y=a.value;if(y.Zc()&&y.canGroup())return!0}return!1};function en(a){var y=$n();for(a=a.iterator;a.next();){var x=a.value;x instanceof Tn||y.push(x)}a=new xn,x=y.length;for(var b=0;b<x;b++){for(var E=y[b],te=!0,ne=0;ne<x;ne++)if(E.Td(y[ne])){te=!1;break}te&&a.add(E)}return Wn(y),a}kt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Tn)return!1;if(a!==null){if(a===y||a.Td(y))return!1;var x=a.memberValidation;if(x!==null&&!x(a,y)||a.data===null&&y.data!==null||a.data!==null&&y.data===null)return!1}return x=this.memberValidation,x!==null?x(a,y):!0},kt.prototype.ungroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.model;if(x.Xj())try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Ungroup");var b=new yn;if(a!==null)b.add(a);else for(var E=y.selection.iterator;E.next();){var te=E.value;te instanceof jr&&te.canUngroup()&&b.add(te)}var ne=new yn;if(0<b.count){y.clearSelection(!0);for(var se=b.iterator;se.next();){var he=se.value;he.expandSubGraph();var pe=he.containingGroup,ye=pe!==null&&pe.data!==null?x.wa(pe.data):void 0;ne.addAll(he.memberParts);for(var Te=ne.iterator;Te.next();){var ze=Te.value;if(ze.isSelected=!0,!(ze instanceof Tn)){var Ze=ze.data;Ze!==null?x.mp(Ze,ye):ze.containingGroup=pe}}y.remove(he)}}y.R("SelectionUngrouped",b,ne)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},kt.prototype.canUngroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowDelete||!y.allowUngroup||!y.model.Xj())return!1;if(a!==null){if(!(a instanceof jr))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof jr&&y.canUngroup())return!0;return!1},kt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=en(a).iterator;a.next();){var b=a.value;b.containingGroup!==null&&(!y||this.isValidMember(null,b)?b.containingGroup=null:x=!1)}return x},kt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),hu(y.animationManager,"Collapse SubGraph");var x=new yn;if(a!==null&&a.isSubGraphExpanded)a.collapseSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof jr&&E.isSubGraphExpanded&&(E.collapseSubGraph(),x.add(E))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},kt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof jr&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof jr&&y.isSubGraphExpanded)return!0;return!1},kt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),hu(y.animationManager,"Expand SubGraph");var x=new yn;if(a!==null&&!a.isSubGraphExpanded)a.expandSubGraph(),x.add(a);else if(a===null)for(var b=y.selection.iterator;b.next();){var E=b.value;E instanceof jr&&!E.isSubGraphExpanded&&(E.expandSubGraph(),x.add(E))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},kt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof jr&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof jr&&!y.isSubGraphExpanded)return!0;return!1},kt.prototype.editTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.toolManager.findTool("TextEditing");if(x!==null){if(a===null){a=null;for(var b=y.selection.iterator;b.next();){var E=b.value;if(E.canEdit()){a=E;break}}if(a===null)return;a=a.Nl(function(te){return te instanceof Hi&&te.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},kt.prototype.canEditTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowTextEdit||y.toolManager.findTool("TextEditing")===null)return!1;if(a!==null){if(!(a instanceof Hi))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 Hi&&x.editable}),a!==null))return!0;return!1},kt.prototype.showContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");if(x!==null&&(a===void 0&&(a=0<y.selection.count?y.selection.first():y),a=x.findObjectWithContextMenu(a),a!==null)){var b=y.lastInput,E=null;a instanceof zt?E=a.ga(ti):y.viewportBounds.ca(b.documentPoint)||(E=y.viewportBounds,E=new lt(E.x+E.width/2,E.y+E.height/2)),E!==null&&(b.viewPoint=y.op(E),b.documentPoint=E,b.left=!1,b.right=!0,b.up=!0),y.currentTool=x,Ru(x,!1,a)}},kt.prototype.canShowContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");return x===null?!1:(a===void 0&&(a=0<y.selection.count?y.selection.first():y),x.findObjectWithContextMenu(a)!==null)},kt.prototype.computeEffectiveCollection=function(a,y){var x=this.diagram,b=x.toolManager.findTool("Dragging"),E=x.currentTool===b;if(y===void 0&&(y=E?b.dragOptions:x.Wm),b=new Jt,a===null)return b;for(var te=a.iterator;te.next();)du(x,b,te.value,E,y);if(x.draggedLink!==null&&y.dragsLink)return b;for(te=a.iterator;te.next();)a=te.value,a instanceof Tn&&(y=a.fromNode,y===null||b.contains(y)?(y=a.toNode,y===null||b.contains(y)||b.remove(a)):b.remove(a));return b},Zt.Object.defineProperties(kt.prototype,{diagram:{get:function(){return this.H}},copiesClipboardData:{get:function(){return this.o},set:function(a){this.o=a}},copiesConnectedLinks:{get:function(){return this.u},set:function(a){this.u=a}},deletesConnectedLinks:{get:function(){return this.Ha},set:function(a){this.Ha=a}},copiesTree:{get:function(){return this.ia},set:function(a){this.ia=a}},deletesTree:{get:function(){return this.nb},set:function(a){this.nb=a}},copiesParentKey:{get:function(){return this.V},set:function(a){this.V=a}},copiesGroupKey:{get:function(){return this.F},set:function(a){this.F=a}},archetypeGroupData:{get:function(){return this.j},set:function(a){this.j=a}},memberValidation:{get:function(){return this.ij},set:function(a){this.ij=a}},defaultScale:{get:function(){return this.diagram.defaultScale},set:function(a){this.diagram.defaultScale=a}},zoomFactor:{get:function(){return this.Hb},set:function(a){1<a||Ot("zoomFactor must be larger than 1.0, not: "+a),this.Hb=a}},isZoomToFitRestoreEnabled:{get:function(){return this.hb},set:function(a){this.hb=a}},scrollToPartPause:{get:function(){return this.ob},set:function(a){this.ob=a}}}),kt.className="CommandHandler",Xg=function(){return new kt};function zt(){yr(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new lt(NaN,NaN).freeze(),this.jd=ii,this.Ab=new Mr,this.wh=new Mr,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=Jo,this.uc=new Yt(NaN,NaN,NaN,NaN).freeze(),this.Ib=new Yt(NaN,NaN,NaN,NaN).freeze(),this.dc=new Yt(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=Vo,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 wn,gn,rr,sr,Sr,Fr,Qr,Kr,ui,Ai;zt.prototype.cloneProtected=function(a){a.l=this.l|6144,a.pb=this.pb,a.bn=this.bn,a.Ma=this.Ma,a.pa.assign(this.pa),a.jd=this.jd.J(),this.Lb!==null?a.Lb=this.Lb.copy():a.Lb=null,a.Ca=this.Ca,a.Kb=this.Kb,a.Kg=this.Kg.J(),a.uc.assign(this.uc),a.Ib.assign(this.Ib),a.dc.assign(this.dc),a.Yn=this.Yn,this.ba!==null&&(a.ba=this.ba.copy()),a.Jb=this.Jb.J(),a.sk=this.sk.J(),a.io=this.io,a.Ag=this.Ag,this.Ua!==null&&(a.Ua=this.Ua.copy()),this.A!==null&&(a.A=this.A.nc?this.A:this.A.copy()),this.Dh!==null&&(a.Dh=Kn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},zt.prototype.Vw=function(a){var y=this.Dh;if(Un(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},zt.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},zt.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},zt.prototype.copy=function(){return this.clone()},et=zt.prototype,et.qb=function(a){a.classType===Tn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Ot("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===zt&&(this.stretch=a)},et.toString=function(){return hr(this.constructor)+"#"+Yr(this)},et.th=function(){this.A!==null&&(this.A.nc=!0)};function Gr(a){a.A===null?a.A=new jf:a.A.nc&&(a.A=a.A.copy())}et.Xc=function(){if(this.ba===null){var a=new Gp;a.Xi=zr,a.yj=zr,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},et.cb=function(a,y,x,b,E,te,ne){var se=this.part;if(se!==null&&(se.gk(a,y,x,b,E,te,ne),x===this&&a===to&&pa(this)&&Ji(this,se,y),te=this.diagram,this.animationTriggers===null||te===null||!te.pi||te.undoManager.isUndoingRedoing||te.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&te.animationManager.isEnabled&&!te.animationManager.isTicking&&(this.jo===null&&(this.jo=new Jt),ne=te.undoManager.transactionLevel===0,a.startCondition===Xh?ne=!0:a.startCondition===Oc&&(ne=!1),ne?(te=new Sa,Hg(a,te),ne=this.jo.get(a),ne!==null&&ne.stop(),this.jo.add(a,te),te.vu=this,te.Nw=a,te.add(this,y,b,E),te.start()):(hu(te.animationManager,"Trigger"),te.animationManager.defaultAnimation.add(this,y,b,E)))),this instanceof Cn&&x===se&&(se.l&16777216)!==0&&se.data!==null))for(x=this.O.s,b=x.length,E=0;E<b;E++)se=x[E],se instanceof Cn&&Zc(se,function(he){he.data!==null&&he.l&16777216&&he.La(y)})};function Ji(a,y,x){var b=a.ih();if(b!==null)for(var E=a.localBindings.iterator;E.next();){var te=E.value,ne=null;if(te.sourceName!==null){if(ne=TS(te,b,a),ne===null)continue;te.sp(a,ne,x,null)}else if(te.isToModel){var se=y.diagram;se===null||se.skipsModelSourceBindings||te.sp(a,se.model.modelData,x,b)}else{if(se=b.data,se===null)continue;var he=y.diagram;he===null||he.skipsModelSourceBindings||te.sp(a,se,x,b)}ne===a&&(se=b.ks(te.Ai),se!==null&&te.Mv(se,ne,x))}}et.ks=function(a){return this.bindingId===a?this:null},et.g=function(a,y,x){this.cb(to,a,this,y,x)},et.Ge=function(a,y,x,b){var E=this.uc;if(E.h(a,y,x,b),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new Mr);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),te.pp(E)}};function Xo(a,y,x,b){return a.pickable===!1?!1:(b.multiply(a.transform),x?a.Yc(y,b):a.fh(y,b))}et.tx=function(a,y,x){if(this.pickable===!1)return!1;var b=this.naturalBounds;return y=a.Bf(y),x?In(a.x,a.y,0,0,0,b.height)<=y||In(a.x,a.y,0,b.height,b.width,b.height)<=y||In(a.x,a.y,b.width,b.height,b.width,0)<=y||In(a.x,a.y,b.width,0,0,0)<=y:a.zd(0,0)<=y&&a.zd(0,b.height)<=y&&a.zd(b.width,0)<=y&&a.zd(b.width,b.height)<=y},et.se=function(){return!0},et.ca=function(a){var y=lt.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return lt.free(y),!1;var b=this.diagram;if(b!==null&&b.wq){var E=b.Ql("extraTouchThreshold"),te=b.Ql("extraTouchArea"),ne=te/2,se=this.naturalBounds;b=this.Df()*b.scale;var he=1/b;if(se.width*b<E&&se.height*b<E)return a=Qi(x.x-ne*he,x.y-ne*he,x.width+te*he,x.height+te*he,y.x,y.y),lt.free(y),a}return E=!1,(this instanceof di||this instanceof Ir?Qi(x.x-5,x.y-5,x.width+10,x.height+10,y.x,y.y):x.ca(y))&&(this.tb&&!this.tb.ca(y)?E=!1:this.areaBackground!==null&&x.ca(y)||this.Ma!==null&&this.dc.ca(a)?E=!0:E=this.gh(a)),lt.free(y),E},et.gh=function(a){var y=this.naturalBounds;return Qi(0,0,y.width,y.height,a.x,a.y)},et.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=Yt.allocAt(0,0,y.width,y.height);var x=this.transform,b=!1,E=lt.allocAt(a.x,a.y);return y.ca(x.Cd(E))&&(E.h(a.x,a.bottom),y.ca(x.Cd(E))&&(E.h(a.right,a.bottom),y.ca(x.Cd(E))&&(E.h(a.right,a.y),y.ca(x.Cd(E))&&(b=!0)))),lt.free(E),Yt.free(y),b},et.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,b=!1,E=lt.allocAt(0,0);return a.ca(y.Ga(E))&&(E.h(0,x.height),a.ca(y.Ga(E))&&(E.h(x.width,x.height),a.ca(y.Ga(E))&&(E.h(x.width,0),a.ca(y.Ga(E))&&(b=!0)))),lt.free(E),b},et.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,b=lt.allocAt(0,0),E=lt.allocAt(0,x.height),te=lt.allocAt(x.width,x.height),ne=lt.allocAt(x.width,0),se=!1;if(a.ca(y.Ga(b))||a.ca(y.Ga(E))||a.ca(y.Ga(te))||a.ca(y.Ga(ne)))se=!0;else{x=Yt.allocAt(0,0,x.width,x.height);var he=lt.allocAt(a.x,a.y);x.ca(y.Cd(he))?se=!0:(he.h(a.x,a.bottom),x.ca(y.Cd(he))?se=!0:(he.h(a.right,a.bottom),x.ca(y.Cd(he))?se=!0:(he.h(a.right,a.y),x.ca(y.Cd(he))&&(se=!0)))),lt.free(he),Yt.free(x),!se&&(Gt.us(a,b,E)||Gt.us(a,E,te)||Gt.us(a,te,ne)||Gt.us(a,ne,b))&&(se=!0)}return lt.free(b),lt.free(E),lt.free(te),lt.free(ne),se},et.ga=function(a,y){if(y===void 0&&(y=new lt),a instanceof Nn){var x=this.naturalBounds;y.h(a.x*x.width+a.offsetX,a.y*x.height+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},et.mi=function(a){a===void 0&&(a=new Yt);var y=this.naturalBounds,x=this.oe,b=lt.allocAt(0,0).transform(x);return a.h(b.x,b.y,0,0),b.h(y.width,0).transform(x),gi(a,b.x,b.y,0,0),b.h(y.width,y.height).transform(x),gi(a,b.x,b.y,0,0),b.h(0,y.height).transform(x),gi(a,b.x,b.y,0,0),lt.free(b),a},et.li=function(){var a=this.oe;return a.m11===1&&a.m12===0?a=0:(a=180*Math.atan2(a.m12,a.m11)/Math.PI,0>a&&(a+=360)),a},et.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},et.qs=function(a,y){return y===void 0&&(y=new lt),y.assign(a),this.oe.Cd(y),y},et.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},et.Sj=function(a,y,x,b,E){var te=this.transform,ne=1/(te.m11*te.m22-te.m12*te.m21),se=te.m22*ne,he=-te.m12*ne,pe=-te.m21*ne,ye=te.m11*ne,Te=ne*(te.m21*te.dy-te.m22*te.dx),ze=ne*(te.m12*te.dx-te.m11*te.dy);return this.areaBackground!==null?(te=this.actualBounds,Gt.Ff(te.left,te.top,te.right,te.bottom,a,y,x,b,E)):(ne=a*se+y*pe+Te,a=a*he+y*ye+ze,y=x*se+b*pe+Te,x=x*he+b*ye+ze,E.h(0,0),b=this.naturalBounds,x=Gt.Ff(0,0,b.width,b.height,ne,a,y,x,E),E.transform(te),x)},zt.prototype.measure=function(a,y,x,b){if(Bs(this)!==!1){var E=this.Kg,te=E.right+E.left;E=E.top+E.bottom,a=Math.max(a-te,0),y=Math.max(y-E,0),x=Math.max((x||0)-te,0),b=Math.max((b||0)-E,0),te=this.angle,E=this.desiredSize;var ne=this.kq();te===90||te===270?(a=isFinite(E.height)?E.height+ne:a,y=isFinite(E.width)?E.width+ne:y):(a=isFinite(E.width)?E.width+ne:a,y=isFinite(E.height)?E.height+ne:y),E=x||0,ne=b||0;var se=this instanceof Cn;switch(ls(this,!0)){case gn:ne=E=0,se&&(y=a=1/0);break;case wn:isFinite(a)&&a>x&&(E=a),isFinite(y)&&y>b&&(ne=y);break;case sr:isFinite(a)&&a>x&&(E=a),ne=0,se&&(y=1/0);break;case Sr:isFinite(y)&&y>b&&(ne=y),E=0,se&&(a=1/0)}se=this.maxSize;var he=this.minSize;E>se.width&&he.width<se.width&&(E=se.width),ne>se.height&&he.height<se.height&&(ne=se.height),x=Math.max(E,he.width),b=Math.max(ne,he.height),se.width<x&&(x=Math.min(he.width,x)),se.height<b&&(b=Math.min(he.height,b)),a=Math.min(se.width,a),y=Math.min(se.height,y),a=Math.max(x,a),y=Math.max(b,y),(te===90||te===270)&&(te=a,a=y,y=te,te=x,x=b,b=te),this.uc.ka(),this.Wl(a,y,x,b),this.uc.freeze(),this.uc.w()||Ot("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Bo(this,!1)}},zt.prototype.Wl=function(){},zt.prototype.Dd=function(){return!1},zt.prototype.arrange=function(a,y,x,b,E){this.Uk();var te=Yt.alloc();te.assign(this.Ib),this.Ib.ka(),Xa(this)===!1?this.Ib.h(a,y,x,b):this.eh(a,y,x,b),this.Ib.freeze(),E===void 0?this.tb=null:this.tb=E,x=!1,E!==void 0?x=!0:(E=this.panel,E!==null&&xh(E)&&(E=E.panel),E!==null&&(E=E.dc,b=this.measuredBounds,this.areaBackground!==null&&(b=this.Ib),x=y+b.height,b=a+b.width,x=!(0<=a+.05&&b<=E.width+.05&&0<=y+.05&&x<=E.height+.05),this instanceof Hi&&(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()||Ot("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(te,this.Ib),pu(this,!1),Yt.free(te)},et=zt.prototype,et.eh=function(){};function Ia(a,y,x,b,E){if(a.Ib.h(y,x,b,E),!a.desiredSize.w()){var te=a.uc;x=a.Kg,y=x.right+x.left;var ne=x.top+x.bottom;switch(x=te.width+y,te=te.height+ne,b+=y,E+=ne,y=ls(a,!0),x===b&&te===E&&(y=gn),y){case gn:(x>b||te>E)&&(Bo(a,!0),a.measure(x>b?b:x,te>E?E:te,0,0));break;case wn:Bo(a,!0),a.measure(b,E,0,0);break;case sr:Bo(a,!0),a.measure(b,te,0,0);break;case Sr:Bo(a,!0),a.measure(x,E,0,0)}}}et.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||_v(x,!0),this.N(),Si(a,y)||(x.oh(),this.Pn(x)))},et.Pn=function(a){this.portId!==null&&(_v(a,!0),a instanceof Rn&&H1(a,this))},et.gc=function(a,y){if(!Vs(this,a,y)&&this.visible){var x=this.opacity;if(x!==0){var b=1;x!==1&&(b=a.globalAlpha,a.globalAlpha=b*x);var E="";this.filter!==""&&(E=a.filter,a.filter=this.filter);var te=this instanceof Cn&&xh(this),ne=this.Ib;if(te){var se=this.Ib,he=this.dc,pe=this.areaBackground,ye=this.Ma;pe===null&&ye===null||a.yc(),pe!==null&&(yo(this,a,pe,!0,!0,he,se),pe instanceof Ti&&pe.type===Ys?(a.beginPath(),a.rect(se.x,se.y,se.width,se.height),a.ng(pe)):a.fillRect(se.x,se.y,se.width,se.height)),ye!==null&&(yo(this,a,ye,!0,!1,he,se),ye instanceof Ti&&ye.type===Ys?(a.beginPath(),a.rect(se.x,se.y,se.width,se.height),a.ng(ye)):a.fillRect(se.x,se.y,se.width,se.height)),this.hh(a,y)}if(!te&&(te||ne.width!==0&&ne.height!==0&&!isNaN(ne.x)&&!isNaN(ne.y))){te=this.transform,se=this.panel,this.l&4096&&ca(this),pe=this.part,he=!1;var Te=0;pe&&y.Gf("drawShadows")&&(he=pe.isShadowed)&&(ye=pe.shadowOffset,Te=Math.max(ye.y,ye.x)*y.scale*y.Mb),ye=this.Dd();var ze;if(!(ze=y.$i||!ye)){var Ze=this.naturalBounds;ze=this.wh;var $e=ze.m11,it=ze.m21,Tt=ze.dx,bt=ze.m12,Nt=ze.m22,jt=ze.dy,Bt,_t=Bt=0;ze=Bt*$e+_t*it+Tt;var Ht=Bt*bt+_t*Nt+jt;Bt=Ze.width+Te,_t=0;var Fn=Bt*$e+_t*it+Tt;Bt=Bt*bt+_t*Nt+jt,_t=Math.min(ze,Fn);var Jn=Math.min(Ht,Bt),Zn=Math.max(ze+0,Fn)-_t,kn=Math.max(Ht+0,Bt)-Jn;ze=_t,Ht=Jn,Bt=Ze.width+Te,_t=Ze.height+Te,Fn=Bt*$e+_t*it+Tt,Bt=Bt*bt+_t*Nt+jt,_t=Math.min(ze,Fn),Jn=Math.min(Ht,Bt),Zn=Math.max(ze+Zn,Fn)-_t,kn=Math.max(Ht+kn,Bt)-Jn,ze=_t,Ht=Jn,Bt=0,_t=Ze.height+Te,Fn=Bt*$e+_t*it+Tt,Bt=Bt*bt+_t*Nt+jt,_t=Math.min(ze,Fn),Jn=Math.min(Ht,Bt),Zn=Math.max(ze+Zn,Fn)-_t,kn=Math.max(Ht+kn,Bt)-Jn,ze=_t,Ht=Jn,Te=y.viewportBounds,Ze=Te.x,$e=Te.y,ze=!(ze>Te.width+Ze||Ze>Zn+ze||Ht>Te.height+$e||$e>kn+Ht)}if(ze){if(ze=(this.l&256)!==0,a.clipInsteadOfFill&&(ze=!1),this instanceof Hi&&(a.font=this.font),ze){if(Ht=se.se()?se.naturalBounds:se.actualBounds,Zn=Math.max(ne.x,Ht.x),kn=Math.max(ne.y,Ht.y),Te=Math.min(ne.right,Ht.right)-Zn,Ze=Math.min(ne.bottom,Ht.bottom)-kn,$e=this.tb,$e!==null&&(Zn=$e.x,kn=$e.y,Te=$e.width,Ze=$e.height),Zn>ne.width+ne.x||ne.x>Ht.width+Ht.x){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}a.save(),a.beginPath(),a.rect(Zn,kn,Te,Ze),a.clip()}if(ye){if(!pe.isVisible()){x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E);return}he&&(Ht=pe.shadowOffset,a.Ev(Ht.x*y.scale*this.scale*y.Mb,Ht.y*y.scale*this.scale*y.Mb,pe.shadowBlur),Wu(a),a.shadowColor=pe.shadowColor)}he&&this.shadowVisible===!0?Wu(a):he&&this.shadowVisible===!1&&gu(a),pe=this.naturalBounds,this.areaBackground!==null&&(a.yc(),Ds(this,a,pe,ne)),a.transform(te.m11,te.m12,te.m21,te.m22,te.dx,te.dy),he&&ia(this,se)&&this.shadowVisible===null&&gu(a),this.Ma!==null&&(a.yc(),gs(this,a,pe,ne)),he&&(this.Ma!==null||this.areaBackground!==null||ia(this,se))?(Sl(this,!0),this.shadowVisible===null&&gu(a)):Sl(this,!1),this.hh(a,y),he&&this.l&512&&Wu(a),ye&&he&&gu(a),ze&&(a.restore(),a.Vc(this instanceof Cn)),te.ws()||(y=1/(te.m11*te.m22-te.m12*te.m21),a.transform(te.m22*y,-te.m12*y,-te.m21*y,te.m11*y,y*(te.m21*te.dy-te.m22*te.dx),y*(te.m12*te.dx-te.m11*te.dy)))}}x!==1&&(a.globalAlpha=b),this.filter!==""&&(a.filter=E)}}};function ia(a,y){return y===null?!1:(xh(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Cn.Auto||y.type===Cn.Spot)&&y.Pb()!==a)}et.Dv=function(){};function Ds(a,y,x,b){yo(a,y,a.areaBackground,!0,!0,x,b),a.areaBackground instanceof Ti&&a.areaBackground.type===Ys?(y.beginPath(),y.rect(b.x,b.y,b.width,b.height),y.ng(a.areaBackground)):y.fillRect(b.x,b.y,b.width,b.height)}function gs(a,y,x,b){var E=a.kq(),te=x.x,ne=x.y,se=x.width+E,he=x.height+E;yo(a,y,a.Ma,!0,!1,x,b),a.Ma instanceof Ti&&a.Ma.type===Ys?(y.beginPath(),y.rect(te-E/2,ne-E/2,se,he),y.ng(a.Ma)):y.fillRect(te-E/2,ne-E/2,se,he)}function Ma(a,y,x){for(var b=y.O.s,E=b.length,te=-1,ne=0;ne<E;ne++)if(b[ne]===a){te=ne;break}if(a=te,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===Cn.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 Vs(a,y,x){if(!(y instanceof bs))return!1;if(!a.visible||a.opacity===0||a.Dd()&&!a.isVisible())return a.svg!==null&&a.svg.parentNode!==null&&a.svg.remove(),!0;var b=a.panel,E=a.nk(y);if(a.kk(y,x,E))return a.svg.parentElement!==null?(a.Dd()&&(y.ti=a.svg),!0):(a.Dd()?(y.ti!==null?y.ti.after(a.svg):y.Nj.prepend(a.svg),y.ti=a.svg):b&&Ma(a,b,a.svg),!0);if(a.Dd()&&a.isShadowed){var te=a.shadowOffset;y.Ev(te.x*x.scale*a.scale*x.Mb,te.y*x.scale*a.scale*x.Mb,a.shadowBlur),Wu(y),y.shadowColor=a.shadowColor}a instanceof Hi&&(y.font=a.font),y.yd=null;var ne=a.transform;te=a instanceof Cn;var se=a instanceof Cn?xh(a):!1;a.l&4096&&ca(a);var he=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,E&&(y.o=!0,te&&se?(Up(y,1,0,0,1,0,0),a.svg=y.ad):te?(Up(y,ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy),a.svg=y.ad):Up(y,1,0,0,1,0,0)),E=a.naturalBounds,a.areaBackground!==null){var pe=ne.copy().Vj();y.rb.ha=[pe.m11,pe.m12,pe.m21,pe.m22,pe.dx,pe.dy],Ds(a,y,E,he),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return te||(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),a.background!==null&&(te?(se&&(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy]),gs(a,y,E,he),se&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],gs(a,y,E,he)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),ne=y.yd,E=a.part,se=!1,E&&x.Gf("drawShadows")&&(se=E.isShadowed),y.clipInsteadOfFill&&(se=!1),a.Dd()&&se&&Wu(y),se&&a.shadowVisible===!0?Wu(y):se&&a.shadowVisible===!1&&gu(y),E=a.panel,se&&ia(a,E)&&a.shadowVisible===null&&gu(y),y.Il&&(pe=x.computePixelRatio(),pe="drop-shadow("+y.shadowOffsetX/pe+"px "+y.shadowOffsetY/pe+"px "+y.shadowBlur/pe/2+"px "+y.shadowColor+")",a.background!==null&&ne.Ma.setAttributeNS(null,"filter",pe),a.areaBackground!==null&&ne.gd.setAttributeNS(null,"filter",pe)),se&&(a.Ma!==null||a.areaBackground!==null||ia(a,E))?(Sl(a,!0),a.shadowVisible===null&&gu(y)):Sl(a,!1),E=se,a.hh(y,x),te&&y.nh.pop(),y.o&&y.nh.pop(),ne=y.Gv.hs,se=te?a.svg:y.yd,pe=a.svg,!te&&pe!==null&&se!==pe&&pe.parentNode===a.panel.svg?(a.svg.replaceWith(se),a.svg=se,se!==null&&a.$o(y,b,he,se),ss(y,pe),!0):(a.svg=se,ne!==null&&se===null&&(um(y),y.nh.pop()),se===null||(a.$o(y,b,he,se),y.Il&&(x=x.computePixelRatio(),a.Dv(se,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),E&&a.l&512&&Wu(y),a.Dd()&&gu(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&se.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&se.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(se):y.Nj.prepend(se),y.ti=se):b!==null&&Ma(a,b,se),ne!==null&&ne(a,se)),!0)}et.$o=function(a,y,x,b){var E=(this.l&256)!==0;if(a.clipInsteadOfFill&&(E=!1),E){var te=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,te.x),E=Math.max(x.y,te.y);var ne=Math.min(x.right,te.right)-y;x=Math.min(x.bottom,te.bottom)-E,te=this.tb,te!==null&&(y=te.x,E=te.y,ne=te.width,x=te.height),te=b.getAttribute("clip-path");var se=null;te!==null&&(se=a.svg.getElementById(te.split("#")[1].slice(0,-1))),se===null?(te="CLIP"+Zi++,se=a.Ud("clipPath",{id:te}),y=a.Ud("rect",{x:y,y:E,width:ne,height:x}),this instanceof Cn&&(E=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")),se.appendChild(y),a.svg.appendChild(se),b.setAttributeNS(null,"clip-path","url(#"+te+")")):(a=se.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",E.toString()),a.setAttribute("width",ne.toString()),a.setAttribute("height",x.toString()))}else b.removeAttributeNS(null,"clip-path"),ss(a,b)};function ss(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function La(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=vr(y);for(var b=y.next();!b.done;b=y.next())b=x.getElementById(b.value.split("#")[1].slice(0,-1)),b!==null&&b.remove()}a.svg.remove()}}et.hh=function(){},et.lv=function(){this.Uc=!0},et.kk=function(a,y,x){if(this.Uc)return this.lv(),this.Uc=!1;if(y=this.svg,y===null)return!1;if(!this.visible)return y.remove(),!1;if(y.nodeName!=="g"&&x||y.nodeName==="g"&&!x)return!1;var b=this.transform,E=this instanceof Cn?xh(this):!1;if(!(this instanceof Cn&&E))if(this instanceof hs){var te=this.bt;a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy],te!==null&&$y(a,te[0],te[1],te[2],te[3],te[4],te[5],te[6],te[7]),x?y.lastElementChild.setAttributeNS(null,"transform",Jy(a)):y.setAttributeNS(null,"transform",Jy(a))}else if(!x||this instanceof Cn)y.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");else if(this instanceof Ir){te=y.getElementsByTagName("path");for(var ne=0;ne<te.length;ne++)te[ne].setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")")}else y.lastElementChild.setAttributeNS(null,"transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")");return te=this.Dd()?this.opacity*a.globalAlpha:this.opacity,te===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",te.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(te=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(ne=b.copy().Vj(),a.rb.ha=[ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy],Ds(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(ne=y.gd.getAttribute("filter"),ne!==null&&a.ad.setAttribute("filter",ne),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),te&&hm(a,te)),(this.background!==null||y.Ma!==void 0)&&(te=y.Ma,this.background===null?(hm(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((E||x&&!(this instanceof Cn))&&(a.rb.ha=[b.m11,b.m12,b.m21,b.m22,b.dx,b.dy]),gs(this,a,this.naturalBounds,this.actualBounds),y.Ma?(hm(a,y.Ma),x=y.Ma.getAttribute("filter"),x!==null&&a.ad.setAttribute("filter",x),y.Ma.replaceWith(a.ad)):y.prepend(a.ad),y.Ma=a.ad),te&&hm(a,te)),this.$o(a,this.panel,this.actualBounds,y),!0},et.nk=function(a){if(this.background!==null||this.areaBackground!==null)return!0;var y=(this.l&256)!==0;return a.clipInsteadOfFill&&(y=!1),!!y};function yo(a,y,x,b,E,te,ne){if(x!==null){var se=1,he=1;if(typeof x=="string")b?y.fillStyle=x:y.strokeStyle=x;else if(x.type===Sh)b?y.fillStyle=x.color:y.strokeStyle=x.color;else{var pe=a.kq();if(se=te.width,he=te.height,E?(se=ne.width,he=ne.height):b||(se+=pe,he+=pe),(te=y instanceof Vc)&&x.xe&&(x.type===Md||x.yk===se&&x.ft===he))var ye=x.xe;else{var Te=0,ze=0,Ze=0,$e=0,it=0,Tt=0;if(Tt=it=0,E?(it=ne.x,Tt=ne.y):b||(it-=pe/2,Tt-=pe/2),Te=x.start.x*se+x.start.offsetX,ze=x.start.y*he+x.start.offsetY,Ze=x.end.x*se+x.end.offsetX,$e=x.end.y*he+x.end.offsetY,Te+=it,Ze+=it,ze+=Tt,$e+=Tt,x.type===Ku)ye=y.createLinearGradient(Te,ze,Ze,$e);else if(x.type===Ys)Tt=isNaN(x.endRadius)?Math.max(se,he)/2:x.endRadius,isNaN(x.startRadius)?(it=0,Tt=Math.max(se,he)/2):it=x.startRadius,ye=y.createRadialGradient(Te,ze,it,Ze,$e,Tt);else if(x.type===Md)try{ye=y.createPattern(x.pattern,"repeat")}catch(Nt){ye=null}if(x.type!==Md&&(E=x.colorStops,E!==null))for(E=E.iterator;E.next();)ye.addColorStop(E.key,E.value);if(te&&(x.xe=ye,ye!==null&&(x.yk=se,x.ft=he),ye===null&&x.type===Md&&x.yk!==-1)){x.yk=-1;var bt=a.diagram;bt!==null&&x.yk===-1&&qt(function(){bt.redraw()},600)}}b?y.fillStyle=ye:y.strokeStyle=ye}}}et.rg=function(a){if(a instanceof Cn)e:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break e}y=y.panel}a=!1}else a=!1;return a},et.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},et.If=function(){for(var a=this instanceof Cn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function ca(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){sl(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)}sl(a,!1),Zs(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Zs(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,Zs(a,!1)))}et.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=lt.alloc();te.yi(y,x,b,E,ti),a.rotate(this.Kb,te.x,te.y),lt.free(te)}},et.v=function(a){if(!Bs(this)){a===void 0&&(a=!1),Bo(this,!0),pu(this,!0);var y=this.panel;y===null||a||y.v()}},et.Uj=function(){Bs(this)||(Bo(this,!0),pu(this,!0))};function Za(a){if(!Xa(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof Rn&&a.Bd(),y.$b())),pu(a,!0)}}et.Uk=function(){!(this.l&2048)&&(sl(this,!0),Zs(this,!0))},et.Wu=function(){Zs(this,!0)},et.N=function(){var a=this.part;a!==null&&a.N()};function ls(a,y){var x=a.stretch,b=a.panel;return b!==null&&b.type===Cn.Table?Ol(a,b.Fb(a.row),b.Eb(a.column),y):b!==null&&b.type===Cn.Auto&&b.Pb()===a?oa(a,wn,y):x===Fr?b!==null?b.type===Cn.Spot&&b.Pb()===a?oa(a,wn,y):(x=b.defaultStretch,x===Fr?oa(a,gn,y):oa(a,x,y)):oa(a,gn,y):oa(a,x,y)}function Ol(a,y,x,b){var E=a.stretch;if(E!==Fr)return oa(a,E,b);var te=E=null;switch(y.stretch){case Sr:te=!0;break;case wn:te=!0}switch(x.stretch){case sr:E=!0;break;case wn:E=!0}return y=a.panel.defaultStretch,E===null&&(E=y===sr||y===wn),te===null&&(te=y===Sr||y===wn),E===!0&&te===!0?oa(a,wn,b):E===!0?oa(a,sr,b):te===!0?oa(a,Sr,b):oa(a,gn,b)}function oa(a,y,x){if(x)return y;if(y===gn||(x=a.desiredSize,x.w()))return gn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===sr)return gn;if(y===wn)return Sr}else{if(y===Sr)return gn;if(y===wn)return sr}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Sr)return gn;if(y===wn)return sr}else{if(y===sr)return gn;if(y===wn)return Sr}return y}function Sl(a,y){a.l=y?a.l|512:a.l&-513}function pa(a){return(a.l&1024)!==0}function Af(a,y){a.l=y?a.l|1024:a.l&-1025}function sl(a,y){a.l=y?a.l|2048:a.l&-2049}function Zs(a,y){a.l=y?a.l|4096:a.l&-4097}function Bs(a){return(a.l&8192)!==0}function Bo(a,y){a.l=y?a.l|8192:a.l&-8193}function Xa(a){return(a.l&16384)!==0}function pu(a,y){a.l=y?a.l|16384:a.l&-16385}et.Gj=function(){this.svg=null},et.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},et.Av=function(){},et.zv=function(a){return this.pa=a,Za(this),!0},et.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},et.kq=function(){return 0};function Hc(a){var y=a.part;if(y instanceof Rn&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||H1(y,a)}}function Xy(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof Cn?a instanceof Rn?a.Bd():a.qm(a,function(x){Hc(x)}):Hc(a))}et.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new Mo(a,y,x,b):E=a,E.xd=this,a=this.ih(),a!==null&&d1(a)&&Ot("Cannot add a Binding to a template that has already been copied: "+E),this.localBindings===null&&(this.localBindings=new yn),this.localBindings.add(E),this},et.set=function(a){return Object.assign(this,a),this},et.Du=function(a){return rv(this,a),this},et.apply=function(a){return a(this),this},et.nm=function(a){return Bc(this,a),this},et.pz=function(){return this.ih()},et.ih=function(){for(var a=this instanceof Cn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},et.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new Jt),this.animationTriggers.add(a.propertyName,a),this};function Xs(a,y){for(var x=1;x<arguments.length;++x);x=arguments;var b=null,E=null;if(typeof a=="function")E=a;else if(typeof a=="string"){var te=Pd.I(a);typeof te=="function"?(x=Kn(arguments),b=te(x),an(b)||Ot('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):E=An.go[a]}if(b===null&&(E!=null&&E.constructor||Ot("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),b=new E),E=1,b instanceof Vt&&1<x.length){te=b;var ne=x[1];(typeof ne=="string"||ne instanceof HTMLDivElement)&&(mp(te,ne),E++)}for(;E<x.length;E++)te=x[E],te===void 0?Ot("Undefined value at argument "+E+" for object being constructed by GraphObject.make: "+b):rv(b,te);return b}function rv(a,y){if(typeof y=="string")if(a instanceof Hi)a.text=y;else if(a instanceof Ir)a.figure=y;else if(a instanceof hs)a.source=y;else if(a instanceof Cn)y=xl.I(y),y!==null&&(a.type=y);else if(a instanceof Ti){var x=Xn(Ti,y);x!==null?a.type=x:Ot("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof Mn?(y=Xn(Mn,y),y!==null&&(a.type=y)):a instanceof fi&&(y=Xn(fi,y),y!==null&&(a.type=y));else if(y instanceof zt)a instanceof Cn||Ot("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Io){var b;y.isRow&&typeof a.getRowDefinition=="function"?b=a.getRowDefinition(y.index):y.isRow||typeof a.getColumnDefinition!="function"||(b=a.getColumnDefinition(y.index)),b instanceof Io?km(b,y):Ot("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof un)typeof a.qb=="function"&&a.qb(y);else if(y instanceof Go)a.type=y;else if(y instanceof Mo)a instanceof zt||a instanceof Io?a.bind(y):Ot("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof vl)a instanceof zt?a.Jv(y):Ot("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Oo)a instanceof Mn&&a.type===Mn.o?a.figures.add(y):Ot("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof fi)a instanceof Oo?a.segments.add(y):Ot("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof so)a instanceof Vt||a instanceof jr?a.layout=y:Ot("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++)rv(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof Ti){x=new ar;for(var E in y)b=parseFloat(E),isNaN(b)?x[E]=y[E]:a.addColorStop(b,y[E]);Bc(a,x)}else if(a instanceof Io){y.row!==void 0?(E=y.row,(E==null||E===1/0||isNaN(E)||0>E)&&Ot("Must specify non-negative integer row for RowColumnDefinition "+y+", not: "+E),a.isRow=!0,a.index=E):y.column!==void 0&&(E=y.column,(E==null||E===1/0||isNaN(E)||0>E)&&Ot("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+E),a.isRow=!1,a.index=E),E=new ar;for(x in y)x!=="row"&&x!=="column"&&(E[x]=y[x]);Bc(a,E)}else Bc(a,y);else Ot('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function yh(a,y){Pd.add(a,y)}function lm(a,y,x){x===void 0&&(x=null);var b=a[1];if(typeof x=="function"?x(b):typeof b=="string")return a.splice(1,1),b;if(y===void 0)throw Error("no "+(typeof x=="function"?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return y}Zt.Object.defineProperties(zt.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new jf),this.A.zp=a)}},localBindings:{get:function(){return this.A!==null?this.A.te:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new jf),this.A.te=a)}},srcBindings:{get:function(){return this.A!==null?this.A.wm:null},set:function(a){this.srcBindings!==a&&(this.A===null&&(this.A=new jf),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(Gr(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&&(Gr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Ja},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new nc),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Ja&&(this.angle=0))}},segmentIndex:{get:function(){return this.Ua!==null?this.Ua.u:-1/0},set:function(a){a=Math.round(a);var y=this.segmentIndex;y!==a&&(this.Ua===null&&(this.Ua=new nc),this.Ua.u=a,this.v(),this.g("segmentIndex",y,a))}},segmentFraction:{get:function(){return this.Ua!==null?this.Ua.o:0},set:function(a){isNaN(a)||0>a?a=0:1<a&&(a=1);var y=this.segmentFraction;y!==a&&(this.Ua===null&&(this.Ua=new nc),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:Bn},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new nc),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:Fr},set:function(a){var y=this.stretch;y!==a&&(Gr(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&&(Gr(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)&&_n(a,"0 <= value <= 1",zt,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N($c(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($c(y,y.actualBounds)))}},visible:{get:function(){return(this.l&1)!==0},set:function(a){var y=(this.l&1)!==0;y!==a&&(this.l^=1,this.g("visible",y,a),y=this.panel,y!==null?y.v():this.Dd()&&this.Zb(a),this.N(),Xy(this))}},pickable:{get:function(){return(this.l&2)!==0},set:function(a){var y=(this.l&2)!==0;y!==a&&(this.l^=2,this.g("pickable",y,a))}},fromLinkableDuplicates:{get:function(){return(this.l&4)!==0},set:function(a){var y=(this.l&4)!==0;y!==a&&(this.l^=4,this.g("fromLinkableDuplicates",y,a))}},fromLinkableSelfNode:{get:function(){return(this.l&8)!==0},set:function(a){var y=(this.l&8)!==0;y!==a&&(this.l^=8,this.g("fromLinkableSelfNode",y,a))}},toLinkableDuplicates:{get:function(){return(this.l&16)!==0},set:function(a){var y=(this.l&16)!==0;y!==a&&(this.l^=16,this.g("toLinkableDuplicates",y,a))}},toLinkableSelfNode:{get:function(){return(this.l&32)!==0},set:function(a){var y=(this.l&32)!==0;y!==a&&(this.l^=32,this.g("toLinkableSelfNode",y,a))}},isPanelMain:{get:function(){return(this.l&64)!==0},set:function(a){var y=(this.l&64)!==0;y!==a&&(this.l^=64,this.v(),this.g("isPanelMain",y,a))}},isActionable:{get:function(){return(this.l&128)!==0},set:function(a){var y=(this.l&128)!==0;y!==a&&(this.l^=128,this.g("isActionable",y,a))}},areaBackground:{get:function(){return this.A!==null?this.A.gd:null},set:function(a){var y=this.areaBackground;y!==a&&(a!==null&&Ff(a,"GraphObject.areaBackground"),a instanceof Ti&&a.freeze(),Gr(this),this.A.gd=a,this.N(),this.g("areaBackground",y,a))}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&Ff(a,"GraphObject.background"),a instanceof Ti&&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 fr)return this.Ng=a;a=a.panel}return null}},svg:{get:function(){return this.V},set:function(a){this.V=a}},panel:{get:function(){return this.Me}},layer:{get:function(){var a=this.part;return a!==null?a.layer:null}},diagram:{get:function(){var a=this.part;return a!==null?a.diagram:null}},position:{get:function(){return this.pa},set:function(a){var y=a.x,x=a.y,b=this.pa,E=b.x;b=b.y,(E===y||isNaN(E)&&isNaN(y))&&(b===x||isNaN(b)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,E,b)&&this.g("position",new lt(E,b),a))}},actualBounds:{get:function(){return this.Ib}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&(0>=a&&Ot("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ca=a,this.v(),this.g("scale",y,a))}},angle:{get:function(){return this.Kb},set:function(a){var y=this.Kb;y!==a&&(a%=360,0>a&&(a+=360),y!==a&&(this.Kb=a,Xy(this),this.v(),this.g("angle",y,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var y=a.width,x=a.height,b=this.jd,E=b.width,te=b.height;(E===y||isNaN(E)&&isNaN(y))&&(te===x||isNaN(te)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof Ir&&this.qc(),this.g("desiredSize",b,a),pa(this)&&(a=this.part,a!==null&&(Ji(this,a,"width"),Ji(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 fn(a,this.jd.height).freeze(),this.v(),this instanceof Ir&&this.qc(),this.g("desiredSize",y,a),pa(this)&&(a=this.part,a!==null&&Ji(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 fn(this.jd.width,a).freeze(),this.v(),this instanceof Ir&&this.qc(),this.g("desiredSize",y,a),pa(this)&&(a=this.part,a!==null&&Ji(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:nr},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(),Gr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:li},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(),Gr(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 Dr(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&&ca(this),this.Ab}},oe:{get:function(){return this.l&4096&&ca(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(Gr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:gn},set:function(a){this.reshapingBehavior!==a&&(Gr(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()&&Ot("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),Za(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&&_n(a,">= 0",zt,"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&&_n(a,">= 1",zt,"columnSpan"),Gr(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&&_n(a,">= 0",zt,"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&&_n(a,">= 1",zt,"rowSpan"),Gr(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&&(Gr(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 Rn||Ot("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Wv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,Z1(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:zr},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Hc(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&_n(a,">= 0",zt,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Hc(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),Hc(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&&_n(a,">= 0",zt,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:zr},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Hc(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&_n(a,">= 0",zt,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Hc(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),Hc(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&&_n(a,">= 0",zt,"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&&(Gr(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&&(Gr(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&&(Gr(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&&(Gr(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&&(Gr(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&&(Gr(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&&(Gr(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&&(Gr(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&&(Gr(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&&(Gr(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&&(Gr(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&&(Gr(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&&(Gr(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&&(Gr(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&&(Gr(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&&(Gr(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&&(Gr(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&&(Gr(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),zt.prototype.trigger=zt.prototype.Jv,zt.prototype.findBindingPanel=zt.prototype.ih,zt.prototype.findTemplateBinder=zt.prototype.pz,zt.prototype.setProperties=zt.prototype.nm,zt.prototype.apply=zt.prototype.apply,zt.prototype.attach=zt.prototype.Du,zt.prototype.set=zt.prototype.set,zt.prototype.isEnabledObject=zt.prototype.If,zt.prototype.isVisibleObject=zt.prototype.Ed,zt.prototype.isContainedBy=zt.prototype.rg,zt.prototype.getNearestIntersectionPoint=zt.prototype.rs,zt.prototype.getLocalPoint=zt.prototype.qs,zt.prototype.getDocumentScale=zt.prototype.Df,zt.prototype.getDocumentAngle=zt.prototype.li,zt.prototype.getDocumentBounds=zt.prototype.mi,zt.prototype.getDocumentPoint=zt.prototype.ga,zt.prototype.intersectsRect=zt.prototype.Yc,zt.prototype.containedInRect=zt.prototype.fh,zt.prototype.containsRect=zt.prototype.Re,zt.prototype.containsPoint=zt.prototype.ca,zt.prototype.raiseChanged=zt.prototype.g,zt.prototype.raiseChangedEvent=zt.prototype.cb,zt.prototype.addCopyProperty=zt.prototype.Vw;var Pd=null;zt.className="GraphObject",Pd=new Jt,yh("Button",function(){function a(x,b){return x.diagram.ic(x.documentPoint,function(E){for(;E.panel!==null&&!E.isActionable;)E=E.panel;return E},function(E){return E===b})!==null}var y=Xs(Cn,Cn.Auto,{isActionable:!0,enabledChanged:function(x,b){if(x instanceof Cn){var E=x.fb("ButtonBorder");E!==null&&(E.fill=b?x._buttonFillNormal:x._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD",_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},Xs(Ir,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Nn(0,0,2.76142374915397,2.761423749153969),spot2:new Nn(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return y.mouseEnter=function(x,b){if(b.If()&&b instanceof Cn&&(x=b.fb("ButtonBorder"),x instanceof Ir)){var E=b._buttonFillOver;b._buttonFillNormal=x.fill,x.fill=E,E=b._buttonStrokeOver,b._buttonStrokeNormal=x.stroke,x.stroke=E}},y.mouseLeave=function(x,b){b.If()&&b instanceof Cn&&(x=b.fb("ButtonBorder"),x instanceof Ir&&(x.fill=b._buttonFillNormal,x.stroke=b._buttonStrokeNormal))},y.actionDown=function(x,b){if(b.If()&&b instanceof Cn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof Ir){x=x.diagram;var te=x.skipsUndoManager;x.skipsUndoManager=!0;var ne=b._buttonFillPressed;b._buttonFillOver=E.fill,E.fill=ne,ne=b._buttonStrokePressed,b._buttonStrokeOver=E.stroke,E.stroke=ne,x.skipsUndoManager=te}}},y.actionUp=function(x,b){if(b.If()&&b instanceof Cn&&b._buttonFillPressed!==null&&x.button===0){var E=b.fb("ButtonBorder");if(E instanceof Ir){var te=x.diagram,ne=te.skipsUndoManager;te.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),te.skipsUndoManager=ne}}},y.actionCancel=function(x,b){if(b.If()&&b instanceof Cn&&b._buttonFillPressed!==null){var E=b.fb("ButtonBorder");if(E instanceof Ir){var te=x.diagram,ne=te.skipsUndoManager;te.skipsUndoManager=!0,a(x,b)?(E.fill=b._buttonFillOver,E.stroke=b._buttonStrokeOver):(E.fill=b._buttonFillNormal,E.stroke=b._buttonStrokeNormal),te.skipsUndoManager=ne}}},y.actionMove=function(x,b){if(b.If()&&b instanceof Cn&&b._buttonFillPressed!==null){var E=x.diagram;if(E.firstInput.button===0&&(E.currentTool.standardMouseOver(),a(x,b)&&(x=b.fb("ButtonBorder"),x instanceof Ir))){var te=E.skipsUndoManager;E.skipsUndoManager=!0;var ne=b._buttonFillPressed;x.fill!==ne&&(x.fill=ne),ne=b._buttonStrokePressed,x.stroke!==ne&&(x.stroke=ne),E.skipsUndoManager=te}}},y}),yh("TreeExpanderButton",function(){var a=Xs("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Xs(Ir,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Zr},new Mo("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Mo("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof di&&(x=x.adornedPart),x instanceof Rn){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isTreeExpanded){if(!b.canCollapseTree(x))return}else if(!b.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?b.collapseTree(x):b.expandTree(x)}}},a}),yh("SubGraphExpanderButton",function(){var a=Xs("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Xs(Ir,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Zr},new Mo("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 di&&(x=x.adornedPart),x instanceof jr){var b=x.diagram;if(b!==null){if(b=b.commandHandler,x.isSubGraphExpanded){if(!b.canCollapseSubGraph(x))return}else if(!b.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?b.collapseSubGraph(x):b.expandSubGraph(x)}}},a}),yh("ToolTip",function(){return Xs(di,Cn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new lt(0,3),shadowBlur:5},Xs(Ir,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Nn(0,0,4,6),spot2:new Nn(1,1,-4,-4)}))}),yh("ContextMenu",function(){return Xs(di,Cn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new lt(0,3),shadowBlur:5},new Mo("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),yh("ContextMenuButton",function(){var a=Xs("Button");a.stretch=sr;var y=a.fb("ButtonBorder");return y instanceof Ir&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new Nn(0,0,2,3),y.spot2=new Nn(1,1,-2,-2)),a}),yh("PanelExpanderButton",function(a){var y=lm(a,"COLLAPSIBLE"),x=Xs("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},Xs(Ir,{name:"ButtonIcon",strokeWidth:2},new Mo("geometryString","visible",function(b){return b?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof Ir&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(b,E){var te=E.diagram;if(te!==null&&!te.isReadOnly){var ne=E.ih();ne===null&&(ne=E.part),ne!==null&&(E=ne.fb(y),E!==null&&(b.handled=!0,te.Ea("Collapse/Expand Panel"),E.visible=!E.visible,te.eb("Collapse/Expand Panel")))}},x}),yh("CheckBoxButton",function(a){var y=lm(a);return a=Xs("Button",{desiredSize:new fn(14,14)},Xs(Ir,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:wn,geometryStretch:rr,visible:!1},y!==""?new Mo("visible",y).Kx():[])),a.click=function(x,b){if(b instanceof Cn){var E=x.diagram;if(!(E===null||E.isReadOnly||y!==""&&E.model.isReadOnly)){x.handled=!0;var te=b.fb("ButtonIcon");E.Ea("checkbox"),te.visible=!te.visible,typeof b._doClick=="function"&&b._doClick(x,b),E.eb("checkbox")}}},a}),yh("CheckBox",function(a){a=lm(a),a=Xs("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Dr(0,1,0,0)});var y=Xs(Cn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Dr(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}),zt.None=gn=new un(zt,"None",0),zt.Default=Fr=new un(zt,"Default",0),zt.Vertical=Sr=new un(zt,"Vertical",4),zt.Horizontal=sr=new un(zt,"Horizontal",5),zt.Fill=wn=new un(zt,"Fill",3),zt.Uniform=rr=new un(zt,"Uniform",1),zt.UniformToFill=Qr=new un(zt,"UniformToFill",2),zt.FlipVertical=Kr=new un(zt,"FlipVertical",1),zt.FlipHorizontal=ui=new un(zt,"FlipHorizontal",2),zt.FlipBoth=Ai=new un(zt,"FlipBoth",3),zt.make=Xs,zt.getBuilders=function(){var a=new Jt,y;for(y in Pd)if(y!==y.toLowerCase()){var x=Pd.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},zt.defineBuilder=yh,zt.build=function(a,y,x){for(var b=[],E=2;E<arguments.length;++E)b[E-2]=arguments[E];if(E=Pd.I(a),typeof E=="function"&&(b=E([a].concat(b)),b instanceof zt))return y&&b.set(y),b;Ot('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},zt.takeBuilderArgument=lm;function jf(){this.nc=!1,this.xa="",this.zp=-1,this.nb=this.wm=this.te=null,this.j="",this.hb=this.Di=this.Hb=this.Ch=this.$h=this.F=this.Ha=this.ia=this.V=this.Lh=this.Xd=this.Of=this.Nh=this.Oh=this.Qh=this.Ph=this.Mh=this.Bh=this.Fh=this.zh=null,this.u=nr,this.o=li,this.hg=Fr,this.ob=this.Bi=1,this.Pf=gn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}jf.prototype.copy=function(){var a=new jf;return a.xa=this.xa,a.zp=this.zp,a.te=this.te,a.nb=this.nb,a.j=this.j,a.zh=this.zh,a.Fh=this.Fh,a.Bh=this.Bh,a.Mh=this.Mh,a.Ph=this.Ph,a.Qh=this.Qh,a.Oh=this.Oh,a.Nh=this.Nh,a.Of=this.Of,a.Xd=this.Xd,a.Lh=this.Lh,a.V=this.V,a.ia=this.ia,a.Ha=this.Ha,a.F=this.F,a.$h=this.$h,a.Ch=this.Ch,a.Hb=this.Hb,a.Di=this.Di,a.hb=this.hb,a.u=this.u.J(),a.o=this.o.J(),a.hg=this.hg,a.Bi=this.Bi,a.ob=this.ob,a.Pf=this.Pf,a.gd=this.gd,a.Ci=this.Ci,a.Pc=this.Pc,a.Oc=this.Oc,a};function nc(){this.u=-1/0,this.o=0,this.F=Bn,this.rr=Ja,this.j=this.V="None"}nc.prototype.copy=function(){var a=new nc;return a.u=this.u,a.o=this.o,a.F=this.F.J(),a.rr=this.rr,a.V=this.V,a.j=this.j,a},nc.className="LinkElementSettings";function Gp(){this.yj=this.Xi=Vo,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}Gp.prototype.copy=function(){var a=new Gp;return a.Xi=this.Xi.J(),a.yj=this.yj.J(),a.Vi=this.Vi,a.wj=this.wj,a.Wi=this.Wi,a.xj=this.xj,a.hq=this.hq,a.Tr=this.Tr,a.iq=this.iq,a.Ur=this.Ur,a},Gp.className="LinkSettings";function Kc(){this.ha=[1,0,0,1,0,0]}Kc.prototype.copy=function(){var a=new Kc;return a.ha[0]=this.ha[0],a.ha[1]=this.ha[1],a.ha[2]=this.ha[2],a.ha[3]=this.ha[3],a.ha[4]=this.ha[4],a.ha[5]=this.ha[5],a},Kc.prototype.translate=function(a,y){this.ha[4]+=this.ha[0]*a+this.ha[2]*y,this.ha[5]+=this.ha[1]*a+this.ha[3]*y},Kc.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},Kc.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a!==0){if(this.translate(y,x),a===90){a=0;var b=1}else a===180?(a=-1,b=0):a===270?(a=0,b=-1):(b=a*Math.PI/180,a=Math.cos(b),b=Math.sin(b));var E=this.ha[1]*a+this.ha[3]*b,te=this.ha[0]*-b+this.ha[2]*a,ne=this.ha[1]*-b+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*b,this.ha[1]=E,this.ha[2]=te,this.ha[3]=ne,this.translate(-y,-x)}},Kc.className="STransform";function Of(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Of.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Of.className="SGradient";function Jl(a,y,x){this.ownerDocument=a=y===void 0?An.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 bs(this,x)}Jl.prototype.resize=function(a,y,x,b){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=b+"px",this.Oa.setAttributeNS(null,"width",x+"px"),this.Oa.setAttributeNS(null,"height",b+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+x+" "+b),this.context.ww.firstElementChild.setAttributeNS(null,"width",x+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",b+"px"),!0):!1},Jl.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),an(y))for(var b in y)a.setAttributeNS(b==="href"?"http://www.w3.org/1999/xlink":"",b,y[b]);return x!==void 0&&(a.textContent=x),a},Jl.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Jl.prototype.focus=function(){this.Oa.focus()},Jl.prototype.mx=function(){this.ownerDocument=null},Zt.Object.defineProperties(Jl.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}}}),Jl.className="SVGSurface";function bs(a,y){this.Gv=a,this.svg=a.Oa,this.stack=[],this.nh=[],this.fillStyle="#000000",this.font="10px sans-serif",this.globalAlpha=1,this.lineCap="butt",this.lineDashOffset=0,this.lineJoin="miter",this.lineWidth=1,this.miterLimit=10,this.shadowBlur=0,this.shadowColor="rgba(0, 0, 0, 0)",this.shadowOffsetY=this.shadowOffsetX=0,this.Il=!1,this.strokeStyle="#000000",this.textAlign="start",this.clipInsteadOfFill=!1,this.Vg=this.Br=this.Ar=0,this.yd=this.ad=null,this.path=[],this.Yl={},this.Ct=!1,this.Yg=null,this.uj=0,this.rb=new Kc,this.j=um(this),this.Nj=um(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Zi++,b=this.Ud("clipPath",{id:"mainClip"+x});b.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=b,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(b),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function Yy(a,y,x,b,E,te,ne){a.Nj===void 0?Up(a,y,x,b,E,te,ne):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+b+", "+E+", "+te+", "+ne+")")}et=bs.prototype,et.arc=function(a,y,x,b,E,te,ne,se){var he=2*Math.PI,pe=he-1e-6,ye=x*Math.cos(b),Te=x*Math.sin(b),ze=a+ye,Ze=y+Te,$e=te?0:1;b=te?b-E:E-b,(1e-6<Math.abs(ne-ze)||1e-6<Math.abs(se-Ze))&&this.path.push(["L",ze,+Ze]),0>b&&(b=b%he+he),b>pe?(this.path.push(["A",x,x,0,1,$e,a-ye,y-Te]),this.path.push(["A",x,x,0,1,$e,ze,Ze])):1e-6<b&&this.path.push(["A",x,x,0,+(b>=Math.PI),$e,a+x*Math.cos(E),y+x*Math.sin(E)])},et.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},et.Se=function(a){this.addPath(this.path,this.rb,a||0)},et.bezierCurveTo=function(a,y,x,b,E,te){this.path.push(["C",a,y,x,b,E,te])},et.clearRect=function(){},et.clip=function(){this.Yl.clipPath=!0},et.closePath=function(){this.path.push(["z"])},et.createLinearGradient=function(a,y,x,b){var E=new Of("linear");return E.x1=a,E.y1=y,E.x2=x,E.y2=b,E},et.createPattern=function(a){var y="";a instanceof HTMLCanvasElement&&(y=a.toDataURL()),a instanceof HTMLImageElement&&(y=a.getAttribute("src"));var x=this.eA;if(x[y])return"url(#"+x[y]+")";var b="PATTERN"+Zi++,E={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:b,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud(Uc,E)),this.svg.appendChild(a),x[y]=b,"url(#"+b+")"},et.createRadialGradient=function(a,y,x,b,E,te){var ne=new Of("radial");return ne.x1=a,ne.y1=y,ne.r1=x,ne.x2=b,ne.y2=E,ne.r2=te,ne};function $y(a,y,x,b,E,te,ne,se,he){b=se/b,E=he/E,te===0&&ne===0||a.rb.translate(te,ne),b===1&&E===1||a.rb.scale(b,E),y===0&&x===0||a.rb.translate(-y,-x)}et.drawImage=function(a,y,x,b,E,te,ne,se,he){var pe="";a instanceof HTMLCanvasElement&&(pe=a.toDataURL()),a instanceof HTMLImageElement&&(pe=a.getAttribute("src"));var ye=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,b===void 0&&(te=y,ne=x,se=b=ye,he=E=a),b=b||0,E=E||0,se=se||0,he=he||0,$y(this,y,x,b,E,te||0,ne||0,se,he),te={x:0,y:0,width:ye||b,height:a||E,href:pe},Gt.$(b,se)&&Gt.$(E,he)?pe.toLowerCase().indexOf(".svg")===-1&&pe.toLowerCase().indexOf("data:image/svg")===-1&&(te.preserveAspectRatio="xMidYMid slice"):te.preserveAspectRatio="none",(y!==0||x!==0||b!==ye||E!==a)&&(b+=y,E+=x,te["clip-path"]="path('M "+y+","+x+" L "+b+" "+x+" L "+b+" "+E+" L "+y+" "+E+" z')"),bd(this,Uc,te,this.rb),this.addElement(Uc,te)},et.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),iv(this,this.Yl)},et.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},et.fillRect=function(a,y,x,b){a=[a,y,x,b],a={x:a[0],y:a[1],width:a[2],height:a[3]},bd(this,"fill",a,this.rb),this.addElement("rect",a)},et.ox=function(a,y,x,b){a={x:a,y,width:x,height:b},bd(this,"fill",a,this.rb),iv(this,a),this.svg.prepend(this.Ud("rect",a))},et.fillText=function(a,y,x){a=[a,y,x],y=this.textAlign,y==="left"?y="start":y==="right"?y="end":y==="center"&&(y="middle"),y={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":y},bd(this,"fill",y,this.rb),this.addElement("text",y,a[0])},et.lineTo=function(a,y){this.path.push(["L",a,y])},et.moveTo=function(a,y){this.path.push(["M",a,y])},et.quadraticCurveTo=function(a,y,x,b){this.path.push(["Q",a,y,x,b])},et.rect=function(a,y,x,b){this.path.push(["M",a,y],["L",a+x,y],["L",a+x,y+b],["L",a,y+b],["z"])},et.restore=function(){this.rb=this.stack.pop(),this.path=this.stack.pop();var a=this.stack.pop();this.fillStyle=a.fillStyle,this.font=a.font,this.globalAlpha=a.globalAlpha,this.lineCap=a.lineCap,this.lineDashOffset=a.lineDashOffset,this.lineJoin=a.lineJoin,this.lineWidth=a.lineWidth,this.miterLimit=a.miterLimit,this.shadowBlur=a.shadowBlur,this.shadowColor=a.shadowColor,this.shadowOffsetX=a.shadowOffsetX,this.shadowOffsetY=a.shadowOffsetY,this.strokeStyle=a.strokeStyle,this.textAlign=a.textAlign,this.bk=a.bk},et.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign,bk:this.bk});for(var a=[],y=0;y<this.path.length;y++)a.push(this.path[y]);this.stack.push(a),this.stack.push(this.rb.copy())},et.setTransform=function(a,y,x,b,E,te){a===1&&y===0&&x===0&&b===1&&E===0&&te===0||Up(this,a,y,x,b,E,te)};function Jy(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}et.scale=function(a,y){this.rb.scale(a,y)},et.translate=function(a,y){this.rb.translate(a,y)},et.transform=function(){},et.yc=function(){},et.stroke=function(){qy(this,this.Yl)},et.jk=function(){this.clipInsteadOfFill||this.stroke()},et.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},et.addElement=function(a,y,x){return a=this.Ud(a,y,x),this.yd!==null?this.yd.appendChild(a):this.yd=a,this.ad=a};function bd(a,y,x,b){y==="fill"?iv(a,x):y==="stroke"&&qy(a,x),b!==null&&(a=b.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function iv(a,y){a.fillStyle instanceof Of?y.fill=ov(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 Qy(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof Of?y.setAttributeNS(null,"fill",ov(a,a.fillStyle,!0)):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.setAttributeNS(null,x,"rgb("+a[1]+","+a[2]+","+a[3]+")"),y.setAttributeNS(null,x+"-opacity",a[4])):y.setAttributeNS(null,x,a.fillStyle)}function qy(a,y){if(a.strokeStyle instanceof Of)y.stroke=ov(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 ov(a,y,x){var b="";if(b=a.Hl!==null?a.Hl.getAttribute(x?"fill":"stroke"):null,b!==null&&b.indexOf("GRAD")!==-1?(b=b.split("#")[1].slice(0,-1),x=a.svg.getElementById(b),x!==null&&x.remove()):b="GRAD"+Zi++,y.type==="linear")x=a.Ud("linearGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,id:b,gradientUnits:"userSpaceOnUse"});else if(y.type==="radial")x=a.Ud("radialGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,r1:y.r1,r2:y.r2,id:b});else throw Error("invalid gradient");var E=y.gx;y=E.length;for(var te=[],ne=0;ne<y;ne++){var se=E[ne],he=se.color;se={offset:se.offset,"stop-color":he},/^rgba\(/.test(he)&&(he=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(he),se["stop-color"]="rgb("+he[1]+","+he[2]+","+he[3]+")",se["stop-opacity"]=he[4]),te.push(se)}for(te.sort(function(pe,ye){return pe.offset>ye.offset?1:-1}),E=0;E<y;E++)x.appendChild(a.Ud("stop",te[E]));return a.svg.appendChild(x),"url(#"+b+")"}et.addPath=function(a,y,x){for(var b=[],E=0;E<a.length;E++){var te=Kn(a[E]),ne=[te.shift()];if(ne[0]==="A")ne.push(te.shift()+","+te.shift(),te.shift(),te.shift()+","+te.shift(),te.shift()+","+te.shift());else for(;te.length;)ne.push(te.shift()+","+te.shift());b.push(ne.join(" "))}if(b=b.join(" "),a=this.Yl,a.clipPath)0<this.nh.length&&this.nh[this.nh.length-1].setAttributeNS(null,"clip-path",'path("'+b+'")');else if(a.d=b,bd(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var se in a)se!=="transform"&&y.setAttributeNS(null,se,a[se]);else{se=y.getElementsByTagName("path");for(var he in a)he!=="transform"&&se[x].setAttributeNS(null,he,a[he])}else this.addElement("path",a)};function Up(a,y,x,b,E,te,ne){var se=new Kc;se.ha=[y,x,b,E,te,ne],y={},bd(a,"g",y,se),se=a.addElement("g",y),a.nh.push(se)}function um(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}et.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function gu(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function Wu(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}et.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},et.fs=function(){this.Ct=!1},et.Vc=function(){},et.Wx=function(){},bs.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},bs.prototype.getImageData=function(){return null},bs.prototype.measureText=function(){return null};function hm(a,y){y=y.getAttribute("fill"),y!==null&&(y=y.split("#"),y.length!==1&&(y=a.svg.getElementById(y[1].slice(0,-1)),y!==null&&a.svg.innerHTML.match(new RegExp(y.id,"g")).length===1&&y.remove()))}bs.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},bs.className="SVGContext",Vt.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Jl(this,An.document));var y=new Jl(this,An.document,!0);a===void 0&&(a=new ar);var x=this;return kf(this,function(b,E){return b=im(x,b,"SVG",y),b=b!==null?b.svg:null,typeof E=="function"?(E(b),null):b},a)},Vt.prototype.makeSvg=Vt.prototype.Cs,Vt.prototype.av=function(a){return this.Cs(a)},Vt.prototype.makeSVG=Vt.prototype.av;function ll(a,y,x,b){this.ownerDocument=y=y===void 0?An.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Vc(y,x,b),y.H=a}ll.prototype.resize=function(a,y,x,b){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=b+"px",!0):!1},ll.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},ll.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},ll.prototype.focus=function(){this.Oa.focus()},ll.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},Zt.Object.defineProperties(ll.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}}}),ll.className="CanvasSurface";function Vc(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&Ot("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 Mr,this.isTemporary=!!x}et=Vc.prototype,et.Wx=function(a){this.Z.imageSmoothingEnabled=a},et.arc=function(a,y,x,b,E,te){this.Z.arc(a,y,x,b,E,te)},et.beginPath=function(){this.Z.beginPath()},et.Se=function(){},et.bezierCurveTo=function(a,y,x,b,E,te){this.Z.bezierCurveTo(a,y,x,b,E,te)},et.clearRect=function(a,y,x,b){this.yc(),this.Z.clearRect(a,y,x,b)},et.clip=function(){this.Z.clip()},et.closePath=function(){this.Z.closePath()},et.createLinearGradient=function(a,y,x,b){return this.Z.createLinearGradient(a,y,x,b)},et.createPattern=function(a,y){return this.Z.createPattern(a,y)},et.createRadialGradient=function(a,y,x,b,E,te){return this.Z.createRadialGradient(a,y,x,b,E,te)},et.drawImage=function(a,y,x,b,E,te,ne,se,he){b===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,b,E,te,ne,se,he)},et.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},et.fillRect=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},et.ox=function(a,y,x,b){this.Z.fillRect(a,y,x,b)},et.fillText=function(a,y,x){this.Z.fillText(a,y,x)},et.getImageData=function(a,y,x,b){return this.Z.getImageData(a,y,x,b)},et.lineTo=function(a,y){this.Z.lineTo(a,y)},et.measureText=function(a){return this.Z.measureText(a)},et.moveTo=function(a,y){this.Z.moveTo(a,y)},et.quadraticCurveTo=function(a,y,x,b){this.Z.quadraticCurveTo(a,y,x,b)},et.rect=function(a,y,x,b){this.Z.rect(a,y,x,b)},et.restore=function(){this.Z.restore()},et.save=function(){this.yc(),this.Z.save()},Vc.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},et=Vc.prototype,et.setTransform=function(a,y,x,b,E,te){this.El.setTransform(a,y,x,b,E,te)},et.scale=function(a,y){this.El.scale(a,y)},et.translate=function(a,y){this.El.translate(a,y)},et.stroke=function(){this.Z.stroke()},et.transform=function(a,y,x,b,E,te){if(a!==1||y!==0||x!==0||b!==1||E!==0||te!==0){var ne=this.El,se=ne.m11*a+ne.m21*y;a=ne.m12*a+ne.m22*y,y=ne.m11*x+ne.m21*b,x=ne.m12*x+ne.m22*b,ne.dx=ne.m11*E+ne.m21*te+ne.dx,ne.dy=ne.m12*E+ne.m22*te+ne.dy,ne.m11=se,ne.m12=a,ne.m21=y,ne.m22=x}},et.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},et.ng=function(a,y){if(a instanceof Ti&&a.type===Ys){var x=a.yk;a=a.ft,a>x?(this.scale(x/a,1),this.translate((a-x)/2,0)):x>a&&(this.scale(1,a/x),this.translate(0,(x-a)/2)),this.Hm?this.clip():this.fill(y),a>x?(this.translate(-(a-x)/2,0),this.scale(1/(x/a),1)):x>a&&(this.translate(0,-(x-a)/2),this.scale(1,1/(a/x)))}else this.Hm?this.clip():this.fill(y)},et.jk=function(){this.Hm||this.stroke()},et.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},et.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},et.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vx),a.lineDashOffset=0)},et.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},et.Hs=function(){},Zt.Object.defineProperties(Vc.prototype,{fillStyle:{get:function(){return this.Z.fillStyle},set:function(a){this.ct!==a&&(this.ct=this.Z.fillStyle=a)}},font:{get:function(){return this.Z.font},set:function(a){this.dt!==a&&(this.dt=this.Z.font=a)}},globalAlpha:{get:function(){return this.Z.globalAlpha},set:function(a){this.Z.globalAlpha=a}},lineCap:{get:function(){return this.Z.lineCap},set:function(a){this.Z.lineCap=a}},lineDashOffset:{get:function(){return this.Z.lineDashOffset},set:function(a){this.Z.lineDashOffset=a}},lineJoin:{get:function(){return this.Z.lineJoin},set:function(a){this.Z.lineJoin=a}},lineWidth:{get:function(){return this.Z.lineWidth},set:function(a){this.Z.lineWidth=a}},miterLimit:{get:function(){return this.Z.miterLimit},set:function(a){this.Z.miterLimit=a}},shadowBlur:{get:function(){return this.Z.shadowBlur},set:function(a){this.Z.shadowBlur=a}},shadowColor:{get:function(){return this.Z.shadowColor},set:function(a){this.Z.shadowColor=a}},shadowOffsetX:{get:function(){return this.Z.shadowOffsetX},set:function(a){this.Z.shadowOffsetX=a}},shadowOffsetY:{get:function(){return this.Z.shadowOffsetY},set:function(a){this.Z.shadowOffsetY=a}},strokeStyle:{get:function(){return this.Z.strokeStyle},set:function(a){this.et!==a&&(this.et=this.Z.strokeStyle=a)}},textAlign:{get:function(){return this.Z.textAlign},set:function(a){this.Z.textAlign=a}},imageSmoothingEnabled:{get:function(){return this.Z.imageSmoothingEnabled},set:function(a){this.Z.imageSmoothingEnabled=a}},filter:{get:function(){return this.Z.filter},set:function(a){this.Z.filter=a===""?"none":a}},clipInsteadOfFill:{get:function(){return this.Hm},set:function(a){this.Hm=a}}});var vx=Object.freeze([]);Vc.className="CanvasSurfaceContext";function Wp(){this.F=this.o=this.u=this.j=0}Wp.className="ColorNumbers";function Ti(a,y){Td||(cv(),Td=!0),yr(this),this._isFrozen=!1,a===void 0?(this.na=Sh,this.xk="black"):typeof a=="string"?(this.na=Sh,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===Ku?(this.Qd=co,this.Lk=jo):this.Lk=a===Ys?this.Qd=ti:this.Qd=zr,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}Ti.prototype.copy=function(){var a=new Ti;return a.na=this.na,a.xk=this.xk,a.Qd=this.Qd.J(),a.Lk=this.Lk.J(),a.Gr=this.Gr,a.Xp=this.Xp,this.we!==null&&(a.we=this.we.copy()),a.cr=this.cr,a},et=Ti.prototype,et.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},et.ka=function(){return Object.isFrozen(this)&&Ot("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},et.qb=function(a){a.classType===Ti&&(this.type=a)},et.toString=function(){var a="Brush(";if(this.type===Sh)a+=this.color;else if(a=this.type===Ku?a+"Linear ":this.type===Ys?a+"Radial ":this.type===Md?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,this.colorStops!==null)for(var y=this.colorStops.iterator;y.next();)a+=" "+y.key+":"+y.value;return a+")"},et.addColorStop=function(a,y){return this._isFrozen&&vn(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&_n(a,"0 <= loc <= 1",Ti,"addColorStop:loc"),this.we===null&&(this.we=new Jt),this.we.add(a,y),this.na===Sh&&(this.type=Ku),this.xe=null,this},et.Vz=function(a,y){if(this._isFrozen&&vn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Ld:y,this.type===Sh)Hu(this.color),this.color=Ed(a,y);else if((this.type===Ku||this.type===Ys)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Hu(x.value),this.addColorStop(x.key,Ed(a,y));return this};function e1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Ld:x,Hu(a),Ed(y,x)}et.Wy=function(a,y){if(this._isFrozen&&vn(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Ld:y,this.type===Sh)Hu(this.color),this.color=Ed(-a,y);else if((this.type===Ku||this.type===Ys)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Hu(x.value),this.addColorStop(x.key,Ed(-a,y));return this};function t1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Ld:x,Hu(a),Ed(-y,x)}function av(a,y,x){Hu(a),a=Vi.j;var b=Vi.u,E=Vi.o,te=Vi.F;return Hu(y),x===void 0&&(x=.5),"rgba("+Math.round((Vi.j-a)*x+a)+", "+Math.round((Vi.u-b)*x+b)+", "+Math.round((Vi.o-E)*x+E)+", "+Math.round((Vi.F-te)*x+te)+")"}et.Gx=function(){if(this.type===Sh)return Cd(this.color);if((this.type===Ku||this.type===Ys)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Ys)return Cd(a.first().value);if(a.get(.5)!==null)return Cd(a.get(.5));if(a.count===2)return a=a.Fa(),Cd(av(a[0].value,a[1].value));for(var y=a.iterator,x=-1,b=-1,E=1,te=1;y.next();){var ne=y.key,se=Math.abs(.5-y.key);E>te&&se<E?(x=ne,E=se):te>=E&&se<te&&(b=ne,te=se)}return x>b&&(te=x,x=b,b=te,te=E),E=b-x,Cd(av(a.get(x),a.get(b),1-te/E))}return!1};function Cd(a){return a?a instanceof Ti?a.Gx():(Hu(a),128>(299*Vi.j+587*Vi.u+114*Vi.o)/1e3):!1}function Ed(a,y){switch(y){case Ld:y=100*lv(Vi.j);var x=100*lv(Vi.u),b=100*lv(Vi.o);return Ya.j=.4124564*y+.3575761*x+.1804375*b,Ya.u=.2126729*y+.7151522*x+.072175*b,Ya.o=.0193339*y+.119192*x+.9503041*b,Ya.F=Vi.F,y=hv(Ya.j/kd[0]),x=hv(Ya.u/kd[1]),b=hv(Ya.o/kd[2]),mu.j=116*x-16,mu.u=500*(y-x),mu.o=200*(x-b),mu.F=Ya.F,mu.j=Math.min(100,Math.max(0,mu.j+100*a)),a=(mu.j+16)/116,y=a-mu.o/200,Ya.j=kd[0]*n1(mu.u/500+a),Ya.u=kd[1]*(mu.j>cm*fv?Math.pow(a,3):mu.j/cm),Ya.o=kd[2]*n1(y),Ya.F=mu.F,a=-.969266*Ya.j+1.8760108*Ya.u+.041556*Ya.o,y=.0556434*Ya.j+-.2040259*Ya.u+1.0572252*Ya.o,Vi.j=255*uv((3.2404542*Ya.j+-1.5371385*Ya.u+-.4985314*Ya.o)/100),Vi.u=255*uv(a/100),Vi.o=255*uv(y/100),Vi.F=Ya.F,Vi.j=Math.round(Vi.j),255<Vi.j?Vi.j=255:0>Vi.j&&(Vi.j=0),Vi.u=Math.round(Vi.u),255<Vi.u?Vi.u=255:0>Vi.u&&(Vi.u=0),Vi.o=Math.round(Vi.o),255<Vi.o?Vi.o=255:0>Vi.o&&(Vi.o=0),"rgba("+Vi.j+", "+Vi.u+", "+Vi.o+", "+Vi.F+")";case r1:return sv(),Is.o=Math.min(100,Math.max(0,Is.o+100*a)),"hsla("+Is.j+", "+Is.u+"%, "+Is.o+"%, "+Is.F+")";default:Ot("Unknown color space: "+y)}}function Hu(a){Td||(cv(),Td=!0);var y=dv;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,Vi.j=a[0],Vi.u=a[1],Vi.o=a[2],Vi.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Vi.j=0,Vi.u=0,Vi.o=0,Vi.F=1)}}function sv(){var a=Vi.j/255,y=Vi.u/255,x=Vi.o/255,b=Math.max(a,y,x),E=Math.min(a,y,x),te=b-E;if(E=(b+E)/2,te===0)var ne=a=0;else{switch(b){case a:ne=(y-x)/te%6;break;case y:ne=(x-a)/te+2;break;case x:ne=(a-y)/te+4}ne*=60,0>ne&&(ne+=360),a=te/(1-Math.abs(2*E-1))}Is.j=Math.round(ne),Is.u=Math.round(100*a),Is.o=Math.round(100*E),Is.F=Vi.F}function lv(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function uv(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function hv(a){return a>fv?Math.pow(a,1/3):(cm*a+16)/116}function n1(a){var y=a*a*a;return y>fv?y:(116*a-16)/cm}function Ff(a,y){typeof a!="string"&&(a instanceof Ti||Ot("Value for "+y+" must be a color string or a Brush, not "+a))}function cv(){dv=vo?new ll(null,void 0,{willReadFrequently:!0}).context:null}Zt.Object.defineProperties(Ti.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&vn(this,a),this.na=a,this.start.Mc()&&(a===Ku?this.start=co:a===Ys&&(this.start=ti)),this.end.Mc()&&(a===Ku?this.end=jo:a===Ys&&(this.end=ti)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&vn(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&vn(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&vn(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&vn(this,a),0>a&&_n(a,">= zero",Ti,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&vn(this,a),0>a&&_n(a,">= zero",Ti,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&vn(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&vn(this,a),this.cr=a,this.xe=null}}}),Ti.prototype.isDark=Ti.prototype.Gx,Ti.prototype.darkenBy=Ti.prototype.Wy,Ti.prototype.lightenBy=Ti.prototype.Vz,Ti.prototype.addColorStop=Ti.prototype.addColorStop;var fv=216/24389,cm=24389/27,kd=[95.047,100,108.883],dv=null,Vi=new Wp,Is=new Wp,Ya=new Wp,mu=new Wp,Td=!1;Ti.className="Brush";var Sh;Ti.Solid=Sh=new un(Ti,"Solid",0);var Ku;Ti.Linear=Ku=new un(Ti,"Linear",1);var Ys;Ti.Radial=Ys=new un(Ti,"Radial",2);var Md;Ti.Pattern=Md=new un(Ti,"Pattern",4);var Ld;Ti.Lab=Ld=new un(Ti,"Lab",5);var r1;Ti.HSL=r1=new un(Ti,"HSL",6),Ti.randomColor=function(a,y){a===void 0&&(a=128),y===void 0&&(y=Math.max(a,255));var x=Math.abs(y-a);y=Math.floor(a+Math.random()*x).toString(16);var b=Math.floor(a+Math.random()*x).toString(16);return a=Math.floor(a+Math.random()*x).toString(16),2>y.length&&(y="0"+y),2>b.length&&(b="0"+b),2>a.length&&(a="0"+a),"#"+y+b+a},Ti.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;Td||(cv(),Td=!0);var y=dv;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)},Ti.lighten=function(a){return e1(a)},Ti.lightenBy=e1,Ti.darken=function(a){return t1(a)},Ti.darkenBy=t1,Ti.mix=av,Ti.isDark=Cd;function Go(){this.xa="Base"}Go.prototype.measure=function(){},Go.prototype.Yz=function(a,y,x,b,E){a.measure(y,x,b,E)},Go.prototype.arrange=function(){},Go.prototype.Ly=function(a,y,x,b,E,te){a.arrange(y,x,b,E,te)},Go.prototype.iA=function(a){a.Uj()},Go.prototype.gc=function(){},Zt.Object.defineProperties(Go.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Cn}}}),Go.prototype.remeasureObject=Go.prototype.iA,Go.prototype.arrangeElement=Go.prototype.Ly,Go.prototype.measureElement=Go.prototype.Yz,Go.className="PanelLayout";function fm(){this.xa="Base"}nn(fm,Go),fm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length;a=Vu(a);for(var he=0;he<se;he++){var pe=b[he];if(pe.visible||pe===a){var ye=pe.margin,Te=ye.right+ye.left;ye=ye.top+ye.bottom,pe.measure(y,x,te,ne);var ze=pe.measuredBounds;Te=Math.max(ze.width+Te,0),ye=Math.max(ze.height+ye,0),ze=pe.position.x;var Ze=pe.position.y;isFinite(ze)||(ze=0),isFinite(Ze)||(Ze=0),pe instanceof Ir&&pe.isGeometryPositioned&&(pe=pe.strokeWidth/2,ze-=pe,Ze-=pe),gi(E,ze,Ze,Te,ye)}}},fm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding;for(a=x.x-E.left,x=x.y-E.top,E=0;E<b;E++){var te=y[E],ne=te.measuredBounds,se=te.margin,he=te.position.x,pe=te.position.y;if(he=isNaN(he)?-a:he-a,pe=isNaN(pe)?-x:pe-x,te instanceof Ir&&te.isGeometryPositioned){var ye=te.strokeWidth/2;he-=ye,pe-=ye}te.visible&&te.arrange(he+se.left,pe+se.top,ne.width,ne.height)}};function dm(){this.xa="Base"}nn(dm,Go),dm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length;y=$n(),te=Vu(a);for(var he=0;he<se;he++){var pe=b[he];if(pe.visible||pe===te){var ye=ls(pe,!1);if(ye!==gn&&ye!==sr)y.push(pe);else{pe.measure(1/0,x,0,ne),ye=pe.margin,pe=pe.measuredBounds;var Te=Math.max(pe.height+ye.top+ye.bottom,0);E.width+=Math.max(pe.width+ye.right+ye.left,0),E.height=Math.max(E.height,Te)}}}for(b=y.length,a.desiredSize.height?x=Math.min(a.desiredSize.height,a.maxSize.height):E.height!==0&&(x=Math.min(E.height,a.maxSize.height)),a=0;a<b;a++)he=y[a],(he.visible||he===te)&&(ye=he.margin,se=ye.right+ye.left,ye=ye.top+ye.bottom,he.measure(1/0,x,0,ne),he=he.measuredBounds,ye=Math.max(he.height+ye,0),E.width+=Math.max(he.width+se,0),E.height=Math.max(E.height,ye));Wn(y)},dm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,te=E.top,ne=a.isOpposite,se=ne?x.width:E.left,he=0;he<b;he++){var pe=te,ye=y[he];if(ye.visible){var Te=ye.measuredBounds,ze=ye.margin,Ze=ze.top+ze.bottom,$e=te+E.bottom,it=Te.height,Tt=ls(ye,!1);(isNaN(ye.desiredSize.height)&&Tt===wn||Tt===Sr)&&(it=Math.max(x.height-Ze-$e,0)),Ze=it+Ze+$e,$e=ye.alignment,$e.Xb()&&($e=a.defaultAlignment),$e.sb()||($e=ti),ne&&(se-=Te.width+ze.left+ze.right),ye.arrange(se+$e.offsetX+ze.left,pe+$e.offsetY+ze.top+(x.height*$e.y-Ze*$e.y),Te.width,it),ne||(se+=Te.width+ze.left+ze.right)}}};function pm(){this.xa="Base"}nn(pm,Go),pm.prototype.measure=function(a,y,x,b,E,te){var ne=b.length;x=$n();for(var se=Vu(a),he=0;he<ne;he++){var pe=b[he];if(pe.visible||pe===se){var ye=ls(pe,!1);if(ye!==gn&&ye!==Sr)x.push(pe);else{var Te=pe.margin;ye=Te.right+Te.left,Te=Te.top+Te.bottom,pe.measure(y,1/0,te,0),pe=pe.measuredBounds,ci(E,Math.max(E.width,Math.max(pe.width+ye,0)),E.height+Math.max(pe.height+Te,0))}}}if(b=x.length,b!==0){for(a.desiredSize.width?y=Math.min(a.desiredSize.width,a.maxSize.width):E.width!==0&&(y=Math.min(E.width,a.maxSize.width)),a=0;a<b;a++)he=x[a],(he.visible||he===se)&&(pe=he.margin,ne=pe.right+pe.left,pe=pe.top+pe.bottom,he.measure(y,1/0,te,0),he=he.measuredBounds,pe=Math.max(he.height+pe,0),E.width=Math.max(E.width,Math.max(he.width+ne,0)),E.height+=pe);Wn(x)}},pm.prototype.arrange=function(a,y,x){for(var b=y.length,E=a.padding,te=E.left,ne=a.isOpposite,se=ne?x.height:E.top,he=0;he<b;he++){var pe=te,ye=y[he];if(ye.visible){var Te=ye.measuredBounds,ze=ye.margin,Ze=ze.left+ze.right,$e=te+E.right,it=Te.width,Tt=ls(ye,!1);(isNaN(ye.desiredSize.width)&&Tt===wn||Tt===sr)&&(it=Math.max(x.width-Ze-$e,0)),Ze=it+Ze+$e,$e=ye.alignment,$e.Xb()&&($e=a.defaultAlignment),$e.sb()||($e=ti),ne&&(se-=Te.height+ze.bottom+ze.top),ye.arrange(pe+$e.offsetX+ze.left+(x.width*$e.x-Ze*$e.x),se+$e.offsetY+ze.top,it,Te.height),ne||(se+=Te.height+ze.bottom+ze.top)}}};function gm(){this.xa="Base"}nn(gm,Go),gm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length,he=a.Pb(),pe=he.margin,ye=pe.right+pe.left,Te=pe.top+pe.bottom;he.measure(y,x,te,ne);var ze=he.measuredBounds;te=ze.width,ne=ze.height;var Ze=Math.max(te+ye,0),$e=Math.max(ne+Te,0),it=a.isClipping,Tt=Yt.allocAt(-pe.left,-pe.top,Ze,$e),bt=Yt.allocAt(0,0,te,ne);pv(he,bt,!0),te=bt.width,ne=bt.height;for(var Nt=!0,jt=Vu(a),Bt=0;Bt<se;Bt++){var _t=b[Bt];ze=y;var Ht=x;if(_t!==he&&(_t.visible||_t===jt)){pe=_t.margin;var Fn=pe.left,Jn=pe.top;switch(Ze=pe.right+pe.left,$e=pe.top+pe.bottom,pe=ls(_t,!1),pe){case wn:ze=te,Ht=ne,Jn=Fn=$e=Ze=0;break;case sr:ze=te,Fn=Ze=0;break;case Sr:Ht=ne,Jn=$e=0}_t.measure(ze,Ht,0,0),ze=_t.measuredBounds,Ze=Math.max(ze.width+Ze,0),$e=Math.max(ze.height+$e,0),pe=_t.alignment,pe.Xb()&&(pe=a.defaultAlignment),pe.sb()||(pe=ti);var Zn=_t.alignmentFocus;if(Zn.Xb()&&(Zn=ti),Ht=null,_t instanceof Cn&&_t.$e!==""&&(Ht=_t.fb(_t.$e),Ht===_t&&(Ht=null)),Fn=bt.x-Fn,Jn=bt.y-Jn,Ht!==null){for(_t.arrange(0,0,ze.width,ze.height),ze=Ht.actualBounds,ze=lt.allocAt(ze.x+(Zn.x*ze.width-Zn.offsetX),ze.y+(Zn.y*ze.height-Zn.offsetY)),Ht=Ht.panel;Ht!==_t;)Ht.transform.Ga(ze),Ht=Ht.panel;Fn+=pe.x*te+pe.offsetX-ze.x,Jn+=pe.y*ne+pe.offsetY-ze.y,lt.free(ze)}else Fn+=pe.x*te+pe.offsetX-(Zn.x*ze.width+Zn.offsetX),Jn+=pe.y*ne+pe.offsetY-(Zn.y*ze.height+Zn.offsetY);Nt?(Nt=!1,E.h(Fn,Jn,Ze,$e)):gi(E,Fn,Jn,Ze,$e)}}switch(Nt?E.assign(Tt):it?E.Uu(bt.x,bt.y,bt.width,bt.height):gi(E,Tt.x,Tt.y,Tt.width,Tt.height),Yt.free(Tt),Yt.free(bt),pe=he.stretch,pe===Fr&&(pe=ls(he,!1)),pe){case gn:return;case wn:if(!isFinite(y)&&!isFinite(x))return;break;case sr:if(!isFinite(y))return;break;case Sr:if(!isFinite(x))return}for(ze=he.measuredBounds,te=ze.width,ne=ze.height,Ze=Math.max(te+ye,0),$e=Math.max(ne+Te,0),pe=he.margin,bt=Yt.allocAt(-pe.left,-pe.top,Ze,$e),pv(he,bt,!0),te=bt.width,ne=bt.height,y=0;y<se;y++)x=b[y],x===he||!x.visible&&x!==jt||(pe=x.margin,Ze=pe.right+pe.left,$e=pe.top+pe.bottom,ze=x.measuredBounds,Ze=Math.max(ze.width+Ze,0),$e=Math.max(ze.height+$e,0),ye=x.alignment,ye.Xb()&&(ye=a.defaultAlignment),ye.sb()||(ye=ti),x=x.alignmentFocus,x.Xb()&&(x=ti),Nt?(Nt=!1,E.h(ye.x*te+ye.offsetX-(x.x*ze.width+x.offsetX)-pe.left,ye.y*ne+ye.offsetY-(x.y*ze.height+x.offsetY)-pe.top,Ze,$e)):gi(E,ye.x*te+ye.offsetX-(x.x*ze.width+x.offsetX)-pe.left,ye.y*ne+ye.offsetY-(x.y*ze.height+x.offsetY)-pe.top,Ze,$e));Nt?E.assign(Tt):it?E.Uu(bt.x,bt.y,bt.width,bt.height):gi(E,Tt.x,Tt.y,Tt.width,Tt.height),Yt.free(bt)},gm.prototype.arrange=function(a,y,x){var b=y.length,E=a.Pb(),te=E.measuredBounds,ne=te.width,se=te.height,he=a.padding;te=he.left,he=he.top;var pe=te-x.x,ye=he-x.y;for(E.arrange(pe,ye,ne,se),ne=Yt.allocAt(0,0,ne,se),pv(E,ne,!1),se=0;se<b;se++){var Te=y[se];if(Te!==E){pe=Te.measuredBounds;var ze=pe.width,Ze=pe.height;ye=Te.alignment,ye.Xb()&&(ye=a.defaultAlignment),ye.sb()||(ye=ti);var $e=Te.alignmentFocus;if($e.Xb()&&($e=ti),pe=null,Te instanceof Cn&&Te.$e!==""&&(pe=Te.fb(Te.$e),pe===Te&&(pe=null)),pe!==null){var it=pe.actualBounds;for($e=lt.allocAt(it.x+($e.x*it.width-$e.offsetX),it.y+($e.y*it.height-$e.offsetY)),pe=pe.panel;pe!==Te;)pe.transform.Ga($e),pe=pe.panel;pe=ye.x*ne.width+ye.offsetX-$e.x,ye=ye.y*ne.height+ye.offsetY-$e.y,lt.free($e)}else pe=ye.x*ne.width+ye.offsetX-($e.x*ze+$e.offsetX),ye=ye.y*ne.height+ye.offsetY-($e.y*Ze+$e.offsetY);pe+=ne.x-x.x,ye+=ne.y-x.y,Te.visible&&Te.arrange(te+pe,he+ye,ze,Ze)}}Yt.free(ne)};function pv(a,y,x){var b=null;if(a instanceof Cn&&a.$e!==""&&(b=a.fb(a.$e),b===a&&(b=null)),b!==null)for(x&&a.arrange(0,0,y.width,y.height),y.assign(b.actualBounds),b=b.panel;b!==a;)b.transform.pp(y),b=b.panel}function mm(){this.xa="Base"}nn(mm,Go),mm.prototype.measure=function(a,y,x,b,E,te,ne){var se=b.length,he=a.Pb(),pe=he.margin,ye=y,Te=x,ze=pe.right+pe.left,Ze=pe.top+pe.bottom;he.measure(y,x,te,ne),pe=he.measuredBounds;var $e=0,it=null;he instanceof Ir&&(it=he,$e=it.strokeWidth*it.scale);var Tt=Math.max(pe.width+ze,0);pe=Math.max(pe.height+Ze,0);var bt=yv(he),Nt=bt.x*Tt+bt.offsetX;bt=bt.y*pe+bt.offsetY;var jt=Sv(he),Bt=jt.x*Tt+jt.offsetX;for(jt=jt.y*pe+jt.offsetY,isFinite(y)&&(ye=Math.max(Math.abs(Nt-Bt)-$e,0)),isFinite(x)&&(Te=Math.max(Math.abs(bt-jt)-$e,0)),$e=fn.alloc(),$e.h(0,0),a=Vu(a),jt=0;jt<se;jt++)bt=b[jt],bt===he||!bt.visible&&bt!==a||(pe=bt.margin,Tt=pe.right+pe.left,Nt=pe.top+pe.bottom,bt.measure(ye,Te,0,0),pe=bt.measuredBounds,Tt=Math.max(pe.width+Tt,0),pe=Math.max(pe.height+Nt,0),$e.h(Math.max(Tt,$e.width),Math.max(pe,$e.height)));if(se===1)E.width=Tt,E.height=pe,fn.free($e);else{switch(bt=yv(he),jt=Sv(he),se=b=0,jt.x!==bt.x&&jt.y!==bt.y&&(b=$e.width/Math.abs(jt.x-bt.x),se=$e.height/Math.abs(jt.y-bt.y)),fn.free($e),$e=0,it!==null&&($e=it.strokeWidth*it.scale,Ev(it)===rr&&(b=se=Math.max(b,se))),b+=Math.abs(bt.offsetX)+Math.abs(jt.offsetX)+$e,se+=Math.abs(bt.offsetY)+Math.abs(jt.offsetY)+$e,it=he.stretch,it===Fr&&(it=ls(he,!1)),it){case gn:ne=te=0;break;case wn:isFinite(y)&&(b=y),isFinite(x)&&(se=x);break;case sr:isFinite(y)&&(b=y),ne=0;break;case Sr:te=0,isFinite(x)&&(se=x)}he.Uj(),he.measure(b,se,te,ne),E.width=he.measuredBounds.width+ze,E.height=he.measuredBounds.height+Ze}},mm.prototype.arrange=function(a,y){var x=y.length,b=a.Pb(),E=b.measuredBounds,te=Yt.alloc();te.h(0,0,1,1);var ne=b.margin,se=ne.left;ne=ne.top;var he=a.padding,pe=he.left;he=he.top,b.arrange(pe+se,he+ne,E.width,E.height);var ye=yv(b),Te=Sv(b),ze=ye.y*E.height+ye.offsetY,Ze=Te.x*E.width+Te.offsetX;for(Te=Te.y*E.height+Te.offsetY,te.x=ye.x*E.width+ye.offsetX,te.y=ze,gi(te,Ze,Te,0,0),te.x+=se+pe,te.y+=ne+he,E=0;E<x;E++)se=y[E],se!==b&&(pe=se.measuredBounds,ne=se.margin,he=Math.max(pe.width+ne.right+ne.left,0),ye=Math.max(pe.height+ne.top+ne.bottom,0),ze=se.alignment,ze.Xb()&&(ze=a.defaultAlignment),ze.sb()||(ze=ti),he=te.width*ze.x+ze.offsetX-he*ze.x+ne.left+te.x,ne=te.height*ze.y+ze.offsetY-ye*ze.y+ne.top+te.y,se.visible&&(Qi(te.x,te.y,te.width,te.height,he,ne,pe.width,pe.height)?se.arrange(he,ne,pe.width,pe.height):se.arrange(he,ne,pe.width,pe.height,new Yt(te.x,te.y,te.width,te.height))));Yt.free(te)};function vm(){this.xa="Base",this.name="Table"}nn(vm,Go),vm.prototype.measure=function(a,y,x,b,E){for(var te=b.length,ne=$n(),se=$n(),he=0;he<te;he++){var pe=b[he],ye=pe instanceof Cn?pe:null;if(ye!==null&&xh(ye)&&pe.visible){se.push(ye);for(var Te=ye.O.s,ze=Te.length,Ze=0;Ze<ze;Ze++){var $e=Te[Ze];ye.type===Cn.TableRow?$e.row=pe.row:ye.type===Cn.TableColumn&&($e.column=pe.column),ne.push($e)}}else ne.push(pe)}te=ne.length,te===0&&(a.Fb(0),a.Eb(0));for(var it=[],Tt=0;Tt<te;Tt++){var bt=ne[Tt];bt.visible&&(Bo(bt,!0),pu(bt,!0),it[bt.row]||(it[bt.row]=[]),it[bt.row][bt.column]||(it[bt.row][bt.column]=[]),it[bt.row][bt.column].push(bt))}Wn(ne);var Nt=$n(),jt=$n(),Bt=$n(),_t={count:0},Ht={count:0},Fn=y,Jn=x,Zn=a.rowDefs,kn=a.colDefs,cn=null;te=Zn.length;for(var Ar=0;Ar<te;Ar++)cn=Zn[Ar],cn!==void 0&&(cn.actual=0);te=kn.length;for(var Cr=0;Cr<te;Cr++)cn=kn[Cr],cn!==void 0&&(cn.actual=0);for(var vi=it.length,Wi=0,Yo=0;Yo<vi;Yo++)it[Yo]&&(Wi=Math.max(Wi,it[Yo].length));var ta=Math.min(a.topIndex,vi-1),Ra=Math.min(a.leftIndex,Wi-1),$o=0;vi=it.length;for(var Nh=Vu(a),Lo=0;Lo<vi;Lo++)if(it[Lo]){Wi=it[Lo].length;var Rl=a.Fb(Lo);Rl.actual=0;for(var _a=Rl.oc=0;_a<Wi;_a++)if(it[Lo][_a]){var Ah=a.Eb(_a);Nt[_a]===void 0&&(Ah.actual=0,Ah.oc=0,Nt[_a]=!0);for(var zs=it[Lo][_a],fl=zs.length,ks=0;ks<fl;ks++){var vs=zs[ks];if(vs.visible||vs===Nh){var mc=1<vs.rowSpan||1<vs.columnSpan;mc&&(Lo<ta||_a<Ra||jt.push(vs));var _l=vs.margin,Qd=_l.right+_l.left,Ts=_l.top+_l.bottom,za=Ol(vs,Rl,Ah,!1),Ng=vs.desiredSize,Vf=!isNaN(Ng.height),eu=!isNaN(Ng.width)&&Vf;if(mc||za===gn||eu||Lo<ta||_a<Ra||(_t[_a]!==void 0||za!==wn&&za!==sr||(_t[_a]=-1,_t.count++),Ht[Lo]!==void 0||za!==wn&&za!==Sr||(Ht[Lo]=-1,Ht.count++),Bt.push(vs)),vs.measure(1/0,1/0,0,0),!(Lo<ta||_a<Ra)){var ys=vs.measuredBounds,tf=Math.max(ys.width+Qd,0),Ms=Math.max(ys.height+Ts,0);if(vs.rowSpan===1&&(za===gn||za===sr)){cn=a.Fb(Lo);var vc=cn.Wc();$o=Math.max(Ms-cn.actual,0),$o+vc>Jn&&($o=Math.max(Jn-vc,0));var z0=cn.oa===0;cn.oc=cn.oc+$o,cn.actual=cn.oa+$o,Jn=Math.max(Jn-($o+(z0?vc:0)),0)}if(vs.columnSpan===1&&(za===gn||za===Sr)){cn=a.Eb(_a);var Ag=cn.Wc();$o=Math.max(tf-cn.actual,0),$o+Ag>Fn&&($o=Math.max(Fn-Ag,0));var Gy=cn.oa===0;cn.oc=cn.oc+$o,cn.actual=cn.oa+$o,Fn=Math.max(Fn-($o+(Gy?Ag:0)),0)}mc&&vs.Uj()}}}}}Wn(Nt);var Eu=0,Yu=0;te=a.columnCount;for(var Zf=0;Zf<te;Zf++){var yc=kn[Zf];yc!==void 0&&(Eu+=isNaN(yc.Hc)?yc.oc:yc.Hc,yc.oc!==0&&(Eu+=yc.Wc()))}te=a.rowCount;for(var qd=0;qd<te;qd++){var Sc=Zn[qd];Sc!==void 0&&(Yu+=isNaN(Sc.Hc)?Sc.oc:Sc.Hc,Sc.oc!==0&&(Yu+=Sc.Wc()))}Fn=Math.max(y-Eu,0);var ku=Jn=Math.max(x-Yu,0),jh=Fn;te=Bt.length;for(var Ss=0;Ss<te;Ss++){var tu=Bt[Ss],G0=a.Fb(tu.row),$u=a.Eb(tu.column),ep=tu.measuredBounds,zl=tu.margin,nf=zl.right+zl.left,nu=zl.top+zl.bottom;_t[tu.column]=$u.oc===0&&_t[tu.column]!==void 0?Math.max(ep.width+nf,_t[tu.column]):null,Ht[tu.row]=G0.oc===0&&Ht[tu.row]!==void 0?Math.max(ep.height+nu,Ht[tu.row]):null}var Xf=0,tp=0,kl;for(kl in Ht)kl!=="count"&&(Xf+=Ht[kl]);for(kl in _t)kl!=="count"&&(tp+=_t[kl]);for(var da=fn.alloc(),jg=0;jg<te;jg++){var ns=Bt[jg];if(ns.visible||ns===Nh){var No=a.Fb(ns.row),rs=a.Eb(ns.column),Ju=0;isFinite(rs.width)?Ju=rs.width:(isFinite(Fn)&&_t[ns.column]!==null?tp===0?Ju=rs.actual+Fn:Ju=_t[ns.column]/tp*jh:_t[ns.column]!==null?Ju=Fn:Ju=rs.actual||Fn,Ju=Math.max(0,Ju-rs.Wc()));var Oh=0;switch(isFinite(No.height)?Oh=No.height:(isFinite(Jn)&&Ht[ns.row]!==null?Xf===0?Oh=No.actual+Jn:Oh=Ht[ns.row]/Xf*ku:Ht[ns.row]!==null?Oh=Jn:Oh=No.actual||Jn,Oh=Math.max(0,Oh-No.Wc())),da.h(Math.max(rs.minimum,Math.min(Ju,rs.maximum)),Math.max(No.minimum,Math.min(Oh,No.maximum))),za=Ol(ns,No,rs,!1),za){case sr:da.height=Math.max(da.height,No.actual+Jn);break;case Sr:da.width=Math.max(da.width,rs.actual+Fn)}var rf=ns.margin,Uy=rf.right+rf.left,U0=rf.top+rf.bottom;ns.Uj(),ns.measure(da.width,da.height,rs.minimum,No.minimum);var np=ns.measuredBounds,of=Math.max(np.width+Uy,0),Yf=Math.max(np.height+U0,0);isFinite(Fn)&&(of=Math.min(of,da.width)),isFinite(Jn)&&(Yf=Math.min(Yf,da.height));var xs=0;xs=No.actual,No.actual=Math.max(No.actual,Yf),No.oc=Math.max(No.oc,Yf),$o=No.actual-xs,Jn=Math.max(Jn-$o,0),Ht[ns.row]===null&&(ku=Math.max(ku-$o,0)),xs=rs.actual,rs.actual=Math.max(rs.actual,of),rs.oc=Math.max(rs.oc,of),$o=rs.actual-xs,Fn=Math.max(Fn-$o,0),_t[ns.column]===null&&(jh=Math.max(jh-$o,0))}}Wn(Bt);var Qu=fn.alloc(),Gl=$n(),tl=$n();if(te=jt.length,te!==0){for(var xc=0;xc<vi;xc++)if(it[xc]){Wi=it[xc].length;var rp=a.Fb(xc);Gl[xc]=rp.actual;for(var wc=0;wc<Wi;wc++)if(it[xc][wc]){var W0=a.Eb(wc);tl[wc]=W0.actual}}}for(var ip=0;ip<te;ip++){var xo=jt[ip];if(xo.visible||xo===Nh){var Tl=a.Fb(xo.row),dl=a.Eb(xo.column);switch(da.h(Math.max(dl.minimum,Math.min(y,dl.maximum)),Math.max(Tl.minimum,Math.min(x,Tl.maximum))),za=Ol(xo,Tl,dl,!1),za){case wn:tl[dl.index]!==0&&(da.width=Math.min(da.width,tl[dl.index])),Gl[Tl.index]!==0&&(da.height=Math.min(da.height,Gl[Tl.index]));break;case sr:tl[dl.index]!==0&&(da.width=Math.min(da.width,tl[dl.index]));break;case Sr:Gl[Tl.index]!==0&&(da.height=Math.min(da.height,Gl[Tl.index]))}isFinite(dl.width)&&(da.width=dl.width),isFinite(Tl.height)&&(da.height=Tl.height),Qu.h(0,0);for(var H0=dl.minimum,Ls=Tl.minimum,Fh=1;Fh<xo.rowSpan&&!(xo.row+Fh>=a.rowCount);Fh++)cn=a.Fb(xo.row+Fh),$o=0,$o=za===wn||za===Sr?Math.max(cn.minimum,Gl[xo.row+Fh]===0?cn.maximum:Math.min(Gl[xo.row+Fh],cn.maximum)):Math.max(cn.minimum,isNaN(cn.Hc)?cn.maximum:Math.min(cn.Hc,cn.maximum)),Qu.height+=$o,Ls+=cn.minimum;for(var pl=1;pl<xo.columnSpan&&!(xo.column+pl>=a.columnCount);pl++)cn=a.Eb(xo.column+pl),$o=0,$o=za===wn||za===sr?Math.max(cn.minimum,tl[xo.column+pl]===0?cn.maximum:Math.min(tl[xo.column+pl],cn.maximum)):Math.max(cn.minimum,isNaN(cn.Hc)?cn.maximum:Math.min(cn.Hc,cn.maximum)),Qu.width+=$o,H0+=cn.minimum;da.width+=Qu.width,da.height+=Qu.height;var op=xo.margin,Pc=op.right+op.left,Og=op.top+op.bottom;xo.measure(da.width,da.height,H0,Ls);for(var ap=xo.measuredBounds,ru=Math.max(ap.width+Pc,0),af=Math.max(ap.height+Og,0),bc=0,sp=0;sp<xo.rowSpan&&!(xo.row+sp>=a.rowCount);sp++)cn=a.Fb(xo.row+sp),bc+=cn.total||0;if(bc<af){var Dh=af-bc,Tu=af-bc;if(xo.spanAllocation!==null)for(var Bh=xo.spanAllocation,qu=0;qu<xo.rowSpan&&!(0>=Dh)&&!(xo.row+qu>=a.rowCount);qu++){cn=a.Fb(xo.row+qu);var Ih=cn.oa||0,sf=Bh(xo,cn,Tu);cn.actual=Math.min(cn.maximum,Ih+sf),cn.oa!==Ih&&(Dh-=cn.oa-Ih)}for(;0<Dh;){var Ul=cn.oa||0;if(isNaN(cn.height)&&cn.maximum>Ul&&(cn.actual=Math.min(cn.maximum,Ul+Dh),cn.oa!==Ul&&(Dh-=cn.oa-Ul)),cn.index===0)break;cn=a.Fb(cn.index-1)}}for(var $f=0,Rh=0;Rh<xo.columnSpan&&!(xo.column+Rh>=a.columnCount);Rh++)cn=a.Eb(xo.column+Rh),$f+=cn.total||0;if($f<ru){var Jf=ru-$f,Wy=ru-$f;if(xo.spanAllocation!==null)for(var eh=xo.spanAllocation,lf=0;lf<xo.columnSpan&&!(0>=Jf)&&!(xo.column+lf>=a.columnCount);lf++){cn=a.Eb(xo.column+lf);var Fg=cn.oa||0,Hy=eh(xo,cn,Wy);cn.actual=Math.min(cn.maximum,Fg+Hy),cn.oa!==Fg&&(Jf-=cn.oa-Fg)}for(;0<Jf;){var K0=cn.oa||0;if(isNaN(cn.width)&&cn.maximum>K0&&(cn.actual=Math.min(cn.maximum,K0+Jf),cn.oa!==K0&&(Jf-=cn.oa-K0)),cn.index===0)break;cn=a.Eb(cn.index-1)}}}}Wn(jt),fn.free(Qu),fn.free(da),Gl!==void 0&&Wn(Gl),tl!==void 0&&Wn(tl);var Qf=0,qf=0,V0=a.desiredSize,gx=a.maxSize;za=ls(a,!0);var Dg=Yu=Eu=0,Bg=0;te=a.columnCount;for(var Z0=0;Z0<te;Z0++)kn[Z0]!==void 0&&(cn=a.Eb(Z0),isFinite(cn.width)?(Dg+=cn.width,Dg+=cn.Wc()):Tm(cn)===Zp?(Dg+=cn.oa,Dg+=cn.Wc()):cn.oa!==0&&(Eu+=cn.oa,Eu+=cn.Wc()));isFinite(V0.width)?Qf=Math.min(V0.width,gx.width):Qf=za!==gn&&isFinite(y)?y:Eu,Qf=Math.max(Qf,a.minSize.width),Qf=Math.max(Qf-Dg,0);for(var Qx=Eu===0?1:Math.max(Qf/Eu,1),X0=0;X0<te;X0++)kn[X0]!==void 0&&(cn=a.Eb(X0),isFinite(cn.width)||Tm(cn)===Zp||(cn.actual=cn.oa*Qx),cn.position=E.width,cn.oa!==0&&(E.width+=cn.oa,E.width+=cn.Wc()));te=a.rowCount;for(var Y0=0;Y0<te;Y0++)Zn[Y0]!==void 0&&(cn=a.Fb(Y0),isFinite(cn.height)?(Bg+=cn.height,Bg+=cn.Wc()):Tm(cn)===Zp?(Bg+=cn.oa,Bg+=cn.Wc()):cn.oa!==0&&(Yu+=cn.oa,Yu+=cn.Wc()));isFinite(V0.height)?qf=Math.min(V0.height,gx.height):qf=za!==gn&&isFinite(x)?x:Yu,qf=Math.max(qf,a.minSize.height),qf=Math.max(qf-Bg,0);for(var qx=Yu===0?1:Math.max(qf/Yu,1),$0=0;$0<te;$0++)Zn[$0]!==void 0&&(cn=a.Fb($0),isFinite(cn.height)||Tm(cn)===Zp||(cn.actual=cn.oa*qx),cn.position=E.height,cn.oa!==0&&(E.height+=cn.oa,E.height+=cn.Wc()));te=se.length;for(var Ky=0;Ky<te;Ky++){var Ig=se[Ky],Vy=0,Zy=0;Ig.type===Cn.TableRow?(Vy=E.width,cn=a.Fb(Ig.row),Zy=cn.actual):(cn=a.Eb(Ig.column),Vy=cn.actual,Zy=E.height),Ig.measuredBounds.h(0,0,Vy,Zy),Bo(Ig,!1)}Wn(se),a.inRowsCols=it},vm.prototype.arrange=function(a,y,x){var b=y.length,E=a.padding,te=E.left;E=E.top;var ne=a.inRowsCols;if(ne!==null){for(var se,he,pe=ne.length,ye=0,Te=0;Te<pe;Te++)ne[Te]&&(ye=Math.max(ye,ne[Te].length));he=a.rowDefs,se=a.colDefs;var ze=Te=0,Ze=Math.min(a.topIndex,pe-1);if(0<he.length){for(;Ze!==pe&&(he[Ze]===void 0||he[Ze].oa===0);)Ze++;Ze=Math.max(Math.min(Ze,pe-1),0),Te=-he[Ze].position}var $e=Math.min(a.leftIndex,ye-1);if(0<se.length){for(;$e!==ye&&(se[$e]===void 0||se[$e].oa===0);)$e++;$e=Math.max(Math.min($e,ye-1),0),ze=-se[$e].position}for(var it=0,Tt=0;it!==pe&&he[it]===void 0;)it++;for(;Tt!==pe&&se[Tt]===void 0;)Tt++;ye=a.part,a.Fb(it),a.Eb(Tt);for(var bt=0;bt<y.length;bt++){var Nt=y[bt];if(Nt instanceof Cn&&Nt.visible&&xh(Nt)){if(Nt.type===Cn.TableRow){se=a.Fb(Nt.row);var jt=a.Eb(Tt)}else se=a.Fb(it),jt=a.Eb(Nt.column);he=se.position+Te+E,se.oa!==0&&(he+=se.Io(Math.max(it,Ze))),se=jt.position+ze+te,jt.oa!==0&&(se+=jt.Io(Math.max(Tt,$e))),jt=Nt.measuredBounds,Nt.Uk(),Nt.actualBounds.ka();var Bt=Nt.actualBounds,_t=Yt.allocAt(Bt.x,Bt.y,Bt.width,Bt.height);Bt.x=Nt.type===Cn.TableRow?te:se,Bt.y=Nt.type===Cn.TableColumn?E:he,Bt.width=jt.width,Bt.height=jt.height,Nt.actualBounds.freeze(),pu(Nt,!1),Si(_t,Bt)||ye===null||(ye.oh(),Nt.Pn(ye)),Yt.free(_t)}}for(bt=fn.alloc(),Nt=0;Nt<pe;Nt++)if(ne[Nt]){for(ye=ne[Nt].length,jt=a.Fb(Nt),he=jt.position+Te+E,jt.oa!==0&&(he+=jt.Io(Math.max(it,Ze))),Bt=0;Bt<ye;Bt++)if(ne[Nt][Bt]){_t=a.Eb(Bt),se=_t.position+ze+te,_t.oa!==0&&(se+=_t.Io(Math.max(Tt,$e)));for(var Ht=ne[Nt][Bt],Fn=Ht.length,Jn=0;Jn<Fn;Jn++){var Zn=Ht[Jn],kn=Zn.measuredBounds;bt.h(0,0);for(var cn=1;cn<Zn.rowSpan&&!(Nt+cn>=a.rowCount);cn++){var Ar=a.Fb(Nt+cn);Ar.oa!==0&&(bt.height+=Ar.total)}for(cn=1;cn<Zn.columnSpan&&!(Bt+cn>=a.columnCount);cn++)Ar=a.Eb(Bt+cn),Ar.oa!==0&&(bt.width+=Ar.total);var Cr=_t.oa+bt.width,vi=jt.oa+bt.height;cn=se,Ar=he;var Wi=Cr,Yo=vi,ta=se,Ra=he,$o=Cr,Nh=vi;se+Cr>x.width&&($o=Math.max(x.width-se,0)),he+vi>x.height&&(Nh=Math.max(x.height-he,0));var Lo=Zn.alignment;if(Lo.Xb()){Lo=a.defaultAlignment,Lo.sb()||(Lo=ti);var Rl=Lo.x,_a=Lo.y,Ah=Lo.offsetX;Lo=Lo.offsetY;var zs=_t.alignment,fl=jt.alignment;zs.sb()&&(Rl=zs.x,Ah=zs.offsetX),fl.sb()&&(_a=fl.y,Lo=fl.offsetY)}else Rl=Lo.x,_a=Lo.y,Ah=Lo.offsetX,Lo=Lo.offsetY;(isNaN(Rl)||isNaN(_a))&&(_a=Rl=.5,Lo=Ah=0),zs=kn.width,fl=kn.height;var ks=Zn.margin,vs=ks.left+ks.right,mc=ks.top+ks.bottom,_l=Ol(Zn,jt,_t,!1);!isNaN(Zn.desiredSize.width)||_l!==wn&&_l!==sr||(zs=Math.max(Cr-vs,0)),!isNaN(Zn.desiredSize.height)||_l!==wn&&_l!==Sr||(fl=Math.max(vi-mc,0)),Cr=Zn.maxSize,vi=Zn.minSize,zs=Math.min(Cr.width,zs),fl=Math.min(Cr.height,fl),zs=Math.max(vi.width,zs),fl=Math.max(vi.height,fl),Cr=fl+mc,cn+=Wi*Rl-(zs+vs)*Rl+Ah+ks.left,Ar+=Yo*_a-Cr*_a+Lo+ks.top,Zn.visible&&(Qi(ta,Ra,$o,Nh,cn,Ar,kn.width,kn.height)?Zn.arrange(cn,Ar,zs,fl):Zn.arrange(cn,Ar,zs,fl,new Yt(ta,Ra,$o,Nh)))}}}for(fn.free(bt),a=0;a<b;a++)x=y[a],te=x instanceof Cn?x:null,te!==null&&xh(te)&&(te=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,te.width,te.height),x.naturalBounds.freeze())}};function ym(){this.xa="Base"}nn(ym,Go),ym.prototype.measure=function(){},ym.prototype.arrange=function(){};function Sm(){this.xa="Base"}nn(Sm,Go),Sm.prototype.measure=function(){},Sm.prototype.arrange=function(){};function xm(){this.xa="Base"}nn(xm,Go),xm.prototype.measure=function(a,y,x,b,E,te,ne){1<b.length&&Ot("Viewbox Panel cannot contain more than one GraphObject."),b=b[0],b.Ca=1,b.Uj(),b.measure(1/0,1/0,te,ne);var se=b.measuredBounds,he=b.margin,pe=he.right+he.left;if(he=he.top+he.bottom,isFinite(y)||isFinite(x)){var ye=b.scale,Te=se.width;se=se.height;var ze=Math.max(y-pe,0),Ze=Math.max(x-he,0),$e=1;a.viewboxStretch===rr?Te!==0&&se!==0&&($e=Math.min(ze/Te,Ze/se)):Te!==0&&se!==0&&($e=Math.max(ze/Te,Ze/se)),$e===0&&($e=1e-4),b.Ca*=$e,ye!==b.scale&&(Bo(b,!0),b.measure(1/0,1/0,te,ne))}se=b.measuredBounds,E.width=isFinite(y)?y:Math.max(se.width+pe,0),E.height=isFinite(x)?x:Math.max(se.height+he,0)},xm.prototype.arrange=function(a,y,x){y=y[0];var b=y.measuredBounds,E=y.margin,te=Math.max(b.width+(E.right+E.left),0);E=Math.max(b.height+(E.top+E.bottom),0);var ne=y.alignment;ne.Xb()&&(ne=a.defaultAlignment),ne.sb()||(ne=ti),y.arrange(x.width*ne.x-te*ne.x+ne.offsetX,x.height*ne.y-E*ne.y+ne.offsetY,b.width,b.height)};function Hp(){this.xa="Base"}nn(Hp,Go),Hp.prototype.measure=function(){},Hp.prototype.arrange=function(){},Hp.prototype.gc=function(a,y,x){x=a.Df()*x.scale,0>=x&&(x=1);var b=a.gridCellSize,E=b.width;b=b.height;var te=a.naturalBounds,ne=a.actualBounds,se=te.width,he=te.height,pe=Math.ceil(se/E),ye=Math.ceil(he/b),Te=a.gridOrigin,ze=Te.x;Te=Te.y,y.save(),y.beginPath(),y.rect(0,0,se,he),y.clip(),y.Se();for(var Ze=[],$e=a.O.s,it=$e.length,Tt=0;Tt<it;Tt++){var bt=$e[Tt],Nt=[];if(Ze.push(Nt),bt.visible){var jt=bt.interval;if(!(0>jt)){bt=mv(bt.figure);for(var Bt=0;Bt<it;Bt++)if(Bt!==Tt){var _t=$e[Bt];_t.visible&&mv(_t.figure)===bt&&(_t=_t.interval,_t>jt&&Nt.push(_t))}}}}for($e=a.O.s,it=$e.length,Tt=0;Tt<it;Tt++){var Ht=$e[Tt];if(Ht.visible&&(Nt=Ht.interval||1,bt=Math.abs(Nt),!(2>E*bt*x))){if(jt=Ht.segmentIndex,(!isFinite(jt)||isNaN(jt))&&(jt=0),0>jt&&(jt=bt-Math.min(-jt,bt)),jt=Math.round(jt%bt),bt=Ht.opacity,Bt=1,bt!==1){if(bt===0)continue;Bt=y.globalAlpha,y.globalAlpha=Bt*bt}_t=Ze[Tt];var Fn=!1,Jn=Ht.strokeDashArray;if(Jn!==null&&(Fn=!0,y.js(Jn,Ht.strokeDashOffset)),Ht.figure==="LineV"&&Ht.stroke!==null&&0<Ht.strokeWidth){for(y.lineWidth=Ht.strokeWidth,yo(a,y,Ht.stroke,!1,!1,te,ne),y.beginPath(),Jn=Ht=Math.floor((ze-E)/E);Jn<=Ht+pe;Jn++){var Zn=Jn*E+ze;0<=Zn&&Zn<=se&&wm(Jn,Nt,jt,_t)&&(y.moveTo(Zn,0),y.lineTo(Zn,he))}y.stroke(),y.Se()}else if(Ht.figure==="LineH"&&Ht.stroke!==null&&0<Ht.strokeWidth){for(y.lineWidth=Ht.strokeWidth,yo(a,y,Ht.stroke,!1,!1,te,ne),y.beginPath(),Jn=Ht=Math.floor((Te-b)/b);Jn<=Ht+ye;Jn++)Zn=Jn*b+Te,0<=Zn&&Zn<=he&&wm(Jn,Nt,jt,_t)&&(y.moveTo(0,Zn),y.lineTo(se,Zn));y.stroke(),y.Se()}else if(Ht.figure==="BarV"&&Ht.fill!==null)for(yo(a,y,Ht.fill,!0,!1,te,ne),Ht=Ht.width,isNaN(Ht)&&(Ht=E),Zn=Jn=Math.floor((ze-E)/E);Zn<=Jn+pe;Zn++){var kn=Zn*E+ze;0<=kn+Ht&&kn<=se&&wm(Zn,Nt,jt,_t)&&y.fillRect(kn,0,Ht,he)}else if(Ht.figure==="BarH"&&Ht.fill!==null)for(yo(a,y,Ht.fill,!0,!1,te,ne),Ht=Ht.height,isNaN(Ht)&&(Ht=b),Zn=Jn=Math.floor((Te-b)/b);Zn<=Jn+ye;Zn++)kn=Zn*b+Te,0<=kn+Ht&&kn<=he&&wm(Zn,Nt,jt,_t)&&y.fillRect(0,kn,se,Ht);Fn&&y.fs(),bt!==1&&(y.globalAlpha=Bt)}}y.restore(),y.Vc(!1)};function wm(a,y,x,b){if(0>y)return a%y===x;if(a%y!==x)return!1;y=b.length;for(var E=0;E<y;E++)if(a%b[E]===x)return!1;return!0}function Pm(){this.xa="Base"}nn(Pm,Go),Pm.prototype.measure=function(a,y,x,b,E){var te=b.length;if(a instanceof di||a instanceof Tn){var ne=null,se=null;if(a instanceof Tn&&(ne=a),a instanceof di&&(se=a,ne=se.adornedPart,a.j===null&&(a.j=[])),ne instanceof Tn){var he=ne;if(te===0)ci(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var pe=a instanceof di?null:ne.path;y=ne.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ye=he.points,Te=ne.pointsCount;se!==null?se.Ul(!1):ne!==null&&ne.Ul(!1),se=y.width;var ze=y.height,Ze=a.j;if(Ze.length=0,pe!==null){i1(a,se,ze,pe);var $e=pe.measuredBounds;x.ed($e),Ze.push($e)}$e=Mr.alloc();for(var it=lt.alloc(),Tt=lt.alloc(),bt=0;bt<te;bt++){var Nt=b[bt];if(Nt!==pe)if(Nt.isPanelMain&&Nt instanceof Ir){i1(a,se,ze,Nt);var jt=Nt.measuredBounds;x.ed(jt),Ze.push(jt)}else if(2>Te)Nt.measure(1/0,1/0,0,0),jt=Nt.measuredBounds,x.ed(jt),Ze.push(jt);else{var Bt=Nt.segmentIndex,_t=Nt.segmentFraction,Ht=Nt.alignmentFocus;Ht.Mc()&&(Ht=ti);var Fn=Nt.segmentOrientation,Jn=Nt.segmentOffset;if(isNaN(Bt)){var Zn=he.ua;jt=$n(),Zn.Qu(_t,jt);var kn=lt.allocAt(jt[0],jt[1]);if(kn.add(he.i(0)),Zn.type===Mn.j?kn.offset(-Zn.startX,-Zn.startY):(Zn=Zn.figures.first(),Zn!==null&&kn.offset(-Zn.startX,-Zn.startY)),Zn=jt[2],Fn!==Ja){var cn=he.computeAngle(Nt,Fn,Zn);Nt.Kb=cn}cn=kn.x-y.x;var Ar=kn.y-y.y;lt.free(kn),Wn(jt)}else if(Bt<-Te||Bt>=Te)jt=lt.alloc(),he.vg(),he.computeMidPoint(jt),Zn=he.midAngle,Fn!==Ja&&(cn=he.computeAngle(Nt,Fn,Zn),Nt.Kb=cn),cn=jt.x-y.x,Ar=jt.y-y.y,lt.free(jt);else{if(cn=0,0<=Bt?(Ar=ye.M(Bt),jt=Bt<Te-1?ye.M(Bt+1):Ar):(cn=Te+Bt,Ar=ye.M(cn),jt=0<cn?ye.M(cn-1):Ar),Ar.Xa(jt)){0<=Bt?(Zn=0<Bt?ye.M(Bt-1):Ar,cn=Bt<Te-2?ye.M(Bt+2):jt):(Zn=cn<Te-1?ye.M(cn+1):Ar,cn=1<cn?ye.M(cn-2):jt),kn=Zn.Bf(Ar);var Cr=jt.Bf(cn);Zn=kn>Cr+10?0<=Bt?Zn.ab(Ar):Ar.ab(Zn):Cr>kn+10?0<=Bt?jt.ab(cn):cn.ab(jt):0<=Bt?Zn.ab(cn):cn.ab(Zn)}else Zn=0<=Bt?Ar.ab(jt):jt.ab(Ar);Fn!==Ja&&(cn=he.computeAngle(Nt,Fn,Zn),Nt.Kb=cn),cn=Ar.x+(jt.x-Ar.x)*_t-y.x,Ar=Ar.y+(jt.y-Ar.y)*_t-y.y}Nt.measure(1/0,1/0,0,0),jt=Nt.measuredBounds,kn=Nt.naturalBounds;var vi=0;Nt instanceof Ir&&(vi=Nt.strokeWidth),Cr=kn.width+vi;var Wi=kn.height+vi;$e.reset(),$e.translate(-jt.x,-jt.y),$e.scale(Nt.scale,Nt.scale),$e.rotate(Fn===Ja?Nt.angle:Zn,Cr/2,Wi/2),Fn!==rg&&Fn!==og||$e.rotate(90,Cr/2,Wi/2),Fn!==ig&&Fn!==ag||$e.rotate(-90,Cr/2,Wi/2),Fn===Qm&&(45<Zn&&135>Zn||225<Zn&&315>Zn)&&$e.rotate(-Zn,Cr/2,Wi/2),kn=new Yt(0,0,Cr,Wi),it.xi(kn,Ht),$e.Ga(it),Ht=-it.x+vi/2*Nt.scale,Nt=-it.y+vi/2*Nt.scale,Tt.assign(Jn),vi=isNaN(Jn.x);var Yo=isNaN(Jn.y);if(vi||Yo){Cr=Cr/2+3,Wi=Wi/2+3;var ta=45<=Zn&&135>=Zn,Ra=225<=Zn&&315>=Zn;Fn===Ja&&(ta||Ra)?(Tt.x=Yo?Cr:Jn.y,Tt.y=vi?Wi:Jn.x,ta?0<=Bt||isNaN(Bt)&&.5>_t||!vi||(Tt.y=-Wi):Ra&&((0<=Bt||isNaN(Bt)&&.5>_t)&&vi&&(Tt.y=-Wi),Yo&&(Tt.x=-Cr))):(vi&&(Tt.x=0<=Bt||isNaN(Bt)&&.5>_t?Cr:-Cr),Yo&&(Tt.y=-Wi),Tt.rotate(Zn))}else Tt.rotate(Zn);cn+=Tt.x,Ar+=Tt.y,kn.set(jt),kn.h(cn+Ht,Ar+Nt,jt.width,jt.height),Ze.push(kn),x.ed(kn)}}if(ne!==null)for(b=ne.labelNodes;b.next();)b.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),ci(E,x.width||0,x.height||0),Mr.free($e),lt.free(it),lt.free(Tt)}}}},Pm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof di||a instanceof Tn){var b=a,E=null;a instanceof di&&(E=a,b=E.adornedPart);var te=a instanceof di?null:b.path,ne=a.j;if(ne.length!==0){var se=0;if(te!==null&&se<ne.length){var he=ne[se];se++,te.arrange(he.x-a.jg.x,he.y-a.jg.y,he.width,he.height)}for(he=0;he<x;he++){var pe=y[he];if(pe!==te&&se<ne.length){var ye=ne[se];se++,pe.arrange(ye.x-a.jg.x,ye.y-a.jg.y,ye.width,ye.height)}}}if(y=b.points,x=y.count,2<=x&&a instanceof Tn)for(te=a.labelNodes;te.next();){var Te=a;ne=te.value,se=ne.segmentIndex,he=ne.segmentFraction;var ze=ne.alignmentFocus;if(pe=ne.segmentOrientation,ye=ne.segmentOffset,isNaN(se)){var Ze=Te.ua,$e=$n();Ze.Qu(he,$e);var it=lt.allocAt($e[0],$e[1]);it.add(Te.i(0)),Ze.type===Mn.j||(Ze=Ze.figures.first()),it.offset(-Ze.startX,-Ze.startY),Ze=$e[2],pe!==Ja&&(Te=Te.computeAngle(ne,pe,Ze),ne.angle=Te),Te=it.x;var Tt=it.y;lt.free(it),Wn($e)}else if(se<-x||se>=x)$e=lt.alloc(),Ze=Te,Tt=$e,Ze.vg(),Ze.computeMidPoint(Tt),Ze=Te.midAngle,pe!==Ja&&(Te=Te.computeAngle(ne,pe,Ze),ne.angle=Te),Te=$e.x,Tt=$e.y,lt.free($e);else{if(it=0,0<=se?($e=y.s[se],Tt=se<x-1?y.s[se+1]:$e):(it=x+se,$e=y.s[it],Tt=0<it?y.s[it-1]:$e),$e.Xa(Tt)){0<=se?(Ze=0<se?y.s[se-1]:$e,it=se<x-2?y.s[se+2]:Tt):(Ze=it<x-1?y.s[it+1]:$e,it=1<it?y.s[it-2]:Tt);var bt=Ze.Bf($e),Nt=Tt.Bf(it);Ze=bt>Nt+10?0<=se?Ze.ab($e):$e.ab(Ze):Nt>bt+10?0<=se?Tt.ab(it):it.ab(Tt):0<=se?Ze.ab(it):it.ab(Ze)}else Ze=0<=se?$e.ab(Tt):Tt.ab($e);pe!==Ja&&(Te=Te.computeAngle(ne,pe,Ze),ne.angle=Te),Te=$e.x+(Tt.x-$e.x)*he,Tt=$e.y+(Tt.y-$e.y)*he}if(ze.ys())ne.location=new lt(Te,Tt);else{ze.Mc()&&(ze=ti),$e=Mr.alloc(),$e.reset(),$e.scale(ne.scale,ne.scale),$e.rotate(ne.angle,0,0);var jt=ne.naturalBounds;it=Yt.allocAt(0,0,jt.width,jt.height),bt=lt.alloc(),bt.xi(it,ze),$e.Ga(bt),ze=-bt.x,Nt=-bt.y;var Bt=jt.width,_t=jt.height;jt=lt.alloc(),jt.assign(ye);var Ht=isNaN(ye.x),Fn=isNaN(ye.y);if(Ht||Fn){Bt=Bt/2+3,_t=_t/2+3;var Jn=45<=Ze&&135>=Ze,Zn=225<=Ze&&315>=Ze;pe===Ja&&(Jn||Zn)?(jt.x=Fn?Bt:ye.y,jt.y=Ht?_t:ye.x,Jn?0<=se||isNaN(se)&&.5>he||!Ht||(jt.y=-_t):Zn&&((0<=se||isNaN(se)&&.5>he)&&Ht&&(jt.y=-_t),Fn&&(jt.x=-Bt))):(Ht&&(jt.x=0<=se||isNaN(se)&&.5>he?Bt:-Bt),Fn&&(jt.y=-_t),jt.rotate(Ze))}else jt.rotate(Ze);Te+=jt.x,Tt+=jt.y,$e.pp(it),ze+=it.x,Nt+=it.y,se=lt.allocAt(Te+ze,Tt+Nt),ne.move(se),lt.free(se),lt.free(jt),lt.free(bt),Yt.free(it),Mr.free($e)}}E!==null?E.Ul(!1):b.Ul(!1),b=O1(a),a.location.h(a.position.x+b.x,a.position.y+b.y),lt.free(b)}};function i1(a,y,x,b){if(Bs(b)!==!1){var E=b.strokeWidth;E===0&&a instanceof di&&a.type===Cn.Link&&a.adornedObject instanceof Ir&&(E=a.adornedObject.strokeWidth),E*=b.Ca,a instanceof Tn&&a.ua!==null?(a=a.geometry.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):a instanceof di&&a.adornedPart.ua!==null?(a=a.adornedPart.ua.bounds,b.Ge(a.x-E/2,a.y-E/2,a.width+E,a.height+E)):b.Ge(-(E/2),-(E/2),y+E,x+E),E=b.desiredSize,E.w()||b.ua===null?b.dc.h(0,0,E.width,E.height):b.dc.assign(b.ua.bounds),Bo(b,!1)}}function Kp(){this.xa="Base"}nn(Kp,Go),Kp.prototype.measure=function(a,y,x,b,E,te,ne){var se=a.Pb();a.graduatedBounds=[];var he=se.margin,pe=he.right+he.left,ye=he.top+he.bottom;se.measure(y,x,te,ne);var Te=se.measuredBounds,ze=new Yt(-he.left,-he.top,Math.max(Te.width+pe,0),Math.max(Te.height+ye,0));a.graduatedBounds.push(ze),E.assign(ze);for(var Ze=se.geometry,$e=se.strokeWidth,it=Ze.flattenedSegments,Tt=Ze.flattenedLengths,bt=Ze.flattenedTotalLength,Nt=it.length,jt=0,Bt=0,_t=$n(),Ht=0;Ht<Nt;Ht++){var Fn=it[Ht],Jn=[];Bt=jt=0;for(var Zn=Fn.length,kn=0;kn<Zn;kn+=2){var cn=Fn[kn],Ar=Fn[kn+1];if(kn!==0){var Cr=180*Math.atan2(Ar-Bt,cn-jt)/Math.PI;0>Cr&&(Cr+=360),Jn.push(Cr)}jt=cn,Bt=Ar}_t.push(Jn)}if(a.graduatedIntervals===null){for(var vi=[],Wi=a.O.s,Yo=Wi.length,ta=0;ta<Yo;ta++){var Ra=Wi[ta],$o=[];if(vi.push($o),Ra.visible){var Nh=Ra.interval;if(!(0>Nh)){for(var Lo=0;Lo<Yo;Lo++)if(Lo!==ta){var Rl=Wi[Lo];if(Rl.visible&&Ra.constructor===Rl.constructor){var _a=Rl.interval;_a>Nh&&$o.push(_a)}}}}}a.graduatedIntervals=vi}var Ah=a.graduatedIntervals,zs=a.O.s,fl=zs.length,ks=0,vs=0,mc=bt;a.graduatedMarks=[];for(var _l,Qd=0;Qd<fl;Qd++){var Ts=zs[Qd];if(_l=[],Ts.visible&&Ts!==se){var za=Math.abs(Ts.interval),Ng=a.graduatedTickUnit;if(!(2>Ng*za*bt/a.graduatedRange&&Ts.graduatedSkip===null)){var Vf=Tt[0][0],eu=0,ys=0;vs=bt*Ts.graduatedStart-1e-4,mc=bt*Ts.graduatedEnd+1e-4;var tf=Ng*za,Ms=a.graduatedTickBase;if(Ms<a.graduatedMin){var vc=(a.graduatedMin-Ms)/tf;vc=vc%1===0?vc:Math.floor(vc+1),Ms+=vc*tf}else Ms>a.graduatedMin+tf&&(Ms-=Math.floor((Ms-a.graduatedMin)/tf)*tf);for(var z0=Ah[Qd],Ag=Ms,Gy=1e-6*a.graduatedMax,Eu=1;Ms<=a.graduatedMax+Gy;Eu++){e:{for(var Yu=z0.length,Zf=0;Zf<Yu;Zf++){var yc=(Ms-a.graduatedTickBase)%(z0[Zf]*a.graduatedTickUnit),qd=1e-6*a.graduatedTickUnit;if(yc<qd&&yc>-qd){var Sc=!1;break e}}Sc=!0}if(Sc&&(Ms>a.graduatedMax&&(Ms=a.graduatedMax),Ts.graduatedSkip===null||Ts instanceof Hi&&!Ts.graduatedSkip(Ms,Ts)||Ts instanceof Ir&&!Ts.graduatedSkip(Ms,Ts))&&(ks=(Ms-a.graduatedMin)*bt/a.graduatedRange,ks>bt&&(ks=bt),vs<=ks&&ks<=mc)){for(var ku=_t[eu][ys],jh=Tt[eu][ys];eu<Tt.length;){for(;ks>Vf&&ys<Tt[eu].length-1;)ys++,ku=_t[eu][ys],jh=Tt[eu][ys],Vf+=jh;if(ks<=Vf)break;eu++,ys=0,ku=_t[eu][ys],jh=Tt[eu][ys],Vf+=jh}var Ss=it[eu],tu=Ss[2*ys],G0=Ss[2*ys+1],$u=(ks-(Vf-jh))/jh,ep=new lt(tu+(Ss[2*ys+2]-tu)*$u+$e/2-Ze.bounds.x,G0+(Ss[2*ys+3]-G0)*$u+$e/2-Ze.bounds.y);ep.scale(se.scale,se.scale);e:{var zl=ku,nf=_t[eu];if(!(.5005>$u&&.4995<$u)){var nu=zl;if(.5>$u?0<ys?nu=nf[ys-1]:Gt.$(Ss[0],Ss[Ss.length-2])&&Gt.$(Ss[1],Ss[Ss.length-1])&&(nu=nf[nf.length-1]):.5<$u&&(ys+1<nf.length?nu=nf[ys+1]:Gt.$(Ss[0],Ss[Ss.length-2])&&Gt.$(Ss[1],Ss[Ss.length-1])&&(nu=nf[0])),zl!==nu){var Xf=Math.abs(zl-nu);if(180<Xf&&(zl<nu?zl+=360:nu+=360,Xf=Math.abs(zl-nu)),5e-4>$u||.9995<$u){ku=(zl+nu)/2%360;break e}if(10>Xf){var tp=1-Math.abs(.5-$u);ku=(zl*tp+nu*(1-tp))%360;break e}}}ku=zl}if(Ts instanceof Hi){var kl="";Ts.graduatedFunction!==null?(kl=Ts.graduatedFunction(Ms,Ts),kl=kl!=null?kl.toString():""):kl=(+Ms.toFixed(2)).toString(),kl!==""&&_l.push({$l:ep,angle:ku,text:kl})}else _l.push({$l:ep,angle:ku})}Ms=Ag+Eu*tf}}}a.graduatedMarks.push(_l)}Wn(_t);var da=a.graduatedMarks;if(da!==null)for(var jg=b.length,ns=0;ns<jg;ns++){var No=b[ns],rs=da[ns];if(No.visible&&No!==se&&rs.length!==0){if(No instanceof Ir){var Ju=a,Oh=E,rf=No.alignmentFocus;rf.Mc()&&(rf=co);var Uy=No.angle;No.Kb=0,No.measure(1/0,1/0,0,0),No.Kb=Uy;var U0=No.measuredBounds,np=U0.width,of=U0.height,Yf=Yt.allocAt(0,0,np,of),xs=lt.alloc();xs.xi(Yf,rf),Yt.free(Yf);for(var Qu=-xs.x,Gl=-xs.y,tl=new Yt,xc=rs.length,rp=0;rp<xc;rp++)for(var wc=rs[rp],W0=wc.$l.x,ip=wc.$l.y,xo=wc.angle,Tl=0;4>Tl;Tl++){switch(Tl){case 0:xs.h(Qu,Gl);break;case 1:xs.h(Qu+np,Gl);break;case 2:xs.h(Qu,Gl+of);break;case 3:xs.h(Qu+np,Gl+of)}xs.rotate(xo+No.angle),xs.offset(W0,ip),rp===0&&Tl===0?tl.h(xs.x,xs.y,0,0):tl.Ye(xs),xs.offset(-W0,-ip),xs.rotate(-xo-No.angle)}lt.free(xs),Ju.graduatedBounds!==null&&Ju.graduatedBounds.push(tl),gi(Oh,tl.x,tl.y,tl.width,tl.height)}else if(No instanceof Hi){var dl=a,H0=E;dl.temporaryTextBlock===null&&(dl.temporaryTextBlock=new Hi);var Ls=dl.temporaryTextBlock;S1(Ls,No);var Fh=No.alignmentFocus;Fh.Mc()&&(Fh=co);for(var pl=No.segmentOrientation,op=No.segmentOffset,Pc=new Yt,Og=0,ap=0,ru=0,af=0,bc=0,sp=rs.length,Dh=0;Dh<sp;Dh++){var Tu=rs[Dh];Og=Tu.$l.x,ap=Tu.$l.y,ru=Tu.angle,bc=af=No.angle,pl!==Ja&&(bc=pl===ng||pl===Jm?ru+No.angle:ru,af=Tn.computeAngle(pl,bc)),Ls.Kb=af,Ls.text=Tu.text||"",Ls.measure(1/0,1/0,0,0);var Bh=Ls.measuredBounds,qu=Ls.naturalBounds,Ih=qu.width,sf=qu.height,Ul=Mr.alloc();Ul.reset(),Ul.translate(-Bh.x,-Bh.y),Ul.scale(Ls.scale,Ls.scale),Ul.rotate(bc,Ih/2,sf/2),pl!==rg&&pl!==og||Ul.rotate(90,Ih/2,sf/2),pl!==ig&&pl!==ag||Ul.rotate(-90,Ih/2,sf/2),pl===Qm&&(45<ru&&135>ru||225<ru&&315>ru)&&Ul.rotate(-ru,Ih/2,sf/2);var $f=Yt.allocAt(0,0,Ih,sf),Rh=lt.alloc();Rh.xi($f,Fh),Ul.Ga(Rh);var Jf=-Rh.x,Wy=-Rh.y,eh=lt.alloc();eh.assign(op),isNaN(eh.x)&&(eh.x=Ih/2+3),isNaN(eh.y)&&(eh.y=-(sf/2+3)),eh.rotate(ru),Og+=eh.x+Jf,ap+=eh.y+Wy;var lf=new Yt(Og,ap,Bh.width,Bh.height),Fg=new Yt(Bh.x,Bh.y,Bh.width,Bh.height),Hy=new Yt(qu.x,qu.y,qu.width,qu.height);Tu.Sz=af,Tu.lineCount=Ls.lineCount,Tu.lines=[Ls.Cb,Ls.Ih,Ls.df,Ls.Le,Ls.Qc,Ls.Qb,Ls.ze],Tu.actualBounds=lf,Tu.measuredBounds=Fg,Tu.naturalBounds=Hy,Dh===0?Pc.assign(lf):Pc.ed(lf),lt.free(eh),lt.free(Rh),Yt.free($f),Mr.free(Ul)}dl.graduatedBounds!==null&&dl.graduatedBounds.push(Pc),gi(H0,Pc.x,Pc.y,Pc.width,Pc.height)}Bo(No,!1)}}},Kp.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var b=a.Pb(),E=a.graduatedMarks;if(E!==null){var te=a.graduatedBounds,ne=0,se=te[ne];ne++,b!==null&&b.arrange(se.x-x.x,se.y-x.y,se.width,se.height);for(var he=y.length,pe=0;pe<he;pe++){var ye=y[pe];se=E[pe],ye.visible&&ye!==b&&se.length!==0&&(se=te[ne],ne++,ye.arrange(se.x-x.x,se.y-x.y,se.width,se.height))}a.graduatedBounds=null}}},Kp.prototype.gc=function(a,y,x){var b=x.$i;x.$i=!0;var E=a.naturalBounds,te=E.width,ne=E.height;E=y instanceof bs,y.save(),y.beginPath(),y.rect(-1,-1,te+1,ne+1),y.clip(),y.Se(),te=a.Pb(),te.gc(y,x),ne=a.Df()*x.scale,0>=ne&&(ne=1);for(var se=te.actualBounds,he=a.O.s,pe=a.graduatedMarks,ye=he.length,Te=0;Te<ye;Te++){var ze=he[Te],Ze=pe[Te],$e=Ze.length;if(ze.visible&&ze!==te&&Ze.length!==0){if(ze instanceof Ir){if(!(2>a.graduatedTickUnit*ze.interval*te.geometry.flattenedTotalLength/a.graduatedRange*ne&&ze.graduatedSkip===null)){var it=ze.measuredBounds,Tt=ze.strokeWidth*ze.scale,bt=ze.alignmentFocus;bt.Mc()&&(bt=co);for(var Nt=0;Nt<$e;Nt++){var jt=Ze[Nt].$l,Bt=Ze[Nt].angle,_t=bt,Ht=ze.Ab;Ht.reset(),Ht.translate(jt.x+se.x,jt.y+se.y),Ht.rotate(Bt+ze.angle,0,0),Ht.translate(-it.width*_t.x+_t.offsetX+Tt/2,-it.height*_t.y+_t.offsetY+Tt/2),Ht.scale(ze.scale,ze.scale),sl(ze,!1),ze.wh.set(ze.Ab),ze.Kk=ze.scale,Zs(ze,!1),ze.gc(y,x),E&&(a.svg.appendChild(ze.svg),ze.svg=null),ze.Ab.reset()}}}else if(ze instanceof Hi)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Hi),it=a.temporaryTextBlock,S1(it,ze),Tt=0;Tt<$e;Tt++)bt=Ze[Tt],bt.actualBounds&&bt.measuredBounds&&bt.naturalBounds&&(it.ec=bt.text||"",it.Kb=bt.Sz||0,it.Gc=bt.lineCount||0,Nt=bt.lines,Nt!==void 0&&(it.Cb=Nt[0],it.Ih=Nt[1],it.df=Nt[2],it.Le=Nt[3],it.Qc=Nt[4],it.Qb=Nt[5],it.ze=Nt[6]),bt.naturalBounds&&(it.dc=bt.naturalBounds),bt.actualBounds&&(Nt=bt.actualBounds,it.arrange(Nt.x,Nt.y,Nt.width,Nt.height)),Nt=bt.actualBounds,it.arrange(Nt.x,Nt.y,Nt.width,Nt.height),jt=bt.measuredBounds,bt=bt.naturalBounds,Bt=it.Ab,Bt.reset(),Bt.translate(Nt.x+se.x,Nt.y+se.y),Bt.translate(-jt.x,-jt.y),it.no(Bt,bt.x,bt.y,bt.width,bt.height),sl(it,!1),it.wh.set(it.Ab),it.Kk=it.scale,Zs(it,!1),it.Ng=ze.part,it.Me=ze.panel,it.gc(y,x),it.Me=null,it.Ng=null,E&&(a.svg.appendChild(it.svg),it.svg=null))}}x.$i=b,y.restore(),y.Vc(!0)};function Cn(a,y){if(zt.call(this),this.na=null,a===void 0)this.na=Cn.Position;else if(typeof a=="string"){var x=xl.I(a);x!==null&&(this.na=x)}else a instanceof Go?this.na=a:a&&(this.na=Cn.Position,y=a);this.na===null&&Ot("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Cn.Grid?1048576:0),this.O=new yn,this.yb=Jo,this.Tm=Vo,this.Uf=Fr,this.$g=null,this.$e="",this.jg=new Yt(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=rr,this.jn=ri,this.kn=Bn,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}nn(Cn,zt),Cn.prototype.cloneProtected=function(a){zt.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},Cn.prototype.Af=function(a){zt.prototype.Af.call(this,a),a.O=this.O;for(var y=a.O.s,x=y.length,b=0;b<x;b++)y[b].Me=a;a.$g=null},Cn.prototype.copy=function(){var a=zt.prototype.copy.call(this);if(a!==null){for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b].copy();E.wi(a),E.Ng=null;var te=a.O,ne=te.count;if(te.Gb(ne,E),te=a.part,te!==null){te.Rh=null,E.portId!==null&&te instanceof Rn&&(te.Te=!0);var se=a.diagram;se!==null&&se.undoManager.isUndoingRedoing||te.cb(Po,"elements",a,null,E,null,ne)}}return a}return null},et=Cn.prototype,et.toString=function(){return"Panel("+this.type.name+")#"+Yr(this)},et.Pn=function(a){zt.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,b=0;b<x;b++)y[b].Pn(a)},et.hh=function(a,y){if(this.na===Cn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Cn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Cn.Table)if(a.yc(),a instanceof bs){var x=a.yd;a.yd=um(a,"gojs-ts"),gv(this,a),a.nh.pop(),a.yd=x}else gv(this,a);(x=this.isClipping&&this.na===Cn.Spot)&&a.save();for(var b=this.Pb(),E=this.O.s,te=E.length,ne=0;ne<te;ne++){var se=E[ne];x&&se===b&&(a.clipInsteadOfFill=!0),se.gc(a,y),x&&se===b&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function gv(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,b=0<a.columnCount?a.colDefs:null;x!==null&&bm(a,y,!0,x,!0),b!==null&&bm(a,y,!1,b,!0),x!==null&&o1(a,y,!0,x),b!==null&&o1(a,y,!1,b),x!==null&&bm(a,y,!0,x,!1),b!==null&&bm(a,y,!1,b,!1)}function o1(a,y,x,b){for(var E=b.length,te=a.actualBounds,ne=a.naturalBounds,se=!0,he=0;he<E;he++){var pe=b[he];if(pe!==void 0&&pe.actual!==0)if(se)se=!1;else{if(x){if(pe.position>ne.height)continue}else if(pe.position>ne.width)continue;var ye=pe.separatorStrokeWidth;isNaN(ye)&&(ye=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Te=pe.separatorStroke;if(Te===null&&(Te=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ye!==0&&Te!==null){yo(a,y,Te,!1,!1,ne,te),Te=!1;var ze=pe.separatorDashArray;ze===null&&(ze=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),ze!==null&&(Te=!0,y.js(ze,0)),y.beginPath(),ze=pe.position+ye,x?ze>ne.height&&(ye-=ze-ne.height):ze>ne.width&&(ye-=ze-ne.width),pe=pe.position+ye/2,y.lineWidth=ye,ye=a.yb,x?(pe+=ye.top,ze=ne.width-ye.right,y.moveTo(ye.left,pe),y.lineTo(ze,pe)):(pe+=ye.left,ze=ne.height-ye.bottom,y.moveTo(pe,ye.top),y.lineTo(pe,ze)),y.stroke(),y.Se(),Te&&y.fs()}}}}function bm(a,y,x,b,E){for(var te=b.length,ne=a.actualBounds,se=a.naturalBounds,he=a1(a,!0),pe=a1(a,!1),ye=0;ye<te;ye++){var Te=b[ye];if(Te!==void 0&&Te.background!==null&&Te.coversSeparators!==E&&Te.actual!==0){var ze=x?ne.height:ne.width;if(!(Te.position>ze)){var Ze=Te.Wc(),$e=Te.separatorStrokeWidth;isNaN($e)&&($e=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var it=Te.separatorStroke;it===null&&(it=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(it===null||Te.index===(x?he:pe))&&($e=0),Ze-=$e,$e=Te.position+$e,Ze+=Te.actual,$e+Ze>ze&&(Ze=ze-$e),0>=Ze||(ze=a.yb,yo(a,y,Te.background,!0,!1,se,ne),x?y.fillRect(ze.left,$e+ze.top,ne.width-(ze.left+ze.right),Ze):y.fillRect($e+ze.left,ze.top,Ze,ne.height-(ze.top+ze.bottom)))}}}}function a1(a,y){for(var x=y?a.rowCount:a.columnCount,b=0;b<x;b++){var E=y?a.rowDefs[b]:a.colDefs[b];if(E!==void 0)return E.index}return 0}function mv(a){return a==="LineV"||a==="BarV"}et.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},et.kk=function(a,y,x){if(!zt.prototype.kk.call(this,a,y,x))return!1;if(this.type===Cn.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,gv(this,a),a.yd=null;else if(this.na===Cn.Grid||this.na===Cn.Graduated)return this.svg.innerHTML="",this.svg.remove(),!1;x=this.O.s;for(var b=x.length,E=0;E<b;E++)x[E].gc(a,y);return!0},et.nk=function(){return!0},et.$o=function(a,y,x,b){if(!this.isClipping)if(this.Dd()&&a.bk!==null){a=a.bk,y=this.O.s;for(var E=0,te=0,ne=0;ne<y.length;ne++)if(y[ne].Ed()){var se=y[ne].actualBounds;E=ne===0?se.x:Math.min(se.x,E),te=ne===0?se.y:Math.min(se.y,te)}b.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-E)+","+(a.y-x.y-te)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else zt.prototype.$o.call(this,a,y,x,b)},et.Sj=function(a,y,x,b,E){var te=this.se(),ne=this.transform,se=1/(ne.m11*ne.m22-ne.m12*ne.m21),he=ne.m22*se,pe=-ne.m12*se,ye=-ne.m21*se,Te=ne.m11*se,ze=se*(ne.m21*ne.dy-ne.m22*ne.dx),Ze=se*(ne.m12*ne.dx-ne.m11*ne.dy);if(this.areaBackground!==null)return ne=this.actualBounds,Gt.Ff(ne.left,ne.top,ne.right,ne.bottom,a,y,x,b,E);if(this.background!==null)return te=a*he+y*ye+ze,se=a*pe+y*Te+Ze,a=x*he+b*ye+ze,he=x*pe+b*Te+Ze,E.h(0,0),x=this.naturalBounds,te=Gt.Ff(0,0,x.width,x.height,te,se,a,he,E),E.transform(ne),te;te||(he=1,ye=pe=0,Te=1,Ze=ze=0),se=a*he+y*ye+ze,a=a*pe+y*Te+Ze,he=x*he+b*ye+ze,x=x*pe+b*Te+Ze,E.h(he,x),b=(he-se)*(he-se)+(x-a)*(x-a),pe=!1,Te=this.O.s,Ze=Te.length,ye=lt.alloc(),ze=null,y=1/0;var $e=null,it=this.isClipping&&this.na===Cn.Spot;it&&($e=lt.alloc(),ze=this.Pb(),(pe=ze.Sj(se,a,he,x,$e))&&(y=(se-$e.x)*(se-$e.x)+(a-$e.y)*(a-$e.y)));for(var Tt=0;Tt<Ze;Tt++){var bt=Te[Tt];bt.visible&&bt!==ze&&bt.Sj(se,a,he,x,ye)&&(pe=!0,bt=(se-ye.x)*(se-ye.x)+(a-ye.y)*(a-ye.y),bt<b&&(b=bt,E.set(ye)))}return it&&(y>b&&E.set($e),lt.free($e)),lt.free(ye),te&&E.transform(ne),pe},et.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();zt.prototype.Gj.call(this)},et.v=function(a){if(!Bs(this)){zt.prototype.v.call(this,a),a=null,(this.na===Cn.Auto||this.na===Cn.Link)&&(a=this.Pb());for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];if((E===a||E.isPanelMain)&&E.v(!0),!E.desiredSize.w()){var te=ls(E,!1);(E instanceof $a||E instanceof Cn||E instanceof Hi||te!==gn)&&E.v(!0)}}}},et.Uj=function(){if(!Bs(this)){Bo(this,!0),pu(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},et.Uk=function(){if(!(this.l&2048)){sl(this,!0),Zs(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},et.Wu=function(){Zs(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},et.Wl=function(a,y,x,b){var E=this.jg;E.h(0,0,0,0);var te=this.desiredSize,ne=this.minSize;x===void 0&&(x=ne.width,b=ne.height),x=Math.max(x,ne.width),b=Math.max(b,ne.height);var se=this.maxSize;isNaN(te.width)||(a=Math.min(te.width,se.width)),isNaN(te.height)||(y=Math.min(te.height,se.height)),a=Math.max(x,a),y=Math.max(b,y);var he=this.yb;a=Math.max(a-he.left-he.right,0),y=Math.max(y-he.top-he.bottom,0);var pe=this.O.s;pe.length!==0&&this.na.measure(this,a,y,pe,E,x,b),a=E.width+he.left+he.right,he=E.height+he.top+he.bottom,isFinite(te.width)&&(a=te.width),isFinite(te.height)&&(he=te.height),a=Math.min(se.width,a),he=Math.min(se.height,he),a=Math.max(ne.width,a),he=Math.max(ne.height,he),a=Math.max(x,a),he=Math.max(b,he),ci(E,a,he),ci(this.naturalBounds,a,he),this.Ge(0,0,a,he)},et.Pb=function(){if(this.$g===null){var a=this.O.s,y=a.length;if(y===0)return null;for(var x=0;x<y;x++){var b=a[x];if(b.isPanelMain===!0)return this.$g=b}this.$g=a[0]}return this.$g};function Vu(a){return a.part!==null?a.part.locationObject:null}et.eh=function(a,y,x,b){var E=this.O.s;if(this.actualBounds.h(a,y,x,b),E.length!==0){if(!this.desiredSize.w()){a=ls(this,!0);var te=this.measuredBounds;y=te.width,te=te.height;var ne=this.Kg,se=ne.left+ne.right;switch(ne=ne.top+ne.bottom,y===x&&te===b&&(a=gn),a){case gn:(y>x||te>b)&&(this.v(),this.measure(y>x?x:y,te>b?b:te,0,0));break;case wn:this.v(!0),this.measure(x+se,b+ne,0,0);break;case sr:this.v(!0),this.measure(x+se,te+ne,0,0);break;case Sr:this.v(!0),this.measure(y+se,b+ne,0,0)}}this.na.arrange(this,E,this.jg)}},et.gh=function(a){var y=this.naturalBounds,x=Vu(this);if(Qi(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var b=y.length,E=lt.allocAt(0,0);b--;){var te=y[b];if((te.visible||te===x)&&(Gn(E.set(a),te.transform),te.ca(E)))return lt.free(E),!0}return lt.free(E),!(this.Ma===null&&this.areaBackground===null)}return!1},et.ks=function(a){if(this.bindingId===a)return this;for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b].ks(a);if(E!==null)return E}return null},et.qm=function(a,y){if(y(this,a),a instanceof Cn){a=a.O.s;for(var x=a.length,b=0;b<x;b++)this.qm(a[b],y)}};function Zc(a,y){s1(a,a,y)}function s1(a,y,x){x(y),y=y.O.s;for(var b=y.length,E=0;E<b;E++){var te=y[E];te instanceof Cn&&s1(a,te,x)}}function yx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof Cn){y=y.O.s;for(var b=y.length,E=0;E<b;E++)l1(a,y[E],x)}}et.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof Cn){y=y.O.s;for(var b=y.length,E=0;E<b;E++){var te=u1(a,y[E],x);if(te!==null)return te}}return null}et.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=Vp(this));for(var b=0;b<x;b++){var E=y[b];if(E instanceof Cn){var te=E.fb(a);if(te!==null)return te}if(E.name===a)return E}return null};function h1(a){a=a.O.s;for(var y=a.length,x=0,b=0;b<y;b++){var E=a[b];E instanceof Cn?x=Math.max(x,h1(E)):E instanceof Ir&&(x=Math.max(x,E.ig/2*E.strokeMiterLimit*E.Df()))}return x}et.se=function(){return!(this.type===Cn.TableRow||this.type===Cn.TableColumn)};function xh(a){return a.type===Cn.TableRow||a.type===Cn.TableColumn}et.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),Xa(this)))return null;var b=this.naturalBounds,E=1/this.Df(),te=this.se(),ne=te?a:Gn(lt.allocAt(a.x,a.y),this.transform),se=this.diagram,he=10,pe=5;if(se!==null&&(he=se.Ql("extraTouchArea"),pe=he/2),Qi(-(pe*E),-(pe*E),b.width+he*E,b.height+he*E,ne.x,ne.y)){if(!this.isAtomic){E=this.O.s;var ye=E.length;if(se=lt.alloc(),pe=(he=this.isClipping&&this.na===Cn.Spot)?this.Pb():null,he&&(pe.se()?Gn(se.set(a),pe.transform):se.set(a),!pe.ca(se)))return lt.free(se),te||lt.free(ne),null;for(var Te=Vu(this);ye--;){var ze=E[ye];if((ze.visible||ze===Te)&&(ze.se()?Gn(se.set(a),ze.transform):se.set(a),!he||ze!==pe)){var Ze=null;if(ze instanceof Cn?Ze=ze.ic(se,y,x):ze.pickable===!0&&ze.ca(se)&&(Ze=ze),Ze!==null&&(y!==null&&(Ze=y(Ze)),Ze!==null&&(x===null||x(Ze))))return lt.free(se),te||lt.free(ne),Ze}}lt.free(se)}return this.background===null&&this.areaBackground===null?(te||lt.free(ne),null):(a=Qi(0,0,b.width,b.height,ne.x,ne.y)?this:null,te||lt.free(ne),a)}return te||lt.free(ne),null},et.ji=function(a,y,x,b){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var E=this.naturalBounds,te=this.se(),ne=te?a:Gn(lt.allocAt(a.x,a.y),this.transform);if(E=Qi(0,0,E.width,E.height,ne.x,ne.y),xh(this)||E){if(!this.isAtomic){for(var se=this.O.s,he=se.length,pe=lt.alloc(),ye=Vu(this);he--;){var Te=se[he];if(Te.visible||Te===ye){Te.se()?Gn(pe.set(a),Te.transform):pe.set(a);var ze=Te;Te=Te instanceof Cn?Te:null,(Te!==null?Te.ji(pe,y,x,b):ze.ca(pe))&&ze.pickable!==!1&&(y!==null&&(ze=y(ze)),ze===null||x!==null&&!x(ze)||b.add(ze))}}lt.free(pe)}return te||lt.free(ne),E&&(this.background!==null||this.areaBackground!==null)}return te||lt.free(ne),!1},et.Cf=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=te;if(te===void 0&&(ne=Mr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&Mr.free(ne),!0;if(this.Yc(a,ne)){if(!this.isAtomic)for(var se=Vu(this),he=this.O.s,pe=he.length;pe--;){var ye=he[pe];if(ye.visible||ye===se){var Te=ye.actualBounds,ze=this.naturalBounds;Te.x>ze.width||Te.y>ze.height||0>Te.x+Te.width||0>Te.y+Te.height||(Te=ye,ye=ye instanceof Cn?ye:null,ze=Mr.alloc(),ze.set(ne),(ye!==null?ye.Cf(a,y,x,b,E,ze):Xo(Te,a,b,ze))&&(y!==null&&(Te=y(Te)),Te===null||x!==null&&!x(Te)||E.add(Te)),Mr.free(ze))}}return te===void 0&&Mr.free(ne),b}return te===void 0&&Mr.free(ne),!1};function vv(a,y,x,b){for(var E=a.O.s,te=E.length;te--;){var ne=E[te];if(ne.visible){var se=ne.actualBounds,he=a.naturalBounds;se.x>he.width||se.y>he.height||0>se.x+se.width||0>se.y+se.height||(ne instanceof Cn&&vv(ne,y,x,b),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||b.add(ne))}}}et.og=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;x===void 0&&(x=null),b===void 0&&(b=null);var ne=this.naturalBounds,se=this.se(),he=se?a:Gn(lt.allocAt(a.x,a.y),this.transform),pe=se?y:Gn(lt.allocAt(y.x,y.y),this.transform),ye=he.Bf(pe),Te=0<he.x&&he.x<ne.width&&0<he.y&&he.y<ne.height||In(he.x,he.y,0,0,0,ne.height)<=ye||In(he.x,he.y,0,ne.height,ne.width,ne.height)<=ye||In(he.x,he.y,ne.width,ne.height,ne.width,0)<=ye||In(he.x,he.y,ne.width,0,0,0)<=ye;if(ne=he.zd(0,0)<=ye&&he.zd(0,ne.height)<=ye&&he.zd(ne.width,0)<=ye&&he.zd(ne.width,ne.height)<=ye,se||(lt.free(he),lt.free(pe)),Te){if(!this.isAtomic){he=lt.alloc(),pe=lt.alloc(),ye=Vu(this);for(var ze=this.O.s,Ze=ze.length;Ze--;){var $e=ze[Ze];if($e.visible||$e===ye){var it=$e.actualBounds,Tt=this.naturalBounds;(!se||!(it.x>Tt.width||it.y>Tt.height||0>it.x+it.width||0>it.y+it.height))&&($e.se()?(it=$e.transform,Gn(he.set(a),it),Gn(pe.set(y),it)):(he.set(a),pe.set(y)),it=$e,$e=$e instanceof Cn?$e:null,($e!==null?$e.og(he,pe,x,b,E,te):it.tx(he,pe,E))&&(x!==null&&(it=x(it)),it===null||b!==null&&!b(it)||te.add(it)))}}lt.free(he),lt.free(pe)}return E?Te:ne}return!1};function yv(a){var y=null;return a instanceof Ir&&(y=a.spot1,y===Vo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=wi),y}function Sv(a){var y=null;return a instanceof Ir&&(y=a.spot2,y===Vo&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=io),y}et.add=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];for(x=0;x<y.length;x++)this.Gb(this.O.count,y[x]);return this},et.M=function(a){return this.O.M(a)},et.Gb=function(a,y){y instanceof fr&&Ot("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Ot("Cannot make a Panel contain itself: "+this.toString()),Ot("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Ot("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!==Cn.Grid||y instanceof Ir||Ot("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Cn.Graduated||y instanceof Ir||y instanceof Hi||Ot("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+y),y.wi(this),y.Ng=null,this.itemArray!==null){var b=y.data;b!==null&&typeof b=="object"&&(this.ge===null&&(this.ge=new Jt),this.ge.add(b,y))}var E=this.O;if(b=-1,x===this){for(var te=-1,ne=this.O.s,se=ne.length,he=0;he<se;he++)if(ne[he]===y){te=he;break}if(te!==-1){if(te===a||te+1>=E.count&&a>=E.count)return;E.mb(te),b=te}else Ot("element "+y.toString()+" has panel "+x.toString()+" but is not contained by it.")}(0>a||a>E.count)&&(a=E.count),E.Gb(a,y),(a===0||y.isPanelMain)&&(this.$g=null),Bs(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Cn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Em(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof Rn&&(x.Te=!0),x.Te&&x instanceof Rn&&(x.wc=null),E=this.diagram,E!==null&&E.undoManager.isUndoingRedoing||(b!==-1&&x.cb(Eo,"elements",this,y,null,b,null),x.cb(Po,"elements",this,null,y,null,a)))};function xv(a,y){a.l=y?a.l|16777216:a.l&-16777217}et.remove=function(a){for(var y=this.O.s,x=y.length,b=-1,E=0;E<x;E++)if(y[E]===a){b=E;break}b!==-1&&this.pc(b,!0)},et.mb=function(a){0<=a&&this.pc(a,!0)},et.pc=function(a,y){var x=this.O,b=x.M(a);if(b.Ng=null,b.wi(null),this.ge!==null){var E=b.data;typeof E=="object"&&this.ge.remove(E)}x.mb(a),Bo(this,!1),this.v(),this.$g===b&&(this.$g=null),this.graduatedIntervals=null;var te=this.part;te!==null&&(te.Rh=null,te.ag=NaN,te.Wb(),te instanceof Rn&&(b instanceof Cn?b.qm(b,function(ne,se){Wv(te,se,y)}):Wv(te,b,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||te.cb(Eo,"elements",this,b,null,a,null))},et.Fb=function(a){0>a&&_n(a,">= 0",Cn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Io;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(Po,"rowdefs",this,null,x,null,a)}return y[a]},et.oA=function(a){if(0>a&&_n(a,">= 0",Cn,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(Eo,"rowdefs",this,x,null,a,null),this.v()}}};function c1(a,y,x){var b=a.rowDefs;if(!(0>y)){if(b[y]=x instanceof Io?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}et.Eb=function(a){0>a&&_n(a,">= 0",Cn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Io;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(Po,"coldefs",this,null,x,null,a)}return y[a]},et.jA=function(a){if(0>a&&_n(a,">= 0",Cn,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var b=y.length-1;0<=b&&y[b--]===void 0;)y.length--;this.cb(Eo,"coldefs",this,x,null,a,null),this.v()}}};function f1(a,y,x){var b=a.colDefs;if(!(0>y)){if(b[y]=x instanceof Io?x:void 0,!x)for(y=b.length-1;0<=y&&b[y--]===void 0;)b.length--;a.v()}}et.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&km(y,a),this},et.Hy=function(a,y){return(a=this.Fb(a))&&km(a,new Io(y)),this},et.By=function(a,y){return(a=this.Eb(a))&&km(a,new Io(y)),this},et.nz=function(a){if(0>a||this.type!==Cn.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,b=x.length,E=this.topIndex;E<b;E++){var te=x[E];if(te!==void 0&&(y+=te.total,a<y))break}return E},et.fz=function(a){if(0>a||this.type!==Cn.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,b=x.length,E=this.leftIndex;E<b;E++){var te=x[E];if(te!==void 0&&(y+=te.total,a<y))break}return E},et.Fz=function(a,y){if(y===void 0&&(y=new lt(NaN,NaN)),this.type!==Cn.Graduated)return y.h(NaN,NaN),y;a=Math.min(Math.max(a,this.graduatedMin),this.graduatedMax);var x=this.Pb();return x.geometry.Pu((a-this.graduatedMin)/this.graduatedRange,y),x.transform.Ga(y)},et.Gz=function(a){if(this.type!==Cn.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function d1(a){return a=a.allBindings,a!==null&&a._isFrozen}function ul(a){var y=a.allBindings;if(y===null)a.data!==null&&Ot("Template cannot have .data be non-null: "+a),a.allBindings=y=new yn;else if(y._isFrozen)return;var x=new yn;xv(a,!1),a.qm(a,function(pe,ye){ye.th();var Te=ye.localBindings;if(Te!==null)for(Af(ye,!1),Te=Te.iterator;Te.next();){var ze=Te.value;ze.mode===pg&&Af(ye,!0);var Ze=ze.sourceName;Ze!==null&&(Ze==="/"&&xv(pe,!0),Ze=TS(ze,pe,ye),Ze!==null&&(x.add(Ze),Ze.srcBindings===null&&(Ze.srcBindings=new yn),Ze.srcBindings.add(ze))),y.add(ze)}if(ye instanceof Cn&&ye.type===Cn.Table){if(0<ye.rowCount){for(pe=ye.rowDefs,Te=pe.length,ze=0;ze<Te;ze++)if(Ze=pe[ze],Ze!==void 0&&Ze.be!==null)for(var $e=Ze.be.iterator;$e.next();){var it=$e.value;it.xd=Ze,it.to=2,it.wl=Ze.index,y.add(it)}}if(0<ye.columnCount){for(ye=ye.colDefs,pe=ye.length,Te=0;Te<pe;Te++)if(ze=ye[Te],ze!==void 0&&ze.be!==null)for(Ze=ze.be.iterator;Ze.next();)$e=Ze.value,$e.xd=ze,$e.to=1,$e.wl=ze.index,y.add($e)}}});for(var b=x.iterator;b.next();){var E=b.value;if(E.srcBindings!==null){Af(E,!0);for(var te=E.srcBindings.iterator;te.next();){var ne=te.value;E.localBindings===null&&(E.localBindings=new yn),E.localBindings.add(ne)}}E.srcBindings=null}for(b=y.iterator;b.next();)if(E=b.value,te=E.xd,te!==null){E.xd=null;var se=E.targetProperty,he=se.indexOf(".");0<he&&te instanceof Cn&&(ne=se.substring(0,he),se=se.substr(he+1),he=te.fb(ne),he!==null?(te=he,E.targetProperty=se):qn('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+E.toString())),te instanceof Io?(ne=Yr(te.panel),E.Ai=ne===void 0?-1:ne,te.panel.bindingId=E.Ai):te instanceof zt?(ne=Yr(te),E.Ai=ne===void 0?-1:ne,te.bindingId=E.Ai):Ot("Unknown type of binding target: "+te)}y.freeze(),a instanceof fr&&a.Zc()&&a.Va()}et.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return yx(y,function(x){x instanceof Cn&&(x.allBindings=null,x.ub=null);var b=x.localBindings;b!==null&&(x.localBindings=null,b.each(function(E){x.bind(E.copy())})),b=x.animationTriggers,b!==null&&(x.animationTriggers=null,b.each(function(E){x.Jv(E.value.copy())}))}),a&&ul(y),y},et.La=function(a){var y=this.allBindings;if(y!==null)for(a===void 0&&(a=""),y=y.iterator;y.next();){var x=y.value,b=x.sourceProperty;if((a===""||b===""||b===a)&&(b=x.targetProperty,x.converter!==null||b!=="")){b=this.data;var E=x.sourceName;if(E!==null){if(E==="")b=this;else if(E==="/")b=this;else if(E===".")b=this;else if(E==="..")b=this;else if(b=this.fb(E),b===null)continue}else if(x.isToModel)if(b=this.diagram,b!==null)b=b.model.modelData;else continue;var te=this,ne=x.Ai;if(ne!==-1){if(te=this.ks(ne),te===null)continue}else x.xd!==null&&(te=x.xd);if(E==="/"?b=te.part:E==="."?b=te:E===".."&&(b=te.panel),E=x.to,E!==0){if(!(te instanceof Cn))continue;E===1?te=te.Eb(x.wl):E===2&&(te=te.Fb(x.wl))}te!==void 0&&x.Mv(te,b)}}},et.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function Sx(a,y){a=a.O.s;for(var x=a.length,b=y.length,E=0,te=null;E<x&&(te=a[E],!(te instanceof Cn&&te.data!==null));)E++,te=a[E];if(x-E!==b)return!0;if(te===null)return 0<b;for(var ne=0;E<x&&ne<b;){if(te=a[E],!(te instanceof Cn)||te.data!==y[ne])return!0;E++,ne++}return!1}function Vp(a){if(a.type===Cn.Spot||a.type===Cn.Auto)return Math.min(a.O.length,1);if(a.type===Cn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var b=a.M(x);if(!(b instanceof Ir&&b.isPanelMain))break}return x}return a.type===Cn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Cn&&xh(a))?1:0}et.mv=function(){for(var a=Vp(this);this.O.length>a;)this.pc(this.O.length-1,!1);p1(this,this.itemArray)};function p1(a,y){var x=Vp(a);if(y===null||y.length===0)for(;a.O.length>x;)a.pc(a.O.length-1,!1);else if(a.O.length<=x){x=y.length;for(var b=0;b<x;b++)Cm(a,y[b],b,!0)}else{b=x;for(var E=0;E<y.length;E++,b++){var te=y[E],ne=b<a.O.length?a.O.M(b):null;if(ne instanceof Cn){if(ne.data!==te){var se=Pv(a,ne.data),he=Pv(a,te),pe=he!==se;pe||(se=bv(a,se),pe=bv(a,he)!==se),pe?(a.pc(b,!1),Cm(a,te,E,!1)):ne.data=te}}else Cm(a,te,E,!1)}for(;b<a.O.length;)a.pc(b,!1);a.$g=null,wv(a,x,0),Bs(a)||a.v(),a.graduatedIntervals=null,a.If()||Em(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof Rn&&(y.Te=!0),y.Te&&y instanceof Rn&&(y.wc=null))}}function Cm(a,y,x,b){if(!(y==null||0>x)){var E=Pv(a,y);if(E=bv(a,E),E!==null){if(ul(E),E=E.copy(),E.l&16777216){var te=a.ih();te!==null&&xv(te,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new Jt),a.ge.add(y,E)),te=x+Vp(a),a.Gb(te,E),b&&(E.ub=y,wv(a,te,x),E.ub=null),E.data=y}}}function wv(a,y,x){for(a=a.O;y<a.length;){var b=a.M(y);if(b instanceof Cn){var E=y,te=x;b.type===Cn.TableRow?b.row=E:b.type===Cn.TableColumn&&(b.column=E),b.itemIndex=te}y++,x++}}function Pv(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=bo(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;Ot("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function bv(a,y){var x=a.itemTemplateMap,b=null;return x!==null&&(b=x.I(y)),b===null&&(x!==null&&(b=x.I("")),b===null&&(g1||(g1=!0,qn('No item template Panel found for category "'+y+'" on '+a),qn(" Using default item template."),a=new Cn,y=new Hi,y.bind(new Mo("text","",Rr)),a.add(y),m1=a),b=m1)),b}function Em(a,y,x){var b=y.enabledChanged;if(b!==null&&b(y,x),y instanceof Cn){y=y.O.s,b=y.length;for(var E=0;E<b;E++){var te=y[E];x&&te instanceof Cn&&!te.isEnabled||Em(a,te,x)}}}function Ql(a,y){y.name=a,xl.add(a,y)}Zt.Object.defineProperties(Cn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Cn.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&&_n(a,">= 0",Cn,"padding"),a=new Dr(a)):(0>a.left&&_n(a.left,">= 0",Cn,"padding:value.left"),0>a.right&&_n(a.right,">= 0",Cn,"padding:value.right"),0>a.top&&_n(a.top,">= 0",Cn,"padding:value.top"),0>a.bottom&&_n(a.bottom,">= 0",Cn,"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:Jo},set:function(a){typeof a=="number"&&(a=new Dr(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new $s),this.T.Qp=a,this.v(),this.g("defaultSeparatorPadding",y,a))}},defaultRowSeparatorStroke:{get:function(){return this.T!==null?this.T.ia:null},set:function(a){var y=this.defaultRowSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof Ti)&&(a instanceof Ti&&a.freeze(),this.T===null&&(this.T=new $s),this.T.ia=a,this.N(),this.g("defaultRowSeparatorStroke",y,a))}},defaultRowSeparatorStrokeWidth:{get:function(){return this.T!==null?this.T.Ha:1},set:function(a){var y=this.defaultRowSeparatorStrokeWidth;y!==a&&isFinite(a)&&0<=a&&(this.T===null&&(this.T=new $s),this.T.Ha=a,this.v(),this.g("defaultRowSeparatorStrokeWidth",y,a))}},defaultRowSeparatorDashArray:{get:function(){return this.T!==null?this.T.V:null},set:function(a){var y=this.defaultRowSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var te=a[E];typeof te=="number"&&0<=te&&isFinite(te)||Ot("defaultRowSeparatorDashArray value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new $s),this.T.V=a,this.N(),this.g("defaultRowSeparatorDashArray",y,a)}}},defaultColumnSeparatorStroke:{get:function(){return this.T!==null?this.T.u:null},set:function(a){var y=this.defaultColumnSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof Ti)&&(a instanceof Ti&&a.freeze(),this.T===null&&(this.T=new $s),this.T.u=a,this.N(),this.g("defaultColumnSeparatorStroke",y,a))}},defaultColumnSeparatorStrokeWidth:{get:function(){return this.T!==null?this.T.F:1},set:function(a){var y=this.defaultColumnSeparatorStrokeWidth;y!==a&&isFinite(a)&&0<=a&&(this.T===null&&(this.T=new $s),this.T.F=a,this.v(),this.g("defaultColumnSeparatorStrokeWidth",y,a))}},defaultColumnSeparatorDashArray:{get:function(){return this.T!==null?this.T.o:null},set:function(a){var y=this.defaultColumnSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var te=a[E];typeof te=="number"&&0<=te&&isFinite(te)||Ot("defaultColumnSeparatorDashArray value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===0){if(y===null)return;a=null}}this.T===null&&(this.T=new $s),this.T.o=a,this.N(),this.g("defaultColumnSeparatorDashArray",y,a)}}},inRowsCols:{get:function(){return this.T!==null?this.T.nb:null},set:function(a){this.T===null&&(this.T=new $s),this.T.nb=a}},viewboxStretch:{get:function(){return this.xo},set:function(a){var y=this.xo;y!==a&&(this.xo=a,this.v(),this.g("viewboxStretch",y,a))}},gridCellSize:{get:function(){return this.jn},set:function(a){var y=this.jn;if(!y.D(a)){a.w()&&a.width!==0&&a.height!==0||Ot("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Yl(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()||Ot("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Yl(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 Zu),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),pa(this)&&(a=this.part,a!==null&&Ji(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 Zu),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),pa(this)&&(a=this.part,a!==null&&Ji(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 Zu),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 Zu),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 Zu,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 Zu,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 Zu,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 Zu,this.ra.Zh=a)}},panelLayoutState:{get:function(){return this.F},set:function(a){this.F=a}},Te:{get:function(){return(this.l&8388608)!==0},set:function(a){(this.l&8388608)!==0!==a&&(this.l^=8388608)}},rowDefs:{get:function(){return this.T===null&&(this.T=new $s),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new $s),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:Mm},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new $s),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:Mm},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new $s),this.T.j=a,this.v(),this.g("columnSizing",y,a))}},topIndex:{get:function(){return this.T!==null?this.T.Hb:0},set:function(a){var y=this.topIndex;y!==a&&((!isFinite(a)||0>a)&&Ot("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new $s),this.T.Hb=a,this.v(),this.g("topIndex",y,a))}},leftIndex:{get:function(){return this.T!==null?this.T.hb:0},set:function(a){var y=this.leftIndex;y!==a&&((!isFinite(a)||0>a)&&Ot("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new $s),this.T.hb=a,this.v(),this.g("leftIndex",y,a))}},data:{get:function(){return this.ub},set:function(a){var y=this.ub;if(y!==a){var x=this instanceof fr&&!(this instanceof di);ul(this),this.ub=a;var b=this.diagram;b!==null&&(x?(x=b.partManager,this instanceof Tn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof fr&&(y!==null&&x.cf.remove(y),a!==null&&x.cf.add(a,this))):(x=this.panel,x!==null&&x.ge!==null&&(y!==null&&x.ge.remove(y),a!==null&&x.ge.add(a,this)))),this.g("data",y,a),b!==null&&b.undoManager.isUndoingRedoing||a!==null&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var y=this.zn;y!==a&&(this.zn=a,this.g("itemIndex",y,a))}},allBindings:{get:function(){return this.A!==null?this.A.nb:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new jf),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&Sx(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&uy(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&ly(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||p1(this,a)}}},itemTemplate:{get:function(){return this.itemTemplateMap===null?null:this.itemTemplateMap.I("")},set:function(a){if(this.itemTemplateMap===null){if(a===null)return;this.itemTemplateMap=new Jt}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof fr||a.isPanelMain)&&Ot("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(););Gr(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&&(Gr(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 jr&&(this.tb=null),this.v(),this.g("isClipping",y,a))}},isOpposite:{get:function(){return(this.l&33554432)!==0},set:function(a){var y=(this.l&33554432)!==0;y!==a&&(this.l^=33554432,this.v(),this.g("isOpposite",y,a))}},isEnabled:{get:function(){return(this.l&4194304)!==0},set:function(a){var y=(this.l&4194304)!==0;if(y!==a){var x=this.panel===null||this.panel.If();this.l^=4194304,this.g("isEnabled",y,a),y=this.diagram,y!==null&&y.undoManager.isUndoingRedoing||x&&Em(this,this,a)}}},alignmentFocusName:{get:function(){return this.$e},set:function(a){var y=this.$e;y!==a&&(this.$e=a,this.v(),this.g("alignmentFocusName",y,a))}}}),Zt.Object.defineProperties(Cn,{Position:{get:function(){return xl.I("Position")}},Horizontal:{get:function(){return xl.I("Horizontal")}},Vertical:{get:function(){return xl.I("Vertical")}},Spot:{get:function(){return xl.I("Spot")}},Auto:{get:function(){return xl.I("Auto")}},Table:{get:function(){return xl.I("Table")}},Viewbox:{get:function(){return xl.I("Viewbox")}},TableRow:{get:function(){return xl.I("TableRow")}},TableColumn:{get:function(){return xl.I("TableColumn")}},Link:{get:function(){return xl.I("Link")}},Grid:{get:function(){return xl.I("Grid")}},Graduated:{get:function(){return xl.I("Graduated")}}}),Cn.prototype.rebuildItemElements=Cn.prototype.mv,Cn.prototype.findItemPanelForData=Cn.prototype.sx,Cn.prototype.updateTargetBindings=Cn.prototype.La,Cn.prototype.copyTemplate=Cn.prototype.Uy,Cn.prototype.graduatedValueForPoint=Cn.prototype.Gz,Cn.prototype.graduatedPointForValue=Cn.prototype.Fz,Cn.prototype.findColumnForLocalX=Cn.prototype.fz,Cn.prototype.findRowForLocalY=Cn.prototype.nz,Cn.prototype.addColumnDefinition=Cn.prototype.By,Cn.prototype.addRowDefinition=Cn.prototype.Hy,Cn.prototype.addRowColumnDefinition=Cn.prototype.Gy,Cn.prototype.removeColumnDefinition=Cn.prototype.jA,Cn.prototype.getColumnDefinition=Cn.prototype.Eb,Cn.prototype.removeRowDefinition=Cn.prototype.oA,Cn.prototype.getRowDefinition=Cn.prototype.Fb,Cn.prototype.removeAt=Cn.prototype.mb,Cn.prototype.remove=Cn.prototype.remove,Cn.prototype.insertAt=Cn.prototype.Gb,Cn.prototype.elt=Cn.prototype.M,Cn.prototype.add=Cn.prototype.add,Cn.prototype.findObject=Cn.prototype.fb,Cn.prototype.findInVisualTree=Cn.prototype.Nl,Cn.prototype.walkVisualTreeFrom=Cn.prototype.qm,Cn.prototype.findMainElement=Cn.prototype.Pb;var g1=!1,m1=null,xl=new Jt;Cn.className="Panel",Cn.definePanelLayout=Ql,Ql("Position",new fm),Ql("Vertical",new pm),Ql("Auto",new mm),Ql("Link",new Pm);function Zu(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Zu.prototype.copy=function(){var a=new Zu;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},Zu.className="GradPanelSettings";function $s(){this.Pc=[],this.Oc=[],this.j=this.ob=Mm,this.hb=this.Hb=0,this.Qp=Jo,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}$s.prototype.copy=function(a){for(var y=new $s,x=this.Pc,b=x.length,E=y.Pc,te=0;te<b;te++)if(x[te]!==void 0){var ne=x[te].copy();ne.wi(a),E[te]=ne}for(x=this.Oc,b=x.length,E=y.Oc,te=0;te<b;te++)x[te]!==void 0&&(ne=x[te].copy(),ne.wi(a),E[te]=ne);return y.ob=this.ob,y.j=this.j,y.Hb=this.Hb,y.hb=this.hb,y.Qp=this.Qp.J(),y.Ha=this.Ha,y.ia=this.ia,y.V=this.V,y.F=this.F,y.u=this.u,y.o=this.o,y.nb=this.nb,y},$s.className="TablePanelSettings";function Io(a){yr(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Vo,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Cv,this.hg=Fr,this.lo=this.dg=null,this.mo=NaN,this.Ma=this.tj=null,this.Pm=!1,a&&(Object.assign(this,a),a.column!==void 0?(this.isRow=!1,this.index=a.column):a.row!==void 0&&(this.isRow=!0,this.index=a.row))}Io.prototype.copy=function(){var a=new Io;return a.uq=this.uq,a.Za=this.Za,a.Hc=this.Hc,a.jj=this.jj,a.hj=this.hj,a.Jb=this.Jb,a.oa=this.oa,a.oc=this.oc,a.pa=this.pa,a.hg=this.hg,a.oo=this.oo,this.dg===null?a.dg=null:a.dg=this.dg.J(),a.lo=this.lo,a.mo=this.mo,a.tj=null,this.tj!==null&&(a.separatorDashArray=Kn(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function km(a,y){y.isRow?a.height=y.height:a.width=y.width,a.minimum=y.minimum,a.maximum=y.maximum,a.alignment=y.alignment,a.stretch=y.stretch,a.sizing=y.sizing,a.dg=y.separatorPadding===null?null:y.separatorPadding.J(),a.separatorStroke=y.separatorStroke,a.separatorStrokeWidth=y.separatorStrokeWidth,a.tj=null,y.separatorDashArray&&(a.tj=Kn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}et=Io.prototype,et.qb=function(a){a.classType===Io&&(this.sizing=a)},et.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Yr(this)},et.wi=function(a){this.Me=a},et.Io=function(a){var y=0,x=this.Me;if(this.index!==a&&(a=this.separatorStroke,a===null&&x!==null&&(a=this.isRow?x.defaultRowSeparatorStroke:x.defaultColumnSeparatorStroke),a!==null&&(y=this.separatorStrokeWidth,isNaN(y)&&(x!==null?y=this.isRow?x.defaultRowSeparatorStrokeWidth:x.defaultColumnSeparatorStrokeWidth:y=0))),a=this.dg,a===null)if(x!==null)a=x.defaultSeparatorPadding;else return y;return y+(this.isRow?a.top:a.left)},et.Wc=function(){var a=0,y=this.Me,x=0,b=this.isRow;if(y!==null&&y.type===Cn.Table)for(var E=b?y.rowDefs.length:y.colDefs.length,te=0;te<E;te++){var ne=b?y.rowDefs[te]:y.colDefs[te];if(ne!==void 0&&ne.oa!==0){x=ne.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=b?y.defaultRowSeparatorStroke:y.defaultColumnSeparatorStroke),x!==null&&(a=this.separatorStrokeWidth,isNaN(a)&&(y!==null?a=b?y.defaultRowSeparatorStrokeWidth:y.defaultColumnSeparatorStrokeWidth:a=0))),b=this.dg,b===null)if(y!==null)b=y.defaultSeparatorPadding;else return a;return a+(this.isRow?b.top+b.bottom:b.left+b.right)},et.Ob=function(a,y,x){var b=this.Me;if(b!==null&&(b.cb(to,a,this,y,x,void 0,void 0),this.be!==null&&(y=b.diagram,y!==null&&!y.skipsModelSourceBindings&&(b=b.ih(),b!==null&&(y=b.data,y!==null)))))for(x=this.be.iterator;x.next();)x.value.sp(this,y,a,b)};function Tm(a){if(a.sizing===Cv){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}et.bind=function(a,y,x,b){var E=null;return typeof a=="string"?E=new Mo(a,y,x,b):E=a,E.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&d1(y)&&Ot("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+E+" on "+a)),this.be===null&&(this.be=new yn),this.be.add(E),this},Zt.Object.defineProperties(Io.prototype,{panel:{get:function(){return this.Me}},isRow:{get:function(){return this.uq},set:function(a){this.uq=a}},index:{get:function(){return this.Za},set:function(a){this.Za=a}},height:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&_n(a,">= 0",Io,"height"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("height",y,a))}},width:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&_n(a,">= 0",Io,"width"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("width",y,a))}},minimum:{get:function(){return this.jj},set:function(a){var y=this.jj;y!==a&&((0>a||!isFinite(a))&&_n(a,">= 0",Io,"minimum"),this.jj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("minimum",y,a))}},maximum:{get:function(){return this.hj},set:function(a){var y=this.hj;y!==a&&(0>a&&_n(a,">= 0",Io,"maximum"),this.hj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("maximum",y,a))}},alignment:{get:function(){return this.Jb},set:function(a){var y=this.Jb;y.D(a)||(this.Jb=a.J(),this.panel!==null&&this.panel.v(),this.Ob("alignment",y,a))}},stretch:{get:function(){return this.hg},set:function(a){var y=this.hg;y!==a&&(this.hg=a,this.panel!==null&&this.panel.v(),this.Ob("stretch",y,a))}},separatorPadding:{get:function(){return this.dg},set:function(a){typeof a=="number"&&(a=new Dr(a));var y=this.dg;a!==null&&y!==null&&y.D(a)||(a!==null&&(a=a.J()),this.dg=a,this.panel!==null&&this.panel.v(),this.Ob("separatorPadding",y,a))}},separatorStroke:{get:function(){return this.lo},set:function(a){var y=this.lo;y!==a&&(a!==null&&Ff(a,"RowColumnDefinition.separatorStroke"),a instanceof Ti&&a.freeze(),this.lo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStroke",y,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var y=this.mo;y!==a&&(this.mo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStrokeWidth",y,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var y=this.tj;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var te=a[E];typeof te=="number"&&0<=te&&isFinite(te)||Ot("separatorDashArray value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===0){if(y===null)return;a=null}}this.tj=a,this.panel!==null&&this.panel.N(),this.Ob("separatorDashArray",y,a)}}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&Ff(a,"RowColumnDefinition.background"),a instanceof Ti&&a.freeze(),this.Ma=a,this.panel!==null&&this.panel.N(),this.Ob("background",y,a))}},coversSeparators:{get:function(){return this.Pm},set:function(a){var y=this.Pm;y!==a&&(this.Pm=a,this.panel!==null&&this.panel.N(),this.Ob("coversSeparators",y,a))}},sizing:{get:function(){return this.oo},set:function(a){var y=this.oo;y!==a&&(this.oo=a,this.panel!==null&&this.panel.v(),this.Ob("sizing",y,a))}},actual:{get:function(){return this.oa},set:function(a){this.oa=isNaN(this.Hc)?Math.max(Math.min(this.hj,a),this.jj):Math.max(Math.min(this.hj,this.Hc),this.jj)}},measured:{get:function(){return this.oc},set:function(a){this.oc=a}},total:{get:function(){return this.oa+this.Wc()}},position:{get:function(){return this.pa},set:function(a){this.pa=a}}}),Io.prototype.computeEffectiveSpacing=Io.prototype.Wc,Io.prototype.computeEffectiveSpacingTop=Io.prototype.Io;var Cv=new un(Io,"Default",0),Zp=new un(Io,"None",1),Mm=new un(Io,"ProportionalExtra",2);Io.className="RowColumnDefinition",Io.Default=Cv,Io.None=Zp,Io.ProportionalExtra=Mm;function Ir(a,y){zt.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)}nn(Ir,zt),Ir.prototype.cloneProtected=function(a){zt.prototype.cloneProtected.call(this,a),a.ua=this.ua,a.Rd=this.Rd,a.an=this.an,a.Ui=this.Ui,a.xc=this.xc,a.ig=this.ig,this.Yg!==null&&(a.Yg=Kn(this.Yg)),this.Na!==null&&(a.Na=this.Na.nc?this.Na:this.Na.copy()),a.Un=this.Un,a.Vn=this.Vn,this.fa!==null&&(a.fa=this.fa.copy())};function Xc(a){a.Na===null?a.Na=new Tv:a.Na.nc&&(a.Na=a.Na.copy())}et=Ir.prototype,et.th=function(){zt.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},et.qb=function(a){a===gn||a===rr||a===Qr||a===Fr?this.geometryStretch=a:zt.prototype.qb.call(this,a)},et.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Yr(this)};function Nd(a,y,x,b){var E=x.length;if(!(4>E)){var te=b.measuredBounds,ne=Math.max(1,te.width);te=te.height;for(var se=x[0],he=x[1],pe,ye,Te,ze,Ze,$e,it=0,Tt=$n(),bt=2;bt<E;bt+=2)pe=x[bt],ye=x[bt+1],Te=pe-se,se=ye-he,Te===0&&(Te=.001),ze=se/Te,Ze=Math.atan2(se,Te),$e=Math.sqrt(Te*Te+se*se),Tt.push([Te,Ze,ze,$e]),it+=$e,se=pe,he=ye;se=x[0],he=x[1],Te=b.measuredBounds.width,b instanceof Ir&&(Te-=b.strokeWidth),1>Te&&(Te=1),E=x=Te,pe=ne/2,ye=pe!==0,bt=0,$e=Tt[bt],Te=$e[0],Ze=$e[1],ze=$e[2],$e=$e[3];for(var Nt=0;.1<=it;){if(Nt===0&&(ye?(E=x,E-=pe,it-=pe,ye=!1):E=x,E===0&&(E=1)),E>it){Wn(Tt);return}E>$e?(Nt=E-$e,E=$e):Nt=0;var jt=Math.sqrt(E*E/(1+ze*ze));if(0>Te&&(jt=-jt),se+=jt,he+=ze*jt,a.translate(se,he),a.rotate(Ze),a.translate(-(ne/2),-(te/2)),Nt===0&&b.hh(a,y),a.translate(ne/2,te/2),a.rotate(-Ze),a.translate(-se,-he),it-=E,$e-=E,Nt!==0){if(bt++,bt===Tt.length){Wn(Tt);return}$e=Tt[bt],Te=$e[0],Ze=$e[1],ze=$e[2],$e=$e[3],E=Nt}}Wn(Tt)}}et.hh=function(a,y){var x=this.xc,b=this.Ui;if(x!==null||b!==null){var E=this.ua;if(E!==null){a.yc();var te=this.actualBounds,ne=this.naturalBounds;b!==null&&yo(this,a,b,!0,!1,ne,te);var se=this.part,he=this.ig;if(x===null||he!==0||se===null||!this.isPanelMain&&se.Pb()!==this||(he=se.type===Cn.Link&&se instanceof di&&se.category==="Selection"&&se.adornedObject instanceof Ir&&se.adornedPart.Pb()===se.adornedObject?se.adornedObject.strokeWidth:0),he===0&&(x=null),x!==null&&he!==0&&(yo(this,a,x,!1,!1,ne,te),a.lineWidth=he,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),te=!1,se&&y.Gf("drawShadows")&&(te=se.isShadowed),a.Il===!1&&(te=!1),se=!0,x===null||b!==null&&b!=="transparent"||(se=!1),ne=!1,he=this.strokeDashArray,he!==null&&(ne=!0,a.js(he,this.strokeDashOffset)),E.type===Mn.j)a.beginPath(),a.moveTo(E.startX,E.startY),a.lineTo(E.endX,E.endY),x!==null&&a.jk(),a.Se();else if(E.type===Mn.u){var pe=E.startX;he=E.startY;var ye=E.endX,Te=E.endY;E=Math.min(pe,ye);var ze=Math.min(he,Te);pe=Math.abs(ye-pe),he=Math.abs(Te-he),a.beginPath(),a.rect(E,ze,pe,he),b!==null&&a.ng(b),x!==null&&(se&&te&&gu(a),a.jk(),se&&te&&Wu(a)),a.Se()}else if(E.type===Mn.F)pe=E.startX,he=E.startY,ye=E.endX,Te=E.endY,E=Math.abs(ye-pe)/2,ze=Math.abs(Te-he)/2,pe=Math.min(pe,ye)+E,he=Math.min(he,Te)+ze,a.beginPath(),a.moveTo(pe,he-ze),a.bezierCurveTo(pe+Gt.wg*E,he-ze,pe+E,he-Gt.wg*ze,pe+E,he),a.bezierCurveTo(pe+E,he+Gt.wg*ze,pe+Gt.wg*E,he+ze,pe,he+ze),a.bezierCurveTo(pe-Gt.wg*E,he+ze,pe-E,he+Gt.wg*ze,pe-E,he),a.bezierCurveTo(pe-E,he-Gt.wg*ze,pe-Gt.wg*E,he-ze,pe,he-ze),a.closePath(),b!==null&&a.ng(b),x!==null&&(se&&te&&gu(a),a.jk(),se&&te&&Wu(a)),a.Se();else if(E.type===Mn.o)for(E=E.figures,he=E.length,ze=0;ze<he;ze++){pe=E.s[ze],a.beginPath(),a.moveTo(pe.startX,pe.startY),ye=pe.segments.s,Te=ye.length;for(var Ze=null,$e=0;$e<Te;$e++){var it=ye[$e];switch(it.type){case Fo:a.moveTo(it.endX,it.endY);break;case Ri:a.lineTo(it.endX,it.endY);break;case _o:a.bezierCurveTo(it.point1X,it.point1Y,it.point2X,it.point2Y,it.endX,it.endY);break;case ds:a.quadraticCurveTo(it.point1X,it.point1Y,it.endX,it.endY);break;case wo:if(it.radiusX===it.radiusY){var Tt=Math.PI/180;a.arc(it.point1X,it.point1Y,it.radiusX,it.startAngle*Tt,(it.startAngle+it.sweepAngle)*Tt,0>it.sweepAngle,Ze!==null?Ze.endX:pe.startX,Ze!==null?Ze.endY:pe.startY)}else if(Ze=Ga(it,pe),Tt=Ze.length,Tt===0)a.lineTo(it.centerX,it.centerY);else for(var bt=0;bt<Tt;bt++){var Nt=Ze[bt];bt===0&&a.lineTo(Nt[0],Nt[1]),a.bezierCurveTo(Nt[2],Nt[3],Nt[4],Nt[5],Nt[6],Nt[7])}break;case ws:if(bt=Tt=0,Ze!==null&&Ze.type===wo){if(Ze=Ga(Ze,pe),Nt=Ze.length,Nt===0){a.lineTo(it.endX,it.endY);break}Ze=Ze[Nt-1]||null,Ze!==null&&(Tt=Ze[6],bt=Ze[7])}else Tt=Ze!==null?Ze.endX:pe.startX,bt=Ze!==null?Ze.endY:pe.startY;if(Ze=js(it,pe,Tt,bt),Tt=Ze.length,Tt===0){a.lineTo(it.endX,it.endY);break}for(bt=0;bt<Tt;bt++)Nt=Ze[bt],a.bezierCurveTo(Nt[2],Nt[3],Nt[4],Nt[5],Nt[6],Nt[7]);break;default:Ot("Segment not of valid type: "+it.type)}it.isClosed&&a.closePath(),Ze=it}ye=pe.isFilled,te?pe.isShadowed?(ye===!0&&b!=="transparent"&&b!==null&&a.ng(b,pe.isEvenOdd),x!==null&&(ye&&se&&gu(a),a.jk(),ye&&se&&Wu(a))):(gu(a),ye&&b!=="transparent"&&b!==null&&a.ng(b,pe.isEvenOdd),x!==null&&a.jk(),Wu(a)):(ye&&b!==null&&a.ng(b,pe.isEvenOdd),x!==null&&a.jk()),a.Se(ze)}if(ne&&a.fs(),this.pathPattern!==null){if(x=this.pathPattern,x.measure(1/0,1/0),b=x.measuredBounds,x.arrange(0,0,b.width,b.height),te=this.geometry,a.save(),a.beginPath(),b=$n(),te.type===Mn.j)b.push(te.startX),b.push(te.startY),b.push(te.endX),b.push(te.endY),Nd(a,y,b,x);else if(te.type===Mn.o)for(te=te.figures.iterator;te.next();){for(se=te.value,b.length=0,b.push(se.startX),b.push(se.startY),ne=se.startX,E=se.startY,he=ne,ze=E,pe=se.segments.s,ye=pe.length,Te=0;Te<ye;Te++){switch($e=pe[Te],$e.type){case Fo:Nd(a,y,b,x),b.length=0,b.push($e.endX),b.push($e.endY),ne=$e.endX,E=$e.endY,he=ne,ze=E;break;case Ri:b.push($e.endX),b.push($e.endY),ne=$e.endX,E=$e.endY;break;case _o:Gt.Qe(ne,E,$e.point1X,$e.point1Y,$e.point2X,$e.point2Y,$e.endX,$e.endY,.5,b),ne=$e.endX,E=$e.endY;break;case ds:Gt.ep(ne,E,$e.point1X,$e.point1Y,$e.endX,$e.endY,.5,b),ne=$e.endX,E=$e.endY;break;case wo:if(it=Ga($e,se),Ze=it.length,Ze===0){b.push($e.centerX),b.push($e.centerY),ne=$e.centerX,E=$e.centerY;break}for(Tt=0;Tt<Ze;Tt++)bt=it[Tt],Gt.Qe(ne,E,bt[2],bt[3],bt[4],bt[5],bt[6],bt[7],.5,b),ne=bt[6],E=bt[7];break;case ws:if(it=js($e,se,ne,E),Ze=it.length,Ze===0){b.push($e.endX),b.push($e.endY),ne=$e.endX,E=$e.endY;break}for(Tt=0;Tt<Ze;Tt++)bt=it[Tt],Gt.Qe(ne,E,bt[2],bt[3],bt[4],bt[5],bt[6],bt[7],.5,b),ne=bt[6],E=bt[7];break;default:Ot("Segment not of valid type: "+$e.type)}$e.isClosed&&(b.push(he),b.push(ze),Nd(a,y,b,x))}Nd(a,y,b,x)}else if(te.type===Mn.u)b.push(te.startX),b.push(te.startY),b.push(te.endX),b.push(te.startY),b.push(te.endX),b.push(te.endY),b.push(te.startX),b.push(te.endY),b.push(te.startX),b.push(te.startY),Nd(a,y,b,x);else if(te.type===Mn.F){if(E=new Oo,E.startX=te.endX,E.startY=(te.startY+te.endY)/2,ne=new fi(wo),ne.startAngle=0,ne.sweepAngle=360,ne.centerX=(te.startX+te.endX)/2,ne.centerY=(te.startY+te.endY)/2,ne.radiusX=Math.abs(te.startX-te.endX)/2,ne.radiusY=Math.abs(te.startY-te.endY)/2,E.add(ne),te=Ga(ne,E),se=te.length,se===0)b.push(ne.centerX),b.push(ne.centerY);else for(ne=E.startX,E=E.startY,he=0;he<se;he++)ze=te[he],Gt.Qe(ne,E,ze[2],ze[3],ze[4],ze[5],ze[6],ze[7],.5,b),ne=ze[6],E=ze[7];Nd(a,y,b,x)}Wn(b),a.restore(),a.Vc(!1)}}}},et.kk=function(a,y,x){return!zt.prototype.kk.call(this,a,y,x)||this.xc===null&&this.Ui===null||this.ua===null||this.pathPattern!==null||this.geometry.figures.length!==this.svg.getElementsByTagName("path").length?!1:(a.Hl=this.svg,this.hh(a,y),a.Hl=null,!0)},et.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:zt.prototype.nk.call(this,a)},et.Dv=function(a,y){if(a.nodeName!=="g")a.setAttributeNS(null,"filter",y);else{a=a.getElementsByTagName("path");for(var x=0;x<a.length;x++)a[x].setAttributeNS(null,"filter",y)}},et.ga=function(a,y){if(y===void 0&&(y=new lt),a instanceof Nn){a.Mc()&&Ot("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var x=this.naturalBounds,b=this.strokeWidth;y.h(a.x*(x.width+b)-b/2+x.x+a.offsetX,a.y*(x.height+b)-b/2+x.y+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},et.mi=function(a){a===void 0&&(a=new Yt);var y=this.naturalBounds,x=this.oe;y=Yt.allocAt(y.x,y.y,y.width,y.height);var b=this.strokeWidth;return y.Bc(b/2,b/2),b=lt.allocAt(y.x,y.y).transform(x),a.h(b.x,b.y,0,0),b.h(y.right,y.y).transform(x),gi(a,b.x,b.y,0,0),b.h(y.right,y.bottom).transform(x),gi(a,b.x,b.y,0,0),b.h(y.x,y.bottom).transform(x),gi(a,b.x,b.y,0,0),Yt.free(y),lt.free(b),a},et.gh=function(a,y){var x=this.geometry;if(x===null||this.fill===null&&this.stroke===null)return!1;var b=x.bounds,E=this.strokeWidth/2;x.type!==Mn.j||y||(E+=2);var te=Yt.alloc();if(te.assign(b),te.Bc(E+2,E+2),!te.ca(a))return Yt.free(te),!1;if(b=E+1e-4,x.type===Mn.j)return this.stroke===null||(b=(x.endX-x.startX)*(a.x-x.startX)+(x.endY-x.startY)*(a.y-x.startY),0>(x.startX-x.endX)*(a.x-x.endX)+(x.startY-x.endY)*(a.y-x.endY)||0>b)?!1:(Yt.free(te),Gt.Yb(x.startX,x.startY,x.endX,x.endY,E,a.x,a.y));if(x.type===Mn.u){y=x.startX;var ne=x.startY,se=x.endX;if(x=x.endY,te.x=Math.min(y,se),te.y=Math.min(ne,x),te.width=Math.abs(se-y),te.height=Math.abs(x-ne),this.fill===null){if(te.Bc(-b,-b),te.ca(a))return Yt.free(te),!1;te.Bc(b,b)}return this.stroke!==null&&te.Bc(E,E),a=te.ca(a),Yt.free(te),a}if(x.type===Mn.F){ne=x.startX,E=x.startY,se=x.endX;var he=x.endY;if(x=Math.min(ne,se),y=Math.min(E,he),ne=Math.abs(se-ne)/2,E=Math.abs(he-E)/2,x=a.x-(x+ne),y=a.y-(y+E),this.fill===null){if(ne-=b,E-=b,0>=ne||0>=E||1>=x*x/(ne*ne)+y*y/(E*E))return Yt.free(te),!1;ne+=b,E+=b}return this.stroke!==null&&(ne+=b,E+=b),Yt.free(te),0>=ne||0>=E?!1:1>=x*x/(ne*ne)+y*y/(E*E)}if(x.type===Mn.o)return Yt.free(te),this.fill===null?Wl(x,a.x,a.y,E):ua(x,a,E,1<this.strokeWidth,y);Ot("Unknown Geometry type: "+x.type)},et.Wl=function(a,y,x,b){var E=this.desiredSize,te=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var ne=this.geometry.bounds;else{var se=this.figure,he=kv[se];if(he===void 0){var pe=Gt.Ze[se];typeof pe=="string"&&(pe=Gt.Ze[pe]),typeof pe=="function"?(he=pe(null,100,100),kv[se]=he):Ot("Unsupported Figure: "+se)}ne=he.bounds}se=ne.width,he=ne.height,pe=ne.width;var ye=ne.height;switch(ls(this,!0)){case gn:b=x=0;break;case wn:pe=Math.max(a-te,0),ye=Math.max(y-te,0);break;case sr:pe=Math.max(a-te,0),b=0;break;case Sr:x=0,ye=Math.max(y-te,0)}isFinite(E.width)&&(pe=E.width),isFinite(E.height)&&(ye=E.height);var Te=this.maxSize,ze=this.minSize;switch(x=Math.max(x-te,ze.width),b=Math.max(b-te,ze.height),pe=Math.min(Te.width,pe),ye=Math.min(Te.height,ye),pe=isFinite(pe)?Math.max(x,pe):Math.max(se,x),ye=isFinite(ye)?Math.max(b,ye):Math.max(he,b),x=Ev(this),x){case gn:break;case wn:se=pe,he=ye;break;case rr:x=Math.min(pe/se,ye/he),isFinite(x)||(x=1),se*=x,he*=x;break;default:Ot(x+" is not a valid geometryStretch.")}this.Rd!==null?(se===0&&(se=.001),he===0&&(he=.001),x=this.Rd!==null?this.Rd:this.ua,ne=x.bounds,b=se/ne.width,ne=he/ne.height,isFinite(b)||(b=1),isFinite(ne)||(ne=1),this.ua=b===1&&ne===1?x:x.copy().scale(b,ne)):this.ua!==null&&Gt.$(this.ua.Sk,a-te)&&Gt.$(this.ua.Rk,y-te)||(this.ua=Ir.makeGeometry(this,se,he)),ne=this.ua.bounds,a===1/0||y===1/0?this.Ge(ne.x-te/2,ne.y-te/2,a===0&&se===0?0:ne.width+te,y===0&&he===0?0:ne.height+te):this.Ge(-(te/2),-(te/2),pe+te,ye+te),E.w()?(pe=E.width,ye=E.height,pe=Math.min(Te.width,pe),ye=Math.min(Te.height,ye),pe=Math.max(ze.width,pe),ye=Math.max(ze.height,ye),this.dc.h(0,0,pe,ye)):this.dc.assign(ne)};function Ev(a){var y=a.geometryStretch;return a.Rd!==null?y===Fr?wn:y:y===Fr?kv[a.figure].defaultStretch:y}et.eh=function(a,y,x,b){Ia(this,a,y,x,b)},et.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},et.Sj=function(a,y,x,b,E){var te=this.transform,ne=1/(te.m11*te.m22-te.m12*te.m21),se=te.m22*ne,he=-te.m12*ne,pe=-te.m21*ne,ye=te.m11*ne,Te=ne*(te.m21*te.dy-te.m22*te.dx),ze=ne*(te.m12*te.dx-te.m11*te.dy);te=a*se+y*pe+Te,ne=a*he+y*ye+ze,se=x*se+b*pe+Te,he=x*he+b*ye+ze,Te=this.ig/2,pe=this.ua,pe===null&&(this.measure(1/0,1/0),pe=this.ua);var Ze=pe.bounds;if(ye=!1,pe.type===Mn.j)if(1.5>=this.strokeWidth)ye=Gt.Ve(pe.startX,pe.startY,pe.endX,pe.endY,te,ne,se,he,E);else{if(pe.startX===pe.endX?(b=Te,ye=0):(y=(pe.endY-pe.startY)/(pe.endX-pe.startX),ye=Te/Math.sqrt(1+y*y),b=ye*y),y=$n(),a=new lt,Gt.Ve(pe.startX+b,pe.startY+ye,pe.endX+b,pe.endY+ye,te,ne,se,he,a)&&y.push(a),a=new lt,Gt.Ve(pe.startX-b,pe.startY-ye,pe.endX-b,pe.endY-ye,te,ne,se,he,a)&&y.push(a),a=new lt,Gt.Ve(pe.startX+b,pe.startY+ye,pe.startX-b,pe.startY-ye,te,ne,se,he,a)&&y.push(a),a=new lt,Gt.Ve(pe.endX+b,pe.endY+ye,pe.endX-b,pe.endY-ye,te,ne,se,he,a)&&y.push(a),se=y.length,se===0)return Wn(y),!1;for(ye=!0,he=1/0,b=0;b<se;b++)a=y[b],x=(a.x-te)*(a.x-te)+(a.y-ne)*(a.y-ne),x<he&&(he=x,E.x=a.x,E.y=a.y);Wn(y)}else if(pe.type===Mn.u)ye=Gt.Ff(Ze.x-Te,Ze.y-Te,Ze.x+Ze.width+Te,Ze.y+Ze.height+Te,te,ne,se,he,E);else if(pe.type===Mn.F){y=Yt.allocAt(Ze.x,Ze.y,Ze.width,Ze.height).Bc(Te,Te);e:if(y.width===0)ye=Gt.Ve(y.x,y.y,y.x,y.y+y.height,te,ne,se,he,E);else if(y.height===0)ye=Gt.Ve(y.x,y.y,y.x+y.width,y.y,te,ne,se,he,E);else{if(a=y.width/2,pe=y.height/2,b=y.x+a,ye=y.y+pe,x=9999,te!==se&&(x=(ne-he)/(te-se)),9999>Math.abs(x)){if(he=ne-ye-x*(te-b),0>a*a*x*x+pe*pe-he*he){E.x=NaN,E.y=NaN,ye=!1;break e}Te=Math.sqrt(a*a*x*x+pe*pe-he*he),se=(-(a*a*x*he)+a*pe*Te)/(pe*pe+a*a*x*x)+b,a=(-(a*a*x*he)-a*pe*Te)/(pe*pe+a*a*x*x)+b,pe=x*(se-b)+he+ye,he=x*(a-b)+he+ye,Math.abs((te-se)*(te-se))+Math.abs((ne-pe)*(ne-pe))<Math.abs((te-a)*(te-a))+Math.abs((ne-he)*(ne-he))?(E.x=se,E.y=pe):(E.x=a,E.y=he)}else{if(se=pe*pe,he=te-b,se-=se/(a*a)*he*he,0>se){E.x=NaN,E.y=NaN,ye=!1;break e}he=Math.sqrt(se),se=ye+he,he=ye-he,Math.abs(se-ne)<Math.abs(he-ne)?(E.x=te,E.y=se):(E.x=te,E.y=he)}ye=!0}Yt.free(y)}else if(pe.type===Mn.o){ze=lt.alloc();var $e=se-te,it=he-ne,Tt=$e*$e+it*it,bt=te,Nt=ne;if(0<Tt&&Ze.contains(bt,Nt)&&(ze.x=bt,ze.y=Nt,this.ca(ze)))for($e!==0&&.5>Math.abs($e)?(it*=.5/$e,$e=.5):it!==0&&.5>Math.abs(it)&&($e*=.5/it,it=.5),bt-=$e,Nt-=it;Ze.contains(bt,Nt);)bt-=$e,Nt-=it;for(E.x=se,E.y=he,it=0;it<pe.figures.count;it++){var jt=pe.figures.s[it],Bt=jt.isFilled?bt:te,_t=jt.isFilled?Nt:ne,Ht=jt.segments;Ze=jt.startX,$e=jt.startY;for(var Fn=Ze,Jn=$e,Zn=0;Zn<Ht.count;Zn++){var kn=Ht.s[Zn],cn=kn.type,Ar=kn.endX,Cr=kn.endY,vi=!1;switch(cn){case Fo:Fn=Ar,Jn=Cr;break;case Ri:vi=Nm(Ze,$e,Ar,Cr,Bt,_t,se,he,ze);break;case _o:vi=Gt.Eo(Ze,$e,kn.point1X,kn.point1Y,kn.point2X,kn.point2Y,Ar,Cr,Bt,_t,se,he,.6,ze);break;case ds:vi=Gt.Eo(Ze,$e,Ze+2/3*(kn.point1X-Ze),$e+2/3*(kn.point1Y-$e),Ar+2/3*(kn.point1X-Ar),Cr+2/3*(kn.point1Y-Cr),Ar,Cr,Bt,_t,se,he,.6,ze);break;case wo:case ws:cn=kn.type===wo?Ga(kn,jt):js(kn,jt,Ze,$e);var Wi=cn.length;if(Wi===0){vi=Nm(Ze,$e,kn.type===wo?kn.centerX:kn.endX,kn.type===wo?kn.centerY:kn.endY,Bt,_t,se,he,ze);break}for(Cr=null,Ar=0;Ar<Wi;Ar++){if(Cr=cn[Ar],Ar===0&&Nm(Ze,$e,Cr[0],Cr[1],Bt,_t,se,he,ze)){var Yo=Lm(Bt,_t,ze,Tt,E);Yo<Tt&&(Tt=Yo,ye=!0)}Gt.Eo(Cr[0],Cr[1],Cr[2],Cr[3],Cr[4],Cr[5],Cr[6],Cr[7],Bt,_t,se,he,.6,ze)&&(Yo=Lm(Bt,_t,ze,Tt,E),Yo<Tt&&(Tt=Yo,ye=!0))}Ar=Cr[6],Cr=Cr[7];break;default:Ot("Unknown Segment type: "+cn)}Ze=Ar,$e=Cr,vi&&(vi=Lm(Bt,_t,ze,Tt,E),vi<Tt&&(Tt=vi,ye=!0)),kn.isClosed&&(Ar=Fn,Cr=Jn,Nm(Ze,$e,Ar,Cr,Bt,_t,se,he,ze)&&(kn=Lm(Bt,_t,ze,Tt,E),kn<Tt&&(Tt=kn,ye=!0)))}}te=x-a,ne=b-y,se=Math.sqrt(te*te+ne*ne),se!==0&&(te/=se,ne/=se),E.x-=te*Te,E.y-=ne*Te,lt.free(ze)}else Ot("Unknown Geometry type: "+pe.type);return ye?(this.transform.Ga(E),!0):!1};function Lm(a,y,x,b,E){return a=x.x-a,y=x.y-y,y=a*a+y*y,y<b?(E.x=x.x,E.y=x.y,y):b}function Nm(a,y,x,b,E,te,ne,se,he){if(Gt.$(a,x)&&Gt.$(y,b)||Gt.$(E,ne)&&Gt.$(te,se))return!1;var pe=!1,ye=(E-ne)*(y-b)-(te-se)*(a-x);return ye===0?!1:(he.x=((E*se-te*ne)*(a-x)-(E-ne)*(a*b-y*x))/ye,he.y=((E*se-te*ne)*(y-b)-(te-se)*(a*b-y*x))/ye,(a>x?a-x:x-a)<(y>b?y-b:b-y)?(a=y<b?y:b,y=y<b?b:y,(he.y>a||Gt.$(he.y,a))&&(he.y<y||Gt.$(he.y,y))&&(pe=!0)):(y=a<x?a:x,a=a<x?x:a,(he.x>y||Gt.$(he.x,y))&&(he.x<a||Gt.$(he.x,a))&&(pe=!0)),pe)}et.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.ua;x===null&&(this.measure(1/0,1/0),x=this.ua),x=x.bounds;var b=this.strokeWidth/2,E=!1,te=lt.alloc();return te.h(x.x-b,x.y-b),a.ca(y.Ga(te))&&(te.h(x.x-b,x.bottom+b),a.ca(y.Ga(te))&&(te.h(x.right+b,x.bottom+b),a.ca(y.Ga(te))&&(te.h(x.right+b,x.y-b),a.ca(y.Ga(te))&&(E=!0)))),lt.free(te),E},et.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=Mr.alloc();x.set(y),x.Vj();var b=a.left,E=a.right,te=a.top;a=a.bottom;var ne=lt.alloc();if(ne.h(b,te),x.Ga(ne),this.gh(ne,!0)||(ne.h(E,te),x.Ga(ne),this.gh(ne,!0))||(ne.h(b,a),x.Ga(ne),this.gh(ne,!0))||(ne.h(E,a),x.Ga(ne),this.gh(ne,!0)))return lt.free(ne),!0;var se=lt.alloc(),he=lt.alloc();return x.set(y),x.bv(this.transform),x.Vj(),se.x=E,se.y=te,se.transform(x),ne.x=b,ne.y=te,ne.transform(x),y=!1,Yc(this,ne,se,he)?y=!0:(ne.x=E,ne.y=a,ne.transform(x),Yc(this,ne,se,he)?y=!0:(se.x=b,se.y=a,se.transform(x),Yc(this,ne,se,he)?y=!0:(ne.x=b,ne.y=te,ne.transform(x),Yc(this,ne,se,he)&&(y=!0)))),lt.free(ne),Mr.free(x),lt.free(se),lt.free(he),y};function Yc(a,y,x,b){if(!a.rs(y,x,b))return!1;a=y.x,y=y.y;var E=x.x,te=x.y;return x=b.x,b=b.y,a===E?(y<te?(a=y,y=te):a=te,b>=a&&b<=y):(a<E?(b=a,a=E):b=E,x>=b&&x<=a)}et.tx=function(a,y,x){function b(Tt,bt){for(var Nt=Tt.length,jt=0;jt<Nt;jt+=2)if(bt.zd(Tt[jt],Tt[jt+1])>E)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var E=a.Bf(y),te=E;if(1.5<this.strokeWidth&&(E=this.strokeWidth/2+Math.sqrt(E),E*=E),y=this.ua,y===null&&(this.measure(1/0,1/0),y=this.ua,y===null))return!1;if(!x){var ne=y.bounds,se=ne.x,he=ne.y,pe=ne.x+ne.width;if(ne=ne.y+ne.height,gr(a.x,a.y,se,he)<=E&&gr(a.x,a.y,pe,he)<=E&&gr(a.x,a.y,se,ne)<=E&&gr(a.x,a.y,pe,ne)<=E)return!0}if(se=y.startX,he=y.startY,pe=y.endX,ne=y.endY,y.type===Mn.j){if(x=(se-pe)*(a.x-pe)+(he-ne)*(a.y-ne),In(a.x,a.y,se,he,pe,ne)<=(0<=(pe-se)*(a.x-se)+(ne-he)*(a.y-he)&&0<=x?E:te))return!0}else{if(y.type===Mn.u)return y=!1,x&&(y=In(a.x,a.y,se,he,se,ne)<=E||In(a.x,a.y,se,he,pe,he)<=E||In(a.x,a.y,pe,he,pe,ne)<=E||In(a.x,a.y,se,ne,pe,ne)<=E),y;if(y.type===Mn.F){y=a.x-(se+pe)/2,te=a.y-(he+ne)/2;var ye=Math.abs(pe-se)/2,Te=Math.abs(ne-he)/2;if(ye===0||Te===0)return In(a.x,a.y,se,he,pe,ne)<=E;if(x){if(a=Gt.$y(ye,Te,y,te),a*a<=E)return!0}else return!(gr(y,te,-ye,0)>=E||gr(y,te,0,-Te)>=E||gr(y,te,0,Te)>=E||gr(y,te,ye,0)>=E)}else if(y.type===Mn.o){if(pe=y.bounds,te=pe.x,se=pe.y,he=pe.x+pe.width,pe=pe.y+pe.height,a.x>he&&a.x<te&&a.y>pe&&a.y<se&&In(a.x,a.y,te,se,te,pe)>E&&In(a.x,a.y,te,se,he,se)>E&&In(a.x,a.y,he,pe,te,pe)>E&&In(a.x,a.y,he,pe,he,se)>E)return!1;if(te=Math.sqrt(E),x){if(this.fill===null?Wl(y,a.x,a.y,te):ua(y,a,te,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(te=x.s[y],ne=te.startX,ye=te.startY,a.zd(ne,ye)>E)return!1;for(se=te.segments.s,he=se.length,pe=0;pe<he;pe++)switch(Te=se[pe],Te.type){case Fo:case Ri:if(ne=Te.endX,ye=Te.endY,a.zd(ne,ye)>E)return!1;break;case _o:var ze=$n();if(Gt.Qe(ne,ye,Te.point1X,Te.point1Y,Te.point2X,Te.point2Y,Te.endX,Te.endY,.8,ze),ne=b(ze,a),Wn(ze),ne||(ne=Te.endX,ye=Te.endY,a.zd(ne,ye)>E))return!1;break;case ds:if(ze=$n(),Gt.ep(ne,ye,Te.point1X,Te.point1Y,Te.endX,Te.endY,.8,ze),ne=b(ze,a),Wn(ze),ne||(ne=Te.endX,ye=Te.endY,a.zd(ne,ye)>E))return!1;break;case wo:case ws:ze=Te.type===wo?Ga(Te,te):js(Te,te,ne,ye);var Ze=ze.length;if(Ze===0){if(ne=Te.type===wo?Te.centerX:Te.endX,ye=Te.type===wo?Te.centerY:Te.endY,a.zd(ne,ye)>E)return!1;break}Te=null;for(var $e=$n(),it=0;it<Ze;it++)if(Te=ze[it],$e.length=0,Gt.Qe(Te[0],Te[1],Te[2],Te[3],Te[4],Te[5],Te[6],Te[7],.8,$e),b($e,a))return Wn($e),!1;Wn($e),Te!==null&&(ne=Te[6],ye=Te[7]);break;default:Ot("Unknown Segment type: "+Te.type)}}return!0}}}return!1},et.qc=function(){this.ua=null},et.kq=function(){return this.ig};function v1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=ng,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=na):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new Nn(1-na.x,na.y)))}Ir.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var b=vu[a.toArrow];else a.fromArrow!=="None"?b=vu[a.fromArrow]:(b=Gt.Ze[a.figure],typeof b=="string"&&(b=Gt.Ze[b]),b===void 0&&Ot("Unknown Shape.figure: "+a.figure),b=b(a,y,x),b.Sk=y,b.Rk=x);if(b===null){var E=Gt.Ze.Rectangle;typeof E=="function"&&(b=E(a,y,x))}return b};function y1(a){var y=vu[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=vu[x],y===void 0){var b=null,E;for(E in Gt.um)if(E.toLowerCase()===x){b=E;break}if(b!==null)return a=Mn.parse(Gt.um[b],!1),vu[b]=a,x!==b&&(vu[x]=b),b}}return typeof y=="string"?y:y instanceof Mn?a:null}Zt.Object.defineProperties(Ir.prototype,{geometry:{get:function(){return this.ua!==null?this.ua:this.Rd},set:function(a){var y=this.ua,x=this.Rd;if(y!==a){a!==null?this.Rd=this.ua=a.freeze():this.Rd=this.ua=null;var b=this.part;b!==null&&(b.ag=NaN),this.v(),this.g("geometry",y||x,a),pa(this)&&(a=this.part,a!==null&&Ji(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=Mn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=lt.allocAt(-y.x,-y.y),lt.free(a)}},isGeometryPositioned:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.v(),this.g("isGeometryPositioned",y,a))}},fill:{get:function(){return this.Ui},set:function(a){var y=this.Ui;y!==a&&(a!==null&&Ff(a,"Shape.fill"),a instanceof Ti&&a.freeze(),this.Ui=a,this.N(),this.g("fill",y,a))}},stroke:{get:function(){return this.xc},set:function(a){var y=this.xc;y!==a&&(a!==null&&Ff(a,"Shape.stroke"),a instanceof Ti&&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 _n(a,"value >= 0",Ir,"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"?_n(a,'"butt", "round", or "square"',Ir,"strokeCap"):(Xc(this),this.Na.Hr=a,this.N(),this.g("strokeCap",y,a)))}},strokeJoin:{get:function(){return this.Na!==null?this.Na.Ir:"miter"},set:function(a){var y=this.strokeJoin;y!==a&&(typeof a!="string"||a!=="miter"&&a!=="bevel"&&a!=="round"?_n(a,'"miter", "bevel", or "round"',Ir,"strokeJoin"):(Xc(this),this.Na.Ir=a,this.N(),this.g("strokeJoin",y,a)))}},strokeMiterLimit:{get:function(){return this.Na!==null?this.Na.Jr:10},set:function(a){var y=this.strokeMiterLimit;if(y!==a&&1<=a){Xc(this),this.Na.Jr=a,this.N();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeMiterLimit",y,a)}}},strokeDashArray:{get:function(){return this.Yg},set:function(a){var y=this.Yg;if(y!==a){if(a!==null){for(var x=a.length,b=0,E=0;E<x;E++){var te=a[E];0<=te&&isFinite(te)||Ot("strokeDashArray:value "+te+" at index "+E+" must be a positive number or zero."),b+=te}if(b===0){if(y===null)return;a=null}}this.Yg=a,this.N(),this.g("strokeDashArray",y,a)}}},strokeDashOffset:{get:function(){return this.Na!==null?this.Na.uj:0},set:function(a){var y=this.strokeDashOffset;y!==a&&0<=a&&(Xc(this),this.Na.uj=a,this.N(),this.g("strokeDashOffset",y,a))}},figure:{get:function(){return this.an},set:function(a){var y=this.an;if(y!==a){var x=Gt.Ze[a];typeof x=="function"?x=a:(x=Gt.Ze[a.toLowerCase()])||Ot("Unknown Shape.figure: "+a),y!==x&&(a=this.part,a!==null&&(a.ag=NaN),this.an=x,this.Rd=null,this.qc(),this.v(),this.g("figure",y,x))}}},toArrow:{get:function(){return this.Ua!==null?this.Ua.V:"None"},set:function(a){var y=this.toArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=y1(a);x===null?Ot("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new nc),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),v1(this),this.g("toArrow",y,x))}}},fromArrow:{get:function(){return this.Ua!==null?this.Ua.j:"None"},set:function(a){var y=this.fromArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=y1(a);x===null?Ot("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new nc),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),v1(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:Vo},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Xc(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:Vo},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Xc(this),this.Na.gg=a,this.v(),this.g("spot2",y,a))}},parameter1:{get:function(){return this.Un},set:function(a){var y=this.Un;y!==a&&(this.Un=a,this.qc(),this.v(),this.g("parameter1",y,a))}},parameter2:{get:function(){return this.Vn},set:function(a){var y=this.Vn;y!==a&&(this.Vn=a,this.qc(),this.v(),this.g("parameter2",y,a))}},naturalBounds:{get:function(){return this.dc}},pathPattern:{get:function(){return this.Na!==null?this.Na.br:null},set:function(a){var y=this.pathPattern;y!==a&&(Xc(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:Fr},set:function(a){var y=this.geometryStretch;y!==a&&(Xc(this),this.Na.jq=a,this.v(),this.g("geometryStretch",y,a))}},interval:{get:function(){return this.fa!==null?this.fa.Tk:1},set:function(a){var y=this.interval;if(a=Math.round(a),y!==a&&a!==0&&isFinite(a)){this.fa===null&&(this.fa=new yu),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&Yl(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 yu),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 yu),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 yu),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),Ir.prototype.intersectsRect=Ir.prototype.Yc,Ir.prototype.containedInRect=Ir.prototype.fh,Ir.prototype.getNearestIntersectionPoint=Ir.prototype.rs,Ir.prototype.getDocumentBounds=Ir.prototype.mi,Ir.prototype.getDocumentPoint=Ir.prototype.ga;var vu=new ar,kv=new ar;Ir.className="Shape",Ir.getFigureGenerators=function(){var a=new Jt,y;for(y in Gt.Ze)y!==y.toLowerCase()&&a.add(y,Gt.Ze[y]);return a.freeze(),a},Ir.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),b=Gt.Ze;b[a]=y,b[x]=a},Ir.getArrowheadGeometries=function(){var a=new Jt;for(b in Gt.um)if(vu[b]===void 0){var y=Mn.parse(Gt.um[b],!1);vu[b]=y,y=b.toLowerCase(),y!==b&&(vu[y]=b)}for(var x in vu)if(x!==x.toLowerCase()){var b=vu[x];b instanceof Mn&&a.add(x,b)}return a.freeze(),a},Ir.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=Mn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Ot("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var b=vu;b[a]=x,b[y]=a};function Tv(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=Fr,this.gg=this.fg=Vo}Tv.prototype.copy=function(){var a=new Tv;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 Hi(a,y){return zt.call(this),Dm||(us=vo?new ll(null).context:null,Dm=!0),this.l|=2097152,this.ec="",this.xc="black",this.Ae="13px sans-serif",this.Lq=this.Cb=this.Gc=0,this.da=this.fa=this.Gm=null,this.Ih=0,this.df=null,this.Le=0,this.ze=this.Qb=this.Qc=null,typeof a=="string"?this.text=a:a&&Object.assign(this,a),y&&Object.assign(this,y),this}nn(Hi,zt),Hi.prototype.cloneProtected=function(a){zt.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 ql(a){a.da===null?a.da=new Fv:a.da.nc&&(a.da=a.da.copy())}et=Hi.prototype,et.th=function(){zt.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function S1(a,y){a.l=y.l|6144,a.pb=y.opacity,a.Ma=y.background,a.areaBackground=y.areaBackground,a.jd=y.desiredSize.J(),a.minSize=y.minSize.J(),a.maxSize=y.maxSize.J(),y.Lb!==null?a.Lb=y.Lb.copy():a.Lb=null,a.Ca=y.scale,a.Kb=y.angle,a.stretch=y.stretch,a.Kg=y.margin.J(),a.Jb=y.alignment.J(),a.sk=y.alignmentFocus.J(),a.segmentFraction=y.segmentFraction,a.segmentOffset=y.segmentOffset.J(),a.segmentOrientation=y.segmentOrientation,y.tb!==null&&(a.tb=y.tb.copy()),a.shadowVisible=y.shadowVisible,a.ec=y.ec,a.xc=y.xc,a.Ae=y.Ae,a.fa!==null&&(a.fa=y.fa.copy()),y.da!==null&&(a.da=y.da.nc?y.da:y.da.copy()),a.Ih=y.Ih}et.qb=function(a){a.classType===Hi?this.wrap=a:zt.prototype.qb.call(this,a)},et.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},et.v=function(){zt.prototype.v.call(this)},et.hh=function(a,y){if(this.xc!==null&&this.ec.length!==0&&this.Ae!==null){var x=this.naturalBounds,b=this.actualBounds,E=x.width,te=x.height,ne=Yp(this),se=a.textAlign=this.textAlign,he=y.tn;se==="start"?se=he?"right":"left":se==="end"&&(se=he?"left":"right"),he=this.isUnderline;var pe=this.isStrikethrough;yo(this,a,this.xc,!0,!1,x,b),(he||pe)&&yo(this,a,this.xc,!1,!1,x,b),b=0,x=!1;var ye=this.oe,Te=ye.dx-(ne*ye.m21+ye.dx);ye=ye.dy-(ne*ye.m22+ye.dy);var ze=y.scale;switch(8>(Te*Te+ye*ye)*ze*ze&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof bs&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,Te=this.spacingBelow,this.flip){case ui:a.translate(E,0),a.scale(-1,1);break;case Kr:a.translate(0,te),a.scale(1,-1);break;case Ai:a.translate(E,te),a.scale(-1,-1)}if(a.yc(),ye=this.Gc,ze=(y+ne+Te)*ye,te>ze&&(b=this.verticalAlignment,b=b.y*te-b.y*ze+b.offsetY),ye===1&&this.ze!==null)Te=this.Cb,Te>E&&(Te=E),this.Oj(this.ze,a,0,b+y,E,ne,Te,x,se,he,pe);else if(this.Qc!==null&&this.Qb!==null)for(ze=0;ze<ye;ze++){var Ze=this.Qc[ze];Ze>E&&(Ze=E),b+=y,this.Oj(this.Qb[ze],a,0,b,E,ne,Ze,x,se,he,pe),b+=ne+Te}switch(this.flip){case ui:a.scale(-1,1),a.translate(-E,0);break;case Kr:a.scale(1,-1),a.translate(0,-te);break;case Ai:a.scale(-1,-1),a.translate(-E,-te)}}},et.Oj=function(a,y,x,b,E,te,ne,se,he,pe,ye){var Te=0;if(se)he==="left"?Te=0:he==="right"?Te=E-ne:he==="center"&&(Te=(E-ne)/2),y.fillRect(x+Te,b+.25*te,ne,1);else{if(he==="left"?Te=0:he==="right"?Te=E:he==="center"&&(Te=E/2),E=Am!==null?Am(this,te):.75*te,y.fillText(a,x+Te,b+E),a=te/20|0,a===0&&(a=1),he==="right"?Te-=ne:he==="center"&&(Te-=ne/2),pe){se=jm!==null?jm(this,te):.8*te,he=x+Te,pe=b+se,E=x+Te+ne,se=b+se;var ze=a;y.beginPath(),y.lineWidth=ze,y.moveTo(he,pe),y.lineTo(E,se),y.stroke(),y.Se(),y instanceof bs&&y.ad.classList.add("gojs-td")}ye&&(ye=b+te-te/2.2|0,a%2!==0&&(ye+=.5),b=x+Te,te=ye,x=x+Te+ne,ne=ye,Te=a,y.beginPath(),y.lineWidth=Te,y.moveTo(b,te),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof bs&&y.ad.classList.add("gojs-td"))}},et.kk=function(a,y,x){if(!zt.prototype.kk.call(this,a,y,x))return!1;if(yo(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++)Qy(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,Qy(a,y,!0);return!0},et.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:zt.prototype.nk.call(this,a)},et.Dv=function(a,y){if(a.nodeName!=="g")a.setAttributeNS(null,"filter",y);else{a=a.getElementsByTagName("text");for(var x=0;x<a.length;x++)a[x].setAttributeNS(null,"filter",y)}},et.Wl=function(a,y,x,b){var E=this.Gc;this.Ih=a,this.l&=-16777217;var te=this.Ae;us!==null&&k1!==te&&(k1=us.font=te),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var ne;if(isNaN(this.desiredSize.width)){if(te=this.ec.replace(/\r\n/g,`
`).replace(/\r/g,`
`),te.length===0)te=8;else if(this.isMultiline){for(var se=ne=0,he=!1;!he;){var pe=te.indexOf(`
`,se);pe===-1&&(pe=te.length,he=!0),se=te.substr(se,pe-se),this.formatting===$p&&(se=se.trim()),ne=Math.max(ne,wl(se)),se=pe+1}te=ne}else ne=te.indexOf(`
`,0),0<=ne&&(te=te.substr(0,ne)),te=wl(te);te=Math.min(te,a/this.scale)}else te=this.desiredSize.width;if(this.panel!==null&&(te=Math.min(te,this.panel.maxSize.width)),ne=w1(this,te),isNaN(this.desiredSize.height)?ne=Math.min(ne,y/this.scale):ne=this.desiredSize.height,he=ne,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===Om&&(y=this.Ae,y=this.overflow===Om?x1(y):0,pe=this.spacingAbove+this.spacingBelow,pe=Math.max(0,Yp(this)+pe),he=Math.min(this.maxLines-1,Math.max(Math.floor(he/pe+.01)-1,0)),!(he+1>=this.Qb.length))){for(this.l|=16777216,pe=this.Qb[he],y=Math.max(1,a-y);wl(pe)>y&&1<pe.length;)pe=pe.substr(0,pe.length-1);pe+=Jp,y=wl(pe),this.Qb[he]=pe,this.Qb=this.Qb.slice(0,he+1),this.Qc[he]=y,this.Qc=this.Qc.slice(0,he+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===P1||isNaN(this.desiredSize.width))&&(te=isNaN(a)?this.Cb:Math.min(a,this.Cb)),te=Math.max(x,te),ne=Math.max(b,ne),ci(this.dc,te,ne),this.Ge(0,0,te,ne),this.svg!==null&&E!==this.Gc&&(this.Uc=!0)},et.eh=function(a,y,x,b){Ia(this,a,y,x,b)};function Xp(a,y,x){a.ze===null?(a.ze=y,a.Cb=x):((a.Qb===null||a.Qc===null)&&(a.Qb=[],a.Qc=[],a.Qb.push(a.ze),a.Qc.push(a.Cb)),a.Qb.push(y),a.Qc.push(x),a.Qb.length>a.maxLines&&(a.l|=16777216))}function Mv(a,y,x,b){var E=a.formatting===$p;E&&(y=y.trim());var te=0,ne=a.Ae,se=a.spacingAbove+a.spacingBelow;se=Math.max(0,Yp(a)+se);var he=a.overflow===Om?x1(ne):0;if(a.Gc>=a.maxLines)b!==null&&b.h(0,se);else if(ne=y,a.wrap===Lv){a.Le=1;var pe=wl(y);if(he===0||pe<=x)a.Cb=Math.max(a.Cb,pe),Xp(a,y,a.Cb),b!==null&&b.h(pe,se);else{for(te=Ad(a,ne),ne=ne.substr(te.length),y=Ad(a,ne),pe=wl(te+y);0<y.length&&pe<=x;)te+=y,ne=ne.substr(y.length),y=Ad(a,ne),pe=te+y,E&&(pe=pe.trim()),pe=wl(pe);for(E&&(y=y.trim()),te+=y,x=Math.max(1,x-he);wl(te)>x&&1<te.length;)te=te.substr(0,te.length-1);a.l|=16777216,te+=Jp;var ye=wl(te);a.Cb=ye,Xp(a,te,ye),b!==null&&b.h(ye,se)}}else{for(he=0,ne.length===0&&(he=1,Xp(a,ne,0));0<ne.length;){for(y=Ad(a,ne),ne=ne.substr(y.length);wl(y)>x;){var Te=1;for(pe=wl(y.substr(0,Te)),ye=0;pe<=x;)Te++,ye=pe,pe=wl(y.substr(0,Te));if(Te===1){var ze=pe;te=Math.max(te,pe)}else ze=ye,te=Math.max(te,ye);if(Te--,1>Te&&(Te=1),Xp(a,y.substr(0,Te),ze),he++,y=y.substr(Te),a.Gc+he>a.maxLines)break}for(ye=Ad(a,ne),pe=wl(y+ye);0<ye.length&&pe<=x;)y+=ye,ne=ne.substr(ye.length),ye=Ad(a,ne),pe=y+ye,E&&(pe=pe.trim()),pe=wl(pe);if(E&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ye.length===0?(Te=pe,te=Math.max(te,pe)):(Te=ye=wl(y),te=Math.max(te,ye)),Xp(a,y,Te),he++,a.Gc+he>a.maxLines))break}a.Le=Math.min(a.maxLines,he),a.Cb=Math.max(a.Cb,te),b!==null&&b.h(a.Cb,se*a.Le)}}function Ad(a,y){if(a.wrap===b1)return y.substr(0,1);for(var x=y.length,b=0,E=xx;b<x&&!E.test(y.charAt(b));)b++;for(a.formatting===C1&&(x=Math.min(x,b+1));b<x&&E.test(y.charAt(b));)b++;return b>=y.length?y:y.substr(0,b)}function wl(a){return us===null?8*a.length:us.measureText(a).width}function Yp(a){if(a.df!==null)return a.df;var y=a.Ae;if(us===null){var x=16;return a.df=x}return jv[y]!==void 0&&5e3>E1?x=jv[y]:(x=1.3*us.measureText("M").width,jv[y]=x,E1++),a.df=x}function x1(a){if(us===null)return 6;if(Fm[a]!==void 0&&5e3>Ov)var y=Fm[a];else y=us.measureText(Jp).width,Fm[a]=y,Ov++;return y}function w1(a,y){var x=a.ec.replace(/\r\n/g,`
`).replace(/\r/g,`
`),b=a.spacingAbove+a.spacingBelow;if(b=Math.max(0,Yp(a)+b),x.length===0)return a.Cb=0,a.Gc=1,b;if(!a.isMultiline){var E=x.indexOf(`
`,0);0<=E&&(x=x.substr(0,E))}E=0;for(var te=a.Gc=0,ne,se=!1;!se;){if(ne=x.indexOf(`
`,te),ne===-1&&(ne=x.length,se=!0),te<=ne){if(te=x.substr(te,ne-te),a.wrap!==Lv){a.Le=0;var he=fn.alloc();Mv(a,te,y,he),E+=he.height,fn.free(he),a.Gc+=a.Le}else Mv(a,te,y,null),E+=b,a.Gc++;a.Gc===a.maxLines&&(se=!0)}te=ne+1}return a.Lq=E}Zt.Object.defineProperties(Hi.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"||(ql(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:gn},set:function(a){var y=this.flip;y!==a&&(ql(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:iu},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),ql(this),this.da.Yr=a,Za(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=fn.alloc();Mv(this,this.ec,999999,a);var y=a.width;fn.free(a),a=w1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),ci(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:Nv},set:function(a){var y=this.wrap;y!==a&&(ql(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Av},set:function(a){var y=this.overflow;y!==a&&(ql(this),this.da.$q=a,this.v(),this.g("overflow",y,a))}},isOverflowed:{get:function(){return(this.l&16777216)!==0}},stroke:{get:function(){return this.xc},set:function(a){var y=this.xc;y!==a&&(a!==null&&Ff(a,"TextBlock.stroke"),a instanceof Ti&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return Yp(this)}},editable:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.g("editable",y,a))}},textEditor:{get:function(){return this.da!==null?this.da.Qr:null},set:function(a){var y=this.textEditor;y!==a&&(ql(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&&(ql(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 yu),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 yu),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 yu),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 yu),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 yu),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&&(ql(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&&(ql(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&&(ql(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&&(ql(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:$p},set:function(a){var y=this.formatting;y!==a&&(ql(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&&_n(a,"> 0",Hi,"maxLines"),ql(this),this.da.Jq=a,this.v(),this.g("maxLines",y,a))}},metrics:{get:function(){return{arrSize:this.Qc!==null?this.Qc:[this.Cb],arrText:this.Qb!==null?this.Qb:[this.ze],maxLineWidth:this.Cb,fontHeight:this.df}}},choices:{get:function(){return this.Gm},set:function(a){var y=this.Gm;y!==a&&(this.Gm=a,this.g("choices",y,a))}}});var Am=null,jm=null,Lv=new un(Hi,"None",0),P1=new un(Hi,"WrapFit",1),Nv=new un(Hi,"WrapDesiredSize",2),b1=new un(Hi,"WrapBreakAll",3),Av=new un(Hi,"OverflowClip",0),Om=new un(Hi,"OverflowEllipsis",1),$p=new un(Hi,"FormatTrim",0),C1=new un(Hi,"FormatNone",0),xx=/[ \u200b\u00ad]/,jv=new ar,E1=0,Fm=new ar,Ov=0,Jp="...",k1="",us=null,Dm=!1;Hi.className="TextBlock";function Fv(){this.nc=!1,this.Hd=null,this.Xf=gn,this.gq=$p,this.Jq=1/0,this.$q=Av,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=iu,this.$r=Nv}Fv.prototype.copy=function(){var a=new Fv;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},Hi.getEllipsis=function(){return Jp},Hi.setEllipsis=function(a){Jp=a,Fm=new ar,Ov=0},Hi.getBaseline=function(){return Am},Hi.setBaseline=function(a){Am=a},Hi.getUnderline=function(){return jm},Hi.setUnderline=function(a){jm=a},Hi.isValidFont=function(a){if(Dm||(us=vo?new ll(null).context:null,Dm=!0),us===null)return!0;var y=us.font;if(a===y||a==="10px sans-serif")return!0;us.font="10px sans-serif",us.font=a;var x=us.font;if(x!=="10px sans-serif")return us.font=y,!0;us.font="19px serif";var b=us.font;return us.font=a,x=us.font,us.font=y,x!==b},Hi.FormatNone=C1,Hi.FormatTrim=$p,Hi.None=Lv,Hi.OverflowClip=Av,Hi.OverflowEllipsis=Om,Hi.WrapBreakAll=b1,Hi.WrapDesiredSize=Nv,Hi.WrapFit=P1;function yu(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}yu.prototype.copy=function(){var a=new yu;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},yu.className="GradElementSettings";function hs(a,y){zt.call(this),this.Eg=null,this.qo="",this.Xg=Aa,this.Nk=wn,this.Zg=this.Hd=null,this.Mk=ti,this.Xf=gn,this.vl=null,this.qn=!1,this.en=!0,this.al=!1,this.bt=this.rl=null,typeof a=="string"?this.source=a:a&&Object.assign(this,a),y&&Object.assign(this,y)}var jd;nn(hs,zt),hs.prototype.cloneProtected=function(a){zt.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},hs.prototype.qb=function(a){a===gn||a===rr||a===Qr?this.imageStretch=a:zt.prototype.qb.call(this,a)},hs.prototype.toString=function(){return"Picture("+this.source+")#"+Yr(this)};function Od(a){a===void 0&&(a=""),a!==""?jd[a]&&(delete jd[a],Bm--):(jd=new ar,Bm=0)}function T1(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var b=y.Bg.copy();if(b!=null){for(b=b.iterator;b.next();){var E=b.value;E.N();var te=y.getAttribute("src")||"",ne=E.Og.I(te);if(ne!==null)for(var se=ne.length,he=0;he<se;he++)te=ne[he],E.Xn.add(te),te.Uc=!0,E.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),te.Zg!==null&&te.Zg(te,x))}y.Bg.clear()}a.desiredSize.w()||(Bo(a,!1),a.v())},y.Yp=function(x){y.ln=x;var b=y.Bg.copy();if(b!=null){for(b=b.iterator;b.next();){var E=b.value,te=y.getAttribute("src")||"",ne=E.Og.I(te);if(ne!==null){E=ne.length,te=$n();for(var se=0;se<E;se++)te.push(ne[se]);if(y.hn)for(se=0;se<E;se++)ne=te[se],ne.Hd!==null&&ne.Hd(ne,x);Wn(te)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}hs.prototype.hA=function(){if(this.source!==""){Od(this.source);var a=this.source;this.source="",this.source=a}},hs.prototype.redraw=function(){this.N(),this.Uc=!0},hs.prototype.hh=function(a,y){var x=this.Eg;if(x!==null){var b=x.getAttribute("src");if(!(x instanceof HTMLImageElement&&(b===null||b==="")||x.ln instanceof Event&&a instanceof Vc)){var E=a instanceof bs;b=this.naturalBounds;var te=0,ne=0,se=this.qn,he=se?+x.width:x.naturalWidth;if(se=se?+x.height:x.naturalHeight,he===void 0&&x.videoWidth&&(he=x.videoWidth),se===void 0&&x.videoHeight&&(se=x.videoHeight),he=he||b.width,se=se||b.height,he!==0&&se!==0){var pe=he,ye=se;this.sourceRect.w()&&(te=this.Xg.x,ne=this.Xg.y,he=this.Xg.width,se=this.Xg.height);var Te=he,ze=se,Ze=this.Nk,$e=this.Mk;switch(Ze){case gn:if(this.sourceRect.w())break;Te>=b.width&&(te=te+$e.offsetX+(Te*$e.x-b.width*$e.x)),ze>=b.height&&(ne=ne+$e.offsetY+(ze*$e.y-b.height*$e.y)),he=Math.min(b.width,Te),se=Math.min(b.height,ze);break;case wn:Te=b.width,ze=b.height;break;case rr:case Qr:Ze===rr?(Ze=Math.min(b.height/ze,b.width/Te),Te*=Ze,ze*=Ze):Ze===Qr&&(Ze=Math.max(b.height/ze,b.width/Te),Te*=Ze,ze*=Ze,Te>=b.width&&(te=(te+$e.offsetX+(Te*$e.x-b.width*$e.x)/Te)*he),ze>=b.height&&(ne=(ne+$e.offsetY+(ze*$e.y-b.height*$e.y)/ze)*se),he*=1/(Te/b.width),se*=1/(ze/b.height),Te=b.width,ze=b.height)}Ze=this.Df()*y.scale;var it=Te*Ze*ze*Ze,Tt=he*se/it,bt=x.__goCache;Ze=null;var Nt=wx;if(!E){if(x.sq&&bt!==void 0&&4<it&&Tt>Nt*Nt)for(bt.gi===null&&(L1(bt,4,pe,ye,x),L1(bt,16,pe,ye,x)),E=bt.gi,pe=E.length,ye=0;ye<pe&&E[ye].ratio*E[ye].ratio<Tt;ye++)Ze=E[ye];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{E=new ll(null).context;try{E.drawImage(this.Eg,0,0)}catch(jt){this.en=!1}try{E.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(jt){this.vl=!0}}if(this.vl)return}}switch(E=Te<b.width?$e.offsetX+(b.width*$e.x-Te*$e.x):0,$e=ze<b.height?$e.offsetY+(b.height*$e.y-ze*$e.y):0,this.flip){case ui:a.translate(Math.min(b.width,Te),0),a.scale(-1,1);break;case Kr:a.translate(0,Math.min(b.height,ze)),a.scale(1,-1);break;case Ai:a.translate(Math.min(b.width,Te),Math.min(b.height,ze)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&bt!==void 0&&Ze!==null&&Ze.ratio!==1){a.save(),y=Ze.ratio;try{a.drawImage(Ze.source,te/y,ne/y,Math.min(Ze.source.width,he/y),Math.min(Ze.source.height,se/y),E,$e,Math.min(b.width,Te),Math.min(b.height,ze)),a instanceof bs&&(this.bt=[te/y,ne/y,Math.min(Ze.source.width,he/y),Math.min(Ze.source.height,se/y),E,$e,Math.min(b.width,Te),Math.min(b.height,ze)])}catch(jt){this.en=!1}a.restore()}else try{a.drawImage(x,te,ne,he,se,E,$e,Math.min(b.width,Te),Math.min(b.height,ze)),a instanceof bs&&(this.bt=[te,ne,he,se,E,$e,Math.min(b.width,Te),Math.min(b.height,ze)])}catch(jt){this.en=!1}switch(this.flip){case ui:a.scale(-1,1),a.translate(-Math.min(b.width,Te),0);break;case Kr:a.scale(1,-1),a.translate(0,-Math.min(b.height,ze));break;case Ai:a.scale(-1,-1),a.translate(-Math.min(b.width,Te),-Math.min(b.height,ze))}}}}},hs.prototype.Wl=function(a,y,x,b){var E=this.desiredSize,te=ls(this,!0),ne=this.Eg,se=this.qn,he=0,pe=0;(se||!this.al&&ne&&ne.complete)&&(this.al=!0),ne===null?(isFinite(E.width)||(a=0),isFinite(E.height)||(y=0)):(he=se?+ne.width:ne.naturalWidth,pe=se?+ne.height:ne.naturalHeight),isFinite(E.width)||te===wn||te===sr?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:ne!==null&&(a=he)),x=0):ne!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:he),isFinite(E.height)||te===wn||te===Sr?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:ne!==null&&(y=pe)),b=0):ne!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:pe),isFinite(E.width)&&(a=E.width),isFinite(E.height)&&(y=E.height),E=this.maxSize,te=this.minSize,x=Math.max(x||0,te.width),b=Math.max(b||0,te.height),a=Math.min(E.width,a),y=Math.min(E.height,y),a=Math.max(x,a),y=Math.max(b,y),ne===null||ne.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),ci(this.dc,a,y),this.Ge(0,0,a,y)},hs.prototype.eh=function(a,y,x,b){Ia(this,a,y,x,b)},Zt.Object.defineProperties(hs.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||Ot("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var b=this.diagram;b!==null&&Np(b,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new xn),b!==null&&x&&qh(b,this),a!==null&&(this.qn||a.complete===!0?(a.hn&&(a.ln instanceof Event&&this.Hd!==null?this.Hd(this,a.ln):a.sq===!0&&!a.ln&&this.Zg!==null&&a.eu&&this.Zg(this,a.eu)),a.sq=!0,this.desiredSize.w()||(Bo(this,!1),this.v())):x&&T1(this,a)),this.g("element",y,a),this.N()}}},source:{get:function(){return this.qo},set:function(a){var y=this.qo;if(y!==a){this.Uc=!0,this.qo=a;var x=jd;if(vo){var b=null;if(x[a]!==void 0)b=x[a];else if(a!==""){30<Bm&&(Od(),x=jd),b=Qn("img"),b.hn=!0,T1(this,b);var E=this.rl;E!==null&&(b.crossOrigin=E(this)),b.src=a,x[a]=b,Bm++}this.element=b,b!==null&&b.__goCache===void 0&&(b.__goCache=new M1),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}}}),hs.prototype.redraw=hs.prototype.redraw,hs.prototype.reloadSource=hs.prototype.hA;var Bm=0,wx=4;hs.className="Picture",jd=new ar,hs.clearCache=Od;function M1(){this.gi=null}function L1(a,y,x,b,E){a.gi===null&&(a.gi=[]);var te=new ll(null),ne=te.context,se=1/y;te.width=x/y,te.height=b/y,te.width!==0&&te.height!==0&&(y=new N1(te.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],E=x.source,x=x.ratio),ne.setTransform(se*x,0,0,se*x,0,0),ne.yc(),ne.drawImage(E,0,0),a.gi.push(y))}M1.className="PictureCacheArray";function N1(a,y){this.source=a,this.ratio=y}N1.className="PictureCacheInstance";function Fd(){this.os=new Mn,this.mc=null}Fd.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new Mn,this.mc=null};function Dd(a,y,x,b,E,te){a.mc=new Oo,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=b,a.mc.isEvenOdd=te||!1,a.os.figures.add(a.mc),E!==void 0&&(a.mc.isShadowed=E)}function Px(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}Fd.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var b=new fi(Fo);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)},Fd.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var b=new fi(Ri);b.endX=a,b.endY=y,x&&b.close(),this.mc.segments.add(b)};function wh(a,y,x,b,E,te,ne){var se;se===void 0&&(se=!1);var he=new fi(_o);he.point1X=y,he.point1Y=x,he.point2X=b,he.point2Y=E,he.endX=te,he.endY=ne,se&&he.close(),a.mc.segments.add(he)}function Im(a,y,x,b,E){var te;te===void 0&&(te=!1);var ne=new fi(ds);ne.point1X=y,ne.point1Y=x,ne.endX=b,ne.endY=E,te&&ne.close(),a.mc.segments.add(ne)}Fd.prototype.arcTo=function(a,y,x,b,E,te,ne){te===void 0&&(te=0),ne===void 0&&(ne=!1);var se=new fi(wo);se.startAngle=a,se.sweepAngle=y,se.centerX=x,se.centerY=b,se.radiusX=E,se.radiusY=te!==0?te:E,ne&&se.close(),this.mc.segments.add(se)};function bx(a,y,x,b,E,te,ne,se){var he;he===void 0&&(he=!1),y=new fi(ws,ne,se,y,x,b,E,te),he&&y.close(),a.mc.segments.add(y)}function A1(a){var y=Rm;return y!==null?(Rm=null,y.reset(a),y):(y=new Fd,y.reset(a),y)}var Rm=null;Fd.className="StreamGeometryContext";function Na(a,y){var x=a.toLowerCase(),b=Gt.Ze;b[a]=y,b[x]=a}Na("Rectangle",function(a,y,x){a="r"+y+","+x;var b=Gt.Mf[a];return b!==void 0||(b=new Mn(Mn.u),b.endX=y,b.endY=x,Gt.Nf<Gt.vm&&(Gt.Mf[a]=b,Gt.Nf++)),b}),Na("Square",function(a,y,x){a="s"+y+","+x;var b=Gt.Mf[a];return b!==void 0||(b=new Mn(Mn.u),b.endX=y,b.endY=x,b.defaultStretch=rr,Gt.Nf<Gt.vm&&(Gt.Mf[a]=b,Gt.Nf++)),b}),Na("RoundedRectangle",function(a,y,x){a=a?a.parameter1:NaN,(isNaN(a)||0>a)&&(a=5),a=Math.min(a,y/3),a=Math.min(a,x/3);var b="rr"+y+","+x+","+a,E=Gt.Mf[b];if(E!==void 0)return E;var te=a*Gt.wg;return E=new Mn().add(new Oo(a,0,!0).add(new fi(Ri,y-a,0)).add(new fi(_o,y,a,y-te,0,y,te)).add(new fi(Ri,y,x-a)).add(new fi(_o,y-a,x,y,x-te,y-te,x)).add(new fi(Ri,a,x)).add(new fi(_o,0,x-a,te,x,0,x-te)).add(new fi(Ri,0,a)).add(new fi(_o,a,0,0,te,te,0).close())),1<te&&(E.spot1=new Nn(0,0,te,te),E.spot2=new Nn(1,1,-te,-te)),Gt.Nf<Gt.vm&&(Gt.Mf[b]=E,Gt.Nf++),E}),Na("Border","RoundedRectangle"),Na("Ellipse",function(a,y,x){a="e"+y+","+x;var b=Gt.Mf[a];return b!==void 0||(b=new Mn(Mn.F),b.endX=y,b.endY=x,b.spot1=uo,b.spot2=Ni,Gt.Nf<Gt.vm&&(Gt.Mf[a]=b,Gt.Nf++)),b}),Na("Circle",function(a,y,x){a="c"+y+","+x;var b=Gt.Mf[a];return b!==void 0||(b=new Mn(Mn.F),b.endX=y,b.endY=x,b.spot1=uo,b.spot2=Ni,b.defaultStretch=rr,Gt.Nf<Gt.vm&&(Gt.Mf[a]=b,Gt.Nf++)),b}),Na("TriangleRight",function(a,y,x){return new Mn().add(new Oo(0,0).add(new fi(Ri,y,.5*x)).add(new fi(Ri,0,x).close())).pm(0,.25,.5,.75)}),Na("TriangleDown",function(a,y,x){return new Mn().add(new Oo(0,0).add(new fi(Ri,y,0)).add(new fi(Ri,.5*y,x).close())).pm(.25,0,.75,.5)}),Na("TriangleLeft",function(a,y,x){return new Mn().add(new Oo(y,x).add(new fi(Ri,0,.5*x)).add(new fi(Ri,y,0).close())).pm(.5,.25,1,.75)}),Na("TriangleUp",function(a,y,x){return new Mn().add(new Oo(y,x).add(new fi(Ri,0,x)).add(new fi(Ri,.5*y,0).close())).pm(.25,.5,.75,1)}),Na("Triangle","TriangleUp"),Na("Diamond",function(a,y,x){return new Mn().add(new Oo(.5*y,0).add(new fi(Ri,0,.5*x)).add(new fi(Ri,.5*y,x)).add(new fi(Ri,y,.5*x).close())).pm(.25,.25,.75,.75)}),Na("LineH",function(a,y,x){return a=new Mn(Mn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),Na("LineV",function(a,y,x){return a=new Mn(Mn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),Na("None","Rectangle"),Na("BarH","Rectangle"),Na("BarV","Rectangle"),Na("MinusLine","LineH"),Na("PlusLine",function(a,y,x){return new Mn().add(new Oo(0,x/2,!1).add(new fi(Ri,y,x/2)).add(new fi(Fo,y/2,0)).add(new fi(Ri,y/2,x)))}),Na("XLine",function(a,y,x){return new Mn().add(new Oo(0,x,!1).add(new fi(Ri,y,0)).add(new fi(Fo,0,0)).add(new fi(Ri,y,x)))}),Na("LineRight",function(a,y,x){return new Mn().add(new Oo(.25*y,0,!1).add(new fi(Ri,.75*y,.5*x)).add(new fi(Ri,.25*y,x)))}),Na("LineDown",function(a,y,x){return new Mn().add(new Oo(0,.25*x,!1).add(new fi(Ri,.5*y,.75*x)).add(new fi(Ri,y,.25*x)))}),Na("LineLeft",function(a,y,x){return new Mn().add(new Oo(.75*y,0,!1).add(new fi(Ri,.25*y,.5*x)).add(new fi(Ri,.75*y,x)))}),Na("LineUp",function(a,y,x){return new Mn().add(new Oo(0,.75*x,!1).add(new fi(Ri,.5*y,.25*x)).add(new fi(Ri,y,.75*x)))}),Gt.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 Dv(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=ii,this.ir=null,this.jr="",this.lr=Vo,this.Gq="",this.Hq=wi,this.Pq=sn,this.Kq=bn,this.Up=null,this.Cq=127,this.zr=zn,this.yr="gray",this.Vg=4}Dv.prototype.copy=function(){var a=new Dv;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 fr(a,y){a===void 0||a instanceof Go||typeof a=="string"?Cn.call(this,a):(Cn.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 lt(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new Yt,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}nn(fr,Cn),fr.prototype.cloneProtected=function(a){Cn.prototype.cloneProtected.call(this,a),a.G=this.G&-4097|49152,a.Tf=this.Tf,this.P!==null&&(a.P=this.P.nc?this.P:this.P.copy()),a.Jg=this.Jg,a.Qf=null,a.ec=this.ec,a.ke.assign(this.ke),a.Ao=this.Ao},et=fr.prototype,et.Af=function(a){Cn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},et.toString=function(){var a=hr(this.constructor)+"#"+Yr(this);return this.data!==null&&(a+="("+Rr(this.data)+")"),a};function cs(a){a.P===null?a.P=new Dv:a.P.nc&&(a.P=a.P.copy())}et.th=function(){Cn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},et.gk=function(a,y,x,b,E,te,ne){var se=this.diagram;se!==null&&(a===Po&&y==="elements"?E instanceof Cn?Zc(E,function(he){ly(se.partManager,he),_c(se,he)}):qh(se,E):a===Eo&&y==="elements"&&(E instanceof Cn?Zc(E,function(he){uy(se.partManager,he,se)}):Np(se,E)),se.cb(a,y,x,b,E,te,ne))},et.La=function(a){if(Cn.prototype.La.call(this,a),this.data!==null){for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];E instanceof Cn&&Zc(E,function(te){te.data!==null&&te.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},fr.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},fr.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},fr.prototype.bh=function(a,y){if(y!==null){var x=null,b=this.Qf;if(b!==null&&(x=b.I(a)),x!==y){if(x!==null){var E=x.diagram;E!==null&&E.remove(x)}b===null&&(this.Qf=b=new Jt),y.Tf!==a&&(y.category=a),b.add(a,y),a=this.diagram,a!==null&&(a.add(y),a=y.adornedObject,a!==null&&(a=a.ih(),a!==null&&(y.data=a.data)))}}},fr.prototype.Jf=function(a){var y=this.Qf;if(y!==null){var x=y.I(a);if(x!==null){var b=x.diagram;b!==null&&b.remove(x)}y.remove(a),y.count===0&&(this.Qf=null)}},fr.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=$n();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Wn(y)}},fr.prototype.updateAdornments=function(){var a=this.diagram;if(a!==null){for(var y=this.adornments;y.next();){var x=y.value;x.v(),x.placeholder&&x.placeholder.v()}e:{if(this.isSelected&&this.selectionAdorned&&(y=this.selectionObject,y!==null&&this.actualBounds.w()&&this.isVisible()&&y.Ed()&&y.actualBounds.w())){if(x=this.Pj("Selection"),x===null){if(x=this.selectionAdornmentTemplate,x===null&&(x=this.ph()?a.linkSelectionAdornmentTemplate:this instanceof jr?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof di))break e;ul(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Cn.Link),x.adornedObject=y)}if(x!==null){x.type===Cn.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Cx(this,a),y=this.adornments;y.next();)y.value.La()}},fr.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Bv(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function Cx(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function _m(a){if(rc(a)===!1){Rv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function j1(a){if(a.G|=2097152,rc(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||D1(a,y,x),x=a.Ib;var b=Yt.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(b,x),Yt.free(b),Rv(a,!1)}}fr.prototype.Ge=function(a,y,x,b){var E=this.uc;E.h(a,y,x,b),this.Lb===null&&(this.Lb=new Mr);var te=this.Lb;te.reset(),this.no(te,a,y,x,b),this.Lb=te,te.ws()||te.pp(E)},fr.prototype.no=function(a,y,x,b,E){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var te=ti;this.locationSpot.sb()&&(te=this.locationSpot);var ne=lt.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,ne.yi(x.x,x.y,x.width,x.height,te),y.Lb!==null&&y.Lb.Ga(ne),ne.offset(-y.measuredBounds.x,-y.measuredBounds.y),te=y.panel;te!==null&&te!==this;)te.Lb!==null&&te.Lb.Ga(ne),ne.offset(-te.measuredBounds.x,-te.measuredBounds.y),te=te.panel;else ne.yi(y,x,b,E,te);a.rotate(this.Kb,ne.x,ne.y),lt.free(ne)}},fr.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},fr.prototype.moveTo=function(a,y,x){a=lt.allocAt(a,y),this.move(a,x),lt.free(a)},fr.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())},fr.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())},fr.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new Jt),y.I(a)!==null)return y.I(a);var x=Cn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function Ph(a,y,x,b){b===void 0&&(b=new lt),x=x.Mc()?ti:x;var E=y.naturalBounds;if(b.h(E.width*x.x+x.offsetX,E.height*x.y+x.offsetY),y===null||y===a)return b;for(y.transform.Ga(b),y=y.panel;y!==null&&y!==a;)y.transform.Ga(b),y=y.panel;return a.Lb!==null&&a.Lb.Ga(b),b.offset(-a.uc.x,-a.uc.y),b}fr.prototype.mi=function(a){return a===void 0&&(a=new Yt),a.assign(this.actualBounds)},fr.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function O1(a){var y=lt.alloc(),x=a.locationObject,b=x.naturalBounds,E=x instanceof Ir?x.strokeWidth:0;if(y.yi(0,0,b.width+E,b.height+E,a.locationSpot),x!==a)for(y.offset(-E/2,-E/2),x.transform.Ga(y),x=x.panel;x!==null&&x!==a;)x.transform.Ga(y),x=x.panel;return a.Lb!==null&&a.Lb.Ga(y),y.offset(-a.uc.x,-a.uc.y),y}function $c(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=h1(a));var b=a.ag,E=2*b;if(!a.isShadowed)return x.h(y.x-1-b,y.y-1-b,y.width+2+E,y.height+2+E),x;b=y.x,E=y.y;var te=y.width;y=y.height;var ne=a.shadowBlur;return a=a.shadowOffset,te+=ne,y+=ne,b-=ne/2,E-=ne/2,0<a.x?te+=a.x:(b+=a.x,te-=a.x),0<a.y?y+=a.y:(E+=a.y,y-=a.y),x.h(b-1,E-1,te+2,y+2),x}fr.prototype.arrange=function(){if(Xa(this)===!1)j1(this);else{pu(this,!1);var a=this.Ib,y=Yt.alloc();y.assign(a);var x=ic(this);this.eh(0,0,this.uc.width,this.uc.height);var b=this.position;D1(this,b,this.location),a.ka(),a.x=b.x,a.y=b.y,a.freeze(),this.Xl(y,a),y.D(a)?this.Fd(x):!this.Zc()||Gt.B(y.width,a.width)&&Gt.B(y.height,a.height)||0<=this.vw&&this.C(16),Yt.free(y),Rv(this,!1)}},et=fr.prototype,et.Xl=function(a,y){var x=this.diagram;if(x!==null){var b=!1;if(x.Zi===!1&&a.w()){var E=Yt.alloc();E.assign(x.documentBounds),E.Fv(x.padding),a.x>E.x&&a.y>E.y&&a.right<E.right&&a.bottom<E.bottom&&y.x>E.x&&y.y>E.y&&y.right<E.right&&y.bottom<E.bottom&&(b=!0),Yt.free(E)}!(this.G&65536)&&a.D(y)||R1(this,b,x),x.N(),!a.w()&&!y.w()||Si(a,y)||(this instanceof Rn&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},et.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var b=this.diagram;return b!==null&&F1(this,b,a,y,x),this.pa=a,this.G&=-2097153,!this.ke.w()||b!==null&&!b.animationManager.isTicking&&b.undoManager.isUndoingRedoing||(b=this.ke,this.ke=new lt(b.x+(a.x-y),b.y+(a.y-x)),this.g("location",b,this.ke.copy())),rc(this)===!1&&Xa(this)===!1&&(_m(this),j1(this)),!0};function F1(a,y,x,b,E){y===null||a instanceof di||(y=y.animationManager,y.zb&&ad(y,a,new lt(b,E),x))}et.mm=function(a,y,x){var b=this.ke,E=this.pa;if(x){if(b.x===a&&b.y===y)return;rc(this)||Xa(this)?E.h(NaN,NaN):E.h(E.x+a-b.x,E.y+y-b.y),b.h(a,y)}else{if(E.x===a&&E.y===y)return;b.h(b.x+a-E.x,b.y+y-E.y),E.h(a,y)}_m(this)},et.Av=function(){this.G&=-2097153,_m(this)};function D1(a,y,x){var b=O1(a),E=a.diagram,te=x.w(),ne=y.w();te&&ne?a.G&2097152?B1(a,y,x,E,b):I1(a,y,x,E,b):te?B1(a,y,x,E,b):ne&&I1(a,y,x,E,b),a.G|=2097152,lt.free(b),a.Uk()}function B1(a,y,x,b,E){var te=y.x,ne=y.y;y.h(x.x-E.x,x.y-E.y),b!==null&&(x=b.animationManager,(b=x.defaultAnimation.isAnimating)||!x.zb||a instanceof di||ad(x,a,new lt(te,ne),y),b||y.x===te&&y.y===ne||a.g("position",new lt(te,ne),y.copy()))}function I1(a,y,x,b,E){var te=x.copy();x.h(y.x+E.x,y.y+E.y),x.D(te)||b===null||a.g("location",te,x.copy())}function R1(a,y,x){_v(a,!1),a instanceof Rn&&gh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var b=x.viewportBounds;b.w()?ic(a)?(Bi(y,b)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(b)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}et.si=function(){return!0},et.Zc=function(){return!0},et.ph=function(){return!1},et.Dd=function(){return!0};function Iv(a,y,x,b){y.constructor===a.constructor||G1||(G1=!0,qn('Should not change the class of the Part when changing category from "'+x+'" to "'+b+'"'),qn(" Old class: "+hr(a.constructor)+", new class: "+hr(y.constructor)+", part: "+a.toString())),a.Ej();var E=a.data;x=a.layerName;var te=a.isSelected,ne=a.isHighlighted,se=!0,he=!0,pe=!1;a instanceof Rn&&(se=a.isTreeLeaf,he=a.isTreeExpanded,pe=a.wasTreeExpanded),y.Af(a),y.cloneProtected(a),a.Tf=b,a.svg!==null&&(a.svg.remove(),a.svg=null,a.Uc=!0),a.v(),a.N(),y=a.diagram,b=!0,y!==null&&(b=y.skipsUndoManager,y.skipsUndoManager=!0),a.ub=E,a.G=te?a.G|4096:a.G&-4097,a.G=ne?a.G|524288:a.G&-524289,a instanceof Rn&&(a.U=se?a.U|4:a.U&-5,a.U=he?a.U|1:a.U&-2,a.U=pe?a.U|2:a.U&-3),E!==null&&a.La(),E=a.layerName,E!==x&&(a.Jg=x,a.layerName=E),y!==null&&(y.skipsUndoManager=b),a.Zc()&&a.C(64)}fr.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},fr.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},fr.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},fr.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},fr.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},fr.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},fr.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},fr.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},fr.prototype.canSelect=function(){if(!this.selectable)return!1;var a=this.layer;return a===null?!0:a.allowSelect?(a=a.diagram,a===null?!0:!!a.allowSelect):!1};function rc(a){return(a.G&32768)!==0}function Rv(a,y){a.G=y?a.G|32768:a.G&-32769}function _v(a,y){a.G=y?a.G|65536:a.G&-65537}function ic(a){return(a.G&131072)!==0}et=fr.prototype,et.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function zm(a,y){a.G=y?a.G|1048576:a.G&-1048577}et.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},et.N=function(){var a=this.diagram;a!==null&&!Xa(this)&&!rc(this)&&this.isVisible()&&this.Ib.w()&&a.N($c(this,this.Ib))},et.v=function(){Cn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Rn&&this.labeledLink!==null&&Za(this.labeledLink),a.$b(!0))},et.Vo=function(a){a||(a=this.Ah,a!==null&&Kv(a,this))},et.Wo=function(a){a||(a=this.Ah,a!==null&&Vv(a,this))},et.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},et.oz=function(){return zv(this,this)};function zv(a,y){var x=y.containingGroup;return x!==null?1+zv(a,x):y instanceof Rn&&(y=y.labeledLink,y!==null)?zv(a,y):0}et.sz=function(){return _1(this,this)};function _1(a,y){var x=y.containingGroup;return x!==null||y instanceof Rn&&(x=y.labeledLink,x!==null)?_1(a,x):y}et.Td=function(a){return a instanceof jr?Gv(this,this,a):!1};function Gv(a,y,x){if(y===x||x===null)return!1;var b=y.containingGroup;return b===null||b!==x&&!Gv(a,b,x)?y instanceof Rn&&(y=y.labeledLink,y!==null)?Gv(a,y,x):!1:!0}et.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof jr&&zm(y,!0),y instanceof Rn){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 Rn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof jr&&zm(y,!1),y instanceof Rn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},fr.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Rn&&this.isLinkLabel)},fr.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 Rn&&this.isLinkLabel?y=!1:(y=this.diagram,y=!(y!==null&&y.undoManager.isUndoingRedoing))}else y=!1;if(y)if(y=this.Ah,y!==null){var x=y.layout;x!==null?x.C():y.C(a)}else a=this.diagram,a!==null&&(a=a.layout,a!==null&&a.C())};function z1(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function oc(a,y,x,b,E,te){if(te===void 0&&(te=null),!(a.contains(y)||te!==null&&!te(y)||y instanceof di)){if(a.add(y),y instanceof Rn){if(x&&y instanceof jr)for(var ne=y.memberParts;ne.next();)oc(a,ne.value,x,b,E,te);if(E!==!1)for(ne=y.linksConnected;ne.next();){var se=ne.value;if(!a.contains(se)){var he=se.fromNode,pe=se.toNode;he=he===null||a.contains(he),pe=pe===null||a.contains(pe),(E?he&&pe:he||pe)&&oc(a,se,x,b,E,te)}}if(1<b)for(y=y.Ou();y.next();)oc(a,y.value,x,b-1,E,te)}else if(y instanceof Tn)for(y=y.labelNodes;y.next();)oc(a,y.value,x,b,E,te)}}Zt.Object.defineProperties(fr.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?Wr:this.Qf.iteratorValues}},layer:{get:function(){return this.Ig}},diagram:{get:function(){var a=this.Ig;return a==null?null:a.diagram}},layerName:{get:function(){return this.Jg},set:function(a){var y=this.Jg;if(y!==a){var x=this.diagram;if((x===null||x.Qj(a)!==null&&!x.partManager.addsToTemporaryLayer)&&(this.Jg=a,x!==null&&x.Ya(),this.g("layerName",y,a),y=this.layer,y!==null&&y.name!==a&&(x=y.diagram,x!==null&&(a=x.Qj(a),a!==null&&a!==y)))){var b=y.pc(-1,this,!0);if(0<=b&&x.cb(Eo,"parts",y,this,null,b,!0),b=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=b&&x.cb(Po,"parts",a,null,this,!0,b),b=this.layerChanged,b!==null){var E=x.aa;x.aa=!0,b(this,y,a),x.aa=E}}}}},layerChanged:{get:function(){return this.P!==null?this.P.zq:null},set:function(a){var y=this.layerChanged;y!==a&&(cs(this),this.P.zq=a,this.g("layerChanged",y,a))}},zOrder:{get:function(){return this.Ao},set:function(a){var y=this.Ao;if(y!==a){this.Ao=a;var x=this.layer;x!==null&&ud(x,-1,this),this.g("zOrder",y,a),a=this.diagram,a!==null&&a.N()}}},locationObject:{get:function(){if(this.nf===null){var a=this.locationObjectName;a!==""?(a=this.fb(a),a!==null?this.nf=a:this.nf=this):this instanceof di?this.type!==Cn.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:sn},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),cs(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:bn},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),cs(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&&(cs(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:wi},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),cs(this),this.P.Hq=a,this.v(),this.g("locationSpot",y,a))}},location:{get:function(){return this.ke},set:function(a){var y=a.x,x=a.y,b=this.ke;if(!(b.x===y||isNaN(b.x)&&isNaN(y))||!(b.y===x||isNaN(b.y)&&isNaN(x))){if(a=a.copy(),y=a,this.ph())y=!1;else{if(this.ke=y,this.G|=2097152,Xa(this)===!1&&(_m(this),x=this.pa,x.w())){var E=this.diagram;if(E===null||E.animationManager.isTicking||!E.undoManager.isUndoingRedoing){var te=x.copy();x.h(x.x+(y.x-b.x),x.y+(y.y-b.y)),F1(this,E,x,te.x,te.y),this.g("position",te,x.copy())}}y=!0}y&&this.g("location",b,a.copy())}}},category:{get:function(){return this.Tf},set:function(a){var y=this.Tf;if(y!==a){this.svg!==null&&(this.svg.remove(),this.Uc=!0);var x=this.diagram,b=this.data,E=null;if(x!==null&&b!==null&&!(this instanceof di)){var te=x.model.undoManager;te.isEnabled&&!te.isUndoingRedoing&&(E=this.clone(),E.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||b===null||this instanceof di?this instanceof di&&(E=this.adornedPart,E!==null&&(a=E.Qf,a!==null&&a.remove(y),E.bh(this.category,this))):(te=x.model,te.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(b,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(ul(x),x=x.copy(),x!==null&&Iv(this,x,y,a))):(te!==null&&te.jm(b,a),x=fS(x.partManager,b,a),x!==null&&(ul(x),x=x.copy(),x===null||x instanceof Tn||(b=this.location.copy(),Iv(this,x,y,a),this.location.w()||(this.location=b)))),E!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",E,y))))}}},self:{get:function(){return this},set:function(a){Iv(this,a,this.category,a.category)}},copyable:{get:function(){return(this.G&1)!==0},set:function(a){var y=(this.G&1)!==0;y!==a&&(this.G^=1,this.g("copyable",y,a))}},deletable:{get:function(){return(this.G&2)!==0},set:function(a){var y=(this.G&2)!==0;y!==a&&(this.G^=2,this.g("deletable",y,a))}},textEditable:{get:function(){return(this.G&4)!==0},set:function(a){var y=(this.G&4)!==0;y!==a&&(this.G^=4,this.g("textEditable",y,a),this.Wb())}},groupable:{get:function(){return(this.G&8)!==0},set:function(a){var y=(this.G&8)!==0;y!==a&&(this.G^=8,this.g("groupable",y,a))}},movable:{get:function(){return(this.G&16)!==0},set:function(a){var y=(this.G&16)!==0;y!==a&&(this.G^=16,this.g("movable",y,a))}},selectionAdorned:{get:function(){return(this.G&32)!==0},set:function(a){var y=(this.G&32)!==0;y!==a&&(this.G^=32,this.g("selectionAdorned",y,a),this.Wb())}},isInDocumentBounds:{get:function(){return(this.G&64)!==0},set:function(a){var y=(this.G&64)!==0;if(y!==a){this.G^=64;var x=this.diagram;x!==null&&x.Ya(),this.g("isInDocumentBounds",y,a)}}},isLayoutPositioned:{get:function(){return(this.G&128)!==0},set:function(a){var y=(this.G&128)!==0;y!==a&&(this.G^=128,this.g("isLayoutPositioned",y,a),this.C(a?4:8))}},selectable:{get:function(){return(this.G&256)!==0},set:function(a){var y=(this.G&256)!==0;y!==a&&(this.G^=256,this.g("selectable",y,a),this.Wb())}},reshapable:{get:function(){return(this.G&512)!==0},set:function(a){var y=(this.G&512)!==0;y!==a&&(this.G^=512,this.g("reshapable",y,a),this.Wb())}},resizable:{get:function(){return(this.G&1024)!==0},set:function(a){var y=(this.G&1024)!==0;y!==a&&(this.G^=1024,this.g("resizable",y,a),this.Wb())}},rotatable:{get:function(){return(this.G&2048)!==0},set:function(a){var y=(this.G&2048)!==0;y!==a&&(this.G^=2048,this.g("rotatable",y,a),this.Wb())}},isSelected:{get:function(){return(this.G&4096)!==0},set:function(a){var y=(this.G&4096)!==0;if(y!==a){var x=this.diagram;if(!a||this.canSelect()&&!(x!==null&&x.selection.count>=x.maxSelectionCount)){this.G^=4096;var b=!1;if(x!==null){b=x.skipsUndoManager,x.skipsUndoManager=!0;var E=x.selection;E.ka(),a?E.add(this):E.remove(this),E.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=b)}}}},isHighlighted:{get:function(){return(this.G&524288)!==0},set:function(a){var y=(this.G&524288)!==0;if(y!==a){this.G^=524288;var x=this.diagram;x!==null&&(x=x.highlighteds,x.ka(),a?x.add(this):x.remove(this),x.freeze()),this.g("isHighlighted",y,a),this.N(),a=this.highlightedChanged,a!==null&&a(this)}}},isShadowed:{get:function(){return(this.G&8192)!==0},set:function(a){var y=(this.G&8192)!==0;y!==a&&(this.G^=8192,this.Uc=!0,this.g("isShadowed",y,a),this.N())}},isAnimated:{get:function(){return(this.G&262144)!==0},set:function(a){var y=(this.G&262144)!==0;y!==a&&(this.G^=262144,this.g("isAnimated",y,a))}},highlightedChanged:{get:function(){return this.P!==null?this.P.oq:null},set:function(a){var y=this.highlightedChanged;y!==a&&(cs(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&&(cs(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&&(cs(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 Tn?(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&&(cs(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&&(cs(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&&(cs(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:ii},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),cs(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&&(cs(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&&(cs(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:Vo},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),cs(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&&Ot("Cannot make a Group a member of itself: "+this.toString()),Ot("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?Vv(y,this):this instanceof jr&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Kv(a,this):this instanceof jr&&x!==null&&x.ai.add(this),this.C(1),x!==null&&x.aa){var b=this.data,E=x.model;if(b!==null&&E.Xj()){var te=E.wa(a!==null?a.data:null);E.mp(b,te)}}if(b=this.containingGroupChanged,b!==null&&(E=!0,x!==null&&(E=x.aa,x.aa=!0),b(this,y,a),x!==null&&(x.aa=E)),this instanceof jr){for(x=new xn,oc(x,this,!0,0,!0),x=x.iterator;x.next();)if(b=x.value,b instanceof Rn)for(b=b.linksConnected;b.next();)Bd(b.value)}if(this instanceof Rn){for(x=this.linksConnected;x.next();)Bd(x.value);x=this.labeledLink,x!==null&&Bd(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&ud(y,-1,a))}}else Ot("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&&(cs(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof Rn&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(cs(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&&(cs(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:zn},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),cs(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&&(cs(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&&(cs(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),fr.prototype.invalidateLayout=fr.prototype.C,fr.prototype.findCommonContainingGroup=fr.prototype.px,fr.prototype.isMemberOf=fr.prototype.Td,fr.prototype.findTopLevelPart=fr.prototype.sz,fr.prototype.findSubGraphLevel=fr.prototype.oz,fr.prototype.ensureBounds=fr.prototype.Va,fr.prototype.getDocumentBounds=fr.prototype.mi,fr.prototype.findObject=fr.prototype.fb,fr.prototype.moveTo=fr.prototype.moveTo,fr.prototype.invalidateAdornments=fr.prototype.Wb,fr.prototype.clearAdornments=fr.prototype.Ej,fr.prototype.removeAdornment=fr.prototype.Jf,fr.prototype.addAdornment=fr.prototype.bh,fr.prototype.findAdornment=fr.prototype.Pj,fr.prototype.updateTargetBindings=fr.prototype.La;var G1=!1;fr.className="Part",fr.LayoutNone=0,fr.LayoutAdded=1,fr.LayoutRemoved=2,fr.LayoutShown=4,fr.LayoutHidden=8,fr.LayoutNodeSized=16,fr.LayoutGroupLayout=32,fr.LayoutNodeReplaced=64,fr.LayoutStandard=127,fr.LayoutAll=16777215;function di(a,y){a===void 0||a instanceof Go||typeof a=="string"?fr.call(this,a):(fr.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)}nn(di,fr),di.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},di.prototype.updateRelationshipsFromData=function(){},di.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Tn&&y instanceof Ir){y=x.path,x.Ul(a),a=y.geometry,x=this.O.s,y=x.length;for(var b=0;b<y;b++){var E=x[b];E.isPanelMain&&E instanceof Ir&&(E.ua=a)}}},di.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!Xa(a))},di.prototype.Zc=function(){return!1},di.prototype.gk=function(a,y,x,b,E,te,ne){if(a===Po&&y==="elements"){if(E instanceof $a)this.$a===null&&(this.$a=E);else if(E instanceof Cn){var se=E.Nl(function(he){return he instanceof $a});se instanceof $a&&this.$a===null&&(this.$a=se)}}else a===Eo&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Cn&&this.$a.rg(b)&&(this.$a=null));fr.prototype.gk.call(this,a,y,x,b,E,te,ne)},di.prototype.updateAdornments=function(){},di.prototype.Lj=function(){},Zt.Object.defineProperties(di.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}}}),di.className="Adornment";function Uv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=xi,this.er=Wm,this.Kr=this.ij=this.Nq=this.Mq=null}Uv.prototype.copy=function(){var a=new Uv;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 Rn(a,y){a===void 0||a instanceof Go||typeof a=="string"?fr.call(this,a):(fr.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new yn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}nn(Rn,fr),Rn.prototype.cloneProtected=function(a){fr.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},et=Rn.prototype,et.Af=function(a){fr.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function bh(a){a.Ba===null?a.Ba=new Uv:a.Ba.nc&&(a.Ba=a.Ba.copy())}et.th=function(){fr.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function U1(a,y){y!==null&&(a.af===null&&(a.af=new xn),a.af.add(y))}function W1(a,y,x,b){if(y===null||a.af===null)return null;for(var E=a.af.iterator;E.next();){var te=E.value;if(te.Ds===a&&te.cv===y&&te.Ox===x&&te.Px===b||te.Ds===y&&te.cv===a&&te.Ox===b&&te.Px===x)return te}return null}et.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=W1(this,a,y,x),a!==null&&a.Sl()},et.gk=function(a,y,x,b,E,te,ne){a===Po&&y==="elements"?this.wc=null:a===Eo&&y==="elements"&&(this.wc=null),fr.prototype.gk.call(this,a,y,x,b,E,te,ne)},et.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Cs(x.fromPort),Cs(x.toPort),x.bb())}};function H1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Cs(x.fromPort),Cs(x.toPort),x.bb())}}function Cs(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Cs(y.port)}}et.si=function(){return!0},Rn.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Rn.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Rn.prototype.isVisible=function(){if(!fr.prototype.isVisible.call(this))return!1;var a=!0,y=vh,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===vh){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Do){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(b){return!b.isTreeExpanded}))return!1}else if(y===wd&&(a=a?this.Oo():this.Po(),0<a.count&&a.any(function(b){return!b.isTreeExpanded})))return!1;return a=this.labeledLink,a!==null?a.isVisible():!0},Rn.prototype.Zb=function(a){fr.prototype.Zb.call(this,a);for(var y=this.linksConnected;y.next();){var x=y.value;if(a&&this.containingGroup!==null){var b=x.To(this);b===null||b.Td(this.containingGroup)||x.bb()}x.Zb(a)}},Rn.prototype.qx=function(){var a=new xn,y=new xn;return K1(this,this,a,y),y.iterator};function K1(a,y,x,b){if(y!==null&&!x.has(y)){x.add(y);var E=!0,te=a.diagram;te!==null&&(E=te.isTreePathToChildren),y.linksConnected.each(function(ne){ne.isTreeLink?(E?ne.fromNode===y:ne.toNode===y)&&K1(a,E?ne.toNode:ne.fromNode,x,b):b.add(ne)})}}Rn.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new ni(this.jb),x=this;return y.predicate=function(b){return b.fromNode===x&&b.fromPortId===a||b.toNode===x&&b.toPortId===a},y},et=Rn.prototype,et.Mo=function(a){a===void 0&&(a=null);var y=new ni(this.jb),x=this;return y.predicate=function(b){return b.fromNode!==x?!1:a===null?!0:b.fromPortId===a},y},et.Sd=function(a){a===void 0&&(a=null);var y=new ni(this.jb),x=this;return y.predicate=function(b){return b.toNode!==x?!1:a===null?!0:b.toPortId===a},y},et.Mu=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.fromNode===this?(a===null||E.fromPortId===a)&&(E=E.toNode,y!==null?y.add(E):x!==null&&x!==E?(y=new xn,y.add(x),y.add(E)):x=E):E.toNode!==this||a!==null&&E.toPortId!==a||(E=E.fromNode,y!==null?y.add(E):x!==null&&x!==E?(y=new xn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new $r(x):Wr},et.Po=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.fromNode!==this||a!==null&&E.fromPortId!==a||(E=E.toNode,y!==null?y.add(E):x!==null&&x!==E?(y=new xn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new $r(x):Wr},et.Oo=function(a){a===void 0&&(a=null);for(var y=null,x=null,b=this.jb.iterator;b.next();){var E=b.value;E.toNode!==this||a!==null&&E.toPortId!==a||(E=E.fromNode,y!==null?y.add(E):x!==null&&x!==E?(y=new xn,y.add(x),y.add(E)):x=E)}return y!==null?y.iterator:x!==null?new $r(x):Wr},et.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new ni(this.jb),E=this;return b.predicate=function(te){return!((te.fromNode!==E||te.toNode!==a||y!==null&&te.fromPortId!==y||x!==null&&te.toPortId!==x)&&(te.fromNode!==a||te.toNode!==E||x!==null&&te.fromPortId!==x||y!==null&&te.toPortId!==y))},b},et.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var b=new ni(this.jb),E=this;return b.predicate=function(te){return!(te.fromNode!==E||te.toNode!==a||y!==null&&te.fromPortId!==y||x!==null&&te.toPortId!==x)},b};function Gm(a,y,x){Cs(x);var b=a.jb.contains(y);if(b||a.jb.add(y),!b||y.fromNode===y.toNode){var E=a.linkConnected;if(E!==null){var te=!0,ne=a.diagram;ne!==null&&(te=ne.aa,ne.aa=!0),E(a,y,x),ne!==null&&(ne.aa=te)}}!b&&y.isTreeLink&&(x=y.fromNode,y=y.toNode,x!==null&&y!==null&&x!==y&&(b=!0,a=a.diagram,a!==null&&(b=a.isTreePathToChildren),E=b?y:x,te=b?x:y,E.ci||(E.ci=te),!te.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(b?x===te&&(te.isTreeLeaf=!1):y===te&&(te.isTreeLeaf=!1))))}function Um(a,y,x){Cs(x);var b=a.jb.remove(y),E=null;if(b||y.toNode===y.fromNode){var te=a.linkDisconnected;if(E=a.diagram,te!==null){var ne=!0;E!==null&&(ne=E.aa,E.aa=!0),te(a,y,x),E!==null&&(E.aa=ne)}}b&&y.isTreeLink&&(x=!0,E!==null&&(x=E.isTreePathToChildren),a=x?y.toNode:y.fromNode,y=x?y.fromNode:y.toNode,a!==null&&(a.ci=!1),y===null||y.isTreeLeaf||(y.jb.count===0?(y.ci=null,E!==null&&E.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):Qp(y)))}function Qp(a){if(a.ci=!1,a.jb.count!==0){var y=!0,x=a.diagram;if(x===null||!x.undoManager.isUndoingRedoing){for(x!==null&&(y=x.isTreePathToChildren),x=a.jb.iterator;x.next();){var b=x.value;if(b.isTreeLink){if(y){if(b.fromNode===a){a.isTreeLeaf=!1;return}}else if(b.toNode===a){a.isTreeLeaf=!1;return}}}a.isTreeLeaf=!0}}}Rn.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},et=Rn.prototype,et.Vo=function(a){fr.prototype.Vo.call(this,a),a||(Qp(this),a=this.Yk,a!==null&&eS(a,this))},et.Wo=function(a){fr.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},et.Lj=function(){if(0<this.jb.count){var a=this.diagram;if(a!==null)for(var y=a.commandHandler!==null?a.commandHandler.deletesConnectedLinks:!0,x=this.jb.copy().iterator;x.next();){var b=x.value;y?a.remove(b):(b.fromNode===this&&(b.fromNode=null),b.toNode===this&&(b.toNode=null))}}this.labeledLink=null,fr.prototype.Lj.call(this)},et.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;V1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function V1(a){a.wc===null?a.wc=new Jt:a.wc.clear(),a.qm(a,function(y,x){Z1(y,x)}),a.wc.count===0&&a.wc.add("",a)}function Z1(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function Wv(a,y,x){var b=y.portId;if(b!==null&&(a.wc!==null&&a.wc.remove(b),y=a.diagram,y!==null&&x)){for(x=null,a=a.findLinksConnected(b);a.next();)b=a.value,x===null&&(x=$n()),x.push(b);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Wn(x)}}}et.Nz=function(a){if(a===null||a===this)return!1;var y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this,y)for(;x!==a;){y=null;for(var b=x.jb.iterator;b.next();){var E=b.value;if(E.isTreeLink&&(y=E.fromNode,y!==x&&y!==this))break}if(y===this||y===null||y===x)return!1;x=y}else for(;x!==a;){for(y=null,b=x.jb.iterator;b.next()&&(E=b.value,!E.isTreeLink||(y=E.toNode,y===x||y===this)););if(y===this||y===null||y===x)return!1;x=y}return!0},et.xz=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this,a)for(;;){a=null;for(var x=y.jb.iterator;x.next();){var b=x.value;if(b.isTreeLink&&(a=b.fromNode,a!==y&&a!==this))break}if(a===this)return this;if(a===null||a===y)return y;y=a}else for(;;){for(a=null,x=y.jb.iterator;x.next()&&(b=x.value,!b.isTreeLink||(a=b.toNode,a===y||a===this)););if(a===this)return this;if(a===null||a===y)return y;y=a}},et.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)zm(y,!0),y=y.pg();var x=null;for(y=a;y!==null;){if(y.G&1048576){x=y;break}y=y.pg()}for(y=this;y!==null;)zm(y,!1),y=y.pg();return x},et.kh=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this.jb.iterator,a){for(;y.next();)if(a=y.value,a.isTreeLink&&a.fromNode!==this)return a}else for(;y.next();)if(a=y.value,a.isTreeLink&&a.toNode!==this)return a;return null},et.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof Rn)return a;a=this.diagram,a=a!==null?a.isTreePathToChildren:!0;for(var y=this.jb.iterator;y.next();){var x=y.value;if(x.isTreeLink&&(x=a?x.fromNode:x.toNode,x!==this))return this.ci=x}return this.ci=null},et.vz=function(){function a(x,b){b.add(x);var E=x.kh();E!==null&&(b.add(E),x=x.pg(),x!==null&&a(x,b))}var y=new xn;return a(this,y),y},et.uz=function(){return X1(this,this)};function X1(a,y){return y=y.pg(),y===null?0:1+X1(a,y)}et.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new ni(this.jb);var x=this;return y.predicate=a?function(b){return!!(b.isTreeLink&&b.fromNode===x)}:function(b){return!!(b.isTreeLink&&b.toNode===x)},y},et.Ou=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren);var x=y=null,b=this.jb.iterator;if(a)for(;b.next();)a=b.value,a.isTreeLink&&a.fromNode===this&&(a=a.toNode,y!==null?y.add(a):x!==null&&x!==a?(y=new yn,y.add(x),y.add(a)):x=a);else for(;b.next();)a=b.value,a.isTreeLink&&a.toNode===this&&(a=a.fromNode,y!==null?y.add(a):x!==null&&x!==a?(y=new yn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new $r(x):Wr},et.wz=function(a){a===void 0&&(a=1/0);var y=new xn;return oc(y,this,!1,a,!0),y},Rn.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 xn;x.add(this),Y1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===vh),y.Ue=!1}};function Y1(a,y,x,b,E,te,ne){if(1<b)for(var se=x?a.Mo():a.Sd();se.next();){var he=se.value;he.isTreeLink&&(he=he.To(a),he===null||he===a||y.contains(he)||(y.add(he),Y1(he,y,x,b-1,E,te,ne)))}else $1(a,y,x,E,te,ne)}function $1(a,y,x,b,E,te){for(var ne=E===a?!0:a.isTreeExpanded,se=x?a.Mo():a.Sd(),he={};se.next();){var pe=se.value;if(pe.isTreeLink&&(pe=pe.To(a),pe!==null&&pe!==a)){var ye=y.contains(pe);if(ye||y.add(pe),ne){var Te=x?pe.Oo():pe.Po();he.uv=a,Te.all(function(ze){return function(Ze){return Ze===ze.uv||!Ze.isTreeExpanded}}(he))&&b.Aj(pe,E),pe.oh(),pe.Zb(!1)}pe.isTreeExpanded&&(pe.wasTreeExpanded=pe.isTreeExpanded,ye||$1(pe,y,x,b,E,te))}he={uv:he.uv}}a.isTreeExpanded=!1}Rn.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 xn;x.add(this),J1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===vh),y.Ue=!1}};function J1(a,y,x,b,E,te,ne){for(var se=te===a?!1:a.isTreeExpanded,he=x?a.Mo():a.Sd(),pe={};he.next();){var ye=he.value;if(ye.isTreeLink&&(se||ye.fd||ye.bb(),ye=ye.To(a),ye!==null&&ye!==a&&!y.contains(ye))){if(y.add(ye),!se){ye.Zb(!0),ye.oh();var Te=x?ye.Oo():ye.Po();pe.vv=a,Te.all(function(ze){return function(Ze){return Ze===ze.vv||!Ze.isTreeExpanded}}(pe))&&E.Cj(ye,te)}(2<b||ye.wasTreeExpanded)&&(ye.wasTreeExpanded=!1,J1(ye,y,x,b-1,E,te,ne))}pe={vv:pe.vv}}a.isTreeExpanded=!0}Zt.Object.defineProperties(Rn.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:Wm},set:function(a){var y=this.portSpreading;y!==a&&(bh(this),this.Ba.er=a,this.g("portSpreading",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.Bd())}},avoidable:{get:function(){return(this.U&8)!==0},set:function(a){var y=(this.U&8)!==0;if(y!==a){this.U^=8;var x=this.diagram;x!==null&&gh(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:xi},set:function(a){typeof a=="number"&&(a=new Dr(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),bh(this),this.Ba.yp=a;var x=this.diagram;x!==null&&gh(x,this),this.g("avoidableMargin",y,a)}}},linksConnected:{get:function(){return this.jb.iterator}},linkConnected:{get:function(){return this.Ba!==null?this.Ba.Dq:null},set:function(a){var y=this.linkConnected;y!==a&&(bh(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&&(bh(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&&(bh(this),this.Ba.gj=a,this.g("linkValidation",y,a))}},isLinkLabel:{get:function(){return this.Yk!==null}},labeledLink:{get:function(){return this.Yk},set:function(a){var y=this.Yk;if(y!==a){var x=this.diagram,b=this.data;if(y!==null){if(y.wd!==null&&(y.wd.remove(this),y.v()),x!==null&&b!==null&&!x.undoManager.isUndoingRedoing){var E=y.data,te=x.model;if(E!==null&&te.ri()){var ne=te.wa(b);ne!==void 0&&te.Qx(E,ne)}}this.containingGroup=null}this.Yk=a,a!==null&&(eS(a,this),x===null||b===null||x.undoManager.isUndoingRedoing||(E=a.data,x=x.model,E!==null&&x.ri()&&(b=x.wa(b),b!==void 0&&x.Bu(E,b))),this.containingGroup=a.containingGroup),Za(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&V1(this),this.wc.iteratorValues}},isTreeExpanded:{get:function(){return(this.U&1)!==0},set:function(a){var y=(this.U&1)!==0;if(y!==a){this.U^=1;var x=this.diagram;if(this.g("isTreeExpanded",y,a),y=this.treeExpandedChanged,y!==null){var b=!0;x!==null&&(b=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=b)}x!==null&&x.undoManager.isUndoingRedoing?this.Zb(a):a?this.expandTree():this.collapseTree()}}},wasTreeExpanded:{get:function(){return(this.U&2)!==0},set:function(a){var y=(this.U&2)!==0;y!==a&&(this.U^=2,this.g("wasTreeExpanded",y,a))}},treeExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Vr:null},set:function(a){var y=this.treeExpandedChanged;y!==a&&(bh(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))}}}),Rn.prototype.expandTree=Rn.prototype.expandTree,Rn.prototype.collapseTree=Rn.prototype.collapseTree,Rn.prototype.findTreeParts=Rn.prototype.wz,Rn.prototype.findTreeChildrenNodes=Rn.prototype.Ou,Rn.prototype.findTreeChildrenLinks=Rn.prototype.Qo,Rn.prototype.findTreeLevel=Rn.prototype.uz,Rn.prototype.findTreeParentChain=Rn.prototype.vz,Rn.prototype.findTreeParentNode=Rn.prototype.pg,Rn.prototype.findTreeParentLink=Rn.prototype.kh,Rn.prototype.findCommonTreeParent=Rn.prototype.gz,Rn.prototype.findTreeRoot=Rn.prototype.xz,Rn.prototype.isInTreeOf=Rn.prototype.Nz,Rn.prototype.findPort=Rn.prototype.ns,Rn.prototype.findLinksTo=Rn.prototype.kz,Rn.prototype.findLinksBetween=Rn.prototype.jz,Rn.prototype.findNodesInto=Rn.prototype.Oo,Rn.prototype.findNodesOutOf=Rn.prototype.Po,Rn.prototype.findNodesConnected=Rn.prototype.Mu,Rn.prototype.findLinksInto=Rn.prototype.Sd,Rn.prototype.findLinksOutOf=Rn.prototype.Mo,Rn.prototype.findExternalTreeLinksConnected=Rn.prototype.qx,Rn.prototype.invalidateConnectedLinks=Rn.prototype.Bd,Rn.prototype.invalidateLinkBundle=Rn.prototype.Lz;var Ex=new un(Rn,"SpreadingNone",10),Wm=new un(Rn,"SpreadingEvenly",11),Hv=new un(Rn,"SpreadingPacked",12);Rn.className="Node",Rn.SpreadingNone=Ex,Rn.SpreadingEvenly=Wm,Rn.SpreadingPacked=Hv;function jr(a,y){a===void 0||a instanceof Go||typeof a=="string"?Rn.call(this,a):(Rn.call(this),a&&(y=a)),this.U|=4608,this.Gn=new xn,this.$a=null,this.Sc=new so,this.Sc.group=this,this.gl=new xn,this.tb=this.$p=null,y&&Object.assign(this,y)}nn(jr,Rn),jr.prototype.cloneProtected=function(a){Rn.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof $a});y instanceof $a?a.$a=y:a.$a=null,this.Sc!==null?(a.Sc=this.Sc.copy(),a.Sc.group=a):(a.Sc!==null&&(a.Sc.group=null),a.Sc=null),this.tb!==null&&(a.tb=this.tb.copy())},et=jr.prototype,et.Af=function(a){Rn.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 Rn)x.Bd(y);else if(x instanceof Tn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},et.gk=function(a,y,x,b,E,te,ne){if(a===Po&&y==="elements"){if(E instanceof $a)this.$a===null?this.$a=E:this.$a!==E&&Ot("Cannot insert a second Placeholder into the visual tree of a Group.");else if(E instanceof Cn){var se=E.Nl(function(he){return he instanceof $a});se instanceof $a&&(this.$a===null?this.$a=se:this.$a!==se&&Ot("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===Eo&&y==="elements"&&this.$a!==null&&(b===this.$a?this.$a=null:b instanceof Cn&&this.$a.rg(b)&&(this.$a=null));Rn.prototype.gk.call(this,a,y,x,b,E,te,ne)},et.Xl=function(a,y){Rn.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Cn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Cn&&(a=a.Pb()),this.tb===null&&(this.tb=new Yt),a.mi(this.tb),a instanceof Ir&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},et.eh=function(a,y,x,b){this.nf=this.$a,Rn.prototype.eh.call(this,a,y,x,b)},et.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Tn||y.Va()}),Rn.prototype.Va.call(this)},et.si=function(){if(!Rn.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Rn){if(y.isVisible()&&Xa(y))return!1}else if(y instanceof Tn&&y.isVisible()&&Xa(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function Kv(a,y){if(a.Gn.add(y)){y instanceof jr&&a.gl.add(y);var x=a.memberAdded;if(x!==null){var b=!0,E=a.diagram;E!==null&&(b=E.aa,E.aa=!0),x(a,y),E!==null&&(E.aa=b)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!1)}y instanceof Tn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function Vv(a,y){if(a.Gn.remove(y)){y instanceof jr&&a.gl.remove(y);var x=a.memberRemoved;if(x!==null){var b=!0,E=a.diagram;E!==null&&(b=E.aa,E.aa=!0),x(a,y),E!==null&&(E.aa=b)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!0)}y instanceof Tn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}et.Lj=function(){if(0<this.Gn.count){var a=this.diagram;if(a!==null)for(var y=this.Gn.copy().iterator;y.next();)a.remove(y.value)}Rn.prototype.Lj.call(this)},jr.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=en(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},jr.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var b=!0;for(a=en(a).iterator;a.next();){var E=a.value;!y||x.isValidMember(this,E)?E.containingGroup=this:b=!1}return b},jr.prototype.canUngroup=function(){if(!this.ungroupable)return!1;var a=this.layer;return a===null||!a.allowUngroup?!1:(a=a.diagram,!!(a===null||a.allowUngroup))},et=jr.prototype,et.Bd=function(a){var y=(this.U&65536)!==0;if(Rn.prototype.Bd.call(this,a),!y)for(!(this.U&65536)&&(this.U=this.U^65536),y=this.Lu();y.next();){var x=y.value;if(a===void 0||!a.contains(x)){var b=x.fromNode;b!==null&&b!==this&&b.Td(this)&&!b.isVisible()?(Cs(x.fromPort),Cs(x.toPort),x.bb()):(b=x.toNode,b!==null&&b!==this&&b.Td(this)&&!b.isVisible()&&(Cs(x.fromPort),Cs(x.toPort),x.bb()))}}},et.Lu=function(){var a=this.diagram!==null&&this.diagram.Pw;if(a&&this.$p!==null)return this.$p.iterator;var y=this.Rj();y.add(this);for(var x=new xn,b=y.iterator;b.next();){var E=b.value;if(E instanceof Rn)for(E=E.linksConnected;E.next();){var te=E.value;y.contains(te)||x.add(te)}}return a&&(this.$p=x),x.iterator},et.iz=function(){var a=this.Rj();a.add(this);for(var y=new xn,x=a.iterator;x.next();){var b=x.value;if(b instanceof Rn)for(b=b.linksConnected;b.next();){var E=b.value,te=E.fromNode;te===null||a.contains(te)&&te!==this||y.add(te),E=E.toNode,E===null||a.contains(E)&&E!==this||y.add(E)}}return y.iterator},et.hz=function(){function a(x,b){x!==null&&(b.add(x),a(x.containingGroup,b))}var y=new xn;return a(this,y),y},et.Rj=function(){var a=new xn;return oc(a,this,!0,0,!0),a.remove(this),a},et.Zb=function(a){Rn.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},jr.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();Q1(this,y,a,this),a.Ue=!1}};function Q1(a,y,x,b){for(var E=a.memberParts;E.next();){var te=E.value;if(te.Zb(!1),te instanceof jr&&te.isSubGraphExpanded&&(te.wasSubGraphExpanded=te.isSubGraphExpanded,Q1(te,y,x,b)),te instanceof Rn)te.Bd(y),x.Aj(te,b);else if(te instanceof Tn)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!1}jr.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();q1(this,y,a,this),a.Ue=!1}};function q1(a,y,x,b){for(var E=a.memberParts;E.next();){var te=E.value;if(te.Zb(!0),te instanceof jr&&te.wasSubGraphExpanded&&(te.wasSubGraphExpanded=!1,q1(te,y,x,b)),te instanceof Rn)te.Bd(y),x.Cj(te,b);else if(te instanceof Tn)for(te=te.labelNodes;te.next();)te.value.Bd(y)}a.isSubGraphExpanded=!0}jr.prototype.move=function(a,y){y===void 0&&(y=!1);var x=y?this.location:this.position,b=x.x;x=x.y;var E=a.x,te=a.y;if(!(b===E||isNaN(b)&&isNaN(E))||!(x===te||isNaN(x)&&isNaN(te))){for(b=E-(isNaN(b)?0:b),x=te-(isNaN(x)?0:x),te=lt.alloc(),Rn.prototype.move.call(this,a,y),a=new xn,y=this.Rj().iterator;y.next();)E=y.value,E instanceof Tn&&(E.suspendsRouting&&a.add(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(E.suspendsRouting=!0);for(y.reset();y.next();)if(E=y.value,!(E.ph()||E instanceof Rn&&E.isLinkLabel)){var ne=E.position,se=E.location;ne.w()?(te.x=ne.x+b,te.y=ne.y+x,E.position=te):se.w()&&(te.x=se.x+b,te.y=se.y+x,E.location=te)}for(y.reset();y.next();)E=y.value,E instanceof Tn&&(E.suspendsRouting=a.contains(E),E.fd||E.fromNode!==this&&E.toNode!==this)&&(ne=E.position,te.x=ne.x+b,te.y=ne.y+x,te.w()?E.move(te):E.bb(),Xv(E)&&E.bb());lt.free(te)}},Zt.Object.defineProperties(jr.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&&Ot("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&&(bh(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&&(bh(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&&(bh(this),this.Ba.ij=a,this.g("memberValidation",y,a))}},ungroupable:{get:function(){return(this.U&256)!==0},set:function(a){var y=(this.U&256)!==0;y!==a&&(this.U^=256,this.g("ungroupable",y,a))}},isSubGraphExpanded:{get:function(){return(this.U&512)!==0},set:function(a){var y=(this.U&512)!==0;if(y!==a){this.U^=512;var x=this.diagram;if(this.g("isSubGraphExpanded",y,a),y=this.subGraphExpandedChanged,y!==null){var b=!0;x!==null&&(b=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=b)}x!==null&&x.undoManager.isUndoingRedoing?(this.$a!==null&&this.$a.v(),this.memberParts.each(function(E){E.updateAdornments()})):a?this.expandSubGraph():this.collapseSubGraph()}}},wasSubGraphExpanded:{get:function(){return(this.U&1024)!==0},set:function(a){var y=(this.U&1024)!==0;y!==a&&(this.U^=1024,this.g("wasSubGraphExpanded",y,a))}},subGraphExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Kr:null},set:function(a){var y=this.subGraphExpandedChanged;y!==a&&(bh(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)}}}),jr.prototype.expandSubGraph=jr.prototype.expandSubGraph,jr.prototype.collapseSubGraph=jr.prototype.collapseSubGraph,jr.prototype.findSubGraphParts=jr.prototype.Rj,jr.prototype.findContainingGroupChain=jr.prototype.hz,jr.prototype.findExternalNodesConnected=jr.prototype.iz,jr.prototype.findExternalLinksConnected=jr.prototype.Lu,jr.prototype.ensureBounds=jr.prototype.Va,jr.className="Group";function $a(a){zt.call(this),this.yb=Jo,this.ko=new Yt(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}nn($a,zt),$a.prototype.cloneProtected=function(a){zt.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},$a.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Qi(0,0,y.width,y.height,a.x,a.y)},$a.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof jr||a instanceof di)||Ot("Placeholder is not inside a Group or Adornment."),a instanceof jr){var y=this.computeBorder(this.ko),x=this.minSize,b=this.dc;for(ci(b,(isFinite(x.width)?Math.max(x.width,y.width):y.width)||0,(isFinite(x.height)?Math.max(x.height,y.height):y.height)||0),this.Ge(0,0,b.width,b.height),b=a.memberParts,x=!1;b.next();)if(b.value.isVisible()){x=!0;break}b=a.diagram,!x||b===null||b.animationManager.Xu(a)||isNaN(y.x)||isNaN(y.y)||(x=lt.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),lt.free(x))}else{y=this.dc,x=this.yb,b=x.left+x.right;var E=x.top+x.bottom,te=a.adornedObject;a.angle=te.li();var ne=0;te instanceof Ir&&(ne=te.strokeWidth);var se=te.Df(),he=te.naturalBounds,pe=(he.width+ne)*se;ne=(he.height+ne)*se,a.type!==Cn.Link&&(se=te.ga(a.category==="Selection"?wi:a.locationSpot,lt.alloc()),a.location=se,lt.free(se)),isNaN(pe)||isNaN(ne)?(a=te.ga(wi,lt.alloc()),pe=Yt.allocAt(a.x,a.y,0,0),pe.Ye(te.ga(io,a)),pe.Ye(te.ga(Pa,a)),pe.Ye(te.ga(Ko,a)),ci(y,pe.width+b||0,pe.height+E||0),this.Ge(-x.left,-x.top,y.width,y.height),lt.free(a),Yt.free(pe)):(ci(y,pe+b||0,ne+E||0),this.Ge(-x.left,-x.top,y.width,y.height))}},$a.prototype.eh=function(a,y,x,b){this.actualBounds.h(a,y,x,b)},$a.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,b=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof jr&&!y.layer.isTemporary&&y.computesBoundsAfterDrag&&this.ko.w()){var E=x.toolManager.findTool("Dragging");if(E===x.currentTool&&(x=E.computeBorder(y,this.ko,a),x!==null))return x}x=Yt.alloc(),E=this.computeMemberBounds(x);var te=this.yb;return y instanceof jr&&!y.isSubGraphExpanded?a.h(E.x-te.left,E.y-te.top,0,0):a.h(E.x-te.left,E.y-te.top,Math.max(E.width+te.left+te.right,0),Math.max(E.height+te.top+te.bottom,0)),Yt.free(x),b&&y instanceof jr&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},$a.prototype.computeMemberBounds=function(a){if(!(this.part instanceof jr))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,b=1/0,E=-1/0,te=-1/0,ne=y.memberParts;ne.next();){var se=ne.value;if(se.isVisible()){if(se instanceof Tn&&(!y.computesBoundsIncludingLinks||Bs(se)||se.fromNode===y||se.toNode===y))continue;se=se.actualBounds,se.left<x&&(x=se.left),se.top<b&&(b=se.top),se.right>E&&(E=se.right),se.bottom>te&&(te=se.bottom)}}return isFinite(x)&&isFinite(b)?a.h(x,b,E-x,te-b):(y=y.location,a.h(y.x,y.y,0,0)),a},Zt.Object.defineProperties($a.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Dr(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),$a.className="Placeholder";function Tn(a){fr.call(this,Cn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Ja,this.Om=0,this.Qm=Ja,this.Rm=NaN,this.qj=Jv,this.po=.5,this.wd=null,this.Nb=new yn().freeze(),this.Tg=this.Mg=null,this.ml=new Yt,this.ua=new Mn,this.u=this.o=this.Sf=this.Wf=null,this.su=new lt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}nn(Tn,fr),Tn.prototype.cloneProtected=function(a){fr.prototype.cloneProtected.call(this,a),a.Qa=this.Qa&-113,a.ff=this.ff,a.gn=this.gn,a.vf=this.vf,a.uo=this.uo,a.qk=this.qk,a.Om=this.Om,a.Qm=this.Qm,a.Rm=this.Rm,a.qj=this.qj,a.po=this.po,this.ba!==null&&(a.ba=this.ba.copy())},et=Tn.prototype,et.Af=function(a){fr.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&&Cs(y),a=a.toPort,a!==null&&Cs(a)},et.qb=function(a){a.classType===Tn?(a.value&2)===2?this.routing=a:a===Rs||a===Eh||a===Rd?this.curve=a:a===tg||a===Ym||a===$m?this.adjusting=a:a!==Jv&&a!==Ja&&Ot("Unknown Link enum value for a Link property: "+a):fr.prototype.qb.call(this,a)},et.Xc=function(){this.ba===null&&(this.ba=new Gp)},et.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Xa(a)||rc(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Xa(a)||rc(a)))},et.zv=function(){return!1},et.Av=function(){},et.Zc=function(){return!1},Tn.prototype.computeAngle=function(a,y,x){return Tn.computeAngle(y,x)},Tn.computeAngle=function(a,y){switch(a){default:case Ja:a=0;break;case ng:a=y;break;case rg:a=y+90;break;case ig:a=y-90;break;case Qv:a=y+180;break;case Jm:a=Gt.bp(y),90<a&&270>a&&(a-=180);break;case og:a=Gt.bp(y+90),90<a&&270>a&&(a-=180);break;case ag:a=Gt.bp(y-90),90<a&&270>a&&(a-=180);break;case Qm:if(a=Gt.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return Gt.bp(a)};function Bd(a){var y=a.fromNode,x=a.toNode,b=null;if(y!==null?b=x!==null?y.px(x):y.containingGroup:x!==null?b=x.containingGroup:b=null,y=b,x=a.Ah,x!==y){x!==null&&Vv(x,a),a.Ah=y,y!==null&&Kv(y,a);var E=a.containingGroupChanged;if(E!==null){var te=!0,ne=a.diagram;ne!==null&&(te=ne.aa,ne.aa=!0),E(a,x,y),ne!==null&&(ne.aa=te)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=b}et=Tn.prototype,et.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&fr.prototype.oh.call(this)},et.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},et.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function eS(a,y){a.wd===null&&(a.wd=new xn),a.wd.add(y),a.v()}et.Vo=function(a){if(fr.prototype.Vo.call(this,a),Jc(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Gm(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Gm(x,this,b)}qp(this)}},et.Wo=function(a){if(fr.prototype.Wo.call(this,a),Jc(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Um(a,this,y));var x=this.uf;if(x!==null){var b=this.toPort;x===a&&b===y||Um(x,this,b)}eg(this)}},et.Lj=function(){if(this.fd=!0,this.wd!==null){var a=this.diagram;if(a!==null)for(var y=this.wd.copy().iterator;y.next();)a.remove(y.value)}this.data!==null&&(a=this.diagram,a!==null&&a.partManager.removeDataForLink(this))},Tn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Tn.prototype.move=function(a,y){var x=y?this.location:this.position,b=x.x;isNaN(b)&&(b=0);var E=x.y;for(isNaN(E)&&(E=0),b=a.x-b,E=a.y-E,y===!0?fr.prototype.move.call(this,a,!1):(a=lt.allocAt(x.x+b,x.y+E),fr.prototype.move.call(this,a,!1),lt.free(a)),Ch(this,b,E),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+b,x.y+E)},Tn.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},Tn.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},Tn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(Yn),a;if(y===1)return a.assign(this.i(0)),a;if(y===2){var x=this.i(0),b=this.i(1);return a.h((x.x+b.x)/2,(x.y+b.y)/2),a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===Rs))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()===Rs){if(y===3){x=this.i(0),b=this.i(1);var E=this.i(2);return Gt.ax(x.x,x.y,b.x,b.y,b.x,b.y,E.x,E.y,a),a}if(b=(y-1)/3|0,x=3*(b/2|0),b%2===1){b=this.i(x),E=this.i(x+1);var te=this.i(x+2);x=this.i(x+3),Gt.ax(b.x,b.y,E.x,E.y,te.x,te.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var ne=this.flattenedLengths;for(x=this.flattenedTotalLength,E=te=b=0;b<x/2&&te<y&&(E=ne[te],!(b+E>x/2));)b+=E,te++;return y=this.i(te),te=this.i(te+1),1>Math.abs(y.x-te.x)?y.y>te.y?a.h(y.x,y.y-(x/2-b)):a.h(y.x,y.y+(x/2-b)):1>Math.abs(y.y-te.y)?y.x>te.x?a.h(y.x-(x/2-b),y.y):a.h(y.x+(x/2-b),y.y):(x=(x/2-b)/E,a.h(y.x+x*(te.x-y.x),y.y+x*(te.y-y.y))),a},Tn.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()===Rs))return this.ua.wx(.5);if(this.computeCurve()===Rs&&4<=a){var y=(a-1)/3|0,x=3*(y/2|0);if(y%2===1){x=Math.floor(x),a=this.i(x),y=this.i(x+1);var b=this.i(x+2);return x=this.i(x+3),Gt.My(a.x,a.y,y.x,y.y,b.x,b.y,x.x,x.y)}if(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,b=this.flattenedTotalLength;var E=0;x=0;for(var te;E<b/2&&x<a&&(te=y[x],!(E+te>b/2));)E+=te,x++;if(y=this.i(x),b=this.i(x+1),1>Math.abs(y.x-b.x)&&1>Math.abs(y.y-b.y)){if(0<x&&x+2<a)return this.i(x-1).ab(this.i(x+2))}else{if(1>Math.abs(y.x-b.x))return y.y>b.y?270:90;if(1>Math.abs(y.y-b.y))return y.x>b.x?180:0}return y.ab(b)},et=Tn.prototype,et.i=function(a){return this.Nb.s[a]},et.dd=function(a,y){this.Nb.cd(a,y)},et.L=function(a,y,x){this.Nb.cd(a,new lt(y,x))},et.Kz=function(a,y){this.Nb.Gb(a,y)},et.m=function(a,y,x){this.Nb.Gb(a,new lt(y,x))},et.ne=function(a){this.Nb.add(a)},et.yf=function(a,y){this.Nb.add(new lt(a,y))},et.pv=function(a){this.Nb.mb(a)},et.Fj=function(){this.Nb.clear()};function Ch(a,y,x){if(y!==0||x!==0)if(a.pointsCount===0)a.defaultFromPoint&&a.defaultFromPoint.offset(y,x),a.defaultToPoint&&a.defaultToPoint.offset(y,x);else{for(var b=a.fd,E=new yn,te=a.Nb.iterator;te.next();){var ne=te.value;E.add(new lt(ne.x+y,ne.y+x).freeze())}E.freeze(),te=a.Nb,a.Nb=E,ne=a.diagram,isNaN(y)||isNaN(x)||ne!==null&&ne.animationManager.zb?a.v():(a.ke.h(a.ke.x+y,a.ke.y+x),a.pa.h(a.pa.x+y,a.pa.y+x),Za(a)),b?Hm(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),ne!==null&&ne.animationManager.zb&&ld(ne.animationManager,a,E),a.g("points",te,E)}}et.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},et.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,b=1/0,E=a.s,te=E.length,ne=0;ne<te;ne++){var se=E[ne];x=Math.min(se.x,x),b=Math.min(se.y,b)}se=ne=1/0;for(var he=y.s,pe=he.length,ye=0;ye<pe;ye++){var Te=he[ye];ne=Math.min(Te.x,ne),se=Math.min(Te.y,se),Te.freeze()}if(y.freeze(),pe===te){for(te=0;te<pe;te++)if(ye=E[te],Te=he[te],ye.x-x!==Te.x-ne||ye.y-b!==Te.y-se){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&ld(x.animationManager,this,y),Hm(this),this.g("points",a,y)}},et.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function Hm(a){a.Nb.count===0?a.fd=!1:(a.fd=!0,a.cq=null,a.vt=NaN,a.defaultFromPoint=a.i(0),a.defaultToPoint=a.i(a.pointsCount-1),Xm(a,!1))}et.bb=function(){if(!this.suspendsRouting){var a=this.diagram;if(a){if(a.As.contains(this)||a.undoManager.isUndoingRedoing||(a=a.animationManager,a.isTicking&&!a.isAnimating))return;this.Tg===null||a.isTicking||(this.Tg=null)}a=this.path,a!==null&&(this.fd=!1,this.v(),a.v())}},et.vg=function(){if(!this.fd&&!this.computingPoints){var a=!0;try{this.computingPoints=!0,this.uh(),a=this.computePoints()}catch(y){this.computingPoints=!1,this.rv()}finally{this.computingPoints=!1,a?this.zf():this.rv()}}},Tn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(If||(If=new Rn,If.desiredSize=nr,If.Va()),this.defaultFromPoint&&(If.location=this.defaultFromPoint,If.Va(),y=a=If)):y=this.fromPort,y!==null&&!a.isVisible()){var x=a.findVisibleNode();x!==null&&x!==a?(a=x,y=x.port):a=x}if(this.Lw=a,a===null||!a.location.w())return!1;for(;!(y===null||y.actualBounds.w()&&y.Ed());)y=y.panel;if(y===null)return!1;var b=this.toNode,E=null;if(b===null?(Rf||(Rf=new Rn,Rf.desiredSize=nr,Rf.Va()),this.defaultToPoint&&(Rf.location=this.defaultToPoint,Rf.Va(),E=b=Rf)):E=this.toPort,E===null||b.isVisible()||(x=b.findVisibleNode(),x!==null&&x!==b?(b=x,E=x.port):b=x),this.Mw=b,b===null||!b.location.w())return!1;for(;!(E===null||E.actualBounds.w()&&E.Ed());)E=E.panel;if(E===null)return!1;var te=this.pointsCount,ne=this.computeSpot(!0,y);x=this.computeSpot(!1,E);var se=Id(ne),he=Id(x),pe=y===E&&y!==null,ye=this.isOrthogonal,Te=this.curve===Rs;this.Wf=pe&&!ye?Te=!0:!1;var ze=this.computeAdjusting()===Ja||pe;if(!ye&&!pe&&se&&he){if(se=!1,!ze&&3<=te&&(ze=this.getLinkPoint(a,y,ne,!0,!1,b,E),he=this.getLinkPoint(b,E,x,!1,!1,a,y),se=this.adjustPoints(0,ze,te-1,he))&&(ze=this.getLinkPoint(a,y,ne,!0,!1,b,E),he=this.getLinkPoint(b,E,x,!1,!1,a,y),this.adjustPoints(0,ze,te-1,he)),!se)if(this.Fj(),Te){te=this.getLinkPoint(a,y,ne,!0,!1,b,E),ze=this.getLinkPoint(b,E,x,!1,!1,a,y),se=ze.x-te.x,he=ze.y-te.y,pe=this.computeCurviness(),Te=ye=0;var Ze=te.x+se/3,$e=te.y+he/3,it=Ze,Tt=$e;Gt.B(he,0)?Tt=0<se?Tt-pe:Tt+pe:(ye=-se/he,Te=Math.sqrt(pe*pe/(ye*ye+1)),0>pe&&(Te=-Te),it=(0>he?-1:1)*Te+Ze,Tt=ye*(it-Ze)+$e),Ze=te.x+2*se/3,$e=te.y+2*he/3;var bt=Ze,Nt=$e;Gt.B(he,0)?Nt=0<se?Nt-pe:Nt+pe:(bt=(0>he?-1:1)*Te+Ze,Nt=ye*(bt-Ze)+$e),this.Fj(),this.ne(te),this.yf(it,Tt),this.yf(bt,Nt),this.ne(ze),this.dd(0,this.getLinkPoint(a,y,ne,!0,!1,b,E)),this.dd(3,this.getLinkPoint(b,E,x,!1,!1,a,y))}else te=b,ze=E,b=this.getLinkPoint(a,y,ne,!0,!1,te,ze),E=this.getLinkPoint(te,ze,x,!1,!1,a,y),this.hasCurviness()?(ze=E.x-b.x,x=E.y-b.y,ne=this.computeCurviness(),a=b.x+ze/2,y=b.y+x/2,te=a,se=y,Gt.B(x,0)?se=0<ze?se-ne:se+ne:(ze=-ze/x,te=Math.sqrt(ne*ne/(ze*ze+1)),0>ne&&(te=-te),te=(0>x?-1:1)*te+a,se=ze*(te-a)+y),this.ne(b),this.yf(te,se),this.ne(E)):(this.ne(b),this.ne(E),se=Yt.alloc(),y.mi(se),he=se.ca(E),ze.mi(se),pe=se.ca(b),(he||pe)&&(ne=y.ga(Vm(ne),new lt),this.dd(0,this.getLinkPointFromPoint(a,y,ne,E,!0,ne)),x=ze.ga(Vm(x),new lt),this.dd(1,this.getLinkPointFromPoint(te,ze,x,b,!1,x))),Yt.free(se))}else{Te=this.isAvoiding,ze&&(ye&&Te||pe)&&this.Fj();var jt=pe?this.computeCurviness():0;Te=this.getLinkPoint(a,y,ne,!0,ye,b,E),Ze=it=$e=0,(ye||!se||pe)&&(Tt=this.computeEndSegmentLength(a,y,ne,!0),Ze=this.getLinkDirection(a,y,Te,ne,!0,ye,b,E),pe&&(se||ne.D(x)||!ye&&ne.x+x.x===1&&ne.y+x.y===1)&&(Ze-=ye?90:30,0>jt&&(Ze-=180)),0>Ze?Ze+=360:360<=Ze&&(Ze-=360),pe&&(Tt+=Math.abs(jt)*(ye?1:2)),Ze===0?$e=Tt:Ze===90?it=Tt:Ze===180?$e=-Tt:Ze===270?it=-Tt:($e=Tt*Math.cos(Ze*Math.PI/180),it=Tt*Math.sin(Ze*Math.PI/180)),ne.Mc()&&pe&&(Tt=y.ga(ti,lt.alloc()),bt=lt.allocAt(Tt.x+1e3*$e,Tt.y+1e3*it),this.getLinkPointFromPoint(a,y,Tt,bt,!0,Te),lt.free(Tt),lt.free(bt))),Tt=this.getLinkPoint(b,E,x,!1,ye,a,y);var Bt=Nt=bt=0;if(ye||!he||pe){var _t=this.computeEndSegmentLength(b,E,x,!1);Bt=this.getLinkDirection(b,E,Tt,x,!1,ye,a,y),pe&&(he||ne.D(x)||!ye&&ne.x+x.x===1&&ne.y+x.y===1)&&(Bt+=ye?0:30,0>jt&&(Bt+=180)),0>Bt?Bt+=360:360<=Bt&&(Bt-=360),pe&&(_t+=Math.abs(jt)*(ye?1:2)),Bt===0?bt=_t:Bt===90?Nt=_t:Bt===180?bt=-_t:Bt===270?Nt=-_t:(bt=_t*Math.cos(Bt*Math.PI/180),Nt=_t*Math.sin(Bt*Math.PI/180)),x.Mc()&&pe&&(x=E.ga(ti,lt.alloc()),ne=lt.allocAt(x.x+1e3*bt,x.y+1e3*Nt),this.getLinkPointFromPoint(b,E,x,ne,!1,Tt),lt.free(x),lt.free(ne))}x=Te,(ye||!se||pe)&&(x=new lt(Te.x+$e,Te.y+it)),ne=Tt,(ye||!he||pe)&&(ne=new lt(Tt.x+bt,Tt.y+Nt)),!ze&&!ye&&se&&3<te&&this.adjustPoints(0,Te,te-2,ne)?this.dd(te-1,Tt):!ze&&!ye&&he&&3<te&&this.adjustPoints(1,x,te-1,Tt)?this.dd(0,Te):!ze&&(ye?6<=te:4<te)&&this.adjustPoints(1,x,te-2,ne)?(this.dd(0,Te),this.dd(te-1,Tt)):(this.Fj(),this.ne(Te),(ye||!se||pe)&&this.ne(x),ye&&this.addOrthoPoints(x,Ze,ne,Bt,a,b),(ye||!he||pe)&&this.ne(ne),this.ne(Tt))}return!0};function Zv(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}Tn.prototype.getLinkPointFromPoint=function(a,y,x,b,E,te){if(te===void 0&&(te=new lt),a===null||y===null)return te.assign(x),te;if(a.isVisible()||(E=a.findVisibleNode(),E!==null&&E!==a&&(y=E.port)),a=null,E=y.panel,E===null||E.se()||(E=E.panel),E===null){E=b.x,b=b.y;var ne=x.x;x=x.y}else{a=E.oe,E=1/(a.m11*a.m22-a.m12*a.m21),ne=a.m22*E;var se=-a.m12*E,he=-a.m21*E,pe=a.m11*E,ye=E*(a.m21*a.dy-a.m22*a.dx),Te=E*(a.m12*a.dx-a.m11*a.dy);E=b.x*ne+b.y*he+ye,b=b.x*se+b.y*pe+Te,ne=x.x*ne+x.y*he+ye,x=x.x*se+x.y*pe+Te}return y.Sj(E,b,ne,x,te),a!==null&&te.transform(a),te};function Km(a,y){var x=y.Zn;return x===null&&(x=new _f,x.port=y,x.node=y.part,y.Zn=x),lS(x,a)}Tn.prototype.getLinkPoint=function(a,y,x,b,E,te,ne,se){if(se===void 0&&(se=new lt),x.sb()&&!Id(x))return y.ga(x,se),se;if(x.$c()){var he=Km(this,y);if(he!==null){if(se.assign(he.Zo),E&&this.routing===nS){var pe=Km(this,ne);if(pe!==null&&he.Gl<pe.Gl){he=lt.alloc(),pe=lt.alloc();var ye=new Yt(y.ga(wi,he),y.ga(io,pe)),Te=this.computeSpot(!b,ne);a=this.getLinkPoint(te,ne,Te,!b,E,a,y,pe),(x.Hf(is)||x.Hf(fo))&&a.y>=ye.y&&a.y<=ye.y+ye.height?se.y=a.y:(x.Hf(ba)||x.Hf(os))&&a.x>=ye.x&&a.x<=ye.x+ye.width&&(se.x=a.x),lt.free(he),lt.free(pe)}}return se}}return x=y.ga(Vm(x),lt.alloc()),this.pointsCount>(E?6:2)?(ne=b?this.i(1):this.i(this.pointsCount-2),E&&(ne=Zv(x,ne.copy()))):(he=this.computeSpot(!b,ne),te=lt.alloc(),ne=ne.ga(Vm(he),te),E&&(ne=Zv(x,ne)),lt.free(te)),this.getLinkPointFromPoint(a,y,x,ne,b,se),lt.free(x),se},Tn.prototype.getLinkDirection=function(a,y,x,b,E,te,ne,se){e:if(b.sb())var he=b.x>b.y?b.x>1-b.y?0:b.x<1-b.y?270:315:b.x<b.y?b.x>1-b.y?90:b.x<1-b.y?180:135:.5>b.x?225:.5<b.x?45:0;else{if(b.$c()&&(he=Km(this,y),he!==null))switch(he.Nc){case 1:he=270;break e;case 2:he=180;break e;default:case 4:he=0;break e;case 8:he=90;break e}he=y.ga(ti,lt.alloc()),this.pointsCount>(te?6:2)?(se=E?this.i(1):this.i(this.pointsCount-2),se=te?Zv(he,se.copy()):x):(x=lt.alloc(),se=se.ga(ti,x),lt.free(x)),x=Math.abs(se.x-he.x)>Math.abs(se.y-he.y)?se.x>=he.x?0:180:se.y>=he.y?90:270,lt.free(he),he=x}return b.Mc()&&ne.Td(a)&&(he+=180,360<=he&&(he-=360)),Id(b)||(a=y.li(),a===0)||(45<=a&&135>a?he+=90:135<=a&&225>a?he+=180:225<=a&&315>a&&(he+=270),360<=he&&(he-=360)),he},Tn.prototype.computeEndSegmentLength=function(a,y,x,b){return y!==null&&x.$c()&&(a=Km(this,y),a!==null)?a.Ju:(a=b?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=b?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},Tn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=ti:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Vo?zr:y)):(a=y||this.toPort,a===null?a=ti:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Vo?zr:y)),a};function Id(a){return a===zr||a.x===.5&&a.y===.5}function Vm(a){return a.x===.5&&a.y===.5?a:ti}Tn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Ja&&4<this.pointsCount?this.computeMidPoint(new lt):(a=y.Zn,a=a!==null?lS(a,this):null,a!==null?a.Zo:y.ga(ti))},Tn.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},Tn.prototype.Cf=function(a,y,x,b,E,te){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var ne=te;if(te===void 0&&(ne=Mr.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return vv(this,y,x,E),te===void 0&&Mr.free(ne),!0;if(this.Yc(a,ne)){var se=!1;if(!this.isAtomic)for(var he=this.O.s,pe=he.length;pe--;){var ye=he[pe];if(ye.visible||ye===this.locationObject){var Te=ye.actualBounds,ze=this.naturalBounds;if(!(Te.x>ze.width||Te.y>ze.height||0>Te.x+Te.width||0>Te.y+Te.height)){if(Te=Mr.alloc(),Te.set(ne),ye instanceof Cn)se=ye.Cf(a,y,x,b,E,Te);else if(this.path===ye){if(ye instanceof Ir)if(se=a,ze=b,ye.pickable===!1)se=!1;else if(Te.multiply(ye.transform),ze)e:{var Ze=se,$e=Te;if(ye.fh(Ze,$e))se=!0;else{if($e===void 0&&($e=ye.transform,Ze.Re(ye.actualBounds))){se=!0;break e}se=Ze.left,ze=Ze.right;var it=Ze.top;Ze=Ze.bottom;var Tt=lt.alloc(),bt=lt.alloc(),Nt=lt.alloc(),jt=Mr.alloc();jt.set($e),jt.bv(ye.transform),jt.Vj(),bt.x=ze,bt.y=it,bt.transform(jt),Tt.x=se,Tt.y=it,Tt.transform(jt),$e=!1,Yc(ye,Tt,bt,Nt)?$e=!0:(Tt.x=ze,Tt.y=Ze,Tt.transform(jt),Yc(ye,Tt,bt,Nt)?$e=!0:(bt.x=se,bt.y=Ze,bt.transform(jt),Yc(ye,Tt,bt,Nt)?$e=!0:(Tt.x=se,Tt.y=it,Tt.transform(jt),Yc(ye,Tt,bt,Nt)&&($e=!0)))),Mr.free(jt),lt.free(Tt),lt.free(bt),lt.free(Nt),se=$e}}else se=ye.fh(se,Te)}else se=Xo(ye,a,b,Te);se&&(ze=ye,y!==null&&(ze=y(ye)),ze&&(x===null||x(ze))&&E.add(ze)),Mr.free(Te)}}}return te===void 0&&Mr.free(ne),se||this.background!==null||this.areaBackground!==null}return te===void 0&&Mr.free(ne),!1},Tn.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?Rs:this.curve},Tn.prototype.computeCorner=function(){if(this.curve===Rs)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Tn.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];if(E!==a&&!E.isPanelMain&&(E.segmentIndex===-1/0||isNaN(E.segmentIndex)))return E}for(a=this.labelNodes;a.next();)if(y=a.value,y.segmentIndex===-1/0||isNaN(y.segmentIndex))return y;return null},Tn.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=iS;a=Math.max(a,this.computeThickness());var y=this.fromPort,x=this.toPort;if(y!==null&&x!==null){var b=this.findMidLabel();if(b!==null){var E=b.naturalBounds,te=b.margin,ne=isNaN(E.width)?30:E.width*b.scale+te.left+te.right;E=isNaN(E.height)?14:E.height*b.scale+te.top+te.bottom,b=b.segmentOrientation,b===ng||b===Jm||b===Qv?a=Math.max(a,E):b===ig||b===ag||b===rg||b===og?a=Math.max(a,ne):(y=y.ga(ti).ab(x.ga(ti))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*ne)+Math.abs(Math.cos(y)*E)+1)),this.curve===Rs&&(a*=1.333)}}return a},Tn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Ja&&x.bb()}},Tn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=rS;var y=this.Sf;if(y!==null){for(var x=$n(),b=0,E=y.links,te=0;te<E.length;te++){var ne=E[te].computeSpacing();x.push(ne),b+=ne}for(b=-b/2,te=0;te<E.length;te++){if(E[te]===this){a=b+x[te]/2;break}b+=x[te]}y.Ds===this.fromNode&&(a=-a),Wn(x)}}return a},Tn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Tn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Tn.prototype.adjustPoints=function(a,y,x,b){var E=this.computeAdjusting();if(this.isOrthogonal){if(E===Ym)return!1;E===$m&&(E=tg)}switch(E){case Ym:var te=this.i(a),ne=this.i(x);if(!te.Xa(y)||!ne.Xa(b)){E=te.x,te=te.y;var se=ne.x-E,he=ne.y-te,pe=Math.sqrt(se*se+he*he);if(!Gt.$(pe,0)){if(Gt.$(se,0))var ye=0>he?-Math.PI/2:Math.PI/2;else ye=Math.atan(he/Math.abs(se)),0>se&&(ye=Math.PI-ye);ne=y.x;var Te=y.y;se=b.x-ne;var ze=b.y-Te;for(he=Math.sqrt(se*se+ze*ze),Gt.$(se,0)?ze=0>ze?-Math.PI/2:Math.PI/2:(ze=Math.atan(ze/Math.abs(se)),0>se&&(ze=Math.PI-ze)),pe=he/pe,ye=ze-ye,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),se=y.x-E,he=y.y-te,y=Math.sqrt(se*se+he*he),Gt.$(y,0)||(Gt.$(se,0)?he=0>he?-Math.PI/2:Math.PI/2:(he=Math.atan(he/Math.abs(se)),0>se&&(he=Math.PI-he)),se=he+ye,y*=pe,this.L(a,ne+y*Math.cos(se),Te+y*Math.sin(se)));this.dd(x,b)}}return!0;case $m:if(te=this.i(a),Te=this.i(x),!te.Xa(y)||!Te.Xa(b)){E=te.x,te=te.y,ne=Te.x,Te=Te.y,pe=(ne-E)*(ne-E)+(Te-te)*(Te-te),se=y.x,ye=y.y,he=b.x,ze=b.y;var Ze=1;if(he-se!==0){var $e=(ze-ye)/(he-se);Ze=Math.sqrt(1+1/($e*$e))}else $e=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var it=y.x,Tt=y.y,bt=.5;pe!==0&&(bt=((E-it)*(E-ne)+(te-Tt)*(te-Te))/pe);var Nt=E+bt*(ne-E),jt=te+bt*(Te-te);y=Math.sqrt((it-Nt)*(it-Nt)+(Tt-jt)*(Tt-jt)),Tt<$e*(it-Nt)+jt&&(y=-y),0<$e&&(y=-y),it=se+bt*(he-se),bt=ye+bt*(ze-ye),$e!==0?(y=it+y/Ze,this.L(a,y,bt-(y-it)/$e)):this.L(a,it,bt+y)}this.dd(x,b)}return!0;case tg:e:{if(this.isOrthogonal&&(E=this.i(a),te=this.i(a+1),ne=this.i(a+2),se=te.x,ye=te.y,Te=se,pe=ye,Gt.B(E.y,te.y)?Gt.B(te.x,ne.x)?ye=y.y:Gt.B(te.y,ne.y)&&(se=y.x):Gt.B(E.x,te.x)&&(Gt.B(te.y,ne.y)?se=y.x:Gt.B(te.x,ne.x)&&(ye=y.y)),this.L(a+1,se,ye),E=this.i(x),te=this.i(x-1),ne=this.i(x-2),se=te.x,ye=te.y,he=se,ze=ye,Gt.B(E.y,te.y)?Gt.B(te.x,ne.x)?ye=b.y:Gt.B(te.y,ne.y)&&(se=b.x):Gt.B(E.x,te.x)&&(Gt.B(te.y,ne.y)?se=b.x:Gt.B(te.x,ne.x)&&(ye=b.y)),this.L(x-1,se,ye),Xv(this))){this.L(a+1,Te,pe),this.L(x-1,he,ze),x=!1;break e}this.dd(a,y),this.dd(x,b),x=!0}return x;default:return!1}},Tn.prototype.addOrthoPoints=function(a,y,x,b,E,te){0>y?y+=360:360<=y&&(y-=360),0>b?b+=360:360<=b&&(b-=360);var ne=b;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,b=315<=b||45>b?0:45<=b&&135>b?90:135<=b&&225>b?180:270;var se=E.actualBounds.copy(),he=te.actualBounds.copy();if(se.w()&&he.w()){se.Bc(sg,sg),he.Bc(sg,sg),se.Ye(a),he.Ye(x);var pe=lt.alloc(),ye=lt.alloc();y===0?x.x>a.x||b===270&&x.y<a.y&&he.right>a.x||b===90&&x.y>a.y&&he.right>a.x?(pe.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),b===180?(pe.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ye.x=pe.x,ye.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(pe.x=a.x<he.left?this.computeMidOrthoPosition(a.x,a.y,he.left,x.y,!1):a.x<he.right&&(b===270&&a.y<he.top||b===90&&a.y>he.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):he.right,ye.x=pe.x,ye.y=x.y):b===0&&a.x<he.left&&a.y>he.top&&a.y<he.bottom&&(pe.x=a.x,pe.y=a.y<x.y?Math.min(x.y,he.top):Math.max(x.y,he.bottom),ye.y=pe.y)):(pe.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),(b===180||b===90&&x.y<se.top||b===270&&x.y>se.bottom)&&(b===180&&(he.ca(a)||se.ca(x))?pe.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===180||b===90)?pe.y=this.computeMidOrthoPosition(a.x,se.top,x.x,Math.max(x.y,he.bottom),!0):x.y>a.y&&(b===180||b===270)&&(pe.y=this.computeMidOrthoPosition(a.x,se.bottom,x.x,Math.min(x.y,he.top),!0)),ye.x=x.x,ye.y=pe.y),pe.y>se.top&&pe.y<se.bottom&&(x.x>=se.left&&x.x<=a.x||a.x<=he.right&&a.x>=x.x?(b===90||b===270)&&(pe.h(Math.max((a.x+x.x)/2,a.x),a.y),ye.h(pe.x,x.y)):(pe.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===0?se.top:Math.min(se.top,he.top)):Math.max(x.y,b===0?se.bottom:Math.max(se.bottom,he.bottom)),ye.x=x.x,ye.y=pe.y))):y===180?x.x<a.x||b===270&&x.y<a.y&&he.left<a.x||b===90&&x.y>a.y&&he.left<a.x?(pe.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),b===0?(pe.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ye.x=pe.x,ye.y=x.y):b===270&&x.y<a.y||b===90&&x.y>a.y?(pe.x=a.x>he.right?this.computeMidOrthoPosition(a.x,a.y,he.right,x.y,!1):a.x>he.left&&(b===270&&a.y<he.top||b===90&&a.y>he.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):he.left,ye.x=pe.x,ye.y=x.y):b===180&&a.x>he.right&&a.y>he.top&&a.y<he.bottom&&(pe.x=a.x,pe.y=a.y<x.y?Math.min(x.y,he.top):Math.max(x.y,he.bottom),ye.y=pe.y)):(pe.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),(b===0||b===90&&x.y<se.top||b===270&&x.y>se.bottom)&&(b===0&&(he.ca(a)||se.ca(x))?pe.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(b===0||b===90)?pe.y=this.computeMidOrthoPosition(a.x,se.top,x.x,Math.max(x.y,he.bottom),!0):x.y>a.y&&(b===0||b===270)&&(pe.y=this.computeMidOrthoPosition(a.x,se.bottom,x.x,Math.min(x.y,he.top),!0)),ye.x=x.x,ye.y=pe.y),pe.y>se.top&&pe.y<se.bottom&&(x.x<=se.right&&x.x>=a.x||a.x>=he.left&&a.x<=x.x?(b===90||b===270)&&(pe.h(Math.min((a.x+x.x)/2,a.x),a.y),ye.h(pe.x,x.y)):(pe.y=b===270||(b===0||b===180)&&x.y<a.y?Math.min(x.y,b===180?se.top:Math.min(se.top,he.top)):Math.max(x.y,b===180?se.bottom:Math.max(se.bottom,he.bottom)),ye.x=x.x,ye.y=pe.y))):y===90?x.y>a.y||b===180&&x.x<a.x&&he.bottom>a.y||b===0&&x.x>a.x&&he.bottom>a.y?(pe.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),b===270?(pe.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ye.x=x.x,ye.y=pe.y):b===180&&x.x<a.x||b===0&&x.x>a.x?(pe.y=a.y<he.top?this.computeMidOrthoPosition(a.x,a.y,x.x,he.top,!0):a.y<he.bottom&&(b===180&&a.x<he.left||b===0&&a.x>he.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):he.bottom,ye.x=x.x,ye.y=pe.y):b===90&&a.y<he.top&&a.x>he.left&&a.x<he.right&&(pe.x=a.x<x.x?Math.min(x.x,he.left):Math.max(x.x,he.right),pe.y=a.y,ye.x=pe.x)):(pe.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),(b===270||b===0&&x.x<se.left||b===180&&x.x>se.right)&&(b===270&&(he.ca(a)||se.ca(x))?pe.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===270||b===0)?pe.x=this.computeMidOrthoPosition(se.left,a.y,Math.max(x.x,he.right),x.y,!1):x.x>a.x&&(b===270||b===180)&&(pe.x=this.computeMidOrthoPosition(se.right,a.y,Math.min(x.x,he.left),x.y,!1)),ye.x=pe.x,ye.y=x.y),pe.x>se.left&&pe.x<se.right&&(x.y>=se.top&&x.y<=a.y||a.y<=he.bottom&&a.y>=x.y?(b===0||b===180)&&(pe.h(a.x,Math.max((a.y+x.y)/2,a.y)),ye.h(x.x,pe.y)):(pe.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===90?se.left:Math.min(se.left,he.left)):Math.max(x.x,b===90?se.right:Math.max(se.right,he.right)),ye.x=pe.x,ye.y=x.y))):x.y<a.y||b===180&&x.x<a.x&&he.top<a.y||b===0&&x.x>a.x&&he.top<a.y?(pe.h(a.x,x.y),ye.h((a.x+x.x)/2,x.y),b===90?(pe.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ye.x=x.x,ye.y=pe.y):b===180&&x.x<a.x||b===0&&x.x>=a.x?(pe.y=a.y>he.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,he.bottom,!0):a.y>he.top&&(b===180&&a.x<he.left||b===0&&a.x>he.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):he.top,ye.x=x.x,ye.y=pe.y):b===270&&a.y>he.bottom&&a.x>he.left&&a.x<he.right&&(pe.x=a.x<x.x?Math.min(x.x,he.left):Math.max(x.x,he.right),pe.y=a.y,ye.x=pe.x)):(pe.h(x.x,a.y),ye.h(x.x,(a.y+x.y)/2),(b===90||b===0&&x.x<se.left||b===180&&x.x>se.right)&&(b===90&&(he.ca(a)||se.ca(x))?pe.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(b===90||b===0)?pe.x=this.computeMidOrthoPosition(se.left,a.y,Math.max(x.x,he.right),x.y,!1):x.x>a.x&&(b===90||b===180)&&(pe.x=this.computeMidOrthoPosition(se.right,a.y,Math.min(x.x,he.left),x.y,!1)),ye.x=pe.x,ye.y=x.y),pe.x>se.left&&pe.x<se.right&&(x.y<=se.bottom&&x.y>=a.y||a.y>=he.top&&a.y<=x.y?(b===0||b===180)&&(pe.h(a.x,Math.min((a.y+x.y)/2,a.y)),ye.h(x.x,pe.y)):(pe.x=b===180||(b===90||b===270)&&x.x<a.x?Math.min(x.x,b===270?se.left:Math.min(se.left,he.left)):Math.max(x.x,b===270?se.right:Math.max(se.right,he.right)),ye.x=pe.x,ye.y=x.y)));var Te=x;if(this.isAvoiding){var ze=this.diagram;if(ze===null||E===te||this.layer.isTemporary||!vd(ze)||se.ca(Te)&&!te.Td(E)||he.ca(a)&&!E.Td(te))y=!1;else{var Ze=yd(ze,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Ze.Yj(Math.min(a.x,pe.x),Math.min(a.y,pe.y),Math.abs(a.x-pe.x),Math.abs(a.y-pe.y))&&Ze.Yj(Math.min(pe.x,ye.x),Math.min(pe.y,ye.y),Math.abs(pe.x-ye.x),Math.abs(pe.y-ye.y))&&Ze.Yj(Math.min(ye.x,Te.x),Math.min(ye.y,Te.y),Math.abs(ye.x-Te.x),Math.abs(ye.y-Te.y)))y=!1;else{E=a,te=Te;var $e=x=null;if(ze.isVirtualized){ze=Ze.bounds.copy(),ze.Bc(-Ze.Ho,-Ze.Go);var it=lt.alloc();_d(Ze,a.x,a.y)||(Gt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,a.x,a.y,pe.x,pe.y,it)?(x=a=it.copy(),y=it.ab(pe)):Gt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,pe.x,pe.y,ye.x,ye.y,it)?(x=a=it.copy(),y=it.ab(ye)):Gt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,ye.x,ye.y,Te.x,Te.y,it)&&(x=a=it.copy(),y=it.ab(Te))),_d(Ze,Te.x,Te.y)||(Gt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,Te.x,Te.y,ye.x,ye.y,it)?($e=Te=it.copy(),b=ye.ab(it)):Gt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,ye.x,ye.y,pe.x,pe.y,it)?($e=Te=it.copy(),b=pe.ab(it)):Gt.Ff(ze.x,ze.y,ze.x+ze.width,ze.y+ze.height,pe.x,pe.y,a.x,a.y,it)&&($e=Te=it.copy(),b=a.ab(it))),lt.free(it)}se=se.copy().ed(he),se.Bc(Ze.Ho*Ze.Os,Ze.Go*Ze.Os),aS(Ze,a,y,Te,b,se,!0),he=Su(Ze,Te.x,Te.y),!Ze.abort&&he>=zd&&(oS(Ze),se.Bc(Ze.Ho*Ze.Hx,Ze.Go*Ze.Ix),aS(Ze,a,y,Te,b,se,!1),he=Su(Ze,Te.x,Te.y)),!Ze.abort&&he<zd&&Su(Ze,Te.x,Te.y)!==kh?(Yv(this,Ze,Te.x,Te.y,b,!0,ne),se=this.i(2),4>this.pointsCount?(y===0||y===180?(se.x=a.x,se.y=Te.y):(se.x=Te.x,se.y=a.y),this.L(2,se.x,se.y),this.m(3,se.x,se.y)):(ne=this.i(3),y===0||y===180?Gt.B(se.x,ne.x)?(se=y===0?Math.max(se.x,a.x):Math.min(se.x,a.x),this.L(2,se,a.y),this.L(3,se,ne.y)):Gt.B(se.y,ne.y)?(Math.abs(a.y-se.y)<=Ze.Go/2&&(this.L(2,se.x,a.y),this.L(3,ne.x,a.y)),this.m(2,se.x,a.y)):this.L(2,a.x,se.y):(y===90||y===270)&&(Gt.B(se.y,ne.y)?(se=y===90?Math.max(se.y,a.y):Math.min(se.y,a.y),this.L(2,a.x,se),this.L(3,ne.x,se)):Gt.B(se.x,ne.x)?(Math.abs(a.x-se.x)<=Ze.Ho/2&&(this.L(2,a.x,se.y),this.L(3,a.x,ne.y)),this.m(2,a.x,se.y)):this.L(2,se.x,a.y))),x!==null&&(a=this.i(1),ne=this.i(2),a.x!==ne.x&&a.y!==ne.y?y===0||y===180?this.m(2,a.x,ne.y):this.m(2,ne.x,a.y):y===0||y===180?this.m(2,E.x,x.y):this.m(2,x.x,E.y)),$e!==null&&(b===0||b===180?this.yf(te.x,$e.y):this.yf($e.x,te.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(pe.copy()),this.ne(ye.copy())),lt.free(pe),lt.free(ye)}},Tn.prototype.computeMidOrthoPosition=function(a,y,x,b,E){var te=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(te=this.computeCurviness()),E?(y+b)/2+te:(a+x)/2+te};function Xv(a){if(a.diagram===null||!a.isAvoiding||!vd(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=yd(a.diagram,!0,a.containingGroup,null);for(var b=1;b<x-2;b++){var E=y[b],te=y[b+1];if(!a.Yj(Math.min(E.x,te.x),Math.min(E.y,te.y),Math.abs(E.x-te.x),Math.abs(E.y-te.y)))return!0}return!1}function Yv(a,y,x,b,E,te,ne){var se=y.Ho,he=y.Go,pe=Su(y,x,b),ye=x,Te=b;for(E===0?ye+=se:E===90?Te+=he:E===180?ye-=se:Te-=he,E!==ne&&pe>Qc&&Su(y,ye,Te)!==pe-1&&(Su(y,x-se,b)===pe-1?(E=180,ye=x-se,Te=b):Su(y,x+se,b)===pe-1?(E=0,ye=x+se,Te=b):Su(y,x,b-he)===pe-1?(E=270,ye=x,Te=b-he):Su(y,x,b+he)===pe-1&&(E=90,ye=x,Te=b+he));pe>Qc&&Su(y,ye,Te)===pe-1;)x=ye,b=Te,E===0?ye+=se:E===90?Te+=he:E===180?ye-=se:Te-=he,--pe;te?pe>Qc&&(E===180||E===0?x=Math.floor(x/se)*se+se/2:(E===90||E===270)&&(b=Math.floor(b/he)*he+he/2)):(x=Math.floor(x/se)*se+se/2,b=Math.floor(b/he)*he+he/2),pe>Qc&&(te=E,ne=x,ye=b,E===0?(te=90,ye+=he):E===90?(te=180,ne-=se):E===180?(te=270,ye-=he):E===270&&(te=0,ne+=se),Su(y,ne,ye)===pe-1?Yv(a,y,ne,ye,te,!1,te):(ne=x,ye=b,E===0?(te=270,ye-=he):E===90?(te=0,ne+=se):E===180?(te=90,ye+=he):E===270&&(te=180,ne-=se),Su(y,ne,ye)===pe-1&&Yv(a,y,ne,ye,te,!1,te))),a.yf(x,b)}Tn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),b=this.i(1),E=In(y,a,x.x,x.y,b.x,b.y),te=0,ne=1;ne<this.pointsCount-1;ne++){x=this.i(ne+1);var se=In(y,a,b.x,b.y,x.x,x.y);b=x,se<E&&(te=ne,E=se)}return te},Tn.prototype.qc=function(){this.lk=!1,this.v()},Tn.prototype.Ul=function(a){if(!(!a&&(this.fd===!1||(a=this.Pb(),this.lk&&(a===null||a.geometry!==null))))&&(2>this.pointsCount?this.lk=!0:this.ua=this.makeGeometry(),a=this.path,a!==null)){a.ua=this.ua;for(var y=this.O.s,x=y.length,b=0;b<x;b++){var E=y[b];E!==a&&E.isPanelMain&&E instanceof Ir&&(E.ua=this.ua)}}},Tn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,b=this.diagram;b!==null&&Jc(this)&&b.Eh.contains(this)&&(this.ml.width!==0||this.ml.height!==0)&&(b.animationManager.isAnimating||b.currentTool!==b.toolManager)&&(x=!0);var E=this.i(0).copy(),te=E.copy();b=this.Nb.s;var ne=this.computeCurve();if(ne===Rs&&3<=y&&!Gt.$(this.smoothness,0))if(y===3){var se=this.i(1);b=Math.min(E.x,se.x);var he=Math.min(E.y,se.y);se=this.i(2),b=Math.min(b,se.x),he=Math.min(he,se.y)}else{if(this.isOrthogonal)for(he=0;he<y;he++)se=b[he],te.x=Math.min(se.x,te.x),te.y=Math.min(se.y,te.y);else for(b=3;b<y;b+=3)b+3>=y&&(b=y-1),he=this.i(b),te.x=Math.min(he.x,te.x),te.y=Math.min(he.y,te.y);b=te.x,he=te.y}else{for(he=0;he<y;he++)se=b[he],te.x=Math.min(se.x,te.x),te.y=Math.min(se.y,te.y);b=te.x,he=te.y}if(b-=this.su.x,he-=this.su.y,E.x-=b,E.y-=he,y!==2||Jc(this)){if(a.type=Mn.o,se=A1(a),this.computeShortLength(!0)!==0&&(E=Df(this,E,!0,te)),Dd(se,E.x,E.y,!1),ne===Rs&&3<=y&&!Gt.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-b,x=x.y-he,E=this.i(2).copy(),E.x-=b,E.y-=he,this.computeShortLength(!1)!==0&&(E=Df(this,E,!1,te)),wh(se,y,x,y,x,E.x,E.y);else if(this.isOrthogonal){y=lt.allocAt(b,he),x=lt.alloc(),x.assign(this.i(1)),te=lt.allocAt(b,he),E=lt.allocAt(b,he),ne=this.i(0);for(var pe,ye=this.smoothness/3,Te=1;Te<this.pointsCount-1;Te++){pe=this.i(Te);var ze=ne,Ze=pe,$e=this.i($v(this,pe,Te,!1));if((!Gt.$(ze.x,Ze.x)||!Gt.$(Ze.x,$e.x))&&(!Gt.$(ze.y,Ze.y)||!Gt.$(Ze.y,$e.y))){var it=ye;isNaN(it)&&(it=this.smoothness/3);var Tt=ze.x;ze=ze.y;var bt=Ze.x;Ze=Ze.y;var Nt=$e.x;$e=$e.y;var jt=it*Zm(Tt,ze,bt,Ze);it*=Zm(bt,Ze,Nt,$e),Gt.$(ze,Ze)&&Gt.$(bt,Nt)&&(bt>Tt?$e>Ze?(te.x=bt-jt,te.y=Ze-jt,E.x=bt+it,E.y=Ze+it):(te.x=bt-jt,te.y=Ze+jt,E.x=bt+it,E.y=Ze-it):$e>Ze?(te.x=bt+jt,te.y=Ze-jt,E.x=bt-it,E.y=Ze+it):(te.x=bt+jt,te.y=Ze+jt,E.x=bt-it,E.y=Ze-it)),Gt.$(Tt,bt)&&Gt.$(Ze,$e)&&(Ze>ze?(Nt>bt?(te.x=bt-jt,te.y=Ze-jt,E.x=bt+it):(te.x=bt+jt,te.y=Ze-jt,E.x=bt-it),E.y=Ze+it):(Nt>bt?(te.x=bt-jt,te.y=Ze+jt,E.x=bt+it):(te.x=bt+jt,te.y=Ze+jt,E.x=bt-it),E.y=Ze-it)),(Gt.$(Tt,bt)&&Gt.$(bt,Nt)||Gt.$(ze,Ze)&&Gt.$(Ze,$e))&&(Tt=.5*(Tt+Nt),ze=.5*(ze+$e),te.x=Tt,te.y=ze,E.x=Tt,E.y=ze),(Te===1||Te===2&&Gt.$(ne.x,this.i(0).x)&&Gt.$(ne.y,this.i(0).y))&&(x.x=.5*(ne.x+pe.x),x.y=.5*(ne.y+pe.y)),wh(se,x.x-b,x.y-he,te.x-b,te.y-he,pe.x-b,pe.y-he),y.set(te),x.set(E),ne=pe}}pe=ne.x,ne=ne.y,ye=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ye=Df(this,ye.copy(),!1,Bn)),pe=.5*(pe+ye.x),ne=.5*(ne+ye.y),wh(se,E.x-b,E.y-he,pe-b,ne-he,ye.x-b,ye.y-he),lt.free(y),lt.free(x),lt.free(te),lt.free(E)}else for(x=3;x<y;x+=3)te=this.i(x-2),x+3>=y&&(x=y-1),E=this.i(x-1),ne=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(ne=Df(this,ne.copy(),!1,Bn)),wh(se,te.x-b,te.y-he,E.x-b,E.y-he,ne.x-b,ne.y-he);else{for(te=lt.alloc(),te.assign(this.i(0)),E=lt.alloc(),E.assign(te),ne=this.computeCorner(),Te=1,pe=0;Te<y;){if(Te=$v(this,te,Te,1<Te),ye=this.i(Te),Te>=y-1){if(!te.D(ye))this.computeShortLength(!1)!==0&&(ye=Df(this,ye.copy(),!1,Bn)),Bf(this,se,-b,-he,te,ye,x);else if(pe===0)for(Te=1;Te<y;)E.assign(te),ye=this.i(Te++),Bf(this,se,-b,-he,te,ye,x),te.assign(ye);break}if(pe=$v(this,ye,Te+1,Te<y-3),Te=-b,Tt=-he,ze=ye,bt=this.i(pe),it=x,Gt.B(te.y,ze.y)&&Gt.B(ze.x,bt.x))if($e=Math.min(ne,Math.abs(ze.x-E.x)/2),$e=jt=Math.min($e,Math.abs(bt.y-ze.y)/2),Gt.B($e,0))Bf(this,se,Te,Tt,te,ze,it),te.assign(ze);else{var Bt=ze.x,_t=ze.y;Ze=Bt,Nt=_t,ze.x>te.x?Bt=ze.x-$e:Bt=ze.x+$e,bt.y>ze.y?Nt=ze.y+jt:Nt=ze.y-jt,bt=lt.allocAt(Bt,_t),Bf(this,se,Te,Tt,te,bt,it),lt.free(bt),Im(se,ze.x+Te,ze.y+Tt,Ze+Te,Nt+Tt),te.h(Ze,Nt)}else Gt.B(te.x,ze.x)&&Gt.B(ze.y,bt.y)?($e=Math.min(ne,Math.abs(ze.y-E.y)/2),$e=jt=Math.min($e,Math.abs(bt.x-ze.x)/2),Gt.B(jt,0)?(Bf(this,se,Te,Tt,te,ze,it),te.assign(ze)):(Bt=ze.x,_t=ze.y,Ze=Bt,Nt=_t,ze.y>te.y?_t=ze.y-$e:_t=ze.y+$e,bt.x>ze.x?Ze=ze.x+jt:Ze=ze.x-jt,bt=lt.allocAt(Bt,_t),Bf(this,se,Te,Tt,te,bt,it),lt.free(bt),Im(se,ze.x+Te,ze.y+Tt,Ze+Te,Nt+Tt),te.h(Ze,Nt))):(Bf(this,se,Te,Tt,te,ze,it),te.assign(ze));E.assign(ye),Te=pe}lt.free(te)}Rm=se}else se=this.i(1).copy(),se.x-=b,se.y-=he,this.computeShortLength(!0)!==0&&(E=Df(this,E,!0,te)),this.computeShortLength(!1)!==0&&(se=Df(this,se,!1,te)),a.type=Mn.j,a.startX=E.x,a.startY=E.y,a.endX=se.x,a.endY=se.y;return this.lk=!0,a};function Zm(a,y,x,b){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=b-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),Gt.$(a,0)?y:Gt.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Df(a,y,x,b){var E=a.pointsCount;if(2>E)return y;if(x){var te=a.i(1);if(x=te.x-b.x,te=te.y-b.y,b=Zm(y.x,y.y,x,te),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!0),a>E&&(a=E),E=a*(te-y.y)/b,y.x+=a*(x-y.x)/b,y.y+=E}else{if(te=a.i(E-2),x=te.x-b.x,te=te.y-b.y,b=Zm(y.x,y.y,x,te),b===0)return y;E=E===2?.5*b:b,a=a.computeShortLength(!1),a>E&&(a=E),E=a*(y.y-te)/b,y.x-=a*(y.x-x)/b,y.y-=E}return y}function $v(a,y,x,b){for(var E=a.pointsCount,te=y;Gt.$(y.x,te.x)&&Gt.$(y.y,te.y);){if(x>=E)return E-1;te=a.i(x++)}if(!Gt.$(y.x,te.x)&&!Gt.$(y.y,te.y))return x-1;for(var ne=te;Gt.$(y.x,te.x)&&Gt.$(te.x,ne.x)&&(!b||(y.y>=te.y?te.y>=ne.y:te.y<=ne.y))||Gt.$(y.y,te.y)&&Gt.$(te.y,ne.y)&&(!b||(y.x>=te.x?te.x>=ne.x:te.x<=ne.x));){if(x>=E)return E-1;ne=a.i(x++)}return x-2}Tn.prototype.computeJumpLength=function(){return 10};function Bf(a,y,x,b,E,te,ne){if(!ne&&Jc(a)){ne=a.computeJumpLength();var se=ne/2,he=[],pe=0;if(a.isVisible()&&(pe=kx(a,E,te,he)),0<pe){if(Gt.B(E.y,te.y))if(E.x<te.x)for(var ye=0;ye<pe;){var Te=Math.max(E.x,Math.min(he[ye++]-se,te.x-ne));y.lineTo(Te+x,te.y+b);for(var ze=Te+x,Ze=Math.min(Te+ne,te.x);ye<pe&&(Te=he[ye],Te<Ze+ne);)ye++,Ze=Math.min(Te+se,te.x);Te=te.y-ne+b,Ze+=x;var $e=te.y+b;a.curve===Eh?Dd(y,Ze,$e,!1):wh(y,ze,Te,Ze,Te,Ze,$e)}else for(--pe;0<=pe;){for(ye=Math.min(E.x,Math.max(he[pe--]+se,te.x+ne)),y.lineTo(ye+x,te.y+b),ze=ye+x,Te=Math.max(ye-ne,te.x);0<=pe&&(ye=he[pe],ye>Te-ne);)pe--,Te=Math.max(ye-se,te.x);ye=te.y-ne+b,Te+=x,Ze=te.y+b,a.curve===Eh?Dd(y,Te,Ze,!1):wh(y,ze,ye,Te,ye,Te,Ze)}else if(Gt.B(E.x,te.x))if(E.y<te.y)for(ye=0;ye<pe;){for(Te=Math.max(E.y,Math.min(he[ye++]-se,te.y-ne)),y.lineTo(te.x+x,Te+b),ze=Te+b,Te=Math.min(Te+ne,te.y);ye<pe&&(Ze=he[ye],Ze<Te+ne);)ye++,Te=Math.min(Ze+se,te.y);Ze=te.x-ne+x,$e=te.x+x,Te+=b,a.curve===Eh?Dd(y,$e,Te,!1):wh(y,Ze,ze,Ze,Te,$e,Te)}else for(--pe;0<=pe;){for(ye=Math.min(E.y,Math.max(he[pe--]+se,te.y+ne)),y.lineTo(te.x+x,ye+b),ze=ye+b,ye=Math.max(ye-ne,te.y);0<=pe&&(Te=he[pe],Te>ye-ne);)pe--,ye=Math.max(Te-se,te.y);Te=te.x-ne+x,Ze=te.x+x,ye+=b,a.curve===Eh?Dd(y,Ze,ye,!1):wh(y,Te,ze,Te,ye,Ze,ye)}}}y.lineTo(te.x+x,te.y+b)}function kx(a,y,x,b){var E=a.diagram;if(E===null||y.D(x))return 0;for(E=E.layers;E.next();){var te=E.value;if(te!==null&&te.visible){te=te.Pa.s;for(var ne=te.length,se=0;se<ne;se++){var he=te[se];if(he instanceof Tn){if(he===a)return 0<b.length&&b.sort(function(ye,Te){return ye-Te}),b.length;if(he.isVisible()&&Jc(he)){var pe=he.routeBounds;pe.w()&&a.routeBounds.Yc(pe)&&!a.usesSamePort(he)&&(pe=he.path,pe!==null&&pe.Ed()&&Tx(y,x,b,he))}}}}}return 0<b.length&&b.sort(function(ye,Te){return ye-Te}),b.length}function Tx(a,y,x,b){for(var E=Gt.B(a.y,y.y),te=b.pointsCount,ne=b.i(0),se=lt.alloc(),he=1;he<te;he++){var pe=b.i(he);if(he<te-1){var ye=b.i(he+1);if(ne.y===pe.y&&pe.y===ye.y){if(pe.x>ne.x&&ye.x>=pe.x||pe.x<ne.x&&ye.x<=pe.x)continue}else if(ne.x===pe.x&&pe.x===ye.x&&(pe.y>ne.y&&ye.y>=pe.y||pe.y<ne.y&&ye.y<=pe.y))continue}e:{ye=a.x;var Te=a.y,ze=y.x,Ze=y.y,$e=ne.x;ne=ne.y;var it=pe.x,Tt=pe.y;if(Gt.B(ye,ze)){if(!Gt.B(Te,Ze)&&Gt.B(ne,Tt)&&Math.min(Te,Ze)<ne&&Math.max(Te,Ze)>ne&&Math.min($e,it)<ye&&Math.max($e,it)>ye&&!Gt.B($e,it)){se.x=ye,se.y=ne,ye=!0;break e}}else if(Gt.B(Te,Ze)&&Gt.B($e,it)&&Math.min(ye,ze)<$e&&Math.max(ye,ze)>$e&&Math.min(ne,Tt)<Te&&Math.max(ne,Tt)>Te&&!Gt.B(ne,Tt)){se.x=$e,se.y=Te,ye=!0;break e}se.x=0,se.y=0,ye=!1}ye&&(E?x.push(se.x):x.push(se.y)),ne=pe}lt.free(se)}function Jc(a){return a=a.curve,a===Rd||a===Eh}function Xm(a,y){(y||Jc(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()))}Tn.prototype.Xo=function(a){var y=this.layer;if(y!==null&&y.visible&&!y.isTemporary){var x=y.diagram;if(x!==null&&!x.animationManager.isTicking){var b=!1;for(x=x.layers;x.next();){var E=x.value;if(E.visible){if(E===y){b=!0;var te=!1;E=E.Pa.s;for(var ne=E.length,se=0;se<ne;se++){var he=E[se];he instanceof Tn&&(he===this?te=!0:te&&tS(this,he,a))}}else if(b)for(te=E.Pa.s,E=te.length,ne=0;ne<E;ne++)se=te[ne],se instanceof Tn&&tS(this,se,a)}}}}};function tS(a,y,x){if(y!==null&&y.lk&&y.fd&&Jc(y)){var b=y.routeBounds;b.w()&&(a.routeBounds.Yc(b)||x.Yc(b))&&(a.usesSamePort(y)||y.qc())}}Tn.prototype.usesSamePort=function(a){var y=this.pointsCount,x=a.pointsCount;if(0<y&&0<x){var b=this.i(0),E=a.i(0);if(b.Xa(E)||(y=this.i(y-1),a=a.i(x-1),y.Xa(a)||b.Xa(a)||y.Xa(E)))return!0}else if(this.fromNode===a.fromNode||this.toNode===a.toNode||this.fromNode===a.toNode||this.toNode===a.fromNode)return!0;return!1},Tn.prototype.isVisible=function(){if(!fr.prototype.isVisible.call(this))return!1;var a=this.containingGroup,y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this.fromNode,x!==null){if(this.isTreeLink&&y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(var b=x;b!==null;){if(b.labeledLink===this)return!0;b=b.containingGroup}if(x=x.findVisibleNode(),x===null||x===a)return!1}if(x=this.toNode,x!==null){if(this.isTreeLink&&!y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(y=x;y!==null;){if(y.labeledLink===this)return!0;y=y.containingGroup}if(y=x.findVisibleNode(),y===null||y===a)return!1}return!0},Tn.prototype.Zb=function(a){if(fr.prototype.Zb.call(this,a),a&&Xm(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},Tn.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?tg:this.qk};function qp(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var b=a.ff,E=a.vf,te=a=null,ne=y.jb.s,se=ne.length,he=0;he<se;he++){var pe=ne[he];(pe.ef===y&&pe.ff===b&&pe.uf===x&&pe.vf===E||pe.ef===x&&pe.ff===E&&pe.uf===y&&pe.vf===b)&&(te===null?te=pe:(a===null&&(a=[],a.push(te)),a.push(pe)))}if(a!==null){for(te=W1(y,x,b,E),te===null&&(te=new qm(y,b,x,E),U1(y,te),U1(x,te)),te.links=a,y=0;y<a.length;y++)a[y].Sf=te;te.Sl()}}}}function eg(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(ur(y.links,a),y.Sl()))}Tn.prototype.ph=function(){return!0},Zt.Object.defineProperties(Tn.prototype,{fromNode:{get:function(){return this.ef},set:function(a){var y=this.ef;if(y!==a){var x=this.fromPort;y!==null&&(this.uf!==y&&Um(y,this,x),eg(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setFromNodeForLink(this,a,y);var E=this.fromPort,te=this.fromPortChanged;if(te!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),te(this,x,E),b!==null&&(b.aa=ne)}a!==null&&(this.uf!==a&&Gm(a,this,E),qp(this),this.C(1)),this.g("fromNode",y,a),Bd(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&Cs(x),eg(this),this.ff=a;var b=this.fromPort;b!==null&&Cs(b);var E=this.diagram;if(E!==null){var te=this.data,ne=E.model;te!==null&&ne.ri()&&ne.xv(te,a)}x!==b&&(this.Wf=null,this.bb(),te=this.fromPortChanged,te!==null&&(ne=!0,E!==null&&(ne=E.aa,E.aa=!0),te(this,x,b),E!==null&&(E.aa=ne))),qp(this),this.g("fromPortId",y,a)}}},fromPort:{get:function(){var a=this.ef;return a===null?null:a.ns(this.ff)}},fromPortChanged:{get:function(){return this.gn},set:function(a){var y=this.gn;y!==a&&(this.gn=a,this.g("fromPortChanged",y,a))}},toNode:{get:function(){return this.uf},set:function(a){var y=this.uf;if(y!==a){var x=this.toPort;y!==null&&(this.ef!==y&&Um(y,this,x),eg(this),this.C(2)),this.uf=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var b=this.diagram;b!==null&&b.aa&&b.partManager.setToNodeForLink(this,a,y);var E=this.toPort,te=this.toPortChanged;if(te!==null){var ne=!0;b!==null&&(ne=b.aa,b.aa=!0),te(this,x,E),b!==null&&(b.aa=ne)}a!==null&&(this.ef!==a&&Gm(a,this,E),qp(this),this.C(1)),this.g("toNode",y,a),Bd(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&Cs(x),eg(this),this.vf=a;var b=this.toPort;b!==null&&Cs(b);var E=this.diagram;if(E!==null){var te=this.data,ne=E.model;te!==null&&ne.ri()&&ne.Cv(te,a)}x!==b&&(this.Wf=null,this.bb(),te=this.toPortChanged,te!==null&&(ne=!0,E!==null&&(ne=E.aa,E.aa=!0),te(this,x,b),E!==null&&(E.aa=ne))),qp(this),this.g("toPortId",y,a)}}},toPort:{get:function(){var a=this.uf;return a===null?null:a.ns(this.vf)}},toPortChanged:{get:function(){return this.uo},set:function(a){var y=this.uo;y!==a&&(this.uo=a,this.g("toPortChanged",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:Vo},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&&Cs(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&&_n(a,">= 0",Tn,"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:Vo},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&&Cs(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&&_n(a,">= 0",Tn,"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?Wr: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&&Qp(this.fromNode),this.toNode!==null&&Qp(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof Ir?a:null}},routeBounds:{get:function(){this.vg();var a=this.ml,y=1/0,x=1/0,b=this.pointsCount;if(b===0)a.h(NaN,NaN,0,0);else{if(b===1)b=this.i(0),y=Math.min(b.x,y),x=Math.min(b.y,x),a.h(b.x,b.y,0,0);else if(b===2){b=this.i(0);var E=this.i(1);y=Math.min(b.x,E.x),x=Math.min(b.y,E.y),a.h(b.x,b.y,0,0),a.Ye(E)}else if(this.computeCurve()===Rs&&3<=b&&!this.isOrthogonal)if(E=this.i(0),y=E.x,x=E.y,a.h(y,x,0,0),b===3){b=this.i(1),y=Math.min(b.x,y),x=Math.min(b.y,x);var te=this.i(2);y=Math.min(te.x,y),x=Math.min(te.y,x),Gt.Dl(E.x,E.y,b.x,b.y,b.x,b.y,te.x,te.y,.5,a)}else for(te=3;te<b;te+=3){var ne=this.i(te-2);te+3>=b&&(te=b-1);var se=this.i(te-1),he=this.i(te);Gt.Dl(E.x,E.y,ne.x,ne.y,se.x,se.y,he.x,he.y,.5,a),y=Math.min(he.x,y),x=Math.min(he.y,x),E=he}else for(E=this.i(0),te=this.i(1),y=Math.min(E.x,te.x),x=Math.min(E.y,te.y),a.h(E.x,E.y,0,0),a.Ye(te),E=2;E<b;E++)te=this.i(E),y=Math.min(te.x,y),x=Math.min(te.y,x),a.Ye(te);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new lt)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||Hm(this);for(var a=this.cq=[],y=this.pointsCount,x=0;x<y-1;x++){var b=this.i(x),E=this.i(x+1);Gt.$(b.x,E.x)?(b=E.y-b.y,0>b&&(b=-b)):Gt.$(b.y,E.y)?(b=E.x-b.x,0>b&&(b=-b)):b=Math.sqrt(b.Bf(E)),a.push(b)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,b=a=0;b<x;b++)a+=y[b];this.vt=a}return a}},points:{get:function(){return this.Nb},set:function(a){var y=this.Nb;if(y!==a){var x=null;if(Array.isArray(a)){var b=a.length%2===0;if(b){for(var E=0;E<a.length;E++)if(typeof a[E]!="number"||isNaN(a[E])){b=!1;break}}if(b)for(x=new yn,b=0;b<a.length/2;b++)E=new lt(a[2*b],a[2*b+1]).freeze(),x.add(E);else{for(b=!0,E=0;E<a.length;E++){var te=a[E];if(!an(te)||typeof te.x!="number"||isNaN(te.x)||typeof te.y!="number"||isNaN(te.y)){b=!1;break}}if(b)for(x=new yn,b=0;b<a.length;b++)E=a[b],x.add(new lt(E.x,E.y).freeze())}}else if(a instanceof yn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Ot("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),Hm(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&ld(a.animationManager,this,x)),this.g("points",y,x)}}},pointsCount:{get:function(){return this.Nb.count}},fd:{get:function(){return(this.Qa&16)!==0},set:function(a){(this.Qa&16)!==0!==a&&(this.Qa^=16)}},suspendsRouting:{get:function(){return(this.Qa&32)!==0},set:function(a){(this.Qa&32)!==0!==a&&(this.Qa^=32)}},computingPoints:{get:function(){return(this.Qa&64)!==0},set:function(a){(this.Qa&64)!==0!==a&&(this.Qa^=64)}},defaultFromPoint:{get:function(){return this.o},set:function(a){this.o=a.copy()}},defaultToPoint:{get:function(){return this.u},set:function(a){this.u=a.copy()}},isOrthogonal:{get:function(){return(this.qj.value&2)===2}},isAvoiding:{get:function(){return(this.qj.value&4)===4}},lk:{get:function(){return(this.Qa&128)!==0},set:function(a){(this.Qa&128)!==0!==a&&(this.Qa^=128)}},geometry:{get:function(){if(!this.lk){if(this.vg(),2>this.pointsCount)return this.lk=!0,this.ua;this.ua=this.makeGeometry()}return this.ua}},firstPickIndex:{get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!Id(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!Id(this.computeSpot(!1))?a-2:a-1}},adjusting:{get:function(){return this.qk},set:function(a){var y=this.qk;y!==a&&(this.qk=a,this.g("adjusting",y,a))}},corner:{get:function(){return this.Om},set:function(a){var y=this.Om;y!==a&&(this.Om=a,this.qc(),this.g("corner",y,a))}},curve:{get:function(){return this.Qm},set:function(a){var y=this.Qm;y!==a&&(this.Qm=a,this.bb(),this.qc(),Xm(this,y===Eh||y===Rd||a===Eh||a===Rd),this.g("curve",y,a))}},curviness:{get:function(){return this.Rm},set:function(a){var y=this.Rm;y!==a&&(this.Rm=a,this.bb(),this.qc(),this.g("curviness",y,a))}},routing:{get:function(){return this.qj},set:function(a){var y=this.qj;y!==a&&(this.qj=a,this.Wf=null,this.bb(),Xm(this,(y.value&2)===2||(a.value&2)===2),this.g("routing",y,a))}},smoothness:{get:function(){return this.po},set:function(a){var y=this.po;y!==a&&(this.po=a,this.qc(),this.g("smoothness",y,a))}},key:{get:function(){var a=this.diagram;if(a!==null&&a.model.ri())return a.model.Ac(this.data)}}}),Tn.prototype.invalidateOtherJumpOvers=Tn.prototype.Xo,Tn.prototype.findClosestSegment=Tn.prototype.ez,Tn.prototype.updateRoute=Tn.prototype.vg,Tn.prototype.invalidateRoute=Tn.prototype.bb,Tn.prototype.rollbackRoute=Tn.prototype.rv,Tn.prototype.commitRoute=Tn.prototype.zf,Tn.prototype.startRoute=Tn.prototype.uh,Tn.prototype.clearPoints=Tn.prototype.Fj,Tn.prototype.removePoint=Tn.prototype.pv,Tn.prototype.addPointAt=Tn.prototype.yf,Tn.prototype.addPoint=Tn.prototype.ne,Tn.prototype.insertPointAt=Tn.prototype.m,Tn.prototype.insertPoint=Tn.prototype.Kz,Tn.prototype.setPointAt=Tn.prototype.L,Tn.prototype.setPoint=Tn.prototype.dd,Tn.prototype.getPoint=Tn.prototype.i,Tn.prototype.getOtherPort=Tn.prototype.Cz,Tn.prototype.getOtherNode=Tn.prototype.To;var If=null,Rf=null,Jv=new un(Tn,"Normal",1),Mx=new un(Tn,"Orthogonal",2),Lx=new un(Tn,"AvoidsNodes",6),nS=new un(Tn,"AvoidsNodesStraight",7),Ja=new un(Tn,"None",0),Rs=new un(Tn,"Bezier",9),Eh=new un(Tn,"JumpGap",10),Rd=new un(Tn,"JumpOver",11),tg=new un(Tn,"End",17),Ym=new un(Tn,"Scale",18),$m=new un(Tn,"Stretch",19),ng=new un(Tn,"OrientAlong",21),rg=new un(Tn,"OrientPlus90",22),ig=new un(Tn,"OrientMinus90",23),Qv=new un(Tn,"OrientOpposite",24),Jm=new un(Tn,"OrientUpright",25),og=new un(Tn,"OrientPlus90Upright",26),ag=new un(Tn,"OrientMinus90Upright",27),Qm=new un(Tn,"OrientUpright45",28),rS=16,iS=14,sg=8;Tn.className="Link",Tn.Normal=Jv,Tn.Orthogonal=Mx,Tn.AvoidsNodes=Lx,Tn.AvoidsNodesStraight=nS,Tn.None=Ja,Tn.Bezier=Rs,Tn.JumpGap=Eh,Tn.JumpOver=Rd,Tn.End=tg,Tn.Scale=Ym,Tn.Stretch=$m,Tn.OrientAlong=ng,Tn.OrientPlus90=rg,Tn.OrientMinus90=ig,Tn.OrientOpposite=Qv,Tn.OrientUpright=Jm,Tn.OrientPlus90Upright=og,Tn.OrientMinus90Upright=ag,Tn.OrientUpright45=Qm,Tn.EndSegmentStep=8,Tn.CurvinessStart=rS,Tn.SpacingMin=iS,Tn.OrthoShortCut=sg;function qm(a,y,x,b){yr(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=b,this.links=[]}qm.prototype.Sl=function(){if(!this.qq){var a=this.links;0<a.length&&(a=a[0].diagram,a!==null&&(a.ow.add(this),this.Fe=a.undoManager.isUndoingRedoing))}this.qq=!0},qm.prototype.Nv=function(){if(this.qq){this.qq=!1;var a=this.links;if(0<a.length){var y=a[0],x=y.diagram;x=x===null||x.pi&&!this.Fe,this.Fe=!1,y.arrangeBundledLinks(a,x),a.length===1&&(y.Sf=null,a.length=0)}a.length===0&&(a=this.Ds,this!==null&&a.af!==null&&a.af.remove(this),a=this.cv,this!==null&&a.af!==null&&a.af.remove(this))}},qm.className="LinkBundle";function lg(a){yr(this),this.Yx=this.group=null,this.vs=!0,this.abort=!1,this.Od=this.Nd=1,this.Fn=this.En=-1,this.rc=a.width,this.sc=a.height,this.ac=null,this.ei=this.di=0,this.Os=11,this.Ix=this.Hx=22}lg.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,b=a.y+a.height;if(this.Nd=Math.floor((a.x-this.rc)/this.rc)*this.rc,this.Od=Math.floor((y-this.sc)/this.sc)*this.sc,this.En=Math.ceil((x+2*this.rc)/this.rc)*this.rc,this.Fn=Math.ceil((b+2*this.sc)/this.sc)*this.sc,a=1+(Math.ceil((this.En-this.Nd)/this.rc)|0),y=1+(Math.ceil((this.Fn-this.Od)/this.sc)|0),this.ac===null||this.di<a-1||this.ei<y-1){for(x=[],b=0;b<=a;b++)x[b]=new Uint32Array(y);this.ac=x,this.di=a-1,this.ei=y-1}if(a=qv,this.ac!==null)for(y=0;y<=this.di;y++)if(x=this.ac[y],x.fill)x.fill(a);else for(b=0;b<=this.ei;b++)x[b]=a}};function _d(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function Su(a,y,x){return _d(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):qv}function oS(a){if(a.ac!==null)for(var y=0;y<=a.di;y++)for(var x=a.ac[y],b=0;b<=a.ei;b++)x[b]>=Qc&&(x[b]=qv)}lg.prototype.Yj=function(a,y,x,b){if(a>this.En||a+x<this.Nd||y>this.Fn||y+b<this.Od)return!0;a=(a-this.Nd)/this.rc|0,y=(y-this.Od)/this.sc|0,x=Math.max(0,x)/this.rc+1|0;var E=Math.max(0,b)/this.sc+1|0;if(0>a&&(x+=a,a=0),0>y&&(E+=y,y=0),0>x||0>E)return!0;for(b=Math.min(a+x-1,this.di)|0,x=Math.min(y+E-1,this.ei)|0;a<=b;a++){E=this.ac[a];for(var te=y;te<=x;te++)if(E[te]===kh)return!1}return!0};function xu(a,y,x,b,E,te,ne,se,he){if(!(y<te||y>ne||x<se||x>he)){var pe=y|0,ye=x|0,Te=a.ac[pe][ye];if(Te>=Qc&&Te<zd)for(E?ye+=b:pe+=b,Te+=1;te<=pe&&pe<=ne&&se<=ye&&ye<=he&&!(Te>=a.ac[pe][ye]);)a.ac[pe][ye]=Te,Te+=1,E?ye+=b:pe+=b;if(pe=E?ye:pe,E)if(0<b)for(x+=b;x<pe;x+=b)xu(a,y,x,1,!E,te,ne,se,he),xu(a,y,x,-1,!E,te,ne,se,he);else for(x+=b;x>pe;x+=b)xu(a,y,x,1,!E,te,ne,se,he),xu(a,y,x,-1,!E,te,ne,se,he);else if(0<b)for(y+=b;y<pe;y+=b)xu(a,y,x,1,!E,te,ne,se,he),xu(a,y,x,-1,!E,te,ne,se,he);else for(y+=b;y>pe;y+=b)xu(a,y,x,1,!E,te,ne,se,he),xu(a,y,x,-1,!E,te,ne,se,he)}}function e0(a,y,x,b,E,te,ne,se,he){y|=0,x|=0;var pe=kh,ye=Qc;for(a.ac[y][x]=ye;pe===kh&&y>te&&y<ne&&x>se&&x<he;)ye+=1,a.ac[y][x]=ye,E?x+=b:y+=b,pe=a.ac[y][x]}function t0(a,y,x,b,E,te,ne,se,he){y|=0,x|=0;var pe=kh,ye=zd;for(a.ac[y][x]=ye;pe===kh&&y>te&&y<ne&&x>se&&x<he;)a.ac[y][x]=ye,E?x+=b:y+=b,pe=a.ac[y][x]}function aS(a,y,x,b,E,te,ne){if(a.ac!==null){a.abort=!1;var se=y.x,he=y.y;if(_d(a,se,he)){se-=a.Nd,se/=a.rc,he-=a.Od,he/=a.sc;var pe=b.x,ye=b.y;if(_d(a,pe,ye))if(pe-=a.Nd,pe/=a.rc,ye-=a.Od,ye/=a.sc,1>=Math.abs(se-pe)&&1>=Math.abs(he-ye))a.abort=!0;else{var Te=te.x;b=te.y,y=te.x+te.width;var ze=te.y+te.height;Te-=a.Nd,Te/=a.rc,b-=a.Od,b/=a.sc,y-=a.Nd,y/=a.rc,ze-=a.Od,ze/=a.sc,te=Math.max(0,Math.min(a.di,Te|0)),y=Math.min(a.di,Math.max(0,y|0)),Te=Math.max(0,Math.min(a.ei,b|0)),ze=Math.min(a.ei,Math.max(0,ze|0)),b=a.ac,se|=0,he|=0,pe|=0,ye|=0;var Ze=x===0||x===90?1:-1;if(x=x===90||x===270,b[se][he]===kh?(e0(a,se,he,Ze,x,te,y,Te,ze),e0(a,se,he,1,!x,te,y,Te,ze),e0(a,se,he,-1,!x,te,y,Te,ze)):e0(a,se,he,Ze,x,se,he,se,he),b[pe][ye]===kh?(t0(a,pe,ye,E===0||E===90?1:-1,E===90||E===270,te,y,Te,ze),t0(a,pe,ye,1,!(E===90||E===270),te,y,Te,ze),t0(a,pe,ye,-1,!(E===90||E===270),te,y,Te,ze)):t0(a,pe,ye,Ze,x,pe,ye,pe,ye),x=$n(),ne&&sS(a,pe,ye,E,se,he,x))for((x[0]!==pe||x[1]!==ye)&&(x.unshift(ye),x.unshift(pe)),(x[x.length-2]!==se||x[x.length-1]!==he)&&(x.push(se),x.push(he)),a=Qc,E=x[x.length-2],ne=x[x.length-1],b[E][ne]=a++,te=x.length-4;0<=te;te-=2)for(E=x[te+2],ne=x[te+3],y=x[te],pe=x[te+1];y>E?E++:y<E?E--:pe>ne?ne++:pe<ne&&ne--,b[E][ne]=a++,E!==y||ne!==pe;);else xu(a,se,he,1,!1,te,y,Te,ze),xu(a,se,he,-1,!1,te,y,Te,ze),xu(a,se,he,1,!0,te,y,Te,ze),xu(a,se,he,-1,!0,te,y,Te,ze);Wn(x)}}}}function sS(a,y,x,b,E,te,ne){for(var se=a.ac,he=y,pe=x;;){if(he===E&&pe===te)return!0;var ye=he,Te=pe;if(b===0)if(ye<E)ye++;else break;else if(b===90)if(Te<te)Te++;else break;else if(b===180)if(ye>E)ye--;else break;else if(Te>te)Te--;else break;var ze=se[ye][Te];if(ze===0||ze===ey)break;he=ye,pe=Te}for(;;){if(ye=b,Te=he,ze=pe,b===0?ze<te?(ye=90,ze++):ze>te&&(ye=270,ze--):b===90?Te<E?(ye=0,Te++):Te>E&&(ye=180,Te--):b===180?ze<te?(ye=90,ze++):ze>te&&(ye=270,ze--):Te<E?(ye=0,Te++):Te>E&&(ye=180,Te--),Te=se[Te][ze],ye!==b&&Te!==0&&Te!==ey){if(ne.push(he),ne.push(pe),sS(a,he,pe,ye,E,te,ne))return!0;ne.pop(),ne.pop()}if(se[he][pe]=ey,b===0){if(he===y)return!1;he--}else if(b===90){if(pe===x)return!1;pe--}else if(b===180){if(he===y)return!1;he++}else{if(pe===x)return!1;pe++}}}Zt.Object.defineProperties(lg.prototype,{bounds:{get:function(){return new Yt(this.Nd,this.Od,this.En-this.Nd,this.Fn-this.Od)}},Ho:{get:function(){return this.rc},set:function(a){0<a&&a!==this.rc&&(this.rc=a,this.initialize(this.bounds))}},Go:{get:function(){return this.sc},set:function(a){0<a&&a!==this.sc&&(this.sc=a,this.initialize(this.bounds))}}});var kh=0,Qc=1,zd=999999,qv=zd+1,ey=zd+2;lg.className="PositionArray";function _f(){yr(this),this.port=this.node=null,this.pe=[],this.ap=!1}_f.prototype.toString=function(){for(var a=this.pe,y=this.node.toString()+" "+a.length.toString()+":",x=0;x<a.length;x++){var b=a[x];b!==null&&(y+=`
`+b.toString())}return y};function Nx(a,y,x,b){switch(y=y.offsetY,y){case 8:return 90;case 2:return 180;case 1:return 270;case 4:return 0}switch(y){case 9:return 180<x?270:90;case 6:return 90<x&&270>=x?180:0}switch(a=180*Math.atan2(a.height,a.width)/Math.PI,y){case 3:return x>a&&x<=180+a?180:270;case 5:return x>180-a&&x<=360-a?270:0;case 12:return x>a&&x<=180+a?90:0;case 10:return x>180-a&&x<=360-a?180:90;case 7:return 90<x&&x<=180+a?180:x>180+a&&x<=360-a?270:0;case 13:return 180<x&&x<=360-a?270:x>a&&180>=x?90:0;case 14:return x>a&&x<=180-a?90:x>180-a&&270>=x?180:0;case 11:return x>180-a&&x<=180+a?180:x>180+a?270:90}return b&&y!==15&&(x-=15,0>x&&(x+=360)),x>a&&x<180-a?90:x>=180-a&&x<=180+a?180:x>180+a&&x<360-a?270:0}_f.prototype.Sl=function(){this.pe.length=0};function lS(a,y){var x=a.pe;if(x.length===0){e:if(!a.ap){x=a.ap,a.ap=!0;var b=null,E=a.node,te=E instanceof jr?E:null;if(te===null||te.isSubGraphExpanded)var ne=E.isTreeExpanded?E.findLinksConnected(a.port.portId):E.qx();else{if(!te.actualBounds.w()){a.ap=x;break e}b=te,ne=b.Lu()}te=a.pe.length=0;var se=a.port.ga(wi,lt.alloc()),he=a.port.ga(io,lt.alloc());for(E=Yt.allocAt(se.x,se.y,0,0),E.Ye(he),lt.free(se),lt.free(he),se=lt.allocAt(E.x+E.width/2,E.y+E.height/2),he=a.port.li(),ne=ne.iterator;ne.next();){var pe=ne.value;if(pe.isVisible()&&pe.fromPort!==pe.toPort){var ye=pe.fromPort===a.port||pe.fromNode!==null&&pe.fromNode.Td(b),Te=pe.computeSpot(ye,a.port);if(Te.$c()&&(ye=ye?pe.toPort:pe.fromPort,ye!==null)){var ze=ye.part;if(ze!==null){var Ze=ze.findVisibleNode();Ze!==null&&Ze!==ze&&(ze=Ze,ye=ze.port),ye=pe.computeOtherPoint(ze,ye),ze=se.ab(ye),ze-=he,0>ze?ze+=360:360<=ze&&(ze-=360),Te=Nx(E,Te,ze,pe.isOrthogonal),Te===0?(Te=4,180<ze&&(ze-=360)):Te===90?(Te=8,270<ze&&(ze-=360)):Te===180?Te=2:(Te=1,90>ze&&(ze+=360)),Ze=a.pe[te],Ze===void 0?(Ze=new ty(pe,ze,Te),a.pe[te]=Ze):(Ze.link=pe,Ze.angle=ze,Ze.Nc=Te),Ze.hv.set(ye),te++}}}}for(lt.free(se),a.pe.sort(_f.prototype.j),he=a.pe.length,b=-1,te=se=0;te<he;te++)ne=a.pe[te],ne!==void 0&&(ne.Nc!==b&&(b=ne.Nc,se=0),ne.Uo=se,se++);for(b=-1,se=0,te=he-1;0<=te;te--)he=a.pe[te],he!==void 0&&(he.Nc!==b&&(b=he.Nc,se=he.Uo+1),he.Gl=se);if(te=a.pe,Te=a.port,b=a.node.portSpreading,se=lt.alloc(),he=lt.alloc(),ne=lt.alloc(),pe=lt.alloc(),Te.ga(wi,se),Te.ga(Pa,he),Te.ga(io,ne),Te.ga(Ko,pe),Ze=ze=ye=Te=0,b===Hv)for(var $e=0;$e<te.length;$e++){var it=te[$e];if(it!==null){var Tt=it.link.computeThickness();switch(it.Nc){case 8:ze+=Tt;break;case 2:Ze+=Tt;break;case 1:Te+=Tt;break;default:case 4:ye+=Tt}}}var bt=$e=0,Nt=1,jt=it=0;for(Tt=0;Tt<te.length;Tt++){var Bt=te[Tt];if(Bt!==null){if($e!==Bt.Nc){switch($e=Bt.Nc,$e){case 8:var _t=ne;bt=pe;break;case 2:_t=pe,bt=se;break;case 1:_t=se,bt=he;break;default:case 4:_t=he,bt=ne}switch(it=bt.x-_t.x,jt=bt.y-_t.y,$e){case 8:ze>Math.abs(it)?(Nt=Math.abs(it)/ze,ze=Math.abs(it)):Nt=1;break;case 2:Ze>Math.abs(jt)?(Nt=Math.abs(jt)/Ze,Ze=Math.abs(jt)):Nt=1;break;case 1:Te>Math.abs(it)?(Nt=Math.abs(it)/Te,Te=Math.abs(it)):Nt=1;break;default:case 4:ye>Math.abs(jt)?(Nt=Math.abs(jt)/ye,ye=Math.abs(jt)):Nt=1}bt=0}var Ht=Bt.Zo;if(b===Hv){switch(Bt=Bt.link.computeThickness(),Bt*=Nt,Ht.set(_t),$e){case 8:Ht.x=_t.x+it/2+ze/2-bt-Bt/2;break;case 2:Ht.y=_t.y+jt/2+Ze/2-bt-Bt/2;break;case 1:Ht.x=_t.x+it/2-Te/2+bt+Bt/2;break;default:case 4:Ht.y=_t.y+jt/2-ye/2+bt+Bt/2}bt+=Bt}else{var Fn=.5;b===Wm&&(Fn=(Bt.Uo+1)/(Bt.Gl+1)),Ht.x=_t.x+it*Fn,Ht.y=_t.y+jt*Fn}}}for(lt.free(se),lt.free(he),lt.free(ne),lt.free(pe),_t=a.pe,te=0;te<_t.length;te++)b=_t[te],b!==null&&(b.Ju=a.computeEndSegmentLength(b));a.ap=x,Yt.free(E)}x=a.pe}for(a=0;a<x.length;a++)if(E=x[a],E!==null&&E.link===y)return E;return null}_f.prototype.j=function(a,y){return a===y?0:a===null?-1:y===null?1:a.Nc<y.Nc?-1:a.Nc>y.Nc?1:a.angle<y.angle?-1:a.angle>y.angle?1:0},_f.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,zr,y.fromPort===this.port),b=a.Uo;if(0>b)return x;var E=a.Gl;if(1>=E||!y.isOrthogonal)return x;y=a.hv;var te=a.Zo;return(a.Nc===2||a.Nc===8)&&(b=E-1-b),((a=a.Nc===2||a.Nc===4)?y.y<te.y:y.x<te.x)?x+8*b:(a?y.y===te.y:y.x===te.x)?x:x+8*(E-1-b)},_f.className="Knot";function ty(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new lt,this.Gl=this.Uo=0,this.Zo=new lt,this.Ju=0}ty.prototype.toString=function(){return this.link.toString()+" "+this.angle.toString()+" "+this.Nc.toString()+":"+this.Uo.toString()+"/"+this.Gl.toString()+" "+this.Zo.toString()+" "+this.Ju.toString()+" "+this.hv.toString()},ty.className="LinkInfo";function so(a){yr(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new lt(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}so.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},so.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},so.prototype.qb=function(){},so.prototype.toString=function(){var a=hr(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},so.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())}}},so.prototype.createNetwork=function(){return new Ki(this)},so.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof Vt?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof jr?y.lg(a.memberParts):y.lg(a.iterator),y},so.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")}},so.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()}},so.prototype.doLayout=function(a){var y=new xn;a instanceof Vt?(ac(this,y,a.nodes,!0,this.rh,!0,!1,!0),ac(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof jr?ac(this,y,a.memberParts,!1,this.rh,!0,!1,!0):y.addAll(a.iterator),0<y.count&&(a=this.diagram,a!==null&&a.Ea("Layout"),this.doMinimalNoNetworkLayout(y),a!==null&&a.eb("Layout")),this.isValidLayout=!0},so.prototype.doMinimalNoNetworkLayout=function(a){var y=Math.ceil(Math.sqrt(a.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var x=this.arrangementOrigin.x,b=x,E=this.arrangementOrigin.y,te=0,ne=0;for(a=a.iterator;a.next();){var se=a.value;ug(se);var he=se.measuredBounds,pe=he.width;he=he.height,se.moveTo(b,E),se instanceof jr&&(se.rh=!1),b+=Math.max(pe,50)+20,ne=Math.max(ne,Math.max(he,50)),te>=y-1?(te=0,b=x,E+=ne+20,ne=0):te++}},so.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var y=this.arrangementOrigin.x,x=y,b=this.arrangementOrigin.y,E=0,te=0,ne=this.network.vertexes.iterator;ne.next();){var se=ne.value.node;if(!(se===null||se instanceof Tn)&&(ug(se),this.rh(se))){var he=se.measuredBounds,pe=he.width;he=he.height,se.moveTo(x,b),se instanceof jr&&(se.rh=!1),x+=Math.max(pe,50)+20,te=Math.max(te,Math.max(he,50)),E>=a-1?(E=0,x=y,b+=te+20,te=0):E++}}},so.prototype.rh=function(a){return!!(!a.location.w()||a instanceof jr&&a.rh)};function ac(a,y,x,b,E,te,ne,se){for(x=x.iterator;x.next();){var he=x.value;b&&!he.isTopLevel||E!==null&&!E(he)||!he.canLayout()||(te&&he instanceof Rn?he.isLinkLabel||(he instanceof jr&&he.layout===null?ac(a,y,he.memberParts,!1,E,te,ne,se):(ug(he),y.add(he))):ne&&he instanceof Tn?y.add(he):!se||!he.Zc()||he instanceof Rn||(ug(he),y.add(he)))}}function ug(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}so.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new Yt),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},so.prototype.ex=function(a){var y=new xn;return a instanceof Vt?(ac(this,y,a.nodes,!0,null,!0,!0,!0),ac(this,y,a.links,!0,null,!0,!0,!0),ac(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof jr?ac(this,y,a.memberParts,!1,null,!0,!0,!0):ac(this,y,a.iterator,!1,null,!0,!0,!0),y},so.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(wi),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Zt.Object.defineProperties(so.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())}}}),so.prototype.collectParts=so.prototype.ex,so.prototype.getLayoutBounds=so.prototype.ni,so.prototype.invalidateLayout=so.prototype.C,so.className="Layout";function Ki(a){yr(this),this.Sc=a,this.wf=new xn,this.ye=new xn,this.Es=new Jt,this.zs=new Jt}Ki.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 xn,this.ye=new xn,this.Es=new Jt,this.zs=new Jt},Ki.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},Ki.prototype.createVertex=function(){return new Uo(this)},Ki.prototype.createEdge=function(){return new Es(this)},Ki.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(ne){if(ne instanceof Rn)return!ne.isLinkLabel;if(ne instanceof Tn){var se=ne.fromNode;return se===null||se.isLinkLabel?!1:(ne=ne.toNode,!(ne===null||ne.isLinkLabel))}return!1}),a=a.iterator;a.next();){var b=a.value;if(b instanceof Rn&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)){if(b instanceof jr&&b.layout===null)this.lg(b.memberParts,!1);else if(this.ki(b)===null){var E=this.createVertex();E.node=b,this.dh(E)}}}for(a.reset();a.next();)if(b=a.value,b instanceof Tn&&(!y||b.isTopLevel)&&b.canLayout()&&x(b)&&this.Lo(b)===null){var te=b.fromNode;E=b.toNode,te!==null&&E!==null&&te!==E&&(te=this.findGroupVertex(te),E=this.findGroupVertex(E),te!==null&&E!==null&&this.Zj(te,E,b))}}},Ki.prototype.findGroupVertex=function(a){if(a===null)return null;var y=a.findVisibleNode();if(y===null)return null;if(a=this.ki(y),a!==null)return a;for(y=y.containingGroup;y!==null;){if(a=this.ki(y),a!==null)return a;y=y.containingGroup}return null},et=Ki.prototype,et.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},et.Bl=function(a){if(a===null)return null;var y=this.ki(a);return y===null&&(y=this.createVertex(),y.node=a,this.dh(y)),y},et.Iu=function(a){if(a!==null&&uS(this,a)){for(var y=a.tg,x=y.count-1;0<=x;x--){var b=y.M(x);this.Mj(b)}for(y=a.mg,a=y.count-1;0<=a;a--)x=y.M(a),this.Mj(x)}};function uS(a,y){if(y===null)return!1;var x=a.wf.remove(y);return x&&(y=y.node,y!==null&&a.Es.remove(y)),x}et.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},et.ki=function(a){return a===null?null:this.Es.I(a)},et.Bo=function(a){if(a!==null){ny(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function ny(a,y){if(y!==null){a.ye.add(y);var x=y.link;x!==null&&a.Lo(x)===null&&a.zs.add(x,y),y.network=a}}et.Dy=function(a){if(a===null)return null;var y=a.fromNode,x=a.toNode,b=this.Lo(a);return b===null?(b=this.createEdge(),b.link=a,y!==null&&(b.fromVertex=this.Bl(y)),x!==null&&(b.toVertex=this.Bl(x)),this.Bo(b)):(y!==null?b.fromVertex=this.Bl(y):b.fromVertex=null,x!==null?b.toVertex=this.Bl(x):b.toVertex=null),b},et.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),ry(this,a)}};function ry(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}et.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},et.Lo=function(a){return a===null?null:this.zs.I(a)},et.Zj=function(a,y,x){if(a===null||y===null)return null;if(a.network===this&&y.network===this){var b=this.createEdge();return b.link=x,b.fromVertex=a,b.toVertex=y,this.Bo(b),b}return null},et.gm=function(a){if(a!==null){var y=a.fromVertex,x=a.toVertex;y!==null&&x!==null&&(y.Jl(a),x.Kl(a),a.gm(),y.Cl(a),x.zl(a))}},et.Ko=function(){for(var a=$n(),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]);Wn(a)},Ki.prototype.deleteArtificialVertexes=function(){for(var a=$n(),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=$n(),x=this.ye.iterator;x.next();){var b=x.value;b.link===null&&b.data===null&&y.push(b)}for(x=y.length,b=0;b<x;b++)this.Mj(y[b]);Wn(a),Wn(y)};function Ax(a){for(var y=$n(),x=a.ye.iterator;x.next();){var b=x.value;b.fromVertex!==null&&b.toVertex!==null||y.push(b)}for(x=y.length,b=0;b<x;b++)a.Mj(y[b]);Wn(y)}Ki.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Ax(this),this.Ko()),a=new yn;for(var y=!0;y;){y=!1;for(var x=this.wf.iterator;x.next();){var b=x.value;if(0<b.tg.count||0<b.mg.count){y=this.layout.createNetwork(),a.add(y),iy(this,y,b),y=!0;break}}}return a.sort(function(E,te){return E===null||te===null||E===te?0:te.vertexes.count-E.vertexes.count}),a};function iy(a,y,x){if(x!==null&&x.network!==y){uS(a,x),y.dh(x);for(var b=x.sourceEdges;b.next();){var E=b.value;E.network!==y&&(ry(a,E),ny(y,E),iy(a,y,E.fromVertex))}for(b=x.destinationEdges;b.next();)x=b.value,x.network!==y&&(ry(a,x),ny(y,x),iy(a,y,x.toVertex))}}Ki.prototype.dz=function(){for(var a=new xn,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},Zt.Object.defineProperties(Ki.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}}}),Ki.prototype.findAllParts=Ki.prototype.dz,Ki.prototype.splitIntoSubNetworks=Ki.prototype.Zx,Ki.prototype.deleteSelfEdges=Ki.prototype.Ko,Ki.prototype.reverseEdge=Ki.prototype.gm,Ki.prototype.linkVertexes=Ki.prototype.Zj,Ki.prototype.findEdge=Ki.prototype.Lo,Ki.prototype.deleteLink=Ki.prototype.Yy,Ki.prototype.deleteEdge=Ki.prototype.Mj,Ki.prototype.addLink=Ki.prototype.Dy,Ki.prototype.addEdge=Ki.prototype.Bo,Ki.prototype.findVertex=Ki.prototype.ki,Ki.prototype.deleteNode=Ki.prototype.Zy,Ki.prototype.deleteVertex=Ki.prototype.Iu,Ki.prototype.addNode=Ki.prototype.Bl,Ki.prototype.addVertex=Ki.prototype.dh,Ki.prototype.addParts=Ki.prototype.lg,Ki.className="LayoutNetwork";function Uo(a){yr(this),this.ob=a,this.j=new Yt(0,0,10,10).freeze(),this.o=new lt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new yn,this.mg=new yn}Uo.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new yn,this.mg=new yn},Uo.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Yr(this);if(0<a&&(y+=this.node!==null?"("+this.node.toString()+")":"",1<a)){a="";for(var x=!0,b=this.tg.iterator;b.next();){var E=b.value;x?x=!1:a+=",",a+=E.toString(0)}for(E="",x=!0,b=this.mg.iterator;b.next();){var te=b.value;x?x=!1:E+=",",E+=te.toString(0)}y+=" sources: "+a+" destinations: "+E}return y},Uo.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;an(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 jr)){x=Yt.alloc(),a.Va();var b=this.network.layout.ni(a,x),E=a.locationObject.ga(ti);if(b.w()&&E.w()){a.moveTo(y.x+this.focusX-(E.x-b.x),y.y+this.focusY-(E.y-b.y)),Yt.free(x);return}Yt.free(x)}a.moveTo(y.x,y.y)}},Uo.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},Uo.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},Uo.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},Uo.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function oy(a,y){return a=a.Sh,y=y.Sh,a?y?(a=a.text,y=y.text,a<y?-1:a>y?1:0):1:y!==null?-1:0}Zt.Object.defineProperties(Uo.prototype,{sourceEdgesArrayAccess:{get:function(){return this.tg._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.mg._dataArray}},data:{get:function(){return this.ub},set:function(a){if(this.ub=a,a!==null&&a.bounds){var y=a.bounds;a=y.x;var x=y.y,b=y.width;y=y.height,this.o.h(b/2,y/2),this.j.h(a,x,b,y)}}},node:{get:function(){return this.Sh},set:function(a){if(this.Sh!==a){this.Sh=a,a.Va();var y=this.network.layout,x=Yt.alloc(),b=y.ni(a,x);y=b.x;var E=b.y,te=b.width;if(b=b.height,isNaN(y)&&(y=0),isNaN(E)&&(E=0),this.j.h(y,E,te,b),Yt.free(x),!(a instanceof jr)&&(a=a.locationObject.ga(ti),a.w())){this.o.h(a.x-y,a.y-E);return}this.o.h(te/2,b/2)}}},bounds:{get:function(){return this.j},set:function(a){this.j.D(a)||this.j.assign(a)}},focus:{get:function(){return this.o},set:function(a){this.o.D(a)||this.o.assign(a)}},centerX:{get:function(){return this.j.x+this.o.x},set:function(a){var y=this.j;y.x+this.o.x!==a&&(y.ka(),y.x=a-this.o.x,y.freeze())}},centerY:{get:function(){return this.j.y+this.o.y},set:function(a){var y=this.j;y.y+this.o.y!==a&&(y.ka(),y.y=a-this.o.y,y.freeze())}},focusX:{get:function(){return this.o.x},set:function(a){var y=this.o;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},focusY:{get:function(){return this.o.y},set:function(a){var y=this.o;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},x:{get:function(){return this.j.x},set:function(a){var y=this.j;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},y:{get:function(){return this.j.y},set:function(a){var y=this.j;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},width:{get:function(){return this.j.width},set:function(a){var y=this.j;y.width!==a&&(y.ka(),y.width=a,y.freeze())}},height:{get:function(){return this.j.height},set:function(a){var y=this.j;y.height!==a&&(y.ka(),y.height=a,y.freeze())}},network:{get:function(){return this.ob},set:function(a){this.ob=a}},sourceVertexes:{get:function(){for(var a=new xn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new xn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new xn,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 yn,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}}}),Uo.prototype.deleteDestinationEdge=Uo.prototype.Jl,Uo.prototype.addDestinationEdge=Uo.prototype.zl,Uo.prototype.deleteSourceEdge=Uo.prototype.Kl,Uo.prototype.addSourceEdge=Uo.prototype.Cl,Uo.className="LayoutVertex",Uo.standardComparer=oy,Uo.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.Sh;var x=y.Sh;if(a!==null){if(x!==null){for(y=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),a=x.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),x=0;x<y.length;x++)if(a[x]!==""&&a[x]!==void 0){var b=parseFloat(y[x]),E=parseFloat(a[x]);if(isNaN(b))if(isNaN(E)){if(y[x].localeCompare(a[x])!==0)return y[x].localeCompare(a[x])}else return 1;else{if(isNaN(E))return-1;if(b-E!==0)return b-E}}else if(y[x]!=="")return 1;return a[x]!==""&&a[x]!==void 0?-1:0}return 1}return x!==null?-1:0}return 1}return y!==null?-1:0};function Es(a){yr(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Es.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Es.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Yr(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},Es.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Es.prototype.commit=function(){},Es.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},Zt.Object.defineProperties(Es.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)}}}),Es.prototype.getOtherVertex=Es.prototype.Ax,Es.className="LayoutEdge";function fa(a){so.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new fn(NaN,NaN).freeze(),this.tf=new fn(10,10).freeze(),this.Jb=hg,this.Rb=r0,this.nd=cg,this.hd=hS,a&&Object.assign(this,a)}nn(fa,so),fa.prototype.cloneProtected=function(a){so.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},fa.prototype.qb=function(a){a.classType===fa?a===cg||a===o0||a===ay||a===i0?this.sorting=a:a===r0||a===Fl?this.arrangement=a:a===hg||a===n0?this.alignment=a:Ot("Unknown enum value: "+a):so.prototype.qb.call(this,a)},fa.prototype.doLayout=function(a){this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var y=this.ex(a);a=this.diagram;for(var x=y.copy().iterator;x.next();){var b=x.value;if(!b.ph()||b.fromNode===null&&b.toNode===null){if(b.Va(),b instanceof jr)for(b=b.memberParts;b.next();)y.remove(b.value)}else y.remove(b)}var E=y.Fa();if(E.length!==0){switch(this.sorting){case i0:E.reverse();break;case cg:E.sort(this.comparer);break;case o0:E.sort(this.comparer),E.reverse()}var te=this.wrappingColumn;isNaN(te)&&(te=0);var ne=this.wrappingWidth;switch(isNaN(ne)&&a!==null?(y=a.padding,ne=Math.max(a.viewportBounds.width-y.left-y.right,0)):ne=Math.max(this.wrappingWidth,0),0>=te&&0>=ne&&(te=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),b=[],this.alignment){case n0:var se=y,he=x,pe=Yt.alloc(),ye=Math.max(this.cellSize.width,1);if(!isFinite(ye))for(var Te=ye=0;Te<E.length;Te++){var ze=this.ni(E[Te],pe);ye=Math.max(ye,ze.width)}if(ye=Math.max(ye+se,1),Te=Math.max(this.cellSize.height,1),!isFinite(Te))for(ze=Te=0;ze<E.length;ze++){var Ze=this.ni(E[ze],pe);Te=Math.max(Te,Ze.height)}Te=Math.max(Te+he,1),ze=this.arrangement;for(var $e=Ze=this.arrangementOrigin.x,it=this.arrangementOrigin.y,Tt=0,bt=0,Nt=0;Nt<E.length;Nt++){var jt=E[Nt],Bt=this.ni(jt,pe),_t=Math.ceil((Bt.width+se)/ye)*ye,Ht=Math.ceil((Bt.height+he)/Te)*Te;switch(ze){case Fl:var Fn=Math.abs($e-Bt.width);break;default:Fn=$e+Bt.width}switch((0<te&&Tt>te-1||0<ne&&0<Tt&&Fn-Ze>ne)&&(b.push(new Yt(0,it,ne+se,bt)),Tt=0,$e=Ze,it+=bt,bt=0),bt=Math.max(bt,Ht),ze){case Fl:Bt=-Bt.width;break;default:Bt=0}switch(jt.moveTo($e+Bt,it),ze){case Fl:$e-=_t;break;default:$e+=_t}Tt++}b.push(new Yt(0,it,ne+se,bt)),Yt.free(pe);break;case hg:for(he=ne,ye=te,Te=y,ze=x,ne=Yt.alloc(),Ze=Math.max(this.cellSize.width,1),te=it=pe=0,se=lt.alloc(),$e=0;$e<E.length;$e++)bt=E[$e],Tt=this.ni(bt,ne),bt=Ph(bt,bt.locationObject,bt.locationSpot,se),pe=Math.max(pe,bt.x),it=Math.max(it,Tt.width-bt.x),te=Math.max(te,bt.y);switch($e=this.arrangement,$e){case Fl:pe+=Te;break;default:it+=Te}Ze=isFinite(Ze)?Math.max(Ze+Te,1):Math.max(pe+it,1);var Jn=bt=this.arrangementOrigin.x;for(Nt=this.arrangementOrigin.y,it=0,he>=pe&&(he-=pe),pe=jt=0,_t=Math.max(this.cellSize.height,1),Bt=te=0,Ht=!0,Tt=lt.alloc(),Fn=0;Fn<E.length;Fn++){var Zn=E[Fn],kn=this.ni(Zn,ne),cn=Ph(Zn,Zn.locationObject,Zn.locationSpot,se);if(0<it)switch($e){case Fl:Jn=(Jn-bt-(kn.width-cn.x))/Ze,Jn=Gt.$(Math.round(Jn),Jn)?Math.round(Jn):Math.floor(Jn),Jn=Jn*Ze+bt;break;default:Jn=(Jn-bt+cn.x)/Ze,Jn=Gt.$(Math.round(Jn),Jn)?Math.round(Jn):Math.ceil(Jn),Jn=Jn*Ze+bt}else switch($e){case Fl:jt=Jn+cn.x+kn.width;break;default:jt=Jn-cn.x}switch($e){case Fl:var Ar=-(Jn+cn.x)+jt;break;default:Ar=Jn+kn.width-cn.x-jt}if(0<ye&&it>ye-1||0<he&&0<it&&Ar>he){for(b.push(new Yt(0,Ht?Nt-te:Nt,he+Te,Bt+te+ze)),Jn=0;Jn<it&&Fn!==it;Jn++){Ar=E[Fn-it+Jn];var Cr=Ph(Ar,Ar.locationObject,Ar.locationSpot,Tt);Ar.moveTo(Ar.position.x,Ar.position.y+te-Cr.y)}Bt+=ze,Nt=Ht?Nt+Bt:Nt+(Bt+te),it=Bt=te=0,Jn=bt,Ht=!1}switch(Jn===bt&&(pe=$e===Fl?Math.max(pe,kn.width-cn.x):Math.min(pe,-cn.x)),te=Math.max(te,cn.y),Bt=Math.max(Bt,kn.height-cn.y),isFinite(_t)&&(Bt=Math.max(Bt,Math.max(kn.height,_t)-cn.y)),Ht?Zn.moveTo(Jn-cn.x,Nt-cn.y):Zn.moveTo(Jn-cn.x,Nt),$e){case Fl:Jn-=cn.x+Te;break;default:Jn+=kn.width-cn.x+Te}it++}if(b.push(new Yt(0,Nt,he+Te,(Ht?Bt:Bt+te)+ze)),E.length!==it)for(he=0;he<it;he++)ye=E[E.length-it+he],Te=Ph(ye,ye.locationObject,ye.locationSpot,se),ye.moveTo(ye.position.x,ye.position.y+te-Te.y);if(lt.free(se),lt.free(Tt),$e===Fl)for(E=0;E<b.length;E++)te=b[E],te.width+=pe,te.x-=pe;else for(E=0;E<b.length;E++)te=b[E],te.x>pe&&(te.width+=te.x-pe,te.x=pe);Yt.free(ne)}for(se=te=ne=E=0;se<b.length;se++)he=b[se],E=Math.min(E,he.x),ne=Math.min(ne,he.y),te=Math.max(te,he.x+he.width);this.arrangement===Fl?this.commitLayers(b,new lt(E+y/2-(te+E),ne-x/2)):this.commitLayers(b,new lt(E-y/2,ne-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},fa.prototype.commitLayers=function(){};function hS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}Zt.Object.defineProperties(fa.prototype,{wrappingWidth:{get:function(){return this.zo},set:function(a){this.zo!==a&&(0<a||isNaN(a))&&(this.zo=a,this.isViewportSized=isNaN(a),this.C())}},wrappingColumn:{get:function(){return this.yo},set:function(a){this.yo!==a&&(0<a||isNaN(a))&&(this.yo=a,this.C())}},cellSize:{get:function(){return this.yg},set:function(a){this.yg.D(a)||(this.yg.assign(a),this.C())}},spacing:{get:function(){return this.tf},set:function(a){this.tf.D(a)||(this.tf.assign(a),this.C())}},alignment:{get:function(){return this.Jb},set:function(a){this.Jb===a||a!==hg&&a!==n0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==r0&&a!==Fl||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==ay&&a!==i0&&a!==cg&&a!==o0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var n0=new un(fa,"Position",0),hg=new un(fa,"Location",1),r0=new un(fa,"LeftToRight",2),Fl=new un(fa,"RightToLeft",3),ay=new un(fa,"Forward",4),i0=new un(fa,"Reverse",5),cg=new un(fa,"Ascending",6),o0=new un(fa,"Descending",7);fa.className="GridLayout",fa.standardComparer=hS,fa.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),y=y.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);for(var x=0;x<a.length;x++)if(y[x]!==""&&y[x]!==void 0){var b=parseFloat(a[x]),E=parseFloat(y[x]);if(isNaN(b))if(isNaN(E)){if(a[x].localeCompare(y[x])!==0)return a[x].localeCompare(y[x])}else return 1;else{if(isNaN(E))return-1;if(b-E!==0)return b-E}}else if(a[x]!=="")return 1;return y[x]!==""&&y[x]!==void 0?-1:0}return 1}return y!==null?-1:0},fa.Position=n0,fa.Location=hg,fa.LeftToRight=r0,fa.RightToLeft=Fl,fa.Forward=ay,fa.Reverse=i0,fa.Ascending=cg,fa.Descending=o0;function Mi(){this.On=new xn,this.Dn=new xn,this.Pa=new xn,this.cf=new Jt,this.bf=new Jt,this.aj=new Jt,this.H=null,this.tp=!1}et=Mi.prototype,et.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},et.Xe=function(a){this.H=a},et.oi=function(a){if(a instanceof Rn){if(this.On.add(a),a instanceof jr){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 Tn?this.Dn.add(a):a instanceof di||this.Pa.add(a);y=a.data,y===null||a instanceof di||(a instanceof Tn?this.bf.add(y,a):this.cf.add(y,a))},et.pc=function(a){if(a.Ej(),a instanceof Rn){if(this.On.remove(a),a instanceof jr){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 Tn?this.Dn.remove(a):a instanceof di||this.Pa.remove(a);y=a.data,y===null||a instanceof di||(a instanceof Tn?this.bf.remove(y):this.cf.remove(y))},et.Wd=function(){var a=this.H;if(a!==null){for(var y=a.nodeTemplateMap.iterator;y.next();){var x=y.value,b=y.key;(!x.Zc()||x instanceof jr)&&Ot('Invalid node template in Diagram.nodeTemplateMap: template for "'+b+'" must be a Node or a simple Part, not a Group or Link: '+x)}for(y=a.groupTemplateMap.iterator;y.next();)x=y.value,b=y.key,x instanceof jr||Ot('Invalid group template in Diagram.groupTemplateMap: template for "'+b+'" must be a Group, not a normal Node or Link: '+x);for(y=a.linkTemplateMap.iterator;y.next();)x=y.value,b=y.key,x instanceof Tn||Ot('Invalid link template in Diagram.linkTemplateMap: template for "'+b+'" must be a Link, not a normal Node or simple Part: '+x);for(y=$n(),x=a.selection.iterator;x.next();)(b=x.value.data)&&y.push(b);for(x=$n(),a=a.highlighteds.iterator;a.next();)(b=a.value.data)&&x.push(b);for(a=$n(),b=this.nodes.iterator;b.next();){var E=b.value;E.data!==null&&(a.push(E.data),a.push(E.location))}for(b=this.links.iterator;b.next();)E=b.value,E.data!==null&&(a.push(E.data),a.push(E.location));for(b=this.parts.iterator;b.next();)E=b.value,E.data!==null&&(a.push(E.data),a.push(E.location));for(this.removeAllModeledParts(),this.addAllModeledParts(),b=0;b<y.length;b++)E=this.Lc(y[b]),E!==null&&(E.isSelected=!0);for(b=0;b<x.length;b++)E=this.Lc(x[b]),E!==null&&(E.isHighlighted=!0);for(b=0;b<a.length;b+=2)E=this.Lc(a[b]),E!==null&&(E.location=a[b+1]);Wn(y),Wn(x),Wn(a)}},Mi.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},Mi.prototype.addModeledParts=function(a,y){var x=this,b=this.diagram.model;a.forEach(function(E){b.lb(E)&&cS(x,E,!1)}),a.forEach(function(E){b.lb(E)&&x.resolveReferencesForData(E)}),y!==!1&&gd(this.diagram,!1)};function cS(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);e:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var b=a.Ro(y),E=fS(a,y,b);if(E!==null&&(ul(E),E=E.copy(),E!==null)){var te=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,E.Tf=b,E.ub=y,a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=te,b=E;break e}}b=null}b!==null&&x&&a.resolveReferencesForData(y)}}Mi.prototype.insertLink=function(){return null},Mi.prototype.resolveReferencesForData=function(){},Mi.prototype.Ro=function(a){return this.H.model.Ro(a)};function fS(a,y,x){a=a.H;var b=a.model;return b.Xj()&&b.Yu(y)?(y=a.groupTemplateMap.I(x),y===null&&(y=a.groupTemplateMap.I(""),y===null&&(gS||(gS=!0,qn('No Group template found for category "'+x+'"'),qn(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(pS||(pS=!0,qn('No Node template found for category "'+x+'"'),qn(" Using default node template")),y=a.ny))),y}Mi.prototype.getLinkCategoryForData=function(){return""},Mi.prototype.setLinkCategoryForData=function(){},Mi.prototype.setFromNodeForLink=function(){},Mi.prototype.setToNodeForLink=function(){},Mi.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(mS||(mS=!0,qn('No Link template found for category "'+a+'"'),qn(" Using default link template")),x=y.my)),x},Mi.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},Mi.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},Mi.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Ep(this.diagram,a,!1),this.unresolveReferencesForPart(a))},Mi.prototype.unresolveReferencesForPart=function(){},Mi.prototype.removeDataForLink=function(){},Mi.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},Mi.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof Rn?a:null)},Mi.prototype.findLinkForKey=function(){return null},et=Mi.prototype,et.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},et.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Rn?a:null)},et.Kc=function(a){return a===null?null:this.bf.I(a)},et.ms=function(a){for(var y=0;y<arguments.length;++y);y=new xn;for(var x=this.On.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var te=0;te<arguments.length;te++){var ne=arguments[te];if(an(ne)&&sy(this,E,ne)){y.add(b);break}}}return y.iterator},et.ls=function(a){for(var y=0;y<arguments.length;++y);y=new xn;for(var x=this.Dn.iterator;x.next();){var b=x.value,E=b.data;if(E!==null)for(var te=0;te<arguments.length;te++){var ne=arguments[te];if(an(ne)&&sy(this,E,ne)){y.add(b);break}}}return y.iterator};function sy(a,y,x){for(var b in x){var E=y[b],te=x[b];if(Un(te)){if(!Un(E)||E.length<te.length)return!1;for(var ne=0;ne<E.length;ne++){var se=te[ne];if(se!==void 0&&!dS(a,E[ne],se))return!1}}else if(!dS(a,E,te))return!1}return!0}function dS(a,y,x){if(typeof x=="function"){if(!x(y))return!1}else if(x instanceof RegExp){if(!y||!x.test(y.toString()))return!1}else if(an(y)&&an(x)){if(!sy(a,y,x))return!1}else if(y!==x)return!1;return!0}Mi.prototype.doModelChanged=function(a){if(this.H){var y=this.H;if(a.model===y.model){var x=a.change;if(y.doModelChanged(a),y.aa){y.aa=!1;try{var b=a.modelChange;if(b!=="")if(x===to){if(b==="nodeCategory"){var E=this.Lc(a.object),te=a.newValue;E!==null&&typeof te=="string"&&(E.category=te)}else b==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===Po){var ne=a.newValue;b==="nodeDataArray"&&an(ne)&&cS(this,ne),y.isModified=!0}else if(x===Eo){var se=a.oldValue;b==="nodeDataArray"&&an(se)&&this.ip(se),y.isModified=!0}else x===Ea&&(b==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):b==="ModelDisplaced"&&this.Wd());else if(x===to){var he=a.propertyName,pe=a.object;pe===y.model?(he==="nodeKeyProperty"||he==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(pe,he),y.isModified=!0}else if(x===Po||x===Eo){var ye=a.change===Po,Te=ye?a.newParam:a.oldParam,ze=ye?a.newValue:a.oldValue,Ze=this.aj.I(a.object);if(Array.isArray(Ze))for(a=0;a<Ze.length;a++){var $e=Ze[a];if(ye)Cm($e,ze,Te,!0);else if(!(0>Te)){var it=Te+Vp($e);$e.pc(it,!0),wv($e,it,Te)}}y.isModified=!0}}finally{y.aa=!0}}}}},Mi.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)},Mi.prototype.rp=function(){for(var a=this.H.model,y=new xn,x=a.nodeDataArray,b=0;b<x.length;b++)y.add(x[b]);var E=[];for(this.nodes.each(function(ne){ne.data===null||y.contains(ne.data)||E.push(ne.data)}),this.parts.each(function(ne){ne.data===null||y.contains(ne.data)||E.push(ne.data)}),E.forEach(function(ne){ES(a,ne,!1)}),b=0;b<x.length;b++){var te=x[b];this.Lc(te)===null&&CS(a,te,!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()},Mi.prototype.refreshDataBoundLinks=function(){},Mi.prototype.updateRelationshipsFromData=function(){},Mi.prototype.updateDataBindings=function(a,y){if(typeof y=="string"){var x=this.Lc(a);if(x!==null)x.La(y);else{x=null;for(var b=this.aj.iterator;b.next();){for(var E=b.value,te=0;te<E.length;te++){var ne=E[te].sx(a);ne!==null&&(x===null&&(x=$n()),x.push(ne))}if(x!==null)break}if(x!==null){for(b=0;b<x.length;b++)x[b].La(y);Wn(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function ly(a,y){var x=y.Hh;if(Un(x)){var b=a.aj.I(x);if(b===null)b=[],b.push(y),a.aj.add(x,b);else{for(a=0;a<b.length;a++)if(b[a]===y)return;b.push(y)}}}function uy(a,y,x){Zc(y,function(ne){ne=ne.O.s;for(var se=ne.length,he=0;he<se;he++)Np(x,ne[he])});var b=y.Hh;if(Un(b)){var E=a.aj.I(b);if(E!==null){for(var te=0;te<E.length;te++)if(E[te]===y){E.splice(te,1),E.length===0&&a.aj.remove(b);break}}}}Mi.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var b=new Jt;if(Un(a))for(var E=0;E<a.length;E++)a0(this,a[E],y,b,x);else for(a=a.iterator;a.next();)a0(this,a.value,y,b,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,E=new xn;for(var te=new Jt,ne=b.iterator;ne.next();){var se=ne.value;if(se instanceof Tn)a||se.fromNode!==null&&se.toNode!==null||E.add(se);else if(se instanceof Rn&&se.data!==null&&x.Tl()){var he=se;se=ne.key;var pe=se.pg();pe!==null&&(pe=b.I(pe),pe!==null?(x.qe(he.data,x.wa(pe.data)),he=y.Kc(he.data),se=se.kh(),se!==null&&he!==null&&te.add(se,he)):x.qe(he.data,void 0))}}if(0<E.count&&y.Is(E,!1),0<te.count)for(x=te.iterator;x.next();)b.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var ye=new Jt;b.each(function(Te){Te.key.data!==null&&ye.add(Te.key.data,Te.value.data)}),x(ye,y,this.H.model)}for(y=b.iterator;y.next();)y.value.La();return b};function a0(a,y,x,b,E){if(y===null||E&&!y.canCopy())return null;if(b.contains(y))return b.I(y);var te=a.copyPartData(y,x);if(!(te instanceof fr))return null;if(te.isSelected=!1,te.isHighlighted=!1,b.add(y,te),y instanceof Rn){for(var ne=y.linksConnected;ne.next();){var se=ne.value;if(se.fromNode===y){var he=b.I(se);he!==null&&(he.fromNode=te)}se.toNode===y&&(se=b.I(se),se!==null&&(se.toNode=te))}if(y instanceof jr&&te instanceof jr)for(y=y.memberParts;y.next();)ne=a0(a,y.value,x,b,E),ne instanceof Tn||ne===null||(ne.containingGroup=te)}else if(y instanceof Tn&&te instanceof Tn)for(ne=y.fromNode,ne!==null&&(ne=b.I(ne),ne!==null&&(te.fromNode=ne)),ne=y.toNode,ne!==null&&(ne=b.I(ne),ne!==null&&(te.toNode=ne)),y=y.labelNodes;y.next();)ne=a0(a,y.value,x,b,E),ne!==null&&ne instanceof Rn&&(ne.labeledLink=te);return te}Mi.prototype.copyPartData=function(a,y){var x=null,b=a.data;if(b!==null&&y!==null){var E=y.model;a instanceof Tn||(b=E.copyNodeData(b),an(b)&&(E.xf(b),x=y.Lc(b)))}else ul(a),x=a.copy(),x!==null&&(E=this.H,y!==null?y.add(x):b!==null&&E!==null&&E.commandHandler!==null&&E.commandHandler.copiesClipboardData&&(y=E.model,E=null,x instanceof Tn||(E=y.copyNodeData(b)),an(E)&&(x.data=E)));return x},Zt.Object.defineProperties(Mi.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}}}),Mi.prototype.updateAllRelationshipsFromData=Mi.prototype.rp,Mi.prototype.findLinksByExample=Mi.prototype.ls,Mi.prototype.findNodesByExample=Mi.prototype.ms,Mi.prototype.findLinkForData=Mi.prototype.Kc,Mi.prototype.findNodeForData=Mi.prototype.ii,Mi.prototype.findPartForData=Mi.prototype.Lc,Mi.prototype.findNodeForKey=Mi.prototype.Vb,Mi.prototype.removeModeledPart=Mi.prototype.ip,Mi.prototype.removeModeledParts=Mi.prototype.Gs,Mi.prototype.rebuildParts=Mi.prototype.Wd;var pS=!1,gS=!1,mS=!1;Mi.className="PartManager";function ea(a){Mi.apply(this,arguments)}nn(ea,Mi),ea.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},ea.prototype.addModeledParts=function(a){for(Mi.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)Bd(a.value);gd(this.diagram,!1)};function vS(a,y){y.forEach(function(x){yS(a,x)}),gd(a.diagram,!1)}function yS(a,y){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.bf.contains(y)){var x=a.getLinkCategoryForData(y),b=a.findLinkTemplateForCategory(x);if(b!==null){ul(b);var E=b.copy();if(E!==null){b=a.diagram.skipsModelSourceBindings,a.diagram.skipsModelSourceBindings=!0,E.Tf=x,E.ub=y,x=a.diagram.model;var te=h0(x,y,!0);te!==""&&(E.fromPortId=te),te=_s(x,y,!0),te!==void 0&&(te=a.Vb(te),te instanceof Rn&&(E.fromNode=te)),te=h0(x,y,!1),te!==""&&(E.toPortId=te),te=_s(x,y,!1),te!==void 0&&(te=a.Vb(te),te instanceof Rn&&(E.toNode=te)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(ne){ne=a.Vb(ne),ne!==null&&(ne.labeledLink=E)}),a.tp&&(E.Jg="Tool"),a.diagram.add(E),E.ub=null,E.data=y,a.diagram.skipsModelSourceBindings=b}}}}ea.prototype.removeAllModeledParts=function(){var a=this.diagram.model;SS(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function SS(a,y){y.forEach(function(x){a.ip(x)})}ea.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},ea.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},ea.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},ea.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},ea.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},ea.prototype.findPartForKey=function(a){var y=Mi.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},ea.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},ea.prototype.doModelChanged=function(a){var y=this;if(Mi.prototype.doModelChanged.call(this,a),this.diagram){var x=this.diagram;if(a.model===x.model){var b=a.change;if(x.aa){x.aa=!1;try{var E=a.modelChange;if(E!==""){if(b===to){if(E==="linkFromKey"){var te=this.Kc(a.object);if(te!==null){var ne=this.Vb(a.newValue);te.fromNode=ne}}else if(E==="linkToKey"){var se=this.Kc(a.object);if(se!==null){var he=this.Vb(a.newValue);se.toNode=he}}else if(E==="linkFromPortId"){var pe=this.Kc(a.object);if(pe!==null){var ye=a.newValue;typeof ye=="string"&&(pe.fromPortId=ye)}}else if(E==="linkToPortId"){var Te=this.Kc(a.object);if(Te!==null){var ze=a.newValue;typeof ze=="string"&&(Te.toPortId=ze)}}else if(E==="nodeGroupKey"){var Ze=this.Lc(a.object);if(Ze!==null){var $e=a.newValue;if($e!==void 0){var it=this.Vb($e);it instanceof jr?Ze.containingGroup=it:Ze.containingGroup=null}else Ze.containingGroup=null}}else if(E==="linkLabelKeys"){var Tt=this.Kc(a.object);if(Tt!==null){var bt=a.oldValue,Nt=a.newValue;Array.isArray(bt)&&bt.forEach(function(cn){0<=Nt.indexOf(cn)||(cn=y.Vb(cn),cn!==null&&(cn.labeledLink=null))}),Array.isArray(Nt)&&Nt.forEach(function(cn){cn=y.Vb(cn),cn!==null&&(cn.labeledLink=Tt)})}}else if(E==="linkCategory"){var jt=this.Kc(a.object),Bt=a.newValue;jt!==null&&typeof Bt=="string"&&(jt.category=Bt)}else E==="linkDataArray"&&(SS(this,a.oldValue),vS(this,a.newValue));x.isModified=!0}else if(b===Po){var _t=a.newValue;if(E==="linkDataArray"&&typeof _t=="object"&&_t!==null)yS(this,_t);else if(E==="linkLabelKeys"&&lc(_t)){var Ht=this.Kc(a.object),Fn=this.Vb(_t);Ht!==null&&Fn!==null&&(Fn.labeledLink=Ht)}x.isModified=!0}else if(b===Eo){var Jn=a.oldValue;if(E==="linkDataArray"&&typeof Jn=="object"&&Jn!==null)this.ip(Jn);else if(E==="linkLabelKeys"&&lc(Jn)){var Zn=this.Vb(Jn);Zn!==null&&(Zn.labeledLink=null)}x.isModified=!0}}else if(b===to){var kn=a.propertyName;a.object!==x.model||kn!=="linkFromKeyProperty"&&kn!=="linkToKeyProperty"&&kn!=="linkFromPortIdProperty"&&kn!=="linkToPortIdProperty"&&kn!=="linkLabelKeysProperty"&&kn!=="nodeIsGroupProperty"&&kn!=="nodeGroupKeyProperty"&&kn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},ea.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new xn,b=y.linkDataArray;b.forEach(function(te){x.add(te)});var E=[];this.links.each(function(te){te.data===null||x.contains(te.data)||E.push(te.data)}),E.forEach(function(te){AS(y,te,!1)}),b.forEach(function(te){a.Kc(te)===null&&NS(y,te,!1)})},ea.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;if(a instanceof Tn){var E=_s(b,y,!0);if(E=x.Vb(E),a.fromNode=E,E=_s(b,y,!1),E=x.Vb(E),a.toNode=E,y=b.Ef(y),0<y.length||0<a.labelNodes.count){if(y.length===1&&a.labelNodes.count===1){E=y[0];var te=a.labelNodes.first();if(b.wa(te.data)===E)return}E=new xn().addAll(y);var ne=new xn;a.labelNodes.each(function(se){se.data!==null&&(se=b.wa(se.data),se!==void 0&&ne.add(se))}),y=ne.copy(),y.hp(E),E=E.copy(),E.hp(ne),(0<y.count||0<E.count)&&(y.each(function(se){se=x.Vb(se),se!==null&&se.labeledLink===a&&(se.labeledLink=null)}),E.each(function(se){se=x.Vb(se),se!==null&&se.labeledLink!==a&&(se.labeledLink=a)}))}}else!(a instanceof di)&&(y=b.lh(y),y=x.findPartForKey(y),y===null||y instanceof jr)&&(a.containingGroup=y)}}},ea.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=fg(y,x),E=this.Lc(a);if(b!==null&&E!==null){b=b.iterator;for(var te={};b.next();){var ne=b.value;y.lb(ne)?E instanceof jr&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=E)):(te.link=this.Kc(ne),te.link!==null&&E instanceof Rn&&(_s(y,ne,!0)===x&&(te.link.fromNode=E),_s(y,ne,!1)===x&&(te.link.toNode=E),ne=y.Ef(ne),Array.isArray(ne)&&ne.some(function(se){return function(he){return he===x?(E.labeledLink=se.link,!0):!1}}(te)))),te={link:te.link}}Bl(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof jr&&(E.containingGroup=a))}},ea.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Rn){var x=y.wa(a.data);if(x!==void 0){for(var b=a.linksConnected;b.next();)Dl(y,x,b.value.data);if(a.isLinkLabel&&(b=a.labeledLink,b!==null&&Dl(y,x,b.data)),a instanceof jr)for(a=a.memberParts;a.next();)b=a.value.data,y.lb(b)&&Dl(y,x,b)}}},ea.prototype.copyPartData=function(a,y){var x=Mi.prototype.copyPartData.call(this,a,y);if(a instanceof Tn)if(a=a.data,a!==null&&y!==null){var b=y.model;a=b.Jo(a),typeof a=="object"&&a!==null&&(b.fi(a),x=y.Kc(a))}else x!==null&&(y=this.diagram,a!==null&&y!==null&&y.commandHandler!==null&&y.commandHandler.copiesClipboardData&&(y=y.model.Jo(a),typeof y=="object"&&y!==null&&(x.data=y)));return x},ea.prototype.insertLink=function(a,y,x,b){var E=this.diagram,te=E.model,ne=E.toolManager.findTool("Linking"),se="";if(a!==null&&(y===null&&(y=a),se=y.portId,se===null&&(se="")),y="",x!==null&&(b===null&&(b=x),y=b.portId,y===null&&(y="")),b=ne.archetypeLinkData,b instanceof Tn){if(ul(b),te=b.copy(),te!==null)return te.fromNode=a,te.fromPortId=se,te.toNode=x,te.toPortId=y,E.add(te),a=ne.archetypeLabelNodeData,a instanceof Rn&&(ul(a),a=a.copy(),a!==null&&(a.labeledLink=te,E.add(a))),te}else if(b!==null&&(b=te.Jo(b),typeof b=="object"&&b!==null))return a!==null&&Ud(te,b,te.wa(a.data),!0),Wd(te,b,se,!0),x!==null&&Ud(te,b,te.wa(x.data),!1),Wd(te,b,y,!1),te.fi(b),a=ne.archetypeLabelNodeData,a===null||a instanceof Rn||(a=te.copyNodeData(a),typeof a=="object"&&a!==null&&(te.xf(a),a=te.wa(a),a!==void 0&&te.Bu(b,a))),E.Kc(b);return null},ea.prototype.findLinkForKey=ea.prototype.findLinkForKey,ea.prototype.findPartForKey=ea.prototype.findPartForKey,ea.prototype.removeAllModeledParts=ea.prototype.removeAllModeledParts,ea.prototype.addModeledParts=ea.prototype.addModeledParts,ea.prototype.addAllModeledParts=ea.prototype.addAllModeledParts,ea.className="GraphLinksPartManager";function Js(){Mi.apply(this,arguments),this.Sg=null}nn(Js,Mi);function s0(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var b=a.diagram.toolManager.findTool("Linking"),E=y,te=x;if(a.diagram.isTreePathToChildren||(E=x,te=y),(b===null||!Ua(b,E,te,null,!0))&&(y=a.getLinkCategoryForData(x.data),b=a.findLinkTemplateForCategory(y),b!==null&&(ul(b),b=b.copy(),b!==null))){var ne=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=y,b.ub=x.data,b.fromNode=E,b.toNode=te,a.diagram.add(b),b.ub=null,b.data=x.data,a.diagram.skipsModelSourceBindings=ne}}}Js.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},Js.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},Js.prototype.setFromNodeForLink=function(a,y,x){var b=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren)b.qe(a.data,b.wa(y));else{var E=this.Sg;this.Sg=a,x!==null&&b.qe(x.data,void 0),b.qe(y,b.wa(a.toNode!==null?a.toNode.data:null)),this.Sg=E}},Js.prototype.setToNodeForLink=function(a,y,x){var b=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren){var E=this.Sg;this.Sg=a,x!==null&&b.qe(x.data,void 0),b.qe(y,b.wa(a.fromNode!==null?a.fromNode.data:null)),this.Sg=E}else b.qe(a.data,b.wa(y))},Js.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},Js.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},Js.prototype.doModelChanged=function(a){if(Mi.prototype.doModelChanged.call(this,a),this.diagram){var y=this.diagram;if(a.model===y.model){var x=a.change;if(y.aa){y.aa=!1;try{var b=a.modelChange;if(b!==""){if(x===to){if(b==="nodeParentKey"){var E=a.object,te=this.Vb(a.newValue),ne=this.ii(E);if(this.Sg!==null)te!==null&&(this.Sg.data=E,this.Sg.category=this.getLinkCategoryForData(E));else if(ne!==null){var se=ne.kh();se!==null?te===null?y.remove(se):y.isTreePathToChildren?se.fromNode=te:se.toNode=te:s0(this,te,ne)}}else if(b==="parentLinkCategory"){var he=this.ii(a.object),pe=a.newValue;if(he!==null&&typeof pe=="string"){var ye=he.kh();ye!==null&&(ye.category=pe)}}y.isModified=!0}}else if(x===to){var Te=a.propertyName;a.object===y.model&&Te==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},Js.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var b=x.model;a instanceof Rn&&(y=b.mh(y),y=x.Vb(y),b=a.pg(),y!==b&&(b=a.kh(),y!==null?b!==null?x.isTreePathToChildren?b.fromNode=y:b.toNode=y:s0(this,y,a):b!==null&&Ep(x,b,!1)))}}},Js.prototype.updateDataBindings=function(a,y){Mi.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},Js.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var b=fg(y,x),E=this.Lc(a);if(b!==null&&E!==null){for(b=b.iterator;b.next();){var te=b.value;y.lb(te)&&E instanceof Rn&&y.mh(te)===x&&s0(this,E,this.ii(te))}Bl(y,x)}a=y.mh(a),a!==void 0&&E instanceof Rn&&(a=this.Vb(a),s0(this,a,E))}},Js.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Rn){var x=y.wa(a.data),b=this.Kc(a.data);if(b!==null){b.isSelected=!1,b.isHighlighted=!1;var E=b.layer;if(E!==null){var te=E.pc(-1,b,!1);0<=te&&this.diagram.cb(Eo,"parts",E,b,null,te,null),te=b.layerChanged,te!==null&&te(b,E,null)}}for(b=this.diagram.isTreePathToChildren,a=a.linksConnected;a.next();)E=a.value,E=(b?E.toNode:E.fromNode).data,y.lb(E)&&Dl(y,x,E)}},Js.prototype.insertLink=function(a,y,x){y=this.diagram.model;var b=a,E=x;return this.diagram.isTreePathToChildren||(b=x,E=a),b!==null&&E!==null?(y.qe(E.data,y.wa(b.data)),E.kh()):null},Js.prototype.findLinkForKey=Js.prototype.findLinkForKey,Js.className="TreePartManager";function ir(a,y){this.kl=new xn,this.il=new xn,this.Wv=`,
"insertedNodeKeys": `,this.jy=`,
"modifiedNodeData": `,this.Yv=`,
"removedNodeKeys": `,this.vh=null,yr(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new Jt,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 Jt,this.Lt=new yn,this.Wg=!1,this.o=null,this.undoManager=new ho,a!==void 0&&(Un(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}ir.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},ir.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},ir.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},ir.prototype.toString=function(a){if(a===void 0&&(a=0),1<a)return this.np();var y=(this.name!==""?this.name:"")+" Model";if(0<a){y+=`
node data:`,a=this.nodeDataArray;for(var x=a.length,b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+Rr(E)}}return y},ir.prototype.xA=function(a){a.change!==Ea&&Ot("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof zo?(wS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},ir.prototype.Qv=function(a,y){var x=this,b=!1,E=new xn,te=new xn,ne=new xn,se=this.vh;a.changes.each(function(Te){Te.model===x&&(Te.modelChange==="nodeDataArray"?Te.change===Po?E.add(Te.newValue):Te.change===Eo&&ne.add(Te.oldValue):x.lb(Te.object)?te.add(Te.object):Te.change!==to||x.modelData!==Te.object&&Te.propertyName!=="modelData"?Te.object!==null&&(se&&se.contains(Te.object)?se.get(Te.object).each(function(ze){x.lb(ze)&&te.add(ze)}):Te.object instanceof ir||x.ri()&&x.Jc(Te.object)||PS(x,Te.object).each(function(ze){te.add(ze)})):b=!0)});var he=this.il;he.clear(),E.each(function(Te){he.add(x.wa(Te)),y||te.add(Te)});var pe=this.kl;pe.clear(),ne.each(function(Te){pe.add(x.wa(Te)),y&&te.add(Te)}),a=x.cloneDeep(te.Fa());var ye=null;return b&&(ye===null&&(ye={}),ye.modelData=this.cloneDeep(this.modelData)),0<he.count&&(ye===null&&(ye={}),y?ye.removedNodeKeys=he.Fa():ye.insertedNodeKeys=he.Fa()),0<a.length&&(ye===null&&(ye={}),ye.modifiedNodeData=a),0<pe.count&&(ye===null&&(ye={}),y?ye.insertedNodeKeys=pe.Fa():ye.removedNodeKeys=pe.Fa()),pe.clear(),he.clear(),ye},ir.prototype.cloneDeep=function(a){return Gd(this,a,!0)};function Gd(a,y,x,b,E,te){function ne(Te,ze){se?(Te.__gohashid===void 0&&te.push(Te),b.set(Te,ze)):(Te=Zi++,b.set(Te,ze),E.set(Te,y))}if(!an(y))return y;te||(te=[]);var se=Object.isExtensible(y);if(b||(b=new Jt),se){var he=b.get(y);if(he)return he}else for(E||(E=new Jt),he=E.iterator;he.next();){var pe=he.key;if(he.value===y&&(pe=b.get(pe)))return pe}if(Array.isArray(y)){he=[],ne(y,he);for(var ye=0;ye<y.length;ye++)he.push(Gd(a,y[ye],!1,b,E,te))}else if(y instanceof lt||y instanceof fn||y instanceof Yt||y instanceof Dr||y instanceof Nn)he=y.copy(),ne(y,he);else{if(y instanceof Ti||y instanceof Mn||y instanceof un)return y;if(y instanceof yn)he=new yn().addAll(Gd(a,y.Fa(),!1,b,E,te)),ne(y,he);else if(y instanceof xn)he=new xn().addAll(Gd(a,y.Fa(),!1,b,E,te)),ne(y,he);else if(y instanceof Jt)he=new Jt().addAll(Gd(a,y.Fa(),!1,b,E,te)),ne(y,he);else if(y instanceof Date)he=new Date(y.getTime()),ne(y,he);else if(y instanceof RegExp)he=new RegExp(y),ne(y,he),he.lastIndex=y.lastIndex;else if(typeof y.copy=="function")he=y.copy(),ne(y,he);else for(ye in he={},ne(y,he),y)ye!=="__gohashid"&&(he[ye]=Gd(a,y[ye],!1,b,E,te))}return x&&te.forEach(function(Te){delete Te.__gohashid}),he}et=ir.prototype,et.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},et.rm=function(){var a="";return this.name!==""&&(a+=`,
"name": `+this.quote(this.name)),this.dataFormat!==""&&(a+=`,
"dataFormat": `+this.quote(this.dataFormat)),this.isReadOnly&&(a+=`,
"isReadOnly": `+this.isReadOnly),this.nodeKeyProperty!=="key"&&typeof this.nodeKeyProperty=="string"&&(a+=`,
"nodeKeyProperty": `+this.quote(this.nodeKeyProperty)),this.copiesArrays&&(a+=`,
"copiesArrays": true`),this.copiesArrayObjects&&(a+=`,
"copiesArrayObjects": true`),this.copiesKey||(a+=`,
"copiesKey": false`),this.nodeCategoryProperty!=="category"&&typeof this.nodeCategoryProperty=="string"&&(a+=`,
"nodeCategoryProperty": `+this.quote(this.nodeCategoryProperty)),a},et.gp=function(a){a.name&&(this.name=a.name),a.dataFormat&&(this.dataFormat=a.dataFormat),a.isReadOnly&&(this.isReadOnly=!0),a.nodeKeyProperty&&(this.nodeKeyProperty=a.nodeKeyProperty),a.copiesArrays&&(this.copiesArrays=!0),a.copiesArrayObjects&&(this.copiesArrayObjects=!0),a.copiesKey===!1&&(this.copiesKey=!1),a.nodeCategoryProperty&&(this.nodeCategoryProperty=a.nodeCategoryProperty)};function xS(a,y){y=y.modelData,an(y)&&(a.dm(y),a.modelData=y)}et.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!bS(x,a[x])){y=!0;break}return a="",y&&(a=`,
"modelData": `+hy(this,this.modelData)),a+`,
"nodeDataArray": `+sc(this,this.nodeDataArray,!0)},et.kv=function(a){xS(this,a),a=a.nodeDataArray,Un(a)&&(this.dm(a),this.nodeDataArray=a)};function wS(a,y){function x(E,te){if((te=te.part)&&(te=te.data,E!==te)){var ne=b.get(E);ne===null?(ne=new xn,ne.add(te),b.add(E,ne)):ne.add(te)}}var b=a.vh;b===null&&(b=new Jt,y.changes.each(function(E){if(E.diagram!==null){var te=E.change;te===to?(E=E.object.panel)&&(te=E.data)&&x(te,E):(te===Po||te===Eo)&&(E=E.object,(te=E.itemArray)&&x(te,E))}}),a.vh=b)}function PS(a,y){for(var x=new xn,b=0;b<a.nodeDataArray.length;b++){var E=a.nodeDataArray[b];l0(a,y,E,E,x)}return x}function l0(a,y,x,b,E){if(Array.isArray(x))for(var te=0;te<x.length;te++){var ne=x[te];if(ne===y)return E.add(b),!0;if(l0(a,y,ne,b,E))return!0}else if(an(x)&&Object.getPrototypeOf(x)===Object.prototype)for(te in x){if(ne=x[te],ne===y)return E.add(b),!0;if(l0(a,y,ne,b,E))return!0}return!1}et.Pv=function(a,y){var x=this,b=!1,E=new xn,te=new xn,ne=new xn,se=this.vh;a.changes.each(function(ye){ye.model===x&&(ye.modelChange==="nodeDataArray"?ye.change===Po?E.add(ye.newValue):ye.change===Eo&&ne.add(ye.oldValue):x.lb(ye.object)?te.add(ye.object):ye.change!==to||x.modelData!==ye.object&&ye.propertyName!=="modelData"?ye.object!==null&&(se&&se.contains(ye.object)?se.get(ye.object).each(function(Te){x.lb(Te)&&te.add(Te)}):ye.object instanceof ir||x.ri()&&x.Jc(ye.object)||PS(x,ye.object).each(function(Te){te.add(Te)})):b=!0)});var he=this.il;he.clear(),E.each(function(ye){he.add(x.wa(ye)),y||te.add(ye)});var pe=this.kl;return pe.clear(),ne.each(function(ye){pe.add(x.wa(ye)),y&&te.add(ye)}),a="",b&&(a+=`,
"modelData": `+hy(this,this.modelData)),0<he.count&&(a+=(y?this.Yv:this.Wv)+sc(this,he.Fa(),!0)),0<te.count&&(a+=this.jy+sc(this,te.Fa(),!0)),0<pe.count&&(a+=(y?this.Wv:this.Yv)+sc(this,pe.Fa(),!0)),pe.clear(),he.clear(),a},et.fp=function(a){(a.name!==void 0&&a.name!==this.name||a.dataFormat!==void 0&&a.dataFormat!==this.dataFormat||a.isReadOnly!==void 0&&a.isReadOnly!==this.isReadOnly||a.nodeKeyProperty!==void 0&&a.nodeKeyProperty!==this.nodeKeyProperty||a.copiesArrays!==void 0&&a.copiesArrays!==this.copiesArrays||a.copiesArrayObjects!==void 0&&a.copiesArrayObjects!==this.copiesArrayObjects||a.copiesKey!==void 0&&a.copiesKey!==this.copiesKey||a.nodeCategoryProperty!==void 0&&a.nodeCategoryProperty!==this.nodeCategoryProperty)&&Ot("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,b=new Jt;if(Array.isArray(x))for(var E=0;E<x.length;E++){var te=x[E],ne=this.wa(te);ne!=null&&b.set(ne,te)}if(Array.isArray(y))for(E=y.length,te=0;te<E;te++){ne=y[te];var se=this.hc(ne);se===null&&(se=(se=b.get(ne))?se:this.copyNodeData({}),this.km(se,ne),this.xf(se))}if(Array.isArray(x)){for(y=x.length,b=0;b<y;b++)if(E=x[b],te=this.wa(E),te=this.hc(te),te!==null){for(var he in E)he==="__gohashid"||he===this.nodeKeyProperty||this.Wj()&&he===this.nodeIsGroupProperty||this.setDataProperty(te,he,E[he]);this.lm(E,te)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,he=0;he<x;he++)y=this.hc(a[he]),y!==null&&this.cm(y)},et.$x=function(a,y){a.change!==Ea&&Ot("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof zo?(y===void 0&&(y=dg(this,this)),wS(this,x),a=this.Pv(x,a.propertyName==="FinishedUndo"),this.vh=null,y==="2"?'{ "incremental": 2'+a+"}":'{ "class": '+this.quote(y)+', "incremental": 1'+this.rm()+a+"}"):'{ "incremental": 0 }'},et.yA=function(a,y){return this.$x(a,y)},et.np=function(a){return a===void 0&&(a=dg(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},et.toJSON=function(a){return this.np(a)},et.Zw=function(a){var y=null;if(typeof a=="string")try{y=An.JSON.parse(a)}catch(b){}else typeof a=="object"?y=a:Ot("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Ot("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},et.Ky=function(a){return this.Zw(a)},ir.constructGraphLinksModel=function(){return new ir},et=ir.prototype,et.dm=function(a){if(Un(a))for(var y=a.length,x=0;x<y;x++){var b=a[x];if(an(b)){var E=x;b=this.dm(b),Array.isArray(a)?a[E]=b:Ot("Cannot replace an object in an HTMLCollection or NodeList at "+E)}}else if(an(a)){for(y in a)if(x=a[y],an(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(E=x.length%2===0,b=0;b<x.length;b++)if(typeof x[b]!="number"){E=!1;break}if(E){for(E=new yn,b=0;b<x.length/2;b++)E.add(new lt(x[2*b],x[2*b+1]));E.freeze(),a[y]=E}}return jx(a)}return a},et.sm=function(a){return a===void 0?"undefined":a===null?"null":a===!0?"true":a===!1?"false":typeof a=="string"?this.quote(a):typeof a=="number"?a===1/0?"9e9999":a===-1/0?"-9e9999":isNaN(a)?'{"class":"NaN"}':a.toString():a instanceof Date?'{"class":"Date", "value":"'+a.toJSON()+'"}':a instanceof Number?this.sm(a.valueOf()):Un(a)?sc(this,a):an(a)?hy(this,a):typeof a=="function"?"null":a.toString()};function sc(a,y,x){x===void 0&&(x=!1);var b=y.length;if(0>=b)return"[]";var E=new cr;E.add("["),x&&1<b&&E.add(`
`);for(var te=0;te<b;te++){var ne=y[te];ne!==void 0&&(0<te&&(E.add(","),x&&E.add(`
`)),E.add(a.sm(ne)))}return x&&1<b&&E.add(`
`),E.add("]"),E.toString()}function bS(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function Qa(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function hy(a,y){var x=y;if(x instanceof lt)y={class:"go.Point",x:Qa(x.x),y:Qa(x.y)};else if(x instanceof fn)y={class:"go.Size",width:Qa(x.width),height:Qa(x.height)};else if(x instanceof Yt)y={class:"go.Rect",x:Qa(x.x),y:Qa(x.y),width:Qa(x.width),height:Qa(x.height)};else if(x instanceof Dr)y={class:"go.Margin",top:Qa(x.top),right:Qa(x.right),bottom:Qa(x.bottom),left:Qa(x.left)};else if(x instanceof Nn)x.sb()?y={class:"go.Spot",x:Qa(x.x),y:Qa(x.y),offsetX:Qa(x.offsetX),offsetY:Qa(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof Ti){if(y={class:"go.Brush",type:x.type.name},x.type===Sh?y.color=x.color:(x.type===Ku||x.type===Ys)&&(y.start=x.start,y.end=x.end,x.type===Ys&&(x.startRadius!==0&&(y.startRadius=Qa(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=Qa(x.endRadius)))),x.colorStops!==null){var b={};for(x=x.colorStops.iterator;x.next();)b[x.key]=x.value;y.colorStops=b}}else x instanceof Mn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=Qa(x.startX)),x.startY!==0&&(y.startY=Qa(x.startY)),x.endX!==0&&(y.endX=Qa(x.endX)),x.endY!==0&&(y.endY=Qa(x.endY)),x.spot1.D(wi)||(y.spot1=x.spot1),x.spot2.D(io)||(y.spot2=x.spot2),x.type===Mn.o&&(y.path=Mn.ia(x))):x instanceof un&&(y={class:"go.EnumValue",classType:dg(a,x.classType),name:x.name});b="{",x=!0;for(var E in y){var te=bo(y,E);if(!bS(E,te))if(x?x=!1:b+=",",b+=a.quote(E)+":",E==="points"&&te instanceof yn){var ne="[";for(te=te.iterator;te.next();){var se=te.value;1<ne.length&&(ne+=","),ne+=a.sm(se.x),ne+=",",ne+=a.sm(se.y)}ne+="]",b+=ne}else b+=a.sm(te)}return b+"}"}function qa(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function jx(a){if(typeof a!="object")return a;var y=a.class||"";if(y==="NaN")return NaN;if(y==="Date")return new Date(a.value);if(y.indexOf("go.")!==0)return a;y=y.substr(3);var x=a;if(y==="Point")x=new lt(qa(a.x),qa(a.y));else if(y==="Size")x=new fn(qa(a.width),qa(a.height));else if(y==="Rect")x=new Yt(qa(a.x),qa(a.y),qa(a.width),qa(a.height));else if(y==="Margin")x=new Dr(qa(a.top),qa(a.right),qa(a.bottom),qa(a.left));else if(y==="Spot")typeof a.enum=="string"?x=la(a.enum):x=new Nn(qa(a.x),qa(a.y),qa(a.offsetX),qa(a.offsetY));else if(y==="Brush"){if(x=new Ti,x.type=Xn(Ti,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof Nn&&(x.start=a.start),a.end instanceof Nn&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=qa(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=qa(a.endRadius)),a=a.colorStops,an(a))for(var b in a)x.addColorStop(parseFloat(b),a[b])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=Mn.parse(a.path):x=new Mn,x.type=Xn(Mn,a.type),typeof a.startX=="number"&&(x.startX=qa(a.startX)),typeof a.startY=="number"&&(x.startY=qa(a.startY)),typeof a.endX=="number"&&(x.endX=qa(a.endX)),typeof a.endY=="number"&&(x.endY=qa(a.endY)),a.spot1 instanceof Nn&&(x.spot1=a.spot1),a.spot2 instanceof Nn&&(x.spot2=a.spot2)):y==="EnumValue"&&(b=a.classType,b.indexOf("go.")===0&&(b=b.substr(3)),b=fy(b),typeof b=="function"&&(x=Xn(b,a.name)));return x}et.Pe=function(a){return this.Lt.add(a),this},et.ik=function(a){this.Lt.remove(a)},et.ds=function(a){this.skipsUndoManager||this.undoManager.Tu(a);for(var y=this.Lt,x=y.length,b=0;b<x;b++)y.M(b)(a)},et.cb=function(a,y,x,b,E,te,ne){Ro(this,"",a,y,x,b,E,te,ne)},et.g=function(a,y,x,b,E){Ro(this,"",to,a,this,y,x,b,E)},et.Fs=function(a,y,x,b,E,te){Ro(this,"",to,y,a,x,b,E,te)};function Ro(a,y,x,b,E,te,ne,se,he){se===void 0&&(se=null),he===void 0&&(he=null);var pe=new oo;pe.model=a,pe.change=x,pe.modelChange=y,pe.propertyName=b,pe.object=E,pe.oldValue=te,pe.oldParam=se,pe.newValue=ne,pe.newParam=he,a.ds(pe)}ir.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===to){var x=a.object,b=a.propertyName,E=a.I(y);b===this.nodeKeyProperty&&this.lb(x)&&(y=a.I(!y),y!==void 0&&this.kb.remove(y),E!==void 0&&this.kb.add(E,x)),no(x,b,E)}else a.change===Po?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,an(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]===a&&ur(this.Tc,x),b!==void 0&&this.kb.remove(b)):(this.Tc[x]!==a&&On(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)))):a.modelChange===""?((b=a.object)&&!Un(b)&&a.propertyName&&(b=bo(a.object,a.propertyName)),Un(b)&&typeof x=="number"&&(a=a.newValue,y?ur(b,x):On(b,x,a))):Ot("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Eo?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,an(a)&&typeof x=="number"&&(b=this.wa(a),y?(this.Tc[x]!==a&&On(this.Tc,x,a),b!==void 0&&this.kb.add(b,a)):(this.Tc[x]===a&&ur(this.Tc,x),b!==void 0&&this.kb.remove(b)))):a.modelChange===""?((b=a.object)&&!Un(b)&&a.propertyName&&(b=bo(a.object,a.propertyName)),Un(b)&&typeof x=="number"&&(a=a.oldValue,y?On(b,x,a):ur(b,x))):Ot("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Ea&&Ot("unknown ChangedEvent: "+a.toString())},ir.prototype.Ea=function(a){return this.undoManager.Ea(a)},ir.prototype.eb=function(a){return this.undoManager.eb(a)},ir.prototype.Kf=function(){return this.undoManager.Kf()},ir.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var b=!1;try{a(this),b=!0}finally{b?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},et=ir.prototype,et.La=function(a,y){y===void 0&&(y=""),Ro(this,"SourceChanged",Ea,y,a,null,null)},et.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=bo(a,y),y!==void 0)){if(lc(y))return y;Ot("Key value for node data "+a+" is not a number or a string: "+y)}}},et.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var b=bo(a,x);b!==y&&this.hc(y)===null&&(no(a,x,y),b!==void 0&&this.kb.remove(b),this.kb.add(y,a),Ro(this,"nodeKey",to,x,a,b,y),typeof x=="string"&&this.La(a,x),this.jp(b,y))}else no(a,x,y)}};function lc(a){return typeof a=="number"||typeof a=="string"}et.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},et.hc=function(a){return a===null&&Ot("Model.findNodeDataForKey:key must not be null"),a!==void 0&&lc(a)?this.kb.I(a):null},et.$u=function(a){if(a!==null){var y=this.Th;if(y!==""){var x=this.wa(a);if(x===void 0||this.kb.contains(x)){var b=this.bl;if(b!==null&&(x=b(this,a),x!=null&&!this.kb.contains(x))){no(a,y,x);return}if(typeof x=="string"){for(b=2;this.kb.contains(x+b);)b++;no(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;no(a,y,x)}}}}},et.xf=function(a){a!==null&&(Nr(a),this.lb(a)||CS(this,a,!0))};function CS(a,y,x){var b=a.wa(y);(b===void 0||a.kb.I(b)!==y)&&(a.$u(y),b=a.wa(y),b===void 0&&Ot("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(b,y),b=null,x&&(b=a.Tc.length,On(a.Tc,b,y)),Ro(a,"nodeDataArray",Po,"nodeDataArray",a,null,y,null,b),a.fm(y),a.em(y))}et.Fy=function(a){if(Un(a))for(var y=a.length,x=0;x<y;x++)this.xf(a[x]);else for(a=a.iterator;a.next();)this.xf(a.value)},et.cm=function(a){a!==null&&ES(this,a,!0)};function ES(a,y,x){var b=a.wa(y);if(b!==void 0&&a.kb.remove(b),b=null,x){e:if(x=a.Tc,Array.isArray(x))b=x.indexOf(y);else{b=x.length;for(var E=0;E<b;E++)if(x[E]===y){b=E;break e}b=-1}if(0>b)return;ur(a.Tc,b)}Ro(a,"nodeDataArray",Eo,"nodeDataArray",a,y,null,b,null),a.qp(y)}et.nA=function(a){if(Un(a))for(var y=a.length,x=0;x<y;x++)this.cm(a[x]);else for(a=a.iterator;a.next();)this.cm(a.value)},et.$z=function(a){if(a!==this.nodeDataArray&&Un(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var b=a.length,E=0;E<b;E++){var te=a[E],ne=this.wa(te);if(ne!==void 0){x.add(ne);var se=this.hc(ne);se!==te&&(se!==null?(this.Do(se,te),this.lm(te,se)):(te=this.cloneDeep(te),this.km(te,ne),this.xf(te)))}else ne=this.cloneDeep(te),this.xf(ne),x.add(this.wa(ne))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.hc(b))&&this.cm(b);y.clear(),x.clear()}},et.jp=function(a,y){y!==void 0&&(a=fg(this,a),a instanceof xn&&this.Vf.add(y,a))},et.Lv=function(){},et.fm=function(){},et.em=function(){},et.qp=function(){};function Dl(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b===null&&(b=new xn,a.Vf.add(y,b)),b.add(x)}}function Bl(a,y,x){if(y!==void 0){var b=a.Vf.I(y);b instanceof xn&&(x==null?a.Vf.remove(y):(b.remove(x),b.count===0&&a.Vf.remove(y)))}}function fg(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof xn?a:null)}et.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},ir.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):u0(this,a,!0),an(a)&&yr(a),a};function u0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var b=[];for(x=0;x<y.length;x++){var E=u0(a,y[x],a.copiesArrayObjects);b.push(E)}return yr(b),b}if(x&&an(y)){x=(x=y.constructor)?new x:{},E=a.copiesKey||typeof a.nodeKeyProperty!="string"?null:a.nodeKeyProperty;for(b in y)if(b==="__gohashid")x.__gohashid=void 0;else if(b===E)x[E]=void 0;else{var te=bo(y,b),ne=dg(a,te);ne==="GraphObject"||ne==="Diagram"||ne==="Layer"||ne==="RowColumnDefinition"||ne==="AnimationManager"||ne==="Tool"||ne==="CommandHandler"||ne==="Layout"||ne==="InputEvent"||ne==="DiagramEvent"||te instanceof ir||te instanceof ho||te instanceof zo||te instanceof oo||(te=u0(a,te,!1)),no(x,b,te)}return yr(x),x}return y instanceof lt||y instanceof fn||y instanceof Yt||y instanceof Nn||y instanceof Dr?y.copy():y}ir.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}}else!kS&&a instanceof zt&&(kS=!0,qn('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),qn(" Is that really your intent?"));var b=bo(a,y);b!==x&&(no(a,y,x),this.Fs(a,y,b,x))},et=ir.prototype,et.set=function(a,y,x){this.setDataProperty(a,y,x)},et.Do=function(a,y){if(y){var x=this.lb(a),b;for(b in y)b==="__gohashid"||x&&b===this.nodeKeyProperty||this.setDataProperty(a,b,y[b])}},et.Ay=function(a,y){this.ts(a,-1,y)},et.ts=function(a,y,x){0>y&&(y=a.length),On(a,y,x),Ro(this,"",Po,"",a,null,x,null,y)},et.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Ot("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];ur(a,y),Ro(this,"",Eo,"",a,x,null,y,null)},et.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=bo(a,y),y===void 0))return"";if(typeof y=="string")return y;Ot("getCategoryForNodeData found a non-string category for "+a+": "+y)},et.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var b=bo(a,x);b===void 0&&(b=""),b!==y&&(no(a,x,y),Ro(this,"nodeCategory",to,x,a,b,y))}else no(a,x,y)}},et.lm=function(a,y){this.jm(y,this.Ro(a))},et.Tl=function(){return!1},et.Wj=function(){return!1},et.ri=function(){return!1},et.xs=function(){return!1},et.Xj=function(){return!1};function cy(){return new ir}function dg(a,y){if(typeof y=="function"){if(y.className)return y.className;if(y.name)return y.name}else if(typeof y=="object"&&y!==null&&y.constructor)return dg(a,y.constructor);return typeof y}function fy(a){return Pl[a]?Pl[a]:An.go!==void 0&&An.go[a]?An.go[a]:null}function bo(a,y){if(!a||!y)return null;try{if(typeof y=="function")var x=y(a);else typeof a.getAttribute=="function"?(x=a.getAttribute(y),x===null&&(x=void 0)):x=a[y]}catch(b){}return x}function no(a,y,x){if(a&&y)try{typeof y=="function"?y(a,x):typeof a.setAttribute=="function"?a.setAttribute(y,x):a[y]=x}catch(b){}}Zt.Object.defineProperties(ir.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===""&&Ot("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Ot("Cannot set Model.nodeKeyProperty when there is existing node data"),this.Th=a,this.g("nodeKeyProperty",y,a))}},makeUniqueKeyFunction:{get:function(){return this.bl},set:function(a){var y=this.bl;y!==a&&(this.bl=a,this.g("makeUniqueKeyFunction",y,a))}},nodeDataArray:{get:function(){return this.Tc},set:function(a){var y=this.Tc;if(y!==a){this.kb.clear(),this.Lv();for(var x=a.length,b=0;b<x;b++){var E=a[b];an(E)||Ot("Model.nodeDataArray must only contain Objects, not: "+E),Nr(E)}for(this.Tc=a,b=new yn,E=0;E<x;E++){var te=a[E],ne=this.wa(te);ne===void 0||this.kb.I(ne)!==null?b.add(te):this.kb.add(ne,te)}for(b=b.iterator;b.next();)E=b.value,this.$u(E),te=this.wa(E),te!==void 0&&this.kb.add(te,E);for(Ro(this,"nodeDataArray",to,"nodeDataArray",this,y,a),y=0;y<x;y++)b=a[y],this.fm(b),this.em(b);Array.isArray(a)||(this.isReadOnly=!0)}}},copyNodeDataFunction:{get:function(){return this.Bk},set:function(a){var y=this.Bk;y!==a&&(this.Bk=a,this.g("copyNodeDataFunction",y,a))}},copiesArrays:{get:function(){return this.Km},set:function(a){var y=this.Km;y!==a&&(this.Km=a,this.g("copiesArrays",y,a))}},copiesArrayObjects:{get:function(){return this.Jm},set:function(a){var y=this.Jm;y!==a&&(this.Jm=a,this.g("copiesArrayObjects",y,a))}},copiesKey:{get:function(){return this.Mm},set:function(a){var y=this.Mm;y!==a&&(this.Mm=a,this.g("copiesKey",y,a))}},afterCopyFunction:{get:function(){return this.xm},set:function(a){var y=this.xm;y!==a&&(this.xm=a,this.g("afterCopyFunction",y,a))}},nodeCategoryProperty:{get:function(){return this.lj},set:function(a){var y=this.lj;y!==a&&(this.lj=a,this.g("nodeCategoryProperty",y,a))}},type:{get:function(){return"Model"}}}),ir.prototype.setCategoryForNodeData=ir.prototype.jm,ir.prototype.getCategoryForNodeData=ir.prototype.Ro,ir.prototype.removeArrayItem=ir.prototype.ov,ir.prototype.insertArrayItem=ir.prototype.ts,ir.prototype.addArrayItem=ir.prototype.Ay,ir.prototype.assignAllDataProperties=ir.prototype.Do,ir.prototype.set=ir.prototype.set,ir.prototype.clearUnresolvedReferences=ir.prototype.Qy,ir.prototype.mergeNodeDataArray=ir.prototype.$z,ir.prototype.removeNodeDataCollection=ir.prototype.nA,ir.prototype.removeNodeData=ir.prototype.cm,ir.prototype.addNodeDataCollection=ir.prototype.Fy,ir.prototype.addNodeData=ir.prototype.xf,ir.prototype.makeNodeDataKeyUnique=ir.prototype.$u,ir.prototype.findNodeDataForKey=ir.prototype.hc,ir.prototype.containsNodeData=ir.prototype.lb,ir.prototype.setKeyForNodeData=ir.prototype.km,ir.prototype.getKeyForNodeData=ir.prototype.wa,ir.prototype.updateTargetBindings=ir.prototype.La,ir.prototype.commit=ir.prototype.commit,ir.prototype.rollbackTransaction=ir.prototype.Kf,ir.prototype.commitTransaction=ir.prototype.eb,ir.prototype.startTransaction=ir.prototype.Ea,ir.prototype.raiseDataChanged=ir.prototype.Fs,ir.prototype.raiseChanged=ir.prototype.g,ir.prototype.raiseChangedEvent=ir.prototype.cb,ir.prototype.removeChangedListener=ir.prototype.ik,ir.prototype.addChangedListener=ir.prototype.Pe,ir.prototype.writeJsonValue=ir.prototype.sm,ir.prototype.replaceJsonObjects=ir.prototype.dm,ir.prototype.applyIncrementalJSON=ir.prototype.Ky,ir.prototype.applyIncrementalJson=ir.prototype.Zw,ir.prototype.toJSON=ir.prototype.toJSON,ir.prototype.toJson=ir.prototype.np,ir.prototype.toIncrementalJSON=ir.prototype.yA,ir.prototype.toIncrementalJson=ir.prototype.$x,ir.prototype.toIncrementalData=ir.prototype.xA,ir.prototype.clear=ir.prototype.clear;var kS=!1,Pl={};ir.className="Model",ir.fromJSON=ir.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=An.JSON.parse(a)}catch(te){}else typeof a=="object"?x=a:Ot("Unable to construct a Model from: "+a);if(y===null){a=null;var b=x.class;if(typeof b=="string")try{var E=null;b.indexOf("go.")===0?(b=b.substr(3),E=fy(b)):(E=fy(b),E===null&&(E=An[b])),typeof E=="function"&&(a=new E)}catch(te){}a===null||a instanceof ir?y=a:Ot("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=ir.constructGraphLinksModel()),y.gp(x),y.kv(x),y},ir.safePropertyValue=bo,ir.safePropertySet=no,Pl.Brush=Ti,Pl.ChangedEvent=oo,Pl.Geometry=Mn,Pl.Margin=Dr,Pl.Panel=Cn,Pl.Point=lt,Pl.Rect=Yt,Pl.Size=fn,Pl.Spot=Nn,Pl.Transaction=zo,Pl.UndoManager=ho;function Mo(a,y,x,b){yr(this),this._isFrozen=!1,a===void 0&&(a=""),y===void 0&&(y=a),x===void 0&&(x=null),this.j=-1,this.xd=null,this.xl=a,this.wl=this.to=0,this.Cr=null,this.wn=!1,this.sl=y,this.Im=x,b===void 0?(this.el=MS,this.wk=null):(this.el=pg,this.wk=b),this.st=new xn}Mo.prototype.copy=function(){var a=new Mo;return a.xl=this.xl,a.to=this.to,a.wl=this.wl,a.Cr=this.Cr,a.wn=this.wn,a.sl=this.sl,a.Im=this.Im,a.el=this.el,a.wk=this.wk,a},et=Mo.prototype,et.qb=function(a){a.classType===Mo&&(this.mode=a)},et.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},et.freeze=function(){return this._isFrozen=!0,this},et.ka=function(){return this._isFrozen=!1,this},et.Kx=function(a){return a===void 0&&(a=null),this.mode=pg,this.backConverter=a,this},et.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},et.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function TS(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}et.Mv=function(a,y,x){var b=this.sl;if(x===void 0||b===""||b===x){x=this.xl;var E=this.Im;if(E===null&&x==="")qn("Binding error: target property is the empty string: "+this.toString());else{var te=y;if(b!==""&&(te=bo(y,b)),te!==void 0)if(E===null)x!==""&&no(a,x,te);else try{if(x!==""){var ne=E(te,a);no(a,x,ne)}else E(te,a)}catch(se){}}}},et.sp=function(a,y,x,b){if(this.el===pg){var E=this.xl;if(x===void 0||E===x){x=this.sl;var te=this.wk,ne=a;if(E!==""&&(ne=bo(a,E)),ne!==void 0&&!this.st.contains(a))try{this.st.add(a);var se=b!==null?b.diagram:null,he=se!==null?se.model:null;if(te===null){if(x!=="")he!==null?he.setDataProperty(y,x,ne):no(y,x,ne);else if(he!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var pe=b.itemIndex,ye=b.panel.itemArray;he.ov(ye,pe),he.ts(ye,pe,ne)}}else try{if(x!==""){var Te=te(ne,y,he);he!==null?he.setDataProperty(y,x,Te):no(y,x,Te)}else{var ze=te(ne,y,he);if(ze!==void 0&&he!==null&&b!==null&&0<=b.itemIndex&&b.panel!==null&&Array.isArray(b.panel.itemArray)){var Ze=b.itemIndex,$e=b.panel.itemArray;he.ov($e,Ze),he.ts($e,Ze,ze)}}}catch(it){}}finally{this.st.remove(a)}}}},Zt.Object.defineProperties(Mo.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&vn(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&vn(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&vn(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&vn(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&vn(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&vn(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&vn(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&vn(this),this.el=a}}}),Mo.prototype.updateSource=Mo.prototype.sp,Mo.prototype.updateTarget=Mo.prototype.Mv,Mo.prototype.ofModel=Mo.prototype.dA,Mo.prototype.ofObject=Mo.prototype.cp,Mo.prototype.makeTwoWay=Mo.prototype.Kx;var Ox="Binding",MS=new un(Mo,"OneWay",1),pg=new un(Mo,"TwoWay",2);Mo.className="Binding",Mo.parseEnum=function(a,y){return function(x){return x=Xn(a,x),x===null?y:x}},Mo.toString=Rr,Mo.OneWay=MS,Mo.TwoWay=pg;function oi(a,y,x){ir.call(this),this.Vv=`,
"insertedLinkKeys": `,this.iy=`,
"modifiedLinkData": `,this.Xv=`,
"removedLinkKeys": `,this.md=[],this.$f=new xn,this.wb=new Jt,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&&(Un(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}nn(oi,ir),oi.constructGraphLinksModel=ir.constructGraphLinksModel,oi.prototype.cloneProtected=function(a){ir.prototype.cloneProtected.call(this,a),a.Jh=this.Jh,a.cl=this.cl,a.Ak=this.Ak,a.lf=this.lf,a.mf=this.mf,a.ej=this.ej,a.fj=this.fj,a.dj=this.dj,a.je=this.je,a.jl=this.jl,a.Je=this.Je,a.Lm=this.Lm},et=oi.prototype,et.clear=function(){ir.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},et.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" GraphLinksModel";if(0<a){y+=`
node data:`,a=this.nodeDataArray;var x=a.length,b;for(b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+Rr(E)}for(y+=`
link data:`,a=this.linkDataArray,x=a.length,b=0;b<x;b++)E=a[b],y+=" "+_s(this,E,!0)+"-->"+_s(this,E,!1)}return y},et.Qv=function(a,y){this.linkKeyProperty===""&&Ot("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=ir.prototype.Qv.call(this,a,y),b=this,E=new xn,te=new xn,ne=new xn,se=this.vh;a.changes.each(function(ye){ye.model===b&&(ye.modelChange==="linkDataArray"?ye.change===Po?E.add(ye.newValue):ye.change===Eo&&ne.add(ye.oldValue):b.Jc(ye.object)?te.add(ye.object):ye.object!==null&&(ye.object!==null&&se&&se.contains(ye.object)?se.get(ye.object).each(function(Te){b.Jc(Te)&&te.add(Te)}):ye.object instanceof ir||b.lb(ye.object)||LS(b,ye.object).each(function(Te){te.add(Te)})))});var he=this.il;he.clear(),E.each(function(ye){he.add(b.Ac(ye)),y||te.add(ye)});var pe=this.kl;return pe.clear(),ne.each(function(ye){pe.add(b.Ac(ye)),y&&te.add(ye)}),a=b.cloneDeep(te.Fa()),0<he.count&&(x===null&&(x={}),y?x.removedLinkKeys=he.Fa():x.insertedLinkKeys=he.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<pe.count&&(x===null&&(x={}),y?x.insertedLinkKeys=pe.Fa():x.removedLinkKeys=pe.Fa()),pe.clear(),he.clear(),x},et.rm=function(){var a=ir.prototype.rm.call(this),y="";return this.linkCategoryProperty!=="category"&&typeof this.linkCategoryProperty=="string"&&(y+=`,
"linkCategoryProperty": `+this.quote(this.linkCategoryProperty)),this.linkKeyProperty!==""&&typeof this.linkKeyProperty=="string"&&(y+=`,
"linkKeyProperty": `+this.quote(this.linkKeyProperty)),this.linkFromKeyProperty!=="from"&&typeof this.linkFromKeyProperty=="string"&&(y+=`,
"linkFromKeyProperty": `+this.quote(this.linkFromKeyProperty)),this.linkToKeyProperty!=="to"&&typeof this.linkToKeyProperty=="string"&&(y+=`,
"linkToKeyProperty": `+this.quote(this.linkToKeyProperty)),this.linkFromPortIdProperty!==""&&typeof this.linkFromPortIdProperty=="string"&&(y+=`,
"linkFromPortIdProperty": `+this.quote(this.linkFromPortIdProperty)),this.linkToPortIdProperty!==""&&typeof this.linkToPortIdProperty=="string"&&(y+=`,
"linkToPortIdProperty": `+this.quote(this.linkToPortIdProperty)),this.linkLabelKeysProperty!==""&&typeof this.linkLabelKeysProperty=="string"&&(y+=`,
"linkLabelKeysProperty": `+this.quote(this.linkLabelKeysProperty)),this.nodeIsGroupProperty!=="isGroup"&&typeof this.nodeIsGroupProperty=="string"&&(y+=`,
"nodeIsGroupProperty": `+this.quote(this.nodeIsGroupProperty)),this.nodeGroupKeyProperty!=="group"&&typeof this.nodeGroupKeyProperty=="string"&&(y+=`,
"nodeGroupKeyProperty": `+this.quote(this.nodeGroupKeyProperty)),a+y},et.gp=function(a){ir.prototype.gp.call(this,a),a.linkKeyProperty&&(this.linkKeyProperty=a.linkKeyProperty),a.linkFromKeyProperty&&(this.linkFromKeyProperty=a.linkFromKeyProperty),a.linkToKeyProperty&&(this.linkToKeyProperty=a.linkToKeyProperty),a.linkFromPortIdProperty&&(this.linkFromPortIdProperty=a.linkFromPortIdProperty),a.linkToPortIdProperty&&(this.linkToPortIdProperty=a.linkToPortIdProperty),a.linkCategoryProperty&&(this.linkCategoryProperty=a.linkCategoryProperty),a.linkLabelKeysProperty&&(this.linkLabelKeysProperty=a.linkLabelKeysProperty),a.nodeIsGroupProperty&&(this.nodeIsGroupProperty=a.nodeIsGroupProperty),a.nodeGroupKeyProperty&&(this.nodeGroupKeyProperty=a.nodeGroupKeyProperty)},et.Rv=function(){var a=ir.prototype.Rv.call(this),y=`,
"linkDataArray": `+sc(this,this.linkDataArray,!0);return a+y},et.kv=function(a){ir.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function LS(a,y){for(var x=new xn,b=0;b<a.linkDataArray.length;b++){var E=a.linkDataArray[b];l0(a,y,E,E,x)}return x}et.Pv=function(a,y){this.linkKeyProperty===""&&Ot("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=ir.prototype.Pv.call(this,a,y),b=this,E=new xn,te=new xn,ne=new xn,se=this.vh;a.changes.each(function(ye){ye.model===b&&(ye.modelChange==="linkDataArray"?ye.change===Po?E.add(ye.newValue):ye.change===Eo&&ne.add(ye.oldValue):b.Jc(ye.object)?te.add(ye.object):ye.object!==null&&(ye.object!==null&&se&&se.contains(ye.object)?se.get(ye.object).each(function(Te){b.Jc(Te)&&te.add(Te)}):ye.object instanceof ir||b.lb(ye.object)||LS(b,ye.object).each(function(Te){te.add(Te)})))});var he=this.il;he.clear(),E.each(function(ye){he.add(b.Ac(ye)),y||te.add(ye)});var pe=this.kl;return pe.clear(),ne.each(function(ye){pe.add(b.Ac(ye)),y&&te.add(ye)}),a=x,0<he.count&&(a+=(y?this.Xv:this.Vv)+sc(this,he.Fa(),!0)),0<te.count&&(a+=this.iy+sc(this,te.Fa(),!0)),0<pe.count&&(a+=(y?this.Vv:this.Xv)+sc(this,pe.Fa(),!0)),pe.clear(),he.clear(),a},et.fp=function(a){(a.linkCategoryProperty!==void 0&&a.linkCategoryProperty!==this.linkCategoryProperty||a.linkKeyProperty!==void 0&&a.linkKeyProperty!==this.linkKeyProperty||a.linkFromKeyProperty!==void 0&&a.linkFromKeyProperty!==this.linkFromKeyProperty||a.linkToKeyProperty!==void 0&&a.linkToKeyProperty!==this.linkToKeyProperty||a.linkFromPortIdProperty!==void 0&&a.linkFromPortIdProperty!==this.linkFromPortIdProperty||a.linkToPortIdProperty!==void 0&&a.linkToPortIdProperty!==this.linkToPortIdProperty||a.linkLabelKeysProperty!==void 0&&a.linkLabelKeysProperty!==this.linkLabelKeysProperty||a.nodeIsGroupProperty!==void 0&&a.nodeIsGroupProperty!==this.nodeIsGroupProperty||a.nodeGroupKeyProperty!==void 0&&a.nodeGroupKeyProperty!==this.nodeGroupKeyProperty)&&Ot("applyIncrementalJson cannot change Model properties"),ir.prototype.fp.call(this,a);var y=a.insertedLinkKeys;if(Array.isArray(y))for(var x=y.length,b=0;b<x;b++){var E=y[b],te=this.jh(E);te===null&&(te=this.Jo({}),this.Ks(te,E),this.fi(te))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,b=0;b<x;b++)if(E=y[b],te=this.Ac(E),te=this.jh(te),te!==null){for(var ne in E)ne!=="__gohashid"&&ne!==this.linkKeyProperty&&this.setDataProperty(te,ne,E[ne]);jS(this,E,te)}}if(a=a.removedLinkKeys,Array.isArray(a))for(ne=a.length,y=0;y<ne;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},oi.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===to){var x=a.object,b=a.propertyName;if(b===this.linkKeyProperty&&this.Jc(x)){var E=a.I(y);y=a.I(!y),y!==void 0&&this.wb.remove(y),E!==void 0&&this.wb.add(E,x),no(x,b,E);return}}else if(a.change===Po){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,an(a)&&typeof x=="number"&&(b=this.Ac(a),y?(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),b!==void 0&&this.wb.remove(b)):(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),b!==void 0&&this.wb.add(b,a)));return}if(a.modelChange==="linkLabelKeys"){b=this.Ef(a.object),Array.isArray(b)&&typeof x=="number"&&(y?(x=b.indexOf(a.newValue),0<=x&&b.splice(x,1)):0>b.indexOf(a.newValue)&&b.splice(x,0,a.newValue));return}}else if(a.change===Eo){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,an(a)&&typeof x=="number"&&(b=this.Ac(a),y?(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),b!==void 0&&this.wb.add(b,a)):(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),b!==void 0&&this.wb.remove(b)));return}if(a.modelChange==="linkLabelKeys"){b=this.Ef(a.object),Array.isArray(b)&&typeof x=="number"&&(y?0>b.indexOf(a.newValue)&&b.splice(x,0,a.newValue):(x=b.indexOf(a.newValue),0<=x&&b.splice(x,1)));return}}ir.prototype.changeState.call(this,a,y)}},et=oi.prototype,et.Vl=function(a){if(a!==void 0){var y=this.Ri;if(y!==null){var x=this.hc(a);x===null&&(x=this.copyNodeData(y),no(x,this.nodeKeyProperty,a),this.xf(x))}return a}},et.yx=function(a){return _s(this,a,!0)},et.wv=function(a,y){Ud(this,a,y,!0)},et.Bx=function(a){return _s(this,a,!1)},et.Bv=function(a,y){Ud(this,a,y,!1)};function _s(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=bo(y,a),a!==void 0))){if(lc(a))return a;Ot((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Ud(a,y,x,b){if(x===null&&(x=void 0),y!==null){var E=b?a.lf:a.mf;if(E!=="")if(x=a.Vl(x),a.Jc(y)){var te=bo(y,E);te!==x&&(Bl(a,te,y),no(y,E,x),a.hc(x)===null&&Dl(a,x,y),Ro(a,b?"linkFromKey":"linkToKey",to,E,y,te,x),typeof E=="string"&&a.La(y,E))}else no(y,E,x)}}et.zx=function(a){return h0(this,a,!0)},et.xv=function(a,y){Wd(this,a,y,!0)},et.Cx=function(a){return h0(this,a,!1)},et.Cv=function(a,y){Wd(this,a,y,!1)};function h0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=bo(y,a),y===void 0?"":y)}function Wd(a,y,x,b){if(y!==null){var E=b?a.ej:a.fj;if(E!=="")if(a.Jc(y)){var te=bo(y,E);te===void 0&&(te=""),te!==x&&(no(y,E,x),Ro(a,b?"linkFromPortId":"linkToPortId",to,E,y,te,x),typeof E=="string"&&a.La(y,E))}else no(y,E,x)}}et.Ef=function(a){if(a===null)return c0;var y=this.je;return y===""?c0:(a=bo(a,y),a===void 0?c0:a)},et.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var b=bo(a,x);if(b===void 0&&(b=c0),b!==y){if(Array.isArray(b))for(var E=b.length,te=0;te<E;te++)Bl(this,b[te],a);for(no(a,x,y),E=y.length,te=0;te<E;te++){var ne=y[te];this.hc(ne)===null&&Dl(this,ne,a)}Ro(this,"linkLabelKeys",to,x,a,b,y),typeof x=="string"&&this.La(a,x)}}else no(a,x,y)}},et.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=bo(a,x);if(b===void 0)x=[],x.push(y),this.Ls(a,x);else if(Array.isArray(b)){var E=b.indexOf(y);0<=E||(E=b.length,b.push(y),this.Jc(a)&&(this.hc(y)===null&&Dl(this,y,a),Ro(this,"linkLabelKeys",Po,x,a,null,y,null,E)))}else Ot(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},et.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var b=bo(a,x);if(Array.isArray(b)){var E=b.indexOf(y);0>E||(b.splice(E,1),this.Jc(a)&&(Bl(this,y,a),Ro(this,"linkLabelKeys",Eo,x,a,y,null,E,null)))}else b!==void 0&&Ot(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},et.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=bo(a,y),y!==void 0)){if(lc(y))return y;Ot("Key value for link data "+a+" is not a number or a string: "+y)}}},et.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var b=bo(a,x);b!==y&&this.jh(y)===null&&(no(a,x,y),b!==void 0&&this.wb.remove(b),this.wb.add(y,a),Ro(this,"linkKey",to,x,a,b,y),typeof x=="string"&&this.La(a,x))}else no(a,x,y)}},et.jh=function(a){return a===null&&Ot("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&lc(a)?this.wb.I(a):null},et.Bs=function(a){if(a!==null){var y=this.Jh;if(y!==""){var x=this.Ac(a);if(x===void 0||this.wb.contains(x)){var b=this.cl;if(b!==null&&(x=b(this,a),x!=null&&!this.wb.contains(x))){no(a,y,x);return}if(typeof x=="string"){for(b=2;this.wb.contains(x+b);)b++;no(a,y,x+b)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;no(a,y,x)}}}}},et.Jc=function(a){return a===null?!1:this.$f.contains(a)},et.fi=function(a){a!==null&&(Nr(a),this.Jc(a)||NS(this,a,!0))};function NS(a,y,x){if(a.linkKeyProperty!==""){var b=a.Ac(y);if(b!==void 0&&a.wb.I(b)===y)return;a.Bs(y),b=a.Ac(y),b===void 0&&Ot("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(b,y)}a.$f.add(y),b=null,x&&(b=a.md.length,a.md.splice(b,0,y)),Ro(a,"linkDataArray",Po,"linkDataArray",a,null,y,null,b),dy(a,y)}et.Ey=function(a){if(Array.isArray(a))for(var y=a.length,x=0;x<y;x++)this.fi(a[x]);else for(a=a.iterator;a.next();)this.fi(a.value)},et.bm=function(a){a!==null&&AS(this,a,!0)};function AS(a,y,x){a.$f.remove(y);var b=a.Ac(y);if(b!==void 0&&a.wb.remove(b),b=null,x){if(b=a.md.indexOf(y),0>b)return;a.md.splice(b,1)}if(Ro(a,"linkDataArray",Eo,"linkDataArray",a,y,null,b,null),x=_s(a,y,!0),Bl(a,x,y),x=_s(a,y,!1),Bl(a,x,y),b=a.Ef(y),Array.isArray(b))for(var E=b.length,te=0;te<E;te++)x=b[te],Bl(a,x,y)}et.lA=function(a){if(Array.isArray(a))for(var y=a.length,x=0;x<y;x++)this.bm(a[x]);else for(a=a.iterator;a.next();)this.bm(a.value)},et.Zz=function(a){if(this.linkKeyProperty===""&&Ot("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&Un(a)){var y=this.kl;y.clear(),y.addAll(this.wb.iteratorKeys);var x=this.il;x.clear();for(var b=a.length,E=0;E<b;E++){var te=a[E],ne=this.Ac(te);if(ne!==void 0){x.add(ne);var se=this.jh(ne);se!==te&&(se!==null?(this.Do(se,te),jS(this,te,se)):(te=this.cloneDeep(te),this.Ks(te,ne),this.fi(te)))}else ne=this.cloneDeep(te),this.fi(ne),x.add(this.Ac(ne))}for(a=y.iterator;a.next();)b=a.value,x.contains(b)||(b=this.jh(b))&&this.bm(b);y.clear(),x.clear()}};function dy(a,y){var x=_s(a,y,!0);x=a.Vl(x),a.hc(x)===null&&Dl(a,x,y),x=_s(a,y,!1),x=a.Vl(x),a.hc(x)===null&&Dl(a,x,y);var b=a.Ef(y);if(Array.isArray(b))for(var E=b.length,te=0;te<E;te++)x=b[te],a.hc(x)===null&&Dl(a,x,y)}et.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):u0(this,a,!0),an(a)&&(yr(a),this.lf!==""&&no(a,this.lf,void 0),this.mf!==""&&no(a,this.mf,void 0),this.je!==""&&no(a,this.je,[])),a},et.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!bo(a,y)},et.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=bo(a,y),y!==void 0)){if(lc(y))return y;Ot("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},et.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var b=bo(a,x);b!==y&&(Bl(this,b,a),no(a,x,y),this.hc(y)===null&&Dl(this,y,a),Ro(this,"nodeGroupKey",to,x,a,b,y),typeof x=="string"&&this.La(a,x))}else no(a,x,y)}},oi.prototype.copyNodeData=function(a){return a===null?null:(a=ir.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||bo(a,this.Je)===void 0||no(a,this.Je,void 0),a)},oi.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeGroupKeyProperty){this.mp(a,x);return}}else if(this.Jc(a)){if(y===this.linkFromKeyProperty){Ud(this,a,x,!0);return}if(y===this.linkToKeyProperty){Ud(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Wd(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Wd(this,a,x,!1);return}if(y===this.linkKeyProperty){this.Ks(a,x);return}if(y===this.linkCategoryProperty){this.lp(a,x);return}if(y===this.linkLabelKeysProperty){this.Ls(a,x);return}}var b=bo(a,y);b!==x&&(no(a,y,x),this.Fs(a,y,b,x))},et=oi.prototype,et.Do=function(a,y){if(y){var x=this.lb(a),b=this.Jc(a),E;for(E in y)E==="__gohashid"||x&&E===this.nodeKeyProperty||x&&E===this.nodeIsGroupProperty&&bo(a,E)===y[E]||b&&E===this.linkKeyProperty||this.setDataProperty(a,E,y[E])}},et.jp=function(a,y){ir.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y);for(x=this.$f.iterator;x.next();){var b=x.value,E=a,te=y;if(_s(this,b,!0)===E){var ne=this.lf;no(b,ne,te),Ro(this,"linkFromKey",to,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)}if(_s(this,b,!1)===E&&(ne=this.mf,no(b,ne,te),Ro(this,"linkToKey",to,ne,b,E,te),typeof ne=="string"&&this.La(b,ne)),ne=this.Ef(b),Array.isArray(ne))for(var se=ne.length,he=this.je,pe=0;pe<se;pe++)ne[pe]===E&&(ne[pe]=te,Ro(this,"linkLabelKeys",Po,he,b,E,te,pe,pe))}},et.qv=function(a,y,x){if(this.lh(a)===y){var b=this.Je;no(a,b,x),Ro(this,"nodeGroupKey",to,b,a,y,x),typeof b=="string"&&this.La(a,b)}},et.Lv=function(){ir.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)dy(this,a[x])},et.fm=function(a){ir.prototype.fm.call(this,a),a=this.wa(a);var y=fg(this,a);if(y!==null){var x=$n();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)){if(this.lh(b)===a){var E=this.Je;Ro(this,"nodeGroupKey",to,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}else if(_s(this,b,!0)===a&&(E=this.lf,Ro(this,"linkFromKey",to,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),_s(this,b,!1)===a&&(E=this.mf,Ro(this,"linkToKey",to,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)),E=this.Ef(b),Array.isArray(E))for(var te=E.length,ne=this.je,se=0;se<te;se++)E[se]===a&&(Ro(this,"linkLabelKeys",Po,ne,b,a,a,se,se),x.push(b))}for(y=0;y<x.length;y++)Bl(this,a,x[y]);Wn(x)}},et.em=function(a){ir.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&Dl(this,y,a)},et.qp=function(a){ir.prototype.qp.call(this,a);var y=this.lh(a);Bl(this,y,a)},et.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=bo(a,y),y===void 0))return"";if(typeof y=="string")return y;Ot("getCategoryForLinkData found a non-string category for "+a+": "+y)},oi.prototype.getLinkCategoryForData=function(a){return this.ps(a)},oi.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var b=bo(a,x);b===void 0&&(b=""),b!==y&&(no(a,x,y),Ro(this,"linkCategory",to,x,a,b,y),typeof x=="string"&&this.La(a,x))}else no(a,x,y)}},oi.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},et=oi.prototype,et.lm=function(a,y){ir.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function jS(a,y,x){a.lp(x,a.ps(y)),a.wv(x,a.yx(y)),a.Bv(x,a.Bx(y)),a.Ls(x,a.Ef(y)),a.xv(x,a.zx(y)),a.Cv(x,a.Cx(y))}et.Wj=function(){return!0},et.ri=function(){return!0},et.xs=function(){return!0},et.Xj=function(){return!0},Zt.Object.defineProperties(oi.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){var y=this.Ri;y!==a&&(this.Ri=a,this.g("archetypeNodeData",y,a))}},linkFromKeyProperty:{get:function(){return this.lf},set:function(a){var y=this.lf;y!==a&&(this.lf=a,this.g("linkFromKeyProperty",y,a))}},linkToKeyProperty:{get:function(){return this.mf},set:function(a){var y=this.mf;y!==a&&(this.mf=a,this.g("linkToKeyProperty",y,a))}},linkFromPortIdProperty:{get:function(){return this.ej},set:function(a){var y=this.ej;y!==a&&(this.ej=a,this.g("linkFromPortIdProperty",y,a))}},linkToPortIdProperty:{get:function(){return this.fj},set:function(a){var y=this.fj;y!==a&&(this.fj=a,this.g("linkToPortIdProperty",y,a))}},linkLabelKeysProperty:{get:function(){return this.je},set:function(a){var y=this.je;y!==a&&(this.je=a,this.g("linkLabelKeysProperty",y,a))}},linkDataArray:{get:function(){return this.md},set:function(a){var y=this.md;if(y!==a){this.wb.clear();for(var x=a.length,b=0;b<x;b++){var E=a[b];an(E)||Ot("GraphLinksModel.linkDataArray must only contain Objects, not: "+E),Nr(E)}if(this.md=a,this.linkKeyProperty!==""){for(b=new yn,E=0;E<x;E++){var te=a[E],ne=this.Ac(te);ne===void 0||this.wb.I(ne)!==null?b.add(te):this.wb.add(ne,te)}for(b=b.iterator;b.next();)E=b.value,this.Bs(E),te=this.Ac(E),te!==void 0&&this.wb.add(te,E)}for(b=new xn,E=0;E<x;E++)b.add(a[E]);for(this.$f=b,Ro(this,"linkDataArray",to,"linkDataArray",this,y,a),y=0;y<x;y++)dy(this,a[y])}}},linkKeyProperty:{get:function(){return this.Jh},set:function(a){var y=this.Jh;if(y!==a){this.Jh=a,this.wb.clear();for(var x=this.linkDataArray.length,b=0;b<x;b++){var E=this.linkDataArray[b],te=this.Ac(E);te===void 0&&(this.Bs(E),te=this.Ac(E)),te!==void 0&&this.wb.add(te,E)}this.g("linkKeyProperty",y,a)}}},makeUniqueLinkKeyFunction:{get:function(){return this.cl},set:function(a){var y=this.cl;y!==a&&(this.cl=a,this.g("makeUniqueLinkKeyFunction",y,a))}},copyLinkDataFunction:{get:function(){return this.Ak},set:function(a){var y=this.Ak;y!==a&&(this.Ak=a,this.g("copyLinkDataFunction",y,a))}},nodeIsGroupProperty:{get:function(){return this.jl},set:function(a){var y=this.jl;y!==a&&(this.jl=a,this.g("nodeIsGroupProperty",y,a))}},nodeGroupKeyProperty:{get:function(){return this.Je},set:function(a){var y=this.Je;y!==a&&(this.Je=a,this.g("nodeGroupKeyProperty",y,a))}},Ij:{get:function(){return this.Lm},set:function(a){this.Lm!==a&&(this.Lm=a)}},linkCategoryProperty:{get:function(){return this.dj},set:function(a){var y=this.dj;y!==a&&(this.dj=a,this.g("linkCategoryProperty",y,a))}},type:{get:function(){return"GraphLinksModel"}}}),oi.prototype.setCategoryForLinkData=oi.prototype.lp,oi.prototype.getCategoryForLinkData=oi.prototype.ps,oi.prototype.assignAllDataProperties=oi.prototype.Do,oi.prototype.setGroupKeyForNodeData=oi.prototype.mp,oi.prototype.getGroupKeyForNodeData=oi.prototype.lh,oi.prototype.isGroupForNodeData=oi.prototype.Yu,oi.prototype.copyLinkData=oi.prototype.Jo,oi.prototype.mergeLinkDataArray=oi.prototype.Zz,oi.prototype.removeLinkDataCollection=oi.prototype.lA,oi.prototype.removeLinkData=oi.prototype.bm,oi.prototype.addLinkDataCollection=oi.prototype.Ey,oi.prototype.addLinkData=oi.prototype.fi,oi.prototype.containsLinkData=oi.prototype.Jc,oi.prototype.makeLinkDataKeyUnique=oi.prototype.Bs,oi.prototype.findLinkDataForKey=oi.prototype.jh,oi.prototype.setKeyForLinkData=oi.prototype.Ks,oi.prototype.getKeyForLinkData=oi.prototype.Ac,oi.prototype.removeLabelKeyForLinkData=oi.prototype.Qx,oi.prototype.addLabelKeyForLinkData=oi.prototype.Bu,oi.prototype.setLabelKeysForLinkData=oi.prototype.Ls,oi.prototype.getLabelKeysForLinkData=oi.prototype.Ef,oi.prototype.setToPortIdForLinkData=oi.prototype.Cv,oi.prototype.getToPortIdForLinkData=oi.prototype.Cx,oi.prototype.setFromPortIdForLinkData=oi.prototype.xv,oi.prototype.getFromPortIdForLinkData=oi.prototype.zx,oi.prototype.setToKeyForLinkData=oi.prototype.Bv,oi.prototype.getToKeyForLinkData=oi.prototype.Bx,oi.prototype.setFromKeyForLinkData=oi.prototype.wv,oi.prototype.getFromKeyForLinkData=oi.prototype.yx,oi.prototype.clear=oi.prototype.clear;var c0=Object.freeze([]);oi.className="GraphLinksModel",Pl.GraphLinksModel=oi,ir.constructGraphLinksModel=ir.constructGraphLinksModel=function(){return new oi},ir.initDiagramModel=cy=function(){return new oi};function es(a,y){ir.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(Un(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}nn(es,ir),es.constructGraphLinksModel=ir.constructGraphLinksModel,es.prototype.cloneProtected=function(a){ir.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},et=es.prototype,et.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" TreeModel";if(0<a){y+=`
node data:`,a=this.nodeDataArray;for(var x=a.length,b=0;b<x;b++){var E=a[b];y+=" "+this.wa(E)+":"+Rr(E)}}return y},et.rm=function(){var a=ir.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},et.gp=function(a){ir.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},et.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Ot("applyIncrementalJson cannot change Model properties"),ir.prototype.fp.call(this,a)},et.Vl=function(a){return a},et.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=bo(a,y),y!==void 0)){if(lc(y))return y;Ot("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},et.qe=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Ke;if(x!=="")if(y=this.Vl(y),this.lb(a)){var b=bo(a,x);b!==y&&(Bl(this,b,a),no(a,x,y),this.hc(y)===null&&Dl(this,y,a),Ro(this,"nodeParentKey",to,x,a,b,y),typeof x=="string"&&this.La(a,x))}else no(a,x,y)}},et.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=bo(a,y),y===void 0)?"":typeof y=="string"?y:(Ot("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},es.prototype.getLinkCategoryForData=function(a){return this.ss(a)},es.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var b=bo(a,x);b===void 0&&(b=""),b!==y&&(no(a,x,y),Ro(this,"parentLinkCategory",to,x,a,b,y),typeof x=="string"&&this.La(a,x))}else no(a,x,y)}},es.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},es.prototype.copyNodeData=function(a){return a===null?null:(a=ir.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||bo(a,this.Ke)===void 0||no(a,this.Ke,void 0),a)},es.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeParentKeyProperty){this.qe(a,x);return}}var b=bo(a,y);b!==x&&(no(a,y,x),this.Fs(a,y,b,x))},et=es.prototype,et.jp=function(a,y){ir.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},et.qv=function(a,y,x){if(this.mh(a)===y){var b=this.Ke;no(a,b,x),Ro(this,"nodeParentKey",to,b,a,y,x),typeof b=="string"&&this.La(a,b)}},et.fm=function(a){ir.prototype.fm.call(this,a),a=this.wa(a);var y=fg(this,a);if(y!==null){var x=$n();for(y=y.iterator;y.next();){var b=y.value;if(this.lb(b)&&this.mh(b)===a){var E=this.Ke;Ro(this,"nodeParentKey",to,E,b,a,a),typeof E=="string"&&this.La(b,E),x.push(b)}}for(y=0;y<x.length;y++)Bl(this,a,x[y]);Wn(x)}},et.em=function(a){ir.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&Dl(this,y,a)},et.qp=function(a){ir.prototype.qp.call(this,a);var y=this.mh(a);Bl(this,y,a)},et.lm=function(a,y){ir.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},et.Tl=function(){return!0},et.xs=function(){return!0},Zt.Object.defineProperties(es.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"}}}),es.prototype.setParentLinkCategoryForNodeData=es.prototype.Ms,es.prototype.getParentLinkCategoryForNodeData=es.prototype.ss,es.prototype.setParentKeyForNodeData=es.prototype.qe,es.prototype.getParentKeyForNodeData=es.prototype.mh,es.className="TreeModel",Pl.TreeModel=es;function mo(a){so.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=bl,this.Ti=0,this.Zv=new lt,this.Jp=this.me=0,this.Xr=new yg,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=bl,this.K=ts,this.nd=Kd,this.hd=oy,this.tf=6,this.Nn=y0,a&&Object.assign(this,a)}nn(mo,so),mo.prototype.cloneProtected=function(a){so.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},mo.prototype.qb=function(a){a.classType===mo?a===m0||a===v0||a===p0||a===g0||a===Kd?this.sorting=a:a===qc||a===Hd||a===ts||a===hc?this.direction=a:a===Th||a===uc||a===bl||a===Cl?this.arrangement=a:(a===zf||a===y0)&&(this.nodeDiameterFormula=a):so.prototype.qb.call(this,a)},mo.prototype.createNetwork=function(){return new Vd(this)},mo.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 yn;y.addAll(a.iterator),a=new yn;var x=new yn,b=this.sort(y),E,te,ne=this.Jp,se=this.arrangement,he=this.nodeDiameterFormula,pe=this.radius;(!isFinite(pe)||0>=pe)&&(pe=NaN);var ye=this.aspectRatio;(!isFinite(ye)||0>=ye)&&(ye=1);var Te=this.startAngle;isFinite(Te)||(Te=0);var ze=this.sweepAngle;if((!isFinite(ze)||360<ze||1>ze)&&(ze=360),y=this.spacing,isFinite(y)||(y=NaN),se===Cl&&he===zf?se=bl:se===Cl&&he!==zf&&(se=this.arrangement),(this.direction===qc||this.direction===Hd)&&this.sorting!==Kd){for(he=0;!(he>=b.length)&&(a.add(b.M(he)),!(he+1>=b.length));he+=2)x.add(b.M(he+1));this.direction===qc?(this.arrangement===Cl&&a.reverse(),b=new yn,b.addAll(a),b.addAll(x)):(this.arrangement===Cl&&x.reverse(),b=new yn,b.addAll(x),b.addAll(a))}he=b.length;for(var Ze=te=E=0;Ze<b.length;Ze++){var $e=Te+ze*te*(this.direction===ts?1:-1)/he,it=b.M(Ze).diameter;isNaN(it)&&(it=cc(b.M(Ze),$e)),360>ze&&(Ze===0||Ze===b.length-1)&&(it/=2),E+=it,te++}if(isNaN(pe)||se===Cl){if(isNaN(y)&&(y=6),se!==bl&&se!==Cl){for(te=-1/0,ne=0;ne<he;ne++)Ze=b.M(ne),E=b.M(ne===he-1?0:ne+1),isNaN(Ze.diameter)&&cc(Ze,0),isNaN(E.diameter)&&cc(E,0),te=Math.max(te,(Ze.diameter+E.diameter)/2);ne=te+y,se===Th?pe=(te+y)/(2*Math.PI/he):pe=f0(this,ne*(360<=ze?he:he-1),ye,Te*Math.PI/180,ze*Math.PI/180)}else pe=f0(this,E+(360<=ze?he:he-1)*(se!==Cl?y:1.6*y),ye,Te*Math.PI/180,ze*Math.PI/180);te=pe*ye}else if(te=pe*ye,Ze=py(this,pe,te,Te*Math.PI/180,ze*Math.PI/180),isNaN(y))(se===bl||se===Cl)&&(y=(Ze-E)/(360<=ze?he:he-1));else if(se===bl||se===Cl)Ze=(Ze-E)/(360<=ze?he:he-1),Ze<y?(pe=f0(this,E+y*(360<=ze?he:he-1),ye,Te*Math.PI/180,ze*Math.PI/180),te=pe*ye):y=Ze;else{for(ne=-1/0,E=0;E<he;E++)$e=b.M(E),it=b.M(E===he-1?0:E+1),isNaN($e.diameter)&&cc($e,0),isNaN(it.diameter)&&cc(it,0),ne=Math.max(ne,($e.diameter+it.diameter)/2);ne+=y,E=f0(this,ne*(360<=ze?he:he-1),ye,Te*Math.PI/180,ze*Math.PI/180),E>pe?(pe=E,te=pe*ye):ne=Ze/(360<=ze?he:he-1)}if(this.kw=se,this.lc=pe,this.Zm=ye,this.lw=Te,this.Wp=ze,this.Ti=y,this.me=te,this.Jp=ne,y=b,b=this.kw,se=this.lc,pe=this.lw,ye=this.Wp,Te=this.Ti,ze=this.me,he=this.Jp,this.direction!==qc&&this.direction!==Hd||b!==Cl)if(this.direction===qc||this.direction===Hd){switch(ne=0,b){case uc:ne=180*d0(this,se,ze,pe,he)/Math.PI;break;case bl:he=y=0,ne=a.first(),ne!==null&&(y=cc(ne,Math.PI/2)),ne=x.first(),ne!==null&&(he=cc(ne,Math.PI/2)),ne=180*d0(this,se,ze,pe,Te+(y+he)/2)/Math.PI;break;case Th:ne=ye/y.length}if(this.direction===qc){switch(b){case uc:vg(this,a,pe,hc);break;case bl:mg(this,a,pe,hc);break;case Th:gg(this,a,ye/2,pe,hc)}switch(b){case uc:vg(this,x,pe+ne,ts);break;case bl:mg(this,x,pe+ne,ts);break;case Th:gg(this,x,ye/2,pe+ne,ts)}}else{switch(b){case uc:vg(this,x,pe,hc);break;case bl:mg(this,x,pe,hc);break;case Th:gg(this,x,ye/2,pe,hc)}switch(b){case uc:vg(this,a,pe+ne,ts);break;case bl:mg(this,a,pe+ne,ts);break;case Th:gg(this,a,ye/2,pe+ne,ts)}}}else switch(b){case uc:vg(this,y,pe,this.direction);break;case bl:mg(this,y,pe,this.direction);break;case Th:gg(this,y,ye,pe,this.direction);break;case Cl:OS(this,y,ye,pe,this.direction)}else OS(this,y,ye,pe-ye/2,ts)}this.updateParts(),this.network=null,this.isValidLayout=!0};function gg(a,y,x,b,E){var te=a.Wp,ne=a.lc;a=a.me,b=b*Math.PI/180,x=x*Math.PI/180;for(var se=y.length,he=0;he<se;he++){var pe=b+(E===ts?he*x/(360<=te?se:se-1):-(he*x)/se),ye=y.M(he),Te=ne*Math.tan(pe)/a;Te=Math.sqrt((ne*ne+a*a*Te*Te)/(1+Te*Te)),ye.centerX=Te*Math.cos(pe),ye.centerY=Te*Math.sin(pe),ye.actualAngle=180*pe/Math.PI}}function mg(a,y,x,b){var E=a.lc,te=a.me,ne=a.Ti;x=x*Math.PI/180;for(var se=y.length,he=0;he<se;he++){var pe=y.M(he),ye=y.M(he===se-1?0:he+1),Te=te*Math.sin(x);pe.centerX=E*Math.cos(x),pe.centerY=Te,pe.actualAngle=180*x/Math.PI,isNaN(pe.diameter)&&cc(pe,0),isNaN(ye.diameter)&&cc(ye,0),pe=d0(a,E,te,b===ts?x:-x,(pe.diameter+ye.diameter)/2+ne),x+=b===ts?pe:-pe}}function vg(a,y,x,b){var E=a.lc,te=a.me,ne=a.Jp;x=x*Math.PI/180;for(var se=y.length,he=0;he<se;he++){var pe=y.M(he);pe.centerX=E*Math.cos(x),pe.centerY=te*Math.sin(x),pe.actualAngle=180*x/Math.PI,pe=d0(a,E,te,b===ts?x:-x,ne),x+=b===ts?pe:-pe}}function OS(a,y,x,b,E){var te=a.Wp;if(a.mj=0,a.Xr=new yg,360>x){for(te=b+(E===ts?te:-te);0>te;)te+=360;te%=360,180<te&&(te-=360),te*=Math.PI/180,a.gt=te,DS(a,y,x,b,E)}else FS(a,y,x,b,E);a.Xr.commit(y)}function FS(a,y,x,b,E){var te=a.lc,ne=a.Ti,se=a.Zm,he=te*Math.cos(b*Math.PI/180),pe=a.me*Math.sin(b*Math.PI/180),ye=y.Fa();if(ye.length===3)ye[0].centerX=te,ye[0].centerY=0,ye[1].centerX=ye[0].centerX-ye[0].width/2-ye[1].width/2-ne,ye[1].y=ye[0].y,ye[2].centerX=(ye[0].centerX+ye[1].centerX)/2,ye[2].y=ye[0].y-ye[2].height-ne;else if(ye.length===4)ye[0].centerX=te,ye[0].centerY=0,ye[2].centerX=-ye[0].centerX,ye[2].centerY=ye[0].centerY,ye[1].centerX=0,ye[1].y=Math.min(ye[0].y,ye[2].y)-ye[1].height-ne,ye[3].centerX=0,ye[3].y=Math.max(ye[0].y+ye[0].height+ne,ye[2].y+ye[2].height+ne);else{te=lt.alloc();for(var Te=0;Te<ye.length&&(ye[Te].centerX=he,ye[Te].centerY=pe,!(Te>=ye.length-1));Te++)BS(a,he,pe,ye,Te,E,te)||IS(a,he,pe,ye,Te,E,te),he=te.x,pe=te.y;if(lt.free(te),a.mj++,!(23<a.mj)){he=ye[0].centerX,pe=ye[0].centerY,te=ye[ye.length-1].centerX,Te=ye[ye.length-1].centerY;var ze=Math.abs(he-te)-((ye[0].width+ye[ye.length-1].width)/2+ne),Ze=Math.abs(pe-Te)-((ye[0].height+ye[ye.length-1].height)/2+ne);ne=0,1>Math.abs(Ze)?Math.abs(he-te)<(ye[0].width+ye[ye.length-1].width)/2&&(ne=0):ne=0<Ze?Ze:1>Math.abs(ze)?0:ze,he=Math.abs(te)>Math.abs(Te)?0<te!=pe>Te:0<Te!=he<te,(he=E===ts?he:!he)&&(ne=-Math.abs(ne),ne=Math.min(ne,-ye[ye.length-1].width),ne=Math.min(ne,-ye[ye.length-1].height)),a.Xr.compare(ne,ye),1<Math.abs(ne)&&(a.lc=8>a.mj?a.lc-ne/(2*Math.PI):5>ye.length&&10<ne?a.lc/2:a.lc-(0<ne?1.7:-2.3),a.me=a.lc*se,FS(a,y,x,b,E))}}}function DS(a,y,x,b,E){for(var te=a.lc,ne=a.me,se=a.Zm,he=te*Math.cos(b*Math.PI/180),pe=ne*Math.sin(b*Math.PI/180),ye=lt.alloc(),Te=y.Fa(),ze=0;ze<Te.length&&(Te[ze].centerX=he,Te[ze].centerY=pe,!(ze>=Te.length-1));ze++)BS(a,he,pe,Te,ze,E,ye)||IS(a,he,pe,Te,ze,E,ye),he=ye.x,pe=ye.y;if(lt.free(ye),a.mj++,!(23<a.mj)){if(he=Math.atan2(pe,he),he=E===ts?a.gt-he:he-a.gt,he=Math.abs(he)<Math.abs(he-2*Math.PI)?he:he-2*Math.PI,te=he*(te+ne)/2,ne=a.Xr,Math.abs(te)<Math.abs(ne.Pl))for(ne.Pl=te,ne.mk=[],ne.tm=[],he=0;he<Te.length;he++)ne.mk[he]=Te[he].bounds.x,ne.tm[he]=Te[he].bounds.y;1<Math.abs(te)&&(a.lc=8>a.mj?a.lc-te/(2*Math.PI):a.lc-(0<te?1.7:-2.3),a.me=a.lc*se,DS(a,y,x,b,E))}}function BS(a,y,x,b,E,te,ne){var se=a.lc,he=a.me,pe=0;a=(b[E].width+b[E+1].width)/2+a.Ti;var ye=!1;if(0<=x!=(te===ts)){if(te=y+a,te>se){if(te=y-a,te<-se)return ne.x=te,ne.y=pe,!1;ye=!0}}else if(te=y-a,te<-se){if(te=y+a,te>se)return ne.x=te,ne.y=pe,!1;ye=!0}return pe=Math.sqrt(1-Math.min(1,te*te/(se*se)))*he,0>x!==ye&&(pe=-pe),Math.abs(x-pe)>(b[E].height+b[E+1].height)/2?(ne.x=te,ne.y=pe,!1):(ne.x=te,ne.y=pe,!0)}function IS(a,y,x,b,E,te,ne){var se=a.lc,he=a.me,pe=0;if(a=(b[E].height+b[E+1].height)/2+a.Ti,b=!1,0<=y!=(te===ts)){if(te=x-a,te<-he){if(te=x+a,te>he){ne.x=pe,ne.y=te;return}b=!0}}else if(te=x+a,te>he){if(te=x-a,te<-he){ne.x=pe,ne.y=te;return}b=!0}pe=Math.sqrt(1-Math.min(1,te*te/(he*he)))*se,0>y!==b&&(pe=-pe),ne.x=pe,ne.y=te}mo.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},mo.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 lt(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;E.x+=x.x,E.y+=x.y,E.commit()}a&&(this.group.Va(),a=this.group.position.copy(),x=this.group.location.copy(),y=y.re(x.re(a)),this.group.move(y),this.Zv=y.re(a))},mo.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function py(a,y,x,b,E){var te=a.ty;if(.001>Math.abs(a.Zm-1))return b!==void 0&&E!==void 0?E*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var ne=0,se=b!==void 0&&E!==void 0?E/(te+1):Math.PI/(2*(te+1)),he=0,pe=0;pe<=te;pe++){b!==void 0&&E!==void 0?he=b+pe*E/te:he=pe*Math.PI/(2*te);var ye=Math.sin(he);ne+=Math.sqrt(1-a*a*ye*ye)*se}return b!==void 0&&E!==void 0?(y>x?y:x)*ne:4*(y>x?y:x)*ne}function f0(a,y,x,b,E){return y/(b!==void 0&&E!==void 0?py(a,1,x,b,E):py(a,1,x))}function d0(a,y,x,b,E){if(.001>Math.abs(a.Zm-1))return E/y;var te=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,ne=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(b+=Math.PI/2);for(var se=0;;se++){var he=Math.sin(b+se*a);if(ne+=(y>x?y:x)*Math.sqrt(1-te*te*he*he)*a,ne>=E)return se*a}}mo.prototype.sort=function(a){switch(this.sorting){case p0:break;case g0:a.reverse();break;case m0:a.sort(this.comparer);break;case v0:a.sort(this.comparer),a.reverse();break;case Kd:return this.ak(Fx(a));default:Ot("Invalid sorting type.")}return a};function Fx(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new yn;for(var b=0;b<a.length;b++){var E=-1,te=-1;if(b===0)for(var ne=0;ne<a.length;ne++){var se=a.M(ne).edgesCount;se>E&&(E=se,te=ne)}else for(ne=0;ne<a.length;ne++)se=y[ne],se>E&&(E=se,te=ne);for(x.add(a.M(te)),y[te]=-1,te=a.M(te),ne=te.sourceEdges;ne.next();)E=a.indexOf(ne.value.fromVertex),0>E||0<=y[E]&&y[E]++;for(te=te.destinationEdges;te.next();)E=a.indexOf(te.value.toVertex),0>E||0<=y[E]&&y[E]++}return x}mo.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var b=a.M(x);y[x]=[];for(var E,te=b.destinationEdges;te.next();)E=a.indexOf(te.value.toVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E);for(b=b.sourceEdges;b.next();)E=a.indexOf(b.value.fromVertex),E!==x&&0>y[x].indexOf(E)&&y[x].push(E)}for(te=[],x=0;x<y.length;x++)te[x]=0;x=[];var ne=[],se=[];b=[],E=new yn;for(var he=0,pe=0;pe<y.length;pe++){var ye=y[pe].length;if(ye===1)b.push(pe);else if(ye===0)E.add(a.M(pe));else{if(he===0)x.push(pe);else{for(var Te=ye=1/0,ze=-1,Ze=[],$e=0;$e<x.length;$e++)0>y[x[$e]].indexOf(x[$e===x.length-1?0:$e+1])&&Ze.push($e===x.length-1?0:$e+1);if(Ze.length===0)for($e=0;$e<x.length;$e++)Ze.push($e);for($e=0;$e<Ze.length;$e++){for(var it=Ze[$e],Tt=y[pe],bt=0,Nt=0;Nt<ne.length;Nt++){var jt=te[ne[Nt]],Bt=te[se[Nt]];if(jt<Bt){var _t=jt;jt=Bt}else _t=Bt;if(_t<it&&it<=jt)for(Bt=0;Bt<Tt.length;Bt++){var Ht=Tt[Bt];0>x.indexOf(Ht)||_t<te[Ht]&&te[Ht]<jt||_t===te[Ht]||jt===te[Ht]||bt++}else for(Bt=0;Bt<Tt.length;Bt++)Ht=Tt[Bt],0>x.indexOf(Ht)||_t<te[Ht]&&te[Ht]<jt&&_t!==te[Ht]&&jt!==te[Ht]&&bt++}for(Tt=bt,Nt=bt=0;Nt<y[pe].length;Nt++)_t=x.indexOf(y[pe][Nt]),0<=_t&&(_t=Math.abs(it-(_t>=it?_t+1:_t)),bt+=_t<x.length+1-_t?_t:x.length+1-_t);for(Nt=0;Nt<ne.length;Nt++)_t=te[ne[Nt]],jt=te[se[Nt]],_t>=it&&_t++,jt>=it&&jt++,_t>jt&&(Bt=jt,jt=_t,_t=Bt),jt-_t<(x.length+2)/2==(_t<it&&it<=jt)&&bt++;(Tt<ye||Tt===ye&&bt<Te)&&(ye=Tt,Te=bt,ze=it)}for(x.splice(ze,0,pe),ye=0;ye<x.length;ye++)te[x[ye]]=ye;for(ye=0;ye<y[pe].length;ye++)Te=y[pe][ye],0<=x.indexOf(Te)&&(ne.push(pe),se.push(Te))}he++}}for(ne=x.length;;){for(te=!0,se=0;se<b.length;se++)if(he=b[se],pe=y[he][0],ye=x.indexOf(pe),0<=ye){for(ze=Te=0;ze<y[pe].length;ze++)Ze=x.indexOf(y[pe][ze]),0>Ze||Ze===ye||($e=Ze>ye?Ze-ye:ye-Ze,Te+=Ze<ye!=$e>ne-$e?1:-1);x.splice(0>Te?ye:ye+1,0,he),b.splice(se,1),se--}else te=!1;if(te)break;x.push(b[0]),b.splice(0,1)}for(y=0;y<x.length;y++)E.add(a.M(x[y]));return E},Zt.Object.defineProperties(mo.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!==Cl&&a!==bl&&a!==uc&&a!==Th||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==ts&&a!==hc&&a!==qc&&a!==Hd||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==p0&&a!==g0&&a!==m0&&!v0&&a!==Kd||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}},spacing:{get:function(){return this.tf},set:function(a){this.tf!==a&&(this.tf=a,this.C())}},nodeDiameterFormula:{get:function(){return this.Nn},set:function(a){this.Nn===a||a!==y0&&a!==zf||(this.Nn=a,this.C())}},actualXRadius:{get:function(){return this.lc}},actualYRadius:{get:function(){return this.me}},actualSpacing:{get:function(){return this.Ti}},actualCenter:{get:function(){return this.Zv}}});var bl=new un(mo,"ConstantSpacing",0),uc=new un(mo,"ConstantDistance",1),Th=new un(mo,"ConstantAngle",2),Cl=new un(mo,"Packed",3),ts=new un(mo,"Clockwise",4),hc=new un(mo,"Counterclockwise",5),qc=new un(mo,"BidirectionalLeft",6),Hd=new un(mo,"BidirectionalRight",7),p0=new un(mo,"Forwards",8),g0=new un(mo,"Reverse",9),m0=new un(mo,"Ascending",10),v0=new un(mo,"Descending",11),Kd=new un(mo,"Optimized",12),y0=new un(mo,"Pythagorean",13),zf=new un(mo,"Circular",14);mo.className="CircularLayout",mo.ConstantSpacing=bl,mo.ConstantDistance=uc,mo.ConstantAngle=Th,mo.Packed=Cl,mo.Clockwise=ts,mo.Counterclockwise=hc,mo.BidirectionalLeft=qc,mo.BidirectionalRight=Hd,mo.Forwards=p0,mo.Reverse=g0,mo.Ascending=m0,mo.Descending=v0,mo.Optimized=Kd,mo.Pythagorean=y0,mo.Circular=zf;function yg(){this.Pl=-1/0,this.tm=this.mk=null}yg.prototype.compare=function(a,y){if(0<a&&0>this.Pl||Math.abs(a)<Math.abs(this.Pl)&&!(0>a&&0<this.Pl))for(this.Pl=a,this.mk=[],this.tm=[],a=0;a<y.length;a++)this.mk[a]=y[a].bounds.x,this.tm[a]=y[a].bounds.y},yg.prototype.commit=function(a){if(this.mk!==null&&this.tm!==null)for(var y=0;y<this.mk.length;y++){var x=a.M(y);x.x=this.mk[y],x.y=this.tm[y]}},yg.className="VertexArrangement";function Vd(a){Ki.call(this,a)}nn(Vd,Ki),Vd.prototype.createVertex=function(){return new Sg(this)},Vd.prototype.createEdge=function(){return new S0(this)},Vd.className="CircularNetwork";function Sg(a){Uo.call(this,a),this.u=this.Si=NaN}nn(Sg,Uo);function cc(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===Cl)if(x.nodeDiameterFormula===zf)a.Si=Math.max(a.width,a.height);else{if(x=Math.abs(Math.sin(y)),y=Math.abs(Math.cos(y)),x===0)return a.width;if(y===0)return a.height;a.Si=Math.min(a.height/x,a.width/y)}else a.Si=x.nodeDiameterFormula===zf?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}Zt.Object.defineProperties(Sg.prototype,{diameter:{get:function(){return this.Si},set:function(a){this.Si!==a&&(this.Si=a)}},actualAngle:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}}}),Sg.className="CircularVertex";function S0(a){Es.call(this,a)}nn(S0,Es),S0.className="CircularEdge";function wa(a){so.call(this),this.ah=null,this.An=0,this.$d=new fn(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)}nn(wa,so),wa.prototype.cloneProtected=function(a){so.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},wa.prototype.createNetwork=function(){return new Gf(this)},wa.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),a=this.maxIterations,0<this.network.vertexes.count){this.network.Ko();for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;x.charge=this.electricalCharge(x),x.mass=this.gravitationalMass(x)}for(y=this.network.edges.iterator;y.next();)x=y.value,x.stiffness=this.springStiffness(x),x.length=this.springLength(x);if(this.Cu(),this.An=0,this.needsClusterLayout()){y=this.network,x=y.Zx();for(var b=x.iterator;b.next();){this.network=b.value;for(var E=this.network.vertexes.iterator;E.next();){var te=E.value;te.Vd=te.vertexes.count,te.sh=1,te.Hj=null,te.We=null}RS(this,0,a)}this.network=y;var ne=b=x.iterator;b=this.arrangementSpacing;var se=ne.count,he=!0;te=E=0;for(var pe=$n(),ye=0;ye<se+y.vertexes.count+2;ye++)pe[ye]=null;se=0,ne.reset();for(var Te=Yt.alloc();ne.next();)if(ye=ne.value,this.computeBounds(ye,Te),he)he=!1,E=Te.x+Te.width/2,te=Te.y+Te.height/2,pe[0]=new lt(Te.x+Te.width+b.width,Te.y),pe[1]=new lt(Te.x,Te.y+Te.height+b.height),se=2;else{var ze=_S(pe,se,E,te,Te.width,Te.height,b),Ze=pe[ze],$e=new lt(Ze.x+Te.width+b.width,Ze.y),it=new lt(Ze.x,Ze.y+Te.height+b.height);for(ze+1<se&&pe.splice(ze+1,0,null),pe[ze]=$e,pe[ze+1]=it,se++,ze=Ze.x-Te.x,Ze=Ze.y-Te.y,ye=ye.vertexes.iterator;ye.next();)$e=ye.value,$e.centerX+=ze,$e.centerY+=Ze}for(Yt.free(Te),ye=y.vertexes.iterator;ye.next();)ne=ye.value,ze=ne.bounds,2>se?(E=ze.x+ze.width/2,te=ze.y+ze.height/2,pe[0]=new lt(ze.x+ze.width+b.width,ze.y),pe[1]=new lt(ze.x,ze.y+ze.height+b.height),se=2):(he=_S(pe,se,E,te,ze.width,ze.height,b),Te=pe[he],Ze=new lt(Te.x+ze.width+b.width,Te.y),ze=new lt(Te.x,Te.y+ze.height+b.height),he+1<se&&pe.splice(he+1,0,null),pe[he]=Ze,pe[he+1]=ze,se++,ne.centerX=Te.x+ne.width/2,ne.centerY=Te.y+ne.height/2);for(Wn(pe),b=x.iterator;b.next();){for(x=b.value,E=x.vertexes.iterator;E.next();)y.dh(E.value);for(x=x.edges.iterator;x.next();)y.Bo(x.value)}}GS(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},wa.prototype.needsClusterLayout=function(){if(3>this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,b=this.network.vertexes.iterator;b.next();){if(b.value.bounds.Yc(x)&&(a++,2<a))return!0;if(10<y)break;y++}return!1},wa.prototype.computeBounds=function(a,y){var x=!0;for(a=a.vertexes.iterator;a.next();){var b=a.value;x?(x=!1,y.set(b.bounds)):y.ed(b.bounds)}return y};function RS(a,y,x){if(Dx(a,y)){var b=a.Zf;a.Zf*=1+1/(y+1);var E=Bx(a,y),te=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=te,RS(a,y+1,x),GS(a,te),Ix(a,E),y=E.vertexes.Fa(),y.sort(function(ne,se){return ne===null||se===null||ne===se?0:se.Vd-ne.Vd}),x=0;x<y.length;x++)Rx(a,y[x]);a.Zf=b}}function Dx(a,y){if(10<y||3>a.network.vertexes.count)return!1;for(a.ah=a.network.vertexes.Fa(),a=a.ah,a.sort(function(x,b){return x===null||b===null||x===b?0:b.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1<a.length-y}function Bx(a,y){for(var x=a.network,b=new Gf(a),E=0;E<a.ah.length;E++){var te=a.ah[E];if(1<te.Vd){b.dh(te);var ne=new US;ne.Rs=te.Vd,ne.Ss=te.width,ne.Qs=te.height,ne.Sv=te.focus.x,ne.Tv=te.focus.y,te.We===null&&(te.We=new yn),te.We.add(ne),te.sv=te.We.count-1}else break}for(te=x.edges.iterator;te.next();){var se=te.value;E=se.fromVertex,ne=se.toVertex,E.network===b&&ne.network===b?b.Bo(se):E.network===b?(se=E.Hj,se===null&&(se=new yn,E.Hj=se),se.add(ne),E.Vd--,E.sh+=ne.sh):ne.network===b&&(se=ne.Hj,se===null&&(se=new yn,ne.Hj=se),se.add(E),ne.Vd--,ne.sh+=E.sh)}for(E=b.edges.iterator;E.next();)te=E.value,te.length*=Math.max(1,Gt.sqrt((te.fromVertex.sh+te.toVertex.sh)/(4*y+1)));for(y=b.vertexes.iterator;y.next();){E=y.value;var he=E.Hj;if(he!==null&&0<he.count&&(ne=E.We.M(E.We.count-1).Rs-E.Vd,!(0>=ne))){for(var pe=se=0,ye=he.count-ne;ye<he.count;ye++){var Te=he.M(ye),ze=null;for(te=Te.edges.iterator;te.next();){var Ze=te.value;if(Ze.Ax(Te)===E){ze=Ze;break}}ze!==null&&(pe+=ze.length,se+=Te.width*Te.height)}te=E.centerX,he=E.centerY,ye=E.width,Te=E.height,ze=E.focus,Ze=ye*Te,1>Ze&&(Ze=1),se=Gt.sqrt((se+Ze+pe*pe*4/(ne*ne))/Ze),ne=(se-1)*ye/2,se=(se-1)*Te/2,E.bounds=new Yt(te-ze.x-ne,he-ze.y-se,ye+2*ne,Te+2*se),E.focus=new lt(ze.x+ne,ze.y+se)}}return a.network=b,x}function Ix(a,y){for(var x=a.network.vertexes.iterator;x.next();){var b=x.value;if(b.network=y,b.We!==null){var E=b.We.M(b.sv);b.Vd=E.Rs;var te=E.Sv,ne=E.Tv;b.bounds=new Yt(b.centerX-te,b.centerY-ne,E.Ss,E.Qs),b.focus=new lt(te,ne),b.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function Rx(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var b=y.centerX,E=y.centerY,te=y.width,ne=y.height;y.We!==null&&0<y.We.count&&(ne=y.We.M(0),te=ne.Ss,ne=ne.Qs),te=Gt.sqrt(te*te+ne*ne)/2;for(var se=!1,he=ne=0,pe=0,ye=y.vertexes.iterator;ye.next();){var Te=ye.value;1>=Te.Vd?he++:(se=!0,pe++,ne+=Math.atan2(y.centerY-Te.centerY,y.centerX-Te.centerX))}if(he!==0){for(0<pe&&(ne/=pe),pe=y=0,y=se?2*Math.PI/(he+1):2*Math.PI/he,he%2===0&&(pe=y/2),1<x.count&&x.sort(function(Ze,$e){return Ze===null||$e===null||Ze===$e?0:$e.width*$e.height-Ze.width*Ze.height}),se=he%2===0?0:1,x=x.iterator;x.next();)if(he=x.value,!(1<he.Vd||a.isFixed(he))){for(ye=null,Te=he.edges.iterator;Te.next();){ye=Te.value;break}Te=he.width;var ze=he.height;Te=Gt.sqrt(Te*Te+ze*ze)/2,ye=te+ye.length+Te,Te=ne+(y*(se/2>>1)+pe)*(se%2===0?1:-1),he.centerX=b+ye*Math.cos(Te),he.centerY=E+ye*Math.sin(Te),se++}}}}function _S(a,y,x,b,E,te,ne){var se=9e19,he=-1,pe=0;e:for(;pe<y;pe++){var ye=a[pe],Te=ye.x-x,ze=ye.y-b;if(Te=Te*Te+ze*ze,Te<se){for(ze=pe-1;0<=ze;ze--)if(a[ze].y>ye.y&&a[ze].x-ye.x<E+ne.width)continue e;for(ze=pe+1;ze<y;ze++)if(a[ze].x>ye.x&&a[ze].y-ye.y<te+ne.height)continue e;he=pe,se=Te}}return he}wa.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},wa.prototype.addComments=function(a){var y=a.node;if(y!==null)for(y=y.Mu();y.next();){var x=y.value;if(x.category==="Comment"&&x.isVisible()){var b=this.network.ki(x);b===null&&(b=this.network.Bl(x)),b.charge=this.defaultCommentElectricalCharge,x=null;for(var E=b.destinationEdges;E.next();){var te=E.value;if(te.toVertex===a){x=te;break}}if(x===null){for(E=b.sourceEdges;E.next();)if(te=E.value,te.fromVertex===a){x=te;break}}x===null&&(x=this.network.Zj(a,b,null)),x.length=this.defaultCommentSpringLength}}};function zS(a,y){var x=a.bounds,b=x.x;a=x.y;var E=x.width;x=x.height;var te=y.bounds,ne=te.x;y=te.y;var se=te.width;return te=te.height,b+E<ne?a>y+te?(x=b+E-ne,a=a-y-te,Gt.sqrt(x*x+a*a)):a+x<y?(b=b+E-ne,a=a+x-y,Gt.sqrt(b*b+a*a)):ne-(b+E):b>ne+se?a>y+te?(x=b-ne-se,a=a-y-te,Gt.sqrt(x*x+a*a)):a+x<y?(b=b-ne-se,a=a+x-y,Gt.sqrt(b*b+a*a)):b-(ne+se):a>y+te?a-(y+te):a+x<y?y-(a+x):.1}function GS(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,_x(a)););a.ah=null}function _x(a){a.ah===null&&(a.ah=a.network.vertexes.Fa());var y=a.ah;if(0>=y.length)return!1;var x=y[0];x.forceX=0,x.forceY=0;for(var b=x.centerX,E=b,te=x=x.centerY,ne=1;ne<y.length;ne++){var se=y[ne];se.forceX=0,se.forceY=0;var he=se.centerX;se=se.centerY,b=Math.min(b,he),E=Math.max(E,he),x=Math.min(x,se),te=Math.max(te,se)}(E=E-b>te-x)?y.sort(function(it,Tt){return it===null||Tt===null||it===Tt?0:it.centerX-Tt.centerX}):y.sort(function(it,Tt){return it===null||Tt===null||it===Tt?0:it.centerY-Tt.centerY}),x=a.Zf;var pe=b=se=0;for(te=0;te<y.length;te++){ne=y[te],b=ne.bounds,se=ne.focus,he=b.x+se.x;var ye=b.y+se.y;b=ne.charge*a.electricalFieldX(he,ye),pe=ne.charge*a.electricalFieldY(he,ye),b+=ne.mass*a.gravitationalFieldX(he,ye),pe+=ne.mass*a.gravitationalFieldY(he,ye),ne.forceX+=b,ne.forceY+=pe;for(var Te=te+1;Te<y.length;Te++){var ze=y[Te];if(ze!==ne){b=ze.bounds,se=ze.focus,pe=b.x+se.x;var Ze=b.y+se.y;if(he-pe>x||pe-he>x){if(E)break}else if(ye-Ze>x||Ze-ye>x){if(!E)break}else{var $e=zS(ne,ze);1>$e?(b=a.randomNumberGenerator,b===null&&(a.randomNumberGenerator=b=new x0),$e=b.random(),se=b.random(),he>pe?(b=Math.abs(ze.bounds.right-ne.bounds.x),b=(1+b)*$e):he<pe?(b=Math.abs(ze.bounds.x-ne.bounds.right),b=-(1+b)*$e):(b=Math.max(ze.width,ne.width),b=(1+b)*$e-b/2),ye>Ze?(pe=Math.abs(ze.bounds.bottom-ne.bounds.y),pe=(1+pe)*se):he<pe?(pe=Math.abs(ze.bounds.y-ne.bounds.bottom),pe=-(1+pe)*se):(pe=Math.max(ze.height,ne.height),pe=(1+pe)*se-pe/2)):(se=-(ne.charge*ze.charge)/($e*$e),b=(pe-he)/$e*se,pe=(Ze-ye)/$e*se),ne.forceX+=b,ne.forceY+=pe,ze.forceX-=b,ze.forceY-=pe}}}}for(E=a.network.edges.iterator;E.next();)se=E.value,x=se.fromVertex,te=se.toVertex,ne=x.bounds,he=x.focus,b=ne.x+he.x,ne=ne.y+he.y,ye=te.bounds,Te=te.focus,he=ye.x+Te.x,ye=ye.y+Te.y,Te=zS(x,te),1>Te?(Te=a.randomNumberGenerator,Te===null&&(a.randomNumberGenerator=Te=new x0),se=Te.random(),Te=Te.random(),b=(b>he?1:-1)*(1+(te.width>x.width?te.width:x.width))*se,pe=(ne>ye?1:-1)*(1+(te.height>x.height?te.height:x.height))*Te):(se=se.stiffness*(Te-se.length),b=(he-b)/Te*se,pe=(ye-ne)/Te*se),x.forceX+=b,x.forceY+=pe,te.forceX-=b,te.forceY-=pe;for(E=b=0;E<y.length;E++)x=y[E],a.isFixed(x)?a.moveFixedVertex(x):b=Math.max(b,a.moveVertex(x)||0);return b>a.epsilonDistance*a.epsilonDistance}wa.prototype.moveVertex=function(a){var y=a.forceX,x=a.forceY,b=this.moveLimit;return y<-b?y=-b:y>b&&(y=b),x<-b?x=-b:x>b&&(x=b),a.centerX+=y,a.centerY+=x,y*y+x*x},wa.prototype.moveFixedVertex=function(){},wa.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},wa.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=Vo,y.toSpot=Vo)}},wa.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=Yt.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,Yt.free(x)}x=Yt.alloc();for(var b=this.network.vertexes.iterator;b.next();){var E=b.value;(a!==0||y!==0)&&(x.assign(E.bounds),x.x+=a,x.y+=y,E.bounds=x),E.commit()}Yt.free(x)},wa.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},wa.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},wa.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},wa.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},wa.prototype.electricalFieldX=function(){return 0},wa.prototype.electricalFieldY=function(){return 0},wa.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},wa.prototype.gravitationalFieldX=function(){return 0},wa.prototype.gravitationalFieldY=function(){return 0},wa.prototype.isFixed=function(a){return a.isFixed},Zt.Object.defineProperties(wa.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"&&Ot('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())}}}),wa.className="ForceDirectedLayout";function US(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}US.className="ForceDirectedSubnet";function Gf(a){Ki.call(this,a)}nn(Gf,Ki),Gf.prototype.createVertex=function(){return new xg(this)},Gf.prototype.createEdge=function(){return new wg(this)},Gf.className="ForceDirectedNetwork";function xg(a){Uo.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}nn(xg,Uo),Zt.Object.defineProperties(xg.prototype,{isFixed:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}},charge:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},mass:{get:function(){return this.Ha},set:function(a){this.Ha!==a&&(this.Ha=a)}},forceX:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}},forceY:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}}}),xg.className="ForceDirectedVertex";function wg(a){Es.call(this,a),this.j=this.o=NaN}nn(wg,Es),Zt.Object.defineProperties(wg.prototype,{stiffness:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},length:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}}}),wg.className="ForceDirectedEdge";function x0(){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()}x0.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},x0.className="RandomNumberGenerator";function Li(a){so.call(this),this.kc=this.ie=25,this.K=0,this.Dk=E0,this.Zk=k0,this.Qk=T0,this.bj=4,this.rk=M0,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 lt,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}nn(Li,so),Li.prototype.cloneProtected=function(a){so.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},Li.prototype.qb=function(a){a.classType===Li?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:Ot("Unknown enum value: "+a):so.prototype.qb.call(this,a)},Li.prototype.createNetwork=function(){return new Xd(this)},Li.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!==bg&&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===bg&&this.removeCycles(),a=this.network;for(var y=[],x=a.edges.iterator;x.next();){var b=x.value;b.valid=!1,y.push(b)}for(x=0;x<y.length;x++){b=y[x];var E=b.fromVertex,te=b.toVertex;if(!(b.valid||(E.node===null&&E.data===null||te.node===null&&te.data===null)&&E.layer===te.layer)){var ne=0,se=0,he=0,pe=0;if(b.link!==null){if(se=b.link,se===null)continue;var ye=E.node;if(ne=te.node,ye===null||ne===null)continue;var Te=se.fromNode;he=se.toNode;for(var ze=se.fromPort;ze!==null&&!ze.Ed();)ze=ze.panel;for(se=se.toPort;se!==null&&!se.Ed();)se=se.panel;if(b.rev){pe=Te;var Ze=ze;Te=he,ze=se,he=pe,se=Ze}var $e=E.focus;pe=te.focus;var it=b.rev?te.bounds:E.bounds;Ze=lt.alloc(),ye!==Te?it.w()&&Te.isVisible()?Te.actualBounds.w()?(Ph(Te,ze,ti,Ze),Ze.x+=Te.actualBounds.x-it.x,Ze.y+=Te.actualBounds.y-it.y):(Ph(Te,ze,ti,Ze),Ze.w()||Ze.assign($e)):Ze.assign($e):it.w()?(Ph(Te,ze,ti,Ze),Ze.w()||Ze.assign($e)):Ze.assign($e),Te=b.rev?E.bounds:te.bounds,ye=lt.alloc(),ne!==he?Te.w()&&he.isVisible()?he.actualBounds.w()?(Ph(he,se,ti,ye),ye.x+=he.actualBounds.x-Te.x,ye.y+=he.actualBounds.y-Te.y):(Ph(he,se,ti,ye),ye.w()||ye.assign(pe)):ye.assign(pe):Te.w()?(Ph(he,se,ti,ye),ye.w()||ye.assign(pe)):ye.assign(pe),this.K===90||this.K===270?(ne=Math.round((Ze.x-$e.x)/this.kc),he=Ze.x,se=Math.round((ye.x-pe.x)/this.kc),pe=ye.x):(ne=Math.round((Ze.y-$e.y)/this.kc),he=Ze.y,se=Math.round((ye.y-pe.y)/this.kc),pe=ye.y),lt.free(Ze),lt.free(ye),b.portFromColOffset=ne,b.portFromPos=he,b.portToColOffset=se,b.portToPos=pe}else b.portFromColOffset=0,b.portFromPos=0,b.portToColOffset=0,b.portToPos=0;if(Ze=E.layer,ye=te.layer,Te=0,it=b.link,it!==null){var Tt=it.fromPort,bt=it.toPort;if(Tt!==null&&bt!==null){var Nt=it.fromNode;if(ze=it.toNode,Nt!==null&&ze!==null){var jt=C0(this,!0),Bt=C0(this,!1),_t=this.setsPortSpots?jt:it.computeSpot(!0,Tt);$e=this.setsPortSpots?Bt:it.computeSpot(!1,bt);var Ht=it.isOrthogonal;_t.$c()&&_t.Hf(Bt)&&$e.$c()&&$e.Hf(jt)?Te=0:(jt=it.getLinkPoint(Nt,Tt,_t,!0,Ht,ze,bt,lt.alloc()),Bt=it.getLinkDirection(Nt,Tt,jt,_t,!0,Ht,ze,bt),lt.free(jt),_t.ys()||Bt!==JS(this,b,!0)?this.setsPortSpots&&Nt!==null&&Nt.ports.count===1&&b.rev&&(Te+=1):Te+=1,_t=it.getLinkPoint(ze,bt,$e,!1,Ht,Nt,Tt,lt.alloc()),it=it.getLinkDirection(ze,bt,_t,$e,!1,Ht,Nt,Tt),lt.free(_t),$e.ys()||it!==JS(this,b,!1)?this.setsPortSpots&&ze!==null&&ze.ports.count===1&&b.rev&&(Te+=2):Te+=2)}}}if(ze=Te,Te=ze===1||ze===3,(ze=ze===2||ze===3)&&($e=a.createVertex(),$e.node=null,$e.Dj=1,$e.layer=Ze,$e.near=E,a.dh($e),E=a.Zj(E,$e,b.link),E.valid=!1,E.rev=b.rev,E.portFromColOffset=ne,E.portToColOffset=0,E.portFromPos=he,E.portToPos=0,E=$e),it=1,Te&&it--,Ze-ye>it&&0<Ze){for(b.valid=!1,$e=a.createVertex(),$e.node=null,$e.Dj=2,$e.layer=Ze-1,a.dh($e),E=a.Zj(E,$e,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=ze?0:ne,E.portToColOffset=0,E.portFromPos=ze?0:he,E.portToPos=0,E=$e,Ze--;Ze-ye>it&&0<Ze;)$e=a.createVertex(),$e.node=null,$e.Dj=3,$e.layer=Ze-1,a.dh($e),E=a.Zj(E,$e,b.link),E.valid=!0,E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=0,E.portFromPos=0,E.portToPos=0,E=$e,Ze--;E=a.Zj($e,te,b.link),E.valid=!Te,Te&&($e.near=te),E.rev=b.rev,E.portFromColOffset=0,E.portToColOffset=se,E.portFromPos=0,E.portToPos=pe}else b.valid=!0}}for(a=this.tc=[],y=0;y<=this.Ia;y++)a[y]=0;for(y=this.network.vertexes.iterator;y.next();)y.value.index=-1;for(this.initializeIndices(),this.Iq=-1,x=this.Md=this.Hn=0;x<=this.Ia;x++)a[x]>a[this.Md]&&(this.Iq=a[x]-1,this.Md=x),a[x]<a[this.Hn]&&(this.Hn=x);for(this.fl=[],x=0;x<a.length;x++)this.fl[x]=[];for(y.reset();y.next();)a=y.value,this.fl[a.layer][a.index]=a;for(this.Ra=-1,a=0;a<=this.Ia;a++){for(y=fc(this,a),x=0,b=this.tc[a],te=0;te<b;te++)E=y[te],x+=this.nodeMinColumnSpace(E,!0),E.column=x,x+=1,x+=this.nodeMinColumnSpace(E,!1);this.Ra=Math.max(this.Ra,x-1),dc(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},Li.prototype.linkMinLength=function(){return 1};function gy(a){var y=a.fromVertex.node||a.fromVertex.data;return a=a.toVertex.node||a.toVertex.data,y===null&&a===null?8:y===null||a===null?4:1}Li.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},Li.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 fs(a){a.kj===null&&(a.kj=[]);for(var y=0,x=a.network.vertexes.iterator;x.next();){var b=x.value;a.kj[y]=b.layer,y++,a.kj[y]=b.column,y++,a.kj[y]=b.index,y++}return a.kj}function Qs(a,y){var x=0;for(a=a.network.vertexes.iterator;a.next();){var b=a.value;b.layer=y[x],x++,b.column=y[x],x++,b.index=y[x],x++}}function WS(a,y,x){var b=fc(a,y),E=a.tc[y];(a.Jn===null||a.Jn.length<E*E)&&(a.Jn=[]);for(var te=a.Jn,ne=0;ne<E;ne++){var se=0,he=b[ne],pe=he.near;if(pe!==null&&pe.layer===he.layer)if(he=pe.index,he>ne)for(var ye=ne+1;ye<he;ye++){var Te=b[ye];Te.near===pe&&Te.Dj===pe.Dj||se++}else for(ye=ne-1;ye>he;ye--)Te=b[ye],Te.near===pe&&Te.Dj===pe.Dj||se++;var ze;if(0<=x)for(he=b[ne].sourceEdgesArrayAccess,pe=0;pe<he.length;pe++){var Ze=he[pe];if(Ze.valid&&Ze.fromVertex.layer!==y)for(Te=Ze.fromVertex.index,ye=Ze.portToPos,Ze=Ze.portFromPos,ze=pe+1;ze<he.length;ze++){var $e=he[ze];if($e.valid&&$e.fromVertex.layer!==y){var it=$e.fromVertex.index,Tt=$e.portToPos;$e=$e.portFromPos,ye<Tt&&(Te>it||Te===it&&Ze>$e)&&se++,Tt<ye&&(it>Te||it===Te&&$e>Ze)&&se++}}}if(0>=x){for(he=b[ne].destinationEdgesArrayAccess,pe=0;pe<he.length;pe++)if(Ze=he[pe],Ze.valid&&Ze.toVertex.layer!==y)for(Te=Ze.toVertex.index,ye=Ze.portToPos,Ze=Ze.portFromPos,ze=pe+1;ze<he.length;ze++)$e=he[ze],$e.valid&&$e.toVertex.layer!==y&&(it=$e.toVertex.index,Tt=$e.portToPos,$e=$e.portFromPos,Ze<$e&&(Te>it||Te===it&&ye>Tt)&&se++,$e<Ze&&(it>Te||it===Te&&Tt>ye)&&se++)}for(te[ne*E+ne]=se,he=ne+1;he<E;he++){var bt=0,Nt=0;if(0<=x){se=b[ne].sourceEdgesArrayAccess;var jt=b[he].sourceEdgesArrayAccess;for(pe=0;pe<se.length;pe++)if(Ze=se[pe],Ze.valid&&Ze.fromVertex.layer!==y)for(Te=Ze.fromVertex.index,Ze=Ze.portFromPos,ze=0;ze<jt.length;ze++)$e=jt[ze],$e.valid&&$e.fromVertex.layer!==y&&(it=$e.fromVertex.index,$e=$e.portFromPos,(Te<it||Te===it&&Ze<$e)&&Nt++,(it<Te||it===Te&&$e<Ze)&&bt++)}if(0>=x){for(se=b[ne].destinationEdgesArrayAccess,jt=b[he].destinationEdgesArrayAccess,pe=0;pe<se.length;pe++)if(Ze=se[pe],Ze.valid&&Ze.toVertex.layer!==y)for(Te=Ze.toVertex.index,ye=Ze.portToPos,ze=0;ze<jt.length;ze++)$e=jt[ze],$e.valid&&$e.toVertex.layer!==y&&(it=$e.toVertex.index,Tt=$e.portToPos,(Te<it||Te===it&&ye<Tt)&&Nt++,(it<Te||it===Te&&Tt<ye)&&bt++)}te[ne*E+he]=bt,te[he*E+ne]=Nt}}return dc(a,y,b),te}Li.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=WS(this,y,1),b=this.tc[y],E=0;E<b;E++)for(var te=E;te<b;te++)a+=x[E*b+te];return a};function w0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var b=a,E=x,te=fc(b,E),ne=b.tc[E],se=0,he=0;he<ne;he++){var pe=te[he].destinationEdgesArrayAccess;if(pe!==null)for(var ye=0;ye<pe.length;ye++){var Te=pe[ye];if(Te.valid&&Te.toVertex.layer!==E){var ze=Te.fromVertex.column+Te.portFromColOffset,Ze=Te.toVertex.column+Te.portToColOffset;se+=(Math.abs(ze-Ze)+1)*gy(Te)}}}dc(b,E,te),y+=se}return y}Li.prototype.normalize=function(){var a=1/0;this.Ra=-1;for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;a=Math.min(a,x.column-this.nodeMinColumnSpace(x,!0)),this.Ra=Math.max(this.Ra,x.column+this.nodeMinColumnSpace(x,!1))}for(y.reset();y.next();)y.value.column-=a;this.Ra-=a};function my(a,y,x){for(var b=fc(a,y),E=a.tc[y],te=[],ne=0;ne<E;ne++){var se=b[ne],he=null;0>=x&&(he=se.sourceEdgesArrayAccess);var pe=null;0<=x&&(pe=se.destinationEdgesArrayAccess);var ye=0,Te=0,ze=se.near;if(ze!==null&&ze.layer===se.layer&&(ye+=ze.column-1,Te++),he!==null)for(ze=0;ze<he.length;ze++){se=he[ze];var Ze=se.fromVertex;se.valid&&!se.rev&&Ze.layer!==y&&(ye+=Ze.column,Te++)}if(pe!==null)for(he=0;he<pe.length;he++)se=pe[he],ze=se.toVertex,se.valid&&!se.rev&&ze.layer!==y&&(ye+=ze.column,Te++);te[ne]=Te===0?-1:ye/Te}return dc(a,y,b),te}function HS(a,y,x){for(var b=fc(a,y),E=a.tc[y],te=[],ne=0;ne<E;ne++){var se=b[ne],he=null;0>=x&&(he=se.sourceEdgesArrayAccess);var pe=null;0<=x&&(pe=se.destinationEdgesArrayAccess);var ye=0,Te=[],ze=se.near;if(ze!==null&&ze.layer===se.layer&&(Te[ye]=ze.column-1,ye++),se=void 0,he!==null)for(ze=0;ze<he.length;ze++){se=he[ze];var Ze=se.fromVertex;se.valid&&!se.rev&&Ze.layer!==y&&(Te[ye]=Ze.column+se.portFromColOffset,ye++)}if(pe!==null)for(he=0;he<pe.length;he++)se=pe[he],ze=se.toVertex,se.valid&&!se.rev&&ze.layer!==y&&(Te[ye]=ze.column+se.portToColOffset,ye++);ye===0?te[ne]=-1:(Te.sort(function($e,it){return $e-it}),pe=ye>>1,te[ne]=ye&1?Te[pe]:Te[pe-1]+Te[pe]>>1)}return dc(a,y,b),te}function Pg(a,y,x,b,E,te){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();){var se=ne.value,he=se.toVertex,pe=y.layer-he.layer;se=a.linkMinLength(se),pe===se&&Pg(a,he,x,b,E,te)}if(te)for(ne=y.sourceEdges;ne.next();)se=ne.value,he=se.fromVertex,pe=he.layer-y.layer,se=a.linkMinLength(se),pe===se&&Pg(a,he,x,b,E,te)}}function vy(a,y,x,b,E,te){if(y.component===b){if(y.component=x,E)for(var ne=y.destinationEdges;ne.next();)vy(a,ne.value.toVertex,x,b,E,te);if(te)for(y=y.sourceEdges;y.next();)vy(a,y.value.fromVertex,x,b,E,te)}}Li.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case xy:a=this.network;var y=0,x=a.vertexes.count-1,b=[];b.length=x+1;for(var E=a.vertexes.iterator;E.next();)E.value.valid=!0;for(;zx(a)!==null;){for(E=KS(a);E!==null;)b[x]=E,x--,E.valid=!1,E=KS(a);for(E=VS(a);E!==null;)b[y]=E,y++,E.valid=!1,E=VS(a);E=null;for(var te=0,ne=this.network.vertexes.iterator;ne.next();){var se=ne.value;if(se.valid){for(var he=0,pe=se.destinationEdges;pe.next();)pe.value.toVertex.valid&&he++;pe=0;for(var ye=se.sourceEdges;ye.next();)ye.value.fromVertex.valid&&pe++;(E===null||te<he-pe)&&(E=se,te=he-pe)}}E!==null&&(b[y]=E,y++,E.valid=!1)}for(y=0;y<a.vertexes.count;y++)b[y].index=y;for(b=a.edges.iterator;b.next();)y=b.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case E0:for(b=this.network.vertexes.iterator;b.next();)a=b.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,b.reset();b.next();)y=b.value,y.sourceEdges.count===0&&yy(this,y);for(b.reset();b.next();)y=b.value,y.Ll===-1&&yy(this,y);for(a.reset();a.next();)b=a.value,b.forest||(y=b.fromVertex,x=y.finish,E=b.toVertex,te=E.finish,E.Ll<y.Ll&&x<te&&(this.network.gm(b),b.rev=!0));break;case bg:for(a=this.network,y=a.vertexes.iterator,b=1/0;y.next();)b=Math.min(b,y.value.layer);if(1/0>b){if(0>b)for(y.reset();y.next();)y.value.layer-=b;for(b=[],y.reset();y.next();)x=y.value,E=b[x.layer],E===void 0?b[x.layer]=[x]:E.push(x);for(x=y=0;x<b.length;x++)if(E=b[x],!E||E.length===0)y++;else if(0<x)for(te=0;te<E.length;te++)E[te].layer-=y;for(b=a.edges.iterator;b.next();)y=b.value,y.fromVertex.layer<y.toVertex.layer&&(a.gm(y),y.rev=!0)}}};function zx(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function KS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.destinationEdges;b.next();)if(b.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function VS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,b=y.sourceEdges;b.next();)if(b.value.fromVertex.valid){x=!1;break}if(x)return y}}return null}function yy(a,y){y.Ll=a.Kn,a.Kn++;for(var x=y.destinationEdges;x.next();){var b=x.value,E=b.toVertex;E.Ll===-1&&(b.forest=!0,yy(a,E))}y.finish=a.Kn,a.Kn++}Li.prototype.assignLayers=function(){switch(this.Zk){case wy:ZS(this);break;case Py:for(var a,y=this.network.vertexes.iterator;y.next();)a=YS(this,y.value),this.Ia=Math.max(a,this.Ia);for(y.reset();y.next();)a=y.value,a.layer=this.Ia-a.layer;break;default:case k0:for(ZS(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&$S(this,a);for(a=1/0,y.reset();y.next();)a=Math.min(a,y.value.layer);for(this.Ia=-1,y.reset();y.next();){var x=y.value;x.layer-=a,this.Ia=Math.max(this.Ia,x.layer)}}};function ZS(a){for(var y=a.network.vertexes.iterator;y.next();){var x=XS(a,y.value);a.Ia=Math.max(x,a.Ia)}}function XS(a,y){var x=0;if(y.layer===-1){for(var b=y.destinationEdges;b.next();){var E=b.value,te=E.toVertex;E=a.linkMinLength(E),x=Math.max(x,XS(a,te)+E)}y.layer=x}else x=y.layer;return x}function YS(a,y){var x=0;if(y.layer===-1){for(var b=y.sourceEdges;b.next();){var E=b.value,te=E.fromVertex;E=a.linkMinLength(E),x=Math.max(x,YS(a,te)+E)}y.layer=x}else x=y.layer;return x}function $S(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)$S(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var b=y.sourceEdgesArrayAccess,E=b.length,te=0;te<E;te++){var ne=b[te],se=ne.fromVertex,he=ne.toVertex;ne=a.linkMinLength(ne),se.layer-he.layer>ne&&Pg(a,se,0,-1,!0,!1)}for(Pg(a,y,1,-1,!0,!0);y.component!==0;){for(te=0,b=1/0,se=0,he=null,ne=a.network.vertexes.iterator;ne.next();){var pe=ne.value;if(pe.component===1){var ye=0,Te=!1,ze=pe.sourceEdgesArrayAccess;E=ze.length;for(var Ze=0;Ze<E;Ze++){var $e=ze[Ze],it=$e.fromVertex;ye+=1,it.component!==1&&(te+=1,it=it.layer-pe.layer,$e=a.linkMinLength($e),b=Math.min(b,it-$e))}for(ze=pe.destinationEdgesArrayAccess,E=ze.length,Ze=0;Ze<E;Ze++)$e=ze[Ze].toVertex,--ye,$e.component!==1?--te:Te=!0;(he===null||ye<se)&&!Te&&(he=pe,se=ye)}}if(0<te){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer+=b);y.component=0}else he.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(Pg(a,y,1,-1,!0,!1);y.component!==0;){for(b=0,E=1/0,te=0,se=null,he=a.network.vertexes.iterator;he.next();)if(ne=he.value,ne.component===1){for(pe=0,ye=!1,ze=ne.sourceEdgesArrayAccess,Te=ze.length,Ze=0;Ze<Te;Ze++)$e=ze[Ze].fromVertex,pe+=1,$e.component!==1?b+=1:ye=!0;for(ze=ne.destinationEdgesArrayAccess,Te=ze.length,Ze=0;Ze<Te;Ze++)$e=ze[Ze],it=$e.toVertex,--pe,it.component!==1&&(--b,it=ne.layer-it.layer,$e=a.linkMinLength($e),E=Math.min(E,it-$e));(se===null||pe>te)&&!ye&&(se=ne,te=pe)}if(0>b){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer-=E);y.component=0}else se.component=0}}}function JS(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}Li.prototype.initializeIndices=function(){switch(this.Qk){default:case Cy:for(var a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;y.index=this.tc[x],this.tc[x]++}break;case T0: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&&QS(this,x);break;case by:for(a=this.network.vertexes.iterator,y=0;y<=this.Ia;y++)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&qS(this,x)}};function QS(a,y){var x=y.layer;for(y.index=a.tc[x],a.tc[x]++,y=y.destinationEdgesArrayAccess,x=!0;x;){x=!1;for(var b=0;b<y.length-1;b++){var E=y[b],te=y[b+1];E.portFromColOffset>te.portFromColOffset&&(x=!0,y[b]=te,y[b+1]=E)}}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.toVertex,b.index===-1&&QS(a,b))}function qS(a,y){var x=y.layer;y.index=a.tc[x],a.tc[x]++,y=y.sourceEdgesArrayAccess;for(var b=!0;b;)for(b=!1,x=0;x<y.length-1;x++){var E=y[x],te=y[x+1];E.portToColOffset>te.portToColOffset&&(b=!0,y[x]=te,y[x+1]=E)}for(x=0;x<y.length;x++)b=y[x],b.valid&&(b=b.fromVertex,b.index===-1&&qS(a,b))}Li.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=fs(this),x,b;for(x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)P0(this,b,1),hl(this,b,1);var E=this.countCrossings();for(E<a&&(a=E,y=fs(this)),b=this.Ia;0<=b;b--)P0(this,b,-1),hl(this,b,-1);E=this.countCrossings(),E<a&&(a=E,y=fs(this))}for(Qs(this,y),x=0;x<this.bj;x++){for(b=0;b<=this.Ia;b++)P0(this,b,0),hl(this,b,0);for(E=this.countCrossings(),E<a&&(a=E,y=fs(this)),b=this.Ia;0<=b;b--)P0(this,b,0),hl(this,b,0);E=this.countCrossings(),E<a&&(a=E,y=fs(this))}Qs(this,y);var te,ne,se;switch(this.rk){case Ey:break;case ky:for(se=a+1;(b=this.countCrossings())<se;)for(se=b,x=this.Ia;0<=x;x--)for(ne=0;ne<=x;ne++){for(te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=hl(this,b,-1)||te;for(E=this.countCrossings(),E>=a?Qs(this,y):(a=E,y=fs(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=hl(this,b,1)||te;for(E=this.countCrossings(),E>=a?Qs(this,y):(a=E,y=fs(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=hl(this,b,1)||te;for(E>=a?Qs(this,y):(a=E,y=fs(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=hl(this,b,-1)||te;for(E>=a?Qs(this,y):(a=E,y=fs(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=hl(this,b,0)||te;for(E>=a?Qs(this,y):(a=E,y=fs(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=hl(this,b,0)||te;E>=a?Qs(this,y):(a=E,y=fs(this))}break;default:case M0:for(x=this.Ia,ne=0,se=a+1;(b=this.countCrossings())<se;){for(se=b,te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=hl(this,b,-1)||te;for(E=this.countCrossings(),E>=a?Qs(this,y):(a=E,y=fs(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=hl(this,b,1)||te;for(E=this.countCrossings(),E>=a?Qs(this,y):(a=E,y=fs(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=hl(this,b,1)||te;for(E>=a?Qs(this,y):(a=E,y=fs(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=hl(this,b,-1)||te;for(E>=a?Qs(this,y):(a=E,y=fs(this)),te=!0;te;)for(te=!1,b=x;b>=ne;b--)te=hl(this,b,0)||te;for(E>=a?Qs(this,y):(a=E,y=fs(this)),te=!0;te;)for(te=!1,b=ne;b<=x;b++)te=hl(this,b,0)||te;E>=a?Qs(this,y):(a=E,y=fs(this))}}Qs(this,y)};function P0(a,y,x){var b=fc(a,y),E=a.tc[y],te=HS(a,y,x),ne=my(a,y,x);for(x=0;x<E;x++)ne[x]===-1&&(ne[x]=b[x].column),te[x]===-1&&(te[x]=b[x].column);for(var se=!0,he;se;)for(se=!1,x=0;x<E-1;x++)(te[x+1]<te[x]||te[x+1]===te[x]&&ne[x+1]<ne[x])&&(se=!0,he=te[x],te[x]=te[x+1],te[x+1]=he,he=ne[x],ne[x]=ne[x+1],ne[x+1]=he,he=b[x],b[x]=b[x+1],b[x+1]=he);for(x=te=0;x<E;x++)he=b[x],he.index=x,te+=a.nodeMinColumnSpace(he,!0),he.column=te,te+=1,te+=a.nodeMinColumnSpace(he,!1);dc(a,y,b)}function hl(a,y,x){var b=fc(a,y),E=a.tc[y];x=WS(a,y,x);var te,ne=[];for(te=0;te<E;te++)ne[te]=-1;var se=[];for(te=0;te<E;te++)se[te]=-1;for(var he=!1,pe=!0;pe;)for(pe=!1,te=0;te<E-1;te++){var ye=x[b[te].index*E+b[te+1].index],Te=x[b[te+1].index*E+b[te].index],ze=0,Ze=0,$e=b[te].column,it=b[te+1].column,Tt=a.nodeMinColumnSpace(b[te],!0),bt=a.nodeMinColumnSpace(b[te],!1),Nt=a.nodeMinColumnSpace(b[te+1],!0),jt=a.nodeMinColumnSpace(b[te+1],!1);Tt=$e-Tt+Nt,bt=it-bt+jt;var Bt=b[te].sourceEdges.iterator;for(Bt.reset();Bt.next();)if(Nt=Bt.value,jt=Nt.fromVertex,Nt.valid&&jt.layer===y){for(Nt=0;b[Nt]!==jt;)Nt++;Nt<te&&(ze+=2*(te-Nt),Ze+=2*(te+1-Nt)),Nt===te+1&&(ze+=1),Nt>te+1&&(ze+=4*(Nt-te),Ze+=4*(Nt-(te+1)))}for(Bt=b[te].destinationEdges.iterator,Bt.reset();Bt.next();)if(Nt=Bt.value,jt=Nt.toVertex,Nt.valid&&jt.layer===y){for(Nt=0;b[Nt]!==jt;)Nt++;Nt===te+1&&(Ze+=1)}for(Bt=b[te+1].sourceEdges.iterator,Bt.reset();Bt.next();)if(Nt=Bt.value,jt=Nt.fromVertex,Nt.valid&&jt.layer===y){for(Nt=0;b[Nt]!==jt;)Nt++;Nt<te&&(ze+=2*(te+1-Nt),Ze+=2*(te-Nt)),Nt===te&&(Ze+=1),Nt>te+1&&(ze+=4*(Nt-(te+1)),Ze+=4*(Nt-te))}for(Bt=b[te+1].destinationEdges.iterator,Bt.reset();Bt.next();)if(Nt=Bt.value,jt=Nt.toVertex,Nt.valid&&jt.layer===y){for(Nt=0;b[Nt]!==jt;)Nt++;Nt===te&&(ze+=1)}Nt=jt=0,Bt=ne[b[te].index];var _t=se[b[te].index],Ht=ne[b[te+1].index],Fn=se[b[te+1].index];Bt!==-1&&(jt+=Math.abs(Bt-$e),Nt+=Math.abs(Bt-bt)),_t!==-1&&(jt+=Math.abs(_t-$e),Nt+=Math.abs(_t-bt)),Ht!==-1&&(jt+=Math.abs(Ht-it),Nt+=Math.abs(Ht-Tt)),Fn!==-1&&(jt+=Math.abs(Fn-it),Nt+=Math.abs(Fn-Tt)),(Ze<ze-.5||Ze===ze&&Te<ye-.5||Ze===ze&&Te===ye&&Nt<jt-.5)&&(pe=he=!0,b[te].column=bt,b[te+1].column=Tt,ye=b[te],b[te]=b[te+1],b[te+1]=ye)}for(te=0;te<E;te++)b[te].index=te;return dc(a,y,b),he}Li.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&Xx)!==0;if(1e3<this.network.edges.count&&y&&(a=!1),a){var x=[];for(y=0;y<=this.Ia;y++)x[y]=0;for(var b,E=this.network.vertexes.iterator;E.next();){var te=E.value;y=te.layer,b=te.column,te=this.nodeMinColumnSpace(te,!1),x[y]=Math.max(x[y],b+te)}for(E.reset();E.next();)te=E.value,y=te.layer,b=te.column,te.column=(8*(this.Ra-x[y])>>1)+8*b;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=Zd(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Zd(this,y,-1)||x;x=Zd(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)Sy(this,y,1);for(y=this.Md-1;0<=y;y--)Sy(this,y,-1);Sy(this,this.Md,0)}if(a&&(ex(this,-1),ex(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Zd(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Zd(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Zd(this,y,0)||x}}else Hx(this)};function Zd(a,y,x){for(var b=!1;Gx(a,y,x);)b=!0;return b}function Gx(a,y,x){var b,E=fc(a,y),te=a.tc[y],ne=my(a,y,-1);if(0<x)for(b=0;b<te;b++)ne[b]=-1;var se=my(a,y,1);if(0>x)for(b=0;b<te;b++)se[b]=-1;for(var he=!1,pe=!0;pe;)for(pe=!1,b=0;b<te;b++){var ye=E[b].column,Te=a.nodeMinColumnSpace(E[b],!0),ze=a.nodeMinColumnSpace(E[b],!1),Ze=0;0>b-1||ye-E[b-1].column-1>Te+a.nodeMinColumnSpace(E[b-1],!1)?Ze=ye-1:Ze=ye,Te=b+1>=te||E[b+1].column-ye-1>ze+a.nodeMinColumnSpace(E[b+1],!0)?ye+1:ye;var $e=ze=0,it=0;if(0>=x)for(var Tt=E[b].sourceEdges.iterator;Tt.next();){var bt=Tt.value,Nt=bt.fromVertex;if(bt.valid&&Nt.layer!==y){var jt=gy(bt),Bt=bt.portFromColOffset;bt=bt.portToColOffset,Nt=Nt.column,ze+=(Math.abs(ye+bt-(Nt+Bt))+1)*jt,$e+=(Math.abs(Ze+bt-(Nt+Bt))+1)*jt,it+=(Math.abs(Te+bt-(Nt+Bt))+1)*jt}}if(0<=x)for(Tt=E[b].destinationEdges.iterator;Tt.next();)bt=Tt.value,Nt=bt.toVertex,bt.valid&&Nt.layer!==y&&(jt=gy(bt),Bt=bt.portFromColOffset,bt=bt.portToColOffset,Nt=Nt.column,ze+=(Math.abs(ye+Bt-(Nt+bt))+1)*jt,$e+=(Math.abs(Ze+Bt-(Nt+bt))+1)*jt,it+=(Math.abs(Te+Bt-(Nt+bt))+1)*jt);bt=Bt=jt=0,Tt=ne[E[b].index],Nt=se[E[b].index],Tt!==-1&&(jt+=Math.abs(Tt-ye),Bt+=Math.abs(Tt-Ze),bt+=Math.abs(Tt-Te)),Nt!==-1&&(jt+=Math.abs(Nt-ye),Bt+=Math.abs(Nt-Ze),bt+=Math.abs(Nt-Te)),$e<ze||$e===ze&&Bt<jt?(pe=he=!0,E[b].column=Ze):(it<ze||it===ze&&bt<jt)&&(pe=he=!0,E[b].column=Te)}return dc(a,y,E),a.normalize(),he}function Sy(a,y,x){var b=fc(a,y),E=a.tc[y],te=HS(a,y,x),ne=[];for(x=0;x<E;x++)ne[x]=te[x];for(te=!0;te;)for(te=!1,x=0;x<E;x++){var se=b[x].column,he=a.nodeMinColumnSpace(b[x],!0),pe=a.nodeMinColumnSpace(b[x],!1),ye=0;if(ne[x]===-1)if(x===0&&x===E-1)ye=se;else if(x===0){var Te=b[x+1].column;Te-se===pe+a.nodeMinColumnSpace(b[x+1],!0)?ye=se-1:ye=se}else x===E-1?(Te=b[x-1].column,ye=se-Te===he+a.nodeMinColumnSpace(b[x-1],!1)?se+1:se):(Te=b[x-1].column,he=Te+a.nodeMinColumnSpace(b[x-1],!1)+he+1,Te=b[x+1].column,pe=Te-a.nodeMinColumnSpace(b[x+1],!0)-pe-1,ye=(he+pe)/2|0);else x===0&&x===E-1?ye=ne[x]:x===0?(Te=b[x+1].column,pe=Te-a.nodeMinColumnSpace(b[x+1],!0)-pe-1,ye=Math.min(ne[x],pe)):x===E-1?(Te=b[x-1].column,he=Te+a.nodeMinColumnSpace(b[x-1],!1)+he+1,ye=Math.max(ne[x],he)):(Te=b[x-1].column,he=Te+a.nodeMinColumnSpace(b[x-1],!1)+he+1,Te=b[x+1].column,pe=Te-a.nodeMinColumnSpace(b[x+1],!0)-pe-1,he<ne[x]&&ne[x]<pe?ye=ne[x]:he>=ne[x]?ye=he:pe<=ne[x]&&(ye=pe));ye!==se&&(te=!0,b[x].column=ye)}dc(a,y,b),a.normalize()}function Ux(a,y){for(var x=!0,b=a.network.vertexes.iterator;b.next();){var E=b.value,te=a.nodeMinColumnSpace(E,!0),ne=a.nodeMinColumnSpace(E,!1);if(E.column-te<=y&&E.column+ne>=y){x=!1;break}}if(a=!1,x)for(b.reset();b.next();)x=b.value,x.column>y&&(--x.column,a=!0);return a}function Wx(a,y){var x=y+1,b,E=[],te=[];for(b=0;b<=a.Ia;b++)E[b]=!1,te[b]=!1;for(var ne=a.network.vertexes.iterator;ne.next();){b=ne.value;var se=b.column-a.nodeMinColumnSpace(b,!0),he=b.column+a.nodeMinColumnSpace(b,!1);se<=y&&he>=y&&(E[b.layer]=!0),se<=x&&he>=x&&(te[b.layer]=!0)}for(se=!0,x=!1,b=0;b<=a.Ia;b++)se=se&&!(E[b]&&te[b]);if(se)for(ne.reset();ne.next();)a=ne.value,a.column>y&&(--a.column,x=!0);return x}function ex(a,y){for(var x=0;x<=a.Ra;x++)for(;Ux(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Wx(a,x););a.normalize();var b;if(0<y)for(x=0;x<=a.Ra;x++){var E=fs(a),te=w0(a);for(b=te+1;te<b;){b=te,tx(a,x,1);var ne=w0(a);ne>te?Qs(a,E):ne<te&&(te=ne,E=fs(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(E=fs(a),te=w0(a),b=te+1;te<b;)b=te,tx(a,x,-1),ne=w0(a),ne>te?Qs(a,E):ne<te&&(te=ne,E=fs(a));a.normalize()}function tx(a,y,x){a.le=0;for(var b=a.network.vertexes.iterator;b.next();)b.value.component=-1;if(0<x)for(b.reset();b.next();){var E=b.value;E.column-a.nodeMinColumnSpace(E,!0)<=y&&(E.component=a.le)}if(0>x)for(b.reset();b.next();)E=b.value,E.column+a.nodeMinColumnSpace(E,!1)>=y&&(E.component=a.le);for(a.le++,b.reset();b.next();)y=b.value,y.component===-1&&(vy(a,y,a.le,-1,!0,!0),a.le++);var te;for(y=[],te=0;te<a.le*a.le;te++)y[te]=!1;for(E=[],te=0;te<(a.Ia+1)*(a.Ra+1);te++)E[te]=-1;for(b.reset();b.next();){te=b.value;for(var ne=te.layer,se=Math.max(0,te.column-a.nodeMinColumnSpace(te,!0)),he=Math.min(a.Ra,te.column+a.nodeMinColumnSpace(te,!1));se<=he;se++)E[ne*(a.Ra+1)+se]=te.component}for(te=0;te<=a.Ia;te++){if(0<x)for(ne=0;ne<a.Ra;ne++)E[te*(a.Ra+1)+ne]!==-1&&E[te*(a.Ra+1)+ne+1]!==-1&&E[te*(a.Ra+1)+ne]!==E[te*(a.Ra+1)+ne+1]&&(y[E[te*(a.Ra+1)+ne]*a.le+E[te*(a.Ra+1)+ne+1]]=!0);if(0>x)for(ne=a.Ra;0<ne;ne--)E[te*(a.Ra+1)+ne]!==-1&&E[te*(a.Ra+1)+ne-1]!==-1&&E[te*(a.Ra+1)+ne]!==E[te*(a.Ra+1)+ne-1]&&(y[E[te*(a.Ra+1)+ne]*a.le+E[te*(a.Ra+1)+ne-1]]=!0)}for(E=[],te=0;te<a.le;te++)E[te]=!0;for(ne=[],ne.push(0);ne.length!==0;)if(he=ne[ne.length-1],ne.pop(),E[he])for(E[he]=!1,te=0;te<a.le;te++)y[he*a.le+te]&&ne.splice(0,0,te);if(0<x)for(b.reset();b.next();)a=b.value,E[a.component]&&--a.column;if(0>x)for(b.reset();b.next();)x=b.value,E[x.component]&&(x.column+=1)}function Hx(a){for(var y=$n(),x=a.fl.length,b=0;b<=x;b++)y[b]=[];for(b=a.network.vertexes.iterator;b.next();){var E=b.value;y[x-E.layer][E.index]=E}x=new xn,Kx(y,x);var te=null,ne=null,se=null,he=null,pe=(a.ve&1)!==0,ye=(a.ve&2)!==0,Te=(a.ve&4)!==0,ze=(a.ve&8)!==0;for(pe&&(a.verticalAlignment(y,x,!0),te=b0(a,y,!0,!1)),y.reverse(),Te&&(a.verticalAlignment(y,x,!1),se=b0(a,y,!1,!1)),b=vr(y),E=b.next();!E.done;E=b.next())E.value.reverse();ze&&(a.verticalAlignment(y,x,!1),he=b0(a,y,!1,!0)),y.reverse(),ye&&(a.verticalAlignment(y,x,!0),ne=b0(a,y,!0,!0)),Wn(y),a.u(te,ne,se,he),a.network.vertexes.each(function(Ze){var $e=$n();pe&&$e.push(te.get(Ze)),ye&&$e.push(ne.get(Ze)),Te&&$e.push(se.get(Ze)),ze&&$e.push(he.get(Ze)),$e.sort(function(Tt,bt){return Tt-bt});var it=$e.length;it=($e[Math.floor((it-1)/2)]+$e[Math.ceil((it-1)/2)])/2,Wn($e),Ze.zc=it})}function Kx(a,y){for(var x=a.length,b=1;b<x-1;b++)for(var E=0,te=0,ne=a[b],se=a[b+1],he=0;te<se.length;he++){var pe=se[he];e:{if(pe.node===null){var ye=Ty(pe);if(0<ye.length){ye=ye[0].node===null;break e}}ye=!1}var Te=ye;if(he===se.length-1||Te){for(ye=ne.length-1,Te&&(ye=Ty(pe)[0].index);te<=he;){if(pe=se[te],!pe.bo){Te=[];for(var ze=vr(pe.sourceEdgesArrayAccess),Ze=ze.next();!Ze.done;Ze=ze.next())Ze=Ze.value,Ze.valid&&Te.push(Ze);pe.bo=Te}for(pe=vr(pe.bo),Te=pe.next();!Te.done;Te=pe.next())Te=Te.value,ze=Te.fromVertex.index,(ze<E||ze>ye)&&y.add(Te);te++}E=ye}}}Li.prototype.verticalAlignment=function(a,y,x){Vx(a),a=vr(a);for(var b=a.next();!b.done;b=a.next()){var E=-1;b=vr(b.value);for(var te=b.next();!te.done;te=b.next()){te=te.value;var ne=x?Ty(te):Yx(te),se=ne.length;if(0<se){ne.sort(function(Te,ze){return Te.vi-ze.vi});var he=(se-1)/2;for(se=Math.floor(he),he=Math.ceil(he);se<=he;se++)if(te.align===te){var pe=ne[se],ye=void 0;ye=x?L0(pe,te):L0(te,pe),!y.contains(ye)&&E<pe.vi&&(pe.align=te,te.root=pe.root,te.align=pe.root,E=pe.vi)}}}}};function Vx(a){for(var y=0;y<a.length;y++)for(var x=a[y],b=0;b<x.length;b++){var E=x[b];E.root=E,E.align=E,E.Tz=y,E.vi=b}}function b0(a,y,x,b){for(var E=a.K===90||a.K===270,te=vr(y),ne=te.next();!ne.done;ne=te.next()){var se=vr(ne.value);for(ne=se.next();!ne.done;ne=se.next())ne=ne.value,ne.sd=ne,ne.shift=1/0,ne.zc=NaN,ne.qg=0}for(ne=a.K===90||a.K===270,te=vr(y),se=te.next();!se.done;se=te.next()){se=vr(se.value);for(var he=se.next();!he.done;he=se.next())if(he=he.value,he.root===he){for(var pe=0,ye=he;ye.align!==he;){var Te=ye.align,ze=ne?ye.width:ye.height,Ze=ne?Te.width:Te.height;if(x){var $e=L0(ye,Te),it=$e.portFromPos,Tt=$e.portToPos;$e.link!==null&&(ye.node&&ye.node!==$e.link.fromNode&&(it=ne?ye.focusX:ye.focusY),Te.node&&Te.node!==$e.link.toNode&&(Tt=ne?Te.focusX:Te.focusY))}else $e=L0(Te,ye),it=$e.portToPos,Tt=$e.portFromPos,$e.link!==null&&(ye.node&&ye.node!==$e.link.toNode&&(it=ne?ye.focusX:ye.focusY),Te.node&&Te.node!==$e.link.fromNode&&(Tt=ne?Te.focusX:Te.focusY));ze=b?ye.qg+(ze-it)-(Ze-Tt):ye.qg+it-Tt,Te.qg=ze,pe=Math.min(pe,ze),ye=ye.align}ye=he;do ye.qg=ye.qg-pe,ye=ye.align;while(ye!==he)}}for(x=vr(y),ne=x.next();!ne.done;ne=x.next())for(te=vr(ne.value),ne=te.next();!ne.done;ne=te.next())ne=ne.value,ne.root===ne&&nx(a,ne,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(ne=y[x][0],ne.sd===ne)){ne.sd.shift===1/0&&(ne.sd.shift=0),ne=x,se=0;do{for(te=y[ne][se];te.align!==te.root;)te=te.align,ne++,0<te.vi&&(se=rx(te,y),se.sd.shift=Math.min(se.sd.shift,te.sd.shift+te.zc+te.qg-(se.zc+se.qg+(E?se.width:se.height)+a.columnSpacing)));se=te.vi+1}while(ne<y.length&&se<y[ne].length&&te.sd===y[ne][se].sd)}for(a=new Jt,y=vr(y),ne=y.next();!ne.done;ne=y.next())for(x=vr(ne.value),ne=x.next();!ne.done;ne=x.next())ne=ne.value,ne.zc=ne.zc+ne.sd.shift+ne.qg,te=E?ne.width:ne.height,a.add(ne,b?-ne.zc-te:ne.zc);return a}function nx(a,y,x){if(isNaN(y.zc)){y.zc=0;var b=y;do{if(0<b.vi){var E=rx(b,x),te=E.root;nx(a,te,x),y.sd===y&&(y.sd=te.sd);var ne=a.K===90||a.K===270?E.width:E.height;y.sd===te.sd&&(y.zc=Math.max(y.zc,te.zc+E.qg+ne-b.qg+a.columnSpacing))}b=b.align}while(b!==y);for(;b.align!==y;)b=b.align,b.zc=y.zc,b.sd=y.sd}}function rx(a,y){var x=a.Tz;return a=a.vi,1>a&&Ot("Could not determine previous vertex in layer"),y[x][a-1]}Li.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var b=$n(),E=$n(),te=1/0,ne=0;4>ne;ne++)if(y[ne]){var se=Zx(this,y[ne],b,E,ne);se<te&&(x=ne,te=se)}for(te={},ne=0;4>ne;te={delta:te.delta},ne++)y[ne]&&(te.delta=ne===0||ne===2?b[x]-b[ne]:E[x]-E[ne],te.delta!==0&&y[ne].each(function(he){return function(pe){pe.value+=he.delta}}(te)));Wn(b),Wn(E)};function Zx(a,y,x,b,E){if(!y||y.count===0)return x[E]=0,b[E]=0,1/0;var te=1/0,ne=-1/0;return y.each(function(se){var he=se.key;se=se.value,he=a.K===90||a.K===270?he.width:he.height,se<te&&(te=se),se+he>ne&&(ne=se+he)}),x[E]=te,b[E]=ne,ne-te}Li.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=C0(this,!0),y=C0(this,!1),x=this.network.edges.iterator;x.next();){var b=x.value.link;b!==null&&(b.fromSpot=a,b.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function C0(a,y){return a.K===270?y?ja:sa:a.K===90?y?sa:ja:a.K===180?y?Oa:na:y?na:Oa}Li.prototype.commitNodes=function(){this.he=[],this.Ld=[],this.Kd=[],this.Ta=[];for(var a=0;a<=this.Ia;a++)this.he[a]=0,this.Ld[a]=0,this.Kd[a]=0,this.Ta[a]=0;for(a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;this.he[x]=Math.max(this.he[x],this.nodeMinLayerSpace(y,!0)),this.Ld[x]=Math.max(this.Ld[x],this.nodeMinLayerSpace(y,!1))}y=0,x=this.ie;for(var b=0;b<=this.Ia;b++){var E=x;0>=this.he[b]+this.Ld[b]&&(E=0),0<b&&(y+=E/2),this.K===90||this.K===0?(y+=this.Ld[b],this.Kd[b]=y,y+=this.he[b]):(y+=this.he[b],this.Kd[b]=y,y+=this.Ld[b]),b<this.Ia&&(y+=E/2),this.Ta[b]=y}for(x=y,y=this.arrangementOrigin,b=0;b<=this.Ia;b++)this.K===270?this.Kd[b]=y.y+this.Kd[b]:this.K===90?(this.Kd[b]=y.y+x-this.Kd[b],this.Ta[b]=x-this.Ta[b]):this.K===180?this.Kd[b]=y.x+this.Kd[b]:(this.Kd[b]=y.x+x-this.Kd[b],this.Ta[b]=x-this.Ta[b]);x=this.ve!==0,a.reset(),b=this.K===270||this.K===90;for(var te=1/0,ne=E=1/0,se=-1/0;a.next();){var he=a.value,pe=he.layer,ye=he.column|0;b?(ne=y.x+this.kc*ye,pe=this.Kd[pe]):(ne=this.Kd[pe],pe=y.y+this.kc*ye),he.centerX=ne,he.centerY=pe,x&&isFinite(he.zc)&&(b?he.node?he.x=y.x+he.zc:he.centerX=y.x+he.zc:he.node?he.y=y.y+he.zc:he.centerY=y.y+he.zc),te=Math.min(he.x,te),E=Math.min(he.y,E),b?(ne=te,se=Math.max(se,he.bounds.right)):(ne=E,se=Math.max(se,he.bounds.bottom))}for(this.xw=se-ne,te=y.x-te,y=y.y-E,this.Rf=new lt(x&&b?0:te,x&&!b?0:y),a.reset();a.next();)x=a.value,x.x+=te,x.y+=y,x.commit()},Li.prototype.Gu=function(){for(var a=0,y=this.ie,x=0;x<=this.Ia;x++)a+=this.he[x],a+=this.Ld[x];a+=this.Ia*y,y=[],x=this.ve!==0?this.xw:this.kc*this.Ra;for(var b=this.maxLayer;0<=b;b--)this.K===270?b===0?y.push(new Yt(0,0,x,Math.abs(this.Ta[0]))):y.push(new Yt(0,this.Ta[b-1],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===90?b===0?y.push(new Yt(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new Yt(0,this.Ta[b],x,Math.abs(this.Ta[b-1]-this.Ta[b]))):this.K===180?b===0?y.push(new Yt(0,0,Math.abs(this.Ta[0]),x)):y.push(new Yt(this.Ta[b-1],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x)):b===0?y.push(new Yt(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new Yt(this.Ta[b],0,Math.abs(this.Ta[b-1]-this.Ta[b]),x));this.commitLayers(y,this.Rf)},Li.prototype.commitLayers=function(){},Li.prototype.commitLinks=function(){for(var a=this.network.edges.iterator,y;a.next();)y=a.value.link,y!==null&&(y.uh(),y.Fj(),y.zf());for(a.reset();a.next();)y=a.value.link,y!==null&&y.vg();for(a.reset();a.next();){var x=a.value;if(y=x.link,y!==null){y.uh();var b=y,E=b.fromNode,te=b.toNode,ne=b.fromPort,se=b.toPort;if(E!==null){var he=E.findVisibleNode();he!==null&&he!==E&&(E=he,ne=he.port)}te!==null&&(he=te.findVisibleNode(),he!==null&&he!==te&&(te=he,se=he.port));var pe=y.computeSpot(!0,ne);he=y.computeSpot(!1,se);var ye=x.fromVertex,Te=x.toVertex;if(x.valid)y.curve===Rs&&y.pointsCount===4&&(ye.column===Te.column&&this.alignOption===0?(x=y.getLinkPoint(E,ne,pe,!0,!1,te,se),se=y.getLinkPoint(te,se,he,!1,!1,E,ne),x.w()||x.set(E.actualBounds.center),se.w()||se.set(te.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+se.x)/3,(2*x.y+se.y)/3),y.yf((x.x+2*se.x)/3,(x.y+2*se.y)/3),y.yf(se.x,se.y)):(x=b=!1,ne!==null&&pe===zr&&(b=!0),se!==null&&he===zr&&(x=!0),(b||x)&&(he=null,b&&(he=y.getLinkPointFromPoint(E,ne,ne.ga(ti),y.i(3),!0),he.w()||he.set(E.actualBounds.center),y.L(0,he.x,he.y)),E=null,x&&(E=y.getLinkPointFromPoint(te,se,se.ga(ti),y.i(0),!1),E.w()||E.set(te.actualBounds.center),y.L(3,E.x,E.y)),he&&(te=y.i(2),y.L(1,(2*he.x+te.x)/3,(2*he.y+te.y)/3)),E&&(te=y.i(1),y.L(2,(2*E.x+te.x)/3,(2*E.y+te.y)/3))))),y.zf();else if(ye.layer===Te.layer)y.zf();else{var ze=!1,Ze=!1,$e=this.ie,it=y.firstPickIndex+1;if(y.isOrthogonal){Ze=!0;var Tt=y.pointsCount;4<Tt&&y.points.removeRange(2,Tt-3)}else if(y.curve===Rs)ze=!0,Tt=y.pointsCount,4<Tt&&y.points.removeRange(2,Tt-3),Tt===4&&(it=2);else{Tt=y.pointsCount;var bt=pe===zr,Nt=he===zr;2<Tt&&bt&&Nt?y.points.removeRange(1,Tt-2):3<Tt&&bt&&!Nt?y.points.removeRange(1,Tt-3):3<Tt&&!bt&&Nt?y.points.removeRange(2,Tt-2):4<Tt&&!bt&&!Nt&&y.points.removeRange(2,Tt-3)}if(x.rev){for(;Te!==null&&ye!==Te;){var jt=Tt=null;for(bt=Te.sourceEdges.iterator;bt.next()&&(Nt=bt.value,Nt.link!==x.link||(Tt=Nt.fromVertex,jt=Nt.toVertex,Tt.node!==null)););if(Tt===null)break;if(Tt!==ye){bt=y.i(it-1).x,Nt=y.i(it-1).y;var Bt=Tt.centerX,_t=Tt.centerY;if(Ze)this.K===180||this.K===0?it===y.firstPickIndex+1?(y.m(it++,bt,Nt),y.m(it++,bt,_t)):(jt!==null?jt.centerY:Nt)!==_t&&(jt=this.Ta[Tt.layer-1]+this.Rf.x,y.m(it++,jt,Nt),y.m(it++,jt,_t)):it===y.firstPickIndex+1?(y.m(it++,bt,Nt),y.m(it++,Bt,Nt)):(jt!==null?jt.centerX:bt)!==Bt&&(jt=this.Ta[Tt.layer-1]+this.Rf.y,y.m(it++,bt,jt),y.m(it++,Bt,jt));else if(it===y.firstPickIndex+1){jt=Math.max(10,this.he[Te.layer]);var Ht=Math.max(10,this.Ld[Te.layer]);if(ze)this.K===180?Bt<=Te.bounds.x?(Te=Te.bounds.x,y.m(it++,Te-jt,_t),y.m(it++,Te,_t),y.m(it++,Te+Ht,_t)):(y.m(it++,Bt-jt,_t),y.m(it++,Bt,_t),y.m(it++,Bt+Ht,_t)):this.K===90?_t>=Te.bounds.bottom?(Te=Te.bounds.y+Te.bounds.height,y.m(it++,Bt,Te+Ht),y.m(it++,Bt,Te),y.m(it++,Bt,Te-jt)):(y.m(it++,Bt,_t+Ht),y.m(it++,Bt,_t),y.m(it++,Bt,_t-jt)):this.K===270?_t<=Te.bounds.y?(Te=Te.bounds.y,y.m(it++,Bt,Te-jt),y.m(it++,Bt,Te),y.m(it++,Bt,Te+Ht)):(y.m(it++,Bt,_t-jt),y.m(it++,Bt,_t),y.m(it++,Bt,_t+Ht)):this.K===0&&(Bt>=Te.bounds.right?(Te=Te.bounds.x+Te.bounds.width,y.m(it++,Te+Ht,_t),y.m(it++,Te,_t),y.m(it++,Te-jt,_t)):(y.m(it++,Bt+Ht,_t),y.m(it++,Bt,_t),y.m(it++,Bt-jt,_t)));else{y.m(it++,bt,Nt);var Fn=0;this.K===180||this.K===0?((this.K===180?Bt>=Te.bounds.right:Bt<=Te.bounds.x)&&(Fn=(this.K===0?-jt:Ht)/2),y.m(it++,bt+Fn,_t)):((this.K===270?_t>=Te.bounds.bottom:_t<=Te.bounds.y)&&(Fn=(this.K===90?-jt:Ht)/2),y.m(it++,Bt,Nt+Fn)),y.m(it++,Bt,_t)}}else jt=Math.max(10,this.he[Tt.layer]),Ht=Math.max(10,this.Ld[Tt.layer]),ze?this.K===180?(y.m(it++,Bt-jt-$e,_t),y.m(it++,Math.min(Bt-jt+$e/2,Bt),_t),y.m(it++,Bt,_t),y.m(it++,Bt,_t),y.m(it++,Math.max(Bt+Ht-$e/2,Bt),_t),y.m(it++,Bt+Ht+$e,_t)):this.K===90?(y.m(it++,Bt,_t+Ht+$e),y.m(it++,Bt,Math.max(_t+Ht-$e/2,_t)),y.m(it++,Bt,_t),y.m(it++,Bt,_t),y.m(it++,Bt,Math.min(_t-jt+$e/2,_t)),y.m(it++,Bt,_t-jt-$e)):this.K===270?(y.m(it++,Bt,_t-jt-$e),y.m(it++,Bt,Math.min(_t-jt+$e/2,_t)),y.m(it++,Bt,_t),y.m(it++,Bt,_t),y.m(it++,Bt,Math.max(_t+Ht-$e/2,_t)),y.m(it++,Bt,_t+Ht+$e)):(y.m(it++,Bt+Ht+$e,_t),y.m(it++,Math.max(Bt+Ht-$e/2,Bt),_t),y.m(it++,Bt,_t),y.m(it++,Bt,_t),y.m(it++,Math.min(Bt-jt+$e/2,Bt),_t),y.m(it++,Bt-jt-$e,_t)):y.m(it++,Bt,_t)}Te=Tt}(se===null||pe!==zr||Ze)&&(bt=y.i(it-1).x,Nt=y.i(it-1).y,Bt=y.i(it).x,_t=y.i(it).y,Ze?($e=this.Ld[ye.layer],this.K===180||this.K===0?(Ze=Nt,Ze>=ye.bounds.y&&Ze<=ye.bounds.bottom&&(this.K===180?Bt>=ye.bounds.x:Bt<=ye.bounds.right)&&(Te=ye.centerX+(this.K===180?-$e:$e),Ze<ye.bounds.y+ye.bounds.height/2?Ze=ye.bounds.y-this.kc/2:Ze=ye.bounds.bottom+this.kc/2,y.m(it++,Te,Nt),y.m(it++,Te,Ze)),y.m(it++,Bt,Ze)):(Ze=bt,Ze>=ye.bounds.x&&Ze<=ye.bounds.right&&(this.K===270?_t>=ye.bounds.y:_t<=ye.bounds.bottom)&&(Te=ye.centerY+(this.K===270?-$e:$e),Ze<ye.bounds.x+ye.bounds.width/2?Ze=ye.bounds.x-this.kc/2:Ze=ye.bounds.right+this.kc/2,y.m(it++,bt,Te),y.m(it++,Ze,Te)),y.m(it++,Ze,_t)),y.m(it++,Bt,_t)):ze?(jt=Math.max(10,this.he[ye.layer]),Ht=Math.max(10,this.Ld[ye.layer]),this.K===180&&Bt>=ye.bounds.x?(Te=ye.bounds.x+ye.bounds.width,y.L(it-2,Te,Nt),y.L(it-1,Te+Ht,Nt)):this.K===90&&_t<=ye.bounds.bottom?(Te=ye.bounds.y,y.L(it-2,bt,Te),y.L(it-1,bt,Te-jt)):this.K===270&&_t>=ye.bounds.y?(Te=ye.bounds.y+ye.bounds.height,y.L(it-2,bt,Te),y.L(it-1,bt,Te+Ht)):this.K===0&&Bt<=ye.bounds.right&&(Te=ye.bounds.x,y.L(it-2,Te,Nt),y.L(it-1,Te-jt,Nt))):(jt=Math.max(10,this.he[ye.layer]),Ht=Math.max(10,this.Ld[ye.layer]),Ze=0,this.K===180||this.K===0?((this.K===180?Bt<=ye.bounds.x:Bt>=ye.bounds.right)&&(Ze=(this.K===0?Ht:-jt)/2),y.m(it++,Bt+Ze,Nt)):((this.K===270?_t<=ye.bounds.y:_t>=ye.bounds.bottom)&&(Ze=(this.K===90?Ht:-jt)/2),y.m(it++,bt,_t+Ze)),y.m(it++,Bt,_t)))}else{for(;ye!==null&&ye!==Te;){for(jt=Tt=null,ye=ye.destinationEdges.iterator;ye.next()&&(bt=ye.value,bt.link!==x.link||(Tt=bt.toVertex,jt=bt.fromVertex,jt.node!==null&&(jt=null),Tt.node!==null)););if(Tt===null)break;Tt!==Te&&(bt=y.i(it-1).x,Nt=y.i(it-1).y,Bt=Tt.centerX,_t=Tt.centerY,Ze?this.K===180||this.K===0?(jt!==null?jt.centerY:Nt)!==_t&&(jt=this.Ta[Tt.layer]+this.Rf.x,it===y.firstPickIndex+1&&(jt=this.K===0?Math.max(jt,bt):Math.min(jt,bt)),y.m(it++,jt,Nt),y.m(it++,jt,_t)):(jt!==null?jt.centerX:bt)!==Bt&&(jt=this.Ta[Tt.layer]+this.Rf.y,it===y.firstPickIndex+1&&(jt=this.K===90?Math.max(jt,Nt):Math.min(jt,Nt)),y.m(it++,bt,jt),y.m(it++,Bt,jt)):(jt=Math.max(10,this.he[Tt.layer]),Ht=Math.max(10,this.Ld[Tt.layer]),ze?this.K===180?(y.m(it++,Bt+Ht+$e,_t),y.m(it++,Math.max(Bt+Ht-$e/2,Bt),_t),y.m(it++,Bt,_t),y.m(it++,Bt,_t),y.m(it++,Math.min(Bt-jt+$e/2,Bt),_t),y.m(it++,Bt-jt-$e,_t)):this.K===90?(y.m(it++,Bt,_t-jt-$e),y.m(it++,Bt,Math.min(_t-jt+$e/2,_t)),y.m(it++,Bt,_t),y.m(it++,Bt,_t),y.m(it++,Bt,Math.max(_t+Ht-$e/2,_t)),y.m(it++,Bt,_t+Ht+$e)):this.K===270?(y.m(it++,Bt,_t+Ht+$e),y.m(it++,Bt,Math.max(_t+Ht-$e/2,_t)),y.m(it++,Bt,_t),y.m(it++,Bt,_t),y.m(it++,Bt,Math.min(_t-jt+$e/2,_t)),y.m(it++,Bt,_t-jt-$e)):(y.m(it++,Bt-jt-$e,_t),y.m(it++,Math.min(Bt-jt+$e/2,Bt),_t),y.m(it++,Bt,_t),y.m(it++,Bt,_t),y.m(it++,Math.max(Bt+Ht-$e/2,Bt),_t),y.m(it++,Bt+Ht+$e,_t)):this.K===180?(y.m(it++,Bt+Ht,_t),y.m(it++,Bt-jt,_t)):this.K===90?(y.m(it++,Bt,_t-jt),y.m(it++,Bt,_t+Ht)):this.K===270?(y.m(it++,Bt,_t+Ht),y.m(it++,Bt,_t-jt)):(y.m(it++,Bt-jt,_t),y.m(it++,Bt+Ht,_t)))),ye=Tt}Ze&&(bt=y.i(it-1).x,Nt=y.i(it-1).y,Bt=y.i(it).x,_t=y.i(it).y,this.K===180||this.K===0?Nt!==_t&&(jt=this.K===0?Math.min(Math.max((Bt+bt)/2,this.Ta[Te.layer]+this.Rf.x),Bt):Math.max(Math.min((Bt+bt)/2,this.Ta[Te.layer]+this.Rf.x),Bt),y.m(it++,jt,Nt),y.m(it++,jt,_t)):bt!==Bt&&(jt=this.K===90?Math.min(Math.max((_t+Nt)/2,this.Ta[Te.layer]+this.Rf.y),_t):Math.max(Math.min((_t+Nt)/2,this.Ta[Te.layer]+this.Rf.y),_t),y.m(it++,bt,jt),y.m(it++,Bt,jt)))}b!==null&&ze&&4<=y.pointsCount&&(ne!==null&&(ne=pe===zr?y.getLinkPointFromPoint(E,ne,ne.ga(ti),y.i(3),!0):y.i(0),pe===zr&&(pe=y.i(2),b=y.i(3),this.direction===90||this.direction===270?(y.L(1,(ne.x+pe.x)/2,pe.y),y.L(2,b.x,(pe.y+b.y)/2)):(y.L(1,pe.x,(ne.y+pe.y)/2),y.L(2,(pe.x+b.x)/2,b.y))),ne.w()||ne.set(E.actualBounds.center),y.L(0,ne.x,ne.y)),se!==null&&(E=he===zr?y.getLinkPointFromPoint(te,se,se.ga(ti),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),he===zr&&(se=y.i(y.pointsCount-3),he=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(E.x+se.x)/2,se.y),y.L(y.pointsCount-2,he.x,(se.y+he.y)/2)):(y.L(y.pointsCount-2,se.x,(E.y+se.y)/2),y.L(y.pointsCount-3,(se.x+he.x)/2,he.y))),E.w()||E.set(te.actualBounds.center),y.L(y.pointsCount-1,E.x,E.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},Li.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new yn,y=this.network.edges.iterator;y.next();){var x=y.value.link;x!==null&&x.isOrthogonal&&!a.contains(x)&&a.add(x)}if(0<a.count)if(this.K===90||this.K===270){for(y=0,x=[],a=a.iterator;a.next();){var b=a.value;if(b!==null&&b.isOrthogonal)for(var E=2;E<b.pointsCount-3;E++){var te=b.i(E),ne=b.i(E+1);if(this.B(te.y,ne.y)&&!this.B(te.x,ne.x)){var se=new pc;se.layer=Math.floor(te.y/2);var he=b.i(0),pe=b.i(b.pointsCount-1);if(se.first=he.x*he.x+he.y,se.jc=pe.x*pe.x+pe.y,se.rd=Math.min(te.x,ne.x),se.Ic=Math.max(te.x,ne.x),se.index=E,se.link=b,E+2<b.pointsCount){he=b.i(E-1),pe=b.i(E+2);var ye=0;he.y<te.y?ye=pe.y<te.y?3:te.x<ne.x?2:1:he.y>te.y&&(ye=pe.y>te.y?0:ne.x<te.x?2:1),se.j=ye}x.push(se)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(te=x[a].layer,b=a+1;b<x.length&&x[b].layer===te;)b++;if(1<b-a)for(te=a;te<b;){for(ne=x[te].Ic,E=a+1;E<b&&x[E].rd<ne;)ne=Math.max(ne,x[E].Ic),E++;if(ne=E-te,1<ne){for(this.zi(x,this.Js,te,te+ne),ye=1,se=x[te].jc,he=te;he<E;he++)pe=x[he],pe.jc!==se&&(ye++,se=pe.jc);this.zi(x,this.Ux,te,te+ne);var Te=1;for(se=x[te].first,he=te;he<E;he++)pe=x[he],pe.first!==se&&(Te++,se=pe.first);for(he=!0,pe=Te,ye<Te?(he=!1,pe=ye,se=x[te].jc,this.zi(x,this.Js,te,te+ne)):se=x[te].first,ye=0,Te=te;Te<E;Te++){var ze=x[Te];(he?ze.first:ze.jc)!==se&&(ye++,se=he?ze.first:ze.jc);var Ze=ze.link;te=Ze.i(ze.index),ne=Ze.i(ze.index+1);var $e=this.linkSpacing*(ye-(pe-1)/2);y++,Ze.uh(),Ze.L(ze.index,te.x,te.y+$e),Ze.L(ze.index+1,ne.x,ne.y+$e),Ze.zf()}}te=E}a=b}}else{for(y=0,x=[],a=a.iterator;a.next();)if(b=a.value,b!==null&&b.isOrthogonal)for(E=2;E<b.pointsCount-3;E++)te=b.i(E),ne=b.i(E+1),this.B(te.x,ne.x)&&!this.B(te.y,ne.y)&&(se=new pc,se.layer=Math.floor(te.x/2),he=b.i(0),pe=b.i(b.pointsCount-1),se.first=he.x+he.y*he.y,se.jc=pe.x+pe.y*pe.y,se.rd=Math.min(te.y,ne.y),se.Ic=Math.max(te.y,ne.y),se.index=E,se.link=b,E+2<b.pointsCount&&(he=b.i(E-1),pe=b.i(E+2),ye=0,he.x<te.x?ye=pe.x<te.x?3:te.y<ne.y?2:1:he.x>te.x&&(ye=pe.x>te.x?0:ne.y<te.y?2:1),se.j=ye),x.push(se));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(te=x[a].layer,b=a+1;b<x.length&&x[b].layer===te;)b++;if(1<b-a)for(te=a;te<b;){for(ne=x[te].Ic,E=a+1;E<b&&x[E].rd<ne;)ne=Math.max(ne,x[E].Ic),E++;if(ne=E-te,1<ne){for(this.zi(x,this.Js,te,te+ne),ye=1,se=x[te].jc,he=te;he<E;he++)pe=x[he],pe.jc!==se&&(ye++,se=pe.jc);for(this.zi(x,this.Ux,te,te+ne),Te=1,se=x[te].first,he=te;he<E;he++)pe=x[he],pe.first!==se&&(Te++,se=pe.first);for(he=!0,pe=Te,ye<Te?(he=!1,pe=ye,se=x[te].jc,this.zi(x,this.Js,te,te+ne)):se=x[te].first,ye=0,Te=te;Te<E;Te++)ze=x[Te],(he?ze.first:ze.jc)!==se&&(ye++,se=he?ze.first:ze.jc),Ze=ze.link,te=Ze.i(ze.index),ne=Ze.i(ze.index+1),$e=this.linkSpacing*(ye-(pe-1)/2),y++,Ze.uh(),Ze.L(ze.index,te.x+$e,te.y),Ze.L(ze.index+1,ne.x+$e,ne.y),Ze.zf()}te=E}a=b}}}},et=Li.prototype,et.Vx=function(a,y){return a instanceof pc&&y instanceof pc&&a!==y?a.layer<y.layer?-1:a.layer>y.layer?1:a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},et.Ux=function(a,y){return a instanceof pc&&y instanceof pc&&a!==y?a.first<y.first?-1:a.first>y.first||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},et.Js=function(a,y){return a instanceof pc&&y instanceof pc&&a!==y?a.jc<y.jc?-1:a.jc>y.jc||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},et.B=function(a,y){return a-=y,-1<a&&1>a},et.zi=function(a,y,x,b){var E=a.length,te=b-x;if(!(1>=te))if((0>x||x>=E-1)&&Ot("not in range 0 <= from < length: "+x),te===2)b=a[x],E=a[x+1],0<y(b,E)&&(a[x]=E,a[x+1]=b);else if(x===0)if(b>=E)a.sort(y);else for(x=a.slice(0,b),x.sort(y),y=0;y<b;y++)a[y]=x[y];else if(b>=E)for(b=a.slice(x),b.sort(y),y=x;y<E;y++)a[y]=b[y-x];else for(E=a.slice(x,b),E.sort(y),y=x;y<b;y++)a[y]=E[y-x]};function fc(a,y){var x=a.tc[y];if(x>=a.He.length){for(var b=[],E=0;E<a.He.length;E++)b[E]=a.He[E];a.He=b}for(a.He[x]===void 0||a.He[x]===null?b=[]:(b=a.He[x],a.He[x]=null),a=a.fl[y],y=0;y<a.length;y++)x=a[y],b[x.index]=x;return b}function dc(a,y,x){a.He[a.tc[y]]=x}Zt.Object.defineProperties(Li.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()):Ot("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==xy&&a!==E0&&a!==bg||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==k0&&a!==wy&&a!==Py||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==T0&&a!==by&&a!==Cy||(this.Qk=a,this.C())}},iterations:{get:function(){return this.bj},set:function(a){this.bj!==a&&0<=a&&(this.bj=a,this.C())}},aggressiveOption:{get:function(){return this.rk},set:function(a){this.rk===a||a!==Ey&&a!==M0&&a!==ky||(this.rk=a,this.C())}},packOption:{get:function(){return this.bg},set:function(a){this.bg!==a&&0<=a&&8>a&&(this.bg=a,this.C())}},alignOption:{get:function(){return this.ve},set:function(a){this.ve!==a&&0<=a&&16>a&&(this.ve=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},linkSpacing:{get:function(){return this.Cn},set:function(a){this.Cn!==a&&0<=a&&(this.Cn=a,this.C())}},maxLayer:{get:function(){return this.Ia}},maxIndex:{get:function(){return this.Iq}},maxColumn:{get:function(){return this.Ra}},minIndexLayer:{get:function(){return this.Hn}},maxIndexLayer:{get:function(){return this.Md}}});var E0=new un(Li,"CycleDepthFirst",0),xy=new un(Li,"CycleGreedy",1),bg=new un(Li,"CycleFromLayers",2),k0=new un(Li,"LayerOptimalLinkLength",0),wy=new un(Li,"LayerLongestPathSink",1),Py=new un(Li,"LayerLongestPathSource",2),T0=new un(Li,"InitDepthFirstOut",0),by=new un(Li,"InitDepthFirstIn",1),Cy=new un(Li,"InitNaive",2),Ey=new un(Li,"AggressiveNone",0),M0=new un(Li,"AggressiveLess",1),ky=new un(Li,"AggressiveMore",2),Xx=8;Li.className="LayeredDigraphLayout",Li.CycleDepthFirst=E0,Li.CycleGreedy=xy,Li.CycleFromLayers=bg,Li.LayerOptimalLinkLength=k0,Li.LayerLongestPathSink=wy,Li.LayerLongestPathSource=Py,Li.InitDepthFirstOut=T0,Li.InitDepthFirstIn=by,Li.InitNaive=Cy,Li.AggressiveNone=Ey,Li.AggressiveLess=M0,Li.AggressiveMore=ky,Li.PackNone=0,Li.PackExpand=1,Li.PackStraighten=2,Li.PackMedian=4,Li.PackAll=15,Li.AlignNone=0,Li.AlignUpperLeft=1,Li.AlignUpperRight=2,Li.AlignLowerLeft=4,Li.AlignLowerRight=8,Li.AlignAll=15;function pc(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}pc.className="SegInfo";function Xd(a){Ki.call(this,a)}nn(Xd,Ki),Xd.prototype.createVertex=function(){return new el(this)},Xd.prototype.createEdge=function(){return new Cg(this)},Xd.className="LayeredDigraphNetwork";function el(a){Uo.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}nn(el,Uo);function ix(a,y){return a.index-y.index}function L0(a,y){if(!a.$n){for(var x=[],b=vr(a.destinationEdgesArrayAccess),E=b.next();!E.done;E=b.next())E=E.value,E.valid&&x.push(E);a.$n=x}for(a=vr(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Ot("Unable to find destination edge to given vertex")}function Ty(a){if(!a.co){for(var y=[],x=vr(a.sourceEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.fromVertex);y.sort(ix),a.co=y}return a.co}function Yx(a){if(!a.ao){for(var y=[],x=vr(a.destinationEdgesArrayAccess),b=x.next();!b.done;b=x.next())b=b.value,b.valid&&y.push(b.toVertex);y.sort(ix),a.ao=y}return a.ao}el.prototype.Cl=function(a){Uo.prototype.Cl.call(this,a),this.bo=this.co=null},el.prototype.Kl=function(a){Uo.prototype.Kl.call(this,a),this.bo=this.co=null},el.prototype.zl=function(a){Uo.prototype.zl.call(this,a),this.$n=this.ao=null},el.prototype.Jl=function(a){Uo.prototype.Jl.call(this,a),this.$n=this.ao=null},Zt.Object.defineProperties(el.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)}}}),el.prototype.deleteDestinationEdge=el.prototype.Jl,el.prototype.addDestinationEdge=el.prototype.zl,el.prototype.deleteSourceEdge=el.prototype.Kl,el.prototype.addSourceEdge=el.prototype.Cl,el.className="LayeredDigraphVertex";function Cg(a){Es.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}nn(Cg,Es),Zt.Object.defineProperties(Cg.prototype,{fromVertex:{get:function(){return this.kd},set:function(a){this.kd!==a&&(this.kd=a)}},toVertex:{get:function(){return this.qd},set:function(a){this.qd!==a&&(this.qd=a)}},valid:{get:function(){return this.Ha},set:function(a){this.Ha!==a&&(this.Ha=a)}},rev:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}},forest:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}},portFromPos:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},portToPos:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}},portFromColOffset:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},portToColOffset:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}}}),Cg.className="LayeredDigraphEdge";function Jr(a){so.call(this),this.Ub=new xn,this.Wn=O0,this.ud=wu,this.vo=D0,this.Bq=Ry,this.$v=[],this.td=!0,this.Rb=B0,this.$d=new fn(10,10).freeze();var y=new Kf(this);this.W=new cl(y),this.Y=new cl(y),this.ru=[],a&&Object.assign(this,a)}nn(Jr,so),Jr.prototype.cloneProtected=function(a){so.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)},Jr.prototype.qb=function(a){a.classType===Jr?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:Ot("Unknown enum value: "+a):so.prototype.qb.call(this,a)},Jr.prototype.createNetwork=function(){return new Kf(this)},Jr.prototype.makeNetwork=function(a){function y(b){if(b instanceof Rn)return!b.isLinkLabel&&b.category!=="Comment";if(b instanceof Tn){var E=b.fromNode;return E===null||E.isLinkLabel||E.category==="Comment"?!1:(b=b.toNode,!(b===null||b.isLinkLabel||b.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof Vt?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof jr?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Jr.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==I0&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof Vt&&(y=a),this.path===O0&&y!==null?this.ud=y.isTreePathToChildren?wu:Wf:this.ud=this.path===O0?wu: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 xn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Rn?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof cl&&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,My(this,y));for(y=this.network.vertexes,a=null;a=$x(y),0<a.count;)y=ox(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,My(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof cl&&sx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof cl&&lx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof cl&&ux(this,y);if(this.Cu(),this.layerStyle===R0){for(a=[],y=this.network.vertexes.iterator;y.next();){x=y.value;var b=x.parent;b===null&&(b=x),b=b.angle===0||b.angle===180;var E=a[x.level];E===void 0&&(E=0),a[x.level]=Math.max(E,b?x.width:x.height)}for(y=0;y<a.length;y++)a[y]===void 0&&(a[y]=0);for(this.$v=a,y=this.network.vertexes.iterator;y.next();)x=y.value,b=x.parent,b===null&&(b=x),b.angle===0||b.angle===180?(b.angle===180&&(x.focusX+=a[x.level]-x.width),x.width=a[x.level]):(b.angle===270&&(x.focusY+=a[x.level]-x.height),x.height=a[x.level])}else if(this.layerStyle===_y)for(a=this.network.vertexes.iterator;a.next();){for(y=a.value,x=y.angle===0||y.angle===180,b=-1,E=0;E<y.children.length;E++){var te=y.children[E];b=Math.max(b,x?te.width:te.height)}if(0<=b)for(E=0;E<y.children.length;E++)te=y.children[E],x?(y.angle===180&&(te.focusX+=b-te.width),te.width=b):(y.angle===270&&(te.focusY+=b-te.height),te.height=b)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof cl&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new xn,this.isValidLayout=!0};function $x(a){var y=new xn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Jr.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case wu:x.sourceEdges.count===0&&this.Ub.add(x);break;case Wf:x.destinationEdges.count===0&&this.Ub.add(x);break;default:Ot("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=ox(this,a),a!==null&&this.Ub.add(a))};function ox(a,y){var x=999999,b=null;for(y=y.iterator;y.next();){var E=y.value;switch(a.ud){case wu:E.sourceEdges.count<x&&(x=E.sourceEdges.count,b=E);break;case Wf:E.destinationEdges.count<x&&(x=E.destinationEdges.count,b=E);break;default:Ot("Unhandled path value "+a.ud.toString())}}return b}function My(a,y){if(y!==null){switch(a.ud){case wu:if(0<y.destinationEdges.count){for(var x=new yn,b=y.destinationVertexes;b.next();){var E=b.value;ax(a,y,E)&&x.add(E)}0<x.count&&(y.children=x.Fa())}break;case Wf:if(0<y.sourceEdges.count){for(x=new yn,b=y.sourceVertexes;b.next();)E=b.value,ax(a,y,E)&&x.add(E);0<x.count&&(y.children=x.Fa())}break;default:Ot("Unhandled path value"+a.ud.toString())}for(x=y.children,b=x.length,E=0;E<b;E++){var te=x[E];te.initialized=!0,te.level=y.level+1,te.parent=y,a.Ub.remove(te)}for(y=0;y<b;y++)My(a,x[y])}}function ax(a,y,x){if(x.initialized){if(y===null)var b=!1;else{for(b=y.parent;b!==null&&b!==x;)b=b.parent;b=b===x}if(b||x.level>y.level)return!1;a.removeChild(x.parent,x)}return!0}Jr.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,b=0,E=0;E<x.length;E++)x[E]===y&&b++;if(0<b){b=Array(x.length-b);for(var te=E=0;te<x.length;te++)x[te]!==y&&(b[E++]=x[te]);a.children=b}}};function sx(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===Cu&&a.sortTreeVertexChildren(y);for(var x=0,b=y.childrenCount,E=0,te=y.children,ne=te.length,se=0;se<ne;se++){var he=te[se];sx(a,he),x+=he.descendantCount+1,b=Math.max(b,he.maxChildrenCount),E=Math.max(E,he.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=b,y.maxGenerationCount=0<b?E+1:0}}function Jx(a,y){switch(a.vo){default:case D0:return y.parent!==null?y.parent:a.W;case By:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Dy:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Fy:var x=!0;if(y.childrenCount===0)x=!1;else for(var b=y.children,E=b.length,te=0;te<E;te++)if(0<b[te].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}Jr.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Jx(this,a)),a.parent!==null&&a.parent.alignment===Cu){for(var y=a.angle,x=a.parent.children,b=0;b<x.length&&a!==x[b];)b++;b%2===0?b!==x.length-1&&(y=y===90?180:y===180?270:y===270?180:270):y=y===90?0:y===180?90:y===270?0:90,a.angle=y}a.initialized=!0};function lx(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,b=0;b<x;b++)lx(a,y[b])}}Jr.prototype.assignTreeVertexValues=function(){};function ux(a,y){if(y!==null){y.alignment!==Cu&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,b=0;b<x;b++)ux(a,y[b])}}Jr.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Yd:break;case kg:a.children.reverse();break;case Tg:a.children.sort(a.comparer);break;case Mg:a.children.sort(a.comparer),a.children.reverse();break;default:Ot("Unhandled sorting value "+a.sorting.toString())}},Jr.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Jr.prototype.addComments=function(a){var y=a.angle,x=a.parent,b=0,E=!1;x!==null&&(b=x.angle,E=x.alignment,E=gc(E)),y=y===90||y===270,b=b===90||b===270,x=a.childrenCount===0;var te=0,ne=0,se=0,he=a.commentSpacing;if(a.node!==null)for(var pe=a.node.Mu();pe.next();){var ye=pe.value;ye.category==="Comment"&&ye.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(ye),ye.Va(),ye=ye.measuredBounds,y&&!x||!E&&!b&&x||E&&b&&x?(te=Math.max(te,ye.width),ne+=ye.height+Math.abs(se)):(te+=ye.width+Math.abs(se),ne=Math.max(ne,ye.height)),se=he)}a.comments!==null&&(y&&!x||!E&&!b&&x||E&&b&&x?(te+=Math.abs(a.commentMargin),ne=Math.max(0,ne-a.height)):(ne+=Math.abs(a.commentMargin),te=Math.max(0,te-a.width)),E=Yt.allocAt(0,0,a.bounds.width+te,a.bounds.height+ne),a.bounds=E,Yt.free(E))};function gc(a){return a===Mh||a===Cu||a===Lh||a===Xu}function Eg(a){return a===Mh||a===Cu}function Ly(a){var y=a.parent;if(y!==null){var x=y.alignment;if(gc(x)){if(Eg(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===Lh)return!0}}return!1}Jr.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,b=a.angle,E=0,te=!1;x!==null&&(E=x.angle,te=x.alignment,te=gc(te)),b=b===90||b===270,x=E===90||E===270;for(var ne=a.childrenCount===0,se=Ly(a),he=0,pe=a.comments,ye=pe.length,Te=lt.alloc(),ze=0;ze<ye;ze++){var Ze=pe[ze],$e=Ze.measuredBounds;if(b&&!ne||!te&&!x&&ne||te&&x&&ne){if(135<E&&!te||x&&se)if(0<=a.commentMargin)for(Te.h(a.bounds.x-a.commentMargin-$e.width,a.bounds.y+he),Ze.move(Te),Ze=Ze.Sd();Ze.next();){var it=Ze.value;it.fromSpot=Oa,it.toSpot=na}else for(Te.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+he),Ze.move(Te),Ze=Ze.Sd();Ze.next();)it=Ze.value,it.fromSpot=na,it.toSpot=Oa;else if(0<=a.commentMargin)for(Te.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+he),Ze.move(Te),Ze=Ze.Sd();Ze.next();)it=Ze.value,it.fromSpot=na,it.toSpot=Oa;else for(Te.h(a.bounds.x+a.commentMargin-$e.width,a.bounds.y+he),Ze.move(Te),Ze=Ze.Sd();Ze.next();)it=Ze.value,it.fromSpot=Oa,it.toSpot=na;he=0<=a.commentSpacing?he+($e.height+a.commentSpacing):he+(a.commentSpacing-$e.height)}else{if(135<E&&!te||!x&&se)if(0<=a.commentMargin)for(Te.h(a.bounds.x+he,a.bounds.y-a.commentMargin-$e.height),Ze.move(Te),Ze=Ze.Sd();Ze.next();)it=Ze.value,it.fromSpot=ja,it.toSpot=sa;else for(Te.h(a.bounds.x+he,a.bounds.y+2*a.focus.y-a.commentMargin),Ze.move(Te),Ze=Ze.Sd();Ze.next();)it=Ze.value,it.fromSpot=sa,it.toSpot=ja;else if(0<=a.commentMargin)for(Te.h(a.bounds.x+he,a.bounds.y+2*a.focus.y+a.commentMargin),Ze.move(Te),Ze=Ze.Sd();Ze.next();)it=Ze.value,it.fromSpot=sa,it.toSpot=ja;else for(Te.h(a.bounds.x+he,a.bounds.y+a.commentMargin-$e.height),Ze.move(Te),Ze=Ze.Sd();Ze.next();)it=Ze.value,it.fromSpot=ja,it.toSpot=sa;he=0<=a.commentSpacing?he+($e.width+a.commentSpacing):he+(a.commentSpacing-$e.width)}}if(lt.free(Te),y=he-a.commentSpacing-(b?y.height:y.width),this.ud===wu)for(a=a.destinationEdges;a.next();)E=a.value.link,E===null||E.isAvoiding||(E.fromEndSegmentLength=0<y?y:NaN);else for(a=a.sourceEdges;a.next();)E=a.value.link,E===null||E.isAvoiding||(E.toEndSegmentLength=0<y?y:NaN)}},Jr.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,b=0;b<x;b++)this.layoutTree(y[b]);switch(a.compaction){case F0:hx(this,a);break;case Lg:if(a.alignment===Cu)hx(this,a);else if(a.childrenCount===0)b=a.parent,x=!1,y=0,b!==null&&(y=b.angle,x=b.alignment,x=gc(x)),b=Ly(a),a.S.h(0,0),a.Da.h(a.width,a.height),a.parent===null||a.comments===null||(y!==180&&y!==270||x)&&!b?a.la.h(0,0):y===180&&!x||(y===90||y===270)&&b?a.la.h(a.width-2*a.focus.x,0):a.la.h(0,a.height-2*a.focus.y),a.Yo=null,a.kp=null;else{var E=El(a);y=E===90||E===270;var te=0,ne=a.children,se=ne.length;for(x=0;x<se;x++)b=ne[x],te=Math.max(te,y?b.Da.width:b.Da.height);var he=a.alignment;b=he===Pu;var pe=he===bu,ye=gc(he),Te=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var ze=a.nodeSpacing,Ze=this.computeNodeIndent(a),$e=a.rowSpacing,it=0;(b||pe||a.hm||a.im&&a.maxGenerationCount===1)&&(it=Math.max(0,a.rowIndent)),b=a.width;var Tt=a.height,bt=0,Nt=0,jt=0,Bt=null,_t=null,Ht=0,Fn=0,Jn=0,Zn=0,kn=0,cn=0,Ar=0,Cr=0;if(ye&&!Eg(he)&&135<E&&ne.reverse(),Eg(he))if(1<se)for(var vi=0;vi<se;vi++)vi%2===0&&vi!==se-1&&(Cr=Math.max(Cr,y?ne[vi].Da.width:ne[vi].Da.height));else se===1&&(Cr=y?ne[0].Da.width:ne[0].Da.height);if(ye){switch(he){case Mh:Nt=135>E?cx(this,a,ne,Cr,bt,Nt):fx(this,a,ne,Cr,bt,Nt),Cr=Nt.x,bt=Nt.width,Nt=Nt.height;break;case Lh:for(Bt=0;Bt<se;Bt++)_t=ne[Bt],Te=_t.Da,jt=cn===0?0:$e,y?(_t.S.h(te-Te.width,Zn+jt),bt=Math.max(bt,Te.width),Nt=Math.max(Nt,Zn+jt+Te.height),Zn+=jt+Te.height):(_t.S.h(Jn+jt,te-Te.height),bt=Math.max(bt,Jn+jt+Te.width),Nt=Math.max(Nt,Te.height),Jn+=jt+Te.width),cn++;break;case Xu:for(Bt=0;Bt<se;Bt++)_t=ne[Bt],te=_t.Da,Te=cn===0?0:$e,y?(_t.S.h(ze/2+a.focus.x,Zn+Te),bt=Math.max(bt,te.width),Nt=Math.max(Nt,Zn+Te+te.height),Zn+=Te+te.height):(_t.S.h(Jn+Te,ze/2+a.focus.y),bt=Math.max(bt,Jn+Te+te.width),Nt=Math.max(Nt,te.height),Jn+=Te+te.width),cn++}Bt=ms(this,2),_t=ms(this,2),y?(Bt[0].h(0,0),Bt[1].h(0,Nt),_t[0].h(bt,0)):(Bt[0].h(0,0),Bt[1].h(bt,0),_t[0].h(0,Nt)),_t[1].h(bt,Nt)}else for(vi=0;vi<se;vi++){var Wi=ne[vi],Yo=Wi.Da;if(y){0<Te&&0<cn&&Jn+ze+Yo.width>Te&&(Jn<te&&ef(a,he,te-Jn,0,Ar,vi-1),kn++,cn=0,Ar=vi,jt=Nt,Jn=0,Zn=135<E?-Nt-$e:Nt+$e),A0(this,Wi,0,Zn);var ta=0;if(cn===0)Bt=Wi.Yo,_t=Wi.kp,Ht=Yo.width,Fn=Yo.height,(Bt===null||_t===null||E!==El(Wi))&&(Bt=ms(this,2),_t=ms(this,2),Bt[0].h(0,0),Bt[1].h(0,Fn),_t[0].h(Ht,0),_t[1].h(Ht,Fn));else{var Ra=$n();Fn=dx(this,a,Wi,Bt,_t,Ht,Fn,Ra),ta=Fn.x,Bt=Ra[0],_t=Ra[1],Ht=Fn.width,Fn=Fn.height,Wn(Ra),Jn<Yo.width&&0>ta&&(Uf(a,-ta,0,Ar,vi-1),j0(Bt,-ta,0),j0(_t,-ta,0),ta=0)}Wi.S.h(ta,Zn),bt=Math.max(bt,Ht),Nt=Math.max(Nt,jt+(kn===0?0:$e)+Yo.height),Jn=Ht}else 0<Te&&0<cn&&Zn+ze+Yo.height>Te&&(Zn<te&&ef(a,he,0,te-Zn,Ar,vi-1),kn++,cn=0,Ar=vi,jt=bt,Zn=0,Jn=135<E?-bt-$e:bt+$e),A0(this,Wi,Jn,0),ta=0,cn===0?(Bt=Wi.Yo,_t=Wi.kp,Ht=Yo.width,Fn=Yo.height,(Bt===null||_t===null||E!==El(Wi))&&(Bt=ms(this,2),_t=ms(this,2),Bt[0].h(0,0),Bt[1].h(Ht,0),_t[0].h(0,Fn),_t[1].h(Ht,Fn))):(Ra=$n(),Fn=dx(this,a,Wi,Bt,_t,Ht,Fn,Ra),ta=Fn.x,Bt=Ra[0],_t=Ra[1],Ht=Fn.width,Fn=Fn.height,Wn(Ra),Zn<Yo.height&&0>ta&&(Uf(a,0,-ta,Ar,vi-1),j0(Bt,0,-ta),j0(_t,0,-ta),ta=0)),Wi.S.h(Jn,ta),Nt=Math.max(Nt,Fn),bt=Math.max(bt,jt+(kn===0?0:$e)+Yo.width),Zn=Fn;cn++}switch(0<kn&&(y?(Nt+=Math.max(0,x),Jn<bt&&ef(a,he,bt-Jn,0,Ar,se-1),0<it&&(pe||Uf(a,it,0,0,se-1),bt+=it)):(bt+=Math.max(0,x),Zn<Nt&&ef(a,he,0,Nt-Zn,Ar,se-1),0<it&&(pe||Uf(a,0,it,0,se-1),Nt+=it))),it=pe=0,he){case $d:y?pe+=bt/2-a.focus.x-Ze/2:it+=Nt/2-a.focus.y-Ze/2;break;case Hf:0<kn?y?pe+=bt/2-a.focus.x-Ze/2:it+=Nt/2-a.focus.y-Ze/2:y?(Cr=ne[0].S.x+ne[0].la.x,pe+=Cr+(ne[se-1].S.x+ne[se-1].la.x+2*ne[se-1].focus.x-Cr)/2-a.focus.x-Ze/2):(Cr=ne[0].S.y+ne[0].la.y,it+=Cr+(ne[se-1].S.y+ne[se-1].la.y+2*ne[se-1].focus.y-Cr)/2-a.focus.y-Ze/2);break;case Pu:y?(pe-=Ze,bt+=Ze):(it-=Ze,Nt+=Ze);break;case bu:y?(pe+=bt-a.width+Ze,bt+=Ze):(it+=Nt-a.height+Ze,Nt+=Ze);break;case Mh:y?1<se?pe+=Cr+ze/2-a.focus.x:pe+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<se?it+=Cr+ze/2-a.focus.y:it+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case Lh:y?pe+=bt+ze/2-a.focus.x:it+=Nt+ze/2-a.focus.y;break;case Xu:break;default:Nt=this.customAlignment(a,pe,it,bt,Nt),pe=Nt[0],it=Nt[1],bt=Nt[2],Nt=Nt[3]}for(Ze=0;Ze<se;Ze++)Cr=ne[Ze],y?Cr.S.h(Cr.S.x+Cr.la.x-pe,Cr.S.y+(135<E?(ye?-Nt:-Cr.Da.height)+Cr.la.y-x:Tt+x+Cr.la.y)):Cr.S.h(Cr.S.x+(135<E?(ye?-bt:-Cr.Da.width)+Cr.la.x-x:b+x+Cr.la.x),Cr.S.y+Cr.la.y-it);if(se=ne=0,ye?y?(bt=Ny(a,bt,pe),0>pe&&(pe=0),135<E&&(it+=Nt+x),Nt+=Tt+x,he===Xu&&(ne+=ze/2+a.focus.x),se+=Tt+x):(135<E&&(pe+=bt+x),bt+=b+x,Nt=Ay(a,Nt,it),0>it&&(it=0),he===Xu&&(se+=ze/2+a.focus.y),ne+=b+x):y?(a.comments===null?b>bt&&(bt=jy(he,b-bt,0),ne=bt.x,se=bt.y,bt=b,pe=0):bt=Ny(a,bt,pe),0>pe&&(ne-=pe,pe=0),135<E&&(it+=Nt+x),Nt=Math.max(Math.max(Nt,Tt),Nt+Tt+x),se+=Tt+x):(135<E&&(pe+=bt+x),bt=Math.max(Math.max(bt,b),bt+b+x),a.comments===null?Tt>Nt&&(Nt=jy(he,0,Tt-Nt),ne=Nt.x,se=Nt.y,Nt=Tt,it=0):Nt=Ay(a,Nt,it),0>it&&(se-=it,it=0),ne+=b+x),0<kn)E=ms(this,4),kn=ms(this,4),y?(E[2].h(0,Tt+x),E[3].h(E[2].x,Nt),kn[2].h(bt,E[2].y),kn[3].h(kn[2].x,E[3].y)):(E[2].h(b+x,0),E[3].h(bt,E[2].y),kn[2].h(E[2].x,Nt),kn[3].h(E[3].x,kn[2].y));else{for(E=ms(this,Bt.length+2),kn=ms(this,_t.length+2),he=0;he<Bt.length;he++)ye=Bt[he],E[he+2].h(ye.x+ne,ye.y+se);for(he=0;he<_t.length;he++)ye=_t[he],kn[he+2].h(ye.x+ne,ye.y+se)}y?(E[0].h(pe,0),E[1].h(E[0].x,Tt),E[2].y<E[1].y&&(E[2].x>E[0].x?E[2].assign(E[1]):E[1].assign(E[2])),E[3].y<E[2].y&&(E[3].x>E[0].x?E[3].assign(E[2]):E[2].assign(E[3])),kn[0].h(pe+b,0),kn[1].h(kn[0].x,Tt),kn[2].y<kn[1].y&&(kn[2].x<kn[0].x?kn[2].assign(kn[1]):kn[1].assign(kn[2])),kn[3].y<kn[2].y&&(kn[3].x<kn[0].x?kn[3].assign(kn[2]):kn[2].assign(kn[3])),E[2].y-=x/2,kn[2].y-=x/2):(E[0].h(0,it),E[1].h(b,E[0].y),E[2].x<E[1].x&&(E[2].y>E[0].y?E[2].assign(E[1]):E[1].assign(E[2])),E[3].x<E[2].x&&(E[3].y>E[0].y?E[3].assign(E[2]):E[2].assign(E[3])),kn[0].h(0,it+Tt),kn[1].h(b,kn[0].y),kn[2].x<kn[1].x&&(kn[2].y<kn[0].y?kn[2].assign(kn[1]):kn[1].assign(kn[2])),kn[3].x<kn[2].x&&(kn[3].y<kn[0].y?kn[3].assign(kn[2]):kn[2].assign(kn[3])),E[2].x-=x/2,kn[2].x-=x/2),Il(this,Bt),Il(this,_t),a.Yo=E,a.kp=kn,a.la.h(pe,it),a.Da.h(bt,Nt)}break;default:Ot("Unhandled compaction value "+a.compaction.toString())}}};function hx(a,y){if(y.childrenCount===0){var x=!1,b=0;y.parent!==null&&(b=y.parent.angle,x=y.parent.alignment,x=gc(x));var E=Ly(y);y.S.h(0,0),y.Da.h(y.width,y.height),y.parent===null||y.comments===null||(b!==180&&b!==270||x)&&!E?y.la.h(0,0):b===180&&!x||(b===90||b===270)&&E?y.la.h(y.width-2*y.focus.x,0):y.la.h(0,y.height-2*y.focus.y)}else{b=El(y),x=b===90||b===270;var te=0;E=y.children;for(var ne=E.length,se=0;se<ne;se++){var he=E[se];te=Math.max(te,x?he.Da.width:he.Da.height)}var pe=y.alignment,ye=pe===Pu,Te=pe===bu;se=gc(pe);var ze=Math.max(0,y.breadthLimit);he=a.computeLayerSpacing(y);var Ze=y.nodeSpacing,$e=a.computeNodeIndent(y),it=ye||Te?0:$e/2,Tt=y.rowSpacing,bt=0;(ye||Te||y.hm||y.im&&y.maxGenerationCount===1)&&(bt=Math.max(0,y.rowIndent)),ye=y.width;var Nt=y.height,jt=0,Bt=0,_t=0,Ht=0,Fn=0,Jn=0,Zn=0,kn=0,cn=0,Ar=0;if(se&&!Eg(pe)&&135<b&&E.reverse(),Eg(pe))if(1<ne)for(var Cr=0;Cr<ne;Cr++){var vi=E[Cr],Wi=vi.Da;Cr%2===0&&Cr!==ne-1?cn=Math.max(cn,(x?Wi.width:Wi.height)+a.computeBusNodeSpacing(vi)-Ze):Cr%2!==0&&(Ar=Math.max(Ar,(x?Wi.width:Wi.height)+a.computeBusNodeSpacing(vi)-Ze))}else ne===1&&(cn=x?E[0].Da.width:E[0].Da.height);if(se)switch(pe){case Mh:case Cu:Bt=135>b?cx(a,y,E,cn,jt,Bt):fx(a,y,E,cn,jt,Bt),cn=Bt.x,jt=Bt.width,Bt=Bt.height;break;case Lh:for(ze=0;ze<ne;ze++)it=E[ze],_t=it.Da,Ar=Zn===0?0:Tt,x?(it.S.h(te-_t.width,Fn+Ar),jt=Math.max(jt,_t.width),Bt=Math.max(Bt,Fn+Ar+_t.height),Fn+=Ar+_t.height):(it.S.h(Ht+Ar,te-_t.height),jt=Math.max(jt,Ht+Ar+_t.width),Bt=Math.max(Bt,_t.height),Ht+=Ar+_t.width),Zn++;break;case Xu:for(te=0;te<ne;te++)ze=E[te],it=ze.Da,_t=Zn===0?0:Tt,x?(ze.S.h(Ze/2+y.focus.x,Fn+_t),jt=Math.max(jt,it.width),Bt=Math.max(Bt,Fn+_t+it.height),Fn+=_t+it.height):(ze.S.h(Ht+_t,Ze/2+y.focus.y),jt=Math.max(jt,Ht+_t+it.width),Bt=Math.max(Bt,it.height),Ht+=_t+it.width),Zn++}else for(Ar=0;Ar<ne;Ar++)Cr=E[Ar],vi=Cr.Da,x?(0<ze&&0<Zn&&Ht+Ze+vi.width>ze&&(Ht<te&&ef(y,pe,te-Ht,0,kn,Ar-1),Jn++,Zn=0,kn=Ar,_t=Bt,Ht=0,Fn=135<b?-Bt-Tt:Bt+Tt),Wi=Zn===0?it:Ze,A0(a,Cr,0,Fn),Cr.S.h(Ht+Wi,Fn),jt=Math.max(jt,Ht+Wi+vi.width),Bt=Math.max(Bt,_t+(Jn===0?0:Tt)+vi.height),Ht+=Wi+vi.width):(0<ze&&0<Zn&&Fn+Ze+vi.height>ze&&(Fn<te&&ef(y,pe,0,te-Fn,kn,Ar-1),Jn++,Zn=0,kn=Ar,_t=jt,Fn=0,Ht=135<b?-jt-Tt:jt+Tt),Wi=Zn===0?it:Ze,A0(a,Cr,Ht,0),Cr.S.h(Ht,Fn+Wi),Bt=Math.max(Bt,Fn+Wi+vi.height),jt=Math.max(jt,_t+(Jn===0?0:Tt)+vi.width),Fn+=Wi+vi.height),Zn++;switch(0<Jn&&(x?(Bt+=Math.max(0,he),Ht<jt&&ef(y,pe,jt-Ht,0,kn,ne-1),0<bt&&(Te||Uf(y,bt,0,0,ne-1),jt+=bt)):(jt+=Math.max(0,he),Fn<Bt&&ef(y,pe,0,Bt-Fn,kn,ne-1),0<bt&&(Te||Uf(y,0,bt,0,ne-1),Bt+=bt))),bt=Te=0,pe){case $d:x?Te+=jt/2-y.focus.x-$e/2:bt+=Bt/2-y.focus.y-$e/2;break;case Hf:0<Jn?x?Te+=jt/2-y.focus.x-$e/2:bt+=Bt/2-y.focus.y-$e/2:x?(a=E[0].S.x+E[0].la.x,Te+=a+(E[ne-1].S.x+E[ne-1].la.x+2*E[ne-1].focus.x-a)/2-y.focus.x-$e/2):(a=E[0].S.y+E[0].la.y,bt+=a+(E[ne-1].S.y+E[ne-1].la.y+2*E[ne-1].focus.y-a)/2-y.focus.y-$e/2);break;case Pu:x?(Te-=$e,jt+=$e):(bt-=$e,Bt+=$e);break;case bu:x?(Te+=jt-y.width+$e,jt+=$e):(bt+=Bt-y.height+$e,Bt+=$e);break;case Mh:case Cu:x?1<ne?Te+=cn+Ze/2-y.focus.x:Te+=E[0].focus.x-y.focus.x+E[0].la.x:1<ne?bt+=cn+Ze/2-y.focus.y:bt+=E[0].focus.y-y.focus.y+E[0].la.y;break;case Lh:x?Te+=jt+Ze/2-y.focus.x:bt+=Bt+Ze/2-y.focus.y;break;case Xu:break;default:a=a.customAlignment(y,Te,bt,jt,Bt),Te=a[0],bt=a[1],jt=a[2],Bt=a[3]}for(a=0;a<ne;a++)$e=E[a],x?$e.S.h($e.S.x+$e.la.x-Te,$e.S.y+(135<b?(se?-Bt:-$e.Da.height)+$e.la.y-he:Nt+he+$e.la.y)):$e.S.h($e.S.x+(135<b?(se?-jt:-$e.Da.width)+$e.la.x-he:ye+he+$e.la.x),$e.S.y+$e.la.y-bt);x?(jt=Ny(y,jt,Te),0>Te&&(Te=0),135<b&&(bt+=Bt+he),Bt=Math.max(Math.max(Bt,Nt),Bt+Nt+he)):(135<b&&(Te+=jt+he),jt=Math.max(Math.max(jt,ye),jt+ye+he),Bt=Ay(y,Bt,bt),0>bt&&(bt=0)),y.la.h(Te,bt),y.Da.h(jt,Bt)}}Jr.prototype.customAlignment=function(a,y,x,b,E){return[y,x,b,E]};function cx(a,y,x,b,E,te){var ne=x.length;if(ne===0)return new Yt(b,0,E,te);if(ne===1)return y=x[0],E=y.Da.width,te=y.Da.height,new Yt(b,0,E,te);for(var se=y.nodeSpacing,he=y.rowSpacing,pe=El(y)===90,ye=0,Te=0,ze=0,Ze=0;Ze<ne;Ze++)if(!(Ze%2!==0||1<ne&&Ze===ne-1)){var $e=x[Ze],it=$e.Da,Tt=ye===0?0:he;if(pe){var bt=a.computeBusNodeSpacing($e)-se;$e.S.h(b-(it.width+bt),ze+Tt),E=Math.max(E,it.width+bt),te=Math.max(te,ze+Tt+it.height),ze+=Tt+it.height}else bt=a.computeBusNodeSpacing($e)-se,$e.S.h(Te+Tt,b-(it.height+bt)),te=Math.max(te,it.height+bt),E=Math.max(E,Te+Tt+it.width),Te+=Tt+it.width;ye++}for(ye=0,$e=Te,Ze=ze,pe?(Te=b+se,ze=0):(Te=0,ze=b+se),it=0;it<ne;it++)if(it%2!==0){Tt=x[it],bt=Tt.Da;var Nt=ye===0?0:he;if(pe){var jt=a.computeBusNodeSpacing(Tt)-se;Tt.S.h(Te+jt,ze+Nt),E=Math.max(E,Te+bt.width+jt),te=Math.max(te,ze+Nt+bt.height),ze+=Nt+bt.height}else jt=a.computeBusNodeSpacing(Tt)-se,Tt.S.h(Te+Nt,ze+jt),E=Math.max(E,Te+Nt+bt.width),te=Math.max(te,ze+bt.height+jt),Te+=Nt+bt.width;ye++}return 1<ne&&ne%2===1&&(x=x[ne-1],ne=x.Da,a=a.computeBusLastRowSpacing(x,pe?Math.max(Math.abs(Ze),Math.abs(ze)):Math.max(Math.abs($e),Math.abs(Te))),pe?(x.S.h(b+se/2-x.focus.x-x.la.x,te+a),pe=b+se/2-x.focus.x-x.la.x,E=Math.max(E,pe+ne.width),0>pe&&(E-=pe),te=Math.max(te,Math.max(Ze,ze)+a+ne.height),0>x.S.x&&(b=N0(y,x.S.x,!1,b,se))):(x.S.h(E+a,b+se/2-x.focus.y-x.la.y),E=Math.max(E,Math.max($e,Te)+a+ne.width),ze=b+se/2-x.focus.y-x.la.y,te=Math.max(te,ze+ne.height),0>ze&&(te-=ze),0>x.S.y&&(b=N0(y,x.S.y,!0,b,se)))),new Yt(b,0,E,te)}function fx(a,y,x,b,E,te){var ne=x.length;if(ne===0)return new Yt(b,0,E,te);if(ne===1)return x=x[0],E=x.Da.width,te=x.Da.height,new Yt(b,0,E,te);for(var se=y.nodeSpacing,he=y.rowSpacing,pe=El(y)===270,ye=0,Te=0,ze=0,Ze=0;Ze<ne;Ze++)if(!(Ze%2!==0||1<ne&&Ze===ne-1)){var $e=x[Ze],it=$e.Da,Tt=ye===0?0:he;if(pe){var bt=a.computeBusNodeSpacing($e)-se;ze-=Tt+it.height,$e.S.h(b-(it.width+bt),ze),E=Math.max(E,it.width+bt),te=Math.max(te,Math.abs(ze))}else bt=a.computeBusNodeSpacing($e)-se,Te-=Tt+it.width,$e.S.h(Te,b-(it.height+bt)),te=Math.max(te,it.height+bt),E=Math.max(E,Math.abs(Te));ye++}for(ye=0,$e=Te,Ze=ze,pe?(Te=b+se,ze=0):(Te=0,ze=b+se),it=0;it<ne;it++)if(it%2!==0){Tt=x[it],bt=Tt.Da;var Nt=ye===0?0:he;if(pe){var jt=a.computeBusNodeSpacing(Tt)-se;ze-=Nt+bt.height,Tt.S.h(Te+jt,ze),E=Math.max(E,Te+bt.width+jt),te=Math.max(te,Math.abs(ze))}else jt=a.computeBusNodeSpacing(Tt)-se,Te-=Nt+bt.width,Tt.S.h(Te,ze+jt),te=Math.max(te,ze+bt.height+jt),E=Math.max(E,Math.abs(Te));ye++}for(1<ne&&ne%2===1&&(he=x[ne-1],ye=he.Da,a=a.computeBusLastRowSpacing(he,pe?Math.max(Math.abs(Ze),Math.abs(ze)):Math.max(Math.abs($e),Math.abs(Te))),pe?(he.S.h(b+se/2-he.focus.x-he.la.x,-te-ye.height-a),Te=b+se/2-he.focus.x-he.la.x,E=Math.max(E,Te+ye.width),0>Te&&(E-=Te),te=Math.max(te,Math.abs(Math.min(Ze,ze))+a+ye.height),0>he.S.x&&(b=N0(y,he.S.x,!1,b,se))):(he.S.h(-E-ye.width-a,b+se/2-he.focus.y-he.la.y),E=Math.max(E,Math.abs(Math.min($e,Te))+a+ye.width),ze=b+se/2-he.focus.y-he.la.y,te=Math.max(te,ze+ye.height),0>ze&&(te-=ze),0>he.S.y&&(b=N0(y,he.S.y,!0,b,se)))),y=0;y<ne;y++)se=x[y],pe?se.S.h(se.S.x,se.S.y+te):se.S.h(se.S.x+E,se.S.y);return new Yt(b,0,E,te)}Jr.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Jr.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function N0(a,y,x,b,E){a=a.children;for(var te=a.length,ne=0;ne<te;ne++)x?a[ne].S.h(a[ne].S.x,a[ne].S.y-y):a[ne].S.h(a[ne].S.x-y,a[ne].S.y);return y=a[te-1],Math.max(b,x?y.la.y+y.focus.y-E/2:y.la.x+y.focus.x-E/2)}function Ny(a,y,x){switch(a.alignment){case Hf:case $d:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case Pu:return a.width>y?a.width:y;case bu:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Mh:case Cu:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case Lh:return a.width-a.focus.x+a.nodeSpacing/2+y;case Xu:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ay(a,y,x){switch(a.alignment){case Hf:case $d:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case Pu:return a.height>y?a.height:y;case bu:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Mh:case Cu:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case Lh:return a.height-a.focus.y+a.nodeSpacing/2+y;case Xu:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function jy(a,y,x){switch(a){case $d:y/=2,x/=2;break;case Hf:y/=2,x/=2;break;case Pu:x=y=0;break;case bu:break;default:Ot("Unhandled alignment value "+a.toString())}return new lt(y,x)}function ef(a,y,x,b,E,te){y=jy(y,x,b),Uf(a,y.x,y.y,E,te)}function Uf(a,y,x,b,E){if(y!==0||x!==0)for(a=a.children;b<=E;b++){var te=a[b].S;te.x+=y,te.y+=x}}function A0(a,y,x,b){var E=y.parent;switch(a.ud){case wu:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===E&&y.relativePoint.h(x,b);break;case Wf:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===E&&y.relativePoint.h(x,b);break;default:Ot("Unhandled path value "+a.ud.toString())}}function j0(a,y,x){for(var b=0;b<a.length;b++){var E=a[b];E.x+=y,E.y+=x}}function dx(a,y,x,b,E,te,ne,se){var he=El(y),pe=he===90||he===270,ye=y.nodeSpacing;y=b;var Te=E;b=te;var ze=ne,Ze=x.Yo,$e=x.kp;ne=x.Da;var it=pe?Math.max(ze,ne.height):Math.max(b,ne.width);if((Ze===null||he!==El(x))&&(Ze=ms(a,2),$e=ms(a,2),pe?(Ze[0].h(0,0),Ze[1].h(0,ne.height),$e[0].h(ne.width,0),$e[1].h($e[0].x,Ze[1].y)):(Ze[0].h(0,0),Ze[1].h(ne.width,0),$e[0].h(0,ne.height),$e[1].h(Ze[1].x,$e[0].y))),pe){if(ze=9999999,!(Te===null||2>Te.length||Ze===null||2>Ze.length))for(E=x=0;x<Te.length&&E<Ze.length;){te=Te[x];var Tt=Ze[E];he=Tt.x,pe=Tt.y,he+=b;var bt=te;x+1<Te.length&&(bt=Te[x+1]);var Nt=Tt;Tt=Nt.x,Nt=Nt.y,E+1<Ze.length&&(Nt=Ze[E+1],Tt=Nt.x,Nt=Nt.y,Tt+=b);var jt=ze;te.y===pe?jt=he-te.x:te.y>pe&&te.y<Nt?jt=he+(te.y-pe)/(Nt-pe)*(Tt-he)-te.x:pe>te.y&&pe<bt.y&&(jt=he-(te.x+(pe-te.y)/(bt.y-te.y)*(bt.x-te.x))),jt<ze&&(ze=jt),bt.y<=te.y?x++:Nt<=pe?E++:(bt.y<=Nt&&x++,Nt<=bt.y&&E++)}if(ze=b-ze,ze+=ye,x=Ze,E=ze,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ye=ms(a,y.length+x.length),b=te=he=0;te<x.length&&x[te].y<y[0].y;)pe=x[te++],ye[b++].h(pe.x+E,pe.y);for(;he<y.length;)pe=y[he++],ye[b++].h(pe.x,pe.y);for(he=y[y.length-1].y;te<x.length&&x[te].y<=he;)te++;for(;te<x.length&&x[te].y>he;)pe=x[te++],ye[b++].h(pe.x+E,pe.y);for(x=ms(a,b),he=0;he<b;he++)x[he].assign(ye[he]);Il(a,ye),b=x}if(te=$e,he=ze,Te===null||2>Te.length||te===null||2>te.length)E=null;else{for(ye=ms(a,Te.length+te.length),E=pe=x=0;x<Te.length&&Te[x].y<te[0].y;)bt=Te[x++],ye[E++].h(bt.x,bt.y);for(;pe<te.length;)bt=te[pe++],ye[E++].h(bt.x+he,bt.y);for(te=te[te.length-1].y;x<Te.length&&Te[x].y<=te;)x++;for(;x<Te.length&&Te[x].y>te;)he=Te[x++],ye[E++].h(he.x,he.y);for(te=ms(a,E),x=0;x<E;x++)te[x].assign(ye[x]);Il(a,ye),E=te}return te=Math.max(0,ze)+ne.width,ne=it,Il(a,y),Il(a,Ze),Il(a,Te),Il(a,$e),se[0]=b,se[1]=E,new Yt(ze,0,te,ne)}if(b=9999999,!(Te===null||2>Te.length||Ze===null||2>Ze.length))for(E=x=0;x<Te.length&&E<Ze.length;)te=Te[x],Tt=Ze[E],he=Tt.x,pe=Tt.y,pe+=ze,bt=te,x+1<Te.length&&(bt=Te[x+1]),Nt=Tt,Tt=Nt.x,Nt=Nt.y,E+1<Ze.length&&(Nt=Ze[E+1],Tt=Nt.x,Nt=Nt.y,Nt+=ze),jt=b,te.x===he?jt=pe-te.y:te.x>he&&te.x<Tt?jt=pe+(te.x-he)/(Tt-he)*(Nt-pe)-te.y:he>te.x&&he<bt.x&&(jt=pe-(te.y+(he-te.x)/(bt.x-te.x)*(bt.y-te.y))),jt<b&&(b=jt),bt.x<=te.x?x++:Tt<=he?E++:(bt.x<=Tt&&x++,Tt<=bt.x&&E++);if(ze-=b,ze+=ye,x=Ze,E=ze,y===null||2>y.length||x===null||2>x.length)b=null;else{for(ye=ms(a,y.length+x.length),b=te=he=0;te<x.length&&x[te].x<y[0].x;)pe=x[te++],ye[b++].h(pe.x,pe.y+E);for(;he<y.length;)pe=y[he++],ye[b++].h(pe.x,pe.y);for(he=y[y.length-1].x;te<x.length&&x[te].x<=he;)te++;for(;te<x.length&&x[te].x>he;)pe=x[te++],ye[b++].h(pe.x,pe.y+E);for(x=ms(a,b),he=0;he<b;he++)x[he].assign(ye[he]);Il(a,ye),b=x}if(te=$e,he=ze,Te===null||2>Te.length||te===null||2>te.length)E=null;else{for(ye=ms(a,Te.length+te.length),E=pe=x=0;x<Te.length&&Te[x].x<te[0].x;)bt=Te[x++],ye[E++].h(bt.x,bt.y);for(;pe<te.length;)bt=te[pe++],ye[E++].h(bt.x,bt.y+he);for(te=te[te.length-1].x;x<Te.length&&Te[x].x<=te;)x++;for(;x<Te.length&&Te[x].x>te;)he=Te[x++],ye[E++].h(he.x,he.y);for(te=ms(a,E),x=0;x<E;x++)te[x].assign(ye[x]);Il(a,ye),E=te}return te=it,ne=Math.max(0,ze)+ne.height,Il(a,y),Il(a,Ze),Il(a,Te),Il(a,$e),se[0]=b,se[1]=E,new Yt(ze,0,te,ne)}function ms(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 lt;return a}function Il(a,y){var x=y.length,b=a.ru[x];b===void 0&&(b=[],a.ru[x]=b),b.push(y)}Jr.prototype.arrangeTrees=function(){if(this.Rb===I0)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof cl){var x=y.node;if(x!==null){var b=x.position;x=b.x,b=b.y,isFinite(x)||(x=0),isFinite(b)||(b=0),Oy(this,y,x,b)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof cl&&a.push(x);switch(this.sorting){case Yd:break;case kg:a.reverse();break;case Tg:a.sort(this.comparer);break;case Mg:a.sort(this.comparer),a.reverse();break;default:Ot("Unhandled sorting value "+this.sorting.toString())}for(x=this.arrangementOrigin,y=x.x,x=x.y,b=0;b<a.length;b++){var E=a[b];switch(Oy(this,E,y+E.la.x,x+E.la.y),this.Rb){case B0:x+=E.Da.height+this.$d.height;break;case Iy:y+=E.Da.width+this.$d.width;break;default:Ot("Unhandled arrangement value "+this.Rb.toString())}}}};function Oy(a,y,x,b){if(y!==null){y.x=x,y.y=b,y=y.children;for(var E=y.length,te=0;te<E;te++){var ne=y[te];Oy(a,ne,x+ne.S.x,b+ne.S.y)}}}Jr.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Jr.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Jr.prototype.Gu=function(){if(this.layerStyle===R0){for(var a=this.$v,y=[],x=null,b=this.network.vertexes.iterator;b.next();){var E=b.value;x===null?x=E.bounds.copy():x.ed(E.bounds);var te=y[E.level];te===void 0?te=this.computeLayerSpacing(E):te=Math.max(te,this.computeLayerSpacing(E)),y[E.level]=te}for(b=0;b<y.length;b++)y[b]===void 0&&(y[b]=0);if(this.angle===90||this.angle===270?(x.Bc(this.nodeSpacing/2,this.layerSpacing),b=new lt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),b=new lt(-this.layerSpacing/2,-this.nodeSpacing/2)),E=[],x=this.angle===90||this.angle===270?x.width:x.height,te=0,this.angle===180||this.angle===270)for(var ne=0;ne<a.length;ne++)te+=a[ne]+y[ne];for(ne=0;ne<a.length;ne++){var se=a[ne]+y[ne];this.angle===270?(te-=se,E.push(new Yt(0,te,x,se))):this.angle===90?(E.push(new Yt(0,te,x,se)),te+=se):this.angle===180?(te-=se,E.push(new Yt(te,0,se,x))):(E.push(new Yt(te,0,se,x)),te+=se)}this.commitLayers(E,b)}},Jr.prototype.commitLayers=function(){},Jr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Jr.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof cl&&px(this,y)}};function px(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,b=0;b<x;b++)px(a,y[b])}}Jr.prototype.setPortSpots=function(a){var y=a.alignment;if(gc(y)){var x=this.ud===wu,b=El(a);switch(b){case 0:var E=na;break;case 90:E=sa;break;case 180:E=Oa;break;default:E=ja}var te=a.children,ne=te.length;switch(y){case Mh:case Cu:for(y=0;y<ne;y++){var se=te[y];if(se=(x?se.sourceEdges:se.destinationEdges).first(),se!==null&&(se=se.link,se!==null)){var he=b===90||b===270?Oa:ja;if(ne===1||y===ne-1&&ne%2===1)switch(b){case 0:he=Oa;break;case 90:he=ja;break;case 180:he=na;break;default:he=sa}else y%2===0&&(he=b===90||b===270?na:sa);x?(a.setsPortSpot&&(se.fromSpot=E),a.setsChildPortSpot&&(se.toSpot=he)):(a.setsPortSpot&&(se.fromSpot=he),a.setsChildPortSpot&&(se.toSpot=E))}}break;case Lh:for(b=b===90||b===270?na:sa,te=x?a.destinationEdges:a.sourceEdges;te.next();)ne=te.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)):(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)));break;case Xu:for(b=b===90||b===270?Oa:ja,te=x?a.destinationEdges:a.sourceEdges;te.next();)ne=te.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)):(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)))}}else if(x=El(a),this.ud===wu){for(E=a.destinationEdges;E.next();)if(b=E.value.link,b!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:b.fromSpot=na;break;case 90:b.fromSpot=sa;break;case 180:b.fromSpot=Oa;break;default:b.fromSpot=ja}else b.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.toSpot=Oa;break;case 90:b.toSpot=ja;break;case 180:b.toSpot=na;break;default:b.toSpot=sa}else b.toSpot=a.childPortSpot}}else for(E=a.sourceEdges;E.next();)if(b=E.value.link,b!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:b.toSpot=na;break;case 90:b.toSpot=sa;break;case 180:b.toSpot=Oa;break;default:b.toSpot=ja}else b.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:b.fromSpot=Oa;break;case 90:b.fromSpot=ja;break;case 180:b.fromSpot=na;break;default:b.fromSpot=sa}else b.fromSpot=a.childPortSpot}};function El(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}Jr.prototype.computeLayerSpacing=function(a){var y=El(a);y=y===90||y===270;var x=a.layerSpacing;if(0<a.layerSpacingParentOverlap){var b=Math.min(1,a.layerSpacingParentOverlap);x-=y?a.height*b:a.width*b}return x<(y?-a.height:-a.width)&&(x=y?-a.height:-a.width),x},Jr.prototype.computeNodeIndent=function(a){var y=El(a),x=a.nodeIndent;if(0<a.nodeIndentPastParent){var b=Math.min(1,a.nodeIndentPastParent);x+=y===90||y===270?a.width*b:a.height*b}return x=Math.max(0,x)},Zt.Object.defineProperties(Jr.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!==D0&&a!==Dy&&a!==Fy&&a!==By||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Ry&&a!==_y&&a!==R0||(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!==B0&&a!==Iy&&a!==I0||(this.Rb=a,this.C())}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},rootDefaults:{get:function(){return this.W},set:function(a){this.W!==a&&(this.W=a,this.C())}},alternateDefaults:{get:function(){return this.Y},set:function(a){this.Y!==a&&(this.Y=a,this.C())}},sorting:{get:function(){return this.W.sorting},set:function(a){this.W.sorting===a||a!==Yd&&a!==kg&&a!==Tg&&!Mg||(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()):Ot("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!==F0&&a!==Lg||(this.W.compaction=a,this.C())}},breadthLimit:{get:function(){return this.W.breadthLimit},set:function(a){this.W.breadthLimit!==a&&0<=a&&(this.W.breadthLimit=a,this.C())}},rowSpacing:{get:function(){return this.W.rowSpacing},set:function(a){this.W.rowSpacing!==a&&(this.W.rowSpacing=a,this.C())}},rowIndent:{get:function(){return this.W.rowIndent},set:function(a){this.W.rowIndent!==a&&0<=a&&(this.W.rowIndent=a,this.C())}},commentSpacing:{get:function(){return this.W.commentSpacing},set:function(a){this.W.commentSpacing!==a&&(this.W.commentSpacing=a,this.C())}},commentMargin:{get:function(){return this.W.commentMargin},set:function(a){this.W.commentMargin!==a&&(this.W.commentMargin=a,this.C())}},setsPortSpot:{get:function(){return this.W.setsPortSpot},set:function(a){this.W.setsPortSpot!==a&&(this.W.setsPortSpot=a,this.C())}},portSpot:{get:function(){return this.W.portSpot},set:function(a){this.W.portSpot.D(a)||(this.W.portSpot=a,this.C())}},setsChildPortSpot:{get:function(){return this.W.setsChildPortSpot},set:function(a){this.W.setsChildPortSpot!==a&&(this.W.setsChildPortSpot=a,this.C())}},childPortSpot:{get:function(){return this.W.childPortSpot},set:function(a){this.W.childPortSpot.D(a)||(this.W.childPortSpot=a,this.C())}},alternateSorting:{get:function(){return this.Y.sorting},set:function(a){this.Y.sorting===a||a!==Yd&&a!==kg&&a!==Tg&&!Mg||(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!==F0&&a!==Lg||(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 O0=new un(Jr,"PathDefault",-1),wu=new un(Jr,"PathDestination",0),Wf=new un(Jr,"PathSource",1),Yd=new un(Jr,"SortingForwards",10),kg=new un(Jr,"SortingReverse",11),Tg=new un(Jr,"SortingAscending",12),Mg=new un(Jr,"SortingDescending",13),$d=new un(Jr,"AlignmentCenterSubtrees",20),Hf=new un(Jr,"AlignmentCenterChildren",21),Pu=new un(Jr,"AlignmentStart",22),bu=new un(Jr,"AlignmentEnd",23),Mh=new un(Jr,"AlignmentBus",24),Cu=new un(Jr,"AlignmentBusBranching",25),Lh=new un(Jr,"AlignmentTopLeftBus",26),Xu=new un(Jr,"AlignmentBottomRightBus",27),F0=new un(Jr,"CompactionNone",30),Lg=new un(Jr,"CompactionBlock",31),D0=new un(Jr,"StyleLayered",40),Fy=new un(Jr,"StyleLastParents",41),Dy=new un(Jr,"StyleAlternating",42),By=new un(Jr,"StyleRootOnly",43),B0=new un(Jr,"ArrangementVertical",50),Iy=new un(Jr,"ArrangementHorizontal",51),I0=new un(Jr,"ArrangementFixedRoots",52),Ry=new un(Jr,"LayerIndividual",60),_y=new un(Jr,"LayerSiblings",61),R0=new un(Jr,"LayerUniform",62);Jr.className="TreeLayout",Jr.PathDefault=O0,Jr.PathDestination=wu,Jr.PathSource=Wf,Jr.SortingForwards=Yd,Jr.SortingReverse=kg,Jr.SortingAscending=Tg,Jr.SortingDescending=Mg,Jr.AlignmentCenterSubtrees=$d,Jr.AlignmentCenterChildren=Hf,Jr.AlignmentStart=Pu,Jr.AlignmentEnd=bu,Jr.AlignmentBus=Mh,Jr.AlignmentBusBranching=Cu,Jr.AlignmentTopLeftBus=Lh,Jr.AlignmentBottomRightBus=Xu,Jr.CompactionNone=F0,Jr.CompactionBlock=Lg,Jr.StyleLayered=D0,Jr.StyleLastParents=Fy,Jr.StyleAlternating=Dy,Jr.StyleRootOnly=By,Jr.ArrangementVertical=B0,Jr.ArrangementHorizontal=Iy,Jr.ArrangementFixedRoots=I0,Jr.LayerIndividual=Ry,Jr.LayerSiblings=_y,Jr.LayerUniform=R0;function Kf(a){Ki.call(this,a)}nn(Kf,Ki),Kf.prototype.createVertex=function(){return new cl(this)},Kf.prototype.createEdge=function(){return new Jd(this)},Kf.className="TreeNetwork";function cl(a){Uo.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 lt(0,0),this.Da=new fn(0,0),this.la=new lt(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Yd,this.hd=oy,this.Kb=0,this.Jb=Hf,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Lg,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=Vo,this.wr=!0,this.Dp=Vo}nn(cl,Uo),cl.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)},Zt.Object.defineProperties(cl.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)}}}),cl.className="TreeVertex";function Jd(a){Es.call(this,a),this.$t=new lt(0,0)}nn(Jd,Es),Jd.prototype.commit=function(){var a=this.link;if(a!==null&&!a.isAvoiding){var y=this.network.layout,x=null,b=null;switch(y.ud){case wu:x=this.fromVertex,b=this.toVertex;break;case Wf:x=this.toVertex,b=this.fromVertex;break;default:Ot("Unhandled path value "+y.ud.toString())}if(x!==null&&b!==null){var E=this.$t;if(E.x!==0||E.y!==0||x.qA){b=x.bounds;var te=El(x),ne=y.computeLayerSpacing(x),se=x.rowSpacing;a.vg();var he=a.curve===Rs,pe=a.isOrthogonal,ye;if(a.uh(),pe||he){for(ye=2;4<a.pointsCount;)a.pv(2);var Te=a.i(1),ze=a.i(2)}else{for(ye=1;3<a.pointsCount;)a.pv(1);Te=a.i(0),ze=a.i(a.pointsCount-1)}var Ze=a.i(a.pointsCount-1);te===0?(x.alignment===bu?(te=b.bottom+E.y,E.y===0&&Te.y>Ze.y+x.rowIndent&&(te=Math.min(te,Math.max(Te.y,te-y.computeNodeIndent(x))))):x.alignment===Pu?(te=b.top+E.y,E.y===0&&Te.y<Ze.y-x.rowIndent&&(te=Math.max(te,Math.min(Te.y,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,he?(a.m(ye,Te.x,te),ye++,a.m(ye,b.right+ne,te),ye++,a.m(ye,b.right+ne+(E.x-se)/3,te),ye++,a.m(ye,b.right+ne+2*(E.x-se)/3,te),ye++,a.m(ye,b.right+ne+(E.x-se),te),ye++,a.m(ye,ze.x,te)):(pe&&(a.m(ye,b.right+ne/2,Te.y),ye++),a.m(ye,b.right+ne/2,te),ye++,a.m(ye,b.right+ne+E.x-(pe?se/2:se),te),ye++,pe&&a.m(ye,a.i(ye-1).x,ze.y))):te===90?(x.alignment===bu?(te=b.right+E.x,E.x===0&&Te.x>Ze.x+x.rowIndent&&(te=Math.min(te,Math.max(Te.x,te-y.computeNodeIndent(x))))):x.alignment===Pu?(te=b.left+E.x,E.x===0&&Te.x<Ze.x-x.rowIndent&&(te=Math.max(te,Math.min(Te.x,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,he?(a.m(ye,te,Te.y),ye++,a.m(ye,te,b.bottom+ne),ye++,a.m(ye,te,b.bottom+ne+(E.y-se)/3),ye++,a.m(ye,te,b.bottom+ne+2*(E.y-se)/3),ye++,a.m(ye,te,b.bottom+ne+(E.y-se)),ye++,a.m(ye,te,ze.y)):(pe&&(a.m(ye,Te.x,b.bottom+ne/2),ye++),a.m(ye,te,b.bottom+ne/2),ye++,a.m(ye,te,b.bottom+ne+E.y-(pe?se/2:se)),ye++,pe&&a.m(ye,ze.x,a.i(ye-1).y))):te===180?(x.alignment===bu?(te=b.bottom+E.y,E.y===0&&Te.y>Ze.y+x.rowIndent&&(te=Math.min(te,Math.max(Te.y,te-y.computeNodeIndent(x))))):x.alignment===Pu?(te=b.top+E.y,E.y===0&&Te.y<Ze.y-x.rowIndent&&(te=Math.max(te,Math.min(Te.y,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.top-x.la.y+E.y:b.y+b.height/2+E.y,he?(a.m(ye,Te.x,te),ye++,a.m(ye,b.left-ne,te),ye++,a.m(ye,b.left-ne+(E.x+se)/3,te),ye++,a.m(ye,b.left-ne+2*(E.x+se)/3,te),ye++,a.m(ye,b.left-ne+(E.x+se),te),ye++,a.m(ye,ze.x,te)):(pe&&(a.m(ye,b.left-ne/2,Te.y),ye++),a.m(ye,b.left-ne/2,te),ye++,a.m(ye,b.left-ne+E.x+(pe?se/2:se),te),ye++,pe&&a.m(ye,a.i(ye-1).x,ze.y))):te===270?(x.alignment===bu?(te=b.right+E.x,E.x===0&&Te.x>Ze.x+x.rowIndent&&(te=Math.min(te,Math.max(Te.x,te-y.computeNodeIndent(x))))):x.alignment===Pu?(te=b.left+E.x,E.x===0&&Te.x<Ze.x-x.rowIndent&&(te=Math.max(te,Math.min(Te.x,te+y.computeNodeIndent(x))))):te=x.hm||x.im&&x.maxGenerationCount===1?b.left-x.la.x+E.x:b.x+b.width/2+E.x,he?(a.m(ye,te,Te.y),ye++,a.m(ye,te,b.top-ne),ye++,a.m(ye,te,b.top-ne+(E.y+se)/3),ye++,a.m(ye,te,b.top-ne+2*(E.y+se)/3),ye++,a.m(ye,te,b.top-ne+(E.y+se)),ye++,a.m(ye,te,ze.y)):(pe&&(a.m(ye,Te.x,b.top-ne/2),ye++),a.m(ye,te,b.top-ne/2),ye++,a.m(ye,te,b.top-ne+E.y+(pe?se/2:se)),ye++,pe&&a.m(ye,ze.x,a.i(ye-1).y))):Ot("Invalid angle "+te),a.zf()}else E=b,a=this.link,b=this.network.layout,y=El(x),y!==El(E)&&(ne=b.computeLayerSpacing(x),se=x.bounds,x=E.bounds,y===0&&x.left-se.right<ne+1||y===90&&x.top-se.bottom<ne+1||y===180&&se.left-x.right<ne+1||y===270&&se.top-x.bottom<ne+1||(a.vg(),x=a.curve===Rs,E=a.isOrthogonal,b=gc(this.fromVertex.alignment),a.uh(),y===0?(y=se.right+ne/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y-20,a.i(1).y),a.m(2,y-20,x),a.m(3,y,x),a.m(4,y+20,x),a.L(5,a.i(5).x,x)):E?b?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===90?(y=se.bottom+ne/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y-20),a.m(2,x,y-20),a.m(3,x,y),a.m(4,x,y+20),a.L(5,x,a.i(5).y)):E?b?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)):y===180?(y=se.left-ne/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y+20,a.i(1).y),a.m(2,y+20,x),a.m(3,y,x),a.m(4,y-20,x),a.L(5,a.i(5).x,x)):E?b?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===270&&(y=se.top-ne/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y+20),a.m(2,x,y+20),a.m(3,x,y),a.m(4,x,y-20),a.L(5,x,a.i(5).y)):E?b?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)),a.zf()))}}},Zt.Object.defineProperties(Jd.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)}}}),Jd.className="TreeEdge",Xi.prototype.initializeStandardTools=function(){this.gb("Action",new il,this.mouseDownTools),this.gb("Relinking",new Os,this.mouseDownTools),this.gb("LinkReshaping",new ko,this.mouseDownTools),this.gb("Rotating",new Ka,this.mouseDownTools),this.gb("Resizing",new Ca,this.mouseDownTools),this.gb("Linking",new Ha,this.mouseMoveTools),this.gb("Dragging",new lo,this.mouseMoveTools),this.gb("DragSelecting",new Ws,this.mouseMoveTools),this.gb("Panning",new ya,this.mouseMoveTools),this.gb("ContextMenu",new Va,this.mouseUpTools),this.gb("TextEditing",new $i,this.mouseUpTools),this.gb("ClickCreating",new uh,this.mouseUpTools),this.gb("ClickSelecting",new Uh,this.mouseUpTools)},Ql("Horizontal",new dm),Ql("Spot",new gm),Ql("Table",new vm),Ql("Viewbox",new xm),Ql("TableRow",new ym),Ql("TableColumn",new Sm),Ql("Graduated",new Kp),Ql("Grid",new Hp),xd.add("GraphLinksModel",ea),xd.add("TreeModel",Js);var _0=An.go,zy={get licenseKey(){return Vt.licenseKey},set licenseKey(a){Vt.licenseKey=a},get version(){return Vt.version},Group:jr,EnumValue:un,List:yn,Set:xn,Map:Jt,Point:lt,Size:fn,Rect:Yt,Margin:Dr,Spot:Nn,Geometry:Mn,PathFigure:Oo,PathSegment:fi,InputEvent:va,DiagramEvent:au,ChangedEvent:oo,Model:ir,GraphLinksModel:oi,TreeModel:es,Binding:Mo,Transaction:zo,UndoManager:ho,CommandHandler:kt,Tool:hi,DraggingTool:lo,DraggingInfo:Uu,DraggingOptions:ce,LinkingBaseTool:So,LinkingTool:Ha,RelinkingTool:Os,LinkReshapingTool:ko,ResizingTool:Ca,RotatingTool:Ka,ClickSelectingTool:Uh,ActionTool:il,ClickCreatingTool:uh,HTMLInfo:Zl,ContextMenuTool:Va,DragSelectingTool:Ws,PanningTool:ya,TextEditingTool:$i,ToolManager:Xi,Animation:Sa,AnimationManager:Ps,AnimationTrigger:vl,Layer:ra,Diagram:Vt,Palette:Ee,Overview:Oe,Brush:Ti,GraphObject:zt,Panel:Cn,RowColumnDefinition:Io,Shape:Ir,TextBlock:Hi,Picture:hs,Part:fr,Adornment:di,Node:Rn,Link:Tn,Placeholder:$a,Layout:so,LayoutNetwork:Ki,LayoutVertex:Uo,LayoutEdge:Es,GridLayout:fa,PanelLayout:Go,CircularLayout:mo,CircularNetwork:Vd,CircularVertex:Sg,CircularEdge:S0,ForceDirectedLayout:wa,ForceDirectedNetwork:Gf,ForceDirectedVertex:xg,ForceDirectedEdge:wg,LayeredDigraphLayout:Li,LayeredDigraphNetwork:Xd,LayeredDigraphVertex:el,LayeredDigraphEdge:Cg,TreeLayout:Jr,TreeNetwork:Kf,TreeVertex:cl,TreeEdge:Jd};typeof _0=="object"&&_0.version&&qn("WARNING: a `go` object on the root object is already defined. "+("Debug"in _0?"debug ":"")+"version: "+_0.version+", replaced with version: "+zy.version),Vt.prototype.go=zy,An.go=zy,typeof mn.exports=="object"&&(mn.exports=typeof st.g!="undefined"?st.g.go:self.go)}();var pt=typeof st.g!="undefined"?st.g.go:self.go;const Dt=typeof st.g!="undefined"?st.g.go:self.go,oe=Dt.Group,Ge=Dt.EnumValue,De=Dt.List,fe=Dt.Set,me=Dt.Map,ke=Dt.Point,Ce=Dt.Size,Se=Dt.Rect,Me=Dt.Margin,ve=Dt.Spot,we=Dt.Geometry,de=Dt.PathFigure,z=Dt.PathSegment,ee=Dt.InputEvent,ae=Dt.DiagramEvent,ie=Dt.ChangedEvent,le=Dt.Model,ue=Dt.GraphLinksModel,ge=Dt.TreeModel,Pe=Dt.Binding,je=Dt.Transaction,Be=Dt.UndoManager,Fe=Dt.CommandHandler,Ne=Dt.Tool,Ae=Dt.DraggingTool,Re=Dt.DraggingInfo,We=Dt.LinkingBaseTool,Ye=Dt.LinkingTool,Ue=Dt.RelinkingTool,Ke=Dt.LinkReshapingTool,ot=Dt.ResizingTool,ut=Dt.RotatingTool,ft=Dt.ClickSelectingTool,wt=Dt.ActionTool,Je=Dt.ClickCreatingTool,nt=Dt.HTMLInfo,xt=Dt.ContextMenuTool,Pt=Dt.DragSelectingTool,Ct=Dt.PanningTool,gt=Dt.TextEditingTool,dt=Dt.ToolManager,ht=Dt.Animation,Et=Dt.AnimationManager,St=Dt.AnimationTrigger,Ft=Dt.Layer,mt=Dt.Diagram,yt=Dt.Palette,tt=Dt.Overview,Ve=Dt.Brush,xe=Dt.GraphObject,Le=Dt.Panel,Xe=Dt.RowColumnDefinition,rt=Dt.Shape,Ie=Dt.TextBlock,_e=Dt.TextBlockMetrics,He=Dt.Picture,Qe=Dt.Part,ct=Dt.Adornment,at=Dt.Node,At=Dt.Link,Lt=Dt.Placeholder,It=Dt.Layout,Kt=Dt.LayoutNetwork,Xt=Dt.LayoutVertex,$t=Dt.LayoutEdge,Ut=Dt.GridLayout,ln=Dt.PanelLayout,tn=Dt.CircularLayout,Wt=Dt.CircularNetwork,En=Dt.CircularVertex,Pn=Dt.CircularEdge,Ln=Dt.ForceDirectedLayout,Vn=Dt.ForceDirectedNetwork,Or=Dt.ForceDirectedVertex,dr=Dt.ForceDirectedEdge,Lr=Dt.LayeredDigraphLayout,Xr=Dt.LayeredDigraphNetwork,Vr=Dt.LayeredDigraphVertex,si=Dt.LayeredDigraphEdge,yi=Dt.TreeLayout,Ii=Dt.TreeNetwork,Fi=Dt.TreeVertex,_i=Dt.TreeEdge,Yi=Dt.version},24334:function(mn,dn,st){var pt,Dt;(function(oe,Ge){mn.exports=Ge(oe)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof st.g!="undefined"?st.g:this,function(oe){"use strict";oe=oe||{};var Ge=oe.Base64,De="2.6.4",fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",me=function(Ue){for(var Ke={},ot=0,ut=Ue.length;ot<ut;ot++)Ke[Ue.charAt(ot)]=ot;return Ke}(fe),ke=String.fromCharCode,Ce=function(Ue){if(Ue.length<2){var Ke=Ue.charCodeAt(0);return Ke<128?Ue:Ke<2048?ke(192|Ke>>>6)+ke(128|Ke&63):ke(224|Ke>>>12&15)+ke(128|Ke>>>6&63)+ke(128|Ke&63)}else{var Ke=65536+(Ue.charCodeAt(0)-55296)*1024+(Ue.charCodeAt(1)-56320);return ke(240|Ke>>>18&7)+ke(128|Ke>>>12&63)+ke(128|Ke>>>6&63)+ke(128|Ke&63)}},Se=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Me=function(Ue){return Ue.replace(Se,Ce)},ve=function(Ue){var Ke=[0,2,1][Ue.length%3],ot=Ue.charCodeAt(0)<<16|(Ue.length>1?Ue.charCodeAt(1):0)<<8|(Ue.length>2?Ue.charCodeAt(2):0),ut=[fe.charAt(ot>>>18),fe.charAt(ot>>>12&63),Ke>=2?"=":fe.charAt(ot>>>6&63),Ke>=1?"=":fe.charAt(ot&63)];return ut.join("")},we=oe.btoa&&typeof oe.btoa=="function"?function(Ue){return oe.btoa(Ue)}:function(Ue){if(Ue.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return Ue.replace(/[\s\S]{1,3}/g,ve)},de=function(Ue){return we(Me(String(Ue)))},z=function(Ue){return Ue.replace(/[+\/]/g,function(Ke){return Ke=="+"?"-":"_"}).replace(/=/g,"")},ee=function(Ue,Ke){return Ke?z(de(Ue)):de(Ue)},ae=function(Ue){return ee(Ue,!0)},ie;oe.Uint8Array&&(ie=function(Ue,Ke){for(var ot="",ut=0,ft=Ue.length;ut<ft;ut+=3){var wt=Ue[ut],Je=Ue[ut+1],nt=Ue[ut+2],xt=wt<<16|Je<<8|nt;ot+=fe.charAt(xt>>>18)+fe.charAt(xt>>>12&63)+(typeof Je!="undefined"?fe.charAt(xt>>>6&63):"=")+(typeof nt!="undefined"?fe.charAt(xt&63):"=")}return Ke?z(ot):ot});var le=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ue=function(Ue){switch(Ue.length){case 4:var Ke=(7&Ue.charCodeAt(0))<<18|(63&Ue.charCodeAt(1))<<12|(63&Ue.charCodeAt(2))<<6|63&Ue.charCodeAt(3),ot=Ke-65536;return ke((ot>>>10)+55296)+ke((ot&1023)+56320);case 3:return ke((15&Ue.charCodeAt(0))<<12|(63&Ue.charCodeAt(1))<<6|63&Ue.charCodeAt(2));default:return ke((31&Ue.charCodeAt(0))<<6|63&Ue.charCodeAt(1))}},ge=function(Ue){return Ue.replace(le,ue)},Pe=function(Ue){var Ke=Ue.length,ot=Ke%4,ut=(Ke>0?me[Ue.charAt(0)]<<18:0)|(Ke>1?me[Ue.charAt(1)]<<12:0)|(Ke>2?me[Ue.charAt(2)]<<6:0)|(Ke>3?me[Ue.charAt(3)]:0),ft=[ke(ut>>>16),ke(ut>>>8&255),ke(ut&255)];return ft.length-=[0,0,2,1][ot],ft.join("")},je=oe.atob&&typeof oe.atob=="function"?function(Ue){return oe.atob(Ue)}:function(Ue){return Ue.replace(/\S{1,4}/g,Pe)},Be=function(Ue){return je(String(Ue).replace(/[^A-Za-z0-9\+\/]/g,""))},Fe=function(Ue){return ge(je(Ue))},Ne=function(Ue){return String(Ue).replace(/[-_]/g,function(Ke){return Ke=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ae=function(Ue){return Fe(Ne(Ue))},Re;oe.Uint8Array&&(Re=function(Ue){return Uint8Array.from(Be(Ne(Ue)),function(Ke){return Ke.charCodeAt(0)})});var We=function(){var Ue=oe.Base64;return oe.Base64=Ge,Ue};if(oe.Base64={VERSION:De,atob:Be,btoa:we,fromBase64:Ae,toBase64:ee,utob:Me,encode:ee,encodeURI:ae,btou:ge,decode:Ae,noConflict:We,fromUint8Array:ie,toUint8Array:Re},typeof Object.defineProperty=="function"){var Ye=function(Ue){return{value:Ue,enumerable:!1,writable:!0,configurable:!0}};oe.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Ye(function(){return Ae(this)})),Object.defineProperty(String.prototype,"toBase64",Ye(function(Ue){return ee(this,Ue)})),Object.defineProperty(String.prototype,"toBase64URI",Ye(function(){return ee(this,!0)}))}}return oe.Meteor&&(Base64=oe.Base64),mn.exports?mn.exports.Base64=oe.Base64:(pt=[],Dt=function(){return oe.Base64}.apply(dn,pt),Dt!==void 0&&(mn.exports=Dt)),{Base64:oe.Base64}})},2859:function(mn,dn,st){"use strict";st.d(dn,{hP:function(){return tt}});var pt=function(Ve,xe){return(pt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Le,Xe){Le.__proto__=Xe}||function(Le,Xe){for(var rt in Xe)Object.prototype.hasOwnProperty.call(Xe,rt)&&(Le[rt]=Xe[rt])})(Ve,xe)};function Dt(Ve,xe){function Le(){this.constructor=Ve}pt(Ve,xe),Ve.prototype=xe===null?Object.create(xe):(Le.prototype=xe.prototype,new Le)}function oe(Ve,xe,Le,Xe){return new(Le||(Le=Promise))(function(rt,Ie){function _e(ct){try{Qe(Xe.next(ct))}catch(at){Ie(at)}}function He(ct){try{Qe(Xe.throw(ct))}catch(at){Ie(at)}}function Qe(ct){var at;ct.done?rt(ct.value):(at=ct.value,at instanceof Le?at:new Le(function(At){At(at)})).then(_e,He)}Qe((Xe=Xe.apply(Ve,xe||[])).next())})}function Ge(Ve,xe){var Le,Xe,rt,Ie,_e={label:0,sent:function(){if(1&rt[0])throw rt[1];return rt[1]},trys:[],ops:[]};return Ie={next:He(0),throw:He(1),return:He(2)},typeof Symbol=="function"&&(Ie[Symbol.iterator]=function(){return this}),Ie;function He(Qe){return function(ct){return function(at){if(Le)throw new TypeError("Generator is already executing.");for(;_e;)try{if(Le=1,Xe&&(rt=2&at[0]?Xe.return:at[0]?Xe.throw||((rt=Xe.return)&&rt.call(Xe),0):Xe.next)&&!(rt=rt.call(Xe,at[1])).done)return rt;switch(Xe=0,rt&&(at=[2&at[0],rt.value]),at[0]){case 0:case 1:rt=at;break;case 4:return _e.label++,{value:at[1],done:!1};case 5:_e.label++,Xe=at[1],at=[0];continue;case 7:at=_e.ops.pop(),_e.trys.pop();continue;default:if(rt=_e.trys,!((rt=rt.length>0&&rt[rt.length-1])||at[0]!==6&&at[0]!==2)){_e=0;continue}if(at[0]===3&&(!rt||at[1]>rt[0]&&at[1]<rt[3])){_e.label=at[1];break}if(at[0]===6&&_e.label<rt[1]){_e.label=rt[1],rt=at;break}if(rt&&_e.label<rt[2]){_e.label=rt[2],_e.ops.push(at);break}rt[2]&&_e.ops.pop(),_e.trys.pop();continue}at=xe.call(Ve,_e)}catch(At){at=[6,At],Xe=0}finally{Le=rt=0}if(5&at[0])throw at[1];return{value:at[0]?at[1]:void 0,done:!0}}([Qe,ct])}}}function De(){for(var Ve=0,xe=0,Le=arguments.length;xe<Le;xe++)Ve+=arguments[xe].length;var Xe=Array(Ve),rt=0;for(xe=0;xe<Le;xe++)for(var Ie=arguments[xe],_e=0,He=Ie.length;_e<He;_e++,rt++)Xe[rt]=Ie[_e];return Xe}var fe=function(){function Ve(){}return Ve.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Ve.setAttributes=function(xe,Le){for(var Xe=0,rt=Le;Xe<rt.length;Xe++){var Ie=rt[Xe],_e=Ie[0],He=Ie[1];xe.setAttribute(_e,He)}},Ve.createRect=function(xe,Le,Xe){var rt=document.createElementNS("http://www.w3.org/2000/svg","rect");return rt.setAttribute("width",xe.toString()),rt.setAttribute("height",Le.toString()),Xe&&Ve.setAttributes(rt,Xe),rt},Ve.createLine=function(xe,Le,Xe,rt,Ie){var _e=document.createElementNS("http://www.w3.org/2000/svg","line");return _e.setAttribute("x1",xe.toString()),_e.setAttribute("y1",Le.toString()),_e.setAttribute("x2",Xe.toString()),_e.setAttribute("y2",rt.toString()),Ie&&Ve.setAttributes(_e,Ie),_e},Ve.createPolygon=function(xe,Le){var Xe=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Xe.setAttribute("points",xe),Le&&Ve.setAttributes(Xe,Le),Xe},Ve.createCircle=function(xe,Le){var Xe=document.createElementNS("http://www.w3.org/2000/svg","circle");return Xe.setAttribute("cx",(xe/2).toString()),Xe.setAttribute("cy",(xe/2).toString()),Xe.setAttribute("r",xe.toString()),Le&&Ve.setAttributes(Xe,Le),Xe},Ve.createEllipse=function(xe,Le,Xe){var rt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return rt.setAttribute("cx",(xe/2).toString()),rt.setAttribute("cy",(Le/2).toString()),rt.setAttribute("rx",(xe/2).toString()),rt.setAttribute("ry",(Le/2).toString()),Xe&&Ve.setAttributes(rt,Xe),rt},Ve.createGroup=function(xe){var Le=document.createElementNS("http://www.w3.org/2000/svg","g");return xe&&Ve.setAttributes(Le,xe),Le},Ve.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Ve.createMarker=function(xe,Le,Xe,rt,Ie,_e,He){var Qe=document.createElementNS("http://www.w3.org/2000/svg","marker");return Ve.setAttributes(Qe,[["id",xe],["orient",Le],["markerWidth",Xe.toString()],["markerHeight",rt.toString()],["refX",Ie.toString()],["refY",_e.toString()]]),Qe.appendChild(He),Qe},Ve.createText=function(xe){var Le=document.createElementNS("http://www.w3.org/2000/svg","text");return Le.setAttribute("x","0"),Le.setAttribute("y","0"),xe&&Ve.setAttributes(Le,xe),Le},Ve.createTSpan=function(xe,Le){var Xe=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Xe.textContent=xe,Le&&Ve.setAttributes(Xe,Le),Xe},Ve.createImage=function(xe){var Le=document.createElementNS("http://www.w3.org/2000/svg","image");return xe&&Ve.setAttributes(Le,xe),Le},Ve.createPoint=function(xe,Le){var Xe=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Xe.x=xe,Xe.y=Le,Xe},Ve.createPath=function(xe,Le){var Xe=document.createElementNS("http://www.w3.org/2000/svg","path");return Xe.setAttribute("d",xe),Le&&Ve.setAttributes(Xe,Le),Xe},Ve}(),me=function(){function Ve(){}return Ve.addKey=function(xe){Ve.key=xe},Object.defineProperty(Ve,"isLicensed",{get:function(){return!!Ve.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Ve.key)},enumerable:!1,configurable:!0}),Ve}(),ke=function(){function Ve(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Ve.prototype.rasterize=function(xe,Le,Xe){var rt=this;return new Promise(function(Ie){var _e=Xe!==void 0?Xe:document.createElement("canvas");xe===null&&(rt.markersOnly=!0,rt.naturalSize=!1);var He=document.createElementNS("http://www.w3.org/2000/svg","svg");He.setAttribute("xmlns","http://www.w3.org/2000/svg"),He.setAttribute("width",Le.width.baseVal.valueAsString),He.setAttribute("height",Le.height.baseVal.valueAsString),He.setAttribute("viewBox","0 0 "+Le.viewBox.baseVal.width.toString()+" "+Le.viewBox.baseVal.height.toString()),He.innerHTML=Le.innerHTML,rt.naturalSize===!0?(He.width.baseVal.value=xe.naturalWidth,He.height.baseVal.value=xe.naturalHeight):rt.width!==void 0&&rt.height!==void 0&&(He.width.baseVal.value=rt.width,He.height.baseVal.value=rt.height),_e.width=He.width.baseVal.value,_e.height=He.height.baseVal.value;var Qe=He.outerHTML,ct=_e.getContext("2d");rt.markersOnly!==!0&&ct.drawImage(xe,0,0,_e.width,_e.height);var at=window.URL,At=new Image(_e.width,_e.height);At.setAttribute("crossOrigin","anonymous");var Lt=new Blob([Qe],{type:"image/svg+xml"}),It=at.createObjectURL(Lt);At.onload=function(){ct.drawImage(At,0,0),at.revokeObjectURL(It);var Kt=_e.toDataURL(rt.imageType,rt.imageQuality);Ie(Kt)},At.src=It})},Ve}(),Ce=function(){},Se=function(){function Ve(xe){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+xe+"_"}return Object.defineProperty(Ve.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.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(Ve.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Ve.prototype.addClass=function(xe){return this.styleSheet===void 0&&this.addStyleSheet(),xe.name=""+this.classNamePrefix+xe.localName,this.classes.push(xe),this.styleSheet.sheet.insertRule("."+xe.name+" {"+xe.style+"}",this.styleSheet.sheet.cssRules.length),xe},Ve.prototype.addRule=function(xe){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(xe),this.styleSheet.sheet.insertRule(xe.selector+" {"+xe.style+"}",this.styleSheet.sheet.cssRules.length)},Ve.prototype.addStyleSheet=function(){var xe;this.styleSheet=document.createElement("style"),((xe=this.styleSheetRoot)!==null&&xe!==void 0?xe:document.head).appendChild(this.styleSheet),this.addRule(new Me("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Me("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Me("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new ve("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new ve("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},Ve.prototype.removeStyleSheet=function(){var xe;this.styleSheet&&(((xe=this.styleSheetRoot)!==null&&xe!==void 0?xe:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Ve}(),Me=function(Ve,xe){this.selector=Ve,this.style=xe},ve=function(Ve,xe){this.localName=Ve,this.style=xe},we=function(){function Ve(xe,Le,Xe,rt,Ie){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=xe,this.displayMode=Le,this.markerItems=Xe,this.uiStyleSettings=rt,this.styles=Ie,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Ve.prototype.show=function(xe){var Le=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=xe,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Xe=document.createElement("div");Xe.className=this.toolbarBlockStyleClass.name,Xe.style.whiteSpace="nowrap",this.uiContainer.appendChild(Xe),this.addActionButton(Xe,'<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(Xe,'<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(Xe,'<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(Xe,'<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(Xe,'<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(Xe,'<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(Xe,'<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(Xe,'<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(Ie){var _e=document.createElement("div");_e.className=""+Le.toolbarButtonStyleClass.name,_e.setAttribute("data-type-name",Ie.typeName),_e.innerHTML=Ie.icon,_e.addEventListener("click",function(){Le.markerToolbarButtonClicked(_e,Ie)}),Le.buttons.push(_e),Le.markerButtons.push(_e)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var rt=document.createElement("div");rt.className=this.toolbarBlockStyleClass.name,rt.style.whiteSpace="nowrap",rt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(rt),this.addActionButton(rt,'<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(rt,'<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()},Ve.prototype.addButtonClickListener=function(xe){this.buttonClickListeners.push(xe)},Ve.prototype.removeButtonClickListener=function(xe){this.buttonClickListeners.indexOf(xe)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(xe),1)},Ve.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Ve.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var xe=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Le=0;Le<this.markerButtons.length;Le++)Le<xe||Le===xe&&this.markerButtons.length-1===xe?this.markerButtonBlock.appendChild(this.markerButtons[Le]):(Le===xe&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Le]))}},Ve.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")},Ve.prototype.resetButtonStyles=function(){var xe=this;this.buttons.forEach(function(Le){Le.className=Le.className.replace(xe.uiStyleSettings.toolbarButtonStyleColorsClassName?xe.uiStyleSettings.toolbarButtonStyleColorsClassName:xe.toolbarButtonStyleColorsClass.name,"").trim(),Le.className=Le.className.replace(xe.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?xe.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:xe.toolbarActiveButtonStyleColorsClass.name,"").trim(),Le.className+=" "+(xe.uiStyleSettings.toolbarButtonStyleColorsClassName?xe.uiStyleSettings.toolbarButtonStyleColorsClassName:xe.toolbarButtonStyleColorsClass.name)})},Ve.prototype.addActionButton=function(xe,Le,Xe){var rt=this,Ie=document.createElement("div");switch(Ie.className=""+this.toolbarButtonStyleClass.name,Ie.innerHTML=Le,Ie.setAttribute("data-action",Xe),Ie.addEventListener("click",function(){rt.actionToolbarButtonClicked(Ie,Xe)}),Xe){case"select":Ie.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Ie.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Ie.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Ie.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Ie.style.fill=this.uiStyleSettings.closeButtonColor}xe.appendChild(Ie),this.buttons.push(Ie)},Ve.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ve("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 ve("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ve("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ve("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 ve("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var xe=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ve("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*xe)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*xe)+`px;
padding: `+xe+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ve("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ve("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Me("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Me("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},Ve.prototype.markerToolbarButtonClicked=function(xe,Le){this.setActiveButton(xe),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Xe){return Xe("marker",Le)}),this.markerButtonOverflowBlock.style.display="none"},Ve.prototype.actionToolbarButtonClicked=function(xe,Le){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Xe){return Xe("action",Le)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Ve.prototype.setActiveButton=function(xe){this.resetButtonStyles(),xe.className=xe.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),xe.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Ve.prototype.setActiveMarkerButton=function(xe){var Le=this.markerButtons.find(function(Xe){return Xe.getAttribute("data-type-name")===xe});Le&&this.setActiveButton(Le)},Ve.prototype.setCurrentMarker=function(xe){var Le=this;this.currentMarker=xe,this.buttons.filter(function(Xe){return/delete|notes/.test(Xe.getAttribute("data-action"))}).forEach(function(Xe){Le.currentMarker===void 0?(Xe.style.fillOpacity="0.4",Xe.style.pointerEvents="none"):(Xe.style.fillOpacity="1",Xe.style.pointerEvents="all")})},Ve}(),de=function(){function Ve(xe,Le,Xe,rt){this.panels=[],this.panelButtons=[],this.markerjsContainer=xe,this.displayMode=Le,this.uiStyleSettings=Xe,this.styles=rt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Ve.prototype.addStyles=function(){var xe;this.toolboxStyleClass=this.styles.addClass(new ve("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 ve("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var Le=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ve("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ve("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ve("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 ve("toolbox-panel-row_colors",`
background-color: `+((xe=this.uiStyleSettings.toolboxBackgroundColor)!==null&&xe!==void 0?xe:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ve("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Le)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Le)+`px;
padding: `+Le+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ve("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ve("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Me("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Me("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},Ve.prototype.show=function(xe){var Le;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=xe,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Le=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Le!==void 0?Le:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Ve.prototype.setPanelButtons=function(xe){var Le,Xe,rt=this;this.panels=xe,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Le=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Le!==void 0?Le:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Xe=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Xe!==void 0?Xe:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Ie){var _e;Ie.uiStyleSettings=rt.uiStyleSettings;var He=document.createElement("div");He.className=rt.toolboxButtonStyleClass.name+" "+((_e=rt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&_e!==void 0?_e:rt.toolboxButtonStyleColorsClass.name),He.innerHTML=Ie.icon,He.title=Ie.title,He.addEventListener("click",function(){rt.panelButtonClick(Ie)}),rt.panelButtons.push(He),rt.buttonRow.appendChild(He)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Ve.prototype.panelButtonClick=function(xe){var Le=this,Xe=-1;if(xe!==this.activePanel){Xe=this.panels.indexOf(xe),this.panelRow.innerHTML="";var rt=xe.getUi();rt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(rt),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=xe}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Le.displayMode==="inline"?Le.panelRow.style.display="none":Le.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Ie,_e){var He,Qe;Ie.className=Le.toolboxButtonStyleClass.name+" "+(_e===Xe?""+((He=Le.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&He!==void 0?He:Le.toolboxActiveButtonStyleColorsClass.name):""+((Qe=Le.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Qe!==void 0?Qe:Le.toolboxButtonStyleColorsClass.name))})},Ve}(),z=function(Ve,xe){this.title=Ve,this.icon=xe},ee=function(Ve){function xe(Le,Xe,rt,Ie){var _e=Ve.call(this,Le,Ie||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return _e.colors=[],_e.addTransparent=!1,_e.colorBoxes=[],_e.colors=Xe,_e.currentColor=rt,_e.setCurrentColor=_e.setCurrentColor.bind(_e),_e.getColorBox=_e.getColorBox.bind(_e),_e}return Dt(xe,Ve),xe.prototype.getUi=function(){var Le=this,Xe=document.createElement("div");return Xe.style.overflow="hidden",Xe.style.whiteSpace="nowrap",this.colors.forEach(function(rt){var Ie=Le.getColorBox(rt);Xe.appendChild(Ie),Le.colorBoxes.push(Ie)}),Xe},xe.prototype.getColorBox=function(Le){var Xe=this,rt=this.uiStyleSettings.toolbarHeight/4,Ie=this.uiStyleSettings.toolbarHeight-rt,_e=document.createElement("div");_e.style.display="inline-block",_e.style.boxSizing="content-box",_e.style.width=Ie-2+"px",_e.style.height=Ie-2+"px",_e.style.padding="1px",_e.style.marginRight="2px",_e.style.marginBottom="2px",_e.style.borderWidth="2px",_e.style.borderStyle="solid",_e.style.borderRadius=(Ie+2)/2+"px",_e.style.borderColor=Le===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",_e.addEventListener("click",function(){Xe.setCurrentColor(Le,_e)});var He=document.createElement("div");return He.style.display="inline-block",He.style.width=Ie-2+"px",He.style.height=Ie-2+"px",He.style.backgroundColor=Le,He.style.borderRadius=Ie/2+"px",Le==="transparent"&&(He.style.fill=this.uiStyleSettings.toolboxAccentColor,He.innerHTML=`<svg viewBox="0 0 24 24">
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
</svg>`),_e.appendChild(He),_e},xe.prototype.setCurrentColor=function(Le,Xe){var rt=this;this.currentColor=Le,this.colorBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Xe?rt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Le)},xe}(z),ae=function(){function Ve(xe,Le,Xe){this._state="new",this._isSelected=!1,this._container=xe,this._overlayContainer=Le,this.globalSettings=Xe,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Ve.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Ve.prototype.ownsTarget=function(xe){return!1},Object.defineProperty(Ve.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Ve.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Ve.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Ve.prototype.pointerDown=function(xe,Le){},Ve.prototype.dblClick=function(xe,Le){},Ve.prototype.manipulate=function(xe){},Ve.prototype.pointerUp=function(xe){this.stateChanged()},Ve.prototype.dispose=function(){},Ve.prototype.addMarkerVisualToContainer=function(xe){this.container.childNodes.length>0?this.container.insertBefore(xe,this.container.childNodes[0]):this.container.appendChild(xe)},Ve.prototype.getState=function(){return{typeName:Ve.typeName,state:this.state,notes:this.notes}},Ve.prototype.restoreState=function(xe){this._state=xe.state,this.notes=xe.notes},Ve.prototype.scale=function(xe,Le){},Ve.prototype.colorChanged=function(xe){this.onColorChanged&&this.onColorChanged(xe),this.stateChanged()},Ve.prototype.fillColorChanged=function(xe){this.onFillColorChanged&&this.onFillColorChanged(xe),this.stateChanged()},Ve.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var xe=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),xe.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(xe)&&this.onStateChanged(this)}},Ve.typeName="MarkerBase",Ve}(),ie=function(){function Ve(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Ve.prototype.findGripByVisual=function(xe){return this.topLeft.ownsTarget(xe)?this.topLeft:this.topCenter.ownsTarget(xe)?this.topCenter:this.topRight.ownsTarget(xe)?this.topRight:this.centerLeft.ownsTarget(xe)?this.centerLeft:this.centerRight.ownsTarget(xe)?this.centerRight:this.bottomLeft.ownsTarget(xe)?this.bottomLeft:this.bottomCenter.ownsTarget(xe)?this.bottomCenter:this.bottomRight.ownsTarget(xe)?this.bottomRight:void 0},Ve}(),le=function(){function Ve(){this.GRIP_SIZE=10,this.visual=fe.createGroup(),this.visual.appendChild(fe.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(fe.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Ve.prototype.ownsTarget=function(xe){return xe===this.visual||xe===this.visual.childNodes[0]||xe===this.visual.childNodes[1]},Ve}(),ue=function(){function Ve(){}return Ve.toITransformMatrix=function(xe){return{a:xe.a,b:xe.b,c:xe.c,d:xe.d,e:xe.e,f:xe.f}},Ve.toSVGMatrix=function(xe,Le){return xe.a=Le.a,xe.b=Le.b,xe.c=Le.c,xe.d=Le.d,xe.e=Le.e,xe.f=Le.f,xe},Ve}(),ge=function(Ve){function xe(Le,Xe,rt){var Ie=Ve.call(this,Le,Xe,rt)||this;return Ie.left=0,Ie.top=0,Ie.width=0,Ie.height=0,Ie.defaultSize={x:50,y:20},Ie.offsetX=0,Ie.offsetY=0,Ie.rotationAngle=0,Ie.CB_DISTANCE=10,Ie._suppressMarkerCreateEvent=!1,Ie.container.transform.baseVal.appendItem(fe.createTransform()),Ie.setupControlBox(),Ie}return Dt(xe,Ve),Object.defineProperty(xe.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(xe.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(xe.prototype,"visual",{get:function(){return this._visual},set:function(Le){this._visual=Le;var Xe=fe.createTransform();this._visual.transform.baseVal.appendItem(Xe)},enumerable:!1,configurable:!0}),xe.prototype.ownsTarget=function(Le){return!!Ve.prototype.ownsTarget.call(this,Le)||!!(this.controlGrips.findGripByVisual(Le)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Le))},xe.prototype.pointerDown=function(Le,Xe){Ve.prototype.pointerDown.call(this,Le,Xe),this.state==="new"&&(this.left=Le.x,this.top=Le.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var rt=this.unrotatePoint(Le);if(this.manipulationStartX=rt.x,this.manipulationStartY=rt.y,this.offsetX=rt.x-this.left,this.offsetY=rt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Xe),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Xe)){this.activeGrip=this.rotatorGrip;var Ie=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Ie.x-this.width/2,this.top=Ie.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var _e=this.container.transform.baseVal.getItem(0);_e.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(_e,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},xe.prototype.pointerUp=function(Le){var Xe=this.state;Ve.prototype.pointerUp.call(this,Le),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Le),this._state="select",Xe==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},xe.prototype.moveVisual=function(Le){this.visual.style.transform="translate("+Le.x+"px, "+Le.y+"px)"},xe.prototype.manipulate=function(Le){var Xe=this.unrotatePoint(Le);this.state==="creating"?this.resize(Le):this.state==="move"?(this.left=this.manipulationStartLeft+(Xe.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Xe.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Xe):this.state==="rotate"&&this.rotate(Le)},xe.prototype.resize=function(Le){var Xe=this.manipulationStartLeft,rt=this.manipulationStartWidth,Ie=this.manipulationStartTop,_e=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Xe=this.manipulationStartLeft+Le.x-this.manipulationStartX,rt=this.manipulationStartWidth+this.manipulationStartLeft-Xe;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:rt=this.manipulationStartWidth+Le.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Ie=this.manipulationStartTop+Le.y-this.manipulationStartY,_e=this.manipulationStartHeight+this.manipulationStartTop-Ie;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:_e=this.manipulationStartHeight+Le.y-this.manipulationStartY}rt>=0?(this.left=Xe,this.width=rt):(this.left=Xe+rt,this.width=-rt),_e>=0?(this.top=Ie,this.height=_e):(this.top=Ie+_e,this.height=-_e),this.setSize()},xe.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},xe.prototype.rotate=function(Le){if(Math.abs(Le.x-this.centerX)>.1){var Xe=Math.sign(Le.x-this.centerX);this.rotationAngle=180*Math.atan((Le.y-this.centerY)/(Le.x-this.centerX))/Math.PI+90*Xe,this.applyRotation()}},xe.prototype.applyRotation=function(){var Le=this.container.transform.baseVal.getItem(0);Le.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Le,0)},xe.prototype.rotatePoint=function(Le){if(this.rotationAngle===0)return Le;var Xe=this.container.getCTM(),rt=fe.createPoint(Le.x,Le.y);return{x:(rt=rt.matrixTransform(Xe)).x,y:rt.y}},xe.prototype.unrotatePoint=function(Le){if(this.rotationAngle===0)return Le;var Xe=this.container.getCTM();Xe=Xe.inverse();var rt=fe.createPoint(Le.x,Le.y);return{x:(rt=rt.matrixTransform(Xe)).x,y:rt.y}},xe.prototype.select=function(){Ve.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},xe.prototype.deselect=function(){Ve.prototype.deselect.call(this),this.controlBox.style.display="none"},xe.prototype.setupControlBox=function(){this.controlBox=fe.createGroup();var Le=fe.createTransform();Le.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Le),this.container.appendChild(this.controlBox),this.controlRect=fe.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=fe.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new ie,this.addControlGrips(),this.controlBox.style.display="none"},xe.prototype.adjustControlBox=function(){var Le=this.controlBox.transform.baseVal.getItem(0);Le.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Le,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()},xe.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()},xe.prototype.createGrip=function(){var Le=new le;return Le.visual.transform.baseVal.appendItem(fe.createTransform()),this.controlBox.appendChild(Le.visual),Le},xe.prototype.positionGrips=function(){var Le=this.controlGrips.topLeft.GRIP_SIZE,Xe=-Le/2,rt=Xe,Ie=(this.width+this.CB_DISTANCE)/2-Le/2,_e=(this.height+this.CB_DISTANCE)/2-Le/2,He=this.height+this.CB_DISTANCE-Le/2,Qe=this.width+this.CB_DISTANCE-Le/2;this.positionGrip(this.controlGrips.topLeft.visual,Xe,rt),this.positionGrip(this.controlGrips.topCenter.visual,Ie,rt),this.positionGrip(this.controlGrips.topRight.visual,Qe,rt),this.positionGrip(this.controlGrips.centerLeft.visual,Xe,_e),this.positionGrip(this.controlGrips.centerRight.visual,Qe,_e),this.positionGrip(this.controlGrips.bottomLeft.visual,Xe,He),this.positionGrip(this.controlGrips.bottomCenter.visual,Ie,He),this.positionGrip(this.controlGrips.bottomRight.visual,Qe,He),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Ie,rt-3*this.CB_DISTANCE)},xe.prototype.positionGrip=function(Le,Xe,rt){var Ie=Le.transform.baseVal.getItem(0);Ie.setTranslate(Xe,rt),Le.transform.baseVal.replaceItem(Ie,0)},xe.prototype.hideControlBox=function(){this.controlBox.style.display="none"},xe.prototype.showControlBox=function(){this.controlBox.style.display=""},xe.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ue.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ue.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Ve.prototype.getState.call(this))},xe.prototype.restoreState=function(Le){Ve.prototype.restoreState.call(this,Le);var Xe=Le;this.left=Xe.left,this.top=Xe.top,this.width=Xe.width,this.height=Xe.height,this.rotationAngle=Xe.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ue.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Xe.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ue.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Xe.containerTransformMatrix))},xe.prototype.scale=function(Le,Xe){Ve.prototype.scale.call(this,Le,Xe);var rt=this.rotatePoint({x:this.left,y:this.top}),Ie=this.unrotatePoint({x:rt.x*Le,y:rt.y*Xe});this.left=Ie.x,this.top=Ie.y,this.width=this.width*Le,this.height=this.height*Xe,this.adjustControlBox()},xe}(ae),Pe=function(Ve){function xe(Le,Xe,rt){var Ie=Ve.call(this,Le,Xe,rt)||this;return Ie.fillColor="transparent",Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.opacity=1,Ie.setStrokeColor=Ie.setStrokeColor.bind(Ie),Ie.setFillColor=Ie.setFillColor.bind(Ie),Ie.setStrokeWidth=Ie.setStrokeWidth.bind(Ie),Ie.setStrokeDasharray=Ie.setStrokeDasharray.bind(Ie),Ie.createVisual=Ie.createVisual.bind(Ie),Ie}return Dt(xe,Ve),xe.prototype.ownsTarget=function(Le){return!(!Ve.prototype.ownsTarget.call(this,Le)&&Le!==this.visual)},xe.prototype.createVisual=function(){this.visual=fe.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)},xe.prototype.pointerDown=function(Le,Xe){Ve.prototype.pointerDown.call(this,Le,Xe),this.state==="new"&&(this.createVisual(),this.moveVisual(Le),this._state="creating")},xe.prototype.manipulate=function(Le){Ve.prototype.manipulate.call(this,Le)},xe.prototype.resize=function(Le){Ve.prototype.resize.call(this,Le),this.setSize()},xe.prototype.setSize=function(){Ve.prototype.setSize.call(this),fe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},xe.prototype.pointerUp=function(Le){Ve.prototype.pointerUp.call(this,Le),this.setSize()},xe.prototype.setStrokeColor=function(Le){this.strokeColor=Le,this.visual&&fe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Le),this.stateChanged()},xe.prototype.setFillColor=function(Le){this.fillColor=Le,this.visual&&fe.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},xe.prototype.setStrokeWidth=function(Le){this.strokeWidth=Le,this.visual&&fe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},xe.prototype.setStrokeDasharray=function(Le){this.strokeDasharray=Le,this.visual&&fe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},xe.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Ve.prototype.getState.call(this))},xe.prototype.restoreState=function(Le){var Xe=Le;this.fillColor=Xe.fillColor,this.strokeColor=Xe.strokeColor,this.strokeWidth=Xe.strokeWidth,this.strokeDasharray=Xe.strokeDasharray,this.opacity=Xe.opacity,this.createVisual(),Ve.prototype.restoreState.call(this,Le),this.setSize()},xe.prototype.scale=function(Le,Xe){Ve.prototype.scale.call(this,Le,Xe),this.setSize()},xe.title="Rectangle marker",xe}(ge),je=function(Ve){function xe(Le,Xe,rt,Ie){var _e=Ve.call(this,Le,Ie||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return _e.widths=[],_e.widthBoxes=[],_e.widths=Xe,_e.currentWidth=rt,_e.setCurrentWidth=_e.setCurrentWidth.bind(_e),_e}return Dt(xe,Ve),xe.prototype.getUi=function(){var Le=this,Xe=document.createElement("div");return Xe.style.display="flex",Xe.style.overflow="hidden",Xe.style.flexGrow="2",this.widths.forEach(function(rt){var Ie=document.createElement("div");Ie.style.display="flex",Ie.style.flexGrow="2",Ie.style.alignItems="center",Ie.style.justifyContent="space-between",Ie.style.padding="5px",Ie.style.borderWidth="2px",Ie.style.borderStyle="solid",Ie.style.borderColor=rt===Le.currentWidth?Le.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){Le.setCurrentWidth(rt,Ie)}),Xe.appendChild(Ie);var _e=document.createElement("div");_e.innerText=rt.toString(),_e.style.marginRight="5px",Ie.appendChild(_e);var He=document.createElement("div");He.style.minHeight="20px",He.style.flexGrow="2",He.style.display="flex",He.style.alignItems="center";var Qe=document.createElement("hr");Qe.style.minWidth="20px",Qe.style.border="0px",Qe.style.borderTop=rt+"px solid "+Le.uiStyleSettings.toolboxColor,Qe.style.flexGrow="2",He.appendChild(Qe),Ie.appendChild(He),Le.widthBoxes.push(Ie)}),Xe},xe.prototype.setCurrentWidth=function(Le,Xe){var rt=this;this.currentWidth=Le,this.widthBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Xe?rt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},xe}(z),Be=function(Ve){function xe(Le,Xe,rt,Ie){var _e=Ve.call(this,Le,Ie||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return _e.styles=[],_e.styleBoxes=[],_e.styles=Xe,_e.currentStyle=rt,_e.setCurrentStyle=_e.setCurrentStyle.bind(_e),_e}return Dt(xe,Ve),xe.prototype.getUi=function(){var Le=this,Xe=document.createElement("div");return Xe.style.display="flex",Xe.style.overflow="hidden",Xe.style.flexGrow="2",this.styles.forEach(function(rt){var Ie=document.createElement("div");Ie.style.display="flex",Ie.style.alignItems="center",Ie.style.justifyContent="space-between",Ie.style.padding="5px",Ie.style.borderWidth="2px",Ie.style.borderStyle="solid",Ie.style.overflow="hidden",Ie.style.maxWidth=100/Le.styles.length-5+"%",Ie.style.borderColor=rt===Le.currentStyle?Le.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){Le.setCurrentStyle(rt,Ie)}),Xe.appendChild(Ie);var _e=document.createElement("div");_e.style.minHeight="20px",_e.style.flexGrow="2",_e.style.overflow="hidden";var He=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Le.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(rt!==""?'stroke-dasharray="'+rt+'"':"")+` />
</svg>`;_e.innerHTML=He,Ie.appendChild(_e),Le.styleBoxes.push(Ie)}),Xe},xe.prototype.setCurrentStyle=function(Le,Xe){var rt=this;this.currentStyle=Le,this.styleBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Xe?rt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},xe}(z),Fe=function(Ve){function xe(Le,Xe,rt){var Ie=Ve.call(this,Le,Xe,rt)||this;return Ie.strokeColor=rt.defaultColor,Ie.strokeWidth=rt.defaultStrokeWidth,Ie.strokeDasharray=rt.defaultStrokeDasharray,Ie.strokePanel=new ee("Line color",rt.defaultColorSet,rt.defaultColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.strokeWidthPanel=new je("Line width",rt.defaultStrokeWidths,rt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new Be("Line style",rt.defaultStrokeDasharrays,rt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie}return Dt(xe,Ve),Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Le=Ve.prototype.getState.call(this);return Le.typeName=xe.typeName,Le},xe.typeName="FrameMarker",xe.title="Frame marker",xe.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',xe}(Pe),Ne=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"},Ae=function(Ve){function xe(Le,Xe,rt){var Ie=Ve.call(this,Le,Xe,rt)||this;return Ie.x1=0,Ie.y1=0,Ie.x2=0,Ie.y2=0,Ie.defaultLength=50,Ie.manipulationStartX=0,Ie.manipulationStartY=0,Ie.manipulationStartX1=0,Ie.manipulationStartY1=0,Ie.manipulationStartX2=0,Ie.manipulationStartY2=0,Ie.setupControlBox(),Ie}return Dt(xe,Ve),xe.prototype.ownsTarget=function(Le){return!!Ve.prototype.ownsTarget.call(this,Le)||!(!this.grip1.ownsTarget(Le)&&!this.grip2.ownsTarget(Le))},xe.prototype.pointerDown=function(Le,Xe){Ve.prototype.pointerDown.call(this,Le,Xe),this.manipulationStartX=Le.x,this.manipulationStartY=Le.y,this.state==="new"&&(this.x1=Le.x,this.y1=Le.y,this.x2=Le.x,this.y2=Le.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(Xe)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Xe)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},xe.prototype.pointerUp=function(Le){var Xe=this.state;Ve.prototype.pointerUp.call(this,Le),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(Le),this._state="select",Xe==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},xe.prototype.adjustVisual=function(){},xe.prototype.manipulate=function(Le){this.state==="creating"?this.resize(Le):this.state==="move"?(this.x1=this.manipulationStartX1+Le.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Le.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Le.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Le.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Le)},xe.prototype.resize=function(Le){switch(this.activeGrip){case this.grip1:this.x1=Le.x,this.y1=Le.y;break;case this.grip2:case void 0:this.x2=Le.x,this.y2=Le.y}this.adjustVisual(),this.adjustControlBox()},xe.prototype.select=function(){Ve.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},xe.prototype.deselect=function(){Ve.prototype.deselect.call(this),this.controlBox.style.display="none"},xe.prototype.setupControlBox=function(){this.controlBox=fe.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},xe.prototype.adjustControlBox=function(){this.positionGrips()},xe.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},xe.prototype.createGrip=function(){var Le=new le;return Le.visual.transform.baseVal.appendItem(fe.createTransform()),this.controlBox.appendChild(Le.visual),Le},xe.prototype.positionGrips=function(){var Le=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Le/2,this.y1-Le/2),this.positionGrip(this.grip2.visual,this.x2-Le/2,this.y2-Le/2)},xe.prototype.positionGrip=function(Le,Xe,rt){var Ie=Le.transform.baseVal.getItem(0);Ie.setTranslate(Xe,rt),Le.transform.baseVal.replaceItem(Ie,0)},xe.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Ve.prototype.getState.call(this))},xe.prototype.restoreState=function(Le){Ve.prototype.restoreState.call(this,Le);var Xe=Le;this.x1=Xe.x1,this.y1=Xe.y1,this.x2=Xe.x2,this.y2=Xe.y2},xe.prototype.scale=function(Le,Xe){Ve.prototype.scale.call(this,Le,Xe),this.x1=this.x1*Le,this.y1=this.y1*Xe,this.x2=this.x2*Le,this.y2=this.y2*Xe,this.adjustVisual(),this.adjustControlBox()},xe}(ae),Re=function(Ve){function xe(Le,Xe,rt){var Ie=Ve.call(this,Le,Xe,rt)||this;return Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.setStrokeColor=Ie.setStrokeColor.bind(Ie),Ie.setStrokeWidth=Ie.setStrokeWidth.bind(Ie),Ie.setStrokeDasharray=Ie.setStrokeDasharray.bind(Ie),Ie.strokeColor=rt.defaultColor,Ie.strokeWidth=rt.defaultStrokeWidth,Ie.strokeDasharray=rt.defaultStrokeDasharray,Ie.strokePanel=new ee("Line color",rt.defaultColorSet,rt.defaultColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.strokeWidthPanel=new je("Line width",rt.defaultStrokeWidths,rt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new Be("Line style",rt.defaultStrokeDasharrays,rt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie}return Dt(xe,Ve),xe.prototype.ownsTarget=function(Le){return!(!Ve.prototype.ownsTarget.call(this,Le)&&Le!==this.visual&&Le!==this.selectorLine&&Le!==this.visibleLine)},xe.prototype.createVisual=function(){this.visual=fe.createGroup(),this.selectorLine=fe.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=fe.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)},xe.prototype.pointerDown=function(Le,Xe){Ve.prototype.pointerDown.call(this,Le,Xe),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},xe.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()),fe.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),fe.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),fe.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},xe.prototype.setStrokeColor=function(Le){this.strokeColor=Le,this.adjustVisual(),this.colorChanged(Le)},xe.prototype.setStrokeWidth=function(Le){this.strokeWidth=Le,this.adjustVisual()},xe.prototype.setStrokeDasharray=function(Le){this.strokeDasharray=Le,this.adjustVisual(),this.stateChanged()},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Le=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Ve.prototype.getState.call(this));return Le.typeName=xe.typeName,Le},xe.prototype.restoreState=function(Le){Ve.prototype.restoreState.call(this,Le);var Xe=Le;this.strokeColor=Xe.strokeColor,this.strokeWidth=Xe.strokeWidth,this.strokeDasharray=Xe.strokeDasharray,this.createVisual(),this.adjustVisual()},xe.typeName="LineMarker",xe.title="Line marker",xe.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',xe}(Ae),We=function(Ve){function xe(Le,Xe,rt,Ie){var _e=Ve.call(this,Le,Ie||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return _e.fonts=[],_e.fontBoxes=[],_e.fonts=Xe,_e.currentFont=rt,_e.setCurrentFont=_e.setCurrentFont.bind(_e),_e}return Dt(xe,Ve),xe.prototype.getUi=function(){var Le=this,Xe=document.createElement("div");return Xe.style.overflow="hidden",Xe.style.flexGrow="2",this.fonts.forEach(function(rt){var Ie=document.createElement("div");Ie.style.display="inline-block",Ie.style.alignItems="center",Ie.style.justifyContent="space-between",Ie.style.padding="5px",Ie.style.borderWidth="2px",Ie.style.borderStyle="solid",Ie.style.overflow="hidden",Ie.style.maxWidth=100/Le.fonts.length-5+"%",Ie.style.borderColor=rt===Le.currentFont?Le.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){Le.setCurrentFont(rt,Ie)}),Xe.appendChild(Ie);var _e=document.createElement("div");_e.style.display="flex",_e.style.minHeight="20px",_e.style.flexGrow="2",_e.style.fontFamily=rt,_e.style.overflow="hidden";var He=document.createElement("div");He.style.whiteSpace="nowrap",He.style.overflow="hidden",He.style.textOverflow="ellipsis",He.innerHTML="The quick brown fox jumps over the lazy dog",_e.appendChild(He),Ie.appendChild(_e),Le.fontBoxes.push(Ie)}),Xe},xe.prototype.setCurrentFont=function(Le,Xe){var rt=this;this.currentFont=Le,this.fontBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Xe?rt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},xe}(z),Ye=function(Ve){function xe(Le,Xe,rt){var Ie=Ve.call(this,Le,Xe,rt)||this;return Ie.color="transparent",Ie.padding=5,Ie.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Ie.text=Ie.DEFAULT_TEXT,Ie.isMoved=!1,Ie.color=rt.defaultColor,Ie.fontFamily=rt.defaultFontFamily,Ie.defaultSize={x:100,y:30},Ie.setColor=Ie.setColor.bind(Ie),Ie.setFont=Ie.setFont.bind(Ie),Ie.renderText=Ie.renderText.bind(Ie),Ie.sizeText=Ie.sizeText.bind(Ie),Ie.textEditDivClicked=Ie.textEditDivClicked.bind(Ie),Ie.showTextEditor=Ie.showTextEditor.bind(Ie),Ie.setSize=Ie.setSize.bind(Ie),Ie.positionTextEditor=Ie.positionTextEditor.bind(Ie),Ie.colorPanel=new ee("Color",rt.defaultColorSet,rt.defaultColor),Ie.colorPanel.onColorChanged=Ie.setColor,Ie.fontFamilyPanel=new We("Font",rt.defaultFontFamilies,rt.defaultFontFamily),Ie.fontFamilyPanel.onFontChanged=Ie.setFont,Ie}return Dt(xe,Ve),xe.prototype.ownsTarget=function(Le){if(Ve.prototype.ownsTarget.call(this,Le)||Le===this.visual||Le===this.textElement||Le===this.bgRectangle)return!0;var Xe=!1;return this.textElement.childNodes.forEach(function(rt){rt===Le&&(Xe=!0)}),Xe},xe.prototype.createVisual=function(){this.visual=fe.createGroup(),this.bgRectangle=fe.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=fe.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(fe.createTransform()),this.textElement.transform.baseVal.appendItem(fe.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},xe.prototype.pointerDown=function(Le,Xe){Ve.prototype.pointerDown.call(this,Le,Xe),this.isMoved=!1,this.pointerDownPoint=Le,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Le),this._state="creating")},xe.prototype.renderText=function(){var Le=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(Xe){Le.textElement.appendChild(fe.createTSpan(Xe.trim()===""?" ":Xe.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},xe.prototype.getTextScale=function(){var Le=this.textElement.getBBox(),Xe=1;if(Le.width>0&&Le.height>0){var rt=(1*this.width-this.width*this.padding*2/100)/Le.width,Ie=(1*this.height-this.height*this.padding*2/100)/Le.height;Xe=Math.min(rt,Ie)}return Xe},xe.prototype.getTextPosition=function(Le){var Xe=this.textElement.getBBox(),rt=0,Ie=0;return Xe.width>0&&Xe.height>0&&(rt=(this.width-Xe.width*Le)/2,Ie=this.height/2-Xe.height*Le/2),{x:rt,y:Ie}},xe.prototype.sizeText=function(){var Le=this.textElement.getBBox(),Xe=this.getTextScale(),rt=this.getTextPosition(Xe);rt.y-=Le.y*Xe,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+rt.x+"px, "+rt.y+"px) scale("+Xe+", "+Xe+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(rt.x,rt.y),this.textElement.transform.baseVal.getItem(1).setScale(Xe,Xe))},xe.prototype.manipulate=function(Le){Ve.prototype.manipulate.call(this,Le),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Le.x-this.pointerDownPoint.x)>5||Math.abs(Le.y-this.pointerDownPoint.y)>5)},xe.prototype.resize=function(Le){Ve.prototype.resize.call(this,Le),this.isMoved=!0,this.setSize(),this.sizeText()},xe.prototype.setSize=function(){Ve.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(fe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),fe.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},xe.prototype.pointerUp=function(Le){var Xe=this.state;Xe==="creating"&&(this._suppressMarkerCreateEvent=!0),Ve.prototype.pointerUp.call(this,Le),this.setSize(),(Xe==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},xe.prototype.showTextEditor=function(){var Le=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(Xe){Xe.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Xe=Number.parseFloat(Le.textEditor.style.fontSize);Le.textEditor.clientWidth>=Number.parseInt(Le.textEditor.style.maxWidth)&&Xe>.9;)Xe-=.1,Le.textEditor.style.fontSize=Math.max(Xe,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Xe){Xe.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Xe){if(Xe.clipboardData){var rt=Xe.clipboardData.getData("text"),Ie=window.getSelection();if(!Ie.rangeCount)return!1;Ie.deleteFromDocument(),Ie.getRangeAt(0).insertNode(document.createTextNode(rt)),Xe.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Le.textEditDivClicked(Le.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},xe.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Le=this.getTextScale(),Xe=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),rt=this.textElement.getBBox(),Ie={x:rt.width*Le,y:rt.height*Le};Xe.x-=Ie.x/2,Xe.y-=Ie.y/2,this.textEditor.style.top=Xe.y+"px",this.textEditor.style.left=Xe.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Xe.x+"px",this.textEditor.style.fontSize=Math.max(16*Le,12)+"px",this.textElement.style.display="none"}},xe.prototype.textEditDivClicked=function(Le){this.text=Le.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},xe.prototype.select=function(){Ve.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},xe.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Ve.prototype.deselect.call(this)},xe.prototype.dblClick=function(Le,Xe){Ve.prototype.dblClick.call(this,Le,Xe),this.showTextEditor()},xe.prototype.setColor=function(Le){this.textElement&&fe.setAttributes(this.textElement,[["fill",Le]]),this.color=Le,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Le)},xe.prototype.setFont=function(Le){this.textElement&&fe.setAttributes(this.textElement,[["font-family",Le]]),this.fontFamily=Le,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},xe.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},xe.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Le=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Ve.prototype.getState.call(this));return Le.typeName=xe.typeName,Le},xe.prototype.restoreState=function(Le){var Xe=Le;this.color=Xe.color,this.fontFamily=Xe.fontFamily,this.padding=Xe.padding,this.text=Xe.text,this.createVisual(),Ve.prototype.restoreState.call(this,Le),this.setSize()},xe.prototype.scale=function(Le,Xe){Ve.prototype.scale.call(this,Le,Xe),this.setSize(),this.sizeText(),this.positionTextEditor()},xe.typeName="TextMarker",xe.title="Text marker",xe.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>',xe}(ge),Ue=function(Ve){function xe(Le,Xe,rt){var Ie=Ve.call(this,Le,Xe,rt)||this;return Ie.color="transparent",Ie.lineWidth=3,Ie.drawing=!1,Ie.pixelRatio=1,Ie.color=rt.defaultColor,Ie.lineWidth=rt.defaultStrokeWidth,Ie.pixelRatio=rt.freehandPixelRatio,Ie.setColor=Ie.setColor.bind(Ie),Ie.addCanvas=Ie.addCanvas.bind(Ie),Ie.finishCreation=Ie.finishCreation.bind(Ie),Ie.setLineWidth=Ie.setLineWidth.bind(Ie),Ie.colorPanel=new ee("Color",rt.defaultColorSet,rt.defaultColor),Ie.colorPanel.onColorChanged=Ie.setColor,Ie.lineWidthPanel=new je("Line width",rt.defaultStrokeWidths,rt.defaultStrokeWidth),Ie.lineWidthPanel.onWidthChanged=Ie.setLineWidth,Ie}return Dt(xe,Ve),xe.prototype.ownsTarget=function(Le){return!(!Ve.prototype.ownsTarget.call(this,Le)&&Le!==this.visual&&Le!==this.drawingImage)},xe.prototype.createVisual=function(){this.visual=fe.createGroup(),this.drawingImage=fe.createImage(),this.visual.appendChild(this.drawingImage);var Le=fe.createTransform();this.visual.transform.baseVal.appendItem(Le),this.addMarkerVisualToContainer(this.visual)},xe.prototype.pointerDown=function(Le,Xe){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(Le.x,Le.y),this.drawing=!0):Ve.prototype.pointerDown.call(this,Le,Xe)},xe.prototype.manipulate=function(Le){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Le.x,Le.y),this.canvasContext.stroke()):Ve.prototype.manipulate.call(this,Le)},xe.prototype.resize=function(Le){Ve.prototype.resize.call(this,Le),fe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),fe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},xe.prototype.pointerUp=function(Le){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Ve.prototype.pointerUp.call(this,Le)},xe.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)},xe.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Ve.prototype.select.call(this)},xe.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Ve.prototype.deselect.call(this)},xe.prototype.finishCreation=function(){for(var Le=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Xe=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],rt=Xe[0],Ie=Xe[1],_e=Xe[2],He=Xe[3],Qe=!1,ct=0;ct<this.canvasElement.height;ct++)for(var at=0;at<this.canvasElement.width;at++)Le.data[ct*this.canvasElement.width*4+4*at+3]>0&&(Qe=!0,ct<Ie&&(Ie=ct),at<rt&&(rt=at),ct>He&&(He=ct),at>_e&&(_e=at));if(Qe){this.left=rt/this.pixelRatio,this.top=Ie/this.pixelRatio,this.width=(_e-rt)/this.pixelRatio,this.height=(He-Ie)/this.pixelRatio;var At=document.createElement("canvas");At.width=_e-rt,At.height=He-Ie,At.getContext("2d").putImageData(this.canvasContext.getImageData(rt,Ie,_e-rt,He-Ie),0,0),this.drawingImgUrl=At.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},xe.prototype.setDrawingImage=function(){fe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),fe.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},xe.prototype.setColor=function(Le){this.color=Le,this.colorChanged(Le)},xe.prototype.setLineWidth=function(Le){this.lineWidth=Le},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Le=Object.assign({drawingImgUrl:this.drawingImgUrl},Ve.prototype.getState.call(this));return Le.typeName=xe.typeName,Le},xe.prototype.restoreState=function(Le){this.createVisual(),Ve.prototype.restoreState.call(this,Le),this.drawingImgUrl=Le.drawingImgUrl,this.setDrawingImage()},xe.prototype.scale=function(Le,Xe){Ve.prototype.scale.call(this,Le,Xe),this.setDrawingImage()},xe.typeName="FreehandMarker",xe.title="Freehand marker",xe.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>',xe}(ge),Ke=function(Ve){function xe(Le,Xe,rt){var Ie=Ve.call(this,Le,rt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Ie.typeBoxes=[],Ie.currentType=Xe,Ie.setCurrentType=Ie.setCurrentType.bind(Ie),Ie}return Dt(xe,Ve),xe.prototype.getUi=function(){var Le=this,Xe=document.createElement("div");Xe.style.display="flex",Xe.style.overflow="hidden",Xe.style.flexGrow="2";for(var rt=function(He){var Qe="both";switch(He){case 0:Qe="both";break;case 1:Qe="start";break;case 2:Qe="end";break;case 3:Qe="none"}var ct=document.createElement("div");if(ct.style.display="flex",ct.style.flexGrow="2",ct.style.alignItems="center",ct.style.justifyContent="space-between",ct.style.padding="5px",ct.style.borderWidth="2px",ct.style.borderStyle="solid",ct.style.borderColor=Qe===Ie.currentType?Ie.uiStyleSettings.toolboxAccentColor:"transparent",ct.addEventListener("click",function(){Le.setCurrentType(Qe,ct)}),Xe.appendChild(ct),Qe==="both"||Qe==="start"){var at=document.createElement("div");at.style.display="flex",at.style.alignItems="center",at.style.minHeight="20px",at.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="`+(Ie.uiStyleSettings!==void 0?Ie.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,at.style.marginLeft="5px",ct.appendChild(at)}var At=document.createElement("div");At.style.display="flex",At.style.alignItems="center",At.style.minHeight="20px",At.style.flexGrow="2";var Lt=document.createElement("hr");if(Lt.style.minWidth="20px",Lt.style.border="0px",Lt.style.borderTop="3px solid "+(Ie.uiStyleSettings!==void 0?Ie.uiStyleSettings.toolboxColor:"#eeeeee"),Lt.style.flexGrow="2",At.appendChild(Lt),ct.appendChild(At),Qe==="both"||Qe==="end"){var It=document.createElement("div");It.style.display="flex",It.style.alignItems="center",It.style.minHeight="20px",It.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="`+(Ie.uiStyleSettings!==void 0?Ie.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,It.style.marginRight="5px",ct.appendChild(It)}Ie.typeBoxes.push(ct)},Ie=this,_e=0;_e<4;_e++)rt(_e);return Xe},xe.prototype.setCurrentType=function(Le,Xe){var rt=this;this.currentType=Le,this.typeBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Xe?rt.uiStyleSettings!==void 0?rt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},xe}(z),ot=function(Ve){function xe(Le,Xe,rt){var Ie=Ve.call(this,Le,Xe,rt)||this;return Ie.arrowType="end",Ie.arrowBaseHeight=10,Ie.arrowBaseWidth=10,Ie.getArrowPoints=Ie.getArrowPoints.bind(Ie),Ie.setArrowType=Ie.setArrowType.bind(Ie),Ie.arrowTypePanel=new Ke("Arrow type","end"),Ie.arrowTypePanel.onArrowTypeChanged=Ie.setArrowType,Ie}return Dt(xe,Ve),xe.prototype.ownsTarget=function(Le){return!(!Ve.prototype.ownsTarget.call(this,Le)&&Le!==this.arrow1&&Le!==this.arrow2)},xe.prototype.getArrowPoints=function(Le,Xe){var rt=this.arrowBaseWidth+2*this.strokeWidth,Ie=this.arrowBaseHeight+2*this.strokeWidth;return Le-rt/2+","+(Xe+Ie/2)+" "+Le+","+(Xe-Ie/2)+" "+(Le+rt/2)+","+(Xe+Ie/2)},xe.prototype.createTips=function(){this.arrow1=fe.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(fe.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=fe.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(fe.createTransform()),this.visual.appendChild(this.arrow2)},xe.prototype.pointerDown=function(Le,Xe){Ve.prototype.pointerDown.call(this,Le,Xe),this.state==="creating"&&this.createTips()},xe.prototype.adjustVisual=function(){if(Ve.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",fe.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),fe.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Le=0;Math.abs(this.x1-this.x2)>.1&&(Le=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Xe=this.arrow1.transform.baseVal.getItem(0);Xe.setRotate(Le,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Xe,0);var rt=this.arrow2.transform.baseVal.getItem(0);rt.setRotate(Le+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(rt,0)}},xe.prototype.setArrowType=function(Le){this.arrowType=Le,this.adjustVisual(),this.stateChanged()},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Le=Object.assign({arrowType:this.arrowType},Ve.prototype.getState.call(this));return Le.typeName=xe.typeName,Le},xe.prototype.restoreState=function(Le){Ve.prototype.restoreState.call(this,Le);var Xe=Le;this.arrowType=Xe.arrowType,this.createTips(),this.adjustVisual()},xe.typeName="ArrowMarker",xe.title="Arrow marker",xe.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',xe}(Re),ut=function(Ve){function xe(Le,Xe,rt){var Ie=Ve.call(this,Le,Xe,rt)||this;return Ie.fillColor=rt.defaultFillColor,Ie.strokeWidth=0,Ie.fillPanel=new ee("Color",rt.defaultColorSet,rt.defaultFillColor),Ie.fillPanel.onColorChanged=Ie.setFillColor,Ie}return Dt(xe,Ve),Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Le=Ve.prototype.getState.call(this);return Le.typeName=xe.typeName,Le},xe.typeName="CoverMarker",xe.title="Cover marker",xe.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',xe}(Pe),ft=function(Ve){function xe(Le,Xe,rt,Ie){var _e=Ve.call(this,Le,Ie||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return _e.opacities=[],_e.opacityBoxes=[],_e.opacities=Xe,_e.currentOpacity=rt,_e.setCurrentOpacity=_e.setCurrentOpacity.bind(_e),_e}return Dt(xe,Ve),xe.prototype.getUi=function(){var Le=this,Xe=document.createElement("div");return Xe.style.display="flex",Xe.style.overflow="hidden",Xe.style.flexGrow="2",Xe.style.justifyContent="space-between",this.opacities.forEach(function(rt){var Ie=document.createElement("div");Ie.style.display="flex",Ie.style.alignItems="center",Ie.style.justifyContent="center",Ie.style.padding="5px",Ie.style.borderWidth="2px",Ie.style.borderStyle="solid",Ie.style.borderColor=rt===Le.currentOpacity?Le.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){Le.setCurrentOpacity(rt,Ie)}),Xe.appendChild(Ie);var _e=document.createElement("div");_e.innerText=100*rt+"%",Ie.appendChild(_e),Le.opacityBoxes.push(Ie)}),Xe},xe.prototype.setCurrentOpacity=function(Le,Xe){var rt=this;this.currentOpacity=Le,this.opacityBoxes.forEach(function(Ie){Ie.style.borderColor=Ie===Xe?rt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},xe}(z),wt=function(Ve){function xe(Le,Xe,rt){var Ie=Ve.call(this,Le,Xe,rt)||this;return Ie.setOpacity=Ie.setOpacity.bind(Ie),Ie.fillColor=rt.defaultHighlightColor,Ie.strokeWidth=0,Ie.opacity=rt.defaultHighlightOpacity,Ie.fillPanel=new ee("Color",rt.defaultColorSet,Ie.fillColor),Ie.fillPanel.onColorChanged=Ie.setFillColor,Ie.opacityPanel=new ft("Opacity",rt.defaultOpacitySteps,Ie.opacity),Ie.opacityPanel.onOpacityChanged=Ie.setOpacity,Ie}return Dt(xe,Ve),xe.prototype.setOpacity=function(Le){this.opacity=Le,this.visual&&fe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Le=Ve.prototype.getState.call(this);return Le.typeName=xe.typeName,Le},xe.typeName="HighlightMarker",xe.title="Highlight marker",xe.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>',xe}(ut),Je='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',nt='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',xt=function(Ve){function xe(Le,Xe,rt){var Ie=Ve.call(this,Le,Xe,rt)||this;return Ie.bgColor="transparent",Ie.tipPosition={x:0,y:0},Ie.tipBase1Position={x:0,y:0},Ie.tipBase2Position={x:0,y:0},Ie.tipMoving=!1,Ie.color=rt.defaultStrokeColor,Ie.bgColor=rt.defaultFillColor,Ie.fontFamily=rt.defaultFontFamily,Ie.defaultSize={x:100,y:30},Ie.setBgColor=Ie.setBgColor.bind(Ie),Ie.getTipPoints=Ie.getTipPoints.bind(Ie),Ie.positionTip=Ie.positionTip.bind(Ie),Ie.setTipPoints=Ie.setTipPoints.bind(Ie),Ie.colorPanel=new ee("Text color",rt.defaultColorSet,Ie.color,Je),Ie.colorPanel.onColorChanged=Ie.setColor,Ie.bgColorPanel=new ee("Fill color",rt.defaultColorSet,Ie.bgColor,nt),Ie.bgColorPanel.onColorChanged=Ie.setBgColor,Ie.fontFamilyPanel=new We("Font",rt.defaultFontFamilies,rt.defaultFontFamily),Ie.fontFamilyPanel.onFontChanged=Ie.setFont,Ie.tipGrip=new le,Ie.tipGrip.visual.transform.baseVal.appendItem(fe.createTransform()),Ie.controlBox.appendChild(Ie.tipGrip.visual),Ie}return Dt(xe,Ve),xe.prototype.ownsTarget=function(Le){return Ve.prototype.ownsTarget.call(this,Le)||this.tipGrip.ownsTarget(Le)||this.tip===Le},xe.prototype.createTip=function(){fe.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=fe.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},xe.prototype.pointerDown=function(Le,Xe){this.state==="new"&&Ve.prototype.pointerDown.call(this,Le,Xe),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Xe)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Ve.prototype.pointerDown.call(this,Le,Xe)},xe.prototype.pointerUp=function(Le){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Ve.prototype.pointerUp.call(this,Le);else{var Xe=this.state==="creating";Ve.prototype.pointerUp.call(this,Le),this.setTipPoints(Xe),this.positionTip()}},xe.prototype.manipulate=function(Le){if(this.tipMoving){var Xe=this.unrotatePoint(Le);this.tipPosition={x:Xe.x-this.manipulationStartLeft,y:Xe.y-this.manipulationStartTop},this.positionTip()}else Ve.prototype.manipulate.call(this,Le)},xe.prototype.setBgColor=function(Le){this.bgRectangle&&this.tip&&(fe.setAttributes(this.bgRectangle,[["fill",Le]]),fe.setAttributes(this.tip,[["fill",Le]])),this.bgColor=Le,this.fillColorChanged(Le)},xe.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},xe.prototype.setTipPoints=function(Le){Le===void 0&&(Le=!1);var Xe=Math.min(this.height/2,15),rt=this.height/5;Le&&(this.tipPosition={x:Xe+rt/2,y:this.height+20});var Ie=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Ie<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(rt=this.width/5,Xe=Math.min(this.width/2,15),this.tipBase1Position={x:Xe,y:0},this.tipBase2Position={x:Xe+rt,y:0}):(this.tipBase1Position={x:0,y:Xe},this.tipBase2Position={x:0,y:Xe+rt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Ie<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(rt=this.width/5,Xe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Xe-rt,y:0},this.tipBase2Position={x:this.width-Xe,y:0}):(this.tipBase1Position={x:this.width,y:Xe},this.tipBase2Position={x:this.width,y:Xe+rt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Ie<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(rt=this.width/5,Xe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Xe-rt,y:this.height},this.tipBase2Position={x:this.width-Xe,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Xe-rt},this.tipBase2Position={x:this.width,y:this.height-Xe}):Ie<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(rt=this.width/5,Xe=Math.min(this.width/2,15),this.tipBase1Position={x:Xe,y:this.height},this.tipBase2Position={x:Xe+rt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Xe},this.tipBase2Position={x:0,y:this.height-Xe-rt})},xe.prototype.resize=function(Le){Ve.prototype.resize.call(this,Le),this.positionTip()},xe.prototype.positionTip=function(){fe.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Le=this.tipGrip.visual.transform.baseVal.getItem(0);Le.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Le,0)},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),xe.prototype.select=function(){this.positionTip(),Ve.prototype.select.call(this)},xe.prototype.getState=function(){var Le=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Ve.prototype.getState.call(this));return Le.typeName=xe.typeName,Le},xe.prototype.restoreState=function(Le){var Xe=Le;this.bgColor=Xe.bgColor,this.tipPosition=Xe.tipPosition,Ve.prototype.restoreState.call(this,Le),this.createTip(),this.setTipPoints()},xe.prototype.scale=function(Le,Xe){Ve.prototype.scale.call(this,Le,Xe),this.tipPosition={x:this.tipPosition.x*Le,y:this.tipPosition.y*Xe},this.positionTip()},xe.typeName="CalloutMarker",xe.title="Callout marker",xe.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>',xe}(Ye),Pt=function(Ve){function xe(Le,Xe,rt){var Ie=Ve.call(this,Le,Xe,rt)||this;return Ie.fillColor="transparent",Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.opacity=1,Ie.strokeColor=rt.defaultColor,Ie.strokeWidth=rt.defaultStrokeWidth,Ie.strokeDasharray=rt.defaultStrokeDasharray,Ie.fillColor=rt.defaultFillColor,Ie.setStrokeColor=Ie.setStrokeColor.bind(Ie),Ie.setFillColor=Ie.setFillColor.bind(Ie),Ie.setStrokeWidth=Ie.setStrokeWidth.bind(Ie),Ie.setStrokeDasharray=Ie.setStrokeDasharray.bind(Ie),Ie.setOpacity=Ie.setOpacity.bind(Ie),Ie.createVisual=Ie.createVisual.bind(Ie),Ie.strokePanel=new ee("Line color",De(rt.defaultColorSet,["transparent"]),rt.defaultColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.fillPanel=new ee("Fill color",De(rt.defaultColorSet,["transparent"]),Ie.fillColor,nt),Ie.fillPanel.onColorChanged=Ie.setFillColor,Ie.strokeWidthPanel=new je("Line width",rt.defaultStrokeWidths,rt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new Be("Line style",rt.defaultStrokeDasharrays,rt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie.opacityPanel=new ft("Opacity",rt.defaultOpacitySteps,Ie.opacity),Ie.opacityPanel.onOpacityChanged=Ie.setOpacity,Ie}return Dt(xe,Ve),xe.prototype.ownsTarget=function(Le){return!(!Ve.prototype.ownsTarget.call(this,Le)&&Le!==this.visual)},xe.prototype.createVisual=function(){this.visual=fe.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)},xe.prototype.pointerDown=function(Le,Xe){Ve.prototype.pointerDown.call(this,Le,Xe),this.state==="new"&&(this.createVisual(),this.moveVisual(Le),this._state="creating")},xe.prototype.manipulate=function(Le){Ve.prototype.manipulate.call(this,Le)},xe.prototype.resize=function(Le){Ve.prototype.resize.call(this,Le),this.setSize()},xe.prototype.setSize=function(){Ve.prototype.setSize.call(this),fe.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},xe.prototype.pointerUp=function(Le){Ve.prototype.pointerUp.call(this,Le),this.setSize()},xe.prototype.setStrokeColor=function(Le){this.strokeColor=Le,this.visual&&fe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Le),this.stateChanged()},xe.prototype.setFillColor=function(Le){this.fillColor=Le,this.visual&&fe.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Le),this.stateChanged()},xe.prototype.setStrokeWidth=function(Le){this.strokeWidth=Le,this.visual&&fe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},xe.prototype.setStrokeDasharray=function(Le){this.strokeDasharray=Le,this.visual&&fe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},xe.prototype.setOpacity=function(Le){this.opacity=Le,this.visual&&fe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Le=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Ve.prototype.getState.call(this));return Le.typeName=xe.typeName,Le},xe.prototype.restoreState=function(Le){var Xe=Le;this.fillColor=Xe.fillColor,this.strokeColor=Xe.strokeColor,this.strokeWidth=Xe.strokeWidth,this.strokeDasharray=Xe.strokeDasharray,this.opacity=Xe.opacity,this.createVisual(),Ve.prototype.restoreState.call(this,Le),this.setSize()},xe.prototype.scale=function(Le,Xe){Ve.prototype.scale.call(this,Le,Xe),this.setSize()},xe.typeName="EllipseMarker",xe.title="Ellipse marker",xe.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>',xe}(ge),Ct=function(Ve){function xe(Le,Xe,rt){return Ve.call(this,Le,Xe,rt)||this}return Dt(xe,Ve),Object.defineProperty(xe.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),xe.prototype.ownsTarget=function(Le){return!(!Ve.prototype.ownsTarget.call(this,Le)&&Le!==this.tip1&&Le!==this.tip2)},xe.prototype.createTips=function(){this.tip1=fe.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(fe.createTransform()),this.visual.appendChild(this.tip1),this.tip2=fe.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(fe.createTransform()),this.visual.appendChild(this.tip2)},xe.prototype.pointerDown=function(Le,Xe){Ve.prototype.pointerDown.call(this,Le,Xe),this.state==="creating"&&this.createTips()},xe.prototype.adjustVisual=function(){if(Ve.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(fe.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()]]),fe.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 Le=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Xe=this.tip1.transform.baseVal.getItem(0);Xe.setRotate(Le,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Xe,0);var rt=this.tip2.transform.baseVal.getItem(0);rt.setRotate(Le+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(rt,0)}},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Le=Ve.prototype.getState.call(this);return Le.typeName=xe.typeName,Le},xe.prototype.restoreState=function(Le){Ve.prototype.restoreState.call(this,Le),this.createTips(),this.adjustVisual()},xe.typeName="MeasurementMarker",xe.title="Measurement marker",xe.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>',xe}(Re),gt=function(Ve){function xe(Le,Xe,rt){var Ie=Ve.call(this,Le,Xe,rt)||this;return Ie.strokePanel.colors=rt.defaultColorSet,Ie.fillColor="transparent",Ie}return Dt(xe,Ve),Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Le=Ve.prototype.getState.call(this);return Le.typeName=xe.typeName,Le},xe.typeName="EllipseFrameMarker",xe.title="Ellipse frame marker",xe.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>',xe}(Pt),dt=function(){function Ve(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Ve.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Ve.prototype.addUndoStep=function(xe){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(xe)||(this.undoStack.push(xe),JSON.stringify(this.lastRedoStep)!==JSON.stringify(xe)&&this.redoStack.splice(0,this.redoStack.length))},Ve.prototype.replaceLastUndoStep=function(xe){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=xe)},Ve.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Ve.prototype.undo=function(){if(this.undoStack.length>1){var xe=this.undoStack.pop();return xe!==void 0&&this.redoStack.push(xe),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Ve.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Ve}(),ht=function(Ve){function xe(Le,Xe,rt){var Ie=Ve.call(this,Le,Xe,rt)||this;return Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.curveX=0,Ie.curveY=0,Ie.manipulationStartCurveX=0,Ie.manipulationStartCurveY=0,Ie.setStrokeColor=Ie.setStrokeColor.bind(Ie),Ie.setStrokeWidth=Ie.setStrokeWidth.bind(Ie),Ie.setStrokeDasharray=Ie.setStrokeDasharray.bind(Ie),Ie.positionGrips=Ie.positionGrips.bind(Ie),Ie.addControlGrips=Ie.addControlGrips.bind(Ie),Ie.adjustVisual=Ie.adjustVisual.bind(Ie),Ie.setupControlBox=Ie.setupControlBox.bind(Ie),Ie.resize=Ie.resize.bind(Ie),Ie.strokeColor=rt.defaultColor,Ie.strokeWidth=rt.defaultStrokeWidth,Ie.strokeDasharray=rt.defaultStrokeDasharray,Ie.strokePanel=new ee("Line color",rt.defaultColorSet,rt.defaultColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.strokeWidthPanel=new je("Line width",rt.defaultStrokeWidths,rt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new Be("Line style",rt.defaultStrokeDasharrays,rt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie}return Dt(xe,Ve),xe.prototype.ownsTarget=function(Le){return!(!Ve.prototype.ownsTarget.call(this,Le)&&Le!==this.visual&&Le!==this.selectorCurve&&Le!==this.visibleCurve&&!this.curveGrip.ownsTarget(Le))},xe.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},xe.prototype.createVisual=function(){this.visual=fe.createGroup(),this.selectorCurve=fe.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=fe.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)},xe.prototype.pointerDown=function(Le,Xe){Ve.prototype.pointerDown.call(this,Le,Xe),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Le.x,this.curveY=Le.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Xe)&&(this.activeGrip=this.curveGrip,this._state="resize")},xe.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),fe.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),fe.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),fe.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},xe.prototype.setupControlBox=function(){Ve.prototype.setupControlBox.call(this),this.curveControlLine1=fe.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=fe.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)},xe.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Ve.prototype.addControlGrips.call(this)},xe.prototype.positionGrips=function(){Ve.prototype.positionGrips.call(this);var Le=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Le/2,this.curveY-Le/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()))},xe.prototype.manipulate=function(Le){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Le.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Le.y-this.manipulationStartY),Ve.prototype.manipulate.call(this,Le)},xe.prototype.resize=function(Le){this.activeGrip===this.curveGrip&&(this.curveX=Le.x,this.curveY=Le.y),Ve.prototype.resize.call(this,Le),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},xe.prototype.setStrokeColor=function(Le){this.strokeColor=Le,this.adjustVisual(),this.colorChanged(Le)},xe.prototype.setStrokeWidth=function(Le){this.strokeWidth=Le,this.adjustVisual()},xe.prototype.setStrokeDasharray=function(Le){this.strokeDasharray=Le,this.adjustVisual()},xe.prototype.scale=function(Le,Xe){this.curveX=this.curveX*Le,this.curveY=this.curveY*Xe,Ve.prototype.scale.call(this,Le,Xe)},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Le=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Ve.prototype.getState.call(this));return Le.typeName=xe.typeName,Le},xe.prototype.restoreState=function(Le){Ve.prototype.restoreState.call(this,Le);var Xe=Le;this.strokeColor=Xe.strokeColor,this.strokeWidth=Xe.strokeWidth,this.strokeDasharray=Xe.strokeDasharray,this.curveX=Xe.curveX,this.curveY=Xe.curveY,this.createVisual(),this.adjustVisual()},xe.typeName="CurveMarker",xe.title="Curve marker",xe.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>',xe}(Ae),Et=function(Ve){function xe(Le,Xe,rt){var Ie=Ve.call(this,Le,Xe,rt)||this;return Ie.fillColor="transparent",Ie.strokeColor="transparent",Ie.strokeWidth=0,Ie.strokeDasharray="",Ie.textColor="transparent",Ie.fontSize="1rem",Ie.isMoved=!1,Ie.captionText="Caption",Ie.PADDING=5,Ie.captionBoxWidth=0,Ie.captionBoxHeight=0,Ie.strokeColor=rt.defaultColor,Ie.strokeWidth=rt.defaultStrokeWidth,Ie.strokeDasharray=rt.defaultStrokeDasharray,Ie.fillColor=rt.defaultFillColor,Ie.textColor=rt.defaultStrokeColor,Ie.fontFamily=rt.defaultFontFamily,Ie.fontSize=rt.defaultCaptionFontSize,Ie.captionText=rt.defaultCaptionText,Ie.setStrokeColor=Ie.setStrokeColor.bind(Ie),Ie.setFillColor=Ie.setFillColor.bind(Ie),Ie.setStrokeWidth=Ie.setStrokeWidth.bind(Ie),Ie.setStrokeDasharray=Ie.setStrokeDasharray.bind(Ie),Ie.createVisual=Ie.createVisual.bind(Ie),Ie.sizeCaption=Ie.sizeCaption.bind(Ie),Ie.setCaptionText=Ie.setCaptionText.bind(Ie),Ie.showTextEditor=Ie.showTextEditor.bind(Ie),Ie.positionTextEditor=Ie.positionTextEditor.bind(Ie),Ie.finishTextEditing=Ie.finishTextEditing.bind(Ie),Ie.setFont=Ie.setFont.bind(Ie),Ie.setTextColor=Ie.setTextColor.bind(Ie),Ie.strokePanel=new ee("Line color",De(rt.defaultColorSet,["transparent"]),Ie.strokeColor),Ie.strokePanel.onColorChanged=Ie.setStrokeColor,Ie.fillPanel=new ee("Fill color",De(rt.defaultColorSet,["transparent"]),Ie.fillColor,nt),Ie.fillPanel.onColorChanged=Ie.setFillColor,Ie.strokeWidthPanel=new je("Line width",rt.defaultStrokeWidths,rt.defaultStrokeWidth),Ie.strokeWidthPanel.onWidthChanged=Ie.setStrokeWidth,Ie.strokeStylePanel=new Be("Line style",rt.defaultStrokeDasharrays,rt.defaultStrokeDasharray),Ie.strokeStylePanel.onStyleChanged=Ie.setStrokeDasharray,Ie.fontFamilyPanel=new We("Font",rt.defaultFontFamilies,rt.defaultFontFamily),Ie.fontFamilyPanel.onFontChanged=Ie.setFont,Ie.textColorPanel=new ee("Text color",rt.defaultColorSet,Ie.textColor,Je),Ie.textColorPanel.onColorChanged=Ie.setTextColor,Ie}return Dt(xe,Ve),xe.prototype.ownsTarget=function(Le){return!(!Ve.prototype.ownsTarget.call(this,Le)&&Le!==this.visual&&Le!==this.frame&&Le!==this.captionBg&&Le!==this.captionElement)},xe.prototype.createVisual=function(){this.visual=fe.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=fe.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=fe.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=fe.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()},xe.prototype.setCaptionText=function(Le){this.captionText=Le,this.captionElement.textContent=this.captionText,this.sizeCaption()},xe.prototype.pointerDown=function(Le,Xe){Ve.prototype.pointerDown.call(this,Le,Xe),this.isMoved=!1,this.pointerDownPoint=Le,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Le),this._state="creating")},xe.prototype.manipulate=function(Le){Ve.prototype.manipulate.call(this,Le),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Le.x-this.pointerDownPoint.x)>5||Math.abs(Le.y-this.pointerDownPoint.y)>5)},xe.prototype.resize=function(Le){Ve.prototype.resize.call(this,Le),this.setSize()},xe.prototype.sizeCaption=function(){var Le=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Le.width+2*this.PADDING,this.captionBoxHeight=Le.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),fe.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')"]]),fe.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')"]])},xe.prototype.showTextEditor=function(){var Le=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(Xe){Xe.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Xe){Xe.key==="Enter"&&Le.finishTextEditing(Le.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Xe){Xe.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Le.finishTextEditing(Le.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Le.finishTextEditing(Le.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},xe.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"))},xe.prototype.finishTextEditing=function(Le){this.setCaptionText(Le.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},xe.prototype.setFont=function(Le){this.captionElement&&fe.setAttributes(this.captionElement,[["font-family",Le]]),this.fontFamily=Le,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},xe.prototype.setTextColor=function(Le){this.captionElement&&fe.setAttributes(this.captionElement,[["fill",Le]]),this.textColor=Le,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},xe.prototype.setSize=function(){Ve.prototype.setSize.call(this),fe.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},xe.prototype.pointerUp=function(Le){Ve.prototype.pointerUp.call(this,Le),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},xe.prototype.dblClick=function(Le,Xe){Ve.prototype.dblClick.call(this,Le,Xe),this.showTextEditor()},xe.prototype.setStrokeColor=function(Le){this.strokeColor=Le,this.frame&&fe.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Le),this.stateChanged()},xe.prototype.setFillColor=function(Le){this.fillColor=Le,this.captionBg&&fe.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Le),this.stateChanged()},xe.prototype.setStrokeWidth=function(Le){this.strokeWidth=Le,this.frame&&fe.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},xe.prototype.setStrokeDasharray=function(Le){this.strokeDasharray=Le,this.frame&&fe.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(xe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),xe.prototype.getState=function(){var Le=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},Ve.prototype.getState.call(this));return Le.typeName=this.typeName,Le},xe.prototype.restoreState=function(Le){var Xe=Le;this.fillColor=Xe.fillColor,this.strokeColor=Xe.strokeColor,this.strokeWidth=Xe.strokeWidth,this.strokeDasharray=Xe.strokeDasharray,this.textColor=Xe.textColor,this.fontFamily=Xe.fontFamily,this.captionText=Xe.captionText,this.fontSize=Xe.fontSize,this.createVisual(),Ve.prototype.restoreState.call(this,Le),this.setSize()},xe.prototype.scale=function(Le,Xe){Ve.prototype.scale.call(this,Le,Xe),this.setSize()},xe.typeName="CaptionFrameMarker",xe.title="Caption frame marker",xe.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>',xe}(ge),St=function(){function Ve(xe,Le){Le===void 0&&(Le=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=xe,this.cancelable=Le}return Object.defineProperty(Ve.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Ve.prototype.preventDefault=function(){this._defaultPrevented=!0},Ve}(),Ft=function(Ve){function xe(Le,Xe,rt){var Ie=Ve.call(this,Le,!1)||this;return Ie.dataUrl=Xe,Ie.state=rt,Ie}return Dt(xe,Ve),xe}(St),mt=function(Ve){function xe(Le,Xe,rt){rt===void 0&&(rt=!1);var Ie=Ve.call(this,Le,rt)||this;return Ie.marker=Xe,Ie}return Dt(xe,Ve),xe}(St),yt=function(){function Ve(){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 Ve.prototype.addEventListener=function(xe,Le){this[xe].push(Le)},Ve.prototype.removeEventListener=function(xe,Le){var Xe=this[xe].indexOf(Le);Xe>-1&&this[xe].splice(Xe,1)},Ve}(),tt=function(){function Ve(xe){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ne,this._isOpen=!1,this.undoRedoManager=new dt,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new yt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Ve.instanceCounter++,this.styles=new Se(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=xe,this.targetRoot=document.body,this.width=xe.clientWidth,this.height=xe.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(Ve.prototype,"ALL_MARKER_TYPES",{get:function(){return[Fe,Ue,ot,Ye,gt,Pt,wt,xt,Ct,ut,Re,ht,Et]},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Fe,Ue,ot,Ye,Pt,wt,xt]},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Fe,Ue,ot,Ye,wt]},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(xe){var Le=this;this._availableMarkerTypes.splice(0),xe.forEach(function(Xe){if(typeof Xe=="string"){var rt=Le.ALL_MARKER_TYPES.find(function(Ie){return Ie.typeName===Xe});rt!==void 0&&Le._availableMarkerTypes.push(rt)}else Le._availableMarkerTypes.push(Xe)})},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ve.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(xe){this._zoomLevel=xe,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(Ve.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Ve.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),me.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Ve.prototype.show=function(){var xe=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(Le){return Le(new St(xe))})},Ve.prototype.render=function(){return oe(this,void 0,void 0,function(){var xe;return Ge(this,function(Le){switch(Le.label){case 0:return this.setCurrentMarker(),(xe=new ke).naturalSize=this.renderAtNaturalSize,xe.imageType=this.renderImageType,xe.imageQuality=this.renderImageQuality,xe.markersOnly=this.renderMarkersOnly,xe.width=this.renderWidth,xe.height=this.renderHeight,[4,xe.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Le.sent(),[4,xe.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Le.sent()]}})})},Ve.prototype.close=function(xe){var Le=this;if(xe===void 0&&(xe=!1),this.isOpen){var Xe=!1;xe||this.eventListeners.beforeclose.forEach(function(rt){var Ie=new St(Le,!0);rt(Ie),Ie.defaultPrevented&&(Xe=!0)}),Xe||(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(rt){return rt(new St(Le))}),this.detachEvents(),this._isOpen=!1)}},Ve.prototype.addMarkersToToolbar=function(){for(var xe,Le=[],Xe=0;Xe<arguments.length;Xe++)Le[Xe]=arguments[Xe];(xe=this._availableMarkerTypes).push.apply(xe,Le)},Ve.prototype.addRenderEventListener=function(xe){this.addEventListener("render",function(Le){xe(Le.dataUrl,Le.state)})},Ve.prototype.removeRenderEventListener=function(xe){},Ve.prototype.addCloseEventListener=function(xe){this.addEventListener("close",function(){xe()})},Ve.prototype.removeCloseEventListener=function(xe){},Ve.prototype.setupResizeObserver=function(){var xe=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){xe.resize(xe.target.clientWidth,xe.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return xe.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Ve.prototype.onPopupTargetResize=function(){var xe=1*this.target.clientWidth/this.target.clientHeight,Le=this.editorCanvas.clientWidth/xe>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*xe:this.editorCanvas.clientWidth,Xe=Le<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/xe;this.resize(Le,Xe)},Ve.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Ve.prototype.resize=function(xe,Le){this._isResizing=!0;var Xe=xe/this.imageWidth,rt=Le/this.imageHeight;this.imageWidth=Math.round(xe),this.imageHeight=Math.round(Le),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(Xe,rt),this._isResizing=!1},Ve.prototype.scaleMarkers=function(xe,Le){var Xe,rt=this;this._currentMarker&&this._currentMarker instanceof Ye?this._currentMarker.scale(xe,Le):(Xe=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Ie){Ie!==rt._currentMarker&&Ie.scale(xe,Le)}),Xe!==void 0&&this.setCurrentMarker(Xe)},Ve.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"},Ve.prototype.setTopLeft=function(){var xe=this.editingTarget.getBoundingClientRect(),Le=this.editorCanvas.getBoundingClientRect();this.left=xe.left-Le.left,this.top=xe.top-Le.top},Ve.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)},Ve.prototype.addDefs=function(){for(var xe,Le=[],Xe=0;Xe<arguments.length;Xe++)Le[Xe]=arguments[Xe];this.defs=fe.createDefs(),this.addDefsToImage(),(xe=this.defs).append.apply(xe,Le)},Ve.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Ve.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)},Ve.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Ve.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Ve.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)},Ve.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Ve.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)},Ve.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 xe=document.createElement("a");xe.href="https://markerjs.com/",xe.target="_blank",xe.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>',xe.title="Powered by marker.js",xe.style.display="grid",xe.style.alignItems="center",xe.style.justifyItems="center",xe.style.padding="3px",xe.style.width="20px",xe.style.height="20px",this.logoUI.appendChild(xe),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Ve.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")},Ve.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"},Ve.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Ve.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 xe=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=xe+"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 we(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 de(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Ve.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Ve.prototype.removeMarker=function(xe){this.markerImage.removeChild(xe.container),this.markers.indexOf(xe)>-1&&this.markers.splice(this.markers.indexOf(xe),1),xe.dispose()},Ve.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())},Ve.prototype.toolbarButtonClicked=function(xe,Le){if(xe==="marker"&&Le!==void 0)this.createNewMarker(Le);else if(xe==="action")switch(Le){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()}},Ve.prototype.deleteSelectedMarker=function(){var xe=this;if(this._currentMarker!==void 0){var Le=!1;if(this.eventListeners.markerbeforedelete.forEach(function(rt){var Ie=new mt(xe,xe._currentMarker,!0);rt(Ie),Ie.defaultPrevented&&(Le=!0)}),!Le){var Xe=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(rt){return rt(new mt(xe,Xe))})}}},Ve.prototype.clear=function(){var xe=this,Le=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(_e){var He=new mt(xe,void 0,!0);_e(He),He.defaultPrevented&&(Le=!0)}),!Le)){this.setCurrentMarker();for(var Xe=function(_e){var He=rt.markers[_e];rt.setCurrentMarker(rt.markers[_e]),rt._currentMarker.dispose(),rt.markerImage.removeChild(rt._currentMarker.container),rt.markers.splice(rt.markers.indexOf(rt._currentMarker),1),rt.eventListeners.markerdelete.forEach(function(Qe){return Qe(new mt(xe,He))})},rt=this,Ie=this.markers.length-1;Ie>=0;Ie--)Xe(Ie);this.addUndoStep()}},Object.defineProperty(Ve.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Ve.prototype.showNotesEditor=function(){var xe;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=(xe=this._currentMarker.notes)!==null&&xe!==void 0?xe:"",this.overlayContainer.appendChild(this.notesArea))},Ve.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)},Ve.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Ve.prototype.addUndoStep=function(){var xe=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Le=this.getState(),Xe=this.undoRedoManager.getLastUndoStep();if(!Xe||Xe.width===Le.width&&Xe.height===Le.height){var rt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Le),rt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Ie){return Ie(new St(xe))})}else this.undoRedoManager.replaceLastUndoStep(Le),this.eventListeners.statechange.forEach(function(Ie){return Ie(new St(xe))})}},Ve.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Ve.prototype.undoStep=function(){var xe=this,Le=this.undoRedoManager.undo();Le!==void 0&&(this.restoreState(Le),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Xe){return Xe(new St(xe))}))},Ve.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Ve.prototype.redoStep=function(){var xe=this,Le=this.undoRedoManager.redo();Le!==void 0&&(this.restoreState(Le),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Xe){return Xe(new St(xe))}))},Ve.prototype.stepZoom=function(){var xe=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=xe<this.zoomSteps.length-1?this.zoomSteps[xe+1]:this.zoomSteps[0]},Ve.prototype.panTo=function(xe){this.contentDiv.scrollBy({left:this.prevPanPoint.x-xe.x,top:this.prevPanPoint.y-xe.y}),this.prevPanPoint=xe},Ve.prototype.startRenderAndClose=function(){return oe(this,void 0,void 0,function(){var xe,Le,Xe=this;return Ge(this,function(rt){switch(rt.label){case 0:return[4,this.render()];case 1:return xe=rt.sent(),Le=this.getState(),this.eventListeners.render.forEach(function(Ie){return Ie(new Ft(Xe,xe,Le))}),this.close(!0),[2]}})})},Ve.prototype.getState=function(xe){xe===!0&&this.setCurrentMarker();var Le={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Xe){return Le.markers.push(Xe.getState())}),Le},Ve.prototype.restoreState=function(xe){var Le=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);xe.markers.forEach(function(Xe){var rt=Le._availableMarkerTypes.find(function(_e){return _e.typeName===Xe.typeName});if(rt!==void 0){var Ie=Le.addNewMarker(rt);Ie.restoreState(Xe),Le.markers.push(Ie)}}),xe.width&&xe.height&&(xe.width!==this.imageWidth||xe.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/xe.width,this.imageHeight/xe.height),this.eventListeners.restorestate.forEach(function(Xe){return Xe(new St(Le))})},Ve.prototype.addNewMarker=function(xe){var Le=fe.createGroup();return this.markerImage.appendChild(Le),new xe(Le,this.overlayContainer,this.settings)},Ve.prototype.createNewMarker=function(xe){var Le,Xe=this;(Le=typeof xe=="string"?this._availableMarkerTypes.find(function(rt){return rt.typeName===xe}):xe)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Le),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(Le.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(rt){return rt(new mt(Xe,Xe._currentMarker))}))},Ve.prototype.markerCreated=function(xe){var Le=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(xe),this.setCurrentMarker(xe),xe instanceof Ue&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ue):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Xe){return Xe(new mt(Le,Le._currentMarker))})},Ve.prototype.colorChanged=function(xe){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=xe,this.settings.defaultStrokeColor=xe)},Ve.prototype.fillColorChanged=function(xe){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=xe)},Ve.prototype.markerStateChanged=function(xe){var Le=this;this.eventListeners.markerchange.forEach(function(Xe){return Xe(new mt(Le,xe))})},Ve.prototype.setCurrentMarker=function(xe){var Le=this;this._currentMarker!==xe&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Xe){return Xe(new mt(Le,Le._currentMarker))})),this._currentMarker=xe,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(Xe){return Xe(new mt(Le,Le._currentMarker))}))},Ve.prototype.onPointerDown=function(xe){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||xe.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Le=this.markers.find(function(Xe){return Xe.ownsTarget(xe.target)});Le!==void 0?(this.setCurrentMarker(Le),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(xe.clientX,xe.clientY),xe.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:xe.clientX,y:xe.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(xe.clientX,xe.clientY))},Ve.prototype.onDblClick=function(xe){if(this._isFocused||this.focus(),this.mode==="select"){var Le=this.markers.find(function(Xe){return Xe.ownsTarget(xe.target)});Le!==void 0&&Le!==this._currentMarker&&this.setCurrentMarker(Le),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(xe.clientX,xe.clientY),xe.target):this.setCurrentMarker()}},Ve.prototype.onPointerMove=function(xe){this.touchPoints!==1&&xe.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||xe.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(xe.clientX,xe.clientY)):this.zoomLevel>1&&this.panTo({x:xe.clientX,y:xe.clientY}))},Ve.prototype.onPointerUp=function(xe){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(xe.clientX,xe.clientY)),this.isDragging=!1,this.addUndoStep()},Ve.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Ve.prototype.onKeyUp=function(xe){this._currentMarker===void 0||this.notesArea!==void 0||xe.key!=="Delete"&&xe.key!=="Backspace"||this.deleteSelectedMarker()},Ve.prototype.clientToLocalCoordinates=function(xe,Le){var Xe=this.markerImage.getBoundingClientRect();return{x:(xe-Xe.left)/this.zoomLevel,y:(Le-Xe.top)/this.zoomLevel}},Ve.prototype.onWindowResize=function(){this.positionUI()},Ve.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var xe=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=xe+"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()},Ve.prototype.addLicenseKey=function(xe){me.addKey(xe)},Ve.prototype.addEventListener=function(xe,Le){this.eventListeners.addEventListener(xe,Le)},Ve.prototype.removeEventListener=function(xe,Le){this.eventListeners.removeEventListener(xe,Le)},Ve.prototype.renderState=function(xe){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(xe),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Ve.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Ve.prototype.focus=function(){var xe=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Le){return Le(new St(xe))}))},Ve.prototype.blur=function(){var xe=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Le){return Le(new St(xe))}))},Ve.instanceCounter=0,Ve}()},98535:function(mn,dn,st){"use strict";st.r(dn),st.d(dn,{Panel:function(){return Ue},default:function(){return Ye}});var pt=st(72308),Dt=st(80702),oe=st(52487),Ge=st(62853),De=st(92310),fe=st.n(De),me=st(18929),ke=st(48736),Ce=st(59301),Se=st(74416),Me=st(11592),ve=st(77321),we=st(49618),de=st(77900),z=st(10228),ee=Ce.forwardRef(function(Ke,ot){var ut=Ke.prefixCls,ft=Ke.forceRender,wt=Ke.className,Je=Ke.style,nt=Ke.children,xt=Ke.isActive,Pt=Ke.role,Ct=Ke.classNames,gt=Ke.styles,dt=Ce.useState(xt||ft),ht=(0,oe.Z)(dt,2),Et=ht[0],St=ht[1];return Ce.useEffect(function(){(ft||xt)&&St(!0)},[ft,xt]),Et?Ce.createElement("div",{ref:ot,className:fe()("".concat(ut,"-content"),(0,we.Z)((0,we.Z)({},"".concat(ut,"-content-active"),xt),"".concat(ut,"-content-inactive"),!xt),wt),style:Je,role:Pt},Ce.createElement("div",{className:fe()("".concat(ut,"-content-box"),Ct==null?void 0:Ct.body),style:gt==null?void 0:gt.body},nt)):null});ee.displayName="PanelContent";var ae=ee,ie=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],le=Ce.forwardRef(function(Ke,ot){var ut=Ke.showArrow,ft=ut===void 0?!0:ut,wt=Ke.headerClass,Je=Ke.isActive,nt=Ke.onItemClick,xt=Ke.forceRender,Pt=Ke.className,Ct=Ke.classNames,gt=Ct===void 0?{}:Ct,dt=Ke.styles,ht=dt===void 0?{}:dt,Et=Ke.prefixCls,St=Ke.collapsible,Ft=Ke.accordion,mt=Ke.panelKey,yt=Ke.extra,tt=Ke.header,Ve=Ke.expandIcon,xe=Ke.openMotion,Le=Ke.destroyInactivePanel,Xe=Ke.children,rt=(0,Se.Z)(Ke,ie),Ie=St==="disabled",_e=yt!=null&&typeof yt!="boolean",He=(0,we.Z)((0,we.Z)((0,we.Z)({onClick:function(){nt==null||nt(mt)},onKeyDown:function(Kt){(Kt.key==="Enter"||Kt.keyCode===z.Z.ENTER||Kt.which===z.Z.ENTER)&&(nt==null||nt(mt))},role:Ft?"tab":"button"},"aria-expanded",Je),"aria-disabled",Ie),"tabIndex",Ie?-1:0),Qe=typeof Ve=="function"?Ve(Ke):Ce.createElement("i",{className:"arrow"}),ct=Qe&&Ce.createElement("div",(0,pt.Z)({className:"".concat(Et,"-expand-icon")},["header","icon"].includes(St)?He:{}),Qe),at=fe()("".concat(Et,"-item"),(0,we.Z)((0,we.Z)({},"".concat(Et,"-item-active"),Je),"".concat(Et,"-item-disabled"),Ie),Pt),At=fe()(wt,"".concat(Et,"-header"),(0,we.Z)({},"".concat(Et,"-collapsible-").concat(St),!!St),gt.header),Lt=(0,ve.Z)({className:At,style:ht.header},["header","icon"].includes(St)?{}:He);return Ce.createElement("div",(0,pt.Z)({},rt,{ref:ot,className:at}),Ce.createElement("div",Lt,ft&&ct,Ce.createElement("span",(0,pt.Z)({className:"".concat(Et,"-header-text")},St==="header"?He:{}),tt),_e&&Ce.createElement("div",{className:"".concat(Et,"-extra")},yt)),Ce.createElement(de.default,(0,pt.Z)({visible:Je,leavedClassName:"".concat(Et,"-content-hidden")},xe,{forceRender:xt,removeOnLeave:Le}),function(It,Kt){var Xt=It.className,$t=It.style;return Ce.createElement(ae,{ref:Kt,prefixCls:Et,className:Xt,classNames:gt,style:$t,styles:ht,isActive:Je,forceRender:xt,role:Ft?"tabpanel":void 0},Xe)}))}),ue=le,ge=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Pe=function(ot,ut){var ft=ut.prefixCls,wt=ut.accordion,Je=ut.collapsible,nt=ut.destroyInactivePanel,xt=ut.onItemClick,Pt=ut.activeKey,Ct=ut.openMotion,gt=ut.expandIcon;return ot.map(function(dt,ht){var Et=dt.children,St=dt.label,Ft=dt.key,mt=dt.collapsible,yt=dt.onItemClick,tt=dt.destroyInactivePanel,Ve=(0,Se.Z)(dt,ge),xe=String(Ft!=null?Ft:ht),Le=mt!=null?mt:Je,Xe=tt!=null?tt:nt,rt=function(He){Le!=="disabled"&&(xt(He),yt==null||yt(He))},Ie=!1;return wt?Ie=Pt[0]===xe:Ie=Pt.indexOf(xe)>-1,Ce.createElement(ue,(0,pt.Z)({},Ve,{prefixCls:ft,key:xe,panelKey:xe,isActive:Ie,accordion:wt,openMotion:Ct,expandIcon:gt,header:St,collapsible:Le,onItemClick:rt,destroyInactivePanel:Xe}),Et)})},je=function(ot,ut,ft){if(!ot)return null;var wt=ft.prefixCls,Je=ft.accordion,nt=ft.collapsible,xt=ft.destroyInactivePanel,Pt=ft.onItemClick,Ct=ft.activeKey,gt=ft.openMotion,dt=ft.expandIcon,ht=ot.key||String(ut),Et=ot.props,St=Et.header,Ft=Et.headerClass,mt=Et.destroyInactivePanel,yt=Et.collapsible,tt=Et.onItemClick,Ve=!1;Je?Ve=Ct[0]===ht:Ve=Ct.indexOf(ht)>-1;var xe=yt!=null?yt:nt,Le=function(Ie){xe!=="disabled"&&(Pt(Ie),tt==null||tt(Ie))},Xe={key:ht,panelKey:ht,header:St,headerClass:Ft,isActive:Ve,prefixCls:wt,destroyInactivePanel:mt!=null?mt:xt,openMotion:gt,accordion:Je,children:ot.props.children,onItemClick:Le,expandIcon:dt,collapsible:xe};return typeof ot.type=="string"?ot:(Object.keys(Xe).forEach(function(rt){typeof Xe[rt]=="undefined"&&delete Xe[rt]}),Ce.cloneElement(ot,Xe))};function Be(Ke,ot,ut){return Array.isArray(Ke)?Pe(Ke,ut):(0,Me.Z)(ot).map(function(ft,wt){return je(ft,wt,ut)})}var Fe=Be,Ne=st(26112);function Ae(Ke){var ot=Ke;if(!Array.isArray(ot)){var ut=(0,Ge.Z)(ot);ot=ut==="number"||ut==="string"?[ot]:[]}return ot.map(function(ft){return String(ft)})}var Re=Ce.forwardRef(function(Ke,ot){var ut=Ke.prefixCls,ft=ut===void 0?"rc-collapse":ut,wt=Ke.destroyInactivePanel,Je=wt===void 0?!1:wt,nt=Ke.style,xt=Ke.accordion,Pt=Ke.className,Ct=Ke.children,gt=Ke.collapsible,dt=Ke.openMotion,ht=Ke.expandIcon,Et=Ke.activeKey,St=Ke.defaultActiveKey,Ft=Ke.onChange,mt=Ke.items,yt=fe()(ft,Pt),tt=(0,me.Z)([],{value:Et,onChange:function(_e){return Ft==null?void 0:Ft(_e)},defaultValue:St,postState:Ae}),Ve=(0,oe.Z)(tt,2),xe=Ve[0],Le=Ve[1],Xe=function(_e){return Le(function(){if(xt)return xe[0]===_e?[]:[_e];var He=xe.indexOf(_e),Qe=He>-1;return Qe?xe.filter(function(ct){return ct!==_e}):[].concat((0,Dt.Z)(xe),[_e])})};(0,ke.ZP)(!Ct,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var rt=Fe(mt,Ct,{prefixCls:ft,accordion:xt,openMotion:dt,expandIcon:ht,collapsible:gt,destroyInactivePanel:Je,onItemClick:Xe,activeKey:xe});return Ce.createElement("div",(0,pt.Z)({ref:ot,className:yt,style:nt,role:xt?"tablist":void 0},(0,Ne.Z)(Ke,{aria:!0,data:!0})),rt)}),We=Object.assign(Re,{Panel:ue}),Ye=We,Ue=We.Panel},66042:function(mn,dn,st){"use strict";st.d(dn,{Z:function(){return Ye}});var pt=st(77321),Dt=st(52487),oe=st(43403),Ge=st(34280),De=st(59301),fe=De.createContext(null),me=De.createContext({}),ke=fe,Ce=st(49618),Se=st(72308),Me=st(92310),ve=st.n(Me),we=st(77900),de=st(10228),z=st(26112),ee=st(74416),ae=st(8654),ie=["prefixCls","className","containerRef"],le=function(Ke){var ot=Ke.prefixCls,ut=Ke.className,ft=Ke.containerRef,wt=(0,ee.Z)(Ke,ie),Je=De.useContext(me),nt=Je.panel,xt=(0,ae.x1)(nt,ft);return De.createElement("div",(0,Se.Z)({className:ve()("".concat(ot,"-content"),ut),role:"dialog",ref:xt},(0,z.Z)(Ke,{aria:!0}),{"aria-modal":"true"},wt))},ue=le,ge=st(48736);function Pe(Ue){return typeof Ue=="string"&&String(Number(Ue))===Ue?((0,ge.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Ue)):Ue}function je(Ue){warning(!("wrapperClassName"in Ue),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Ue.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var Be={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Fe(Ue,Ke){var ot,ut,ft,wt=Ue.prefixCls,Je=Ue.open,nt=Ue.placement,xt=Ue.inline,Pt=Ue.push,Ct=Ue.forceRender,gt=Ue.autoFocus,dt=Ue.keyboard,ht=Ue.classNames,Et=Ue.rootClassName,St=Ue.rootStyle,Ft=Ue.zIndex,mt=Ue.className,yt=Ue.id,tt=Ue.style,Ve=Ue.motion,xe=Ue.width,Le=Ue.height,Xe=Ue.children,rt=Ue.mask,Ie=Ue.maskClosable,_e=Ue.maskMotion,He=Ue.maskClassName,Qe=Ue.maskStyle,ct=Ue.afterOpenChange,at=Ue.onClose,At=Ue.onMouseEnter,Lt=Ue.onMouseOver,It=Ue.onMouseLeave,Kt=Ue.onClick,Xt=Ue.onKeyDown,$t=Ue.onKeyUp,Ut=Ue.styles,ln=Ue.drawerRender,tn=De.useRef(),Wt=De.useRef(),En=De.useRef();De.useImperativeHandle(Ke,function(){return tn.current});var Pn=function(vr){var Ei=vr.keyCode,lr=vr.shiftKey;switch(Ei){case de.Z.TAB:{if(Ei===de.Z.TAB){if(!lr&&document.activeElement===En.current){var wr;(wr=Wt.current)===null||wr===void 0||wr.focus({preventScroll:!0})}else if(lr&&document.activeElement===Wt.current){var Br;(Br=En.current)===null||Br===void 0||Br.focus({preventScroll:!0})}}break}case de.Z.ESC:{at&&dt&&(vr.stopPropagation(),at(vr));break}}};De.useEffect(function(){if(Je&&gt){var pr;(pr=tn.current)===null||pr===void 0||pr.focus({preventScroll:!0})}},[Je]);var Ln=De.useState(!1),Vn=(0,Dt.Z)(Ln,2),Or=Vn[0],dr=Vn[1],Lr=De.useContext(ke),Xr;typeof Pt=="boolean"?Xr=Pt?{}:{distance:0}:Xr=Pt||{};var Vr=(ot=(ut=(ft=Xr)===null||ft===void 0?void 0:ft.distance)!==null&&ut!==void 0?ut:Lr==null?void 0:Lr.pushDistance)!==null&&ot!==void 0?ot:180,si=De.useMemo(function(){return{pushDistance:Vr,push:function(){dr(!0)},pull:function(){dr(!1)}}},[Vr]);De.useEffect(function(){if(Je){var pr;Lr==null||(pr=Lr.push)===null||pr===void 0||pr.call(Lr)}else{var vr;Lr==null||(vr=Lr.pull)===null||vr===void 0||vr.call(Lr)}},[Je]),De.useEffect(function(){return function(){var pr;Lr==null||(pr=Lr.pull)===null||pr===void 0||pr.call(Lr)}},[]);var yi=rt&&De.createElement(we.default,(0,Se.Z)({key:"mask"},_e,{visible:Je}),function(pr,vr){var Ei=pr.className,lr=pr.style;return De.createElement("div",{className:ve()("".concat(wt,"-mask"),Ei,ht==null?void 0:ht.mask,He),style:(0,pt.Z)((0,pt.Z)((0,pt.Z)({},lr),Qe),Ut==null?void 0:Ut.mask),onClick:Ie&&Je?at:void 0,ref:vr})}),Ii=typeof Ve=="function"?Ve(nt):Ve,Fi={};if(Or&&Vr)switch(nt){case"top":Fi.transform="translateY(".concat(Vr,"px)");break;case"bottom":Fi.transform="translateY(".concat(-Vr,"px)");break;case"left":Fi.transform="translateX(".concat(Vr,"px)");break;default:Fi.transform="translateX(".concat(-Vr,"px)");break}nt==="left"||nt==="right"?Fi.width=Pe(xe):Fi.height=Pe(Le);var _i={onMouseEnter:At,onMouseOver:Lt,onMouseLeave:It,onClick:Kt,onKeyDown:Xt,onKeyUp:$t},Yi=De.createElement(we.default,(0,Se.Z)({key:"panel"},Ii,{visible:Je,forceRender:Ct,onVisibleChanged:function(vr){ct==null||ct(vr)},removeOnLeave:!1,leavedClassName:"".concat(wt,"-content-wrapper-hidden")}),function(pr,vr){var Ei=pr.className,lr=pr.style,wr=De.createElement(ue,(0,Se.Z)({id:yt,containerRef:vr,prefixCls:wt,className:ve()(mt,ht==null?void 0:ht.content),style:(0,pt.Z)((0,pt.Z)({},tt),Ut==null?void 0:Ut.content)},(0,z.Z)(Ue,{aria:!0}),_i),Xe);return De.createElement("div",(0,Se.Z)({className:ve()("".concat(wt,"-content-wrapper"),ht==null?void 0:ht.wrapper,Ei),style:(0,pt.Z)((0,pt.Z)((0,pt.Z)({},Fi),lr),Ut==null?void 0:Ut.wrapper)},(0,z.Z)(Ue,{data:!0})),ln?ln(wr):wr)}),et=(0,pt.Z)({},St);return Ft&&(et.zIndex=Ft),De.createElement(ke.Provider,{value:si},De.createElement("div",{className:ve()(wt,"".concat(wt,"-").concat(nt),Et,(0,Ce.Z)((0,Ce.Z)({},"".concat(wt,"-open"),Je),"".concat(wt,"-inline"),xt)),style:et,tabIndex:-1,ref:tn,onKeyDown:Pn},yi,De.createElement("div",{tabIndex:0,ref:Wt,style:Be,"aria-hidden":"true","data-sentinel":"start"}),Yi,De.createElement("div",{tabIndex:0,ref:En,style:Be,"aria-hidden":"true","data-sentinel":"end"})))}var Ne=De.forwardRef(Fe),Ae=Ne,Re=function(Ke){var ot=Ke.open,ut=ot===void 0?!1:ot,ft=Ke.prefixCls,wt=ft===void 0?"rc-drawer":ft,Je=Ke.placement,nt=Je===void 0?"right":Je,xt=Ke.autoFocus,Pt=xt===void 0?!0:xt,Ct=Ke.keyboard,gt=Ct===void 0?!0:Ct,dt=Ke.width,ht=dt===void 0?378:dt,Et=Ke.mask,St=Et===void 0?!0:Et,Ft=Ke.maskClosable,mt=Ft===void 0?!0:Ft,yt=Ke.getContainer,tt=Ke.forceRender,Ve=Ke.afterOpenChange,xe=Ke.destroyOnClose,Le=Ke.onMouseEnter,Xe=Ke.onMouseOver,rt=Ke.onMouseLeave,Ie=Ke.onClick,_e=Ke.onKeyDown,He=Ke.onKeyUp,Qe=Ke.panelRef,ct=De.useState(!1),at=(0,Dt.Z)(ct,2),At=at[0],Lt=at[1],It=De.useState(!1),Kt=(0,Dt.Z)(It,2),Xt=Kt[0],$t=Kt[1];(0,Ge.Z)(function(){$t(!0)},[]);var Ut=Xt?ut:!1,ln=De.useRef(),tn=De.useRef();(0,Ge.Z)(function(){Ut&&(tn.current=document.activeElement)},[Ut]);var Wt=function(Or){var dr;if(Lt(Or),Ve==null||Ve(Or),!Or&&tn.current&&!((dr=ln.current)!==null&&dr!==void 0&&dr.contains(tn.current))){var Lr;(Lr=tn.current)===null||Lr===void 0||Lr.focus({preventScroll:!0})}},En=De.useMemo(function(){return{panel:Qe}},[Qe]);if(!tt&&!At&&!Ut&&xe)return null;var Pn={onMouseEnter:Le,onMouseOver:Xe,onMouseLeave:rt,onClick:Ie,onKeyDown:_e,onKeyUp:He},Ln=(0,pt.Z)((0,pt.Z)({},Ke),{},{open:Ut,prefixCls:wt,placement:nt,autoFocus:Pt,keyboard:gt,width:ht,mask:St,maskClosable:mt,inline:yt===!1,afterOpenChange:Wt,ref:ln},Pn);return De.createElement(me.Provider,{value:En},De.createElement(oe.Z,{open:Ut||tt||At,autoDestroy:!1,getContainer:yt,autoLock:St&&(Ut||At)},De.createElement(Ae,Ln)))},We=Re,Ye=We},23425:function(mn,dn,st){"use strict";st.d(dn,{Z:function(){return Be}});var pt=st(49618),Dt=st(72308),oe=st(62853),Ge=st(77321),De=st(52487),fe=st(92310),me=st.n(fe),ke=st(18929),Ce=st(10228),Se=st(26112),Me=st(48736),ve=st(59301),we=st(17119),de=[10,20,50,100],z=function(Ne){var Ae=Ne.pageSizeOptions,Re=Ae===void 0?de:Ae,We=Ne.locale,Ye=Ne.changeSize,Ue=Ne.pageSize,Ke=Ne.goButton,ot=Ne.quickGo,ut=Ne.rootPrefixCls,ft=Ne.disabled,wt=Ne.buildOptionText,Je=Ne.showSizeChanger,nt=Ne.sizeChangerRender,xt=ve.useState(""),Pt=(0,De.Z)(xt,2),Ct=Pt[0],gt=Pt[1],dt=function(){return!Ct||Number.isNaN(Ct)?void 0:Number(Ct)},ht=typeof wt=="function"?wt:function(Le){return"".concat(Le," ").concat(We.items_per_page)},Et=function(Xe){gt(Xe.target.value)},St=function(Xe){Ke||Ct===""||(gt(""),!(Xe.relatedTarget&&(Xe.relatedTarget.className.indexOf("".concat(ut,"-item-link"))>=0||Xe.relatedTarget.className.indexOf("".concat(ut,"-item"))>=0))&&(ot==null||ot(dt())))},Ft=function(Xe){Ct!==""&&(Xe.keyCode===Ce.Z.ENTER||Xe.type==="click")&&(gt(""),ot==null||ot(dt()))},mt=function(){return Re.some(function(Xe){return Xe.toString()===Ue.toString()})?Re:Re.concat([Ue]).sort(function(Xe,rt){var Ie=Number.isNaN(Number(Xe))?0:Number(Xe),_e=Number.isNaN(Number(rt))?0:Number(rt);return Ie-_e})},yt="".concat(ut,"-options");if(!Je&&!ot)return null;var tt=null,Ve=null,xe=null;return Je&&nt&&(tt=nt({disabled:ft,size:Ue,onSizeChange:function(Xe){Ye==null||Ye(Number(Xe))},"aria-label":We.page_size,className:"".concat(yt,"-size-changer"),options:mt().map(function(Le){return{label:ht(Le),value:Le}})})),ot&&(Ke&&(xe=typeof Ke=="boolean"?ve.createElement("button",{type:"button",onClick:Ft,onKeyUp:Ft,disabled:ft,className:"".concat(yt,"-quick-jumper-button")},We.jump_to_confirm):ve.createElement("span",{onClick:Ft,onKeyUp:Ft},Ke)),Ve=ve.createElement("div",{className:"".concat(yt,"-quick-jumper")},We.jump_to,ve.createElement("input",{disabled:ft,type:"text",value:Ct,onChange:Et,onKeyUp:Ft,onBlur:St,"aria-label":We.page}),We.page,xe)),ve.createElement("li",{className:yt},tt,Ve)},ee=z,ae=function(Ne){var Ae=Ne.rootPrefixCls,Re=Ne.page,We=Ne.active,Ye=Ne.className,Ue=Ne.showTitle,Ke=Ne.onClick,ot=Ne.onKeyPress,ut=Ne.itemRender,ft="".concat(Ae,"-item"),wt=me()(ft,"".concat(ft,"-").concat(Re),(0,pt.Z)((0,pt.Z)({},"".concat(ft,"-active"),We),"".concat(ft,"-disabled"),!Re),Ye),Je=function(){Ke(Re)},nt=function(Ct){ot(Ct,Ke,Re)},xt=ut(Re,"page",ve.createElement("a",{rel:"nofollow"},Re));return xt?ve.createElement("li",{title:Ue?String(Re):null,className:wt,onClick:Je,onKeyDown:nt,tabIndex:0},xt):null},ie=ae,le=function(Ne,Ae,Re){return Re};function ue(){}function ge(Fe){var Ne=Number(Fe);return typeof Ne=="number"&&!Number.isNaN(Ne)&&isFinite(Ne)&&Math.floor(Ne)===Ne}function Pe(Fe,Ne,Ae){var Re=typeof Fe=="undefined"?Ne:Fe;return Math.floor((Ae-1)/Re)+1}var je=function(Ne){var Ae=Ne.prefixCls,Re=Ae===void 0?"rc-pagination":Ae,We=Ne.selectPrefixCls,Ye=We===void 0?"rc-select":We,Ue=Ne.className,Ke=Ne.current,ot=Ne.defaultCurrent,ut=ot===void 0?1:ot,ft=Ne.total,wt=ft===void 0?0:ft,Je=Ne.pageSize,nt=Ne.defaultPageSize,xt=nt===void 0?10:nt,Pt=Ne.onChange,Ct=Pt===void 0?ue:Pt,gt=Ne.hideOnSinglePage,dt=Ne.align,ht=Ne.showPrevNextJumpers,Et=ht===void 0?!0:ht,St=Ne.showQuickJumper,Ft=Ne.showLessItems,mt=Ne.showTitle,yt=mt===void 0?!0:mt,tt=Ne.onShowSizeChange,Ve=tt===void 0?ue:tt,xe=Ne.locale,Le=xe===void 0?we.Z:xe,Xe=Ne.style,rt=Ne.totalBoundaryShowSizeChanger,Ie=rt===void 0?50:rt,_e=Ne.disabled,He=Ne.simple,Qe=Ne.showTotal,ct=Ne.showSizeChanger,at=ct===void 0?wt>Ie:ct,At=Ne.sizeChangerRender,Lt=Ne.pageSizeOptions,It=Ne.itemRender,Kt=It===void 0?le:It,Xt=Ne.jumpPrevIcon,$t=Ne.jumpNextIcon,Ut=Ne.prevIcon,ln=Ne.nextIcon,tn=ve.useRef(null),Wt=(0,ke.Z)(10,{value:Je,defaultValue:xt}),En=(0,De.Z)(Wt,2),Pn=En[0],Ln=En[1],Vn=(0,ke.Z)(1,{value:Ke,defaultValue:ut,postState:function(Nr){return Math.max(1,Math.min(Nr,Pe(void 0,Pn,wt)))}}),Or=(0,De.Z)(Vn,2),dr=Or[0],Lr=Or[1],Xr=ve.useState(dr),Vr=(0,De.Z)(Xr,2),si=Vr[0],yi=Vr[1];(0,ve.useEffect)(function(){yi(dr)},[dr]);var Ii=Ct!==ue,Fi="current"in Ne,_i=Math.max(1,dr-(Ft?3:5)),Yi=Math.min(Pe(void 0,Pn,wt),dr+(Ft?3:5));function et(yr,Nr){var Yr=yr||ve.createElement("button",{type:"button","aria-label":Nr,className:"".concat(Re,"-item-link")});return typeof yr=="function"&&(Yr=ve.createElement(yr,(0,Ge.Z)({},Ne))),Yr}function pr(yr){var Nr=yr.target.value,Yr=Pe(void 0,Pn,wt),Zi;return Nr===""?Zi=Nr:Number.isNaN(Number(Nr))?Zi=si:Nr>=Yr?Zi=Yr:Zi=Number(Nr),Zi}function vr(yr){return ge(yr)&&yr!==dr&&ge(wt)&&wt>0}var Ei=wt>Pn?St:!1;function lr(yr){(yr.keyCode===Ce.Z.UP||yr.keyCode===Ce.Z.DOWN)&&yr.preventDefault()}function wr(yr){var Nr=pr(yr);switch(Nr!==si&&yi(Nr),yr.keyCode){case Ce.Z.ENTER:Ur(Nr);break;case Ce.Z.UP:Ur(Nr-1);break;case Ce.Z.DOWN:Ur(Nr+1);break;default:break}}function Br(yr){Ur(pr(yr))}function ro(yr){var Nr=Pe(yr,Pn,wt),Yr=dr>Nr&&Nr!==0?Nr:dr;Ln(yr),yi(Yr),Ve==null||Ve(dr,yr),Lr(Yr),Ct==null||Ct(Yr,yr)}function Ur(yr){if(vr(yr)&&!_e){var Nr=Pe(void 0,Pn,wt),Yr=yr;return yr>Nr?Yr=Nr:yr<1&&(Yr=1),Yr!==si&&yi(Yr),Lr(Yr),Ct==null||Ct(Yr,Pn),Yr}return dr}var on=dr>1,nn=dr<Pe(void 0,Pn,wt);function Zt(){on&&Ur(dr-1)}function tr(){nn&&Ur(dr+1)}function mr(){Ur(_i)}function Er(){Ur(Yi)}function An(yr,Nr){if(yr.key==="Enter"||yr.charCode===Ce.Z.ENTER||yr.keyCode===Ce.Z.ENTER){for(var Yr=arguments.length,Zi=new Array(Yr>2?Yr-2:0),zi=2;zi<Yr;zi++)Zi[zi-2]=arguments[zi];Nr.apply(void 0,Zi)}}function er(yr){An(yr,Zt)}function rn(yr){An(yr,tr)}function qt(yr){An(yr,mr)}function Qn(yr){An(yr,Er)}function Ot(yr){var Nr=Kt(yr,"prev",et(Ut,"prev page"));return ve.isValidElement(Nr)?ve.cloneElement(Nr,{disabled:!on}):Nr}function vn(yr){var Nr=Kt(yr,"next",et(ln,"next page"));return ve.isValidElement(Nr)?ve.cloneElement(Nr,{disabled:!nn}):Nr}function _n(yr){(yr.type==="click"||yr.keyCode===Ce.Z.ENTER)&&Ur(si)}var qn=null,an=(0,Se.Z)(Ne,{aria:!0,data:!0}),Un=Qe&&ve.createElement("li",{className:"".concat(Re,"-total-text")},Qe(wt,[wt===0?0:(dr-1)*Pn+1,dr*Pn>wt?wt:dr*Pn])),Kn=null,On=Pe(void 0,Pn,wt);if(gt&&wt<=Pn)return null;var ur=[],$n={rootPrefixCls:Re,onClick:Ur,onKeyPress:An,showTitle:yt,itemRender:Kt,page:-1},Wn=dr-1>0?dr-1:0,hr=dr+1<On?dr+1:On,Rr=St&&St.goButton,br=(0,oe.Z)(He)==="object"?He.readOnly:!He,Pr=Rr,hn=null;He&&(Rr&&(typeof Rr=="boolean"?Pr=ve.createElement("button",{type:"button",onClick:_n,onKeyUp:_n},Le.jump_to_confirm):Pr=ve.createElement("span",{onClick:_n,onKeyUp:_n},Rr),Pr=ve.createElement("li",{title:yt?"".concat(Le.jump_to).concat(dr,"/").concat(On):null,className:"".concat(Re,"-simple-pager")},Pr)),hn=ve.createElement("li",{title:yt?"".concat(dr,"/").concat(On):null,className:"".concat(Re,"-simple-pager")},br?si:ve.createElement("input",{type:"text","aria-label":Le.jump_to,value:si,disabled:_e,onKeyDown:lr,onKeyUp:wr,onChange:wr,onBlur:Br,size:3}),ve.createElement("span",{className:"".concat(Re,"-slash")},"/"),On));var Pi=Ft?1:2;if(On<=3+Pi*2){On||ur.push(ve.createElement(ie,(0,Dt.Z)({},$n,{key:"noPager",page:1,className:"".concat(Re,"-item-disabled")})));for(var qr=1;qr<=On;qr+=1)ur.push(ve.createElement(ie,(0,Dt.Z)({},$n,{key:qr,page:qr,active:dr===qr})))}else{var ki=Ft?Le.prev_3:Le.prev_5,un=Ft?Le.next_3:Le.next_5,Xn=Kt(_i,"jump-prev",et(Xt,"prev page")),cr=Kt(Yi,"jump-next",et($t,"next page"));Et&&(qn=Xn?ve.createElement("li",{title:yt?ki:null,key:"prev",onClick:mr,tabIndex:0,onKeyDown:qt,className:me()("".concat(Re,"-jump-prev"),(0,pt.Z)({},"".concat(Re,"-jump-prev-custom-icon"),!!Xt))},Xn):null,Kn=cr?ve.createElement("li",{title:yt?un:null,key:"next",onClick:Er,tabIndex:0,onKeyDown:Qn,className:me()("".concat(Re,"-jump-next"),(0,pt.Z)({},"".concat(Re,"-jump-next-custom-icon"),!!$t))},cr):null);var ar=Math.max(1,dr-Pi),xr=Math.min(dr+Pi,On);dr-1<=Pi&&(xr=1+Pi*2),On-dr<=Pi&&(ar=On-Pi*2);for(var Tr=ar;Tr<=xr;Tr+=1)ur.push(ve.createElement(ie,(0,Dt.Z)({},$n,{key:Tr,page:Tr,active:dr===Tr})));if(dr-1>=Pi*2&&dr!==3&&(ur[0]=ve.cloneElement(ur[0],{className:me()("".concat(Re,"-item-after-jump-prev"),ur[0].props.className)}),ur.unshift(qn)),On-dr>=Pi*2&&dr!==On-2){var Wr=ur[ur.length-1];ur[ur.length-1]=ve.cloneElement(Wr,{className:me()("".concat(Re,"-item-before-jump-next"),Wr.props.className)}),ur.push(Kn)}ar!==1&&ur.unshift(ve.createElement(ie,(0,Dt.Z)({},$n,{key:1,page:1}))),xr!==On&&ur.push(ve.createElement(ie,(0,Dt.Z)({},$n,{key:On,page:On})))}var $r=Ot(Wn);if($r){var ni=!on||!On;$r=ve.createElement("li",{title:yt?Le.prev_page:null,onClick:Zt,tabIndex:ni?null:0,onKeyDown:er,className:me()("".concat(Re,"-prev"),(0,pt.Z)({},"".concat(Re,"-disabled"),ni)),"aria-disabled":ni},$r)}var ai=vn(hr);if(ai){var yn,Ci;He?(yn=!nn,Ci=on?0:null):(yn=!nn||!On,Ci=yn?null:0),ai=ve.createElement("li",{title:yt?Le.next_page:null,onClick:tr,tabIndex:Ci,onKeyDown:rn,className:me()("".concat(Re,"-next"),(0,pt.Z)({},"".concat(Re,"-disabled"),yn)),"aria-disabled":yn},ai)}var xn=me()(Re,Ue,(0,pt.Z)((0,pt.Z)((0,pt.Z)((0,pt.Z)((0,pt.Z)({},"".concat(Re,"-start"),dt==="start"),"".concat(Re,"-center"),dt==="center"),"".concat(Re,"-end"),dt==="end"),"".concat(Re,"-simple"),He),"".concat(Re,"-disabled"),_e));return ve.createElement("ul",(0,Dt.Z)({className:xn,style:Xe,ref:tn},an),Un,$r,He?hn:ur,ai,ve.createElement(ee,{locale:Le,rootPrefixCls:Re,disabled:_e,selectPrefixCls:Ye,changeSize:ro,pageSize:Pn,pageSizeOptions:Lt,quickGo:Ei?Ur:null,goButton:Pr,showSizeChanger:at,sizeChangerRender:At}))},Be=je},25930:function(mn,dn,st){"use strict";st.d(dn,{Cd:function(){return Re}});var pt=st(72308),Dt=st(77321),oe=st(74416),Ge=st(59301),De=st(92310),fe=st.n(De),me={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},ke=function(){var Ue=(0,Ge.useRef)([]),Ke=(0,Ge.useRef)(null);return(0,Ge.useEffect)(function(){var ot=Date.now(),ut=!1;Ue.current.forEach(function(ft){if(ft){ut=!0;var wt=ft.style;wt.transitionDuration=".3s, .3s, .3s, .06s",Ke.current&&ot-Ke.current<100&&(wt.transitionDuration="0s, 0s")}}),ut&&(Ke.current=Date.now())}),Ue.current},Ce=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],Se=function(Ue){var Ke=(0,Dt.Z)((0,Dt.Z)({},me),Ue),ot=Ke.className,ut=Ke.percent,ft=Ke.prefixCls,wt=Ke.strokeColor,Je=Ke.strokeLinecap,nt=Ke.strokeWidth,xt=Ke.style,Pt=Ke.trailColor,Ct=Ke.trailWidth,gt=Ke.transition,dt=(0,oe.Z)(Ke,Ce);delete dt.gapPosition;var ht=Array.isArray(ut)?ut:[ut],Et=Array.isArray(wt)?wt:[wt],St=ke(),Ft=nt/2,mt=100-nt/2,yt="M ".concat(Je==="round"?Ft:0,",").concat(Ft,`
L `).concat(Je==="round"?mt:100,",").concat(Ft),tt="0 0 100 ".concat(nt),Ve=0;return Ge.createElement("svg",(0,pt.Z)({className:fe()("".concat(ft,"-line"),ot),viewBox:tt,preserveAspectRatio:"none",style:xt},dt),Ge.createElement("path",{className:"".concat(ft,"-line-trail"),d:yt,strokeLinecap:Je,stroke:Pt,strokeWidth:Ct||nt,fillOpacity:"0"}),ht.map(function(xe,Le){var Xe=1;switch(Je){case"round":Xe=1-nt/100;break;case"square":Xe=1-nt/2/100;break;default:Xe=1;break}var rt={strokeDasharray:"".concat(xe*Xe,"px, 100px"),strokeDashoffset:"-".concat(Ve,"px"),transition:gt||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Ie=Et[Le]||Et[Et.length-1];return Ve+=xe,Ge.createElement("path",{key:Le,className:"".concat(ft,"-line-path"),d:yt,strokeLinecap:Je,stroke:Ie,strokeWidth:nt,fillOpacity:"0",ref:function(He){St[Le]=He},style:rt})}))},Me=Se,ve=st(62853),we=st(52487),de=st(47273),z=0,ee=(0,de.Z)();function ae(){var Ye;return ee?(Ye=z,z+=1):Ye="TEST_OR_SSR",Ye}var ie=function(Ye){var Ue=Ge.useState(),Ke=(0,we.Z)(Ue,2),ot=Ke[0],ut=Ke[1];return Ge.useEffect(function(){ut("rc_progress_".concat(ae()))},[]),Ye||ot},le=function(Ue){var Ke=Ue.bg,ot=Ue.children;return Ge.createElement("div",{style:{width:"100%",height:"100%",background:Ke}},ot)};function ue(Ye,Ue){return Object.keys(Ye).map(function(Ke){var ot=parseFloat(Ke),ut="".concat(Math.floor(ot*Ue),"%");return"".concat(Ye[Ke]," ").concat(ut)})}var ge=Ge.forwardRef(function(Ye,Ue){var Ke=Ye.prefixCls,ot=Ye.color,ut=Ye.gradientId,ft=Ye.radius,wt=Ye.style,Je=Ye.ptg,nt=Ye.strokeLinecap,xt=Ye.strokeWidth,Pt=Ye.size,Ct=Ye.gapDegree,gt=ot&&(0,ve.Z)(ot)==="object",dt=gt?"#FFF":void 0,ht=Pt/2,Et=Ge.createElement("circle",{className:"".concat(Ke,"-circle-path"),r:ft,cx:ht,cy:ht,stroke:dt,strokeLinecap:nt,strokeWidth:xt,opacity:Je===0?0:1,style:wt,ref:Ue});if(!gt)return Et;var St="".concat(ut,"-conic"),Ft=Ct?"".concat(180+Ct/2,"deg"):"0deg",mt=ue(ot,(360-Ct)/360),yt=ue(ot,1),tt="conic-gradient(from ".concat(Ft,", ").concat(mt.join(", "),")"),Ve="linear-gradient(to ".concat(Ct?"bottom":"top",", ").concat(yt.join(", "),")");return Ge.createElement(Ge.Fragment,null,Ge.createElement("mask",{id:St},Et),Ge.createElement("foreignObject",{x:0,y:0,width:Pt,height:Pt,mask:"url(#".concat(St,")")},Ge.createElement(le,{bg:Ve},Ge.createElement(le,{bg:tt}))))}),Pe=ge,je=100,Be=function(Ue,Ke,ot,ut,ft,wt,Je,nt,xt,Pt){var Ct=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,gt=ot/100*360*((360-wt)/360),dt=wt===0?0:{bottom:0,top:180,left:90,right:-90}[Je],ht=(100-ut)/100*Ke;xt==="round"&&ut!==100&&(ht+=Pt/2,ht>=Ke&&(ht=Ke-.01));var Et=je/2;return{stroke:typeof nt=="string"?nt:void 0,strokeDasharray:"".concat(Ke,"px ").concat(Ue),strokeDashoffset:ht+Ct,transform:"rotate(".concat(ft+gt+dt,"deg)"),transformOrigin:"".concat(Et,"px ").concat(Et,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},Fe=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Ne(Ye){var Ue=Ye!=null?Ye:[];return Array.isArray(Ue)?Ue:[Ue]}var Ae=function(Ue){var Ke=(0,Dt.Z)((0,Dt.Z)({},me),Ue),ot=Ke.id,ut=Ke.prefixCls,ft=Ke.steps,wt=Ke.strokeWidth,Je=Ke.trailWidth,nt=Ke.gapDegree,xt=nt===void 0?0:nt,Pt=Ke.gapPosition,Ct=Ke.trailColor,gt=Ke.strokeLinecap,dt=Ke.style,ht=Ke.className,Et=Ke.strokeColor,St=Ke.percent,Ft=(0,oe.Z)(Ke,Fe),mt=je/2,yt=ie(ot),tt="".concat(yt,"-gradient"),Ve=mt-wt/2,xe=Math.PI*2*Ve,Le=xt>0?90+xt/2:-90,Xe=xe*((360-xt)/360),rt=(0,ve.Z)(ft)==="object"?ft:{count:ft,gap:2},Ie=rt.count,_e=rt.gap,He=Ne(St),Qe=Ne(Et),ct=Qe.find(function($t){return $t&&(0,ve.Z)($t)==="object"}),at=ct&&(0,ve.Z)(ct)==="object",At=at?"butt":gt,Lt=Be(xe,Xe,0,100,Le,xt,Pt,Ct,At,wt),It=ke(),Kt=function(){var Ut=0;return He.map(function(ln,tn){var Wt=Qe[tn]||Qe[Qe.length-1],En=Be(xe,Xe,Ut,ln,Le,xt,Pt,Wt,At,wt);return Ut+=ln,Ge.createElement(Pe,{key:tn,color:Wt,ptg:ln,radius:Ve,prefixCls:ut,gradientId:tt,style:En,strokeLinecap:At,strokeWidth:wt,gapDegree:xt,ref:function(Ln){It[tn]=Ln},size:je})}).reverse()},Xt=function(){var Ut=Math.round(Ie*(He[0]/100)),ln=100/Ie,tn=0;return new Array(Ie).fill(null).map(function(Wt,En){var Pn=En<=Ut-1?Qe[0]:Ct,Ln=Pn&&(0,ve.Z)(Pn)==="object"?"url(#".concat(tt,")"):void 0,Vn=Be(xe,Xe,tn,ln,Le,xt,Pt,Pn,"butt",wt,_e);return tn+=(Xe-Vn.strokeDashoffset+_e)*100/Xe,Ge.createElement("circle",{key:En,className:"".concat(ut,"-circle-path"),r:Ve,cx:mt,cy:mt,stroke:Ln,strokeWidth:wt,opacity:1,style:Vn,ref:function(dr){It[En]=dr}})})};return Ge.createElement("svg",(0,pt.Z)({className:fe()("".concat(ut,"-circle"),ht),viewBox:"0 0 ".concat(je," ").concat(je),style:dt,id:ot,role:"presentation"},Ft),!Ie&&Ge.createElement("circle",{className:"".concat(ut,"-circle-trail"),r:Ve,cx:mt,cy:mt,stroke:Ct,strokeLinecap:At,strokeWidth:Je||wt,style:Lt}),Ie?Xt():Kt())},Re=Ae,We={Line:Me,Circle:Re}},69582:function(mn,dn,st){"use strict";st.d(dn,{ZP:function(){return me}});var pt=st(52487),Dt=st(59301),oe=st(47273),Ge=0,De=(0,oe.Z)();function fe(){var ke;return De?(ke=Ge,Ge+=1):ke="TEST_OR_SSR",ke}function me(ke){var Ce=Dt.useState(),Se=(0,pt.Z)(Ce,2),Me=Se[0],ve=Se[1];return Dt.useEffect(function(){ve("rc_select_".concat(fe()))},[]),ke||Me}},45560:function(mn,dn,st){"use strict";st.d(dn,{Ac:function(){return Ut},Xo:function(){return tn},Wx:function(){return En},ZP:function(){return er},lk:function(){return ue}});var pt=st(72308),Dt=st(80702),oe=st(49618),Ge=st(77321),De=st(52487),fe=st(74416),me=st(62853),ke=st(18929),Ce=st(48736),Se=st(59301),Me=st(92310),ve=st.n(Me),we=st(34280),de=st(49658),z=st(8654),ee=function(qt){var Qn=qt.className,Ot=qt.customizeIcon,vn=qt.customizeIconProps,_n=qt.children,qn=qt.onMouseDown,an=qt.onClick,Un=typeof Ot=="function"?Ot(vn):Ot;return Se.createElement("span",{className:Qn,onMouseDown:function(On){On.preventDefault(),qn==null||qn(On)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:an,"aria-hidden":!0},Un!==void 0?Un:Se.createElement("span",{className:ve()(Qn.split(/\s+/).map(function(Kn){return"".concat(Kn,"-icon")}))},_n))},ae=ee,ie=function(qt,Qn,Ot,vn,_n){var qn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,an=arguments.length>6?arguments[6]:void 0,Un=arguments.length>7?arguments[7]:void 0,Kn=Se.useMemo(function(){if((0,me.Z)(vn)==="object")return vn.clearIcon;if(_n)return _n},[vn,_n]),On=Se.useMemo(function(){return!!(!qn&&vn&&(Ot.length||an)&&!(Un==="combobox"&&an===""))},[vn,qn,Ot.length,an,Un]);return{allowClear:On,clearIcon:Se.createElement(ae,{className:"".concat(qt,"-clear"),onMouseDown:Qn,customizeIcon:Kn},"\xD7")}},le=Se.createContext(null);function ue(){return Se.useContext(le)}function ge(){var rn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,qt=Se.useState(!1),Qn=(0,De.Z)(qt,2),Ot=Qn[0],vn=Qn[1],_n=Se.useRef(null),qn=function(){window.clearTimeout(_n.current)};Se.useEffect(function(){return qn},[]);var an=function(Kn,On){qn(),_n.current=window.setTimeout(function(){vn(Kn),On&&On()},rn)};return[Ot,an,qn]}function Pe(){var rn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,qt=Se.useRef(null),Qn=Se.useRef(null);Se.useEffect(function(){return function(){window.clearTimeout(Qn.current)}},[]);function Ot(vn){(vn||qt.current===null)&&(qt.current=vn),window.clearTimeout(Qn.current),Qn.current=window.setTimeout(function(){qt.current=null},rn)}return[function(){return qt.current},Ot]}function je(rn,qt,Qn,Ot){var vn=Se.useRef(null);vn.current={open:qt,triggerOpen:Qn,customizedTrigger:Ot},Se.useEffect(function(){function _n(qn){var an;if(!((an=vn.current)!==null&&an!==void 0&&an.customizedTrigger)){var Un=qn.target;Un.shadowRoot&&qn.composed&&(Un=qn.composedPath()[0]||Un),vn.current.open&&rn().filter(function(Kn){return Kn}).every(function(Kn){return!Kn.contains(Un)&&Kn!==Un})&&vn.current.triggerOpen(!1)}}return window.addEventListener("mousedown",_n),function(){return window.removeEventListener("mousedown",_n)}},[])}var Be=st(10228);function Fe(rn){return rn&&![Be.Z.ESC,Be.Z.SHIFT,Be.Z.BACKSPACE,Be.Z.TAB,Be.Z.WIN_KEY,Be.Z.ALT,Be.Z.META,Be.Z.WIN_KEY_RIGHT,Be.Z.CTRL,Be.Z.SEMICOLON,Be.Z.EQUALS,Be.Z.CAPS_LOCK,Be.Z.CONTEXT_MENU,Be.Z.F1,Be.Z.F2,Be.Z.F3,Be.Z.F4,Be.Z.F5,Be.Z.F6,Be.Z.F7,Be.Z.F8,Be.Z.F9,Be.Z.F10,Be.Z.F11,Be.Z.F12].includes(rn)}var Ne=st(26112),Ae=st(11780),Re=function(qt,Qn){var Ot,vn=qt.prefixCls,_n=qt.id,qn=qt.inputElement,an=qt.disabled,Un=qt.tabIndex,Kn=qt.autoFocus,On=qt.autoComplete,ur=qt.editable,$n=qt.activeDescendantId,Wn=qt.value,hr=qt.maxLength,Rr=qt.onKeyDown,br=qt.onMouseDown,Pr=qt.onChange,hn=qt.onPaste,Pi=qt.onCompositionStart,qr=qt.onCompositionEnd,ki=qt.onBlur,un=qt.open,Xn=qt.attrs,cr=qn||Se.createElement("input",null),ar=cr,xr=ar.ref,Tr=ar.props,Wr=Tr.onKeyDown,$r=Tr.onChange,ni=Tr.onMouseDown,ai=Tr.onCompositionStart,yn=Tr.onCompositionEnd,Ci=Tr.onBlur,xn=Tr.style;return(0,Ce.Kp)(!("maxLength"in cr.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),cr=Se.cloneElement(cr,(0,Ge.Z)((0,Ge.Z)((0,Ge.Z)({type:"search"},Tr),{},{id:_n,ref:(0,z.sQ)(Qn,xr),disabled:an,tabIndex:Un,autoComplete:On||"off",autoFocus:Kn,className:ve()("".concat(vn,"-selection-search-input"),(Ot=cr)===null||Ot===void 0||(Ot=Ot.props)===null||Ot===void 0?void 0:Ot.className),role:"combobox","aria-expanded":un||!1,"aria-haspopup":"listbox","aria-owns":"".concat(_n,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(_n,"_list"),"aria-activedescendant":un?$n:void 0},Xn),{},{value:ur?Wn:"",maxLength:hr,readOnly:!ur,unselectable:ur?null:"on",style:(0,Ge.Z)((0,Ge.Z)({},xn),{},{opacity:ur?null:0}),onKeyDown:function(Nr){Rr(Nr),Wr&&Wr(Nr)},onMouseDown:function(Nr){br(Nr),ni&&ni(Nr)},onChange:function(Nr){Pr(Nr),$r&&$r(Nr)},onCompositionStart:function(Nr){Pi(Nr),ai&&ai(Nr)},onCompositionEnd:function(Nr){qr(Nr),yn&&yn(Nr)},onPaste:hn,onBlur:function(Nr){ki(Nr),Ci&&Ci(Nr)}})),cr},We=Se.forwardRef(Re),Ye=We;function Ue(rn){return Array.isArray(rn)?rn:rn!==void 0?[rn]:[]}var Ke=typeof window!="undefined"&&window.document&&window.document.documentElement,ot=Ke;function ut(rn){return rn!=null}function ft(rn){return!rn&&rn!==0}function wt(rn){return["string","number"].includes((0,me.Z)(rn))}function Je(rn){var qt=void 0;return rn&&(wt(rn.title)?qt=rn.title.toString():wt(rn.label)&&(qt=rn.label.toString())),qt}function nt(rn,qt){ot?Se.useLayoutEffect(rn,qt):Se.useEffect(rn,qt)}function xt(rn){var qt;return(qt=rn.key)!==null&&qt!==void 0?qt:rn.value}var Pt=function(qt){qt.preventDefault(),qt.stopPropagation()},Ct=function(qt){var Qn=qt.id,Ot=qt.prefixCls,vn=qt.values,_n=qt.open,qn=qt.searchValue,an=qt.autoClearSearchValue,Un=qt.inputRef,Kn=qt.placeholder,On=qt.disabled,ur=qt.mode,$n=qt.showSearch,Wn=qt.autoFocus,hr=qt.autoComplete,Rr=qt.activeDescendantId,br=qt.tabIndex,Pr=qt.removeIcon,hn=qt.maxTagCount,Pi=qt.maxTagTextLength,qr=qt.maxTagPlaceholder,ki=qr===void 0?function(Yn){return"+ ".concat(Yn.length," ...")}:qr,un=qt.tagRender,Xn=qt.onToggleOpen,cr=qt.onRemove,ar=qt.onInputChange,xr=qt.onInputPaste,Tr=qt.onInputKeyDown,Wr=qt.onInputMouseDown,$r=qt.onInputCompositionStart,ni=qt.onInputCompositionEnd,ai=qt.onInputBlur,yn=Se.useRef(null),Ci=(0,Se.useState)(0),xn=(0,De.Z)(Ci,2),yr=xn[0],Nr=xn[1],Yr=(0,Se.useState)(!1),Zi=(0,De.Z)(Yr,2),zi=Zi[0],bi=Zi[1],ji="".concat(Ot,"-selection"),Qt=_n||ur==="multiple"&&an===!1||ur==="tags"?qn:"",Sn=ur==="tags"||ur==="multiple"&&an===!1||$n&&(_n||zi);nt(function(){Nr(yn.current.scrollWidth)},[Qt]);var Jt=function(pn,jn,Dn,Gn,In){return Se.createElement("span",{title:Je(pn),className:ve()("".concat(ji,"-item"),(0,oe.Z)({},"".concat(ji,"-item-disabled"),Dn))},Se.createElement("span",{className:"".concat(ji,"-item-content")},jn),Gn&&Se.createElement(ae,{className:"".concat(ji,"-item-remove"),onMouseDown:Pt,onClick:In,customizeIcon:Pr},"\xD7"))},lt=function(pn,jn,Dn,Gn,In,gr){var or=function(fn){Pt(fn),Xn(!_n)};return Se.createElement("span",{onMouseDown:or},un({label:jn,value:pn,disabled:Dn,closable:Gn,onClose:In,isMaxTag:!!gr}))},Bn=function(pn){var jn=pn.disabled,Dn=pn.label,Gn=pn.value,In=!On&&!jn,gr=Dn;if(typeof Pi=="number"&&(typeof Dn=="string"||typeof Dn=="number")){var or=String(gr);or.length>Pi&&(gr="".concat(or.slice(0,Pi),"..."))}var Hn=function(nr){nr&&nr.stopPropagation(),cr(pn)};return typeof un=="function"?lt(Gn,gr,jn,In,Hn):Jt(pn,gr,jn,In,Hn)},sn=function(pn){if(!vn.length)return null;var jn=typeof ki=="function"?ki(pn):ki;return typeof un=="function"?lt(void 0,jn,!1,!1,void 0,!0):Jt({title:jn},jn,!1)},bn=Se.createElement("div",{className:"".concat(ji,"-search"),style:{width:yr},onFocus:function(){bi(!0)},onBlur:function(){bi(!1)}},Se.createElement(Ye,{ref:Un,open:_n,prefixCls:Ot,id:Qn,inputElement:null,disabled:On,autoFocus:Wn,autoComplete:hr,editable:Sn,activeDescendantId:Rr,value:Qt,onKeyDown:Tr,onMouseDown:Wr,onChange:ar,onPaste:xr,onCompositionStart:$r,onCompositionEnd:ni,onBlur:ai,tabIndex:br,attrs:(0,Ne.Z)(qt,!0)}),Se.createElement("span",{ref:yn,className:"".concat(ji,"-search-mirror"),"aria-hidden":!0},Qt,"\xA0")),zn=Se.createElement(Ae.Z,{prefixCls:"".concat(ji,"-overflow"),data:vn,renderItem:Bn,renderRest:sn,suffix:bn,itemKey:xt,maxCount:hn});return Se.createElement("span",{className:"".concat(ji,"-wrap")},zn,!vn.length&&!Qt&&Se.createElement("span",{className:"".concat(ji,"-placeholder")},Kn))},gt=Ct,dt=function(qt){var Qn=qt.inputElement,Ot=qt.prefixCls,vn=qt.id,_n=qt.inputRef,qn=qt.disabled,an=qt.autoFocus,Un=qt.autoComplete,Kn=qt.activeDescendantId,On=qt.mode,ur=qt.open,$n=qt.values,Wn=qt.placeholder,hr=qt.tabIndex,Rr=qt.showSearch,br=qt.searchValue,Pr=qt.activeValue,hn=qt.maxLength,Pi=qt.onInputKeyDown,qr=qt.onInputMouseDown,ki=qt.onInputChange,un=qt.onInputPaste,Xn=qt.onInputCompositionStart,cr=qt.onInputCompositionEnd,ar=qt.onInputBlur,xr=qt.title,Tr=Se.useState(!1),Wr=(0,De.Z)(Tr,2),$r=Wr[0],ni=Wr[1],ai=On==="combobox",yn=ai||Rr,Ci=$n[0],xn=br||"";ai&&Pr&&!$r&&(xn=Pr),Se.useEffect(function(){ai&&ni(!1)},[ai,Pr]);var yr=On!=="combobox"&&!ur&&!Rr?!1:!!xn,Nr=xr===void 0?Je(Ci):xr,Yr=Se.useMemo(function(){return Ci?null:Se.createElement("span",{className:"".concat(Ot,"-selection-placeholder"),style:yr?{visibility:"hidden"}:void 0},Wn)},[Ci,yr,Wn,Ot]);return Se.createElement("span",{className:"".concat(Ot,"-selection-wrap")},Se.createElement("span",{className:"".concat(Ot,"-selection-search")},Se.createElement(Ye,{ref:_n,prefixCls:Ot,id:vn,open:ur,inputElement:Qn,disabled:qn,autoFocus:an,autoComplete:Un,editable:yn,activeDescendantId:Kn,value:xn,onKeyDown:Pi,onMouseDown:qr,onChange:function(zi){ni(!0),ki(zi)},onPaste:un,onCompositionStart:Xn,onCompositionEnd:cr,onBlur:ar,tabIndex:hr,attrs:(0,Ne.Z)(qt,!0),maxLength:ai?hn:void 0})),!ai&&Ci?Se.createElement("span",{className:"".concat(Ot,"-selection-item"),title:Nr,style:yr?{visibility:"hidden"}:void 0},Ci.label):null,Yr)},ht=dt,Et=function(qt,Qn){var Ot=(0,Se.useRef)(null),vn=(0,Se.useRef)(!1),_n=qt.prefixCls,qn=qt.open,an=qt.mode,Un=qt.showSearch,Kn=qt.tokenWithEnter,On=qt.disabled,ur=qt.prefix,$n=qt.autoClearSearchValue,Wn=qt.onSearch,hr=qt.onSearchSubmit,Rr=qt.onToggleOpen,br=qt.onInputKeyDown,Pr=qt.onInputBlur,hn=qt.domRef;Se.useImperativeHandle(Qn,function(){return{focus:function(Nr){Ot.current.focus(Nr)},blur:function(){Ot.current.blur()}}});var Pi=Pe(0),qr=(0,De.Z)(Pi,2),ki=qr[0],un=qr[1],Xn=function(Nr){var Yr=Nr.which,Zi=Ot.current instanceof HTMLTextAreaElement;!Zi&&qn&&(Yr===Be.Z.UP||Yr===Be.Z.DOWN)&&Nr.preventDefault(),br&&br(Nr),Yr===Be.Z.ENTER&&an==="tags"&&!vn.current&&!qn&&(hr==null||hr(Nr.target.value)),!(Zi&&!qn&&~[Be.Z.UP,Be.Z.DOWN,Be.Z.LEFT,Be.Z.RIGHT].indexOf(Yr))&&Fe(Yr)&&Rr(!0)},cr=function(){un(!0)},ar=(0,Se.useRef)(null),xr=function(Nr){Wn(Nr,!0,vn.current)!==!1&&Rr(!0)},Tr=function(){vn.current=!0},Wr=function(Nr){vn.current=!1,an!=="combobox"&&xr(Nr.target.value)},$r=function(Nr){var Yr=Nr.target.value;if(Kn&&ar.current&&/[\r\n]/.test(ar.current)){var Zi=ar.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Yr=Yr.replace(Zi,ar.current)}ar.current=null,xr(Yr)},ni=function(Nr){var Yr=Nr.clipboardData,Zi=Yr==null?void 0:Yr.getData("text");ar.current=Zi||""},ai=function(Nr){var Yr=Nr.target;if(Yr!==Ot.current){var Zi=document.body.style.msTouchAction!==void 0;Zi?setTimeout(function(){Ot.current.focus()}):Ot.current.focus()}},yn=function(Nr){var Yr=ki();Nr.target!==Ot.current&&!Yr&&!(an==="combobox"&&On)&&Nr.preventDefault(),(an!=="combobox"&&(!Un||!Yr)||!qn)&&(qn&&$n!==!1&&Wn("",!0,!1),Rr())},Ci={inputRef:Ot,onInputKeyDown:Xn,onInputMouseDown:cr,onInputChange:$r,onInputPaste:ni,onInputCompositionStart:Tr,onInputCompositionEnd:Wr,onInputBlur:Pr},xn=an==="multiple"||an==="tags"?Se.createElement(gt,(0,pt.Z)({},qt,Ci)):Se.createElement(ht,(0,pt.Z)({},qt,Ci));return Se.createElement("div",{ref:hn,className:"".concat(_n,"-selector"),onClick:ai,onMouseDown:yn},ur&&Se.createElement("div",{className:"".concat(_n,"-prefix")},ur),xn)},St=Se.forwardRef(Et),Ft=St,mt=st(65352),yt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],tt=function(qt){var Qn=qt===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Qn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Qn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Qn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Qn,adjustY:1},htmlRegion:"scroll"}}},Ve=function(qt,Qn){var Ot=qt.prefixCls,vn=qt.disabled,_n=qt.visible,qn=qt.children,an=qt.popupElement,Un=qt.animation,Kn=qt.transitionName,On=qt.dropdownStyle,ur=qt.dropdownClassName,$n=qt.direction,Wn=$n===void 0?"ltr":$n,hr=qt.placement,Rr=qt.builtinPlacements,br=qt.dropdownMatchSelectWidth,Pr=qt.dropdownRender,hn=qt.dropdownAlign,Pi=qt.getPopupContainer,qr=qt.empty,ki=qt.getTriggerDOMNode,un=qt.onPopupVisibleChange,Xn=qt.onPopupMouseEnter,cr=(0,fe.Z)(qt,yt),ar="".concat(Ot,"-dropdown"),xr=an;Pr&&(xr=Pr(an));var Tr=Se.useMemo(function(){return Rr||tt(br)},[Rr,br]),Wr=Un?"".concat(ar,"-").concat(Un):Kn,$r=typeof br=="number",ni=Se.useMemo(function(){return $r?null:br===!1?"minWidth":"width"},[br,$r]),ai=On;$r&&(ai=(0,Ge.Z)((0,Ge.Z)({},ai),{},{width:br}));var yn=Se.useRef(null);return Se.useImperativeHandle(Qn,function(){return{getPopupElement:function(){var xn;return(xn=yn.current)===null||xn===void 0?void 0:xn.popupElement}}}),Se.createElement(mt.Z,(0,pt.Z)({},cr,{showAction:un?["click"]:[],hideAction:un?["click"]:[],popupPlacement:hr||(Wn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Tr,prefixCls:ar,popupTransitionName:Wr,popup:Se.createElement("div",{onMouseEnter:Xn},xr),ref:yn,stretch:ni,popupAlign:hn,popupVisible:_n,getPopupContainer:Pi,popupClassName:ve()(ur,(0,oe.Z)({},"".concat(ar,"-empty"),qr)),popupStyle:ai,getTriggerDOMNode:ki,onPopupVisibleChange:un}),qn)},xe=Se.forwardRef(Ve),Le=xe,Xe=st(68413);function rt(rn,qt){var Qn=rn.key,Ot;return"value"in rn&&(Ot=rn.value),Qn!=null?Qn:Ot!==void 0?Ot:"rc-index-key-".concat(qt)}function Ie(rn){return typeof rn!="undefined"&&!Number.isNaN(rn)}function _e(rn,qt){var Qn=rn||{},Ot=Qn.label,vn=Qn.value,_n=Qn.options,qn=Qn.groupLabel,an=Ot||(qt?"children":"label");return{label:an,value:vn||"value",options:_n||"options",groupLabel:qn||an}}function He(rn){var qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Qn=qt.fieldNames,Ot=qt.childrenAsData,vn=[],_n=_e(Qn,!1),qn=_n.label,an=_n.value,Un=_n.options,Kn=_n.groupLabel;function On(ur,$n){Array.isArray(ur)&&ur.forEach(function(Wn){if($n||!(Un in Wn)){var hr=Wn[an];vn.push({key:rt(Wn,vn.length),groupOption:$n,data:Wn,label:Wn[qn],value:hr})}else{var Rr=Wn[Kn];Rr===void 0&&Ot&&(Rr=Wn.label),vn.push({key:rt(Wn,vn.length),group:!0,data:Wn,label:Rr}),On(Wn[Un],!0)}})}return On(rn,!1),vn}function Qe(rn){var qt=(0,Ge.Z)({},rn);return"props"in qt||Object.defineProperty(qt,"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`."),qt}}),qt}var ct=function(qt,Qn,Ot){if(!Qn||!Qn.length)return null;var vn=!1,_n=function an(Un,Kn){var On=(0,Xe.Z)(Kn),ur=On[0],$n=On.slice(1);if(!ur)return[Un];var Wn=Un.split(ur);return vn=vn||Wn.length>1,Wn.reduce(function(hr,Rr){return[].concat((0,Dt.Z)(hr),(0,Dt.Z)(an(Rr,$n)))},[]).filter(Boolean)},qn=_n(qt,Qn);return vn?typeof Ot!="undefined"?qn.slice(0,Ot):qn:null},at=Se.createContext(null),At=at;function Lt(rn){var qt=rn.visible,Qn=rn.values;if(!qt)return null;var Ot=50;return Se.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Qn.slice(0,Ot).map(function(vn){var _n=vn.label,qn=vn.value;return["number","string"].includes((0,me.Z)(_n))?_n:qn}).join(", ")),Qn.length>Ot?", ...":null)}var It=["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"],Kt=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Xt=function(qt){return qt==="tags"||qt==="multiple"},$t=Se.forwardRef(function(rn,qt){var Qn,Ot=rn.id,vn=rn.prefixCls,_n=rn.className,qn=rn.showSearch,an=rn.tagRender,Un=rn.direction,Kn=rn.omitDomProps,On=rn.displayValues,ur=rn.onDisplayValuesChange,$n=rn.emptyOptions,Wn=rn.notFoundContent,hr=Wn===void 0?"Not Found":Wn,Rr=rn.onClear,br=rn.mode,Pr=rn.disabled,hn=rn.loading,Pi=rn.getInputElement,qr=rn.getRawInputElement,ki=rn.open,un=rn.defaultOpen,Xn=rn.onDropdownVisibleChange,cr=rn.activeValue,ar=rn.onActiveValueChange,xr=rn.activeDescendantId,Tr=rn.searchValue,Wr=rn.autoClearSearchValue,$r=rn.onSearch,ni=rn.onSearchSplit,ai=rn.tokenSeparators,yn=rn.allowClear,Ci=rn.prefix,xn=rn.suffixIcon,yr=rn.clearIcon,Nr=rn.OptionList,Yr=rn.animation,Zi=rn.transitionName,zi=rn.dropdownStyle,bi=rn.dropdownClassName,ji=rn.dropdownMatchSelectWidth,Qt=rn.dropdownRender,Sn=rn.dropdownAlign,Jt=rn.placement,lt=rn.builtinPlacements,Bn=rn.getPopupContainer,sn=rn.showAction,bn=sn===void 0?[]:sn,zn=rn.onFocus,Yn=rn.onBlur,pn=rn.onKeyUp,jn=rn.onKeyDown,Dn=rn.onMouseDown,Gn=(0,fe.Z)(rn,It),In=Xt(br),gr=(qn!==void 0?qn:In)||br==="combobox",or=(0,Ge.Z)({},Gn);Kt.forEach(function(uo){delete or[uo]}),Kn==null||Kn.forEach(function(uo){delete or[uo]});var Hn=Se.useState(!1),fn=(0,De.Z)(Hn,2),nr=fn[0],kr=fn[1];Se.useEffect(function(){kr((0,de.Z)())},[]);var ei=Se.useRef(null),Zr=Se.useRef(null),ri=Se.useRef(null),li=Se.useRef(null),ii=Se.useRef(null),Oi=Se.useRef(!1),Di=ge(),po=(0,De.Z)(Di,3),Yt=po[0],ci=po[1],pi=po[2];Se.useImperativeHandle(qt,function(){var uo,Ni;return{focus:(uo=li.current)===null||uo===void 0?void 0:uo.focus,blur:(Ni=li.current)===null||Ni===void 0?void 0:Ni.blur,scrollTo:function(la){var Qo;return(Qo=ii.current)===null||Qo===void 0?void 0:Qo.scrollTo(la)},nativeElement:ei.current||Zr.current}});var Hr=Se.useMemo(function(){var uo;if(br!=="combobox")return Tr;var Ni=(uo=On[0])===null||uo===void 0?void 0:uo.value;return typeof Ni=="string"||typeof Ni=="number"?String(Ni):""},[Tr,br,On]),Si=br==="combobox"&&typeof Pi=="function"&&Pi()||null,_r=typeof qr=="function"&&qr(),qi=(0,z.x1)(Zr,_r==null||(Qn=_r.props)===null||Qn===void 0?void 0:Qn.ref),Bi=Se.useState(!1),gi=(0,De.Z)(Bi,2),Qi=gi[0],ga=gi[1];(0,we.Z)(function(){ga(!0)},[]);var Ao=(0,ke.Z)(!1,{defaultValue:un,value:ki}),Aa=(0,De.Z)(Ao,2),ma=Aa[0],Dr=Aa[1],eo=Qi?ma:!1,Co=!hr&&$n;(Pr||Co&&eo&&br==="combobox")&&(eo=!1);var Jo=Co?!1:eo,xi=Se.useCallback(function(uo){var Ni=uo!==void 0?uo:!eo;Pr||(Dr(Ni),eo!==Ni&&(Xn==null||Xn(Ni)))},[Pr,eo,Dr,Xn]),mi=Se.useMemo(function(){return(ai||[]).some(function(uo){return[`
`,`\r
`].includes(uo)})},[ai]),Nn=Se.useContext(At)||{},zr=Nn.maxCount,wi=Nn.rawValues,co=function(Ni,Gi,la){if(!(In&&Ie(zr)&&(wi==null?void 0:wi.size)>=zr)){var Qo=!0,qo=Ni;ar==null||ar(null);var Mr=ct(Ni,ai,Ie(zr)?zr-wi.size:void 0),As=la?null:Mr;return br!=="combobox"&&As&&(qo="",ni==null||ni(As),xi(!1),Qo=!1),$r&&Hr!==qo&&$r(qo,{source:Gi?"typing":"effect"}),Qo}},Pa=function(Ni){!Ni||!Ni.trim()||$r(Ni,{source:"submit"})};Se.useEffect(function(){!eo&&!In&&br!=="combobox"&&co("",!1,!1)},[eo]),Se.useEffect(function(){ma&&Pr&&Dr(!1),Pr&&!Oi.current&&ci(!1)},[Pr]);var aa=Pe(),ti=(0,De.Z)(aa,2),Ho=ti[0],Ko=ti[1],jo=Se.useRef(!1),io=function(Ni){var Gi=Ho(),la=Ni.key,Qo=la==="Enter";if(Qo&&(br!=="combobox"&&Ni.preventDefault(),eo||xi(!0)),Ko(!!Hr),la==="Backspace"&&!Gi&&In&&!Hr&&On.length){for(var qo=(0,Dt.Z)(On),Mr=null,As=qo.length-1;As>=0;As-=1){var Gt=qo[As];if(!Gt.disabled){qo.splice(As,1),Mr=Gt;break}}Mr&&ur(qo,{type:"remove",values:[Mr]})}for(var Mn=arguments.length,Ll=new Array(Mn>1?Mn-1:0),Ou=1;Ou<Mn;Ou++)Ll[Ou-1]=arguments[Ou];if(eo&&(!Qo||!jo.current)){var ua;Qo&&(jo.current=!0),(ua=ii.current)===null||ua===void 0||ua.onKeyDown.apply(ua,[Ni].concat(Ll))}jn==null||jn.apply(void 0,[Ni].concat(Ll))},ba=function(Ni){for(var Gi=arguments.length,la=new Array(Gi>1?Gi-1:0),Qo=1;Qo<Gi;Qo++)la[Qo-1]=arguments[Qo];if(eo){var qo;(qo=ii.current)===null||qo===void 0||qo.onKeyUp.apply(qo,[Ni].concat(la))}Ni.key==="Enter"&&(jo.current=!1),pn==null||pn.apply(void 0,[Ni].concat(la))},is=function(Ni){var Gi=On.filter(function(la){return la!==Ni});ur(Gi,{type:"remove",values:[Ni]})},fo=function(){jo.current=!1},os=Se.useRef(!1),Gs=function(){ci(!0),Pr||(zn&&!os.current&&zn.apply(void 0,arguments),bn.includes("focus")&&xi(!0)),os.current=!0},Mu=function(){Oi.current=!0,ci(!1,function(){os.current=!1,Oi.current=!1,xi(!1)}),!Pr&&(Hr&&(br==="tags"?$r(Hr,{source:"submit"}):br==="multiple"&&$r("",{source:"blur"})),Yn&&Yn.apply(void 0,arguments))},Wo=[];Se.useEffect(function(){return function(){Wo.forEach(function(uo){return clearTimeout(uo)}),Wo.splice(0,Wo.length)}},[]);var th=function(Ni){var Gi,la=Ni.target,Qo=(Gi=ri.current)===null||Gi===void 0?void 0:Gi.getPopupElement();if(Qo&&Qo.contains(la)){var qo=setTimeout(function(){var Mn=Wo.indexOf(qo);if(Mn!==-1&&Wo.splice(Mn,1),pi(),!nr&&!Qo.contains(document.activeElement)){var Ll;(Ll=li.current)===null||Ll===void 0||Ll.focus()}});Wo.push(qo)}for(var Mr=arguments.length,As=new Array(Mr>1?Mr-1:0),Gt=1;Gt<Mr;Gt++)As[Gt-1]=arguments[Gt];Dn==null||Dn.apply(void 0,[Ni].concat(As))},Lu=Se.useState({}),Nu=(0,De.Z)(Lu,2),gl=Nu[1];function Ns(){gl({})}var Ml;_r&&(Ml=function(Ni){xi(Ni)}),je(function(){var uo;return[ei.current,(uo=ri.current)===null||uo===void 0?void 0:uo.getPopupElement()]},Jo,xi,!!_r);var nh=Se.useMemo(function(){return(0,Ge.Z)((0,Ge.Z)({},rn),{},{notFoundContent:hr,open:eo,triggerOpen:Jo,id:Ot,showSearch:gr,multiple:In,toggleOpen:xi})},[rn,hr,Jo,eo,Ot,gr,In,xi]),Au=!!xn||hn,Vo;Au&&(Vo=Se.createElement(ae,{className:ve()("".concat(vn,"-arrow"),(0,oe.Z)({},"".concat(vn,"-arrow-loading"),hn)),customizeIcon:xn,customizeIconProps:{loading:hn,searchValue:Hr,open:eo,focused:Yt,showSearch:gr}}));var ju=function(){var Ni;Rr==null||Rr(),(Ni=li.current)===null||Ni===void 0||Ni.focus(),ur([],{type:"clear",values:On}),co("",!1,!1)},rh=ie(vn,ju,On,yn,yr,Pr,Hr,br),iu=rh.allowClear,ou=rh.clearIcon,ja=Se.createElement(Nr,{ref:ii}),Oa=ve()(vn,_n,(0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)({},"".concat(vn,"-focused"),Yt),"".concat(vn,"-multiple"),In),"".concat(vn,"-single"),!In),"".concat(vn,"-allow-clear"),yn),"".concat(vn,"-show-arrow"),Au),"".concat(vn,"-disabled"),Pr),"".concat(vn,"-loading"),hn),"".concat(vn,"-open"),eo),"".concat(vn,"-customize-input"),Si),"".concat(vn,"-show-search"),gr)),na=Se.createElement(Le,{ref:ri,disabled:Pr,prefixCls:vn,visible:Jo,popupElement:ja,animation:Yr,transitionName:Zi,dropdownStyle:zi,dropdownClassName:bi,direction:Un,dropdownMatchSelectWidth:ji,dropdownRender:Qt,dropdownAlign:Sn,placement:Jt,builtinPlacements:lt,getPopupContainer:Bn,empty:$n,getTriggerDOMNode:function(Ni){return Zr.current||Ni},onPopupVisibleChange:Ml,onPopupMouseEnter:Ns},_r?Se.cloneElement(_r,{ref:qi}):Se.createElement(Ft,(0,pt.Z)({},rn,{domRef:Zr,prefixCls:vn,inputElement:Si,ref:li,id:Ot,prefix:Ci,showSearch:gr,autoClearSearchValue:Wr,mode:br,activeDescendantId:xr,tagRender:an,values:On,open:eo,onToggleOpen:xi,activeValue:cr,searchValue:Hr,onSearch:co,onSearchSubmit:Pa,onRemove:is,tokenWithEnter:mi,onInputBlur:fo}))),sa;return _r?sa=na:sa=Se.createElement("div",(0,pt.Z)({className:Oa},or,{ref:ei,onMouseDown:th,onKeyDown:io,onKeyUp:ba,onFocus:Gs,onBlur:Mu}),Se.createElement(Lt,{visible:Yt&&!eo,values:On}),na,Vo,iu&&ou),Se.createElement(le.Provider,{value:nh},sa)}),Ut=$t,ln=function(){return null};ln.isSelectOptGroup=!0;var tn=ln,Wt=function(){return null};Wt.isSelectOption=!0;var En=Wt,Pn=st(80547),Ln=st(2738),Vn=st(45680);function Or(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var dr=["disabled","title","children","style","className"];function Lr(rn){return typeof rn=="string"||typeof rn=="number"}var Xr=function(qt,Qn){var Ot=ue(),vn=Ot.prefixCls,_n=Ot.id,qn=Ot.open,an=Ot.multiple,Un=Ot.mode,Kn=Ot.searchValue,On=Ot.toggleOpen,ur=Ot.notFoundContent,$n=Ot.onPopupScroll,Wn=Se.useContext(At),hr=Wn.maxCount,Rr=Wn.flattenOptions,br=Wn.onActiveValue,Pr=Wn.defaultActiveFirstOption,hn=Wn.onSelect,Pi=Wn.menuItemSelectedIcon,qr=Wn.rawValues,ki=Wn.fieldNames,un=Wn.virtual,Xn=Wn.direction,cr=Wn.listHeight,ar=Wn.listItemHeight,xr=Wn.optionRender,Tr="".concat(vn,"-item"),Wr=(0,Pn.Z)(function(){return Rr},[qn,Rr],function(sn,bn){return bn[0]&&sn[1]!==bn[1]}),$r=Se.useRef(null),ni=Se.useMemo(function(){return an&&Ie(hr)&&(qr==null?void 0:qr.size)>=hr},[an,hr,qr==null?void 0:qr.size]),ai=function(bn){bn.preventDefault()},yn=function(bn){var zn;(zn=$r.current)===null||zn===void 0||zn.scrollTo(typeof bn=="number"?{index:bn}:bn)},Ci=Se.useCallback(function(sn){return Un==="combobox"?!1:qr.has(sn)},[Un,(0,Dt.Z)(qr).toString(),qr.size]),xn=function(bn){for(var zn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Yn=Wr.length,pn=0;pn<Yn;pn+=1){var jn=(bn+pn*zn+Yn)%Yn,Dn=Wr[jn]||{},Gn=Dn.group,In=Dn.data;if(!Gn&&!(In!=null&&In.disabled)&&(Ci(In.value)||!ni))return jn}return-1},yr=Se.useState(function(){return xn(0)}),Nr=(0,De.Z)(yr,2),Yr=Nr[0],Zi=Nr[1],zi=function(bn){var zn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Zi(bn);var Yn={source:zn?"keyboard":"mouse"},pn=Wr[bn];if(!pn){br(null,-1,Yn);return}br(pn.value,bn,Yn)};(0,Se.useEffect)(function(){zi(Pr!==!1?xn(0):-1)},[Wr.length,Kn]);var bi=Se.useCallback(function(sn){return Un==="combobox"?String(sn).toLowerCase()===Kn.toLowerCase():qr.has(sn)},[Un,Kn,(0,Dt.Z)(qr).toString(),qr.size]);(0,Se.useEffect)(function(){var sn=setTimeout(function(){if(!an&&qn&&qr.size===1){var zn=Array.from(qr)[0],Yn=Wr.findIndex(function(pn){var jn=pn.data;return jn.value===zn});Yn!==-1&&(zi(Yn),yn(Yn))}});if(qn){var bn;(bn=$r.current)===null||bn===void 0||bn.scrollTo(void 0)}return function(){return clearTimeout(sn)}},[qn,Kn]);var ji=function(bn){bn!==void 0&&hn(bn,{selected:!qr.has(bn)}),an||On(!1)};if(Se.useImperativeHandle(Qn,function(){return{onKeyDown:function(bn){var zn=bn.which,Yn=bn.ctrlKey;switch(zn){case Be.Z.N:case Be.Z.P:case Be.Z.UP:case Be.Z.DOWN:{var pn=0;if(zn===Be.Z.UP?pn=-1:zn===Be.Z.DOWN?pn=1:Or()&&Yn&&(zn===Be.Z.N?pn=1:zn===Be.Z.P&&(pn=-1)),pn!==0){var jn=xn(Yr+pn,pn);yn(jn),zi(jn,!0)}break}case Be.Z.TAB:case Be.Z.ENTER:{var Dn,Gn=Wr[Yr];Gn&&!(Gn!=null&&(Dn=Gn.data)!==null&&Dn!==void 0&&Dn.disabled)&&!ni?ji(Gn.value):ji(void 0),qn&&bn.preventDefault();break}case Be.Z.ESC:On(!1),qn&&bn.stopPropagation()}},onKeyUp:function(){},scrollTo:function(bn){yn(bn)}}}),Wr.length===0)return Se.createElement("div",{role:"listbox",id:"".concat(_n,"_list"),className:"".concat(Tr,"-empty"),onMouseDown:ai},ur);var Qt=Object.keys(ki).map(function(sn){return ki[sn]}),Sn=function(bn){return bn.label};function Jt(sn,bn){var zn=sn.group;return{role:zn?"presentation":"option",id:"".concat(_n,"_list_").concat(bn)}}var lt=function(bn){var zn=Wr[bn];if(!zn)return null;var Yn=zn.data||{},pn=Yn.value,jn=zn.group,Dn=(0,Ne.Z)(Yn,!0),Gn=Sn(zn);return zn?Se.createElement("div",(0,pt.Z)({"aria-label":typeof Gn=="string"&&!jn?Gn:null},Dn,{key:bn},Jt(zn,bn),{"aria-selected":bi(pn)}),pn):null},Bn={role:"listbox",id:"".concat(_n,"_list")};return Se.createElement(Se.Fragment,null,un&&Se.createElement("div",(0,pt.Z)({},Bn,{style:{height:0,width:0,overflow:"hidden"}}),lt(Yr-1),lt(Yr),lt(Yr+1)),Se.createElement(Vn.Z,{itemKey:"key",ref:$r,data:Wr,height:cr,itemHeight:ar,fullHeight:!1,onMouseDown:ai,onScroll:$n,virtual:un,direction:Xn,innerProps:un?null:Bn},function(sn,bn){var zn=sn.group,Yn=sn.groupOption,pn=sn.data,jn=sn.label,Dn=sn.value,Gn=pn.key;if(zn){var In,gr=(In=pn.title)!==null&&In!==void 0?In:Lr(jn)?jn.toString():void 0;return Se.createElement("div",{className:ve()(Tr,"".concat(Tr,"-group"),pn.className),title:gr},jn!==void 0?jn:Gn)}var or=pn.disabled,Hn=pn.title,fn=pn.children,nr=pn.style,kr=pn.className,ei=(0,fe.Z)(pn,dr),Zr=(0,Ln.Z)(ei,Qt),ri=Ci(Dn),li=or||!ri&&ni,ii="".concat(Tr,"-option"),Oi=ve()(Tr,ii,kr,(0,oe.Z)((0,oe.Z)((0,oe.Z)((0,oe.Z)({},"".concat(ii,"-grouped"),Yn),"".concat(ii,"-active"),Yr===bn&&!li),"".concat(ii,"-disabled"),li),"".concat(ii,"-selected"),ri)),Di=Sn(sn),po=!Pi||typeof Pi=="function"||ri,Yt=typeof Di=="number"?Di:Di||Dn,ci=Lr(Yt)?Yt.toString():void 0;return Hn!==void 0&&(ci=Hn),Se.createElement("div",(0,pt.Z)({},(0,Ne.Z)(Zr),un?{}:Jt(sn,bn),{"aria-selected":bi(Dn),className:Oi,title:ci,onMouseMove:function(){Yr===bn||li||zi(bn)},onClick:function(){li||ji(Dn)},style:nr}),Se.createElement("div",{className:"".concat(ii,"-content")},typeof xr=="function"?xr(sn,{index:bn}):Yt),Se.isValidElement(Pi)||ri,po&&Se.createElement(ae,{className:"".concat(Tr,"-option-state"),customizeIcon:Pi,customizeIconProps:{value:Dn,disabled:li,isSelected:ri}},ri?"\u2713":null))}))},Vr=Se.forwardRef(Xr),si=Vr,yi=function(rn,qt){var Qn=Se.useRef({values:new Map,options:new Map}),Ot=Se.useMemo(function(){var _n=Qn.current,qn=_n.values,an=_n.options,Un=rn.map(function(ur){if(ur.label===void 0){var $n;return(0,Ge.Z)((0,Ge.Z)({},ur),{},{label:($n=qn.get(ur.value))===null||$n===void 0?void 0:$n.label})}return ur}),Kn=new Map,On=new Map;return Un.forEach(function(ur){Kn.set(ur.value,ur),On.set(ur.value,qt.get(ur.value)||an.get(ur.value))}),Qn.current.values=Kn,Qn.current.options=On,Un},[rn,qt]),vn=Se.useCallback(function(_n){return qt.get(_n)||Qn.current.options.get(_n)},[qt]);return[Ot,vn]};function Ii(rn,qt){return Ue(rn).join("").toUpperCase().includes(qt)}var Fi=function(rn,qt,Qn,Ot,vn){return Se.useMemo(function(){if(!Qn||Ot===!1)return rn;var _n=qt.options,qn=qt.label,an=qt.value,Un=[],Kn=typeof Ot=="function",On=Qn.toUpperCase(),ur=Kn?Ot:function(Wn,hr){return vn?Ii(hr[vn],On):hr[_n]?Ii(hr[qn!=="children"?qn:"label"],On):Ii(hr[an],On)},$n=Kn?function(Wn){return Qe(Wn)}:function(Wn){return Wn};return rn.forEach(function(Wn){if(Wn[_n]){var hr=ur(Qn,$n(Wn));if(hr)Un.push(Wn);else{var Rr=Wn[_n].filter(function(br){return ur(Qn,$n(br))});Rr.length&&Un.push((0,Ge.Z)((0,Ge.Z)({},Wn),{},(0,oe.Z)({},_n,Rr)))}return}ur(Qn,$n(Wn))&&Un.push(Wn)}),Un},[rn,Ot,vn,Qn,qt])},_i=st(69582),Yi=st(11592),et=["children","value"],pr=["children"];function vr(rn){var qt=rn,Qn=qt.key,Ot=qt.props,vn=Ot.children,_n=Ot.value,qn=(0,fe.Z)(Ot,et);return(0,Ge.Z)({key:Qn,value:_n!==void 0?_n:Qn,children:vn},qn)}function Ei(rn){var qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Yi.Z)(rn).map(function(Qn,Ot){if(!Se.isValidElement(Qn)||!Qn.type)return null;var vn=Qn,_n=vn.type.isSelectOptGroup,qn=vn.key,an=vn.props,Un=an.children,Kn=(0,fe.Z)(an,pr);return qt||!_n?vr(Qn):(0,Ge.Z)((0,Ge.Z)({key:"__RC_SELECT_GRP__".concat(qn===null?Ot:qn,"__"),label:qn},Kn),{},{options:Ei(Un)})}).filter(function(Qn){return Qn})}var lr=function(qt,Qn,Ot,vn,_n){return Se.useMemo(function(){var qn=qt,an=!qt;an&&(qn=Ei(Qn));var Un=new Map,Kn=new Map,On=function(Wn,hr,Rr){Rr&&typeof Rr=="string"&&Wn.set(hr[Rr],hr)},ur=function $n(Wn){for(var hr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Rr=0;Rr<Wn.length;Rr+=1){var br=Wn[Rr];!br[Ot.options]||hr?(Un.set(br[Ot.value],br),On(Kn,br,Ot.label),On(Kn,br,vn),On(Kn,br,_n)):$n(br[Ot.options],!0)}};return ur(qn),{options:qn,valueOptions:Un,labelOptions:Kn}},[qt,Qn,Ot,vn,_n])},wr=lr;function Br(rn){var qt=Se.useRef();qt.current=rn;var Qn=Se.useCallback(function(){return qt.current.apply(qt,arguments)},[]);return Qn}function ro(rn){var qt=rn.mode,Qn=rn.options,Ot=rn.children,vn=rn.backfill,_n=rn.allowClear,qn=rn.placeholder,an=rn.getInputElement,Un=rn.showSearch,Kn=rn.onSearch,On=rn.defaultOpen,ur=rn.autoFocus,$n=rn.labelInValue,Wn=rn.value,hr=rn.inputValue,Rr=rn.optionLabelProp,br=isMultiple(qt),Pr=Un!==void 0?Un:br||qt==="combobox",hn=Qn||convertChildrenToData(Ot);if(warning(qt!=="tags"||hn.every(function(un){return!un.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),qt==="tags"||qt==="combobox"){var Pi=hn.some(function(un){return un.options?un.options.some(function(Xn){return typeof("value"in Xn?Xn.value:Xn.key)=="number"}):typeof("value"in un?un.value:un.key)=="number"});warning(!Pi,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(qt!=="combobox"||!Rr,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(qt==="combobox"||!vn,"`backfill` only works with `combobox` mode."),warning(qt==="combobox"||!an,"`getInputElement` only work with `combobox` mode."),noteOnce(qt!=="combobox"||!an||!_n||!qn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Kn&&!Pr&&qt!=="combobox"&&qt!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!On||ur,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Wn!=null){var qr=toArray(Wn);warning(!$n||qr.every(function(un){return _typeof(un)==="object"&&("key"in un||"value"in un)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!br||Array.isArray(Wn),"`value` should be array when `mode` is `multiple` or `tags`")}if(Ot){var ki=null;toNodeArray(Ot).some(function(un){if(!React.isValidElement(un)||!un.type)return!1;var Xn=un,cr=Xn.type;if(cr.isSelectOption)return!1;if(cr.isSelectOptGroup){var ar=toNodeArray(un.props.children).every(function(xr){return!React.isValidElement(xr)||!un.type||xr.type.isSelectOption?!0:(ki=xr.type,!1)});return!ar}return ki=cr,!0}),ki&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ki.displayName||ki.name||ki,"`.")),warning(hr===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Ur(rn,qt){if(rn){var Qn=function Ot(vn){for(var _n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,qn=0;qn<vn.length;qn++){var an=vn[qn];if(an[qt==null?void 0:qt.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!_n&&Array.isArray(an[qt==null?void 0:qt.options])&&Ot(an[qt==null?void 0:qt.options],!0))break}};Qn(rn)}}var on=null,nn=["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"],Zt=["inputValue"];function tr(rn){return!rn||(0,me.Z)(rn)!=="object"}var mr=Se.forwardRef(function(rn,qt){var Qn=rn.id,Ot=rn.mode,vn=rn.prefixCls,_n=vn===void 0?"rc-select":vn,qn=rn.backfill,an=rn.fieldNames,Un=rn.inputValue,Kn=rn.searchValue,On=rn.onSearch,ur=rn.autoClearSearchValue,$n=ur===void 0?!0:ur,Wn=rn.onSelect,hr=rn.onDeselect,Rr=rn.dropdownMatchSelectWidth,br=Rr===void 0?!0:Rr,Pr=rn.filterOption,hn=rn.filterSort,Pi=rn.optionFilterProp,qr=rn.optionLabelProp,ki=rn.options,un=rn.optionRender,Xn=rn.children,cr=rn.defaultActiveFirstOption,ar=rn.menuItemSelectedIcon,xr=rn.virtual,Tr=rn.direction,Wr=rn.listHeight,$r=Wr===void 0?200:Wr,ni=rn.listItemHeight,ai=ni===void 0?20:ni,yn=rn.labelRender,Ci=rn.value,xn=rn.defaultValue,yr=rn.labelInValue,Nr=rn.onChange,Yr=rn.maxCount,Zi=(0,fe.Z)(rn,nn),zi=(0,_i.ZP)(Qn),bi=Xt(Ot),ji=!!(!ki&&Xn),Qt=Se.useMemo(function(){return Pr===void 0&&Ot==="combobox"?!1:Pr},[Pr,Ot]),Sn=Se.useMemo(function(){return _e(an,ji)},[JSON.stringify(an),ji]),Jt=(0,ke.Z)("",{value:Kn!==void 0?Kn:Un,postState:function(mi){return mi||""}}),lt=(0,De.Z)(Jt,2),Bn=lt[0],sn=lt[1],bn=wr(ki,Xn,Sn,Pi,qr),zn=bn.valueOptions,Yn=bn.labelOptions,pn=bn.options,jn=Se.useCallback(function(xi){var mi=Ue(xi);return mi.map(function(Nn){var zr,wi,co,Pa,aa;if(tr(Nn))zr=Nn;else{var ti;co=Nn.key,wi=Nn.label,zr=(ti=Nn.value)!==null&&ti!==void 0?ti:co}var Ho=zn.get(zr);if(Ho){var Ko;if(wi===void 0&&(wi=Ho==null?void 0:Ho[qr||Sn.label]),co===void 0&&(co=(Ko=Ho==null?void 0:Ho.key)!==null&&Ko!==void 0?Ko:zr),Pa=Ho==null?void 0:Ho.disabled,aa=Ho==null?void 0:Ho.title,0)var jo}return{label:wi,value:zr,key:co,disabled:Pa,title:aa}})},[Sn,qr,zn]),Dn=(0,ke.Z)(xn,{value:Ci}),Gn=(0,De.Z)(Dn,2),In=Gn[0],gr=Gn[1],or=Se.useMemo(function(){var xi,mi=bi&&In===null?[]:In,Nn=jn(mi);return Ot==="combobox"&&ft((xi=Nn[0])===null||xi===void 0?void 0:xi.value)?[]:Nn},[In,jn,Ot,bi]),Hn=yi(or,zn),fn=(0,De.Z)(Hn,2),nr=fn[0],kr=fn[1],ei=Se.useMemo(function(){if(!Ot&&nr.length===1){var xi=nr[0];if(xi.value===null&&(xi.label===null||xi.label===void 0))return[]}return nr.map(function(mi){var Nn;return(0,Ge.Z)((0,Ge.Z)({},mi),{},{label:(Nn=typeof yn=="function"?yn(mi):mi.label)!==null&&Nn!==void 0?Nn:mi.value})})},[Ot,nr,yn]),Zr=Se.useMemo(function(){return new Set(nr.map(function(xi){return xi.value}))},[nr]);Se.useEffect(function(){if(Ot==="combobox"){var xi,mi=(xi=nr[0])===null||xi===void 0?void 0:xi.value;sn(ut(mi)?String(mi):"")}},[nr]);var ri=Br(function(xi,mi){var Nn=mi!=null?mi:xi;return(0,oe.Z)((0,oe.Z)({},Sn.value,xi),Sn.label,Nn)}),li=Se.useMemo(function(){if(Ot!=="tags")return pn;var xi=(0,Dt.Z)(pn),mi=function(zr){return zn.has(zr)};return(0,Dt.Z)(nr).sort(function(Nn,zr){return Nn.value<zr.value?-1:1}).forEach(function(Nn){var zr=Nn.value;mi(zr)||xi.push(ri(zr,Nn.label))}),xi},[ri,pn,zn,nr,Ot]),ii=Fi(li,Sn,Bn,Qt,Pi),Oi=Se.useMemo(function(){return Ot!=="tags"||!Bn||ii.some(function(xi){return xi[Pi||"value"]===Bn})||ii.some(function(xi){return xi[Sn.value]===Bn})?ii:[ri(Bn)].concat((0,Dt.Z)(ii))},[ri,Pi,Ot,ii,Bn,Sn]),Di=function xi(mi){var Nn=(0,Dt.Z)(mi).sort(function(zr,wi){return hn(zr,wi,{searchValue:Bn})});return Nn.map(function(zr){return Array.isArray(zr.options)?(0,Ge.Z)((0,Ge.Z)({},zr),{},{options:zr.options.length>0?xi(zr.options):zr.options}):zr})},po=Se.useMemo(function(){return hn?Di(Oi):Oi},[Oi,hn,Bn]),Yt=Se.useMemo(function(){return He(po,{fieldNames:Sn,childrenAsData:ji})},[po,Sn,ji]),ci=function(mi){var Nn=jn(mi);if(gr(Nn),Nr&&(Nn.length!==nr.length||Nn.some(function(co,Pa){var aa;return((aa=nr[Pa])===null||aa===void 0?void 0:aa.value)!==(co==null?void 0:co.value)}))){var zr=yr?Nn:Nn.map(function(co){return co.value}),wi=Nn.map(function(co){return Qe(kr(co.value))});Nr(bi?zr:zr[0],bi?wi:wi[0])}},pi=Se.useState(null),Hr=(0,De.Z)(pi,2),Si=Hr[0],_r=Hr[1],qi=Se.useState(0),Bi=(0,De.Z)(qi,2),gi=Bi[0],Qi=Bi[1],ga=cr!==void 0?cr:Ot!=="combobox",Ao=Se.useCallback(function(xi,mi){var Nn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},zr=Nn.source,wi=zr===void 0?"keyboard":zr;Qi(mi),qn&&Ot==="combobox"&&xi!==null&&wi==="keyboard"&&_r(String(xi))},[qn,Ot]),Aa=function(mi,Nn,zr){var wi=function(){var is,fo=kr(mi);return[yr?{label:fo==null?void 0:fo[Sn.label],value:mi,key:(is=fo==null?void 0:fo.key)!==null&&is!==void 0?is:mi}:mi,Qe(fo)]};if(Nn&&Wn){var co=wi(),Pa=(0,De.Z)(co,2),aa=Pa[0],ti=Pa[1];Wn(aa,ti)}else if(!Nn&&hr&&zr!=="clear"){var Ho=wi(),Ko=(0,De.Z)(Ho,2),jo=Ko[0],io=Ko[1];hr(jo,io)}},ma=Br(function(xi,mi){var Nn,zr=bi?mi.selected:!0;zr?Nn=bi?[].concat((0,Dt.Z)(nr),[xi]):[xi]:Nn=nr.filter(function(wi){return wi.value!==xi}),ci(Nn),Aa(xi,zr),Ot==="combobox"?_r(""):(!Xt||$n)&&(sn(""),_r(""))}),Dr=function(mi,Nn){ci(mi);var zr=Nn.type,wi=Nn.values;(zr==="remove"||zr==="clear")&&wi.forEach(function(co){Aa(co.value,!1,zr)})},eo=function(mi,Nn){if(sn(mi),_r(null),Nn.source==="submit"){var zr=(mi||"").trim();if(zr){var wi=Array.from(new Set([].concat((0,Dt.Z)(Zr),[zr])));ci(wi),Aa(zr,!0),sn("")}return}Nn.source!=="blur"&&(Ot==="combobox"&&ci(mi),On==null||On(mi))},Co=function(mi){var Nn=mi;Ot!=="tags"&&(Nn=mi.map(function(wi){var co=Yn.get(wi);return co==null?void 0:co.value}).filter(function(wi){return wi!==void 0}));var zr=Array.from(new Set([].concat((0,Dt.Z)(Zr),(0,Dt.Z)(Nn))));ci(zr),zr.forEach(function(wi){Aa(wi,!0)})},Jo=Se.useMemo(function(){var xi=xr!==!1&&br!==!1;return(0,Ge.Z)((0,Ge.Z)({},bn),{},{flattenOptions:Yt,onActiveValue:Ao,defaultActiveFirstOption:ga,onSelect:ma,menuItemSelectedIcon:ar,rawValues:Zr,fieldNames:Sn,virtual:xi,direction:Tr,listHeight:$r,listItemHeight:ai,childrenAsData:ji,maxCount:Yr,optionRender:un})},[Yr,bn,Yt,Ao,ga,ma,ar,Zr,Sn,xr,br,Tr,$r,ai,ji,un]);return Se.createElement(At.Provider,{value:Jo},Se.createElement(Ut,(0,pt.Z)({},Zi,{id:zi,prefixCls:_n,ref:qt,omitDomProps:Zt,mode:Ot,displayValues:ei,onDisplayValuesChange:Dr,direction:Tr,searchValue:Bn,onSearch:eo,autoClearSearchValue:$n,onSearchSplit:Co,dropdownMatchSelectWidth:br,OptionList:si,emptyOptions:!Yt.length,activeValue:Si,activeDescendantId:"".concat(zi,"_list_").concat(gi)})))}),Er=mr;Er.Option=En,Er.OptGroup=tn;var An=Er,er=An},63158:function(mn,dn,st){"use strict";var pt=st(72308),Dt=st(49618),oe=st(52487),Ge=st(74416),De=st(59301),fe=st(92310),me=st.n(fe),ke=st(18929),Ce=st(10228),Se=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Me=De.forwardRef(function(ve,we){var de,z=ve.prefixCls,ee=z===void 0?"rc-switch":z,ae=ve.className,ie=ve.checked,le=ve.defaultChecked,ue=ve.disabled,ge=ve.loadingIcon,Pe=ve.checkedChildren,je=ve.unCheckedChildren,Be=ve.onClick,Fe=ve.onChange,Ne=ve.onKeyDown,Ae=(0,Ge.Z)(ve,Se),Re=(0,ke.Z)(!1,{value:ie,defaultValue:le}),We=(0,oe.Z)(Re,2),Ye=We[0],Ue=We[1];function Ke(wt,Je){var nt=Ye;return ue||(nt=wt,Ue(nt),Fe==null||Fe(nt,Je)),nt}function ot(wt){wt.which===Ce.Z.LEFT?Ke(!1,wt):wt.which===Ce.Z.RIGHT&&Ke(!0,wt),Ne==null||Ne(wt)}function ut(wt){var Je=Ke(!Ye,wt);Be==null||Be(Je,wt)}var ft=me()(ee,ae,(de={},(0,Dt.Z)(de,"".concat(ee,"-checked"),Ye),(0,Dt.Z)(de,"".concat(ee,"-disabled"),ue),de));return De.createElement("button",(0,pt.Z)({},Ae,{type:"button",role:"switch","aria-checked":Ye,disabled:ue,className:ft,ref:we,onKeyDown:ot,onClick:ut}),ge,De.createElement("span",{className:"".concat(ee,"-inner")},De.createElement("span",{className:"".concat(ee,"-inner-checked")},Pe),De.createElement("span",{className:"".concat(ee,"-inner-unchecked")},je)))});Me.displayName="Switch",dn.Z=Me},67204:function(mn,dn,st){"use strict";st.d(dn,{R:function(){return Dt},w:function(){return pt}});var pt={},Dt="rc-table-internal-hook"},78612:function(mn,dn,st){"use strict";st.d(dn,{L:function(){return ee},Z:function(){return ge}});var pt=st(52487),Dt=st(49618),oe=st(80702),Ge=st(62853),De=st(77321),fe=st(74416),me=st(11592),ke=st(48736),Ce=st(59301),Se=st(67204),Me=st(90494);function ve(Pe){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof je=="number"?je:je.endsWith("%")?Pe*parseFloat(je)/100:null}function we(Pe,je,Be){return Ce.useMemo(function(){if(je&&je>0){var Fe=0,Ne=0;Pe.forEach(function(ut){var ft=ve(je,ut.width);ft?Fe+=ft:Ne+=1});var Ae=Math.max(je,Be),Re=Math.max(Ae-Fe,Ne),We=Ne,Ye=Re/Ne,Ue=0,Ke=Pe.map(function(ut){var ft=(0,De.Z)({},ut),wt=ve(je,ft.width);if(wt)ft.width=wt;else{var Je=Math.floor(Ye);ft.width=We===1?Re:Je,Re-=Je,We-=1}return Ue+=ft.width,ft});if(Ue<Ae){var ot=Ae/Ue;Re=Ae,Ke.forEach(function(ut,ft){var wt=Math.floor(ut.width*ot);ut.width=ft===Ke.length-1?Re:wt,Re-=wt})}return[Ke,Math.max(Ue,Ae)]}return[Pe,je]},[Pe,je,Be])}var de=["children"],z=["fixed"];function ee(Pe){return(0,me.Z)(Pe).filter(function(je){return Ce.isValidElement(je)}).map(function(je){var Be=je.key,Fe=je.props,Ne=Fe.children,Ae=(0,fe.Z)(Fe,de),Re=(0,De.Z)({key:Be},Ae);return Ne&&(Re.children=ee(Ne)),Re})}function ae(Pe){return Pe.filter(function(je){return je&&(0,Ge.Z)(je)==="object"&&!je.hidden}).map(function(je){var Be=je.children;return Be&&Be.length>0?(0,De.Z)((0,De.Z)({},je),{},{children:ae(Be)}):je})}function ie(Pe){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return Pe.filter(function(Be){return Be&&(0,Ge.Z)(Be)==="object"}).reduce(function(Be,Fe,Ne){var Ae=Fe.fixed,Re=Ae===!0?"left":Ae,We="".concat(je,"-").concat(Ne),Ye=Fe.children;return Ye&&Ye.length>0?[].concat((0,oe.Z)(Be),(0,oe.Z)(ie(Ye,We).map(function(Ue){return(0,De.Z)({fixed:Re},Ue)}))):[].concat((0,oe.Z)(Be),[(0,De.Z)((0,De.Z)({key:We},Fe),{},{fixed:Re})])},[])}function le(Pe){return Pe.map(function(je){var Be=je.fixed,Fe=(0,fe.Z)(je,z),Ne=Be;return Be==="left"?Ne="right":Be==="right"&&(Ne="left"),(0,De.Z)({fixed:Ne},Fe)})}function ue(Pe,je){var Be=Pe.prefixCls,Fe=Pe.columns,Ne=Pe.children,Ae=Pe.expandable,Re=Pe.expandedKeys,We=Pe.columnTitle,Ye=Pe.getRowKey,Ue=Pe.onTriggerExpand,Ke=Pe.expandIcon,ot=Pe.rowExpandable,ut=Pe.expandIconColumnIndex,ft=Pe.direction,wt=Pe.expandRowByClick,Je=Pe.columnWidth,nt=Pe.fixed,xt=Pe.scrollWidth,Pt=Pe.clientWidth,Ct=Ce.useMemo(function(){var tt=Fe||ee(Ne)||[];return ae(tt.slice())},[Fe,Ne]),gt=Ce.useMemo(function(){if(Ae){var tt=Ct.slice();if(!tt.includes(Se.w)){var Ve=ut||0;Ve>=0&&(Ve||nt==="left"||!nt)&&tt.splice(Ve,0,Se.w),nt==="right"&&tt.splice(Ct.length,0,Se.w)}var xe=tt.indexOf(Se.w);tt=tt.filter(function(Ie,_e){return Ie!==Se.w||_e===xe});var Le=Ct[xe],Xe;nt?Xe=nt:Xe=Le?Le.fixed:null;var rt=(0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)({},Me.v,{className:"".concat(Be,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",We),"fixed",Xe),"className","".concat(Be,"-row-expand-icon-cell")),"width",Je),"render",function(_e,He,Qe){var ct=Ye(He,Qe),at=Re.has(ct),At=ot?ot(He):!0,Lt=Ke({prefixCls:Be,expanded:at,expandable:At,record:He,onExpand:Ue});return wt?Ce.createElement("span",{onClick:function(Kt){return Kt.stopPropagation()}},Lt):Lt});return tt.map(function(Ie){return Ie===Se.w?rt:Ie})}return Ct.filter(function(Ie){return Ie!==Se.w})},[Ae,Ct,Ye,Re,Ke,ft]),dt=Ce.useMemo(function(){var tt=gt;return je&&(tt=je(tt)),tt.length||(tt=[{render:function(){return null}}]),tt},[je,gt,ft]),ht=Ce.useMemo(function(){return ft==="rtl"?le(ie(dt)):ie(dt)},[dt,ft,xt]),Et=Ce.useMemo(function(){for(var tt=-1,Ve=ht.length-1;Ve>=0;Ve-=1){var xe=ht[Ve].fixed;if(xe==="left"||xe===!0){tt=Ve;break}}if(tt>=0)for(var Le=0;Le<=tt;Le+=1){var Xe=ht[Le].fixed;if(Xe!=="left"&&Xe!==!0)return!0}var rt=ht.findIndex(function(He){var Qe=He.fixed;return Qe==="right"});if(rt>=0)for(var Ie=rt;Ie<ht.length;Ie+=1){var _e=ht[Ie].fixed;if(_e!=="right")return!0}return!1},[ht]),St=we(ht,xt,Pt),Ft=(0,pt.Z)(St,2),mt=Ft[0],yt=Ft[1];return[dt,mt,yt,Et]}var ge=ue},16596:function(mn,dn,st){"use strict";st.d(dn,{w2:function(){return pt.w},vP:function(){return si.v},RQ:function(){return pt.R},ER:function(){return ct},Q$:function(){return qr},TN:function(){return zi}});var pt=st(67204),Dt=st(52487),oe=st(6089),Ge=st(34280),De=st(13697),fe=st(59301),me=st(4676);function ke(Qt){var Sn=fe.createContext(void 0),Jt=function(Bn){var sn=Bn.value,bn=Bn.children,zn=fe.useRef(sn);zn.current=sn;var Yn=fe.useState(function(){return{getValue:function(){return zn.current},listeners:new Set}}),pn=(0,Dt.Z)(Yn,1),jn=pn[0];return(0,Ge.Z)(function(){(0,me.unstable_batchedUpdates)(function(){jn.listeners.forEach(function(Dn){Dn(sn)})})},[sn]),fe.createElement(Sn.Provider,{value:jn},bn)};return{Context:Sn,Provider:Jt,defaultValue:Qt}}function Ce(Qt,Sn){var Jt=(0,oe.Z)(typeof Sn=="function"?Sn:function(Dn){if(Sn===void 0)return Dn;if(!Array.isArray(Sn))return Dn[Sn];var Gn={};return Sn.forEach(function(In){Gn[In]=Dn[In]}),Gn}),lt=fe.useContext(Qt==null?void 0:Qt.Context),Bn=lt||{},sn=Bn.listeners,bn=Bn.getValue,zn=fe.useRef();zn.current=Jt(lt?bn():Qt==null?void 0:Qt.defaultValue);var Yn=fe.useState({}),pn=(0,Dt.Z)(Yn,2),jn=pn[1];return(0,Ge.Z)(function(){if(!lt)return;function Dn(Gn){var In=Jt(Gn);(0,De.Z)(zn.current,In,!0)||jn({})}return sn.add(Dn),function(){sn.delete(Dn)}},[lt]),zn.current}var Se=st(72308),Me=st(8654);function ve(){var Qt=fe.createContext(null);function Sn(){return fe.useContext(Qt)}function Jt(Bn,sn){var bn=(0,Me.Yr)(Bn),zn=function(pn,jn){var Dn=bn?{ref:jn}:{},Gn=fe.useRef(0),In=fe.useRef(pn),gr=Sn();return gr!==null?fe.createElement(Bn,(0,Se.Z)({},pn,Dn)):((!sn||sn(In.current,pn))&&(Gn.current+=1),In.current=pn,fe.createElement(Qt.Provider,{value:Gn.current},fe.createElement(Bn,(0,Se.Z)({},pn,Dn))))};return bn?fe.forwardRef(zn):zn}function lt(Bn,sn){var bn=(0,Me.Yr)(Bn),zn=function(pn,jn){var Dn=bn?{ref:jn}:{};return Sn(),fe.createElement(Bn,(0,Se.Z)({},pn,Dn))};return bn?fe.memo(fe.forwardRef(zn),sn):fe.memo(zn,sn)}return{makeImmutable:Jt,responseImmutable:lt,useImmutableMark:Sn}}var we=ve(),de=we.makeImmutable,z=we.responseImmutable,ee=we.useImmutableMark,ae=ve(),ie=ae.makeImmutable,le=ae.responseImmutable,ue=ae.useImmutableMark,ge=ke(),Pe=ge;function je(Qt,Sn){var Jt=React.useRef(0);Jt.current+=1;var lt=React.useRef(Qt),Bn=[];Object.keys(Qt||{}).map(function(bn){var zn;(Qt==null?void 0:Qt[bn])!==((zn=lt.current)===null||zn===void 0?void 0:zn[bn])&&Bn.push(bn)}),lt.current=Qt;var sn=React.useRef([]);return Bn.length&&(sn.current=Bn),React.useDebugValue(Jt.current),React.useDebugValue(sn.current.join(", ")),Sn&&console.log("".concat(Sn,":"),Jt.current,sn.current),Jt.current}var Be=null,Fe=null,Ne=st(62853),Ae=st(77321),Re=st(49618),We=st(92310),Ye=st.n(We),Ue=st(80547),Ke=st(97938),ot=st(48736),ut=fe.createContext({renderWithProps:!1}),ft=ut,wt="RC_TABLE_KEY";function Je(Qt){return Qt==null?[]:Array.isArray(Qt)?Qt:[Qt]}function nt(Qt){var Sn=[],Jt={};return Qt.forEach(function(lt){for(var Bn=lt||{},sn=Bn.key,bn=Bn.dataIndex,zn=sn||Je(bn).join("-")||wt;Jt[zn];)zn="".concat(zn,"_next");Jt[zn]=!0,Sn.push(zn)}),Sn}function xt(Qt){return Qt!=null}function Pt(Qt){return typeof Qt=="number"&&!Number.isNaN(Qt)}function Ct(Qt){return Qt&&(0,Ne.Z)(Qt)==="object"&&!Array.isArray(Qt)&&!fe.isValidElement(Qt)}function gt(Qt,Sn,Jt,lt,Bn,sn){var bn=fe.useContext(ft),zn=ue(),Yn=(0,Ue.Z)(function(){if(xt(lt))return[lt];var pn=Sn==null||Sn===""?[]:Array.isArray(Sn)?Sn:[Sn],jn=(0,Ke.Z)(Qt,pn),Dn=jn,Gn=void 0;if(Bn){var In=Bn(jn,Qt,Jt);Ct(In)?(Dn=In.children,Gn=In.props,bn.renderWithProps=!0):Dn=In}return[Dn,Gn]},[zn,Qt,lt,Sn,Bn,Jt],function(pn,jn){if(sn){var Dn=(0,Dt.Z)(pn,2),Gn=Dn[1],In=(0,Dt.Z)(jn,2),gr=In[1];return sn(gr,Gn)}return bn.renderWithProps?!0:!(0,De.Z)(pn,jn,!0)});return Yn}function dt(Qt,Sn,Jt,lt){var Bn=Qt+Sn-1;return Qt<=lt&&Bn>=Jt}function ht(Qt,Sn){return Ce(Pe,function(Jt){var lt=dt(Qt,Sn||1,Jt.hoverStartRow,Jt.hoverEndRow);return[lt,Jt.onHover]})}var Et=st(70425),St=function(Sn){var Jt=Sn.ellipsis,lt=Sn.rowType,Bn=Sn.children,sn,bn=Jt===!0?{showTitle:!0}:Jt;return bn&&(bn.showTitle||lt==="header")&&(typeof Bn=="string"||typeof Bn=="number"?sn=Bn.toString():fe.isValidElement(Bn)&&typeof Bn.props.children=="string"&&(sn=Bn.props.children)),sn};function Ft(Qt){var Sn,Jt,lt,Bn,sn,bn,zn,Yn,pn=Qt.component,jn=Qt.children,Dn=Qt.ellipsis,Gn=Qt.scope,In=Qt.prefixCls,gr=Qt.className,or=Qt.align,Hn=Qt.record,fn=Qt.render,nr=Qt.dataIndex,kr=Qt.renderIndex,ei=Qt.shouldCellUpdate,Zr=Qt.index,ri=Qt.rowType,li=Qt.colSpan,ii=Qt.rowSpan,Oi=Qt.fixLeft,Di=Qt.fixRight,po=Qt.firstFixLeft,Yt=Qt.lastFixLeft,ci=Qt.firstFixRight,pi=Qt.lastFixRight,Hr=Qt.appendNode,Si=Qt.additionalProps,_r=Si===void 0?{}:Si,qi=Qt.isSticky,Bi="".concat(In,"-cell"),gi=Ce(Pe,["supportSticky","allColumnsFixedLeft","rowHoverable"]),Qi=gi.supportSticky,ga=gi.allColumnsFixedLeft,Ao=gi.rowHoverable,Aa=gt(Hn,nr,kr,jn,fn,ei),ma=(0,Dt.Z)(Aa,2),Dr=ma[0],eo=ma[1],Co={},Jo=typeof Oi=="number"&&Qi,xi=typeof Di=="number"&&Qi;Jo&&(Co.position="sticky",Co.left=Oi),xi&&(Co.position="sticky",Co.right=Di);var mi=(Sn=(Jt=(lt=eo==null?void 0:eo.colSpan)!==null&&lt!==void 0?lt:_r.colSpan)!==null&&Jt!==void 0?Jt:li)!==null&&Sn!==void 0?Sn:1,Nn=(Bn=(sn=(bn=eo==null?void 0:eo.rowSpan)!==null&&bn!==void 0?bn:_r.rowSpan)!==null&&sn!==void 0?sn:ii)!==null&&Bn!==void 0?Bn:1,zr=ht(Zr,Nn),wi=(0,Dt.Z)(zr,2),co=wi[0],Pa=wi[1],aa=(0,Et.zX)(function(is){var fo;Hn&&Pa(Zr,Zr+Nn-1),_r==null||(fo=_r.onMouseEnter)===null||fo===void 0||fo.call(_r,is)}),ti=(0,Et.zX)(function(is){var fo;Hn&&Pa(-1,-1),_r==null||(fo=_r.onMouseLeave)===null||fo===void 0||fo.call(_r,is)});if(mi===0||Nn===0)return null;var Ho=(zn=_r.title)!==null&&zn!==void 0?zn:St({rowType:ri,ellipsis:Dn,children:Dr}),Ko=Ye()(Bi,gr,(Yn={},(0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)(Yn,"".concat(Bi,"-fix-left"),Jo&&Qi),"".concat(Bi,"-fix-left-first"),po&&Qi),"".concat(Bi,"-fix-left-last"),Yt&&Qi),"".concat(Bi,"-fix-left-all"),Yt&&ga&&Qi),"".concat(Bi,"-fix-right"),xi&&Qi),"".concat(Bi,"-fix-right-first"),ci&&Qi),"".concat(Bi,"-fix-right-last"),pi&&Qi),"".concat(Bi,"-ellipsis"),Dn),"".concat(Bi,"-with-append"),Hr),"".concat(Bi,"-fix-sticky"),(Jo||xi)&&qi&&Qi),(0,Re.Z)(Yn,"".concat(Bi,"-row-hover"),!eo&&co)),_r.className,eo==null?void 0:eo.className),jo={};or&&(jo.textAlign=or);var io=(0,Ae.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({},eo==null?void 0:eo.style),Co),jo),_r.style),ba=Dr;return(0,Ne.Z)(ba)==="object"&&!Array.isArray(ba)&&!fe.isValidElement(ba)&&(ba=null),Dn&&(Yt||ci)&&(ba=fe.createElement("span",{className:"".concat(Bi,"-content")},ba)),fe.createElement(pn,(0,Se.Z)({},eo,_r,{className:Ko,style:io,title:Ho,scope:Gn,onMouseEnter:Ao?aa:void 0,onMouseLeave:Ao?ti:void 0,colSpan:mi!==1?mi:null,rowSpan:Nn!==1?Nn:null}),Hr,ba)}var mt=fe.memo(Ft);function yt(Qt,Sn,Jt,lt,Bn){var sn=Jt[Qt]||{},bn=Jt[Sn]||{},zn,Yn;sn.fixed==="left"?zn=lt.left[Bn==="rtl"?Sn:Qt]:bn.fixed==="right"&&(Yn=lt.right[Bn==="rtl"?Qt:Sn]);var pn=!1,jn=!1,Dn=!1,Gn=!1,In=Jt[Sn+1],gr=Jt[Qt-1],or=In&&!In.fixed||gr&&!gr.fixed||Jt.every(function(ei){return ei.fixed==="left"});if(Bn==="rtl"){if(zn!==void 0){var Hn=gr&&gr.fixed==="left";Gn=!Hn&&or}else if(Yn!==void 0){var fn=In&&In.fixed==="right";Dn=!fn&&or}}else if(zn!==void 0){var nr=In&&In.fixed==="left";pn=!nr&&or}else if(Yn!==void 0){var kr=gr&&gr.fixed==="right";jn=!kr&&or}return{fixLeft:zn,fixRight:Yn,lastFixLeft:pn,firstFixRight:jn,lastFixRight:Dn,firstFixLeft:Gn,isSticky:lt.isSticky}}var tt=fe.createContext({}),Ve=tt;function xe(Qt){var Sn=Qt.className,Jt=Qt.index,lt=Qt.children,Bn=Qt.colSpan,sn=Bn===void 0?1:Bn,bn=Qt.rowSpan,zn=Qt.align,Yn=Ce(Pe,["prefixCls","direction"]),pn=Yn.prefixCls,jn=Yn.direction,Dn=fe.useContext(Ve),Gn=Dn.scrollColumnIndex,In=Dn.stickyOffsets,gr=Dn.flattenColumns,or=Jt+sn-1,Hn=or+1===Gn?sn+1:sn,fn=yt(Jt,Jt+Hn-1,gr,In,jn);return fe.createElement(mt,(0,Se.Z)({className:Sn,index:Jt,component:"td",prefixCls:pn,record:null,dataIndex:null,align:zn,colSpan:Hn,rowSpan:bn,render:function(){return lt}},fn))}var Le=st(74416),Xe=["children"];function rt(Qt){var Sn=Qt.children,Jt=(0,Le.Z)(Qt,Xe);return fe.createElement("tr",Jt,Sn)}function Ie(Qt){var Sn=Qt.children;return Sn}Ie.Row=rt,Ie.Cell=xe;var _e=Ie;function He(Qt){var Sn=Qt.children,Jt=Qt.stickyOffsets,lt=Qt.flattenColumns,Bn=Ce(Pe,"prefixCls"),sn=lt.length-1,bn=lt[sn],zn=fe.useMemo(function(){return{stickyOffsets:Jt,flattenColumns:lt,scrollColumnIndex:bn!=null&&bn.scrollbar?sn:null}},[bn,lt,sn,Jt]);return fe.createElement(Ve.Provider,{value:zn},fe.createElement("tfoot",{className:"".concat(Bn,"-summary")},Sn))}var Qe=le(He),ct=_e,at=st(29301),At=st(29194),Lt=st(24514),It=st(75152),Kt=st(26112);function Xt(Qt,Sn,Jt,lt,Bn,sn,bn){Qt.push({record:Sn,indent:Jt,index:bn});var zn=sn(Sn),Yn=Bn==null?void 0:Bn.has(zn);if(Sn&&Array.isArray(Sn[lt])&&Yn)for(var pn=0;pn<Sn[lt].length;pn+=1)Xt(Qt,Sn[lt][pn],Jt+1,lt,Bn,sn,pn)}function $t(Qt,Sn,Jt,lt){var Bn=fe.useMemo(function(){if(Jt!=null&&Jt.size){for(var sn=[],bn=0;bn<(Qt==null?void 0:Qt.length);bn+=1){var zn=Qt[bn];Xt(sn,zn,0,Sn,Jt,lt,bn)}return sn}return Qt==null?void 0:Qt.map(function(Yn,pn){return{record:Yn,indent:0,index:pn}})},[Qt,Sn,Jt,lt]);return Bn}function Ut(Qt,Sn,Jt,lt){var Bn=Ce(Pe,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),sn=Bn.flattenColumns,bn=Bn.expandableType,zn=Bn.expandedKeys,Yn=Bn.childrenColumnName,pn=Bn.onTriggerExpand,jn=Bn.rowExpandable,Dn=Bn.onRow,Gn=Bn.expandRowByClick,In=Bn.rowClassName,gr=bn==="nest",or=bn==="row"&&(!jn||jn(Qt)),Hn=or||gr,fn=zn&&zn.has(Sn),nr=Yn&&Qt&&Qt[Yn],kr=(0,Et.zX)(pn),ei=Dn==null?void 0:Dn(Qt,Jt),Zr=ei==null?void 0:ei.onClick,ri=function(Di){Gn&&Hn&&pn(Qt,Di);for(var po=arguments.length,Yt=new Array(po>1?po-1:0),ci=1;ci<po;ci++)Yt[ci-1]=arguments[ci];Zr==null||Zr.apply(void 0,[Di].concat(Yt))},li;typeof In=="string"?li=In:typeof In=="function"&&(li=In(Qt,Jt,lt));var ii=nt(sn);return(0,Ae.Z)((0,Ae.Z)({},Bn),{},{columnsKey:ii,nestExpandable:gr,expanded:fn,hasNestChildren:nr,record:Qt,onTriggerExpand:kr,rowSupportExpand:or,expandable:Hn,rowProps:(0,Ae.Z)((0,Ae.Z)({},ei),{},{className:Ye()(li,ei==null?void 0:ei.className),onClick:ri})})}function ln(Qt){var Sn=Qt.prefixCls,Jt=Qt.children,lt=Qt.component,Bn=Qt.cellComponent,sn=Qt.className,bn=Qt.expanded,zn=Qt.colSpan,Yn=Qt.isEmpty,pn=Ce(Pe,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),jn=pn.scrollbarSize,Dn=pn.fixHeader,Gn=pn.fixColumn,In=pn.componentWidth,gr=pn.horizonScroll,or=Jt;return(Yn?gr&&In:Gn)&&(or=fe.createElement("div",{style:{width:In-(Dn&&!Yn?jn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Sn,"-expanded-row-fixed")},or)),fe.createElement(lt,{className:sn,style:{display:bn?null:"none"}},fe.createElement(mt,{component:Bn,prefixCls:Sn,colSpan:zn},or))}var tn=ln;function Wt(Qt){var Sn=Qt.prefixCls,Jt=Qt.record,lt=Qt.onExpand,Bn=Qt.expanded,sn=Qt.expandable,bn="".concat(Sn,"-row-expand-icon");if(!sn)return fe.createElement("span",{className:Ye()(bn,"".concat(Sn,"-row-spaced"))});var zn=function(pn){lt(Jt,pn),pn.stopPropagation()};return fe.createElement("span",{className:Ye()(bn,(0,Re.Z)((0,Re.Z)({},"".concat(Sn,"-row-expanded"),Bn),"".concat(Sn,"-row-collapsed"),!Bn)),onClick:zn})}function En(Qt,Sn,Jt){var lt=[];function Bn(sn){(sn||[]).forEach(function(bn,zn){lt.push(Sn(bn,zn)),Bn(bn[Jt])})}return Bn(Qt),lt}function Pn(Qt,Sn,Jt,lt){return typeof Qt=="string"?Qt:typeof Qt=="function"?Qt(Sn,Jt,lt):""}function Ln(Qt,Sn,Jt,lt,Bn){var sn=Qt.record,bn=Qt.prefixCls,zn=Qt.columnsKey,Yn=Qt.fixedInfoList,pn=Qt.expandIconColumnIndex,jn=Qt.nestExpandable,Dn=Qt.indentSize,Gn=Qt.expandIcon,In=Qt.expanded,gr=Qt.hasNestChildren,or=Qt.onTriggerExpand,Hn=zn[Jt],fn=Yn[Jt],nr;Jt===(pn||0)&&jn&&(nr=fe.createElement(fe.Fragment,null,fe.createElement("span",{style:{paddingLeft:"".concat(Dn*lt,"px")},className:"".concat(bn,"-row-indent indent-level-").concat(lt)}),Gn({prefixCls:bn,expanded:In,expandable:gr,record:sn,onExpand:or})));var kr;return Sn.onCell&&(kr=Sn.onCell(sn,Bn)),{key:Hn,fixedInfo:fn,appendCellNode:nr,additionalCellProps:kr||{}}}function Vn(Qt){var Sn=Qt.className,Jt=Qt.style,lt=Qt.record,Bn=Qt.index,sn=Qt.renderIndex,bn=Qt.rowKey,zn=Qt.indent,Yn=zn===void 0?0:zn,pn=Qt.rowComponent,jn=Qt.cellComponent,Dn=Qt.scopeCellComponent,Gn=Ut(lt,bn,Bn,Yn),In=Gn.prefixCls,gr=Gn.flattenColumns,or=Gn.expandedRowClassName,Hn=Gn.expandedRowRender,fn=Gn.rowProps,nr=Gn.expanded,kr=Gn.rowSupportExpand,ei=fe.useRef(!1);ei.current||(ei.current=nr);var Zr=Pn(or,lt,Bn,Yn),ri=fe.createElement(pn,(0,Se.Z)({},fn,{"data-row-key":bn,className:Ye()(Sn,"".concat(In,"-row"),"".concat(In,"-row-level-").concat(Yn),fn==null?void 0:fn.className,(0,Re.Z)({},Zr,Yn>=1)),style:(0,Ae.Z)((0,Ae.Z)({},Jt),fn==null?void 0:fn.style)}),gr.map(function(Oi,Di){var po=Oi.render,Yt=Oi.dataIndex,ci=Oi.className,pi=Ln(Gn,Oi,Di,Yn,Bn),Hr=pi.key,Si=pi.fixedInfo,_r=pi.appendCellNode,qi=pi.additionalCellProps;return fe.createElement(mt,(0,Se.Z)({className:ci,ellipsis:Oi.ellipsis,align:Oi.align,scope:Oi.rowScope,component:Oi.rowScope?Dn:jn,prefixCls:In,key:Hr,record:lt,index:Bn,renderIndex:sn,dataIndex:Yt,render:po,shouldCellUpdate:Oi.shouldCellUpdate},Si,{appendNode:_r,additionalProps:qi}))})),li;if(kr&&(ei.current||nr)){var ii=Hn(lt,Bn,Yn+1,nr);li=fe.createElement(tn,{expanded:nr,className:Ye()("".concat(In,"-expanded-row"),"".concat(In,"-expanded-row-level-").concat(Yn+1),Zr),prefixCls:In,component:pn,cellComponent:jn,colSpan:gr.length,isEmpty:!1},ii)}return fe.createElement(fe.Fragment,null,ri,li)}var Or=le(Vn);function dr(Qt){var Sn=Qt.columnKey,Jt=Qt.onColumnResize,lt=fe.useRef();return fe.useEffect(function(){lt.current&&Jt(Sn,lt.current.offsetWidth)},[]),fe.createElement(at.Z,{data:Sn},fe.createElement("td",{ref:lt,style:{padding:0,border:0,height:0}},fe.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function Lr(Qt){var Sn=Qt.prefixCls,Jt=Qt.columnsKey,lt=Qt.onColumnResize;return fe.createElement("tr",{"aria-hidden":"true",className:"".concat(Sn,"-measure-row"),style:{height:0,fontSize:0}},fe.createElement(at.Z.Collection,{onBatchResize:function(sn){sn.forEach(function(bn){var zn=bn.data,Yn=bn.size;lt(zn,Yn.offsetWidth)})}},Jt.map(function(Bn){return fe.createElement(dr,{key:Bn,columnKey:Bn,onColumnResize:lt})})))}function Xr(Qt){var Sn=Qt.data,Jt=Qt.measureColumnWidth,lt=Ce(Pe,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),Bn=lt.prefixCls,sn=lt.getComponent,bn=lt.onColumnResize,zn=lt.flattenColumns,Yn=lt.getRowKey,pn=lt.expandedKeys,jn=lt.childrenColumnName,Dn=lt.emptyNode,Gn=$t(Sn,jn,pn,Yn),In=fe.useRef({renderWithProps:!1}),gr=sn(["body","wrapper"],"tbody"),or=sn(["body","row"],"tr"),Hn=sn(["body","cell"],"td"),fn=sn(["body","cell"],"th"),nr;Sn.length?nr=Gn.map(function(ei,Zr){var ri=ei.record,li=ei.indent,ii=ei.index,Oi=Yn(ri,Zr);return fe.createElement(Or,{key:Oi,rowKey:Oi,record:ri,index:Zr,renderIndex:ii,rowComponent:or,cellComponent:Hn,scopeCellComponent:fn,indent:li})}):nr=fe.createElement(tn,{expanded:!0,className:"".concat(Bn,"-placeholder"),prefixCls:Bn,component:or,cellComponent:Hn,colSpan:zn.length,isEmpty:!0},Dn);var kr=nt(zn);return fe.createElement(ft.Provider,{value:In.current},fe.createElement(gr,{className:"".concat(Bn,"-tbody")},Jt&&fe.createElement(Lr,{prefixCls:Bn,columnsKey:kr,onColumnResize:bn}),nr))}var Vr=le(Xr),si=st(90494),yi=["columnType"];function Ii(Qt){for(var Sn=Qt.colWidths,Jt=Qt.columns,lt=Qt.columCount,Bn=Ce(Pe,["tableLayout"]),sn=Bn.tableLayout,bn=[],zn=lt||Jt.length,Yn=!1,pn=zn-1;pn>=0;pn-=1){var jn=Sn[pn],Dn=Jt&&Jt[pn],Gn=void 0,In=void 0;if(Dn&&(Gn=Dn[si.v],sn==="auto"&&(In=Dn.minWidth)),jn||In||Gn||Yn){var gr=Gn||{},or=gr.columnType,Hn=(0,Le.Z)(gr,yi);bn.unshift(fe.createElement("col",(0,Se.Z)({key:pn,style:{width:jn,minWidth:In}},Hn))),Yn=!0}}return fe.createElement("colgroup",null,bn)}var Fi=Ii,_i=st(80702),Yi=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function et(Qt,Sn){return(0,fe.useMemo)(function(){for(var Jt=[],lt=0;lt<Sn;lt+=1){var Bn=Qt[lt];if(Bn!==void 0)Jt[lt]=Bn;else return null}return Jt},[Qt.join("_"),Sn])}var pr=fe.forwardRef(function(Qt,Sn){var Jt=Qt.className,lt=Qt.noData,Bn=Qt.columns,sn=Qt.flattenColumns,bn=Qt.colWidths,zn=Qt.columCount,Yn=Qt.stickyOffsets,pn=Qt.direction,jn=Qt.fixHeader,Dn=Qt.stickyTopOffset,Gn=Qt.stickyBottomOffset,In=Qt.stickyClassName,gr=Qt.onScroll,or=Qt.maxContentScroll,Hn=Qt.children,fn=(0,Le.Z)(Qt,Yi),nr=Ce(Pe,["prefixCls","scrollbarSize","isSticky","getComponent"]),kr=nr.prefixCls,ei=nr.scrollbarSize,Zr=nr.isSticky,ri=nr.getComponent,li=ri(["header","table"],"table"),ii=Zr&&!jn?0:ei,Oi=fe.useRef(null),Di=fe.useCallback(function(qi){(0,Me.mH)(Sn,qi),(0,Me.mH)(Oi,qi)},[]);fe.useEffect(function(){var qi;function Bi(gi){var Qi=gi,ga=Qi.currentTarget,Ao=Qi.deltaX;Ao&&(gr({currentTarget:ga,scrollLeft:ga.scrollLeft+Ao}),gi.preventDefault())}return(qi=Oi.current)===null||qi===void 0||qi.addEventListener("wheel",Bi,{passive:!1}),function(){var gi;(gi=Oi.current)===null||gi===void 0||gi.removeEventListener("wheel",Bi)}},[]);var po=fe.useMemo(function(){return sn.every(function(qi){return qi.width})},[sn]),Yt=sn[sn.length-1],ci={fixed:Yt?Yt.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(kr,"-cell-scrollbar")}}},pi=(0,fe.useMemo)(function(){return ii?[].concat((0,_i.Z)(Bn),[ci]):Bn},[ii,Bn]),Hr=(0,fe.useMemo)(function(){return ii?[].concat((0,_i.Z)(sn),[ci]):sn},[ii,sn]),Si=(0,fe.useMemo)(function(){var qi=Yn.right,Bi=Yn.left;return(0,Ae.Z)((0,Ae.Z)({},Yn),{},{left:pn==="rtl"?[].concat((0,_i.Z)(Bi.map(function(gi){return gi+ii})),[0]):Bi,right:pn==="rtl"?qi:[].concat((0,_i.Z)(qi.map(function(gi){return gi+ii})),[0]),isSticky:Zr})},[ii,Yn,Zr]),_r=et(bn,zn);return fe.createElement("div",{style:(0,Ae.Z)({overflow:"hidden"},Zr?{top:Dn,bottom:Gn}:{}),ref:Di,className:Ye()(Jt,(0,Re.Z)({},In,!!In))},fe.createElement(li,{style:{tableLayout:"fixed",visibility:lt||_r?null:"hidden"}},(!lt||!or||po)&&fe.createElement(Fi,{colWidths:_r?[].concat((0,_i.Z)(_r),[ii]):[],columCount:zn+1,columns:Hr}),Hn((0,Ae.Z)((0,Ae.Z)({},fn),{},{stickyOffsets:Si,columns:pi,flattenColumns:Hr}))))}),vr=fe.memo(pr),Ei=function(Sn){var Jt=Sn.cells,lt=Sn.stickyOffsets,Bn=Sn.flattenColumns,sn=Sn.rowComponent,bn=Sn.cellComponent,zn=Sn.onHeaderRow,Yn=Sn.index,pn=Ce(Pe,["prefixCls","direction"]),jn=pn.prefixCls,Dn=pn.direction,Gn;zn&&(Gn=zn(Jt.map(function(gr){return gr.column}),Yn));var In=nt(Jt.map(function(gr){return gr.column}));return fe.createElement(sn,Gn,Jt.map(function(gr,or){var Hn=gr.column,fn=yt(gr.colStart,gr.colEnd,Bn,lt,Dn),nr;return Hn&&Hn.onHeaderCell&&(nr=gr.column.onHeaderCell(Hn)),fe.createElement(mt,(0,Se.Z)({},gr,{scope:Hn.title?gr.colSpan>1?"colgroup":"col":null,ellipsis:Hn.ellipsis,align:Hn.align,component:bn,prefixCls:jn,key:In[or]},fn,{additionalProps:nr,rowType:"header"}))}))},lr=Ei;function wr(Qt){var Sn=[];function Jt(bn,zn){var Yn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Sn[Yn]=Sn[Yn]||[];var pn=zn,jn=bn.filter(Boolean).map(function(Dn){var Gn={key:Dn.key,className:Dn.className||"",children:Dn.title,column:Dn,colStart:pn},In=1,gr=Dn.children;return gr&&gr.length>0&&(In=Jt(gr,pn,Yn+1).reduce(function(or,Hn){return or+Hn},0),Gn.hasSubColumns=!0),"colSpan"in Dn&&(In=Dn.colSpan),"rowSpan"in Dn&&(Gn.rowSpan=Dn.rowSpan),Gn.colSpan=In,Gn.colEnd=Gn.colStart+In-1,Sn[Yn].push(Gn),pn+=In,In});return jn}Jt(Qt,0);for(var lt=Sn.length,Bn=function(zn){Sn[zn].forEach(function(Yn){!("rowSpan"in Yn)&&!Yn.hasSubColumns&&(Yn.rowSpan=lt-zn)})},sn=0;sn<lt;sn+=1)Bn(sn);return Sn}var Br=function(Sn){var Jt=Sn.stickyOffsets,lt=Sn.columns,Bn=Sn.flattenColumns,sn=Sn.onHeaderRow,bn=Ce(Pe,["prefixCls","getComponent"]),zn=bn.prefixCls,Yn=bn.getComponent,pn=fe.useMemo(function(){return wr(lt)},[lt]),jn=Yn(["header","wrapper"],"thead"),Dn=Yn(["header","row"],"tr"),Gn=Yn(["header","cell"],"th");return fe.createElement(jn,{className:"".concat(zn,"-thead")},pn.map(function(In,gr){var or=fe.createElement(lr,{key:gr,flattenColumns:Bn,cells:In,stickyOffsets:Jt,rowComponent:Dn,cellComponent:Gn,onHeaderRow:sn,index:gr});return or}))},ro=le(Br),Ur=st(78612);function on(Qt,Sn,Jt){var lt=(0,si.g)(Qt),Bn=lt.expandIcon,sn=lt.expandedRowKeys,bn=lt.defaultExpandedRowKeys,zn=lt.defaultExpandAllRows,Yn=lt.expandedRowRender,pn=lt.onExpand,jn=lt.onExpandedRowsChange,Dn=lt.childrenColumnName,Gn=Bn||Wt,In=Dn||"children",gr=fe.useMemo(function(){return Yn?"row":Qt.expandable&&Qt.internalHooks===pt.R&&Qt.expandable.__PARENT_RENDER_ICON__||Sn.some(function(Zr){return Zr&&(0,Ne.Z)(Zr)==="object"&&Zr[In]})?"nest":!1},[!!Yn,Sn]),or=fe.useState(function(){return bn||(zn?En(Sn,Jt,In):[])}),Hn=(0,Dt.Z)(or,2),fn=Hn[0],nr=Hn[1],kr=fe.useMemo(function(){return new Set(sn||fn||[])},[sn,fn]),ei=fe.useCallback(function(Zr){var ri=Jt(Zr,Sn.indexOf(Zr)),li,ii=kr.has(ri);ii?(kr.delete(ri),li=(0,_i.Z)(kr)):li=[].concat((0,_i.Z)(kr),[ri]),nr(li),pn&&pn(!ii,Zr),jn&&jn(li)},[Jt,kr,Sn,pn,jn]);return[lt,gr,kr,Gn,In,ei]}function nn(Qt,Sn,Jt){var lt=Qt.map(function(Bn,sn){return yt(sn,sn,Qt,Sn,Jt)});return(0,Ue.Z)(function(){return lt},[lt],function(Bn,sn){return!(0,De.Z)(Bn,sn)})}function Zt(Qt){var Sn=(0,fe.useRef)(Qt),Jt=(0,fe.useState)({}),lt=(0,Dt.Z)(Jt,2),Bn=lt[1],sn=(0,fe.useRef)(null),bn=(0,fe.useRef)([]);function zn(Yn){bn.current.push(Yn);var pn=Promise.resolve();sn.current=pn,pn.then(function(){if(sn.current===pn){var jn=bn.current,Dn=Sn.current;bn.current=[],jn.forEach(function(Gn){Sn.current=Gn(Sn.current)}),sn.current=null,Dn!==Sn.current&&Bn({})}})}return(0,fe.useEffect)(function(){return function(){sn.current=null}},[]),[Sn.current,zn]}function tr(Qt){var Sn=(0,fe.useRef)(Qt||null),Jt=(0,fe.useRef)();function lt(){window.clearTimeout(Jt.current)}function Bn(bn){Sn.current=bn,lt(),Jt.current=window.setTimeout(function(){Sn.current=null,Jt.current=void 0},100)}function sn(){return Sn.current}return(0,fe.useEffect)(function(){return lt},[]),[Bn,sn]}function mr(){var Qt=fe.useState(-1),Sn=(0,Dt.Z)(Qt,2),Jt=Sn[0],lt=Sn[1],Bn=fe.useState(-1),sn=(0,Dt.Z)(Bn,2),bn=sn[0],zn=sn[1],Yn=fe.useCallback(function(pn,jn){lt(pn),zn(jn)},[]);return[Jt,bn,Yn]}var Er=st(47273),An=(0,Er.Z)()?window:null;function er(Qt,Sn){var Jt=(0,Ne.Z)(Qt)==="object"?Qt:{},lt=Jt.offsetHeader,Bn=lt===void 0?0:lt,sn=Jt.offsetSummary,bn=sn===void 0?0:sn,zn=Jt.offsetScroll,Yn=zn===void 0?0:zn,pn=Jt.getContainer,jn=pn===void 0?function(){return An}:pn,Dn=jn()||An,Gn=!!Qt;return fe.useMemo(function(){return{isSticky:Gn,stickyClassName:Gn?"".concat(Sn,"-sticky-holder"):"",offsetHeader:Bn,offsetSummary:bn,offsetScroll:Yn,container:Dn}},[Gn,Yn,Bn,bn,Sn,Dn])}function rn(Qt,Sn,Jt){var lt=(0,fe.useMemo)(function(){var Bn=Sn.length,sn=function(pn,jn,Dn){for(var Gn=[],In=0,gr=pn;gr!==jn;gr+=Dn)Gn.push(In),Sn[gr].fixed&&(In+=Qt[gr]||0);return Gn},bn=sn(0,Bn,1),zn=sn(Bn-1,-1,-1).reverse();return Jt==="rtl"?{left:zn,right:bn}:{left:bn,right:zn}},[Qt,Sn,Jt]);return lt}var qt=rn;function Qn(Qt){var Sn=Qt.className,Jt=Qt.children;return fe.createElement("div",{className:Sn},Jt)}var Ot=Qn,vn=st(8224),_n=st(16089),qn=st(76846);function an(Qt){var Sn=(0,qn.bn)(Qt),Jt=Sn.getBoundingClientRect(),lt=document.documentElement;return{left:Jt.left+(window.pageXOffset||lt.scrollLeft)-(lt.clientLeft||document.body.clientLeft||0),top:Jt.top+(window.pageYOffset||lt.scrollTop)-(lt.clientTop||document.body.clientTop||0)}}var Un=function(Sn,Jt){var lt,Bn,sn=Sn.scrollBodyRef,bn=Sn.onScroll,zn=Sn.offsetScroll,Yn=Sn.container,pn=Sn.direction,jn=Ce(Pe,"prefixCls"),Dn=((lt=sn.current)===null||lt===void 0?void 0:lt.scrollWidth)||0,Gn=((Bn=sn.current)===null||Bn===void 0?void 0:Bn.clientWidth)||0,In=Dn&&Gn*(Gn/Dn),gr=fe.useRef(),or=Zt({scrollLeft:0,isHiddenScrollBar:!0}),Hn=(0,Dt.Z)(or,2),fn=Hn[0],nr=Hn[1],kr=fe.useRef({delta:0,x:0}),ei=fe.useState(!1),Zr=(0,Dt.Z)(ei,2),ri=Zr[0],li=Zr[1],ii=fe.useRef(null);fe.useEffect(function(){return function(){_n.Z.cancel(ii.current)}},[]);var Oi=function(){li(!1)},Di=function(Hr){Hr.persist(),kr.current.delta=Hr.pageX-fn.scrollLeft,kr.current.x=0,li(!0),Hr.preventDefault()},po=function(Hr){var Si,_r=Hr||((Si=window)===null||Si===void 0?void 0:Si.event),qi=_r.buttons;if(!ri||qi===0){ri&&li(!1);return}var Bi=kr.current.x+Hr.pageX-kr.current.x-kr.current.delta,gi=pn==="rtl";Bi=Math.max(gi?In-Gn:0,Math.min(gi?0:Gn-In,Bi));var Qi=!gi||Math.abs(Bi)+Math.abs(In)<Gn;Qi&&(bn({scrollLeft:Bi/Gn*(Dn+2)}),kr.current.x=Hr.pageX)},Yt=function(){_n.Z.cancel(ii.current),ii.current=(0,_n.Z)(function(){if(sn.current){var Hr=an(sn.current).top,Si=Hr+sn.current.offsetHeight,_r=Yn===window?document.documentElement.scrollTop+window.innerHeight:an(Yn).top+Yn.clientHeight;Si-(0,It.Z)()<=_r||Hr>=_r-zn?nr(function(qi){return(0,Ae.Z)((0,Ae.Z)({},qi),{},{isHiddenScrollBar:!0})}):nr(function(qi){return(0,Ae.Z)((0,Ae.Z)({},qi),{},{isHiddenScrollBar:!1})})}})},ci=function(Hr){nr(function(Si){return(0,Ae.Z)((0,Ae.Z)({},Si),{},{scrollLeft:Hr/Dn*Gn||0})})};return fe.useImperativeHandle(Jt,function(){return{setScrollLeft:ci,checkScrollBarVisible:Yt}}),fe.useEffect(function(){var pi=(0,vn.Z)(document.body,"mouseup",Oi,!1),Hr=(0,vn.Z)(document.body,"mousemove",po,!1);return Yt(),function(){pi.remove(),Hr.remove()}},[In,ri]),fe.useEffect(function(){if(sn.current){for(var pi=[],Hr=(0,qn.bn)(sn.current);Hr;)pi.push(Hr),Hr=Hr.parentElement;return pi.forEach(function(Si){return Si.addEventListener("scroll",Yt,!1)}),window.addEventListener("resize",Yt,!1),window.addEventListener("scroll",Yt,!1),Yn.addEventListener("scroll",Yt,!1),function(){pi.forEach(function(Si){return Si.removeEventListener("scroll",Yt)}),window.removeEventListener("resize",Yt),window.removeEventListener("scroll",Yt),Yn.removeEventListener("scroll",Yt)}}},[Yn]),fe.useEffect(function(){fn.isHiddenScrollBar||nr(function(pi){var Hr=sn.current;return Hr?(0,Ae.Z)((0,Ae.Z)({},pi),{},{scrollLeft:Hr.scrollLeft/Hr.scrollWidth*Hr.clientWidth}):pi})},[fn.isHiddenScrollBar]),Dn<=Gn||!In||fn.isHiddenScrollBar?null:fe.createElement("div",{style:{height:(0,It.Z)(),width:Gn,bottom:zn},className:"".concat(jn,"-sticky-scroll")},fe.createElement("div",{onMouseDown:Di,ref:gr,className:Ye()("".concat(jn,"-sticky-scroll-bar"),(0,Re.Z)({},"".concat(jn,"-sticky-scroll-bar-active"),ri)),style:{width:"".concat(In,"px"),transform:"translate3d(".concat(fn.scrollLeft,"px, 0, 0)")}}))},Kn=fe.forwardRef(Un);function On(Qt){return null}var ur=On;function $n(Qt){return null}var Wn=$n,hr="rc-table",Rr=[],br={};function Pr(){return"No Data"}function hn(Qt,Sn){var Jt=(0,Ae.Z)({rowKey:"key",prefixCls:hr,emptyText:Pr},Qt),lt=Jt.prefixCls,Bn=Jt.className,sn=Jt.rowClassName,bn=Jt.style,zn=Jt.data,Yn=Jt.rowKey,pn=Jt.scroll,jn=Jt.tableLayout,Dn=Jt.direction,Gn=Jt.title,In=Jt.footer,gr=Jt.summary,or=Jt.caption,Hn=Jt.id,fn=Jt.showHeader,nr=Jt.components,kr=Jt.emptyText,ei=Jt.onRow,Zr=Jt.onHeaderRow,ri=Jt.onScroll,li=Jt.internalHooks,ii=Jt.transformColumns,Oi=Jt.internalRefs,Di=Jt.tailor,po=Jt.getContainerWidth,Yt=Jt.sticky,ci=Jt.rowHoverable,pi=ci===void 0?!0:ci,Hr=zn||Rr,Si=!!Hr.length,_r=li===pt.R,qi=fe.useCallback(function(Ui,ao){return(0,Ke.Z)(nr,Ui)||ao},[nr]),Bi=fe.useMemo(function(){return typeof Yn=="function"?Yn:function(Ui){var ao=Ui&&Ui[Yn];return ao}},[Yn]),gi=qi(["body"]),Qi=mr(),ga=(0,Dt.Z)(Qi,3),Ao=ga[0],Aa=ga[1],ma=ga[2],Dr=on(Jt,Hr,Bi),eo=(0,Dt.Z)(Dr,6),Co=eo[0],Jo=eo[1],xi=eo[2],mi=eo[3],Nn=eo[4],zr=eo[5],wi=pn==null?void 0:pn.x,co=fe.useState(0),Pa=(0,Dt.Z)(co,2),aa=Pa[0],ti=Pa[1],Ho=(0,Ur.Z)((0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({},Jt),Co),{},{expandable:!!Co.expandedRowRender,columnTitle:Co.columnTitle,expandedKeys:xi,getRowKey:Bi,onTriggerExpand:zr,expandIcon:mi,expandIconColumnIndex:Co.expandIconColumnIndex,direction:Dn,scrollWidth:_r&&Di&&typeof wi=="number"?wi:null,clientWidth:aa}),_r?ii:null),Ko=(0,Dt.Z)(Ho,4),jo=Ko[0],io=Ko[1],ba=Ko[2],is=Ko[3],fo=ba!=null?ba:wi,os=fe.useMemo(function(){return{columns:jo,flattenColumns:io}},[jo,io]),Gs=fe.useRef(),Mu=fe.useRef(),Wo=fe.useRef(),th=fe.useRef();fe.useImperativeHandle(Sn,function(){return{nativeElement:Gs.current,scrollTo:function(ao){var Zo;if(Wo.current instanceof HTMLElement){var Fa=ao.index,ka=ao.top,lu=ao.key;if(Pt(ka)){var Vl;(Vl=Wo.current)===null||Vl===void 0||Vl.scrollTo({top:ka})}else{var uu,rl=lu!=null?lu:Bi(Hr[Fa]);(uu=Wo.current.querySelector('[data-row-key="'.concat(rl,'"]')))===null||uu===void 0||uu.scrollIntoView()}}else(Zo=Wo.current)!==null&&Zo!==void 0&&Zo.scrollTo&&Wo.current.scrollTo(ao)}}});var Lu=fe.useRef(),Nu=fe.useState(!1),gl=(0,Dt.Z)(Nu,2),Ns=gl[0],Ml=gl[1],nh=fe.useState(!1),Au=(0,Dt.Z)(nh,2),Vo=Au[0],ju=Au[1],rh=Zt(new Map),iu=(0,Dt.Z)(rh,2),ou=iu[0],ja=iu[1],Oa=nt(io),na=Oa.map(function(Ui){return ou.get(Ui)}),sa=fe.useMemo(function(){return na},[na.join("_")]),uo=qt(sa,io,Dn),Ni=pn&&xt(pn.y),Gi=pn&&xt(fo)||!!Co.fixed,la=Gi&&io.some(function(Ui){var ao=Ui.fixed;return ao}),Qo=fe.useRef(),qo=er(Yt,lt),Mr=qo.isSticky,As=qo.offsetHeader,Gt=qo.offsetSummary,Mn=qo.offsetScroll,Ll=qo.stickyClassName,Ou=qo.container,ua=fe.useMemo(function(){return gr==null?void 0:gr(Hr)},[gr,Hr]),Us=(Ni||Mr)&&fe.isValidElement(ua)&&ua.type===_e&&ua.props.fixed,Wl,Fu,Du;Ni&&(Fu={overflowY:Si?"scroll":"auto",maxHeight:pn.y}),Gi&&(Wl={overflowX:"auto"},Ni||(Fu={overflowY:"hidden"}),Du={width:fo===!0?"auto":fo,minWidth:"100%"});var Oo=fe.useCallback(function(Ui,ao){(0,At.Z)(Gs.current)&&ja(function(Zo){if(Zo.get(Ui)!==ao){var Fa=new Map(Zo);return Fa.set(Ui,ao),Fa}return Zo})},[]),fi=tr(null),Ga=(0,Dt.Z)(fi,2),js=Ga[0],Fo=Ga[1];function Ri(Ui,ao){ao&&(typeof ao=="function"?ao(Ui):ao.scrollLeft!==Ui&&(ao.scrollLeft=Ui,ao.scrollLeft!==Ui&&setTimeout(function(){ao.scrollLeft=Ui},0)))}var _o=(0,oe.Z)(function(Ui){var ao=Ui.currentTarget,Zo=Ui.scrollLeft,Fa=Dn==="rtl",ka=typeof Zo=="number"?Zo:ao.scrollLeft,lu=ao||br;if(!Fo()||Fo()===lu){var Vl;js(lu),Ri(ka,Mu.current),Ri(ka,Wo.current),Ri(ka,Lu.current),Ri(ka,(Vl=Qo.current)===null||Vl===void 0?void 0:Vl.setScrollLeft)}var uu=ao||Mu.current;if(uu){var rl=_r&&Di&&typeof fo=="number"?fo:uu.scrollWidth,Al=uu.clientWidth;if(rl===Al){Ml(!1),ju(!1);return}Fa?(Ml(-ka<rl-Al),ju(-ka>0)):(Ml(ka>0),ju(ka<rl-Al))}}),ds=(0,oe.Z)(function(Ui){_o(Ui),ri==null||ri(Ui)}),wo=function(){if(Gi&&Wo.current){var ao;_o({currentTarget:(0,qn.bn)(Wo.current),scrollLeft:(ao=Wo.current)===null||ao===void 0?void 0:ao.scrollLeft})}else Ml(!1),ju(!1)},ws=function(ao){var Zo,Fa=ao.width;(Zo=Qo.current)===null||Zo===void 0||Zo.checkScrollBarVisible();var ka=Gs.current?Gs.current.offsetWidth:Fa;_r&&po&&Gs.current&&(ka=po(Gs.current,ka)||ka),ka!==aa&&(wo(),ti(ka))},va=fe.useRef(!1);fe.useEffect(function(){va.current&&wo()},[Gi,zn,jo.length]),fe.useEffect(function(){va.current=!0},[]);var au=fe.useState(0),oo=(0,Dt.Z)(au,2),Ea=oo[0],to=oo[1],Po=fe.useState(!0),Eo=(0,Dt.Z)(Po,2),zo=Eo[0],ho=Eo[1];fe.useEffect(function(){(!Di||!_r)&&(Wo.current instanceof Element?to((0,It.o)(Wo.current).width):to((0,It.o)(th.current).width)),ho((0,Lt.G)("position","sticky"))},[]),fe.useEffect(function(){_r&&Oi&&(Oi.body.current=Wo.current)});var Bu=fe.useCallback(function(Ui){return fe.createElement(fe.Fragment,null,fe.createElement(ro,Ui),Us==="top"&&fe.createElement(Qe,Ui,ua))},[Us,ua]),hi=fe.useCallback(function(Ui){return fe.createElement(Qe,Ui,ua)},[ua]),uf=qi(["table"],"table"),Xi=fe.useMemo(function(){return jn||(la?fo==="max-content"?"auto":"fixed":Ni||Mr||io.some(function(Ui){var ao=Ui.ellipsis;return ao})?"fixed":"auto")},[Ni,la,io,jn,Mr]),Cc,su={colWidths:sa,columCount:io.length,stickyOffsets:uo,onHeaderRow:Zr,fixHeader:Ni,scroll:pn},ih=fe.useMemo(function(){return Si?null:typeof kr=="function"?kr():kr},[Si,kr]),Ec=fe.createElement(Vr,{data:Hr,measureColumnWidth:Ni||Gi||Mr}),_h=fe.createElement(Fi,{colWidths:io.map(function(Ui){var ao=Ui.width;return ao}),columns:io}),Nl=or!=null?fe.createElement("caption",{className:"".concat(lt,"-caption")},or):void 0,Iu=(0,Kt.Z)(Jt,{data:!0}),lo=(0,Kt.Z)(Jt,{aria:!0});if(Ni||Mr){var nl;typeof gi=="function"?(nl=gi(Hr,{scrollbarSize:Ea,ref:Wo,onScroll:_o}),su.colWidths=io.map(function(Ui,ao){var Zo=Ui.width,Fa=ao===io.length-1?Zo-Ea:Zo;return typeof Fa=="number"&&!Number.isNaN(Fa)?Fa:0})):nl=fe.createElement("div",{style:(0,Ae.Z)((0,Ae.Z)({},Wl),Fu),onScroll:ds,ref:Wo,className:Ye()("".concat(lt,"-body"))},fe.createElement(uf,(0,Se.Z)({style:(0,Ae.Z)((0,Ae.Z)({},Du),{},{tableLayout:Xi})},lo),Nl,_h,Ec,!Us&&ua&&fe.createElement(Qe,{stickyOffsets:uo,flattenColumns:io},ua)));var zh=(0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({noData:!Hr.length,maxContentScroll:Gi&&fo==="max-content"},su),os),{},{direction:Dn,stickyClassName:Ll,onScroll:_o});Cc=fe.createElement(fe.Fragment,null,fn!==!1&&fe.createElement(vr,(0,Se.Z)({},zh,{stickyTopOffset:As,className:"".concat(lt,"-header"),ref:Mu}),Bu),nl,Us&&Us!=="top"&&fe.createElement(vr,(0,Se.Z)({},zh,{stickyBottomOffset:Gt,className:"".concat(lt,"-summary"),ref:Lu}),hi),Mr&&Wo.current&&Wo.current instanceof Element&&fe.createElement(Kn,{ref:Qo,offsetScroll:Mn,scrollBodyRef:Wo,onScroll:_o,container:Ou,direction:Dn}))}else Cc=fe.createElement("div",{style:(0,Ae.Z)((0,Ae.Z)({},Wl),Fu),className:Ye()("".concat(lt,"-content")),onScroll:_o,ref:Wo},fe.createElement(uf,(0,Se.Z)({style:(0,Ae.Z)((0,Ae.Z)({},Du),{},{tableLayout:Xi})},lo),Nl,_h,fn!==!1&&fe.createElement(ro,(0,Se.Z)({},su,os)),Ec,ua&&fe.createElement(Qe,{stickyOffsets:uo,flattenColumns:io},ua)));var Hl=fe.createElement("div",(0,Se.Z)({className:Ye()(lt,Bn,(0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)((0,Re.Z)({},"".concat(lt,"-rtl"),Dn==="rtl"),"".concat(lt,"-ping-left"),Ns),"".concat(lt,"-ping-right"),Vo),"".concat(lt,"-layout-fixed"),jn==="fixed"),"".concat(lt,"-fixed-header"),Ni),"".concat(lt,"-fixed-column"),la),"".concat(lt,"-fixed-column-gapped"),la&&is),"".concat(lt,"-scroll-horizontal"),Gi),"".concat(lt,"-has-fix-left"),io[0]&&io[0].fixed),"".concat(lt,"-has-fix-right"),io[io.length-1]&&io[io.length-1].fixed==="right")),style:bn,id:Hn,ref:Gs},Iu),Gn&&fe.createElement(Ot,{className:"".concat(lt,"-title")},Gn(Hr)),fe.createElement("div",{ref:th,className:"".concat(lt,"-container")},Cc),In&&fe.createElement(Ot,{className:"".concat(lt,"-footer")},In(Hr)));Gi&&(Hl=fe.createElement(at.Z,{onResize:ws},Hl));var kc=nn(io,uo,Dn),Kl=fe.useMemo(function(){return{scrollX:fo,prefixCls:lt,getComponent:qi,scrollbarSize:Ea,direction:Dn,fixedInfoList:kc,isSticky:Mr,supportSticky:zo,componentWidth:aa,fixHeader:Ni,fixColumn:la,horizonScroll:Gi,tableLayout:Xi,rowClassName:sn,expandedRowClassName:Co.expandedRowClassName,expandIcon:mi,expandableType:Jo,expandRowByClick:Co.expandRowByClick,expandedRowRender:Co.expandedRowRender,onTriggerExpand:zr,expandIconColumnIndex:Co.expandIconColumnIndex,indentSize:Co.indentSize,allColumnsFixedLeft:io.every(function(Ui){return Ui.fixed==="left"}),emptyNode:ih,columns:jo,flattenColumns:io,onColumnResize:Oo,hoverStartRow:Ao,hoverEndRow:Aa,onHover:ma,rowExpandable:Co.rowExpandable,onRow:ei,getRowKey:Bi,expandedKeys:xi,childrenColumnName:Nn,rowHoverable:pi}},[fo,lt,qi,Ea,Dn,kc,Mr,zo,aa,Ni,la,Gi,Xi,sn,Co.expandedRowClassName,mi,Jo,Co.expandRowByClick,Co.expandedRowRender,zr,Co.expandIconColumnIndex,Co.indentSize,ih,jo,io,Oo,Ao,Aa,ma,Co.rowExpandable,ei,Bi,xi,Nn,pi]);return fe.createElement(Pe.Provider,{value:Kl},Hl)}var Pi=fe.forwardRef(hn);function qr(Qt){return ie(Pi,Qt)}var ki=qr();ki.EXPAND_COLUMN=pt.w,ki.INTERNAL_HOOKS=pt.R,ki.Column=ur,ki.ColumnGroup=Wn,ki.Summary=ct;var un=ki,Xn=st(45680),cr=ke(null),ar=ke(null);function xr(Qt,Sn,Jt){var lt=Sn||1;return Jt[Qt+lt]-(Jt[Qt]||0)}function Tr(Qt){var Sn=Qt.rowInfo,Jt=Qt.column,lt=Qt.colIndex,Bn=Qt.indent,sn=Qt.index,bn=Qt.component,zn=Qt.renderIndex,Yn=Qt.record,pn=Qt.style,jn=Qt.className,Dn=Qt.inverse,Gn=Qt.getHeight,In=Jt.render,gr=Jt.dataIndex,or=Jt.className,Hn=Jt.width,fn=Ce(ar,["columnsOffset"]),nr=fn.columnsOffset,kr=Ln(Sn,Jt,lt,Bn,sn),ei=kr.key,Zr=kr.fixedInfo,ri=kr.appendCellNode,li=kr.additionalCellProps,ii=li.style,Oi=li.colSpan,Di=Oi===void 0?1:Oi,po=li.rowSpan,Yt=po===void 0?1:po,ci=lt-1,pi=xr(ci,Di,nr),Hr=Di>1?Hn-pi:0,Si=(0,Ae.Z)((0,Ae.Z)((0,Ae.Z)({},ii),pn),{},{flex:"0 0 ".concat(pi,"px"),width:"".concat(pi,"px"),marginRight:Hr,pointerEvents:"auto"}),_r=fe.useMemo(function(){return Dn?Yt<=1:Di===0||Yt===0||Yt>1},[Yt,Di,Dn]);_r?Si.visibility="hidden":Dn&&(Si.height=Gn==null?void 0:Gn(Yt));var qi=_r?function(){return null}:In,Bi={};return(Yt===0||Di===0)&&(Bi.rowSpan=1,Bi.colSpan=1),fe.createElement(mt,(0,Se.Z)({className:Ye()(or,jn),ellipsis:Jt.ellipsis,align:Jt.align,scope:Jt.rowScope,component:bn,prefixCls:Sn.prefixCls,key:ei,record:Yn,index:sn,renderIndex:zn,dataIndex:gr,render:qi,shouldCellUpdate:Jt.shouldCellUpdate},Zr,{appendNode:ri,additionalProps:(0,Ae.Z)((0,Ae.Z)({},li),{},{style:Si},Bi)}))}var Wr=Tr,$r=["data","index","className","rowKey","style","extra","getHeight"],ni=fe.forwardRef(function(Qt,Sn){var Jt=Qt.data,lt=Qt.index,Bn=Qt.className,sn=Qt.rowKey,bn=Qt.style,zn=Qt.extra,Yn=Qt.getHeight,pn=(0,Le.Z)(Qt,$r),jn=Jt.record,Dn=Jt.indent,Gn=Jt.index,In=Ce(Pe,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),gr=In.scrollX,or=In.flattenColumns,Hn=In.prefixCls,fn=In.fixColumn,nr=In.componentWidth,kr=Ce(cr,["getComponent"]),ei=kr.getComponent,Zr=Ut(jn,sn,lt,Dn),ri=ei(["body","row"],"div"),li=ei(["body","cell"],"div"),ii=Zr.rowSupportExpand,Oi=Zr.expanded,Di=Zr.rowProps,po=Zr.expandedRowRender,Yt=Zr.expandedRowClassName,ci;if(ii&&Oi){var pi=po(jn,lt,Dn+1,Oi),Hr=Pn(Yt,jn,lt,Dn),Si={};fn&&(Si={style:(0,Re.Z)({},"--virtual-width","".concat(nr,"px"))});var _r="".concat(Hn,"-expanded-row-cell");ci=fe.createElement(ri,{className:Ye()("".concat(Hn,"-expanded-row"),"".concat(Hn,"-expanded-row-level-").concat(Dn+1),Hr)},fe.createElement(mt,{component:li,prefixCls:Hn,className:Ye()(_r,(0,Re.Z)({},"".concat(_r,"-fixed"),fn)),additionalProps:Si},pi))}var qi=(0,Ae.Z)((0,Ae.Z)({},bn),{},{width:gr});zn&&(qi.position="absolute",qi.pointerEvents="none");var Bi=fe.createElement(ri,(0,Se.Z)({},Di,pn,{"data-row-key":sn,ref:ii?null:Sn,className:Ye()(Bn,"".concat(Hn,"-row"),Di==null?void 0:Di.className,(0,Re.Z)({},"".concat(Hn,"-row-extra"),zn)),style:(0,Ae.Z)((0,Ae.Z)({},qi),Di==null?void 0:Di.style)}),or.map(function(gi,Qi){return fe.createElement(Wr,{key:Qi,component:li,rowInfo:Zr,column:gi,colIndex:Qi,indent:Dn,index:lt,renderIndex:Gn,record:jn,inverse:zn,getHeight:Yn})}));return ii?fe.createElement("div",{ref:Sn},Bi,ci):Bi}),ai=le(ni),yn=ai,Ci=fe.forwardRef(function(Qt,Sn){var Jt=Qt.data,lt=Qt.onScroll,Bn=Ce(Pe,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),sn=Bn.flattenColumns,bn=Bn.onColumnResize,zn=Bn.getRowKey,Yn=Bn.expandedKeys,pn=Bn.prefixCls,jn=Bn.childrenColumnName,Dn=Bn.scrollX,Gn=Bn.direction,In=Ce(cr),gr=In.sticky,or=In.scrollY,Hn=In.listItemHeight,fn=In.getComponent,nr=In.onScroll,kr=fe.useRef(),ei=$t(Jt,jn,Yn,zn),Zr=fe.useMemo(function(){var ci=0;return sn.map(function(pi){var Hr=pi.width,Si=pi.key;return ci+=Hr,[Si,Hr,ci]})},[sn]),ri=fe.useMemo(function(){return Zr.map(function(ci){return ci[2]})},[Zr]);fe.useEffect(function(){Zr.forEach(function(ci){var pi=(0,Dt.Z)(ci,2),Hr=pi[0],Si=pi[1];bn(Hr,Si)})},[Zr]),fe.useImperativeHandle(Sn,function(){var ci,pi={scrollTo:function(Si){var _r;(_r=kr.current)===null||_r===void 0||_r.scrollTo(Si)},nativeElement:(ci=kr.current)===null||ci===void 0?void 0:ci.nativeElement};return Object.defineProperty(pi,"scrollLeft",{get:function(){var Si;return((Si=kr.current)===null||Si===void 0?void 0:Si.getScrollInfo().x)||0},set:function(Si){var _r;(_r=kr.current)===null||_r===void 0||_r.scrollTo({left:Si})}}),pi});var li=function(pi,Hr){var Si,_r=(Si=ei[Hr])===null||Si===void 0?void 0:Si.record,qi=pi.onCell;if(qi){var Bi,gi=qi(_r,Hr);return(Bi=gi==null?void 0:gi.rowSpan)!==null&&Bi!==void 0?Bi:1}return 1},ii=function(pi){var Hr=pi.start,Si=pi.end,_r=pi.getSize,qi=pi.offsetY;if(Si<0)return null;for(var Bi=sn.filter(function(mi){return li(mi,Hr)===0}),gi=Hr,Qi=function(Nn){if(Bi=Bi.filter(function(zr){return li(zr,Nn)===0}),!Bi.length)return gi=Nn,1},ga=Hr;ga>=0&&!Qi(ga);ga-=1);for(var Ao=sn.filter(function(mi){return li(mi,Si)!==1}),Aa=Si,ma=function(Nn){if(Ao=Ao.filter(function(zr){return li(zr,Nn)!==1}),!Ao.length)return Aa=Math.max(Nn-1,Si),1},Dr=Si;Dr<ei.length&&!ma(Dr);Dr+=1);for(var eo=[],Co=function(Nn){var zr=ei[Nn];if(!zr)return 1;sn.some(function(wi){return li(wi,Nn)>1})&&eo.push(Nn)},Jo=gi;Jo<=Aa;Jo+=1)Co(Jo);var xi=eo.map(function(mi){var Nn=ei[mi],zr=zn(Nn.record,mi),wi=function(aa){var ti=mi+aa-1,Ho=zn(ei[ti].record,ti),Ko=_r(zr,Ho);return Ko.bottom-Ko.top},co=_r(zr);return fe.createElement(yn,{key:mi,data:Nn,rowKey:zr,index:mi,style:{top:-qi+co.top},extra:!0,getHeight:wi})});return xi},Oi=fe.useMemo(function(){return{columnsOffset:ri}},[ri]),Di="".concat(pn,"-tbody"),po=fn(["body","wrapper"]),Yt={};return gr&&(Yt.position="sticky",Yt.bottom=0,(0,Ne.Z)(gr)==="object"&&gr.offsetScroll&&(Yt.bottom=gr.offsetScroll)),fe.createElement(ar.Provider,{value:Oi},fe.createElement(Xn.Z,{fullHeight:!1,ref:kr,prefixCls:"".concat(Di,"-virtual"),styles:{horizontalScrollBar:Yt},className:Di,height:or,itemHeight:Hn||24,data:ei,itemKey:function(pi){return zn(pi.record)},component:po,scrollWidth:Dn,direction:Gn,onVirtualScroll:function(pi){var Hr,Si=pi.x;lt({currentTarget:(Hr=kr.current)===null||Hr===void 0?void 0:Hr.nativeElement,scrollLeft:Si})},onScroll:nr,extraRender:ii},function(ci,pi,Hr){var Si=zn(ci.record,pi);return fe.createElement(yn,{data:ci,rowKey:Si,index:pi,style:Hr.style})}))}),xn=le(Ci),yr=xn,Nr=function(Sn,Jt){var lt=Jt.ref,Bn=Jt.onScroll;return fe.createElement(yr,{ref:lt,data:Sn,onScroll:Bn})};function Yr(Qt,Sn){var Jt=Qt.data,lt=Qt.columns,Bn=Qt.scroll,sn=Qt.sticky,bn=Qt.prefixCls,zn=bn===void 0?hr:bn,Yn=Qt.className,pn=Qt.listItemHeight,jn=Qt.components,Dn=Qt.onScroll,Gn=Bn||{},In=Gn.x,gr=Gn.y;typeof In!="number"&&(In=1),typeof gr!="number"&&(gr=500);var or=(0,Et.zX)(function(nr,kr){return(0,Ke.Z)(jn,nr)||kr}),Hn=(0,Et.zX)(Dn),fn=fe.useMemo(function(){return{sticky:sn,scrollY:gr,listItemHeight:pn,getComponent:or,onScroll:Hn}},[sn,gr,pn,or,Hn]);return fe.createElement(cr.Provider,{value:fn},fe.createElement(un,(0,Se.Z)({},Qt,{className:Ye()(Yn,"".concat(zn,"-virtual")),scroll:(0,Ae.Z)((0,Ae.Z)({},Bn),{},{x:In}),components:(0,Ae.Z)((0,Ae.Z)({},jn),{},{body:Jt!=null&&Jt.length?Nr:void 0}),columns:lt,internalHooks:pt.R,tailor:!0,ref:Sn})))}var Zi=fe.forwardRef(Yr);function zi(Qt){return ie(Zi,Qt)}var bi=zi(),ji=null},90494:function(mn,dn,st){"use strict";st.d(dn,{g:function(){return fe},v:function(){return De}});var pt=st(77321),Dt=st(74416),oe=st(48736),Ge=["expandable"],De="RC_TABLE_INTERNAL_COL_DEFINE";function fe(me){var ke=me.expandable,Ce=(0,Dt.Z)(me,Ge),Se;return"expandable"in me?Se=(0,pt.Z)((0,pt.Z)({},Ce),ke):Se=Ce,Se.showExpandColumn===!1&&(Se.expandIconColumnIndex=-1),Se}},22711:function(mn,dn,st){"use strict";st.r(dn),st.d(dn,{ResizableTextArea:function(){return We},default:function(){return ot}});var pt=st(72308),Dt=st(49618),oe=st(77321),Ge=st(80702),De=st(52487),fe=st(74416),me=st(92310),ke=st.n(me),Ce=st(36901),Se=st(66003),Me=st(30292),ve=st(18929),we=st(59301),de=st(62853),z=st(29301),ee=st(34280),ae=st(16089),ie=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
pointer-events: none !important;
`,le=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],ue={},ge;function Pe(ut){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,wt=ut.getAttribute("id")||ut.getAttribute("data-reactid")||ut.getAttribute("name");if(ft&&ue[wt])return ue[wt];var Je=window.getComputedStyle(ut),nt=Je.getPropertyValue("box-sizing")||Je.getPropertyValue("-moz-box-sizing")||Je.getPropertyValue("-webkit-box-sizing"),xt=parseFloat(Je.getPropertyValue("padding-bottom"))+parseFloat(Je.getPropertyValue("padding-top")),Pt=parseFloat(Je.getPropertyValue("border-bottom-width"))+parseFloat(Je.getPropertyValue("border-top-width")),Ct=le.map(function(dt){return"".concat(dt,":").concat(Je.getPropertyValue(dt))}).join(";"),gt={sizingStyle:Ct,paddingSize:xt,borderSize:Pt,boxSizing:nt};return ft&&wt&&(ue[wt]=gt),gt}function je(ut){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,wt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Je=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ge||(ge=document.createElement("textarea"),ge.setAttribute("tab-index","-1"),ge.setAttribute("aria-hidden","true"),ge.setAttribute("name","hiddenTextarea"),document.body.appendChild(ge)),ut.getAttribute("wrap")?ge.setAttribute("wrap",ut.getAttribute("wrap")):ge.removeAttribute("wrap");var nt=Pe(ut,ft),xt=nt.paddingSize,Pt=nt.borderSize,Ct=nt.boxSizing,gt=nt.sizingStyle;ge.setAttribute("style","".concat(gt,";").concat(ie)),ge.value=ut.value||ut.placeholder||"";var dt=void 0,ht=void 0,Et,St=ge.scrollHeight;if(Ct==="border-box"?St+=Pt:Ct==="content-box"&&(St-=xt),wt!==null||Je!==null){ge.value=" ";var Ft=ge.scrollHeight-xt;wt!==null&&(dt=Ft*wt,Ct==="border-box"&&(dt=dt+xt+Pt),St=Math.max(dt,St)),Je!==null&&(ht=Ft*Je,Ct==="border-box"&&(ht=ht+xt+Pt),Et=St>ht?"":"hidden",St=Math.min(ht,St))}var mt={height:St,overflowY:Et,resize:"none"};return dt&&(mt.minHeight=dt),ht&&(mt.maxHeight=ht),mt}var Be=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Fe=0,Ne=1,Ae=2,Re=we.forwardRef(function(ut,ft){var wt=ut,Je=wt.prefixCls,nt=wt.defaultValue,xt=wt.value,Pt=wt.autoSize,Ct=wt.onResize,gt=wt.className,dt=wt.style,ht=wt.disabled,Et=wt.onChange,St=wt.onInternalAutoSize,Ft=(0,fe.Z)(wt,Be),mt=(0,ve.Z)(nt,{value:xt,postState:function(Vn){return Vn!=null?Vn:""}}),yt=(0,De.Z)(mt,2),tt=yt[0],Ve=yt[1],xe=function(Vn){Ve(Vn.target.value),Et==null||Et(Vn)},Le=we.useRef();we.useImperativeHandle(ft,function(){return{textArea:Le.current}});var Xe=we.useMemo(function(){return Pt&&(0,de.Z)(Pt)==="object"?[Pt.minRows,Pt.maxRows]:[]},[Pt]),rt=(0,De.Z)(Xe,2),Ie=rt[0],_e=rt[1],He=!!Pt,Qe=function(){try{if(document.activeElement===Le.current){var Vn=Le.current,Or=Vn.selectionStart,dr=Vn.selectionEnd,Lr=Vn.scrollTop;Le.current.setSelectionRange(Or,dr),Le.current.scrollTop=Lr}}catch(Xr){}},ct=we.useState(Ae),at=(0,De.Z)(ct,2),At=at[0],Lt=at[1],It=we.useState(),Kt=(0,De.Z)(It,2),Xt=Kt[0],$t=Kt[1],Ut=function(){Lt(Fe)};(0,ee.Z)(function(){He&&Ut()},[xt,Ie,_e,He]),(0,ee.Z)(function(){if(At===Fe)Lt(Ne);else if(At===Ne){var Ln=je(Le.current,!1,Ie,_e);Lt(Ae),$t(Ln)}else Qe()},[At]);var ln=we.useRef(),tn=function(){ae.Z.cancel(ln.current)},Wt=function(Vn){At===Ae&&(Ct==null||Ct(Vn),Pt&&(tn(),ln.current=(0,ae.Z)(function(){Ut()})))};we.useEffect(function(){return tn},[]);var En=He?Xt:null,Pn=(0,oe.Z)((0,oe.Z)({},dt),En);return(At===Fe||At===Ne)&&(Pn.overflowY="hidden",Pn.overflowX="hidden"),we.createElement(z.Z,{onResize:Wt,disabled:!(Pt||Ct)},we.createElement("textarea",(0,pt.Z)({},Ft,{ref:Le,style:Pn,className:ke()(Je,gt,(0,Dt.Z)({},"".concat(Je,"-disabled"),ht)),disabled:ht,value:tt,onChange:xe})))}),We=Re,Ye=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],Ue=we.forwardRef(function(ut,ft){var wt,Je=ut.defaultValue,nt=ut.value,xt=ut.onFocus,Pt=ut.onBlur,Ct=ut.onChange,gt=ut.allowClear,dt=ut.maxLength,ht=ut.onCompositionStart,Et=ut.onCompositionEnd,St=ut.suffix,Ft=ut.prefixCls,mt=Ft===void 0?"rc-textarea":Ft,yt=ut.showCount,tt=ut.count,Ve=ut.className,xe=ut.style,Le=ut.disabled,Xe=ut.hidden,rt=ut.classNames,Ie=ut.styles,_e=ut.onResize,He=ut.onClear,Qe=ut.onPressEnter,ct=ut.readOnly,at=ut.autoSize,At=ut.onKeyDown,Lt=(0,fe.Z)(ut,Ye),It=(0,ve.Z)(Je,{value:nt,defaultValue:Je}),Kt=(0,De.Z)(It,2),Xt=Kt[0],$t=Kt[1],Ut=Xt==null?"":String(Xt),ln=we.useState(!1),tn=(0,De.Z)(ln,2),Wt=tn[0],En=tn[1],Pn=we.useRef(!1),Ln=we.useState(null),Vn=(0,De.Z)(Ln,2),Or=Vn[0],dr=Vn[1],Lr=(0,we.useRef)(null),Xr=(0,we.useRef)(null),Vr=function(){var rn;return(rn=Xr.current)===null||rn===void 0?void 0:rn.textArea},si=function(){Vr().focus()};(0,we.useImperativeHandle)(ft,function(){var er;return{resizableTextArea:Xr.current,focus:si,blur:function(){Vr().blur()},nativeElement:((er=Lr.current)===null||er===void 0?void 0:er.nativeElement)||Vr()}}),(0,we.useEffect)(function(){En(function(er){return!Le&&er})},[Le]);var yi=we.useState(null),Ii=(0,De.Z)(yi,2),Fi=Ii[0],_i=Ii[1];we.useEffect(function(){if(Fi){var er;(er=Vr()).setSelectionRange.apply(er,(0,Ge.Z)(Fi))}},[Fi]);var Yi=(0,Se.Z)(tt,yt),et=(wt=Yi.max)!==null&&wt!==void 0?wt:dt,pr=Number(et)>0,vr=Yi.strategy(Ut),Ei=!!et&&vr>et,lr=function(rn,qt){var Qn=qt;!Pn.current&&Yi.exceedFormatter&&Yi.max&&Yi.strategy(qt)>Yi.max&&(Qn=Yi.exceedFormatter(qt,{max:Yi.max}),qt!==Qn&&_i([Vr().selectionStart||0,Vr().selectionEnd||0])),$t(Qn),(0,Me.rJ)(rn.currentTarget,rn,Ct,Qn)},wr=function(rn){Pn.current=!0,ht==null||ht(rn)},Br=function(rn){Pn.current=!1,lr(rn,rn.currentTarget.value),Et==null||Et(rn)},ro=function(rn){lr(rn,rn.target.value)},Ur=function(rn){rn.key==="Enter"&&Qe&&Qe(rn),At==null||At(rn)},on=function(rn){En(!0),xt==null||xt(rn)},nn=function(rn){En(!1),Pt==null||Pt(rn)},Zt=function(rn){$t(""),si(),(0,Me.rJ)(Vr(),rn,Ct)},tr=St,mr;Yi.show&&(Yi.showFormatter?mr=Yi.showFormatter({value:Ut,count:vr,maxLength:et}):mr="".concat(vr).concat(pr?" / ".concat(et):""),tr=we.createElement(we.Fragment,null,tr,we.createElement("span",{className:ke()("".concat(mt,"-data-count"),rt==null?void 0:rt.count),style:Ie==null?void 0:Ie.count},mr)));var Er=function(rn){var qt;_e==null||_e(rn),(qt=Vr())!==null&&qt!==void 0&&qt.style.height&&dr(!0)},An=!at&&!yt&&!gt;return we.createElement(Ce.BaseInput,{ref:Lr,value:Ut,allowClear:gt,handleReset:Zt,suffix:tr,prefixCls:mt,classNames:(0,oe.Z)((0,oe.Z)({},rt),{},{affixWrapper:ke()(rt==null?void 0:rt.affixWrapper,(0,Dt.Z)((0,Dt.Z)({},"".concat(mt,"-show-count"),yt),"".concat(mt,"-textarea-allow-clear"),gt))}),disabled:Le,focused:Wt,className:ke()(Ve,Ei&&"".concat(mt,"-out-of-range")),style:(0,oe.Z)((0,oe.Z)({},xe),Or&&!An?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof mr=="string"?mr:void 0}},hidden:Xe,readOnly:ct,onClear:He},we.createElement(We,(0,pt.Z)({},Lt,{autoSize:at,maxLength:dt,onKeyDown:Ur,onChange:ro,onFocus:on,onBlur:nn,onCompositionStart:wr,onCompositionEnd:Br,className:ke()(rt==null?void 0:rt.textarea),style:(0,oe.Z)((0,oe.Z)({},Ie==null?void 0:Ie.textarea),{},{resize:xe==null?void 0:xe.resize}),disabled:Le,prefixCls:mt,onResize:Er,ref:Xr,readOnly:ct})))}),Ke=Ue,ot=Ke},639:function(mn,dn,st){"use strict";st.d(dn,{Z:function(){return ue}});var pt=st(72308),Dt=st(49618),oe=st(77321),Ge=st(52487),De=st(74416),fe=st(59301),me=st(92310),ke=st.n(me),Ce=st(26112),Se=st(30699),Me=function(Pe){for(var je=Pe.prefixCls,Be=Pe.level,Fe=Pe.isStart,Ne=Pe.isEnd,Ae="".concat(je,"-indent-unit"),Re=[],We=0;We<Be;We+=1)Re.push(fe.createElement("span",{key:We,className:ke()(Ae,(0,Dt.Z)((0,Dt.Z)({},"".concat(Ae,"-start"),Fe[We]),"".concat(Ae,"-end"),Ne[We]))}));return fe.createElement("span",{"aria-hidden":"true",className:"".concat(je,"-indent")},Re)},ve=fe.memo(Me),we=st(65065),de=st(34061),z=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],ee="open",ae="close",ie="---",le=function(Pe){var je,Be,Fe,Ne=Pe.eventKey,Ae=Pe.className,Re=Pe.style,We=Pe.dragOver,Ye=Pe.dragOverGapTop,Ue=Pe.dragOverGapBottom,Ke=Pe.isLeaf,ot=Pe.isStart,ut=Pe.isEnd,ft=Pe.expanded,wt=Pe.selected,Je=Pe.checked,nt=Pe.halfChecked,xt=Pe.loading,Pt=Pe.domRef,Ct=Pe.active,gt=Pe.data,dt=Pe.onMouseMove,ht=Pe.selectable,Et=(0,De.Z)(Pe,z),St=fe.useContext(Se.k),Ft=fe.useContext(Se.y),mt=fe.useRef(null),yt=fe.useState(!1),tt=(0,Ge.Z)(yt,2),Ve=tt[0],xe=tt[1],Le=!!(St.disabled||Pe.disabled||(je=Ft.nodeDisabled)!==null&&je!==void 0&&je.call(Ft,gt)),Xe=fe.useMemo(function(){return!St.checkable||Pe.checkable===!1?!1:St.checkable},[St.checkable,Pe.checkable]),rt=function(vr){Le||St.onNodeSelect(vr,(0,de.F)(Pe))},Ie=function(vr){Le||!Xe||Pe.disableCheckbox||St.onNodeCheck(vr,(0,de.F)(Pe),!Je)},_e=fe.useMemo(function(){return typeof ht=="boolean"?ht:St.selectable},[ht,St.selectable]),He=function(vr){St.onNodeClick(vr,(0,de.F)(Pe)),_e?rt(vr):Ie(vr)},Qe=function(vr){St.onNodeDoubleClick(vr,(0,de.F)(Pe))},ct=function(vr){St.onNodeMouseEnter(vr,(0,de.F)(Pe))},at=function(vr){St.onNodeMouseLeave(vr,(0,de.F)(Pe))},At=function(vr){St.onNodeContextMenu(vr,(0,de.F)(Pe))},Lt=fe.useMemo(function(){return!!(St.draggable&&(!St.draggable.nodeDraggable||St.draggable.nodeDraggable(gt)))},[St.draggable,gt]),It=function(vr){vr.stopPropagation(),xe(!0),St.onNodeDragStart(vr,Pe);try{vr.dataTransfer.setData("text/plain","")}catch(Ei){}},Kt=function(vr){vr.preventDefault(),vr.stopPropagation(),St.onNodeDragEnter(vr,Pe)},Xt=function(vr){vr.preventDefault(),vr.stopPropagation(),St.onNodeDragOver(vr,Pe)},$t=function(vr){vr.stopPropagation(),St.onNodeDragLeave(vr,Pe)},Ut=function(vr){vr.stopPropagation(),xe(!1),St.onNodeDragEnd(vr,Pe)},ln=function(vr){vr.preventDefault(),vr.stopPropagation(),xe(!1),St.onNodeDrop(vr,Pe)},tn=function(vr){xt||St.onNodeExpand(vr,(0,de.F)(Pe))},Wt=fe.useMemo(function(){var pr=(0,we.Z)(St.keyEntities,Ne)||{},vr=pr.children;return!!(vr||[]).length},[St.keyEntities,Ne]),En=fe.useMemo(function(){return Ke===!1?!1:Ke||!St.loadData&&!Wt||St.loadData&&Pe.loaded&&!Wt},[Ke,St.loadData,Wt,Pe.loaded]);fe.useEffect(function(){xt||typeof St.loadData=="function"&&ft&&!En&&!Pe.loaded&&St.onNodeLoad((0,de.F)(Pe))},[xt,St.loadData,St.onNodeLoad,ft,En,Pe]);var Pn=fe.useMemo(function(){var pr;return(pr=St.draggable)!==null&&pr!==void 0&&pr.icon?fe.createElement("span",{className:"".concat(St.prefixCls,"-draggable-icon")},St.draggable.icon):null},[St.draggable]),Ln=function(vr){var Ei=Pe.switcherIcon||St.switcherIcon;return typeof Ei=="function"?Ei((0,oe.Z)((0,oe.Z)({},Pe),{},{isLeaf:vr})):Ei},Vn=function(){if(En){var vr=Ln(!0);return vr!==!1?fe.createElement("span",{className:ke()("".concat(St.prefixCls,"-switcher"),"".concat(St.prefixCls,"-switcher-noop"))},vr):null}var Ei=Ln(!1);return Ei!==!1?fe.createElement("span",{onClick:tn,className:ke()("".concat(St.prefixCls,"-switcher"),"".concat(St.prefixCls,"-switcher_").concat(ft?ee:ae))},Ei):null},Or=fe.useMemo(function(){if(!Xe)return null;var pr=typeof Xe!="boolean"?Xe:null;return fe.createElement("span",{className:ke()("".concat(St.prefixCls,"-checkbox"),(0,Dt.Z)((0,Dt.Z)((0,Dt.Z)({},"".concat(St.prefixCls,"-checkbox-checked"),Je),"".concat(St.prefixCls,"-checkbox-indeterminate"),!Je&&nt),"".concat(St.prefixCls,"-checkbox-disabled"),Le||Pe.disableCheckbox)),onClick:Ie,role:"checkbox","aria-checked":nt?"mixed":Je,"aria-disabled":Le||Pe.disableCheckbox,"aria-label":"Select ".concat(typeof Pe.title=="string"?Pe.title:"tree node")},pr)},[Xe,Je,nt,Le,Pe.disableCheckbox,Pe.title]),dr=fe.useMemo(function(){return En?null:ft?ee:ae},[En,ft]),Lr=fe.useMemo(function(){return fe.createElement("span",{className:ke()("".concat(St.prefixCls,"-iconEle"),"".concat(St.prefixCls,"-icon__").concat(dr||"docu"),(0,Dt.Z)({},"".concat(St.prefixCls,"-icon_loading"),xt))})},[St.prefixCls,dr,xt]),Xr=fe.useMemo(function(){var pr=!!St.draggable,vr=!Pe.disabled&&pr&&St.dragOverNodeKey===Ne;return vr?St.dropIndicatorRender({dropPosition:St.dropPosition,dropLevelOffset:St.dropLevelOffset,indent:St.indent,prefixCls:St.prefixCls,direction:St.direction}):null},[St.dropPosition,St.dropLevelOffset,St.indent,St.prefixCls,St.direction,St.draggable,St.dragOverNodeKey,St.dropIndicatorRender]),Vr=fe.useMemo(function(){var pr=Pe.title,vr=pr===void 0?ie:pr,Ei="".concat(St.prefixCls,"-node-content-wrapper"),lr;if(St.showIcon){var wr=Pe.icon||St.icon;lr=wr?fe.createElement("span",{className:ke()("".concat(St.prefixCls,"-iconEle"),"".concat(St.prefixCls,"-icon__customize"))},typeof wr=="function"?wr(Pe):wr):Lr}else St.loadData&&xt&&(lr=Lr);var Br;return typeof vr=="function"?Br=vr(gt):St.titleRender?Br=St.titleRender(gt):Br=vr,fe.createElement("span",{ref:mt,title:typeof vr=="string"?vr:"",className:ke()(Ei,"".concat(Ei,"-").concat(dr||"normal"),(0,Dt.Z)({},"".concat(St.prefixCls,"-node-selected"),!Le&&(wt||Ve))),onMouseEnter:ct,onMouseLeave:at,onContextMenu:At,onClick:He,onDoubleClick:Qe},lr,fe.createElement("span",{className:"".concat(St.prefixCls,"-title")},Br),Xr)},[St.prefixCls,St.showIcon,Pe,St.icon,Lr,St.titleRender,gt,dr,ct,at,At,He,Qe]),si=(0,Ce.Z)(Et,{aria:!0,data:!0}),yi=(0,we.Z)(St.keyEntities,Ne)||{},Ii=yi.level,Fi=ut[ut.length-1],_i=!Le&&Lt,Yi=St.draggingNodeKey===Ne,et=ht!==void 0?{"aria-selected":!!ht}:void 0;return fe.createElement("div",(0,pt.Z)({ref:Pt,role:"treeitem","aria-expanded":Ke?void 0:ft,className:ke()(Ae,"".concat(St.prefixCls,"-treenode"),(Fe={},(0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)(Fe,"".concat(St.prefixCls,"-treenode-disabled"),Le),"".concat(St.prefixCls,"-treenode-switcher-").concat(ft?"open":"close"),!Ke),"".concat(St.prefixCls,"-treenode-checkbox-checked"),Je),"".concat(St.prefixCls,"-treenode-checkbox-indeterminate"),nt),"".concat(St.prefixCls,"-treenode-selected"),wt),"".concat(St.prefixCls,"-treenode-loading"),xt),"".concat(St.prefixCls,"-treenode-active"),Ct),"".concat(St.prefixCls,"-treenode-leaf-last"),Fi),"".concat(St.prefixCls,"-treenode-draggable"),Lt),"dragging",Yi),(0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)((0,Dt.Z)(Fe,"drop-target",St.dropTargetKey===Ne),"drop-container",St.dropContainerKey===Ne),"drag-over",!Le&&We),"drag-over-gap-top",!Le&&Ye),"drag-over-gap-bottom",!Le&&Ue),"filter-node",(Be=St.filterTreeNode)===null||Be===void 0?void 0:Be.call(St,(0,de.F)(Pe))),"".concat(St.prefixCls,"-treenode-leaf"),En))),style:Re,draggable:_i,onDragStart:_i?It:void 0,onDragEnter:Lt?Kt:void 0,onDragOver:Lt?Xt:void 0,onDragLeave:Lt?$t:void 0,onDrop:Lt?ln:void 0,onDragEnd:Lt?Ut:void 0,onMouseMove:dt},et,si),fe.createElement(ve,{prefixCls:St.prefixCls,level:Ii,isStart:ot,isEnd:ut}),Pn,Vn(),Or,Vr)};le.isTreeNode=1;var ue=le},30699:function(mn,dn,st){"use strict";st.d(dn,{k:function(){return Dt},y:function(){return oe}});var pt=st(59301),Dt=pt.createContext(null),oe=pt.createContext({})},15018:function(mn,dn,st){"use strict";st.d(dn,{OF:function(){return Ne.Z},y6:function(){return ae.y},ZP:function(){return Le}});var pt=st(72308),Dt=st(62853),oe=st(77321),Ge=st(80702),De=st(96949),fe=st(55090),me=st(80237),ke=st(77205),Ce=st(38793),Se=st(49618),Me=st(92310),ve=st.n(Me),we=st(10228),de=st(26112),z=st(48736),ee=st(59301),ae=st(30699),ie=function(rt){var Ie=rt.dropPosition,_e=rt.dropLevelOffset,He=rt.indent,Qe={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Ie){case-1:Qe.top=0,Qe.left=-_e*He;break;case 1:Qe.bottom=0,Qe.left=-_e*He;break;case 0:Qe.bottom=0,Qe.left=He;break}return ee.createElement("div",{style:Qe})},le=ie;function ue(Xe){if(Xe==null)throw new TypeError("Cannot destructure "+Xe)}var ge=st(52487),Pe=st(74416),je=st(34280),Be=st(45680),Fe=st(77900),Ne=st(639);function Ae(Xe,rt){var Ie=ee.useState(!1),_e=(0,ge.Z)(Ie,2),He=_e[0],Qe=_e[1];(0,je.Z)(function(){if(He)return Xe(),function(){rt()}},[He]),(0,je.Z)(function(){return Qe(!0),function(){Qe(!1)}},[])}var Re=Ae,We=st(34061),Ye=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ue=ee.forwardRef(function(Xe,rt){var Ie=Xe.className,_e=Xe.style,He=Xe.motion,Qe=Xe.motionNodes,ct=Xe.motionType,at=Xe.onMotionStart,At=Xe.onMotionEnd,Lt=Xe.active,It=Xe.treeNodeRequiredProps,Kt=(0,Pe.Z)(Xe,Ye),Xt=ee.useState(!0),$t=(0,ge.Z)(Xt,2),Ut=$t[0],ln=$t[1],tn=ee.useContext(ae.k),Wt=tn.prefixCls,En=Qe&&ct!=="hide";(0,je.Z)(function(){Qe&&En!==Ut&&ln(En)},[Qe]);var Pn=function(){Qe&&at()},Ln=ee.useRef(!1),Vn=function(){Qe&&!Ln.current&&(Ln.current=!0,At())};Re(Pn,Vn);var Or=function(Lr){En===Lr&&Vn()};return Qe?ee.createElement(Fe.default,(0,pt.Z)({ref:rt,visible:Ut},He,{motionAppear:ct==="show",onVisibleChanged:Or}),function(dr,Lr){var Xr=dr.className,Vr=dr.style;return ee.createElement("div",{ref:Lr,className:ve()("".concat(Wt,"-treenode-motion"),Xr),style:Vr},Qe.map(function(si){var yi=Object.assign({},(ue(si.data),si.data)),Ii=si.title,Fi=si.key,_i=si.isStart,Yi=si.isEnd;delete yi.children;var et=(0,We.H8)(Fi,It);return ee.createElement(Ne.Z,(0,pt.Z)({},yi,et,{title:Ii,active:Lt,data:si.data,key:Fi,isStart:_i,isEnd:Yi}))}))}):ee.createElement(Ne.Z,(0,pt.Z)({domRef:rt,className:Ie,style:_e},Kt,{active:Lt}))}),Ke=Ue;function ot(){var Xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ie=Xe.length,_e=rt.length;if(Math.abs(Ie-_e)!==1)return{add:!1,key:null};function He(Qe,ct){var at=new Map;Qe.forEach(function(Lt){at.set(Lt,!0)});var At=ct.filter(function(Lt){return!at.has(Lt)});return At.length===1?At[0]:null}return Ie<_e?{add:!0,key:He(Xe,rt)}:{add:!1,key:He(rt,Xe)}}function ut(Xe,rt,Ie){var _e=Xe.findIndex(function(at){return at.key===Ie}),He=Xe[_e+1],Qe=rt.findIndex(function(at){return at.key===Ie});if(He){var ct=rt.findIndex(function(at){return at.key===He.key});return rt.slice(Qe+1,ct)}return rt.slice(Qe+1)}var ft=["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"],wt={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Je=function(){},nt="RC_TREE_MOTION_".concat(Math.random()),xt={key:nt},Pt={key:nt,level:0,index:0,pos:"0",node:xt,nodes:[xt]},Ct={parent:null,children:[],pos:Pt.pos,data:xt,title:null,key:nt,isStart:[],isEnd:[]};function gt(Xe,rt,Ie,_e){return rt===!1||!Ie?Xe:Xe.slice(0,Math.ceil(Ie/_e)+1)}function dt(Xe){var rt=Xe.key,Ie=Xe.pos;return(0,We.km)(rt,Ie)}function ht(Xe){for(var rt=String(Xe.data.key),Ie=Xe;Ie.parent;)Ie=Ie.parent,rt="".concat(Ie.data.key," > ").concat(rt);return rt}var Et=ee.forwardRef(function(Xe,rt){var Ie=Xe.prefixCls,_e=Xe.data,He=Xe.selectable,Qe=Xe.checkable,ct=Xe.expandedKeys,at=Xe.selectedKeys,At=Xe.checkedKeys,Lt=Xe.loadedKeys,It=Xe.loadingKeys,Kt=Xe.halfCheckedKeys,Xt=Xe.keyEntities,$t=Xe.disabled,Ut=Xe.dragging,ln=Xe.dragOverNodeKey,tn=Xe.dropPosition,Wt=Xe.motion,En=Xe.height,Pn=Xe.itemHeight,Ln=Xe.virtual,Vn=Xe.scrollWidth,Or=Xe.focusable,dr=Xe.activeItem,Lr=Xe.focused,Xr=Xe.tabIndex,Vr=Xe.onKeyDown,si=Xe.onFocus,yi=Xe.onBlur,Ii=Xe.onActiveChange,Fi=Xe.onListChangeStart,_i=Xe.onListChangeEnd,Yi=(0,Pe.Z)(Xe,ft),et=ee.useRef(null),pr=ee.useRef(null);ee.useImperativeHandle(rt,function(){return{scrollTo:function(On){et.current.scrollTo(On)},getIndentWidth:function(){return pr.current.offsetWidth}}});var vr=ee.useState(ct),Ei=(0,ge.Z)(vr,2),lr=Ei[0],wr=Ei[1],Br=ee.useState(_e),ro=(0,ge.Z)(Br,2),Ur=ro[0],on=ro[1],nn=ee.useState(_e),Zt=(0,ge.Z)(nn,2),tr=Zt[0],mr=Zt[1],Er=ee.useState([]),An=(0,ge.Z)(Er,2),er=An[0],rn=An[1],qt=ee.useState(null),Qn=(0,ge.Z)(qt,2),Ot=Qn[0],vn=Qn[1],_n=ee.useRef(_e);_n.current=_e;function qn(){var Kn=_n.current;on(Kn),mr(Kn),rn([]),vn(null),_i()}(0,je.Z)(function(){wr(ct);var Kn=ot(lr,ct);if(Kn.key!==null)if(Kn.add){var On=Ur.findIndex(function(br){var Pr=br.key;return Pr===Kn.key}),ur=gt(ut(Ur,_e,Kn.key),Ln,En,Pn),$n=Ur.slice();$n.splice(On+1,0,Ct),mr($n),rn(ur),vn("show")}else{var Wn=_e.findIndex(function(br){var Pr=br.key;return Pr===Kn.key}),hr=gt(ut(_e,Ur,Kn.key),Ln,En,Pn),Rr=_e.slice();Rr.splice(Wn+1,0,Ct),mr(Rr),rn(hr),vn("hide")}else Ur!==_e&&(on(_e),mr(_e))},[ct,_e]),ee.useEffect(function(){Ut||qn()},[Ut]);var an=Wt?tr:_e,Un={expandedKeys:ct,selectedKeys:at,loadedKeys:Lt,loadingKeys:It,checkedKeys:At,halfCheckedKeys:Kt,dragOverNodeKey:ln,dropPosition:tn,keyEntities:Xt};return ee.createElement(ee.Fragment,null,Lr&&dr&&ee.createElement("span",{style:wt,"aria-live":"assertive"},ht(dr)),ee.createElement("div",null,ee.createElement("input",{style:wt,disabled:Or===!1||$t,tabIndex:Or!==!1?Xr:null,onKeyDown:Vr,onFocus:si,onBlur:yi,value:"",onChange:Je,"aria-label":"for screen reader"})),ee.createElement("div",{className:"".concat(Ie,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},ee.createElement("div",{className:"".concat(Ie,"-indent")},ee.createElement("div",{ref:pr,className:"".concat(Ie,"-indent-unit")}))),ee.createElement(Be.Z,(0,pt.Z)({},Yi,{data:an,itemKey:dt,height:En,fullHeight:!1,virtual:Ln,itemHeight:Pn,scrollWidth:Vn,prefixCls:"".concat(Ie,"-list"),ref:et,role:"tree",onVisibleChange:function(On){On.every(function(ur){return dt(ur)!==nt})&&qn()}}),function(Kn){var On=Kn.pos,ur=Object.assign({},(ue(Kn.data),Kn.data)),$n=Kn.title,Wn=Kn.key,hr=Kn.isStart,Rr=Kn.isEnd,br=(0,We.km)(Wn,On);delete ur.key,delete ur.children;var Pr=(0,We.H8)(br,Un);return ee.createElement(Ke,(0,pt.Z)({},ur,Pr,{title:$n,active:!!dr&&Wn===dr.key,pos:On,data:Kn.data,isStart:hr,isEnd:Rr,motion:Wt,motionNodes:Wn===nt?er:null,motionType:Ot,onMotionStart:Fi,onMotionEnd:qn,treeNodeRequiredProps:Un,onMouseMove:function(){Ii(null)}}))}))}),St=Et,Ft=st(82661),mt=st(34643),yt=st(65065),tt=10,Ve=function(Xe){(0,ke.Z)(Ie,Xe);var rt=(0,Ce.Z)(Ie);function Ie(){var _e;(0,De.Z)(this,Ie);for(var He=arguments.length,Qe=new Array(He),ct=0;ct<He;ct++)Qe[ct]=arguments[ct];return _e=rt.call.apply(rt,[this].concat(Qe)),(0,Se.Z)((0,me.Z)(_e),"destroyed",!1),(0,Se.Z)((0,me.Z)(_e),"delayedDragEnterLogic",void 0),(0,Se.Z)((0,me.Z)(_e),"loadingRetryTimes",{}),(0,Se.Z)((0,me.Z)(_e),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,We.w$)()}),(0,Se.Z)((0,me.Z)(_e),"dragStartMousePosition",null),(0,Se.Z)((0,me.Z)(_e),"dragNodeProps",null),(0,Se.Z)((0,me.Z)(_e),"currentMouseOverDroppableNodeKey",null),(0,Se.Z)((0,me.Z)(_e),"listRef",ee.createRef()),(0,Se.Z)((0,me.Z)(_e),"onNodeDragStart",function(at,At){var Lt=_e.state,It=Lt.expandedKeys,Kt=Lt.keyEntities,Xt=_e.props.onDragStart,$t=At.eventKey;_e.dragNodeProps=At,_e.dragStartMousePosition={x:at.clientX,y:at.clientY};var Ut=(0,Ft._5)(It,$t);_e.setState({draggingNodeKey:$t,dragChildrenKeys:(0,Ft.wA)($t,Kt),indent:_e.listRef.current.getIndentWidth()}),_e.setExpandedKeys(Ut),window.addEventListener("dragend",_e.onWindowDragEnd),Xt==null||Xt({event:at,node:(0,We.F)(At)})}),(0,Se.Z)((0,me.Z)(_e),"onNodeDragEnter",function(at,At){var Lt=_e.state,It=Lt.expandedKeys,Kt=Lt.keyEntities,Xt=Lt.dragChildrenKeys,$t=Lt.flattenNodes,Ut=Lt.indent,ln=_e.props,tn=ln.onDragEnter,Wt=ln.onExpand,En=ln.allowDrop,Pn=ln.direction,Ln=At.pos,Vn=At.eventKey;if(_e.currentMouseOverDroppableNodeKey!==Vn&&(_e.currentMouseOverDroppableNodeKey=Vn),!_e.dragNodeProps){_e.resetDragState();return}var Or=(0,Ft.OM)(at,_e.dragNodeProps,At,Ut,_e.dragStartMousePosition,En,$t,Kt,It,Pn),dr=Or.dropPosition,Lr=Or.dropLevelOffset,Xr=Or.dropTargetKey,Vr=Or.dropContainerKey,si=Or.dropTargetPos,yi=Or.dropAllowed,Ii=Or.dragOverNodeKey;if(Xt.includes(Xr)||!yi){_e.resetDragState();return}if(_e.delayedDragEnterLogic||(_e.delayedDragEnterLogic={}),Object.keys(_e.delayedDragEnterLogic).forEach(function(Fi){clearTimeout(_e.delayedDragEnterLogic[Fi])}),_e.dragNodeProps.eventKey!==At.eventKey&&(at.persist(),_e.delayedDragEnterLogic[Ln]=window.setTimeout(function(){if(_e.state.draggingNodeKey!==null){var Fi=(0,Ge.Z)(It),_i=(0,yt.Z)(Kt,At.eventKey);_i&&(_i.children||[]).length&&(Fi=(0,Ft.L0)(It,At.eventKey)),_e.props.hasOwnProperty("expandedKeys")||_e.setExpandedKeys(Fi),Wt==null||Wt(Fi,{node:(0,We.F)(At),expanded:!0,nativeEvent:at.nativeEvent})}},800)),_e.dragNodeProps.eventKey===Xr&&Lr===0){_e.resetDragState();return}_e.setState({dragOverNodeKey:Ii,dropPosition:dr,dropLevelOffset:Lr,dropTargetKey:Xr,dropContainerKey:Vr,dropTargetPos:si,dropAllowed:yi}),tn==null||tn({event:at,node:(0,We.F)(At),expandedKeys:It})}),(0,Se.Z)((0,me.Z)(_e),"onNodeDragOver",function(at,At){var Lt=_e.state,It=Lt.dragChildrenKeys,Kt=Lt.flattenNodes,Xt=Lt.keyEntities,$t=Lt.expandedKeys,Ut=Lt.indent,ln=_e.props,tn=ln.onDragOver,Wt=ln.allowDrop,En=ln.direction;if(_e.dragNodeProps){var Pn=(0,Ft.OM)(at,_e.dragNodeProps,At,Ut,_e.dragStartMousePosition,Wt,Kt,Xt,$t,En),Ln=Pn.dropPosition,Vn=Pn.dropLevelOffset,Or=Pn.dropTargetKey,dr=Pn.dropContainerKey,Lr=Pn.dropTargetPos,Xr=Pn.dropAllowed,Vr=Pn.dragOverNodeKey;It.includes(Or)||!Xr||(_e.dragNodeProps.eventKey===Or&&Vn===0?_e.state.dropPosition===null&&_e.state.dropLevelOffset===null&&_e.state.dropTargetKey===null&&_e.state.dropContainerKey===null&&_e.state.dropTargetPos===null&&_e.state.dropAllowed===!1&&_e.state.dragOverNodeKey===null||_e.resetDragState():Ln===_e.state.dropPosition&&Vn===_e.state.dropLevelOffset&&Or===_e.state.dropTargetKey&&dr===_e.state.dropContainerKey&&Lr===_e.state.dropTargetPos&&Xr===_e.state.dropAllowed&&Vr===_e.state.dragOverNodeKey||_e.setState({dropPosition:Ln,dropLevelOffset:Vn,dropTargetKey:Or,dropContainerKey:dr,dropTargetPos:Lr,dropAllowed:Xr,dragOverNodeKey:Vr}),tn==null||tn({event:at,node:(0,We.F)(At)}))}}),(0,Se.Z)((0,me.Z)(_e),"onNodeDragLeave",function(at,At){_e.currentMouseOverDroppableNodeKey===At.eventKey&&!at.currentTarget.contains(at.relatedTarget)&&(_e.resetDragState(),_e.currentMouseOverDroppableNodeKey=null);var Lt=_e.props.onDragLeave;Lt==null||Lt({event:at,node:(0,We.F)(At)})}),(0,Se.Z)((0,me.Z)(_e),"onWindowDragEnd",function(at){_e.onNodeDragEnd(at,null,!0),window.removeEventListener("dragend",_e.onWindowDragEnd)}),(0,Se.Z)((0,me.Z)(_e),"onNodeDragEnd",function(at,At){var Lt=_e.props.onDragEnd;_e.setState({dragOverNodeKey:null}),_e.cleanDragState(),Lt==null||Lt({event:at,node:(0,We.F)(At)}),_e.dragNodeProps=null,window.removeEventListener("dragend",_e.onWindowDragEnd)}),(0,Se.Z)((0,me.Z)(_e),"onNodeDrop",function(at,At){var Lt,It=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Kt=_e.state,Xt=Kt.dragChildrenKeys,$t=Kt.dropPosition,Ut=Kt.dropTargetKey,ln=Kt.dropTargetPos,tn=Kt.dropAllowed;if(tn){var Wt=_e.props.onDrop;if(_e.setState({dragOverNodeKey:null}),_e.cleanDragState(),Ut!==null){var En=(0,oe.Z)((0,oe.Z)({},(0,We.H8)(Ut,_e.getTreeNodeRequiredProps())),{},{active:((Lt=_e.getActiveItem())===null||Lt===void 0?void 0:Lt.key)===Ut,data:(0,yt.Z)(_e.state.keyEntities,Ut).node}),Pn=Xt.includes(Ut);(0,z.ZP)(!Pn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Ln=(0,Ft.yx)(ln),Vn={event:at,node:(0,We.F)(En),dragNode:_e.dragNodeProps?(0,We.F)(_e.dragNodeProps):null,dragNodesKeys:[_e.dragNodeProps.eventKey].concat(Xt),dropToGap:$t!==0,dropPosition:$t+Number(Ln[Ln.length-1])};It||Wt==null||Wt(Vn),_e.dragNodeProps=null}}}),(0,Se.Z)((0,me.Z)(_e),"cleanDragState",function(){var at=_e.state.draggingNodeKey;at!==null&&_e.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),_e.dragStartMousePosition=null,_e.currentMouseOverDroppableNodeKey=null}),(0,Se.Z)((0,me.Z)(_e),"triggerExpandActionExpand",function(at,At){var Lt=_e.state,It=Lt.expandedKeys,Kt=Lt.flattenNodes,Xt=At.expanded,$t=At.key,Ut=At.isLeaf;if(!(Ut||at.shiftKey||at.metaKey||at.ctrlKey)){var ln=Kt.filter(function(Wt){return Wt.key===$t})[0],tn=(0,We.F)((0,oe.Z)((0,oe.Z)({},(0,We.H8)($t,_e.getTreeNodeRequiredProps())),{},{data:ln.data}));_e.setExpandedKeys(Xt?(0,Ft._5)(It,$t):(0,Ft.L0)(It,$t)),_e.onNodeExpand(at,tn)}}),(0,Se.Z)((0,me.Z)(_e),"onNodeClick",function(at,At){var Lt=_e.props,It=Lt.onClick,Kt=Lt.expandAction;Kt==="click"&&_e.triggerExpandActionExpand(at,At),It==null||It(at,At)}),(0,Se.Z)((0,me.Z)(_e),"onNodeDoubleClick",function(at,At){var Lt=_e.props,It=Lt.onDoubleClick,Kt=Lt.expandAction;Kt==="doubleClick"&&_e.triggerExpandActionExpand(at,At),It==null||It(at,At)}),(0,Se.Z)((0,me.Z)(_e),"onNodeSelect",function(at,At){var Lt=_e.state.selectedKeys,It=_e.state,Kt=It.keyEntities,Xt=It.fieldNames,$t=_e.props,Ut=$t.onSelect,ln=$t.multiple,tn=At.selected,Wt=At[Xt.key],En=!tn;En?ln?Lt=(0,Ft.L0)(Lt,Wt):Lt=[Wt]:Lt=(0,Ft._5)(Lt,Wt);var Pn=Lt.map(function(Ln){var Vn=(0,yt.Z)(Kt,Ln);return Vn?Vn.node:null}).filter(Boolean);_e.setUncontrolledState({selectedKeys:Lt}),Ut==null||Ut(Lt,{event:"select",selected:En,node:At,selectedNodes:Pn,nativeEvent:at.nativeEvent})}),(0,Se.Z)((0,me.Z)(_e),"onNodeCheck",function(at,At,Lt){var It=_e.state,Kt=It.keyEntities,Xt=It.checkedKeys,$t=It.halfCheckedKeys,Ut=_e.props,ln=Ut.checkStrictly,tn=Ut.onCheck,Wt=At.key,En,Pn={event:"check",node:At,checked:Lt,nativeEvent:at.nativeEvent};if(ln){var Ln=Lt?(0,Ft.L0)(Xt,Wt):(0,Ft._5)(Xt,Wt),Vn=(0,Ft._5)($t,Wt);En={checked:Ln,halfChecked:Vn},Pn.checkedNodes=Ln.map(function(si){return(0,yt.Z)(Kt,si)}).filter(Boolean).map(function(si){return si.node}),_e.setUncontrolledState({checkedKeys:Ln})}else{var Or=(0,mt.S)([].concat((0,Ge.Z)(Xt),[Wt]),!0,Kt),dr=Or.checkedKeys,Lr=Or.halfCheckedKeys;if(!Lt){var Xr=new Set(dr);Xr.delete(Wt);var Vr=(0,mt.S)(Array.from(Xr),{checked:!1,halfCheckedKeys:Lr},Kt);dr=Vr.checkedKeys,Lr=Vr.halfCheckedKeys}En=dr,Pn.checkedNodes=[],Pn.checkedNodesPositions=[],Pn.halfCheckedKeys=Lr,dr.forEach(function(si){var yi=(0,yt.Z)(Kt,si);if(yi){var Ii=yi.node,Fi=yi.pos;Pn.checkedNodes.push(Ii),Pn.checkedNodesPositions.push({node:Ii,pos:Fi})}}),_e.setUncontrolledState({checkedKeys:dr},!1,{halfCheckedKeys:Lr})}tn==null||tn(En,Pn)}),(0,Se.Z)((0,me.Z)(_e),"onNodeLoad",function(at){var At,Lt=at.key,It=_e.state.keyEntities,Kt=(0,yt.Z)(It,Lt);if(!(Kt!=null&&(At=Kt.children)!==null&&At!==void 0&&At.length)){var Xt=new Promise(function($t,Ut){_e.setState(function(ln){var tn=ln.loadedKeys,Wt=tn===void 0?[]:tn,En=ln.loadingKeys,Pn=En===void 0?[]:En,Ln=_e.props,Vn=Ln.loadData,Or=Ln.onLoad;if(!Vn||Wt.includes(Lt)||Pn.includes(Lt))return null;var dr=Vn(at);return dr.then(function(){var Lr=_e.state.loadedKeys,Xr=(0,Ft.L0)(Lr,Lt);Or==null||Or(Xr,{event:"load",node:at}),_e.setUncontrolledState({loadedKeys:Xr}),_e.setState(function(Vr){return{loadingKeys:(0,Ft._5)(Vr.loadingKeys,Lt)}}),$t()}).catch(function(Lr){if(_e.setState(function(Vr){return{loadingKeys:(0,Ft._5)(Vr.loadingKeys,Lt)}}),_e.loadingRetryTimes[Lt]=(_e.loadingRetryTimes[Lt]||0)+1,_e.loadingRetryTimes[Lt]>=tt){var Xr=_e.state.loadedKeys;(0,z.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),_e.setUncontrolledState({loadedKeys:(0,Ft.L0)(Xr,Lt)}),$t()}Ut(Lr)}),{loadingKeys:(0,Ft.L0)(Pn,Lt)}})});return Xt.catch(function(){}),Xt}}),(0,Se.Z)((0,me.Z)(_e),"onNodeMouseEnter",function(at,At){var Lt=_e.props.onMouseEnter;Lt==null||Lt({event:at,node:At})}),(0,Se.Z)((0,me.Z)(_e),"onNodeMouseLeave",function(at,At){var Lt=_e.props.onMouseLeave;Lt==null||Lt({event:at,node:At})}),(0,Se.Z)((0,me.Z)(_e),"onNodeContextMenu",function(at,At){var Lt=_e.props.onRightClick;Lt&&(at.preventDefault(),Lt({event:at,node:At}))}),(0,Se.Z)((0,me.Z)(_e),"onFocus",function(){var at=_e.props.onFocus;_e.setState({focused:!0});for(var At=arguments.length,Lt=new Array(At),It=0;It<At;It++)Lt[It]=arguments[It];at==null||at.apply(void 0,Lt)}),(0,Se.Z)((0,me.Z)(_e),"onBlur",function(){var at=_e.props.onBlur;_e.setState({focused:!1}),_e.onActiveChange(null);for(var At=arguments.length,Lt=new Array(At),It=0;It<At;It++)Lt[It]=arguments[It];at==null||at.apply(void 0,Lt)}),(0,Se.Z)((0,me.Z)(_e),"getTreeNodeRequiredProps",function(){var at=_e.state,At=at.expandedKeys,Lt=at.selectedKeys,It=at.loadedKeys,Kt=at.loadingKeys,Xt=at.checkedKeys,$t=at.halfCheckedKeys,Ut=at.dragOverNodeKey,ln=at.dropPosition,tn=at.keyEntities;return{expandedKeys:At||[],selectedKeys:Lt||[],loadedKeys:It||[],loadingKeys:Kt||[],checkedKeys:Xt||[],halfCheckedKeys:$t||[],dragOverNodeKey:Ut,dropPosition:ln,keyEntities:tn}}),(0,Se.Z)((0,me.Z)(_e),"setExpandedKeys",function(at){var At=_e.state,Lt=At.treeData,It=At.fieldNames,Kt=(0,We.oH)(Lt,at,It);_e.setUncontrolledState({expandedKeys:at,flattenNodes:Kt},!0)}),(0,Se.Z)((0,me.Z)(_e),"onNodeExpand",function(at,At){var Lt=_e.state.expandedKeys,It=_e.state,Kt=It.listChanging,Xt=It.fieldNames,$t=_e.props,Ut=$t.onExpand,ln=$t.loadData,tn=At.expanded,Wt=At[Xt.key];if(!Kt){var En=Lt.includes(Wt),Pn=!tn;if((0,z.ZP)(tn&&En||!tn&&!En,"Expand state not sync with index check"),Lt=Pn?(0,Ft.L0)(Lt,Wt):(0,Ft._5)(Lt,Wt),_e.setExpandedKeys(Lt),Ut==null||Ut(Lt,{node:At,expanded:Pn,nativeEvent:at.nativeEvent}),Pn&&ln){var Ln=_e.onNodeLoad(At);Ln&&Ln.then(function(){var Vn=(0,We.oH)(_e.state.treeData,Lt,Xt);_e.setUncontrolledState({flattenNodes:Vn})}).catch(function(){var Vn=_e.state.expandedKeys,Or=(0,Ft._5)(Vn,Wt);_e.setExpandedKeys(Or)})}}}),(0,Se.Z)((0,me.Z)(_e),"onListChangeStart",function(){_e.setUncontrolledState({listChanging:!0})}),(0,Se.Z)((0,me.Z)(_e),"onListChangeEnd",function(){setTimeout(function(){_e.setUncontrolledState({listChanging:!1})})}),(0,Se.Z)((0,me.Z)(_e),"onActiveChange",function(at){var At=_e.state.activeKey,Lt=_e.props,It=Lt.onActiveChange,Kt=Lt.itemScrollOffset,Xt=Kt===void 0?0:Kt;At!==at&&(_e.setState({activeKey:at}),at!==null&&_e.scrollTo({key:at,offset:Xt}),It==null||It(at))}),(0,Se.Z)((0,me.Z)(_e),"getActiveItem",function(){var at=_e.state,At=at.activeKey,Lt=at.flattenNodes;return At===null?null:Lt.find(function(It){var Kt=It.key;return Kt===At})||null}),(0,Se.Z)((0,me.Z)(_e),"offsetActiveKey",function(at){var At=_e.state,Lt=At.flattenNodes,It=At.activeKey,Kt=Lt.findIndex(function(Ut){var ln=Ut.key;return ln===It});Kt===-1&&at<0&&(Kt=Lt.length),Kt=(Kt+at+Lt.length)%Lt.length;var Xt=Lt[Kt];if(Xt){var $t=Xt.key;_e.onActiveChange($t)}else _e.onActiveChange(null)}),(0,Se.Z)((0,me.Z)(_e),"onKeyDown",function(at){var At=_e.state,Lt=At.activeKey,It=At.expandedKeys,Kt=At.checkedKeys,Xt=At.fieldNames,$t=_e.props,Ut=$t.onKeyDown,ln=$t.checkable,tn=$t.selectable;switch(at.which){case we.Z.UP:{_e.offsetActiveKey(-1),at.preventDefault();break}case we.Z.DOWN:{_e.offsetActiveKey(1),at.preventDefault();break}}var Wt=_e.getActiveItem();if(Wt&&Wt.data){var En=_e.getTreeNodeRequiredProps(),Pn=Wt.data.isLeaf===!1||!!(Wt.data[Xt.children]||[]).length,Ln=(0,We.F)((0,oe.Z)((0,oe.Z)({},(0,We.H8)(Lt,En)),{},{data:Wt.data,active:!0}));switch(at.which){case we.Z.LEFT:{Pn&&It.includes(Lt)?_e.onNodeExpand({},Ln):Wt.parent&&_e.onActiveChange(Wt.parent.key),at.preventDefault();break}case we.Z.RIGHT:{Pn&&!It.includes(Lt)?_e.onNodeExpand({},Ln):Wt.children&&Wt.children.length&&_e.onActiveChange(Wt.children[0].key),at.preventDefault();break}case we.Z.ENTER:case we.Z.SPACE:{ln&&!Ln.disabled&&Ln.checkable!==!1&&!Ln.disableCheckbox?_e.onNodeCheck({},Ln,!Kt.includes(Lt)):!ln&&tn&&!Ln.disabled&&Ln.selectable!==!1&&_e.onNodeSelect({},Ln);break}}}Ut==null||Ut(at)}),(0,Se.Z)((0,me.Z)(_e),"setUncontrolledState",function(at){var At=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Lt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!_e.destroyed){var It=!1,Kt=!0,Xt={};Object.keys(at).forEach(function($t){if(_e.props.hasOwnProperty($t)){Kt=!1;return}It=!0,Xt[$t]=at[$t]}),It&&(!At||Kt)&&_e.setState((0,oe.Z)((0,oe.Z)({},Xt),Lt))}}),(0,Se.Z)((0,me.Z)(_e),"scrollTo",function(at){_e.listRef.current.scrollTo(at)}),_e}return(0,fe.Z)(Ie,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var He=this.props,Qe=He.activeKey,ct=He.itemScrollOffset,at=ct===void 0?0:ct;Qe!==void 0&&Qe!==this.state.activeKey&&(this.setState({activeKey:Qe}),Qe!==null&&this.scrollTo({key:Qe,offset:at}))}},{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 He=this.state,Qe=He.focused,ct=He.flattenNodes,at=He.keyEntities,At=He.draggingNodeKey,Lt=He.activeKey,It=He.dropLevelOffset,Kt=He.dropContainerKey,Xt=He.dropTargetKey,$t=He.dropPosition,Ut=He.dragOverNodeKey,ln=He.indent,tn=this.props,Wt=tn.prefixCls,En=tn.className,Pn=tn.style,Ln=tn.showLine,Vn=tn.focusable,Or=tn.tabIndex,dr=Or===void 0?0:Or,Lr=tn.selectable,Xr=tn.showIcon,Vr=tn.icon,si=tn.switcherIcon,yi=tn.draggable,Ii=tn.checkable,Fi=tn.checkStrictly,_i=tn.disabled,Yi=tn.motion,et=tn.loadData,pr=tn.filterTreeNode,vr=tn.height,Ei=tn.itemHeight,lr=tn.scrollWidth,wr=tn.virtual,Br=tn.titleRender,ro=tn.dropIndicatorRender,Ur=tn.onContextMenu,on=tn.onScroll,nn=tn.direction,Zt=tn.rootClassName,tr=tn.rootStyle,mr=(0,de.Z)(this.props,{aria:!0,data:!0}),Er;yi&&((0,Dt.Z)(yi)==="object"?Er=yi:typeof yi=="function"?Er={nodeDraggable:yi}:Er={});var An={prefixCls:Wt,selectable:Lr,showIcon:Xr,icon:Vr,switcherIcon:si,draggable:Er,draggingNodeKey:At,checkable:Ii,checkStrictly:Fi,disabled:_i,keyEntities:at,dropLevelOffset:It,dropContainerKey:Kt,dropTargetKey:Xt,dropPosition:$t,dragOverNodeKey:Ut,indent:ln,direction:nn,dropIndicatorRender:ro,loadData:et,filterTreeNode:pr,titleRender:Br,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 ee.createElement(ae.k.Provider,{value:An},ee.createElement("div",{className:ve()(Wt,En,Zt,(0,Se.Z)((0,Se.Z)((0,Se.Z)({},"".concat(Wt,"-show-line"),Ln),"".concat(Wt,"-focused"),Qe),"".concat(Wt,"-active-focused"),Lt!==null)),style:tr},ee.createElement(St,(0,pt.Z)({ref:this.listRef,prefixCls:Wt,style:Pn,data:ct,disabled:_i,selectable:Lr,checkable:!!Ii,motion:Yi,dragging:At!==null,height:vr,itemHeight:Ei,virtual:wr,focusable:Vn,focused:Qe,tabIndex:dr,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Ur,onScroll:on,scrollWidth:lr},this.getTreeNodeRequiredProps(),mr))))}}],[{key:"getDerivedStateFromProps",value:function(He,Qe){var ct=Qe.prevProps,at={prevProps:He};function At(dr){return!ct&&He.hasOwnProperty(dr)||ct&&ct[dr]!==He[dr]}var Lt,It=Qe.fieldNames;if(At("fieldNames")&&(It=(0,We.w$)(He.fieldNames),at.fieldNames=It),At("treeData")?Lt=He.treeData:At("children")&&((0,z.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Lt=(0,We.zn)(He.children)),Lt){at.treeData=Lt;var Kt=(0,We.I8)(Lt,{fieldNames:It});at.keyEntities=(0,oe.Z)((0,Se.Z)({},nt,Pt),Kt.keyEntities)}var Xt=at.keyEntities||Qe.keyEntities;if(At("expandedKeys")||ct&&At("autoExpandParent"))at.expandedKeys=He.autoExpandParent||!ct&&He.defaultExpandParent?(0,Ft.r7)(He.expandedKeys,Xt):He.expandedKeys;else if(!ct&&He.defaultExpandAll){var $t=(0,oe.Z)({},Xt);delete $t[nt];var Ut=[];Object.keys($t).forEach(function(dr){var Lr=$t[dr];Lr.children&&Lr.children.length&&Ut.push(Lr.key)}),at.expandedKeys=Ut}else!ct&&He.defaultExpandedKeys&&(at.expandedKeys=He.autoExpandParent||He.defaultExpandParent?(0,Ft.r7)(He.defaultExpandedKeys,Xt):He.defaultExpandedKeys);if(at.expandedKeys||delete at.expandedKeys,Lt||at.expandedKeys){var ln=(0,We.oH)(Lt||Qe.treeData,at.expandedKeys||Qe.expandedKeys,It);at.flattenNodes=ln}if(He.selectable&&(At("selectedKeys")?at.selectedKeys=(0,Ft.BT)(He.selectedKeys,He):!ct&&He.defaultSelectedKeys&&(at.selectedKeys=(0,Ft.BT)(He.defaultSelectedKeys,He))),He.checkable){var tn;if(At("checkedKeys")?tn=(0,Ft.E6)(He.checkedKeys)||{}:!ct&&He.defaultCheckedKeys?tn=(0,Ft.E6)(He.defaultCheckedKeys)||{}:Lt&&(tn=(0,Ft.E6)(He.checkedKeys)||{checkedKeys:Qe.checkedKeys,halfCheckedKeys:Qe.halfCheckedKeys}),tn){var Wt=tn,En=Wt.checkedKeys,Pn=En===void 0?[]:En,Ln=Wt.halfCheckedKeys,Vn=Ln===void 0?[]:Ln;if(!He.checkStrictly){var Or=(0,mt.S)(Pn,!0,Xt);Pn=Or.checkedKeys,Vn=Or.halfCheckedKeys}at.checkedKeys=Pn,at.halfCheckedKeys=Vn}}return At("loadedKeys")&&(at.loadedKeys=He.loadedKeys),at}}]),Ie}(ee.Component);(0,Se.Z)(Ve,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:le,allowDrop:function(){return!0},expandAction:!1}),(0,Se.Z)(Ve,"TreeNode",Ne.Z);var xe=Ve,Le=xe},82661:function(mn,dn,st){"use strict";st.d(dn,{BT:function(){return ee},E6:function(){return le},L0:function(){return Se},OM:function(){return z},_5:function(){return Ce},r7:function(){return ue},wA:function(){return ve},yx:function(){return Me}});var pt=st(80702),Dt=st(62853),oe=st(48736),Ge=st(59301),De=st(639),fe=st(65065),me=st(34061),ke=null;function Ce(ge,Pe){if(!ge)return[];var je=ge.slice(),Be=je.indexOf(Pe);return Be>=0&&je.splice(Be,1),je}function Se(ge,Pe){var je=(ge||[]).slice();return je.indexOf(Pe)===-1&&je.push(Pe),je}function Me(ge){return ge.split("-")}function ve(ge,Pe){var je=[],Be=(0,fe.Z)(Pe,ge);function Fe(){var Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Ne.forEach(function(Ae){var Re=Ae.key,We=Ae.children;je.push(Re),Fe(We)})}return Fe(Be.children),je}function we(ge){if(ge.parent){var Pe=Me(ge.pos);return Number(Pe[Pe.length-1])===ge.parent.children.length-1}return!1}function de(ge){var Pe=Me(ge.pos);return Number(Pe[Pe.length-1])===0}function z(ge,Pe,je,Be,Fe,Ne,Ae,Re,We,Ye){var Ue,Ke=ge.clientX,ot=ge.clientY,ut=ge.target.getBoundingClientRect(),ft=ut.top,wt=ut.height,Je=(Ye==="rtl"?-1:1)*(((Fe==null?void 0:Fe.x)||0)-Ke),nt=(Je-12)/Be,xt=We.filter(function(Le){var Xe;return(Xe=Re[Le])===null||Xe===void 0||(Xe=Xe.children)===null||Xe===void 0?void 0:Xe.length}),Pt=(0,fe.Z)(Re,je.eventKey);if(ot<ft+wt/2){var Ct=Ae.findIndex(function(Le){return Le.key===Pt.key}),gt=Ct<=0?0:Ct-1,dt=Ae[gt].key;Pt=(0,fe.Z)(Re,dt)}var ht=Pt.key,Et=Pt,St=Pt.key,Ft=0,mt=0;if(!xt.includes(ht))for(var yt=0;yt<nt&&we(Pt);yt+=1)Pt=Pt.parent,mt+=1;var tt=Pe.data,Ve=Pt.node,xe=!0;return de(Pt)&&Pt.level===0&&ot<ft+wt/2&&Ne({dragNode:tt,dropNode:Ve,dropPosition:-1})&&Pt.key===je.eventKey?Ft=-1:(Et.children||[]).length&&xt.includes(St)?Ne({dragNode:tt,dropNode:Ve,dropPosition:0})?Ft=0:xe=!1:mt===0?nt>-1.5?Ne({dragNode:tt,dropNode:Ve,dropPosition:1})?Ft=1:xe=!1:Ne({dragNode:tt,dropNode:Ve,dropPosition:0})?Ft=0:Ne({dragNode:tt,dropNode:Ve,dropPosition:1})?Ft=1:xe=!1:Ne({dragNode:tt,dropNode:Ve,dropPosition:1})?Ft=1:xe=!1,{dropPosition:Ft,dropLevelOffset:mt,dropTargetKey:Pt.key,dropTargetPos:Pt.pos,dragOverNodeKey:St,dropContainerKey:Ft===0?null:((Ue=Pt.parent)===null||Ue===void 0?void 0:Ue.key)||null,dropAllowed:xe}}function ee(ge,Pe){if(ge){var je=Pe.multiple;return je?ge.slice():ge.length?[ge[0]]:ge}}var ae=function(Pe){return Pe};function ie(ge,Pe){if(!ge)return[];var je=Pe||{},Be=je.processProps,Fe=Be===void 0?ae:Be,Ne=Array.isArray(ge)?ge:[ge];return Ne.map(function(Ae){var Re=Ae.children,We=_objectWithoutProperties(Ae,ke),Ye=ie(Re,Pe);return React.createElement(TreeNode,_extends({key:We.key},Fe(We)),Ye)})}function le(ge){if(!ge)return null;var Pe;if(Array.isArray(ge))Pe={checkedKeys:ge,halfCheckedKeys:void 0};else if((0,Dt.Z)(ge)==="object")Pe={checkedKeys:ge.checked||void 0,halfCheckedKeys:ge.halfChecked||void 0};else return(0,oe.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return Pe}function ue(ge,Pe){var je=new Set;function Be(Fe){if(!je.has(Fe)){var Ne=(0,fe.Z)(Pe,Fe);if(Ne){je.add(Fe);var Ae=Ne.parent,Re=Ne.node;Re.disabled||Ae&&Be(Ae.key)}}}return(ge||[]).forEach(function(Fe){Be(Fe)}),(0,pt.Z)(je)}},34643:function(mn,dn,st){"use strict";st.d(dn,{S:function(){return me}});var pt=st(48736),Dt=st(65065);function oe(ke,Ce){var Se=new Set;return ke.forEach(function(Me){Ce.has(Me)||Se.add(Me)}),Se}function Ge(ke){var Ce=ke||{},Se=Ce.disabled,Me=Ce.disableCheckbox,ve=Ce.checkable;return!!(Se||Me)||ve===!1}function De(ke,Ce,Se,Me){for(var ve=new Set(ke),we=new Set,de=0;de<=Se;de+=1){var z=Ce.get(de)||new Set;z.forEach(function(le){var ue=le.key,ge=le.node,Pe=le.children,je=Pe===void 0?[]:Pe;ve.has(ue)&&!Me(ge)&&je.filter(function(Be){return!Me(Be.node)}).forEach(function(Be){ve.add(Be.key)})})}for(var ee=new Set,ae=Se;ae>=0;ae-=1){var ie=Ce.get(ae)||new Set;ie.forEach(function(le){var ue=le.parent,ge=le.node;if(!(Me(ge)||!le.parent||ee.has(le.parent.key))){if(Me(le.parent.node)){ee.add(ue.key);return}var Pe=!0,je=!1;(ue.children||[]).filter(function(Be){return!Me(Be.node)}).forEach(function(Be){var Fe=Be.key,Ne=ve.has(Fe);Pe&&!Ne&&(Pe=!1),!je&&(Ne||we.has(Fe))&&(je=!0)}),Pe&&ve.add(ue.key),je&&we.add(ue.key),ee.add(ue.key)}})}return{checkedKeys:Array.from(ve),halfCheckedKeys:Array.from(oe(we,ve))}}function fe(ke,Ce,Se,Me,ve){for(var we=new Set(ke),de=new Set(Ce),z=0;z<=Me;z+=1){var ee=Se.get(z)||new Set;ee.forEach(function(ue){var ge=ue.key,Pe=ue.node,je=ue.children,Be=je===void 0?[]:je;!we.has(ge)&&!de.has(ge)&&!ve(Pe)&&Be.filter(function(Fe){return!ve(Fe.node)}).forEach(function(Fe){we.delete(Fe.key)})})}de=new Set;for(var ae=new Set,ie=Me;ie>=0;ie-=1){var le=Se.get(ie)||new Set;le.forEach(function(ue){var ge=ue.parent,Pe=ue.node;if(!(ve(Pe)||!ue.parent||ae.has(ue.parent.key))){if(ve(ue.parent.node)){ae.add(ge.key);return}var je=!0,Be=!1;(ge.children||[]).filter(function(Fe){return!ve(Fe.node)}).forEach(function(Fe){var Ne=Fe.key,Ae=we.has(Ne);je&&!Ae&&(je=!1),!Be&&(Ae||de.has(Ne))&&(Be=!0)}),je||we.delete(ge.key),Be&&de.add(ge.key),ae.add(ge.key)}})}return{checkedKeys:Array.from(we),halfCheckedKeys:Array.from(oe(de,we))}}function me(ke,Ce,Se,Me){var ve=[],we;Me?we=Me:we=Ge;var de=new Set(ke.filter(function(ie){var le=!!(0,Dt.Z)(Se,ie);return le||ve.push(ie),le})),z=new Map,ee=0;Object.keys(Se).forEach(function(ie){var le=Se[ie],ue=le.level,ge=z.get(ue);ge||(ge=new Set,z.set(ue,ge)),ge.add(le),ee=Math.max(ee,ue)}),(0,pt.ZP)(!ve.length,"Tree missing follow keys: ".concat(ve.slice(0,100).map(function(ie){return"'".concat(ie,"'")}).join(", ")));var ae;return Ce===!0?ae=De(de,z,ee,we):ae=fe(de,Ce.halfCheckedKeys,z,ee,we),ae}},65065:function(mn,dn,st){"use strict";st.d(dn,{Z:function(){return pt}});function pt(Dt,oe){return Dt[oe]}},34061:function(mn,dn,st){"use strict";st.d(dn,{F:function(){return ue},H8:function(){return le},I8:function(){return ie},km:function(){return ve},oH:function(){return ee},w$:function(){return we},zn:function(){return z}});var pt=st(62853),Dt=st(80702),oe=st(77321),Ge=st(74416),De=st(11592),fe=st(2738),me=st(48736),ke=st(65065),Ce=["children"];function Se(ge,Pe){return"".concat(ge,"-").concat(Pe)}function Me(ge){return ge&&ge.type&&ge.type.isTreeNode}function ve(ge,Pe){return ge!=null?ge:Pe}function we(ge){var Pe=ge||{},je=Pe.title,Be=Pe._title,Fe=Pe.key,Ne=Pe.children,Ae=je||"title";return{title:Ae,_title:Be||[Ae],key:Fe||"key",children:Ne||"children"}}function de(ge,Pe){var je=new Map;function Be(Fe){var Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Fe||[]).forEach(function(Ae){var Re=Ae[Pe.key],We=Ae[Pe.children];warning(Re!=null,"Tree node must have a certain key: [".concat(Ne).concat(Re,"]"));var Ye=String(Re);warning(!je.has(Ye)||Re===null||Re===void 0,"Same 'key' exist in the Tree: ".concat(Ye)),je.set(Ye,!0),Be(We,"".concat(Ne).concat(Ye," > "))})}Be(ge)}function z(ge){function Pe(je){var Be=(0,De.Z)(je);return Be.map(function(Fe){if(!Me(Fe))return(0,me.ZP)(!Fe,"Tree/TreeNode can only accept TreeNode as children."),null;var Ne=Fe.key,Ae=Fe.props,Re=Ae.children,We=(0,Ge.Z)(Ae,Ce),Ye=(0,oe.Z)({key:Ne},We),Ue=Pe(Re);return Ue.length&&(Ye.children=Ue),Ye}).filter(function(Fe){return Fe})}return Pe(ge)}function ee(ge,Pe,je){var Be=we(je),Fe=Be._title,Ne=Be.key,Ae=Be.children,Re=new Set(Pe===!0?[]:Pe),We=[];function Ye(Ue){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Ue.map(function(ot,ut){for(var ft=Se(Ke?Ke.pos:"0",ut),wt=ve(ot[Ne],ft),Je,nt=0;nt<Fe.length;nt+=1){var xt=Fe[nt];if(ot[xt]!==void 0){Je=ot[xt];break}}var Pt=Object.assign((0,fe.Z)(ot,[].concat((0,Dt.Z)(Fe),[Ne,Ae])),{title:Je,key:wt,parent:Ke,pos:ft,children:null,data:ot,isStart:[].concat((0,Dt.Z)(Ke?Ke.isStart:[]),[ut===0]),isEnd:[].concat((0,Dt.Z)(Ke?Ke.isEnd:[]),[ut===Ue.length-1])});return We.push(Pt),Pe===!0||Re.has(wt)?Pt.children=Ye(ot[Ae]||[],Pt):Pt.children=[],Pt})}return Ye(ge),We}function ae(ge,Pe,je){var Be={};(0,pt.Z)(je)==="object"?Be=je:Be={externalGetKey:je},Be=Be||{};var Fe=Be,Ne=Fe.childrenPropName,Ae=Fe.externalGetKey,Re=Fe.fieldNames,We=we(Re),Ye=We.key,Ue=We.children,Ke=Ne||Ue,ot;Ae?typeof Ae=="string"?ot=function(wt){return wt[Ae]}:typeof Ae=="function"&&(ot=function(wt){return Ae(wt)}):ot=function(wt,Je){return ve(wt[Ye],Je)};function ut(ft,wt,Je,nt){var xt=ft?ft[Ke]:ge,Pt=ft?Se(Je.pos,wt):"0",Ct=ft?[].concat((0,Dt.Z)(nt),[ft]):[];if(ft){var gt=ot(ft,Pt),dt={node:ft,index:wt,pos:Pt,key:gt,parentPos:Je.node?Je.pos:null,level:Je.level+1,nodes:Ct};Pe(dt)}xt&&xt.forEach(function(ht,Et){ut(ht,Et,{node:ft,pos:Pt,level:Je?Je.level+1:-1},Ct)})}ut(null)}function ie(ge){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},je=Pe.initWrapper,Be=Pe.processEntity,Fe=Pe.onProcessFinished,Ne=Pe.externalGetKey,Ae=Pe.childrenPropName,Re=Pe.fieldNames,We=arguments.length>2?arguments[2]:void 0,Ye=Ne||We,Ue={},Ke={},ot={posEntities:Ue,keyEntities:Ke};return je&&(ot=je(ot)||ot),ae(ge,function(ut){var ft=ut.node,wt=ut.index,Je=ut.pos,nt=ut.key,xt=ut.parentPos,Pt=ut.level,Ct=ut.nodes,gt={node:ft,nodes:Ct,index:wt,key:nt,pos:Je,level:Pt},dt=ve(nt,Je);Ue[Je]=gt,Ke[dt]=gt,gt.parent=Ue[xt],gt.parent&&(gt.parent.children=gt.parent.children||[],gt.parent.children.push(gt)),Be&&Be(gt,ot)},{externalGetKey:Ye,childrenPropName:Ae,fieldNames:Re}),Fe&&Fe(ot),ot}function le(ge,Pe){var je=Pe.expandedKeys,Be=Pe.selectedKeys,Fe=Pe.loadedKeys,Ne=Pe.loadingKeys,Ae=Pe.checkedKeys,Re=Pe.halfCheckedKeys,We=Pe.dragOverNodeKey,Ye=Pe.dropPosition,Ue=Pe.keyEntities,Ke=(0,ke.Z)(Ue,ge),ot={eventKey:ge,expanded:je.indexOf(ge)!==-1,selected:Be.indexOf(ge)!==-1,loaded:Fe.indexOf(ge)!==-1,loading:Ne.indexOf(ge)!==-1,checked:Ae.indexOf(ge)!==-1,halfChecked:Re.indexOf(ge)!==-1,pos:String(Ke?Ke.pos:""),dragOver:We===ge&&Ye===0,dragOverGapTop:We===ge&&Ye===-1,dragOverGapBottom:We===ge&&Ye===1};return ot}function ue(ge){var Pe=ge.data,je=ge.expanded,Be=ge.selected,Fe=ge.checked,Ne=ge.loaded,Ae=ge.loading,Re=ge.halfChecked,We=ge.dragOver,Ye=ge.dragOverGapTop,Ue=ge.dragOverGapBottom,Ke=ge.pos,ot=ge.active,ut=ge.eventKey,ft=(0,oe.Z)((0,oe.Z)({},Pe),{},{expanded:je,selected:Be,checked:Fe,loaded:Ne,loading:Ae,halfChecked:Re,dragOver:We,dragOverGapTop:Ye,dragOverGapBottom:Ue,pos:Ke,active:ot,key:ut});return"props"in ft||Object.defineProperty(ft,"props",{get:function(){return(0,me.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),ge}}),ft}},90472:function(mn,dn,st){"use strict";st.d(dn,{Z:function(){return ut}});var pt=st(72308),Dt=st(96949),oe=st(55090),Ge=st(80237),De=st(77205),fe=st(38793),me=st(49618),ke=st(59301),Ce=st(77321),Se=st(74416),Me=st(62853),ve=st(65736),we=st(72633),de=st(80702),z=st(92310),ee=st.n(z),ae=st(26112),ie=st(48736),le=function(ft,wt){if(ft&&wt){var Je=Array.isArray(wt)?wt:wt.split(","),nt=ft.name||"",xt=ft.type||"",Pt=xt.replace(/\/.*$/,"");return Je.some(function(Ct){var gt=Ct.trim();if(/^\*(\/\*)?$/.test(Ct))return!0;if(gt.charAt(0)==="."){var dt=nt.toLowerCase(),ht=gt.toLowerCase(),Et=[ht];return(ht===".jpg"||ht===".jpeg")&&(Et=[".jpg",".jpeg"]),Et.some(function(St){return dt.endsWith(St)})}return/\/\*$/.test(gt)?Pt===gt.replace(/\/.*$/,""):xt===gt?!0:/^\w+$/.test(gt)?((0,ie.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(gt,"'.Skip for check.")),!0):!1})}return!0};function ue(ft,wt){var Je="cannot ".concat(ft.method," ").concat(ft.action," ").concat(wt.status,"'"),nt=new Error(Je);return nt.status=wt.status,nt.method=ft.method,nt.url=ft.action,nt}function ge(ft){var wt=ft.responseText||ft.response;if(!wt)return wt;try{return JSON.parse(wt)}catch(Je){return wt}}function Pe(ft){var wt=new XMLHttpRequest;ft.onProgress&&wt.upload&&(wt.upload.onprogress=function(Pt){Pt.total>0&&(Pt.percent=Pt.loaded/Pt.total*100),ft.onProgress(Pt)});var Je=new FormData;ft.data&&Object.keys(ft.data).forEach(function(xt){var Pt=ft.data[xt];if(Array.isArray(Pt)){Pt.forEach(function(Ct){Je.append("".concat(xt,"[]"),Ct)});return}Je.append(xt,Pt)}),ft.file instanceof Blob?Je.append(ft.filename,ft.file,ft.file.name):Je.append(ft.filename,ft.file),wt.onerror=function(Pt){ft.onError(Pt)},wt.onload=function(){return wt.status<200||wt.status>=300?ft.onError(ue(ft,wt),ge(wt)):ft.onSuccess(ge(wt),wt)},wt.open(ft.method,ft.action,!0),ft.withCredentials&&"withCredentials"in wt&&(wt.withCredentials=!0);var nt=ft.headers||{};return nt["X-Requested-With"]!==null&&wt.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(nt).forEach(function(xt){nt[xt]!==null&&wt.setRequestHeader(xt,nt[xt])}),wt.send(Je),{abort:function(){wt.abort()}}}var je=function(){var ft=(0,we.Z)((0,ve.Z)().mark(function wt(Je,nt){var xt,Pt,Ct,gt,dt,ht,Et,St;return(0,ve.Z)().wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:ht=function(){return ht=(0,we.Z)((0,ve.Z)().mark(function tt(Ve){return(0,ve.Z)().wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:return Le.abrupt("return",new Promise(function(Xe){Ve.file(function(rt){nt(rt)?(Ve.fullPath&&!rt.webkitRelativePath&&(Object.defineProperties(rt,{webkitRelativePath:{writable:!0}}),rt.webkitRelativePath=Ve.fullPath.replace(/^\//,""),Object.defineProperties(rt,{webkitRelativePath:{writable:!1}})),Xe(rt)):Xe(null)})}));case 1:case"end":return Le.stop()}},tt)})),ht.apply(this,arguments)},dt=function(tt){return ht.apply(this,arguments)},gt=function(){return gt=(0,we.Z)((0,ve.Z)().mark(function tt(Ve){var xe,Le,Xe,rt,Ie;return(0,ve.Z)().wrap(function(He){for(;;)switch(He.prev=He.next){case 0:xe=Ve.createReader(),Le=[];case 2:return He.next=5,new Promise(function(Qe){xe.readEntries(Qe,function(){return Qe([])})});case 5:if(Xe=He.sent,rt=Xe.length,rt){He.next=9;break}return He.abrupt("break",12);case 9:for(Ie=0;Ie<rt;Ie++)Le.push(Xe[Ie]);He.next=2;break;case 12:return He.abrupt("return",Le);case 13:case"end":return He.stop()}},tt)})),gt.apply(this,arguments)},Ct=function(tt){return gt.apply(this,arguments)},xt=[],Pt=[],Je.forEach(function(yt){return Pt.push(yt.webkitGetAsEntry())}),Et=function(){var yt=(0,we.Z)((0,ve.Z)().mark(function tt(Ve,xe){var Le,Xe;return(0,ve.Z)().wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:if(Ve){Ie.next=2;break}return Ie.abrupt("return");case 2:if(Ve.path=xe||"",!Ve.isFile){Ie.next=10;break}return Ie.next=6,dt(Ve);case 6:Le=Ie.sent,Le&&xt.push(Le),Ie.next=15;break;case 10:if(!Ve.isDirectory){Ie.next=15;break}return Ie.next=13,Ct(Ve);case 13:Xe=Ie.sent,Pt.push.apply(Pt,(0,de.Z)(Xe));case 15:case"end":return Ie.stop()}},tt)}));return function(Ve,xe){return yt.apply(this,arguments)}}(),St=0;case 9:if(!(St<Pt.length)){mt.next=15;break}return mt.next=12,Et(Pt[St]);case 12:St++,mt.next=9;break;case 15:return mt.abrupt("return",xt);case 16:case"end":return mt.stop()}},wt)}));return function(Je,nt){return ft.apply(this,arguments)}}(),Be=je,Fe=+new Date,Ne=0;function Ae(){return"rc-upload-".concat(Fe,"-").concat(++Ne)}var Re=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],We=function(ft){(0,De.Z)(Je,ft);var wt=(0,fe.Z)(Je);function Je(){var nt;(0,Dt.Z)(this,Je);for(var xt=arguments.length,Pt=new Array(xt),Ct=0;Ct<xt;Ct++)Pt[Ct]=arguments[Ct];return nt=wt.call.apply(wt,[this].concat(Pt)),(0,me.Z)((0,Ge.Z)(nt),"state",{uid:Ae()}),(0,me.Z)((0,Ge.Z)(nt),"reqs",{}),(0,me.Z)((0,Ge.Z)(nt),"fileInput",void 0),(0,me.Z)((0,Ge.Z)(nt),"_isMounted",void 0),(0,me.Z)((0,Ge.Z)(nt),"onChange",function(gt){var dt=nt.props,ht=dt.accept,Et=dt.directory,St=gt.target.files,Ft=(0,de.Z)(St).filter(function(mt){return!Et||le(mt,ht)});nt.uploadFiles(Ft),nt.reset()}),(0,me.Z)((0,Ge.Z)(nt),"onClick",function(gt){var dt=nt.fileInput;if(dt){var ht=gt.target,Et=nt.props.onClick;if(ht&&ht.tagName==="BUTTON"){var St=dt.parentNode;St.focus(),ht.blur()}dt.click(),Et&&Et(gt)}}),(0,me.Z)((0,Ge.Z)(nt),"onKeyDown",function(gt){gt.key==="Enter"&&nt.onClick(gt)}),(0,me.Z)((0,Ge.Z)(nt),"onFileDrop",function(){var gt=(0,we.Z)((0,ve.Z)().mark(function dt(ht){var Et,St,Ft;return(0,ve.Z)().wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:if(Et=nt.props.multiple,ht.preventDefault(),ht.type!=="dragover"){yt.next=4;break}return yt.abrupt("return");case 4:if(!nt.props.directory){yt.next=11;break}return yt.next=7,Be(Array.prototype.slice.call(ht.dataTransfer.items),function(tt){return le(tt,nt.props.accept)});case 7:St=yt.sent,nt.uploadFiles(St),yt.next=14;break;case 11:Ft=(0,de.Z)(ht.dataTransfer.files).filter(function(tt){return le(tt,nt.props.accept)}),Et===!1&&(Ft=Ft.slice(0,1)),nt.uploadFiles(Ft);case 14:case"end":return yt.stop()}},dt)}));return function(dt){return gt.apply(this,arguments)}}()),(0,me.Z)((0,Ge.Z)(nt),"uploadFiles",function(gt){var dt=(0,de.Z)(gt),ht=dt.map(function(Et){return Et.uid=Ae(),nt.processFile(Et,dt)});Promise.all(ht).then(function(Et){var St=nt.props.onBatchStart;St==null||St(Et.map(function(Ft){var mt=Ft.origin,yt=Ft.parsedFile;return{file:mt,parsedFile:yt}})),Et.filter(function(Ft){return Ft.parsedFile!==null}).forEach(function(Ft){nt.post(Ft)})})}),(0,me.Z)((0,Ge.Z)(nt),"processFile",function(){var gt=(0,we.Z)((0,ve.Z)().mark(function dt(ht,Et){var St,Ft,mt,yt,tt,Ve,xe,Le,Xe;return(0,ve.Z)().wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:if(St=nt.props.beforeUpload,Ft=ht,!St){Ie.next=14;break}return Ie.prev=3,Ie.next=6,St(ht,Et);case 6:Ft=Ie.sent,Ie.next=12;break;case 9:Ie.prev=9,Ie.t0=Ie.catch(3),Ft=!1;case 12:if(Ft!==!1){Ie.next=14;break}return Ie.abrupt("return",{origin:ht,parsedFile:null,action:null,data:null});case 14:if(mt=nt.props.action,typeof mt!="function"){Ie.next=21;break}return Ie.next=18,mt(ht);case 18:yt=Ie.sent,Ie.next=22;break;case 21:yt=mt;case 22:if(tt=nt.props.data,typeof tt!="function"){Ie.next=29;break}return Ie.next=26,tt(ht);case 26:Ve=Ie.sent,Ie.next=30;break;case 29:Ve=tt;case 30:return xe=((0,Me.Z)(Ft)==="object"||typeof Ft=="string")&&Ft?Ft:ht,xe instanceof File?Le=xe:Le=new File([xe],ht.name,{type:ht.type}),Xe=Le,Xe.uid=ht.uid,Ie.abrupt("return",{origin:ht,data:Ve,parsedFile:Xe,action:yt});case 35:case"end":return Ie.stop()}},dt,null,[[3,9]])}));return function(dt,ht){return gt.apply(this,arguments)}}()),(0,me.Z)((0,Ge.Z)(nt),"saveFileInput",function(gt){nt.fileInput=gt}),nt}return(0,oe.Z)(Je,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(xt){var Pt=this,Ct=xt.data,gt=xt.origin,dt=xt.action,ht=xt.parsedFile;if(this._isMounted){var Et=this.props,St=Et.onStart,Ft=Et.customRequest,mt=Et.name,yt=Et.headers,tt=Et.withCredentials,Ve=Et.method,xe=gt.uid,Le=Ft||Pe,Xe={action:dt,filename:mt,data:Ct,file:ht,headers:yt,withCredentials:tt,method:Ve||"post",onProgress:function(Ie){var _e=Pt.props.onProgress;_e==null||_e(Ie,ht)},onSuccess:function(Ie,_e){var He=Pt.props.onSuccess;He==null||He(Ie,ht,_e),delete Pt.reqs[xe]},onError:function(Ie,_e){var He=Pt.props.onError;He==null||He(Ie,_e,ht),delete Pt.reqs[xe]}};St(gt),this.reqs[xe]=Le(Xe)}}},{key:"reset",value:function(){this.setState({uid:Ae()})}},{key:"abort",value:function(xt){var Pt=this.reqs;if(xt){var Ct=xt.uid?xt.uid:xt;Pt[Ct]&&Pt[Ct].abort&&Pt[Ct].abort(),delete Pt[Ct]}else Object.keys(Pt).forEach(function(gt){Pt[gt]&&Pt[gt].abort&&Pt[gt].abort(),delete Pt[gt]})}},{key:"render",value:function(){var xt=this.props,Pt=xt.component,Ct=xt.prefixCls,gt=xt.className,dt=xt.classNames,ht=dt===void 0?{}:dt,Et=xt.disabled,St=xt.id,Ft=xt.name,mt=xt.style,yt=xt.styles,tt=yt===void 0?{}:yt,Ve=xt.multiple,xe=xt.accept,Le=xt.capture,Xe=xt.children,rt=xt.directory,Ie=xt.openFileDialogOnClick,_e=xt.onMouseEnter,He=xt.onMouseLeave,Qe=xt.hasControlInside,ct=(0,Se.Z)(xt,Re),at=ee()((0,me.Z)((0,me.Z)((0,me.Z)({},Ct,!0),"".concat(Ct,"-disabled"),Et),gt,gt)),At=rt?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},Lt=Et?{}:{onClick:Ie?this.onClick:function(){},onKeyDown:Ie?this.onKeyDown:function(){},onMouseEnter:_e,onMouseLeave:He,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:Qe?void 0:"0"};return ke.createElement(Pt,(0,pt.Z)({},Lt,{className:at,role:Qe?void 0:"button",style:mt}),ke.createElement("input",(0,pt.Z)({},(0,ae.Z)(ct,{aria:!0,data:!0}),{id:St,name:Ft,disabled:Et,type:"file",ref:this.saveFileInput,onClick:function(Kt){return Kt.stopPropagation()},key:this.state.uid,style:(0,Ce.Z)({display:"none"},tt.input),className:ht.input,accept:xe},At,{multiple:Ve,onChange:this.onChange},Le!=null?{capture:Le}:{})),Xe)}}]),Je}(ke.Component),Ye=We;function Ue(){}var Ke=function(ft){(0,De.Z)(Je,ft);var wt=(0,fe.Z)(Je);function Je(){var nt;(0,Dt.Z)(this,Je);for(var xt=arguments.length,Pt=new Array(xt),Ct=0;Ct<xt;Ct++)Pt[Ct]=arguments[Ct];return nt=wt.call.apply(wt,[this].concat(Pt)),(0,me.Z)((0,Ge.Z)(nt),"uploader",void 0),(0,me.Z)((0,Ge.Z)(nt),"saveUploader",function(gt){nt.uploader=gt}),nt}return(0,oe.Z)(Je,[{key:"abort",value:function(xt){this.uploader.abort(xt)}},{key:"render",value:function(){return ke.createElement(Ye,(0,pt.Z)({},this.props,{ref:this.saveUploader}))}}]),Je}(ke.Component);(0,me.Z)(Ke,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:Ue,onError:Ue,onSuccess:Ue,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var ot=Ke,ut=ot},8224:function(mn,dn,st){"use strict";st.d(dn,{Z:function(){return Dt}});var pt=st(4676);function Dt(oe,Ge,De,fe){var me=pt.unstable_batchedUpdates?function(Ce){pt.unstable_batchedUpdates(De,Ce)}:De;return oe!=null&&oe.addEventListener&&oe.addEventListener(Ge,me,fe),{remove:function(){oe!=null&&oe.removeEventListener&&oe.removeEventListener(Ge,me,fe)}}}},24514:function(mn,dn,st){"use strict";st.d(dn,{G:function(){return Ge}});var pt=st(47273),Dt=function(fe){if((0,pt.Z)()&&window.document.documentElement){var me=Array.isArray(fe)?fe:[fe],ke=window.document.documentElement;return me.some(function(Ce){return Ce in ke.style})}return!1},oe=function(fe,me){if(!Dt(fe))return!1;var ke=document.createElement("div"),Ce=ke.style[fe];return ke.style[fe]=me,ke.style[fe]!==Ce};function Ge(De,fe){return!Array.isArray(De)&&fe!==void 0?oe(De,fe):Dt(De)}},45680:function(mn,dn,st){"use strict";st.d(dn,{Z:function(){return tt}});var pt=st(72308),Dt=st(62853),oe=st(77321),Ge=st(49618),De=st(52487),fe=st(74416),me=st(92310),ke=st.n(me),Ce=st(29301),Se=st(70425),Me=st(34280),ve=st(59301),we=st(4676),de=ve.forwardRef(function(Ve,xe){var Le=Ve.height,Xe=Ve.offsetY,rt=Ve.offsetX,Ie=Ve.children,_e=Ve.prefixCls,He=Ve.onInnerResize,Qe=Ve.innerProps,ct=Ve.rtl,at=Ve.extra,At={},Lt={display:"flex",flexDirection:"column"};return Xe!==void 0&&(At={height:Le,position:"relative",overflow:"hidden"},Lt=(0,oe.Z)((0,oe.Z)({},Lt),{},(0,Ge.Z)((0,Ge.Z)((0,Ge.Z)((0,Ge.Z)((0,Ge.Z)({transform:"translateY(".concat(Xe,"px)")},ct?"marginRight":"marginLeft",-rt),"position","absolute"),"left",0),"right",0),"top",0))),ve.createElement("div",{style:At},ve.createElement(Ce.Z,{onResize:function(Kt){var Xt=Kt.offsetHeight;Xt&&He&&He()}},ve.createElement("div",(0,pt.Z)({style:Lt,className:ke()((0,Ge.Z)({},"".concat(_e,"-holder-inner"),_e)),ref:xe},Qe),Ie,at)))});de.displayName="Filler";var z=de;function ee(Ve){var xe=Ve.children,Le=Ve.setRef,Xe=ve.useCallback(function(rt){Le(rt)},[]);return ve.cloneElement(xe,{ref:Xe})}function ae(Ve,xe,Le,Xe,rt,Ie,_e,He){var Qe=He.getKey;return Ve.slice(xe,Le+1).map(function(ct,at){var At=xe+at,Lt=_e(ct,At,{style:{width:Xe},offsetX:rt}),It=Qe(ct);return ve.createElement(ee,{key:It,setRef:function(Xt){return Ie(ct,Xt)}},Lt)})}function ie(Ve,xe,Le,Xe){var rt=Le-Ve,Ie=xe-Le,_e=Math.min(rt,Ie)*2;if(Xe<=_e){var He=Math.floor(Xe/2);return Xe%2?Le+He+1:Le-He}return rt>Ie?Le-(Xe-Ie):Le+(Xe-rt)}function le(Ve,xe,Le){var Xe=Ve.length,rt=xe.length,Ie,_e;if(Xe===0&&rt===0)return null;Xe<rt?(Ie=Ve,_e=xe):(Ie=xe,_e=Ve);var He={__EMPTY_ITEM__:!0};function Qe(Kt){return Kt!==void 0?Le(Kt):He}for(var ct=null,at=Math.abs(Xe-rt)!==1,At=0;At<_e.length;At+=1){var Lt=Qe(Ie[At]),It=Qe(_e[At]);if(Lt!==It){ct=At,at=at||Lt!==Qe(_e[At+1]);break}}return ct===null?null:{index:ct,multiple:at}}function ue(Ve,xe,Le){var Xe=ve.useState(Ve),rt=(0,De.Z)(Xe,2),Ie=rt[0],_e=rt[1],He=ve.useState(null),Qe=(0,De.Z)(He,2),ct=Qe[0],at=Qe[1];return ve.useEffect(function(){var At=le(Ie||[],Ve||[],xe);(At==null?void 0:At.index)!==void 0&&(Le==null||Le(At.index),at(Ve[At.index])),_e(Ve)},[Ve]),[ct]}var ge=st(16089),Pe=(typeof navigator=="undefined"?"undefined":(0,Dt.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),je=Pe,Be=function(Ve,xe,Le,Xe){var rt=(0,ve.useRef)(!1),Ie=(0,ve.useRef)(null);function _e(){clearTimeout(Ie.current),rt.current=!0,Ie.current=setTimeout(function(){rt.current=!1},50)}var He=(0,ve.useRef)({top:Ve,bottom:xe,left:Le,right:Xe});return He.current.top=Ve,He.current.bottom=xe,He.current.left=Le,He.current.right=Xe,function(Qe,ct){var at=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,At=Qe?ct<0&&He.current.left||ct>0&&He.current.right:ct<0&&He.current.top||ct>0&&He.current.bottom;return at&&At?(clearTimeout(Ie.current),rt.current=!1):(!At||rt.current)&&_e(),!rt.current&&At}};function Fe(Ve,xe,Le,Xe,rt,Ie,_e){var He=(0,ve.useRef)(0),Qe=(0,ve.useRef)(null),ct=(0,ve.useRef)(null),at=(0,ve.useRef)(!1),At=Be(xe,Le,Xe,rt);function Lt(ln,tn){if(ge.Z.cancel(Qe.current),!At(!1,tn)){var Wt=ln;if(!Wt._virtualHandled)Wt._virtualHandled=!0;else return;He.current+=tn,ct.current=tn,je||Wt.preventDefault(),Qe.current=(0,ge.Z)(function(){var En=at.current?10:1;_e(He.current*En,!1),He.current=0})}}function It(ln,tn){_e(tn,!0),je||ln.preventDefault()}var Kt=(0,ve.useRef)(null),Xt=(0,ve.useRef)(null);function $t(ln){if(Ve){ge.Z.cancel(Xt.current),Xt.current=(0,ge.Z)(function(){Kt.current=null},2);var tn=ln.deltaX,Wt=ln.deltaY,En=ln.shiftKey,Pn=tn,Ln=Wt;(Kt.current==="sx"||!Kt.current&&En&&Wt&&!tn)&&(Pn=Wt,Ln=0,Kt.current="sx");var Vn=Math.abs(Pn),Or=Math.abs(Ln);Kt.current===null&&(Kt.current=Ie&&Vn>Or?"x":"y"),Kt.current==="y"?Lt(ln,Ln):It(ln,Pn)}}function Ut(ln){Ve&&(at.current=ln.detail===ct.current)}return[$t,Ut]}function Ne(Ve,xe,Le,Xe){var rt=ve.useMemo(function(){return[new Map,[]]},[Ve,Le.id,Xe]),Ie=(0,De.Z)(rt,2),_e=Ie[0],He=Ie[1],Qe=function(at){var At=arguments.length>1&&arguments[1]!==void 0?arguments[1]:at,Lt=_e.get(at),It=_e.get(At);if(Lt===void 0||It===void 0)for(var Kt=Ve.length,Xt=He.length;Xt<Kt;Xt+=1){var $t,Ut=Ve[Xt],ln=xe(Ut);_e.set(ln,Xt);var tn=($t=Le.get(ln))!==null&&$t!==void 0?$t:Xe;if(He[Xt]=(He[Xt-1]||0)+tn,ln===at&&(Lt=Xt),ln===At&&(It=Xt),Lt!==void 0&&It!==void 0)break}return{top:He[Lt-1]||0,bottom:He[It]}};return Qe}var Ae=st(96949),Re=st(55090),We=function(){function Ve(){(0,Ae.Z)(this,Ve),(0,Ge.Z)(this,"maps",void 0),(0,Ge.Z)(this,"id",0),(0,Ge.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,Re.Z)(Ve,[{key:"set",value:function(Le,Xe){this.maps[Le]=Xe,this.id+=1,this.diffKeys.add(Le)}},{key:"get",value:function(Le){return this.maps[Le]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),Ve}(),Ye=We;function Ue(Ve){var xe=parseFloat(Ve);return isNaN(xe)?0:xe}function Ke(Ve,xe,Le){var Xe=ve.useState(0),rt=(0,De.Z)(Xe,2),Ie=rt[0],_e=rt[1],He=(0,ve.useRef)(new Map),Qe=(0,ve.useRef)(new Ye),ct=(0,ve.useRef)(0);function at(){ct.current+=1}function At(){var It=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;at();var Kt=function(){var Ut=!1;He.current.forEach(function(ln,tn){if(ln&&ln.offsetParent){var Wt=ln.offsetHeight,En=getComputedStyle(ln),Pn=En.marginTop,Ln=En.marginBottom,Vn=Ue(Pn),Or=Ue(Ln),dr=Wt+Vn+Or;Qe.current.get(tn)!==dr&&(Qe.current.set(tn,dr),Ut=!0)}}),Ut&&_e(function(ln){return ln+1})};if(It)Kt();else{ct.current+=1;var Xt=ct.current;Promise.resolve().then(function(){Xt===ct.current&&Kt()})}}function Lt(It,Kt){var Xt=Ve(It),$t=He.current.get(Xt);Kt?(He.current.set(Xt,Kt),At()):He.current.delete(Xt),!$t!=!Kt&&(Kt?xe==null||xe(It):Le==null||Le(It))}return(0,ve.useEffect)(function(){return at},[]),[Lt,At,Qe.current,Ie]}var ot=14/15;function ut(Ve,xe,Le){var Xe=(0,ve.useRef)(!1),rt=(0,ve.useRef)(0),Ie=(0,ve.useRef)(0),_e=(0,ve.useRef)(null),He=(0,ve.useRef)(null),Qe,ct=function(It){if(Xe.current){var Kt=Math.ceil(It.touches[0].pageX),Xt=Math.ceil(It.touches[0].pageY),$t=rt.current-Kt,Ut=Ie.current-Xt,ln=Math.abs($t)>Math.abs(Ut);ln?rt.current=Kt:Ie.current=Xt;var tn=Le(ln,ln?$t:Ut,!1,It);tn&&It.preventDefault(),clearInterval(He.current),tn&&(He.current=setInterval(function(){ln?$t*=ot:Ut*=ot;var Wt=Math.floor(ln?$t:Ut);(!Le(ln,Wt,!0)||Math.abs(Wt)<=.1)&&clearInterval(He.current)},16))}},at=function(){Xe.current=!1,Qe()},At=function(It){Qe(),It.touches.length===1&&!Xe.current&&(Xe.current=!0,rt.current=Math.ceil(It.touches[0].pageX),Ie.current=Math.ceil(It.touches[0].pageY),_e.current=It.target,_e.current.addEventListener("touchmove",ct,{passive:!1}),_e.current.addEventListener("touchend",at,{passive:!0}))};Qe=function(){_e.current&&(_e.current.removeEventListener("touchmove",ct),_e.current.removeEventListener("touchend",at))},(0,Me.Z)(function(){return Ve&&xe.current.addEventListener("touchstart",At,{passive:!0}),function(){var Lt;(Lt=xe.current)===null||Lt===void 0||Lt.removeEventListener("touchstart",At),Qe(),clearInterval(He.current)}},[Ve])}function ft(Ve){return Math.floor(Math.pow(Ve,.5))}function wt(Ve,xe){var Le="touches"in Ve?Ve.touches[0]:Ve;return Le[xe?"pageX":"pageY"]-window[xe?"scrollX":"scrollY"]}function Je(Ve,xe,Le){ve.useEffect(function(){var Xe=xe.current;if(Ve&&Xe){var rt=!1,Ie,_e,He=function(){ge.Z.cancel(Ie)},Qe=function Lt(){He(),Ie=(0,ge.Z)(function(){Le(_e),Lt()})},ct=function(It){if(!(It.target.draggable||It.button!==0)){var Kt=It;Kt._virtualHandled||(Kt._virtualHandled=!0,rt=!0)}},at=function(){rt=!1,He()},At=function(It){if(rt){var Kt=wt(It,!1),Xt=Xe.getBoundingClientRect(),$t=Xt.top,Ut=Xt.bottom;if(Kt<=$t){var ln=$t-Kt;_e=-ft(ln),Qe()}else if(Kt>=Ut){var tn=Kt-Ut;_e=ft(tn),Qe()}else He()}};return Xe.addEventListener("mousedown",ct),Xe.ownerDocument.addEventListener("mouseup",at),Xe.ownerDocument.addEventListener("mousemove",At),function(){Xe.removeEventListener("mousedown",ct),Xe.ownerDocument.removeEventListener("mouseup",at),Xe.ownerDocument.removeEventListener("mousemove",At),He()}}},[Ve])}var nt=10;function xt(Ve,xe,Le,Xe,rt,Ie,_e,He){var Qe=ve.useRef(),ct=ve.useState(null),at=(0,De.Z)(ct,2),At=at[0],Lt=at[1];return(0,Me.Z)(function(){if(At&&At.times<nt){if(!Ve.current){Lt(function(Yi){return(0,oe.Z)({},Yi)});return}Ie();var It=At.targetAlign,Kt=At.originAlign,Xt=At.index,$t=At.offset,Ut=Ve.current.clientHeight,ln=!1,tn=It,Wt=null;if(Ut){for(var En=It||Kt,Pn=0,Ln=0,Vn=0,Or=Math.min(xe.length-1,Xt),dr=0;dr<=Or;dr+=1){var Lr=rt(xe[dr]);Ln=Pn;var Xr=Le.get(Lr);Vn=Ln+(Xr===void 0?Xe:Xr),Pn=Vn}for(var Vr=En==="top"?$t:Ut-$t,si=Or;si>=0;si-=1){var yi=rt(xe[si]),Ii=Le.get(yi);if(Ii===void 0){ln=!0;break}if(Vr-=Ii,Vr<=0)break}switch(En){case"top":Wt=Ln-$t;break;case"bottom":Wt=Vn-Ut+$t;break;default:{var Fi=Ve.current.scrollTop,_i=Fi+Ut;Ln<Fi?tn="top":Vn>_i&&(tn="bottom")}}Wt!==null&&_e(Wt),Wt!==At.lastTop&&(ln=!0)}ln&&Lt((0,oe.Z)((0,oe.Z)({},At),{},{times:At.times+1,targetAlign:tn,lastTop:Wt}))}},[At,Ve.current]),function(It){if(It==null){He();return}if(ge.Z.cancel(Qe.current),typeof It=="number")_e(It);else if(It&&(0,Dt.Z)(It)==="object"){var Kt,Xt=It.align;"index"in It?Kt=It.index:Kt=xe.findIndex(function(ln){return rt(ln)===It.key});var $t=It.offset,Ut=$t===void 0?0:$t;Lt({times:0,index:Kt,offset:Ut,originAlign:Xt})}}}var Pt=ve.forwardRef(function(Ve,xe){var Le=Ve.prefixCls,Xe=Ve.rtl,rt=Ve.scrollOffset,Ie=Ve.scrollRange,_e=Ve.onStartMove,He=Ve.onStopMove,Qe=Ve.onScroll,ct=Ve.horizontal,at=Ve.spinSize,At=Ve.containerSize,Lt=Ve.style,It=Ve.thumbStyle,Kt=Ve.showScrollBar,Xt=ve.useState(!1),$t=(0,De.Z)(Xt,2),Ut=$t[0],ln=$t[1],tn=ve.useState(null),Wt=(0,De.Z)(tn,2),En=Wt[0],Pn=Wt[1],Ln=ve.useState(null),Vn=(0,De.Z)(Ln,2),Or=Vn[0],dr=Vn[1],Lr=!Xe,Xr=ve.useRef(),Vr=ve.useRef(),si=ve.useState(Kt),yi=(0,De.Z)(si,2),Ii=yi[0],Fi=yi[1],_i=ve.useRef(),Yi=function(){Kt===!0||Kt===!1||(clearTimeout(_i.current),Fi(!0),_i.current=setTimeout(function(){Fi(!1)},3e3))},et=Ie-At||0,pr=At-at||0,vr=ve.useMemo(function(){if(rt===0||et===0)return 0;var Zt=rt/et;return Zt*pr},[rt,et,pr]),Ei=function(tr){tr.stopPropagation(),tr.preventDefault()},lr=ve.useRef({top:vr,dragging:Ut,pageY:En,startTop:Or});lr.current={top:vr,dragging:Ut,pageY:En,startTop:Or};var wr=function(tr){ln(!0),Pn(wt(tr,ct)),dr(lr.current.top),_e(),tr.stopPropagation(),tr.preventDefault()};ve.useEffect(function(){var Zt=function(An){An.preventDefault()},tr=Xr.current,mr=Vr.current;return tr.addEventListener("touchstart",Zt,{passive:!1}),mr.addEventListener("touchstart",wr,{passive:!1}),function(){tr.removeEventListener("touchstart",Zt),mr.removeEventListener("touchstart",wr)}},[]);var Br=ve.useRef();Br.current=et;var ro=ve.useRef();ro.current=pr,ve.useEffect(function(){if(Ut){var Zt,tr=function(An){var er=lr.current,rn=er.dragging,qt=er.pageY,Qn=er.startTop;ge.Z.cancel(Zt);var Ot=Xr.current.getBoundingClientRect(),vn=At/(ct?Ot.width:Ot.height);if(rn){var _n=(wt(An,ct)-qt)*vn,qn=Qn;!Lr&&ct?qn-=_n:qn+=_n;var an=Br.current,Un=ro.current,Kn=Un?qn/Un:0,On=Math.ceil(Kn*an);On=Math.max(On,0),On=Math.min(On,an),Zt=(0,ge.Z)(function(){Qe(On,ct)})}},mr=function(){ln(!1),He()};return window.addEventListener("mousemove",tr,{passive:!0}),window.addEventListener("touchmove",tr,{passive:!0}),window.addEventListener("mouseup",mr,{passive:!0}),window.addEventListener("touchend",mr,{passive:!0}),function(){window.removeEventListener("mousemove",tr),window.removeEventListener("touchmove",tr),window.removeEventListener("mouseup",mr),window.removeEventListener("touchend",mr),ge.Z.cancel(Zt)}}},[Ut]),ve.useEffect(function(){return Yi(),function(){clearTimeout(_i.current)}},[rt]),ve.useImperativeHandle(xe,function(){return{delayHidden:Yi}});var Ur="".concat(Le,"-scrollbar"),on={position:"absolute",visibility:Ii?null:"hidden"},nn={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return ct?(on.height=8,on.left=0,on.right=0,on.bottom=0,nn.height="100%",nn.width=at,Lr?nn.left=vr:nn.right=vr):(on.width=8,on.top=0,on.bottom=0,Lr?on.right=0:on.left=0,nn.width="100%",nn.height=at,nn.top=vr),ve.createElement("div",{ref:Xr,className:ke()(Ur,(0,Ge.Z)((0,Ge.Z)((0,Ge.Z)({},"".concat(Ur,"-horizontal"),ct),"".concat(Ur,"-vertical"),!ct),"".concat(Ur,"-visible"),Ii)),style:(0,oe.Z)((0,oe.Z)({},on),Lt),onMouseDown:Ei,onMouseMove:Yi},ve.createElement("div",{ref:Vr,className:ke()("".concat(Ur,"-thumb"),(0,Ge.Z)({},"".concat(Ur,"-thumb-moving"),Ut)),style:(0,oe.Z)((0,oe.Z)({},nn),It),onMouseDown:wr}))}),Ct=Pt,gt=20;function dt(){var Ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Le=Ve/xe*Ve;return isNaN(Le)&&(Le=0),Le=Math.max(Le,gt),Math.floor(Le)}var ht=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Et=[],St={overflowY:"auto",overflowAnchor:"none"};function Ft(Ve,xe){var Le=Ve.prefixCls,Xe=Le===void 0?"rc-virtual-list":Le,rt=Ve.className,Ie=Ve.height,_e=Ve.itemHeight,He=Ve.fullHeight,Qe=He===void 0?!0:He,ct=Ve.style,at=Ve.data,At=Ve.children,Lt=Ve.itemKey,It=Ve.virtual,Kt=Ve.direction,Xt=Ve.scrollWidth,$t=Ve.component,Ut=$t===void 0?"div":$t,ln=Ve.onScroll,tn=Ve.onVirtualScroll,Wt=Ve.onVisibleChange,En=Ve.innerProps,Pn=Ve.extraRender,Ln=Ve.styles,Vn=Ve.showScrollBar,Or=Vn===void 0?"optional":Vn,dr=(0,fe.Z)(Ve,ht),Lr=ve.useCallback(function(pn){return typeof Lt=="function"?Lt(pn):pn==null?void 0:pn[Lt]},[Lt]),Xr=Ke(Lr,null,null),Vr=(0,De.Z)(Xr,4),si=Vr[0],yi=Vr[1],Ii=Vr[2],Fi=Vr[3],_i=!!(It!==!1&&Ie&&_e),Yi=ve.useMemo(function(){return Object.values(Ii.maps).reduce(function(pn,jn){return pn+jn},0)},[Ii.id,Ii.maps]),et=_i&&at&&(Math.max(_e*at.length,Yi)>Ie||!!Xt),pr=Kt==="rtl",vr=ke()(Xe,(0,Ge.Z)({},"".concat(Xe,"-rtl"),pr),rt),Ei=at||Et,lr=(0,ve.useRef)(),wr=(0,ve.useRef)(),Br=(0,ve.useRef)(),ro=(0,ve.useState)(0),Ur=(0,De.Z)(ro,2),on=Ur[0],nn=Ur[1],Zt=(0,ve.useState)(0),tr=(0,De.Z)(Zt,2),mr=tr[0],Er=tr[1],An=(0,ve.useState)(!1),er=(0,De.Z)(An,2),rn=er[0],qt=er[1],Qn=function(){qt(!0)},Ot=function(){qt(!1)},vn={getKey:Lr};function _n(pn){nn(function(jn){var Dn;typeof pn=="function"?Dn=pn(jn):Dn=pn;var Gn=Tr(Dn);return lr.current.scrollTop=Gn,Gn})}var qn=(0,ve.useRef)({start:0,end:Ei.length}),an=(0,ve.useRef)(),Un=ue(Ei,Lr),Kn=(0,De.Z)(Un,1),On=Kn[0];an.current=On;var ur=ve.useMemo(function(){if(!_i)return{scrollHeight:void 0,start:0,end:Ei.length-1,offset:void 0};if(!et){var pn;return{scrollHeight:((pn=wr.current)===null||pn===void 0?void 0:pn.offsetHeight)||0,start:0,end:Ei.length-1,offset:void 0}}for(var jn=0,Dn,Gn,In,gr=Ei.length,or=0;or<gr;or+=1){var Hn=Ei[or],fn=Lr(Hn),nr=Ii.get(fn),kr=jn+(nr===void 0?_e:nr);kr>=on&&Dn===void 0&&(Dn=or,Gn=jn),kr>on+Ie&&In===void 0&&(In=or),jn=kr}return Dn===void 0&&(Dn=0,Gn=0,In=Math.ceil(Ie/_e)),In===void 0&&(In=Ei.length-1),In=Math.min(In+1,Ei.length-1),{scrollHeight:jn,start:Dn,end:In,offset:Gn}},[et,_i,on,Ei,Fi,Ie]),$n=ur.scrollHeight,Wn=ur.start,hr=ur.end,Rr=ur.offset;qn.current.start=Wn,qn.current.end=hr,ve.useLayoutEffect(function(){var pn=Ii.getRecord();if(pn.size===1){var jn=Array.from(pn)[0],Dn=Ei[Wn];if(Dn){var Gn=Lr(Dn);if(Gn===jn){var In=Ii.get(jn),gr=In-_e;_n(function(or){return or+gr})}}}Ii.resetRecord()},[$n]);var br=ve.useState({width:0,height:Ie}),Pr=(0,De.Z)(br,2),hn=Pr[0],Pi=Pr[1],qr=function(jn){Pi({width:jn.offsetWidth,height:jn.offsetHeight})},ki=(0,ve.useRef)(),un=(0,ve.useRef)(),Xn=ve.useMemo(function(){return dt(hn.width,Xt)},[hn.width,Xt]),cr=ve.useMemo(function(){return dt(hn.height,$n)},[hn.height,$n]),ar=$n-Ie,xr=(0,ve.useRef)(ar);xr.current=ar;function Tr(pn){var jn=pn;return Number.isNaN(xr.current)||(jn=Math.min(jn,xr.current)),jn=Math.max(jn,0),jn}var Wr=on<=0,$r=on>=ar,ni=mr<=0,ai=mr>=Xt,yn=Be(Wr,$r,ni,ai),Ci=function(){return{x:pr?-mr:mr,y:on}},xn=(0,ve.useRef)(Ci()),yr=(0,Se.zX)(function(pn){if(tn){var jn=(0,oe.Z)((0,oe.Z)({},Ci()),pn);(xn.current.x!==jn.x||xn.current.y!==jn.y)&&(tn(jn),xn.current=jn)}});function Nr(pn,jn){var Dn=pn;jn?((0,we.flushSync)(function(){Er(Dn)}),yr()):_n(Dn)}function Yr(pn){var jn=pn.currentTarget.scrollTop;jn!==on&&_n(jn),ln==null||ln(pn),yr()}var Zi=function(jn){var Dn=jn,Gn=Xt?Xt-hn.width:0;return Dn=Math.max(Dn,0),Dn=Math.min(Dn,Gn),Dn},zi=(0,Se.zX)(function(pn,jn){jn?((0,we.flushSync)(function(){Er(function(Dn){var Gn=Dn+(pr?-pn:pn);return Zi(Gn)})}),yr()):_n(function(Dn){var Gn=Dn+pn;return Gn})}),bi=Fe(_i,Wr,$r,ni,ai,!!Xt,zi),ji=(0,De.Z)(bi,2),Qt=ji[0],Sn=ji[1];ut(_i,lr,function(pn,jn,Dn,Gn){var In=Gn;return yn(pn,jn,Dn)?!1:!In||!In._virtualHandled?(In&&(In._virtualHandled=!0),Qt({preventDefault:function(){},deltaX:pn?jn:0,deltaY:pn?0:jn}),!0):!1}),Je(et,lr,function(pn){_n(function(jn){return jn+pn})}),(0,Me.Z)(function(){function pn(Dn){var Gn=Wr&&Dn.detail<0,In=$r&&Dn.detail>0;_i&&!Gn&&!In&&Dn.preventDefault()}var jn=lr.current;return jn.addEventListener("wheel",Qt,{passive:!1}),jn.addEventListener("DOMMouseScroll",Sn,{passive:!0}),jn.addEventListener("MozMousePixelScroll",pn,{passive:!1}),function(){jn.removeEventListener("wheel",Qt),jn.removeEventListener("DOMMouseScroll",Sn),jn.removeEventListener("MozMousePixelScroll",pn)}},[_i,Wr,$r]),(0,Me.Z)(function(){if(Xt){var pn=Zi(mr);Er(pn),yr({x:pn})}},[hn.width,Xt]);var Jt=function(){var jn,Dn;(jn=ki.current)===null||jn===void 0||jn.delayHidden(),(Dn=un.current)===null||Dn===void 0||Dn.delayHidden()},lt=xt(lr,Ei,Ii,_e,Lr,function(){return yi(!0)},_n,Jt);ve.useImperativeHandle(xe,function(){return{nativeElement:Br.current,getScrollInfo:Ci,scrollTo:function(jn){function Dn(Gn){return Gn&&(0,Dt.Z)(Gn)==="object"&&("left"in Gn||"top"in Gn)}Dn(jn)?(jn.left!==void 0&&Er(Zi(jn.left)),lt(jn.top)):lt(jn)}}}),(0,Me.Z)(function(){if(Wt){var pn=Ei.slice(Wn,hr+1);Wt(pn,Ei)}},[Wn,hr,Ei]);var Bn=Ne(Ei,Lr,Ii,_e),sn=Pn==null?void 0:Pn({start:Wn,end:hr,virtual:et,offsetX:mr,offsetY:Rr,rtl:pr,getSize:Bn}),bn=ae(Ei,Wn,hr,Xt,mr,si,At,vn),zn=null;Ie&&(zn=(0,oe.Z)((0,Ge.Z)({},Qe?"height":"maxHeight",Ie),St),_i&&(zn.overflowY="hidden",Xt&&(zn.overflowX="hidden"),rn&&(zn.pointerEvents="none")));var Yn={};return pr&&(Yn.dir="rtl"),ve.createElement("div",(0,pt.Z)({ref:Br,style:(0,oe.Z)((0,oe.Z)({},ct),{},{position:"relative"}),className:vr},Yn,dr),ve.createElement(Ce.Z,{onResize:qr},ve.createElement(Ut,{className:"".concat(Xe,"-holder"),style:zn,ref:lr,onScroll:Yr,onMouseEnter:Jt},ve.createElement(z,{prefixCls:Xe,height:$n,offsetX:mr,offsetY:Rr,scrollWidth:Xt,onInnerResize:yi,ref:wr,innerProps:En,rtl:pr,extra:sn},bn))),et&&$n>Ie&&ve.createElement(Ct,{ref:ki,prefixCls:Xe,scrollOffset:on,scrollRange:$n,rtl:pr,onScroll:Nr,onStartMove:Qn,onStopMove:Ot,spinSize:cr,containerSize:hn.height,style:Ln==null?void 0:Ln.verticalScrollBar,thumbStyle:Ln==null?void 0:Ln.verticalScrollBarThumb,showScrollBar:Or}),et&&Xt>hn.width&&ve.createElement(Ct,{ref:un,prefixCls:Xe,scrollOffset:mr,scrollRange:Xt,rtl:pr,onScroll:Nr,onStartMove:Qn,onStopMove:Ot,spinSize:Xn,containerSize:hn.width,horizontal:!0,style:Ln==null?void 0:Ln.horizontalScrollBar,thumbStyle:Ln==null?void 0:Ln.horizontalScrollBarThumb,showScrollBar:Or}))}var mt=ve.forwardRef(Ft);mt.displayName="List";var yt=mt,tt=yt},7062:function(mn,dn,st){var pt=st(19637),Dt=st(97573),oe=[st(96627)];mn.exports=pt.createStore(Dt,oe)},96627:function(mn,dn,st){mn.exports=pt;function pt(){return st(42424),{}}},42424:function(){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(mn){return mn<10?"0"+mn:mn}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(mn){return rx_escapable.lastIndex=0,rx_escapable.test(mn)?'"'+mn.replace(rx_escapable,function(dn){var st=meta[dn];return typeof st=="string"?st:"\\u"+("0000"+dn.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+mn+'"'}function str(mn,dn){var st,pt,Dt,oe,Ge=gap,De,fe=dn[mn];switch(fe&&typeof fe=="object"&&typeof fe.toJSON=="function"&&(fe=fe.toJSON(mn)),typeof rep=="function"&&(fe=rep.call(dn,mn,fe)),typeof fe){case"string":return quote(fe);case"number":return isFinite(fe)?String(fe):"null";case"boolean":case"null":return String(fe);case"object":if(!fe)return"null";if(gap+=indent,De=[],Object.prototype.toString.apply(fe)==="[object Array]"){for(oe=fe.length,st=0;st<oe;st+=1)De[st]=str(st,fe)||"null";return Dt=De.length===0?"[]":gap?`[
`+gap+De.join(`,
`+gap)+`
`+Ge+"]":"["+De.join(",")+"]",gap=Ge,Dt}if(rep&&typeof rep=="object")for(oe=rep.length,st=0;st<oe;st+=1)typeof rep[st]=="string"&&(pt=rep[st],Dt=str(pt,fe),Dt&&De.push(quote(pt)+(gap?": ":":")+Dt));else for(pt in fe)Object.prototype.hasOwnProperty.call(fe,pt)&&(Dt=str(pt,fe),Dt&&De.push(quote(pt)+(gap?": ":":")+Dt));return Dt=De.length===0?"{}":gap?`{
`+gap+De.join(`,
`+gap)+`
`+Ge+"}":"{"+De.join(",")+"}",gap=Ge,Dt}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(mn,dn,st){var pt;if(gap="",indent="",typeof st=="number")for(pt=0;pt<st;pt+=1)indent+=" ";else typeof st=="string"&&(indent=st);if(rep=dn,dn&&typeof dn!="function"&&(typeof dn!="object"||typeof dn.length!="number"))throw new Error("JSON.stringify");return str("",{"":mn})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(mn,dn){var st,pt,Dt=mn[dn];if(Dt&&typeof Dt=="object")for(st in Dt)Object.prototype.hasOwnProperty.call(Dt,st)&&(pt=walk(Dt,st),pt!==void 0?Dt[st]=pt:delete Dt[st]);return reviver.call(mn,dn,Dt)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(mn){return"\\u"+("0000"+mn.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},19637:function(mn,dn,st){var pt=st(67039),Dt=pt.slice,oe=pt.pluck,Ge=pt.each,De=pt.bind,fe=pt.create,me=pt.isList,ke=pt.isFunction,Ce=pt.isObject;mn.exports={createStore:ve};var Se={version:"2.0.12",enabled:!1,get:function(we,de){var z=this.storage.read(this._namespacePrefix+we);return this._deserialize(z,de)},set:function(we,de){return de===void 0?this.remove(we):(this.storage.write(this._namespacePrefix+we,this._serialize(de)),de)},remove:function(we){this.storage.remove(this._namespacePrefix+we)},each:function(we){var de=this;this.storage.each(function(z,ee){we.call(de,de._deserialize(z),(ee||"").replace(de._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(we){return this._namespacePrefix=="__storejs_"+we+"_"},createStore:function(){return ve.apply(this,arguments)},addPlugin:function(we){this._addPlugin(we)},namespace:function(we){return ve(this.storage,this.plugins,we)}};function Me(){var we=typeof console=="undefined"?null:console;if(we){var de=we.warn?we.warn:we.log;de.apply(we,arguments)}}function ve(we,de,z){z||(z=""),we&&!me(we)&&(we=[we]),de&&!me(de)&&(de=[de]);var ee=z?"__storejs_"+z+"_":"",ae=z?new RegExp("^"+ee):null,ie=/^[a-zA-Z0-9_\-]*$/;if(!ie.test(z))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var le={_namespacePrefix:ee,_namespaceRegexp:ae,_testStorage:function(ge){try{var Pe="__storejs__test__";ge.write(Pe,Pe);var je=ge.read(Pe)===Pe;return ge.remove(Pe),je}catch(Be){return!1}},_assignPluginFnProp:function(ge,Pe){var je=this[Pe];this[Pe]=function(){var Fe=Dt(arguments,0),Ne=this;function Ae(){if(je)return Ge(arguments,function(We,Ye){Fe[Ye]=We}),je.apply(Ne,Fe)}var Re=[Ae].concat(Fe);return ge.apply(Ne,Re)}},_serialize:function(ge){return JSON.stringify(ge)},_deserialize:function(ge,Pe){if(!ge)return Pe;var je="";try{je=JSON.parse(ge)}catch(Be){je=ge}return je!==void 0?je:Pe},_addStorage:function(ge){this.enabled||this._testStorage(ge)&&(this.storage=ge,this.enabled=!0)},_addPlugin:function(ge){var Pe=this;if(me(ge)){Ge(ge,function(Fe){Pe._addPlugin(Fe)});return}var je=oe(this.plugins,function(Fe){return ge===Fe});if(!je){if(this.plugins.push(ge),!ke(ge))throw new Error("Plugins must be function values that return objects");var Be=ge.call(this);if(!Ce(Be))throw new Error("Plugins must return an object of function properties");Ge(Be,function(Fe,Ne){if(!ke(Fe))throw new Error("Bad plugin property: "+Ne+" from plugin "+ge.name+". Plugins should only return functions.");Pe._assignPluginFnProp(Fe,Ne)})}},addStorage:function(ge){Me("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(ge)}},ue=fe(le,Se,{plugins:[]});return ue.raw={},Ge(ue,function(ge,Pe){ke(ge)&&(ue.raw[Pe]=De(ue,ge))}),Ge(we,function(ge){ue._addStorage(ge)}),Ge(de,function(ge){ue._addPlugin(ge)}),ue}},67039:function(mn,dn,st){var pt=De(),Dt=fe(),oe=me(),Ge=typeof window!="undefined"?window:st.g;mn.exports={assign:pt,create:Dt,trim:oe,bind:ke,slice:Ce,each:Se,map:Me,pluck:ve,isList:we,isFunction:de,isObject:z,Global:Ge};function De(){return Object.assign?Object.assign:function(ae,ie,le,ue){for(var ge=1;ge<arguments.length;ge++)Se(Object(arguments[ge]),function(Pe,je){ae[je]=Pe});return ae}}function fe(){if(Object.create)return function(ie,le,ue,ge){var Pe=Ce(arguments,1);return pt.apply(this,[Object.create(ie)].concat(Pe))};{let ae=function(){};var ee=ae;return function(le,ue,ge,Pe){var je=Ce(arguments,1);return ae.prototype=le,pt.apply(this,[new ae].concat(je))}}}function me(){return String.prototype.trim?function(ae){return String.prototype.trim.call(ae)}:function(ae){return ae.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function ke(ee,ae){return function(){return ae.apply(ee,Array.prototype.slice.call(arguments,0))}}function Ce(ee,ae){return Array.prototype.slice.call(ee,ae||0)}function Se(ee,ae){ve(ee,function(ie,le){return ae(ie,le),!1})}function Me(ee,ae){var ie=we(ee)?[]:{};return ve(ee,function(le,ue){return ie[ue]=ae(le,ue),!1}),ie}function ve(ee,ae){if(we(ee)){for(var ie=0;ie<ee.length;ie++)if(ae(ee[ie],ie))return ee[ie]}else for(var le in ee)if(ee.hasOwnProperty(le)&&ae(ee[le],le))return ee[le]}function we(ee){return ee!=null&&typeof ee!="function"&&typeof ee.length=="number"}function de(ee){return ee&&{}.toString.call(ee)==="[object Function]"}function z(ee){return ee&&{}.toString.call(ee)==="[object Object]"}},97573:function(mn,dn,st){mn.exports=[st(52496),st(16436),st(76673),st(35701),st(65578),st(65300)]},35701:function(mn,dn,st){var pt=st(67039),Dt=pt.Global,oe=pt.trim;mn.exports={name:"cookieStorage",read:De,write:me,each:fe,remove:ke,clearAll:Ce};var Ge=Dt.document;function De(Me){if(!Me||!Se(Me))return null;var ve="(?:^|.*;\\s*)"+escape(Me).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(Ge.cookie.replace(new RegExp(ve),"$1"))}function fe(Me){for(var ve=Ge.cookie.split(/; ?/g),we=ve.length-1;we>=0;we--)if(oe(ve[we])){var de=ve[we].split("="),z=unescape(de[0]),ee=unescape(de[1]);Me(ee,z)}}function me(Me,ve){Me&&(Ge.cookie=escape(Me)+"="+escape(ve)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function ke(Me){!Me||!Se(Me)||(Ge.cookie=escape(Me)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function Ce(){fe(function(Me,ve){ke(ve)})}function Se(Me){return new RegExp("(?:^|;\\s*)"+escape(Me).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(Ge.cookie)}},52496:function(mn,dn,st){var pt=st(67039),Dt=pt.Global;mn.exports={name:"localStorage",read:Ge,write:De,each:fe,remove:me,clearAll:ke};function oe(){return Dt.localStorage}function Ge(Ce){return oe().getItem(Ce)}function De(Ce,Se){return oe().setItem(Ce,Se)}function fe(Ce){for(var Se=oe().length-1;Se>=0;Se--){var Me=oe().key(Se);Ce(Ge(Me),Me)}}function me(Ce){return oe().removeItem(Ce)}function ke(){return oe().clear()}},65300:function(mn){mn.exports={name:"memoryStorage",read:st,write:pt,each:Dt,remove:oe,clearAll:Ge};var dn={};function st(De){return dn[De]}function pt(De,fe){dn[De]=fe}function Dt(De){for(var fe in dn)dn.hasOwnProperty(fe)&&De(dn[fe],fe)}function oe(De){delete dn[De]}function Ge(De){dn={}}},16436:function(mn,dn,st){var pt=st(67039),Dt=pt.Global;mn.exports={name:"oldFF-globalStorage",read:Ge,write:De,each:fe,remove:me,clearAll:ke};var oe=Dt.globalStorage;function Ge(Ce){return oe[Ce]}function De(Ce,Se){oe[Ce]=Se}function fe(Ce){for(var Se=oe.length-1;Se>=0;Se--){var Me=oe.key(Se);Ce(oe[Me],Me)}}function me(Ce){return oe.removeItem(Ce)}function ke(){fe(function(Ce,Se){delete oe[Ce]})}},76673:function(mn,dn,st){var pt=st(67039),Dt=pt.Global;mn.exports={name:"oldIE-userDataStorage",write:me,read:ke,each:Ce,remove:Se,clearAll:Me};var oe="storejs",Ge=Dt.document,De=de(),fe=(Dt.navigator?Dt.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function me(z,ee){if(!fe){var ae=we(z);De(function(ie){ie.setAttribute(ae,ee),ie.save(oe)})}}function ke(z){if(!fe){var ee=we(z),ae=null;return De(function(ie){ae=ie.getAttribute(ee)}),ae}}function Ce(z){De(function(ee){for(var ae=ee.XMLDocument.documentElement.attributes,ie=ae.length-1;ie>=0;ie--){var le=ae[ie];z(ee.getAttribute(le.name),le.name)}})}function Se(z){var ee=we(z);De(function(ae){ae.removeAttribute(ee),ae.save(oe)})}function Me(){De(function(z){var ee=z.XMLDocument.documentElement.attributes;z.load(oe);for(var ae=ee.length-1;ae>=0;ae--)z.removeAttribute(ee[ae].name);z.save(oe)})}var ve=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function we(z){return z.replace(/^\d/,"___$&").replace(ve,"___")}function de(){if(!Ge||!Ge.documentElement||!Ge.documentElement.addBehavior)return null;var z="script",ee,ae,ie;try{ae=new ActiveXObject("htmlfile"),ae.open(),ae.write("<"+z+">document.w=window</"+z+'><iframe src="/favicon.ico"></iframe>'),ae.close(),ee=ae.w.frames[0].document,ie=ee.createElement("div")}catch(le){ie=Ge.createElement("div"),ee=Ge.body}return function(le){var ue=[].slice.call(arguments,0);ue.unshift(ie),ee.appendChild(ie),ie.addBehavior("#default#userData"),ie.load(oe),le.apply(this,ue),ee.removeChild(ie)}}},65578:function(mn,dn,st){var pt=st(67039),Dt=pt.Global;mn.exports={name:"sessionStorage",read:Ge,write:De,each:fe,remove:me,clearAll:ke};function oe(){return Dt.sessionStorage}function Ge(Ce){return oe().getItem(Ce)}function De(Ce,Se){return oe().setItem(Ce,Se)}function fe(Ce){for(var Se=oe().length-1;Se>=0;Se--){var Me=oe().key(Se);Ce(Ge(Me),Me)}}function me(Ce){return oe().removeItem(Ce)}function ke(){return oe().clear()}},93314:function(mn){"use strict";mn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},16722:function(mn,dn,st){"use strict";st.d(dn,{Z:function(){return ke}});const pt=Ce=>typeof Ce=="object"&&Ce!=null&&Ce.nodeType===1,Dt=(Ce,Se)=>(!Se||Ce!=="hidden")&&Ce!=="visible"&&Ce!=="clip",oe=(Ce,Se)=>{if(Ce.clientHeight<Ce.scrollHeight||Ce.clientWidth<Ce.scrollWidth){const Me=getComputedStyle(Ce,null);return Dt(Me.overflowY,Se)||Dt(Me.overflowX,Se)||(ve=>{const we=(de=>{if(!de.ownerDocument||!de.ownerDocument.defaultView)return null;try{return de.ownerDocument.defaultView.frameElement}catch(z){return null}})(ve);return!!we&&(we.clientHeight<ve.scrollHeight||we.clientWidth<ve.scrollWidth)})(Ce)}return!1},Ge=(Ce,Se,Me,ve,we,de,z,ee)=>de<Ce&&z>Se||de>Ce&&z<Se?0:de<=Ce&&ee<=Me||z>=Se&&ee>=Me?de-Ce-ve:z>Se&&ee<Me||de<Ce&&ee>Me?z-Se+we:0,De=Ce=>{const Se=Ce.parentElement;return Se==null?Ce.getRootNode().host||null:Se},fe=(Ce,Se)=>{var Me,ve,we,de;if(typeof document=="undefined")return[];const{scrollMode:z,block:ee,inline:ae,boundary:ie,skipOverflowHiddenElements:le}=Se,ue=typeof ie=="function"?ie:Ct=>Ct!==ie;if(!pt(Ce))throw new TypeError("Invalid target");const ge=document.scrollingElement||document.documentElement,Pe=[];let je=Ce;for(;pt(je)&&ue(je);){if(je=De(je),je===ge){Pe.push(je);break}je!=null&&je===document.body&&oe(je)&&!oe(document.documentElement)||je!=null&&oe(je,le)&&Pe.push(je)}const Be=(ve=(Me=window.visualViewport)==null?void 0:Me.width)!=null?ve:innerWidth,Fe=(de=(we=window.visualViewport)==null?void 0:we.height)!=null?de:innerHeight,{scrollX:Ne,scrollY:Ae}=window,{height:Re,width:We,top:Ye,right:Ue,bottom:Ke,left:ot}=Ce.getBoundingClientRect(),{top:ut,right:ft,bottom:wt,left:Je}=(Ct=>{const gt=window.getComputedStyle(Ct);return{top:parseFloat(gt.scrollMarginTop)||0,right:parseFloat(gt.scrollMarginRight)||0,bottom:parseFloat(gt.scrollMarginBottom)||0,left:parseFloat(gt.scrollMarginLeft)||0}})(Ce);let nt=ee==="start"||ee==="nearest"?Ye-ut:ee==="end"?Ke+wt:Ye+Re/2-ut+wt,xt=ae==="center"?ot+We/2-Je+ft:ae==="end"?Ue+ft:ot-Je;const Pt=[];for(let Ct=0;Ct<Pe.length;Ct++){const gt=Pe[Ct],{height:dt,width:ht,top:Et,right:St,bottom:Ft,left:mt}=gt.getBoundingClientRect();if(z==="if-needed"&&Ye>=0&&ot>=0&&Ke<=Fe&&Ue<=Be&&(gt===ge&&!oe(gt)||Ye>=Et&&Ke<=Ft&&ot>=mt&&Ue<=St))return Pt;const yt=getComputedStyle(gt),tt=parseInt(yt.borderLeftWidth,10),Ve=parseInt(yt.borderTopWidth,10),xe=parseInt(yt.borderRightWidth,10),Le=parseInt(yt.borderBottomWidth,10);let Xe=0,rt=0;const Ie="offsetWidth"in gt?gt.offsetWidth-gt.clientWidth-tt-xe:0,_e="offsetHeight"in gt?gt.offsetHeight-gt.clientHeight-Ve-Le:0,He="offsetWidth"in gt?gt.offsetWidth===0?0:ht/gt.offsetWidth:0,Qe="offsetHeight"in gt?gt.offsetHeight===0?0:dt/gt.offsetHeight:0;if(ge===gt)Xe=ee==="start"?nt:ee==="end"?nt-Fe:ee==="nearest"?Ge(Ae,Ae+Fe,Fe,Ve,Le,Ae+nt,Ae+nt+Re,Re):nt-Fe/2,rt=ae==="start"?xt:ae==="center"?xt-Be/2:ae==="end"?xt-Be:Ge(Ne,Ne+Be,Be,tt,xe,Ne+xt,Ne+xt+We,We),Xe=Math.max(0,Xe+Ae),rt=Math.max(0,rt+Ne);else{Xe=ee==="start"?nt-Et-Ve:ee==="end"?nt-Ft+Le+_e:ee==="nearest"?Ge(Et,Ft,dt,Ve,Le+_e,nt,nt+Re,Re):nt-(Et+dt/2)+_e/2,rt=ae==="start"?xt-mt-tt:ae==="center"?xt-(mt+ht/2)+Ie/2:ae==="end"?xt-St+xe+Ie:Ge(mt,St,ht,tt,xe+Ie,xt,xt+We,We);const{scrollLeft:ct,scrollTop:at}=gt;Xe=Qe===0?0:Math.max(0,Math.min(at+Xe/Qe,gt.scrollHeight-dt/Qe+_e)),rt=He===0?0:Math.max(0,Math.min(ct+rt/He,gt.scrollWidth-ht/He+Ie)),nt+=at-Xe,xt+=ct-rt}Pt.push({el:gt,top:Xe,left:rt})}return Pt},me=Ce=>Ce===!1?{block:"end",inline:"nearest"}:(Se=>Se===Object(Se)&&Object.keys(Se).length!==0)(Ce)?Ce:{block:"start",inline:"nearest"};function ke(Ce,Se){if(!Ce.isConnected||!(we=>{let de=we;for(;de&&de.parentNode;){if(de.parentNode===document)return!0;de=de.parentNode instanceof ShadowRoot?de.parentNode.host:de.parentNode}return!1})(Ce))return;const Me=(we=>{const de=window.getComputedStyle(we);return{top:parseFloat(de.scrollMarginTop)||0,right:parseFloat(de.scrollMarginRight)||0,bottom:parseFloat(de.scrollMarginBottom)||0,left:parseFloat(de.scrollMarginLeft)||0}})(Ce);if((we=>typeof we=="object"&&typeof we.behavior=="function")(Se))return Se.behavior(fe(Ce,Se));const ve=typeof Se=="boolean"||Se==null?void 0:Se.behavior;for(const{el:we,top:de,left:z}of fe(Ce,me(Se))){const ee=de-Me.top+Me.bottom,ae=z-Me.left+Me.right;we.scroll({top:ee,left:ae,behavior:ve})}}}}]);